/** * Kendo UI v2017.2.504 (http://www.telerik.com/kendo-ui) * Copyright 2017 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(t,define){define("drawing/util.min",["kendo.core.min"],t)}(function(){return function(t){function e(){return t.Deferred()}function n(e){return t.when.apply(t,e)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:e,promiseAll:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/text-metrics.min",["kendo.core.min"],t)}(function(){!function(t){function e(t){var e,n=[];for(e in t)n.push(e+t[e]);return n.sort().join("")}function n(t){var e,n=2166136261;for(e=0;e>>0}function i(){return{width:0,height:0,baseline:0}}function r(t,e,n){return h.current.measure(t,e,n)}var o,s,a,h;window.kendo.util=window.kendo.util||{},o=kendo.Class.extend({init:function(t){this._size=t,this._length=0,this._map={}},put:function(t,e){var n=this._map,i={key:t,value:e};n[t]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value}}),s={baselineMarkerSize:1},"undefined"!=typeof document&&(a=document.createElement("div"),a.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;"),h=kendo.Class.extend({init:function(e){this._cache=new o(1e3),this.options=t.extend({},s,e)},measure:function(t,r,o){var s,h,l,c,u,d,f,p;if(!t)return i();if(s=e(r),h=n(t+s),l=this._cache.get(h))return l;c=i(),u=o||a,d=this._baselineMarker().cloneNode(!1);for(f in r)p=r[f],void 0!==p&&(u.style[f]=p);return u.textContent=t,u.appendChild(d),document.body.appendChild(u),(t+"").length&&(c.width=u.offsetWidth-this.options.baselineMarkerSize,c.height=u.offsetHeight,c.baseline=d.offsetTop+this.options.baselineMarkerSize),c.width>0&&c.height>0&&this._cache.put(h,c),u.parentNode.removeChild(u),c},_baselineMarker:function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t}}),h.current=new h,kendo.deepExtend(kendo.util,{LRUCache:o,TextMetrics:h,measureText:r,objectKey:e,hashKey:n})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/kendo-drawing.min",["drawing/util.min","kendo.color.min","util/text-metrics.min"],t)}(function(){!function(t){function e(t,e){return t.push.apply(t,e),t}function n(t){for(var e=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n="";t>0;)t>>6),i+=rn(128|63&n)):n<65536&&(i+=rn(224|n>>>12),i+=rn(128|n>>>6&63),i+=rn(128|63&n));return i}function a(t){for(var e,n,i,r,o,a,h,l="",c=0,u=s(t);c>2,o=(3&e)<<4|n>>4,a=(15&n)<<2|i>>6,h=63&i,isNaN(n)?a=h=64:isNaN(i)&&(h=64),l=l+nn.charAt(r)+nn.charAt(o)+nn.charAt(a)+nn.charAt(h);return l}function h(t){return i((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}function l(t){return void 0===t&&(t={}),t.touch?t.touch.initialTouch:t.target}function c(t){return""===t||null===t||"none"===t||"transparent"===t||!i(t)}function u(t){if(t)return t[t.length-1]}function d(t,e,n){return Math.max(Math.min(t,n),e)}function f(t,e){function n(t,n){for(var i=[],r=0,o=0,s=0;r=0&&u<=1&&d>=0&&d<=1)return new ln(t.x+d*r,t.y+d*s)}function B(t,e,n){var i,r=e;return t>r&&(r+=360),i=Math.abs(r-t),n||(i=360-i),i}function F(t,e,n,i,r,s){var a=m((r-t)/n,3),h=m((s-e)/i,3);return m(o(Math.atan2(h,a)))}function L(t){var e,n,i,r,o,s,a,h,l,c,u,d,f,p,g,m,v,x,y=t.x1,w=t.y1,_=t.x2,b=t.y2,C=t.rx,k=t.ry,T=t.largeArc,M=t.swipe;if(w!==b)l=_-y,c=b-w,u=kn(C,2),d=kn(k,2),f=(d*l*(y+_)+u*c*(w+b))/(2*u*c),p=f-b,g=-(l*d)/(u*c),o=1/u+kn(g,2)/d,s=2*(g*p/d-_/u),a=kn(_,2)/u+kn(p,2)/d-1,h=Math.sqrt(kn(s,2)-4*o*a),e=(-s-h)/(2*o),n=f+g*e,i=(-s+h)/(2*o),r=f+g*i;else{if(y===_)return!1;s=-2*b,a=kn((_-y)*k/(2*C),2)+kn(b,2)-kn(k,2),h=Math.sqrt(kn(s,2)-4*a),e=i=(y+_)/2,n=(-s-h)/2,r=(-s+h)/2}return m=F(e,n,C,k,y,w),v=F(e,n,C,k,_,b),x=B(m,v,M),(T&&x<=180||!T&&x>180)&&(e=i,n=r,m=F(e,n,C,k,y,w),v=F(e,n,C,k,_,b)),{center:new ln(e,n),startAngle:m,endAngle:v}}function I(t,e){for(var n=t;ne.y,r&&((0===a[o]||1===a[o])&&n.bottomRight().x>e.x||00?n.x-r:o-n.x)/(o-r)+s-n.y>=0),i?1:0}function Q(t){var e,n=t.length,i=tn,r=en;for(e=0;e1)for(r=new ln,o=t[0].bbox,s=1;sa?l.length?(h.push(l),l=[],u(),c=s):(u(),h.push(l),l=[],c=0):(u(),c+=s));return l.length&&h.push(l),h}function lt(t,e,n,i,r){var o,s,a,h,l=ht(t,e,r),c=e.origin.clone(),u=[];for(o=0;o"+r.render()+"",r.destroy(),i}function Ot(t,e){var n,i,r,o,s,a,h=e.segments;if(0!==h.length){for(n=h[0],i=n.anchor(),t.moveTo(i.x,i.y),r=1;re._zIndex?-1:0}function Nt(t,e){var n,i,r;for(n=0;n=o-b)&&(t.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(t.tagName))}function c(t){var e,i,r,s,a,h,u;for("TABLE"==t.tagName&&Dt(t,{tableLayout:"fixed"}),e=se(t),i=parseFloat(ae(e,"padding-bottom")),r=parseFloat(ae(e,"border-bottom-width")),s=b,b+=i+r,a=!0,h=t.firstChild;h;h=h.nextSibling)if(1==h.nodeType){if(a=!1,_r(h,n)){d(h);continue}if(!o){c(h);continue}if(!/^(?:static|relative)$/.test(ae(se(h),"position")))continue;u=p(h),1==u?d(h):u&&l(h)?d(h):c(h)}else 3==h.nodeType&&o&&(g(h,a),a=!1);b=s}function u(t){var e=t.parentNode,n=e.firstChild;if(t===n)return!0;if(t===e.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function d(t){var e,n,i,r,o,s,h;return 1==t.nodeType&&t!==w&&u(t)?d(t.parentNode):(e=Ht(t,"table"),n=e&&e.querySelector("colgroup"),a.repeatHeaders&&(i=e&&e.querySelector("thead"),r=Ht(t,'.k-grid[data-role="grid"]'),r&&r.querySelector(".k-auto-scrollable")&&(o=r.querySelector(".k-grid-header"))),s=f(),h=x.createRange(),h.setStartBefore(w),h.setEndBefore(t),s.appendChild(h.extractContents()),w.parentNode.insertBefore(s,w),m(t.parentNode),e&&(e=Ht(t,"table"),a.repeatHeaders&&i&&e.insertBefore(i.cloneNode(!0),e.firstChild),n&&e.insertBefore(n.cloneNode(!0),e.firstChild)),void(a.repeatHeaders&&o&&(r=Ht(t,'.k-grid[data-role="grid"]'),r.insertBefore(o.cloneNode(!0),r.firstChild))))}function f(){var t=x.createElement("KENDO-PDF-PAGE");return Dt(t,{display:"block",boxSizing:"content-box",width:r?r+"px":"auto",padding:s.top+"px "+s.right+"px "+s.bottom+"px "+s.left+"px",position:"relative",height:o?o+"px":"auto",overflow:o||r?"hidden":"visible",clear:"both"}),a&&a.pageClassName&&(t.className=a.pageClassName),y.push(t),t}function p(t){var e,n,i=t.getBoundingClientRect();return 0===i.width||0===i.height?0:(e=w.getBoundingClientRect().top,n=o-b,i.height>n?3:i.top-e>n?1:i.bottom-e>n?2:0)}function g(t,e){var n,i,r,o,s;/\S/.test(t.data)&&(n=t.data.length,i=x.createRange(),i.selectNodeContents(t),r=p(i),r&&(o=t,1==r?d(e?t.parentNode:t):(!function a(e,n,r){return i.setEnd(t,n),e==n||n==r?n:p(i)?a(e,e+n>>1,n):a(n,n+r>>1,r)}(0,n>>1,n),!/\S/.test(""+i)&&e?d(t.parentNode):(o=t.splitText(i.endOffset),s=f(),i.setStartBefore(w),s.appendChild(i.extractContents()),w.parentNode.insertBefore(s,w),m(o.parentNode))),g(o)))}function m(t){var e=Ht(t,"li");e&&(e.setAttribute("kendo-no-bullet","1"),m(e.parentNode))}var v=i(a.template),x=e.ownerDocument,y=[],w=a._destructive?e:br(e),_=x.createElement("KENDO-PDF-DOCUMENT"),b=0;Ft(w.querySelectorAll("tfoot")).forEach(function(t){t.parentNode.appendChild(t)}),Ft(w.querySelectorAll("ol")).forEach(function(t){Ft(t.children).forEach(function(t,e){t.setAttribute("kendo-split-index",e)})}),Dt(_,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),r&&(Dt(_,{width:r+"px",paddingLeft:s.left+"px",paddingRight:s.right+"px"}),Dt(w,{overflow:"hidden"})),e.parentNode.insertBefore(_,e),_.appendChild(w),a.beforePageBreak?setTimeout(function(){a.beforePageBreak(_,h)},15):setTimeout(h,15)}var o,s;if(e||(e={}),o=Ue(),!t)return o.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw 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+.");return kendo.pdf.defineFont(Gt(t.ownerDocument)),s=jt(e.scale||1),Zt(t,function(){var i,a=e&&e.forcePageBreak,h=e&&e.paperSize&&"auto"!=e.paperSize,l=kendo.pdf.getPaperOptions(function(t,n){return"paperSize"==t?h?e[t]:"A4":t in e?e[t]:n}),c=h&&l.paperSize[0],u=h&&l.paperSize[1],d=e.margin&&l.margin,f=!!d;a||u?(d||(d={left:0,top:0,right:0,bottom:0}),c&&(c/=s.x),u&&(u/=s.y),d.left/=s.x,d.right/=s.x,d.top/=s.y,d.bottom/=s.y,i=new Xn({pdf:{multiPage:!0,paperSize:h?l.paperSize:"auto",_ignoreMargin:f}}),r(function(t){if(e.progress){var r=!1,s=0;!function a(){if(s0&&r(t,h,l,c,u[0])}}function r(t,e,n,i,r){/^data:/i.test(r)||/^[^\/:]+:\/\//.test(r)||/^\//.test(r)||(r=(t.href+"").replace(/[^\/]*$/,"")+r),e.forEach(function(t){t=t.replace(/^(['"]?)(.*?)\1$/,"$2"),n&&(t+="|bold"),i&&(t+="|italic"),o[t]=r})}var o,s;for(null==t&&(t=document),o={},s=0;s0);return n}function ee(t,e,n){var i,r;yr=Object.create(yr),yr[t.tagName.toLowerCase()]={element:t,style:e},i=ae(e,"text-decoration"),i&&"none"!=i&&(r=ae(e,"color"),i.split(/\s+/g).forEach(function(t){yr[t]||(yr[t]=r)})),oe(e)&&(yr._stackingContext={element:t,group:n})}function ne(){yr=Object.getPrototypeOf(yr)}function ie(t){if(null!=yr._clipbox){var e=t.bbox(yr._matrix);yr._clipbox=yr._clipbox?un.intersect(yr._clipbox,e):e}}function re(){var t=yr._clipbox;return null==t||(t?0===t.width()||0===t.height():void 0)}function oe(t){function e(e){return ae(t,e)}if("none"!=e("transform")||"static"!=e("position")||"auto"!=e("z-index")||e("opacity")<1)return!0}function se(t,e){return window.getComputedStyle(t,e||null)}function ae(t,e,n){var i=t.getPropertyValue(e);return null!=i&&""!==i||(mr.webkit?i=t.getPropertyValue("-webkit-"+e):mr.mozilla?i=t.getPropertyValue("-moz-"+e):mr.opera?i=t.getPropertyValue("-o-"+e):mr.msie&&(i=t.getPropertyValue("-ms-"+e))),arguments.length>2&&(null==i||""===i)?n:i}function he(t,e,n,i){t.setProperty(e,n,i),mr.webkit?t.setProperty("-webkit-"+e,n,i):mr.mozilla?t.setProperty("-moz-"+e,n,i):mr.opera?t.setProperty("-o-"+e,n,i):mr.msie&&(t.setProperty("-ms-"+e,n,i),e="ms"+e.replace(/(^|-)([a-z])/g,function(t,e,n){return e+n.toUpperCase()}),t[e]=n)}function le(t,e){return e="border-"+e,{width:parseFloat(ae(t,e+"-width")),style:ae(t,e+"-style"),color:Jt(ae(t,e+"-color"),!0)}}function ce(t,e){var n=t.style.cssText,i=e();return t.style.cssText=n,i}function ue(t,e){var n=ae(t,"border-"+e+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),we({x:n[0],y:n[1]})}function de(t){var e=t.getBoundingClientRect();return e=fe(e,"border-*-width",t),e=fe(e,"padding-*",t)}function fe(t,e,n){var i,r,o,s,a;return"string"==typeof e?(i=se(n),r=parseFloat(ae(i,e.replace("*","top"))),o=parseFloat(ae(i,e.replace("*","right"))),s=parseFloat(ae(i,e.replace("*","bottom"))),a=parseFloat(ae(i,e.replace("*","left")))):"number"==typeof e&&(r=o=s=a=e),{top:t.top+r,right:t.right-o,bottom:t.bottom-s,left:t.left+a,width:t.right-t.left-o-a,height:t.bottom-t.top-s-r}}function pe(t){var e,n,i=ae(t,"transform");return"none"==i?null:(e=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),e?(n=ae(t,"transform-origin"),e=e[1].split(/\s*,\s*/g).map(parseFloat),n=n.split(/\s+/g).map(parseFloat),{matrix:e,origin:n}):void 0)}function ge(t){return 180*t/Math.PI%360}function me(t){var e=parseFloat(t);return/grad$/.test(t)?Math.PI*e/200:/rad$/.test(t)?e:/turn$/.test(t)?Math.PI*e*2:/deg$/.test(t)?Math.PI*e/180:void 0}function ve(t,e){return e=new hn(e[0],e[1],e[2],e[3],e[4],e[5]),t.transform(e),e}function xe(t,e){t.clip(e)}function ye(t,e,n,i){for(var r=new Tn([e,n],i).curvePoints(),o=1;o0&&s.y>0?(a.lineTo(s.x*Math.cos(o),n.y-s.y*Math.sin(o)),ye(a,0,n.y,{startAngle:-ge(o),endAngle:-90,radiusX:s.x,radiusY:s.y,anticlockwise:!0})):s.x>0?a.lineTo(s.x,i).lineTo(0,i):a.lineTo(s.x,i).lineTo(s.x,0),u.append(a.close())}if(!(i<=0)){var c,u=new Xn;ve(u,h),e.append(u),we(s),we(a),c=new Fn({fill:{color:t},stroke:null}),u.append(c),c.moveTo(s.x?Math.max(s.x,r):0,0).lineTo(n-(a.x?Math.max(a.x,o):0),0).lineTo(n-Math.max(a.x,o),i).lineTo(Math.max(s.x,r),i).close(),s.x&&l(r,s,[-1,0,0,1,s.x,0]),a.x&&l(o,a,[1,0,0,1,n-a.x,0])}}function o(n){var i,r,o=new Xn;for(xe(o,Ce(n,k,T,S,M)),e.append(o),"A"==t.tagName&&t.href&&!/^#?$/.test(t.getAttribute("href"))&&(yr._avoidLinks&&_r(t,yr._avoidLinks)||(o._pdfLink={url:t.href,top:n.top,right:n.right,bottom:n.bottom,left:n.left})),A&&(i=new Fn({fill:{color:A.toCssRgba()},stroke:null}),i.moveTo(n.left,n.top).lineTo(n.right,n.top).lineTo(n.right,n.bottom).lineTo(n.left,n.bottom).close(),o.append(i)),r=l.length;--r>=0;)s(o,n,l[r],c[r%c.length],u[r%u.length],d[r%d.length],f[r%f.length])}function s(e,n,i,r,o,s,a){function h(e,n,i,h,l){function c(){for(;m.origin.x>n.left;)m.origin.x-=i}function u(){for(;m.origin.y>n.top;)m.origin.y-=h}function d(){for(;m.origin.x0&&l.height>0&&h(e,n,l.width,l.height,function(t,e){t.append(new Gn(i.url,e))})}else{if("linear"!=i.type)return;h(e,n,n.width,n.height,Ae(i))}}function a(){function i(n){ ce(t,function(){t.style.position="relative";var i=t.ownerDocument.createElement(vr);i.style.position="absolute",i.style.boxSizing="border-box","outside"==o?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",n(i),t.insertBefore(i,t.firstChild),He(i,e),t.removeChild(i)})}function r(e){var n,i=t.parentNode.children,r=t.getAttribute("kendo-split-index");if(null!=r)return e(0|r,i.length);for(n=0;n0&&(i&&"ltr"==E||s&&"rtl"==E),l=_.width>0&&(s&&"ltr"==E||i&&"rtl"==E),0!==w.width||0!==C.width||0!==_.width||0!==b.width)){if(w.color==_.color&&w.color==b.color&&w.color==C.color&&w.width==_.width&&w.width==b.width&&w.width==C.width&&h&&l)return n=fe(n,w.width/2),c=be(t,n,w.width/2),c.options.stroke={color:w.color,width:w.width},void e.append(c);if(0===k.x&&0===T.x&&0===S.x&&0===M.x&&w.width<2&&C.width<2&&_.width<2&&b.width<2)return w.width>0&&e.append(new Fn({stroke:{width:w.width,color:w.color}}).moveTo(n.left,n.top+w.width/2).lineTo(n.right,n.top+w.width/2)),b.width>0&&e.append(new Fn({stroke:{width:b.width,color:b.color}}).moveTo(n.left,n.bottom-b.width/2).lineTo(n.right,n.bottom-b.width/2)),h&&e.append(new Fn({stroke:{width:C.width,color:C.color}}).moveTo(n.left+C.width/2,n.top).lineTo(n.left+C.width/2,n.bottom)),void(l&&e.append(new Fn({stroke:{width:_.width,color:_.color}}).moveTo(n.right-_.width/2,n.top).lineTo(n.right-_.width/2,n.bottom)));u=_e(n,k,T,S,M),d=u.tl,f=u.tr,p=u.br,g=u.bl,r(w.color,n.width,w.width,C.width,_.width,d,f,[1,0,0,1,n.left,n.top]),r(b.color,n.width,b.width,_.width,C.width,p,g,[-1,0,0,-1,n.right,n.bottom]),r(C.color,n.height,C.width,b.width,w.width,a(g),a(d),[0,-1,1,0,n.left,n.bottom]),r(_.color,n.height,_.width,w.width,b.width,a(f),a(p),[0,1,-1,0,n.right,n.top])}}var l,c,u,d,f,p,g,m,v,x,y=se(t),w=le(y,"top"),_=le(y,"right"),b=le(y,"bottom"),C=le(y,"left"),k=ue(y,"top-left"),T=ue(y,"top-right"),M=ue(y,"bottom-left"),S=ue(y,"bottom-right"),E=ae(y,"direction"),A=ae(y,"background-color");if(A=Jt(A),l=Cr(ae(y,"background-image")),c=kr(ae(y,"background-repeat")),u=kr(ae(y,"background-position")),d=kr(ae(y,"background-origin")),f=kr(ae(y,"background-size")),mr.msie&&mr.version<10&&(u=kr(t.currentStyle.backgroundPosition)),p=fe(t.getBoundingClientRect(),"border-*-width",t),function(){var t,n,i,r,o,s,a,h=ae(y,"clip"),l=/^\s*rect\((.*)\)\s*$/.exec(h);l&&(t=l[1].split(/[ ,]+/g),n="auto"==t[0]?p.top:parseFloat(t[0])+p.top,i="auto"==t[1]?p.right:parseFloat(t[1])+p.left,r="auto"==t[2]?p.bottom:parseFloat(t[2])+p.top,o="auto"==t[3]?p.left:parseFloat(t[3])+p.left,s=new Xn,a=(new Fn).moveTo(o,n).lineTo(i,n).lineTo(i,r).lineTo(o,r).close(),xe(s,a),e.append(s),e=s,ie(a))}(),x=ae(y,"display"),"table-row"==x)for(g=[],m=0,v=t.children;m0&&"list-item"==x&&!t.getAttribute("kendo-no-bullet")&&a(g[0]),function(){function n(){var n=be(t,p,"padding"),i=new Xn;xe(i,n),e.append(i),e=i,ie(n)}Ne(t)?n():/^(hidden|auto|scroll)/.test(ae(y,"overflow"))?n():/^(hidden|auto|scroll)/.test(ae(y,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(ae(y,"overflow-y"))&&n()}(),Pe(t,e)||Le(t,e),e}function Ae(t){return function(e,n){var i,r,o,s,a,h,l,c,u,d,f,p,g,m=n.width(),v=n.height();switch(t.type){case"linear":switch(i=null!=t.angle?t.angle:Math.PI,t.to){case"top":i=0;break;case"left":i=-Math.PI/2;break;case"bottom":i=Math.PI;break;case"right":i=Math.PI/2;break;case"top left":case"left top":i=-Math.atan2(v,m);break;case"top right":case"right top":i=Math.atan2(v,m);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,m);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,m)}t.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),r=Math.abs(m*Math.sin(i))+Math.abs(v*Math.cos(i)),o=Math.atan(m*Math.tan(i)/v),s=Math.sin(o),a=Math.cos(o),h=Math.abs(s)+Math.abs(a),l=h/2*s,c=h/2*a,i>Math.PI/2&&i<=3*Math.PI/2&&(l=-l,c=-c),u=[],d=0,f=t.stops.map(function(e,n){var i,o=e.percent;return o?o=parseFloat(o)/100:e.length?o=parseFloat(e.length)/r:0===n?o=0:n==t.stops.length-1&&(o=1),i={color:e.color.toCssRgba(),offset:o},null!=o?(d=o,u.forEach(function(t,e){var n=t.stop;n.offset=t.left+(d-t.left)*(e+1)/(u.length+1)}),u=[]):u.push({left:d,stop:i}),i}),p=[.5-l,.5+c],g=[.5+l,.5-c],e.append(Fn.fromRect(n).stroke(null).fill(new Kn({start:p,end:g,stops:f,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function Pe(t,e){var n,i,r,o;if(window.kendo&&window.kendo.jQuery&&t.getAttribute(window.kendo.attr("role"))&&(n=window.kendo.widgetInstance(window.kendo.jQuery(t)),n&&(n.exportDOMVisual||n.exportVisual)))return!!(i=n.exportDOMVisual?n.exportDOMVisual():n.exportVisual())&&(r=new Xn,r.children.push(i),o=t.getBoundingClientRect(),r.transform(E().translate(o.left,o.top)),e.append(r),!0)}function Oe(t,e,n){var i=de(t),r=new un([i.left,i.top],[i.width,i.height]),o=new Gn(e,r);xe(o,be(t,i,"content")),n.append(o)}function ze(t,e){var n=se(t),i=se(e),r=parseFloat(ae(n,"z-index")),o=parseFloat(ae(i,"z-index")),s=ae(n,"position"),a=ae(i,"position");return isNaN(r)&&isNaN(o)?/static|absolute/.test(s)&&/static|absolute/.test(a)?0:"static"==s?-1:"static"==a?1:0:isNaN(r)?0===o?0:o>0?-1:1:isNaN(o)?0===r?0:r>0?1:-1:parseFloat(r)-parseFloat(o)}function Ne(t){return/^(?:textarea|select|input)$/i.test(t.tagName)}function Re(t){return t.selectedOptions&&t.selectedOptions.length>0?t.selectedOptions[0]:t.options[t.selectedIndex]}function Be(t,e){var n=se(t),i=ae(n,"color"),r=t.getBoundingClientRect();"checkbox"==t.type?(e.append(Fn.fromRect(new un([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(i,1)),t.checked&&e.append((new Fn).stroke(i,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(e.append(new _n(new gn([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-2,r.height-2)/2)).stroke(i,1)),t.checked&&e.append(new _n(new gn([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-8,r.height-8)/2)).fill(i).stroke(null)))}function Fe(t,e){var n,i,r,o,s,a=t.tagName.toLowerCase();if("input"==a&&("checkbox"==t.type||"radio"==t.type))return Be(t,e);if(n=t.parentNode,i=t.ownerDocument,r=i.createElement(vr),r.style.cssText=Me(se(t)),"input"==a&&(r.style.whiteSpace="pre"),"select"!=a&&"textarea"!=a||(r.style.overflow="auto"),"select"==a)if(t.multiple)for(s=0;s=c)return!0;if(g.setStart(e,l),g.setEnd(e,l+1),t=i(g),n=!1,(v||x>1)&&(p=h.substr(l).search(/\s/),p>=0&&(g.setEnd(e,l+p),r=i(g),r.bottom==t.bottom&&(t=r,n=!0,l+=p))),!n){if(p=function m(n,r,o){g.setEnd(e,r);var s=i(g);return s.bottom!=t.bottom&&n>1,r):s.right!=t.right?(t=s,r>1,o):r):r}(l,Math.min(c,l+b),c),p==l)return!0;if(l=p,p=(""+g).search(/\s+$/),0===p)return!1;p>0&&(g.setEnd(e,g.startOffset+p),t=i(g))}if(mr.msie&&(t=g.getClientRects()[0]),s=""+g,/^(?:pre|pre-wrap)$/i.test(y)){if(/\t/.test(s)){for(a=0,p=f;p=0;)d=" ".substr(0,8-(a+p)%8),s=s.substr(0,p)+d+s.substr(p+1)}}else s=s.replace(/\s+/g," ");n||(C=t.bottom),o(s,t)}function o(t,e){var i,r,o;mr.msie&&!isNaN(d)&&(i=Mr(f),r=(e.top+e.bottom-i)/2,e={top:r,right:e.right,bottom:r+i,left:e.left,height:i,width:e.right-e.left}),o=new wr(t,new un([e.left,e.top],[e.width,e.height]),{font:f,fill:{color:p}}),n.append(o)}function s(t){function e(e,i){var r,o;e&&(r=u/12,o=new Fn({stroke:{width:r,color:e}}),i-=r,o.moveTo(t.left,i).lineTo(t.right,i),n.append(o))}e(k,t.bottom),e(T,t.bottom-t.height/2.7),e(M,t.top)}var a,h,l,c,u,d,f,p,g,m,v,x,y,w,_,b,C,k,T,M,S;if(!re()&&(a=se(t),!(parseFloat(ae(a,"text-indent"))<-500)&&(h=e.data,l=0,c=h.search(/\S\s*$/)+1,c&&(u=ae(a,"font-size"),d=ae(a,"line-height"),f=[ae(a,"font-style"),ae(a,"font-variant"),ae(a,"font-weight"),u,ae(a,"font-family")].join(" "),u=parseFloat(u),d=parseFloat(d),0!==u)))){for(p=ae(a,"color"),g=t.ownerDocument.createRange(),m=ae(a,"text-align"),v="justify"==m,x=ae(a,"column-count",1),y=ae(a,"white-space"),mr.msie&&(w=a.textOverflow,"ellipsis"==w&&(_=t.style.textOverflow,t.style.textOverflow="clip")),b=t.getBoundingClientRect().width/u*5,0===b&&(b=500),C=null,k=yr.underline,T=yr["line-through"],M=yr.overline,S=k||T||M;!r(););mr.msie&&"ellipsis"==w&&(t.style.textOverflow=_),S&&(g.selectNode(e),Ft(g.getClientRects()).forEach(s))}}function De(t,e,n){var i,r,o,s,a,h;for("auto"!=n?(i=yr._stackingContext.group,n=parseFloat(n)):(i=e,n=0),r=i.children,o=0;on);++o);return s=new Xn,i.insert(o,s),s._dom_zIndex=n,i!==e&&yr._clipbox&&(a=yr._matrix.invert(),h=yr._clipbox.transformCopy(a),xe(s,Fn.fromRect(h))),s}function He(t,e){var n,i,r,o,s,a,h=se(t);Qt(h),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(t.tagName)||null!=yr._clipbox&&(n=parseFloat(ae(h,"opacity")),i=ae(h,"visibility"),r=ae(h,"display"),0!==n&&"hidden"!=i&&"none"!=r&&(o=pe(h),a=ae(h,"z-index"),(o||n<1)&&"auto"==a&&(a=0),s=De(t,e,a),n<1&&s.opacity(n*s.opacity()),ee(t,h,s),o?ce(t,function(){var e,n,i,r;he(t.style,"transform","none","important"),he(t.style,"transition","none","important"),"static"==ae(h,"position")&&he(t.style,"position","relative","important"),e=t.getBoundingClientRect(),n=e.left+o.origin[0],i=e.top+o.origin[1],r=[1,0,0,1,-n,-i],r=je(r,o.matrix),r=je(r,[1,0,0,1,n,i]),r=ve(s,r),yr._matrix=yr._matrix.multiplyCopy(r),Se(t,s)}):Se(t,s),ne()))}function je(t,e){var n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],h=e[0],l=e[1],c=e[2],u=e[3],d=e[4],f=e[5];return[n*h+i*c,n*l+i*u,r*h+o*c,r*l+o*u,s*h+a*c+d,s*l+a*u+f]}var qe,Ge,$e,Xe,Ye,Ue,Ve,We,Qe,Je,Ke,Ze,tn,en,nn,rn,on,sn,an,hn,ln,cn,un,dn,fn,pn,gn,mn,vn,xn,yn,wn,_n,bn,Cn,kn,Tn,Mn,Sn,En,An,Pn,On,zn,Nn,Rn,Bn,Fn,Ln,In,Dn,Hn,jn,qn,Gn,$n,Xn,Yn,Un,Vn,Wn,Qn,Jn,Kn,Zn,ti,ei,ni,ii,ri,oi,si,ai,hi,li,ci,ui,di,fi,pi,gi,mi,vi,xi,yi,wi,_i,bi,Ci,ki,Ti,Mi,Si,Ei,Ai,Pi,Oi,zi,Ni,Ri,Bi,Fi,Li,Ii,Di,Hi,ji,qi,Gi,$i,Xi,Yi,Ui,Vi,Wi,Qi,Ji,Ki,Zi,tr,er,nr,ir,rr,or,sr,ar,hr,lr,cr,ur,dr,fr,pr,gr,mr,vr,xr,yr,wr,_r,br,Cr,kr,Tr,Mr,Sr;window.kendo=window.kendo||{},qe=kendo.drawing,Ge=qe.util,$e=kendo.Class,Xe=kendo.util,Ye=kendo.support,Ue=Ge.createPromise,Ve=Ge.promiseAll,We={extend:function(t){var e,n=this;for(e in this)"extend"!==e&&(t[e]=n[e])},observers:function(){return this._observers=this._observers||[]},addObserver:function(t){return this._observers?this._observers.push(t):this._observers=[t],this},removeObserver:function(t){var e=this.observers(),n=e.indexOf(t);return n!==-1&&e.splice(n,1),this},trigger:function(t,e){var n,i,r=this._observers;if(r&&!this._suspended)for(n=0;n=0,a=this,h=t;if(s){for(n=h.split("."),i=this.prefix;n.length>1;)h=n.shift(),i+=h+".",r=a[h],r||(r=new an({},i),r.addObserver(o),a[h]=r),a=r;h=n[0]}a._clear(h),a[h]=e},_clear:function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},_wrap:function(t,e){var n=sn.call(t),r=t;return null!==r&&i(r)&&"[object Object]"===n&&(t instanceof an||t instanceof $e||(r=new an(r,this.prefix+e+".")),r.addObserver(this)),r}}),We.extend(an.prototype),hn=$e.extend({init:function(t,e,n,i,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0),this.a=t,this.b=e,this.c=n,this.d=i,this.e=r,this.f=o},multiplyCopy:function(t){return new hn(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},invert:function(){var t=this,e=t.a,n=t.b,i=t.c,r=t.d,o=t.e,s=t.f,a=e*r-n*i;return 0===a?null:new hn(r/a,-n/a,-i/a,e/a,(i*s-r*o)/a,(n*o-e*s)/a)},clone:function(){return new hn(this.a,this.b,this.c,this.d,this.e,this.f)},equals:function(t){return!!t&&(this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f)},round:function(t){return this.a=m(this.a,t),this.b=m(this.b,t),this.c=m(this.c,t),this.d=m(this.d,t),this.e=m(this.e,t),this.f=m(this.f,t),this},toArray:function(t){var e,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(i(t))for(e=0;e0&&!c(t.color)},_clippedBBox:function(t){return this.bbox(t)}}),fn.prototype.nodeType="Element",We.extend(fn.prototype),pn=Math.PI/2,gn=$e.extend({init:function(t,e){void 0===t&&(t=new ln),void 0===e&&(e=0),this.setCenter(t),this.setRadius(e)},setCenter:function(t){return this._observerField("center",ln.create(t)),this.geometryChange(),this},getCenter:function(){return this.center},equals:function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},clone:function(){return new gn(this.center.clone(),this.radius)},pointAt:function(t){return this._pointAt(p(t))},bbox:function(t){var e,n,i,r,o=this,s=A(this.center,this.radius,this.radius,t),a=ln.maxPoint(),h=ln.minPoint();for(e=0;e<4;e++)n=o._pointAt(s.x+e*pn).transformCopy(t),i=o._pointAt(s.y+e*pn).transformCopy(t),r=new ln(n.x,i.y),a=ln.min(a,r),h=ln.max(h,r);return un.fromPoints(a,h)},_pointAt:function(t){var e=this,n=e.center,i=e.radius;return new ln(n.x+i*Math.cos(t),n.y+i*Math.sin(t))},containsPoint:function(t){var e=this,n=e.center,i=e.radius,r=Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)<=Math.pow(i,2);return r},_isOnPath:function(t,e){var n=this,i=n.center,r=n.radius,o=i.distanceTo(t);return r-e<=o&&o<=r+e}}),M(gn.prototype,["radius"]),We.extend(gn.prototype),mn="Gradient",vn={extend:function(t){t.fill=this.fill,t.stroke=this.stroke},fill:function(t,e){var n,r=this.options;return i(t)?(t&&t.nodeType!==mn?(n={color:t},i(e)&&(n.opacity=e),r.set("fill",n)):r.set("fill",t),this):r.get("fill")},stroke:function(t,e,n){return i(t)?(this.options.set("stroke.color",t),i(e)&&this.options.set("stroke.width",e),i(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")}},xn=""+hn.IDENTITY,yn={extend:function(t){t.bbox=this.bbox,t.geometryChange=this.geometryChange},bbox:function(t){var e,n,i=S(this.currentTransform(t)),r=i?""+i:xn;return this._bboxCache&&this._matrixHash===r?e=this._bboxCache.clone():(e=this._bbox(i),this._bboxCache=e?e.clone():null,this._matrixHash=r),n=this.options.get("stroke.width"),n&&e&&e.expand(n/2),e},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},wn="#000",_n=fn.extend({init:function(t,e){void 0===t&&(t=new gn),void 0===e&&(e={}),fn.fn.init.call(this,e),this.geometry(t),i(this.options.stroke)||this.stroke(wn)},rawBBox:function(){return this._geometry.bbox()},_bbox:function(t){return this._geometry.bbox(t)},_containsPoint:function(t){return this.geometry().containsPoint(t)},_isOnPath:function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)}}),_n.prototype.nodeType="Circle",vn.extend(_n.prototype),yn.extend(_n.prototype),O(_n.prototype,["geometry"]),bn=10,Cn=45,kn=Math.pow,Tn=$e.extend({init:function(t,e){void 0===t&&(t=new ln),void 0===e&&(e={}),this.setCenter(t),this.radiusX=e.radiusX,this.radiusY=e.radiusY||e.radiusX,this.startAngle=e.startAngle,this.endAngle=e.endAngle,this.anticlockwise=e.anticlockwise||!1},clone:function(){return new Tn(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(t){return this._observerField("center",ln.create(t)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(t){var e=this.center,n=p(t);return new ln(e.x+this.radiusX*Math.cos(n),e.y+this.radiusY*Math.sin(n))},curvePoints:function(){var t,e,n,i=this,r=this.startAngle,o=this.anticlockwise?-1:1,s=[this.pointAt(r)],a=this._arcInterval(),h=a.endAngle-a.startAngle,l=Math.ceil(h/Cn),c=h/l,u=r;for(t=1;t<=l;t++)e=u+o*c,n=i._intervalCurvePoints(u,e),s.push(n.cp1,n.cp2,n.p2),u=e;return s},bbox:function(t){for(var e,n,i=this,r=this._arcInterval(),s=r.startAngle,a=r.endAngle,h=A(this.center,this.radiusX,this.radiusY,t),l=o(h.x),c=o(h.y),u=this.pointAt(a).transformCopy(t),d=I(l,s),f=I(c,s),p=this.pointAt(s).transformCopy(t),g=ln.min(p,u),m=ln.max(p,u);di||r&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(t,e){var n=this.pointAt(t),i=this.pointAt(e),r=this._derivativeAt(t),o=this._derivativeAt(e),s=(p(e)-p(t))/3,a=new ln(n.x+s*r.x,n.y+s*r.y),h=new ln(i.x-s*o.x,i.y-s*o.y);return{p1:n,cp1:a,cp2:h,p2:i}},_derivativeAt:function(t){var e=p(t);return new ln(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},containsPoint:function(t){var e,n,i,r=this._arcInterval(),o=r.endAngle-r.startAngle,s=this,a=s.center,h=s.radiusX,l=s.radiusY,c=a.distanceTo(t),u=Math.atan2(t.y-a.y,t.x-a.x),d=h*l/Math.sqrt(kn(h,2)*kn(Math.sin(u),2)+kn(l,2)*kn(Math.cos(u),2)),f=this.pointAt(this.startAngle).round(bn),p=this.pointAt(this.endAngle).round(bn),g=R(a,t.round(bn),f,p);return o<180?e=g&&N(a.distanceTo(g),c)&&N(c,d):(n=F(a.x,a.y,h,l,t.x,t.y),360!==n&&(n=(360+n)%360),i=r.startAngle<=n&&n<=r.endAngle,e=i&&N(c,d)||!i&&(!g||g.equals(t))),e},_isOnPath:function(t,e){var n,i=this._arcInterval(),r=this.center,o=F(r.x,r.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==o&&(o=(360+o)%360),n=i.startAngle<=o&&o<=i.endAngle,n&&this.pointAt(o).distanceTo(t)<=e}}),Tn.fromPoints=function(t,e,n,i,r,o){var s=L({x1:t.x,y1:t.y,x2:e.x,y2:e.y,rx:n,ry:i,largeArc:r,swipe:o});return new Tn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:n,radiusY:i,anticlockwise:0===o})},M(Tn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),We.extend(Tn.prototype),Mn=[].push,Sn=[].pop,En=[].splice,An=[].shift,Pn=[].slice,On=[].unshift,zn=$e.extend({init:function(t){void 0===t&&(t=[]),this.length=0,this._splice(0,t.length,t)},elements:function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},push:function(){var t=arguments,e=Mn.apply(this,t);return this._add(t),e},slice:function(){return Pn.call(this)},pop:function(){var t=this.length,e=Sn.apply(this);return t&&this._remove([e]),e},splice:function(t,e){var n=Pn.call(arguments,2),i=this._splice(t,e,n);return this._change(),i},shift:function(){var t=this.length,e=An.apply(this);return t&&this._remove([e]),e},unshift:function(){var t=arguments,e=On.apply(this,t);return this._add(t),e},indexOf:function(t){var e,n=this,i=this.length;for(e=0;e1)&&(r=0),o=Math.min(Math.max(c,u),1),(o>1||o<0)&&(o=1),{min:r,max:o}},_intersectionsTo:function(t,e){var n;return n=this.controlOut()&&t.controlIn()?V([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):W(this.anchor(),t.anchor(),e)},_isOnCurveTo:function(t,e,n,i){var r,o,s,a,h,l,c,u=this.bboxTo(t).expand(n,n);if(u.containsPoint(e))return r=this.anchor(),o=this.controlOut(),s=t.controlIn(),a=t.anchor(),"start"===i&&r.distanceTo(e)<=n?!j(r,o,e):"end"===i&&a.distanceTo(e)<=n?!j(a,s,e):(h=[r,o,s,a],!(!U(h,e,"x","y",n)&&!U(h,e,"y","x",n))||(l=E().rotate(45,e),c=[r.transformCopy(l),o.transformCopy(l),s.transformCopy(l),a.transformCopy(l)],U(c,e,"x","y",n)||U(c,e,"y","x",n)))},_isOnLineTo:function(t,e,n){var i=this.anchor(),r=t.anchor(),s=o(Math.atan2(r.y-i.y,r.x-i.x)),a=new un([i.x,i.y-n/2],[i.distanceTo(r),n]);return a.containsPoint(e.transformCopy(E().rotate(-s,i)))},_isOnPathTo:function(t,e,n,i){var r;return r=this.controlOut()&&t.controlIn()?this._isOnCurveTo(t,e,n/2,i):this._isOnLineTo(t,e,n)}}),H(Bn.prototype,["anchor","controlIn","controlOut"]),We.extend(Bn.prototype),Fn=fn.extend({init:function(t){fn.fn.init.call(this,t),this.segments=new Nn,this.segments.addObserver(this),i(this.options.stroke)||(this.stroke("#000"),i(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(t,e){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(t,e),this},lineTo:function(t,e){var n=i(e)?new ln(t,e):t,r=new Bn(n);return this.segments.push(r),this},curveTo:function(t,e,n){var i,r;return this.segments.length>0&&(i=u(this.segments),r=new Bn(n,e),this.suspend(),i.controlOut(t),this.resume(),this.segments.push(r)),this},arc:function(t,e,n,i,r){var o,s,a,h,l;return this.segments.length>0&&(o=u(this.segments),s=o.anchor(),a=p(t),h=new ln(s.x-n*Math.cos(a),s.y-i*Math.sin(a)),l=new Tn(h,{startAngle:t,endAngle:e,radiusX:n,radiusY:i,anticlockwise:r}),this._addArcSegments(l)),this},arcTo:function(t,e,n,i,r){var o,s,a;return this.segments.length>0&&(o=u(this.segments),s=o.anchor(),a=Tn.fromPoints(s,t,e,n,i,r),this._addArcSegments(a)),this},_addArcSegments:function(t){var e,n,i=this;for(this.suspend(),e=t.curvePoints(),n=1;n1){if(i[0]._isOnPathTo(i[1],t,o,"start"))return!0;for(n=2;n<=r-2;n++)if(i[n-1]._isOnPathTo(i[n],t,o))return!0;if(i[r-2]._isOnPathTo(i[r-1],t,o,"end"))return!0}return!1},_bbox:function(t){var e,n,i,r,o=this.segments,s=o.length;if(1===s)n=o[0].anchor().transformCopy(t),e=new un(n,cn.ZERO);else if(s>0)for(i=1;i0)for(e.moveTo(n[0].x,n[0].y),t=1;t0&&u(this.paths).lineTo(t,e),this},curveTo:function(t,e,n){return this.paths.length>0&&u(this.paths).curveTo(t,e,n),this},arc:function(t,e,n,i,r){return this.paths.length>0&&u(this.paths).arc(t,e,n,i,r),this},arcTo:function(t,e,n,i,r){return this.paths.length>0&&u(this.paths).arcTo(t,e,n,i,r),this},close:function(){return this.paths.length>0&&u(this.paths).close(),this},_bbox:function(t){return J(this.paths,!0,t)},rawBBox:function(){return J(this.paths,!1)},_containsPoint:function(t){var e,n=this.paths;for(e=0;e=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},removeAt:function(t){if(0<=t&&te.size[s]&&(_=e.size[s]/x.size[s],b=x.topLeft().scale(_,_),C=x.size[a]*_,k=tt(C,e,t.alignContent,l,a),T=E(),"x"===h?T.translate(e.origin.x-b.x,k-b.y):T.translate(k-b.x,e.origin.y-b.y),T.scale(_,_),this.transform(T))}},_initGroups:function(){var t,e,n,i=this,r=this,o=r.options,s=r.children,a=o.lineSpacing,h=o.wrap,l=o.spacing,c=this._fieldMap.sizeField,u=this._newGroup(),d=[],f=function(){d.push(u),p+=u.lineSize+a},p=-a;for(t=0;ti._rect.size[c]?0===u.bboxes.length?(i._addToGroup(u,n,e),f(),u=i._newGroup()):(f(),u=i._newGroup(),i._addToGroup(u,n,e)):i._addToGroup(u,n,e));return u.bboxes.length&&f(),{groups:d,groupsSize:p}},_addToGroup:function(t,e,n){t.size+=e.size[this._fieldMap.sizeField]+this.options.spacing,t.lineSize=Math.max(e.size[this._fieldMap.groupsSizeField],t.lineSize),t.bboxes.push(e),t.elements.push(n)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),Vn=fn.extend({init:function(t,e){void 0===t&&(t=new un),void 0===e&&(e={}),fn.fn.init.call(this,e),this.geometry(t),i(this.options.stroke)||this.stroke("#000")},_bbox:function(t){return this._geometry.bbox(t)},rawBBox:function(){return this._geometry.bbox()},_containsPoint:function(t){return this._geometry.containsPoint(t)},_isOnPath:function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)}}),Vn.prototype.nodeType="Rect",vn.extend(Vn.prototype),yn.extend(Vn.prototype),O(Vn.prototype,["geometry"]),Wn=zn.extend({_change:function(){this.optionsChange({field:"stops"})}}),Qn=$e.extend({init:function(t,e,n){this.options=new an({offset:t,color:e,opacity:i(n)?n:1}),this.options.addObserver(this)}}),Qn.create=function(t){if(i(t)){var e;return e=t instanceof Qn?t:t.length>1?new Qn(t[0],t[1],t[2]):new Qn(t.offset,t.color,t.opacity)}},pt(Qn.prototype,["offset","color","opacity"]),We.extend(Qn.prototype),Jn=$e.extend({init:function(t){void 0===t&&(t={}),this.stops=new Wn(this._createStops(t.stops)),this.stops.addObserver(this),this._userSpace=t.userSpace,this.id=r()},userSpace:function(t){return i(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},_createStops:function(t){var e,n;for(void 0===t&&(t=[]),e=[],n=0;n=0&&this.stops.splice(e,1)}}),Jn.prototype.nodeType="Gradient",We.extend(Jn.prototype),t.extend(Jn.prototype,{optionsChange:function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),Kn=Jn.extend({init:function(t){void 0===t&&(t={}),Jn.fn.init.call(this,t),this.start(t.start||new ln),this.end(t.end||new ln(1,0))}}),H(Kn.prototype,["start","end"]),Zn=Jn.extend({init:function(t){void 0===t&&(t={}),Jn.fn.init.call(this,t),this.center(t.center||new ln),this._radius=i(t.radius)?t.radius:1,this._fallbackFill=t.fallbackFill},radius:function(t){return i(t)?(this._radius=t,this.geometryChange(),this):this._radius},fallbackFill:function(t){return i(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill}}),H(Zn.prototype,["center"]),ti={swing:gt,linear:mt,easeOutElastic:vt},ei=Date.now||function(){return(new Date).getTime()},ni=$e.extend({init:function(e,n){this.options=t.extend({},this.options,n),this.element=e},setup:function(){},step:function(){},play:function(){var t,e,n,i=this,r=this.options,o=r.duration,s=r.delay;void 0===s&&(s=0),t=ti[r.easing],e=ei()+s,n=e+o,0===o?(this.step(1),this.abort()):setTimeout(function(){var r=function(){var s,a,h,l;i._stopped||(s=ei(),a=d(s-e,0,o),h=a/o,l=t(h,a,0,1,o),i.step(l),s2&&(a="l",l.splice(0,2))),ri[a])ri[a](i,{parameters:l,position:r,isRelative:h,previousCommand:n}),s&&s.toLowerCase()===li&&i.close();else if(a!==hi)throw Error("Error while parsing SVG path. Unsupported command: "+a);n=a}),i}}),ci.current=new ci,Fn.parse=function(t,e){return ci.current.parse(t,e)},ui=$e.extend({init:function(){this._items=[]},register:function(t,e,n){var i=this._items,r=i[0],o={name:t,type:e,order:n};!r||n0||e.height>0)&&(!n||e.width!==n.width||e.height!==n.height))&&(this.currentSize(e),this._resize(e,t),this.trigger("resize",e))},size:function(t){return t?void this.setSize(t):this.getSize()},suspendTracking:function(){this._suspendedTracking=!0},resumeTracking:function(){this._suspendedTracking=!1},_enableTracking:function(){},_resize:function(){},_handler:function(t){var e=this;return function(n){var i=e.eventTarget(n);i&&!e._suspendedTracking&&e.trigger(t,{element:i,originalEvent:n,type:t})}},_elementOffset:function(){var t=this.element,e=w(t,["paddingLeft","paddingTop"]),n=e.paddingLeft,i=e.paddingTop,r=y(t),o=r.left,s=r.top;return{left:o+parseInt(n,10),top:s+parseInt(i,10)}},_surfacePoint:function(t){var e=this._elementOffset(),n=h(t),i=n.x-e.left,r=n.y-e.top;return new ln(i,r)}}),fi.create=function(t,e){return ui.current.create(t,e)},fi.support={},pi=$e.extend({init:function(t){this.childNodes=[],this.parent=null,t&&(this.srcElement=t,this.observe())},destroy:function(){var t,e,n=this;for(this.srcElement&&this.srcElement.removeObserver(this),t=this.childNodes,e=0;e",wi=document.createElement("div"),_i="undefined"!=typeof DOMParser,wi.innerHTML=yi,_i&&wi.firstChild.namespaceURI!==mi&&(xi=function(t,e){var n=new DOMParser,i=n.parseFromString(e,"text/xml"),r=document.adoptNode(i.documentElement);t.innerHTML="",t.appendChild(r)})),bi=xi,Ci="transform",ki={clip:"clip-path",fill:"fill"},Ti=pi.extend({init:function(t){pi.fn.init.call(this,t),this.definitions={}},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),pi.fn.destroy.call(this)},load:function(t,e){var n,r,o,s,a,h=this;for(n=0;n0&&s.load(o),a=h.element,a&&s.attachTo(a,e)},root:function(){for(var t=this;t.parent;)t=t.parent;return t},attachTo:function(t,e){var n,r=document.createElement("div");bi(r,""+this.render()+""),n=r.firstChild.firstChild,n&&(i(e)?t.insertBefore(n,t.childNodes[e]||null):t.appendChild(n),this.setElement(n))},setElement:function(t){var e,n,i;for(this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this,e=this.childNodes,n=0;n"},renderOffset:function(){return bt("offset",this.srcElement.offset())},mapStyle:function(){var t=this.srcElement;return[["stop-color",t.color()],["stop-opacity",t.opacity()]]},optionsChange:function(t){"offset"===t.field?this.attr(t.field,t.value):"color"!==t.field&&"opacity"!==t.field||this.css("stop-"+t.field,t.value)}}),Si=Ti.extend({init:function(t){Ti.fn.init.call(this,t),this.id=t.id,this.loadStops()},loadStops:function(){var t,e,n=this,i=this.srcElement.stops,r=this.element;for(t=0;t"+this.renderChildren()+""},mapCoordinates:function(){var t=this.srcElement,e=t.start(),n=t.end(),i=[["x1",e.x],["y1",e.y],["x2",n.x],["y2",n.y],this.mapSpace()];return i}}),Ai=Si.extend({template:function(){return""+this.renderChildren()+""},mapCoordinates:function(){var t=this.srcElement,e=t.center(),n=t.radius(),i=[["cx",e.x],["cy",e.y],["r",n],this.mapSpace()];return i}}),Pi=Ti.extend({init:function(t){Ti.fn.init.call(this),this.srcElement=t,this.id=t.id,this.load([t])},template:function(){return""+this.renderChildren()+""}}),Oi=Ti.extend({init:function(){Ti.fn.init.call(this),this.definitionMap={}},attachTo:function(t){this.element=t},template:function(){return""+this.renderChildren()+""},definitionChange:function(t){var e=t.definitions,n=t.action;"add"===n?this.addDefinitions(e):"remove"===n&&this.removeDefinitions(e)},createDefinition:function(t,e){var n;return"clip"===t?n=Pi:"fill"===t&&(e instanceof Kn?n=Ei:e instanceof Zn&&(n=Ai)),new n(e)},addDefinitions:function(t){var e,n=this;for(e in t)n.addDefinition(e,t[e])},addDefinition:function(t,e){var n,i=this,r=i.element,o=i.definitionMap,s=e.id,a=o[s];a?a.count++:(n=this.createDefinition(t,e),o[s]={element:n,count:1},this.append(n),r&&n.attachTo(this.element))},removeDefinitions:function(t){var e,n=this;for(e in t)n.removeDefinition(t[e])},removeDefinition:function(t){var e=this.definitionMap,n=t.id,i=e[n];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete e[n]))}}),zi=Ti.extend({init:function(t){Ti.fn.init.call(this),this.options=t,this.defs=new Oi},attachTo:function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},clear:function(){pi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(t){this.defs.definitionChange(t)}}),Ni=fi.extend({init:function(t,e){fi.fn.init.call(this,t,e),this._root=new zi(this.options),bi(this.element,this._template()),this._rootElement=this.element.firstElementChild,Et(this._rootElement),this._root.attachTo(this._rootElement),x(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,C(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),fi.fn.destroy.call(this)},translate:function(t){var e=Math.round(t.x)+" "+Math.round(t.y)+" "+this._size.width+" "+this._size.height;this._offset=t,this._rootElement.setAttribute("viewBox",e)},draw:function(t){fi.fn.draw.call(this,t),this._root.load([t])},clear:function(){fi.fn.clear.call(this),this._root.clear()},svg:function(){return""+this._template()},exportVisual:function(){var t,e=this,n=e._visual,i=e._offset;return i&&(t=new Xn,t.children.push(n),t.transform(E().translate(-i.x,-i.y)),n=t),n},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return""+this._root.render()+""}}),Ni.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(fi.support.svg=!0,ui.current.register("svg",Ni,10)),Ri=Ti.extend({template:function(){return""+this.renderChildren()+""},optionsChange:function(t){"transform"===t.field&&this.transformChange(t.value),Ti.fn.optionsChange.call(this,t)}}),gi.Group=Ri,Bi={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Fi="solid",Li="butt",Ii={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Di=" ",Hi=Ti.extend({geometryChange:function(){this.attr("d",this.renderData()),this.invalidate()},optionsChange:function(t){switch(t.field){case"fill":t.value?this.allAttr(this.mapFill(t.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:t.value}));break;case"stroke":t.value?this.allAttr(this.mapStroke(t.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(t.value);break;default:var e=Ii[t.field];e&&this.attr(e,t.value)}Ti.fn.optionsChange.call(this,t)},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(t){var e,n,i,r,o,s=this,a=t.segments,h=a.length;if(h>0){for(e=[],r=1;r"}}),gi.Path=Hi,ji=Hi.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),gi.Arc=ji,qi=Hi.extend({geometryChange:function(){var t=this.center();this.attr("cx",t.x), this.attr("cy",t.y),this.attr("r",this.radius()),this.invalidate()},center:function(){return this.srcElement.geometry().center},radius:function(){return this.srcElement.geometry().radius},template:function(){return""}}),gi.Circle=qi,Gi=Hi.extend({geometryChange:function(){var t=this.srcElement.geometry();this.attr("x",t.origin.x),this.attr("y",t.origin.y),this.attr("width",t.size.width),this.attr("height",t.size.height),this.invalidate()},size:function(){return this.srcElement.geometry().size},origin:function(){return this.srcElement.geometry().origin},template:function(){return""}}),gi.Rect=Gi,$i=Hi.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(t){"src"===t.field&&this.allAttr(this.mapSource()),Hi.fn.optionsChange.call(this,t)},mapPosition:function(){var t=this.srcElement.rect(),e=t.topLeft();return[["x",e.x],["y",e.y],["width",t.width()+"px"],["height",t.height()+"px"]]},renderPosition:function(){return Ct(this.mapPosition())},mapSource:function(t){var e=this.srcElement.src();return t&&(e=kendo.htmlEncode(e)),[["xlink:href",e]]},renderSource:function(){return Ct(this.mapSource(!0))},template:function(){return""}}),gi.Image=$i,"undefined"!=typeof document&&(At._element=document.createElement("span")),Xi=Hi.extend({geometryChange:function(){var t=this.pos();this.attr("x",t.x),this.attr("y",t.y),this.invalidate()},optionsChange:function(t){"font"===t.field?(this.attr("style",kt(this.mapStyle())),this.geometryChange()):"content"===t.field&&Hi.fn.content.call(this,this.srcElement.content()),Hi.fn.optionsChange.call(this,t)},mapStyle:function(t){var e=Hi.fn.mapStyle.call(this,t),n=this.srcElement.options.font;return t&&(n=kendo.htmlEncode(n)),e.push(["font",n]),e},pos:function(){var t=this.srcElement.position(),e=this.srcElement.measure();return t.clone().setY(t.y+e.baseline)},renderContent:function(){var t=this.srcElement.content();return t=At(t),t=kendo.htmlEncode(t)},template:function(){return""+this.renderContent()+""}}),gi.Text=Xi,Yi=Hi.extend({renderData:function(){var t,e,n=this,i=this.srcElement.paths;if(i.length>0){for(t=[],e=0;e0&&a.load(s,e,n),i(e)?h.insertAt(a,e):h.append(a)},load:function(t,e,n){this.loadElements(t,e,n),this.invalidate()},setOpacity:function(t){if(this.srcElement){var e=this.srcElement.opacity();i(e)&&this.globalAlpha(t,e)}},globalAlpha:function(t,e){var n=e;n&&t.globalAlpha&&(n*=t.globalAlpha),t.globalAlpha=n},visible:function(){var t=this.srcElement;return!t||t&&t.options.visible!==!1}}),Ji=Qi.extend({renderTo:function(t){var e,n,i;if(this.visible()){for(t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),e=this.childNodes,n=0;n0;)n=t.pop(),n.addObserver(i),"Group"===n.nodeType?e(t,n.children):i._insertShape(n)},_insertShape:function(t){var e,n,i,r,o=t.bbox();o&&(e=this.getSectors(o),n=e[0][0],i=e[1][0],this.inRoot(e)?this.root.insert(t,o):(r=this.rootMap,r[n]||(r[n]={}),r[n][i]||(r[n][i]=new er(new un([n*nr,i*nr],[nr,nr]))),r[n][i].insert(t,o)))},remove:function(t){var e,n,i=this;if(t.removeObserver(this),"Group"===t.nodeType)for(e=t.children,n=0;n1||t[1].length>1},getSectors:function(t){var e,n,i=t.bottomRight(),r=Math.floor(i.x/nr),o=Math.floor(i.y/nr),s=[[],[]];for(e=Math.floor(t.origin.x/nr);e<=r;e++)s[0].push(e);for(n=Math.floor(t.origin.y/nr);n<=o;n++)s[1].push(n);return s}}),sr=$e.extend({init:function(t){t.bind("mouseenter",this._mouseenter.bind(this)),t.bind("mouseleave",this._mouseleave.bind(this)),this.element=t.element},clear:function(){this._resetCursor()},destroy:function(){this._resetCursor(),delete this.element},_mouseenter:function(t){var e=this._shapeCursor(t);e?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(e)):this._resetCursor()},_mouseleave:function(){this._resetCursor()},_shapeCursor:function(t){for(var e=t.element;e&&!i(e.options.cursor);)e=e.parent;if(e)return e.options.cursor},_getCursor:function(){if(this.element)return this.element.style.cursor},_setCursor:function(t){this.element&&(this.element.style.cursor=t,this._current=t)},_resetCursor:function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)}}),ar=fi.extend({init:function(t,e){var n,i;fi.fn.init.call(this,t,e),this.element.innerHTML=this._template(this),n=this.element.firstElementChild,i=b(t),n.width=i.width,n.height=i.height,this._rootElement=n,this._root=new Zi(n),this._mouseTrackHandler=this._trackMouse.bind(this),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){fi.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),C(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(t){fi.fn.draw.call(this,t),this._root.load([t],void 0,this.options.cors),this._searchTree&&this._searchTree.add([t])},clear:function(){fi.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},eventTarget:function(t){var e,n;if(this._searchTree)return e=this._surfacePoint(t),n=this._searchTree.pointShape(e)},image:function(){var t,e,n=this,i=n._root,r=n._rootElement,o=[];return i.traverse(function(t){t.loading&&o.push(t.loading)}),t=Ue(),e=function(){i._invalidate();try{var e=r.toDataURL();t.resolve(e)}catch(n){t.reject(n)}},Ve(o).then(e,e),t},suspendTracking:function(){fi.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var t,e,n;if(fi.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new or,t=this._root.childNodes,e=[],n=0;n"},_enableTracking:function(){this._searchTree=new or,this._cursor=new sr(this),fi.fn._enableTracking.call(this)},_trackMouse:function(t){var e,n;this._suspendedTracking||(e=this.eventTarget(t),"click"!==t.type?(n=this._currentShape,n&&n!==e&&this.trigger("mouseleave",{element:n,originalEvent:t,type:"mouseleave"}),e&&n!==e&&this.trigger("mouseenter",{element:e,originalEvent:t,type:"mouseenter"}),this.trigger("mousemove",{element:e,originalEvent:t,type:"mousemove"}),this._currentShape=e):e&&this.trigger("click",{element:e,originalEvent:t,type:"click"}))}}),ar.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(fi.support.canvas=!0,ui.current.register("canvas",ar,20)),hr=Qi.extend({renderTo:function(t){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),this.renderPoints(t,this.srcElement),this.setLineDash(t),this.setLineCap(t),this.setLineJoin(t),this.setFill(t),this.setStroke(t),t.restore()},setFill:function(t){var e=this.srcElement.options.fill,n=!1;return e&&("Gradient"===e.nodeType?(this.setGradientFill(t,e),n=!0):c(e.color)||(t.fillStyle=e.color,t.save(),this.globalAlpha(t,e.opacity),t.fill(),t.restore(),n=!0)),n},setGradientFill:function(t,e){var n,i,r,o,s=this.srcElement.rawBBox();e instanceof Kn?(i=e.start(),r=e.end(),n=t.createLinearGradient(i.x,i.y,r.x,r.y)):e instanceof Zn&&(o=e.center(),n=t.createRadialGradient(o.x,o.y,0,o.x,o.y,e.radius())),Nt(n,e.stops),t.save(),e.userSpace()||t.transform(s.width(),0,0,s.height(),s.origin.x,s.origin.y),t.fillStyle=n,t.fill(),t.restore()},setStroke:function(t){var e=this.srcElement.options.stroke;if(e&&!c(e.color)&&e.width>0)return t.strokeStyle=e.color,t.lineWidth=v(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0},dashType:function(){var t=this.srcElement.options.stroke;if(t&&t.dashType)return t.dashType.toLowerCase()},setLineDash:function(t){var e,n=this.dashType();n&&n!==Fi&&(e=Bi[n],t.setLineDash?t.setLineDash(e):(t.mozDash=e,t.webkitLineDash=e))},setLineCap:function(t){var e=this.dashType(),n=this.srcElement.options.stroke;e&&e!==Fi?t.lineCap=Li:n&&n.lineCap&&(t.lineCap=n.lineCap)},setLineJoin:function(t){var e=this.srcElement.options.stroke;e&&e.lineJoin&&(t.lineJoin=e.lineJoin)},renderPoints:function(t,e){Ot(t,e)}}),Wi.Path=hr,lr=hr.extend({renderPoints:function(t){var e=this.srcElement.toPath();Ot(t,e)}}),Wi.Arc=lr,cr=hr.extend({renderPoints:function(t){var e=this.srcElement.geometry(),n=e.center,i=e.radius;t.arc(n.x,n.y,i,0,2*Math.PI)}}),Wi.Circle=cr,ur=hr.extend({renderPoints:function(t){var e=this.srcElement.geometry(),n=e.origin,i=e.size;t.rect(n.x,n.y,i.width,i.height)}}),Wi.Rect=ur,dr=hr.extend({init:function(t,e){hr.fn.init.call(this,t),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Ue();var n=this.img=new Image;e&&!/^data:/i.test(t.src())&&(n.crossOrigin=e),n.src=t.src(),n.complete?this.onLoad():(n.onload=this.onLoad,n.onerror=this.onError)},renderTo:function(t){"resolved"===this.loading.state()&&(t.save(),this.setTransform(t),this.setClip(t),this.drawImage(t),t.restore())},optionsChange:function(t){"src"===t.field?(this.loading=Ue(),this.img.src=this.srcElement.src()):hr.fn.optionsChange.call(this,t)},onLoad:function(){this.loading.resolve(),this.invalidate()},onError:function(){this.loading.reject(Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},drawImage:function(t){var e=this.srcElement.rect(),n=e.topLeft();t.drawImage(this.img,n.x,n.y,e.width(),e.height())}}),Wi.Image=dr,fr=hr.extend({renderTo:function(t){var e=this.srcElement,n=e.position(),i=e.measure();t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),t.font=e.options.font,this.setFill(t)&&t.fillText(e.content(),n.x,n.y+i.baseline),this.setStroke(t)&&(this.setLineDash(t),t.strokeText(e.content(),n.x,n.y+i.baseline)),t.restore()}}),Wi.Text=fr,pr=hr.extend({renderPoints:function(t){var e,n=this.srcElement.paths;for(e=0;ea&&(s.push(r(e.substring(a,h))),a=h+u[0].length),h+=u[0].length):h++;return a
',d='',f=n.Class.extend({init:function(e,n){this.element=t(u),this.content=this.element.children(".k-tooltip-content"),n=n||{},this.options=i({},this.options,this._tooltipOptions(n)),this.popupOptions={appendTo:n.appendTo,animation:n.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=t.proxy(this._openPopup,this),this.surface=e,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=c(this._showEvent,this),this._surfaceLeaveHandler=c(this._surfaceLeave,this),this._mouseleaveHandler=c(this._mouseleave,this),this._mousemoveHandler=c(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+e,this._surfaceLeaveHandler),this.element.on("click"+e,".k-tooltip-button",c(this._hideClick,this))},getPopup:function(){return this.popup||(this.popup=new n.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var t=this.popup;this.surface.unbind("click",this._showHandler),this.surface.unbind("mouseenter",this._showHandler),this.surface.unbind("mouseleave",this._mouseleaveHandler),this.surface.unbind("mousemove",this._mousemoveHandler),this.surface.element.off("mouseleave"+e,this._surfaceLeaveHandler),this.element.off("click"+e),t&&(t.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(t){return t=t||{},{position:t.position,showOn:t.showOn,offset:t.offset,autoHide:t.autoHide,width:t.width,height:t.height,content:t.content,shared:t.shared,hideDelay:t.hideDelay,showAfter:t.showAfter}},_tooltipShape:function(t){for(;t&&!t.options.tooltip;)t=t.parent;return t},_updateContent:function(t,e,i){var r=i.content;if(n.isFunction(r)&&(r=r({element:e,target:t})),r)return this.content.html(r),!0},_position:function(t,e,n,i){var r,o=e.position,h=e.offset||0,l=this.surface,c=l._instance._elementOffset(),u=l.getSize(),d=l._instance._offset,f=t.bbox(),p=n.width,g=n.height,m=0,v=0;return f.origin.translate(c.left,c.top),d&&f.origin.translate(-d.x,-d.y),"cursor"==o&&i?(r=a(i),m=r.x-p/2,v=r.y-g-h):"left"==o?(m=f.origin.x-p-h,v=f.center().y-g/2):"right"==o?(m=f.bottomRight().x+h,v=f.center().y-g/2):"bottom"==o?(m=f.center().x-p/2,v=f.bottomRight().y+h):(m=f.center().x-p/2,v=f.origin.y-g-h),{left:s(m,c.left,c.left+u.width),top:s(v,c.top,c.top+u.height)}},show:function(t,e){this._show(t,t,i({},this.options,this._tooltipOptions(t.options.tooltip),e))},hide:function(){var t=this.popup,e=this._current;delete this._current,clearTimeout(this._showTimeout),t&&t.visible()&&e&&!this.surface.trigger("tooltipClose",{element:e.shape,target:e.target,popup:t})&&t.close()},_hideClick:function(t){t.preventDefault(),this.hide()},_show:function(t,e,n,i,r){var o,s,a=this._current;clearTimeout(this._timeout),a&&(a.shape===e&&n.shared||a.target===t)||(clearTimeout(this._showTimeout),o=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:e,target:t,popup:o})&&this._updateContent(t,e,n)&&(this._autoHide(n),s=this._measure(n),o.visible()&&o.close(!0),this._current={options:n,elementSize:s,shape:e,target:t,position:this._position(n.shared?e:t,n,s,i)},r?this._showTimeout=setTimeout(this._openPopupHandler,n.showAfter||0):this._openPopup()))},_openPopup:function(){var t=this._current,e=t.position;this.getPopup().open(e.left,e.top)},_autoHide:function(e){e.autoHide&&this._closeButton&&(this.element.removeClass("k-tooltip-closable"),this._closeButton.remove(),delete this._closeButton),e.autoHide||this._closeButton||(this.element.addClass("k-tooltip-closable"),this._closeButton=t(d).prependTo(this.element))},_showEvent:function(t){var e,n=this._tooltipShape(t.element);n&&(e=i({},this.options,this._tooltipOptions(n.options.tooltip)),e&&e.showOn==t.type&&this._show(t.element,n,e,t.originalEvent,!0))},_measure:function(t){var e,n,i,r=this.getPopup();return this.element.css({width:"auto",height:"auto"}),i=r.visible(),i||r.wrapper.show(),this.element.css({width:o(t.width)?t.width:"auto",height:o(t.height)?t.height:"auto"}),e=h(this.element),n=l(this.element),i||r.wrapper.hide(),{width:e,height:n}},_mouseleave:function(t){var e,n;this.popup&&!this._popupRelatedTarget(t.originalEvent)&&(e=this,n=e._current,n&&n.options.autoHide&&(e._timeout=setTimeout(function(){clearTimeout(e._showTimeout),e.hide()},n.options.hideDelay||0)))},_mousemove:function(t){var e,n,i=this._current;i&&t.element&&(e=i.options,"cursor"==e.position&&(n=this._position(t.element,e,i.elementSize,t.originalEvent),i.position=n,this.getPopup().wrapper.css({left:n.left,top:n.top})))},_surfaceLeave:function(t){this.popup&&!this._popupRelatedTarget(t)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(e){return e.relatedTarget&&t(e.relatedTarget).closest(this.popup.wrapper).length}});n.drawing.SurfaceTooltip=f}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/surface.min",["drawing/kendo-drawing.min","drawing/surface-tooltip.min"],t)}(function(){!function(t){function e(t){this._instance.translate(t)}var n,i=window.kendo,r=i.drawing,o=r.Surface,s=i.ui.Widget,a=i.deepExtend,h=t.proxy;i.support.svg=o.support.svg,i.support.canvas=o.support.canvas,n=s.extend({init:function(t,n){this.options=a({},this.options,n),s.fn.init.call(this,t,this.options),this._instance=o.create(this.element[0],n),this._instance.translate&&(this.translate=e),this._triggerInstanceHandler=h(this._triggerInstanceEvent,this),this._bindHandler("click"),this._bindHandler("mouseenter"),this._bindHandler("mouseleave"),this._bindHandler("mousemove"),this._enableTracking()},options:{name:"Surface",tooltip:{}},events:["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],_triggerInstanceEvent:function(t){this.trigger(t.type,t)},_bindHandler:function(t){this._instance.bind(t,this._triggerInstanceHandler)},draw:function(t){this._instance.draw(t)},clear:function(){this._instance&&this._instance.clear(),this.hideTooltip()},destroy:function(){this._instance&&(this._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),s.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(t){return this._instance.eventTarget(t)},showTooltip:function(t,e){this._tooltip&&this._tooltip.show(t,e)},hideTooltip:function(){this._tooltip&&this._tooltip.hide()},suspendTracking:function(){this._instance.suspendTracking(),this.hideTooltip()},resumeTracking:function(){this._instance.resumeTracking()},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(t){this.element.css({width:t.width,height:t.height}),this._size=t,this._instance.currentSize(t),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){i.ui.Popup&&(this._tooltip=new r.SurfaceTooltip(this,this.options.tooltip||{}))}}),i.ui.plugin(n),n.create=function(t,e){return new n(t,e)},i.drawing.Surface=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("drawing/html.min",["drawing/kendo-drawing.min"],t)}(function(){!function(t){var e=window.kendo,n=e.drawing,i=n.drawDOM;n.drawDOM=function(e,n){return i(t(e)[0],n)},n.drawDOM.drawText=i.drawText,n.drawDOM.getFontFaces=i.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.drawing.min",["drawing/util.min","drawing/kendo-drawing.min","drawing/surface-tooltip.min","drawing/surface.min","drawing/html.min"],t)}(function(){},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}); //# sourceMappingURL=kendo.drawing.min.js.map