{"version":3,"sources":["kendo.dataviz.treemap.js"],"names":["f","define","$","normalizeText","text","String","replace","REPLACE_REGEX","SPACE","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","zeroSize","width","height","baseline","measureText","style","measureBox","TextMetrics","current","measure","LRUCache","DEFAULT_OPTIONS","defaultMeasureBox","window","kendo","util","Class","extend","init","size","this","_size","_length","_map","put","value","map","entry","_head","_tail","newer","older","get","baselineMarkerSize","document","createElement","cssText","options","_cache","styleKey","cacheKey","cachedResult","baselineMarker","textStr","box","_baselineMarker","cloneNode","textContent","appendChild","body","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","marker","deepExtend","jQuery","amd","a1","a2","a3","undefined","getField","field","row","getter","defined","UNDEFINED","colorsByLength","min","max","rgbColor","minRGBtoDecimal","rgbToDecimal","maxRGBtoDecimal","isDarker","colorBrightness","colors","r","colorByIndex","g","b","buildColorFromRGB","index","color","minColor","math","abs","maxColor","step","currentStep","decimalToRgb","colorToRGB","rgbToHex","number","result","round","toString","toUpperCase","colorLength","substring","rgb","parseInt","brightness","sqrt","power","pow","Math","proxy","isArray","outerHeight","_outerHeight","outerWidth","_outerWidth","Widget","ui","template","HierarchicalDataSource","data","dataviz","NS","CHANGE","DATA_BOUND","ITEM_CREATED","MAX_VALUE","Number","MOUSEOVER_NS","MOUSELEAVE_NS","TreeMap","element","destroy","empty","fn","call","wrapper","_initTheme","addClass","_setLayout","_originalOptions","_initDataSource","_attachEvents","notify","name","theme","autoBind","textField","valueField","colorField","events","that","themes","themeName","toLowerCase","themeOptions","treeMap","on","_mouseover","_mouseleave","_resizeHandler","resize","onResize","type","_layout","SliceAndDice","_view","SliceAndDiceView","Squarified","SquarifiedView","dataSource","_dataChangeHandler","_onDataChange","create","bind","fetch","setDataSource","unbind","e","item","root","htmlSize","node","items","_getByUid","uid","children","Query","_sortForGrouping","_wrapItem","compute","coord","_setColors","render","_cleanItems","createRoot","_root","_colorIdx","load","trigger","angular","elements","find","colorRange","leafNodes","colorIdx","dataItem","hasChildren","_contentSize","view","renderHeight","wrap","level","pop","concat","attr","getByUid","findByUid","target","hasClass","_removeActiveState","removeClass","off","unbindResize","getSize","dimensions","_resize","rootElement","css","_resizeItems","child","childElement","idx","titleSize","filter","setItemSize","setOptions","_setEvents","top","left","leaf","tree","layoutChildren","minimumSideValue","firstElement","tail","parentArea","totalArea","itemsArea","parseFloat","area","layoutHorizontal","slice","squarify","initElement","computeDim","newCoords","layoutLast","layoutRow","worstAspectRatio","dim","w","layoutV","layoutH","orientation","layoutVertical","layoutChange","areaSum","maxArea","minArea","rootCoord","newRootCoord","ans","_totalArea","total","offset","title","_clean","_getText","_createTitle","append","_compile","_createWrap","innerWidth","rootWrap","htmlElement","_createLeaf","_createTile","toggleClass","_tileColorBrightness","toggle","html","tile","_itemCoordinates","coordinates","_renderTemplate","titleTemplate","vertical","quotient","sliceAndDice","plugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBAAsB,cAAeD,IAC9C,YACG,SAAUE,GAqDP,QAASC,GAAcC,GACnB,OAAcA,EAAPC,IAAaC,QAAQC,EAAeC,GAE/C,QAASC,GAAUC,GAAnB,GAEaC,GADLC,IACJ,KAASD,IAAOD,GACZE,EAAMC,KAAKF,EAAMD,EAAOC,GAE5B,OAAOC,GAAME,OAAOC,KAAK,IAE7B,QAASC,GAAQC,GAAjB,GAEaC,GADLC,EAAO,UACX,KAASD,EAAI,EAAGA,EAAID,EAAIG,SAAUF,EAC9BC,IAASA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IACzEA,GAAQF,EAAII,WAAWH,EAE3B,OAAOC,KAAS,EAEpB,QAASG,KACL,OACIC,MAAO,EACPC,OAAQ,EACRC,SAAU,GA0DlB,QAASC,GAAYtB,EAAMuB,EAAOC,GAC9B,MAAOC,GAAYC,QAAQC,QAAQ3B,EAAMuB,EAAOC,GAtIvD,GA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GACnB/P,KAAKoQ,SAASL,EAAOhG,EAAK0B,UAEtBzB,EAAStM,KADTqM,EAAKqH,SACWrB,EAAMjR,SAENiR,EAAMlR,SAG9BiO,EAAYqD,OAAOnQ,KAAKqQ,eACxBrQ,KAAK8P,QAAUjK,EAAWiH,GAAeA,EAAYwD,cAAgB,GAElEtG,GAEXoD,UAAW,SAAUtD,EAAMhD,GACvB,GAAI/G,EAMJ,OAJIA,GADA+J,EAAKsH,SACEtK,EAAQuD,SAAS,oBAAoBvL,SAErCgI,EAAQuD,SAAS,6BAA6BxL,QAElDkB,GAAQ,GAEnBmQ,aAAc,SAAUpG,GACpB,GAAIiG,EAMJ,OAJIA,GAAQvS,EADRsM,EAAKsH,SACK,sCAEA,gDAEPrB,EAAMI,OAAO3S,EAAE,eAAesT,KAAK9Q,KAAKiQ,SAASnG,OA2FhE1D,GAAQJ,GAAGuL,OAAO1K,IACpBpH,OAAOC,MAAM2C,QACR5C,OAAOC,OACE,kBAAVnC,SAAwBA,OAAO+E,IAAM/E,OAAS,SAAUgF,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dataviz.treemap.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/text-metrics', ['kendo.core'], f);\n}(function () {\n (function ($) {\n window.kendo.util = window.kendo.util || {};\n var LRUCache = kendo.Class.extend({\n init: function (size) {\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n put: function (key, value) {\n var map = this._map;\n var entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!this._head) {\n this._head = this._tail = entry;\n } else {\n this._tail.newer = entry;\n entry.older = this._tail;\n this._tail = entry;\n }\n if (this._length >= this._size) {\n map[this._head.key] = null;\n this._head = this._head.newer;\n this._head.older = null;\n } else {\n this._length++;\n }\n },\n get: function (key) {\n var entry = this._map[key];\n if (entry) {\n if (entry === this._head && entry !== this._tail) {\n this._head = entry.newer;\n this._head.older = null;\n }\n if (entry !== this._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = this._tail;\n entry.newer = null;\n this._tail.newer = entry;\n this._tail = entry;\n }\n return entry.value;\n }\n }\n });\n var REPLACE_REGEX = /\\r?\\n|\\r|\\t/g;\n var SPACE = ' ';\n function normalizeText(text) {\n return String(text).replace(REPLACE_REGEX, SPACE);\n }\n function objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n return parts.sort().join('');\n }\n function hashKey(str) {\n var hash = 2166136261;\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n return hash >>> 0;\n }\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var DEFAULT_OPTIONS = { baselineMarkerSize: 1 };\n var defaultMeasureBox;\n if (typeof document !== 'undefined') {\n defaultMeasureBox = document.createElement('div');\n defaultMeasureBox.style.cssText = 'position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;' + 'padding: 0 !important; margin: 0 !important; border: 0 !important;' + 'line-height: normal !important; visibility: hidden !important; white-space: pre!important;';\n }\n var TextMetrics = kendo.Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this.options = $.extend({}, DEFAULT_OPTIONS, options);\n },\n measure: function (text, style, options) {\n if (options === void 0) {\n options = {};\n }\n if (!text) {\n return zeroSize();\n }\n var styleKey = objectKey(style);\n var cacheKey = hashKey(text + styleKey);\n var cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = options.box || defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (typeof value !== 'undefined') {\n measureBox.style[key] = value;\n }\n }\n var textStr = options.normalizeText !== false ? normalizeText(text) : String(text);\n measureBox.textContent = textStr;\n measureBox.appendChild(baselineMarker);\n document.body.appendChild(measureBox);\n if (textStr.length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n measureBox.parentNode.removeChild(measureBox);\n return size;\n },\n _baselineMarker: function () {\n var marker = document.createElement('div');\n marker.style.cssText = 'display: inline-block; vertical-align: baseline;width: ' + this.options.baselineMarkerSize + 'px; height: ' + this.options.baselineMarkerSize + 'px;overflow: hidden;';\n return marker;\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n kendo.deepExtend(kendo.util, {\n LRUCache: LRUCache,\n TextMetrics: TextMetrics,\n measureText: measureText,\n objectKey: objectKey,\n hashKey: hashKey,\n normalizeText: normalizeText\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.dataviz.treemap', [\n 'kendo.data',\n 'kendo.userevents',\n 'kendo.dataviz.themes'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dataviz.treeMap',\n name: 'TreeMap',\n category: 'dataviz',\n description: 'The Kendo DataViz TreeMap',\n depends: [\n 'data',\n 'userevents',\n 'dataviz.themes'\n ]\n };\n (function ($, undefined) {\n var math = Math, proxy = $.proxy, isArray = $.isArray, kendo = window.kendo, outerHeight = kendo._outerHeight, outerWidth = kendo._outerWidth, Class = kendo.Class, Widget = kendo.ui.Widget, template = kendo.template, deepExtend = kendo.deepExtend, HierarchicalDataSource = kendo.data.HierarchicalDataSource, getter = kendo.getter, dataviz = kendo.dataviz;\n var NS = '.kendoTreeMap', CHANGE = 'change', DATA_BOUND = 'dataBound', ITEM_CREATED = 'itemCreated', MAX_VALUE = Number.MAX_VALUE, MOUSEOVER_NS = 'mouseover' + NS, MOUSELEAVE_NS = 'mouseleave' + NS, UNDEFINED = 'undefined';\n var TreeMap = Widget.extend({\n init: function (element, options) {\n kendo.destroy(element);\n $(element).empty();\n Widget.fn.init.call(this, element, options);\n this.wrapper = this.element;\n this._initTheme(this.options);\n this.element.addClass('k-widget k-treemap');\n this._setLayout();\n this._originalOptions = deepExtend({}, this.options);\n this._initDataSource();\n this._attachEvents();\n kendo.notify(this, dataviz.ui);\n },\n options: {\n name: 'TreeMap',\n theme: 'default',\n autoBind: true,\n textField: 'text',\n valueField: 'value',\n colorField: 'color'\n },\n events: [\n DATA_BOUND,\n ITEM_CREATED\n ],\n _initTheme: function (options) {\n var that = this, themes = dataviz.ui.themes || {}, themeName = ((options || {}).theme || '').toLowerCase(), themeOptions = (themes[themeName] || {}).treeMap;\n that.options = deepExtend({}, themeOptions, options);\n },\n _attachEvents: function () {\n this.element.on(MOUSEOVER_NS, proxy(this._mouseover, this)).on(MOUSELEAVE_NS, proxy(this._mouseleave, this));\n this._resizeHandler = proxy(this.resize, this, false);\n kendo.onResize(this._resizeHandler);\n },\n _setLayout: function () {\n if (this.options.type === 'horizontal') {\n this._layout = new SliceAndDice(false);\n this._view = new SliceAndDiceView(this, this.options);\n } else if (this.options.type === 'vertical') {\n this._layout = new SliceAndDice(true);\n this._view = new SliceAndDiceView(this, this.options);\n } else {\n this._layout = new Squarified();\n this._view = new SquarifiedView(this, this.options);\n }\n },\n _initDataSource: function () {\n var that = this, options = that.options, dataSource = options.dataSource;\n that._dataChangeHandler = proxy(that._onDataChange, that);\n that.dataSource = HierarchicalDataSource.create(dataSource).bind(CHANGE, that._dataChangeHandler);\n if (dataSource) {\n if (that.options.autoBind) {\n that.dataSource.fetch();\n }\n }\n },\n setDataSource: function (dataSource) {\n var that = this;\n that.dataSource.unbind(CHANGE, that._dataChangeHandler);\n that.dataSource = dataSource.bind(CHANGE, that._dataChangeHandler);\n if (dataSource) {\n if (that.options.autoBind) {\n that.dataSource.fetch();\n }\n }\n },\n _onDataChange: function (e) {\n var node = e.node;\n var items = e.items;\n var options = this.options;\n var item, i;\n if (!node) {\n this._cleanItems();\n this.element.empty();\n item = this._wrapItem(items[0]);\n this._layout.createRoot(item, outerWidth(this.element), outerHeight(this.element), this.options.type === 'vertical');\n this._view.createRoot(item);\n this._root = item;\n this._colorIdx = 0;\n } else {\n if (items.length) {\n var root = this._getByUid(node.uid);\n root.children = [];\n items = new kendo.data.Query(items)._sortForGrouping(options.valueField, 'desc');\n for (i = 0; i < items.length; i++) {\n item = items[i];\n root.children.push(this._wrapItem(item));\n }\n var htmlSize = this._view.htmlSize(root);\n this._layout.compute(root.children, root.coord, htmlSize);\n this._setColors(root.children);\n this._view.render(root);\n }\n }\n for (i = 0; i < items.length; i++) {\n items[i].load();\n }\n if (node) {\n this.trigger(DATA_BOUND, { node: node });\n }\n },\n _cleanItems: function () {\n var that = this;\n that.angular('cleanup', function () {\n return { elements: that.element.find('.k-leaf div,.k-treemap-title,.k-treemap-title-vertical') };\n });\n },\n _setColors: function (items) {\n var colors = this.options.colors;\n var colorIdx = this._colorIdx;\n var color = colors[colorIdx % colors.length];\n var colorRange, item;\n if (isArray(color)) {\n colorRange = colorsByLength(color[0], color[1], items.length);\n }\n var leafNodes = false;\n for (var i = 0; i < items.length; i++) {\n item = items[i];\n if (!defined(item.color)) {\n if (colorRange) {\n item.color = colorRange[i];\n } else {\n item.color = color;\n }\n }\n if (!item.dataItem.hasChildren) {\n leafNodes = true;\n }\n }\n if (leafNodes) {\n this._colorIdx++;\n }\n },\n _contentSize: function (root) {\n this.view.renderHeight(root);\n },\n _wrapItem: function (item) {\n var wrap = {};\n if (defined(this.options.valueField)) {\n wrap.value = getField(this.options.valueField, item);\n }\n if (defined(this.options.colorField)) {\n wrap.color = getField(this.options.colorField, item);\n }\n if (defined(this.options.textField)) {\n wrap.text = getField(this.options.textField, item);\n }\n wrap.level = item.level();\n wrap.dataItem = item;\n return wrap;\n },\n _getByUid: function (uid) {\n var items = [this._root];\n var item;\n while (items.length) {\n item = items.pop();\n if (item.dataItem.uid === uid) {\n return item;\n }\n if (item.children) {\n items = items.concat(item.children);\n }\n }\n },\n dataItem: function (node) {\n var uid = $(node).attr(kendo.attr('uid')), dataSource = this.dataSource;\n return dataSource && dataSource.getByUid(uid);\n },\n findByUid: function (uid) {\n return this.element.find('.k-treemap-tile[' + kendo.attr('uid') + '=\\'' + uid + '\\']');\n },\n _mouseover: function (e) {\n var target = $(e.target);\n if (target.hasClass('k-leaf')) {\n this._removeActiveState();\n target.removeClass('k-state-hover').addClass('k-state-hover');\n }\n },\n _removeActiveState: function () {\n this.element.find('.k-state-hover').removeClass('k-state-hover');\n },\n _mouseleave: function () {\n this._removeActiveState();\n },\n destroy: function () {\n Widget.fn.destroy.call(this);\n this.element.off(NS);\n if (this.dataSource) {\n this.dataSource.unbind(CHANGE, this._dataChangeHandler);\n }\n this._root = null;\n kendo.unbindResize(this._resizeHandler);\n kendo.destroy(this.element);\n },\n items: function () {\n return $();\n },\n getSize: function () {\n return kendo.dimensions(this.element);\n },\n _resize: function () {\n var root = this._root;\n if (root) {\n var element = this.element;\n var rootElement = element.children();\n root.coord.width = outerWidth(element);\n root.coord.height = outerHeight(element);\n rootElement.css({\n width: root.coord.width,\n height: root.coord.height\n });\n this._resizeItems(root, rootElement);\n }\n },\n _resizeItems: function (root, element) {\n if (root.children && root.children.length) {\n var elements = element.children('.k-treemap-wrap').children();\n var child, childElement;\n this._layout.compute(root.children, root.coord, { text: this._view.titleSize(root, element) });\n for (var idx = 0; idx < root.children.length; idx++) {\n child = root.children[idx];\n childElement = elements.filter('[' + kendo.attr('uid') + '=\\'' + child.dataItem.uid + '\\']');\n this._view.setItemSize(child, childElement);\n this._resizeItems(child, childElement);\n }\n }\n },\n setOptions: function (options) {\n var dataSource = options.dataSource;\n options.dataSource = undefined;\n this._originalOptions = deepExtend(this._originalOptions, options);\n this.options = deepExtend({}, this._originalOptions);\n this._setLayout();\n this._initTheme(this.options);\n Widget.fn._setEvents.call(this, options);\n if (dataSource) {\n this.setDataSource(HierarchicalDataSource.create(dataSource));\n }\n if (this.options.autoBind) {\n this.dataSource.fetch();\n }\n }\n });\n var Squarified = Class.extend({\n createRoot: function (root, width, height) {\n root.coord = {\n width: width,\n height: height,\n top: 0,\n left: 0\n };\n },\n leaf: function (tree) {\n return !tree.children;\n },\n layoutChildren: function (items, coord) {\n var parentArea = coord.width * coord.height;\n var totalArea = 0, itemsArea = [], i;\n for (i = 0; i < items.length; i++) {\n itemsArea[i] = parseFloat(items[i].value);\n totalArea += itemsArea[i];\n }\n for (i = 0; i < itemsArea.length; i++) {\n items[i].area = parentArea * itemsArea[i] / totalArea;\n }\n var minimumSideValue = this.layoutHorizontal() ? coord.height : coord.width;\n var firstElement = [items[0]];\n var tail = items.slice(1);\n this.squarify(tail, firstElement, minimumSideValue, coord);\n },\n squarify: function (tail, initElement, width, coord) {\n this.computeDim(tail, initElement, width, coord);\n },\n computeDim: function (tail, initElement, width, coord) {\n if (tail.length + initElement.length == 1) {\n var element = tail.length == 1 ? tail : initElement;\n this.layoutLast(element, width, coord);\n return;\n }\n if (tail.length >= 2 && initElement.length === 0) {\n initElement = [tail[0]];\n tail = tail.slice(1);\n }\n if (tail.length === 0) {\n if (initElement.length > 0) {\n this.layoutRow(initElement, width, coord);\n }\n return;\n }\n var firstElement = tail[0];\n if (this.worstAspectRatio(initElement, width) >= this.worstAspectRatio([firstElement].concat(initElement), width)) {\n this.computeDim(tail.slice(1), initElement.concat([firstElement]), width, coord);\n } else {\n var newCoords = this.layoutRow(initElement, width, coord);\n this.computeDim(tail, [], newCoords.dim, newCoords);\n }\n },\n layoutLast: function (items, w, coord) {\n items[0].coord = coord;\n },\n layoutRow: function (items, width, coord) {\n if (this.layoutHorizontal()) {\n return this.layoutV(items, width, coord);\n } else {\n return this.layoutH(items, width, coord);\n }\n },\n orientation: 'h',\n layoutVertical: function () {\n return this.orientation === 'v';\n },\n layoutHorizontal: function () {\n return this.orientation === 'h';\n },\n layoutChange: function () {\n this.orientation = this.layoutVertical() ? 'h' : 'v';\n },\n worstAspectRatio: function (items, width) {\n if (!items || items.length === 0) {\n return MAX_VALUE;\n }\n var areaSum = 0, maxArea = 0, minArea = MAX_VALUE;\n for (var i = 0; i < items.length; i++) {\n var area = items[i].area;\n areaSum += area;\n minArea = minArea < area ? minArea : area;\n maxArea = maxArea > area ? maxArea : area;\n }\n return math.max(width * width * maxArea / (areaSum * areaSum), areaSum * areaSum / (width * width * minArea));\n },\n compute: function (children, rootCoord, htmlSize) {\n if (!(rootCoord.width >= rootCoord.height && this.layoutHorizontal())) {\n this.layoutChange();\n }\n if (children && children.length > 0) {\n var newRootCoord = {\n width: rootCoord.width,\n height: rootCoord.height - htmlSize.text,\n top: 0,\n left: 0\n };\n this.layoutChildren(children, newRootCoord);\n }\n },\n layoutV: function (items, width, coord) {\n var totalArea = this._totalArea(items), top = 0;\n width = round(totalArea / width);\n for (var i = 0; i < items.length; i++) {\n var height = round(items[i].area / width);\n items[i].coord = {\n height: height,\n width: width,\n top: coord.top + top,\n left: coord.left\n };\n top += height;\n }\n var ans = {\n height: coord.height,\n width: coord.width - width,\n top: coord.top,\n left: coord.left + width\n };\n ans.dim = math.min(ans.width, ans.height);\n if (ans.dim != ans.height) {\n this.layoutChange();\n }\n return ans;\n },\n layoutH: function (items, width, coord) {\n var totalArea = this._totalArea(items);\n var height = round(totalArea / width), top = coord.top, left = 0;\n for (var i = 0; i < items.length; i++) {\n items[i].coord = {\n height: height,\n width: round(items[i].area / height),\n top: top,\n left: coord.left + left\n };\n left += items[i].coord.width;\n }\n var ans = {\n height: coord.height - height,\n width: coord.width,\n top: coord.top + height,\n left: coord.left\n };\n ans.dim = math.min(ans.width, ans.height);\n if (ans.dim != ans.width) {\n this.layoutChange();\n }\n return ans;\n },\n _totalArea: function (items) {\n var total = 0;\n for (var i = 0; i < items.length; i++) {\n total += items[i].area;\n }\n return total;\n }\n });\n var SquarifiedView = Class.extend({\n init: function (treeMap, options) {\n this.options = deepExtend({}, this.options, options);\n this.treeMap = treeMap;\n this.element = $(treeMap.element);\n this.offset = 0;\n },\n titleSize: function (item, element) {\n var text = element.children('.k-treemap-title');\n return text.height() || 0;\n },\n htmlSize: function (root) {\n var rootElement = this._getByUid(root.dataItem.uid);\n var htmlSize = { text: 0 };\n if (root.children) {\n this._clean(rootElement);\n var text = this._getText(root);\n if (text) {\n var title = this._createTitle(root);\n rootElement.append(title);\n this._compile(title, root.dataItem);\n htmlSize.text = title.height();\n }\n rootElement.append(this._createWrap());\n this.offset = (outerWidth(rootElement) - rootElement.innerWidth()) / 2;\n }\n return htmlSize;\n },\n _compile: function (element, dataItem) {\n this.treeMap.angular('compile', function () {\n return {\n elements: element,\n data: [{ dataItem: dataItem }]\n };\n });\n },\n _getByUid: function (uid) {\n return this.element.find('.k-treemap-tile[' + kendo.attr('uid') + '=\\'' + uid + '\\']');\n },\n render: function (root) {\n var rootElement = this._getByUid(root.dataItem.uid);\n var children = root.children;\n if (children) {\n var rootWrap = rootElement.find('.k-treemap-wrap');\n for (var i = 0; i < children.length; i++) {\n var leaf = children[i];\n var htmlElement = this._createLeaf(leaf);\n rootWrap.append(htmlElement);\n this._compile(htmlElement.children(), leaf.dataItem);\n this.treeMap.trigger(ITEM_CREATED, { element: htmlElement });\n }\n }\n },\n createRoot: function (root) {\n var htmlElement = this._createLeaf(root);\n this.element.append(htmlElement);\n this._compile(htmlElement.children(), root.dataItem);\n this.treeMap.trigger(ITEM_CREATED, { element: htmlElement });\n },\n _clean: function (root) {\n this.treeMap.angular('cleanup', function () {\n return { elements: root.children(':not(.k-treemap-wrap)') };\n });\n root.css('background-color', '');\n root.removeClass('k-leaf');\n root.removeClass('k-inverse');\n root.empty();\n },\n _createLeaf: function (item) {\n return this._createTile(item).css('background-color', item.color).addClass('k-leaf').toggleClass('k-inverse', this._tileColorBrightness(item) > 180).toggle(item.value !== 0).append($('
').html(this._getText(item)));\n },\n _createTile: function (item) {\n var tile = $('
');\n this.setItemSize(item, tile);\n if (defined(item.dataItem) && defined(item.dataItem.uid)) {\n tile.attr(kendo.attr('uid'), item.dataItem.uid);\n }\n return tile;\n },\n _itemCoordinates: function (item) {\n var coordinates = {\n width: item.coord.width,\n height: item.coord.height,\n left: item.coord.left,\n top: item.coord.top\n };\n if (coordinates.left && this.offset) {\n coordinates.width += this.offset * 2;\n } else {\n coordinates.width += this.offset;\n }\n if (coordinates.top) {\n coordinates.height += this.offset * 2;\n } else {\n coordinates.height += this.offset;\n }\n return coordinates;\n },\n setItemSize: function (item, element) {\n var coordinates = this._itemCoordinates(item);\n element.css({\n width: coordinates.width,\n height: coordinates.height,\n left: coordinates.left,\n top: coordinates.top\n });\n },\n _getText: function (item) {\n var text = item.text;\n if (this.options.template) {\n text = this._renderTemplate(item);\n }\n return text;\n },\n _renderTemplate: function (item) {\n var titleTemplate = template(this.options.template);\n return titleTemplate({\n dataItem: item.dataItem,\n text: item.text\n });\n },\n _createTitle: function (item) {\n return $('
').append($('
').html(this._getText(item)));\n },\n _createWrap: function () {\n return $('
');\n },\n _tileColorBrightness: function (item) {\n return colorBrightness(item.color);\n }\n });\n var SliceAndDice = Class.extend({\n createRoot: function (root, width, height, vertical) {\n root.coord = {\n width: width,\n height: height,\n top: 0,\n left: 0\n };\n root.vertical = vertical;\n },\n init: function (vertical) {\n this.vertical = vertical;\n this.quotient = vertical ? 1 : 0;\n },\n compute: function (children, rootCoord, htmlSize) {\n if (children.length > 0) {\n var width = rootCoord.width;\n var height = rootCoord.height;\n if (this.vertical) {\n height -= htmlSize.text;\n } else {\n width -= htmlSize.text;\n }\n var newRootCoord = {\n width: width,\n height: height,\n top: 0,\n left: 0\n };\n this.layoutChildren(children, newRootCoord);\n }\n },\n layoutChildren: function (items, coord) {\n var parentArea = coord.width * coord.height;\n var totalArea = 0;\n var itemsArea = [];\n var i;\n for (i = 0; i < items.length; i++) {\n var item = items[i];\n itemsArea[i] = parseFloat(items[i].value);\n totalArea += itemsArea[i];\n item.vertical = this.vertical;\n }\n for (i = 0; i < itemsArea.length; i++) {\n items[i].area = parentArea * itemsArea[i] / totalArea;\n }\n this.sliceAndDice(items, coord);\n },\n sliceAndDice: function (items, coord) {\n var totalArea = this._totalArea(items);\n if (items[0].level % 2 === this.quotient) {\n this.layoutHorizontal(items, coord, totalArea);\n } else {\n this.layoutVertical(items, coord, totalArea);\n }\n },\n layoutHorizontal: function (items, coord, totalArea) {\n var left = 0;\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var width = item.area / (totalArea / coord.width);\n item.coord = {\n height: coord.height,\n width: width,\n top: coord.top,\n left: coord.left + left\n };\n left += width;\n }\n },\n layoutVertical: function (items, coord, totalArea) {\n var top = 0;\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var height = item.area / (totalArea / coord.height);\n item.coord = {\n height: height,\n width: coord.width,\n top: coord.top + top,\n left: coord.left\n };\n top += height;\n }\n },\n _totalArea: function (items) {\n var total = 0;\n for (var i = 0; i < items.length; i++) {\n total += items[i].area;\n }\n return total;\n }\n });\n var SliceAndDiceView = SquarifiedView.extend({\n htmlSize: function (root) {\n var rootElement = this._getByUid(root.dataItem.uid);\n var htmlSize = {\n text: 0,\n offset: 0\n };\n if (root.children) {\n this._clean(rootElement);\n var text = this._getText(root);\n if (text) {\n var title = this._createTitle(root);\n rootElement.append(title);\n this._compile(title, root.dataItem);\n if (root.vertical) {\n htmlSize.text = title.height();\n } else {\n htmlSize.text = title.width();\n }\n }\n rootElement.append(this._createWrap());\n this.offset = (outerWidth(rootElement) - rootElement.innerWidth()) / 2;\n }\n return htmlSize;\n },\n titleSize: function (item, element) {\n var size;\n if (item.vertical) {\n size = element.children('.k-treemap-title').height();\n } else {\n size = element.children('.k-treemap-title-vertical').width();\n }\n return size || 0;\n },\n _createTitle: function (item) {\n var title;\n if (item.vertical) {\n title = $('
');\n } else {\n title = $('
');\n }\n return title.append($('
').html(this._getText(item)));\n }\n });\n function getField(field, row) {\n if (row === null) {\n return row;\n }\n var get = getter(field, true);\n return get(row);\n }\n function defined(value) {\n return typeof value !== UNDEFINED;\n }\n function colorsByLength(min, max, length) {\n var minRGBtoDecimal = rgbToDecimal(min);\n var maxRGBtoDecimal = rgbToDecimal(max);\n var isDarker = colorBrightness(min) - colorBrightness(max) < 0;\n var colors = [];\n colors.push(min);\n for (var i = 0; i < length; i++) {\n var rgbColor = {\n r: colorByIndex(minRGBtoDecimal.r, maxRGBtoDecimal.r, i, length, isDarker),\n g: colorByIndex(minRGBtoDecimal.g, maxRGBtoDecimal.g, i, length, isDarker),\n b: colorByIndex(minRGBtoDecimal.b, maxRGBtoDecimal.b, i, length, isDarker)\n };\n colors.push(buildColorFromRGB(rgbColor));\n }\n colors.push(max);\n return colors;\n }\n function colorByIndex(min, max, index, length, isDarker) {\n var minColor = math.min(math.abs(min), math.abs(max));\n var maxColor = math.max(math.abs(min), math.abs(max));\n var step = (maxColor - minColor) / (length + 1);\n var currentStep = step * (index + 1);\n var color;\n if (isDarker) {\n color = minColor + currentStep;\n } else {\n color = maxColor - currentStep;\n }\n return color;\n }\n function buildColorFromRGB(color) {\n return '#' + decimalToRgb(color.r) + decimalToRgb(color.g) + decimalToRgb(color.b);\n }\n function rgbToDecimal(color) {\n color = color.replace('#', '');\n var rgbColor = colorToRGB(color);\n return {\n r: rgbToHex(rgbColor.r),\n g: rgbToHex(rgbColor.g),\n b: rgbToHex(rgbColor.b)\n };\n }\n function decimalToRgb(number) {\n var result = math.round(number).toString(16).toUpperCase();\n if (result.length === 1) {\n result = '0' + result;\n }\n return result;\n }\n function colorToRGB(color) {\n var colorLength = color.length;\n var rgbColor = {};\n if (colorLength === 3) {\n rgbColor.r = color[0];\n rgbColor.g = color[1];\n rgbColor.b = color[2];\n } else {\n rgbColor.r = color.substring(0, 2);\n rgbColor.g = color.substring(2, 4);\n rgbColor.b = color.substring(4, 6);\n }\n return rgbColor;\n }\n function rgbToHex(rgb) {\n return parseInt(rgb.toString(16), 16);\n }\n function colorBrightness(color) {\n var brightness = 0;\n if (color) {\n color = rgbToDecimal(color);\n brightness = math.sqrt(0.241 * color.r * color.r + 0.691 * color.g * color.g + 0.068 * color.b * color.b);\n }\n return brightness;\n }\n function round(value) {\n var power = math.pow(10, 4);\n return math.round(value * power) / power;\n }\n dataviz.ui.plugin(TreeMap);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}