{"version":3,"sources":["kendo.drawing.js"],"names":["f","define","$","createPromise","Deferred","promiseAll","promises","when","apply","kendo","drawing","util","deepExtend","window","jQuery","amd","a1","a2","a3","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","zeroSize","width","height","baseline","measureText","text","style","measureBox","TextMetrics","current","measure","LRUCache","DEFAULT_OPTIONS","defaultMeasureBox","Class","extend","init","size","this","_size","_length","_map","put","value","map","entry","_head","_tail","newer","older","get","baselineMarkerSize","document","createElement","cssText","options","_cache","box","styleKey","cacheKey","cachedResult","baselineMarker","_baselineMarker","cloneNode","textContent","appendChild","body","String","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","marker","append","first","second","arabicToRoman","n","values","roman","shift","literals","defined","UNDEFINED","definitionId","defId","deg","radians","DEG_TO_RAD","encodeUTF8","input","c","output","fromCharCode","encodeBase64","chr1","chr2","chr3","enc1","enc2","enc3","enc4","utfInput","isNaN","KEY_STR","charAt","eventCoordinates","e","x","location","y","pageX","clientX","pageY","clientY","eventElement","touch","initialTouch","target","isTransparent","color","last","array","limitValue","min","max","Math","mergeSort","a","cmp","merge","b","r","ai","bi","slice","m","left","right","floor","rad","degrees","pow","p","round","precision","power","valueOrDefault","defaultValue","bindEvents","element","events","eventName","eventNames","idx","trim","split","addEventListener","elementOffset","getBoundingClientRect","documentElement","top","pageYOffset","scrollTop","clientTop","pageXOffset","scrollLeft","clientLeft","elementStyles","styles","field","result","getComputedStyle","stylesArray","Array","isArray","getPixels","elementSize","size$1","parseInt","unbindEvents","name","removeEventListener","setAccessor","geometryChange","getAccessor","defineAccessors","fn","fields","capitalized","toUpperCase","substring","toMatrix","transformation","matrix","transform","Transformation","ellipseExtremeAngles","center","rx","ry","extremeX","extremeY","atan2","d","geometryAccessor","fieldName","_observerField","defineGeometryAccessors","names","close","tolerance","PRECISION","abs","closeOrLess","lineIntersection","p0","p1","p2","p3","s1x","s2x","s1y","s2y","nx","ny","s","t","Point","calculateAngle","cx","cy","cos","sin","normalizeArcParameters","parameters","cosine","sine","xT","yT","sign","xt2","yt2","rx2","ry2","delta","constT","cxT","cyT","uX","uY","vX","vY","startAngle","angleCosine","angle","endAngle","signEndAngle","x1","y1","x2","y2","largeArc","swipe","rotation","sqrt","acos","radiusX","radiusY","xRotation","bboxStartAngle","start","pointAccessor","create","definePointAccessors","isOutOfEndPoint","endPoint","controlPoint","point","rotatedPoint","transformCopy","rotate","calculateCurveAt","points","t1","toCubicPolynomial","numberSign","solveQuadraticEquation","squareRoot","solveCubicEquation","q","Q","b3a","y3","z1","z2","ComplexNumber","nthRoot","add","multiplyConstant","negate","multiply","isReal","real","hasRootsInRange","rootField","range","intersection","polynomial","roots","curveIntersectionsCount","bbox","rayIntersection","intersectsRay","count","bottomRight","lineIntersectionsCount","intersects","minX","maxX","minY","maxY","inRange","arrayLimits","arr","MAX_NUM","MIN_NUM","elementsBoundingBox","elements","applyTransform","boundingBox","elementBoundingBox","visible","rawBBox","Rect","union","elementsClippedBoundingBox","clippedBBox","translateToPoint","transofrm","origin","alignStart","rect","align","axis","sizeField","alignElements","alignment","clone","vAlign","stackElements","stackAxis","otherAxis","previousBBox","createStackElements","stack","vStack","getStacks","maxSize","stacks","stackSize","addElementToStack","wrapElements","startElement","elementIdx","wrap","vWrap","fit","rectSize","scale","transform$$1","optionsAccessor","set","defineOptionsAccessors","swing","position","PI","linear","easeOutElastic","time","diff","asin","toLineParamaters","isVertical","insertPosition","splice","reflectionPoint","scaleCopy","translate","quadraticToCubicControlPoints","scaledPoint","controlOut","translateWith","third","controlIn","parseParameters","replace","SPLIT_REGEX","match","number","parseFloat","renderAttr","renderAllAttr","attrs","renderStyle","isDefinition","type","nodeType","baseUrl","base","getElementsByTagName","href","hashIndex","indexOf","url","support","browser","msie","refUrl","id","skipBaseHref","alignToScreen","ctm","getScreenCTM","decodeEntities","_element","innerHTML","innerText","exportGroup","group","exportRoot","svg","root","RootNode","rootGroup","getOrigin","Group","children","load","SVG_NS","render","destroy","renderPath","ctx","path","segment","anchor","prevSeg","prevOut","segments","moveTo","bezierCurveTo","lineTo","closed","closePath","zIndexComparer","_zIndex","addGradientStops","gradient","stops","stop","parseColor","opacity","addColorStop","offset","toCssRgba","exportImage","surfaceOptions","container","surface","promise","defaults","cors","getSize","display","Surface$3","suspendTracking","draw","image","then","exportSVG","raw","resolve","slice$1","thing","prototype","call","addClass","el","cls","classList","className","removeClass","remove","reduce","word","setCSS","Object","keys","forEach","closest","selector","test","matches","getXY","drawDOM","doOne","pos","setTransform","nodeInfo","_clipbox","_matrix","Matrix","unit","_stackingContext","_avoidLinks","avoidLinks","renderElement","makeTemplate","template$$1","template","data","div","firstElementChild","handlePageBreaks","callback","forceBreak","pageWidth","pageHeight","margin","doPageBreak","next","whenImagesAreActuallyLoaded","pages","page","splitElement","copy","makePage","insertBefore","pageNum","totalPages","cacheImages","keepTogether","adjust","tag","tagName","getAttribute","bottomPadding","bottomBorder","saveAdjust","isFirst","fall","tableLayout","getPropertyValue","firstChild","nextSibling","breakAtElement","fallsOnMargin","splitText","firstInParent","table","colgroup","thead","grid","gridHead","querySelector","repeatHeaders","doc","createRange","setStartBefore","setEndBefore","extractContents","preventBulletOnListItem","boxSizing","padding","bottom","overflow","clear","pageClassName","available","node","len","nextnode","selectNodeContents","findEOP","setEnd","endOffset","li","setAttribute","ownerDocument","_destructive","cloneNodes","querySelectorAll","tfoot","ol","index","paddingLeft","paddingRight","beforePageBreak","setTimeout","reject","Error","pdf","defineFont","getFontFaces","forcePageBreak","hasPaperSize","paperSize","paperOptions","getPaperOptions","def","hasMargin","multiPage","_ignoreMargin","progress","canceled","cancel","doStylesheet","ss","rules","cssRules","ex","addRules","findFonts","rule","font","src","splitProperty","getFontURL","styleSheet","family","bold","italic","addRule","styleSheets","hasOwnProperty","obj","getCounter","getAllCounters","getPrototypeOf","reverse","incCounter","inc","_root","resetCounter","val","doCounters","updateCounters","counterIncrement","counterReset","parseColor$1","css","toRGB","pending","img","images","complete","onload","onerror","IMAGE_CACHE","urls","dive","parseBackgroundImage","bg","Image","crossOrigin","alphaNumeral","pushNodeInfo","decoration","toLowerCase","createsStackingContext","popNodeInfo","updateClipbox","intersect","emptyClipbox","cb","prop","pseudoElt","defa","webkit","mozilla","opera","arguments","pleaseSetPropertyValue","important","setProperty","getBorder","side","saveStyle","func","prev","getBorderRadius","sanitizeRadius","getContentBox","innerBox","wt","wr","wb","wl","getTransform","exec","radiansToDegrees","parseAngle","num","shape","setClipping","clipPath","clip","addArcToPath","Arc$2","curvePoints","curveTo","adjustBorderRadiusForBox","rTL","rTR","rBR","rBL","tl_x","tl_y","tr_x","tr_y","br_x","br_y","bl_x","bl_y","tl","tr","br","bl","elementRoundBox","bt","bb","pt","pr","pb","pl","roundBox","rTL0","rTR0","rBR0","rBL0","tmp","Path","fill","stroke","formatCounter","evalPseudoElementContent","content","displayCounter","separator","getCssText","_renderWithPseudoElements","pseudo","kind","place","psel","KENDO_PSEUDO_ELEMENT","fake","saveClass","_renderElement","adjustBoxes","boxes","tableBorderLeft","tableBorderTop","tableBox","firstCell","firstCellBox","rows","cells","drawEdge","Wtop","Wleft","Wright","rl","rr","drawRoundCorner","ri","anticlockwise","edge","drawBackground","background","_pdfLink","backgroundColor","backgroundImage","drawOneBackground","backgroundRepeat","backgroundPosition","backgroundOrigin","backgroundSize","drawBackgroundImage","img_width","img_height","renderBG","rewX","rewY","repeatX","aspect_ratio","orgBox","Image$1","gradientRenderer","drawBullet","_drawBullet","bullet","listStylePosition","textAlign","elementIndex","k","listStyleType","fontSize","lineHeight","fontFamily","disc","circle","square","drawOneBox","isLast","inv","shouldDrawLeft","shouldDrawRight","dir","innerbox","version","currentStyle","getClientRects","clipit","isFormField","maybeRenderWidget","renderContents","pxlen","scaledAngle","implicit","end","to","atan","tan","percent","fromRect","LinearGradient","userSpace","console","log","widget","visual","wrap$$1","attr","widgetInstance","exportDOMVisual","exportVisual","renderImage","zIndexSort","sa","sb","za","zb","pa","getSelectedOption","selectedOptions","selectedIndex","renderCheckbox","checked","Circle","Circle$2","renderFormField","option","whiteSpace","multiple","floats","positioned","floating","toDataURL","renderText","actuallyGetRangeBoundingRect","rectangles","chrome","Infinity","prevLineBottom","doChunk","found","cc","code","indent","origStart","substr","search","setStart","isJustified","columnCount","findEOL","eol","estimateLineLength","startOffset","drawText","getFontHeight","TextRect","decorate","line","ypos","underline","lineThrough","overline","align$$1","textOverflow","saveTextOverflow","hasDecoration","selectNode","groupInStackingContext","zIndex","main","_dom_zIndex","insert","invert","visibility","mmul","multiplyCopy","b1","c1","d1","e1","f1","b2","c2","d2","e2","f2","kendoDrawing","kendoDrawingUtil","kendoUtil","ObserversMixin","toString","OptionsStore","Size","Element$1","PI_DIV_2","GRADIENT","Paintable","IDENTITY_MATRIX_HASH","Measurable","DEFAULT_STROKE","MAX_INTERVAL","pow$1","pop","unshift","ElementsArray","GeometryElementsArray","Segment","DEFAULT_STROKE$1","Arc","MultiPath","DEFAULT_FONT","DEFAULT_FILL","Text","Traversable","Layout","Rect$2","StopsArray","GradientStop","Gradient","RadialGradient","easingFunctions","now","Animation","AnimationFactory","ShapeMap","SEGMENT_REGEX","MOVE","CLOSE","PathParser","SurfaceFactory","Surface","BaseNode","NODE_MAP","NONE","renderSVG","testFragment","testContainer","hasParser","renderSVG$1","TRANSFORM","DefinitionMap","Node","GradientStopNode","GradientNode","LinearGradientNode","RadialGradientNode","ClipNode","DefinitionNode","RTL","Surface$1","GroupNode","DASH_ARRAYS","SOLID","BUTT","ATTRIBUTE_MAP","SPACE","PathNode","ArcNode","CircleNode","RectNode","ImageNode","TextNode","MultiPathNode","geometry","NODE_MAP$2","Node$2","GroupNode$2","FRAME_DELAY","RootNode$2","QuadRoot","QuadNode","ROOT_SIZE","LEVEL_STEP","MAX_LEVEL","ShapesQuadTree","SurfaceCursor","PathNode$2","ArcNode$2","CircleNode$2","RectNode$2","ImageNode$2","TextNode$2","MultiPathNode$2","canvas","proto","method","this$1","observers","_observers","addObserver","removeObserver","trigger","methodName","event","observer","_suspended","optionsChange","suspend","resume","1","10","100","2","20","200","3","30","300","4","40","400","5","50","500","6","60","600","7","70","700","8","80","800","9","90","900","1000","Number","MAX_VALUE","prefix","member","_wrap","part","_set","composite","parentObj","_clear","wrapped","ref","g","h","det","equals","other","toArray","scaleX","scaleY","IDENTITY","originPoint","ZERO","move","distanceTo","dx","dy","digits","doRound","arg0","arg1","arguments$1","minPoint","maxPoint","defineProperties","setOrigin","setSize","topLeft","topRight","bottomLeft","fromPoints","expand","expandCopy","containsPoint","_isOnPath","rectOuter","rectInner","rect1","rect2","_optionsChange","_initOptions","parentTransform","parentMatrix","parent","currentTransform","elementTransform","elementMatrix","combinedMatrix","_clippedBBox","transformedPoint","_hasFill","_containsPoint","_hasStroke","radius","setCenter","setRadius","getCenter","pointAt","_pointAt","currentPointX","currentPointY","currentPoint","extremeAngles","inCircle","pointDistance","newFill","strokeWidth","matrixHash","_bboxCache","_matrixHash","_bbox","_geometry","radian","nextAngle","interval","_arcInterval","intervalAngle","subIntervalsCount","ceil","subIntervalAngle","currentAngle","_intervalCurvePoints","cp1","cp2","currentAngleX","currentAngleY","oldStart","p1Derivative","_derivativeAt","p2Derivative","inAngleRange","distance","angleRad","pointRadius","startPoint","arcParameters","_splice","_change","_add","_remove","howMany","concat","_clearObserver","_setObserver","cNumber","addConstant","rad$$1","nthR","bboxTo","toSegment","segmentAnchor","toSegmentAnchor","_curveBoundingBox","_lineBoundingBox","extremesX","_curveExtremesFor","extremesY","xLimits","yLimits","extremes","_curveExtremes","x3","x4","t2","_intersectionsTo","intersectionsCount","_isOnCurveTo","endSegment","p4","rotatedPoints","_isOnLineTo","_isOnPathTo","isOnPath","lineJoin","lastSegment","arc","_addArcSegments","arcTo","previous","pathWidth","segmentBox","fromArc","toPath","paths","metrics","_rect","childrenField","traverse","child","childrenChange","action","items","_reparent","insertAt","removeAt","newParent","alignContent","justifyContent","alignItems","spacing","orientation","lineSpacing","_fieldMap","_initMap","fieldMap","groupsSizeField","groupAxis","groupsAxis","reflow","groups","groupsSize","ref$1","groupOrigin","elementOrigin","groupStart","elementStart","groupBox","groupIdx","scaledStart","scaledSize","newStart","_initGroups","lineSize","bboxes","_newGroup","addGroup","_addToGroup","arg","_createStops","_userSpace","addStop","removeStop","_radius","_fallbackFill","fallbackFill","Date","getTime","setup","step","play","easing","finish","duration","delay","abort","loop","wallTime","easingPosition","_stopped","animationFrame","_items","register","l","isRelative","v","lastControlIn","previousCommand","cubicControlPoints","parse","multiPath","params","command","order","preferred","logToConsole","navigator","userAgent","Observable","_click","_handler","_mouseenter","_mouseleave","_mousemove","_visual","bind","_enableTracking","unbind","eventTarget","domNode","_kendoNode","parentElement","srcElement","currentSize","_resize","resize","force","_suspendedTracking","resumeTracking","originalEvent","_elementOffset","paddingTop","_surfacePoint","coord","childNodes","observe","removeSelf","invalidate","DOMParser","namespaceURI","parser","chartDoc","parseFromString","importedDoc","adoptNode","definitions","clearDefinitions","childNode","createDefinitions","attachTo","domElement","setElement","nodes","childElement","renderChildren","updateDefinition","allAttr","allCss","removeAttr","removeAttribute","mapTransform","renderTransform","transformChange","mapStyle","cursor","renderOpacity","hasDefinitions","definition","definitionChange","renderDefinitions","mapDefinitions","renderOffset","loadStops","stopNode","mapCoordinates","renderCoordinates","mapSpace","definitionMap","addDefinitions","removeDefinitions","createDefinition","item","addDefinition","mapItem","removeDefinition","defs","rtl","direction","_template","_rootElement","click","mouseover","mouseout","mousemove","viewBox","_offset","implementation","hasFeature","dot","dash","longdash","dashdot","longdashdot","longdashdotdot","fill.opacity","stroke.color","stroke.width","stroke.opacity","renderData","mapFill","mapStroke","printPath","currentType","segmentType","printPoints","segmentStart","segmentEnd","renderLinecap","dashType","renderDashType","renderStroke","dashArray","lineCap","renderFill","mapPosition","mapSource","renderPosition","encode","htmlEncode","renderSource","setY","renderContent","renderTextAnchor","initClip","clearClip","setClip","beginPath","loadElements","setOpacity","globalAlpha","opactity","renderTo","save","restore","getContext","invalidateHandler","_invalidate","throttle","clearRect","shapes","_quadNode","pointShapes","inBounds","nodeRect","nodeBottomRight","inserted","_initChildren","halfWidth","halfHeight","initRoots","rootMap","rootElements","pointShape","sectorRoot","assignZindex","levelWeight","parents","bboxChange","_insertShape","elementsArray","_insert","sectors","getSectors","inRoot","bottomX","bottomY","_resetCursor","_shapeCursor","_current","_defaultCursor","_getCursor","_setCursor","_mouseTrackHandler","_trackMouse","_searchTree","_cursor","undefined","resolveDataURL","rootElement","loadingStates","loading","currentShape","_currentShape","renderPoints","setLineDash","setLineCap","setLineJoin","setFill","setStroke","hasFill","setGradientFill","fillStyle","createLinearGradient","createRadialGradient","strokeStyle","lineWidth","mozDash","webkitLineDash","onLoad","onError","state","drawImage","fillText","strokeText","_pdfRect","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","$el","$clone","selected","orig","canvases","canvas$$1","skip_ws","tok_whitespace","read","token","read_stop","tok_length","tok_percent","read_linear_gradient","propName","to1","to2","tok_popen","tok_angle","tok_comma","tok_keyword","tok_pclose","read_url","tok_content","tok","cache1","tok_linear_gradient","tok_url","cache2","cache","looking_at","ret","last$$1","in_paren","in_string","dataviz","Color","NS","utils","outerWidth","_outerWidth","outerHeight","_outerHeight","proxy","TOOLTIP_TEMPLATE","TOOLTIP_CLOSE_TEMPLATE","SurfaceTooltip","_tooltipOptions","popupOptions","appendTo","animation","copyAnchorStyles","collision","_openPopupHandler","_openPopup","_bindEvents","showOn","autoHide","hideDelay","showAfter","_showHandler","_showEvent","_surfaceLeaveHandler","_surfaceLeave","_mouseleaveHandler","_mousemoveHandler","on","_hideClick","getPopup","popup","ui","Popup","off","clearTimeout","_timeout","shared","_tooltipShape","tooltip","_updateContent","isFunction","html","_position","tooltipOffset","_instance","surfaceOffset","show","_show","hide","_showTimeout","preventDefault","_autoHide","_measure","open","_closeButton","prependTo","wrapper","_popupRelatedTarget","relatedTarget","DrawingSurface","Widget","_triggerInstanceHandler","_triggerInstanceEvent","_bindHandler","hideTooltip","_tooltip","showTooltip","plugin"],"mappings":";;;;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\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('drawing/util', ['kendo.core'], f);\n}(function () {\n (function ($) {\n function createPromise() {\n return $.Deferred();\n }\n function promiseAll(promises) {\n return $.when.apply($, promises);\n }\n kendo.drawing.util = kendo.drawing.util || {};\n kendo.deepExtend(kendo.drawing.util, {\n createPromise: createPromise,\n promiseAll: promiseAll\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\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 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: nowrap!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, box) {\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 = 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 measureBox.textContent = text;\n measureBox.appendChild(baselineMarker);\n document.body.appendChild(measureBox);\n if (String(text).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 });\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('drawing/kendo-drawing', [\n 'drawing/util',\n 'kendo.color',\n 'util/text-metrics'\n ], f);\n}(function () {\n (function ($) {\n window.kendo = window.kendo || {};\n var kendoDrawing = kendo.drawing;\n var kendoDrawingUtil = kendoDrawing.util;\n var Class = kendo.Class;\n var kendoUtil = kendo.util;\n var support = kendo.support;\n var createPromise = kendoDrawingUtil.createPromise;\n var promiseAll = kendoDrawingUtil.promiseAll;\n var ObserversMixin = {\n extend: function (proto) {\n var this$1 = this;\n for (var method in this) {\n if (method !== 'extend') {\n proto[method] = this$1[method];\n }\n }\n },\n observers: function () {\n this._observers = this._observers || [];\n return this._observers;\n },\n addObserver: function (element) {\n if (!this._observers) {\n this._observers = [element];\n } else {\n this._observers.push(element);\n }\n return this;\n },\n removeObserver: function (element) {\n var observers = this.observers();\n var index = observers.indexOf(element);\n if (index !== -1) {\n observers.splice(index, 1);\n }\n return this;\n },\n trigger: function (methodName, event) {\n var observers = this._observers;\n if (observers && !this._suspended) {\n for (var idx = 0; idx < observers.length; idx++) {\n var observer = observers[idx];\n if (observer[methodName]) {\n observer[methodName](event);\n }\n }\n }\n return this;\n },\n optionsChange: function (e) {\n if (e === void 0) {\n e = {};\n }\n e.element = this;\n this.trigger('optionsChange', e);\n },\n geometryChange: function () {\n this.trigger('geometryChange', { element: this });\n },\n suspend: function () {\n this._suspended = (this._suspended || 0) + 1;\n return this;\n },\n resume: function () {\n this._suspended = Math.max((this._suspended || 0) - 1, 0);\n return this;\n },\n _observerField: function (field, value) {\n if (this[field]) {\n this[field].removeObserver(this);\n }\n this[field] = value;\n value.addObserver(this);\n }\n };\n function append(first, second) {\n first.push.apply(first, second);\n return first;\n }\n var literals = {\n 1: 'i',\n 10: 'x',\n 100: 'c',\n 2: 'ii',\n 20: 'xx',\n 200: 'cc',\n 3: 'iii',\n 30: 'xxx',\n 300: 'ccc',\n 4: 'iv',\n 40: 'xl',\n 400: 'cd',\n 5: 'v',\n 50: 'l',\n 500: 'd',\n 6: 'vi',\n 60: 'lx',\n 600: 'dc',\n 7: 'vii',\n 70: 'lxx',\n 700: 'dcc',\n 8: 'viii',\n 80: 'lxxx',\n 800: 'dccc',\n 9: 'ix',\n 90: 'xc',\n 900: 'cm',\n 1000: 'm'\n };\n function arabicToRoman(n) {\n var values = [\n 1000,\n 900,\n 800,\n 700,\n 600,\n 500,\n 400,\n 300,\n 200,\n 100,\n 90,\n 80,\n 70,\n 60,\n 50,\n 40,\n 30,\n 20,\n 10,\n 9,\n 8,\n 7,\n 6,\n 5,\n 4,\n 3,\n 2,\n 1\n ];\n var roman = '';\n while (n > 0) {\n if (n < values[0]) {\n values.shift();\n } else {\n roman += literals[values[0]];\n n -= values[0];\n }\n }\n return roman;\n }\n var UNDEFINED = 'undefined';\n function defined(value) {\n return typeof value !== UNDEFINED;\n }\n var defId = 1;\n function definitionId() {\n return 'kdef' + defId++;\n }\n var DEG_TO_RAD = Math.PI / 180;\n var MAX_NUM = Number.MAX_VALUE;\n var MIN_NUM = -Number.MAX_VALUE;\n function deg(radians) {\n return radians / DEG_TO_RAD;\n }\n var KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var fromCharCode = String.fromCharCode;\n function encodeUTF8(input) {\n var output = '';\n for (var i = 0; i < input.length; i++) {\n var c = input.charCodeAt(i);\n if (c < 128) {\n output += fromCharCode(c);\n } else if (c < 2048) {\n output += fromCharCode(192 | c >>> 6);\n output += fromCharCode(128 | c & 63);\n } else if (c < 65536) {\n output += fromCharCode(224 | c >>> 12);\n output += fromCharCode(128 | c >>> 6 & 63);\n output += fromCharCode(128 | c & 63);\n }\n }\n return output;\n }\n function encodeBase64(input) {\n var output = '';\n var i = 0;\n var utfInput = encodeUTF8(input);\n while (i < utfInput.length) {\n var chr1 = utfInput.charCodeAt(i++);\n var chr2 = utfInput.charCodeAt(i++);\n var chr3 = utfInput.charCodeAt(i++);\n var enc1 = chr1 >> 2;\n var enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n var enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n var enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) + KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4);\n }\n return output;\n }\n function eventCoordinates(e) {\n if (defined((e.x || {}).location)) {\n return {\n x: e.x.location,\n y: e.y.location\n };\n }\n return {\n x: e.pageX || e.clientX || 0,\n y: e.pageY || e.clientY || 0\n };\n }\n function eventElement(e) {\n if (e === void 0) {\n e = {};\n }\n return e.touch ? e.touch.initialTouch : e.target;\n }\n function isTransparent(color) {\n return color === '' || color === null || color === 'none' || color === 'transparent' || !defined(color);\n }\n function last(array) {\n if (array) {\n return array[array.length - 1];\n }\n }\n function limitValue(value, min, max) {\n return Math.max(Math.min(value, max), min);\n }\n function mergeSort(a, cmp) {\n if (a.length < 2) {\n return a.slice();\n }\n function merge(a, b) {\n var r = [], ai = 0, bi = 0, i = 0;\n while (ai < a.length && bi < b.length) {\n if (cmp(a[ai], b[bi]) <= 0) {\n r[i++] = a[ai++];\n } else {\n r[i++] = b[bi++];\n }\n }\n if (ai < a.length) {\n r.push.apply(r, a.slice(ai));\n }\n if (bi < b.length) {\n r.push.apply(r, b.slice(bi));\n }\n return r;\n }\n return function sort(a) {\n if (a.length <= 1) {\n return a;\n }\n var m = Math.floor(a.length / 2);\n var left = a.slice(0, m);\n var right = a.slice(m);\n left = sort(left);\n right = sort(right);\n return merge(left, right);\n }(a);\n }\n function rad(degrees) {\n return degrees * DEG_TO_RAD;\n }\n function pow(p) {\n if (p) {\n return Math.pow(10, p);\n }\n return 1;\n }\n function round(value, precision) {\n var power = pow(precision);\n return Math.round(value * power) / power;\n }\n function valueOrDefault(value, defaultValue) {\n return defined(value) ? value : defaultValue;\n }\n function bindEvents(element, events) {\n for (var eventName in events) {\n var eventNames = eventName.trim().split(' ');\n for (var idx = 0; idx < eventNames.length; idx++) {\n element.addEventListener(eventNames[idx], events[eventName], false);\n }\n }\n }\n function elementOffset(element) {\n var box = element.getBoundingClientRect();\n var documentElement = document.documentElement;\n return {\n top: box.top + (window.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0),\n left: box.left + (window.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0)\n };\n }\n function elementStyles(element, styles) {\n var result = {};\n var style = window.getComputedStyle(element);\n var stylesArray = Array.isArray(styles) ? styles : [styles];\n for (var idx = 0; idx < stylesArray.length; idx++) {\n var field = stylesArray[idx];\n result[field] = style[field];\n }\n return result;\n }\n function getPixels(value) {\n if (isNaN(value)) {\n return value;\n }\n return value + 'px';\n }\n function elementSize(element, size) {\n if (size) {\n var width = size.width;\n var height = size.height;\n if (defined(width)) {\n element.style.width = getPixels(width);\n }\n if (defined(height)) {\n element.style.height = getPixels(height);\n }\n } else {\n var size$1 = elementStyles(element, [\n 'width',\n 'height'\n ]);\n return {\n width: parseInt(size$1.width, 10),\n height: parseInt(size$1.height, 10)\n };\n }\n }\n function unbindEvents(element, events) {\n if (events === void 0) {\n events = {};\n }\n for (var name in events) {\n var eventNames = name.trim().split(' ');\n for (var idx = 0; idx < eventNames.length; idx++) {\n element.removeEventListener(eventNames[idx], events[name], false);\n }\n }\n }\n var util = {\n append: append,\n arabicToRoman: arabicToRoman,\n createPromise: createPromise,\n defined: defined,\n definitionId: definitionId,\n deg: deg,\n encodeBase64: encodeBase64,\n eventCoordinates: eventCoordinates,\n eventElement: eventElement,\n isTransparent: isTransparent,\n last: last,\n limitValue: limitValue,\n mergeSort: mergeSort,\n promiseAll: promiseAll,\n rad: rad,\n round: round,\n valueOrDefault: valueOrDefault,\n bindEvents: bindEvents,\n elementOffset: elementOffset,\n elementSize: elementSize,\n elementStyles: elementStyles,\n unbindEvents: unbindEvents,\n DEG_TO_RAD: DEG_TO_RAD,\n MAX_NUM: MAX_NUM,\n MIN_NUM: MIN_NUM\n };\n var toString = {}.toString;\n var OptionsStore = Class.extend({\n init: function (options, prefix) {\n var this$1 = this;\n if (prefix === void 0) {\n prefix = '';\n }\n this.prefix = prefix;\n for (var field in options) {\n var member = options[field];\n member = this$1._wrap(member, field);\n this$1[field] = member;\n }\n },\n get: function (field) {\n var parts = field.split('.');\n var result = this;\n while (parts.length && result) {\n var part = parts.shift();\n result = result[part];\n }\n return result;\n },\n set: function (field, value) {\n var current = this.get(field);\n if (current !== value) {\n this._set(field, this._wrap(value, field));\n this.optionsChange({\n field: this.prefix + field,\n value: value\n });\n }\n },\n _set: function (field, value) {\n var this$1 = this;\n var composite = field.indexOf('.') >= 0;\n var parentObj = this;\n var fieldName = field;\n if (composite) {\n var parts = fieldName.split('.');\n var prefix = this.prefix;\n while (parts.length > 1) {\n fieldName = parts.shift();\n prefix += fieldName + '.';\n var obj = parentObj[fieldName];\n if (!obj) {\n obj = new OptionsStore({}, prefix);\n obj.addObserver(this$1);\n parentObj[fieldName] = obj;\n }\n parentObj = obj;\n }\n fieldName = parts[0];\n }\n parentObj._clear(fieldName);\n parentObj[fieldName] = value;\n },\n _clear: function (field) {\n var current = this[field];\n if (current && current.removeObserver) {\n current.removeObserver(this);\n }\n },\n _wrap: function (object, field) {\n var type = toString.call(object);\n var wrapped = object;\n if (wrapped !== null && defined(wrapped) && type === '[object Object]') {\n if (!(object instanceof OptionsStore) && !(object instanceof Class)) {\n wrapped = new OptionsStore(wrapped, this.prefix + field + '.');\n }\n wrapped.addObserver(this);\n }\n return wrapped;\n }\n });\n ObserversMixin.extend(OptionsStore.prototype);\n function setAccessor(field) {\n return function (value) {\n if (this[field] !== value) {\n this[field] = value;\n this.geometryChange();\n }\n return this;\n };\n }\n function getAccessor(field) {\n return function () {\n return this[field];\n };\n }\n function defineAccessors(fn, fields) {\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i];\n var capitalized = name.charAt(0).toUpperCase() + name.substring(1, name.length);\n fn['set' + capitalized] = setAccessor(name);\n fn['get' + capitalized] = getAccessor(name);\n }\n }\n var Matrix = Class.extend({\n init: function (a, b, c, d, e, f) {\n if (a === void 0) {\n a = 0;\n }\n if (b === void 0) {\n b = 0;\n }\n if (c === void 0) {\n c = 0;\n }\n if (d === void 0) {\n d = 0;\n }\n if (e === void 0) {\n e = 0;\n }\n if (f === void 0) {\n f = 0;\n }\n this.a = a;\n this.b = b;\n this.c = c;\n this.d = d;\n this.e = e;\n this.f = f;\n },\n multiplyCopy: function (matrix) {\n return new Matrix(this.a * matrix.a + this.c * matrix.b, this.b * matrix.a + this.d * matrix.b, this.a * matrix.c + this.c * matrix.d, this.b * matrix.c + this.d * matrix.d, this.a * matrix.e + this.c * matrix.f + this.e, this.b * matrix.e + this.d * matrix.f + this.f);\n },\n invert: function () {\n var ref = this;\n var a = ref.a;\n var b = ref.b;\n var d = ref.c;\n var e = ref.d;\n var g = ref.e;\n var h = ref.f;\n var det = a * e - b * d;\n if (det === 0) {\n return null;\n }\n return new Matrix(e / det, -b / det, -d / det, a / det, (d * h - e * g) / det, (b * g - a * h) / det);\n },\n clone: function () {\n return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);\n },\n equals: function (other) {\n if (!other) {\n return false;\n }\n return this.a === other.a && this.b === other.b && this.c === other.c && this.d === other.d && this.e === other.e && this.f === other.f;\n },\n round: function (precision) {\n this.a = round(this.a, precision);\n this.b = round(this.b, precision);\n this.c = round(this.c, precision);\n this.d = round(this.d, precision);\n this.e = round(this.e, precision);\n this.f = round(this.f, precision);\n return this;\n },\n toArray: function (precision) {\n var result = [\n this.a,\n this.b,\n this.c,\n this.d,\n this.e,\n this.f\n ];\n if (defined(precision)) {\n for (var i = 0; i < result.length; i++) {\n result[i] = round(result[i], precision);\n }\n }\n return result;\n },\n toString: function (precision, separator) {\n if (separator === void 0) {\n separator = ',';\n }\n return this.toArray(precision).join(separator);\n }\n });\n Matrix.translate = function (x, y) {\n return new Matrix(1, 0, 0, 1, x, y);\n };\n Matrix.unit = function () {\n return new Matrix(1, 0, 0, 1, 0, 0);\n };\n Matrix.rotate = function (angle, x, y) {\n var matrix = new Matrix();\n matrix.a = Math.cos(rad(angle));\n matrix.b = Math.sin(rad(angle));\n matrix.c = -matrix.b;\n matrix.d = matrix.a;\n matrix.e = x - x * matrix.a + y * matrix.b || 0;\n matrix.f = y - y * matrix.a - x * matrix.b || 0;\n return matrix;\n };\n Matrix.scale = function (scaleX, scaleY) {\n return new Matrix(scaleX, 0, 0, scaleY, 0, 0);\n };\n Matrix.IDENTITY = Matrix.unit();\n function toMatrix(transformation) {\n if (transformation && typeof transformation.matrix === 'function') {\n return transformation.matrix();\n }\n return transformation;\n }\n var Point = Class.extend({\n init: function (x, y) {\n this.x = x || 0;\n this.y = y || 0;\n },\n equals: function (other) {\n return other && other.x === this.x && other.y === this.y;\n },\n clone: function () {\n return new Point(this.x, this.y);\n },\n rotate: function (angle, origin) {\n var originPoint = Point.create(origin) || Point.ZERO;\n return this.transform(Matrix.rotate(angle, originPoint.x, originPoint.y));\n },\n translate: function (x, y) {\n this.x += x;\n this.y += y;\n this.geometryChange();\n return this;\n },\n translateWith: function (point) {\n return this.translate(point.x, point.y);\n },\n move: function (x, y) {\n this.x = this.y = 0;\n return this.translate(x, y);\n },\n scale: function (scaleX, scaleY) {\n if (scaleY === void 0) {\n scaleY = scaleX;\n }\n this.x *= scaleX;\n this.y *= scaleY;\n this.geometryChange();\n return this;\n },\n scaleCopy: function (scaleX, scaleY) {\n return this.clone().scale(scaleX, scaleY);\n },\n transform: function (transformation) {\n var matrix = toMatrix(transformation);\n var ref = this;\n var x = ref.x;\n var y = ref.y;\n this.x = matrix.a * x + matrix.c * y + matrix.e;\n this.y = matrix.b * x + matrix.d * y + matrix.f;\n this.geometryChange();\n return this;\n },\n transformCopy: function (transformation) {\n var point = this.clone();\n if (transformation) {\n point.transform(transformation);\n }\n return point;\n },\n distanceTo: function (point) {\n var dx = this.x - point.x;\n var dy = this.y - point.y;\n return Math.sqrt(dx * dx + dy * dy);\n },\n round: function (digits) {\n this.x = round(this.x, digits);\n this.y = round(this.y, digits);\n this.geometryChange();\n return this;\n },\n toArray: function (digits) {\n var doRound = defined(digits);\n var x = doRound ? round(this.x, digits) : this.x;\n var y = doRound ? round(this.y, digits) : this.y;\n return [\n x,\n y\n ];\n },\n toString: function (digits, separator) {\n if (separator === void 0) {\n separator = ' ';\n }\n var ref = this;\n var x = ref.x;\n var y = ref.y;\n if (defined(digits)) {\n x = round(x, digits);\n y = round(y, digits);\n }\n return x + separator + y;\n }\n });\n Point.create = function (arg0, arg1) {\n if (defined(arg0)) {\n if (arg0 instanceof Point) {\n return arg0;\n } else if (arguments.length === 1 && arg0.length === 2) {\n return new Point(arg0[0], arg0[1]);\n }\n return new Point(arg0, arg1);\n }\n };\n Point.min = function () {\n var arguments$1 = arguments;\n var minX = MAX_NUM;\n var minY = MAX_NUM;\n for (var i = 0; i < arguments.length; i++) {\n var point = arguments$1[i];\n minX = Math.min(point.x, minX);\n minY = Math.min(point.y, minY);\n }\n return new Point(minX, minY);\n };\n Point.max = function () {\n var arguments$1 = arguments;\n var maxX = MIN_NUM;\n var maxY = MIN_NUM;\n for (var i = 0; i < arguments.length; i++) {\n var point = arguments$1[i];\n maxX = Math.max(point.x, maxX);\n maxY = Math.max(point.y, maxY);\n }\n return new Point(maxX, maxY);\n };\n Point.minPoint = function () {\n return new Point(MIN_NUM, MIN_NUM);\n };\n Point.maxPoint = function () {\n return new Point(MAX_NUM, MAX_NUM);\n };\n if (Object.defineProperties) {\n Object.defineProperties(Point, {\n ZERO: {\n get: function () {\n return new Point(0, 0);\n }\n }\n });\n }\n defineAccessors(Point.prototype, [\n 'x',\n 'y'\n ]);\n ObserversMixin.extend(Point.prototype);\n var Size = Class.extend({\n init: function (width, height) {\n this.width = width || 0;\n this.height = height || 0;\n },\n equals: function (other) {\n return other && other.width === this.width && other.height === this.height;\n },\n clone: function () {\n return new Size(this.width, this.height);\n },\n toArray: function (digits) {\n var doRound = defined(digits);\n var width = doRound ? round(this.width, digits) : this.width;\n var height = doRound ? round(this.height, digits) : this.height;\n return [\n width,\n height\n ];\n }\n });\n Size.create = function (arg0, arg1) {\n if (defined(arg0)) {\n if (arg0 instanceof Size) {\n return arg0;\n } else if (arguments.length === 1 && arg0.length === 2) {\n return new Size(arg0[0], arg0[1]);\n }\n return new Size(arg0, arg1);\n }\n };\n if (Object.defineProperties) {\n Object.defineProperties(Size, {\n ZERO: {\n get: function () {\n return new Size(0, 0);\n }\n }\n });\n }\n defineAccessors(Size.prototype, [\n 'width',\n 'height'\n ]);\n ObserversMixin.extend(Size.prototype);\n var Rect = Class.extend({\n init: function (origin, size) {\n if (origin === void 0) {\n origin = new Point();\n }\n if (size === void 0) {\n size = new Size();\n }\n this.setOrigin(origin);\n this.setSize(size);\n },\n clone: function () {\n return new Rect(this.origin.clone(), this.size.clone());\n },\n equals: function (other) {\n return other && other.origin.equals(this.origin) && other.size.equals(this.size);\n },\n setOrigin: function (value) {\n this._observerField('origin', Point.create(value));\n this.geometryChange();\n return this;\n },\n getOrigin: function () {\n return this.origin;\n },\n setSize: function (value) {\n this._observerField('size', Size.create(value));\n this.geometryChange();\n return this;\n },\n getSize: function () {\n return this.size;\n },\n width: function () {\n return this.size.width;\n },\n height: function () {\n return this.size.height;\n },\n topLeft: function () {\n return this.origin.clone();\n },\n bottomRight: function () {\n return this.origin.clone().translate(this.width(), this.height());\n },\n topRight: function () {\n return this.origin.clone().translate(this.width(), 0);\n },\n bottomLeft: function () {\n return this.origin.clone().translate(0, this.height());\n },\n center: function () {\n return this.origin.clone().translate(this.width() / 2, this.height() / 2);\n },\n bbox: function (matrix) {\n var tl = this.topLeft().transformCopy(matrix);\n var tr = this.topRight().transformCopy(matrix);\n var br = this.bottomRight().transformCopy(matrix);\n var bl = this.bottomLeft().transformCopy(matrix);\n return Rect.fromPoints(tl, tr, br, bl);\n },\n transformCopy: function (m) {\n return Rect.fromPoints(this.topLeft().transform(m), this.bottomRight().transform(m));\n },\n expand: function (x, y) {\n if (y === void 0) {\n y = x;\n }\n this.size.width += 2 * x;\n this.size.height += 2 * y;\n this.origin.translate(-x, -y);\n return this;\n },\n expandCopy: function (x, y) {\n return this.clone().expand(x, y);\n },\n containsPoint: function (point) {\n var origin = this.origin;\n var bottomRight = this.bottomRight();\n return !(point.x < origin.x || point.y < origin.y || bottomRight.x < point.x || bottomRight.y < point.y);\n },\n _isOnPath: function (point, width) {\n var rectOuter = this.expandCopy(width, width);\n var rectInner = this.expandCopy(-width, -width);\n return rectOuter.containsPoint(point) && !rectInner.containsPoint(point);\n }\n });\n Rect.fromPoints = function () {\n var topLeft = Point.min.apply(null, arguments);\n var bottomRight = Point.max.apply(null, arguments);\n var size = new Size(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);\n return new Rect(topLeft, size);\n };\n Rect.union = function (a, b) {\n return Rect.fromPoints(Point.min(a.topLeft(), b.topLeft()), Point.max(a.bottomRight(), b.bottomRight()));\n };\n Rect.intersect = function (a, b) {\n var rect1 = {\n left: a.topLeft().x,\n top: a.topLeft().y,\n right: a.bottomRight().x,\n bottom: a.bottomRight().y\n };\n var rect2 = {\n left: b.topLeft().x,\n top: b.topLeft().y,\n right: b.bottomRight().x,\n bottom: b.bottomRight().y\n };\n if (rect1.left <= rect2.right && rect2.left <= rect1.right && rect1.top <= rect2.bottom && rect2.top <= rect1.bottom) {\n return Rect.fromPoints(new Point(Math.max(rect1.left, rect2.left), Math.max(rect1.top, rect2.top)), new Point(Math.min(rect1.right, rect2.right), Math.min(rect1.bottom, rect2.bottom)));\n }\n };\n ObserversMixin.extend(Rect.prototype);\n var Transformation = Class.extend({\n init: function (matrix) {\n if (matrix === void 0) {\n matrix = Matrix.unit();\n }\n this._matrix = matrix;\n },\n clone: function () {\n return new Transformation(this._matrix.clone());\n },\n equals: function (other) {\n return other && other._matrix.equals(this._matrix);\n },\n translate: function (x, y) {\n this._matrix = this._matrix.multiplyCopy(Matrix.translate(x, y));\n this._optionsChange();\n return this;\n },\n scale: function (scaleX, scaleY, origin) {\n if (scaleY === void 0) {\n scaleY = scaleX;\n }\n if (origin === void 0) {\n origin = null;\n }\n var originPoint = origin;\n if (originPoint) {\n originPoint = Point.create(originPoint);\n this._matrix = this._matrix.multiplyCopy(Matrix.translate(originPoint.x, originPoint.y));\n }\n this._matrix = this._matrix.multiplyCopy(Matrix.scale(scaleX, scaleY));\n if (originPoint) {\n this._matrix = this._matrix.multiplyCopy(Matrix.translate(-originPoint.x, -originPoint.y));\n }\n this._optionsChange();\n return this;\n },\n rotate: function (angle, origin) {\n var originPoint = Point.create(origin) || Point.ZERO;\n this._matrix = this._matrix.multiplyCopy(Matrix.rotate(angle, originPoint.x, originPoint.y));\n this._optionsChange();\n return this;\n },\n multiply: function (transformation) {\n var matrix = toMatrix(transformation);\n this._matrix = this._matrix.multiplyCopy(matrix);\n this._optionsChange();\n return this;\n },\n matrix: function (value) {\n if (value) {\n this._matrix = value;\n this._optionsChange();\n return this;\n }\n return this._matrix;\n },\n _optionsChange: function () {\n this.optionsChange({\n field: 'transform',\n value: this\n });\n }\n });\n ObserversMixin.extend(Transformation.prototype);\n function transform(matrix) {\n if (matrix === null) {\n return null;\n }\n if (matrix instanceof Transformation) {\n return matrix;\n }\n return new Transformation(matrix);\n }\n var Element$1 = Class.extend({\n init: function (options) {\n this._initOptions(options);\n },\n _initOptions: function (options) {\n if (options === void 0) {\n options = {};\n }\n var clip = options.clip;\n var transform$$1 = options.transform;\n if (transform$$1) {\n options.transform = transform(transform$$1);\n }\n if (clip && !clip.id) {\n clip.id = definitionId();\n }\n this.options = new OptionsStore(options);\n this.options.addObserver(this);\n },\n transform: function (value) {\n if (defined(value)) {\n this.options.set('transform', transform(value));\n } else {\n return this.options.get('transform');\n }\n },\n parentTransform: function () {\n var element = this;\n var parentMatrix;\n while (element.parent) {\n element = element.parent;\n var transformation = element.transform();\n if (transformation) {\n parentMatrix = transformation.matrix().multiplyCopy(parentMatrix || Matrix.unit());\n }\n }\n if (parentMatrix) {\n return transform(parentMatrix);\n }\n },\n currentTransform: function (parentTransform) {\n if (parentTransform === void 0) {\n parentTransform = this.parentTransform();\n }\n var elementTransform = this.transform();\n var elementMatrix = toMatrix(elementTransform);\n var parentMatrix = toMatrix(parentTransform);\n var combinedMatrix;\n if (elementMatrix && parentMatrix) {\n combinedMatrix = parentMatrix.multiplyCopy(elementMatrix);\n } else {\n combinedMatrix = elementMatrix || parentMatrix;\n }\n if (combinedMatrix) {\n return transform(combinedMatrix);\n }\n },\n visible: function (value) {\n if (defined(value)) {\n this.options.set('visible', value);\n return this;\n }\n return this.options.get('visible') !== false;\n },\n clip: function (value) {\n var options = this.options;\n if (defined(value)) {\n if (value && !value.id) {\n value.id = definitionId();\n }\n options.set('clip', value);\n return this;\n }\n return options.get('clip');\n },\n opacity: function (value) {\n if (defined(value)) {\n this.options.set('opacity', value);\n return this;\n }\n return valueOrDefault(this.options.get('opacity'), 1);\n },\n clippedBBox: function (transformation) {\n var bbox = this._clippedBBox(transformation);\n if (bbox) {\n var clip = this.clip();\n return clip ? Rect.intersect(bbox, clip.bbox(transformation)) : bbox;\n }\n },\n containsPoint: function (point, parentTransform) {\n if (this.visible()) {\n var transform$$1 = this.currentTransform(parentTransform);\n var transformedPoint = point;\n if (transform$$1) {\n transformedPoint = point.transformCopy(transform$$1.matrix().invert());\n }\n return this._hasFill() && this._containsPoint(transformedPoint) || this._isOnPath && this._hasStroke() && this._isOnPath(transformedPoint);\n }\n return false;\n },\n _hasFill: function () {\n var fill = this.options.fill;\n return fill && !isTransparent(fill.color);\n },\n _hasStroke: function () {\n var stroke = this.options.stroke;\n return stroke && stroke.width > 0 && !isTransparent(stroke.color);\n },\n _clippedBBox: function (transformation) {\n return this.bbox(transformation);\n }\n });\n Element$1.prototype.nodeType = 'Element';\n ObserversMixin.extend(Element$1.prototype);\n function ellipseExtremeAngles(center, rx, ry, matrix) {\n var extremeX = 0;\n var extremeY = 0;\n if (matrix) {\n extremeX = Math.atan2(matrix.c * ry, matrix.a * rx);\n if (matrix.b !== 0) {\n extremeY = Math.atan2(matrix.d * ry, matrix.b * rx);\n }\n }\n return {\n x: extremeX,\n y: extremeY\n };\n }\n var PI_DIV_2 = Math.PI / 2;\n var Circle$2 = Class.extend({\n init: function (center, radius) {\n if (center === void 0) {\n center = new Point();\n }\n if (radius === void 0) {\n radius = 0;\n }\n this.setCenter(center);\n this.setRadius(radius);\n },\n setCenter: function (value) {\n this._observerField('center', Point.create(value));\n this.geometryChange();\n return this;\n },\n getCenter: function () {\n return this.center;\n },\n equals: function (other) {\n return other && other.center.equals(this.center) && other.radius === this.radius;\n },\n clone: function () {\n return new Circle$2(this.center.clone(), this.radius);\n },\n pointAt: function (angle) {\n return this._pointAt(rad(angle));\n },\n bbox: function (matrix) {\n var this$1 = this;\n var extremeAngles = ellipseExtremeAngles(this.center, this.radius, this.radius, matrix);\n var minPoint = Point.maxPoint();\n var maxPoint = Point.minPoint();\n for (var i = 0; i < 4; i++) {\n var currentPointX = this$1._pointAt(extremeAngles.x + i * PI_DIV_2).transformCopy(matrix);\n var currentPointY = this$1._pointAt(extremeAngles.y + i * PI_DIV_2).transformCopy(matrix);\n var currentPoint = new Point(currentPointX.x, currentPointY.y);\n minPoint = Point.min(minPoint, currentPoint);\n maxPoint = Point.max(maxPoint, currentPoint);\n }\n return Rect.fromPoints(minPoint, maxPoint);\n },\n _pointAt: function (angle) {\n var ref = this;\n var center = ref.center;\n var radius = ref.radius;\n return new Point(center.x + radius * Math.cos(angle), center.y + radius * Math.sin(angle));\n },\n containsPoint: function (point) {\n var ref = this;\n var center = ref.center;\n var radius = ref.radius;\n var inCircle = Math.pow(point.x - center.x, 2) + Math.pow(point.y - center.y, 2) <= Math.pow(radius, 2);\n return inCircle;\n },\n _isOnPath: function (point, width) {\n var ref = this;\n var center = ref.center;\n var radius = ref.radius;\n var pointDistance = center.distanceTo(point);\n return radius - width <= pointDistance && pointDistance <= radius + width;\n }\n });\n defineAccessors(Circle$2.prototype, ['radius']);\n ObserversMixin.extend(Circle$2.prototype);\n var GRADIENT = 'Gradient';\n var Paintable = {\n extend: function (proto) {\n proto.fill = this.fill;\n proto.stroke = this.stroke;\n },\n fill: function (color, opacity) {\n var options = this.options;\n if (defined(color)) {\n if (color && color.nodeType !== GRADIENT) {\n var newFill = { color: color };\n if (defined(opacity)) {\n newFill.opacity = opacity;\n }\n options.set('fill', newFill);\n } else {\n options.set('fill', color);\n }\n return this;\n }\n return options.get('fill');\n },\n stroke: function (color, width, opacity) {\n if (defined(color)) {\n this.options.set('stroke.color', color);\n if (defined(width)) {\n this.options.set('stroke.width', width);\n }\n if (defined(opacity)) {\n this.options.set('stroke.opacity', opacity);\n }\n return this;\n }\n return this.options.get('stroke');\n }\n };\n var IDENTITY_MATRIX_HASH = Matrix.IDENTITY.toString();\n var Measurable = {\n extend: function (proto) {\n proto.bbox = this.bbox;\n proto.geometryChange = this.geometryChange;\n },\n bbox: function (transformation) {\n var combinedMatrix = toMatrix(this.currentTransform(transformation));\n var matrixHash = combinedMatrix ? combinedMatrix.toString() : IDENTITY_MATRIX_HASH;\n var bbox;\n if (this._bboxCache && this._matrixHash === matrixHash) {\n bbox = this._bboxCache.clone();\n } else {\n bbox = this._bbox(combinedMatrix);\n this._bboxCache = bbox ? bbox.clone() : null;\n this._matrixHash = matrixHash;\n }\n var strokeWidth = this.options.get('stroke.width');\n if (strokeWidth && bbox) {\n bbox.expand(strokeWidth / 2);\n }\n return bbox;\n },\n geometryChange: function () {\n delete this._bboxCache;\n this.trigger('geometryChange', { element: this });\n }\n };\n function geometryAccessor(name) {\n var fieldName = '_' + name;\n return function (value) {\n if (defined(value)) {\n this._observerField(fieldName, value);\n this.geometryChange();\n return this;\n }\n return this[fieldName];\n };\n }\n function defineGeometryAccessors(fn, names) {\n for (var i = 0; i < names.length; i++) {\n fn[names[i]] = geometryAccessor(names[i]);\n }\n }\n var DEFAULT_STROKE = '#000';\n var Circle = Element$1.extend({\n init: function (geometry, options) {\n if (geometry === void 0) {\n geometry = new Circle$2();\n }\n if (options === void 0) {\n options = {};\n }\n Element$1.fn.init.call(this, options);\n this.geometry(geometry);\n if (!defined(this.options.stroke)) {\n this.stroke(DEFAULT_STROKE);\n }\n },\n rawBBox: function () {\n return this._geometry.bbox();\n },\n _bbox: function (matrix) {\n return this._geometry.bbox(matrix);\n },\n _containsPoint: function (point) {\n return this.geometry().containsPoint(point);\n },\n _isOnPath: function (point) {\n return this.geometry()._isOnPath(point, this.options.stroke.width / 2);\n }\n });\n Circle.prototype.nodeType = 'Circle';\n Paintable.extend(Circle.prototype);\n Measurable.extend(Circle.prototype);\n defineGeometryAccessors(Circle.prototype, ['geometry']);\n var PRECISION = 10;\n function close(a, b, tolerance) {\n if (tolerance === void 0) {\n tolerance = PRECISION;\n }\n return round(Math.abs(a - b), tolerance) === 0;\n }\n function closeOrLess(a, b, tolerance) {\n return a < b || close(a, b, tolerance);\n }\n function lineIntersection(p0, p1, p2, p3) {\n var s1x = p1.x - p0.x;\n var s2x = p3.x - p2.x;\n var s1y = p1.y - p0.y;\n var s2y = p3.y - p2.y;\n var nx = p0.x - p2.x;\n var ny = p0.y - p2.y;\n var d = s1x * s2y - s2x * s1y;\n var s = (s1x * ny - s1y * nx) / d;\n var t = (s2x * ny - s2y * nx) / d;\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n return new Point(p0.x + t * s1x, p0.y + t * s1y);\n }\n }\n var MAX_INTERVAL = 45;\n var pow$1 = Math.pow;\n var Arc$2 = Class.extend({\n init: function (center, options) {\n if (center === void 0) {\n center = new Point();\n }\n if (options === void 0) {\n options = {};\n }\n this.setCenter(center);\n this.radiusX = options.radiusX;\n this.radiusY = options.radiusY || options.radiusX;\n this.startAngle = options.startAngle;\n this.endAngle = options.endAngle;\n this.anticlockwise = options.anticlockwise || false;\n this.xRotation = options.xRotation;\n },\n clone: function () {\n return new Arc$2(this.center, {\n radiusX: this.radiusX,\n radiusY: this.radiusY,\n startAngle: this.startAngle,\n endAngle: this.endAngle,\n anticlockwise: this.anticlockwise\n });\n },\n setCenter: function (value) {\n this._observerField('center', Point.create(value));\n this.geometryChange();\n return this;\n },\n getCenter: function () {\n return this.center;\n },\n pointAt: function (angle) {\n var center = this.center;\n var radian = rad(angle);\n return new Point(center.x + this.radiusX * Math.cos(radian), center.y + this.radiusY * Math.sin(radian));\n },\n curvePoints: function () {\n var this$1 = this;\n var startAngle = this.startAngle;\n var dir = this.anticlockwise ? -1 : 1;\n var curvePoints = [this.pointAt(startAngle)];\n var interval = this._arcInterval();\n var intervalAngle = interval.endAngle - interval.startAngle;\n var subIntervalsCount = Math.ceil(intervalAngle / MAX_INTERVAL);\n var subIntervalAngle = intervalAngle / subIntervalsCount;\n var currentAngle = startAngle;\n var transformation;\n if (this.xRotation) {\n transformation = transform().rotate(this.xRotation, this.center);\n }\n for (var i = 1; i <= subIntervalsCount; i++) {\n var nextAngle = currentAngle + dir * subIntervalAngle;\n var points = this$1._intervalCurvePoints(currentAngle, nextAngle, transformation);\n curvePoints.push(points.cp1, points.cp2, points.p2);\n currentAngle = nextAngle;\n }\n return curvePoints;\n },\n bbox: function (matrix) {\n var this$1 = this;\n var interval = this._arcInterval();\n var startAngle = interval.startAngle;\n var endAngle = interval.endAngle;\n var extremeAngles = ellipseExtremeAngles(this.center, this.radiusX, this.radiusY, matrix);\n var extremeX = deg(extremeAngles.x);\n var extremeY = deg(extremeAngles.y);\n var endPoint = this.pointAt(endAngle).transformCopy(matrix);\n var currentAngleX = bboxStartAngle(extremeX, startAngle);\n var currentAngleY = bboxStartAngle(extremeY, startAngle);\n var currentPoint = this.pointAt(startAngle).transformCopy(matrix);\n var minPoint = Point.min(currentPoint, endPoint);\n var maxPoint = Point.max(currentPoint, endPoint);\n while (currentAngleX < endAngle || currentAngleY < endAngle) {\n var currentPointX = void 0;\n if (currentAngleX < endAngle) {\n currentPointX = this$1.pointAt(currentAngleX).transformCopy(matrix);\n currentAngleX += 90;\n }\n var currentPointY = void 0;\n if (currentAngleY < endAngle) {\n currentPointY = this$1.pointAt(currentAngleY).transformCopy(matrix);\n currentAngleY += 90;\n }\n currentPoint = new Point(currentPointX.x, currentPointY.y);\n minPoint = Point.min(minPoint, currentPoint);\n maxPoint = Point.max(maxPoint, currentPoint);\n }\n return Rect.fromPoints(minPoint, maxPoint);\n },\n _arcInterval: function () {\n var ref = this;\n var startAngle = ref.startAngle;\n var endAngle = ref.endAngle;\n var anticlockwise = ref.anticlockwise;\n if (anticlockwise) {\n var oldStart = startAngle;\n startAngle = endAngle;\n endAngle = oldStart;\n }\n if (startAngle > endAngle || anticlockwise && startAngle === endAngle) {\n endAngle += 360;\n }\n return {\n startAngle: startAngle,\n endAngle: endAngle\n };\n },\n _intervalCurvePoints: function (startAngle, endAngle, transformation) {\n var p1 = this.pointAt(startAngle);\n var p2 = this.pointAt(endAngle);\n var p1Derivative = this._derivativeAt(startAngle);\n var p2Derivative = this._derivativeAt(endAngle);\n var t = (rad(endAngle) - rad(startAngle)) / 3;\n var cp1 = new Point(p1.x + t * p1Derivative.x, p1.y + t * p1Derivative.y);\n var cp2 = new Point(p2.x - t * p2Derivative.x, p2.y - t * p2Derivative.y);\n if (transformation) {\n p1.transform(transformation);\n p2.transform(transformation);\n cp1.transform(transformation);\n cp2.transform(transformation);\n }\n return {\n p1: p1,\n cp1: cp1,\n cp2: cp2,\n p2: p2\n };\n },\n _derivativeAt: function (angle) {\n var radian = rad(angle);\n return new Point(-this.radiusX * Math.sin(radian), this.radiusY * Math.cos(radian));\n },\n containsPoint: function (point) {\n var interval = this._arcInterval();\n var intervalAngle = interval.endAngle - interval.startAngle;\n var ref = this;\n var center = ref.center;\n var radiusX = ref.radiusX;\n var radiusY = ref.radiusY;\n var distance = center.distanceTo(point);\n var angleRad = Math.atan2(point.y - center.y, point.x - center.x);\n var pointRadius = radiusX * radiusY / Math.sqrt(pow$1(radiusX, 2) * pow$1(Math.sin(angleRad), 2) + pow$1(radiusY, 2) * pow$1(Math.cos(angleRad), 2));\n var startPoint = this.pointAt(this.startAngle).round(PRECISION);\n var endPoint = this.pointAt(this.endAngle).round(PRECISION);\n var intersection = lineIntersection(center, point.round(PRECISION), startPoint, endPoint);\n var containsPoint;\n if (intervalAngle < 180) {\n containsPoint = intersection && closeOrLess(center.distanceTo(intersection), distance) && closeOrLess(distance, pointRadius);\n } else {\n var angle = calculateAngle(center.x, center.y, radiusX, radiusY, point.x, point.y);\n if (angle !== 360) {\n angle = (360 + angle) % 360;\n }\n var inAngleRange = interval.startAngle <= angle && angle <= interval.endAngle;\n containsPoint = inAngleRange && closeOrLess(distance, pointRadius) || !inAngleRange && (!intersection || intersection.equals(point));\n }\n return containsPoint;\n },\n _isOnPath: function (point, width) {\n var interval = this._arcInterval();\n var center = this.center;\n var angle = calculateAngle(center.x, center.y, this.radiusX, this.radiusY, point.x, point.y);\n if (angle !== 360) {\n angle = (360 + angle) % 360;\n }\n var inAngleRange = interval.startAngle <= angle && angle <= interval.endAngle;\n return inAngleRange && this.pointAt(angle).distanceTo(point) <= width;\n }\n });\n Arc$2.fromPoints = function (start, end, rx, ry, largeArc, swipe, rotation) {\n var arcParameters = normalizeArcParameters({\n x1: start.x,\n y1: start.y,\n x2: end.x,\n y2: end.y,\n rx: rx,\n ry: ry,\n largeArc: largeArc,\n swipe: swipe,\n rotation: rotation\n });\n return new Arc$2(arcParameters.center, {\n startAngle: arcParameters.startAngle,\n endAngle: arcParameters.endAngle,\n radiusX: arcParameters.radiusX,\n radiusY: arcParameters.radiusY,\n xRotation: arcParameters.xRotation,\n anticlockwise: swipe === 0\n });\n };\n defineAccessors(Arc$2.prototype, [\n 'radiusX',\n 'radiusY',\n 'startAngle',\n 'endAngle',\n 'anticlockwise'\n ]);\n ObserversMixin.extend(Arc$2.prototype);\n function calculateAngle(cx, cy, rx, ry, x, y) {\n var cos = round((x - cx) / rx, 3);\n var sin = round((y - cy) / ry, 3);\n return round(deg(Math.atan2(sin, cos)));\n }\n function normalizeArcParameters(parameters) {\n var x1 = parameters.x1;\n var y1 = parameters.y1;\n var x2 = parameters.x2;\n var y2 = parameters.y2;\n var rx = parameters.rx;\n var ry = parameters.ry;\n var largeArc = parameters.largeArc;\n var swipe = parameters.swipe;\n var rotation = parameters.rotation;\n if (rotation === void 0) {\n rotation = 0;\n }\n var radians = rad(rotation);\n var cosine = Math.cos(radians);\n var sine = Math.sin(radians);\n var xT = cosine * (x1 - x2) / 2 + sine * (y1 - y2) / 2;\n var yT = -sine * (x1 - x2) / 2 + cosine * (y1 - y2) / 2;\n var sign = largeArc !== swipe ? 1 : -1;\n var xt2 = Math.pow(xT, 2);\n var yt2 = Math.pow(yT, 2);\n var rx2 = Math.pow(rx, 2);\n var ry2 = Math.pow(ry, 2);\n var delta = xt2 / rx2 + yt2 / ry2;\n if (delta > 1) {\n delta = Math.sqrt(xt2 / rx2 + yt2 / ry2);\n rx = delta * rx;\n rx2 = Math.pow(rx, 2);\n ry = delta * ry;\n ry2 = Math.pow(ry, 2);\n }\n var constT = sign * Math.sqrt((rx2 * ry2 - rx2 * yt2 - ry2 * xt2) / (rx2 * yt2 + ry2 * xt2));\n if (isNaN(constT)) {\n constT = 0;\n }\n var cxT = constT * (rx * yT) / ry;\n var cyT = -constT * (ry * xT) / rx;\n var cx = cosine * cxT - sine * cyT + (x1 + x2) / 2;\n var cy = sine * cxT + cosine * cyT + (y1 + y2) / 2;\n var uX = (xT - cxT) / rx;\n var uY = (yT - cyT) / ry;\n var vX = -(xT + cxT) / rx;\n var vY = -(yT + cyT) / ry;\n var startAngle = (uY >= 0 ? 1 : -1) * deg(Math.acos(uX / Math.sqrt(uX * uX + uY * uY)));\n var angleCosine = round((uX * vX + uY * vY) / (Math.sqrt(uX * uX + uY * uY) * Math.sqrt(vX * vX + vY * vY)), 10);\n var angle = (uX * vY - uY * vX >= 0 ? 1 : -1) * deg(Math.acos(angleCosine));\n if (!swipe && angle > 0) {\n angle -= 360;\n }\n if (swipe && angle < 0) {\n angle += 360;\n }\n var endAngle = startAngle + angle;\n var signEndAngle = endAngle >= 0 ? 1 : -1;\n endAngle = Math.abs(endAngle) % 360 * signEndAngle;\n return {\n center: new Point(cx, cy),\n startAngle: startAngle,\n endAngle: endAngle,\n radiusX: rx,\n radiusY: ry,\n xRotation: rotation\n };\n }\n function bboxStartAngle(angle, start) {\n var startAngle = angle;\n while (startAngle < start) {\n startAngle += 90;\n }\n return startAngle;\n }\n var push = [].push;\n var pop = [].pop;\n var splice = [].splice;\n var shift = [].shift;\n var slice = [].slice;\n var unshift = [].unshift;\n var ElementsArray = Class.extend({\n init: function (array) {\n if (array === void 0) {\n array = [];\n }\n this.length = 0;\n this._splice(0, array.length, array);\n },\n elements: function (value) {\n if (value) {\n this._splice(0, this.length, value);\n this._change();\n return this;\n }\n return this.slice(0);\n },\n push: function () {\n var elements = arguments;\n var result = push.apply(this, elements);\n this._add(elements);\n return result;\n },\n slice: function () {\n return slice.call(this);\n },\n pop: function () {\n var length = this.length;\n var result = pop.apply(this);\n if (length) {\n this._remove([result]);\n }\n return result;\n },\n splice: function (index, howMany) {\n var elements = slice.call(arguments, 2);\n var result = this._splice(index, howMany, elements);\n this._change();\n return result;\n },\n shift: function () {\n var length = this.length;\n var result = shift.apply(this);\n if (length) {\n this._remove([result]);\n }\n return result;\n },\n unshift: function () {\n var elements = arguments;\n var result = unshift.apply(this, elements);\n this._add(elements);\n return result;\n },\n indexOf: function (element) {\n var this$1 = this;\n var length = this.length;\n for (var idx = 0; idx < length; idx++) {\n if (this$1[idx] === element) {\n return idx;\n }\n }\n return -1;\n },\n _splice: function (index, howMany, elements) {\n var result = splice.apply(this, [\n index,\n howMany\n ].concat(elements));\n this._clearObserver(result);\n this._setObserver(elements);\n return result;\n },\n _add: function (elements) {\n this._setObserver(elements);\n this._change();\n },\n _remove: function (elements) {\n this._clearObserver(elements);\n this._change();\n },\n _setObserver: function (elements) {\n var this$1 = this;\n for (var idx = 0; idx < elements.length; idx++) {\n elements[idx].addObserver(this$1);\n }\n },\n _clearObserver: function (elements) {\n var this$1 = this;\n for (var idx = 0; idx < elements.length; idx++) {\n elements[idx].removeObserver(this$1);\n }\n },\n _change: function () {\n }\n });\n ObserversMixin.extend(ElementsArray.prototype);\n var GeometryElementsArray = ElementsArray.extend({\n _change: function () {\n this.geometryChange();\n }\n });\n function pointAccessor(name) {\n var fieldName = '_' + name;\n return function (value) {\n if (defined(value)) {\n this._observerField(fieldName, Point.create(value));\n this.geometryChange();\n return this;\n }\n return this[fieldName];\n };\n }\n function definePointAccessors(fn, names) {\n for (var i = 0; i < names.length; i++) {\n fn[names[i]] = pointAccessor(names[i]);\n }\n }\n function isOutOfEndPoint(endPoint, controlPoint, point) {\n var angle = deg(Math.atan2(controlPoint.y - endPoint.y, controlPoint.x - endPoint.x));\n var rotatedPoint = point.transformCopy(transform().rotate(-angle, endPoint));\n return rotatedPoint.x < endPoint.x;\n }\n function calculateCurveAt(t, field, points) {\n var t1 = 1 - t;\n return Math.pow(t1, 3) * points[0][field] + 3 * Math.pow(t1, 2) * t * points[1][field] + 3 * Math.pow(t, 2) * t1 * points[2][field] + Math.pow(t, 3) * points[3][field];\n }\n function toCubicPolynomial(points, field) {\n return [\n -points[0][field] + 3 * points[1][field] - 3 * points[2][field] + points[3][field],\n 3 * (points[0][field] - 2 * points[1][field] + points[2][field]),\n 3 * (-points[0][field] + points[1][field]),\n points[0][field]\n ];\n }\n var ComplexNumber = Class.extend({\n init: function (real, img) {\n if (real === void 0) {\n real = 0;\n }\n if (img === void 0) {\n img = 0;\n }\n this.real = real;\n this.img = img;\n },\n add: function (cNumber) {\n return new ComplexNumber(round(this.real + cNumber.real, PRECISION), round(this.img + cNumber.img, PRECISION));\n },\n addConstant: function (value) {\n return new ComplexNumber(this.real + value, this.img);\n },\n negate: function () {\n return new ComplexNumber(-this.real, -this.img);\n },\n multiply: function (cNumber) {\n return new ComplexNumber(this.real * cNumber.real - this.img * cNumber.img, this.real * cNumber.img + this.img * cNumber.real);\n },\n multiplyConstant: function (value) {\n return new ComplexNumber(this.real * value, this.img * value);\n },\n nthRoot: function (n) {\n var rad$$1 = Math.atan2(this.img, this.real);\n var r = Math.sqrt(Math.pow(this.img, 2) + Math.pow(this.real, 2));\n var nthR = Math.pow(r, 1 / n);\n return new ComplexNumber(nthR * Math.cos(rad$$1 / n), nthR * Math.sin(rad$$1 / n));\n },\n equals: function (cNumber) {\n return this.real === cNumber.real && this.img === cNumber.img;\n },\n isReal: function () {\n return this.img === 0;\n }\n });\n function numberSign(x) {\n return x < 0 ? -1 : 1;\n }\n function solveQuadraticEquation(a, b, c) {\n var squareRoot = Math.sqrt(Math.pow(b, 2) - 4 * a * c);\n return [\n (-b + squareRoot) / (2 * a),\n (-b - squareRoot) / (2 * a)\n ];\n }\n function solveCubicEquation(a, b, c, d) {\n if (a === 0) {\n return solveQuadraticEquation(b, c, d);\n }\n var p = (3 * a * c - Math.pow(b, 2)) / (3 * Math.pow(a, 2));\n var q = (2 * Math.pow(b, 3) - 9 * a * b * c + 27 * Math.pow(a, 2) * d) / (27 * Math.pow(a, 3));\n var Q = Math.pow(p / 3, 3) + Math.pow(q / 2, 2);\n var i = new ComplexNumber(0, 1);\n var b3a = -b / (3 * a);\n var x1, x2, y1, y2, y3, z1, z2;\n if (Q < 0) {\n x1 = new ComplexNumber(-q / 2, Math.sqrt(-Q)).nthRoot(3);\n x2 = new ComplexNumber(-q / 2, -Math.sqrt(-Q)).nthRoot(3);\n } else {\n x1 = -q / 2 + Math.sqrt(Q);\n x1 = new ComplexNumber(numberSign(x1) * Math.pow(Math.abs(x1), 1 / 3));\n x2 = -q / 2 - Math.sqrt(Q);\n x2 = new ComplexNumber(numberSign(x2) * Math.pow(Math.abs(x2), 1 / 3));\n }\n y1 = x1.add(x2);\n z1 = x1.add(x2).multiplyConstant(-1 / 2);\n z2 = x1.add(x2.negate()).multiplyConstant(Math.sqrt(3) / 2);\n y2 = z1.add(i.multiply(z2));\n y3 = z1.add(i.negate().multiply(z2));\n var result = [];\n if (y1.isReal()) {\n result.push(round(y1.real + b3a, PRECISION));\n }\n if (y2.isReal()) {\n result.push(round(y2.real + b3a, PRECISION));\n }\n if (y3.isReal()) {\n result.push(round(y3.real + b3a, PRECISION));\n }\n return result;\n }\n function hasRootsInRange(points, point, field, rootField, range) {\n var polynomial = toCubicPolynomial(points, rootField);\n var roots = solveCubicEquation(polynomial[0], polynomial[1], polynomial[2], polynomial[3] - point[rootField]);\n var intersection;\n for (var idx = 0; idx < roots.length; idx++) {\n if (0 <= roots[idx] && roots[idx] <= 1) {\n intersection = calculateCurveAt(roots[idx], field, points);\n if (Math.abs(intersection - point[field]) <= range) {\n return true;\n }\n }\n }\n }\n function curveIntersectionsCount(points, point, bbox) {\n var polynomial = toCubicPolynomial(points, 'x');\n var roots = solveCubicEquation(polynomial[0], polynomial[1], polynomial[2], polynomial[3] - point.x);\n var rayIntersection, intersectsRay;\n var count = 0;\n for (var i = 0; i < roots.length; i++) {\n rayIntersection = calculateCurveAt(roots[i], 'y', points);\n intersectsRay = close(rayIntersection, point.y) || rayIntersection > point.y;\n if (intersectsRay && ((roots[i] === 0 || roots[i] === 1) && bbox.bottomRight().x > point.x || 0 < roots[i] && roots[i] < 1)) {\n count++;\n }\n }\n return count;\n }\n function lineIntersectionsCount(a, b, point) {\n var intersects;\n if (a.x !== b.x) {\n var minX = Math.min(a.x, b.x);\n var maxX = Math.max(a.x, b.x);\n var minY = Math.min(a.y, b.y);\n var maxY = Math.max(a.y, b.y);\n var inRange = minX <= point.x && point.x < maxX;\n if (minY === maxY) {\n intersects = point.y <= minY && inRange;\n } else {\n intersects = inRange && (maxY - minY) * ((a.x - b.x) * (a.y - b.y) > 0 ? point.x - minX : maxX - point.x) / (maxX - minX) + minY - point.y >= 0;\n }\n }\n return intersects ? 1 : 0;\n }\n var Segment = Class.extend({\n init: function (anchor, controlIn, controlOut) {\n this.anchor(anchor || new Point());\n this.controlIn(controlIn);\n this.controlOut(controlOut);\n },\n bboxTo: function (toSegment, matrix) {\n var segmentAnchor = this.anchor().transformCopy(matrix);\n var toSegmentAnchor = toSegment.anchor().transformCopy(matrix);\n var rect;\n if (this.controlOut() && toSegment.controlIn()) {\n rect = this._curveBoundingBox(segmentAnchor, this.controlOut().transformCopy(matrix), toSegment.controlIn().transformCopy(matrix), toSegmentAnchor);\n } else {\n rect = this._lineBoundingBox(segmentAnchor, toSegmentAnchor);\n }\n return rect;\n },\n _lineBoundingBox: function (p1, p2) {\n return Rect.fromPoints(p1, p2);\n },\n _curveBoundingBox: function (p1, cp1, cp2, p2) {\n var points = [\n p1,\n cp1,\n cp2,\n p2\n ];\n var extremesX = this._curveExtremesFor(points, 'x');\n var extremesY = this._curveExtremesFor(points, 'y');\n var xLimits = arrayLimits([\n extremesX.min,\n extremesX.max,\n p1.x,\n p2.x\n ]);\n var yLimits = arrayLimits([\n extremesY.min,\n extremesY.max,\n p1.y,\n p2.y\n ]);\n return Rect.fromPoints(new Point(xLimits.min, yLimits.min), new Point(xLimits.max, yLimits.max));\n },\n _curveExtremesFor: function (points, field) {\n var extremes = this._curveExtremes(points[0][field], points[1][field], points[2][field], points[3][field]);\n return {\n min: calculateCurveAt(extremes.min, field, points),\n max: calculateCurveAt(extremes.max, field, points)\n };\n },\n _curveExtremes: function (x1, x2, x3, x4) {\n var a = x1 - 3 * x2 + 3 * x3 - x4;\n var b = -2 * (x1 - 2 * x2 + x3);\n var c = x1 - x2;\n var sqrt = Math.sqrt(b * b - 4 * a * c);\n var t1 = 0;\n var t2 = 1;\n if (a === 0) {\n if (b !== 0) {\n t1 = t2 = -c / b;\n }\n } else if (!isNaN(sqrt)) {\n t1 = (-b + sqrt) / (2 * a);\n t2 = (-b - sqrt) / (2 * a);\n }\n var min = Math.max(Math.min(t1, t2), 0);\n if (min < 0 || min > 1) {\n min = 0;\n }\n var max = Math.min(Math.max(t1, t2), 1);\n if (max > 1 || max < 0) {\n max = 1;\n }\n return {\n min: min,\n max: max\n };\n },\n _intersectionsTo: function (segment, point) {\n var intersectionsCount;\n if (this.controlOut() && segment.controlIn()) {\n intersectionsCount = curveIntersectionsCount([\n this.anchor(),\n this.controlOut(),\n segment.controlIn(),\n segment.anchor()\n ], point, this.bboxTo(segment));\n } else {\n intersectionsCount = lineIntersectionsCount(this.anchor(), segment.anchor(), point);\n }\n return intersectionsCount;\n },\n _isOnCurveTo: function (segment, point, width, endSegment) {\n var bbox = this.bboxTo(segment).expand(width, width);\n if (bbox.containsPoint(point)) {\n var p1 = this.anchor();\n var p2 = this.controlOut();\n var p3 = segment.controlIn();\n var p4 = segment.anchor();\n if (endSegment === 'start' && p1.distanceTo(point) <= width) {\n return !isOutOfEndPoint(p1, p2, point);\n } else if (endSegment === 'end' && p4.distanceTo(point) <= width) {\n return !isOutOfEndPoint(p4, p3, point);\n }\n var points = [\n p1,\n p2,\n p3,\n p4\n ];\n if (hasRootsInRange(points, point, 'x', 'y', width) || hasRootsInRange(points, point, 'y', 'x', width)) {\n return true;\n }\n var rotation = transform().rotate(45, point);\n var rotatedPoints = [\n p1.transformCopy(rotation),\n p2.transformCopy(rotation),\n p3.transformCopy(rotation),\n p4.transformCopy(rotation)\n ];\n return hasRootsInRange(rotatedPoints, point, 'x', 'y', width) || hasRootsInRange(rotatedPoints, point, 'y', 'x', width);\n }\n },\n _isOnLineTo: function (segment, point, width) {\n var p1 = this.anchor();\n var p2 = segment.anchor();\n var angle = deg(Math.atan2(p2.y - p1.y, p2.x - p1.x));\n var rect = new Rect([\n p1.x,\n p1.y - width / 2\n ], [\n p1.distanceTo(p2),\n width\n ]);\n return rect.containsPoint(point.transformCopy(transform().rotate(-angle, p1)));\n },\n _isOnPathTo: function (segment, point, width, endSegment) {\n var isOnPath;\n if (this.controlOut() && segment.controlIn()) {\n isOnPath = this._isOnCurveTo(segment, point, width / 2, endSegment);\n } else {\n isOnPath = this._isOnLineTo(segment, point, width);\n }\n return isOnPath;\n }\n });\n definePointAccessors(Segment.prototype, [\n 'anchor',\n 'controlIn',\n 'controlOut'\n ]);\n ObserversMixin.extend(Segment.prototype);\n function arrayLimits(arr) {\n var length = arr.length;\n var min = MAX_NUM;\n var max = MIN_NUM;\n for (var i = 0; i < length; i++) {\n max = Math.max(max, arr[i]);\n min = Math.min(min, arr[i]);\n }\n return {\n min: min,\n max: max\n };\n }\n var Path = Element$1.extend({\n init: function (options) {\n Element$1.fn.init.call(this, options);\n this.segments = new GeometryElementsArray();\n this.segments.addObserver(this);\n if (!defined(this.options.stroke)) {\n this.stroke('#000');\n if (!defined(this.options.stroke.lineJoin)) {\n this.options.set('stroke.lineJoin', 'miter');\n }\n }\n },\n moveTo: function (x, y) {\n this.suspend();\n this.segments.elements([]);\n this.resume();\n this.lineTo(x, y);\n return this;\n },\n lineTo: function (x, y) {\n var point = defined(y) ? new Point(x, y) : x;\n var segment = new Segment(point);\n this.segments.push(segment);\n return this;\n },\n curveTo: function (controlOut, controlIn, point) {\n if (this.segments.length > 0) {\n var lastSegment = last(this.segments);\n var segment = new Segment(point, controlIn);\n this.suspend();\n lastSegment.controlOut(controlOut);\n this.resume();\n this.segments.push(segment);\n }\n return this;\n },\n arc: function (startAngle, endAngle, radiusX, radiusY, anticlockwise) {\n if (this.segments.length > 0) {\n var lastSegment = last(this.segments);\n var anchor = lastSegment.anchor();\n var start = rad(startAngle);\n var center = new Point(anchor.x - radiusX * Math.cos(start), anchor.y - radiusY * Math.sin(start));\n var arc = new Arc$2(center, {\n startAngle: startAngle,\n endAngle: endAngle,\n radiusX: radiusX,\n radiusY: radiusY,\n anticlockwise: anticlockwise\n });\n this._addArcSegments(arc);\n }\n return this;\n },\n arcTo: function (end, rx, ry, largeArc, swipe, rotation) {\n if (this.segments.length > 0) {\n var lastSegment = last(this.segments);\n var anchor = lastSegment.anchor();\n var arc = Arc$2.fromPoints(anchor, end, rx, ry, largeArc, swipe, rotation);\n this._addArcSegments(arc);\n }\n return this;\n },\n _addArcSegments: function (arc) {\n var this$1 = this;\n this.suspend();\n var curvePoints = arc.curvePoints();\n for (var i = 1; i < curvePoints.length; i += 3) {\n this$1.curveTo(curvePoints[i], curvePoints[i + 1], curvePoints[i + 2]);\n }\n this.resume();\n this.geometryChange();\n },\n close: function () {\n this.options.closed = true;\n this.geometryChange();\n return this;\n },\n rawBBox: function () {\n return this._bbox();\n },\n _containsPoint: function (point) {\n var segments = this.segments;\n var length = segments.length;\n var intersectionsCount = 0;\n var previous, current;\n for (var idx = 1; idx < length; idx++) {\n previous = segments[idx - 1];\n current = segments[idx];\n intersectionsCount += previous._intersectionsTo(current, point);\n }\n if (this.options.closed || !segments[0].anchor().equals(segments[length - 1].anchor())) {\n intersectionsCount += lineIntersectionsCount(segments[0].anchor(), segments[length - 1].anchor(), point);\n }\n return intersectionsCount % 2 !== 0;\n },\n _isOnPath: function (point, width) {\n var segments = this.segments;\n var length = segments.length;\n var pathWidth = width || this.options.stroke.width;\n if (length > 1) {\n if (segments[0]._isOnPathTo(segments[1], point, pathWidth, 'start')) {\n return true;\n }\n for (var idx = 2; idx <= length - 2; idx++) {\n if (segments[idx - 1]._isOnPathTo(segments[idx], point, pathWidth)) {\n return true;\n }\n }\n if (segments[length - 2]._isOnPathTo(segments[length - 1], point, pathWidth, 'end')) {\n return true;\n }\n }\n return false;\n },\n _bbox: function (matrix) {\n var segments = this.segments;\n var length = segments.length;\n var boundingBox;\n if (length === 1) {\n var anchor = segments[0].anchor().transformCopy(matrix);\n boundingBox = new Rect(anchor, Size.ZERO);\n } else if (length > 0) {\n for (var i = 1; i < length; i++) {\n var segmentBox = segments[i - 1].bboxTo(segments[i], matrix);\n if (boundingBox) {\n boundingBox = Rect.union(boundingBox, segmentBox);\n } else {\n boundingBox = segmentBox;\n }\n }\n }\n return boundingBox;\n }\n });\n Path.fromRect = function (rect, options) {\n return new Path(options).moveTo(rect.topLeft()).lineTo(rect.topRight()).lineTo(rect.bottomRight()).lineTo(rect.bottomLeft()).close();\n };\n Path.fromPoints = function (points, options) {\n if (points) {\n var path = new Path(options);\n for (var i = 0; i < points.length; i++) {\n var point = Point.create(points[i]);\n if (point) {\n if (i === 0) {\n path.moveTo(point);\n } else {\n path.lineTo(point);\n }\n }\n }\n return path;\n }\n };\n Path.fromArc = function (arc, options) {\n var path = new Path(options);\n var startAngle = arc.startAngle;\n var start = arc.pointAt(startAngle);\n path.moveTo(start.x, start.y);\n path.arc(startAngle, arc.endAngle, arc.radiusX, arc.radiusY, arc.anticlockwise);\n return path;\n };\n Path.prototype.nodeType = 'Path';\n Paintable.extend(Path.prototype);\n Measurable.extend(Path.prototype);\n var DEFAULT_STROKE$1 = '#000';\n var Arc = Element$1.extend({\n init: function (geometry, options) {\n if (geometry === void 0) {\n geometry = new Arc$2();\n }\n if (options === void 0) {\n options = {};\n }\n Element$1.fn.init.call(this, options);\n this.geometry(geometry);\n if (!defined(this.options.stroke)) {\n this.stroke(DEFAULT_STROKE$1);\n }\n },\n _bbox: function (matrix) {\n return this._geometry.bbox(matrix);\n },\n rawBBox: function () {\n return this.geometry().bbox();\n },\n toPath: function () {\n var path = new Path();\n var curvePoints = this.geometry().curvePoints();\n if (curvePoints.length > 0) {\n path.moveTo(curvePoints[0].x, curvePoints[0].y);\n for (var i = 1; i < curvePoints.length; i += 3) {\n path.curveTo(curvePoints[i], curvePoints[i + 1], curvePoints[i + 2]);\n }\n }\n return path;\n },\n _containsPoint: function (point) {\n return this.geometry().containsPoint(point);\n },\n _isOnPath: function (point) {\n return this.geometry()._isOnPath(point, this.options.stroke.width / 2);\n }\n });\n Arc.prototype.nodeType = 'Arc';\n Paintable.extend(Arc.prototype);\n Measurable.extend(Arc.prototype);\n defineGeometryAccessors(Arc.prototype, ['geometry']);\n function elementsBoundingBox(elements, applyTransform, transformation) {\n var boundingBox;\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element.visible()) {\n var elementBoundingBox = applyTransform ? element.bbox(transformation) : element.rawBBox();\n if (elementBoundingBox) {\n if (boundingBox) {\n boundingBox = Rect.union(boundingBox, elementBoundingBox);\n } else {\n boundingBox = elementBoundingBox;\n }\n }\n }\n }\n return boundingBox;\n }\n function elementsClippedBoundingBox(elements, transformation) {\n var boundingBox;\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element.visible()) {\n var elementBoundingBox = element.clippedBBox(transformation);\n if (elementBoundingBox) {\n if (boundingBox) {\n boundingBox = Rect.union(boundingBox, elementBoundingBox);\n } else {\n boundingBox = elementBoundingBox;\n }\n }\n }\n }\n return boundingBox;\n }\n var MultiPath = Element$1.extend({\n init: function (options) {\n Element$1.fn.init.call(this, options);\n this.paths = new GeometryElementsArray();\n this.paths.addObserver(this);\n if (!defined(this.options.stroke)) {\n this.stroke('#000');\n }\n },\n moveTo: function (x, y) {\n var path = new Path();\n path.moveTo(x, y);\n this.paths.push(path);\n return this;\n },\n lineTo: function (x, y) {\n if (this.paths.length > 0) {\n last(this.paths).lineTo(x, y);\n }\n return this;\n },\n curveTo: function (controlOut, controlIn, point) {\n if (this.paths.length > 0) {\n last(this.paths).curveTo(controlOut, controlIn, point);\n }\n return this;\n },\n arc: function (startAngle, endAngle, radiusX, radiusY, anticlockwise) {\n if (this.paths.length > 0) {\n last(this.paths).arc(startAngle, endAngle, radiusX, radiusY, anticlockwise);\n }\n return this;\n },\n arcTo: function (end, rx, ry, largeArc, swipe, rotation) {\n if (this.paths.length > 0) {\n last(this.paths).arcTo(end, rx, ry, largeArc, swipe, rotation);\n }\n return this;\n },\n close: function () {\n if (this.paths.length > 0) {\n last(this.paths).close();\n }\n return this;\n },\n _bbox: function (matrix) {\n return elementsBoundingBox(this.paths, true, matrix);\n },\n rawBBox: function () {\n return elementsBoundingBox(this.paths, false);\n },\n _containsPoint: function (point) {\n var paths = this.paths;\n for (var idx = 0; idx < paths.length; idx++) {\n if (paths[idx]._containsPoint(point)) {\n return true;\n }\n }\n return false;\n },\n _isOnPath: function (point) {\n var paths = this.paths;\n var width = this.options.stroke.width;\n for (var idx = 0; idx < paths.length; idx++) {\n if (paths[idx]._isOnPath(point, width)) {\n return true;\n }\n }\n return false;\n },\n _clippedBBox: function (transformation) {\n return elementsClippedBoundingBox(this.paths, this.currentTransform(transformation));\n }\n });\n MultiPath.prototype.nodeType = 'MultiPath';\n Paintable.extend(MultiPath.prototype);\n Measurable.extend(MultiPath.prototype);\n var DEFAULT_FONT = '12px sans-serif';\n var DEFAULT_FILL = '#000';\n var Text = Element$1.extend({\n init: function (content, position, options) {\n if (position === void 0) {\n position = new Point();\n }\n if (options === void 0) {\n options = {};\n }\n Element$1.fn.init.call(this, options);\n this.content(content);\n this.position(position);\n if (!this.options.font) {\n this.options.font = DEFAULT_FONT;\n }\n if (!defined(this.options.fill)) {\n this.fill(DEFAULT_FILL);\n }\n },\n content: function (value) {\n if (defined(value)) {\n this.options.set('content', value);\n return this;\n }\n return this.options.get('content');\n },\n measure: function () {\n var metrics = kendoUtil.measureText(this.content(), { font: this.options.get('font') });\n return metrics;\n },\n rect: function () {\n var size = this.measure();\n var pos = this.position().clone();\n return new Rect(pos, [\n size.width,\n size.height\n ]);\n },\n bbox: function (transformation) {\n var combinedMatrix = toMatrix(this.currentTransform(transformation));\n return this.rect().bbox(combinedMatrix);\n },\n rawBBox: function () {\n return this.rect().bbox();\n },\n _containsPoint: function (point) {\n return this.rect().containsPoint(point);\n }\n });\n Text.prototype.nodeType = 'Text';\n Paintable.extend(Text.prototype);\n definePointAccessors(Text.prototype, ['position']);\n var Image$1 = Element$1.extend({\n init: function (src, rect, options) {\n if (rect === void 0) {\n rect = new Rect();\n }\n if (options === void 0) {\n options = {};\n }\n Element$1.fn.init.call(this, options);\n this.src(src);\n this.rect(rect);\n },\n src: function (value) {\n if (defined(value)) {\n this.options.set('src', value);\n return this;\n }\n return this.options.get('src');\n },\n bbox: function (transformation) {\n var combinedMatrix = toMatrix(this.currentTransform(transformation));\n return this._rect.bbox(combinedMatrix);\n },\n rawBBox: function () {\n return this._rect.bbox();\n },\n _containsPoint: function (point) {\n return this._rect.containsPoint(point);\n },\n _hasFill: function () {\n return this.src();\n }\n });\n Image$1.prototype.nodeType = 'Image';\n defineGeometryAccessors(Image$1.prototype, ['rect']);\n var Traversable = {\n extend: function (proto, childrenField) {\n proto.traverse = function (callback) {\n var children = this[childrenField];\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.traverse) {\n child.traverse(callback);\n } else {\n callback(child);\n }\n }\n return this;\n };\n }\n };\n var Group = Element$1.extend({\n init: function (options) {\n Element$1.fn.init.call(this, options);\n this.children = [];\n },\n childrenChange: function (action, items, index) {\n this.trigger('childrenChange', {\n action: action,\n items: items,\n index: index\n });\n },\n append: function () {\n append(this.children, arguments);\n this._reparent(arguments, this);\n this.childrenChange('add', arguments);\n return this;\n },\n insert: function (index, element) {\n this.children.splice(index, 0, element);\n element.parent = this;\n this.childrenChange('add', [element], index);\n return this;\n },\n insertAt: function (element, index) {\n return this.insert(index, element);\n },\n remove: function (element) {\n var index = this.children.indexOf(element);\n if (index >= 0) {\n this.children.splice(index, 1);\n element.parent = null;\n this.childrenChange('remove', [element], index);\n }\n return this;\n },\n removeAt: function (index) {\n if (0 <= index && index < this.children.length) {\n var element = this.children[index];\n this.children.splice(index, 1);\n element.parent = null;\n this.childrenChange('remove', [element], index);\n }\n return this;\n },\n clear: function () {\n var items = this.children;\n this.children = [];\n this._reparent(items, null);\n this.childrenChange('remove', items, 0);\n return this;\n },\n bbox: function (transformation) {\n return elementsBoundingBox(this.children, true, this.currentTransform(transformation));\n },\n rawBBox: function () {\n return elementsBoundingBox(this.children, false);\n },\n _clippedBBox: function (transformation) {\n return elementsClippedBoundingBox(this.children, this.currentTransform(transformation));\n },\n currentTransform: function (transformation) {\n return Element$1.prototype.currentTransform.call(this, transformation) || null;\n },\n containsPoint: function (point, parentTransform) {\n if (this.visible()) {\n var children = this.children;\n var transform = this.currentTransform(parentTransform);\n for (var idx = 0; idx < children.length; idx++) {\n if (children[idx].containsPoint(point, transform)) {\n return true;\n }\n }\n }\n return false;\n },\n _reparent: function (elements, newParent) {\n var this$1 = this;\n for (var i = 0; i < elements.length; i++) {\n var child = elements[i];\n var parent = child.parent;\n if (parent && parent !== this$1 && parent.remove) {\n parent.remove(child);\n }\n child.parent = newParent;\n }\n }\n });\n Group.prototype.nodeType = 'Group';\n Traversable.extend(Group.prototype, 'children');\n function translateToPoint(point, bbox, element) {\n var transofrm = element.transform() || transform();\n var matrix = transofrm.matrix();\n matrix.e += point.x - bbox.origin.x;\n matrix.f += point.y - bbox.origin.y;\n transofrm.matrix(matrix);\n element.transform(transofrm);\n }\n function alignStart(size, rect, align, axis, sizeField) {\n var start;\n if (align === 'start') {\n start = rect.origin[axis];\n } else if (align === 'end') {\n start = rect.origin[axis] + rect.size[sizeField] - size;\n } else {\n start = rect.origin[axis] + (rect.size[sizeField] - size) / 2;\n }\n return start;\n }\n var DEFAULT_OPTIONS = {\n alignContent: 'start',\n justifyContent: 'start',\n alignItems: 'start',\n spacing: 0,\n orientation: 'horizontal',\n lineSpacing: 0,\n wrap: true\n };\n var Layout = Group.extend({\n init: function (rect, options) {\n Group.fn.init.call(this, $.extend({}, DEFAULT_OPTIONS, options));\n this._rect = rect;\n this._fieldMap = {};\n },\n rect: function (value) {\n if (value) {\n this._rect = value;\n return this;\n }\n return this._rect;\n },\n _initMap: function () {\n var options = this.options;\n var fieldMap = this._fieldMap;\n if (options.orientation === 'horizontal') {\n fieldMap.sizeField = 'width';\n fieldMap.groupsSizeField = 'height';\n fieldMap.groupAxis = 'x';\n fieldMap.groupsAxis = 'y';\n } else {\n fieldMap.sizeField = 'height';\n fieldMap.groupsSizeField = 'width';\n fieldMap.groupAxis = 'y';\n fieldMap.groupsAxis = 'x';\n }\n },\n reflow: function () {\n if (!this._rect || this.children.length === 0) {\n return;\n }\n this._initMap();\n if (this.options.transform) {\n this.transform(null);\n }\n var options = this.options;\n var rect = this._rect;\n var ref = this._initGroups();\n var groups = ref.groups;\n var groupsSize = ref.groupsSize;\n var ref$1 = this._fieldMap;\n var sizeField = ref$1.sizeField;\n var groupsSizeField = ref$1.groupsSizeField;\n var groupAxis = ref$1.groupAxis;\n var groupsAxis = ref$1.groupsAxis;\n var groupOrigin = new Point();\n var elementOrigin = new Point();\n var size = new Size();\n var groupStart = alignStart(groupsSize, rect, options.alignContent, groupsAxis, groupsSizeField);\n var elementStart, bbox, element, group, groupBox;\n for (var groupIdx = 0; groupIdx < groups.length; groupIdx++) {\n group = groups[groupIdx];\n groupOrigin[groupAxis] = elementStart = alignStart(group.size, rect, options.justifyContent, groupAxis, sizeField);\n groupOrigin[groupsAxis] = groupStart;\n size[sizeField] = group.size;\n size[groupsSizeField] = group.lineSize;\n groupBox = new Rect(groupOrigin, size);\n for (var idx = 0; idx < group.bboxes.length; idx++) {\n element = group.elements[idx];\n bbox = group.bboxes[idx];\n elementOrigin[groupAxis] = elementStart;\n elementOrigin[groupsAxis] = alignStart(bbox.size[groupsSizeField], groupBox, options.alignItems, groupsAxis, groupsSizeField);\n translateToPoint(elementOrigin, bbox, element);\n elementStart += bbox.size[sizeField] + options.spacing;\n }\n groupStart += group.lineSize + options.lineSpacing;\n }\n if (!options.wrap && group.size > rect.size[sizeField]) {\n var scale = rect.size[sizeField] / groupBox.size[sizeField];\n var scaledStart = groupBox.topLeft().scale(scale, scale);\n var scaledSize = groupBox.size[groupsSizeField] * scale;\n var newStart = alignStart(scaledSize, rect, options.alignContent, groupsAxis, groupsSizeField);\n var transform$$1 = transform();\n if (groupAxis === 'x') {\n transform$$1.translate(rect.origin.x - scaledStart.x, newStart - scaledStart.y);\n } else {\n transform$$1.translate(newStart - scaledStart.x, rect.origin.y - scaledStart.y);\n }\n transform$$1.scale(scale, scale);\n this.transform(transform$$1);\n }\n },\n _initGroups: function () {\n var this$1 = this;\n var ref = this;\n var options = ref.options;\n var children = ref.children;\n var lineSpacing = options.lineSpacing;\n var wrap = options.wrap;\n var spacing = options.spacing;\n var sizeField = this._fieldMap.sizeField;\n var group = this._newGroup();\n var groups = [];\n var addGroup = function () {\n groups.push(group);\n groupsSize += group.lineSize + lineSpacing;\n };\n var groupsSize = -lineSpacing;\n for (var idx = 0; idx < children.length; idx++) {\n var element = children[idx];\n var bbox = children[idx].clippedBBox();\n if (element.visible() && bbox) {\n if (wrap && group.size + bbox.size[sizeField] + spacing > this$1._rect.size[sizeField]) {\n if (group.bboxes.length === 0) {\n this$1._addToGroup(group, bbox, element);\n addGroup();\n group = this$1._newGroup();\n } else {\n addGroup();\n group = this$1._newGroup();\n this$1._addToGroup(group, bbox, element);\n }\n } else {\n this$1._addToGroup(group, bbox, element);\n }\n }\n }\n if (group.bboxes.length) {\n addGroup();\n }\n return {\n groups: groups,\n groupsSize: groupsSize\n };\n },\n _addToGroup: function (group, bbox, element) {\n group.size += bbox.size[this._fieldMap.sizeField] + this.options.spacing;\n group.lineSize = Math.max(bbox.size[this._fieldMap.groupsSizeField], group.lineSize);\n group.bboxes.push(bbox);\n group.elements.push(element);\n },\n _newGroup: function () {\n return {\n lineSize: 0,\n size: -this.options.spacing,\n bboxes: [],\n elements: []\n };\n }\n });\n var Rect$2 = Element$1.extend({\n init: function (geometry, options) {\n if (geometry === void 0) {\n geometry = new Rect();\n }\n if (options === void 0) {\n options = {};\n }\n Element$1.fn.init.call(this, options);\n this.geometry(geometry);\n if (!defined(this.options.stroke)) {\n this.stroke('#000');\n }\n },\n _bbox: function (matrix) {\n return this._geometry.bbox(matrix);\n },\n rawBBox: function () {\n return this._geometry.bbox();\n },\n _containsPoint: function (point) {\n return this._geometry.containsPoint(point);\n },\n _isOnPath: function (point) {\n return this.geometry()._isOnPath(point, this.options.stroke.width / 2);\n }\n });\n Rect$2.prototype.nodeType = 'Rect';\n Paintable.extend(Rect$2.prototype);\n Measurable.extend(Rect$2.prototype);\n defineGeometryAccessors(Rect$2.prototype, ['geometry']);\n function alignElements(elements, rect, alignment, axis, sizeField) {\n for (var idx = 0; idx < elements.length; idx++) {\n var bbox = elements[idx].clippedBBox();\n if (bbox) {\n var point = bbox.origin.clone();\n point[axis] = alignStart(bbox.size[sizeField], rect, alignment || 'start', axis, sizeField);\n translateToPoint(point, bbox, elements[idx]);\n }\n }\n }\n function align(elements, rect, alignment) {\n alignElements(elements, rect, alignment, 'x', 'width');\n }\n function vAlign(elements, rect, alignment) {\n alignElements(elements, rect, alignment, 'y', 'height');\n }\n function stackElements(elements, stackAxis, otherAxis, sizeField) {\n if (elements.length > 1) {\n var origin = new Point();\n var previousBBox = elements[0].bbox;\n for (var idx = 1; idx < elements.length; idx++) {\n var element = elements[idx].element;\n var bbox = elements[idx].bbox;\n origin[stackAxis] = previousBBox.origin[stackAxis] + previousBBox.size[sizeField];\n origin[otherAxis] = bbox.origin[otherAxis];\n translateToPoint(origin, bbox, element);\n bbox.origin[stackAxis] = origin[stackAxis];\n previousBBox = bbox;\n }\n }\n }\n function createStackElements(elements) {\n var stackElements = [];\n for (var idx = 0; idx < elements.length; idx++) {\n var element = elements[idx];\n var bbox = element.clippedBBox();\n if (bbox) {\n stackElements.push({\n element: element,\n bbox: bbox\n });\n }\n }\n return stackElements;\n }\n function stack(elements) {\n stackElements(createStackElements(elements), 'x', 'y', 'width');\n }\n function vStack(elements) {\n stackElements(createStackElements(elements), 'y', 'x', 'height');\n }\n function getStacks(elements, rect, sizeField) {\n var maxSize = rect.size[sizeField];\n var stacks = [];\n var stack = [];\n var stackSize = 0;\n var element, bbox;\n var addElementToStack = function () {\n stack.push({\n element: element,\n bbox: bbox\n });\n };\n for (var idx = 0; idx < elements.length; idx++) {\n element = elements[idx];\n bbox = element.clippedBBox();\n if (bbox) {\n var size = bbox.size[sizeField];\n if (stackSize + size > maxSize) {\n if (stack.length) {\n stacks.push(stack);\n stack = [];\n addElementToStack();\n stackSize = size;\n } else {\n addElementToStack();\n stacks.push(stack);\n stack = [];\n stackSize = 0;\n }\n } else {\n addElementToStack();\n stackSize += size;\n }\n }\n }\n if (stack.length) {\n stacks.push(stack);\n }\n return stacks;\n }\n function wrapElements(elements, rect, axis, otherAxis, sizeField) {\n var stacks = getStacks(elements, rect, sizeField);\n var origin = rect.origin.clone();\n var result = [];\n for (var idx = 0; idx < stacks.length; idx++) {\n var stack = stacks[idx];\n var startElement = stack[0];\n origin[otherAxis] = startElement.bbox.origin[otherAxis];\n translateToPoint(origin, startElement.bbox, startElement.element);\n startElement.bbox.origin[axis] = origin[axis];\n stackElements(stack, axis, otherAxis, sizeField);\n result.push([]);\n for (var elementIdx = 0; elementIdx < stack.length; elementIdx++) {\n result[idx].push(stack[elementIdx].element);\n }\n }\n return result;\n }\n function wrap(elements, rect) {\n return wrapElements(elements, rect, 'x', 'y', 'width');\n }\n function vWrap(elements, rect) {\n return wrapElements(elements, rect, 'y', 'x', 'height');\n }\n function fit(element, rect) {\n var bbox = element.clippedBBox();\n if (bbox) {\n var elementSize = bbox.size;\n var rectSize = rect.size;\n if (rectSize.width < elementSize.width || rectSize.height < elementSize.height) {\n var scale = Math.min(rectSize.width / elementSize.width, rectSize.height / elementSize.height);\n var transform$$1 = element.transform() || transform();\n transform$$1.scale(scale, scale);\n element.transform(transform$$1);\n }\n }\n }\n var StopsArray = ElementsArray.extend({\n _change: function () {\n this.optionsChange({ field: 'stops' });\n }\n });\n function optionsAccessor(name) {\n return function (value) {\n if (defined(value)) {\n this.options.set(name, value);\n return this;\n }\n return this.options.get(name);\n };\n }\n function defineOptionsAccessors(fn, names) {\n for (var i = 0; i < names.length; i++) {\n fn[names[i]] = optionsAccessor(names[i]);\n }\n }\n var GradientStop = Class.extend({\n init: function (offset, color, opacity) {\n this.options = new OptionsStore({\n offset: offset,\n color: color,\n opacity: defined(opacity) ? opacity : 1\n });\n this.options.addObserver(this);\n }\n });\n GradientStop.create = function (arg) {\n if (defined(arg)) {\n var stop;\n if (arg instanceof GradientStop) {\n stop = arg;\n } else if (arg.length > 1) {\n stop = new GradientStop(arg[0], arg[1], arg[2]);\n } else {\n stop = new GradientStop(arg.offset, arg.color, arg.opacity);\n }\n return stop;\n }\n };\n defineOptionsAccessors(GradientStop.prototype, [\n 'offset',\n 'color',\n 'opacity'\n ]);\n ObserversMixin.extend(GradientStop.prototype);\n var Gradient = Class.extend({\n init: function (options) {\n if (options === void 0) {\n options = {};\n }\n this.stops = new StopsArray(this._createStops(options.stops));\n this.stops.addObserver(this);\n this._userSpace = options.userSpace;\n this.id = definitionId();\n },\n userSpace: function (value) {\n if (defined(value)) {\n this._userSpace = value;\n this.optionsChange();\n return this;\n }\n return this._userSpace;\n },\n _createStops: function (stops) {\n if (stops === void 0) {\n stops = [];\n }\n var result = [];\n for (var idx = 0; idx < stops.length; idx++) {\n result.push(GradientStop.create(stops[idx]));\n }\n return result;\n },\n addStop: function (offset, color, opacity) {\n this.stops.push(new GradientStop(offset, color, opacity));\n },\n removeStop: function (stop) {\n var index = this.stops.indexOf(stop);\n if (index >= 0) {\n this.stops.splice(index, 1);\n }\n }\n });\n Gradient.prototype.nodeType = 'Gradient';\n ObserversMixin.extend(Gradient.prototype);\n $.extend(Gradient.prototype, {\n optionsChange: function (e) {\n this.trigger('optionsChange', {\n field: 'gradient' + (e ? '.' + e.field : ''),\n value: this\n });\n },\n geometryChange: function () {\n this.optionsChange();\n }\n });\n var LinearGradient = Gradient.extend({\n init: function (options) {\n if (options === void 0) {\n options = {};\n }\n Gradient.fn.init.call(this, options);\n this.start(options.start || new Point());\n this.end(options.end || new Point(1, 0));\n }\n });\n definePointAccessors(LinearGradient.prototype, [\n 'start',\n 'end'\n ]);\n var RadialGradient = Gradient.extend({\n init: function (options) {\n if (options === void 0) {\n options = {};\n }\n Gradient.fn.init.call(this, options);\n this.center(options.center || new Point());\n this._radius = defined(options.radius) ? options.radius : 1;\n this._fallbackFill = options.fallbackFill;\n },\n radius: function (value) {\n if (defined(value)) {\n this._radius = value;\n this.geometryChange();\n return this;\n }\n return this._radius;\n },\n fallbackFill: function (value) {\n if (defined(value)) {\n this._fallbackFill = value;\n this.optionsChange();\n return this;\n }\n return this._fallbackFill;\n }\n });\n definePointAccessors(RadialGradient.prototype, ['center']);\n function swing(position) {\n return 0.5 - Math.cos(position * Math.PI) / 2;\n }\n function linear(position) {\n return position;\n }\n function easeOutElastic(position, time, start, diff) {\n var s = 1.70158, p = 0, a = diff;\n if (position === 0) {\n return start;\n }\n if (position === 1) {\n return start + diff;\n }\n if (!p) {\n p = 0.5;\n }\n if (a < Math.abs(diff)) {\n a = diff;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(diff / a);\n }\n return a * Math.pow(2, -10 * position) * Math.sin((Number(position) - s) * (1.1 * Math.PI) / p) + diff + start;\n }\n var easingFunctions = {\n swing: swing,\n linear: linear,\n easeOutElastic: easeOutElastic\n };\n var now = Date.now || function () {\n return new Date().getTime();\n };\n var Animation = Class.extend({\n init: function (element, options) {\n this.options = $.extend({}, this.options, options);\n this.element = element;\n },\n setup: function () {\n },\n step: function () {\n },\n play: function () {\n var this$1 = this;\n var options = this.options;\n var duration = options.duration;\n var delay = options.delay;\n if (delay === void 0) {\n delay = 0;\n }\n var easing = easingFunctions[options.easing];\n var start = now() + delay;\n var finish = start + duration;\n if (duration === 0) {\n this.step(1);\n this.abort();\n } else {\n setTimeout(function () {\n var loop = function () {\n if (this$1._stopped) {\n return;\n }\n var wallTime = now();\n var time = limitValue(wallTime - start, 0, duration);\n var position = time / duration;\n var easingPosition = easing(position, time, 0, 1, duration);\n this$1.step(easingPosition);\n if (wallTime < finish) {\n kendo.animationFrame(loop);\n } else {\n this$1.abort();\n }\n };\n loop();\n }, delay);\n }\n },\n abort: function () {\n this._stopped = true;\n },\n destroy: function () {\n this.abort();\n }\n });\n Animation.prototype.options = {\n duration: 500,\n easing: 'swing'\n };\n var AnimationFactory = Class.extend({\n init: function () {\n this._items = [];\n },\n register: function (name, type) {\n this._items.push({\n name: name,\n type: type\n });\n },\n create: function (element, options) {\n var items = this._items;\n var match;\n if (options && options.type) {\n var type = options.type.toLowerCase();\n for (var i = 0; i < items.length; i++) {\n if (items[i].name.toLowerCase() === type) {\n match = items[i];\n break;\n }\n }\n }\n if (match) {\n return new match.type(element, options);\n }\n }\n });\n AnimationFactory.current = new AnimationFactory();\n Animation.create = function (type, element, options) {\n return AnimationFactory.current.create(type, element, options);\n };\n var ShapeMap = {\n l: function (path, options) {\n var parameters = options.parameters;\n var position = options.position;\n for (var i = 0; i < parameters.length; i += 2) {\n var point = new Point(parameters[i], parameters[i + 1]);\n if (options.isRelative) {\n point.translateWith(position);\n }\n path.lineTo(point.x, point.y);\n position.x = point.x;\n position.y = point.y;\n }\n },\n c: function (path, options) {\n var parameters = options.parameters;\n var position = options.position;\n for (var i = 0; i < parameters.length; i += 6) {\n var controlOut = new Point(parameters[i], parameters[i + 1]);\n var controlIn = new Point(parameters[i + 2], parameters[i + 3]);\n var point = new Point(parameters[i + 4], parameters[i + 5]);\n if (options.isRelative) {\n controlIn.translateWith(position);\n controlOut.translateWith(position);\n point.translateWith(position);\n }\n path.curveTo(controlOut, controlIn, point);\n position.x = point.x;\n position.y = point.y;\n }\n },\n v: function (path, options) {\n var value = options.isRelative ? 0 : options.position.x;\n toLineParamaters(options.parameters, true, value);\n this.l(path, options);\n },\n h: function (path, options) {\n var value = options.isRelative ? 0 : options.position.y;\n toLineParamaters(options.parameters, false, value);\n this.l(path, options);\n },\n a: function (path, options) {\n var parameters = options.parameters;\n var position = options.position;\n for (var i = 0; i < parameters.length; i += 7) {\n var radiusX = parameters[i];\n var radiusY = parameters[i + 1];\n var rotation = parameters[i + 2];\n var largeArc = parameters[i + 3];\n var swipe = parameters[i + 4];\n var endPoint = new Point(parameters[i + 5], parameters[i + 6]);\n if (options.isRelative) {\n endPoint.translateWith(position);\n }\n if (position.x !== endPoint.x || position.y !== endPoint.y) {\n path.arcTo(endPoint, radiusX, radiusY, largeArc, swipe, rotation);\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n }\n },\n s: function (path, options) {\n var parameters = options.parameters;\n var position = options.position;\n var previousCommand = options.previousCommand;\n var lastControlIn;\n if (previousCommand === 's' || previousCommand === 'c') {\n lastControlIn = last(last(path.paths).segments).controlIn();\n }\n for (var i = 0; i < parameters.length; i += 4) {\n var controlIn = new Point(parameters[i], parameters[i + 1]);\n var endPoint = new Point(parameters[i + 2], parameters[i + 3]);\n var controlOut = void 0;\n if (options.isRelative) {\n controlIn.translateWith(position);\n endPoint.translateWith(position);\n }\n if (lastControlIn) {\n controlOut = reflectionPoint(lastControlIn, position);\n } else {\n controlOut = position.clone();\n }\n lastControlIn = controlIn;\n path.curveTo(controlOut, controlIn, endPoint);\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n },\n q: function (path, options) {\n var parameters = options.parameters;\n var position = options.position;\n for (var i = 0; i < parameters.length; i += 4) {\n var controlPoint = new Point(parameters[i], parameters[i + 1]);\n var endPoint = new Point(parameters[i + 2], parameters[i + 3]);\n if (options.isRelative) {\n controlPoint.translateWith(position);\n endPoint.translateWith(position);\n }\n var cubicControlPoints = quadraticToCubicControlPoints(position, controlPoint, endPoint);\n path.curveTo(cubicControlPoints.controlOut, cubicControlPoints.controlIn, endPoint);\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n },\n t: function (path, options) {\n var parameters = options.parameters;\n var position = options.position;\n var previousCommand = options.previousCommand;\n var controlPoint;\n if (previousCommand === 'q' || previousCommand === 't') {\n var lastSegment = last(last(path.paths).segments);\n controlPoint = lastSegment.controlIn().clone().translateWith(position.scaleCopy(-1 / 3)).scale(3 / 2);\n }\n for (var i = 0; i < parameters.length; i += 2) {\n var endPoint = new Point(parameters[i], parameters[i + 1]);\n if (options.isRelative) {\n endPoint.translateWith(position);\n }\n if (controlPoint) {\n controlPoint = reflectionPoint(controlPoint, position);\n } else {\n controlPoint = position.clone();\n }\n var cubicControlPoints = quadraticToCubicControlPoints(position, controlPoint, endPoint);\n path.curveTo(cubicControlPoints.controlOut, cubicControlPoints.controlIn, endPoint);\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n }\n };\n function toLineParamaters(parameters, isVertical, value) {\n var insertPosition = isVertical ? 0 : 1;\n for (var i = 0; i < parameters.length; i += 2) {\n parameters.splice(i + insertPosition, 0, value);\n }\n }\n function reflectionPoint(point, center) {\n if (point && center) {\n return center.scaleCopy(2).translate(-point.x, -point.y);\n }\n }\n var third = 1 / 3;\n function quadraticToCubicControlPoints(position, controlPoint, endPoint) {\n var scaledPoint = controlPoint.clone().scale(2 / 3);\n return {\n controlOut: scaledPoint.clone().translateWith(position.scaleCopy(third)),\n controlIn: scaledPoint.translateWith(endPoint.scaleCopy(third))\n };\n }\n var SEGMENT_REGEX = /([a-df-z]{1})([^a-df-z]*)(z)?/gi;\n var SPLIT_REGEX = /[,\\s]?([+\\-]?(?:\\d*\\.\\d+|\\d+)(?:[eE][+\\-]?\\d+)?)/g;\n var MOVE = 'm';\n var CLOSE = 'z';\n function parseParameters(str) {\n var parameters = [];\n str.replace(SPLIT_REGEX, function (match, number) {\n parameters.push(parseFloat(number));\n });\n return parameters;\n }\n var PathParser = Class.extend({\n parse: function (str, options) {\n var multiPath = new MultiPath(options);\n var position = new Point();\n var previousCommand;\n str.replace(SEGMENT_REGEX, function (match, element, params, closePath) {\n var command = element.toLowerCase();\n var isRelative = command === element;\n var parameters = parseParameters(params.trim());\n if (command === MOVE) {\n if (isRelative) {\n position.x += parameters[0];\n position.y += parameters[1];\n } else {\n position.x = parameters[0];\n position.y = parameters[1];\n }\n multiPath.moveTo(position.x, position.y);\n if (parameters.length > 2) {\n command = 'l';\n parameters.splice(0, 2);\n }\n }\n if (ShapeMap[command]) {\n ShapeMap[command](multiPath, {\n parameters: parameters,\n position: position,\n isRelative: isRelative,\n previousCommand: previousCommand\n });\n if (closePath && closePath.toLowerCase() === CLOSE) {\n multiPath.close();\n }\n } else if (command !== MOVE) {\n throw new Error('Error while parsing SVG path. Unsupported command: ' + command);\n }\n previousCommand = command;\n });\n return multiPath;\n }\n });\n PathParser.current = new PathParser();\n Path.parse = function (str, options) {\n return PathParser.current.parse(str, options);\n };\n var SurfaceFactory = Class.extend({\n init: function () {\n this._items = [];\n },\n register: function (name, type, order) {\n var items = this._items;\n var first = items[0];\n var entry = {\n name: name,\n type: type,\n order: order\n };\n if (!first || order < first.order) {\n items.unshift(entry);\n } else {\n items.push(entry);\n }\n },\n create: function (element, options) {\n var items = this._items;\n var match = items[0];\n if (options && options.type) {\n var preferred = options.type.toLowerCase();\n for (var i = 0; i < items.length; i++) {\n if (items[i].name === preferred) {\n match = items[i];\n break;\n }\n }\n }\n if (match) {\n return new match.type(element, options);\n }\n kendo.logToConsole('Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\\n' + '- The browser does not support SVG and Canvas. User agent: ' + navigator.userAgent);\n }\n });\n SurfaceFactory.current = new SurfaceFactory();\n var events = [\n 'click',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'resize',\n 'tooltipOpen',\n 'tooltipClose'\n ];\n var Surface = kendo.Observable.extend({\n init: function (element, options) {\n kendo.Observable.fn.init.call(this);\n this.options = $.extend({}, options);\n this.element = element;\n this._click = this._handler('click');\n this._mouseenter = this._handler('mouseenter');\n this._mouseleave = this._handler('mouseleave');\n this._mousemove = this._handler('mousemove');\n this._visual = new Group();\n elementSize(element, this.options);\n this.bind(events, this.options);\n this._enableTracking();\n },\n draw: function (element) {\n this._visual.children.push(element);\n },\n clear: function () {\n this._visual.children = [];\n },\n destroy: function () {\n this._visual = null;\n this.unbind();\n },\n eventTarget: function (e) {\n var this$1 = this;\n var domNode = eventElement(e);\n var node;\n while (!node && domNode) {\n node = domNode._kendoNode;\n if (domNode === this$1.element) {\n break;\n }\n domNode = domNode.parentElement;\n }\n if (node) {\n return node.srcElement;\n }\n },\n exportVisual: function () {\n return this._visual;\n },\n getSize: function () {\n return elementSize(this.element);\n },\n currentSize: function (size) {\n if (size) {\n this._size = size;\n } else {\n return this._size;\n }\n },\n setSize: function (size) {\n elementSize(this.element, size);\n this.currentSize(size);\n this._resize();\n },\n resize: function (force) {\n var size = this.getSize();\n var currentSize = this.currentSize();\n if (force || (size.width > 0 || size.height > 0) && (!currentSize || size.width !== currentSize.width || size.height !== currentSize.height)) {\n this.currentSize(size);\n this._resize(size, force);\n this.trigger('resize', size);\n }\n },\n size: function (value) {\n if (!value) {\n return this.getSize();\n }\n this.setSize(value);\n },\n suspendTracking: function () {\n this._suspendedTracking = true;\n },\n resumeTracking: function () {\n this._suspendedTracking = false;\n },\n _enableTracking: function () {\n },\n _resize: function () {\n },\n _handler: function (eventName) {\n var this$1 = this;\n return function (e) {\n var node = this$1.eventTarget(e);\n if (node && !this$1._suspendedTracking) {\n this$1.trigger(eventName, {\n element: node,\n originalEvent: e,\n type: eventName\n });\n }\n };\n },\n _elementOffset: function () {\n var element = this.element;\n var ref = elementStyles(element, [\n 'paddingLeft',\n 'paddingTop'\n ]);\n var paddingLeft = ref.paddingLeft;\n var paddingTop = ref.paddingTop;\n var ref$1 = elementOffset(element);\n var left = ref$1.left;\n var top = ref$1.top;\n return {\n left: left + parseInt(paddingLeft, 10),\n top: top + parseInt(paddingTop, 10)\n };\n },\n _surfacePoint: function (e) {\n var offset = this._elementOffset();\n var coord = eventCoordinates(e);\n var x = coord.x - offset.left;\n var y = coord.y - offset.top;\n return new Point(x, y);\n }\n });\n Surface.create = function (element, options) {\n return SurfaceFactory.current.create(element, options);\n };\n Surface.support = {};\n var BaseNode = Class.extend({\n init: function (srcElement) {\n this.childNodes = [];\n this.parent = null;\n if (srcElement) {\n this.srcElement = srcElement;\n this.observe();\n }\n },\n destroy: function () {\n var this$1 = this;\n if (this.srcElement) {\n this.srcElement.removeObserver(this);\n }\n var children = this.childNodes;\n for (var i = 0; i < children.length; i++) {\n this$1.childNodes[i].destroy();\n }\n this.parent = null;\n },\n load: function () {\n },\n observe: function () {\n if (this.srcElement) {\n this.srcElement.addObserver(this);\n }\n },\n append: function (node) {\n this.childNodes.push(node);\n node.parent = this;\n },\n insertAt: function (node, pos) {\n this.childNodes.splice(pos, 0, node);\n node.parent = this;\n },\n remove: function (index, count) {\n var this$1 = this;\n var end = index + count;\n for (var i = index; i < end; i++) {\n this$1.childNodes[i].removeSelf();\n }\n this.childNodes.splice(index, count);\n },\n removeSelf: function () {\n this.clear();\n this.destroy();\n },\n clear: function () {\n this.remove(0, this.childNodes.length);\n },\n invalidate: function () {\n if (this.parent) {\n this.parent.invalidate();\n }\n },\n geometryChange: function () {\n this.invalidate();\n },\n optionsChange: function () {\n this.invalidate();\n },\n childrenChange: function (e) {\n if (e.action === 'add') {\n this.load(e.items, e.index);\n } else if (e.action === 'remove') {\n this.remove(e.index, e.items.length);\n }\n this.invalidate();\n }\n });\n function renderAttr(name, value) {\n return defined(value) && value !== null ? ' ' + name + '=\\'' + value + '\\' ' : '';\n }\n function renderAllAttr(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n output += renderAttr(attrs[i][0], attrs[i][1]);\n }\n return output;\n }\n function renderStyle(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i][1];\n if (defined(value)) {\n output += attrs[i][0] + ':' + value + ';';\n }\n }\n if (output !== '') {\n return output;\n }\n }\n var NODE_MAP = {};\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var NONE = 'none';\n var renderSVG = function (container, svg) {\n container.innerHTML = svg;\n };\n if (typeof document !== 'undefined') {\n var testFragment = '';\n var testContainer = document.createElement('div');\n var hasParser = typeof DOMParser !== 'undefined';\n testContainer.innerHTML = testFragment;\n if (hasParser && testContainer.firstChild.namespaceURI !== SVG_NS) {\n renderSVG = function (container, svg) {\n var parser = new DOMParser();\n var chartDoc = parser.parseFromString(svg, 'text/xml');\n var importedDoc = document.adoptNode(chartDoc.documentElement);\n container.innerHTML = '';\n container.appendChild(importedDoc);\n };\n }\n }\n var renderSVG$1 = renderSVG;\n var TRANSFORM = 'transform';\n var DefinitionMap = {\n clip: 'clip-path',\n fill: 'fill'\n };\n function isDefinition(type, value) {\n return type === 'clip' || type === 'fill' && (!value || value.nodeType === 'Gradient');\n }\n function baseUrl() {\n var base = document.getElementsByTagName('base')[0];\n var href = document.location.href;\n var hashIndex = href.indexOf('#');\n var url = '';\n if (base && !support.browser.msie) {\n if (hashIndex !== -1) {\n href = href.substring(0, hashIndex);\n }\n url = href;\n }\n return url;\n }\n function refUrl(id, skipBaseHref) {\n var base = skipBaseHref ? '' : baseUrl();\n return 'url(' + base + '#' + id + ')';\n }\n var Node = BaseNode.extend({\n init: function (srcElement, options) {\n BaseNode.fn.init.call(this, srcElement);\n this.definitions = {};\n this.options = options;\n },\n destroy: function () {\n if (this.element) {\n this.element._kendoNode = null;\n this.element = null;\n }\n this.clearDefinitions();\n BaseNode.fn.destroy.call(this);\n },\n load: function (elements, pos) {\n var this$1 = this;\n for (var i = 0; i < elements.length; i++) {\n var srcElement = elements[i];\n var children = srcElement.children;\n var childNode = new NODE_MAP[srcElement.nodeType](srcElement, this$1.options);\n if (defined(pos)) {\n this$1.insertAt(childNode, pos);\n } else {\n this$1.append(childNode);\n }\n childNode.createDefinitions();\n if (children && children.length > 0) {\n childNode.load(children);\n }\n var element = this$1.element;\n if (element) {\n childNode.attachTo(element, pos);\n }\n }\n },\n root: function () {\n var root = this;\n while (root.parent) {\n root = root.parent;\n }\n return root;\n },\n attachTo: function (domElement, pos) {\n var container = document.createElement('div');\n renderSVG$1(container, '' + this.render() + '');\n var element = container.firstChild.firstChild;\n if (element) {\n if (defined(pos)) {\n domElement.insertBefore(element, domElement.childNodes[pos] || null);\n } else {\n domElement.appendChild(element);\n }\n this.setElement(element);\n }\n },\n setElement: function (element) {\n if (this.element) {\n this.element._kendoNode = null;\n }\n this.element = element;\n this.element._kendoNode = this;\n var nodes = this.childNodes;\n for (var i = 0; i < nodes.length; i++) {\n var childElement = element.childNodes[i];\n nodes[i].setElement(childElement);\n }\n },\n clear: function () {\n this.clearDefinitions();\n if (this.element) {\n this.element.innerHTML = '';\n }\n var children = this.childNodes;\n for (var i = 0; i < children.length; i++) {\n children[i].destroy();\n }\n this.childNodes = [];\n },\n removeSelf: function () {\n if (this.element) {\n var parentNode = this.element.parentNode;\n if (parentNode) {\n parentNode.removeChild(this.element);\n }\n this.element = null;\n }\n BaseNode.fn.removeSelf.call(this);\n },\n template: function () {\n return this.renderChildren();\n },\n render: function () {\n return this.template();\n },\n renderChildren: function () {\n var nodes = this.childNodes;\n var output = '';\n for (var i = 0; i < nodes.length; i++) {\n output += nodes[i].render();\n }\n return output;\n },\n optionsChange: function (e) {\n var field = e.field;\n var value = e.value;\n if (field === 'visible') {\n this.css('display', value ? '' : NONE);\n } else if (DefinitionMap[field] && isDefinition(field, value)) {\n this.updateDefinition(field, value);\n } else if (field === 'opacity') {\n this.attr('opacity', value);\n } else if (field === 'cursor') {\n this.css('cursor', value);\n }\n BaseNode.fn.optionsChange.call(this, e);\n },\n attr: function (name, value) {\n if (this.element) {\n this.element.setAttribute(name, value);\n }\n },\n allAttr: function (attrs) {\n var this$1 = this;\n for (var i = 0; i < attrs.length; i++) {\n this$1.attr(attrs[i][0], attrs[i][1]);\n }\n },\n css: function (name, value) {\n if (this.element) {\n this.element.style[name] = value;\n }\n },\n allCss: function (styles) {\n var this$1 = this;\n for (var i = 0; i < styles.length; i++) {\n this$1.css(styles[i][0], styles[i][1]);\n }\n },\n removeAttr: function (name) {\n if (this.element) {\n this.element.removeAttribute(name);\n }\n },\n mapTransform: function (transform) {\n var attrs = [];\n if (transform) {\n attrs.push([\n TRANSFORM,\n 'matrix(' + transform.matrix().toString(6) + ')'\n ]);\n }\n return attrs;\n },\n renderTransform: function () {\n return renderAllAttr(this.mapTransform(this.srcElement.transform()));\n },\n transformChange: function (value) {\n if (value) {\n this.allAttr(this.mapTransform(value));\n } else {\n this.removeAttr(TRANSFORM);\n }\n },\n mapStyle: function () {\n var options = this.srcElement.options;\n var style = [[\n 'cursor',\n options.cursor\n ]];\n if (options.visible === false) {\n style.push([\n 'display',\n NONE\n ]);\n }\n return style;\n },\n renderStyle: function () {\n return renderAttr('style', renderStyle(this.mapStyle(true)));\n },\n renderOpacity: function () {\n return renderAttr('opacity', this.srcElement.options.opacity);\n },\n createDefinitions: function () {\n var srcElement = this.srcElement;\n var definitions = this.definitions;\n if (srcElement) {\n var options = srcElement.options;\n var hasDefinitions;\n for (var field in DefinitionMap) {\n var definition = options.get(field);\n if (definition && isDefinition(field, definition)) {\n definitions[field] = definition;\n hasDefinitions = true;\n }\n }\n if (hasDefinitions) {\n this.definitionChange({\n action: 'add',\n definitions: definitions\n });\n }\n }\n },\n definitionChange: function (e) {\n if (this.parent) {\n this.parent.definitionChange(e);\n }\n },\n updateDefinition: function (type, value) {\n var definitions = this.definitions;\n var current = definitions[type];\n var attr = DefinitionMap[type];\n var definition = {};\n if (current) {\n definition[type] = current;\n this.definitionChange({\n action: 'remove',\n definitions: definition\n });\n delete definitions[type];\n }\n if (!value) {\n if (current) {\n this.removeAttr(attr);\n }\n } else {\n definition[type] = value;\n this.definitionChange({\n action: 'add',\n definitions: definition\n });\n definitions[type] = value;\n this.attr(attr, this.refUrl(value.id));\n }\n },\n clearDefinitions: function () {\n var definitions = this.definitions;\n this.definitionChange({\n action: 'remove',\n definitions: definitions\n });\n this.definitions = {};\n },\n renderDefinitions: function () {\n return renderAllAttr(this.mapDefinitions());\n },\n mapDefinitions: function () {\n var this$1 = this;\n var definitions = this.definitions;\n var attrs = [];\n for (var field in definitions) {\n attrs.push([\n DefinitionMap[field],\n this$1.refUrl(definitions[field].id)\n ]);\n }\n return attrs;\n },\n refUrl: function (id) {\n var skipBaseHref = (this.options || {}).skipBaseHref;\n return refUrl(id, skipBaseHref);\n }\n });\n var GradientStopNode = Node.extend({\n template: function () {\n return '';\n },\n renderOffset: function () {\n return renderAttr('offset', this.srcElement.offset());\n },\n mapStyle: function () {\n var srcElement = this.srcElement;\n return [\n [\n 'stop-color',\n srcElement.color()\n ],\n [\n 'stop-opacity',\n srcElement.opacity()\n ]\n ];\n },\n optionsChange: function (e) {\n if (e.field === 'offset') {\n this.attr(e.field, e.value);\n } else if (e.field === 'color' || e.field === 'opacity') {\n this.css('stop-' + e.field, e.value);\n }\n }\n });\n var GradientNode = Node.extend({\n init: function (srcElement) {\n Node.fn.init.call(this, srcElement);\n this.id = srcElement.id;\n this.loadStops();\n },\n loadStops: function () {\n var this$1 = this;\n var stops = this.srcElement.stops;\n var element = this.element;\n for (var idx = 0; idx < stops.length; idx++) {\n var stopNode = new GradientStopNode(stops[idx]);\n this$1.append(stopNode);\n if (element) {\n stopNode.attachTo(element);\n }\n }\n },\n optionsChange: function (e) {\n if (e.field === 'gradient.stops') {\n BaseNode.prototype.clear.call(this);\n this.loadStops();\n } else if (e.field === 'gradient') {\n this.allAttr(this.mapCoordinates());\n }\n },\n renderCoordinates: function () {\n return renderAllAttr(this.mapCoordinates());\n },\n mapSpace: function () {\n return [\n 'gradientUnits',\n this.srcElement.userSpace() ? 'userSpaceOnUse' : 'objectBoundingBox'\n ];\n }\n });\n var LinearGradientNode = GradientNode.extend({\n template: function () {\n return '' + this.renderChildren() + '';\n },\n mapCoordinates: function () {\n var srcElement = this.srcElement;\n var start = srcElement.start();\n var end = srcElement.end();\n var attrs = [\n [\n 'x1',\n start.x\n ],\n [\n 'y1',\n start.y\n ],\n [\n 'x2',\n end.x\n ],\n [\n 'y2',\n end.y\n ],\n this.mapSpace()\n ];\n return attrs;\n }\n });\n var RadialGradientNode = GradientNode.extend({\n template: function () {\n return '' + this.renderChildren() + '';\n },\n mapCoordinates: function () {\n var srcElement = this.srcElement;\n var center = srcElement.center();\n var radius = srcElement.radius();\n var attrs = [\n [\n 'cx',\n center.x\n ],\n [\n 'cy',\n center.y\n ],\n [\n 'r',\n radius\n ],\n this.mapSpace()\n ];\n return attrs;\n }\n });\n var ClipNode = Node.extend({\n init: function (srcElement) {\n Node.fn.init.call(this);\n this.srcElement = srcElement;\n this.id = srcElement.id;\n this.load([srcElement]);\n },\n template: function () {\n return '' + this.renderChildren() + '';\n }\n });\n var DefinitionNode = Node.extend({\n init: function () {\n Node.fn.init.call(this);\n this.definitionMap = {};\n },\n attachTo: function (domElement) {\n this.element = domElement;\n },\n template: function () {\n return '' + this.renderChildren() + '';\n },\n definitionChange: function (e) {\n var definitions = e.definitions;\n var action = e.action;\n if (action === 'add') {\n this.addDefinitions(definitions);\n } else if (action === 'remove') {\n this.removeDefinitions(definitions);\n }\n },\n createDefinition: function (type, item) {\n var nodeType;\n if (type === 'clip') {\n nodeType = ClipNode;\n } else if (type === 'fill') {\n if (item instanceof LinearGradient) {\n nodeType = LinearGradientNode;\n } else if (item instanceof RadialGradient) {\n nodeType = RadialGradientNode;\n }\n }\n return new nodeType(item);\n },\n addDefinitions: function (definitions) {\n var this$1 = this;\n for (var field in definitions) {\n this$1.addDefinition(field, definitions[field]);\n }\n },\n addDefinition: function (type, srcElement) {\n var ref = this;\n var element = ref.element;\n var definitionMap = ref.definitionMap;\n var id = srcElement.id;\n var mapItem = definitionMap[id];\n if (!mapItem) {\n var node = this.createDefinition(type, srcElement);\n definitionMap[id] = {\n element: node,\n count: 1\n };\n this.append(node);\n if (element) {\n node.attachTo(this.element);\n }\n } else {\n mapItem.count++;\n }\n },\n removeDefinitions: function (definitions) {\n var this$1 = this;\n for (var field in definitions) {\n this$1.removeDefinition(definitions[field]);\n }\n },\n removeDefinition: function (srcElement) {\n var definitionMap = this.definitionMap;\n var id = srcElement.id;\n var mapItem = definitionMap[id];\n if (mapItem) {\n mapItem.count--;\n if (mapItem.count === 0) {\n this.remove(this.childNodes.indexOf(mapItem.element), 1);\n delete definitionMap[id];\n }\n }\n }\n });\n var RootNode = Node.extend({\n init: function (options) {\n Node.fn.init.call(this);\n this.options = options;\n this.defs = new DefinitionNode();\n },\n attachTo: function (domElement) {\n this.element = domElement;\n this.defs.attachTo(domElement.firstElementChild);\n },\n clear: function () {\n BaseNode.prototype.clear.call(this);\n },\n template: function () {\n return this.defs.render() + this.renderChildren();\n },\n definitionChange: function (e) {\n this.defs.definitionChange(e);\n }\n });\n var RTL = 'rtl';\n function alignToScreen(element) {\n var ctm;\n try {\n ctm = element.getScreenCTM ? element.getScreenCTM() : null;\n } catch (e) {\n }\n if (ctm) {\n var left = -ctm.e % 1;\n var top = -ctm.f % 1;\n var style = element.style;\n if (left !== 0 || top !== 0) {\n style.left = left + 'px';\n style.top = top + 'px';\n }\n }\n }\n var Surface$1 = Surface.extend({\n init: function (element, options) {\n Surface.fn.init.call(this, element, options);\n this._root = new RootNode($.extend({ rtl: elementStyles(element, 'direction').direction === RTL }, this.options));\n renderSVG$1(this.element, this._template());\n this._rootElement = this.element.firstElementChild;\n alignToScreen(this._rootElement);\n this._root.attachTo(this._rootElement);\n bindEvents(this.element, {\n click: this._click,\n mouseover: this._mouseenter,\n mouseout: this._mouseleave,\n mousemove: this._mousemove\n });\n this.resize();\n },\n destroy: function () {\n if (this._root) {\n this._root.destroy();\n this._root = null;\n this._rootElement = null;\n unbindEvents(this.element, {\n click: this._click,\n mouseover: this._mouseenter,\n mouseout: this._mouseleave,\n mousemove: this._mousemove\n });\n }\n Surface.fn.destroy.call(this);\n },\n translate: function (offset) {\n var viewBox = Math.round(offset.x) + ' ' + Math.round(offset.y) + ' ' + this._size.width + ' ' + this._size.height;\n this._offset = offset;\n this._rootElement.setAttribute('viewBox', viewBox);\n },\n draw: function (element) {\n Surface.fn.draw.call(this, element);\n this._root.load([element]);\n },\n clear: function () {\n Surface.fn.clear.call(this);\n this._root.clear();\n },\n svg: function () {\n return '' + this._template();\n },\n exportVisual: function () {\n var ref = this;\n var visual = ref._visual;\n var offset = ref._offset;\n if (offset) {\n var wrap = new Group();\n wrap.children.push(visual);\n wrap.transform(transform().translate(-offset.x, -offset.y));\n visual = wrap;\n }\n return visual;\n },\n _resize: function () {\n if (this._offset) {\n this.translate(this._offset);\n }\n },\n _template: function () {\n return '' + this._root.render() + '';\n }\n });\n Surface$1.prototype.type = 'svg';\n if (typeof document !== 'undefined' && document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1')) {\n Surface.support.svg = true;\n SurfaceFactory.current.register('svg', Surface$1, 10);\n }\n var GroupNode = Node.extend({\n template: function () {\n return '' + this.renderChildren() + '';\n },\n optionsChange: function (e) {\n if (e.field === 'transform') {\n this.transformChange(e.value);\n }\n Node.fn.optionsChange.call(this, e);\n }\n });\n NODE_MAP.Group = GroupNode;\n var DASH_ARRAYS = {\n dot: [\n 1.5,\n 3.5\n ],\n dash: [\n 4,\n 3.5\n ],\n longdash: [\n 8,\n 3.5\n ],\n dashdot: [\n 3.5,\n 3.5,\n 1.5,\n 3.5\n ],\n longdashdot: [\n 8,\n 3.5,\n 1.5,\n 3.5\n ],\n longdashdotdot: [\n 8,\n 3.5,\n 1.5,\n 3.5,\n 1.5,\n 3.5\n ]\n };\n var SOLID = 'solid';\n var BUTT = 'butt';\n var ATTRIBUTE_MAP = {\n 'fill.opacity': 'fill-opacity',\n 'stroke.color': 'stroke',\n 'stroke.width': 'stroke-width',\n 'stroke.opacity': 'stroke-opacity'\n };\n var SPACE = ' ';\n var PathNode = Node.extend({\n geometryChange: function () {\n this.attr('d', this.renderData());\n this.invalidate();\n },\n optionsChange: function (e) {\n switch (e.field) {\n case 'fill':\n if (e.value) {\n this.allAttr(this.mapFill(e.value));\n } else {\n this.removeAttr('fill');\n }\n break;\n case 'fill.color':\n this.allAttr(this.mapFill({ color: e.value }));\n break;\n case 'stroke':\n if (e.value) {\n this.allAttr(this.mapStroke(e.value));\n } else {\n this.removeAttr('stroke');\n }\n break;\n case 'transform':\n this.transformChange(e.value);\n break;\n default:\n var name = ATTRIBUTE_MAP[e.field];\n if (name) {\n this.attr(name, e.value);\n }\n break;\n }\n Node.fn.optionsChange.call(this, e);\n },\n content: function () {\n if (this.element) {\n this.element.textContent = this.srcElement.content();\n }\n },\n renderData: function () {\n return this.printPath(this.srcElement);\n },\n printPath: function (path) {\n var this$1 = this;\n var segments = path.segments;\n var length = segments.length;\n if (length > 0) {\n var parts = [];\n var output, currentType;\n for (var i = 1; i < length; i++) {\n var segmentType = this$1.segmentType(segments[i - 1], segments[i]);\n if (segmentType !== currentType) {\n currentType = segmentType;\n parts.push(segmentType);\n }\n if (segmentType === 'L') {\n parts.push(this$1.printPoints(segments[i].anchor()));\n } else {\n parts.push(this$1.printPoints(segments[i - 1].controlOut(), segments[i].controlIn(), segments[i].anchor()));\n }\n }\n output = 'M' + this.printPoints(segments[0].anchor()) + SPACE + parts.join(SPACE);\n if (path.options.closed) {\n output += 'Z';\n }\n return output;\n }\n },\n printPoints: function () {\n var points = arguments;\n var length = points.length;\n var result = [];\n for (var i = 0; i < length; i++) {\n result.push(points[i].toString(3));\n }\n return result.join(' ');\n },\n segmentType: function (segmentStart, segmentEnd) {\n return segmentStart.controlOut() && segmentEnd.controlIn() ? 'C' : 'L';\n },\n mapStroke: function (stroke) {\n var attrs = [];\n if (stroke && !isTransparent(stroke.color)) {\n attrs.push([\n 'stroke',\n stroke.color\n ]);\n attrs.push([\n 'stroke-width',\n stroke.width\n ]);\n attrs.push([\n 'stroke-linecap',\n this.renderLinecap(stroke)\n ]);\n attrs.push([\n 'stroke-linejoin',\n stroke.lineJoin\n ]);\n if (defined(stroke.opacity)) {\n attrs.push([\n 'stroke-opacity',\n stroke.opacity\n ]);\n }\n if (defined(stroke.dashType)) {\n attrs.push([\n 'stroke-dasharray',\n this.renderDashType(stroke)\n ]);\n }\n } else {\n attrs.push([\n 'stroke',\n NONE\n ]);\n }\n return attrs;\n },\n renderStroke: function () {\n return renderAllAttr(this.mapStroke(this.srcElement.options.stroke));\n },\n renderDashType: function (stroke) {\n var dashType = stroke.dashType;\n var width = stroke.width;\n if (width === void 0) {\n width = 1;\n }\n if (dashType && dashType !== SOLID) {\n var dashArray = DASH_ARRAYS[dashType.toLowerCase()];\n var result = [];\n for (var i = 0; i < dashArray.length; i++) {\n result.push(dashArray[i] * width);\n }\n return result.join(' ');\n }\n },\n renderLinecap: function (stroke) {\n var dashType = stroke.dashType;\n var lineCap = stroke.lineCap;\n return dashType && dashType !== 'solid' ? BUTT : lineCap;\n },\n mapFill: function (fill) {\n var attrs = [];\n if (!(fill && fill.nodeType === 'Gradient')) {\n if (fill && !isTransparent(fill.color)) {\n attrs.push([\n 'fill',\n fill.color\n ]);\n if (defined(fill.opacity)) {\n attrs.push([\n 'fill-opacity',\n fill.opacity\n ]);\n }\n } else {\n attrs.push([\n 'fill',\n NONE\n ]);\n }\n }\n return attrs;\n },\n renderFill: function () {\n return renderAllAttr(this.mapFill(this.srcElement.options.fill));\n },\n template: function () {\n return '';\n }\n });\n NODE_MAP.Path = PathNode;\n var ArcNode = PathNode.extend({\n renderData: function () {\n return this.printPath(this.srcElement.toPath());\n }\n });\n NODE_MAP.Arc = ArcNode;\n var CircleNode = PathNode.extend({\n geometryChange: function () {\n var center = this.center();\n this.attr('cx', center.x);\n this.attr('cy', center.y);\n this.attr('r', this.radius());\n this.invalidate();\n },\n center: function () {\n return this.srcElement.geometry().center;\n },\n radius: function () {\n return this.srcElement.geometry().radius;\n },\n template: function () {\n return '';\n }\n });\n NODE_MAP.Circle = CircleNode;\n var RectNode = PathNode.extend({\n geometryChange: function () {\n var geometry = this.srcElement.geometry();\n this.attr('x', geometry.origin.x);\n this.attr('y', geometry.origin.y);\n this.attr('width', geometry.size.width);\n this.attr('height', geometry.size.height);\n this.invalidate();\n },\n size: function () {\n return this.srcElement.geometry().size;\n },\n origin: function () {\n return this.srcElement.geometry().origin;\n },\n template: function () {\n return '';\n }\n });\n NODE_MAP.Rect = RectNode;\n var ImageNode = PathNode.extend({\n geometryChange: function () {\n this.allAttr(this.mapPosition());\n this.invalidate();\n },\n optionsChange: function (e) {\n if (e.field === 'src') {\n this.allAttr(this.mapSource());\n }\n PathNode.fn.optionsChange.call(this, e);\n },\n mapPosition: function () {\n var rect = this.srcElement.rect();\n var tl = rect.topLeft();\n return [\n [\n 'x',\n tl.x\n ],\n [\n 'y',\n tl.y\n ],\n [\n 'width',\n rect.width() + 'px'\n ],\n [\n 'height',\n rect.height() + 'px'\n ]\n ];\n },\n renderPosition: function () {\n return renderAllAttr(this.mapPosition());\n },\n mapSource: function (encode) {\n var src = this.srcElement.src();\n if (encode) {\n src = kendo.htmlEncode(src);\n }\n return [[\n 'xlink:href',\n src\n ]];\n },\n renderSource: function () {\n return renderAllAttr(this.mapSource(true));\n },\n template: function () {\n return '' + '';\n }\n });\n NODE_MAP.Image = ImageNode;\n function decodeEntities(text) {\n if (!text || !text.indexOf || text.indexOf('&') < 0) {\n return text;\n }\n var element = decodeEntities._element;\n element.innerHTML = text;\n return element.textContent || element.innerText;\n }\n if (typeof document !== 'undefined') {\n decodeEntities._element = document.createElement('span');\n }\n var TextNode = PathNode.extend({\n geometryChange: function () {\n var pos = this.pos();\n this.attr('x', pos.x);\n this.attr('y', pos.y);\n this.invalidate();\n },\n optionsChange: function (e) {\n if (e.field === 'font') {\n this.attr('style', renderStyle(this.mapStyle()));\n this.geometryChange();\n } else if (e.field === 'content') {\n PathNode.fn.content.call(this, this.srcElement.content());\n }\n PathNode.fn.optionsChange.call(this, e);\n },\n mapStyle: function (encode) {\n var style = PathNode.fn.mapStyle.call(this, encode);\n var font = this.srcElement.options.font;\n if (encode) {\n font = kendo.htmlEncode(font);\n }\n style.push([\n 'font',\n font\n ]);\n return style;\n },\n pos: function () {\n var pos = this.srcElement.position();\n var size = this.srcElement.measure();\n return pos.clone().setY(pos.y + size.baseline);\n },\n renderContent: function () {\n var content = this.srcElement.content();\n content = decodeEntities(content);\n content = kendo.htmlEncode(content);\n return content;\n },\n renderTextAnchor: function () {\n var anchor;\n if ((this.options || {}).rtl) {\n anchor = 'end';\n }\n return renderAttr('text-anchor', anchor);\n },\n template: function () {\n return '' + this.renderContent() + '';\n }\n });\n NODE_MAP.Text = TextNode;\n var MultiPathNode = PathNode.extend({\n renderData: function () {\n var this$1 = this;\n var paths = this.srcElement.paths;\n if (paths.length > 0) {\n var result = [];\n for (var i = 0; i < paths.length; i++) {\n result.push(this$1.printPath(paths[i]));\n }\n return result.join(' ');\n }\n }\n });\n NODE_MAP.MultiPath = MultiPathNode;\n var geometry = {\n Circle: Circle$2,\n Arc: Arc$2,\n Rect: Rect,\n Point: Point,\n Segment: Segment,\n Matrix: Matrix,\n Size: Size,\n toMatrix: toMatrix,\n Transformation: Transformation,\n transform: transform\n };\n function exportGroup(group) {\n var root = new RootNode({ skipBaseHref: true });\n var bbox = group.clippedBBox();\n var rootGroup = group;\n if (bbox) {\n var origin = bbox.getOrigin();\n var exportRoot = new Group();\n exportRoot.transform(transform().translate(-origin.x, -origin.y));\n exportRoot.children.push(group);\n rootGroup = exportRoot;\n }\n root.load([rootGroup]);\n var svg = '' + root.render() + '';\n root.destroy();\n return svg;\n }\n var svg = {\n Surface: Surface$1,\n RootNode: RootNode,\n Node: Node,\n GroupNode: GroupNode,\n ArcNode: ArcNode,\n CircleNode: CircleNode,\n RectNode: RectNode,\n ImageNode: ImageNode,\n TextNode: TextNode,\n PathNode: PathNode,\n MultiPathNode: MultiPathNode,\n DefinitionNode: DefinitionNode,\n ClipNode: ClipNode,\n GradientStopNode: GradientStopNode,\n LinearGradientNode: LinearGradientNode,\n RadialGradientNode: RadialGradientNode,\n exportGroup: exportGroup\n };\n var NODE_MAP$2 = {};\n function renderPath(ctx, path) {\n var segments = path.segments;\n if (segments.length === 0) {\n return;\n }\n var segment = segments[0];\n var anchor = segment.anchor();\n ctx.moveTo(anchor.x, anchor.y);\n for (var i = 1; i < segments.length; i++) {\n segment = segments[i];\n anchor = segment.anchor();\n var prevSeg = segments[i - 1];\n var prevOut = prevSeg.controlOut();\n var controlIn = segment.controlIn();\n if (prevOut && controlIn) {\n ctx.bezierCurveTo(prevOut.x, prevOut.y, controlIn.x, controlIn.y, anchor.x, anchor.y);\n } else {\n ctx.lineTo(anchor.x, anchor.y);\n }\n }\n if (path.options.closed) {\n ctx.closePath();\n }\n }\n var Node$2 = BaseNode.extend({\n init: function (srcElement) {\n BaseNode.fn.init.call(this, srcElement);\n if (srcElement) {\n this.initClip();\n }\n },\n initClip: function () {\n var clip = this.srcElement.clip();\n if (clip) {\n this.clip = clip;\n clip.addObserver(this);\n }\n },\n clear: function () {\n if (this.srcElement) {\n this.srcElement.removeObserver(this);\n }\n this.clearClip();\n BaseNode.fn.clear.call(this);\n },\n clearClip: function () {\n if (this.clip) {\n this.clip.removeObserver(this);\n delete this.clip;\n }\n },\n setClip: function (ctx) {\n if (this.clip) {\n ctx.beginPath();\n renderPath(ctx, this.clip);\n ctx.clip();\n }\n },\n optionsChange: function (e) {\n if (e.field === 'clip') {\n this.clearClip();\n this.initClip();\n }\n BaseNode.fn.optionsChange.call(this, e);\n },\n setTransform: function (ctx) {\n if (this.srcElement) {\n var transform = this.srcElement.transform();\n if (transform) {\n ctx.transform.apply(ctx, transform.matrix().toArray(6));\n }\n }\n },\n loadElements: function (elements, pos, cors) {\n var this$1 = this;\n for (var i = 0; i < elements.length; i++) {\n var srcElement = elements[i];\n var children = srcElement.children;\n var childNode = new NODE_MAP$2[srcElement.nodeType](srcElement, cors);\n if (children && children.length > 0) {\n childNode.load(children, pos, cors);\n }\n if (defined(pos)) {\n this$1.insertAt(childNode, pos);\n } else {\n this$1.append(childNode);\n }\n }\n },\n load: function (elements, pos, cors) {\n this.loadElements(elements, pos, cors);\n this.invalidate();\n },\n setOpacity: function (ctx) {\n if (this.srcElement) {\n var opacity = this.srcElement.opacity();\n if (defined(opacity)) {\n this.globalAlpha(ctx, opacity);\n }\n }\n },\n globalAlpha: function (ctx, value) {\n var opactity = value;\n if (opactity && ctx.globalAlpha) {\n opactity *= ctx.globalAlpha;\n }\n ctx.globalAlpha = opactity;\n },\n visible: function () {\n var src = this.srcElement;\n return !src || src && src.options.visible !== false;\n }\n });\n var GroupNode$2 = Node$2.extend({\n renderTo: function (ctx) {\n if (!this.visible()) {\n return;\n }\n ctx.save();\n this.setTransform(ctx);\n this.setClip(ctx);\n this.setOpacity(ctx);\n var childNodes = this.childNodes;\n for (var i = 0; i < childNodes.length; i++) {\n var child = childNodes[i];\n if (child.visible()) {\n child.renderTo(ctx);\n }\n }\n ctx.restore();\n }\n });\n Traversable.extend(GroupNode$2.prototype, 'childNodes');\n NODE_MAP$2.Group = GroupNode$2;\n var FRAME_DELAY = 1000 / 60;\n var RootNode$2 = GroupNode$2.extend({\n init: function (canvas) {\n GroupNode$2.fn.init.call(this);\n this.canvas = canvas;\n this.ctx = canvas.getContext('2d');\n var invalidateHandler = this._invalidate.bind(this);\n this.invalidate = kendo.throttle(function () {\n kendo.animationFrame(invalidateHandler);\n }, FRAME_DELAY);\n },\n destroy: function () {\n GroupNode$2.fn.destroy.call(this);\n this.canvas = null;\n this.ctx = null;\n },\n load: function (elements, pos, cors) {\n this.loadElements(elements, pos, cors);\n this._invalidate();\n },\n _invalidate: function () {\n if (!this.ctx) {\n return;\n }\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.renderTo(this.ctx);\n }\n });\n Traversable.extend(RootNode$2.prototype, 'childNodes');\n var QuadRoot = Class.extend({\n init: function () {\n this.shapes = [];\n },\n _add: function (shape, bbox) {\n this.shapes.push({\n bbox: bbox,\n shape: shape\n });\n shape._quadNode = this;\n },\n pointShapes: function (point) {\n var shapes = this.shapes;\n var length = shapes.length;\n var result = [];\n for (var idx = 0; idx < length; idx++) {\n if (shapes[idx].bbox.containsPoint(point)) {\n result.push(shapes[idx].shape);\n }\n }\n return result;\n },\n insert: function (shape, bbox) {\n this._add(shape, bbox);\n },\n remove: function (shape) {\n var shapes = this.shapes;\n var length = shapes.length;\n for (var idx = 0; idx < length; idx++) {\n if (shapes[idx].shape === shape) {\n shapes.splice(idx, 1);\n break;\n }\n }\n }\n });\n var QuadNode = QuadRoot.extend({\n init: function (rect) {\n QuadRoot.fn.init.call(this);\n this.children = [];\n this.rect = rect;\n },\n inBounds: function (rect) {\n var nodeRect = this.rect;\n var nodeBottomRight = nodeRect.bottomRight();\n var bottomRight = rect.bottomRight();\n var inBounds = nodeRect.origin.x <= rect.origin.x && nodeRect.origin.y <= rect.origin.y && bottomRight.x <= nodeBottomRight.x && bottomRight.y <= nodeBottomRight.y;\n return inBounds;\n },\n pointShapes: function (point) {\n var children = this.children;\n var length = children.length;\n var result = QuadRoot.fn.pointShapes.call(this, point);\n for (var idx = 0; idx < length; idx++) {\n append(result, children[idx].pointShapes(point));\n }\n return result;\n },\n insert: function (shape, bbox) {\n var children = this.children;\n var inserted = false;\n if (this.inBounds(bbox)) {\n if (this.shapes.length < 4) {\n this._add(shape, bbox);\n } else {\n if (!children.length) {\n this._initChildren();\n }\n for (var idx = 0; idx < children.length; idx++) {\n if (children[idx].insert(shape, bbox)) {\n inserted = true;\n break;\n }\n }\n if (!inserted) {\n this._add(shape, bbox);\n }\n }\n inserted = true;\n }\n return inserted;\n },\n _initChildren: function () {\n var ref = this;\n var rect = ref.rect;\n var children = ref.children;\n var center = rect.center();\n var halfWidth = rect.width() / 2;\n var halfHeight = rect.height() / 2;\n children.push(new QuadNode(new Rect([\n rect.origin.x,\n rect.origin.y\n ], [\n halfWidth,\n halfHeight\n ])), new QuadNode(new Rect([\n center.x,\n rect.origin.y\n ], [\n halfWidth,\n halfHeight\n ])), new QuadNode(new Rect([\n rect.origin.x,\n center.y\n ], [\n halfWidth,\n halfHeight\n ])), new QuadNode(new Rect([\n center.x,\n center.y\n ], [\n halfWidth,\n halfHeight\n ])));\n }\n });\n var ROOT_SIZE = 3000;\n var LEVEL_STEP = 10000;\n var MAX_LEVEL = 75;\n var ShapesQuadTree = Class.extend({\n init: function () {\n this.initRoots();\n },\n initRoots: function () {\n this.rootMap = {};\n this.root = new QuadRoot();\n this.rootElements = [];\n },\n clear: function () {\n var this$1 = this;\n var rootElements = this.rootElements;\n for (var idx = 0; idx < rootElements.length; idx++) {\n this$1.remove(rootElements[idx]);\n }\n this.initRoots();\n },\n pointShape: function (point) {\n var sectorRoot = (this.rootMap[Math.floor(point.x / ROOT_SIZE)] || {})[Math.floor(point.y / ROOT_SIZE)];\n var result = this.root.pointShapes(point);\n if (sectorRoot) {\n result = result.concat(sectorRoot.pointShapes(point));\n }\n this.assignZindex(result);\n result.sort(zIndexComparer);\n for (var idx = 0; idx < result.length; idx++) {\n if (result[idx].containsPoint(point)) {\n return result[idx];\n }\n }\n },\n assignZindex: function (elements) {\n var this$1 = this;\n for (var idx = 0; idx < elements.length; idx++) {\n var element = elements[idx];\n var zIndex = 0;\n var levelWeight = Math.pow(LEVEL_STEP, MAX_LEVEL);\n var parents = [];\n while (element) {\n parents.push(element);\n element = element.parent;\n }\n while (parents.length) {\n element = parents.pop();\n zIndex += ((element.parent ? element.parent.children : this$1.rootElements).indexOf(element) + 1) * levelWeight;\n levelWeight /= LEVEL_STEP;\n }\n elements[idx]._zIndex = zIndex;\n }\n },\n optionsChange: function (e) {\n if (e.field === 'transform' || e.field === 'stroke.width') {\n this.bboxChange(e.element);\n }\n },\n geometryChange: function (e) {\n this.bboxChange(e.element);\n },\n bboxChange: function (element) {\n var this$1 = this;\n if (element.nodeType === 'Group') {\n for (var idx = 0; idx < element.children.length; idx++) {\n this$1.bboxChange(element.children[idx]);\n }\n } else {\n if (element._quadNode) {\n element._quadNode.remove(element);\n }\n this._insertShape(element);\n }\n },\n add: function (elements) {\n var elementsArray = Array.isArray(elements) ? elements.slice(0) : [elements];\n append(this.rootElements, elementsArray);\n this._insert(elementsArray);\n },\n childrenChange: function (e) {\n var this$1 = this;\n if (e.action === 'remove') {\n for (var idx = 0; idx < e.items.length; idx++) {\n this$1.remove(e.items[idx]);\n }\n } else {\n this._insert(Array.prototype.slice.call(e.items, 0));\n }\n },\n _insert: function (elements) {\n var this$1 = this;\n var element;\n while (elements.length > 0) {\n element = elements.pop();\n element.addObserver(this$1);\n if (element.nodeType === 'Group') {\n append(elements, element.children);\n } else {\n this$1._insertShape(element);\n }\n }\n },\n _insertShape: function (shape) {\n var bbox = shape.bbox();\n if (bbox) {\n var sectors = this.getSectors(bbox);\n var x = sectors[0][0];\n var y = sectors[1][0];\n if (this.inRoot(sectors)) {\n this.root.insert(shape, bbox);\n } else {\n var rootMap = this.rootMap;\n if (!rootMap[x]) {\n rootMap[x] = {};\n }\n if (!rootMap[x][y]) {\n rootMap[x][y] = new QuadNode(new Rect([\n x * ROOT_SIZE,\n y * ROOT_SIZE\n ], [\n ROOT_SIZE,\n ROOT_SIZE\n ]));\n }\n rootMap[x][y].insert(shape, bbox);\n }\n }\n },\n remove: function (element) {\n var this$1 = this;\n element.removeObserver(this);\n if (element.nodeType === 'Group') {\n var children = element.children;\n for (var idx = 0; idx < children.length; idx++) {\n this$1.remove(children[idx]);\n }\n } else if (element._quadNode) {\n element._quadNode.remove(element);\n delete element._quadNode;\n }\n },\n inRoot: function (sectors) {\n return sectors[0].length > 1 || sectors[1].length > 1;\n },\n getSectors: function (rect) {\n var bottomRight = rect.bottomRight();\n var bottomX = Math.floor(bottomRight.x / ROOT_SIZE);\n var bottomY = Math.floor(bottomRight.y / ROOT_SIZE);\n var sectors = [\n [],\n []\n ];\n for (var x = Math.floor(rect.origin.x / ROOT_SIZE); x <= bottomX; x++) {\n sectors[0].push(x);\n }\n for (var y = Math.floor(rect.origin.y / ROOT_SIZE); y <= bottomY; y++) {\n sectors[1].push(y);\n }\n return sectors;\n }\n });\n function zIndexComparer(x1, x2) {\n if (x1._zIndex < x2._zIndex) {\n return 1;\n }\n if (x1._zIndex > x2._zIndex) {\n return -1;\n }\n return 0;\n }\n var SurfaceCursor = Class.extend({\n init: function (surface) {\n surface.bind('mouseenter', this._mouseenter.bind(this));\n surface.bind('mouseleave', this._mouseleave.bind(this));\n this.element = surface.element;\n },\n clear: function () {\n this._resetCursor();\n },\n destroy: function () {\n this._resetCursor();\n delete this.element;\n },\n _mouseenter: function (e) {\n var cursor = this._shapeCursor(e);\n if (!cursor) {\n this._resetCursor();\n } else {\n if (!this._current) {\n this._defaultCursor = this._getCursor();\n }\n this._setCursor(cursor);\n }\n },\n _mouseleave: function () {\n this._resetCursor();\n },\n _shapeCursor: function (e) {\n var shape = e.element;\n while (shape && !defined(shape.options.cursor)) {\n shape = shape.parent;\n }\n if (shape) {\n return shape.options.cursor;\n }\n },\n _getCursor: function () {\n if (this.element) {\n return this.element.style.cursor;\n }\n },\n _setCursor: function (cursor) {\n if (this.element) {\n this.element.style.cursor = cursor;\n this._current = cursor;\n }\n },\n _resetCursor: function () {\n if (this._current) {\n this._setCursor(this._defaultCursor || '');\n delete this._current;\n }\n }\n });\n var Surface$3 = Surface.extend({\n init: function (element, options) {\n Surface.fn.init.call(this, element, options);\n this.element.innerHTML = this._template(this);\n var canvas = this.element.firstElementChild;\n var size = elementSize(element);\n canvas.width = size.width;\n canvas.height = size.height;\n this._rootElement = canvas;\n this._root = new RootNode$2(canvas);\n this._mouseTrackHandler = this._trackMouse.bind(this);\n bindEvents(this.element, {\n click: this._mouseTrackHandler,\n mousemove: this._mouseTrackHandler\n });\n },\n destroy: function () {\n Surface.fn.destroy.call(this);\n if (this._root) {\n this._root.destroy();\n this._root = null;\n }\n if (this._searchTree) {\n this._searchTree.clear();\n delete this._searchTree;\n }\n if (this._cursor) {\n this._cursor.destroy();\n delete this._cursor;\n }\n unbindEvents(this.element, {\n click: this._mouseTrackHandler,\n mousemove: this._mouseTrackHandler\n });\n },\n draw: function (element) {\n Surface.fn.draw.call(this, element);\n this._root.load([element], undefined, this.options.cors);\n if (this._searchTree) {\n this._searchTree.add([element]);\n }\n },\n clear: function () {\n Surface.fn.clear.call(this);\n this._root.clear();\n if (this._searchTree) {\n this._searchTree.clear();\n }\n if (this._cursor) {\n this._cursor.clear();\n }\n },\n eventTarget: function (e) {\n if (this._searchTree) {\n var point = this._surfacePoint(e);\n var shape = this._searchTree.pointShape(point);\n return shape;\n }\n },\n image: function () {\n var ref = this;\n var root = ref._root;\n var rootElement = ref._rootElement;\n var loadingStates = [];\n root.traverse(function (childNode) {\n if (childNode.loading) {\n loadingStates.push(childNode.loading);\n }\n });\n var promise = createPromise();\n var resolveDataURL = function () {\n root._invalidate();\n try {\n var data = rootElement.toDataURL();\n promise.resolve(data);\n } catch (e) {\n promise.reject(e);\n }\n };\n promiseAll(loadingStates).then(resolveDataURL, resolveDataURL);\n return promise;\n },\n suspendTracking: function () {\n Surface.fn.suspendTracking.call(this);\n if (this._searchTree) {\n this._searchTree.clear();\n delete this._searchTree;\n }\n },\n resumeTracking: function () {\n Surface.fn.resumeTracking.call(this);\n if (!this._searchTree) {\n this._searchTree = new ShapesQuadTree();\n var childNodes = this._root.childNodes;\n var rootElements = [];\n for (var idx = 0; idx < childNodes.length; idx++) {\n rootElements.push(childNodes[idx].srcElement);\n }\n this._searchTree.add(rootElements);\n }\n },\n _resize: function () {\n this._rootElement.width = this._size.width;\n this._rootElement.height = this._size.height;\n this._root.invalidate();\n },\n _template: function () {\n return '';\n },\n _enableTracking: function () {\n this._searchTree = new ShapesQuadTree();\n this._cursor = new SurfaceCursor(this);\n Surface.fn._enableTracking.call(this);\n },\n _trackMouse: function (e) {\n if (this._suspendedTracking) {\n return;\n }\n var shape = this.eventTarget(e);\n if (e.type !== 'click') {\n var currentShape = this._currentShape;\n if (currentShape && currentShape !== shape) {\n this.trigger('mouseleave', {\n element: currentShape,\n originalEvent: e,\n type: 'mouseleave'\n });\n }\n if (shape && currentShape !== shape) {\n this.trigger('mouseenter', {\n element: shape,\n originalEvent: e,\n type: 'mouseenter'\n });\n }\n this.trigger('mousemove', {\n element: shape,\n originalEvent: e,\n type: 'mousemove'\n });\n this._currentShape = shape;\n } else if (shape) {\n this.trigger('click', {\n element: shape,\n originalEvent: e,\n type: 'click'\n });\n }\n }\n });\n Surface$3.prototype.type = 'canvas';\n if (typeof document !== 'undefined' && document.createElement('canvas').getContext) {\n Surface.support.canvas = true;\n SurfaceFactory.current.register('canvas', Surface$3, 20);\n }\n function addGradientStops(gradient, stops) {\n for (var idx = 0; idx < stops.length; idx++) {\n var stop = stops[idx];\n var color = kendo.parseColor(stop.color());\n color.a *= stop.opacity();\n gradient.addColorStop(stop.offset(), color.toCssRgba());\n }\n }\n var PathNode$2 = Node$2.extend({\n renderTo: function (ctx) {\n ctx.save();\n this.setTransform(ctx);\n this.setClip(ctx);\n this.setOpacity(ctx);\n ctx.beginPath();\n this.renderPoints(ctx, this.srcElement);\n this.setLineDash(ctx);\n this.setLineCap(ctx);\n this.setLineJoin(ctx);\n this.setFill(ctx);\n this.setStroke(ctx);\n ctx.restore();\n },\n setFill: function (ctx) {\n var fill = this.srcElement.options.fill;\n var hasFill = false;\n if (fill) {\n if (fill.nodeType === 'Gradient') {\n this.setGradientFill(ctx, fill);\n hasFill = true;\n } else if (!isTransparent(fill.color)) {\n ctx.fillStyle = fill.color;\n ctx.save();\n this.globalAlpha(ctx, fill.opacity);\n ctx.fill();\n ctx.restore();\n hasFill = true;\n }\n }\n return hasFill;\n },\n setGradientFill: function (ctx, fill) {\n var bbox = this.srcElement.rawBBox();\n var gradient;\n if (fill instanceof LinearGradient) {\n var start = fill.start();\n var end = fill.end();\n gradient = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n } else if (fill instanceof RadialGradient) {\n var center = fill.center();\n gradient = ctx.createRadialGradient(center.x, center.y, 0, center.x, center.y, fill.radius());\n }\n addGradientStops(gradient, fill.stops);\n ctx.save();\n if (!fill.userSpace()) {\n ctx.transform(bbox.width(), 0, 0, bbox.height(), bbox.origin.x, bbox.origin.y);\n }\n ctx.fillStyle = gradient;\n ctx.fill();\n ctx.restore();\n },\n setStroke: function (ctx) {\n var stroke = this.srcElement.options.stroke;\n if (stroke && !isTransparent(stroke.color) && stroke.width > 0) {\n ctx.strokeStyle = stroke.color;\n ctx.lineWidth = valueOrDefault(stroke.width, 1);\n ctx.save();\n this.globalAlpha(ctx, stroke.opacity);\n ctx.stroke();\n ctx.restore();\n return true;\n }\n },\n dashType: function () {\n var stroke = this.srcElement.options.stroke;\n if (stroke && stroke.dashType) {\n return stroke.dashType.toLowerCase();\n }\n },\n setLineDash: function (ctx) {\n var dashType = this.dashType();\n if (dashType && dashType !== SOLID) {\n var dashArray = DASH_ARRAYS[dashType];\n if (ctx.setLineDash) {\n ctx.setLineDash(dashArray);\n } else {\n ctx.mozDash = dashArray;\n ctx.webkitLineDash = dashArray;\n }\n }\n },\n setLineCap: function (ctx) {\n var dashType = this.dashType();\n var stroke = this.srcElement.options.stroke;\n if (dashType && dashType !== SOLID) {\n ctx.lineCap = BUTT;\n } else if (stroke && stroke.lineCap) {\n ctx.lineCap = stroke.lineCap;\n }\n },\n setLineJoin: function (ctx) {\n var stroke = this.srcElement.options.stroke;\n if (stroke && stroke.lineJoin) {\n ctx.lineJoin = stroke.lineJoin;\n }\n },\n renderPoints: function (ctx, path) {\n renderPath(ctx, path);\n }\n });\n NODE_MAP$2.Path = PathNode$2;\n var ArcNode$2 = PathNode$2.extend({\n renderPoints: function (ctx) {\n var path = this.srcElement.toPath();\n renderPath(ctx, path);\n }\n });\n NODE_MAP$2.Arc = ArcNode$2;\n var CircleNode$2 = PathNode$2.extend({\n renderPoints: function (ctx) {\n var ref = this.srcElement.geometry();\n var center = ref.center;\n var radius = ref.radius;\n ctx.arc(center.x, center.y, radius, 0, Math.PI * 2);\n }\n });\n NODE_MAP$2.Circle = CircleNode$2;\n var RectNode$2 = PathNode$2.extend({\n renderPoints: function (ctx) {\n var ref = this.srcElement.geometry();\n var origin = ref.origin;\n var size = ref.size;\n ctx.rect(origin.x, origin.y, size.width, size.height);\n }\n });\n NODE_MAP$2.Rect = RectNode$2;\n var ImageNode$2 = PathNode$2.extend({\n init: function (srcElement, cors) {\n PathNode$2.fn.init.call(this, srcElement);\n this.onLoad = this.onLoad.bind(this);\n this.onError = this.onError.bind(this);\n this.loading = createPromise();\n var img = this.img = new Image();\n if (cors && !/^data:/i.test(srcElement.src())) {\n img.crossOrigin = cors;\n }\n img.src = srcElement.src();\n if (img.complete) {\n this.onLoad();\n } else {\n img.onload = this.onLoad;\n img.onerror = this.onError;\n }\n },\n renderTo: function (ctx) {\n if (this.loading.state() === 'resolved') {\n ctx.save();\n this.setTransform(ctx);\n this.setClip(ctx);\n this.drawImage(ctx);\n ctx.restore();\n }\n },\n optionsChange: function (e) {\n if (e.field === 'src') {\n this.loading = createPromise();\n this.img.src = this.srcElement.src();\n } else {\n PathNode$2.fn.optionsChange.call(this, e);\n }\n },\n onLoad: function () {\n this.loading.resolve();\n this.invalidate();\n },\n onError: function () {\n this.loading.reject(new Error('Unable to load image \\'' + this.img.src + '\\'. Check for connectivity and verify CORS headers.'));\n },\n drawImage: function (ctx) {\n var rect = this.srcElement.rect();\n var topLeft = rect.topLeft();\n ctx.drawImage(this.img, topLeft.x, topLeft.y, rect.width(), rect.height());\n }\n });\n NODE_MAP$2.Image = ImageNode$2;\n var TextNode$2 = PathNode$2.extend({\n renderTo: function (ctx) {\n var text = this.srcElement;\n var pos = text.position();\n var size = text.measure();\n ctx.save();\n this.setTransform(ctx);\n this.setClip(ctx);\n this.setOpacity(ctx);\n ctx.beginPath();\n ctx.font = text.options.font;\n ctx.textAlign = 'left';\n if (this.setFill(ctx)) {\n ctx.fillText(text.content(), pos.x, pos.y + size.baseline);\n }\n if (this.setStroke(ctx)) {\n this.setLineDash(ctx);\n ctx.strokeText(text.content(), pos.x, pos.y + size.baseline);\n }\n ctx.restore();\n }\n });\n NODE_MAP$2.Text = TextNode$2;\n var MultiPathNode$2 = PathNode$2.extend({\n renderPoints: function (ctx) {\n var paths = this.srcElement.paths;\n for (var i = 0; i < paths.length; i++) {\n renderPath(ctx, paths[i]);\n }\n }\n });\n NODE_MAP$2.MultiPath = MultiPathNode$2;\n var canvas = {\n Surface: Surface$3,\n RootNode: RootNode$2,\n Node: Node$2,\n GroupNode: GroupNode$2,\n ArcNode: ArcNode$2,\n CircleNode: CircleNode$2,\n RectNode: RectNode$2,\n ImageNode: ImageNode$2,\n TextNode: TextNode$2,\n PathNode: PathNode$2,\n MultiPathNode: MultiPathNode$2\n };\n function exportImage(group, options) {\n var defaults = {\n width: '800px',\n height: '600px',\n cors: 'Anonymous'\n };\n var exportRoot = group;\n var bbox = group.clippedBBox();\n if (bbox) {\n var origin = bbox.getOrigin();\n exportRoot = new Group();\n exportRoot.transform(transform().translate(-origin.x, -origin.y));\n exportRoot.children.push(group);\n var size = bbox.getSize();\n defaults.width = size.width + 'px';\n defaults.height = size.height + 'px';\n }\n var surfaceOptions = $.extend(defaults, options);\n var container = document.createElement('div');\n var style = container.style;\n style.display = 'none';\n style.width = surfaceOptions.width;\n style.height = surfaceOptions.height;\n document.body.appendChild(container);\n var surface = new Surface$3(container, surfaceOptions);\n surface.suspendTracking();\n surface.draw(exportRoot);\n var promise = surface.image();\n var destroy = function () {\n surface.destroy();\n document.body.removeChild(container);\n };\n promise.then(destroy, destroy);\n return promise;\n }\n function exportSVG(group, options) {\n var svg = exportGroup(group);\n if (!options || !options.raw) {\n svg = 'data:image/svg+xml;base64,' + encodeBase64(svg);\n }\n return createPromise().resolve(svg);\n }\n var browser = support.browser;\n function slice$1(thing) {\n return Array.prototype.slice.call(thing);\n }\n var KENDO_PSEUDO_ELEMENT = 'KENDO-PSEUDO-ELEMENT';\n var IMAGE_CACHE = {};\n var nodeInfo = {};\n nodeInfo._root = nodeInfo;\n var TextRect = Text.extend({\n init: function (str, rect, options) {\n Text.fn.init.call(this, str, rect.getOrigin(), options);\n this._pdfRect = rect;\n },\n rect: function () {\n return this._pdfRect;\n },\n rawBBox: function () {\n return this._pdfRect;\n }\n });\n function addClass(el, cls) {\n if (el.classList) {\n el.classList.add(cls);\n } else {\n el.className += ' ' + cls;\n }\n }\n function removeClass(el, cls) {\n if (el.classList) {\n el.classList.remove(cls);\n } else {\n el.className = el.className.split(/\\s+/).reduce(function (a, word) {\n if (word != cls) {\n a.push(word);\n }\n return a;\n }, []).join(' ');\n }\n }\n function setCSS(el, styles) {\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n }\n var matches = typeof Element !== 'undefined' && Element.prototype && function (p) {\n if (p.matches) {\n return function (el, selector) {\n return el.matches(selector);\n };\n }\n if (p.webkitMatchesSelector) {\n return function (el, selector) {\n return el.webkitMatchesSelector(selector);\n };\n }\n if (p.mozMatchesSelector) {\n return function (el, selector) {\n return el.mozMatchesSelector(selector);\n };\n }\n if (p.msMatchesSelector) {\n return function (el, selector) {\n return el.msMatchesSelector(selector);\n };\n }\n return function (s) {\n return [].indexOf.call(document.querySelectorAll(s), this) !== -1;\n };\n }(Element.prototype);\n function closest(el, selector) {\n if (el.closest) {\n return el.closest(selector);\n }\n while (el && !/^\\[object (?:HTML)?Document\\]$/.test(String(el))) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentNode;\n }\n }\n var cloneNodes = function ($) {\n if ($) {\n return function cloneNodes(el) {\n var clone = el.cloneNode(false);\n if (el.nodeType == 1) {\n var $el = $(el), $clone = $(clone), i;\n var data = $el.data();\n for (i in data) {\n $clone.data(i, data[i]);\n }\n if (/^canvas$/i.test(el.tagName)) {\n clone.getContext('2d').drawImage(el, 0, 0);\n } else if (/^(?:input|select|textarea|option)$/i.test(el.tagName)) {\n clone.removeAttribute('id');\n clone.removeAttribute('name');\n clone.value = el.value;\n clone.checked = el.checked;\n clone.selected = el.selected;\n }\n for (i = el.firstChild; i; i = i.nextSibling) {\n clone.appendChild(cloneNodes(i));\n }\n }\n return clone;\n };\n } else {\n return function cloneNodes(el) {\n var clone = el.cloneNode(true);\n var canvases = el.querySelectorAll('canvas');\n if (canvases.length) {\n slice$1(clone.querySelectorAll('canvas')).forEach(function (canvas$$1, i) {\n canvas$$1.getContext('2d').drawImage(canvases[i], 0, 0);\n });\n }\n var orig = el.querySelectorAll('input, select, textarea, option');\n slice$1(clone.querySelectorAll('input, select, textarea, option')).forEach(function (el, i) {\n el.removeAttribute('id');\n el.removeAttribute('name');\n el.value = orig[i].value;\n el.checked = orig[i].checked;\n el.selected = orig[i].selected;\n });\n return clone;\n };\n }\n }(typeof window !== 'undefined' && window.kendo && window.kendo.jQuery);\n function getXY(thing) {\n if (typeof thing == 'number') {\n return {\n x: thing,\n y: thing\n };\n }\n if (Array.isArray(thing)) {\n return {\n x: thing[0],\n y: thing[1]\n };\n }\n return {\n x: thing.x,\n y: thing.y\n };\n }\n function drawDOM(element, options) {\n if (!options) {\n options = {};\n }\n var promise = createPromise();\n if (!element) {\n return promise.reject('No element to export');\n }\n if (typeof window.getComputedStyle != 'function') {\n throw new Error('window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.');\n }\n kendo.pdf.defineFont(getFontFaces(element.ownerDocument));\n var scale = getXY(options.scale || 1);\n function doOne(element) {\n var group = new Group();\n var pos = element.getBoundingClientRect();\n setTransform(group, [\n scale.x,\n 0,\n 0,\n scale.y,\n -pos.left * scale.x,\n -pos.top * scale.y\n ]);\n nodeInfo._clipbox = false;\n nodeInfo._matrix = Matrix.unit();\n nodeInfo._stackingContext = {\n element: element,\n group: group\n };\n if (options.avoidLinks === true) {\n nodeInfo._avoidLinks = 'a';\n } else {\n nodeInfo._avoidLinks = options.avoidLinks;\n }\n addClass(element, 'k-pdf-export');\n renderElement(element, group);\n removeClass(element, 'k-pdf-export');\n return group;\n }\n cacheImages(element, function () {\n var forceBreak = options && options.forcePageBreak;\n var hasPaperSize = options && options.paperSize && options.paperSize != 'auto';\n var paperOptions = kendo.pdf.getPaperOptions(function (key, def) {\n if (key == 'paperSize') {\n return hasPaperSize ? options[key] : 'A4';\n }\n return key in options ? options[key] : def;\n });\n var pageWidth = hasPaperSize && paperOptions.paperSize[0];\n var pageHeight = hasPaperSize && paperOptions.paperSize[1];\n var margin = options.margin && paperOptions.margin;\n var hasMargin = Boolean(margin);\n if (forceBreak || pageHeight) {\n if (!margin) {\n margin = {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n };\n }\n if (pageWidth) {\n pageWidth /= scale.x;\n }\n if (pageHeight) {\n pageHeight /= scale.y;\n }\n margin.left /= scale.x;\n margin.right /= scale.x;\n margin.top /= scale.y;\n margin.bottom /= scale.y;\n var group = new Group({\n pdf: {\n multiPage: true,\n paperSize: hasPaperSize ? paperOptions.paperSize : 'auto',\n _ignoreMargin: hasMargin\n }\n });\n handlePageBreaks(function (x) {\n if (options.progress) {\n var canceled = false, pageNum = 0;\n (function next() {\n if (pageNum < x.pages.length) {\n var page = doOne(x.pages[pageNum]);\n group.append(page);\n options.progress({\n page: page,\n pageNum: ++pageNum,\n totalPages: x.pages.length,\n cancel: function () {\n canceled = true;\n }\n });\n if (!canceled) {\n setTimeout(next);\n } else {\n x.container.parentNode.removeChild(x.container);\n }\n } else {\n x.container.parentNode.removeChild(x.container);\n promise.resolve(group);\n }\n }());\n } else {\n x.pages.forEach(function (page) {\n group.append(doOne(page));\n });\n x.container.parentNode.removeChild(x.container);\n promise.resolve(group);\n }\n }, element, forceBreak, pageWidth ? pageWidth - margin.left - margin.right : null, pageHeight ? pageHeight - margin.top - margin.bottom : null, margin, options);\n } else {\n promise.resolve(doOne(element));\n }\n });\n function makeTemplate(template$$1) {\n if (template$$1 != null) {\n if (typeof template$$1 == 'string') {\n template$$1 = kendo.template(template$$1.replace(/^\\s+|\\s+$/g, ''));\n }\n if (typeof template$$1 == 'function') {\n return function (data) {\n var el = template$$1(data);\n if (el && typeof el == 'string') {\n var div = document.createElement('div');\n div.innerHTML = el;\n el = div.firstElementChild;\n }\n return el;\n };\n }\n return function () {\n return template$$1.cloneNode(true);\n };\n }\n }\n function handlePageBreaks(callback, element, forceBreak, pageWidth, pageHeight, margin, options) {\n var template$$1 = makeTemplate(options.template);\n var doc = element.ownerDocument;\n var pages = [];\n var copy = options._destructive ? element : cloneNodes(element);\n var container = doc.createElement('KENDO-PDF-DOCUMENT');\n var adjust = 0;\n slice$1(copy.querySelectorAll('tfoot')).forEach(function (tfoot) {\n tfoot.parentNode.appendChild(tfoot);\n });\n slice$1(copy.querySelectorAll('ol')).forEach(function (ol) {\n slice$1(ol.children).forEach(function (li, index) {\n li.setAttribute('kendo-split-index', index);\n });\n });\n setCSS(container, {\n display: 'block',\n position: 'absolute',\n boxSizing: 'content-box',\n left: '-10000px',\n top: '-10000px'\n });\n if (pageWidth) {\n setCSS(container, {\n width: pageWidth + 'px',\n paddingLeft: margin.left + 'px',\n paddingRight: margin.right + 'px'\n });\n setCSS(copy, { overflow: 'hidden' });\n }\n element.parentNode.insertBefore(container, element);\n container.appendChild(copy);\n if (options.beforePageBreak) {\n setTimeout(function () {\n options.beforePageBreak(container, doPageBreak);\n }, 15);\n } else {\n setTimeout(doPageBreak, 15);\n }\n function doPageBreak() {\n if (forceBreak != '-' || pageHeight) {\n splitElement(copy);\n }\n var page = makePage();\n copy.parentNode.insertBefore(page, copy);\n page.appendChild(copy);\n if (template$$1) {\n var count = pages.length;\n pages.forEach(function (page, i) {\n var el = template$$1({\n element: page,\n pageNum: i + 1,\n totalPages: pages.length\n });\n if (el) {\n page.appendChild(el);\n cacheImages(el, function () {\n if (--count === 0) {\n next();\n }\n });\n }\n });\n } else {\n next();\n }\n function next() {\n whenImagesAreActuallyLoaded(pages, function () {\n callback({\n pages: pages,\n container: container\n });\n });\n }\n }\n function keepTogether(el) {\n if (options.keepTogether && matches(el, options.keepTogether) && el.offsetHeight <= pageHeight - adjust) {\n return true;\n }\n var tag = el.tagName;\n if (/^h[1-6]$/i.test(tag) && el.offsetHeight >= pageHeight - adjust) {\n return false;\n }\n return el.getAttribute('data-kendo-chart') || /^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(el.tagName);\n }\n function splitElement(element) {\n if (element.tagName == 'TABLE') {\n setCSS(element, { tableLayout: 'fixed' });\n }\n var style = getComputedStyle(element);\n var bottomPadding = parseFloat(getPropertyValue(style, 'padding-bottom'));\n var bottomBorder = parseFloat(getPropertyValue(style, 'border-bottom-width'));\n var saveAdjust = adjust;\n adjust += bottomPadding + bottomBorder;\n var isFirst = true;\n for (var el = element.firstChild; el; el = el.nextSibling) {\n if (el.nodeType == 1) {\n isFirst = false;\n if (matches(el, forceBreak)) {\n breakAtElement(el);\n continue;\n }\n if (!pageHeight) {\n splitElement(el);\n continue;\n }\n if (!/^(?:static|relative)$/.test(getPropertyValue(getComputedStyle(el), 'position'))) {\n continue;\n }\n var fall = fallsOnMargin(el);\n if (fall == 1) {\n breakAtElement(el);\n } else if (fall) {\n if (keepTogether(el)) {\n breakAtElement(el);\n } else {\n splitElement(el);\n }\n } else {\n splitElement(el);\n }\n } else if (el.nodeType == 3 && pageHeight) {\n splitText(el, isFirst);\n isFirst = false;\n }\n }\n adjust = saveAdjust;\n }\n function firstInParent(el) {\n var p = el.parentNode, first = p.firstChild;\n if (el === first) {\n return true;\n }\n if (el === p.children[0]) {\n if (first.nodeType == 7 || first.nodeType == 8) {\n return true;\n }\n if (first.nodeType == 3) {\n return !/\\S/.test(first.data);\n }\n }\n return false;\n }\n function breakAtElement(el) {\n if (el.nodeType == 1 && el !== copy && firstInParent(el)) {\n return breakAtElement(el.parentNode);\n }\n var table, colgroup, thead, grid, gridHead;\n table = closest(el, 'table');\n colgroup = table && table.querySelector('colgroup');\n if (options.repeatHeaders) {\n thead = table && table.querySelector('thead');\n grid = closest(el, '.k-grid.k-widget');\n if (grid && grid.querySelector('.k-auto-scrollable')) {\n gridHead = grid.querySelector('.k-grid-header');\n }\n }\n var page = makePage();\n var range = doc.createRange();\n range.setStartBefore(copy);\n range.setEndBefore(el);\n page.appendChild(range.extractContents());\n copy.parentNode.insertBefore(page, copy);\n preventBulletOnListItem(el.parentNode);\n if (table) {\n table = closest(el, 'table');\n if (options.repeatHeaders && thead) {\n table.insertBefore(thead.cloneNode(true), table.firstChild);\n }\n if (colgroup) {\n table.insertBefore(colgroup.cloneNode(true), table.firstChild);\n }\n }\n if (options.repeatHeaders && gridHead) {\n grid = closest(el, '.k-grid.k-widget');\n grid.insertBefore(gridHead.cloneNode(true), grid.firstChild);\n }\n }\n function makePage() {\n var page = doc.createElement('KENDO-PDF-PAGE');\n setCSS(page, {\n display: 'block',\n boxSizing: 'content-box',\n width: pageWidth ? pageWidth + 'px' : 'auto',\n padding: margin.top + 'px ' + margin.right + 'px ' + margin.bottom + 'px ' + margin.left + 'px',\n position: 'relative',\n height: pageHeight ? pageHeight + 'px' : 'auto',\n overflow: pageHeight || pageWidth ? 'hidden' : 'visible',\n clear: 'both'\n });\n if (options && options.pageClassName) {\n page.className = options.pageClassName;\n }\n pages.push(page);\n return page;\n }\n function fallsOnMargin(thing) {\n var box = thing.getBoundingClientRect();\n if (box.width === 0 || box.height === 0) {\n return 0;\n }\n var top = copy.getBoundingClientRect().top;\n var available = pageHeight - adjust;\n return box.height > available ? 3 : box.top - top > available ? 1 : box.bottom - top > available ? 2 : 0;\n }\n function splitText(node, isFirst) {\n if (!/\\S/.test(node.data)) {\n return;\n }\n var len = node.data.length;\n var range = doc.createRange();\n range.selectNodeContents(node);\n var fall = fallsOnMargin(range);\n if (!fall) {\n return;\n }\n var nextnode = node;\n if (fall == 1) {\n if (isFirst) {\n breakAtElement(node.parentNode);\n } else {\n breakAtElement(node);\n }\n } else {\n (function findEOP(min, pos, max) {\n range.setEnd(node, pos);\n if (min == pos || pos == max) {\n return pos;\n }\n if (fallsOnMargin(range)) {\n return findEOP(min, min + pos >> 1, pos);\n } else {\n return findEOP(pos, pos + max >> 1, max);\n }\n }(0, len >> 1, len));\n if (!/\\S/.test(range.toString()) && isFirst) {\n breakAtElement(node.parentNode);\n } else {\n nextnode = node.splitText(range.endOffset);\n var page = makePage();\n range.setStartBefore(copy);\n page.appendChild(range.extractContents());\n copy.parentNode.insertBefore(page, copy);\n preventBulletOnListItem(nextnode.parentNode);\n }\n }\n splitText(nextnode);\n }\n function preventBulletOnListItem(el) {\n var li = closest(el, 'li');\n if (li) {\n li.setAttribute('kendo-no-bullet', '1');\n preventBulletOnListItem(li.parentNode);\n }\n }\n }\n return promise;\n }\n drawDOM.getFontFaces = getFontFaces;\n drawDOM.drawText = function (element) {\n var group = new Group();\n nodeInfo._clipbox = false;\n nodeInfo._matrix = Matrix.unit();\n nodeInfo._stackingContext = {\n element: element,\n group: group\n };\n pushNodeInfo(element, getComputedStyle(element), group);\n if (element.firstChild.nodeType == 3) {\n renderText(element, element.firstChild, group);\n } else {\n _renderElement(element, group);\n }\n popNodeInfo();\n return group;\n };\n var parseBackgroundImage = function () {\n var tok_linear_gradient = /^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\\s*)\\(/;\n var tok_percent = /^([-0-9.]+%)/;\n var tok_length = /^([-0-9.]+px)/;\n var tok_keyword = /^(left|right|top|bottom|to|center)\\W/;\n var tok_angle = /^([-0-9.]+(deg|grad|rad|turn))/;\n var tok_whitespace = /^(\\s+)/;\n var tok_popen = /^(\\()/;\n var tok_pclose = /^(\\))/;\n var tok_comma = /^(,)/;\n var tok_url = /^(url)\\(/;\n var tok_content = /^(.*?)\\)/;\n var cache1 = {}, cache2 = {};\n function parse(input) {\n var orig = input;\n if (hasOwnProperty(cache1, orig)) {\n return cache1[orig];\n }\n function skip_ws() {\n var m = tok_whitespace.exec(input);\n if (m) {\n input = input.substr(m[1].length);\n }\n }\n function read(token) {\n skip_ws();\n var m = token.exec(input);\n if (m) {\n input = input.substr(m[1].length);\n return m[1];\n }\n }\n function read_stop() {\n var color = kendo.parseColor(input, true);\n var length, percent;\n if (color) {\n var match = /^#[0-9a-f]+/i.exec(input) || /^rgba?\\(.*?\\)/i.exec(input) || /^..*?\\b/.exec(input);\n input = input.substr(match[0].length);\n color = color.toRGB();\n if (!(length = read(tok_length))) {\n percent = read(tok_percent);\n }\n return {\n color: color,\n length: length,\n percent: percent\n };\n }\n }\n function read_linear_gradient(propName) {\n var angle;\n var to1, to2;\n var stops = [];\n var reverse = false;\n if (read(tok_popen)) {\n angle = read(tok_angle);\n if (angle) {\n angle = parseAngle(angle);\n read(tok_comma);\n } else {\n to1 = read(tok_keyword);\n if (to1 == 'to') {\n to1 = read(tok_keyword);\n } else if (to1 && /^-/.test(propName)) {\n reverse = true;\n }\n to2 = read(tok_keyword);\n read(tok_comma);\n }\n if (/-moz-/.test(propName) && angle == null && to1 == null) {\n var x = read(tok_percent), y = read(tok_percent);\n reverse = true;\n if (x == '0%') {\n to1 = 'left';\n } else if (x == '100%') {\n to1 = 'right';\n }\n if (y == '0%') {\n to2 = 'top';\n } else if (y == '100%') {\n to2 = 'bottom';\n }\n read(tok_comma);\n }\n while (input && !read(tok_pclose)) {\n var stop = read_stop();\n if (!stop) {\n break;\n }\n stops.push(stop);\n read(tok_comma);\n }\n return {\n type: 'linear',\n angle: angle,\n to: to1 && to2 ? to1 + ' ' + to2 : to1 ? to1 : to2 ? to2 : null,\n stops: stops,\n reverse: reverse\n };\n }\n }\n function read_url() {\n if (read(tok_popen)) {\n var url = read(tok_content);\n url = url.replace(/^['\"]+|[\"']+$/g, '');\n read(tok_pclose);\n return {\n type: 'url',\n url: url\n };\n }\n }\n var tok;\n if (tok = read(tok_linear_gradient)) {\n tok = read_linear_gradient(tok);\n } else if (tok = read(tok_url)) {\n tok = read_url();\n }\n return cache1[orig] = tok || { type: 'none' };\n }\n return function (input) {\n if (hasOwnProperty(cache2, input)) {\n return cache2[input];\n }\n return cache2[input] = splitProperty(input).map(parse);\n };\n }();\n var splitProperty = function () {\n var cache = {};\n return function (input, separator) {\n if (!separator) {\n separator = /^\\s*,\\s*/;\n }\n var cacheKey = input + separator;\n if (hasOwnProperty(cache, cacheKey)) {\n return cache[cacheKey];\n }\n var ret = [];\n var last$$1 = 0, pos = 0;\n var in_paren = 0;\n var in_string = false;\n var m;\n function looking_at(rx) {\n return m = rx.exec(input.substr(pos));\n }\n function trim(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n }\n while (pos < input.length) {\n if (!in_string && looking_at(/^[\\(\\[\\{]/)) {\n in_paren++;\n pos++;\n } else if (!in_string && looking_at(/^[\\)\\]\\}]/)) {\n in_paren--;\n pos++;\n } else if (!in_string && looking_at(/^[\\\"\\']/)) {\n in_string = m[0];\n pos++;\n } else if (in_string == '\\'' && looking_at(/^\\\\\\'/)) {\n pos += 2;\n } else if (in_string == '\"' && looking_at(/^\\\\\\\"/)) {\n pos += 2;\n } else if (in_string == '\\'' && looking_at(/^\\'/)) {\n in_string = false;\n pos++;\n } else if (in_string == '\"' && looking_at(/^\\\"/)) {\n in_string = false;\n pos++;\n } else if (looking_at(separator)) {\n if (!in_string && !in_paren && pos > last$$1) {\n ret.push(trim(input.substring(last$$1, pos)));\n last$$1 = pos + m[0].length;\n }\n pos += m[0].length;\n } else {\n pos++;\n }\n }\n if (last$$1 < pos) {\n ret.push(trim(input.substring(last$$1, pos)));\n }\n return cache[cacheKey] = ret;\n };\n }();\n var getFontURL = function (cache) {\n return function (el) {\n var url = cache[el];\n if (!url) {\n var m;\n if (m = /url\\((['\"]?)([^'\")]*?)\\1\\)\\s+format\\((['\"]?)truetype\\3\\)/.exec(el)) {\n url = cache[el] = m[2];\n } else if (m = /url\\((['\"]?)([^'\")]*?\\.ttf)\\1\\)/.exec(el)) {\n url = cache[el] = m[2];\n }\n }\n return url;\n };\n }(Object.create ? Object.create(null) : {});\n var getFontHeight = function (cache) {\n return function (font) {\n var height = cache[font];\n if (height == null) {\n height = cache[font] = kendoUtil.measureText('Mapq', { font: font }).height;\n }\n return height;\n };\n }(Object.create ? Object.create(null) : {});\n function getFontFaces(doc) {\n if (doc == null) {\n doc = document;\n }\n var result = {};\n for (var i = 0; i < doc.styleSheets.length; ++i) {\n doStylesheet(doc.styleSheets[i]);\n }\n return result;\n function doStylesheet(ss) {\n if (ss) {\n var rules = null;\n try {\n rules = ss.cssRules;\n } catch (ex) {\n }\n if (rules) {\n addRules(ss, rules);\n }\n }\n }\n function findFonts(rule) {\n var src = getPropertyValue(rule.style, 'src');\n if (src) {\n return splitProperty(src).reduce(function (a, el) {\n var font = getFontURL(el);\n if (font) {\n a.push(font);\n }\n return a;\n }, []);\n } else {\n var font = getFontURL(rule.cssText);\n return font ? [font] : [];\n }\n }\n function addRules(styleSheet, rules) {\n for (var i = 0; i < rules.length; ++i) {\n var r = rules[i];\n switch (r.type) {\n case 3:\n doStylesheet(r.styleSheet);\n break;\n case 5:\n var style = r.style;\n var family = splitProperty(getPropertyValue(style, 'font-family'));\n var bold = /^([56789]00|bold)$/i.test(getPropertyValue(style, 'font-weight'));\n var italic = 'italic' == getPropertyValue(style, 'font-style');\n var src = findFonts(r);\n if (src.length > 0) {\n addRule(styleSheet, family, bold, italic, src[0]);\n }\n }\n }\n }\n function addRule(styleSheet, names, bold, italic, url) {\n if (!/^data:/i.test(url)) {\n if (!(/^[^\\/:]+:\\/\\//.test(url) || /^\\//.test(url))) {\n url = String(styleSheet.href).replace(/[^\\/]*$/, '') + url;\n }\n }\n names.forEach(function (name) {\n name = name.replace(/^(['\"]?)(.*?)\\1$/, '$2');\n if (bold) {\n name += '|bold';\n }\n if (italic) {\n name += '|italic';\n }\n result[name] = url;\n });\n }\n }\n function hasOwnProperty(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n function getCounter(name) {\n name = '_counter_' + name;\n return nodeInfo[name];\n }\n function getAllCounters(name) {\n var values = [], p = nodeInfo;\n name = '_counter_' + name;\n while (p) {\n if (hasOwnProperty(p, name)) {\n values.push(p[name]);\n }\n p = Object.getPrototypeOf(p);\n }\n return values.reverse();\n }\n function incCounter(name, inc) {\n var p = nodeInfo;\n name = '_counter_' + name;\n while (p && !hasOwnProperty(p, name)) {\n p = Object.getPrototypeOf(p);\n }\n if (!p) {\n p = nodeInfo._root;\n }\n p[name] = (p[name] || 0) + (inc == null ? 1 : inc);\n }\n function resetCounter(name, val) {\n name = '_counter_' + name;\n nodeInfo[name] = val == null ? 0 : val;\n }\n function doCounters(a, f, def) {\n for (var i = 0; i < a.length;) {\n var name = a[i++];\n var val = parseFloat(a[i]);\n if (isNaN(val)) {\n f(name, def);\n } else {\n f(name, val);\n ++i;\n }\n }\n }\n function updateCounters(style) {\n var counterReset = getPropertyValue(style, 'counter-reset');\n if (counterReset) {\n doCounters(splitProperty(counterReset, /^\\s+/), resetCounter, 0);\n }\n var counterIncrement = getPropertyValue(style, 'counter-increment');\n if (counterIncrement) {\n doCounters(splitProperty(counterIncrement, /^\\s+/), incCounter, 1);\n }\n }\n function parseColor$1(str, css) {\n var color = kendo.parseColor(str, true);\n if (color) {\n color = color.toRGB();\n if (css) {\n color = color.toCssRgba();\n } else if (color.a === 0) {\n color = null;\n }\n }\n return color;\n }\n function whenImagesAreActuallyLoaded(elements, callback) {\n var pending = 0;\n elements.forEach(function (el) {\n var images = el.querySelectorAll('img');\n for (var i = 0; i < images.length; ++i) {\n var img = images[i];\n if (!img.complete) {\n pending++;\n img.onload = img.onerror = next;\n }\n }\n });\n if (!pending) {\n next();\n }\n function next() {\n if (--pending <= 0) {\n callback();\n }\n }\n }\n function cacheImages(element, callback) {\n var urls = [];\n function add(url) {\n if (!IMAGE_CACHE[url]) {\n IMAGE_CACHE[url] = true;\n urls.push(url);\n }\n }\n (function dive(element) {\n if (/^img$/i.test(element.tagName)) {\n add(element.src);\n }\n parseBackgroundImage(getPropertyValue(getComputedStyle(element), 'background-image')).forEach(function (bg) {\n if (bg.type == 'url') {\n add(bg.url);\n }\n });\n if (element.children) {\n slice$1(element.children).forEach(dive);\n }\n }(element));\n var count = urls.length;\n function next() {\n if (--count <= 0) {\n callback();\n }\n }\n if (count === 0) {\n next();\n }\n urls.forEach(function (url) {\n var img = IMAGE_CACHE[url] = new window.Image();\n if (!/^data:/i.test(url)) {\n img.crossOrigin = 'Anonymous';\n }\n img.src = url;\n if (img.complete) {\n next();\n } else {\n img.onload = next;\n img.onerror = function () {\n IMAGE_CACHE[url] = null;\n next();\n };\n }\n });\n }\n function alphaNumeral(n) {\n var result = '';\n do {\n var r = n % 26;\n result = String.fromCharCode(97 + r) + result;\n n = Math.floor(n / 26);\n } while (n > 0);\n return result;\n }\n function pushNodeInfo(element, style, group) {\n nodeInfo = Object.create(nodeInfo);\n nodeInfo[element.tagName.toLowerCase()] = {\n element: element,\n style: style\n };\n var decoration = getPropertyValue(style, 'text-decoration');\n if (decoration && decoration != 'none') {\n var color = getPropertyValue(style, 'color');\n decoration.split(/\\s+/g).forEach(function (name) {\n if (!nodeInfo[name]) {\n nodeInfo[name] = color;\n }\n });\n }\n if (createsStackingContext(style)) {\n nodeInfo._stackingContext = {\n element: element,\n group: group\n };\n }\n }\n function popNodeInfo() {\n nodeInfo = Object.getPrototypeOf(nodeInfo);\n }\n function updateClipbox(path) {\n if (nodeInfo._clipbox != null) {\n var box = path.bbox(nodeInfo._matrix);\n if (nodeInfo._clipbox) {\n nodeInfo._clipbox = Rect.intersect(nodeInfo._clipbox, box);\n } else {\n nodeInfo._clipbox = box;\n }\n }\n }\n function emptyClipbox() {\n var cb = nodeInfo._clipbox;\n if (cb == null) {\n return true;\n }\n if (cb) {\n return cb.width() === 0 || cb.height() === 0;\n }\n }\n function createsStackingContext(style) {\n function prop(name) {\n return getPropertyValue(style, name);\n }\n if (prop('transform') != 'none' || prop('position') != 'static' || prop('z-index') != 'auto' || prop('opacity') < 1) {\n return true;\n }\n }\n function getComputedStyle(element, pseudoElt) {\n return window.getComputedStyle(element, pseudoElt || null);\n }\n function getPropertyValue(style, prop, defa) {\n var val = style.getPropertyValue(prop);\n if (val == null || val === '') {\n if (browser.webkit) {\n val = style.getPropertyValue('-webkit-' + prop);\n } else if (browser.mozilla) {\n val = style.getPropertyValue('-moz-' + prop);\n } else if (browser.opera) {\n val = style.getPropertyValue('-o-' + prop);\n } else if (browser.msie) {\n val = style.getPropertyValue('-ms-' + prop);\n }\n }\n if (arguments.length > 2 && (val == null || val === '')) {\n return defa;\n } else {\n return val;\n }\n }\n function pleaseSetPropertyValue(style, prop, value, important) {\n style.setProperty(prop, value, important);\n if (browser.webkit) {\n style.setProperty('-webkit-' + prop, value, important);\n } else if (browser.mozilla) {\n style.setProperty('-moz-' + prop, value, important);\n } else if (browser.opera) {\n style.setProperty('-o-' + prop, value, important);\n } else if (browser.msie) {\n style.setProperty('-ms-' + prop, value, important);\n prop = 'ms' + prop.replace(/(^|-)([a-z])/g, function (s, p1, p2) {\n return p1 + p2.toUpperCase();\n });\n style[prop] = value;\n }\n }\n function getBorder(style, side) {\n side = 'border-' + side;\n return {\n width: parseFloat(getPropertyValue(style, side + '-width')),\n style: getPropertyValue(style, side + '-style'),\n color: parseColor$1(getPropertyValue(style, side + '-color'), true)\n };\n }\n function saveStyle(element, func) {\n var prev = element.style.cssText;\n var result = func();\n element.style.cssText = prev;\n return result;\n }\n function getBorderRadius(style, side) {\n var r = getPropertyValue(style, 'border-' + side + '-radius').split(/\\s+/g).map(parseFloat);\n if (r.length == 1) {\n r.push(r[0]);\n }\n return sanitizeRadius({\n x: r[0],\n y: r[1]\n });\n }\n function getContentBox(element) {\n var box = element.getBoundingClientRect();\n box = innerBox(box, 'border-*-width', element);\n box = innerBox(box, 'padding-*', element);\n return box;\n }\n function innerBox(box, prop, element) {\n var style, wt, wr, wb, wl;\n if (typeof prop == 'string') {\n style = getComputedStyle(element);\n wt = parseFloat(getPropertyValue(style, prop.replace('*', 'top')));\n wr = parseFloat(getPropertyValue(style, prop.replace('*', 'right')));\n wb = parseFloat(getPropertyValue(style, prop.replace('*', 'bottom')));\n wl = parseFloat(getPropertyValue(style, prop.replace('*', 'left')));\n } else if (typeof prop == 'number') {\n wt = wr = wb = wl = prop;\n }\n return {\n top: box.top + wt,\n right: box.right - wr,\n bottom: box.bottom - wb,\n left: box.left + wl,\n width: box.right - box.left - wr - wl,\n height: box.bottom - box.top - wb - wt\n };\n }\n function getTransform(style) {\n var transform$$1 = getPropertyValue(style, 'transform');\n if (transform$$1 == 'none') {\n return null;\n }\n var matrix = /^\\s*matrix\\(\\s*(.*?)\\s*\\)\\s*$/.exec(transform$$1);\n if (matrix) {\n var origin = getPropertyValue(style, 'transform-origin');\n matrix = matrix[1].split(/\\s*,\\s*/g).map(parseFloat);\n origin = origin.split(/\\s+/g).map(parseFloat);\n return {\n matrix: matrix,\n origin: origin\n };\n }\n }\n function radiansToDegrees(radians) {\n return 180 * radians / Math.PI % 360;\n }\n function parseAngle(angle) {\n var num = parseFloat(angle);\n if (/grad$/.test(angle)) {\n return Math.PI * num / 200;\n } else if (/rad$/.test(angle)) {\n return num;\n } else if (/turn$/.test(angle)) {\n return Math.PI * num * 2;\n } else if (/deg$/.test(angle)) {\n return Math.PI * num / 180;\n }\n }\n function setTransform(shape, m) {\n m = new Matrix(m[0], m[1], m[2], m[3], m[4], m[5]);\n shape.transform(m);\n return m;\n }\n function setClipping(shape, clipPath) {\n shape.clip(clipPath);\n }\n function addArcToPath(path, x, y, options) {\n var points = new Arc$2([\n x,\n y\n ], options).curvePoints(), i = 1;\n while (i < points.length) {\n path.curveTo(points[i++], points[i++], points[i++]);\n }\n }\n function sanitizeRadius(r) {\n if (r.x <= 0 || r.y <= 0) {\n r.x = r.y = 0;\n }\n return r;\n }\n function adjustBorderRadiusForBox(box, rTL, rTR, rBR, rBL) {\n var tl_x = Math.max(0, rTL.x), tl_y = Math.max(0, rTL.y);\n var tr_x = Math.max(0, rTR.x), tr_y = Math.max(0, rTR.y);\n var br_x = Math.max(0, rBR.x), br_y = Math.max(0, rBR.y);\n var bl_x = Math.max(0, rBL.x), bl_y = Math.max(0, rBL.y);\n var f = Math.min(box.width / (tl_x + tr_x), box.height / (tr_y + br_y), box.width / (br_x + bl_x), box.height / (bl_y + tl_y));\n if (f < 1) {\n tl_x *= f;\n tl_y *= f;\n tr_x *= f;\n tr_y *= f;\n br_x *= f;\n br_y *= f;\n bl_x *= f;\n bl_y *= f;\n }\n return {\n tl: {\n x: tl_x,\n y: tl_y\n },\n tr: {\n x: tr_x,\n y: tr_y\n },\n br: {\n x: br_x,\n y: br_y\n },\n bl: {\n x: bl_x,\n y: bl_y\n }\n };\n }\n function elementRoundBox(element, box, type) {\n var style = getComputedStyle(element);\n var rTL = getBorderRadius(style, 'top-left');\n var rTR = getBorderRadius(style, 'top-right');\n var rBL = getBorderRadius(style, 'bottom-left');\n var rBR = getBorderRadius(style, 'bottom-right');\n if (type == 'padding' || type == 'content') {\n var bt = getBorder(style, 'top');\n var br = getBorder(style, 'right');\n var bb = getBorder(style, 'bottom');\n var bl = getBorder(style, 'left');\n rTL.x -= bl.width;\n rTL.y -= bt.width;\n rTR.x -= br.width;\n rTR.y -= bt.width;\n rBR.x -= br.width;\n rBR.y -= bb.width;\n rBL.x -= bl.width;\n rBL.y -= bb.width;\n if (type == 'content') {\n var pt = parseFloat(getPropertyValue(style, 'padding-top'));\n var pr = parseFloat(getPropertyValue(style, 'padding-right'));\n var pb = parseFloat(getPropertyValue(style, 'padding-bottom'));\n var pl = parseFloat(getPropertyValue(style, 'padding-left'));\n rTL.x -= pl;\n rTL.y -= pt;\n rTR.x -= pr;\n rTR.y -= pt;\n rBR.x -= pr;\n rBR.y -= pb;\n rBL.x -= pl;\n rBL.y -= pb;\n }\n }\n if (typeof type == 'number') {\n rTL.x -= type;\n rTL.y -= type;\n rTR.x -= type;\n rTR.y -= type;\n rBR.x -= type;\n rBR.y -= type;\n rBL.x -= type;\n rBL.y -= type;\n }\n return roundBox(box, rTL, rTR, rBR, rBL);\n }\n function roundBox(box, rTL0, rTR0, rBR0, rBL0) {\n var tmp = adjustBorderRadiusForBox(box, rTL0, rTR0, rBR0, rBL0);\n var rTL = tmp.tl;\n var rTR = tmp.tr;\n var rBR = tmp.br;\n var rBL = tmp.bl;\n var path = new Path({\n fill: null,\n stroke: null\n });\n path.moveTo(box.left, box.top + rTL.y);\n if (rTL.x) {\n addArcToPath(path, box.left + rTL.x, box.top + rTL.y, {\n startAngle: -180,\n endAngle: -90,\n radiusX: rTL.x,\n radiusY: rTL.y\n });\n }\n path.lineTo(box.right - rTR.x, box.top);\n if (rTR.x) {\n addArcToPath(path, box.right - rTR.x, box.top + rTR.y, {\n startAngle: -90,\n endAngle: 0,\n radiusX: rTR.x,\n radiusY: rTR.y\n });\n }\n path.lineTo(box.right, box.bottom - rBR.y);\n if (rBR.x) {\n addArcToPath(path, box.right - rBR.x, box.bottom - rBR.y, {\n startAngle: 0,\n endAngle: 90,\n radiusX: rBR.x,\n radiusY: rBR.y\n });\n }\n path.lineTo(box.left + rBL.x, box.bottom);\n if (rBL.x) {\n addArcToPath(path, box.left + rBL.x, box.bottom - rBL.y, {\n startAngle: 90,\n endAngle: 180,\n radiusX: rBL.x,\n radiusY: rBL.y\n });\n }\n return path.close();\n }\n function formatCounter(val, style) {\n var str = String(parseFloat(val));\n switch (style) {\n case 'decimal-leading-zero':\n if (str.length < 2) {\n str = '0' + str;\n }\n return str;\n case 'lower-roman':\n return arabicToRoman(val).toLowerCase();\n case 'upper-roman':\n return arabicToRoman(val).toUpperCase();\n case 'lower-latin':\n case 'lower-alpha':\n return alphaNumeral(val - 1);\n case 'upper-latin':\n case 'upper-alpha':\n return alphaNumeral(val - 1).toUpperCase();\n default:\n return str;\n }\n }\n function evalPseudoElementContent(element, content) {\n function displayCounter(name, style, separator) {\n if (!separator) {\n return formatCounter(getCounter(name) || 0, style);\n }\n separator = separator.replace(/^\\s*([\"'])(.*)\\1\\s*$/, '$2');\n return getAllCounters(name).map(function (val) {\n return formatCounter(val, style);\n }).join(separator);\n }\n var a = splitProperty(content, /^\\s+/);\n var result = [], m;\n a.forEach(function (el) {\n var tmp;\n if (m = /^\\s*([\"'])(.*)\\1\\s*$/.exec(el)) {\n result.push(m[2].replace(/\\\\([0-9a-f]{4})/gi, function (s, p) {\n return String.fromCharCode(parseInt(p, 16));\n }));\n } else if (m = /^\\s*counter\\((.*?)\\)\\s*$/.exec(el)) {\n tmp = splitProperty(m[1]);\n result.push(displayCounter(tmp[0], tmp[1]));\n } else if (m = /^\\s*counters\\((.*?)\\)\\s*$/.exec(el)) {\n tmp = splitProperty(m[1]);\n result.push(displayCounter(tmp[0], tmp[2], tmp[1]));\n } else if (m = /^\\s*attr\\((.*?)\\)\\s*$/.exec(el)) {\n result.push(element.getAttribute(m[1]) || '');\n } else {\n result.push(el);\n }\n });\n return result.join('');\n }\n function getCssText(style) {\n if (style.cssText) {\n return style.cssText;\n }\n var result = [];\n for (var i = 0; i < style.length; ++i) {\n result.push(style[i] + ': ' + getPropertyValue(style, style[i]));\n }\n return result.join(';\\n');\n }\n function _renderWithPseudoElements(element, group) {\n if (element.tagName == KENDO_PSEUDO_ELEMENT) {\n _renderElement(element, group);\n return;\n }\n var fake = [];\n function pseudo(kind, place) {\n var style = getComputedStyle(element, kind);\n updateCounters(style);\n if (style.content && style.content != 'normal' && style.content != 'none' && style.width != '0px') {\n var psel = element.ownerDocument.createElement(KENDO_PSEUDO_ELEMENT);\n psel.style.cssText = getCssText(style);\n psel.textContent = evalPseudoElementContent(element, style.content);\n element.insertBefore(psel, place);\n fake.push(psel);\n }\n }\n pseudo(':before', element.firstChild);\n pseudo(':after', null);\n var saveClass = element.className;\n element.className += ' kendo-pdf-hide-pseudo-elements';\n _renderElement(element, group);\n element.className = saveClass;\n fake.forEach(function (el) {\n element.removeChild(el);\n });\n }\n function _renderElement(element, group) {\n var style = getComputedStyle(element);\n var top = getBorder(style, 'top');\n var right = getBorder(style, 'right');\n var bottom = getBorder(style, 'bottom');\n var left = getBorder(style, 'left');\n var rTL0 = getBorderRadius(style, 'top-left');\n var rTR0 = getBorderRadius(style, 'top-right');\n var rBL0 = getBorderRadius(style, 'bottom-left');\n var rBR0 = getBorderRadius(style, 'bottom-right');\n var dir = getPropertyValue(style, 'direction');\n var backgroundColor = getPropertyValue(style, 'background-color');\n backgroundColor = parseColor$1(backgroundColor);\n var backgroundImage = parseBackgroundImage(getPropertyValue(style, 'background-image'));\n var backgroundRepeat = splitProperty(getPropertyValue(style, 'background-repeat'));\n var backgroundPosition = splitProperty(getPropertyValue(style, 'background-position'));\n var backgroundOrigin = splitProperty(getPropertyValue(style, 'background-origin'));\n var backgroundSize = splitProperty(getPropertyValue(style, 'background-size'));\n if (browser.msie && browser.version < 10) {\n backgroundPosition = splitProperty(element.currentStyle.backgroundPosition);\n }\n var innerbox = innerBox(element.getBoundingClientRect(), 'border-*-width', element);\n (function () {\n var clip = getPropertyValue(style, 'clip');\n var m = /^\\s*rect\\((.*)\\)\\s*$/.exec(clip);\n if (m) {\n var a = m[1].split(/[ ,]+/g);\n var top = a[0] == 'auto' ? innerbox.top : parseFloat(a[0]) + innerbox.top;\n var right = a[1] == 'auto' ? innerbox.right : parseFloat(a[1]) + innerbox.left;\n var bottom = a[2] == 'auto' ? innerbox.bottom : parseFloat(a[2]) + innerbox.top;\n var left = a[3] == 'auto' ? innerbox.left : parseFloat(a[3]) + innerbox.left;\n var tmp = new Group();\n var clipPath = new Path().moveTo(left, top).lineTo(right, top).lineTo(right, bottom).lineTo(left, bottom).close();\n setClipping(tmp, clipPath);\n group.append(tmp);\n group = tmp;\n updateClipbox(clipPath);\n }\n }());\n var boxes, i, cells;\n var display = getPropertyValue(style, 'display');\n if (display == 'table-row') {\n boxes = [];\n for (i = 0, cells = element.children; i < cells.length; ++i) {\n boxes.push(cells[i].getBoundingClientRect());\n }\n } else {\n boxes = element.getClientRects();\n if (boxes.length == 1) {\n boxes = [element.getBoundingClientRect()];\n }\n }\n boxes = adjustBoxes(boxes);\n for (i = 0; i < boxes.length; ++i) {\n drawOneBox(boxes[i], i === 0, i == boxes.length - 1);\n }\n if (boxes.length > 0 && display == 'list-item' && !element.getAttribute('kendo-no-bullet')) {\n drawBullet(boxes[0]);\n }\n (function () {\n function clipit() {\n var clipPath = elementRoundBox(element, innerbox, 'padding');\n var tmp = new Group();\n setClipping(tmp, clipPath);\n group.append(tmp);\n group = tmp;\n updateClipbox(clipPath);\n }\n if (isFormField(element)) {\n clipit();\n } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, 'overflow'))) {\n clipit();\n } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, 'overflow-x'))) {\n clipit();\n } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, 'overflow-y'))) {\n clipit();\n }\n }());\n if (!maybeRenderWidget(element, group)) {\n renderContents(element, group);\n }\n return group;\n function adjustBoxes(boxes) {\n if (/^td$/i.test(element.tagName)) {\n var table = nodeInfo.table;\n if (table && getPropertyValue(table.style, 'border-collapse') == 'collapse') {\n var tableBorderLeft = getBorder(table.style, 'left').width;\n var tableBorderTop = getBorder(table.style, 'top').width;\n if (tableBorderLeft === 0 && tableBorderTop === 0) {\n return boxes;\n }\n var tableBox = table.element.getBoundingClientRect();\n var firstCell = table.element.rows[0].cells[0];\n var firstCellBox = firstCell.getBoundingClientRect();\n if (firstCellBox.top == tableBox.top || firstCellBox.left == tableBox.left) {\n return slice$1(boxes).map(function (box) {\n return {\n left: box.left + tableBorderLeft,\n top: box.top + tableBorderTop,\n right: box.right + tableBorderLeft,\n bottom: box.bottom + tableBorderTop,\n height: box.height,\n width: box.width\n };\n });\n }\n }\n }\n return boxes;\n }\n function drawEdge(color, len, Wtop, Wleft, Wright, rl, rr, transform$$1) {\n if (Wtop <= 0) {\n return;\n }\n var path, edge = new Group();\n setTransform(edge, transform$$1);\n group.append(edge);\n sanitizeRadius(rl);\n sanitizeRadius(rr);\n path = new Path({\n fill: { color: color },\n stroke: null\n });\n edge.append(path);\n path.moveTo(rl.x ? Math.max(rl.x, Wleft) : 0, 0).lineTo(len - (rr.x ? Math.max(rr.x, Wright) : 0), 0).lineTo(len - Math.max(rr.x, Wright), Wtop).lineTo(Math.max(rl.x, Wleft), Wtop).close();\n if (rl.x) {\n drawRoundCorner(Wleft, rl, [\n -1,\n 0,\n 0,\n 1,\n rl.x,\n 0\n ]);\n }\n if (rr.x) {\n drawRoundCorner(Wright, rr, [\n 1,\n 0,\n 0,\n 1,\n len - rr.x,\n 0\n ]);\n }\n function drawRoundCorner(Wright, r, transform$$1) {\n var angle = Math.PI / 2 * Wright / (Wright + Wtop);\n var ri = {\n x: r.x - Wright,\n y: r.y - Wtop\n };\n var path = new Path({\n fill: { color: color },\n stroke: null\n }).moveTo(0, 0);\n setTransform(path, transform$$1);\n addArcToPath(path, 0, r.y, {\n startAngle: -90,\n endAngle: -radiansToDegrees(angle),\n radiusX: r.x,\n radiusY: r.y\n });\n if (ri.x > 0 && ri.y > 0) {\n path.lineTo(ri.x * Math.cos(angle), r.y - ri.y * Math.sin(angle));\n addArcToPath(path, 0, r.y, {\n startAngle: -radiansToDegrees(angle),\n endAngle: -90,\n radiusX: ri.x,\n radiusY: ri.y,\n anticlockwise: true\n });\n } else if (ri.x > 0) {\n path.lineTo(ri.x, Wtop).lineTo(0, Wtop);\n } else {\n path.lineTo(ri.x, Wtop).lineTo(ri.x, 0);\n }\n edge.append(path.close());\n }\n }\n function drawBackground(box) {\n var background = new Group();\n setClipping(background, roundBox(box, rTL0, rTR0, rBR0, rBL0));\n group.append(background);\n if (element.tagName == 'A' && element.href && !/^#?$/.test(element.getAttribute('href'))) {\n if (!nodeInfo._avoidLinks || !matches(element, nodeInfo._avoidLinks)) {\n background._pdfLink = {\n url: element.href,\n top: box.top,\n right: box.right,\n bottom: box.bottom,\n left: box.left\n };\n }\n }\n if (backgroundColor) {\n var path = new Path({\n fill: { color: backgroundColor.toCssRgba() },\n stroke: null\n });\n path.moveTo(box.left, box.top).lineTo(box.right, box.top).lineTo(box.right, box.bottom).lineTo(box.left, box.bottom).close();\n background.append(path);\n }\n for (var i = backgroundImage.length; --i >= 0;) {\n drawOneBackground(background, box, backgroundImage[i], backgroundRepeat[i % backgroundRepeat.length], backgroundPosition[i % backgroundPosition.length], backgroundOrigin[i % backgroundOrigin.length], backgroundSize[i % backgroundSize.length]);\n }\n }\n function drawOneBackground(group, box, background, backgroundRepeat, backgroundPosition, backgroundOrigin, backgroundSize) {\n if (!background || background == 'none') {\n return;\n }\n if (background.type == 'url') {\n if (/^url\\(\\\"data:image\\/svg/i.test(background.url)) {\n return;\n }\n var img = IMAGE_CACHE[background.url];\n if (img && img.width > 0 && img.height > 0) {\n drawBackgroundImage(group, box, img.width, img.height, function (group, rect) {\n group.append(new Image$1(background.url, rect));\n });\n }\n } else if (background.type == 'linear') {\n drawBackgroundImage(group, box, box.width, box.height, gradientRenderer(background));\n } else {\n return;\n }\n function drawBackgroundImage(group, box, img_width, img_height, renderBG) {\n var aspect_ratio = img_width / img_height, f;\n var orgBox = box;\n if (backgroundOrigin == 'content-box') {\n orgBox = innerBox(orgBox, 'border-*-width', element);\n orgBox = innerBox(orgBox, 'padding-*', element);\n } else if (backgroundOrigin == 'padding-box') {\n orgBox = innerBox(orgBox, 'border-*-width', element);\n }\n if (!/^\\s*auto(\\s+auto)?\\s*$/.test(backgroundSize)) {\n if (backgroundSize == 'contain') {\n f = Math.min(orgBox.width / img_width, orgBox.height / img_height);\n img_width *= f;\n img_height *= f;\n } else if (backgroundSize == 'cover') {\n f = Math.max(orgBox.width / img_width, orgBox.height / img_height);\n img_width *= f;\n img_height *= f;\n } else {\n var size = backgroundSize.split(/\\s+/g);\n if (/%$/.test(size[0])) {\n img_width = orgBox.width * parseFloat(size[0]) / 100;\n } else {\n img_width = parseFloat(size[0]);\n }\n if (size.length == 1 || size[1] == 'auto') {\n img_height = img_width / aspect_ratio;\n } else if (/%$/.test(size[1])) {\n img_height = orgBox.height * parseFloat(size[1]) / 100;\n } else {\n img_height = parseFloat(size[1]);\n }\n }\n }\n var pos = String(backgroundPosition);\n switch (pos) {\n case 'bottom':\n pos = '50% 100%';\n break;\n case 'top':\n pos = '50% 0';\n break;\n case 'left':\n pos = '0 50%';\n break;\n case 'right':\n pos = '100% 50%';\n break;\n case 'center':\n pos = '50% 50%';\n break;\n }\n pos = pos.split(/\\s+/);\n if (pos.length == 1) {\n pos[1] = '50%';\n }\n if (/%$/.test(pos[0])) {\n pos[0] = parseFloat(pos[0]) / 100 * (orgBox.width - img_width);\n } else {\n pos[0] = parseFloat(pos[0]);\n }\n if (/%$/.test(pos[1])) {\n pos[1] = parseFloat(pos[1]) / 100 * (orgBox.height - img_height);\n } else {\n pos[1] = parseFloat(pos[1]);\n }\n var rect = new Rect([\n orgBox.left + pos[0],\n orgBox.top + pos[1]\n ], [\n img_width,\n img_height\n ]);\n function rewX() {\n while (rect.origin.x > box.left) {\n rect.origin.x -= img_width;\n }\n }\n function rewY() {\n while (rect.origin.y > box.top) {\n rect.origin.y -= img_height;\n }\n }\n function repeatX() {\n while (rect.origin.x < box.right) {\n renderBG(group, rect.clone());\n rect.origin.x += img_width;\n }\n }\n if (backgroundRepeat == 'no-repeat') {\n renderBG(group, rect);\n } else if (backgroundRepeat == 'repeat-x') {\n rewX();\n repeatX();\n } else if (backgroundRepeat == 'repeat-y') {\n rewY();\n while (rect.origin.y < box.bottom) {\n renderBG(group, rect.clone());\n rect.origin.y += img_height;\n }\n } else if (backgroundRepeat == 'repeat') {\n rewX();\n rewY();\n var origin = rect.origin.clone();\n while (rect.origin.y < box.bottom) {\n rect.origin.x = origin.x;\n repeatX();\n rect.origin.y += img_height;\n }\n }\n }\n }\n function drawBullet() {\n var listStyleType = getPropertyValue(style, 'list-style-type');\n if (listStyleType == 'none') {\n return;\n }\n var listStylePosition = getPropertyValue(style, 'list-style-position');\n function _drawBullet(f) {\n saveStyle(element, function () {\n element.style.position = 'relative';\n var bullet = element.ownerDocument.createElement(KENDO_PSEUDO_ELEMENT);\n bullet.style.position = 'absolute';\n bullet.style.boxSizing = 'border-box';\n if (listStylePosition == 'outside') {\n bullet.style.width = '6em';\n bullet.style.left = '-6.8em';\n bullet.style.textAlign = 'right';\n } else {\n bullet.style.left = '0px';\n }\n f(bullet);\n element.insertBefore(bullet, element.firstChild);\n renderElement(bullet, group);\n element.removeChild(bullet);\n });\n }\n function elementIndex(f) {\n var a = element.parentNode.children;\n var k = element.getAttribute('kendo-split-index');\n if (k != null) {\n return f(k | 0, a.length);\n }\n for (var i = 0; i < a.length; ++i) {\n if (a[i] === element) {\n return f(i, a.length);\n }\n }\n }\n switch (listStyleType) {\n case 'circle':\n case 'disc':\n case 'square':\n _drawBullet(function (bullet) {\n bullet.style.fontSize = '60%';\n bullet.style.lineHeight = '200%';\n bullet.style.paddingRight = '0.5em';\n bullet.style.fontFamily = 'DejaVu Serif';\n bullet.innerHTML = {\n 'disc': '\\u25CF',\n 'circle': '\\u25EF',\n 'square': '\\u25A0'\n }[listStyleType];\n });\n break;\n case 'decimal':\n case 'decimal-leading-zero':\n _drawBullet(function (bullet) {\n elementIndex(function (idx) {\n ++idx;\n if (listStyleType == 'decimal-leading-zero' && idx < 10) {\n idx = '0' + idx;\n }\n bullet.innerHTML = idx + '.';\n });\n });\n break;\n case 'lower-roman':\n case 'upper-roman':\n _drawBullet(function (bullet) {\n elementIndex(function (idx) {\n idx = arabicToRoman(idx + 1);\n if (listStyleType == 'upper-roman') {\n idx = idx.toUpperCase();\n }\n bullet.innerHTML = idx + '.';\n });\n });\n break;\n case 'lower-latin':\n case 'lower-alpha':\n case 'upper-latin':\n case 'upper-alpha':\n _drawBullet(function (bullet) {\n elementIndex(function (idx) {\n idx = alphaNumeral(idx);\n if (/^upper/i.test(listStyleType)) {\n idx = idx.toUpperCase();\n }\n bullet.innerHTML = idx + '.';\n });\n });\n break;\n }\n }\n function drawOneBox(box, isFirst, isLast) {\n if (box.width === 0 || box.height === 0) {\n return;\n }\n drawBackground(box);\n var shouldDrawLeft = left.width > 0 && (isFirst && dir == 'ltr' || isLast && dir == 'rtl');\n var shouldDrawRight = right.width > 0 && (isLast && dir == 'ltr' || isFirst && dir == 'rtl');\n if (top.width === 0 && left.width === 0 && right.width === 0 && bottom.width === 0) {\n return;\n }\n if (top.color == right.color && top.color == bottom.color && top.color == left.color) {\n if (top.width == right.width && top.width == bottom.width && top.width == left.width) {\n if (shouldDrawLeft && shouldDrawRight) {\n box = innerBox(box, top.width / 2);\n var path = elementRoundBox(element, box, top.width / 2);\n path.options.stroke = {\n color: top.color,\n width: top.width\n };\n group.append(path);\n return;\n }\n }\n }\n if (rTL0.x === 0 && rTR0.x === 0 && rBR0.x === 0 && rBL0.x === 0) {\n if (top.width < 2 && left.width < 2 && right.width < 2 && bottom.width < 2) {\n if (top.width > 0) {\n group.append(new Path({\n stroke: {\n width: top.width,\n color: top.color\n }\n }).moveTo(box.left, box.top + top.width / 2).lineTo(box.right, box.top + top.width / 2));\n }\n if (bottom.width > 0) {\n group.append(new Path({\n stroke: {\n width: bottom.width,\n color: bottom.color\n }\n }).moveTo(box.left, box.bottom - bottom.width / 2).lineTo(box.right, box.bottom - bottom.width / 2));\n }\n if (shouldDrawLeft) {\n group.append(new Path({\n stroke: {\n width: left.width,\n color: left.color\n }\n }).moveTo(box.left + left.width / 2, box.top).lineTo(box.left + left.width / 2, box.bottom));\n }\n if (shouldDrawRight) {\n group.append(new Path({\n stroke: {\n width: right.width,\n color: right.color\n }\n }).moveTo(box.right - right.width / 2, box.top).lineTo(box.right - right.width / 2, box.bottom));\n }\n return;\n }\n }\n var tmp = adjustBorderRadiusForBox(box, rTL0, rTR0, rBR0, rBL0);\n var rTL = tmp.tl;\n var rTR = tmp.tr;\n var rBR = tmp.br;\n var rBL = tmp.bl;\n drawEdge(top.color, box.width, top.width, left.width, right.width, rTL, rTR, [\n 1,\n 0,\n 0,\n 1,\n box.left,\n box.top\n ]);\n drawEdge(bottom.color, box.width, bottom.width, right.width, left.width, rBR, rBL, [\n -1,\n 0,\n 0,\n -1,\n box.right,\n box.bottom\n ]);\n function inv(p) {\n return {\n x: p.y,\n y: p.x\n };\n }\n drawEdge(left.color, box.height, left.width, bottom.width, top.width, inv(rBL), inv(rTL), [\n 0,\n -1,\n 1,\n 0,\n box.left,\n box.bottom\n ]);\n drawEdge(right.color, box.height, right.width, top.width, bottom.width, inv(rTR), inv(rBR), [\n 0,\n 1,\n -1,\n 0,\n box.right,\n box.top\n ]);\n }\n }\n function gradientRenderer(gradient) {\n return function (group, rect) {\n var width = rect.width(), height = rect.height();\n switch (gradient.type) {\n case 'linear':\n var angle = gradient.angle != null ? gradient.angle : Math.PI;\n switch (gradient.to) {\n case 'top':\n angle = 0;\n break;\n case 'left':\n angle = -Math.PI / 2;\n break;\n case 'bottom':\n angle = Math.PI;\n break;\n case 'right':\n angle = Math.PI / 2;\n break;\n case 'top left':\n case 'left top':\n angle = -Math.atan2(height, width);\n break;\n case 'top right':\n case 'right top':\n angle = Math.atan2(height, width);\n break;\n case 'bottom left':\n case 'left bottom':\n angle = Math.PI + Math.atan2(height, width);\n break;\n case 'bottom right':\n case 'right bottom':\n angle = Math.PI - Math.atan2(height, width);\n break;\n }\n if (gradient.reverse) {\n angle -= Math.PI;\n }\n angle %= 2 * Math.PI;\n if (angle < 0) {\n angle += 2 * Math.PI;\n }\n var pxlen = Math.abs(width * Math.sin(angle)) + Math.abs(height * Math.cos(angle));\n var scaledAngle = Math.atan(width * Math.tan(angle) / height);\n var sin = Math.sin(scaledAngle), cos = Math.cos(scaledAngle);\n var len = Math.abs(sin) + Math.abs(cos);\n var x = len / 2 * sin;\n var y = len / 2 * cos;\n if (angle > Math.PI / 2 && angle <= 3 * Math.PI / 2) {\n x = -x;\n y = -y;\n }\n var implicit = [], right = 0;\n var stops = gradient.stops.map(function (s, i) {\n var offset = s.percent;\n if (offset) {\n offset = parseFloat(offset) / 100;\n } else if (s.length) {\n offset = parseFloat(s.length) / pxlen;\n } else if (i === 0) {\n offset = 0;\n } else if (i == gradient.stops.length - 1) {\n offset = 1;\n }\n var stop = {\n color: s.color.toCssRgba(),\n offset: offset\n };\n if (offset != null) {\n right = offset;\n implicit.forEach(function (s, i) {\n var stop = s.stop;\n stop.offset = s.left + (right - s.left) * (i + 1) / (implicit.length + 1);\n });\n implicit = [];\n } else {\n implicit.push({\n left: right,\n stop: stop\n });\n }\n return stop;\n });\n var start = [\n 0.5 - x,\n 0.5 + y\n ];\n var end = [\n 0.5 + x,\n 0.5 - y\n ];\n group.append(Path.fromRect(rect).stroke(null).fill(new LinearGradient({\n start: start,\n end: end,\n stops: stops,\n userSpace: false\n })));\n break;\n case 'radial':\n if (window.console && window.console.log) {\n window.console.log('Radial gradients are not yet supported in HTML renderer');\n }\n break;\n }\n };\n }\n function maybeRenderWidget(element, group) {\n if (window.kendo && window.kendo.jQuery && element.getAttribute(window.kendo.attr('role'))) {\n var widget = window.kendo.widgetInstance(window.kendo.jQuery(element));\n if (widget && (widget.exportDOMVisual || widget.exportVisual)) {\n var visual;\n if (widget.exportDOMVisual) {\n visual = widget.exportDOMVisual();\n } else {\n visual = widget.exportVisual();\n }\n if (!visual) {\n return false;\n }\n var wrap$$1 = new Group();\n wrap$$1.children.push(visual);\n var bbox = element.getBoundingClientRect();\n wrap$$1.transform(transform().translate(bbox.left, bbox.top));\n group.append(wrap$$1);\n return true;\n }\n }\n }\n function renderImage(element, url, group) {\n var box = getContentBox(element);\n var rect = new Rect([\n box.left,\n box.top\n ], [\n box.width,\n box.height\n ]);\n var image = new Image$1(url, rect);\n setClipping(image, elementRoundBox(element, box, 'content'));\n group.append(image);\n }\n function zIndexSort(a, b) {\n var sa = getComputedStyle(a);\n var sb = getComputedStyle(b);\n var za = parseFloat(getPropertyValue(sa, 'z-index'));\n var zb = parseFloat(getPropertyValue(sb, 'z-index'));\n var pa = getPropertyValue(sa, 'position');\n var pb = getPropertyValue(sb, 'position');\n if (isNaN(za) && isNaN(zb)) {\n if (/static|absolute/.test(pa) && /static|absolute/.test(pb)) {\n return 0;\n }\n if (pa == 'static') {\n return -1;\n }\n if (pb == 'static') {\n return 1;\n }\n return 0;\n }\n if (isNaN(za)) {\n return zb === 0 ? 0 : zb > 0 ? -1 : 1;\n }\n if (isNaN(zb)) {\n return za === 0 ? 0 : za > 0 ? 1 : -1;\n }\n return parseFloat(za) - parseFloat(zb);\n }\n function isFormField(element) {\n return /^(?:textarea|select|input)$/i.test(element.tagName);\n }\n function getSelectedOption(element) {\n if (element.selectedOptions && element.selectedOptions.length > 0) {\n return element.selectedOptions[0];\n }\n return element.options[element.selectedIndex];\n }\n function renderCheckbox(element, group) {\n var style = getComputedStyle(element);\n var color = getPropertyValue(style, 'color');\n var box = element.getBoundingClientRect();\n if (element.type == 'checkbox') {\n group.append(Path.fromRect(new Rect([\n box.left + 1,\n box.top + 1\n ], [\n box.width - 2,\n box.height - 2\n ])).stroke(color, 1));\n if (element.checked) {\n group.append(new Path().stroke(color, 1.2).moveTo(box.left + 0.22 * box.width, box.top + 0.55 * box.height).lineTo(box.left + 0.45 * box.width, box.top + 0.75 * box.height).lineTo(box.left + 0.78 * box.width, box.top + 0.22 * box.width));\n }\n } else {\n group.append(new Circle(new Circle$2([\n (box.left + box.right) / 2,\n (box.top + box.bottom) / 2\n ], Math.min(box.width - 2, box.height - 2) / 2)).stroke(color, 1));\n if (element.checked) {\n group.append(new Circle(new Circle$2([\n (box.left + box.right) / 2,\n (box.top + box.bottom) / 2\n ], Math.min(box.width - 8, box.height - 8) / 2)).fill(color).stroke(null));\n }\n }\n }\n function renderFormField(element, group) {\n var tag = element.tagName.toLowerCase();\n if (tag == 'input' && (element.type == 'checkbox' || element.type == 'radio')) {\n return renderCheckbox(element, group);\n }\n var p = element.parentNode;\n var doc = element.ownerDocument;\n var el = doc.createElement(KENDO_PSEUDO_ELEMENT);\n var option;\n el.style.cssText = getCssText(getComputedStyle(element));\n if (tag == 'input') {\n el.style.whiteSpace = 'pre';\n }\n if (tag == 'select' || tag == 'textarea') {\n el.style.overflow = 'auto';\n }\n if (tag == 'select') {\n if (element.multiple) {\n for (var i = 0; i < element.options.length; ++i) {\n option = doc.createElement(KENDO_PSEUDO_ELEMENT);\n option.style.cssText = getCssText(getComputedStyle(element.options[i]));\n option.style.display = 'block';\n option.textContent = element.options[i].textContent;\n el.appendChild(option);\n }\n } else {\n option = getSelectedOption(element);\n if (option) {\n el.textContent = option.textContent;\n }\n }\n } else {\n el.textContent = element.value;\n }\n p.insertBefore(el, element);\n el.scrollLeft = element.scrollLeft;\n el.scrollTop = element.scrollTop;\n element.style.display = 'none';\n renderContents(el, group);\n element.style.display = '';\n p.removeChild(el);\n }\n function renderContents(element, group) {\n if (nodeInfo._stackingContext.element === element) {\n nodeInfo._stackingContext.group = group;\n }\n switch (element.tagName.toLowerCase()) {\n case 'img':\n renderImage(element, element.src, group);\n break;\n case 'canvas':\n try {\n renderImage(element, element.toDataURL('image/png'), group);\n } catch (ex) {\n }\n break;\n case 'textarea':\n case 'input':\n case 'select':\n renderFormField(element, group);\n break;\n default:\n var children = [], floats = [], positioned = [];\n for (var i = element.firstChild; i; i = i.nextSibling) {\n switch (i.nodeType) {\n case 3:\n if (/\\S/.test(i.data)) {\n renderText(element, i, group);\n }\n break;\n case 1:\n var style = getComputedStyle(i);\n var floating = getPropertyValue(style, 'float');\n var position = getPropertyValue(style, 'position');\n if (position != 'static') {\n positioned.push(i);\n } else if (floating != 'none') {\n floats.push(i);\n } else {\n children.push(i);\n }\n break;\n }\n }\n mergeSort(children, zIndexSort).forEach(function (el) {\n renderElement(el, group);\n });\n mergeSort(floats, zIndexSort).forEach(function (el) {\n renderElement(el, group);\n });\n mergeSort(positioned, zIndexSort).forEach(function (el) {\n renderElement(el, group);\n });\n }\n }\n function renderText(element, node, group) {\n if (emptyClipbox()) {\n return;\n }\n var style = getComputedStyle(element);\n if (parseFloat(getPropertyValue(style, 'text-indent')) < -500) {\n return;\n }\n var text = node.data;\n var start = 0;\n var end = text.search(/\\S\\s*$/) + 1;\n if (!end) {\n return;\n }\n var fontSize = getPropertyValue(style, 'font-size');\n var lineHeight = getPropertyValue(style, 'line-height');\n var font = [\n getPropertyValue(style, 'font-style'),\n getPropertyValue(style, 'font-variant'),\n getPropertyValue(style, 'font-weight'),\n fontSize,\n getPropertyValue(style, 'font-family')\n ].join(' ');\n fontSize = parseFloat(fontSize);\n lineHeight = parseFloat(lineHeight);\n if (fontSize === 0) {\n return;\n }\n var color = getPropertyValue(style, 'color');\n var range = element.ownerDocument.createRange();\n var align$$1 = getPropertyValue(style, 'text-align');\n var isJustified = align$$1 == 'justify';\n var columnCount = getPropertyValue(style, 'column-count', 1);\n var whiteSpace = getPropertyValue(style, 'white-space');\n var textOverflow, saveTextOverflow;\n if (browser.msie) {\n textOverflow = style.textOverflow;\n if (textOverflow == 'ellipsis') {\n saveTextOverflow = element.style.textOverflow;\n element.style.textOverflow = 'clip';\n }\n }\n var estimateLineLength = element.getBoundingClientRect().width / fontSize * 5;\n if (estimateLineLength === 0) {\n estimateLineLength = 500;\n }\n var prevLineBottom = null;\n var underline = nodeInfo['underline'];\n var lineThrough = nodeInfo['line-through'];\n var overline = nodeInfo['overline'];\n var hasDecoration = underline || lineThrough || overline;\n while (!doChunk()) {\n }\n if (browser.msie && textOverflow == 'ellipsis') {\n element.style.textOverflow = saveTextOverflow;\n }\n if (hasDecoration) {\n range.selectNode(node);\n slice$1(range.getClientRects()).forEach(decorate);\n }\n return;\n function actuallyGetRangeBoundingRect(range) {\n if (browser.msie || browser.chrome) {\n var rectangles = range.getClientRects(), box = {\n top: Infinity,\n right: -Infinity,\n bottom: -Infinity,\n left: Infinity\n };\n for (var i = 0; i < rectangles.length; ++i) {\n var b = rectangles[i];\n if (b.width <= 1 || b.bottom === prevLineBottom) {\n continue;\n }\n box.left = Math.min(b.left, box.left);\n box.top = Math.min(b.top, box.top);\n box.right = Math.max(b.right, box.right);\n box.bottom = Math.max(b.bottom, box.bottom);\n }\n box.width = box.right - box.left;\n box.height = box.bottom - box.top;\n return box;\n }\n return range.getBoundingClientRect();\n }\n function doChunk() {\n var origStart = start;\n var box, pos = text.substr(start).search(/\\S/);\n start += pos;\n if (pos < 0 || start >= end) {\n return true;\n }\n range.setStart(node, start);\n range.setEnd(node, start + 1);\n box = actuallyGetRangeBoundingRect(range);\n var found = false;\n if (isJustified || columnCount > 1) {\n pos = text.substr(start).search(/\\s/);\n if (pos >= 0) {\n range.setEnd(node, start + pos);\n var r = actuallyGetRangeBoundingRect(range);\n if (r.bottom == box.bottom) {\n box = r;\n found = true;\n start += pos;\n }\n }\n }\n if (!found) {\n pos = function findEOL(min, eol, max) {\n range.setEnd(node, eol);\n var r = actuallyGetRangeBoundingRect(range);\n if (r.bottom != box.bottom && min < eol) {\n return findEOL(min, min + eol >> 1, eol);\n } else if (r.right != box.right) {\n box = r;\n if (eol < max) {\n return findEOL(eol, eol + max >> 1, max);\n } else {\n return eol;\n }\n } else {\n return eol;\n }\n }(start, Math.min(end, start + estimateLineLength), end);\n if (pos == start) {\n return true;\n }\n start = pos;\n pos = range.toString().search(/\\s+$/);\n if (pos === 0) {\n return false;\n }\n if (pos > 0) {\n range.setEnd(node, range.startOffset + pos);\n box = actuallyGetRangeBoundingRect(range);\n }\n }\n if (browser.msie) {\n box = range.getClientRects()[0];\n }\n var str = range.toString();\n if (!/^(?:pre|pre-wrap)$/i.test(whiteSpace)) {\n str = str.replace(/\\s+/g, ' ');\n } else if (/\\t/.test(str)) {\n var cc = 0;\n for (pos = origStart; pos < range.startOffset; ++pos) {\n var code = text.charCodeAt(pos);\n if (code == 9) {\n cc += 8 - cc % 8;\n } else if (code == 10 || code == 13) {\n cc = 0;\n } else {\n cc++;\n }\n }\n while ((pos = str.search('\\t')) >= 0) {\n var indent = ' '.substr(0, 8 - (cc + pos) % 8);\n str = str.substr(0, pos) + indent + str.substr(pos + 1);\n }\n }\n if (!found) {\n prevLineBottom = box.bottom;\n }\n drawText(str, box);\n }\n function drawText(str, box) {\n if (browser.msie && !isNaN(lineHeight)) {\n var height = getFontHeight(font);\n var top = (box.top + box.bottom - height) / 2;\n box = {\n top: top,\n right: box.right,\n bottom: top + height,\n left: box.left,\n height: height,\n width: box.right - box.left\n };\n }\n var text = new TextRect(str, new Rect([\n box.left,\n box.top\n ], [\n box.width,\n box.height\n ]), {\n font: font,\n fill: { color: color }\n });\n group.append(text);\n }\n function decorate(box) {\n line(underline, box.bottom);\n line(lineThrough, box.bottom - box.height / 2.7);\n line(overline, box.top);\n function line(color, ypos) {\n if (color) {\n var width = fontSize / 12;\n var path = new Path({\n stroke: {\n width: width,\n color: color\n }\n });\n ypos -= width;\n path.moveTo(box.left, ypos).lineTo(box.right, ypos);\n group.append(path);\n }\n }\n }\n }\n function groupInStackingContext(element, group, zIndex) {\n var main;\n if (zIndex != 'auto') {\n main = nodeInfo._stackingContext.group;\n zIndex = parseFloat(zIndex);\n } else {\n main = group;\n zIndex = 0;\n }\n var a = main.children;\n for (var i = 0; i < a.length; ++i) {\n if (a[i]._dom_zIndex != null && a[i]._dom_zIndex > zIndex) {\n break;\n }\n }\n var tmp = new Group();\n main.insert(i, tmp);\n tmp._dom_zIndex = zIndex;\n if (main !== group) {\n if (nodeInfo._clipbox) {\n var m = nodeInfo._matrix.invert();\n var r = nodeInfo._clipbox.transformCopy(m);\n setClipping(tmp, Path.fromRect(r));\n }\n }\n return tmp;\n }\n function renderElement(element, container) {\n var style = getComputedStyle(element);\n updateCounters(style);\n if (/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(element.tagName)) {\n return;\n }\n if (nodeInfo._clipbox == null) {\n return;\n }\n var opacity = parseFloat(getPropertyValue(style, 'opacity'));\n var visibility = getPropertyValue(style, 'visibility');\n var display = getPropertyValue(style, 'display');\n if (opacity === 0 || visibility == 'hidden' || display == 'none') {\n return;\n }\n var tr = getTransform(style);\n var group;\n var zIndex = getPropertyValue(style, 'z-index');\n if ((tr || opacity < 1) && zIndex == 'auto') {\n zIndex = 0;\n }\n group = groupInStackingContext(element, container, zIndex);\n if (opacity < 1) {\n group.opacity(opacity * group.opacity());\n }\n pushNodeInfo(element, style, group);\n if (!tr) {\n _renderWithPseudoElements(element, group);\n } else {\n saveStyle(element, function () {\n pleaseSetPropertyValue(element.style, 'transform', 'none', 'important');\n pleaseSetPropertyValue(element.style, 'transition', 'none', 'important');\n if (getPropertyValue(style, 'position') == 'static') {\n pleaseSetPropertyValue(element.style, 'position', 'relative', 'important');\n }\n var bbox = element.getBoundingClientRect();\n var x = bbox.left + tr.origin[0];\n var y = bbox.top + tr.origin[1];\n var m = [\n 1,\n 0,\n 0,\n 1,\n -x,\n -y\n ];\n m = mmul(m, tr.matrix);\n m = mmul(m, [\n 1,\n 0,\n 0,\n 1,\n x,\n y\n ]);\n m = setTransform(group, m);\n nodeInfo._matrix = nodeInfo._matrix.multiplyCopy(m);\n _renderWithPseudoElements(element, group);\n });\n }\n popNodeInfo();\n }\n function mmul(a, b) {\n var a1 = a[0], b1 = a[1], c1 = a[2], d1 = a[3], e1 = a[4], f1 = a[5];\n var a2 = b[0], b2 = b[1], c2 = b[2], d2 = b[3], e2 = b[4], f2 = b[5];\n return [\n a1 * a2 + b1 * c2,\n a1 * b2 + b1 * d2,\n c1 * a2 + d1 * c2,\n c1 * b2 + d1 * d2,\n e1 * a2 + f1 * c2 + e2,\n e1 * b2 + f1 * d2 + f2\n ];\n }\n var drawing = {\n svg: svg,\n canvas: canvas,\n util: util,\n PathParser: PathParser,\n Surface: Surface,\n BaseNode: BaseNode,\n SurfaceFactory: SurfaceFactory,\n OptionsStore: OptionsStore,\n exportImage: exportImage,\n exportSVG: exportSVG,\n QuadNode: QuadNode,\n ShapesQuadTree: ShapesQuadTree,\n ObserversMixin: ObserversMixin,\n Element: Element$1,\n Circle: Circle,\n Arc: Arc,\n Path: Path,\n MultiPath: MultiPath,\n Text: Text,\n Image: Image$1,\n Group: Group,\n Layout: Layout,\n Rect: Rect$2,\n align: align,\n vAlign: vAlign,\n stack: stack,\n vStack: vStack,\n wrap: wrap,\n vWrap: vWrap,\n fit: fit,\n LinearGradient: LinearGradient,\n RadialGradient: RadialGradient,\n GradientStop: GradientStop,\n Gradient: Gradient,\n Animation: Animation,\n AnimationFactory: AnimationFactory,\n drawDOM: drawDOM\n };\n kendo.deepExtend(kendo, {\n drawing: drawing,\n geometry: geometry\n });\n kendo.drawing.Segment = kendo.geometry.Segment;\n kendo.dataviz.drawing = kendo.drawing;\n kendo.dataviz.geometry = kendo.geometry;\n kendo.drawing.util.measureText = kendo.util.measureText;\n kendo.drawing.util.objectKey = kendo.util.objectKey;\n kendo.drawing.Color = kendo.Color;\n kendo.util.encodeBase64 = kendo.drawing.util.encodeBase64;\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('drawing/surface-tooltip', [\n 'kendo.popup',\n 'drawing/kendo-drawing'\n ], f);\n}(function () {\n (function ($) {\n var NS = '.kendo';\n var kendo = window.kendo;\n var deepExtend = kendo.deepExtend;\n var utils = kendo.drawing.util;\n var defined = utils.defined;\n var limitValue = utils.limitValue;\n var eventCoordinates = utils.eventCoordinates;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n var proxy = $.proxy;\n var TOOLTIP_TEMPLATE = '
' + '
' + '
';\n var TOOLTIP_CLOSE_TEMPLATE = '';\n var SurfaceTooltip = kendo.Class.extend({\n init: function (surface, options) {\n this.element = $(TOOLTIP_TEMPLATE);\n this.content = this.element.children('.k-tooltip-content');\n options = options || {};\n this.options = deepExtend({}, this.options, this._tooltipOptions(options));\n this.popupOptions = {\n appendTo: options.appendTo,\n animation: options.animation,\n copyAnchorStyles: false,\n collision: 'fit fit'\n };\n this._openPopupHandler = $.proxy(this._openPopup, this);\n this.surface = surface;\n this._bindEvents();\n },\n options: {\n position: 'top',\n showOn: 'mouseenter',\n offset: 7,\n autoHide: true,\n hideDelay: 0,\n showAfter: 100\n },\n _bindEvents: function () {\n this._showHandler = proxy(this._showEvent, this);\n this._surfaceLeaveHandler = proxy(this._surfaceLeave, this);\n this._mouseleaveHandler = proxy(this._mouseleave, this);\n this._mousemoveHandler = proxy(this._mousemove, this);\n this.surface.bind('click', this._showHandler);\n this.surface.bind('mouseenter', this._showHandler);\n this.surface.bind('mouseleave', this._mouseleaveHandler);\n this.surface.bind('mousemove', this._mousemoveHandler);\n this.surface.element.on('mouseleave' + NS, this._surfaceLeaveHandler);\n this.element.on('click' + NS, '.k-tooltip-button', proxy(this._hideClick, this));\n },\n getPopup: function () {\n if (!this.popup) {\n this.popup = new kendo.ui.Popup(this.element, this.popupOptions);\n }\n return this.popup;\n },\n destroy: function () {\n var popup = this.popup;\n this.surface.unbind('click', this._showHandler);\n this.surface.unbind('mouseenter', this._showHandler);\n this.surface.unbind('mouseleave', this._mouseleaveHandler);\n this.surface.unbind('mousemove', this._mousemoveHandler);\n this.surface.element.off('mouseleave' + NS, this._surfaceLeaveHandler);\n this.element.off('click' + NS);\n if (popup) {\n popup.destroy();\n delete this.popup;\n }\n delete this.popupOptions;\n clearTimeout(this._timeout);\n delete this.element;\n delete this.content;\n delete this.surface;\n },\n _tooltipOptions: function (options) {\n options = options || {};\n return {\n position: options.position,\n showOn: options.showOn,\n offset: options.offset,\n autoHide: options.autoHide,\n width: options.width,\n height: options.height,\n content: options.content,\n shared: options.shared,\n hideDelay: options.hideDelay,\n showAfter: options.showAfter\n };\n },\n _tooltipShape: function (shape) {\n while (shape && !shape.options.tooltip) {\n shape = shape.parent;\n }\n return shape;\n },\n _updateContent: function (target, shape, options) {\n var content = options.content;\n if (kendo.isFunction(content)) {\n content = content({\n element: shape,\n target: target\n });\n }\n if (content) {\n this.content.html(content);\n return true;\n }\n },\n _position: function (shape, options, elementSize, event) {\n var position = options.position;\n var tooltipOffset = options.offset || 0;\n var surface = this.surface;\n var offset = surface._instance._elementOffset();\n var size = surface.getSize();\n var surfaceOffset = surface._instance._offset;\n var bbox = shape.bbox();\n var width = elementSize.width;\n var height = elementSize.height;\n var left = 0, top = 0;\n bbox.origin.translate(offset.left, offset.top);\n if (surfaceOffset) {\n bbox.origin.translate(-surfaceOffset.x, -surfaceOffset.y);\n }\n if (position == 'cursor' && event) {\n var coord = eventCoordinates(event);\n left = coord.x - width / 2;\n top = coord.y - height - tooltipOffset;\n } else if (position == 'left') {\n left = bbox.origin.x - width - tooltipOffset;\n top = bbox.center().y - height / 2;\n } else if (position == 'right') {\n left = bbox.bottomRight().x + tooltipOffset;\n top = bbox.center().y - height / 2;\n } else if (position == 'bottom') {\n left = bbox.center().x - width / 2;\n top = bbox.bottomRight().y + tooltipOffset;\n } else {\n left = bbox.center().x - width / 2;\n top = bbox.origin.y - height - tooltipOffset;\n }\n return {\n left: limitValue(left, offset.left, offset.left + size.width),\n top: limitValue(top, offset.top, offset.top + size.height)\n };\n },\n show: function (shape, options) {\n this._show(shape, shape, deepExtend({}, this.options, this._tooltipOptions(shape.options.tooltip), options));\n },\n hide: function () {\n var popup = this.popup;\n var current = this._current;\n delete this._current;\n clearTimeout(this._showTimeout);\n if (popup && popup.visible() && current && !this.surface.trigger('tooltipClose', {\n element: current.shape,\n target: current.target,\n popup: popup\n })) {\n popup.close();\n }\n },\n _hideClick: function (e) {\n e.preventDefault();\n this.hide();\n },\n _show: function (target, shape, options, event, delay) {\n var current = this._current;\n clearTimeout(this._timeout);\n if (current && (current.shape === shape && options.shared || current.target === target)) {\n return;\n }\n clearTimeout(this._showTimeout);\n var popup = this.getPopup();\n if (!this.surface.trigger('tooltipOpen', {\n element: shape,\n target: target,\n popup: popup\n }) && this._updateContent(target, shape, options)) {\n this._autoHide(options);\n var elementSize = this._measure(options);\n if (popup.visible()) {\n popup.close(true);\n }\n this._current = {\n options: options,\n elementSize: elementSize,\n shape: shape,\n target: target,\n position: this._position(options.shared ? shape : target, options, elementSize, event)\n };\n if (delay) {\n this._showTimeout = setTimeout(this._openPopupHandler, options.showAfter || 0);\n } else {\n this._openPopup();\n }\n }\n },\n _openPopup: function () {\n var current = this._current;\n var position = current.position;\n this.getPopup().open(position.left, position.top);\n },\n _autoHide: function (options) {\n if (options.autoHide && this._closeButton) {\n this.element.removeClass('k-tooltip-closable');\n this._closeButton.remove();\n delete this._closeButton;\n }\n if (!options.autoHide && !this._closeButton) {\n this.element.addClass('k-tooltip-closable');\n this._closeButton = $(TOOLTIP_CLOSE_TEMPLATE).prependTo(this.element);\n }\n },\n _showEvent: function (e) {\n var shape = this._tooltipShape(e.element);\n if (shape) {\n var options = deepExtend({}, this.options, this._tooltipOptions(shape.options.tooltip));\n if (options && options.showOn == e.type) {\n this._show(e.element, shape, options, e.originalEvent, true);\n }\n }\n },\n _measure: function (options) {\n var popup = this.getPopup();\n var width, height;\n this.element.css({\n width: 'auto',\n height: 'auto'\n });\n var visible = popup.visible();\n if (!visible) {\n popup.wrapper.show();\n }\n this.element.css({\n width: defined(options.width) ? options.width : 'auto',\n height: defined(options.height) ? options.height : 'auto'\n });\n width = outerWidth(this.element);\n height = outerHeight(this.element);\n if (!visible) {\n popup.wrapper.hide();\n }\n return {\n width: width,\n height: height\n };\n },\n _mouseleave: function (e) {\n if (this.popup && !this._popupRelatedTarget(e.originalEvent)) {\n var tooltip = this;\n var current = tooltip._current;\n if (current && current.options.autoHide) {\n tooltip._timeout = setTimeout(function () {\n clearTimeout(tooltip._showTimeout);\n tooltip.hide();\n }, current.options.hideDelay || 0);\n }\n }\n },\n _mousemove: function (e) {\n var current = this._current;\n if (current && e.element) {\n var options = current.options;\n if (options.position == 'cursor') {\n var position = this._position(e.element, options, current.elementSize, e.originalEvent);\n current.position = position;\n this.getPopup().wrapper.css({\n left: position.left,\n top: position.top\n });\n }\n }\n },\n _surfaceLeave: function (e) {\n if (this.popup && !this._popupRelatedTarget(e)) {\n clearTimeout(this._showTimeout);\n this.hide();\n }\n },\n _popupRelatedTarget: function (e) {\n return e.relatedTarget && $(e.relatedTarget).closest(this.popup.wrapper).length;\n }\n });\n kendo.drawing.SurfaceTooltip = SurfaceTooltip;\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('drawing/surface', [\n 'drawing/kendo-drawing',\n 'drawing/surface-tooltip'\n ], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo;\n var draw = kendo.drawing;\n var DrawingSurface = draw.Surface;\n var Widget = kendo.ui.Widget;\n var deepExtend = kendo.deepExtend;\n var proxy = $.proxy;\n kendo.support.svg = DrawingSurface.support.svg;\n kendo.support.canvas = DrawingSurface.support.canvas;\n var Surface = Widget.extend({\n init: function (element, options) {\n this.options = deepExtend({}, this.options, options);\n Widget.fn.init.call(this, element, this.options);\n this._instance = DrawingSurface.create(this.element[0], options);\n if (this._instance.translate) {\n this.translate = translate;\n }\n this._triggerInstanceHandler = proxy(this._triggerInstanceEvent, this);\n this._bindHandler('click');\n this._bindHandler('mouseenter');\n this._bindHandler('mouseleave');\n this._bindHandler('mousemove');\n this._enableTracking();\n },\n options: {\n name: 'Surface',\n tooltip: {}\n },\n events: [\n 'click',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'resize',\n 'tooltipOpen',\n 'tooltipClose'\n ],\n _triggerInstanceEvent: function (e) {\n this.trigger(e.type, e);\n },\n _bindHandler: function (event) {\n this._instance.bind(event, this._triggerInstanceHandler);\n },\n draw: function (element) {\n this._instance.draw(element);\n },\n clear: function () {\n if (this._instance) {\n this._instance.clear();\n }\n this.hideTooltip();\n },\n destroy: function () {\n if (this._instance) {\n this._instance.destroy();\n delete this._instance;\n }\n if (this._tooltip) {\n this._tooltip.destroy();\n delete this._tooltip;\n }\n Widget.fn.destroy.call(this);\n },\n exportVisual: function () {\n return this._instance.exportVisual();\n },\n eventTarget: function (e) {\n return this._instance.eventTarget(e);\n },\n showTooltip: function (shape, options) {\n if (this._tooltip) {\n this._tooltip.show(shape, options);\n }\n },\n hideTooltip: function () {\n if (this._tooltip) {\n this._tooltip.hide();\n }\n },\n suspendTracking: function () {\n this._instance.suspendTracking();\n this.hideTooltip();\n },\n resumeTracking: function () {\n this._instance.resumeTracking();\n },\n getSize: function () {\n return {\n width: this.element.width(),\n height: this.element.height()\n };\n },\n setSize: function (size) {\n this.element.css({\n width: size.width,\n height: size.height\n });\n this._size = size;\n this._instance.currentSize(size);\n this._resize();\n },\n _resize: function () {\n this._instance.currentSize(this._size);\n this._instance._resize();\n },\n _enableTracking: function () {\n if (kendo.ui.Popup) {\n this._tooltip = new draw.SurfaceTooltip(this, this.options.tooltip || {});\n }\n }\n });\n kendo.ui.plugin(Surface);\n Surface.create = function (element, options) {\n return new Surface(element, options);\n };\n kendo.drawing.Surface = Surface;\n function translate(offset) {\n this._instance.translate(offset);\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('drawing/html', ['drawing/kendo-drawing'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo;\n var drawing = kendo.drawing;\n var drawDOM = drawing.drawDOM;\n drawing.drawDOM = function (element, options) {\n return drawDOM($(element)[0], options);\n };\n drawing.drawDOM.drawText = drawDOM.drawText;\n drawing.drawDOM.getFontFaces = drawDOM.getFontFaces;\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.drawing', [\n 'drawing/util',\n 'drawing/kendo-drawing',\n 'drawing/surface-tooltip',\n 'drawing/surface',\n 'drawing/html'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'drawing',\n name: 'Drawing API',\n category: 'framework',\n description: 'The Kendo UI low-level drawing API',\n depends: [\n 'core',\n 'color',\n 'popup'\n ]\n };\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}