41 lines
1.0 MiB
41 lines
1.0 MiB
/*
|
|
* Kendo UI v2015.3.1111 (http://www.telerik.com/kendo-ui)
|
|
* Copyright 2015 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(f,define){define([],f)})(function(){!function(){!function(e,t,n){function i(){}function o(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+e+";$kendoOutput+="}function r(e,t,n){return e+="",t=t||2,n=t-e.length,n?U[t].substring(0,n)+e:e}function s(e){var t=e.css(ve.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Ae)||[0,0,0,0,0]:[0,0,0,0,0],i=ke.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function a(t,n){var i,o,r,a,l,c,u,h,d=Se.browser,f="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(u=t.parent(".k-animation-container"),h=u[0].style,u.is(":hidden")&&u.show(),i=Te.test(h.width)||Te.test(h.height),i||u.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(o=s(t),r=t[0].style.width,a=t[0].style.height,l=Te.test(r),c=Te.test(a),d.opera&&(o.left=o.right=o.bottom=5),i=l||c,!l&&(!n||n&&r)&&(r=t.outerWidth()),!c&&(!n||n&&a)&&(a=t.outerHeight()),t.wrap(e("<div/>").addClass("k-animation-container").css({width:r,height:a,marginLeft:o.left*(f?1:-1),paddingLeft:o.left,paddingRight:o.right,paddingBottom:o.bottom})),i&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),d.msie&&ke.floor(d.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function l(e){var t=1,n=arguments.length;for(t=1;n>t;t++)c(e,arguments[t]);return e}function c(e,t){var n,i,o,r,s,a=ve.data.ObservableArray,l=ve.data.LazyObservableArray,u=ve.data.DataSource,h=ve.data.HierarchicalDataSource;for(n in t)i=t[n],o=typeof i,r=o===Re&&null!==i?i.constructor:null,r&&r!==Array&&r!==a&&r!==l&&r!==u&&r!==h?i instanceof Date?e[n]=new Date(i.getTime()):I(i.clone)?e[n]=i.clone():(s=e[n],e[n]=typeof s===Re?s||{}:{},c(e[n],i)):o!==ze&&(e[n]=i);return e}function u(e,t,i){for(var o in t)if(t.hasOwnProperty(o)&&t[o].test(e))return o;return i!==n?i:e}function h(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function d(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function f(t,n){var i,o={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){o[t]=i.getPropertyValue(t)})):(i=t.currentStyle,n&&e.each(n,function(e,t){o[t]=i[d(t)]})),ve.size(o)||(o=i),o}function p(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=f(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function g(t,i){var o=t instanceof e?t[0]:t,r=Se.isRtl(t),s=Se.browser.webkit,a=Se.browser.mozilla;return i===n?r&&s?o.scrollWidth-o.clientWidth-o.scrollLeft:Math.abs(o.scrollLeft):(o.scrollLeft=r&&s?o.scrollWidth-o.clientWidth-i:r&&a?-i:i,n)}function m(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function v(e,n,i){n||(n="offset");var o=e[n]();return Se.browser.msie&&(Se.pointers||Se.msPointers)&&!i&&(o.top-=t.pageYOffset-document.documentElement.scrollTop,o.left-=t.pageXOffset-document.documentElement.scrollLeft),o}function _(e){var t={};return ye("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function y(e){return new ve.effects.Element(e)}function w(e,t,n,i){return typeof e===Pe&&(I(t)&&(i=t,t=400,n=!1),I(n)&&(i=n,n=!1),typeof t===Fe&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),_e({effects:{},duration:400,reverse:!1,init:xe,teardown:xe,hide:!1},e,{completeCallback:e.complete,complete:xe})}function b(t,n,i,o,r){for(var s,a=0,l=t.length;l>a;a++)s=e(t[a]),s.queue(function(){j.promise(s,w(n,i,o,r))});return t}function x(e,t,n,i){return t&&(t=t.split(" "),ye(t,function(t,n){e.toggleClass(n,i)})),e}function k(e){return(""+e).replace(G,"&").replace(q,"<").replace(K,">").replace($,""").replace(Y,"'")}function C(e,t){var i;return 0===t.indexOf("data")&&(t=t.substring(4),t=t.charAt(0).toLowerCase()+t.substring(1)),t=t.replace(oe,"-$1"),i=e.getAttribute("data-"+ve.ns+t),null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:Me.test(i)?i=parseFloat(i):ne.test(i)&&!ie.test(i)&&(i=Function("return ("+i+")")()),i}function S(t,i){var o,r,s={};for(o in i)r=C(t,o),r!==n&&(te.test(o)&&(r=ve.template(e("#"+r).html())),s[o]=r);return s}function T(t,n){return e.contains(t,n)?-1:1}function D(){var t=e(this);return e.inArray(t.attr("data-"+ve.ns+"role"),["slider","rangeslider"])>-1||t.is(":visible")}function A(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&M(e)}function M(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function E(e,t){return new E.fn.init(e,t)}var P,I,R,B,F,z,L,O,N,H,V,U,W,j,G,q,$,Y,K,X,Q,Z,J,ee,te,ne,ie,oe,re,se,ae,le,ce,ue,he,de,fe,pe,ge,me,ve=t.kendo=t.kendo||{cultures:{}},_e=e.extend,ye=e.each,we=e.isArray,be=e.proxy,xe=e.noop,ke=Math,Ce=t.JSON||{},Se={},Te=/%/,De=/\{(\d+)(:[^\}]+)?\}/g,Ae=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Me=/^(\+|-?)\d+(\.?)\d*$/,Ee="function",Pe="string",Ie="number",Re="object",Be="null",Fe="boolean",ze="undefined",Le={},Oe={},Ne=[].slice,He=t.Globalize;ve.version="2015.3.1111".replace(/^\s+|\s+$/g,""),i.extend=function(e){var t,n,i=function(){},o=this,r=e&&e.init?e.init:function(){o.apply(this,arguments)};i.prototype=o.prototype,n=r.fn=r.prototype=new i;for(t in e)n[t]=null!=e[t]&&e[t].constructor===Object?_e(!0,{},i.prototype[t],e[t]):e[t];return n.constructor=r,r.extend=o.extend,r},i.prototype._initOptions=function(e){this.options=l({},this.options,e)},I=ve.isFunction=function(e){return"function"==typeof e},R=function(){this._defaultPrevented=!0},B=function(){return this._defaultPrevented===!0},F=i.extend({init:function(){this._events={}},bind:function(e,t,i){var o,r,s,a,l,c=this,u=typeof e===Pe?[e]:e,h=typeof t===Ee;if(t===n){for(o in e)c.bind(o,e[o]);return c}for(o=0,r=u.length;r>o;o++)e=u[o],a=h?t:t[e],a&&(i&&(s=a,a=function(){c.unbind(e,a),s.apply(c,arguments)},a.original=s),l=c._events[e]=c._events[e]||[],l.push(a));return c},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,o,r,s=this,a=typeof e===Pe?[e]:e,l=typeof t===Ee;for(n=0,i=a.length;i>n;n++)e=a[n],o=l?t:t[e],o&&(r=s._events[e]=s._events[e]||[],r.unshift(o));return s},trigger:function(e,t){var n,i,o=this,r=o._events[e];if(r){for(t=t||{},t.sender=o,t._defaultPrevented=!1,t.preventDefault=R,t.isDefaultPrevented=B,r=r.slice(),n=0,i=r.length;i>n;n++)r[n].call(o,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,o=this,r=o._events[e];if(e===n)o._events={};else if(r)if(t)for(i=r.length-1;i>=0;i--)(r[i]===t||r[i].original===t)&&r.splice(i,1);else o._events[e]=[];return o}}),z=/^\w+/,L=/\$\{([^}]*)\}/g,O=/\\\}/g,N=/__CURLY__/g,H=/\\#/g,V=/__SHARP__/g,U=["","0","00","000","0000"],P={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,o="";for(n=0,i=t.length;i>n;n++)o+=e(t[n]);return o},compile:function(e,t){var n,i,r,s=_e({},this,t),a=s.paramName,l=a.match(z)[0],c=s.useWithBlock,u="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(I(e))return e;for(u+=c?"with("+a+"){":"",u+="$kendoOutput=",i=e.replace(O,"__CURLY__").replace(L,"#=$kendoHtmlEncode($1)#").replace(N,"}").replace(H,"__SHARP__").split("#"),r=0;i.length>r;r++)u+=o(i[r],r%2===0);u+=c?";}":";",u+="return $kendoOutput;",u=u.replace(V,"#");try{return n=Function(l,u),n._slotCount=Math.floor(i.length/2),n}catch(h){throw Error(ve.format("Invalid template:'{0}' Generated code:'{1}'",e,u))}}},function(){function e(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,function(e){var t=a[e];return typeof t===Pe?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(r,s){var a,c,u,h,d,f,p=n,g=s[r];if(g&&typeof g===Re&&typeof g.toJSON===Ee&&(g=g.toJSON(r)),typeof o===Ee&&(g=o.call(s,r,g)),f=typeof g,f===Pe)return e(g);if(f===Ie)return isFinite(g)?g+"":Be;if(f===Fe||f===Be)return g+"";if(f===Re){if(!g)return Be;if(n+=i,d=[],"[object Array]"===l.apply(g)){for(h=g.length,a=0;h>a;a++)d[a]=t(a,g)||Be;return u=0===d.length?"[]":n?"[\n"+n+d.join(",\n"+n)+"\n"+p+"]":"["+d.join(",")+"]",n=p,u}if(o&&typeof o===Re)for(h=o.length,a=0;h>a;a++)typeof o[a]===Pe&&(c=o[a],u=t(c,g),u&&d.push(e(c)+(n?": ":":")+u));else for(c in g)Object.hasOwnProperty.call(g,c)&&(u=t(c,g),u&&d.push(e(c)+(n?": ":":")+u));return u=0===d.length?"{}":n?"{\n"+n+d.join(",\n"+n)+"\n"+p+"}":"{"+d.join(",")+"}",n=p,u}}var n,i,o,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==Ee&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?r(e.getUTCFullYear(),4)+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof Ce.stringify!==Ee&&(Ce.stringify=function(e,r,s){var a;if(n="",i="",typeof s===Ie)for(a=0;s>a;a+=1)i+=" ";else typeof s===Pe&&(i=s);if(o=r,r&&typeof r!==Ee&&(typeof r!==Re||typeof r.length!==Ie))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function t(e){if(e){if(e.numberFormat)return e;if(typeof e===Pe){var t=ve.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function i(e){return e&&(e=t(e)),e||ve.cultures.current}function o(e){e.groupSizes=e.groupSize,e.percent.groupSizes=e.percent.groupSize,e.currency.groupSizes=e.currency.groupSize}function s(e,t,o){o=i(o);var s=o.calendars.standard,a=s.days,l=s.months;return t=s.patterns[t]||t,t.replace(u,function(t){var i,o,c;return"d"===t?o=e.getDate():"dd"===t?o=r(e.getDate()):"ddd"===t?o=a.namesAbbr[e.getDay()]:"dddd"===t?o=a.names[e.getDay()]:"M"===t?o=e.getMonth()+1:"MM"===t?o=r(e.getMonth()+1):"MMM"===t?o=l.namesAbbr[e.getMonth()]:"MMMM"===t?o=l.names[e.getMonth()]:"yy"===t?o=r(e.getFullYear()%100):"yyyy"===t?o=r(e.getFullYear(),4):"h"===t?o=e.getHours()%12||12:"hh"===t?o=r(e.getHours()%12||12):"H"===t?o=e.getHours():"HH"===t?o=r(e.getHours()):"m"===t?o=e.getMinutes():"mm"===t?o=r(e.getMinutes()):"s"===t?o=e.getSeconds():"ss"===t?o=r(e.getSeconds()):"f"===t?o=ke.floor(e.getMilliseconds()/100):"ff"===t?(o=e.getMilliseconds(),o>99&&(o=ke.floor(o/10)),o=r(o)):"fff"===t?o=r(e.getMilliseconds(),3):"tt"===t?o=e.getHours()<12?s.AM[0]:s.PM[0]:"zzz"===t?(i=e.getTimezoneOffset(),c=0>i,o=(""+ke.abs(i/60)).split(".")[0],i=ke.abs(i)-60*o,o=(c?"+":"-")+r(o),o+=":"+r(i)):("zz"===t||"z"===t)&&(o=e.getTimezoneOffset()/60,c=0>o,o=(""+ke.abs(o)).split(".")[0],o=(c?"+":"-")+("zz"===t?r(o):o)),o!==n?o:t.slice(1,t.length-1)})}function a(e,t,o){o=i(o);var r,s,a,c,u,w,b,x,k,C,S,T,D,A,M,E,P,I,R,B,F,z,L,O=o.numberFormat,N=O.groupSize[0],H=O[m],V=O[g],U=O.decimals,W=O.pattern[0],j=[],G=0>e,q=p,$=p,Y=-1;if(e===n)return p;if(!isFinite(e))return e;if(!t)return o.name.length?e.toLocaleString():""+e;if(u=h.exec(t)){if(t=u[1].toLowerCase(),s="c"===t,a="p"===t,(s||a)&&(O=s?O.currency:O.percent,N=O.groupSize[0],H=O[m],V=O[g],U=O.decimals,r=O.symbol,W=O.pattern[G?0:1]),c=u[2],c&&(U=+c),"e"===t)return c?e.toExponential(U):e.toExponential();if(a&&(e*=100),e=l(e,U),G=0>e,e=e.split(g),w=e[0],b=e[1],G&&(w=w.substring(1)),$=w,x=w.length,x>=N)for($=p,C=0;x>C;C++)C>0&&(x-C)%N===0&&($+=H),$+=w.charAt(C);if(b&&($+=V+b),"n"===t&&!G)return $;for(e=p,C=0,S=W.length;S>C;C++)T=W.charAt(C),e+="n"===T?$:"$"===T||"%"===T?r:T;return e}if(G&&(e=-e),(t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(d,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return j.push(n),y})),t=t.split(";"),G&&t[1])t=t[1],A=!0;else if(0===e){if(t=t[2]||t[0],-1==t.indexOf(v)&&-1==t.indexOf(_))return t}else t=t[0];if(B=t.indexOf("%"),F=t.indexOf("$"),a=-1!=B,s=-1!=F,a&&(e*=100),s&&"\\"===t[F-1]&&(t=t.split("\\").join(""),s=!1),(s||a)&&(O=s?O.currency:O.percent,N=O.groupSize[0],H=O[m],V=O[g],U=O.decimals,r=O.symbol),D=t.indexOf(m)>-1,D&&(t=t.replace(f,p)),M=t.indexOf(g),S=t.length,-1!=M?(b=(""+e).split("e"),b=b[1]?l(e,Math.abs(b[1])):b[0],b=b.split(g)[1]||p,P=t.lastIndexOf(_)-M,E=t.lastIndexOf(v)-M,I=P>-1,R=E>-1,C=b.length,I||R||(t=t.substring(0,M)+t.substring(M+1),S=t.length,M=-1,C=0),I&&P>E?C=P:E>P&&(R&&C>E?C=E:I&&P>C&&(C=P)),C>-1&&(e=l(e,C))):e=l(e),E=t.indexOf(v),z=P=t.indexOf(_),Y=-1==E&&-1!=P?P:-1!=E&&-1==P?E:E>P?P:E,E=t.lastIndexOf(v),P=t.lastIndexOf(_),L=-1==E&&-1!=P?P:-1!=E&&-1==P?E:E>P?E:P,Y==S&&(L=Y),-1!=Y){if($=(""+e).split(g),w=$[0],b=$[1]||p,x=w.length,k=b.length,G&&-1*e>=0&&(G=!1),D)if(x===N&&M-z>x)w=H+w;else if(x>N){for($=p,C=0;x>C;C++)C>0&&(x-C)%N===0&&($+=H),$+=w.charAt(C);w=$}for(e=t.substring(0,Y),G&&!A&&(e+="-"),C=Y;S>C;C++){if(T=t.charAt(C),-1==M){if(x>L-C){e+=w;break}}else if(-1!=P&&C>P&&(q=p),x>=M-C&&M-C>-1&&(e+=w,C=M),M===C){e+=(b?V:p)+b,C+=L-M+1;continue}T===_?(e+=T,q=T):T===v&&(e+=q)}if(L>=Y&&(e+=t.substring(L+1)),s||a){for($=p,C=0,S=e.length;S>C;C++)T=e.charAt(C),$+="$"===T||"%"===T?r:T;e=$}if(S=j.length)for(C=0;S>C;C++)e=e.replace(y,j[C])}return e}var l,c,u=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,h=/^(n|c|p|e)(\d*)$/i,d=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,f=/\,/g,p="",g=".",m=",",v="#",_="0",y="??",w="en-US",b={}.toString;ve.cultures["en-US"]={name:w,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{name:"US Dollar",abbr:"USD",pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},ve.culture=function(e){var i,r=ve.cultures;return e===n?r.current:(i=t(e)||r[w],i.calendar=i.calendars.standard,r.current=i,He&&!He.load&&o(i.numberFormat),n)},ve.findCulture=t,ve.getCulture=i,ve.culture(w),l=function(e,t){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(t)},c=function(e,t,i){if(t){if("[object Date]"===b.call(e))return s(e,t,i);if(typeof e===Ie)return a(e,t,i)}return e!==n?e:""},He&&!He.load&&(c=function(t,n,i){return e.isPlainObject(i)&&(i=i.name),He.format(t,n,i)}),ve.format=function(e){var t=arguments;return e.replace(De,function(e,n,i){var o=t[parseInt(n,10)+1];return c(o,i?i.substring(1):"")})},ve._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ve._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ve._round=l,ve.toString=c}(),function(){function t(e,t,n){return!(e>=t&&n>=e)}function i(e){return e.charAt(0)}function o(t){return e.map(t,i)}function r(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function s(e){for(var t=0,n=e.length,i=[];n>t;t++)i[t]=(e[t]+"").toLowerCase();return i}function a(e){var t,n={};for(t in e)n[t]=s(e[t]);return n}function l(e,i,s){if(!e)return null;var l,c,u,h,p,g,m,_,y,w,b,x,k,C=function(e){for(var t=0;i[z]===e;)t++,z++;return t>0&&(z-=1),t},S=function(t){var n=v[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(L,t).match(n);return i?(i=i[0],L+=i.length,parseInt(i,10)):null},T=function(t,n){for(var i,o,r,s=0,a=t.length,l=0,c=0;a>s;s++)i=t[s],o=i.length,r=e.substr(L,o),n&&(r=r.toLowerCase()),r==i&&o>l&&(l=o,c=s);return l?(L+=l,c+1):null},D=function(){var t=!1;return e.charAt(L)===i[z]&&(L++,t=!0),t},A=s.calendars.standard,M=null,E=null,P=null,I=null,R=null,B=null,F=null,z=0,L=0,O=!1,N=new Date,H=A.twoDigitYearMax||2029,V=N.getFullYear();for(i||(i="d"),h=A.patterns[i],h&&(i=h),i=i.split(""),u=i.length;u>z;z++)if(l=i[z],O)"'"===l?O=!1:D();else if("d"===l){if(c=C("d"),A._lowerDays||(A._lowerDays=a(A.days)),null!==P&&c>2)continue;if(P=3>c?S(2):T(A._lowerDays[3==c?"namesAbbr":"names"],!0),null===P||t(P,1,31))return null}else if("M"===l){if(c=C("M"),A._lowerMonths||(A._lowerMonths=a(A.months)),E=3>c?S(2):T(A._lowerMonths[3==c?"namesAbbr":"names"],!0),null===E||t(E,1,12))return null;E-=1}else if("y"===l){if(c=C("y"),M=S(c),null===M)return null;2==c&&("string"==typeof H&&(H=V+parseInt(H,10)),M=V-V%100+M,M>H&&(M-=100))}else if("h"===l){if(C("h"),I=S(2),12==I&&(I=0),null===I||t(I,0,11))return null}else if("H"===l){if(C("H"),I=S(2),null===I||t(I,0,23))return null}else if("m"===l){if(C("m"),R=S(2),null===R||t(R,0,59))return null}else if("s"===l){if(C("s"),B=S(2),null===B||t(B,0,59))return null}else if("f"===l){if(c=C("f"),k=e.substr(L,c).match(v[3]),F=S(c),null!==F&&(k=k[0].length,3>k&&(F*=Math.pow(10,3-k)),c>3&&(F=parseInt((""+F).substring(0,3),10))),null===F||t(F,0,999))return null}else if("t"===l){if(c=C("t"),_=A.AM,y=A.PM,1===c&&(_=o(_),y=o(y)),p=T(y),!p&&!T(_))return null}else if("z"===l){if(g=!0,c=C("z"),"Z"===e.substr(L,1)){D();continue}if(m=e.substr(L,6).match(c>2?f:d),!m)return null;if(m=m[0].split(":"),w=m[0],b=m[1],!b&&w.length>3&&(L=w.length-2,b=w.substring(L),w=w.substring(0,L)),w=parseInt(w,10),t(w,-12,13))return null;if(c>2&&(b=parseInt(b,10),isNaN(b)||t(b,0,59)))return null}else if("'"===l)O=!0,D();else if(!D())return null;return x=null!==I||null!==R||B||null,null===M&&null===E&&null===P&&x?(M=V,E=N.getMonth(),P=N.getDate()):(null===M&&(M=V),null===P&&(P=1)),p&&12>I&&(I+=12),g?(w&&(I+=-w),b&&(R+=-b),e=new Date(Date.UTC(M,E,P,I,R,B,F))):(e=new Date(M,E,P,I,R,B,F),r(e,I)),100>M&&e.setFullYear(M),e.getDate()!==P&&g===n?null:e}function c(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),e=60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10),t*e}var u=/\u00A0/g,h=/[eE][\-+]?[0-9]+/,d=/[+|\-]\d{1,2}/,f=/[+|\-]\d{1,2}:?\d{2}/,p=/^\/Date\((.*?)\)\/$/,g=/[+-]\d*/,m=["G","g","d","F","D","y","m","T","t"],v={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},_={}.toString;ve.parseDate=function(e,t,n){var i,o,r,s,a;if("[object Date]"===_.call(e))return e;if(i=0,o=null,e&&0===e.indexOf("/D")&&(o=p.exec(e)))return o=o[1],a=g.exec(o.substring(1)),o=new Date(parseInt(o,10)),a&&(a=c(a[0]),o=ve.timezone.apply(o,0),o=ve.timezone.convert(o,0,-1*a)),o;if(n=ve.getCulture(n),!t){for(t=[],s=n.calendar.patterns,r=m.length;r>i;i++)t[i]=s[m[i]];i=0,t=["yyyy/MM/dd HH:mm:ss","yyyy/MM/dd HH:mm","yyyy/MM/dd","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fff","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd","HH:mm:ss","HH:mm"].concat(t)}for(t=we(t)?t:[t],r=t.length;r>i;i++)if(o=l(e,t[i],n))return o;return o},ve.parseInt=function(e,t){var n=ve.parseFloat(e,t);return n&&(n=0|n),n},ve.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Ie)return e;e=""+e,t=ve.getCulture(t);var i,o,r=t.numberFormat,s=r.percent,a=r.currency,l=a.symbol,c=s.symbol,d=e.indexOf("-");return h.test(e)?(e=parseFloat(e.replace(r["."],".")),isNaN(e)&&(e=null),e):d>0?null:(d=d>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(r=a,i=r.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),d=!0)):e.indexOf(c)>-1&&(o=!0,r=s,l=c),e=e.replace("-","").replace(l,"").replace(u," ").split(r[","].replace(u," ")).join("").replace(r["."],"."),e=parseFloat(e),isNaN(e)?e=null:d&&(e*=-1),e&&o&&(e/=100),e)},He&&!He.load&&(ve.parseDate=function(e,t,n){return"[object Date]"===_.call(e)?e:He.parseDate(e,t,n)},ve.parseFloat=function(t,i){return typeof t===Ie?t:t===n||null===t?null:(e.isPlainObject(i)&&(i=i.name),t=He.parseFloat(t,i),isNaN(t)?null:t)})}(),function(){var i,o,r,s,a,l,c;Se._scrollbar=n,Se.scrollbar=function(e){if(isNaN(Se._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",document.body.appendChild(n),Se._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return Se._scrollbar},Se.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="<tr><td></td></tr>",Se.tbodyInnerHtml=!0}catch(h){Se.tbodyInnerHtml=!1}Se.touch="ontouchstart"in t,Se.msPointers=t.MSPointerEvent,Se.pointers=t.PointerEvent,o=Se.transitions=!1,r=Se.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[],Se.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,ye(["Moz","webkit","O","ms"],function(){var e,t=""+this,s=typeof i.style[t+"Transition"]===Pe;return s||typeof i.style[t+"Transform"]===Pe?(e=t.toLowerCase(),r={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},s&&(o=r,o.event=o.event?o.event+"TransitionEnd":"transitionend"),!1):n}),i=null,Se.transforms=r,Se.transitions=o,Se.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{Se.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,Se.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(h){Se.screenWidth=t.screen.availWidth,Se.screenHeight=t.screen.availHeight}Se.detectOS=function(e){var n,i,o=!1,r=[],s=!/mobile safari/i.test(e),a={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},l={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},c={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(i in a)if(a.hasOwnProperty(i)&&(r=e.match(a[i]))){if("windows"==i&&"plugins"in navigator)return!1;o={},o.device=i,o.tablet=u(i,c,!1),o.browser=u(e,h,"default"),o.name=u(i,l),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=r[3].replace("_","."),n=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+n+Array(3-(3>n.length?n.length:2)).join("0"),o.cordova=typeof t.PhoneGap!==ze||typeof t.cordova!==ze,o.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||o.cordova,o.android&&(1.5>Se.devicePixelRatio&&400>o.flatVersion||s)&&(Se.screenWidth>800||Se.screenHeight>800)&&(o.tablet=i);break}return o},a=Se.mobileOS=Se.detectOS(navigator.userAgent),Se.wpDevicePixelRatio=a.wp?screen.width/320:0,Se.kineticScrollNeeded=a&&(Se.touch||Se.msPointers||Se.pointers),Se.hasNativeScrolling=!1,(a.ios||a.android&&a.majorVersion>2||a.wp)&&(Se.hasNativeScrolling=a),Se.mouseAndTouchPresent=Se.touch&&!(Se.mobileOS.ios||Se.mobileOS.android),Se.detectBrowser=function(e){var t,n=!1,i=[],o={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in o)if(o.hasOwnProperty(t)&&(i=e.match(o[t]))){n={},n[t]=!0,n[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},Se.browser=Se.detectBrowser(navigator.userAgent),Se.detectClipboardAccess=function(){var e={copy:document.queryCommandSupported?document.queryCommandSupported("copy"):!1,cut:document.queryCommandSupported?document.queryCommandSupported("cut"):!1,paste:document.queryCommandSupported?document.queryCommandSupported("paste"):!1};return Se.browser.chrome&&Se.browser.version>=43&&(e.copy=!0,e.cut=!0),e},Se.clipboard=Se.detectClipboardAccess(),Se.zoomLevel=function(){var e,n,i;try{return e=Se.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!Se.touch&&(n=Se.scrollbar()),Se.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(o){return 1}},Se.cssBorderSpacing=n!==document.documentElement.style.borderSpacing&&!(Se.browser.msie&&8>Se.browser.version),function(t){var n="",i=e(document.documentElement),o=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera?n="opera":t.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+o),Se.mobileOS&&(n+=" k-mobile"),i.addClass(n)}(Se.browser),Se.eventCapture=document.documentElement.addEventListener,l=document.createElement("input"),Se.placeholder="placeholder"in l,Se.propertyChangeEvent="onpropertychange"in l,Se.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",o={},r=0;n>r;r++)e=t[r],l.setAttribute("type",e),l.value=i,o[e.replace("-","")]="text"!==l.type&&l.value!==i;return o}(),l.style.cssText="float:left;",Se.cssFloat=!!l.style.cssFloat,l=null,Se.stableSort=function(){var e,t=513,n=[{index:0,field:"b"}];for(e=1;t>e;e++)n.push({index:e,field:"a"});return n.sort(function(e,t){return e.field>t.field?1:t.field>e.field?-1:0}),1===n[0].index}(),Se.matchesSelector=s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.matchesSelector||s.matches||function(t){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),i=n.length;i--;)if(n[i]==this)return!0;return!1},Se.pushState=t.history&&t.history.pushState,c=document.documentMode,Se.hashChange="onhashchange"in t&&!(Se.browser.msie&&(!c||8>=c)),Se.customElements="registerElement"in t.document}(),W={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},j={},e.extend(j,{enabled:!0,Element:function(t){this.element=e(t)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),j.promiseShim=j.promise,"kendoAnimate"in e.fn||_e(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return b(this,e,t,n,i)},kendoAddClass:function(e,t){return ve.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return ve.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return ve.toggleClass(this,e,t,n)}}),G=/&/g,q=/</g,$=/"/g,Y=/'/g,K=/>/g,X=function(e){return e.target},Se.touch&&(X=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},ye(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),Se.touch?Se.mobileOS?(Se.mousedown="touchstart",Se.mouseup="touchend",Se.mousemove="touchmove",Se.mousecancel="touchcancel",Se.click="touchend",Se.resize="orientationchange"):(Se.mousedown="mousedown touchstart",Se.mouseup="mouseup touchend",Se.mousemove="mousemove touchmove",Se.mousecancel="mouseleave touchcancel",Se.click="click",Se.resize="resize"):Se.pointers?(Se.mousemove="pointermove",Se.mousedown="pointerdown",Se.mouseup="pointerup",Se.mousecancel="pointercancel",Se.click="pointerup",Se.resize="orientationchange resize"):Se.msPointers?(Se.mousemove="MSPointerMove",Se.mousedown="MSPointerDown",Se.mouseup="MSPointerUp",Se.mousecancel="MSPointerCancel",Se.click="MSPointerUp",Se.resize="orientationchange resize"):(Se.mousemove="mousemove",Se.mousedown="mousedown",Se.mouseup="mouseup",Se.mousecancel="mouseleave",Se.click="click",Se.resize="resize"),Q=function(e,t){var n,i,o,r,s=t||"d",a=1;for(i=0,o=e.length;o>i;i++)r=e[i],""!==r&&(n=r.indexOf("["),0!==n&&(-1==n?r="."+r:(a++,r="."+r.substring(0,n)+" || {})"+r.substring(n))),a++,s+=r+(o-1>i?" || {})":")"));return Array(a).join("(")+s},Z=/^([a-z]+:)?\/\//i,_e(ve,{widgets:[],_widgetRegisteredCallbacks:[],ui:ve.ui||{},fx:ve.fx||y,effects:ve.effects||j,mobile:ve.mobile||{},data:ve.data||{},dataviz:ve.dataviz||{},drawing:ve.drawing||{},spreadsheet:{messages:{}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:ve.support||Se,animate:ve.animate||b,ns:"",attr:function(e){return"data-"+ve.ns+e},getShadows:s,wrap:a,deepExtend:l,getComputedStyles:f,webComponents:ve.webComponents||[],isScrollable:p,scrollLeft:g,size:m,toCamelCase:d,toHyphens:h,getOffset:ve.getOffset||v,parseEffects:ve.parseEffects||_,toggleClass:ve.toggleClass||x,directions:ve.directions||W,Observable:F,Class:i,Template:P,template:be(P.compile,P),render:be(P.render,P),stringify:be(Ce.stringify,Ce),eventTarget:X,htmlEncode:k,isLocalUrl:function(e){return e&&!Z.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Pe&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),t?(e=e.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),e=e.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),e=Q(e.split("."),n),e=e.replace(/_\$DOT\$_/g,".")):e=n+e,e},getter:function(e,t){var n=e+t;return Le[n]=Le[n]||Function("d","return "+ve.expr(e,t))},setter:function(e){return Oe[e]=Oe[e]||Function("d,value",ve.expr(e)+"=value")},accessor:function(e){return{get:ve.getter(e),set:ve.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=16*ke.random()|0,(8==e||12==e||16==e||20==e)&&(n+="-"),n+=(12==e?4:16==e?3&t|8:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+ve.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(e){var t,n=e.split(" ");if(n)for(t=0;n.length>t;t++)"view"!=n[t]&&(n[t]=n[t].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return n.join(" ").replace(/(\S+)/g,"kendo-mobile-$1,").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},onWidgetRegistered:function(e){for(var t=0,n=ve.widgets.length;n>t;t++)e(ve.widgets[t]);ve._widgetRegisteredCallbacks.push(e)},logToConsole:function(e){var i=t.console;!ve.suppressLog&&n!==i&&i.log&&i.log(e)}}),J=F.extend({init:function(e,t){var n,i=this;i.element=ve.jQuery(e).handler(i),i.angular("init",t),F.fn.init.call(i),n=t?t.dataSource:null,n&&(t=_e({},t,{dataSource:{}})),t=i.options=_e(!0,{},i.options,t),n&&(t.dataSource=n),
|
|
i.element.attr(ve.attr("role"))||i.element.attr(ve.attr("role"),(t.name||"").toLowerCase()),i.element.data("kendo"+t.prefix+t.name,i),i.bind(i.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",i=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(i)?0:i)},setOptions:function(t){this._setEvents(t),e.extend(this.options,t)},_setEvents:function(e){for(var t,n=this,i=0,o=n.events.length;o>i;i++)t=n.events[i],n.options[t]&&e[t]&&n.unbind(t,n.options[t]);n.bind(n.events,e)},resize:function(e){var t=this.getSize(),n=this._size;(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},getSize:function(){return ve.dimensions(this.element)},size:function(e){return e?(this.setSize(e),n):this.getSize()},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(e){this._muteRebind=!0,e.call(this),this._muteRebind=!1}}),ee=J.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(t){var n=this;n.angular(t,function(){return{elements:n.items(),data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})}}),ve.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ve.notify=xe,te=/template$/i,ne=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ie=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/,oe=/([A-Z])/g,ve.initWidget=function(i,o,r){var s,a,l,c,u,h,d,f,p,g,m,v,_;if(r?r.roles&&(r=r.roles):r=ve.ui.roles,i=i.nodeType?i:i[0],h=i.getAttribute("data-"+ve.ns+"role")){p=-1===h.indexOf("."),l=p?r[h]:ve.getter(h)(t),m=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",g=p?RegExp("^kendo.*"+h+"$","i"):RegExp("^"+v+"$","i");for(_ in m)if(_.match(g)){if(_!==v)return m[_];s=m[_]}if(l){for(f=C(i,"dataSource"),o=e.extend({},S(i,l.fn.options),o),f&&(o.dataSource=typeof f===Pe?ve.getter(f)(t):f),c=0,u=l.fn.events.length;u>c;c++)a=l.fn.events[c],d=C(i,a),d!==n&&(o[a]=ve.getter(d)(t));return s?e.isEmptyObject(o)||s.setOptions(o):s=new l(i,o),s}}},ve.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[ve.ui,ve.dataviz.ui]),t=0,n=e.length;n>t;t++)i[t]=e[t].roles;return _e.apply(null,[{}].concat(i.reverse()))},ve.init=function(t){var n=ve.rolesFromNamespaces(Ne.call(arguments,1));e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){ve.initWidget(this,{},n)})},ve.destroy=function(t){e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){var t,n=e(this).data();for(t in n)0===t.indexOf("kendo")&&typeof n[t].destroy===Ee&&n[t].destroy()})},ve.resize=function(t,n){var i,o=e(t).find("[data-"+ve.ns+"role]").addBack().filter(D);o.length&&(i=e.makeArray(o),i.sort(T),e.each(i,function(){var t=ve.widgetInstance(e(this));t&&t.resize(n)}))},ve.parseOptions=S,_e(ve.ui,{Widget:J,DataBoundWidget:ee,roles:{},progress:function(t,n){var i,o,r,s,a=t.find(".k-loading-mask"),l=ve.support,c=l.browser;n?a.length||(i=l.isRtl(t),o=i?"right":"left",s=t.scrollLeft(),r=c.webkit&&i?t[0].scrollWidth-t.width()-2*s:0,a=e("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top",t.scrollTop()).css(o,Math.abs(s)+r).prependTo(t)):a&&a.remove()},plugin:function(t,i,o){var r,s,a,l,c=t.fn.options.name;for(i=i||ve.ui,o=o||"",i[c]=t,i.roles[c.toLowerCase()]=t,r="getKendo"+o+c,c="kendo"+o+c,s={name:c,widget:t,prefix:o||""},ve.widgets.push(s),a=0,l=ve._widgetRegisteredCallbacks.length;l>a;a++)ve._widgetRegisteredCallbacks[a](s);e.fn[c]=function(i){var o,r=this;return typeof i===Pe?(o=Ne.call(arguments,1),this.each(function(){var t,s,a=e.data(this,c);if(!a)throw Error(ve.format("Cannot call method '{0}' of {1} before it is initialized",i,c));if(t=a[i],typeof t!==Ee)throw Error(ve.format("Cannot find method '{0}' of {1}",i,c));return s=t.apply(a,o),s!==n?(r=s,!1):n})):this.each(function(){return new t(this,i)}),r},e.fn[c].widget=t,e.fn[r]=function(){return this.data(c)}}}),re={bind:function(){return this},nullObject:!0,options:{}},se=J.extend({init:function(e,t){J.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){J.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(ve.roleSelector("view splitview modalview drawer"));return ve.widgetInstance(e,ve.mobile.ui)||re},viewHasNativeScrolling:function(){var e=this.view();return e&&e.options.useNativeScrolling},container:function(){var e=this.element.closest(ve.roleSelector("view layout modalview drawer splitview"));return ve.widgetInstance(e.eq(0),ve.mobile.ui)||re}}),_e(ve.mobile,{init:function(e){ve.init(e,ve.mobile.ui,ve.ui,ve.dataviz.ui)},appLevelNativeScrolling:function(){return ve.mobile.application&&ve.mobile.application.options&&ve.mobile.application.options.useNativeScrolling},roles:{},ui:{Widget:se,DataBoundWidget:ee.extend(se.prototype),roles:{},plugin:function(e){ve.ui.plugin(e,ve.mobile.ui,"Mobile")}}}),l(ve.dataviz,{init:function(e){ve.init(e,ve.dataviz.ui)},ui:{roles:{},themes:{},views:[],plugin:function(e){ve.ui.plugin(e,ve.dataviz.ui)}},roles:{}}),ve.touchScroller=function(t,n){return n||(n={}),n.useNative=!0,e(t).map(function(t,i){return i=e(i),Se.kineticScrollNeeded&&ve.mobile.ui.Scroller&&!i.data("kendoMobileScroller")?(i.kendoMobileScroller(n),i.data("kendoMobileScroller")):!1})[0]},ve.preventDefault=function(e){e.preventDefault()},ve.widgetInstance=function(e,n){var i,o,r,s,a=e.data(ve.ns+"role"),l=[];if(a){if("content"===a&&(a="scroller"),n)if(n[0])for(i=0,o=n.length;o>i;i++)l.push(n[i].roles[a]);else l.push(n.roles[a]);else l=[ve.ui.roles[a],ve.dataviz.ui.roles[a],ve.mobile.ui.roles[a]];for(a.indexOf(".")>=0&&(l=[ve.getter(a)(t)]),i=0,o=l.length;o>i;i++)if(r=l[i],r&&(s=e.data("kendo"+r.fn.options.prefix+r.fn.options.name)))return s}},ve.onResize=function(n){var i=n;return Se.mobileOS.android&&(i=function(){setTimeout(n,600)}),e(t).on(Se.resize,i),i},ve.unbindResize=function(n){e(t).off(Se.resize,n)},ve.attrValue=function(e,t){return e.data(ve.ns+t)},ve.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return A(t,!isNaN(n)&&n>-1)}}),ae=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],le="label, input, [data-rel=external]",ce={setupMouseMute:function(){var t,n=0,i=ae.length,o=document.documentElement;if(!ce.mouseTrap&&Se.eventCapture)for(ce.mouseTrap=!0,ce.bustClick=!1,ce.captureMouse=!1,t=function(t){ce.captureMouse&&("click"===t.type?ce.bustClick&&!e(t.target).is(le)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};i>n;n++)o.addEventListener(ae[n],t,!0)},muteMouse:function(e){ce.captureMouse=!0,e.data.bustClick&&(ce.bustClick=!0),clearTimeout(ce.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(ce.mouseTrapTimeoutID),ce.mouseTrapTimeoutID=setTimeout(function(){ce.captureMouse=!1,ce.bustClick=!1},400)}},ue={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},Se.touch&&(Se.mobileOS.ios||Se.mobileOS.android)?ue={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:Se.pointers?ue={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:Se.msPointers&&(ue={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!Se.msPointers||"onmspointerenter"in t||e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,o=this,r=t.relatedTarget,s=t.handleObj;return(!r||r!==o&&!e.contains(o,r))&&(t.type=s.origType,i=s.handler.apply(this,arguments),t.type=n),i}}}),he=function(e){return ue[e]||e},de=/([^ ]+)/g,ve.applyEventMap=function(e,t){return e=e.replace(de,he),t&&(e=e.replace(de,"$1."+t)),e},fe=e.fn.on,_e(!0,E,e),E.fn=E.prototype=new e,E.fn.constructor=E,E.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof E)&&(n=E(n)),e.fn.init.call(this,t,n,pe)},E.fn.init.prototype=E.fn,pe=E(document),_e(E.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||ve.guid()),this},on:function(){var e,t,n,i,o,r,s=this,a=s.data("kendoNS");return 1===arguments.length?fe.call(s,arguments[0]):(e=s,t=Ne.call(arguments),typeof t[t.length-1]===ze&&t.pop(),n=t[t.length-1],i=ve.applyEventMap(t[0],a),Se.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(ce.setupMouseMute(),o=2===t.length?null:t[1],r=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,fe.call(this,{touchstart:ce.muteMouse,touchend:ce.unMuteMouse},o,{bustClick:r})),typeof n===Pe&&(e=s.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,fe.apply(s,t),s)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ve.jQuery=E,ve.eventMap=ue,ve.timezone=function(){function e(e,t){var n,i,o,r=t[3],s=t[4],a=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(s)?0===s.indexOf("last")?(n=new Date(Date.UTC(e,u[r]+1,1,a[0]-24,a[1],a[2],0)),i=h[s.substr(4,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o-(i>o?7:0))):s.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,u[r],s.substr(5),a[0],a[1],a[2],0)),i=h[s.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o+(o>i?7:0))):n=new Date(Date.UTC(e,u[r],s,a[0],a[1],a[2],0)),l[e]=n)}function t(t,n,i){var o,r,s,a;return(n=n[i])?(s=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return s>=t&&(n>=s||t==s&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(s,t)),"number"!=typeof n&&(n=+e(s,n)),t-n}),a=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(a)?a:null):(o=i.split(":"),r=0,o.length>1&&(r=60*o[0]+ +o[1]),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"])}function n(e,t,n){var i,o,r,s=t[n];if("string"==typeof s&&(s=t[s]),!s)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=s.length-1;i>=0&&(o=s[i][3],!(o&&e>o));i--);if(r=s[i+1],!r)throw Error('Timezone "'+n+'" not found on '+e+".");return r}function i(e,i,o,r){typeof e!=Ie&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var s=n(e,i,r);return{zone:s,rule:t(e,o,s[1])}}function o(e,t){var n,o,r;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),o=n.zone,r=n.rule,ve.parseFloat(r?o[0]-r[6]:o[0]))}function r(e,t){var n=i(e,this.zones,this.rules,t),o=n.zone,r=n.rule,s=o[2];return s.indexOf("/")>=0?s.split("/")[r&&+r[6]?1:0]:s.indexOf("%s")>=0?s.replace("%s",r&&"-"!=r[7]?r[7]:""):s}function s(e,t,n){var i,o;return typeof t==Pe&&(t=this.offset(e,t)),typeof n==Pe&&(n=this.offset(e,n)),i=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),o=e.getTimezoneOffset(),new Date(e.getTime()+6e4*(o-i))}function a(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}function c(e){return this.apply(new Date(e),"Etc/UTC")}var u={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},h={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:o,convert:s,apply:a,remove:l,abbr:r,toLocalDate:c}}(),ve.date=function(){function e(e,t){return 0===t&&23===e.getHours()?(e.setHours(e.getHours()+2),!0):!1}function t(t,n,i){var o=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,o)}function n(e,n,i){return e=new Date(e),t(e,n,i),e}function i(e){return new Date(e.getFullYear(),e.getMonth(),1)}function o(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=i(e),o=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return o&&t.setHours(n.getHours()+o/60),t}function r(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function s(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function a(e){return e.getTime()-r(e)}function l(e,t,n){var i,o=a(t),r=a(n);return e&&o!=r?(t>=n&&(n+=m),i=a(e),o>i&&(i+=m),o>r&&(r+=m),i>=o&&r>=i):!0}function c(e,t,n){var i,o=t.getTime(),r=n.getTime();return o>=r&&(r+=m),i=e.getTime(),i>=o&&r>=i}function u(t,n){var i=t.getHours();return t=new Date(t),h(t,n*m),e(t,i),t}function h(e,t,n){var i,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-o,e.setTime(e.getTime()+i*g))}function d(){return r(new Date)}function f(e){return r(e).getTime()==d().getTime()}function p(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var g=6e4,m=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:r,isInDateRange:c,isInTimeRange:l,isToday:f,nextDay:function(e){return u(e,1)},previousDay:function(e){return u(e,-1)},toUtcTime:s,MS_PER_DAY:m,MS_PER_HOUR:60*g,MS_PER_MINUTE:g,setTime:h,addDays:u,today:d,toInvariantTime:p,firstDayOfMonth:i,lastDayOfMonth:o,getMilliseconds:a}}(),ve.stripWhitespace=function(e){var t,n,i;if(document.createNodeIterator)for(t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(n=0;e.childNodes.length>n;n++)i=e.childNodes[n],3!=i.nodeType||/\S/.test(i.nodeValue)||(e.removeChild(i),n--),1==i.nodeType&&ve.stripWhitespace(i)},ge=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ve.animationFrame=function(e){ge.call(t,e)},me=[],ve.queueAnimation=function(e){me[me.length]=e,1===me.length&&ve.runNextAnimation()},ve.runNextAnimation=function(){ve.animationFrame(function(){me[0]&&(me.shift()(),me[0]&&ve.runNextAnimation())})},ve.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),o=i.length,r=0;o>r;r+=2)""!==i[r]&&(n[decodeURIComponent(i[r])]=decodeURIComponent(i[r+1]));return n},ve.elementUnderCursor=function(e){return n!==e.x.client?document.elementFromPoint(e.x.client,e.y.client):n},ve.wheelDeltaY=function(e){var t,i=e.originalEvent,o=i.wheelDeltaY;return i.wheelDelta?(o===n||o)&&(t=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(t=10*-i.detail),t},ve.throttle=function(e,t){var i,o,r=0;return!t||0>=t?e:(o=function(){function o(){e.apply(s,l),r=+new Date}var s=this,a=+new Date-r,l=arguments;return r?(i&&clearTimeout(i),a>t?o():i=setTimeout(o,t-a),n):o()},o.cancel=function(){clearTimeout(i)},o)},ve.caret=function(t,i,o){var r,s,a,l,c=i!==n;if(o===n&&(o=i),t[0]&&(t=t[0]),!c||!t.disabled){try{t.selectionStart!==n?c?(t.focus(),t.setSelectionRange(i,o)):i=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),r=t.createTextRange(),c?(r.collapse(!0),r.moveStart("character",i),r.moveEnd("character",o-i),r.select()):(s=r.duplicate(),r.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",r),a=s.text.length,l=a+r.text.length,i=[a,l]))}catch(u){i=[]}return i}},ve.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+ve.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(e).injector().invoke(["$compile",function(t){t(e)(n),/^\$(digest|apply)$/.test(n.$$phase)||n.$digest()}]),ve.widgetInstance(e,ve.mobile.ui)},ve.antiForgeryTokens=function(){var t={},i=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),o=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),o!==n&&i!==n&&(t[o]=i),t},ve.cycleForm=function(e){function t(e){var t=ve.widgetInstance(e);t&&t.focus?t.focus():e.focus()}var n=e.find("input, .k-widget").first(),i=e.find("button, .k-button").last();i.on("keydown",function(e){e.keyCode!=ve.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==ve.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},function(){function n(t,n,i,o){var r,s,a=e("<form>").attr({action:i,method:"POST",target:o}),l=ve.antiForgeryTokens();l.fileName=n,r=t.split(";base64,"),l.contentType=r[0].replace("data:",""),l.base64=r[1];for(s in l)l.hasOwnProperty(s)&&e("<input>").attr({value:l[s],name:s,type:"hidden"}).appendTo(a);a.appendTo("body").submit().remove()}function i(e,t){var n,i,o,r,s,a=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],o=atob(n[1]),r=new Uint8Array(o.length),s=0;o.length>s;s++)r[s]=o.charCodeAt(s);a=new Blob([r.buffer],{type:i})}navigator.msSaveBlob(a,t)}function o(e,n){t.Blob&&e instanceof Blob&&(e=URL.createObjectURL(e)),r.download=n,r.href=e;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(i)}var r=document.createElement("a"),s="download"in r;ve.saveAs=function(e){var t=n;e.forceProxy||(s?t=o:navigator.msSaveBlob&&(t=i)),t(e.dataURI,e.fileName,e.proxyURL,e.proxyTarget)}}()}(jQuery,window)}(),function(){!function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function o(e){var t,n=[];for(t in e)n.push(t);return n}function r(e){for(var t in e)-1!=U.indexOf(t)&&-1==W.indexOf(t)&&delete e[t];return e}function s(e,t){var n,i,o,r,s=[],a={};for(i in t)n=i.toLowerCase(),r=P&&-1!=U.indexOf(n),!M.hasHW3D&&r&&-1==W.indexOf(n)?delete t[i]:(o=t[i],r?s.push(i+"("+o+")"):a[i]=o);return s.length&&(a[ae]=s.join(" ")),a}function a(e,t){var i,o,r;return P?(i=e.css(ae),i==K?"scale"==t?1:0:(o=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),r=0,o?r=n(o[1]):(o=i.match(z)||[0,0,0,0,0],t=t.toLowerCase(),O.test(t)?r=parseFloat(o[3]/o[2]):"translatey"==t?r=parseFloat(o[4]/o[2]):"scale"==t?r=parseFloat(o[2]):"rotate"==t&&(r=parseFloat(Math.atan2(o[2],o[1])))),r)):parseFloat(e.css(t))}function l(e){return e.charAt(0).toUpperCase()+e.substring(1)}function c(e,t){var n=p.extend(t),i=n.prototype.directions;S[l(e)]=n,S.Element.prototype[e]=function(e,t,i,o){return new n(this.element,e,t,i,o)},T(i,function(t,i){S.Element.prototype[e+l(i)]=function(e,t,o){return new n(this.element,i,e,t,o)}})}function u(e,n,i,o){c(e,{directions:m,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,r){var s,a,l=this,c="out"===this._direction,u=l.element.data(n),h=!(isNaN(u)||u==i);s=h?u:t!==this._startValue?this._startValue:c?i:o,a=t!==this._endValue?this._endValue:c?o:i,this._reverse?(e[n]=a,r[n]=s):(e[n]=s,r[n]=a),l._shouldHide=r[n]===o}})}function h(e,t){var n=C.directions[t].vertical,i=e[n?Z:Q]()/2+"px";return _[t].replace("$size",i)}var d,f,p,g,m,v,_,y,w,b,x,k,C=window.kendo,S=C.effects,T=e.each,D=e.extend,A=e.proxy,M=C.support,E=M.browser,P=M.transforms,I=M.transitions,R={scale:0,scalex:0,scaley:0,scale3d:0},B={translate:0,translatex:0,translatey:0,translate3d:0},F=t!==document.documentElement.style.zoom&&!P,z=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,L=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,O=/translatex?$/i,N=/(zoom|fade|expand)(\w+)/,H=/(zoom|fade|expand)/,V=/[xy]$/i,U=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],W=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],j={rotate:"deg",scale:"",skew:"px",translate:"px"},G=P.css,q=Math.round,$="",Y="px",K="none",X="auto",Q="width",Z="height",J="hidden",ee="origin",te="abortId",ne="overflow",ie="translate",oe="position",re="completeCallback",se=G+"transition",ae=G+"transform",le=G+"backface-visibility",ce=G+"perspective",ue="1500px",he="perspective("+ue+")",de={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};C.directions=de,D(e.fn,{kendoStop:function(e,t){return I?S.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),P&&!I&&(T(W,function(n,i){e.fn[i]=function(n){if(t===n)return a(this,i);var o=e(this)[0],r=i+"("+n+j[i.replace(V,"")]+")";return-1==o.style.cssText.indexOf(ae)?e(this).css(ae,r):o.style.cssText=o.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),r),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),d=e.fx.prototype.cur,e.fx.prototype.cur=function(){return-1!=W.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):d.apply(this,arguments)}),C.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),I&&(n=D({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(se,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(se,"").css(Z)},n.duration)),T(t,function(t,n){e.toggleClass(n,i)})),e},C.parseEffects=function(e,t){var n={};return"string"==typeof e?T(e.split(" "),function(e,i){var o=!H.test(i),r=i.replace(N,function(e,t,n){return t+":"+n.toLowerCase()}),s=r.split(":"),a=s[1],l={};s.length>1&&(l.direction=t&&o?de[a].reverse:a),n[s[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!H.test(e)&&(this.direction=de[i].reverse),n[e]=this}),n},I&&D(S,{transition:function(t,n,i){var r,a,l,c,u=0,h=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,c=function(){l||(l=!0,a&&(clearTimeout(a),a=null),t.removeData(te).dequeue().css(se,"").css(se),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=s(t,n),e.merge(h,o(r)),t.data("keys",e.unique(h)).height(),t.css(se,i.exclusive+" "+i.duration+"ms "+i.ease).css(se),t.css(r).css(ae),I.event&&(t.one(I.event,c),0!==i.duration&&(u=500)),a=setTimeout(c,i.duration+u),t.data(te,a),t.data(re,c)},stopQueue:function(e,t,n){var i,o=e.data("keys"),r=!n&&o,s=e.data(re);return r&&(i=C.getComputedStyles(e[0],o)),s&&s(),r&&e.css(i),e.removeData("keys").stop(t)}}),f=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,o,a,l,c,u,h=this,d=t.length,f=h.element,p=h.options,g=e.Deferred(),m={},v={};for(h.effects=t,g.then(e.proxy(h,"complete")),f.data("animating",!0),i=0;d>i;i++)for(n=t[i],n.setReverse(p.reverse),n.setOptions(p),h.addRestoreProperties(n.restore),n.prepare(m,v),l=n.children(),o=0,c=l.length;c>o;o++)l[o].duration(p.duration).run();for(u in p.effects)D(v,p.effects[u].properties);for(f.is(":visible")||D(m,{display:f.data("olddisplay")||"block"}),P&&!p.reset&&(a=f.data("targetTransform"),a&&(m=D(a,m))),m=s(f,m),P&&!I&&(m=r(m)),f.css(m).css(ae),i=0;d>i;i++)t[i].setup();return p.init&&p.init(),f.data("targetTransform",v),S.animate(f,v,D({},p,{complete:g.resolve})),g.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,o=e.length;o>i;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;t>e;e++)n=this.restore[e],i.css(n,i.data(n))},complete:function(){var t=this,n=0,i=t.element,o=t.options,r=t.effects,s=r.length;for(i.removeData("animating").dequeue(),o.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),F&&!P&&setTimeout(e.proxy(this,"restoreCallback"),0);s>n;n++)r[n].teardown();o.completeCallback&&o.completeCallback(i)}}),S.promise=function(e,t){var n,i,o,r=[],s=new f(e,t),a=C.parseEffects(t.effects);t.effects=a;for(o in a)n=S[l(o)],n&&(i=new n(e,a[o].direction),r.push(i));r[0]?s.run(r):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),s.complete())},D(S,{animate:function(n,o,s){var a=s.transition!==!1;delete s.transition,I&&"transition"in S&&a?S.transition(n,o,s):P?n.animate(r(o),{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete}):n.each(function(){var n=e(this),r={};T(U,function(e,s){var a,l,c,u,h,d,f,p=o?o[s]+" ":null;p&&(l=o,s in R&&o[s]!==t?(a=p.match(L),P&&D(l,{scale:+a[0]})):s in B&&o[s]!==t&&(c=n.css(oe),u="absolute"==c||"fixed"==c,n.data(ie)||(u?n.data(ie,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(ie,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),h=n.data(ie),a=p.match(L),a&&(d=s==ie+"y"?0:+a[1],f=s==ie+"y"?+a[1]:+a[2],u?(isNaN(h.right)?isNaN(d)||D(l,{left:h.left+d}):isNaN(d)||D(l,{right:h.right-d}),isNaN(h.bottom)?isNaN(f)||D(l,{top:h.top+f}):isNaN(f)||D(l,{bottom:h.bottom-f})):(isNaN(d)||D(l,{marginLeft:h.left+d}),isNaN(f)||D(l,{marginTop:h.top+f})))),!P&&"scale"!=s&&s in l&&delete l[s],l&&D(r,l))}),E.msie&&delete r.scale,n.animate(r,{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete})})}}),S.animatedPromise=S.promise,p=C.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new f(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,o=i.element,a=0,l=i.restore,c=l.length,u=e.Deferred(),h={},d={},f=i.children(),p=f.length;for(u.then(e.proxy(i,"_complete")),o.data("animating",!0),a=0;c>a;a++)t=l[a],o.data(t)||o.data(t,o.css(t));for(a=0;p>a;a++)f[a].duration(i._duration).run();return i.prepare(h,d),o.is(":visible")||D(h,{display:o.data("olddisplay")||"block"}),P&&(n=o.data("targetTransform"),n&&(h=D(n,h))),h=s(o,h),P&&!I&&(h=r(h)),o.css(h).css(ae),i.setup(),o.data("targetTransform",d),S.animate(o,d,{duration:i._duration,complete:u.resolve}),u.promise()},stop:function(){var t=0,n=this.children(),i=n.length;for(t=0;i>t;t++)n[t].stop();return e(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;t>e;e++)n=this.restore[e],i.css(n,i.data(n))},_complete:function(){var t=this,n=t.element;n.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&n.data("olddisplay",n.css("display")).hide(),F&&!P&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){D(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),g=["left","right","up","down"],m=["in","out"],c("slideIn",{directions:g,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,o=i.element,r=de[i._direction],s=-r.modifier*(r.vertical?o.outerHeight():o.outerWidth()),a=s/(i.options&&i.options.divisor||1)+Y,l="0px";i._reverse&&(n=e,e=t,t=n),P?(e[r.transition]=a,t[r.transition]=l):(e[r.property]=a,t[r.property]=l)}}),c("tile",{directions:g,init:function(e,t,n){p.prototype.init.call(this,e,t),this.options={previous:n}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e.options.previousDivisor||1,o=e._direction,r=[C.fx(e.element).slideIn(o).setReverse(t)];return n&&r.push(C.fx(n).slideIn(de[o].reverse).divisor(i).setReverse(!t)),r}}),u("fade","opacity",1,0),u("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var n,i=this,o=i.element,r=i.options,s=o.data(ee),a=r.offset,l=i._reverse;l||null!==s||o.data(ee,parseFloat(o.css("margin-"+r.axis))),n=o.data(ee)||0,t["margin-"+r.axis]=l?n:n+a}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,o=n.options,r=o.offset.split(","),s=n._reverse;P?(t.translatex=s?0:r[0],t.translatey=s?0:r[1]):(t.left=s?0:r[0],t.top=s?0:r[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[ne],prepare:function(e,n){var i=this,o=i.element,r=i.options,s=i._reverse,a="vertical"===i._direction?Z:Q,l=o[0].style[a],c=o.data(a),u=parseFloat(c||l),h=q(o.css(a,X)[a]());e.overflow=J,u=r&&r.reset?h||u:u||h,n[a]=(s?0:u)+Y,e[a]=(s?u:0)+Y,c===t&&o.data(a,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?Z:Q,i=t.data(n);(i==X||i===$)&&setTimeout(function(){t.css(n,X).css(n)},0)}}),v={position:"absolute",marginLeft:0,marginTop:0,scale:1},c("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var n=this,i=n.element,o=S.box(i),r=S.box(n.options.target),s=a(i,"scale"),l=S.fillScale(r,o),c=S.transformOrigin(r,o);D(e,v),t.scale=1,i.css(ae,"scale(1)").css(ae),i.css(ae,"scale("+s+")"),e.top=o.top,e.left=o.left,e.transformOrigin=c.x+Y+" "+c.y+Y,n._reverse?e.scale=l:t.scale=l}}),_={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},y={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},c("turningPage",{directions:g,init:function(e,t,n){p.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,o=i?de[n._direction].reverse:n._direction,r=y[o];e.zIndex=1,n._clipInHalf&&(e.clip=h(n._container,C.directions[o].reverse)),e[le]=J,t[ae]=he+(i?r.start:r.end),e[ae]=he+(i?r.end:r.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:g,init:function(e,t,n){p.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?de[n._direction].reverse:n._direction;e.clip=h(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){p.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",o=C.directions[i].reverse,r=t._reverse,s=n.face.clone(!0).removeAttr("id"),a=n.back.clone(!0).removeAttr("id"),l=t.element;return r&&(e=i,i=o,o=e),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(r),C.fx(n.back).staticPage(o,l).setReverse(r),C.fx(s).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(r),C.fx(a).turningPage(o,l).clipInHalf(!0).temporary().setReverse(r)]},prepare:function(e,t){e[ce]=ue,e.transformStyle="preserve-3d",e.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove();
|
|
}}),c("flip",{directions:["horizontal","vertical"],init:function(e,t,n,i){p.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",o=C.directions[i].reverse,r=t._reverse,s=t.element;return r&&(e=i,i=o,o=e),[C.fx(n.face).turningPage(i,s).face(!0).setReverse(r),C.fx(n.back).turningPage(o,s).setReverse(r)]},prepare:function(e){e[ce]=ue,e.transformStyle="preserve-3d"}}),w=!M.mobileOS.android,b=".km-touch-scrollbar, .km-actionsheet-wrapper",c("replace",{_before:e.noop,_after:e.noop,init:function(t,n,i){p.prototype.init.call(this,t),this._previous=e(n),this._transitionClass=i},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")},beforeTransition:function(e){return this._before=e,this},afterTransition:function(e){return this._after=e,this},_both:function(){return e().add(this._element).add(this._previous)},_containerClass:function(){var e=this._direction,t="k-fx k-fx-start k-fx-"+this._transitionClass;return e&&(t+=" k-fx-"+e),this._reverse&&(t+=" k-fx-reverse"),t},complete:function(t){if(!(!this.deferred||t&&e(t.target).is(b))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(I.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),w&&n.css(ne,""),this.isAbsolute||this._both().css(oe,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n=this,i=n.element,o=n._previous,r=i.parents().filter(o.parents()).first(),s=n._both(),a=e.Deferred(),l=i.css(oe);return r.length||(r=i.parent()),this.container=r,this.deferred=a,this.isAbsolute="absolute"==l,this.isAbsolute||s.css(oe,"absolute"),w&&(t=r.css(ne),r.css(ne,"hidden")),I?(i.addClass("k-fx-hidden"),r.addClass(this._containerClass()),this.completeProxy=e.proxy(this,"complete"),r.on(I.event,this.completeProxy),C.animationFrame(function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),o.css("display","").addClass("k-fx-current"),n._before(o,i),C.animationFrame(function(){r.removeClass("k-fx-start").addClass("k-fx-end"),n._after(o,i)})})):this.complete(),a.promise()},stop:function(){this.complete()}}),x=C.Class.extend({init:function(){var e=this;e._tickProxy=A(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,C.animationFrame(this._tickProxy)))},enabled:function(){return!0},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):C.animationFrame(e._tickProxy))}}),k=x.extend({init:function(e){var t=this;D(t,e),x.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),D(k,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,o){return o=1.70158,n*((e=e/i-1)*e*((o+1)*e+o)+1)+t}}),S.Animation=x,S.Transition=k,S.createEffect=c,S.box=function(t){t=e(t);var n=t.offset();return n.width=t.outerWidth(),n.height=t.outerHeight(),n},S.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},S.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},S.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){if(!t)return e;e+"/"===t&&(e=t);var n=RegExp("^"+t,"i");return n.test(e)||(e=t+"/"+e),f.protocol+"//"+(f.host+"/"+e).replace(/\/\/+/g,"/")}function i(e){return e?"#!":"#"}function o(e){var t=f.href;return"#!"===e&&t.indexOf("#")>-1&&t.indexOf("#!")<0?null:t.split(e)[1]||""}function r(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):t}function s(e){return e.replace(/^(#)?/,"#")}function a(e){return e.replace(/^(#(!)?)?/,"#!")}var l=window.kendo,c="change",u="back",h="same",d=l.support,f=window.location,p=window.history,g=50,m=l.support.browser.msie,v=/^#*/,_=window.document,y=l.Class.extend({back:function(){m?setTimeout(function(){p.back()}):p.back()},forward:function(){m?setTimeout(function(){p.forward()}):p.forward()},length:function(){return p.length},replaceLocation:function(e){f.replace(e)}}),w=y.extend({init:function(e){this.root=e},navigate:function(e){p.pushState({},_.title,n(e,this.root))},replace:function(e){p.replaceState({},_.title,n(e,this.root))},normalize:function(e){return r(this.root,e)},current:function(){var e=f.pathname;return f.search&&(e+=f.search),r(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,r=e.root,s=f.pathname,a=o(i(e.hashBang));r===s+"/"&&(t=r),r===s&&a&&(t=n(a.replace(v,""),r)),t&&p.pushState({},_.title,t)}}),b=y.extend({init:function(e){this._id=l.guid(),this.prefix=i(e),this.fix=e?a:s},navigate:function(e){f.hash=this.fix(e)},replace:function(e){this.replaceLocation(this.fix(e))},normalize:function(e){return e.indexOf(this.prefix)<0?e:e.split(this.prefix)[1]},change:function(t){d.hashChange?e(window).on("hashchange."+this._id,t):this._interval=setInterval(t,g)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return o(this.prefix)},normalizeCurrent:function(e){var t=f.pathname,n=e.root;return e.pushState&&n!==t?(this.replaceLocation(n+this.prefix+r(n,t)),!0):!1}}),x=l.Observable.extend({start:function(t){if(t=t||{},this.bind([c,u,h],t),!this._started){this._started=!0,t.root=t.root||"/";var n,i=this.createAdapter(t);i.normalizeCurrent(t)||(n=i.current(),e.extend(this,{adapter:i,root:t.root,historyLength:i.length(),current:n,locations:[n]}),i.change(e.proxy(this,"_checkUrl")))}},createAdapter:function(e){return d.pushState&&e.pushState?new w(e.root):new b(e.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(c),this._started=!1)},change:function(e){this.bind(c,e)},replace:function(e,t){this._navigate(e,t,function(t){t.replace(e),this.locations[this.locations.length-1]=this.current})},navigate:function(e,n){return"#:back"===e?(this.backCalled=!0,this.adapter.back(),t):(this._navigate(e,n,function(t){t.navigate(e),this.locations.push(this.current)}),t)},_navigate:function(e,n,i){var o=this.adapter;return e=o.normalize(e),this.current===e||this.current===decodeURIComponent(e)?(this.trigger(h),t):((n||!this.trigger(c,{url:e}))&&(this.current=e,i.call(this,o),this.historyLength=o.length()),t)},_checkUrl:function(){var e=this.adapter,n=e.current(),i=e.length(),o=this.historyLength===i,r=n===this.locations[this.locations.length-2]&&o,s=this.backCalled,a=this.current;return null===n||this.current===n||this.current===decodeURIComponent(n)?!0:(this.historyLength=i,this.backCalled=!1,this.current=n,r&&this.trigger("back",{url:a,to:n})?(e.forward(),this.current=a,t):this.trigger(c,{url:n,backButtonPressed:!s})?(r?e.forward():(e.back(),this.historyLength--),this.current=a,t):(r?this.locations.pop():this.locations.push(n),t))}});l.History=x,l.History.HistoryAdapter=y,l.History.HashAdapter=b,l.History.PushStateAdapter=w,l.absoluteURL=n,l.history=new x}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t,n){return RegExp("^"+t.replace(p,"\\$&").replace(h,"(?:$1)?").replace(d,e).replace(f,"(.*?)")+"$",n?"i":"")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,o=i.history,r=i.Observable,s="init",a="routeMissing",l="change",c="back",u="same",h=/\((.*?)\)/g,d=/(\(\?)?:\w+/g,f=/\*\w+/g,p=/[\-{}\[\]+?.,\\\^$|#\s]/g,g=i.Class.extend({init:function(e,n,i){e instanceof RegExp||(e=t(e,i)),this.route=e,this._callback=n},callback:function(e,t){var o,r,s=0,a=i.parseQueryStringParams(e);for(a._back=t,e=n(e),o=this.route.exec(e).slice(1),r=o.length;r>s;s++)void 0!==o[s]&&(o[s]=decodeURIComponent(o[s]));o.push(a),this._callback.apply(null,o)},worksWith:function(e,t){return this.route.test(n(e))?(this.callback(e,t),!0):!1}}),m=r.extend({init:function(e){e||(e={}),r.fn.init.call(this),this.routes=[],this.pushState=e.pushState,this.hashBang=e.hashBang,this.root=e.root,this.ignoreCase=e.ignoreCase!==!1,this.bind([s,a,l,u],e)},destroy:function(){o.unbind(l,this._urlChangedProxy),o.unbind(u,this._sameProxy),o.unbind(c,this._backProxy),this.unbind()},start:function(){var e,t=this,n=function(){t._same()},i=function(e){t._back(e)},r=function(e){t._urlChanged(e)};o.start({same:n,change:r,back:i,pushState:t.pushState,hashBang:t.hashBang,root:t.root}),e={url:o.current||"/",preventDefault:$.noop},t.trigger(s,e)||t._urlChanged(e),this._urlChangedProxy=r,this._backProxy=i},route:function(e,t){this.routes.push(new g(e,t,this.ignoreCase))},navigate:function(e,t){i.history.navigate(e,t)},replace:function(e,t){i.history.replace(e,t)},_back:function(e){this.trigger(c,{url:e.url,to:e.to})&&e.preventDefault()},_same:function(){this.trigger(u)},_urlChanged:function(e){var t,n,o,r,s=e.url,c=e.backButtonPressed;if(s||(s="/"),this.trigger(l,{url:e.url,params:i.parseQueryStringParams(e.url),backButtonPressed:c}))return void e.preventDefault();for(t=0,n=this.routes,r=n.length;r>t;t++)if(o=n[t],o.worksWith(s,c))return;this.trigger(a,{url:s,params:i.parseQueryStringParams(s),backButtonPressed:c})&&e.preventDefault()}});i.Router=m}()}(),function(){!function(e,t){function n(i,r){var l,c,u,h,d,f,p,g,m=[],v=i.logic||"and",_=i.filters;for(l=0,c=_.length;c>l;l++)i=_[l],u=i.field,p=i.value,f=i.operator,i.filters?i=n(i,r):(g=i.ignoreCase,u=u.replace(/\./g,"/"),i=s[f],r&&(i=a[f]),i&&p!==t&&(h=e.type(p),"string"===h?(d="'{1}'",p=p.replace(/'/g,"''"),g===!0&&(u="tolower("+u+")")):d="date"===h?r?"{1:yyyy-MM-ddTHH:mm:ss+00:00}":"datetime'{1:yyyy-MM-ddTHH:mm:ss}'":"{1}",i.length>3?"substringof"!==i?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===f&&(r?(d="{0}({2},'{1}') eq -1",i="indexof"):d+=" eq false")):d="{2} {0} "+d,i=o.format(d,i,p,u))),m.push(i);return i=m.join(" "+v+" "),m.length>1&&(i="("+i+")"),i}function i(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}var o=window.kendo,r=e.extend,s={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith"},a=r({},s,{contains:"contains"}),l={pageSize:e.noop,page:e.noop,filter:function(e,t,i){t&&(t=n(t,i),t&&(e.$filter=t))},sort:function(t,n){var i=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");i&&(t.$orderby=i)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},c={read:{dataType:"jsonp"}};r(!0,o.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t,n){var i,r,s,a;if(e=e||{},t=t||"read",a=(this.options||c)[t],a=a?a.dataType:"json","read"===t){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(s in e)l[s]?l[s](i,e[s],n):i[s]=e[s]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(s in e)r=e[s],"number"==typeof r&&(e[s]=r+"");i=o.stringify(e)}}return i}}}}),r(!0,o.data,{schemas:{"odata-v4":{type:"json",data:function(t){return t=e.extend({},t),i(t),t.value?t.value:[t]},total:function(e){return e["@odata.count"]}}},transports:{"odata-v4":{read:{cache:!0,dataType:"json"},update:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t){var n=o.data.transports.odata.parameterMap(e,t,!0);return"read"==t&&(n.$count=!0,delete n.$inlinecount),n}}}})}(window.kendo.jQuery)}(),function(){!function(e,t){var n=window.kendo,i=e.isArray,o=e.isPlainObject,r=e.map,s=e.each,a=e.extend,l=n.getter,c=n.Class,u=c.extend({init:function(t){var l,c,u,h,d=this,f=t.total,p=t.model,g=t.parse,m=t.errors,v=t.serialize,_=t.data;p&&(o(p)&&(l=t.modelBase||n.data.Model,p.fields&&s(p.fields,function(t,n){o(n)&&n.field?e.isFunction(n.field)||(n=a(n,{field:d.getter(n.field)})):n={field:d.getter(n)},p.fields[t]=n}),c=p.id,c&&(u={},u[d.xpathToMember(c,!0)]={field:d.getter(c)},p.fields=a(u,p.fields),p.id=d.xpathToMember(c)),p=l.define(p)),d.model=p),f&&("string"==typeof f?(f=d.getter(f),d.total=function(e){return parseInt(f(e),10)}):"function"==typeof f&&(d.total=f)),m&&("string"==typeof m?(m=d.getter(m),d.errors=function(e){return m(e)||null}):"function"==typeof m&&(d.errors=m)),_&&("string"==typeof _?(_=d.xpathToMember(_),d.data=function(e){var t,n=d.evaluate(e,_);return n=i(n)?n:[n],d.model&&p.fields?(t=new d.model,r(n,function(e){if(e){var n,i={};for(n in p.fields)i[n]=t._parse(n,p.fields[n].field(e));return i}})):n}):"function"==typeof _&&(d.data=_)),"function"==typeof g&&(h=d.parse,d.parse=function(e){var t=g.call(d,e);return h.call(d,t)}),"function"==typeof v&&(d.serialize=v)},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},serialize:function(e){return e},parseDOM:function(e){var n,o,r,s,a,l,c,u={},h=e.attributes,d=h.length;for(c=0;d>c;c++)l=h[c],u["@"+l.nodeName]=l.nodeValue;for(o=e.firstChild;o;o=o.nextSibling)r=o.nodeType,3===r||4===r?u["#text"]=o.nodeValue:1===r&&(n=this.parseDOM(o),s=o.nodeName,a=u[s],i(a)?a.push(n):a=a!==t?[a,n]:n,u[s]=a);return u},evaluate:function(e,t){for(var n,o,r,s,a,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(o=[],t=l.join("."),a=0,r=e.length;r>a;a++)s=this.evaluate(e[a],t),s=i(s)?s:[s],o.push.apply(o,s);return o}return e},parse:function(t){var n,i,o={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),o[n.nodeName]=i,o},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:u,readers:{xml:u}})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t,n,i){return function(o){var r,s={};for(r in o)s[r]=o[r];s.field=i?n+"."+o.field:n,t==ye&&e._notifyChange&&e._notifyChange(s),e.trigger(t,s)}}function i(t,n){if(t===n)return!0;var o,r=e.type(t),s=e.type(n);if(r!==s)return!1;if("date"===r)return t.getTime()===n.getTime();if("object"!==r&&"array"!==r)return!1;for(o in t)if(!i(t[o],n[o]))return!1;return!0}function o(e,t){var n,i;for(i in e){if(n=e[i],ne(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function r(e){this.data=e||[]}function s(e,n){if(e){var i=typeof e===fe?{field:e,dir:n}:e,o=oe(i)?i:i!==t?[i]:[];return re(o,function(e){return!!e.dir})}}function a(e){var t,n,i,o,r=e.filters;if(r)for(t=0,n=r.length;n>t;t++)i=r[t],o=i.operator,o&&typeof o===fe&&(i.operator=U[o.toLowerCase()]||o),a(i)}function l(e){return e&&!ie(e)?((oe(e)||!e.filters)&&(e={logic:"and",filters:oe(e)?e:[e]}),a(e),e):t}function c(e){return oe(e)?e:[e]}function u(e,n){var i=typeof e===fe?{field:e,dir:n}:e,o=oe(i)?i:i!==t?[i]:[];return O(o,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates}})}function h(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function d(e,t,n,i,o,r){var s,a,l,c,u;for(t=t||[],c=t.length,s=0;c>s;s++)a=t[s],l=a.aggregate,u=a.field,e[u]=e[u]||{},r[u]=r[u]||{},r[u][l]=r[u][l]||{},e[u][l]=W[l.toLowerCase()](e[u][l],n,ce.accessor(u),i,o,r[u][l])}function f(e){return"number"==typeof e&&!isNaN(e)}function p(e){return e&&e.getTime}function g(e){var t,n=e.length,i=Array(n);for(t=0;n>t;t++)i[t]=e[t].toJSON();return i}function m(e,t,n,i,o){var r,s,a,l,c,u={};for(l=0,c=e.length;c>l;l++){r=e[l];for(s in t)a=o[s],a&&a!==s&&(u[a]||(u[a]=ce.setter(a)),u[a](r,t[s](r)),delete r[s])}}function v(e,t,n,i,o){var r,s,a,l,c;for(l=0,c=e.length;c>l;l++){r=e[l];for(s in t)r[s]=n._parse(s,t[s](r)),a=o[s],a&&a!==s&&delete r[a]}}function _(e,t,n,i,o){var r,s,a,l;for(s=0,l=e.length;l>s;s++)r=e[s],a=i[r.field],a&&a!=r.field&&(r.field=a),r.value=n._parse(r.field,r.value),r.hasSubgroups?_(r.items,t,n,i,o):v(r.items,t,n,i,o)}function y(e,t,n,i,o,r){return function(s){return s=e(s),s&&!ie(i)&&("[object Array]"===Oe.call(s)||s instanceof We||(s=[s]),n(s,i,new t,o,r)),s||[]}}function w(e,t,n,i){for(var o,r,s,a=0;t.length&&i&&(o=t[a],r=o.items,s=r.length,e&&e.field===o.field&&e.value===o.value?(e.hasSubgroups&&e.items.length?w(e.items[e.items.length-1],o.items,n,i):(r=r.slice(n,n+i),e.items=e.items.concat(r)),t.splice(a--,1)):o.hasSubgroups&&r.length?(w(o,r,n,i),o.items.length||t.splice(a--,1)):(r=r.slice(n,n+i),o.items=r,o.items.length||t.splice(a--,1)),0===r.length?n-=s:(n=0,i-=r.length),!(++a>=t.length)););t.length>a&&t.splice(a,t.length-a)}function b(e){var t,n,i,o,r,s=[];for(t=0,n=e.length;n>t;t++)if(r=e.at(t),r.hasSubgroups)s=s.concat(b(r.items));else for(i=r.items,o=0;i.length>o;o++)s.push(i.at(o));return s}function x(e,t){var n,i,o;if(t)for(n=0,i=e.length;i>n;n++)o=e.at(n),o.hasSubgroups?x(o.items,t):o.items=new je(o.items,t)}function k(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n].hasSubgroups){if(k(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function C(e,t,n,i){for(var o=0;e.length>o&&e[o].data!==t&&!S(e[o].data,n,i);o++);}function S(e,t,n){for(var i=0,o=e.length;o>i;i++){if(e[i]&&e[i].hasSubgroups)return S(e[i].items,t,n);if(e[i]===t||e[i]===n)return e[i]=n,!0}}function T(e,n,i,o,r){var s,a,l,c;for(s=0,a=e.length;a>s;s++)if(l=e[s],l&&!(l instanceof o))if(l.hasSubgroups===t||r){for(c=0;n.length>c;c++)if(n[c]===l){e[s]=n.at(c),C(i,n,l,e[s]);break}}else T(l.items,n,i,o,r)}function D(e,t){var n,i,o;for(n=0,i=e.length;i>n;n++)if(o=e.at(n),o.uid==t.uid)return e.splice(n,1),o}function A(e,t){return t?E(e,function(e){return e.uid&&e.uid==t.uid||e[t.idField]===t.id&&t.id!==t._defaultId}):-1}function M(e,t){return t?E(e,function(e){return e.uid==t.uid}):-1}function E(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(t(e[n]))return n;return-1}function P(e,t){var n,i;return e&&!ie(e)?(n=e[t],i=ne(n)?n.from||n.field||t:e[t]||t,ue(i)?t:i):t}function I(e,t){var n,i,o,r={};for(o in e)"filters"!==o&&(r[o]=e[o]);if(e.filters)for(r.filters=[],n=0,i=e.filters.length;i>n;n++)r.filters[n]=I(e.filters[n],t);else r.field=P(t.fields,r.field);return r}function R(e,t){var n,i,o,r,s,a=[];for(n=0,i=e.length;i>n;n++){o={},r=e[n];for(s in r)o[s]=r[s];o.field=P(t.fields,o.field),o.aggregates&&oe(o.aggregates)&&(o.aggregates=R(o.aggregates,t)),a.push(o)}return a}function B(t,n){var i,o,r,s,a,l,c,u,h,d;for(t=e(t)[0],i=t.options,o=n[0],r=n[1],s=[],a=0,l=i.length;l>a;a++)h={},u=i[a],c=u.parentNode,c===t&&(c=null),u.disabled||c&&c.disabled||(c&&(h.optgroup=c.label),h[o.field]=u.text,d=u.attributes.value,d=d&&d.specified?u.value:u.text,h[r.field]=d,s.push(h));return s}function F(t,n){var i,o,r,s,a,l,c,u=e(t)[0].tBodies[0],h=u?u.rows:[],d=n.length,f=[];for(i=0,o=h.length;o>i;i++){for(a={},c=!0,s=h[i].cells,r=0;d>r;r++)l=s[r],"th"!==l.nodeName.toLowerCase()&&(c=!1,a[n[r].field]=l.innerHTML);c||f.push(a)}return f}function z(e){return function(){var t=this._data,n=Y.fn[e].apply(this,ze.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function L(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var o,r,s,a,l,c,u,h,d=e(t).children(),f=[],p=n[0].field,g=n[1]&&n[1].field,m=n[2]&&n[2].field,v=n[3]&&n[3].field;for(o=0,r=d.length;r>o;o++)s={_loaded:!0},a=d.eq(o),c=a[0].firstChild,h=a.children(),t=h.filter("ul"),h=h.filter(":not(ul)"),l=a.attr("data-id"),l&&(s.id=l),c&&(s[p]=3==c.nodeType?c.nodeValue:h.text()),g&&(s[g]=i(h,"a").attr("href")),v&&(s[v]=i(h,"img").attr("src")),m&&(u=i(h,".k-sprite").prop("className"),s[m]=u&&e.trim(u.replace("k-sprite",""))),t.length&&(s.items=L(t.eq(0),n)),"true"==a.attr("data-hasChildren")&&(s.hasChildren=!0),f.push(s);return f}var O,N,H,V,U,W,j,G,q,$,Y,K,X,Q,Z,J,ee=e.extend,te=e.proxy,ne=e.isPlainObject,ie=e.isEmptyObject,oe=e.isArray,re=e.grep,se=e.ajax,ae=e.each,le=e.noop,ce=window.kendo,ue=ce.isFunction,he=ce.Observable,de=ce.Class,fe="string",pe="function",ge="create",me="read",ve="update",_e="destroy",ye="change",we="sync",be="get",xe="error",ke="requestStart",Ce="progress",Se="requestEnd",Te=[ge,me,ve,_e],De=function(e){return e},Ae=ce.getter,Me=ce.stringify,Ee=Math,Pe=[].push,Ie=[].join,Re=[].pop,Be=[].splice,Fe=[].shift,ze=[].slice,Le=[].unshift,Oe={}.toString,Ne=ce.support.stableSort,He=/^\/Date\((.*?)\)\/$/,Ve=/(\r+|\n+)/g,Ue=/(?=['\\])/g,We=he.extend({init:function(e,t){var n=this;n.type=t||Ge,he.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},at:function(e){return this[e]},toJSON:function(){var e,t,n=this.length,i=Array(n);for(e=0;n>e;e++)t=this[e],t instanceof Ge&&(t=t.toJSON()),i[e]=t;return i},parent:le,wrapAll:function(e,t){var n,i,o=this,r=function(){return o};for(t=t||[],n=0,i=e.length;i>n;n++)t[n]=o.wrap(e[n],r);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===Oe.call(e)&&(n=e instanceof i.type||e instanceof Ye,n||(e=e instanceof Ge?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(ye,function(e){i.trigger(ye,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemloaded":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Pe.apply(this,n),this.trigger(ye,{action:"add",index:t,items:n}),e},slice:ze,sort:[].sort,join:Ie,pop:function(){var e=this.length,t=Re.apply(this);return e&&this.trigger(ye,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,o,r,s=this.wrapAll(ze.call(arguments,2));if(i=Be.apply(this,[e,t].concat(s)),i.length)for(this.trigger(ye,{action:"remove",index:e,items:i}),o=0,r=i.length;r>o;o++)i[o]&&i[o].children&&i[o].unbind(ye);return n&&this.trigger(ye,{action:"add",index:e,items:s}),i},shift:function(){var e=this.length,t=Fe.apply(this);return e&&this.trigger(ye,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Le.apply(this,t),this.trigger(ye,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;n>t;t++)if(i[t]===e)return t;return-1},forEach:function(e){for(var t=0,n=this.length;n>t;t++)e(this[t],t,this)},map:function(e){for(var t=0,n=[],i=this.length;i>t;t++)n[t]=e(this[t],t,this);return n},reduce:function(e){var t,n=0,i=this.length;for(2==arguments.length?t=arguments[1]:i>n&&(t=this[n++]);i>n;n++)t=e(t,this[n],n,this);return t},reduceRight:function(e){var t,n=this.length-1;for(2==arguments.length?t=arguments[1]:n>0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e){for(var t,n=0,i=[],o=this.length;o>n;n++)t=this[n],e(t,n,this)&&(i[i.length]=t);return i},find:function(e){for(var t,n=0,i=this.length;i>n;n++)if(t=this[n],e(t,n,this))return t},every:function(e){for(var t,n=0,i=this.length;i>n;n++)if(t=this[n],!e(t,n,this))return!1;return!0},some:function(e){for(var t,n=0,i=this.length;i>n;n++)if(t=this[n],e(t,n,this))return!0;return!1},remove:function(e){var t=this.indexOf(e);-1!==t&&this.splice(t,1)},empty:function(){this.splice(0,this.length)}}),je=We.extend({init:function(e,t){he.fn.init.call(this),this.type=t||Ge;for(var n=0;e.length>n;n++)this[n]=e[n];this.length=n,this._parent=te(function(){return this},this)},at:function(e){var t=this[e];return t instanceof this.type?t.parent=this._parent:t=this[e]=this.wrap(t,this._parent),t}}),Ge=he.extend({init:function(e){var t,n,i=this,o=function(){return i};he.fn.init.call(this),this._handlers={};for(n in e)t=e[n],"object"==typeof t&&t&&!t.getTime&&"_"!=n.charAt(0)&&(t=i.wrap(t,n,o)),i[n]=t;i.uid=ce.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_handlers"!==e&&"_events"!==e&&typeof this[e]!==pe&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(){var e,t,n={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof Ge||e instanceof We)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(be,{field:e}),t="this"===e?n:ce.getter(e,!0)(n)},_set:function(e,t){var n,i,o,r=this,s=e.indexOf(".")>=0;if(s)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),o=ce.getter(i,!0)(r),o instanceof Ge)return o.set(n.join("."),t),s;i+="."}return ce.setter(e)(r,t),s},set:function(e,t){var n=this,i=e.indexOf(".")>=0,o=ce.getter(e,!0)(n);o!==t&&(o instanceof he&&this._handlers[e]&&(this._handlers[e].get&&o.unbind(be,this._handlers[e].get),o.unbind(ye,this._handlers[e].change)),n.trigger("set",{field:e,value:t})||(i||(t=n.wrap(t,e,function(){return n})),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(ye,{field:e})))},parent:le,wrap:function(e,t,i){var o,r,s,a,l=this,c=Oe.call(e);return null==e||"[object Object]"!==c&&"[object Array]"!==c||(s=e instanceof We,a=e instanceof Y,"[object Object]"!==c||a||s?("[object Array]"===c||s||a)&&(s||a||(e=new We(e)),r=n(l,ye,t,!1),e.bind(ye,r),l._handlers[t]={change:r}):(e instanceof Ge||(e=new Ge(e)),o=n(l,be,t,!0),e.bind(be,o),r=n(l,ye,t,!0),e.bind(ye,r),l._handlers[t]={get:o,change:r}),e.parent=i),e}}),qe={number:function(e){return ce.parseFloat(e)},date:function(e){return ce.parseDate(e)},"boolean":function(e){return typeof e===fe?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},$e={string:"",number:0,date:new Date,"boolean":!1,"default":""},Ye=Ge.extend({init:function(n){var i,o,r=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},r.defaults,n),r._initializers))for(i=0;r._initializers.length>i;i++)o=r._initializers[i],n[o]=r.defaults[o]();Ge.fn.init.call(r,n),r.dirty=!1,r.idField&&(r.id=r.get(r.idField),r.id===t&&(r.id=r._defaultId))},shouldSerialize:function(e){return Ge.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,r=e,s=i.fields||{};return e=s[e],e||(e=o(s,r)),e&&(n=e.parse,!n&&e.type&&(n=qe[e.type.toLowerCase()])),n?n(t):t},_notifyChange:function(e){var t=e.action;("add"==t||"remove"==t)&&(this.dirty=!0)},editable:function(e){return e=(this.fields||{})[e],e?e.editable!==!1:!0},set:function(e,t,n){var o=this;o.editable(e)&&(t=o._parse(e,t),i(t,o.get(e))||(o.dirty=!0,Ge.fn.set.call(o,e,t,n)))},accept:function(e){var t,n,i=this,o=function(){return i};for(t in e)n=e[t],"_"!=t.charAt(0)&&(n=i.wrap(e[t],t,o)),i._set(t,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1},isNew:function(){return this.id===this._defaultId}});Ye.define=function(e,n){n===t&&(n=e,e=Ye);var i,o,r,s,a,l,c,u,h=ee({defaults:{}},n),d={},f=h.id,p=[];if(f&&(h.idField=f),h.id&&delete h.id,f&&(h.defaults[f]=h._defaultId=""),"[object Array]"===Oe.call(h.fields)){for(l=0,c=h.fields.length;c>l;l++)r=h.fields[l],typeof r===fe?d[r]={}:r.field&&(d[r.field]=r);h.fields=d}for(o in h.fields)r=h.fields[o],s=r.type||"default",a=null,u=o,o=typeof r.field===fe?r.field:o,r.nullable||(a=h.defaults[u!==o?u:o]=r.defaultValue!==t?r.defaultValue:$e[s.toLowerCase()],"function"==typeof a&&p.push(o)),n.id===o&&(h._defaultId=a),h.defaults[u!==o?u:o]=a,r.parse=r.parse||qe[s];return p.length>0&&(h._initializers=p),i=e.extend(h),i.define=function(e){return Ye.define(i,e)},h.fields&&(i.fields=h.fields,i.idField=h.idField),i},N={selector:function(e){return ue(e)?e:Ae(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:n>e?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,o,r=e[0](t,n);for(i=1,o=e.length;o>i;i++)r=r||e[i](t,n);return r}}},H=ee({},N,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),o=t(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?e.__position-n.__position:null==i?-1:null==o?1:i.localeCompare?i.localeCompare(o):i>o?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),o=t(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?e.__position-n.__position:null==i?1:null==o?-1:o.localeCompare?o.localeCompare(i):o>i?1:-1}},create:function(e){return this[e.dir](e.field)}}),O=function(e,t){var n,i=e.length,o=Array(i);for(n=0;i>n;n++)o[n]=t(e[n],n,e);return o},V=function(){function e(e){return e.replace(Ue,"\\").replace(Ve,"")}function t(t,n,i,o){var r;return null!=i&&(typeof i===fe&&(i=e(i),r=He.exec(i),r?i=new Date(+r[1]):o?(i="'"+i.toLowerCase()+"'",n="("+n+" || '').toLowerCase()"):i="'"+i+"'"),i.getTime&&(n="("+n+"?"+n+".getTime():"+n+")",i=i.getTime())),n+" "+t+" "+i}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":"string"==typeof t?"'"+e(t)+"'":""+t},eq:function(e,n,i){return t("==",e,n,i)},neq:function(e,n,i){return t("!=",e,n,i)},gt:function(e,n,i){return t(">",e,n,i)},gte:function(e,n,i){return t(">=",e,n,i)},lt:function(e,n,i){return t("<",e,n,i)},lte:function(e,n,i){return t("<=",e,n,i)},startswith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".lastIndexOf('"+n+"', 0) == 0"},doesnotstartwith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".lastIndexOf('"+n+"', 0) == -1"},endswith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"', "+t+".length - "+(n||"").length+") >= 0"},doesnotendwith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"', "+t+".length - "+(n||"").length+") < 0"},contains:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"') >= 0"},doesnotcontain:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"') == -1"}}}(),r.filterExpr=function(e){var n,i,o,s,a,l,c=[],u={and:" && ",or:" || "},h=[],d=[],f=e.filters;for(n=0,i=f.length;i>n;n++)o=f[n],a=o.field,l=o.operator,o.filters?(s=r.filterExpr(o),o=s.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(d.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(h.length+t)+"]"}),d.push.apply(d,s.operators),h.push.apply(h,s.fields)):(typeof a===pe?(s="__f["+h.length+"](d)",h.push(a)):s=ce.expr(a),typeof l===pe?(o="__o["+d.length+"]("+s+", "+V.quote(o.value)+")",d.push(l)):o=V[(l||"eq").toLowerCase()](s,o.value,o.ignoreCase!==t?o.ignoreCase:!0)),c.push(o);return{expression:"("+c.join(u[e.logic])+")",fields:h,operators:d}},U={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain"},r.normalizeFilter=l,r.prototype={toArray:function(){return this.data},range:function(e,t){return new r(this.data.slice(e,e+t));
|
|
},skip:function(e){return new r(this.data.slice(e))},take:function(e){return new r(this.data.slice(0,e))},select:function(e){return new r(O(this.data,e))},order:function(e,t){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new r(this.data.slice(0).sort(N.create(n)))},orderBy:function(e){return this.order(e,"asc")},orderByDescending:function(e){return this.order(e,"desc")},sort:function(e,t,n){var i,o,r=s(e,t),a=[];if(n=n||N,r.length){for(i=0,o=r.length;o>i;i++)a.push(n.create(r[i]));return this.orderBy({compare:n.combine(a)})}return this},filter:function(e){var t,n,i,o,s,a,c,u,h=this.data,d=[];if(e=l(e),!e||0===e.filters.length)return this;for(o=r.filterExpr(e),a=o.fields,c=o.operators,s=u=Function("d, __f, __o","return "+o.expression),(a.length||c.length)&&(u=function(e){return s(e,a,c)}),t=0,i=h.length;i>t;t++)n=h[t],u(n)&&d.push(n);return new r(d)},group:function(e,t){e=u(e||[]),t=t||this.data;var n,i=this,o=new r(i.data);return e.length>0&&(n=e[0],o=o.groupBy(n).select(function(i){var o=new r(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new r(i.items).group(e.slice(1),o.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:o.aggregate(n.aggregates)}})),o},groupBy:function(e){if(ie(e)||!this.data.length)return new r([]);var t,n,i,o,s=e.field,a=this._sortForGrouping(s,e.dir||"asc"),l=ce.accessor(s),c=l.get(a[0],s),u={field:s,value:c,items:[]},d=[u];for(i=0,o=a.length;o>i;i++)t=a[i],n=l.get(t,s),h(c,n)||(c=n,u={field:s,value:c,items:[]},d.push(u)),u.items.push(t);return new r(d)},_sortForGrouping:function(e,t){var n,i,o=this.data;if(!Ne){for(n=0,i=o.length;i>n;n++)o[n].__position=n;for(o=new r(o).sort(e,t,H).toArray(),n=0,i=o.length;i>n;n++)delete o[n].__position;return o}return this.sort(e,t).toArray()},aggregate:function(e){var t,n,i={},o={};if(e&&e.length)for(t=0,n=this.data.length;n>t;t++)d(i,e,this.data[t],t,n,o);return i}},W={sum:function(e,t,n){var i=n.get(t);return f(e)?f(i)&&(e+=i):e=i,e},count:function(e){return(e||0)+1},average:function(e,n,i,o,r,s){var a=i.get(n);return s.count===t&&(s.count=0),f(e)?f(a)&&(e+=a):e=a,f(a)&&s.count++,o==r-1&&f(e)&&(e/=s.count),e},max:function(e,t,n){var i=n.get(t);return f(e)||p(e)||(e=i),i>e&&(f(i)||p(i))&&(e=i),e},min:function(e,t,n){var i=n.get(t);return f(e)||p(e)||(e=i),e>i&&(f(i)||p(i))&&(e=i),e}},r.process=function(e,n){n=n||{};var i,o=new r(e),a=n.group,l=u(a||[]).concat(s(n.sort||[])),c=n.filterCallback,h=n.filter,d=n.skip,f=n.take;return h&&(o=o.filter(h),c&&(o=c(o)),i=o.toArray().length),l&&(o=o.sort(l),a&&(e=o.toArray())),d!==t&&f!==t&&(o=o.range(d,f)),a&&(o=o.group(a,e)),{total:i,data:o.toArray()}},j=de.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),G=de.extend({init:function(e){var t,n=this;e=n.options=ee({},n.options,e),ae(Te,function(t,n){typeof e[n]===fe&&(e[n]={url:e[n]})}),n.cache=e.cache?q.create(e.cache):{find:le,add:le},t=e.parameterMap,ue(e.push)&&(n.push=e.push),n.push||(n.push=De),n.parameterMap=ue(t)?t:function(e){var n={};return ae(e,function(e,i){e in t&&(e=t[e],ne(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:De},create:function(e){return se(this.setup(e,ge))},read:function(n){var i,o,r,s=this,a=s.cache;n=s.setup(n,me),i=n.success||le,o=n.error||le,r=a.find(n.data),r!==t?i(r):(n.success=function(e){a.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return se(this.setup(e,ve))},destroy:function(e){return se(this.setup(e,_e))},setup:function(e,t){e=e||{};var n,i=this,o=i.options[t],r=ue(o.data)?o.data(e.data):o.data;return e=ee(!0,{},o,e),n=ee(!0,{},r,e.data),e.data=i.parameterMap(n,t),ue(e.url)&&(e.url=e.url(n)),e}}),q=de.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Me(e)]=n)},find:function(e){return this._store[Me(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Me(e)]}}),q.create=function(e){var t={inmemory:function(){return new q}};return ne(e)&&ue(e.find)?e:e===!0?new q:t[e]()},$=de.extend({init:function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f,p=this;e=e||{};for(t in e)n=e[t],p[t]=typeof n===fe?Ae(n):n;o=e.modelBase||Ye,ne(p.model)&&(p.model=i=o.define(p.model)),r=te(p.data,p),p._dataAccessFunction=r,p.model&&(s=te(p.groups,p),a=te(p.serialize,p),l={},c={},u={},h={},d=!1,i=p.model,i.fields&&(ae(i.fields,function(e,t){var n;f=e,ne(t)&&t.field?f=t.field:typeof t===fe&&(f=t),ne(t)&&t.from&&(n=t.from),d=d||n&&n!==e||f!==e,c[e]=Ae(n||f),u[e]=Ae(e),l[n||f]=e,h[e]=n||f}),!e.serialize&&d&&(p.serialize=y(a,i,m,u,l,h))),p._dataAccessFunction=r,p.data=y(r,i,v,c,l,h),p.groups=y(s,i,_,c,l,h))},errors:function(e){return e?e.errors:null},parse:De,data:De,total:function(e){return e.length},groups:De,aggregates:function(){return{}},serialize:function(e){return e}}),Y=he.extend({init:function(e){var n,i,o,r=this;e&&(i=e.data),e=r.options=ee({},r.options,e),r._map={},r._prefetch={},r._data=[],r._pristineData=[],r._ranges=[],r._view=[],r._pristineTotal=0,r._destroyed=[],r._pageSize=e.pageSize,r._page=e.page||(e.pageSize?1:t),r._sort=s(e.sort),r._filter=l(e.filter),r._group=u(e.group),r._aggregate=e.aggregate,r._total=e.total,r._shouldDetachObservableParents=!0,he.fn.init.call(r),r.transport=K.create(e,i,r),ue(r.transport.push)&&r.transport.push({pushCreate:te(r._pushCreate,r),pushUpdate:te(r._pushUpdate,r),pushDestroy:te(r._pushDestroy,r)}),null!=e.offlineStorage&&("string"==typeof e.offlineStorage?(o=e.offlineStorage,r._storage={getItem:function(){return JSON.parse(localStorage.getItem(o))},setItem:function(e){localStorage.setItem(o,Me(r.reader.serialize(e)))}}):r._storage=e.offlineStorage),r.reader=new ce.data.readers[e.schema.type||"json"](e.schema),n=r.reader.model||{},r._detachObservableParents(),r._data=r._observe(r._data),r._online=!0,r.bind(["push",xe,ye,ke,we,Se,Ce],e)},options:{data:null,schema:{modelBase:Ye},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},clone:function(){return this},online:function(n){return n!==t?this._online!=n&&(this._online=n,n)?this.sync():e.Deferred().resolve().promise():this._online},offlineData:function(e){return null==this.options.offlineStorage?null:e!==t?this._storage.setItem(e):this._storage.getItem()||[]},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_pushCreate:function(e){this._push(e,"pushCreate")},_pushUpdate:function(e){this._push(e,"pushUpdate")},_pushDestroy:function(e){this._push(e,"pushDestroy")},_push:function(e,t){var n=this._readData(e);n||(n=e),this[t](n)},_flatData:function(e,t){if(e){if(this._isServerGrouped())return b(e);if(!t)for(var n=0;e.length>n;n++)e.at(n)}return e},parent:le,get:function(e){var t,n,i=this._flatData(this._data);for(t=0,n=i.length;n>t;t++)if(i[t].id==e)return i[t]},getByUid:function(e){var t,n,i=this._flatData(this._data);if(i)for(t=0,n=i.length;n>t;t++)if(i[t].uid==e)return i[t]},indexOf:function(e){return M(this._data,e)},at:function(e){return this._data.at(e)},data:function(e){var n,i=this;if(e===t){if(i._data)for(n=0;i._data.length>n;n++)i._data.at(n);return i._data}i._detachObservableParents(),i._data=this._observe(e),i._pristineData=e.slice(0),i._storeData(),i._ranges=[],i.trigger("reset"),i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data)},view:function(e){return e===t?this._view:(this._view=this._observeView(e),t)},_observeView:function(e){var t,n=this;return T(e,n._data,n._ranges,n.reader.model||Ge,n._isServerGrouped()),t=new je(e,n.reader.model),t.parent=function(){return n.parent()},t},flatView:function(){var e=this.group()||[];return e.length?b(this._view):this._view},add:function(e){return this.insert(this._data.length,e)},_createNewModel:function(e){return this.reader.model?new this.reader.model(e):e instanceof Ge?e:new Ge(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof Ye||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,this._wrapInEmptyGroup(t)):this._data.splice(e,0,t),t},pushCreate:function(e){var t,n,i,o,r,s;oe(e)||(e=[e]),t=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;e.length>i;i++)o=e[i],r=this.add(o),t.push(r),s=r.toJSON(),this._isServerGrouped()&&(s=this._wrapInEmptyGroup(s)),this._pristineData.push(s)}finally{this.options.autoSync=n}t.length&&this.trigger("push",{type:"create",items:t})},pushUpdate:function(e){var t,n,i,o,r;for(oe(e)||(e=[e]),t=[],n=0;e.length>n;n++)i=e[n],o=this._createNewModel(i),r=this.get(o.id),r?(t.push(r),r.accept(i),r.trigger(ye),this._updatePristineForModel(r,i)):this.pushCreate(i);t.length&&this.trigger("push",{type:"update",items:t})},pushDestroy:function(e){var t=this._removeItems(e);t.length&&this.trigger("push",{type:"destroy",items:t})},_removeItems:function(e){var t,n,i,o,r,s;oe(e)||(e=[e]),t=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;e.length>i;i++)o=e[i],r=this._createNewModel(o),s=!1,this._eachItem(this._data,function(e){var n,i;for(n=0;e.length>n;n++)if(i=e.at(n),i.id===r.id){t.push(i),e.splice(n,1),s=!0;break}}),s&&(this._removePristineForModel(r),this._destroyed.pop())}finally{this.options.autoSync=n}return t},remove:function(e){var n,i=this,o=i._isServerGrouped();return this._eachItem(i._data,function(r){return n=D(r,e),n&&o?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):t}),this._removeModelFromRanges(e),this._updateRangesLength(),e},destroyed:function(){return this._destroyed},created:function(){var e,t,n=[],i=this._flatData(this._data);for(e=0,t=i.length;t>e;e++)i[e].isNew&&i[e].isNew()&&n.push(i[e]);return n},updated:function(){var e,t,n=[],i=this._flatData(this._data);for(e=0,t=i.length;t>e;e++)i[e].isNew&&!i[e].isNew()&&i[e].dirty&&n.push(i[e]);return n},sync:function(){var t,n=this,i=[],o=[],r=n._destroyed,s=e.Deferred().resolve().promise();if(n.online()){if(!n.reader.model)return s;i=n.created(),o=n.updated(),t=[],n.options.batch&&n.transport.submit?t=n._sendSubmit(i,o,r):(t.push.apply(t,n._send("create",i)),t.push.apply(t,n._send("update",o)),t.push.apply(t,n._send("destroy",r))),s=e.when.apply(null,t).then(function(){var e,t;for(e=0,t=arguments.length;t>e;e++)n._accept(arguments[e]);n._storeData(!0),n._change({action:"sync"}),n.trigger(we)})}else n._storeData(!0),n._change({action:"sync"});return s},cancelChanges:function(e){var t=this;e instanceof ce.data.Model?t._cancelModel(e):(t._destroyed=[],t._detachObservableParents(),t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t._pristineTotal),t._ranges=[],t._addRange(t._data),t._change())},hasChanges:function(){var e,t,n=this._flatData(this._data);if(this._destroyed.length)return!0;for(e=0,t=n.length;t>e;e++)if(n[e].isNew&&n[e].isNew()||n[e].dirty)return!0;return!1},_accept:function(t){var n,i=this,o=t.models,r=t.response,s=0,a=i._isServerGrouped(),l=i._pristineData,c=t.type;if(i.trigger(Se,{response:r,type:c}),r&&!ie(r)){if(r=i.reader.parse(r),i._handleCustomErrors(r))return;r=i.reader.data(r),oe(r)||(r=[r])}else r=e.map(o,function(e){return e.toJSON()});for("destroy"===c&&(i._destroyed=[]),s=0,n=o.length;n>s;s++)"destroy"!==c?(o[s].accept(r[s]),"create"===c?l.push(a?i._wrapInEmptyGroup(o[s]):r[s]):"update"===c&&i._updatePristineForModel(o[s],r[s])):i._removePristineForModel(o[s])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,n){ce.deepExtend(n[e],t)})},_executeOnPristineForModel:function(e,n){this._eachPristineItem(function(i){var o=A(i,e);return o>-1?(n(o,i),!0):t})},_removePristineForModel:function(e){this._executeOnPristineForModel(e,function(e,t){t.splice(e,1)})},_readData:function(e){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t.call(this.reader,e)},_eachPristineItem:function(e){this._eachItem(this._pristineData,e)},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?k(e,t):t(e))},_pristineForModel:function(e){var n,i,o=function(o){return i=A(o,e),i>-1?(n=o[i],!0):t};return this._eachPristineItem(o),n},_cancelModel:function(e){var t=this._pristineForModel(e);this._eachItem(this._data,function(n){var i=M(n,e);i>=0&&(!t||e.isNew()&&!t.__state__?n.splice(i,1):n[i].accept(t))})},_submit:function(t,n){var i=this;i.trigger(ke,{type:"submit"}),i.transport.submit(ee({success:function(n,i){var o=e.grep(t,function(e){return e.type==i})[0];o&&o.resolve({response:n,models:o.models,type:i})},error:function(e,n,o){for(var r=0;t.length>r;r++)t[r].reject(e);i.error(e,n,o)}},n))},_sendSubmit:function(t,n,i){var o=this,r=[];return o.options.batch&&(t.length&&r.push(e.Deferred(function(e){e.type="create",e.models=t})),n.length&&r.push(e.Deferred(function(e){e.type="update",e.models=n})),i.length&&r.push(e.Deferred(function(e){e.type="destroy",e.models=i})),o._submit(r,{data:{created:o.reader.serialize(g(t)),updated:o.reader.serialize(g(n)),destroyed:o.reader.serialize(g(i))}})),r},_promise:function(t,n,i){var o=this;return e.Deferred(function(e){o.trigger(ke,{type:i}),o.transport[i].call(o.transport,ee({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),o.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,o=this,r=[],s=o.reader.serialize(g(t));if(o.options.batch)t.length&&r.push(o._promise({data:{models:s}},t,e));else for(n=0,i=t.length;i>n;n++)r.push(o._promise({data:s[n]},[t[n]],e));return r},read:function(t){var n=this,i=n._params(t),o=e.Deferred();return n._queueRequest(i,function(){var e=n.trigger(ke,{type:"read"});e?(n._dequeueRequest(),o.resolve(e)):(n.trigger(Ce),n._ranges=[],n.trigger("reset"),n.online()?n.transport.read({data:i,success:function(e){n.success(e,i),o.resolve()},error:function(){var e=ze.call(arguments);n.error.apply(n,e),o.reject.apply(o,e)}}):null!=n.options.offlineStorage&&(n.success(n.offlineData(),i),o.resolve()))}),o.promise()},_readAggregates:function(e){return this.reader.aggregates(e)},success:function(e){var n,i,o,r,s,a,l,c,u=this,h=u.options;if(u.trigger(Se,{response:e,type:"read"}),u.online()){if(e=u.reader.parse(e),u._handleCustomErrors(e))return u._dequeueRequest(),t;u._total=u.reader.total(e),u._aggregate&&h.serverAggregates&&(u._aggregateResult=u._readAggregates(e)),e=u._readData(e)}else{for(e=u._readData(e),n=[],i={},o=u.reader.model,r=o?o.idField:"id",s=0;this._destroyed.length>s;s++)a=this._destroyed[s][r],i[a]=a;for(s=0;e.length>s;s++)l=e[s],c=l.__state__,"destroy"==c?i[l[r]]||this._destroyed.push(this._createNewModel(l)):n.push(l);e=n,u._total=e.length}u._pristineTotal=u._total,u._pristineData=e.slice(0),u._detachObservableParents(),u._data=u._observe(e),null!=u.options.offlineStorage&&u._eachItem(u._data,function(e){var t,n;for(t=0;e.length>t;t++)n=e.at(t),"update"==n.__state__&&(n.dirty=!0)}),u._storeData(),u._addRange(u._data),u._process(u._data),u._dequeueRequest()},_detachObservableParents:function(){if(this._data&&this._shouldDetachObservableParents)for(var e=0;this._data.length>e;e++)this._data[e].parent&&(this._data[e].parent=le)},_storeData:function(e){function t(e){var n,i,o,r=[];for(n=0;e.length>n;n++)i=e.at(n),o=i.toJSON(),s&&i.items?o.items=t(i.items):(o.uid=i.uid,a&&(i.isNew()?o.__state__="create":i.dirty&&(o.__state__="update"))),r.push(o);return r}var n,i,o,r,s=this._isServerGrouped(),a=this.reader.model;if(null!=this.options.offlineStorage){for(n=t(this._data),i=[],o=0;this._destroyed.length>o;o++)r=this._destroyed[o].toJSON(),r.__state__="destroy",i.push(r);this.offlineData(n.concat(i)),e&&(this._pristineData=n)}},_addRange:function(e){var t=this,n=t._skip||0,i=n+t._flatData(e,!0).length;t._ranges.push({start:n,end:i,data:e,timestamp:(new Date).getTime()}),t._ranges.sort(function(e,t){return e.start-t.start})},error:function(e,t,n){this._dequeueRequest(),this.trigger(Se,{}),this.trigger(xe,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=ee({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},e);return t.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),t.options.serverGrouping?t.reader.model&&n.group&&(n.group=R(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=I(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=R(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=R(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:te(n,i),options:e}:(i._requestInProgress=!0,i._pending=t,n())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(xe,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_shouldWrap:function(e){var t=this.reader.model;return t&&e.length?!(e[0]instanceof t):!1},_observe:function(e){var t,n=this,i=n.reader.model;return n._shouldDetachObservableParents=!0,e instanceof We?(n._shouldDetachObservableParents=!1,n._shouldWrap(e)&&(e.type=n.reader.model,e.wrapAll(e,e))):(t=n.pageSize()&&!n.options.serverPaging?je:We,e=new t(e,n.reader.model),e.parent=function(){return n.parent()}),n._isServerGrouped()&&x(e,i),n._changeHandler&&n._data&&n._data instanceof We?n._data.unbind(ye,n._changeHandler):n._changeHandler=te(n._change,n),e.bind(ye,n._changeHandler)},_updateTotalForAction:function(e,t){var n=this,i=parseInt(n._total,10);f(n._total)||(i=parseInt(n._pristineTotal,10)),"add"===e?i+=t.length:"remove"===e?i-=t.length:"itemchange"===e||"sync"===e||n.options.serverPaging?"sync"===e&&(i=n._pristineTotal=parseInt(n._total,10)):i=n._pristineTotal,n._total=i},_change:function(e){var t,n,i,o=this,r=e?e.action:"";if("remove"===r)for(t=0,n=e.items.length;n>t;t++)e.items[t].isNew&&e.items[t].isNew()||o._destroyed.push(e.items[t]);!o.options.autoSync||"add"!==r&&"remove"!==r&&"itemchange"!==r?(o._updateTotalForAction(r,e?e.items:[]),o._process(o._data,e)):(i=function(t){"sync"===t.action&&(o.unbind("change",i),o._updateTotalForAction(r,e.items))},o.first("change",i),o.sync())},_calculateAggregates:function(e,t){t=t||{};var n=new r(e),i=t.aggregate,o=t.filter;return o&&(n=n.filter(o)),n.aggregate(i)},_process:function(e,n){var i,o=this,r={};o.options.serverPaging!==!0&&(r.skip=o._skip,r.take=o._take||o._pageSize,r.skip===t&&o._page!==t&&o._pageSize!==t&&(r.skip=(o._page-1)*o._pageSize)),o.options.serverSorting!==!0&&(r.sort=o._sort),o.options.serverFiltering!==!0&&(r.filter=o._filter),o.options.serverGrouping!==!0&&(r.group=o._group),o.options.serverAggregates!==!0&&(r.aggregate=o._aggregate,o._aggregateResult=o._calculateAggregates(e,r)),i=o._queryProcess(e,r),o.view(i.data),i.total===t||o.options.serverFiltering||(o._total=i.total),n=n||{},n.items=n.items||o._view,o.trigger(ye,n)},_queryProcess:function(e,t){return r.process(e,t)},_mergeState:function(e){var n=this;return e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=e.skip,n._take=e.take,n._skip===t&&(n._skip=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=s(e.sort)),e.filter&&(n._filter=e.filter=l(e.filter)),e.group&&(n._group=e.group=u(e.group)),e.aggregate&&(n._aggregate=e.aggregate=c(e.aggregate))),e},query:function(n){var i,o,r=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return r||(this._data===t||0===this._data.length)&&!this._destroyed.length?this.read(this._mergeState(n)):(o=this.trigger(ke,{type:"read"}),o||(this.trigger(Ce),i=this._queryProcess(this._data,this._mergeState(n)),this.options.serverFiltering||(this._total=i.total!==t?i.total:this._data.length),this._aggregateResult=this._calculateAggregates(this._data,n),this.view(i.data),this.trigger(Se,{type:"read"}),this.trigger(ye,{items:i.data})),e.Deferred().resolve(o).promise())},fetch:function(e){var t=this,n=function(n){n!==!0&&ue(e)&&e.call(t)};return this._query().then(n)},_query:function(e){var t=this;return t.query(ee({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var n=this,i=n.page(),o=n.total();return e=e||{},!i||o&&i+1>n.totalPages()?t:(n._skip=i*n.take(),i+=1,e.page=i,n._query(e),i)},prev:function(e){var n=this,i=n.page();return e=e||{},i&&1!==i?(n._skip=n._skip-n.take(),i-=1,e.page=i,n._query(e),i):t},page:function(e){var n,i=this;return e!==t?(e=Ee.max(Ee.min(Ee.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Ee.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n.trigger("reset"),n._query({filter:e,page:1}),t)},group:function(e){var n=this;return e!==t?(n._query({group:e}),t):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){var e=this._aggregateResult;return ie(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!ie(e))for(t={},oe(e)||(e=[e]),n=0;e.length>n;n++)t[e[n].aggregate]=0,i[e[n].field]=t;return i},_wrapInEmptyGroup:function(e){var t,n,i,o,r=this.group();for(i=r.length-1,o=0;i>=o;i--)n=r[i],t={value:e.get(n.field),field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Ee.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Ee.min(e+t,n.total());return!n.options.serverPaging&&n._data.length>0?!0:n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(e,n){var i,o,r,s,a,l,c,u;if(this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=Ee.min(e||0,this.total()),i=this,o=Ee.max(Ee.floor(e/n),0)*n,r=Ee.min(o+n,i.total()),s=i._findRange(e,Ee.min(e+n,i.total())),s.length){i._pending=t,i._skip=e>i.skip()?Ee.min(r,(i.totalPages()-1)*i.take()):o,i._take=n,a=i.options.serverPaging,l=i.options.serverSorting,c=i.options.serverFiltering,u=i.options.serverAggregates;try{i.options.serverPaging=!0,i._isServerGrouped()||i.group()&&i.group().length||(i.options.serverSorting=!0),i.options.serverFiltering=!0,i.options.serverPaging=!0,i.options.serverAggregates=!0,a&&(i._detachObservableParents(),i._data=s=i._observe(s)),i._process(s)}finally{i.options.serverPaging=a,i.options.serverSorting=l,i.options.serverFiltering=c,i.options.serverAggregates=u}}else n!==t&&(i._rangeExists(o,r)?e>o&&i.prefetch(r,n,function(){i.range(e,n)}):i.prefetch(o,n,function(){e>o&&r<i.total()&&!i._rangeExists(r,Ee.min(r+n,i.total()))?i.prefetch(r,n,function(){i.range(e,n)}):i.range(e,n)}))},_findRange:function(e,n){var i,o,r,a,l,c,h,d,f,p,g,m,v=this,_=v._ranges,y=[],w=v.options,b=w.serverSorting||w.serverPaging||w.serverFiltering||w.serverGrouping||w.serverAggregates;for(o=0,g=_.length;g>o;o++)if(i=_[o],e>=i.start&&i.end>=e){for(p=0,r=o;g>r;r++)if(i=_[r],f=v._flatData(i.data,!0),f.length&&e+p>=i.start&&(c=i.data,h=i.end,b||(m=u(v.group()||[]).concat(s(v.sort()||[])),d=v._queryProcess(i.data,{sort:m,filter:v.filter()}),f=c=d.data,d.total!==t&&(h=d.total)),a=0,e+p>i.start&&(a=e+p-i.start),l=f.length,h>n&&(l-=h-n),p+=l-a,y=v._mergeGroups(y,c,a,l),i.end>=n&&p==n-e))return y;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var o,r=t.toJSON();return e.length&&(o=e[e.length-1]),w(o,r,n,i),e.concat(r)}return e.concat(t.slice(n,i))},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var o=this,r=o._timeStamp();return function(s){var a,l,c,u=!1,h={start:e,end:t,data:[],timestamp:o._timeStamp()};if(o._dequeueRequest(),o.trigger(Se,{response:s,type:"read"}),s=o.reader.parse(s),c=o._readData(s),c.length){for(a=0,l=o._ranges.length;l>a;a++)if(o._ranges[a].start===e){u=!0,h=o._ranges[a];break}u||o._ranges.push(h)}h.data=o._observe(c),h.end=h.start+o._flatData(h.data,!0).length,o._ranges.sort(function(e,t){return e.start-t.start}),o._total=o.reader.total(s),(i||r>=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&(n&&c.length?n():o.trigger(ye,{}))}},prefetch:function(e,t,n){var i=this,o=Ee.min(e+t,i.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,o)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(r,function(){i.trigger(ke,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n),error:function(){var e=ze.call(arguments);i.error.apply(i,e)}})})},100))},_multiplePrefetch:function(e,t,n){var i=this,o=Ee.min(e+t,i.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,o)?n&&n():i.trigger(ke,{type:"read"})||i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n,!0)})},_rangeExists:function(e,t){var n,i,o=this,r=o._ranges;for(n=0,i=r.length;i>n;n++)if(e>=r[n].start&&r[n].end>=t)return!0;return!1},_removeModelFromRanges:function(e){var t,n,i,o,r;for(o=0,r=this._ranges.length;r>o&&(i=this._ranges[o],this._eachItem(i.data,function(i){t=D(i,e),t&&(n=!0)}),!n);o++);},_updateRangesLength:function(){var e,t,n,i,o=0;for(n=0,i=this._ranges.length;i>n;n++)e=this._ranges[n],e.start=e.start-o,t=this._flatData(e.data,!0).length,o=e.end-t,e.end=e.start+t}}),K={},K.create=function(t,n,i){var o,r=t.transport?e.extend({},t.transport):null;return r?(r.read=typeof r.read===fe?{url:r.read}:r.read,"jsdo"===t.type&&(r.dataSource=i),t.type&&(ce.data.transports=ce.data.transports||{},ce.data.schemas=ce.data.schemas||{},ce.data.transports[t.type]&&!ne(ce.data.transports[t.type])?o=new ce.data.transports[t.type](ee(r,{data:n})):r=ee(!0,{},ce.data.transports[t.type],r),t.schema=ee(!0,{},ce.data.schemas[t.type],t.schema)),o||(o=ue(r.read)?r:new G(r))):o=new j({data:t.data||[]}),o},Y.create=function(e){(oe(e)||e instanceof We)&&(e={data:e});var n,i,o,r=e||{},s=r.data,a=r.fields,l=r.table,c=r.select,u={};if(s||!a||r.transport||(l?s=F(l,a):c&&(s=B(c,a),r.group===t&&s[0]&&s[0].optgroup!==t&&(r.group="optgroup"))),ce.data.Model&&a&&(!r.schema||!r.schema.model)){for(n=0,i=a.length;i>n;n++)o=a[n],o.type&&(u[o.field]=o);ie(u)||(r.schema=ee(!0,r.schema,{model:{fields:u}}))}return r.data=s,c=null,r.select=null,l=null,r.table=null,r instanceof Y?r:new Y(r)},X=Ye.define({idField:"id",init:function(e){var t=this,n=t.hasChildren||e&&e.hasChildren,i="items",o={};ce.data.Model.fn.init.call(t,e),typeof t.children===fe&&(i=t.children),o={schema:{data:i,model:{hasChildren:n,id:t.idField,fields:t.fields}}},typeof t.children!==fe&&ee(o,t.children),o.data=e,n||(n=o.schema.data),typeof n===fe&&(n=ce.getter(n)),ue(n)&&(t.hasChildren=!!n.call(t,t)),t._childrenOptions=o,t.hasChildren&&t._initChildren(),t._loaded=!(!e||!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof Q||(e=i.children=new Q(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e,t){return e[i.idField||"id"]=i.id,n&&(e=n(e,t)),e},e.parent=function(){return i},e.bind(ye,function(e){e.node=e.node||i,i.trigger(ye,e)}),e.bind(xe,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(xe,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var n,i,o={},r="_query";return this.hasChildren?(this._initChildren(),n=this.children,o[this.idField||"id"]=this.id,this._loaded||(n._data=t,r="read"),n.one(ye,te(this._childrenLoaded,this)),i=n[r](o)):this.loaded(!0),i||e.Deferred().resolve().promise()},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return Ye.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),Q=Y.extend({init:function(e){var t=X.define({children:e});Y.fn.init.call(this,ee(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(xe,function(t){e.trigger(xe,t)})},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=Y.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:z("success"),data:z("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),Y.fn.insert.call(this,e,t)},_find:function(e,t){var n,i,o,r,s=this._data;if(s){if(o=Y.fn[e].call(this,t))return o;for(s=this._flatData(this._data),n=0,i=s.length;i>n;n++)if(r=s[n].children,r instanceof Q&&(o=r[e](t)))return o}},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),Q.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,o=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||o&&(n=L(o,i)),t.data=n,t instanceof Q?t:new Q(t))},Z=ce.Observable.extend({init:function(e,t,n){ce.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!n;var i=this;e.bind("change",function(){i._change()}),e.bind("reset",function(){i._reset()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var n=this.pageSize,i=!0;return e>=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((this.dataOffset>e||e>=this.skip+n)&&(i=this.range(Math.floor(e/n)*n)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),i?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):t:this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize+t,i=Ee.max(Ee.floor(n/t),0)*t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e,t){if(this.offset===e)return!0;var n=this,i=this.pageSize,o=Ee.max(Ee.floor(e/i),0)*i,r=this.dataSource;return t&&(o+=i),r.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):this.prefetch?(r.prefetch(o,i,function(){n.offset=e,n._recalculate(),n._goToRange(e,!0)}),!1):!0},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,
|
|
this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var e=this.dataSource;this.length=this.useRanges?e.lastRange().end:e.view().length,this._syncPending&&(this._syncWithDataSource(),this._recalculate(),this._syncPending=!1,this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),J=ce.Observable.extend({init:function(e,t){var n=this;ce.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new Z(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,n,i=this.buffer,o=e*this.batchSize,r=this.batchSize,s=[];for(i.offset>o&&i.at(i.offset-1),n=0;r>n&&(t=i.at(o+n),null!==t);n++)s.push(t);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),ee(!0,ce.data,{readers:{json:$},Query:r,DataSource:Y,HierarchicalDataSource:Q,Node:X,ObservableObject:Ge,ObservableArray:We,LazyObservableArray:je,LocalTransport:j,RemoteTransport:G,Cache:q,DataReader:$,Model:Ye,Buffer:Z,BatchBuffer:J})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(t,n,i){return v.extend({init:function(e,t,n){var i=this;v.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=P(i.dataBinding,i),i._dataBound=P(i.dataBound,i),i._itemChange=P(i.itemChange,i)},itemChange:function(e){s(e.item[0],e.data,this._ns(e.ns),[e.data].concat(this.bindings[t]._parents()))},dataBinding:function(e){var t,n,i=this.widget,o=e.removedItems||i.items();for(t=0,n=o.length;n>t;t++)c(o[t],!1)},_ns:function(t){t=t||C.ui;var n=[C.ui,C.dataviz.ui,C.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),C.rolesFromNamespaces(n)},dataBound:function(e){var i,o,r,a,l=this.widget,c=e.addedItems||l.items(),u=l[n],h=C.data.HierarchicalDataSource;if(!(h&&u instanceof h)&&c.length)for(r=e.addedDataItems||u.flatView(),a=this.bindings[t]._parents(),i=0,o=r.length;o>i;i++)s(c[i],r[i],this._ns(e.ns),[r[i]].concat(a))},refresh:function(e){var o,r,s,a=this,l=a.widget;e=e||{},e.action||(a.destroy(),l.bind("dataBinding",a._dataBinding),l.bind("dataBound",a._dataBound),l.bind("itemChange",a._itemChange),o=a.bindings[t].get(),l[n]instanceof C.data.DataSource&&l[n]!=o&&(o instanceof C.data.DataSource?l[i](o):o&&o._dataSource?l[i](o._dataSource):(l[n].data(o),r=C.ui.Select&&l instanceof C.ui.Select,s=C.ui.MultiSelect&&l instanceof C.ui.MultiSelect,a.bindings.value&&(r||s)&&l.value(f(a.bindings.value.get(),l.options.dataValueField)))))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}})}function i(e,n){var i=C.initWidget(e,{},n);return i?new b(i):t}function o(e){var t,n,i,r,s,a,l,c={};for(l=e.match(x),t=0,n=l.length;n>t;t++)i=l[t],r=i.indexOf(":"),s=i.substring(0,r),a=i.substring(r+1),"{"==a.charAt(0)&&(a=o(a)),c[s]=a;return c}function r(e,t,n){var i,o={};for(i in e)o[i]=new n(t,e[i]);return o}function s(e,t,n,a){var c,u,h,d=e.getAttribute("data-"+C.ns+"role"),f=e.getAttribute("data-"+C.ns+"bind"),v=e.children,_=[],y=!0,b={};if(a=a||[t],(d||f)&&l(e,!1),d&&(h=i(e,n)),f&&(f=o(f.replace(k,"")),h||(b=C.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:N,valuePrimitive:!1,autoBind:!0}),b.roles=n,h=new w(e,b)),h.source=t,u=r(f,a,p),b.template&&(u.template=new m(a,"",b.template)),u.click&&(f.events=f.events||{},f.events.click=f.click,u.click.destroy(),delete u.click),u.source&&(y=!1),f.attr&&(u.attr=r(f.attr,a,p)),f.style&&(u.style=r(f.style,a,p)),f.events&&(u.events=r(f.events,a,g)),f.css&&(u.css=r(f.css,a,p)),h.bind(u)),h&&(e.kendoBindingTarget=h),y&&v){for(c=0;v.length>c;c++)_[c]=v[c];for(c=0;_.length>c;c++)s(_[c],t,n,a)}}function a(t,n){var i,o,r,a=C.rolesFromNamespaces([].slice.call(arguments,2));for(n=C.observable(n),t=e(t),i=0,o=t.length;o>i;i++)r=t[i],1===r.nodeType&&s(r,n,a)}function l(t,n){var i,o=t.kendoBindingTarget;o&&(o.destroy(),L?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),n&&(i=C.widgetInstance(e(t)),i&&typeof i.destroy===O&&i.destroy())}function c(e,t){l(e,t),u(e,t)}function u(e,t){var n,i,o=e.children;if(o)for(n=0,i=o.length;i>n;n++)c(o[n],t)}function h(t){var n,i;for(t=e(t),n=0,i=t.length;i>n;n++)c(t[n],!1)}function d(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&a(n,i.source,t)}function f(e,t){var n,i,o=[],r=0;if(!t)return e;if(e instanceof D){for(n=e.length;n>r;r++)i=e[r],o[r]=i.get?i.get(t):i[t];e=o}else e instanceof T&&(e=e.get(t));return e}var p,g,m,v,_,y,w,b,x,k,C=window.kendo,S=C.Observable,T=C.data.ObservableObject,D=C.data.ObservableArray,A={}.toString,M={},E=C.Class,P=e.proxy,I="value",R="source",B="events",F="checked",z="css",L=!0,O="function",N="change";!function(){var e=document.createElement("a");try{delete e.test}catch(t){L=!1}}(),p=S.extend({init:function(e,t){var n=this;S.fn.init.call(n),n.source=e[0],n.parents=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof S,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(N,n._change))},_parents:function(){var t,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(t=i.parent(),e.inArray(t,n)<0&&(n=[t].concat(n))),n},change:function(e){var t,n,i=e.field,o=this;if("this"===o.path)o.trigger(N,e);else for(t in o.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){o.trigger(N,e);break}},start:function(e){e.bind("get",this._access)},stop:function(e){e.unbind("get",this._access)},get:function(){var e=this,n=e.source,i=0,o=e.path,r=n;if(!e.observable)return r;for(e.start(e.source),r=n.get(o);r===t&&n;)n=e.parents[++i],n instanceof T&&(r=n.get(o));if(r===t)for(n=e.source;r===t&&n;)n=n.parent(),n instanceof T&&(r=n.get(o));return"function"==typeof r&&(i=o.lastIndexOf("."),i>0&&(n=n.get(o.substring(0,i))),e.start(n),r=n!==e.source?r.call(n,e.source):r.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(N,e._change).bind(N,e._change)),e.stop(e.source),r},set:function(e){var t=this.currentSource||this.source,n=C.getter(this.path)(t);"function"==typeof n?t!==this.source?n.call(t,this.source,e):n.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(N,this._change),this.currentSource&&this.currentSource.unbind(N,this._change)),this.unbind()}}),g=p.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof T&&(e=t.get(n));return P(e,t)}}),m=p.extend({init:function(e,t,n){var i=this;p.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=E.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(N,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),_=v.extend({dataType:function(){var e=this.element.getAttribute("data-type")||this.element.type||"text";return e.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=C.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=C.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=C.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==C.parseFloat(e)?!!C.parseFloat(e):"true"===e.toLowerCase()),e}}),M.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),M.css=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.classes={}},refresh:function(t){var n=e(this.element),i=this.bindings.css[t],o=this.classes[t]=i.get();o?n.addClass(t):n.removeClass(t)}}),M.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),M.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),M.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),M.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),M.events=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],o=this.handlers[t];o&&n.off(t,o),o=this.handlers[t]=i.get(),n.on(t,i.source,o)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),M.text=v.extend({refresh:function(){var t=this.bindings.text.get(),n=this.element.getAttribute("data-format")||"";null==t&&(t=""),e(this.element).text(C.toString(t,n))}}),M.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),M.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),M.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),M.value=_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=P(this.change,this),this.eventName=i.valueUpdate||N,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=N,this.bindings[I].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[I].get(),null==e&&(e=""),t=this.dataType(),"date"==t?e=C.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=C.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),M.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof C.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof D||n instanceof C.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?C.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==n?"<tr><td>#:data#</td></tr>":"ul"==n||"ol"==n?"<li>#:data#</li>":"#:data#",t=C.template(t)),t},add:function(t,n){var i,o,r,a,l=this.container(),c=l.cloneNode(!1),u=l.children[t];if(e(c).html(C.render(this.template(),n)),c.children.length)for(i=this.bindings.source._parents(),o=0,r=n.length;r>o;o++)a=c.children[0],l.insertBefore(a,u||null),s(a,n[o],this.options.roles,[n[o]].concat(i))},remove:function(e,t){var n,i,o=this.container();for(n=0;t.length>n;n++)i=o.children[e],c(i,!0),o.removeChild(i)},render:function(){var t,n,i,o=this.bindings.source.get(),r=this.container(),a=this.template();if(o instanceof C.data.DataSource&&(o=o.view()),o instanceof D||"[object Array]"===A.call(o)||(o=[o]),this.bindings.template){if(u(r,!0),e(r).html(this.bindings.template.render(o)),r.children.length)for(t=this.bindings.source._parents(),n=0,i=o.length;i>n;n++)s(r.children[n],o[n],this.options.roles,[o[n]].concat(t))}else e(r).html(C.render(a,o))}}),M.input={checked:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=P(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i=this.element,o=this.value();if("radio"==i.type)o=this.parsedValue(),this.bindings[F].set(o);else if("checkbox"==i.type)if(e=this.bindings[F].get(),e instanceof D){if(o=this.parsedValue(),o instanceof Date){for(n=0;e.length>n;n++)if(e[n]instanceof Date&&+e[n]===+o){t=n;break}}else t=e.indexOf(o);t>-1?e.splice(t,1):e.push(o)}else this.bindings[F].set(o)},refresh:function(){var e,t,n=this.bindings[F].get(),i=n,o=this.dataType(),r=this.element;if("checkbox"==r.type)if(i instanceof D){if(e=-1,n=this.parsedValue(),n instanceof Date){for(t=0;i.length>t;t++)if(i[t]instanceof Date&&+i[t]===+n){e=t;break}}else e=i.indexOf(n);r.checked=e>=0}else r.checked=i;else"radio"==r.type&&null!=n&&("date"==o?n=C.toString(n,"yyyy-MM-dd"):"datetime-local"==o&&(n=C.toString(n,"yyyy-MM-ddTHH:mm:ss")),r.checked=r.value===""+n?!0:!1)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(N,this._change)}})},M.select={source:M.source.extend({refresh:function(n){var i,o=this,r=o.bindings.source.get();r instanceof D||r instanceof C.data.DataSource?(n=n||{},"add"==n.action?o.add(n.index,n.items):"remove"==n.action?o.remove(n.index,n.items):("itemchange"==n.action||n.action===t)&&(o.render(),o.bindings.value&&o.bindings.value&&(i=f(o.bindings.value.get(),e(o.element).data("valueField")),null===i?o.element.selectedIndex=-1:o.element.value=i))):o.render()}}),value:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=P(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,o=this.dataType(),r=[];for(n=0,i=this.element.options.length;i>n;n++)t=this.element.options[n],t.selected&&(e=t.attributes.value,e=e&&e.specified?t.value:t.text,r.push(this._parseValue(e,o)));return r},change:function(){var e,n,i,o,r,s,a,l,c=[],u=this.element,h=this.options.valueField||this.options.textField,d=this.options.valuePrimitive;for(r=0,s=u.options.length;s>r;r++)n=u.options[r],n.selected&&(o=n.attributes.value,o=o&&o.specified?n.value:n.text,c.push(this._parseValue(o,this.dataType())));if(h)for(e=this.bindings.source.get(),e instanceof C.data.DataSource&&(e=e.view()),i=0;c.length>i;i++)for(r=0,s=e.length;s>r;r++)if(a=this._parseValue(e[r].get(h),this.dataType()),l=a+""===c[i]){c[i]=e[r];break}o=this.bindings[I].get(),o instanceof D?o.splice.apply(o,[0,o.length].concat(c)):this.bindings[I].set(d||!(o instanceof T||null===o||o===t)&&h?c[0].get(h):c[0])},refresh:function(){var e,t,n,i=this.element,o=i.options,r=this.bindings[I].get(),s=r,a=this.options.valueField||this.options.textField,l=!1,c=this.dataType();for(s instanceof D||(s=new D([r])),i.selectedIndex=-1,n=0;s.length>n;n++)for(r=s[n],a&&r instanceof T&&(r=r.get(a)),"date"==c?r=C.toString(s[n],"yyyy-MM-dd"):"datetime-local"==c&&(r=C.toString(s[n],"yyyy-MM-ddTHH:mm:ss")),e=0;o.length>e;e++)t=o[e].value,""===t&&""!==r&&(t=o[e].text),null!=r&&t==""+r&&(o[e].selected=!0,l=!0)},destroy:function(){e(this.element).off(N,this._change)}})},M.widget={events:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this.handlers={}},refresh:function(e){var t=this.bindings.events[e],n=this.handlers[e];n&&this.widget.unbind(e,n),n=t.get(),this.handlers[e]=function(e){e.data=t.source,n(e),e.data===t.source&&delete e.data},this.widget.bind(e,this.handlers[e])},destroy:function(){var e;for(e in this.handlers)this.widget.unbind(e,this.handlers[e])}}),checked:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=P(this.change,this),this.widget.bind(N,this._change)},change:function(){this.bindings[F].set(this.value())},refresh:function(){this.widget.check(this.bindings[F].get()===!0)},value:function(){var e=this.element,t=e.value;return("on"==t||"off"==t)&&(t=e.checked),t},destroy:function(){this.widget.unbind(N,this._change)}}),visible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.visible.get();this.widget.wrapper[0].style.display=e?"":"none"}}),invisible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.invisible.get();this.widget.wrapper[0].style.display=e?"none":""}}),enabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:n("source","dataSource","setDataSource"),value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change);var o=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==o||o instanceof T),this._valueIsObservableArray=o instanceof D,this._initChange=!1},change:function(){var e,t,n,i,o,r,s,a=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,c="[object Array]"===A.call(a),u=this._valueIsObservableObject,h=[];if(this._initChange=!0,l)if(this.bindings.source&&(s=this.bindings.source.get()),""===a&&(u||this.options.valuePrimitive))a=null;else{for((!s||s instanceof C.data.DataSource)&&(s=this.widget.dataSource.flatView()),c&&(t=a.length,h=a.slice(0)),o=0,r=s.length;r>o;o++)if(n=s[o],i=n.get(l),c){for(e=0;t>e;e++)if(i==h[e]){h[e]=n;break}}else if(i==a){a=u?n:i;break}h[0]&&(a=this._valueIsObservableArray?h:u||!l?h[0]:h[0].get(l))}this.bindings.value.set(a),this._initChange=!1},refresh:function(){var e,n,i,o,r,s,a,l,c;if(!this._initChange){if(e=this.widget,n=e.options,i=n.dataTextField,o=n.dataValueField||i,r=this.bindings.value.get(),s=n.text||"",a=0,c=[],r===t&&(r=null),o)if(r instanceof D){for(l=r.length;l>a;a++)c[a]=r[a].get(o);r=c}else r instanceof T&&(s=r.get(i),r=r.get(o));n.autoBind!==!1||n.cascadeFrom||!e.listView||e.listView.isBound()?e.value(r):(i!==o||s||(s=r),s||!r&&0!==r||!n.valuePrimitive?e._preselect(r,s):e.value(r))}this._initChange=!1},destroy:function(){this.widget.unbind(N,this._change)}}),gantt:{dependencies:n("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change),this._initChange=!1},change:function(){var e,n,i,o,r,s,a,l,c,u=this,h=u.bindings[I].get(),d=u.options.valuePrimitive,f=d?u.widget.value():u.widget.dataItems(),p=this.options.dataValueField||this.options.dataTextField;if(f=f.slice(0),u._initChange=!0,h instanceof D){for(e=[],n=f.length,i=0,o=0,r=h[i],s=!1;r!==t;){for(c=!1,o=0;n>o;o++)if(d?s=f[o]==r:(l=f[o],l=l.get?l.get(p):l,s=l==(r.get?r.get(p):r)),s){f.splice(o,1),n-=1,c=!0;break}c?i+=1:(e.push(r),y(h,i,1),a=i),r=h[i]}y(h,h.length,0,f),e.length&&h.trigger("change",{action:"remove",items:e,index:a}),f.length&&h.trigger("change",{action:"add",items:f,index:h.length-1})}else u.bindings[I].set(f);u._initChange=!1},refresh:function(){if(!this._initChange){var e,n,i=this.options,o=this.widget,r=i.dataValueField||i.dataTextField,s=this.bindings.value.get(),a=s,l=0,c=[];if(s===t&&(s=null),r)if(s instanceof D){for(e=s.length;e>l;l++)n=s[l],c[l]=n.get?n.get(r):n;s=c}else s instanceof T&&(s=s.get(r));i.autoBind!==!1||i.valuePrimitive===!0||o.listView.isBound()?o.value(s):o._preselect(a,s)}},destroy:function(){this.widget.unbind(N,this._change)}})},scheduler:{source:n("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,o,r=this.widget,a=e.addedItems||r.items();if(a.length)for(i=e.addedDataItems||r.dataItems(),o=this.bindings.source._parents(),t=0,n=i.length;n>t;t++)s(a[t],i[t],this._ns(e.ns),[i[t]].concat(o))}})}},y=function(e,t,n,i){var o,r,s,a,l;if(i=i||[],n=n||0,o=i.length,r=e.length,s=[].slice.call(e,t+n),a=s.length,o){for(o=t+o,l=0;o>t;t++)e[t]=i[l],l++;e.length=o}else if(n)for(e.length=t,n+=t;n>t;)delete e[--n];if(a){for(a=t+a,l=0;a>t;t++)e[t]=s[l],l++;e.length=a}for(t=e.length;r>t;)delete e[t],t++},w=E.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,o,r,s,a=this instanceof b,l=this.binders();for(t in e)t==I?n=!0:t==R?i=!0:t!=B||a?t==F?r=!0:t==z?s=!0:this.applyBinding(t,e,l):o=!0;i&&this.applyBinding(R,e,l),n&&this.applyBinding(I,e,l),r&&this.applyBinding(F,e,l),o&&!a&&this.applyBinding(B,e,l),s&&!a&&this.applyBinding(z,e,l)},binders:function(){return M[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,o=n[e]||M[e],r=this.toDestroy,s=t[e];if(o)if(o=new o(this.target,t,this.options),r.push(o),s instanceof p)o.bind(s),r.push(s);else for(i in s)o.bind(s,i),r.push(s[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;t>e;e++)n[e].destroy()}}),b=w.extend({binders:function(){return M.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,o=n[e]||M.widget[e],r=this.toDestroy,s=t[e];if(!o)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(o=new o(this.target,t,this.target.options),r.push(o),s instanceof p)o.bind(s),r.push(s);else for(i in s)o.bind(s,i),r.push(s[i])}}),x=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,k=/\s/g,C.unbind=h,C.bind=a,C.data.binders=M,C.data.Binder=v,C.notify=d,C.observable=function(e){return e instanceof T||(e=new T(e)),e},C.observableHierarchy=function(e){function t(e){var n,i;for(n=0;e.length>n;n++)e[n]._initChildren(),i=e[n].children,i.fetch(),e[n].items=i.data(),t(e[n].items)}var n=C.data.HierarchicalDataSource.create(e);return n.fetch(),t(n.data()),n._data._dataSource=n,n._data}}(window.kendo.jQuery)}(),function(){!function(e){function t(e){if(!e)return{};var t=e.match(v)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var n=window.kendo,i=n.Observable,o="SCRIPT",r="init",s="show",a="hide",l="transitionStart",c="transitionEnd",u="attach",h="detach",d=/unrecognized expression/,f=i.extend({init:function(e,t){var o=this;t=t||{},i.fn.init.call(o),o.content=e,o.id=n.guid(),o.tagName=t.tagName||"div",o.model=t.model,o._wrap=t.wrap!==!1,this._evalTemplate=t.evalTemplate||!1,o._fragments={},o.bind([r,s,a,l,c],t)},render:function(t){var i=this,o=!i.element;return o&&(i.element=i._createElement()),t&&e(t).append(i.element),o&&(n.bind(i.element,i.model),i.trigger(r)),t&&(i._eachFragment(u),i.trigger(s)),i.element},clone:function(){return new p(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){this.element.css("display","")},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(l,{type:e})},afterTransition:function(e){this.trigger(c,{type:e})},hide:function(){this._eachFragment(h),this.element.detach(),this.trigger(a)},destroy:function(){var e=this.element;e&&(n.unbind(e),n.destroy(e),e.remove())},fragments:function(t){e.extend(this._fragments,t)},_eachFragment:function(e){for(var t in this._fragments)this._fragments[t][e](this,t)},_createElement:function(){var t,i,r,s=this,a="<"+s.tagName+" />";try{i=e(document.getElementById(s.content)||s.content),i[0].tagName===o&&(i=i.html())}catch(l){d.test(l.message)&&(i=s.content)}return"string"==typeof i?(i=i.replace(/^\s+|\s+$/g,""),s._evalTemplate&&(i=n.template(i)(s.model||{})),t=e(a).append(i),s._wrap||(t=t.contents())):(t=i,s._evalTemplate&&(r=e(n.template(e("<div />").append(t.clone(!0)).html())(s.model||{})),e.contains(document,t[0])&&t.replaceWith(r),t=r),s._wrap&&(t=t.wrapAll(a).parent())),t}}),p=n.Class.extend({init:function(t){e.extend(this,{element:t.element.clone(!0),transition:t.transition,id:t.id}),t.element.parent().append(this.element)},hideEnd:function(){this.element.remove()},beforeTransition:e.noop,afterTransition:e.noop}),g=f.extend({init:function(e,t){f.fn.init.call(this,e,t),this.containers={}},container:function(e){var t=this.containers[e];return t||(t=this._createContainer(e),this.containers[e]=t),t},showIn:function(e,t,n){this.container(e).show(t,n)},_createContainer:function(e){var t,n=this.render(),i=n.find(e);if(!i.length&&n.is(e)){if(!n.is(e))throw Error("can't find a container with the specified "+e+" selector");i=n}return t=new _(i),t.bind("accepted",function(e){e.view.render(i)}),t}}),m=f.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),v=/^(\w+)(:(\w+))?( (\w+))?$/,_=i.extend({init:function(e){i.fn.init.call(this),this.container=e,this.history=[],this.view=null,this.running=!1},after:function(){this.running=!1,this.trigger("complete",{view:this.view}),this.trigger("after")},end:function(){this.view.showEnd(),this.previous.hideEnd(),this.after()},show:function(e,i,o){if(!e.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;o=o||e.id;var r=this,s=e===r.view?e.clone():r.view,a=r.history,l=a[a.length-2]||{},c=l.id===o,u=i||(c?a[a.length-1].transition:e.transition),h=t(u);return r.running&&r.effect.stop(),"none"===u&&(u=null),r.trigger("accepted",{view:e}),r.view=e,r.previous=s,r.running=!0,c?a.pop():a.push({id:o,transition:u}),s?(u&&n.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),c&&!i&&(h.reverse=!h.reverse),r.effect=n.fx(e.element).replace(s.element,h.type).beforeTransition(function(){e.beforeTransition("show"),s.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),s.afterTransition("hide")}).direction(h.direction).setReverse(h.reverse),r.effect.run().then(function(){r.end()})):(e.showStart(),r.end()),!0):(e.showStart(),e.showEnd(),r.after(),!0)}});n.ViewContainer=_,n.Fragment=m,n.Layout=g,n.View=f,n.ViewClone=p}(window.kendo.jQuery)}(),function(){!function(e){var t=kendo.data.RemoteTransport.extend({init:function(e){var t,n=e&&e.signalr?e.signalr:{},i=n.promise;if(!i)throw Error('The "promise" option must be set.');if("function"!=typeof i.done||"function"!=typeof i.fail)throw Error('The "promise" option must be a Promise.');if(this.promise=i,t=n.hub,!t)throw Error('The "hub" option must be set.');if("function"!=typeof t.on||"function"!=typeof t.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=t,kendo.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(t,n){var i,o,r=this.hub,s=this.options.signalr.server;if(!s||!s[n])throw Error(kendo.format('The "server.{0}" option must be set.',n));i=[s[n]],o=this.parameterMap(t.data,n),e.isEmptyObject(o)||i.push(o),this.promise.done(function(){r.invoke.apply(r,i).done(t.success).fail(t.error)})},read:function(e){this._crud(e,"read")},create:function(e){this._crud(e,"create")},update:function(e){this._crud(e,"update")},destroy:function(e){this._crud(e,"destroy")}});e.extend(!0,kendo.data,{transports:{signalr:t}})}(window.kendo.jQuery)}(),function(){!function(e){function t(e,t){var n=e.x.location,i=e.y.location,o=t.x.location,r=t.y.location,s=n-o,a=i-r;return{center:{x:(n+o)/2,y:(i+r)/2},distance:Math.sqrt(s*s+a*a)}}function n(e){var t,n,i,o=[],s=e.originalEvent,a=e.currentTarget,l=0;if(e.api)o.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e,type:"api"});else if(e.type.match(/touch/))for(n=s?s.changedTouches:[],t=n.length;t>l;l++)i=n[l],o.push({location:i,event:e,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else o.push(r.pointers||r.msPointers?{location:s,event:e,target:e.target,currentTarget:a,id:s.pointerId,type:"pointer"}:{id:1,event:e,target:e.target,currentTarget:a,location:e,type:"mouse"});return o}function i(e){for(var t=o.eventMap.up.split(" "),n=0,i=t.length;i>n;n++)e(t[n])}var o=window.kendo,r=o.support,s=window.document,a=o.Class,l=o.Observable,c=e.now,u=e.extend,h=r.mobileOS,d=h&&h.android,f=800,p=r.browser.msie?5:0,g="press",m="hold",v="select",_="start",y="move",w="end",b="cancel",x="tap",k="release",C="gesturestart",S="gesturechange",T="gestureend",D="gesturetap",A={api:0,touch:0,mouse:9,pointer:9},M=!r.touch||r.mouseAndTouchPresent,E=a.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=c()},move:function(e){var t=this,n=e["page"+t.axis],i=c(),o=i-t.timeStamp||1;(n||!d)&&(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/o,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),P=a.extend({init:function(e,t,n){u(this,{x:new E("X",n.location),y:new E("Y",n.location),type:n.type,threshold:e.threshold||A[n.type],userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(e.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(g,this.pressEvent)},_hold:function(){this._trigger(m,this.pressEvent)},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(I.current&&I.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(y,e)}},end:function(e){var t=this;t.endTime=c(),t._finished||(t._finished=!0,t._trigger(k,e),t._moved?t._trigger(w,e):t._trigger(x,e),clearTimeout(t._holdTimeout),t.dispose())},dispose:function(){var t=this.userEvents,n=t.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),n.splice(e.inArray(this,n),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=c(),this._moved=!0,this._trigger(_,e)},_trigger:function(e,t){var n=this,i=t.event,o={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,o)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}}),I=l.extend({init:function(t,n){var a,c,h,d=this,A=o.guid();n=n||{},a=d.filter=n.filter,d.threshold=n.threshold||p,d.minHold=n.minHold||f,d.touches=[],d._maxTouches=n.multiTouch?2:1,d.allowSelection=n.allowSelection,d.captureUpIfMoved=n.captureUpIfMoved,d.eventNS=A,t=e(t).handler(d),l.fn.init.call(d),u(d,{element:t,surface:e(n.global&&M?s.documentElement:n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),d.surface.handler(d).on(o.applyEventMap("move",A),"_move").on(o.applyEventMap("up cancel",A),"_end"),t.on(o.applyEventMap("down",A),a,"_start"),(r.pointers||r.msPointers)&&(11>r.browser.version?t.css("-ms-touch-action","pinch-zoom double-tap-zoom"):t.css("touch-action","none")),
|
|
n.preventDragEvent&&t.on(o.applyEventMap("dragstart",A),o.preventDefault),t.on(o.applyEventMap("mousedown",A),a,{root:t},"_select"),d.captureUpIfMoved&&r.eventCapture&&(c=d.surface[0],h=e.proxy(d.preventIfMoving,d),i(function(e){c.addEventListener(e,h,!0)})),d.bind([g,m,x,_,y,w,k,b,C,S,T,D,v],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&r.eventCapture&&(e=t.surface[0],i(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget)},capture:function(){I.current=this},cancel:function(){this._disposeAll(),this.trigger(b)},notify:function(e,n){var i=this,o=i.touches;if(this._isMultiTouch()){switch(e){case y:e=S;break;case w:e=T;break;case x:e=D}u(n,{touches:o},t(o[0],o[1]))}return this.trigger(e,u(n,{type:e}))},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){(!this.allowSelection||this.trigger(v,{event:e}))&&e.preventDefault()},_start:function(t){var i,o,r=this,s=0,a=r.filter,l=n(t),c=l.length,u=t.which;if(!(u&&u>1||r._maxTouchesReached()))for(I.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();c>s&&!r._maxTouchesReached();s++)o=l[s],i=a?e(o.currentTarget):r.element,i.length&&(o=new P(r,i,o),r.touches.push(o),o.press(),r._isMultiTouch()&&r.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_eachTouch:function(e,t){var i,o,r,s,a=this,l={},c=n(t),u=a.touches;for(i=0;u.length>i;i++)o=u[i],l[o.id]=o;for(i=0;c.length>i;i++)r=c[i],s=l[r.id],s&&s[e](r)},_apiCall:function(t,n,i,o){this[t]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:e(o||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});I.defaultThreshold=function(e){p=e},I.minHold=function(e){f=e},o.getTouches=n,o.touchDelta=t,o.UserEvents=I}(window.kendo.jQuery)}(),function(){!function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(i){return!1}}function i(e,t){return parseInt(e.css(t),10)||0}function o(e,t){return Math.min(Math.max(e,t.min),t.max)}function r(e,t){var n=A(e),o=n.left+i(e,"borderLeftWidth")+i(e,"paddingLeft"),r=n.top+i(e,"borderTopWidth")+i(e,"paddingTop"),s=o+e.width()-t.outerWidth(!0),a=r+e.height()-t.outerHeight(!0);return{x:{min:o,max:s},y:{min:r,max:a}}}function s(n,i,o){for(var r,s,a=0,l=i&&i.length,c=o&&o.length;n&&n.parentNode;){for(a=0;l>a;a++)if(r=i[a],r.element[0]===n)return{target:r,targetElement:n};for(a=0;c>a;a++)if(s=o[a],e.contains(s.element[0],n)&&y.matchesSelector.call(n,s.options.filter))return{target:s,targetElement:n};n=n.parentNode}return t}function a(e,t){var n,i=t.options.group,o=e[i];if(k.fn.destroy.call(t),o.length>1){for(n=0;o.length>n;n++)if(o[n]==t){o.splice(n,1);break}}else o.length=0,delete e[i]}function l(e){var t,n,i,o=c()[0];return e[0]===o?(n=o.scrollTop,i=o.scrollLeft,{top:n,left:i,bottom:n+b.height(),right:i+b.width()}):(t=e.offset(),t.bottom=t.top+e.height(),t.right=t.left+e.width(),t)}function c(){return e(_.support.browser.chrome?w.body:w.documentElement)}function u(t){var n,i=c();if(!t||t===w.body||t===w.documentElement)return i;for(n=e(t)[0];!_.isScrollable(n)&&n!==w.body;)n=n.parentNode;return n===w.body?i:e(n)}function h(e,t,n){var i={x:0,y:0},o=50;return o>e-n.left?i.x=-(o-(e-n.left)):o>n.right-e&&(i.x=o-(n.right-e)),o>t-n.top?i.y=-(o-(t-n.top)):o>n.bottom-t&&(i.y=o-(n.bottom-t)),i}var d,f,p,g,m,v,_=window.kendo,y=_.support,w=window.document,b=e(window),x=_.Class,k=_.ui.Widget,C=_.Observable,S=_.UserEvents,T=e.proxy,D=e.extend,A=_.getOffset,M={},E={},P={},I=_.elementUnderCursor,R="keyup",B="change",F="dragstart",z="hold",L="drag",O="dragend",N="dragcancel",H="hintDestroyed",V="dragenter",U="dragleave",W="drop",j=C.extend({init:function(t,n){var i=this,o=t[0];i.capture=!1,o.addEventListener?(e.each(_.eventMap.down.split(" "),function(){o.addEventListener(this,T(i._press,i),!0)}),e.each(_.eventMap.up.split(" "),function(){o.addEventListener(this,T(i._release,i),!0)})):(e.each(_.eventMap.down.split(" "),function(){o.attachEvent(this,T(i._press,i))}),e.each(_.eventMap.up.split(" "),function(){o.attachEvent(this,T(i._release,i))})),C.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),G=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.horizontal?(n.measure="offsetWidth",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){e.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(e,t){(this._virtualMin!==e||this._virtualMax!==t)&&(this._virtualMin=e,this._virtualMax=t,this.update())},outOfBounds:function(e){return e>this.max||this.min>e},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[0][this.measure]},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(e){this.scale=e},update:function(e){var t=this,n=t.virtual?t._virtualMax:t.getTotal(),i=n*t.scale,o=t.getSize();(0!==n||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=o,t.total=i,t.min=Math.min(t.max,o-i),t.minScale=o/n,t.centerOffset=(i-o)/2,t.enabled=t.forcedEnabled||i>o,e||t.trigger(B,t))}}),q=C.extend({init:function(e){var t=this;C.fn.init.call(t),t.x=new G(D({horizontal:!0},e)),t.y=new G(D({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(B,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(B)}}),$=C.extend({init:function(e){var t=this;D(t,e),C.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,o=t.movable,r=o[i]+e;n.enabled&&((n.min>r&&0>e||r>n.max&&e>0)&&(e*=t.resistance),o.translateAxis(i,e),t.trigger(B,t))}}),Y=x.extend({init:function(t){var n,i,o,r,s=this;D(s,{elastic:!0},t),o=s.elastic?.5:0,r=s.movable,s.x=n=new $({axis:"x",dimension:s.dimensions.x,resistance:o,movable:r}),s.y=i=new $({axis:"y",dimension:s.dimensions.y,resistance:o,movable:r}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){s.gesture=e,s.offset=s.dimensions.container.offset()},press:function(t){e(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(e){var t,o,a,l=s.gesture,c=l.center,u=e.center,h=e.distance/l.distance,d=s.dimensions.minScale,f=s.dimensions.maxScale;d>=r.scale&&1>h&&(h+=.8*(1-h)),r.scale*h>=f&&(h=f/r.scale),o=r.x+s.offset.left,a=r.y+s.offset.top,t={x:(o-c.x)*h+u.x-o,y:(a-c.y)*h+u.y-a},r.scaleWith(h),n.dragMove(t.x),i.dragMove(t.y),s.dimensions.rescale(r.scale),s.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(e.x.delta),i.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),K=y.transitions.prefix+"Transform";f=y.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"},p=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(f(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){D(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=f(n,i,t.scale),e!=t.coordinates&&(_.support.browser.msie&&10>_.support.browser.version?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[K]=e,t._saveCoordinates(e),t.trigger(B))},_saveCoordinates:function(e){this.coordinates=e}}),g=k.extend({init:function(e,t){var n,i=this;k.fn.init.call(i,e,t),n=i.options.group,n in E?E[n].push(i):E[n]=[i]},events:[V,U,W],options:{name:"DropTarget",group:"default"},destroy:function(){a(E,this)},_trigger:function(e,n){var i=this,o=M[i.options.group];return o?i.trigger(e,D({},n.event,{draggable:o,dropTarget:n.dropTarget})):t},_over:function(e){this._trigger(V,e)},_out:function(e){this._trigger(U,e)},_drop:function(e){var t=this,n=M[t.options.group];n&&(n.dropped=!t._trigger(W,e))}}),g.destroyGroup=function(e){var t,n=E[e]||P[e];if(n){for(t=0;n.length>t;t++)k.fn.destroy.call(n[t]);n.length=0,delete E[e],delete P[e]}},g._cache=E,m=g.extend({init:function(e,t){var n,i=this;k.fn.init.call(i,e,t),n=i.options.group,n in P?P[n].push(i):P[n]=[i]},destroy:function(){a(P,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),v=k.extend({init:function(e,t){var n=this;k.fn.init.call(n,e,t),n._activated=!1,n.userEvents=new S(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,threshold:n.options.distance,start:T(n._start,n),hold:T(n._hold,n),move:T(n._drag,n),end:T(n._end,n),cancel:T(n._cancel,n),select:T(n._select,n)}),n._afterEndHandler=T(n._afterEnd,n),n._captureEscape=T(n._captureEscape,n)},events:[z,F,L,O,N,H],options:{name:"Draggable",distance:_.support.touch?0:5,group:"default",cursorOffset:null,axis:null,container:null,filter:null,ignore:null,holdToDrag:!1,autoScroll:!1,dropped:!1},cancelHold:function(){this._activated=!1},_captureEscape:function(e){var t=this;e.keyCode===_.keys.ESC&&(t._trigger(N,{event:e}),t.userEvents.cancel())},_updateHint:function(t){var n,i=this,r=i.options,s=i.boundaries,a=r.axis,l=i.options.cursorOffset;l?n={left:t.x.location+l.left,top:t.y.location+l.top}:(i.hintOffset.left+=t.x.delta,i.hintOffset.top+=t.y.delta,n=e.extend({},i.hintOffset)),s&&(n.top=o(n.top,s.y),n.left=o(n.left,s.x)),"x"===a?delete n.top:"y"===a&&delete n.left,i.hint.css(n)},_shouldIgnoreTarget:function(t){var n=this.options.ignore;return n&&e(t).is(n)},_select:function(e){this._shouldIgnoreTarget(e.event.target)||e.preventDefault()},_start:function(n){var i,o=this,s=o.options,a=s.container,l=s.hint;return this._shouldIgnoreTarget(n.touch.initialTouch)||s.holdToDrag&&!o._activated?(o.userEvents.cancel(),t):(o.currentTarget=n.target,o.currentTargetOffset=A(o.currentTarget),l&&(o.hint&&o.hint.stop(!0,!0).remove(),o.hint=_.isFunction(l)?e(l.call(o,o.currentTarget)):l,i=A(o.currentTarget),o.hintOffset=i,o.hint.css({position:"absolute",zIndex:2e4,left:i.left,top:i.top}).appendTo(w.body),o.angular("compile",function(){o.hint.removeAttr("ng-repeat");for(var t=e(n.target);!t.data("$$kendoScope")&&t.length;)t=t.parent();return{elements:o.hint.get(),scopeFrom:t.data("$$kendoScope")}})),M[s.group]=o,o.dropped=!1,a&&(o.boundaries=r(a,o.hint)),e(w).on(R,o._captureEscape),o._trigger(F,n)&&(o.userEvents.cancel(),o._afterEnd()),o.userEvents.capture(),t)},_hold:function(e){this.currentTarget=e.target,this._trigger(z,e)?this.userEvents.cancel():this._activated=!0},_drag:function(n){var i,o,r=this;n.preventDefault(),i=this._elementUnderCursor(n),r._withDropTarget(i,function(i,o){if(!i)return d&&(d._trigger(U,D(n,{dropTarget:e(d.targetElement)})),d=null),t;if(d){if(o===d.targetElement)return;d._trigger(U,D(n,{dropTarget:e(d.targetElement)}))}i._trigger(V,D(n,{dropTarget:e(o)})),d=D(i,{targetElement:o})}),r._trigger(L,D(n,{dropTarget:d,elementUnderCursor:i})),this.options.autoScroll&&(this._cursorElement!==i&&(this._scrollableParent=u(i),this._cursorElement=i),this._scrollableParent[0]&&(o=h(n.x.location,n.y.location,l(this._scrollableParent)),this._scrollCompenstation=e.extend({},this.hintOffset),this._scrollVelocity=o,0===o.y&&0===o.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(e.proxy(this,"_autoScroll"),50)))),r.hint&&r._updateHint(n)},_autoScroll:function(){var e,t,n,i,o,r,s,a=this._scrollableParent[0],l=this._scrollVelocity,u=this._scrollCompenstation;a&&(n=a===c()[0],n?(e=w.body.scrollHeight>b.height(),t=w.body.scrollWidth>b.width()):(e=a.scrollHeight>=a.offsetHeight,t=a.scrollWidth>=a.offsetWidth),i=a.scrollTop+l.y,o=e&&i>0&&a.scrollHeight>i,r=a.scrollLeft+l.x,s=t&&r>0&&a.scrollWidth>r,o&&(a.scrollTop+=l.y),s&&(a.scrollLeft+=l.x),n&&(s||o)&&(o&&(u.top+=l.y),s&&(u.left+=l.x),this.hint.css(u)))},_end:function(t){this._withDropTarget(this._elementUnderCursor(t),function(n,i){n&&(n._drop(D({},t,{dropTarget:e(i)})),d=null)}),this._cancel(this._trigger(O,t))},_cancel:function(e){var t=this;t._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),t._activated=!1,t.hint&&!t.dropped?setTimeout(function(){t.hint.stop(!0,!0),e?t._afterEndHandler():t.hint.animate(t.currentTargetOffset,"fast",t._afterEndHandler)},0):t._afterEnd()},_trigger:function(e,t){var n=this;return n.trigger(e,D({},t.event,{x:t.x,y:t.y,currentTarget:n.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(e){var t=I(e),i=this.hint;return i&&n(i[0],t)&&(i.hide(),t=I(e),t||(t=I(e)),i.show()),t},_withDropTarget:function(e,t){var n,i=this.options.group,o=E[i],r=P[i];(o&&o.length||r&&r.length)&&(n=s(e,o,r),n?t(n.target,n.targetElement):t())},destroy:function(){var e=this;k.fn.destroy.call(e),e._afterEnd(),e.userEvents.destroy(),this._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),e.currentTarget=null},_afterEnd:function(){var t=this;t.hint&&t.hint.remove(),delete M[t.options.group],t.trigger("destroy"),t.trigger(H),e(w).off(R,t._captureEscape)}}),_.ui.plugin(g),_.ui.plugin(m),_.ui.plugin(v),_.TapCapture=j,_.containerBoundaries=r,D(_.ui,{Pane:Y,PaneDimensions:q,Movable:p}),_.ui.Draggable.utils={autoScrollVelocity:h,scrollableViewPort:l,findScrollableParent:u}}(window.kendo.jQuery)}(),function(){!function(e,t){var n=window.kendo,i=n.mobile,o=n.effects,r=i.ui,s=e.proxy,a=e.extend,l=r.Widget,c=n.Class,u=n.ui.Movable,h=n.ui.Pane,d=n.ui.PaneDimensions,f=o.Transition,p=o.Animation,g=Math.abs,m=500,v=.7,_=.96,y=10,w=55,b=.5,x=5,k="km-scroller-release",C="km-scroller-refresh",S="pull",T="change",D="resize",A="scroll",M=2,E=p.extend({init:function(e){var t=this;p.fn.init.call(t),a(t,e),t.userEvents.bind("gestureend",s(t.start,t)),t.tapCapture.bind("press",s(t.cancel,t))},enabled:function(){return this.dimensions.minScale>this.movable.scale},done:function(){return.01>this.dimensions.minScale-this.movable.scale},tick:function(){var e=this.movable;e.scaleWith(1.1),this.dimensions.rescale(e.scale)},onEnd:function(){var e=this.movable;e.scaleTo(this.dimensions.minScale),this.dimensions.rescale(e.scale)}}),P=p.extend({init:function(e){var t=this;p.fn.init.call(t),a(t,e,{transition:new f({axis:e.axis,movable:e.movable,onEnd:function(){t._end()}})}),t.tapCapture.bind("press",function(){t.cancel()}),t.userEvents.bind("end",s(t.start,t)),t.userEvents.bind("gestureend",s(t.start,t)),t.userEvents.bind("tap",s(t.onEnd,t))},onCancel:function(){this.transition.cancel()},freeze:function(e){var t=this;t.cancel(),t._moveTo(e)},onEnd:function(){var e=this;e.paneAxis.outOfBounds()?e._snapBack():e._end()},done:function(){return g(this.velocity)<1},start:function(e){var t,n=this;n.dimension.enabled&&(n.paneAxis.outOfBounds()?n._snapBack():(t=e.touch.id===M?0:e.touch[n.axis].velocity,n.velocity=Math.max(Math.min(t*n.velocityMultiplier,w),-w),n.tapCapture.captureNext(),p.fn.start.call(n)))},tick:function(){var e=this,t=e.dimension,n=e.paneAxis.outOfBounds()?b:e.friction,i=e.velocity*=n,o=e.movable[e.axis]+i;!e.elastic&&t.outOfBounds(o)&&(o=Math.max(Math.min(o,t.max),t.min),e.velocity=0),e.movable.moveAxis(e.axis,o)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_snapBack:function(){var e=this,t=e.dimension,n=e.movable[e.axis]>t.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:m,ease:f.easeOutExpo})}}),I=p.extend({init:function(e){var t=this;n.effects.Animation.fn.init.call(this),a(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return g(this.offset.y)<x&&g(this.offset.x)<x},onEnd:function(){this.moveTo(this.destination),this.callback&&this.callback.call()},setCoordinates:function(e,t){this.offset={},this.origin=e,this.destination=t},setCallback:function(e){e&&n.isFunction(e)?this.callback=e:e=t},_updateCoordinates:function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}}}),R=c.extend({init:function(t){var n=this,i="x"===t.axis,o=e('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');a(n,t,{element:o,elementSize:0,movable:new u(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(T,s(n.refresh,n)),n.container.append(o),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,o=e.scrollMovable,r=i/n.total,s=Math.round(-o[t]*r),a=Math.round(i*r);r>=1?this.element.css("display","none"):this.element.css("display",""),s+a>i?a=i-s:0>s&&(a+=s,s=0),e.elementSize!=a&&(e.element.css(e.size,a+"px"),e.elementSize=a),e.movable.moveAxis(t,s)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),B=l.extend({init:function(i,o){var r,c,f,p,m,v,_,y,w,b=this;return l.fn.init.call(b,i,o),i=b.element,(b._native=b.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),a(b,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),r=i.children().eq(1),c=new n.TapCapture(i),f=new u(r),p=new d({element:r,container:i,forcedEnabled:b.options.zoom}),m=this.options.avoidScrolling,v=new n.UserEvents(i,{allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:b.options.zoom,start:function(t){p.refresh();var n=g(t.x.velocity),i=g(t.y.velocity),o=2*n>=i,r=e.contains(b.fixedContainer[0],t.event.target),s=2*i>=n;!r&&!m(t)&&b.enabled&&(p.x.enabled&&o||p.y.enabled&&s)?v.capture():v.cancel()}}),_=new h({movable:f,dimensions:p,userEvents:v,elastic:b.options.elastic}),y=new E({movable:f,dimensions:p,userEvents:v,tapCapture:c}),w=new I({moveTo:function(e){b.scrollTo(e.x,e.y)}}),f.bind(T,function(){b.scrollTop=-f.y,b.scrollLeft=-f.x,b.trigger(A,{scrollTop:b.scrollTop,scrollLeft:b.scrollLeft})}),b.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",s(this,"_wheelScroll")),a(b,{movable:f,dimensions:p,zoomSnapBack:y,animatedScroller:w,userEvents:v,pane:_,tapCapture:c,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),b._initAxis("x"),b._initAxis("y"),b._wheelEnd=function(){b._wheel=!1,b.userEvents.end(0,b._wheelY)},p.refresh(),b.options.pullToRefresh&&b._initPullToRefresh(),t)},_wheelScroll:function(e){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[S,A,D],_resize:function(){this._native||this.contentResized()},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(this.scrollElement.scrollLeft(g(e)),this.scrollElement.scrollTop(g(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,o;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},o={x:e,y:t},this.animatedScroller.setCoordinates(i,o),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(C),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">'+e.pullTemplate({})+"</span></span>"),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",s(e._paneChange,e)),e.userEvents.bind("end",s(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(k).addClass(C),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/b>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(C).addClass(k),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(k),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],o=t.tapCapture,r=t.pane[e],s=new R({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(T,function(){s.refresh()}),r.bind(T,function(){s.show()}),t[e+"inertia"]=new P({axis:e,paneAxis:r,movable:n,tapCapture:o,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||_,velocityMultiplier:t.options.velocityMultiplier||y,end:function(){s.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});r.plugin(B)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(t,n){return t===n||e.contains(t,n)}var i=window.kendo,o=i.ui,r=o.Widget,s=i.support,a=i.getOffset,l="open",c="close",u="deactivate",h="activate",d="center",f="left",p="right",g="top",m="bottom",v="absolute",_="hidden",y="body",w="location",b="position",x="visible",k="effects",C="k-state-active",S="k-state-border",T=/k-state-border-(\w+)/,D=".k-picker-wrap, .k-dropdown-wrap, .k-link",A="down",M=e(document.documentElement),E=e(window),P="scroll",I="resize scroll",R=s.transitions.css,B=R+"transform",F=e.extend,z=".kendoPopup",L=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],O=r.extend({init:function(t,n){var o,s=this;n=n||{},n.isRtl&&(n.origin=n.origin||m+" "+p,n.position=n.position||g+" "+p),r.fn.init.call(s,t,n),t=s.element,n=s.options,s.collisions=n.collision?n.collision.split(" "):[],s.downEvent=i.applyEventMap(A,i.guid()),1===s.collisions.length&&s.collisions.push(s.collisions[0]),o=e(s.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),n.appendTo=e(e(n.appendTo)[0]||o[0]||y),s.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!n.isRtl).css({position:v}).appendTo(n.appendTo).on("mouseenter"+z,function(){s._hovered=!0}).on("mouseleave"+z,function(){s._hovered=!1}),s.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),F(n.animation.open,{complete:function(){s.wrapper.css({overflow:x}),s._activated=!0,s._trigger(h)}}),F(n.animation.close,{complete:function(){s._animationClose()}}),s._mousedownProxy=function(e){s._mousedown(e)},s._resizeProxy=function(e){s._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+z,e.proxy(s.toggle,s))},events:[l,h,c,u],options:{name:"Popup",toggleEvent:"click",origin:m+" "+f,position:g+" "+f,anchor:y,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var t,n,o,r,s=this,a=s.options;s.wrapper.hide(),t=s.wrapper.data(w),n=e(a.anchor),t&&s.wrapper.css(t),a.anchor!=y&&(o=((n.attr("class")||"").match(T)||["","down"])[1],r=S+"-"+o,n.removeClass(r).children(D).removeClass(C).removeClass(r),s.element.removeClass(S+"-"+i.directions[o].reverse)),s._closing=!1,s._trigger(u)},destroy:function(){var t,n=this,o=n.options,s=n.element.off(z);r.fn.destroy.call(n),o.toggleTarget&&e(o.toggleTarget).off(z),o.modal||(M.unbind(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),i.destroy(n.element.children()),s.removeData(),o.appendTo[0]===document.body&&(t=s.parent(".k-animation-container"),t[0]?t.remove():s.remove())},open:function(t,n){var o,r,a,c=this,u={isFixed:!isNaN(parseInt(n,10)),x:t,y:n},h=c.element,d=c.options,f="down",p=e(d.anchor),m=h[0]&&h.hasClass("km-widget");if(!c.visible()){if(d.copyAnchorStyles&&(m&&"font-size"==L[0]&&L.shift(),h.css(i.getComputedStyles(p[0],L))),h.data("animating")||c._trigger(l))return;c._activated=!1,d.modal||(M.unbind(c.downEvent,c._mousedownProxy).bind(c.downEvent,c._mousedownProxy),s.mobileOS.ios||s.mobileOS.android||(c._toggleResize(!1),c._toggleResize(!0))),c.wrapper=r=i.wrap(h,d.autosize).css({overflow:_,display:"block",position:v}),s.mobileOS.android&&r.css(B,"translatez(0)"),r.css(b),e(d.appendTo)[0]==document.body&&r.css(g,"-10000px"),o=F(!0,{},d.animation.open),c.flipped=c._position(u),o.effects=i.parseEffects(o.effects,c.flipped),f=o.effects.slideIn?o.effects.slideIn.direction:f,d.anchor!=y&&(a=S+"-"+f,h.addClass(S+"-"+i.directions[f].reverse),p.addClass(a).children(D).addClass(C).addClass(a)),h.data(k,o.effects).kendoStop(!0).kendoAnimate(o)}},position:function(){this.visible()&&this._position()},toggle:function(){var e=this;e[e.visible()?c:l]()},visible:function(){return this.element.is(":"+x)},close:function(n){var o,r,s,a,l=this,u=l.options;if(l.visible()){if(o=l.wrapper[0]?l.wrapper:i.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(c))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),M.unbind(l.downEvent,l._mousedownProxy),n?r={hide:!0,effects:{}}:(r=F(!0,{},u.animation.close),s=l.element.data(k),a=r.effects,!a&&!i.size(a)&&s&&i.size(s)&&(r.effects=s,r.reverse=!0),l._closing=!0),l.element.kendoStop(!0),o.css({overflow:_}),l.element.kendoAnimate(r)}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;"resize"===e.type?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(e){var t=e?"on":"off";this._scrollableParents()[t](P,this._resizeProxy),E[t](I,this._resizeProxy)},_mousedown:function(t){var o=this,r=o.element[0],s=o.options,a=e(s.anchor)[0],l=s.toggleTarget,c=i.eventTarget(t),u=e(c).closest(".k-popup"),h=u.parent().parent(".km-shim").length;u=u[0],(h||!u||u===o.element[0])&&"popover"!==e(t.target).closest("a").data("rel")&&(n(r,c)||n(a,c)||l&&n(e(l)[0],c)||o.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i},_flip:function(e,t,n,i,o,r,s){var a=0;return s=s||t,r!==o&&r!==d&&o!==d&&(e+s>i&&(a+=-(n+t)),0>e+a&&(a+=n+t)),a},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return i.isScrollable(t)})},_position:function(t){var n,o,r,l,c,u,h,d,f,p,g,m=this,_=m.element,y=m.wrapper,x=m.options,k=e(x.viewport),C=k.offset(),S=e(x.anchor),T=x.origin.toLowerCase().split(" "),D=x.position.toLowerCase().split(" "),A=m.collisions,M=s.zoomLevel(),E=10002,P=!!(k[0]==window&&window.innerWidth&&1.02>=M),I=0,R=document.documentElement,B=P?window.innerWidth:k.width(),z=P?window.innerHeight:k.height();if(P&&R.scrollHeight-R.clientHeight>0&&(B-=i.support.scrollbar()),n=S.parents().filter(y.siblings()),n[0])if(r=Math.max(+n.css("zIndex"),0))E=r+10;else for(o=S.parentsUntil(n),l=o.length;l>I;I++)r=+e(o[I]).css("zIndex"),r&&r>E&&(E=r+10);return y.css("zIndex",E),y.css(t&&t.isFixed?{left:t.x,top:t.y}:m._align(T,D)),c=a(y,b,S[0]===y.offsetParent()[0]),u=a(y),h=S.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),h.length&&(c=a(y,b,!0),u=a(y)),k[0]===window?(u.top-=window.pageYOffset||document.documentElement.scrollTop||0,u.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(u.top-=C.top,u.left-=C.left),m.wrapper.data(w)||y.data(w,F({},c)),d=F({},u),f=F({},c),p=x.adjustSize,"fit"===A[0]&&(f.top+=m._fit(d.top,y.outerHeight()+p.height,z/M)),"fit"===A[1]&&(f.left+=m._fit(d.left,y.outerWidth()+p.width,B/M)),g=F({},f),"flip"===A[0]&&(f.top+=m._flip(d.top,_.outerHeight(),S.outerHeight(),z/M,T[0],D[0],y.outerHeight())),"flip"===A[1]&&(f.left+=m._flip(d.left,_.outerWidth(),S.outerWidth(),B/M,T[1],D[1],y.outerWidth())),_.css(b,v),y.css(f),f.left!=g.left||f.top!=g.top},_align:function(t,n){var i,o=this,r=o.wrapper,s=e(o.options.anchor),l=t[0],c=t[1],u=n[0],h=n[1],f=a(s),g=e(o.options.appendTo),v=r.outerWidth(),_=r.outerHeight(),y=s.outerWidth(),w=s.outerHeight(),b=f.top,x=f.left,k=Math.round;return g[0]!=document.body&&(i=a(g),b-=i.top,x-=i.left),l===m&&(b+=w),l===d&&(b+=k(w/2)),u===m&&(b-=_),u===d&&(b-=k(_/2)),c===p&&(x+=y),c===d&&(x+=k(y/2)),h===p&&(x-=v),h===d&&(x-=k(v/2)),{top:b,left:x}}});o.plugin(O)}(window.kendo.jQuery)}(),function(){!function(e){function t(e){for(;e.length;)n(e),e=e.parent()}function n(e){var t=e.data(r.ns+"title");t&&(e.attr("title",t),e.removeData(r.ns+"title"));
|
|
}function i(e){var t=e.attr("title");t&&(e.data(r.ns+"title",t),e.attr("title",""))}function o(e){for(;e.length&&!e.is("body");)i(e),e=e.parent()}var r=window.kendo,s=r.ui.Widget,a=r.ui.Popup,l=r.isFunction,c=e.isPlainObject,u=e.extend,h=e.proxy,d=e(document),f=r.isLocalUrl,p="_tt_active",g="aria-describedby",m="show",v="hide",_="error",y="contentLoad",w="requestStart",b="k-content-frame",x='<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',k=r.template("<iframe frameborder='0' class='"+b+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),C=".kendoTooltip",S={bottom:{origin:"bottom center",position:"top center"},top:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"},center:{position:"center center",origin:"center center"}},T={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},D={bottom:"n",top:"s",left:"e",right:"w",center:"n"},A={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},M=function(e){return e.target.data(r.ns+"title")},E=s.extend({init:function(e,t){var n,i=this;s.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=A[n],i._documentKeyDownHandler=h(i._documentKeyDown,i),i.element.on(i.options.showOn+C,i.options.filter,h(i._showOn,i)).on("mouseenter"+C,i.options.filter,h(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+C,i.options.filter,h(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:M,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[m,v,y,_,w],_mouseenter:function(t){o(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n.options.showOn&&n.options.showOn.match(/click|focus/)?n._show(i):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,o=n.content,s=n.options.iframe;c(i)&&i.url?("iframe"in n.options||(s=!f(i.url)),n.trigger(w,{options:i,target:e}),s?(o.hide(),t=o.find("."+b)[0],t?t.src=i.url||t.src:o.html(k({content:i})),o.find("."+b).off("load"+C).on("load"+C,function(){n.trigger(y),o.show()})):(o.empty(),r.ui.progress(o,!0),n._ajaxRequest(i))):i&&l(i)?(i=i({sender:this,target:e}),o.html(i||"")):o.html(i),n.angular("compile",function(){return{elements:o}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(u({type:"GET",dataType:"html",cache:!1,error:function(e,n){r.ui.progress(t.content,!1),t.trigger(_,{status:n,xhr:e})},success:h(function(e){r.ui.progress(t.content,!1),t.content.html(e),t.trigger(y)},t)},e))},_documentKeyDown:function(e){e.keyCode===r.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,o(e),this._show(e)},_show:function(e){var n=this,i=n.target();n.popup||n._initPopup(),i&&i[0]!=e[0]&&(n.popup.close(),n.popup.element.kendoStop(!0,!0)),i&&i[0]==e[0]||(n._appendContent(e),n.popup.options.anchor=e),n.popup.one("deactivate",function(){t(e),e.removeAttr(g),this.element.removeAttr("id").attr("aria-hidden",!0),d.off("keydown"+C,n._documentKeyDownHandler)}),n.popup.open()},_initPopup:function(){var t=this,n=t.options,i=e(r.template(x)({callout:n.callout&&"center"!==n.position,dir:D[n.position],autoHide:n.autoHide}));t.popup=new a(i,u({activate:function(){var e=this.options.anchor,i=e[0].id||t.element[0].id;i&&(e.attr(g,i+p),this.element.attr("id",i+p)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),d.on("keydown"+C,t._documentKeyDownHandler),t.trigger(m)},close:function(){t.trigger(v)},copyAnchorStyles:!1,animation:n.animation},S[n.position])),i.css({width:n.width,height:n.height}),t.content=i.find(".k-tooltip-content"),t.arrow=i.find(".k-callout"),n.autoHide?i.on("mouseleave"+C,h(t._mouseleave,t)):i.on("click"+C,".k-tooltip-button",h(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(n){if(this.popup){var i=e(n.currentTarget),o=i.offset(),r=n.pageX,s=n.pageY;if(o.right=o.left+i.outerWidth(),o.bottom=o.top+i.outerHeight(),r>o.left&&o.right>r&&s>o.top&&o.bottom>s)return;this.popup.close()}else t(e(n.currentTarget));clearTimeout(this.timeout)},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,o=i.offset,r=t.popup,s=r.options.anchor,a=e(s).offset(),l=parseInt(t.arrow.css("border-top-width"),10),c=e(r.element).offset(),u=D[r.flipped?T[n]:n],h=a[o]-c[o]+e(s)[i.size]()/2-l;t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+u).css(o,h)},target:function(){return this.popup?this.popup.options.anchor:null},destroy:function(){var e=this.popup;e&&(e.element.off(C),e.destroy()),clearTimeout(this.timeout),this.element.off(C),d.off("keydown"+C,this._documentKeyDownHandler),s.fn.destroy.call(this)}});r.ui.plugin(E)}(window.kendo.jQuery)}(),function(){!function(e,t,n){function i(e,o){var s,u;if(null==e||"none"==e)return null;if(e instanceof a)return e;if(e=e.toLowerCase(),s=r.exec(e))return e="transparent"==s[1]?new l(1,1,1,0):i(h.namedColors[s[1]],o),e.match=[s[1]],e;if((s=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(e))?u=new c(n(s[1],16),n(s[2],16),n(s[3],16),1):(s=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(e))?u=new c(n(s[1]+s[1],16),n(s[2]+s[2],16),n(s[3]+s[3],16),1):(s=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(e))?u=new c(n(s[1],10),n(s[2],10),n(s[3],10),1):(s=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(e))?u=new c(n(s[1],10),n(s[2],10),n(s[3],10),t(s[4])):(s=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(e))?u=new l(t(s[1])/100,t(s[2])/100,t(s[3])/100,1):(s=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(e))&&(u=new l(t(s[1])/100,t(s[2])/100,t(s[3])/100,t(s[4]))),u)u.match=s;else if(!o)throw Error("Cannot parse color: "+e);return u}function o(e,t,n){for(n||(n="0"),e=e.toString(16);t>e.length;)e="0"+e;return e}var r,s,a,l,c,u,h=function(e){var t,n,i,o,r,s=this,a=h.formats;if(1===arguments.length)for(e=s.resolveColor(e),o=0;a.length>o;o++)t=a[o].re,n=a[o].process,i=t.exec(e),i&&(r=n(i),s.r=r[0],s.g=r[1],s.b=r[2]);else s.r=arguments[0],s.g=arguments[1],s.b=arguments[2];s.r=s.normalizeByte(s.r),s.g=s.normalizeByte(s.g),s.b=s.normalizeByte(s.b)};h.prototype={toHex:function(){var e=this,t=e.padDigit,n=e.r.toString(16),i=e.g.toString(16),o=e.b.toString(16);return"#"+t(n)+t(i)+t(o)},resolveColor:function(e){return e=e||"black","#"==e.charAt(0)&&(e=e.substr(1,6)),e=e.replace(/ /g,""),e=e.toLowerCase(),e=h.namedColors[e]||e},normalizeByte:function(e){return 0>e||isNaN(e)?0:e>255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=this,n=Math.round;return t.r=n(t.normalizeByte(t.r*e)),t.g=n(t.normalizeByte(t.g*e)),t.b=n(t.normalizeByte(t.b*e)),t},percBrightness:function(){var e=this;return Math.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)}},h.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[n(e[1],10),n(e[2],10),n(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[n(e[1],16),n(e[2],16),n(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[n(e[1]+e[1],16),n(e[2]+e[2],16),n(e[3]+e[3],16)]}}],h.namedColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},r=["transparent"];for(s in h.namedColors)h.namedColors.hasOwnProperty(s)&&r.push(s);r=RegExp("^("+r.join("|")+")(\\W|$)","i"),a=kendo.Class.extend({toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+t((+this.a).toFixed(3))+")"},toDisplay:function(){return kendo.support.browser.msie&&kendo.support.browser.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()==i(e).toCssRgba()},diff:function(e){if(null==e)return NaN;var t=this.toBytes();return e=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-e.r),2)+Math.pow(.59*(t.g-e.g),2)+Math.pow(.11*(t.b-e.b),2))},clone:function(){var e=this.toBytes();return e===this&&(e=new c(e.r,e.g,e.b,e.a)),e}}),l=a.extend({init:function(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this.r,i=this.g,o=this.b,r=Math.min(n,i,o),s=Math.max(n,i,o),a=s,l=s-r;return 0===l?new u(0,0,a,this.a):(0!==s?(t=l/s,e=n==s?(i-o)/l:i==s?2+(o-n)/l:4+(n-i)/l,e*=60,0>e&&(e+=360)):(t=0,e=-1),new u(e,t,a,this.a))},toBytes:function(){return new c(255*this.r,255*this.g,255*this.b,this.a)}}),c=l.extend({init:function(e,t,n,i){this.r=Math.round(e),this.g=Math.round(t),this.b=Math.round(n),this.a=i},toRGB:function(){return new l(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHex:function(){return o(this.r,2)+o(this.g,2)+o(this.b,2)},toBytes:function(){return this}}),u=a.extend({init:function(e,t,n,i){this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,o,r,s,a,c=this.h,u=this.s,h=this.v;if(0===u)t=n=i=h;else switch(c/=60,e=Math.floor(c),o=c-e,r=h*(1-u),s=h*(1-u*o),a=h*(1-u*(1-o)),e){case 0:t=h,n=a,i=r;break;case 1:t=s,n=h,i=r;break;case 2:t=r,n=h,i=a;break;case 3:t=r,n=s,i=h;break;case 4:t=a,n=r,i=h;break;default:t=h,n=r,i=s}return new l(t,n,i,this.a)},toBytes:function(){return this.toRGB().toBytes()}}),h.fromBytes=function(e,t,n,i){return new c(e,t,n,null!=i?i:1)},h.fromRGB=function(e,t,n,i){return new l(e,t,n,null!=i?i:1)},h.fromHSV=function(e,t,n,i){return new u(e,t,n,null!=i?i:1)},kendo.Color=h,kendo.parseColor=i}(window.kendo.jQuery,parseFloat,parseInt)}(),function(){!function(){function e(e){return typeof e!==z}function t(e,t){var i=n(t);return E.round(e*i)/i}function n(e){return e?E.pow(10,e):1}function i(e,t,n){return E.max(E.min(e,n),t)}function o(e){return e*R}function r(e){return e/R}function s(e){return"number"==typeof e&&!isNaN(e)}function a(t,n){return e(t)?t:n}function l(e){return e*e}function c(e){var t,n=[];for(t in e)n.push(t+e[t]);return n.sort().join("")}function u(e){var t,n=2166136261;for(t=0;e.length>t;++t)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=e.charCodeAt(t);return n>>>0}function h(e){return u(c(e))}function d(e){var t,n=e.length,i=B,o=F;for(t=0;n>t;t++)o=E.max(o,e[t]),i=E.min(i,e[t]);return{min:i,max:o}}function f(e){return d(e).min}function p(e){return d(e).max}function g(e){return v(e).min}function m(e){return v(e).max}function v(e){var t,n,i,o=B,r=F;for(t=0,n=e.length;n>t;t++)i=e[t],null!==i&&isFinite(i)&&(o=E.min(o,i),r=E.max(r,i));return{min:o===B?void 0:o,max:r===F?void 0:r}}function _(e){return e?e[e.length-1]:void 0}function y(e,t){return e.push.apply(e,t),e}function w(e){return P.template(e,{useWithBlock:!1,paramName:"d"})}function b(t,n){return e(n)&&null!==n?" "+t+"='"+n+"' ":""}function x(e){var t,n="";for(t=0;e.length>t;t++)n+=b(e[t][0],e[t][1]);return n}function k(t){var n,i,o="";for(n=0;t.length>n;n++)i=t[n][1],e(i)&&(o+=t[n][0]+":"+i+";");return""!==o?o:void 0}function C(e){return"string"!=typeof e&&(e+="px"),e}function S(e){var t,n,i=[];if(e)for(t=P.toHyphens(e).split("-"),n=0;t.length>n;n++)i.push("k-pos-"+t[n]);return i.join(" ")}function T(t){return""===t||null===t||"none"===t||"transparent"===t||!e(t)}function D(e){for(var t={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},n=[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],i="";e>0;)n[0]>e?n.shift():(i+=t[n[0]],e-=n[0]);return i}function A(e){var t,n,i,o,r;for(e=e.toLowerCase(),t={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},n=0,i=0,o=0;e.length>o;++o){if(r=t[e.charAt(o)],!r)return null;n+=r,r>i&&(n-=2*i),i=r}return n}function M(e){var t=Object.create(null);return function(){var n,i="";for(n=arguments.length;--n>=0;)i+=":"+arguments[n];return i in t?t[i]:e.apply(this,arguments)}}var E=Math,P=window.kendo,I=P.deepExtend,R=E.PI/180,B=Number.MAX_VALUE,F=-Number.MAX_VALUE,z="undefined",L=Date.now;L||(L=function(){return(new Date).getTime()}),I(P,{util:{MAX_NUM:B,MIN_NUM:F,append:y,arrayLimits:d,arrayMin:f,arrayMax:p,defined:e,deg:r,hashKey:u,hashObject:h,isNumber:s,isTransparent:T,last:_,limitValue:i,now:L,objectKey:c,round:t,rad:o,renderAttr:b,renderAllAttr:x,renderPos:S,renderSize:C,renderStyle:k,renderTemplate:w,sparseArrayLimits:v,sparseArrayMin:g,sparseArrayMax:m,sqr:l,valueOrDefault:a,romanToArabic:A,arabicToRoman:D,memoize:M}}),P.drawing.util=P.util,P.dataviz.util=P.util}()}(),function(){!function(e){function t(e,t,n){return c.current.measure(e,t,n)}var n=document,i=window.kendo,o=i.Class,r=i.util,s=r.defined,a=o.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var n=this,i=n._map,o={key:e,value:t};i[e]=o,n._head?(n._tail.newer=o,o.older=n._tail,n._tail=o):n._head=n._tail=o,n._length>=n._size?(i[n._head.key]=null,n._head=n._head.newer,n._head.older=null):n._length++},get:function(e){var t=this,n=t._map[e];return n?(n===t._head&&n!==t._tail&&(t._head=n.newer,t._head.older=null),n!==t._tail&&(n.older&&(n.older.newer=n.newer,n.newer.older=n.older),n.older=t._tail,n.newer=null,t._tail.newer=n,t._tail=n),n.value):void 0}}),l=e("<div style='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;' />")[0],c=o.extend({init:function(e){this._cache=new a(1e3),this._initOptions(e)},options:{baselineMarkerSize:1},measure:function(t,i,o){var a,c,u,h,d,f=r.objectKey(i),p=r.hashKey(t+f),g=this._cache.get(p);if(g)return g;a={width:0,height:0,baseline:0},c=o?o:l,u=this._baselineMarker().cloneNode(!1);for(h in i)d=i[h],s(d)&&(c.style[h]=d);return e(c).text(t),c.appendChild(u),n.body.appendChild(c),(t+"").length&&(a.width=c.offsetWidth-this.options.baselineMarkerSize,a.height=c.offsetHeight,a.baseline=u.offsetTop+this.options.baselineMarkerSize),a.width>0&&a.height>0&&this._cache.put(p,a),c.parentNode.removeChild(c),a},_baselineMarker:function(){return e("<div class='k-baseline-marker' style='display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;' />")[0]}});c.current=new c,i.util.TextMetrics=c,i.util.LRUCache=a,i.util.measureText=t}(window.kendo.jQuery)}(),function(){!function(){function e(e){var n,i,o,s,a,l,c,u="",h=0;for(e=t(e);e.length>h;)n=e.charCodeAt(h++),i=e.charCodeAt(h++),o=e.charCodeAt(h++),s=n>>2,a=(3&n)<<4|i>>4,l=(15&i)<<2|o>>6,c=63&o,isNaN(i)?l=c=64:isNaN(o)&&(c=64),u=u+r.charAt(s)+r.charAt(a)+r.charAt(l)+r.charAt(c);return u}function t(e){var t,n,i="";for(t=0;e.length>t;t++)n=e.charCodeAt(t),128>n?i+=o(n):2048>n?(i+=o(192|n>>>6),i+=o(128|63&n)):65536>n&&(i+=o(224|n>>>12),i+=o(128|n>>>6&63),i+=o(128|63&n));return i}var n=window.kendo,i=n.deepExtend,o=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i(n.util,{encodeBase64:e,encodeUTF8:t})}()}(),function(){!function(e){var t=Math,n=window.kendo,i=n.deepExtend,o=e.inArray,r={observers:function(){return this._observers=this._observers||[]},addObserver:function(e){return this._observers?this._observers.push(e):this._observers=[e],this},removeObserver:function(e){var t=this.observers(),n=o(e,t);return-1!=n&&t.splice(n,1),this},trigger:function(e,t){var n,i,o=this._observers;if(o&&!this._suspended)for(i=0;o.length>i;i++)n=o[i],n[e]&&n[e](t);return this},optionsChange:function(e){this.trigger("optionsChange",e)},geometryChange:function(e){this.trigger("geometryChange",e)},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=t.max((this._suspended||0)-1,0),this},_observerField:function(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}};i(n,{mixins:{ObserversMixin:r}})}(window.kendo.jQuery)}(),function(){!function(e){function t(e){return null===e?null:e instanceof m?e:new m(e)}function n(e){return e&&y.isFunction(e.matrix)?e.matrix():e}function i(e,t,n,i){var o=0,r=0;return i&&(o=v.atan2(i.c*n,i.a*t),0!==i.b&&(r=v.atan2(i.d*n,i.b*t))),{x:o,y:r}}function o(e,t){for(;t>e;)e+=90;return e}function r(e,t){var n,i,o;for(n=0;t.length>n;n++)i=t[n],o=i.charAt(0).toUpperCase()+i.substring(1,i.length),e["set"+o]=s(i),e["get"+o]=a(i)}function s(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function a(e){return function(){return this[e]}}function l(e,t,n){e>t&&(t+=360);var i=v.abs(t-e);return n||(i=360-i),i}function c(e,t,n,i,o,r){var s=D((o-e)/n,3),a=D((r-t)/i,3);return D(T(v.atan2(a,s)))}function u(e,t,n,i,o,r,s,a){var u,h,d,f,p,g,m,y,w,b,x,k,C,S,T,D,A,M;if(t!==i)w=n-e,b=i-t,x=_(o,2),k=_(r,2),C=(k*w*(e+n)+x*b*(t+i))/(2*x*b),S=C-i,T=-(w*k)/(x*b),p=1/x+_(T,2)/k,g=2*(T*S/k-n/x),m=_(n,2)/x+_(S,2)/k-1,y=v.sqrt(_(g,2)-4*p*m),u=(-g-y)/(2*p),h=C+T*u,d=(-g+y)/(2*p),f=C+T*d;else{if(e===n)return!1;g=-2*i,m=_((n-e)*r/(2*o),2)+_(i,2)-_(r,2),y=v.sqrt(_(g,2)-4*m),u=d=(e+n)/2,h=(-g-y)/2,f=(-g+y)/2}return D=c(u,h,o,r,e,t),A=c(u,h,o,r,n,i),M=l(D,A,a),(s&&180>=M||!s&&M>180)&&(u=d,h=f,D=c(u,h,o,r,e,t),A=c(u,h,o,r,n,i)),{center:new P(u,h),startAngle:D,endAngle:A}}var h,d,f,p,g,m,v=Math,_=v.pow,y=window.kendo,w=y.Class,b=y.deepExtend,x=y.mixins.ObserversMixin,k=y.util,C=k.defined,S=k.rad,T=k.deg,D=k.round,A=v.PI/2,M=k.MIN_NUM,E=k.MAX_NUM,P=w.extend({init:function(e,t){this.x=e||0,this.y=t||0},equals:function(e){return e&&e.x===this.x&&e.y===this.y},clone:function(){return new P(this.x,this.y)},rotate:function(e,n){return this.transform(t().rotate(e,n))},translate:function(e,t){return this.x+=e,this.y+=t,this.geometryChange(),this},translateWith:function(e){return this.translate(e.x,e.y)},move:function(e,t){return this.x=this.y=0,this.translate(e,t)},scale:function(e,t){return C(t)||(t=e),this.x*=e,this.y*=t,this.geometryChange(),this},scaleCopy:function(e,t){return this.clone().scale(e,t)},transform:function(e){var t=n(e),i=this.x,o=this.y;return this.x=t.a*i+t.c*o+t.e,this.y=t.b*i+t.d*o+t.f,this.geometryChange(),this},transformCopy:function(e){var t=this.clone();return e&&t.transform(e),t},distanceTo:function(e){var t=this.x-e.x,n=this.y-e.y;return v.sqrt(t*t+n*n)},round:function(e){return this.x=D(this.x,e),this.y=D(this.y,e),this.geometryChange(),this},toArray:function(e){var t=C(e),n=t?D(this.x,e):this.x,i=t?D(this.y,e):this.y;return[n,i]}});r(P.fn,["x","y"]),b(P.fn,x),P.fn.toString=function(e,t){var n=this.x,i=this.y;return C(e)&&(n=D(n,e),i=D(i,e)),t=t||" ",n+t+i},P.create=function(e,t){return C(e)?e instanceof P?e:1===arguments.length&&2===e.length?new P(e[0],e[1]):new P(e,t):void 0},P.min=function(){var e,t,n=k.MAX_NUM,i=k.MAX_NUM;for(e=0;e<arguments.length;e++)t=arguments[e],n=v.min(t.x,n),i=v.min(t.y,i);return new P(n,i)},P.max=function(){var e,t,n=k.MIN_NUM,i=k.MIN_NUM;for(e=0;e<arguments.length;e++)t=arguments[e],n=v.max(t.x,n),i=v.max(t.y,i);return new P(n,i)},P.minPoint=function(){return new P(M,M)},P.maxPoint=function(){return new P(E,E)},P.ZERO=new P(0,0),h=w.extend({init:function(e,t){this.width=e||0,this.height=t||0},equals:function(e){return e&&e.width===this.width&&e.height===this.height},clone:function(){return new h(this.width,this.height)},toArray:function(e){var t=C(e),n=t?D(this.width,e):this.width,i=t?D(this.height,e):this.height;return[n,i]}}),r(h.fn,["width","height"]),b(h.fn,x),h.create=function(e,t){return C(e)?e instanceof h?e:1===arguments.length&&2===e.length?new h(e[0],e[1]):new h(e,t):void 0},h.ZERO=new h(0,0),d=w.extend({init:function(e,t){this.setOrigin(e||new P),this.setSize(t||new h)},clone:function(){return new d(this.origin.clone(),this.size.clone())},equals:function(e){return e&&e.origin.equals(this.origin)&&e.size.equals(this.size)},setOrigin:function(e){return this._observerField("origin",P.create(e)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(e){return this._observerField("size",h.create(e)),this.geometryChange(),this},getSize:function(){return this.size},width:function(){return this.size.width},height:function(){return this.size.height},topLeft:function(){return this.origin.clone()},bottomRight:function(){return this.origin.clone().translate(this.width(),this.height())},topRight:function(){return this.origin.clone().translate(this.width(),0)},bottomLeft:function(){return this.origin.clone().translate(0,this.height())},center:function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},bbox:function(e){var t=this.topLeft().transformCopy(e),n=this.topRight().transformCopy(e),i=this.bottomRight().transformCopy(e),o=this.bottomLeft().transformCopy(e);return d.fromPoints(t,n,i,o)},transformCopy:function(e){return d.fromPoints(this.topLeft().transform(e),this.bottomRight().transform(e))}}),b(d.fn,x),d.fromPoints=function(){var e=P.min.apply(this,arguments),t=P.max.apply(this,arguments),n=new h(t.x-e.x,t.y-e.y);return new d(e,n)},d.union=function(e,t){return d.fromPoints(P.min(e.topLeft(),t.topLeft()),P.max(e.bottomRight(),t.bottomRight()))},d.intersect=function(e,t){return e={left:e.topLeft().x,top:e.topLeft().y,right:e.bottomRight().x,bottom:e.bottomRight().y},t={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},t.right>=e.left&&e.right>=t.left&&t.bottom>=e.top&&e.bottom>=t.top?d.fromPoints(new P(v.max(e.left,t.left),v.max(e.top,t.top)),new P(v.min(e.right,t.right),v.min(e.bottom,t.bottom))):void 0},f=w.extend({init:function(e,t){this.setCenter(e||new P),this.setRadius(t||0)},setCenter:function(e){return this._observerField("center",P.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},equals:function(e){return e&&e.center.equals(this.center)&&e.radius===this.radius},clone:function(){return new f(this.center.clone(),this.radius)},pointAt:function(e){return this._pointAt(S(e))},bbox:function(e){var t,n,o,r,s=P.maxPoint(),a=P.minPoint(),l=i(this.center,this.radius,this.radius,e);for(t=0;4>t;t++)n=this._pointAt(l.x+t*A).transformCopy(e),o=this._pointAt(l.y+t*A).transformCopy(e),r=new P(n.x,o.y),s=P.min(s,r),a=P.max(a,r);return d.fromPoints(s,a)},_pointAt:function(e){var t=this.center,n=this.radius;return new P(t.x-n*v.cos(e),t.y-n*v.sin(e))}}),r(f.fn,["radius"]),b(f.fn,x),p=w.extend({init:function(e,t){this.setCenter(e||new P),t=t||{},this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1},clone:function(){return new p(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(e){return this._observerField("center",P.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},MAX_INTERVAL:45,pointAt:function(e){var t=this.center,n=S(e);return new P(t.x+this.radiusX*v.cos(n),t.y+this.radiusY*v.sin(n))},curvePoints:function(){var e,t,n,i=this.startAngle,o=this.anticlockwise?-1:1,r=[this.pointAt(i)],s=i,a=this._arcInterval(),l=a.endAngle-a.startAngle,c=v.ceil(l/this.MAX_INTERVAL),u=l/c;for(e=1;c>=e;e++)t=s+o*u,n=this._intervalCurvePoints(s,t),r.push(n.cp1,n.cp2,n.p2),s=t;return r},bbox:function(e){for(var t,n,r=this,s=r._arcInterval(),a=s.startAngle,l=s.endAngle,c=i(this.center,this.radiusX,this.radiusY,e),u=T(c.x),h=T(c.y),f=r.pointAt(a).transformCopy(e),p=r.pointAt(l).transformCopy(e),g=P.min(f,p),m=P.max(f,p),v=o(u,a),_=o(h,a);l>v||l>_;)l>v&&(t=r.pointAt(v).transformCopy(e),v+=90),l>_&&(n=r.pointAt(_).transformCopy(e),_+=90),f=new P(t.x,n.y),g=P.min(g,f),m=P.max(m,f);return d.fromPoints(g,m)},_arcInterval:function(){var e,t=this.startAngle,n=this.endAngle,i=this.anticlockwise;return i&&(e=t,t=n,n=e),(t>n||i&&t===n)&&(n+=360),{startAngle:t,endAngle:n}},_intervalCurvePoints:function(e,t){var n=this,i=n.pointAt(e),o=n.pointAt(t),r=n._derivativeAt(e),s=n._derivativeAt(t),a=(S(t)-S(e))/3,l=new P(i.x+a*r.x,i.y+a*r.y),c=new P(o.x-a*s.x,o.y-a*s.y);return{p1:i,cp1:l,cp2:c,p2:o}},_derivativeAt:function(e){var t=this,n=S(e);return new P(-t.radiusX*v.sin(n),t.radiusY*v.cos(n))}}),r(p.fn,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),b(p.fn,x),p.fromPoints=function(e,t,n,i,o,r){var s=u(e.x,e.y,t.x,t.y,n,i,o,r);return new p(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:n,radiusY:i,anticlockwise:0===r})},g=w.extend({init:function(e,t,n,i,o,r){this.a=e||0,this.b=t||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},multiplyCopy:function(e){return new g(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)},invert:function(){var e=this.a,t=this.b,n=this.c,i=this.d,o=this.e,r=this.f,s=e*i-t*n;return 0===s?null:new g(i/s,-t/s,-n/s,e/s,(n*r-i*o)/s,(t*o-e*r)/s)},clone:function(){return new g(this.a,this.b,this.c,this.d,this.e,this.f)},equals:function(e){return e?this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f:!1},round:function(e){return this.a=D(this.a,e),this.b=D(this.b,e),this.c=D(this.c,e),this.d=D(this.d,e),this.e=D(this.e,e),this.f=D(this.f,e),this},toArray:function(e){var t,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(C(e))for(t=0;n.length>t;t++)n[t]=D(n[t],e);return n}}),g.fn.toString=function(e,t){return this.toArray(e).join(t||",")},g.translate=function(e,t){return new g(1,0,0,1,e,t)},g.unit=function(){return new g(1,0,0,1,0,0)},g.rotate=function(e,t,n){var i=new g;return i.a=v.cos(S(e)),i.b=v.sin(S(e)),i.c=-i.b,i.d=i.a,i.e=t-t*i.a+n*i.b||0,i.f=n-n*i.a-t*i.b||0,i},g.scale=function(e,t){return new g(e,0,0,t,0,0)},g.IDENTITY=g.unit(),m=w.extend({init:function(e){this._matrix=e||g.unit()},clone:function(){return new m(this._matrix.clone())},equals:function(e){return e&&e._matrix.equals(this._matrix)},_optionsChange:function(){this.optionsChange({field:"transform",value:this})},translate:function(e,t){return this._matrix=this._matrix.multiplyCopy(g.translate(e,t)),this._optionsChange(),this},scale:function(e,t,n){return C(t)||(t=e),n&&(n=P.create(n),this._matrix=this._matrix.multiplyCopy(g.translate(n.x,n.y))),this._matrix=this._matrix.multiplyCopy(g.scale(e,t)),n&&(this._matrix=this._matrix.multiplyCopy(g.translate(-n.x,-n.y))),this._optionsChange(),this},rotate:function(e,t){return t=P.create(t)||P.ZERO,this._matrix=this._matrix.multiplyCopy(g.rotate(e,t.x,t.y)),this._optionsChange(),this},multiply:function(e){var t=n(e);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this},matrix:function(){return this._matrix}}),b(m.fn,x),b(y,{geometry:{Arc:p,Circle:f,Matrix:g,Point:P,Rect:d,Size:h,Transformation:m,transform:t,toMatrix:n}}),y.dataviz.geometry=y.geometry}(window.kendo.jQuery)}(),function(){!function(e){var t,n,i,o=e.noop,r=Object.prototype.toString,s=window.kendo,a=s.Class,l=s.ui.Widget,c=s.deepExtend,u=s.util,h=u.defined,d=l.extend({init:function(e,t){this.options=c({},this.options,t),l.fn.init.call(this,e,this.options),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._visual=new s.drawing.Group,this.options.width&&this.element.css("width",this.options.width),this.options.height&&this.element.css("height",this.options.height)},options:{name:"Surface"},events:["click","mouseenter","mouseleave","resize"],draw:function(e){this._visual.children.push(e)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,l.fn.destroy.call(this)},exportVisual:function(){return this._visual},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(e){this.element.css({width:e.width,height:e.height}),this._size=e,this._resize()},eventTarget:function(t){for(var n,i=e(t.touch?t.touch.initialTouch:t.target);!n&&i.length>0&&(n=i[0]._kendoNode,!i.is(this.element)&&0!==i.length);)i=i.parent();return n?n.srcElement:void 0},_resize:o,_handler:function(e){var t=this;return function(n){var i=t.eventTarget(n);i&&t.trigger(e,{element:i,originalEvent:n})}}});s.ui.plugin(d),d.create=function(e,t){return i.current.create(e,t)},t=a.extend({init:function(e){this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())},destroy:function(){var e,t;for(this.srcElement&&this.srcElement.removeObserver(this),e=this.childNodes,t=0;e.length>t;t++)this.childNodes[t].destroy();
|
|
this.parent=null},load:o,observe:function(){this.srcElement&&this.srcElement.addObserver(this)},append:function(e){this.childNodes.push(e),e.parent=this},insertAt:function(e,t){this.childNodes.splice(t,0,e),e.parent=this},remove:function(e,t){var n,i=e+t;for(n=e;i>n;n++)this.childNodes[n].removeSelf();this.childNodes.splice(e,t)},removeSelf:function(){this.clear(),this.destroy()},clear:function(){this.remove(0,this.childNodes.length)},invalidate:function(){this.parent&&this.parent.invalidate()},geometryChange:function(){this.invalidate()},optionsChange:function(){this.invalidate()},childrenChange:function(e){"add"===e.action?this.load(e.items,e.index):"remove"===e.action&&this.remove(e.index,e.items.length),this.invalidate()}}),n=a.extend({init:function(e,t){var n,i;this.prefix=t||"";for(n in e)i=e[n],i=this._wrap(i,n),this[n]=i},get:function(e){return s.getter(e,!0)(this)},set:function(e,t){var n,i=s.getter(e,!0)(this);i!==t&&(n=this._set(e,this._wrap(t,e)),n||this.optionsChange({field:this.prefix+e,value:t}))},_set:function(e,t){var i,o,r,a=e.indexOf(".")>=0;if(a)for(i=e.split("."),o="";i.length>1;){if(o+=i.shift(),r=s.getter(o,!0)(this),r||(r=new n({},o+"."),r.addObserver(this),this[o]=r),r instanceof n)return r.set(i.join("."),t),a;o+="."}return this._clear(e),s.setter(e)(this,t),a},_clear:function(e){var t=s.getter(e,!0)(this);t&&t.removeObserver&&t.removeObserver(this)},_wrap:function(e,t){var i=r.call(e);return null!==e&&h(e)&&"[object Object]"===i&&(e instanceof n||e instanceof a||(e=new n(e,this.prefix+t+".")),e.addObserver(this)),e}}),c(n.fn,s.mixins.ObserversMixin),i=function(){this._items=[]},i.prototype={register:function(e,t,n){var i=this._items,o=i[0],r={name:e,type:t,order:n};!o||o.order>n?i.unshift(r):i.push(r)},create:function(e,t){var n,i,o=this._items,r=o[0];if(t&&t.type)for(n=t.type.toLowerCase(),i=0;o.length>i;i++)if(o[i].name===n){r=o[i];break}return r?new r.type(e,t):void s.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG, VML and Canvas. User agent: "+navigator.userAgent+"\n- The Kendo UI scripts are not fully loaded")}},i.current=new i,c(s,{drawing:{DASH_ARRAYS:{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]},Color:s.Color,BaseNode:t,OptionsStore:n,Surface:d,SurfaceFactory:i}}),s.dataviz.drawing=s.drawing}(window.kendo.jQuery)}(),function(){!function(){var e=window.kendo,t=e.deepExtend,n=e.util.defined,i="gradient",o={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var o,r=this.options;return n(e)?(e&&e.nodeType!=i?(o={color:e},n(t)&&(o.opacity=t),r.set("fill",o)):r.set("fill",e),this):r.get("fill")},stroke:function(e,t,i){return n(e)?(this.options.set("stroke.color",e),n(t)&&this.options.set("stroke.width",t),n(i)&&this.options.set("stroke.opacity",i),this):this.options.get("stroke")}},r={extend:function(e,t){e.traverse=function(e){var n,i,o=this[t];for(n=0;o.length>n;n++)i=o[n],i.traverse?i.traverse(e):e(i);return this}}};t(e.drawing,{mixins:{Paintable:o,Traversable:r}})}()}(),function(){!function(e){function t(e,t,n){var i,o,r,s;for(o=0;e.length>o;o++)r=e[o],r.visible()&&(s=t?r.bbox(n):r.rawBBox(),s&&(i=i?q.Rect.union(i,s):s));return i}function n(e,t){var n,i,o,r;for(i=0;e.length>i;i++)o=e[i],o.visible()&&(r=o.clippedBBox(t),r&&(n=n?q.Rect.union(n,r):r));return n}function i(e,t){e.origin.x-=t,e.origin.y-=t,e.size.width+=2*t,e.size.height+=2*t}function o(e,t){for(var n=0;t.length>n;n++)e[t[n]]=r(t[n])}function r(e){var t="_"+e;return function(e){return oe(e)?(this._observerField(t,e),this.geometryChange(),this):this[t]}}function s(e,t){for(var n=0;t.length>n;n++)e[t[n]]=a(t[n])}function a(e){var t="_"+e;return function(e){return oe(e)?(this._observerField(t,$.create(e)),this.geometryChange(),this):this[t]}}function l(e,t){for(var n=0;t.length>n;n++)e[t[n]]=c(t[n])}function c(e){return function(t){return oe(t)?(this.options.set(e,t),this):this.options.get(e)}}function u(){return"kdef"+ge++}function h(e,t,n){x(e,t,n,"x","width")}function d(e,t,n){x(e,t,n,"y","height")}function f(e){b(w(e),"x","y","width")}function p(e){b(w(e),"y","x","height")}function g(e,t){return v(e,t,"x","y","width")}function m(e,t){return v(e,t,"y","x","height")}function v(e,t,n,i,o){var r,s,a,l,c=[],u=y(e,t,o),h=t.origin.clone();for(l=0;u.length>l;l++)for(a=u[l],r=a[0],h[i]=r.bbox.origin[i],S(h,r.bbox,r.element),r.bbox.origin[n]=h[n],b(a,n,i,o),c.push([]),s=0;a.length>s;s++)c[l].push(a[s].element);return c}function _(e,t){var n,i,o=e.clippedBBox(),r=o.size,s=t.size;(r.width>s.width||r.height>s.height)&&(n=J.min(s.width/r.width,s.height/r.height),i=e.transform()||q.transform(),i.scale(n,n),e.transform(i))}function y(e,t,n){var i,o,r,s,a=t.size[n],l=0,c=[],u=[],h=function(){u.push({element:i,bbox:r})};for(s=0;e.length>s;s++)i=e[s],r=i.clippedBBox(),r&&(o=r.size[n],l+o>a?u.length?(c.push(u),u=[],h(),l=o):(h(),c.push(u),u=[],l=0):(h(),l+=o));return u.length&&c.push(u),c}function w(e){var t,n,i,o=[];for(i=0;e.length>i;i++)t=e[i],n=t.clippedBBox(),n&&o.push({element:t,bbox:n});return o}function b(e,t,n,i){var o,r,s,a,l;if(e.length>1)for(o=e[0].bbox,r=new $,l=1;e.length>l;l++)s=e[l].element,a=e[l].bbox,r[t]=o.origin[t]+o.size[i],r[n]=a.origin[n],S(r,a,s),a.origin[t]=r[t],o=a}function x(e,t,n,i,o){var r,s,a;for(n=n||"start",a=0;e.length>a;a++)r=e[a].clippedBBox(),r&&(s=r.origin.clone(),s[i]=k(r.size[o],t,n,i,o),S(s,r,e[a]))}function k(e,t,n,i,o){var r;return r=n==me?t.origin[i]:n==ve?t.origin[i]+t.size[o]-e:t.origin[i]+(t.size[o]-e)/2}function C(e,t,n){var i=n.transform()||q.transform(),o=i.matrix();o.e+=e,o.f+=t,n.transform(i)}function S(e,t,n){C(e.x-t.origin.x,e.y-t.origin.y,n)}var T,D,A,M,E,P,I,R,B,F,z,L,O,N,H,V,U,W=window.kendo,j=W.Class,G=W.deepExtend,q=W.geometry,$=q.Point,Y=q.Size,K=q.Matrix,X=q.toMatrix,Q=W.drawing,Z=Q.OptionsStore,J=Math,ee=J.pow,te=W.util,ne=te.append,ie=te.arrayLimits,oe=te.defined,re=te.last,se=te.valueOrDefault,ae=W.mixins.ObserversMixin,le=e.inArray,ce=[].push,ue=[].pop,he=[].splice,de=[].shift,fe=[].slice,pe=[].unshift,ge=1,me="start",ve="end",_e="horizontal",ye=j.extend({nodeType:"Element",init:function(e){this._initOptions(e)},_initOptions:function(e){var t,n;e=e||{},t=e.transform,n=e.clip,t&&(e.transform=q.transform(t)),n&&!n.id&&(n.id=u()),this.options=new Z(e),this.options.addObserver(this)},transform:function(e){return oe(e)?void this.options.set("transform",q.transform(e)):this.options.get("transform")},parentTransform:function(){for(var e,t,n=this;n.parent;)n=n.parent,e=n.transform(),e&&(t=e.matrix().multiplyCopy(t||K.unit()));return t?q.transform(t):void 0},currentTransform:function(e){var t,n,i=this.transform(),o=X(i);return oe(e)||(e=this.parentTransform()),t=X(e),n=o&&t?t.multiplyCopy(o):o||t,n?q.transform(n):void 0},visible:function(e){return oe(e)?(this.options.set("visible",e),this):this.options.get("visible")!==!1},clip:function(e){var t=this.options;return oe(e)?(e&&!e.id&&(e.id=u()),t.set("clip",e),this):t.get("clip")},opacity:function(e){return oe(e)?(this.options.set("opacity",e),this):se(this.options.get("opacity"),1)},clippedBBox:function(e){var t,n=this._clippedBBox(e);return n?(t=this.clip(),t?q.Rect.intersect(n,t.bbox(e)):n):void 0},_clippedBBox:function(e){return this.bbox(e)}});G(ye.fn,ae),T=j.extend({init:function(e){e=e||[],this.length=0,this._splice(0,e.length,e)},elements:function(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)},push:function(){var e=arguments,t=ce.apply(this,e);return this._add(e),t},slice:fe,pop:function(){var e=this.length,t=ue.apply(this);return e&&this._remove([t]),t},splice:function(e,t){var n=fe.call(arguments,2),i=this._splice(e,t,n);return this._change(),i},shift:function(){var e=this.length,t=de.apply(this);return e&&this._remove([t]),t},unshift:function(){var e=arguments,t=pe.apply(this,e);return this._add(e),t},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;n>t;t++)if(i[t]===e)return t;return-1},_splice:function(e,t,n){var i=he.apply(this,[e,t].concat(n));return this._clearObserver(i),this._setObserver(n),i},_add:function(e){this._setObserver(e),this._change()},_remove:function(e){this._clearObserver(e),this._change()},_setObserver:function(e){for(var t=0;e.length>t;t++)e[t].addObserver(this)},_clearObserver:function(e){for(var t=0;e.length>t;t++)e[t].removeObserver(this)},_change:function(){}}),G(T.fn,ae),D=ye.extend({nodeType:"Group",init:function(e){ye.fn.init.call(this,e),this.children=[]},childrenChange:function(e,t,n){this.trigger("childrenChange",{action:e,items:t,index:n})},append:function(){return ne(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},insert:function(e,t){return this.children.splice(e,0,t),t.parent=this,this.childrenChange("add",[t],e),this},insertAt:function(e,t){return this.insert(t,e)},remove:function(e){var t=le(e,this.children);return t>=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},removeAt:function(e){if(e>=0&&this.children.length>e){var t=this.children[e];this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)}return this},clear:function(){var e=this.children;return this.children=[],this._reparent(e,null),this.childrenChange("remove",e,0),this},bbox:function(e){return t(this.children,!0,this.currentTransform(e))},rawBBox:function(){return t(this.children,!1)},_clippedBBox:function(e){return n(this.children,this.currentTransform(e))},currentTransform:function(e){return ye.fn.currentTransform.call(this,e)||null},_reparent:function(e,t){var n,i,o;for(n=0;e.length>n;n++)i=e[n],o=i.parent,o&&o!=this&&o.remove&&o.remove(i),i.parent=t}}),Q.mixins.Traversable.extend(D.fn,"children"),A=ye.extend({nodeType:"Text",init:function(e,t,n){ye.fn.init.call(this,n),this.content(e),this.position(t||new q.Point),this.options.font||(this.options.font="12px sans-serif"),oe(this.options.fill)||this.fill("#000")},content:function(e){return oe(e)?(this.options.set("content",e),this):this.options.get("content")},measure:function(){var e=te.measureText(this.content(),{font:this.options.get("font")});return e},rect:function(){var e=this.measure(),t=this.position().clone();return new q.Rect(t,[e.width,e.height])},bbox:function(e){var t=X(this.currentTransform(e));return this.rect().bbox(t)},rawBBox:function(){return this.rect().bbox()}}),Q.mixins.Paintable.extend(A.fn),s(A.fn,["position"]),M=ye.extend({nodeType:"Circle",init:function(e,t){ye.fn.init.call(this,t),this.geometry(e||new q.Circle),oe(this.options.stroke)||this.stroke("#000")},bbox:function(e){var t=X(this.currentTransform(e)),n=this._geometry.bbox(t),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this._geometry.bbox()}}),Q.mixins.Paintable.extend(M.fn),o(M.fn,["geometry"]),E=ye.extend({nodeType:"Arc",init:function(e,t){ye.fn.init.call(this,t),this.geometry(e||new q.Arc),oe(this.options.stroke)||this.stroke("#000")},bbox:function(e){var t=X(this.currentTransform(e)),n=this.geometry().bbox(t),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var e,t=new R,n=this.geometry().curvePoints();if(n.length>0)for(t.moveTo(n[0].x,n[0].y),e=1;n.length>e;e+=3)t.curveTo(n[e],n[e+1],n[e+2]);return t}}),Q.mixins.Paintable.extend(E.fn),o(E.fn,["geometry"]),P=T.extend({_change:function(){this.geometryChange()}}),I=j.extend({init:function(e,t,n){this.anchor(e||new $),this.controlIn(t),this.controlOut(n)},bboxTo:function(e,t){var n,i=this.anchor().transformCopy(t),o=e.anchor().transformCopy(t);return n=this.controlOut()&&e.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),o):this._lineBoundingBox(i,o)},_lineBoundingBox:function(e,t){return q.Rect.fromPoints(e,t)},_curveBoundingBox:function(e,t,n,i){var o=[e,t,n,i],r=this._curveExtremesFor(o,"x"),s=this._curveExtremesFor(o,"y"),a=ie([r.min,r.max,e.x,i.x]),l=ie([s.min,s.max,e.y,i.y]);return q.Rect.fromPoints(new $(a.min,l.min),new $(a.max,l.max))},_curveExtremesFor:function(e,t){var n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:this._calculateCurveAt(n.min,t,e),max:this._calculateCurveAt(n.max,t,e)}},_calculateCurveAt:function(e,t,n){var i=1-e;return ee(i,3)*n[0][t]+3*ee(i,2)*e*n[1][t]+3*ee(e,2)*i*n[2][t]+ee(e,3)*n[3][t]},_curveExtremes:function(e,t,n,i){var o,r,s=e-3*t+3*n-i,a=-2*(e-2*t+n),l=e-t,c=J.sqrt(a*a-4*s*l),u=0,h=1;return 0===s?0!==a&&(u=h=-l/a):isNaN(c)||(u=(-a+c)/(2*s),h=(-a-c)/(2*s)),o=J.max(J.min(u,h),0),(0>o||o>1)&&(o=0),r=J.min(J.max(u,h),1),(r>1||0>r)&&(r=1),{min:o,max:r}}}),s(I.fn,["anchor","controlIn","controlOut"]),G(I.fn,ae),R=ye.extend({nodeType:"Path",init:function(e){ye.fn.init.call(this,e),this.segments=new P,this.segments.addObserver(this),oe(this.options.stroke)||(this.stroke("#000"),oe(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this},lineTo:function(e,t){var n=oe(t)?new $(e,t):e,i=new I(n);return this.segments.push(i),this},curveTo:function(e,t,n){var i,o;return this.segments.length>0&&(i=re(this.segments),o=new I(n,t),this.suspend(),i.controlOut(e),this.resume(),this.segments.push(o)),this},arc:function(e,t,n,i,o){var r,s,a,l,c;return this.segments.length>0&&(r=re(this.segments),s=r.anchor(),a=te.rad(e),l=new $(s.x-n*J.cos(a),s.y-i*J.sin(a)),c=new q.Arc(l,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:o}),this._addArcSegments(c)),this},arcTo:function(e,t,n,i,o){var r,s,a;return this.segments.length>0&&(r=re(this.segments),s=r.anchor(),a=q.Arc.fromPoints(s,e,t,n,i,o),this._addArcSegments(a)),this},_addArcSegments:function(e){var t,n;for(this.suspend(),t=e.curvePoints(),n=1;t.length>n;n+=3)this.curveTo(t[n],t[n+1],t[n+2]);this.resume(),this.geometryChange()},close:function(){return this.options.closed=!0,this.geometryChange(),this},bbox:function(e){var t=X(this.currentTransform(e)),n=this._bbox(t),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this._bbox()},_bbox:function(e){var t,n,i,o,r=this.segments,s=r.length;if(1===s)n=r[0].anchor().transformCopy(e),t=new q.Rect(n,Y.ZERO);else if(s>0)for(i=1;s>i;i++)o=r[i-1].bboxTo(r[i],e),t=t?q.Rect.union(t,o):o;return t}}),Q.mixins.Paintable.extend(R.fn),R.fromRect=function(e,t){return new R(t).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close()},R.fromPoints=function(e,t){var n,i,o;if(e){for(n=new R(t),i=0;e.length>i;i++)o=$.create(e[i]),o&&(0===i?n.moveTo(o):n.lineTo(o));return n}},R.fromArc=function(e,t){var n=new R(t),i=e.startAngle,o=e.pointAt(i);return n.moveTo(o.x,o.y),n.arc(i,e.endAngle,e.radiusX,e.radiusY,e.anticlockwise),n},B=ye.extend({nodeType:"MultiPath",init:function(e){ye.fn.init.call(this,e),this.paths=new P,this.paths.addObserver(this),oe(this.options.stroke)||this.stroke("#000")},moveTo:function(e,t){var n=new R;return n.moveTo(e,t),this.paths.push(n),this},lineTo:function(e,t){return this.paths.length>0&&re(this.paths).lineTo(e,t),this},curveTo:function(e,t,n){return this.paths.length>0&&re(this.paths).curveTo(e,t,n),this},arc:function(e,t,n,i,o){return this.paths.length>0&&re(this.paths).arc(e,t,n,i,o),this},arcTo:function(e,t,n,i,o){return this.paths.length>0&&re(this.paths).arcTo(e,t,n,i,o),this},close:function(){return this.paths.length>0&&re(this.paths).close(),this},bbox:function(e){return t(this.paths,!0,this.currentTransform(e))},rawBBox:function(){return t(this.paths,!1)},_clippedBBox:function(e){return n(this.paths,this.currentTransform(e))}}),Q.mixins.Paintable.extend(B.fn),F=ye.extend({nodeType:"Image",init:function(e,t,n){ye.fn.init.call(this,n),this.src(e),this.rect(t||new q.Rect)},src:function(e){return oe(e)?(this.options.set("src",e),this):this.options.get("src")},bbox:function(e){var t=X(this.currentTransform(e));return this._rect.bbox(t)},rawBBox:function(){return this._rect.bbox()}}),o(F.fn,["rect"]),z=j.extend({init:function(e,t,n){this.options=new Z({offset:e,color:t,opacity:oe(n)?n:1}),this.options.addObserver(this)}}),l(z.fn,["offset","color","opacity"]),G(z.fn,ae),z.create=function(e){if(oe(e)){var t;return t=e instanceof z?e:e.length>1?new z(e[0],e[1],e[2]):new z(e.offset,e.color,e.opacity)}},L=T.extend({_change:function(){this.optionsChange({field:"stops"})}}),O=j.extend({nodeType:"gradient",init:function(e){this.stops=new L(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=u()},userSpace:function(e){return oe(e)?(this._userSpace=e,this.optionsChange(),this):this._userSpace},_createStops:function(e){var t,n=[];for(e=e||[],t=0;e.length>t;t++)n.push(z.create(e[t]));return n},addStop:function(e,t,n){this.stops.push(new z(e,t,n))},removeStop:function(e){var t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}}),G(O.fn,ae,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),N=O.extend({init:function(e){e=e||{},O.fn.init.call(this,e),this.start(e.start||new $),this.end(e.end||new $(1,0))}}),s(N.fn,["start","end"]),H=O.extend({init:function(e){e=e||{},O.fn.init.call(this,e),this.center(e.center||new $),this._radius=oe(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill},radius:function(e){return oe(e)?(this._radius=e,this.geometryChange(),this):this._radius},fallbackFill:function(e){return oe(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill}}),s(H.fn,["center"]),V=ye.extend({nodeType:"Rect",init:function(e,t){ye.fn.init.call(this,t),this.geometry(e||new q.Rect),oe(this.options.stroke)||this.stroke("#000")},bbox:function(e){var t=X(this.currentTransform(e)),n=this._geometry.bbox(t),o=this.options.get("stroke.width");return o&&i(n,o/2),n},rawBBox:function(){return this._geometry.bbox()}}),Q.mixins.Paintable.extend(V.fn),o(V.fn,["geometry"]),U=D.extend({init:function(e,t){D.fn.init.call(this,W.deepExtend({},this._defaults,t)),this._rect=e,this._fieldMap={}},_defaults:{alignContent:me,justifyContent:me,alignItems:me,spacing:0,orientation:_e,lineSpacing:0,wrap:!0},rect:function(e){return e?(this._rect=e,this):this._rect},_initMap:function(){var e=this.options,t=this._fieldMap;e.orientation==_e?(t.sizeField="width",t.groupsSizeField="height",t.groupAxis="x",t.groupsAxis="y"):(t.sizeField="height",t.groupsSizeField="width",t.groupAxis="y",t.groupsAxis="x")},reflow:function(){var e,t,n,i,o,r,s,a,l,c,u,h,d,f,p,g,m,v,_,y,w,b,x,C,T,D;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),e=this.options,t=this._fieldMap,n=this._rect,i=this._initGroups(),o=i.groups,r=i.groupsSize,s=t.sizeField,a=t.groupsSizeField,l=t.groupAxis,c=t.groupsAxis,u=k(r,n,e.alignContent,c,a),h=new $,d=new $,f=new q.Size,y=0;o.length>y;y++){for(v=o[y],h[l]=p=k(v.size,n,e.justifyContent,l,s),h[c]=u,f[s]=v.size,f[a]=v.lineSize,_=new q.Rect(h,f),w=0;v.bboxes.length>w;w++)m=v.elements[w],g=v.bboxes[w],d[l]=p,d[c]=k(g.size[a],_,e.alignItems,c,a),S(d,g,m),p+=g.size[s]+e.spacing;u+=v.lineSize+e.lineSpacing}!e.wrap&&v.size>n.size[s]&&(b=n.size[s]/_.size[s],x=_.topLeft().scale(b,b),C=_.size[a]*b,T=k(C,n,e.alignContent,c,a),D=q.transform(),"x"===l?D.translate(n.origin.x-x.x,T-x.y):D.translate(T-x.x,n.origin.y-x.y),D.scale(b,b),this.transform(D))}},_initGroups:function(){var e,t,n,i=this.options,o=this.children,r=i.lineSpacing,s=this._fieldMap.sizeField,a=-r,l=[],c=this._newGroup(),u=function(){l.push(c),a+=c.lineSize+r};for(n=0;o.length>n;n++)t=o[n],e=o[n].clippedBBox(),t.visible()&&e&&(i.wrap&&c.size+e.size[s]+i.spacing>this._rect.size[s]?0===c.bboxes.length?(this._addToGroup(c,e,t),u(),c=this._newGroup()):(u(),c=this._newGroup(),this._addToGroup(c,e,t)):this._addToGroup(c,e,t));return c.bboxes.length&&u(),{groups:l,groupsSize:a}},_addToGroup:function(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),G(Q,{align:h,Arc:E,Circle:M,Element:ye,ElementsArray:T,fit:_,Gradient:O,GradientStop:z,Group:D,Image:F,Layout:U,LinearGradient:N,MultiPath:B,Path:R,RadialGradient:H,Rect:V,Segment:I,stack:f,Text:A,vAlign:d,vStack:p,vWrap:m,wrap:g})}(window.kendo.jQuery)}(),function(){!function(e){function t(e){var t=[];return e.replace(g,function(e,n){t.push(parseFloat(n))}),t}function n(e,t,n){var i,o=t?0:1;for(i=0;e.length>i;i+=2)e.splice(i+o,0,n)}function i(e,t){return e&&t?t.scaleCopy(2).translate(-e.x,-e.y):void 0}function o(e,t,n){var i=1/3;return t=t.clone().scale(2/3),{controlOut:t.clone().translateWith(e.scaleCopy(i)),controlIn:t.translateWith(n.scaleCopy(i))}}var r=window.kendo,s=r.drawing,a=r.geometry,l=r.Class,c=a.Point,u=r.deepExtend,h=e.trim,d=r.util,f=d.last,p=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,g=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,m="m",v="z",_=l.extend({parse:function(e,n){var i,o=new s.MultiPath(n),r=new c;return e.replace(p,function(e,n,s,a){var l=n.toLowerCase(),c=l===n,u=t(h(s));if(l===m&&(c?(r.x+=u[0],r.y+=u[1]):(r.x=u[0],r.y=u[1]),o.moveTo(r.x,r.y),u.length>2&&(l="l",u.splice(0,2))),y[l])y[l](o,{parameters:u,position:r,isRelative:c,previousCommand:i}),a&&a.toLowerCase()===v&&o.close();else if(l!==m)throw Error("Error while parsing SVG path. Unsupported command: "+l);i=l}),o}}),y={l:function(e,t){var n,i,o=t.parameters,r=t.position;for(n=0;o.length>n;n+=2)i=new c(o[n],o[n+1]),t.isRelative&&i.translateWith(r),e.lineTo(i.x,i.y),r.x=i.x,r.y=i.y},c:function(e,t){var n,i,o,r,s=t.parameters,a=t.position;for(r=0;s.length>r;r+=6)n=new c(s[r],s[r+1]),i=new c(s[r+2],s[r+3]),o=new c(s[r+4],s[r+5]),t.isRelative&&(i.translateWith(a),n.translateWith(a),o.translateWith(a)),e.curveTo(n,i,o),a.x=o.x,a.y=o.y},v:function(e,t){var i=t.isRelative?0:t.position.x;n(t.parameters,!0,i),this.l(e,t)},h:function(e,t){var i=t.isRelative?0:t.position.y;n(t.parameters,!1,i),this.l(e,t)},a:function(e,t){var n,i,o,r,s,a,l=t.parameters,u=t.position;for(n=0;l.length>n;n+=7)i=l[n],o=l[n+1],r=l[n+3],s=l[n+4],a=new c(l[n+5],l[n+6]),t.isRelative&&a.translateWith(u),e.arcTo(a,i,o,r,s),u.x=a.x,u.y=a.y},s:function(e,t){var n,o,r,s,a,l=t.parameters,u=t.position,h=t.previousCommand;for(("s"==h||"c"==h)&&(s=f(f(e.paths).segments).controlIn()),a=0;l.length>a;a+=4)r=new c(l[a],l[a+1]),o=new c(l[a+2],l[a+3]),t.isRelative&&(r.translateWith(u),o.translateWith(u)),n=s?i(s,u):u.clone(),s=r,e.curveTo(n,r,o),u.x=o.x,u.y=o.y},q:function(e,t){var n,i,r,s,a=t.parameters,l=t.position;for(s=0;a.length>s;s+=4)r=new c(a[s],a[s+1]),i=new c(a[s+2],a[s+3]),t.isRelative&&(r.translateWith(l),i.translateWith(l)),n=o(l,r,i),e.curveTo(n.controlOut,n.controlIn,i),l.x=i.x,l.y=i.y},t:function(e,t){var n,r,s,a,l,u=t.parameters,h=t.position,d=t.previousCommand;for(("q"==d||"t"==d)&&(a=f(f(e.paths).segments),r=a.controlIn().clone().translateWith(h.scaleCopy(-1/3)).scale(1.5)),l=0;u.length>l;l+=2)s=new c(u[l],u[l+1]),t.isRelative&&s.translateWith(h),r=r?i(r,h):h.clone(),n=o(h,r,s),e.curveTo(n.controlOut,n.controlIn,s),h.x=s.x,h.y=s.y}};_.current=new _,s.Path.parse=function(e,t){return _.current.parse(e,t)},u(s,{PathParser:_})}(window.kendo.jQuery)}(),function(){!function(e){function t(e){var t,n,i,o;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(r){}t&&(n=-t.e%1,i=-t.f%1,o=e.style,(0!==n||0!==i)&&(o.left=n+"px",o.top=i+"px"))}function n(){var e=document.getElementsByTagName("base")[0],t="",n=document.location.href,i=n.indexOf("#");return e&&!u.support.browser.msie&&(-1!==i&&(n=n.substring(0,i)),t=n),t}function i(e){return"url("+n()+"#"+e+")"}function o(e){var t,n,i,o=new B,r=e.clippedBBox();return r&&(t=r.getOrigin(),n=new f.Group,n.transform(d.transform().translate(-t.x,-t.y)),n.children.push(e),e=n),o.load([e]),i="<?xml version='1.0' ?><svg xmlns='"+M+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+o.render()+"</svg>",o.destroy(),i}function r(t,n){var i=o(t);return n&&n.raw||(i="data:image/svg+xml;base64,"+g.encodeBase64(i)),e.Deferred().resolve(i).promise()}function s(e,t){return"clip"==e||"fill"==e&&(!t||t.nodeType==C)}function a(e){if(!e||!e.indexOf||e.indexOf("&")<0)return e;var t=a._element;return t.innerHTML=e,t.textContent||t.innerText}var l,c=document,u=window.kendo,h=u.deepExtend,d=u.geometry,f=u.drawing,p=f.BaseNode,g=u.util,m=g.defined,v=g.isTransparent,_=g.renderAttr,y=g.renderAllAttr,w=g.renderTemplate,b=e.inArray,x="butt",k=f.DASH_ARRAYS,C="gradient",S="none",T=".kendo",D="solid",A=" ",M="http://www.w3.org/2000/svg",E="transform",P="undefined",I=f.Surface.extend({init:function(e,n){f.Surface.fn.init.call(this,e,n),this._root=new B(this.options),X(this.element[0],this._template(this)),this._rootElement=this.element[0].firstElementChild,t(this._rootElement),this._root.attachTo(this._rootElement),this.element.on("click"+T,this._click),this.element.on("mouseover"+T,this._mouseenter),this.element.on("mouseout"+T,this._mouseleave),this.resize()},type:"svg",destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,this.element.off(T)),f.Surface.fn.destroy.call(this)},translate:function(e){var t=u.format("{0} {1} {2} {3}",Math.round(e.x),Math.round(e.y),this._size.width,this._size.height);this._offset=e,this._rootElement.setAttribute("viewBox",t)},draw:function(e){f.Surface.fn.draw.call(this,e),this._root.load([e])},clear:function(){f.Surface.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template(this)},exportVisual:function(){var e,t=this._visual,n=this._offset;return n&&(e=new f.Group,e.children.push(t),e.transform(d.transform().translate(-n.x,-n.y)),t=e),t},_resize:function(){this._offset&&this.translate(this._offset)},_template:w("<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+M+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>#= d._root.render() #</svg>")}),R=p.extend({init:function(e){p.fn.init.call(this,e),this.definitions={}},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),p.fn.destroy.call(this)},load:function(e,t){var n,i,o,r,s=this,a=s.element;for(r=0;e.length>r;r++)i=e[r],o=i.children,n=new K[i.nodeType](i),m(t)?s.insertAt(n,t):s.append(n),n.createDefinitions(),o&&o.length>0&&n.load(o),a&&n.attachTo(a,t)},root:function(){for(var e=this;e.parent;)e=e.parent;return e},attachTo:function(e,t){var n,i=c.createElement("div");X(i,"<svg xmlns='"+M+"' version='1.1'>"+this.render()+"</svg>"),n=i.firstChild.firstChild,n&&(m(t)?e.insertBefore(n,e.childNodes[t]||null):e.appendChild(n),this.setElement(n))},setElement:function(e){var t,n,i=this.childNodes;for(this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this,n=0;i.length>n;n++)t=e.childNodes[n],i[n].setElement(t)},clear:function(){var e,t;for(this.clearDefinitions(),this.element&&(this.element.innerHTML=""),e=this.childNodes,t=0;e.length>t;t++)e[t].destroy();this.childNodes=[]},removeSelf:function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}p.fn.removeSelf.call(this)},template:w("#= d.renderChildren() #"),render:function(){return this.template(this)},renderChildren:function(){var e,t=this.childNodes,n="";for(e=0;t.length>e;e++)n+=t[e].render();return n},optionsChange:function(e){var t=e.field,n=e.value;"visible"===t?this.css("display",n?"":S):l[t]&&s(t,n)?this.updateDefinition(t,n):"opacity"===t&&this.attr("opacity",n),p.fn.optionsChange.call(this,e)},attr:function(e,t){this.element&&this.element.setAttribute(e,t)},allAttr:function(e){for(var t=0;e.length>t;t++)this.attr(e[t][0],e[t][1])},css:function(e,t){this.element&&(this.element.style[e]=t)},allCss:function(e){for(var t=0;e.length>t;t++)this.css(e[t][0],e[t][1])},removeAttr:function(e){this.element&&this.element.removeAttribute(e)},mapTransform:function(e){var t=[];return e&&t.push([E,"matrix("+e.matrix().toString(6)+")"]),t},renderTransform:function(){return y(this.mapTransform(this.srcElement.transform()))},transformChange:function(e){e?this.allAttr(this.mapTransform(e)):this.removeAttr(E)},mapStyle:function(){var e=this.srcElement.options,t=[["cursor",e.cursor]];return e.visible===!1&&t.push(["display",S]),t},renderStyle:function(){return _("style",g.renderStyle(this.mapStyle(!0)))},renderOpacity:function(){return _("opacity",this.srcElement.options.opacity)},createDefinitions:function(){var e,t,n,i,o=this.srcElement,r=this.definitions;if(o){n=o.options;for(t in l)e=n.get(t),e&&s(t,e)&&(r[t]=e,i=!0);i&&this.definitionChange({action:"add",definitions:r})}},definitionChange:function(e){this.parent&&this.parent.definitionChange(e)},updateDefinition:function(e,t){var n=this.definitions,o=n[e],r=l[e],s={};o&&(s[e]=o,this.definitionChange({action:"remove",definitions:s}),delete n[e]),t?(s[e]=t,this.definitionChange({action:"add",definitions:s}),n[e]=t,this.attr(r,i(t.id))):o&&this.removeAttr(r)},clearDefinitions:function(){var e,t=this.definitions;for(e in t){this.definitionChange({action:"remove",definitions:t}),this.definitions={};break}},renderDefinitions:function(){return y(this.mapDefinitions())},mapDefinitions:function(){var e,t=this.definitions,n=[];for(e in t)n.push([l[e],i(t[e].id)]);return n}}),B=R.extend({init:function(e){R.fn.init.call(this),this.options=e,this.defs=new F},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){p.fn.clear.call(this)},template:w("#=d.defs.render()##= d.renderChildren() #"),definitionChange:function(e){this.defs.definitionChange(e)}}),F=R.extend({init:function(){R.fn.init.call(this),this.definitionMap={}},attachTo:function(e){this.element=e},template:w("<defs>#= d.renderChildren()#</defs>"),definitionChange:function(e){var t=e.definitions,n=e.action;"add"==n?this.addDefinitions(t):"remove"==n&&this.removeDefinitions(t)},createDefinition:function(e,t){var n;return"clip"==e?n=z:"fill"==e&&(t instanceof f.LinearGradient?n=q:t instanceof f.RadialGradient&&(n=$)),new n(t)},addDefinitions:function(e){for(var t in e)this.addDefinition(t,e[t])},addDefinition:function(e,t){var n,i=this.definitionMap,o=t.id,r=this.element,s=i[o];s?s.count++:(n=this.createDefinition(e,t),i[o]={element:n,count:1},this.append(n),r&&n.attachTo(this.element))},removeDefinitions:function(e){for(var t in e)this.removeDefinition(e[t])},removeDefinition:function(e){var t=this.definitionMap,n=e.id,i=t[n];i&&(i.count--,0===i.count&&(this.remove(b(i.element,this.childNodes),1),delete t[n]))}}),z=R.extend({init:function(e){R.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:w("<clipPath id='#=d.id#'>#= d.renderChildren()#</clipPath>")}),L=R.extend({template:w("<g#= d.renderTransform() + d.renderStyle() + d.renderOpacity() + d.renderDefinitions()#>#= d.renderChildren() #</g>"),optionsChange:function(e){e.field==E&&this.transformChange(e.value),R.fn.optionsChange.call(this,e)}}),O=R.extend({geometryChange:function(){this.attr("d",this.renderData()),this.invalidate()},optionsChange:function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case E:this.transformChange(e.value);break;default:var t=this.attributeMap[e.field];t&&this.attr(t,e.value)}R.fn.optionsChange.call(this,e)},attributeMap:{"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(e){var t,n,i,o,r,s=e.segments,a=s.length;
|
|
if(a>0){for(t=[],r=1;a>r;r++)i=this.segmentType(s[r-1],s[r]),i!==o&&(o=i,t.push(i)),t.push("L"===i?this.printPoints(s[r].anchor()):this.printPoints(s[r-1].controlOut(),s[r].controlIn(),s[r].anchor()));return n="M"+this.printPoints(s[0].anchor())+A+t.join(A),e.options.closed&&(n+="Z"),n}},printPoints:function(){var e,t=arguments,n=t.length,i=[];for(e=0;n>e;e++)i.push(t[e].toString(3));return i.join(A)},segmentType:function(e,t){return e.controlOut()&&t.controlIn()?"C":"L"},mapStroke:function(e){var t=[];return e&&!v(e.color)?(t.push(["stroke",e.color]),t.push(["stroke-width",e.width]),t.push(["stroke-linecap",this.renderLinecap(e)]),t.push(["stroke-linejoin",e.lineJoin]),m(e.opacity)&&t.push(["stroke-opacity",e.opacity]),m(e.dashType)&&t.push(["stroke-dasharray",this.renderDashType(e)])):t.push(["stroke",S]),t},renderStroke:function(){return y(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(e){var t,n,i,o=e.width||1,r=e.dashType;if(r&&r!=D){for(t=k[r.toLowerCase()],n=[],i=0;t.length>i;i++)n.push(t[i]*o);return n.join(" ")}},renderLinecap:function(e){var t=e.dashType,n=e.lineCap;return t&&t!=D?x:n},mapFill:function(e){var t=[];return e&&e.nodeType==C||(e&&!v(e.color)?(t.push(["fill",e.color]),m(e.opacity)&&t.push(["fill-opacity",e.opacity])):t.push(["fill",S])),t},renderFill:function(){return y(this.mapFill(this.srcElement.options.fill))},template:w("<path #= d.renderStyle() # #= d.renderOpacity() # #= kendo.util.renderAttr('d', d.renderData()) # #= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() #></path>")}),N=O.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),H=O.extend({renderData:function(){var e,t,n=this.srcElement.paths;if(n.length>0){for(e=[],t=0;n.length>t;t++)e.push(this.printPath(n[t]));return e.join(" ")}}}),V=O.extend({geometryChange:function(){var e=this.center();this.attr("cx",e.x),this.attr("cy",e.y),this.attr("r",this.radius()),this.invalidate()},center:function(){return this.srcElement.geometry().center},radius:function(){return this.srcElement.geometry().radius},template:w("<circle #= d.renderStyle() # #= d.renderOpacity() # cx='#= d.center().x #' cy='#= d.center().y #' r='#= d.radius() #' #= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() # ></circle>")}),U=O.extend({geometryChange:function(){var e=this.pos();this.attr("x",e.x),this.attr("y",e.y),this.invalidate()},optionsChange:function(e){"font"===e.field?(this.attr("style",g.renderStyle(this.mapStyle())),this.geometryChange()):"content"===e.field&&O.fn.content.call(this,this.srcElement.content()),O.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=O.fn.mapStyle.call(this,e),n=this.srcElement.options.font;return e&&(n=u.htmlEncode(n)),t.push(["font",n]),t},pos:function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},renderContent:function(){var e=this.srcElement.content();return e=a(e),e=u.htmlEncode(e)},template:w("<text #= d.renderStyle() # #= d.renderOpacity() # x='#= this.pos().x #' y='#= this.pos().y #' #= d.renderStroke() # #= d.renderTransform() # #= d.renderDefinitions() # #= d.renderFill() #>#= d.renderContent() #</text>")}),W=O.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),O.fn.optionsChange.call(this,e)},mapPosition:function(){var e=this.srcElement.rect(),t=e.topLeft();return[["x",t.x],["y",t.y],["width",e.width()+"px"],["height",e.height()+"px"]]},renderPosition:function(){return y(this.mapPosition())},mapSource:function(e){var t=this.srcElement.src();return e&&(t=u.htmlEncode(t)),[["xlink:href",t]]},renderSource:function(){return y(this.mapSource(!0))},template:w("<image preserveAspectRatio='none' #= d.renderStyle() # #= d.renderTransform()# #= d.renderOpacity() # #= d.renderPosition() # #= d.renderSource() # #= d.renderDefinitions()#></image>")}),j=R.extend({template:w("<stop #=d.renderOffset()# #=d.renderStyle()# />"),renderOffset:function(){return _("offset",this.srcElement.offset())},mapStyle:function(){var e=this.srcElement;return[["stop-color",e.color()],["stop-opacity",e.opacity()]]},optionsChange:function(e){"offset"==e.field?this.attr(e.field,e.value):("color"==e.field||"opacity"==e.field)&&this.css("stop-"+e.field,e.value)}}),G=R.extend({init:function(e){R.fn.init.call(this,e),this.id=e.id,this.loadStops()},loadStops:function(){var e,t,n=this.srcElement,i=n.stops,o=this.element;for(t=0;i.length>t;t++)e=new j(i[t]),this.append(e),o&&e.attachTo(o)},optionsChange:function(e){"gradient.stops"==e.field?(p.fn.clear.call(this),this.loadStops()):e.field==C&&this.allAttr(this.mapCoordinates())},renderCoordinates:function(){return y(this.mapCoordinates())},mapSpace:function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]}}),q=G.extend({template:w("<linearGradient id='#=d.id#' #=d.renderCoordinates()#>#= d.renderChildren()#</linearGradient>"),mapCoordinates:function(){var e=this.srcElement,t=e.start(),n=e.end(),i=[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()];return i}}),$=G.extend({template:w("<radialGradient id='#=d.id#' #=d.renderCoordinates()#>#= d.renderChildren()#</radialGradient>"),mapCoordinates:function(){var e=this.srcElement,t=e.center(),n=e.radius(),i=[["cx",t.x],["cy",t.y],["r",n],this.mapSpace()];return i}}),Y=O.extend({geometryChange:function(){var e=this.srcElement.geometry();this.attr("x",e.origin.x),this.attr("y",e.origin.y),this.attr("width",e.size.width),this.attr("height",e.size.height),this.invalidate()},size:function(){return this.srcElement.geometry().size},origin:function(){return this.srcElement.geometry().origin},template:w("<rect #= d.renderStyle() # #= d.renderOpacity() # x='#= d.origin().x #' y='#= d.origin().y #' width='#= d.size().width #' height='#= d.size().height #'#= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() # />")}),K={Group:L,Text:U,Path:O,MultiPath:H,Circle:V,Arc:N,Image:W,Rect:Y},X=function(e,t){e.innerHTML=t};!function(){var e="<svg xmlns='"+M+"'></svg>",t=c.createElement("div"),n=typeof DOMParser!=P;t.innerHTML=e,n&&t.firstChild.namespaceURI!=M&&(X=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),o=c.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(o)})}(),a._element=document.createElement("span"),l={clip:"clip-path",fill:"fill"},u.support.svg=function(){return c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}(),u.support.svg&&f.SurfaceFactory.current.register("svg",I,10),h(f,{exportSVG:r,svg:{ArcNode:N,CircleNode:V,ClipNode:z,DefinitionNode:F,GradientStopNode:j,GroupNode:L,ImageNode:W,LinearGradientNode:q,MultiPathNode:H,Node:R,PathNode:O,RadialGradientNode:$,RectNode:Y,RootNode:B,Surface:I,TextNode:U,_exportGroup:o}})}(window.kendo.jQuery)}(),function(){!function(e){function t(t,n){var i,o,r,s,a,l,c={width:"800px",height:"600px",cors:"Anonymous"},u=t.clippedBBox();return u&&(i=u.getOrigin(),o=new b.Group,o.transform(w.transform().translate(-i.x,-i.y)),o.children.push(t),t=o,r=u.getSize(),c.width=r.width+"px",c.height=r.height+"px"),n=p(c,n),s=e("<div />").css({display:"none",width:n.width,height:n.height}).appendTo(document.body),a=new D(s,n),a.draw(t),l=a.image(),l.always(function(){a.destroy(),s.remove()}),l}function n(e,t){var n,i,o;for(o=0;t.length>o;o++)i=t[o],n=f.parseColor(i.color()),n.a*=i.opacity(),e.addColorStop(i.offset(),n.toCssRgba())}var i,o,r,s,a,l,c,u,h,d=document,f=window.kendo,p=f.deepExtend,g=f.util,m=g.defined,v=g.isTransparent,_=g.renderTemplate,y=g.valueOrDefault,w=f.geometry,b=f.drawing,x=b.BaseNode,k="butt",C=b.DASH_ARRAYS,S=1e3/60,T="solid",D=b.Surface.extend({init:function(t,n){b.Surface.fn.init.call(this,t,n),this.element[0].innerHTML=this._template(this);var o=this.element[0].firstElementChild;o.width=e(t).width(),o.height=e(t).height(),this._rootElement=o,this._root=new i(o)},destroy:function(){b.Surface.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null)},type:"canvas",draw:function(e){b.Surface.fn.draw.call(this,e),this._root.load([e],void 0,this.options.cors)},clear:function(){b.Surface.fn.clear.call(this),this._root.clear()},image:function(){var t,n=this._root,i=this._rootElement,o=[];return n.traverse(function(e){e.loading&&o.push(e.loading)}),t=e.Deferred(),e.when.apply(e,o).done(function(){n._invalidate();try{var e=i.toDataURL();t.resolve(e)}catch(o){t.reject(o)}}).fail(function(e){t.reject(e)}),t.promise()},_resize:function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.invalidate()},_template:_("<canvas style='width: 100%; height: 100%;'></canvas>")}),A=x.extend({init:function(e){x.fn.init.call(this,e),e&&this.initClip()},initClip:function(){var e=this.srcElement.clip();e&&(this.clip=e,e.addObserver(this))},clear:function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),x.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(e){this.clip&&(e.beginPath(),o.fn.renderPoints(e,this.clip),e.clip())},optionsChange:function(e){"clip"==e.field&&(this.clearClip(),this.initClip()),x.fn.optionsChange.call(this,e)},setTransform:function(e){if(this.srcElement){var t=this.srcElement.transform();t&&e.transform.apply(e,t.matrix().toArray(6))}},loadElements:function(e,t,n){var i,o,r,s,a=this;for(s=0;e.length>s;s++)o=e[s],r=o.children,i=new h[o.nodeType](o,n),r&&r.length>0&&i.load(r,t,n),m(t)?a.insertAt(i,t):a.append(i)},load:function(e,t,n){this.loadElements(e,t,n),this.invalidate()},setOpacity:function(e){if(this.srcElement){var t=this.srcElement.opacity();m(t)&&this.globalAlpha(e,t)}},globalAlpha:function(e,t){t&&e.globalAlpha&&(t*=e.globalAlpha),e.globalAlpha=t},visible:function(){var e=this.srcElement;return!e||e&&e.options.visible!==!1}}),M=A.extend({renderTo:function(e){var t,n,i;if(this.visible()){for(e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),t=this.childNodes,n=0;t.length>n;n++)i=t[n],i.visible()&&i.renderTo(e);e.restore()}}});b.mixins.Traversable.extend(M.fn,"childNodes"),i=M.extend({init:function(t){M.fn.init.call(this),this.canvas=t,this.ctx=t.getContext("2d");var n=e.proxy(this._invalidate,this);this.invalidate=f.throttle(function(){f.animationFrame(n)},S)},destroy:function(){M.fn.destroy.call(this),this.canvas=null,this.ctx=null},load:function(e,t,n){this.loadElements(e,t,n),this._invalidate()},_invalidate:function(){this.ctx&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx))}}),b.mixins.Traversable.extend(i.fn,"childNodes"),o=A.extend({renderTo:function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},setFill:function(e){var t=this.srcElement.options.fill,n=!1;return t&&("gradient"==t.nodeType?(this.setGradientFill(e,t),n=!0):v(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n},setGradientFill:function(e,t){var i,o,r,s,a=this.srcElement.rawBBox();t instanceof b.LinearGradient?(o=t.start(),r=t.end(),i=e.createLinearGradient(o.x,o.y,r.x,r.y)):t instanceof b.RadialGradient&&(s=t.center(),i=e.createRadialGradient(s.x,s.y,0,s.x,s.y,t.radius())),n(i,t.stops),e.save(),t.userSpace()||e.transform(a.width(),0,0,a.height(),a.origin.x,a.origin.y),e.fillStyle=i,e.fill(),e.restore()},setStroke:function(e){var t=this.srcElement.options.stroke;return t&&!v(t.color)&&t.width>0?(e.strokeStyle=t.color,e.lineWidth=y(t.width,1),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0):void 0},dashType:function(){var e=this.srcElement.options.stroke;return e&&e.dashType?e.dashType.toLowerCase():void 0},setLineDash:function(e){var t,n=this.dashType();n&&n!=T&&(t=C[n],e.setLineDash?e.setLineDash(t):(e.mozDash=t,e.webkitLineDash=t))},setLineCap:function(e){var t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==T?e.lineCap=k:n&&n.lineCap&&(e.lineCap=n.lineCap)},setLineJoin:function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},renderPoints:function(e,t){var n,i,o,r,s,a,l=t.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),e.moveTo(i.x,i.y),o=1;l.length>o;o++)n=l[o],i=n.anchor(),r=l[o-1],s=r.controlOut(),a=n.controlIn(),s&&a?e.bezierCurveTo(s.x,s.y,a.x,a.y,i.x,i.y):e.lineTo(i.x,i.y);t.options.closed&&e.closePath()}}}),r=o.extend({renderPoints:function(e){var t,n=this.srcElement.paths;for(t=0;n.length>t;t++)o.fn.renderPoints(e,n[t])}}),s=o.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.center,i=t.radius;e.arc(n.x,n.y,i,0,2*Math.PI)}}),a=o.extend({renderPoints:function(e){var t=this.srcElement.toPath();o.fn.renderPoints.call(this,e,t)}}),l=o.extend({renderTo:function(e){var t=this.srcElement,n=t.position(),i=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,this.setFill(e)&&e.fillText(t.content(),n.x,n.y+i.baseline),this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+i.baseline)),e.restore()}}),c=o.extend({init:function(t,n){o.fn.init.call(this,t),this.onLoad=e.proxy(this.onLoad,this),this.onError=e.proxy(this.onError,this),this.loading=e.Deferred();var i=this.img=new Image;n&&!/^data:/i.test(t.src())&&(i.crossOrigin=n),i.src=t.src(),i.complete?this.onLoad():(i.onload=this.onLoad,i.onerror=this.onError)},renderTo:function(e){"resolved"===this.loading.state()&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())},optionsChange:function(t){"src"===t.field?(this.loading=e.Deferred(),this.img.src=this.srcElement.src()):o.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(e){var t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}}),u=o.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.origin,i=t.size;e.rect(n.x,n.y,i.width,i.height)}}),h={Group:M,Text:l,Path:o,MultiPath:r,Circle:s,Arc:a,Image:c,Rect:u},f.support.canvas=function(){return!!d.createElement("canvas").getContext}(),f.support.canvas&&b.SurfaceFactory.current.register("canvas",D,20),p(f.drawing,{exportImage:t,canvas:{ArcNode:a,CircleNode:s,GroupNode:M,ImageNode:c,MultiPathNode:r,Node:A,PathNode:o,RectNode:u,RootNode:i,Surface:D,TextNode:l}})}(window.kendo.jQuery)}(),function(){!function(e){function t(){if(h.namespaces&&!h.namespaces.kvml){h.namespaces.add("kvml","urn:schemas-microsoft-com:vml");var e=h.styleSheets.length>30?h.styleSheets[0]:h.createStyleSheet();e.addRule(".kvml","behavior:url(#default#VML)")}}function n(e){var t=h.createElement("kvml:"+e);return t.className="kvml",t}function i(e){var t,n=e.length,i=[];for(t=0;n>t;t++)i.push(e[t].scaleCopy(I).toString(0,","));return i.join(" ")}function o(e,t){var n,o,s,a,l,c=e.segments,u=c.length;if(u>0){for(n=[],l=1;u>l;l++)s=r(c[l-1],c[l]),s!==a&&(a=s,n.push(s)),n.push("l"===s?i([c[l].anchor()]):i([c[l-1].controlOut(),c[l].controlIn(),c[l].anchor()]));return o="m "+i([c[0].anchor()])+" "+n.join(" "),e.options.closed&&(o+=" x"),t!==!0&&(o+=" e"),o}}function r(e,t){return e.controlOut()&&t.controlIn()?"c":"l"}function s(e){return 0===e.indexOf("fill")||0===e.indexOf(B)}function a(e,t,n){var i,o=n*M(t.opacity(),1);return i=e?l(e,t.color(),o):l(t.color(),"#fff",1-o)}function l(e,t,n){var i=new k(e),o=new k(t),r=c(i.r,o.r,n),s=c(i.g,o.g,n),a=c(i.b,o.b,n);return new k(r,s,a).toHex()}function c(e,t,n){return d.round(n*t+(1-n)*e)}var u,h=document,d=Math,f=d.atan2,p=d.ceil,g=d.sqrt,m=window.kendo,v=m.deepExtend,_=e.noop,y=m.drawing,w=y.BaseNode,b=m.geometry,x=b.toMatrix,k=m.Color,C=m.util,S=C.isTransparent,T=C.defined,D=C.deg,A=C.round,M=C.valueOrDefault,E="none",P=".kendo",I=100,R=I*I,B="gradient",F=4,z=y.Surface.extend({init:function(e,n){y.Surface.fn.init.call(this,e,n),t(),this.element.empty(),this._root=new O,this._root.attachTo(this.element[0]),this.element.on("click"+P,this._click),this.element.on("mouseover"+P,this._mouseenter),this.element.on("mouseout"+P,this._mouseleave)},type:"vml",destroy:function(){this._root&&(this._root.destroy(),this._root=null,this.element.off(P)),y.Surface.fn.destroy.call(this)},draw:function(e){y.Surface.fn.draw.call(this,e),this._root.load([e],void 0,null)},clear:function(){y.Surface.fn.clear.call(this),this._root.clear()}}),L=w.extend({init:function(e){w.fn.init.call(this,e),this.createElement(),this.attachReference()},observe:_,destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),w.fn.destroy.call(this)},clear:function(){var e,t;for(this.element&&(this.element.innerHTML=""),e=this.childNodes,t=0;e.length>t;t++)e[t].destroy();this.childNodes=[]},removeSelf:function(){this.element&&(this.element.parentNode.removeChild(this.element),this.element=null),w.fn.removeSelf.call(this)},createElement:function(){this.element=h.createElement("div")},attachReference:function(){this.element._kendoNode=this},load:function(e,t,n,i){var o,r,s,a,l,c;for(i=M(i,1),this.srcElement&&(i*=M(this.srcElement.options.opacity,1)),o=0;e.length>o;o++)r=e[o],s=r.children,a=r.currentTransform(n),l=i*M(r.options.opacity,1),c=new le[r.nodeType](r,a,l),s&&s.length>0&&c.load(s,t,a,i),T(t)?this.insertAt(c,t):this.append(c),c.attachTo(this.element,t)},attachTo:function(e,t){T(t)?e.insertBefore(this.element,e.children[t]||null):e.appendChild(this.element)},optionsChange:function(e){"visible"==e.field&&this.css("display",e.value!==!1?"":E)},setStyle:function(){this.allCss(this.mapStyle())},mapStyle:function(){var e=[];return this.srcElement&&this.srcElement.options.visible===!1&&e.push(["display",E]),e},mapOpacityTo:function(e,t){var n=M(this.opacity,1);n*=M(t,1),e.push(["opacity",n])},attr:function(e,t){this.element&&(this.element[e]=t)},allAttr:function(e){for(var t=0;e.length>t;t++)this.attr(e[t][0],e[t][1])},css:function(e,t){this.element&&(this.element.style[e]=t)},allCss:function(e){for(var t=0;e.length>t;t++)this.css(e[t][0],e[t][1])}}),O=L.extend({createElement:function(){L.fn.createElement.call(this),this.allCss([["width","100%"],["height","100%"],["position","relative"],["visibility","visible"]])},attachReference:_}),N=m.Class.extend({init:function(e,t){this.srcElement=e,this.observer=t,e.addObserver(this)},geometryChange:function(){this.observer.optionsChange({field:"clip",value:this.srcElement})},clear:function(){this.srcElement.removeObserver(this)}}),H=L.extend({init:function(e){L.fn.init.call(this,e),e&&this.initClip()},observe:function(){w.fn.observe.call(this)},mapStyle:function(){var e=L.fn.mapStyle.call(this);return this.srcElement&&this.srcElement.clip()&&e.push(["clip",this.clipRect()]),e},optionsChange:function(e){"clip"==e.field&&(this.clearClip(),this.initClip(),this.setClip()),L.fn.optionsChange.call(this,e)},clear:function(){this.clearClip(),L.fn.clear.call(this)},initClip:function(){this.srcElement.clip()&&(this.clip=new N(this.srcElement.clip(),this),this.clip.observer=this)},clearClip:function(){this.clip&&(this.clip.clear(),this.clip=null,this.css("clip",this.clipRect()))},setClip:function(){this.clip&&this.css("clip",this.clipRect())},clipRect:function(){var e,t,n,i=u,o=this.srcElement.clip();return o&&(e=this.clipBBox(o),t=e.topLeft(),n=e.bottomRight(),i=m.format("rect({0}px {1}px {2}px {3}px)",t.y,n.x,n.y,t.x)),i},clipBBox:function(e){var t=this.srcElement.rawBBox().topLeft(),n=e.rawBBox();return n.origin.translate(-t.x,-t.y),n}}),V=H.extend({createElement:function(){L.fn.createElement.call(this),this.setStyle()},attachTo:function(e,t){this.css("display",E),L.fn.attachTo.call(this,e,t),this.srcElement.options.visible!==!1&&this.css("display","")},_attachTo:function(e){var t=document.createDocumentFragment();t.appendChild(this.element),e.appendChild(t)},mapStyle:function(){var e=H.fn.mapStyle.call(this);return e.push(["position","absolute"]),e.push(["white-space","nowrap"]),e},optionsChange:function(e){"transform"===e.field&&this.refreshTransform(),"opacity"===e.field&&this.refreshOpacity(),H.fn.optionsChange.call(this,e)},refreshTransform:function(e){var t,n=this.srcElement.currentTransform(e),i=this.childNodes,o=i.length;for(this.setClip(),t=0;o>t;t++)i[t].refreshTransform(n)},currentOpacity:function(){var e=M(this.srcElement.options.opacity,1);return this.parent&&this.parent.currentOpacity&&(e*=this.parent.currentOpacity()),e},refreshOpacity:function(){var e,t=this.childNodes,n=t.length,i=this.currentOpacity();for(e=0;n>e;e++)t[e].refreshOpacity(i)},initClip:function(){if(H.fn.initClip.call(this),this.clip){var e=this.clip.srcElement.bbox(this.srcElement.currentTransform());e&&(this.css("width",e.width()+e.origin.x),this.css("height",e.height()+e.origin.y))}},clipBBox:function(e){return e.bbox(this.srcElement.currentTransform())},clearClip:function(){H.fn.clearClip.call(this)}}),U=L.extend({init:function(e,t){this.opacity=t,L.fn.init.call(this,e)},createElement:function(){this.element=n("stroke"),this.setOpacity()},optionsChange:function(e){0===e.field.indexOf("stroke")&&this.setStroke()},refreshOpacity:function(e){this.opacity=e,this.setStroke()},setStroke:function(){this.allAttr(this.mapStroke())},setOpacity:function(){this.setStroke()},mapStroke:function(){var e,t=this.srcElement.options.stroke,n=[];return t&&!S(t.color)&&0!==t.width?(n.push(["on","true"]),n.push(["color",t.color]),n.push(["weight",(t.width||1)+"px"]),this.mapOpacityTo(n,t.opacity),T(t.dashType)&&n.push(["dashstyle",t.dashType]),T(t.lineJoin)&&n.push(["joinstyle",t.lineJoin]),T(t.lineCap)&&(e=t.lineCap.toLowerCase(),"butt"===e&&(e="butt"===e?"flat":e),n.push(["endcap",e]))):n.push(["on","false"]),n}}),W=L.extend({init:function(e,t,n){this.opacity=n,L.fn.init.call(this,e)},createElement:function(){this.element=n("fill"),this.setFill()},optionsChange:function(e){s(e.field)&&this.setFill()},refreshOpacity:function(e){this.opacity=e,this.setOpacity()},setFill:function(){this.allAttr(this.mapFill())},setOpacity:function(){this.setFill()},attr:function(e,t){var n,i=this.element;if(i){for(n=e.split(".");n.length>1;)i=i[n.shift()];i[n[0]]=t}},mapFill:function(){var e=this.srcElement.fill(),t=[["on","false"]];return e&&(e.nodeType==B?t=this.mapGradient(e):S(e.color)||(t=this.mapFillColor(e))),t},mapFillColor:function(e){var t=[["on","true"],["color",e.color]];return this.mapOpacityTo(t,e.opacity),t},mapGradient:function(e){var t,n=this.srcElement.options,i=n.fallbackFill||e.fallbackFill&&e.fallbackFill();return t=e instanceof y.LinearGradient?this.mapLinearGradient(e):e instanceof y.RadialGradient&&e.supportVML?this.mapRadialGradient(e):i?this.mapFillColor(i):[["on","false"]]},mapLinearGradient:function(e){var t=e.start(),n=e.end(),i=C.deg(f(n.y-t.y,n.x-t.x)),o=[["on","true"],["type",B],["focus",0],["method","none"],["angle",270-i]];return this.addColors(o),o},mapRadialGradient:function(e){var t=this.srcElement.rawBBox(),n=e.center(),i=(n.x-t.origin.x)/t.width(),o=(n.y-t.origin.y)/t.height(),r=[["on","true"],["type","gradienttitle"],["focus","100%"],["focusposition",i+" "+o],["method","none"]];return this.addColors(r),r},addColors:function(e){var t,n,i=this.srcElement.options,o=M(this.opacity,1),r=[],s=i.fill.stops,l=i.baseColor,c=this.element.colors?"colors.value":"colors",u=a(l,s[0],o),h=a(l,s[s.length-1],o);for(n=0;s.length>n;n++)t=s[n],r.push(d.round(100*t.offset())+"% "+a(l,t,o));e.push([c,r.join(",")],["color",u],["color2",h])}}),j=L.extend({init:function(e,t){this.transform=t,L.fn.init.call(this,e)},createElement:function(){this.element=n("skew"),this.setTransform()},optionsChange:function(e){"transform"===e.field&&this.refresh(this.srcElement.currentTransform())},refresh:function(e){this.transform=e,this.setTransform()},transformOrigin:function(){return"-0.5,-0.5"},setTransform:function(){this.allAttr(this.mapTransform())},mapTransform:function(){var e=this.transform,t=[],n=x(e);return n?(n.round(F),t.push(["on","true"],["matrix",[n.a,n.c,n.b,n.d,0,0].join(",")],["offset",n.e+"px,"+n.f+"px"],["origin",this.transformOrigin()])):t.push(["on","false"]),t}}),G=H.extend({init:function(e,t,n){this.fill=this.createFillNode(e,t,n),this.stroke=new U(e,n),this.transform=this.createTransformNode(e,t),H.fn.init.call(this,e)},attachTo:function(e,t){this.fill.attachTo(this.element),this.stroke.attachTo(this.element),this.transform.attachTo(this.element),L.fn.attachTo.call(this,e,t)},createFillNode:function(e,t,n){return new W(e,t,n)},createTransformNode:function(e,t){return new j(e,t)},createElement:function(){this.element=n("shape"),this.setCoordsize(),this.setStyle()},optionsChange:function(e){s(e.field)?this.fill.optionsChange(e):0===e.field.indexOf("stroke")?this.stroke.optionsChange(e):"transform"===e.field?this.transform.optionsChange(e):"opacity"===e.field&&(this.fill.setOpacity(),this.stroke.setOpacity()),H.fn.optionsChange.call(this,e)},refreshTransform:function(e){this.transform.refresh(this.srcElement.currentTransform(e))},refreshOpacity:function(e){e*=M(this.srcElement.options.opacity,1),this.fill.refreshOpacity(e),this.stroke.refreshOpacity(e)},mapStyle:function(e,t){var n,i=H.fn.mapStyle.call(this);return e&&t||(e=t=I),i.push(["position","absolute"],["width",e+"px"],["height",t+"px"]),n=this.srcElement.options.cursor,n&&i.push(["cursor",n]),i},setCoordsize:function(){this.allAttr([["coordorigin","0 0"],["coordsize",R+" "+R]])}}),q=L.extend({createElement:function(){this.element=n("path"),this.setPathData()},geometryChange:function(){this.setPathData()},setPathData:function(){this.attr("v",this.renderData())},renderData:function(){return o(this.srcElement)}}),$=G.extend({init:function(e,t,n){this.pathData=this.createDataNode(e),G.fn.init.call(this,e,t,n)},attachTo:function(e,t){this.pathData.attachTo(this.element),G.fn.attachTo.call(this,e,t)},createDataNode:function(e){return new q(e)},geometryChange:function(){this.pathData.geometryChange(),G.fn.geometryChange.call(this)}}),Y=q.extend({renderData:function(){var e,t,n,i=this.srcElement.paths;if(i.length>0){for(e=[],t=0;i.length>t;t++)n=i.length-1>t,e.push(o(i[t],n));return e.join(" ")}}}),K=$.extend({createDataNode:function(e){return new Y(e)}}),X=j.extend({transformOrigin:function(){var e=this.srcElement.geometry().bbox(),t=e.center(),n=-p(t.x)/p(e.width()),i=-p(t.y)/p(e.height());return n+","+i}}),Q=G.extend({createElement:function(){this.element=n("oval"),this.setStyle()},createTransformNode:function(e,t){return new X(e,t)},geometryChange:function(){G.fn.geometryChange.call(this),this.setStyle(),this.refreshTransform()},mapStyle:function(){var e=this.srcElement.geometry(),t=e.radius,n=e.center,i=p(2*t),o=G.fn.mapStyle.call(this,i,i);return o.push(["left",p(n.x-t)+"px"],["top",p(n.y-t)+"px"]),o}}),Z=q.extend({renderData:function(){return o(this.srcElement.toPath())}}),J=$.extend({createDataNode:function(e){return new Z(e)}}),ee=q.extend({createElement:function(){q.fn.createElement.call(this),this.attr("textpathok",!0)},renderData:function(){var e=this.srcElement.rect(),t=e.center();return"m "+i([new b.Point(e.topLeft().x,t.y)])+" l "+i([new b.Point(e.bottomRight().x,t.y)])}}),te=L.extend({createElement:function(){this.element=n("textpath"),this.attr("on",!0),this.attr("fitpath",!1),this.setStyle(),this.setString()},optionsChange:function(e){"content"===e.field?this.setString():this.setStyle(),L.fn.optionsChange.call(this,e)},mapStyle:function(){return[["font",this.srcElement.options.font]]},setString:function(){this.attr("string",this.srcElement.content())}}),ne=$.extend({init:function(e,t,n){this.path=new te(e),$.fn.init.call(this,e,t,n)},createDataNode:function(e){return new ee(e)},attachTo:function(e,t){this.path.attachTo(this.element),$.fn.attachTo.call(this,e,t)},optionsChange:function(e){("font"===e.field||"content"===e.field)&&(this.path.optionsChange(e),this.pathData.geometryChange(e)),$.fn.optionsChange.call(this,e)}}),ie=q.extend({renderData:function(){var e=this.srcElement.rect(),t=(new y.Path).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close();return o(t)}}),oe=j.extend({init:function(e,t,n){this.opacity=n,j.fn.init.call(this,e,t)},createElement:function(){this.element=n("fill"),this.attr("type","frame"),this.attr("rotate",!0),this.setOpacity(),this.setSrc(),this.setTransform()},optionsChange:function(e){"src"===e.field&&this.setSrc(),j.fn.optionsChange.call(this,e)},geometryChange:function(){this.refresh()},refreshOpacity:function(e){this.opacity=e,this.setOpacity()},setOpacity:function(){var e=[];this.mapOpacityTo(e,this.srcElement.options.opacity),this.allAttr(e)},setSrc:function(){this.attr("src",this.srcElement.src())},mapTransform:function(){var e,t,n,i,o,r,s,a,l=this.srcElement,c=l.rawBBox(),u=c.center(),h=I/2,d=I,p=c.width()/d,m=c.height()/d,v=0,_=this.transform;return _?(n=x(_),i=g(n.a*n.a+n.b*n.b),o=g(n.c*n.c+n.d*n.d),p*=i,m*=o,r=D(f(n.b,n.d)),s=D(f(-n.c,n.a)),v=(r+s)/2,0!==v?(a=l.bbox().center(),e=(a.x-h)/d,t=(a.y-h)/d):(e=(u.x*i+n.e-h)/d,t=(u.y*o+n.f-h)/d)):(e=(u.x-h)/d,t=(u.y-h)/d),p=A(p,F),m=A(m,F),e=A(e,F),t=A(t,F),v=A(v,F),[["size",p+","+m],["position",e+","+t],["angle",v]]}}),re=$.extend({createFillNode:function(e,t,n){return new oe(e,t,n)},createDataNode:function(e){return new ie(e)},optionsChange:function(e){("src"===e.field||"transform"===e.field)&&this.fill.optionsChange(e),$.fn.optionsChange.call(this,e)},geometryChange:function(){this.fill.geometryChange(),$.fn.geometryChange.call(this)},refreshTransform:function(e){$.fn.refreshTransform.call(this,e),this.fill.refresh(this.srcElement.currentTransform(e))}}),se=q.extend({renderData:function(){var e=this.srcElement.geometry(),t=["m",i([e.topLeft()]),"l",i([e.topRight(),e.bottomRight(),e.bottomLeft()]),"x e"];return t.join(" ")}}),ae=$.extend({createDataNode:function(e){return new se(e)}}),le={Group:V,Text:ne,Path:$,MultiPath:K,Circle:Q,Arc:J,Image:re,Rect:ae};m.support.vml=function(){var e=m.support.browser;return e.msie&&9>e.version}(),u="inherit",m.support.browser.msie&&8>m.support.browser.version&&(u="rect(auto auto auto auto)"),m.support.vml&&y.SurfaceFactory.current.register("vml",z,30),v(y,{vml:{ArcDataNode:Z,ArcNode:J,CircleTransformNode:X,CircleNode:Q,FillNode:W,GroupNode:V,ImageNode:re,ImageFillNode:oe,ImagePathDataNode:ie,MultiPathDataNode:Y,MultiPathNode:K,Node:L,PathDataNode:q,PathNode:$,RectDataNode:se,RectNode:ae,RootNode:O,StrokeNode:U,Surface:z,TextNode:ne,TextPathNode:te,TextPathDataNode:ee,TransformNode:j}})}(window.kendo.jQuery)}(),function(){!function(e,t,n){"use strict";function i(n,i){function r(t){var n=new se.Group,o=t.getBoundingClientRect();return P(n,[1,0,0,1,-o.left,-o.top]),fe._clipbox=!1,fe._matrix=ae.Matrix.unit(),fe._stackingContext={element:t,group:n},fe._avoidLinks=i.avoidLinks===!0?"a":i.avoidLinks,e(t).addClass("k-pdf-export"),ee(t,n),e(t).removeClass("k-pdf-export"),n}function s(t){return null!=t?("string"==typeof t&&(t=kendo.template(t.replace(/^\s+|\s+$/g,""))),"function"==typeof t?function(n){var i=t(n);return i?e(i)[0]:void 0}:function(){return e(t).clone()[0]}):void 0}function a(t){var n,i,o,r,s=t.cloneNode(!1);if(1==t.nodeType){n=e(t),i=e(s),r=n.data();for(o in r)i.data(o,r[o]);if(/^canvas$/i.test(t.tagName))s.getContext("2d").drawImage(t,0,0);else for(o=t.firstChild;o;o=o.nextSibling)s.appendChild(a(o))}return s}function l(n,i,o,r,l,c,u){function h(){function e(){setTimeout(function(){n({pages:k,container:S})},10)}var t,i;("-"!=o||l)&&f(C),t=m(),C.parentNode.insertBefore(t,C),t.appendChild(C),b?(i=k.length,k.forEach(function(t,n){var o=b({element:t,pageNum:n+1,totalPages:k.length});o&&(t.appendChild(o),d(o,function(){0===--i&&e()}))})):e()}function f(n){
|
|
var i,r,s,a,c=y(n),u=t(w(c,"padding-bottom")),h=t(w(c,"border-bottom-width")),d=T;for(T+=u+h,i=!0,r=n.firstChild;r;r=r.nextSibling)if(1==r.nodeType){if(i=!1,s=e(r),s.is(o)){g(r);continue}if(!l){f(r);continue}if(!/^(?:static|relative)$/.test(w(y(r),"position")))continue;a=v(r),1==a?g(r):a&&(s.data("kendoChart")||/^(?:img|tr|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(r.tagName))?g(r):f(r)}else 3==r.nodeType&&l&&(_(r,i),i=!1);T=d}function p(e){var t=e.parentNode,n=t.firstChild;if(e===n)return!0;if(e===t.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function g(t){var n,i,o;return 1==t.nodeType&&t!==C&&p(t)?g(t.parentNode):(n=e(t).closest("table").find("colgroup"),i=m(),o=x.createRange(),o.setStartBefore(C),o.setEndBefore(t),i.appendChild(o.extractContents()),C.parentNode.insertBefore(i,C),void(n[0]&&n.clone().prependTo(e(t).closest("table"))))}function m(){var t=x.createElement("KENDO-PDF-PAGE");return e(t).css({display:"block",boxSizing:"content-box",width:r||"auto",padding:c.top+"px "+c.right+"px "+c.bottom+"px "+c.left+"px",position:"relative",height:l||"auto",overflow:l||r?"hidden":"visible",clear:"both"}),u&&u.pageClassName&&(t.className=u.pageClassName),k.push(t),t}function v(e){var t,n,i=e.getBoundingClientRect();return 0===i.width||0===i.height?0:(t=C.getBoundingClientRect().top,n=l-T,i.height>n?3:i.top-t>n?1:i.bottom-t>n?2:0)}function _(e,t){var n,i,o,r,s;/\S/.test(e.data)&&(n=e.data.length,i=x.createRange(),i.selectNodeContents(e),o=v(i),o&&(r=e,1==o?g(t?e.parentNode:e):(!function a(t,n,o){return i.setEnd(e,n),t==n||n==o?n:v(i)?a(t,t+n>>1,n):a(n,n+o>>1,o)}(0,n>>1,n),!/\S/.test(""+i)&&t?g(e.parentNode):(r=e.splitText(i.endOffset),s=m(),i.setStartBefore(C),s.appendChild(i.extractContents()),C.parentNode.insertBefore(s,C))),_(r)))}var b=s(u.template),x=i.ownerDocument,k=[],C=a(i),S=x.createElement("KENDO-PDF-DOCUMENT"),T=0;e(C).find("tfoot").each(function(){this.parentNode.appendChild(this)}),e(C).find("ol").each(function(){e(this).children().each(function(e){this.setAttribute("kendo-split-index",e)})}),e(S).css({display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),r&&(e(S).css({width:r,paddingLeft:c.left,paddingRight:c.right}),e(C).css({overflow:"hidden"})),S.appendChild(C),i.parentNode.insertBefore(S,i),u.beforePageBreak?setTimeout(function(){u.beforePageBreak(S,h)},15):setTimeout(h,15)}i||(i={});var c=e.Deferred();if(n=e(n)[0],!n)return c.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&&kendo.pdf.defineFont(o(n.ownerDocument)),d(n,function(){var e,t=i&&i.forcePageBreak,o=i&&i.paperSize&&"auto"!=i.paperSize,s=o&&kendo.pdf.getPaperOptions(function(e,t){return e in i?i[e]:t}),a=o&&s.paperSize[0],u=o&&s.paperSize[1],h=i.margin&&s.margin;t||u?(h||(h={left:0,top:0,right:0,bottom:0}),e=new se.Group({pdf:{multiPage:!0,paperSize:o?s.paperSize:"auto"}}),l(function(t){if(i.progress){var n=!1,o=0;!function s(){t.pages.length>o?(e.append(r(t.pages[o])),i.progress({pageNum:++o,totalPages:t.pages.length,cancel:function(){n=!0}}),n?t.container.parentNode.removeChild(t.container):setTimeout(s)):(t.container.parentNode.removeChild(t.container),c.resolve(e))}()}else t.pages.forEach(function(t){e.append(r(t))}),t.container.parentNode.removeChild(t.container),c.resolve(e)},n,t,a?a-h.left-h.right:null,u?u-h.top-h.bottom:null,h,i)):c.resolve(r(n))}),c.promise()}function o(e){function t(e){if(e){var t=null;try{t=e.cssRules}catch(n){}t&&i(e,t)}}function n(e){var t,n=w(e.style,"src");return n?oe(n).reduce(function(e,t){var n=re(t);return n&&e.push(n),e},[]):(t=re(e.cssText),t?[t]:[])}function i(e,i){var r,s,a,l,c,u,h;for(r=0;i.length>r;++r)switch(s=i[r],s.type){case 3:t(s.styleSheet);break;case 5:a=s.style,l=oe(w(a,"font-family")),c=/^(400|bold)$/i.test(w(a,"font-weight")),u="italic"==w(a,"font-style"),h=n(s),h.length>0&&o(e,l,c,u,h[0])}}function o(e,t,n,i,o){/^data:/i.test(o)||/^[^\/:]+:\/\//.test(o)||/^\//.test(o)||(o=(e.href+"").replace(/[^\/]*$/,"")+o),t.forEach(function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),n&&(e+="|bold"),i&&(e+="|italic"),r[e]=o})}var r,s;for(null==e&&(e=document),r={},s=0;e.styleSheets.length>s;++s)t(e.styleSheets[s]);return r}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){return e="_counter_"+e,fe[e]}function a(e){var t=[],n=fe;for(e="_counter_"+e;n;)r(n,e)&&t.push(n[e]),n=Object.getPrototypeOf(n);return t.reverse()}function l(e,t){var n=fe;for(e="_counter_"+e;n&&!r(n,e);)n=Object.getPrototypeOf(n);n||(n=fe._root),n[e]=(n[e]||0)+(null==t?1:t)}function c(e,t){e="_counter_"+e,fe[e]=null==t?0:t}function u(e,n,i){var o,r,s;for(o=0;e.length>o;)r=e[o++],s=t(e[o]),isNaN(s)?n(r,i):(n(r,s),++o)}function h(e,t){var n=kendo.parseColor(e);return n&&(n=n.toRGB(),t?n=n.toCssRgba():0===n.a&&(n=null)),n}function d(e,t){function n(e){de[e]||(de[e]=!0,r.push(e))}function i(){--o<=0&&t()}var o,r=[];!function s(e){/^img$/i.test(e.tagName)&&n(e.src),ie(w(y(e),"background-image")).forEach(function(e){"url"==e.type&&n(e.url)}),e.children&&le.call(e.children).forEach(s)}(e),o=r.length,0===o&&i(),r.forEach(function(e){var t=de[e]=new Image;/^data:/i.test(e)||(t.crossOrigin="Anonymous"),t.src=e,t.complete?i():(t.onload=i,t.onerror=function(){de[e]=null,i()})})}function f(e){var t,i="";do t=e%26,i=String.fromCharCode(97+t)+i,e=n.floor(e/26);while(e>0);return i}function p(e,t,n){var i,o;fe=Object.create(fe),fe[e.tagName.toLowerCase()]={element:e,style:t},i=w(t,"text-decoration"),i&&"none"!=i&&(o=w(t,"color"),i.split(/\s+/g).forEach(function(e){fe[e]||(fe[e]=o)})),_(t)&&(fe._stackingContext={element:e,group:n})}function g(){fe=Object.getPrototypeOf(fe)}function m(e){if(null!=fe._clipbox){var t=e.bbox(fe._matrix);fe._clipbox=fe._clipbox?ae.Rect.intersect(fe._clipbox,t):t}}function v(){var e=fe._clipbox;return null==e?!0:e?0===e.width()||0===e.height():void 0}function _(e){function t(t){return w(e,t)}return"none"!=t("transform")||"static"!=t("position")&&"auto"!=t("z-index")||t("opacity")<1?!0:void 0}function y(e,t){return window.getComputedStyle(e,t||null)}function w(e,t){return e.getPropertyValue(t)||ce.webkit&&e.getPropertyValue("-webkit-"+t)||ce.mozilla&&e.getPropertyValue("-moz-"+t)||ce.opera&&e.getPropertyValue("-o-"+t)||ce.msie&&e.getPropertyValue("-ms-"+t)}function b(e,t,n,i){e.setProperty(t,n,i),ce.webkit?e.setProperty("-webkit-"+t,n,i):ce.mozilla?e.setProperty("-moz-"+t,n,i):ce.opera?e.setProperty("-o-"+t,n,i):ce.msie&&(e.setProperty("-ms-"+t,n,i),t="ms"+t.replace(/(^|-)([a-z])/g,function(e,t,n){return t+n.toUpperCase()}),e[t]=n)}function x(e){if(ce.msie||ce.chrome){var t=e.getClientRects();if(2==t.length&&1>=t[1].width)return t[0];if(3==t.length&&1>=t[0].width&&1>=t[2].width)return t[1]}return e.getBoundingClientRect()}function k(e,n){return n="border-"+n,{width:t(w(e,n+"-width")),style:w(e,n+"-style"),color:h(w(e,n+"-color"),!0)}}function C(e,t){var n=e.style.cssText,i=t();return e.style.cssText=n,i}function S(e,n){var i=w(e,"border-"+n+"-radius").split(/\s+/g).map(t);return 1==i.length&&i.push(i[0]),B({x:i[0],y:i[1]})}function T(e){var t=e.getBoundingClientRect();return t=D(t,"border-*-width",e),t=D(t,"padding-*",e)}function D(e,n,i){var o,r,s,a,l;return"string"==typeof n?(o=y(i),r=t(w(o,n.replace("*","top"))),s=t(w(o,n.replace("*","right"))),a=t(w(o,n.replace("*","bottom"))),l=t(w(o,n.replace("*","left")))):"number"==typeof n&&(r=s=a=l=n),{top:e.top+r,right:e.right-s,bottom:e.bottom-a,left:e.left+l,width:e.right-e.left-s-l,height:e.bottom-e.top-a-r}}function A(e){var n,i,o=w(e,"transform");return"none"==o?null:(n=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(o),n?(i=w(e,"transform-origin"),n=n[1].split(/\s*,\s*/g).map(t),i=i.split(/\s+/g).map(t),{matrix:n,origin:i}):void 0)}function M(e){return 180*e/n.PI%360}function E(e){var i=t(e);return/grad$/.test(e)?n.PI*i/200:/rad$/.test(e)?i:/turn$/.test(e)?n.PI*i*2:/deg$/.test(e)?n.PI*i/180:void 0}function P(e,t){return t=new ae.Matrix(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function I(e,t){e.clip(t)}function R(e,t,n,i){for(var o=new ae.Arc([t,n],i).curvePoints(),r=1;o.length>r;)e.curveTo(o[r++],o[r++],o[r++])}function B(e){return(0>=e.x||0>=e.y)&&(e.x=e.y=0),e}function F(e,t,i,o,r){var s=n.max(0,t.x),a=n.max(0,t.y),l=n.max(0,i.x),c=n.max(0,i.y),u=n.max(0,o.x),h=n.max(0,o.y),d=n.max(0,r.x),f=n.max(0,r.y),p=n.min(e.width/(s+l),e.height/(c+h),e.width/(u+d),e.height/(f+a));return 1>p&&(s*=p,a*=p,l*=p,c*=p,u*=p,h*=p,d*=p,f*=p),{tl:{x:s,y:a},tr:{x:l,y:c},br:{x:u,y:h},bl:{x:d,y:f}}}function z(e,n,i){var o,r,s,a,l,c,u,h,d=y(e),f=S(d,"top-left"),p=S(d,"top-right"),g=S(d,"bottom-left"),m=S(d,"bottom-right");return("padding"==i||"content"==i)&&(o=k(d,"top"),r=k(d,"right"),s=k(d,"bottom"),a=k(d,"left"),f.x-=a.width,f.y-=o.width,p.x-=r.width,p.y-=o.width,m.x-=r.width,m.y-=s.width,g.x-=a.width,g.y-=s.width,"content"==i&&(l=t(w(d,"padding-top")),c=t(w(d,"padding-right")),u=t(w(d,"padding-bottom")),h=t(w(d,"padding-left")),f.x-=h,f.y-=l,p.x-=c,p.y-=l,m.x-=c,m.y-=u,g.x-=h,g.y-=u)),"number"==typeof i&&(f.x-=i,f.y-=i,p.x-=i,p.y-=i,m.x-=i,m.y-=i,g.x-=i,g.y-=i),L(n,f,p,m,g)}function L(e,t,n,i,o){var r=F(e,t,n,i,o),s=r.tl,a=r.tr,l=r.br,c=r.bl,u=new se.Path({fill:null,stroke:null});return u.moveTo(e.left,e.top+s.y),s.x&&R(u,e.left+s.x,e.top+s.y,{startAngle:-180,endAngle:-90,radiusX:s.x,radiusY:s.y}),u.lineTo(e.right-a.x,e.top),a.x&&R(u,e.right-a.x,e.top+a.y,{startAngle:-90,endAngle:0,radiusX:a.x,radiusY:a.y}),u.lineTo(e.right,e.bottom-l.y),l.x&&R(u,e.right-l.x,e.bottom-l.y,{startAngle:0,endAngle:90,radiusX:l.x,radiusY:l.y}),u.lineTo(e.left+c.x,e.bottom),c.x&&R(u,e.left+c.x,e.bottom-c.y,{startAngle:90,endAngle:180,radiusX:c.x,radiusY:c.y}),u.close()}function O(e,n){var i=t(e)+"";switch(n){case"decimal-leading-zero":return 2>i.length&&(i="0"+i),i;case"lower-roman":return ue(e).toLowerCase();case"upper-roman":return ue(e).toUpperCase();case"lower-latin":case"lower-alpha":return f(e-1);case"upper-latin":case"upper-alpha":return f(e-1).toUpperCase();default:return i}}function N(e,t){function n(e,t,n){return n?(n=n.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),a(e).map(function(e){return O(e,t)}).join(n)):O(s(e)||0,t)}var i,o=oe(t,/^\s+/),r=[];return o.forEach(function(t){var o;(i=/^\s*(["'])(.*)\1\s*$/.exec(t))?r.push(i[2].replace(/\\([0-9a-f]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})):(i=/^\s*counter\((.*?)\)\s*$/.exec(t))?(o=oe(i[1]),r.push(n(o[0],o[1]))):(i=/^\s*counters\((.*?)\)\s*$/.exec(t))?(o=oe(i[1]),r.push(n(o[0],o[2],o[1]))):r.push((i=/^\s*attr\((.*?)\)\s*$/.exec(t))?e.getAttribute(i[1])||"":t)}),r.join("")}function H(e){var t,n;if(e.cssText)return e.cssText;for(t=[],n=0;e.length>n;++n)t.push(e[n]+": "+w(e,e[n]));return t.join(";\n")}function V(e,n){function i(n,i){var r,s=y(e,n);s.content&&"normal"!=s.content&&"none"!=s.content&&"0px"!=s.width&&(r=e.ownerDocument.createElement(he),r.style.cssText=H(s),r.textContent=N(e,s.content),e.insertBefore(r,i),":before"!=n||/absolute|fixed/.test(w(r.style,"position"))||(r.style.marginLeft=t(w(r.style,"margin-left"))-r.offsetWidth+"px"),o.push(r))}if(e.tagName==he)return void U(e,n);var o=[];i(":before",e.firstChild),i(":after",null),U(e,n),o.forEach(function(t){e.removeChild(t)})}function U(i,o){function r(e){var t,n,o,r,s,a;if(/^td$/i.test(i.tagName)&&(t=fe.table,t&&"collapse"==w(t.style,"border-collapse"))){if(n=k(t.style,"left").width,o=k(t.style,"top").width,0===n&&0===o)return e;if(r=t.element.getBoundingClientRect(),s=t.element.rows[0].cells[0],a=s.getBoundingClientRect(),a.top==r.top||a.left==r.left)return le.call(e).map(function(e){return{left:e.left+n,top:e.top+o,right:e.right+n,bottom:e.bottom+o,height:e.height,width:e.width}})}return e}function s(e,t,i,r,s,a,l,c){function u(t,o,r){var s=n.PI/2*t/(t+i),a={x:o.x-t,y:o.y-i},l=new se.Path({fill:{color:e},stroke:null}).moveTo(0,0);P(l,r),R(l,0,o.y,{startAngle:-90,endAngle:-M(s),radiusX:o.x,radiusY:o.y}),a.x>0&&a.y>0?(l.lineTo(a.x*n.cos(s),o.y-a.y*n.sin(s)),R(l,0,o.y,{startAngle:-M(s),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?l.lineTo(a.x,i).lineTo(0,i):l.lineTo(a.x,i).lineTo(a.x,0),d.append(l.close())}if(!(0>=i)){var h,d=new se.Group;P(d,c),o.append(d),B(a),B(l),h=new se.Path({fill:{color:e},stroke:null}),d.append(h),h.moveTo(a.x?n.max(a.x,r):0,0).lineTo(t-(l.x?n.max(l.x,s):0),0).lineTo(t-n.max(l.x,s),i).lineTo(n.max(a.x,r),i).close(),a.x&&u(r,a,[-1,0,0,1,a.x,0]),l.x&&u(s,l,[1,0,0,1,t-l.x,0])}}function a(t){var n,r,s=new se.Group;for(I(s,L(t,G,q,K,Y)),o.append(s),"A"==i.tagName&&i.href&&!/^#?$/.test(e(i).attr("href"))&&(fe._avoidLinks&&e(i).is(fe._avoidLinks)||(s._pdfLink={url:i.href,top:t.top,right:t.right,bottom:t.bottom,left:t.left})),Z&&(n=new se.Path({fill:{color:Z.toCssRgba()},stroke:null}),n.moveTo(t.left,t.top).lineTo(t.right,t.top).lineTo(t.right,t.bottom).lineTo(t.left,t.bottom).close(),s.append(n)),r=d.length;--r>=0;)l(s,t,d[r],p[r%p.length],g[r%g.length],v[r%v.length],_[r%_.length])}function l(e,n,o,r,s,a,l){function c(e,n,o,c,u){function h(){for(;m.origin.x>n.left;)m.origin.x-=o}function d(){for(;m.origin.y>n.top;)m.origin.y-=c}function f(){for(;n.right>m.origin.x;)u(e,m.clone()),m.origin.x+=o}var p,g,m,v,_=o/c,y=n;if("content-box"==a?(y=D(y,"border-*-width",i),y=D(y,"padding-*",i)):"padding-box"==a&&(y=D(y,"border-*-width",i)),/^\s*auto(\s+auto)?\s*$/.test(l)||(p=l.split(/\s+/g),o=/%$/.test(p[0])?y.width*t(p[0])/100:t(p[0]),c=1==p.length||"auto"==p[1]?o/_:/%$/.test(p[1])?y.height*t(p[1])/100:t(p[1])),g=(s+"").split(/\s+/),1==g.length&&(g[1]="50%"),g[0]=/%$/.test(g[0])?t(g[0])/100*(y.width-o):t(g[0]),g[1]=/%$/.test(g[1])?t(g[1])/100*(y.height-c):t(g[1]),m=new ae.Rect([y.left+g[0],y.top+g[1]],[o,c]),"no-repeat"==r)u(e,m);else if("repeat-x"==r)h(),f();else if("repeat-y"==r)for(d();n.bottom>m.origin.y;)u(e,m.clone()),m.origin.y+=c;else if("repeat"==r)for(h(),d(),v=m.origin.clone();n.bottom>m.origin.y;)m.origin.x=v.x,f(),m.origin.y+=c}if(o&&"none"!=o)if("url"==o.type){if(/^url\(\"data:image\/svg/i.test(o.url))return;var u=de[o.url];u&&u.width>0&&u.height>0&&c(e,n,u.width,u.height,function(e,t){e.append(new se.Image(o.url,t))})}else{if("linear"!=o.type)return;c(e,n,n.width,n.height,W(o))}}function c(){function e(e){C(i,function(){i.style.position="relative";var t=i.ownerDocument.createElement(he);t.style.position="absolute",t.style.boxSizing="border-box","outside"==n?(t.style.width="6em",t.style.left="-6.8em",t.style.textAlign="right"):t.style.left="0px",e(t),i.insertBefore(t,i.firstChild),ee(t,o),i.removeChild(t)})}function t(e){var t,n=i.parentNode.children,o=i.getAttribute("kendo-split-index");if(null!=o)return e(0|o,n.length);for(t=0;n.length>t;++t)if(n[t]===i)return e(t,n.length)}var n,r=w(O,"list-style-type");if("none"!=r)switch(n=w(O,"list-style-position"),r){case"circle":case"disc":case"square":e(function(e){e.style.fontSize="60%",e.style.lineHeight="200%",e.style.paddingRight="0.5em",e.style.fontFamily="DejaVu Serif",e.innerHTML={disc:"●",circle:"◯",square:"■"}[r]});break;case"decimal":case"decimal-leading-zero":e(function(e){t(function(t){++t,"decimal-leading-zero"==r&&2>(t+"").length&&(t="0"+t),e.innerHTML=t+"."})});break;case"lower-roman":case"upper-roman":e(function(e){t(function(t){t=ue(t+1),"upper-roman"==r&&(t=t.toUpperCase()),e.innerHTML=t+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":e(function(e){t(function(t){t=f(t),/^upper/i.test(r)&&(t=t.toUpperCase()),e.innerHTML=t+"."})})}}function u(e,t,n){function r(e){return{x:e.y,y:e.x}}var l,c,u,h,d,f,p,g;if(0!==e.width&&0!==e.height&&(a(e),l=U.width>0&&(t&&"ltr"==X||n&&"rtl"==X),c=H.width>0&&(n&&"ltr"==X||t&&"rtl"==X),0!==N.width||0!==U.width||0!==H.width||0!==V.width)){if(N.color==H.color&&N.color==V.color&&N.color==U.color&&N.width==H.width&&N.width==V.width&&N.width==U.width&&l&&c)return e=D(e,N.width/2),u=z(i,e,N.width/2),u.options.stroke={color:N.color,width:N.width},void o.append(u);if(0===G.x&&0===q.x&&0===K.x&&0===Y.x&&2>N.width&&2>U.width&&2>H.width&&2>V.width)return N.width>0&&o.append(new se.Path({stroke:{width:N.width,color:N.color}}).moveTo(e.left,e.top+N.width/2).lineTo(e.right,e.top+N.width/2)),V.width>0&&o.append(new se.Path({stroke:{width:V.width,color:V.color}}).moveTo(e.left,e.bottom-V.width/2).lineTo(e.right,e.bottom-V.width/2)),l&&o.append(new se.Path({stroke:{width:U.width,color:U.color}}).moveTo(e.left+U.width/2,e.top).lineTo(e.left+U.width/2,e.bottom)),void(c&&o.append(new se.Path({stroke:{width:H.width,color:H.color}}).moveTo(e.right-H.width/2,e.top).lineTo(e.right-H.width/2,e.bottom)));h=F(e,G,q,K,Y),d=h.tl,f=h.tr,p=h.br,g=h.bl,s(N.color,e.width,N.width,U.width,H.width,d,f,[1,0,0,1,e.left,e.top]),s(V.color,e.width,V.width,H.width,U.width,p,g,[-1,0,0,-1,e.right,e.bottom]),s(U.color,e.height,U.width,V.width,N.width,r(g),r(d),[0,-1,1,0,e.left,e.bottom]),s(H.color,e.height,H.width,N.width,V.width,r(f),r(p),[0,1,-1,0,e.right,e.top])}}var d,p,g,v,_,b,x,T,A,E,O=y(i),N=k(O,"top"),H=k(O,"right"),V=k(O,"bottom"),U=k(O,"left"),G=S(O,"top-left"),q=S(O,"top-right"),Y=S(O,"bottom-left"),K=S(O,"bottom-right"),X=w(O,"direction"),Z=w(O,"background-color");if(Z=h(Z),d=ie(w(O,"background-image")),p=oe(w(O,"background-repeat")),g=oe(w(O,"background-position")),v=oe(w(O,"background-origin")),_=oe(w(O,"background-size")),ce.msie&&10>ce.version&&(g=oe(i.currentStyle.backgroundPosition)),b=D(i.getBoundingClientRect(),"border-*-width",i),function(){var e,n,i,r,s,a,l,c=w(O,"clip"),u=/^\s*rect\((.*)\)\s*$/.exec(c);u&&(e=u[1].split(/[ ,]+/g),n="auto"==e[0]?b.top:t(e[0])+b.top,i="auto"==e[1]?b.right:t(e[1])+b.left,r="auto"==e[2]?b.bottom:t(e[2])+b.top,s="auto"==e[3]?b.left:t(e[3])+b.left,a=new se.Group,l=(new se.Path).moveTo(s,n).lineTo(i,n).lineTo(i,r).lineTo(s,r).close(),I(a,l),o.append(a),o=a,m(l))}(),E=w(O,"display"),"table-row"==E)for(x=[],T=0,A=i.children;A.length>T;++T)x.push(A[T].getBoundingClientRect());else x=i.getClientRects(),1==x.length&&(x=[i.getBoundingClientRect()]);for(x=r(x),T=0;x.length>T;++T)u(x[T],0===T,T==x.length-1);return x.length>0&&"list-item"==E&&c(x[0]),function(){function e(){var e=z(i,b,"padding"),t=new se.Group;I(t,e),o.append(t),o=t,m(e)}$(i)?e():/^(hidden|auto|scroll)/.test(w(O,"overflow"))?e():/^(hidden|auto|scroll)/.test(w(O,"overflow-x"))?e():/^(hidden|auto|scroll)/.test(w(O,"overflow-y"))&&e()}(),j(i,o)||Q(i,o),o}function W(e){return function(i,o){var r,s,a,l,c,u,h,d,f,p,g,m,v,_=o.width(),y=o.height();switch(e.type){case"linear":switch(r=null!=e.angle?e.angle:n.PI,e.to){case"top":r=0;break;case"left":r=-n.PI/2;break;case"bottom":r=n.PI;break;case"right":r=n.PI/2;break;case"top left":case"left top":r=-n.atan2(y,_);break;case"top right":case"right top":r=n.atan2(y,_);break;case"bottom left":case"left bottom":r=n.PI+n.atan2(y,_);break;case"bottom right":case"right bottom":r=n.PI-n.atan2(y,_)}e.reverse&&(r-=n.PI),r%=2*n.PI,0>r&&(r+=2*n.PI),s=n.abs(_*n.sin(r))+n.abs(y*n.cos(r)),a=n.atan(_*n.tan(r)/y),l=n.sin(a),c=n.cos(a),u=n.abs(l)+n.abs(c),h=u/2*l,d=u/2*c,r>n.PI/2&&3*n.PI/2>=r&&(h=-h,d=-d),f=[],p=0,g=e.stops.map(function(n,i){var o,r=n.percent;return r?r=t(r)/100:n.length?r=t(n.length)/s:0===i?r=0:i==e.stops.length-1&&(r=1),o={color:n.color.toCssRgba(),offset:r},null!=r?(p=r,f.forEach(function(e,t){var n=e.stop;n.offset=e.left+(p-e.left)*(t+1)/(f.length+1)}),f=[]):f.push({left:p,stop:o}),o}),m=[.5-h,.5+d],v=[.5+h,.5-d],i.append(se.Path.fromRect(o).stroke(null).fill(new se.LinearGradient({start:m,end:v,stops:g,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function j(t,n){var i,o,r,s;return t.getAttribute(kendo.attr("role"))&&(i=kendo.widgetInstance(e(t)),i&&(i.exportDOMVisual||i.exportVisual))?(o=i.exportDOMVisual?i.exportDOMVisual():i.exportVisual())?(r=new se.Group,r.children.push(o),s=t.getBoundingClientRect(),r.transform(ae.transform().translate(s.left,s.top)),n.append(r),!0):!1:void 0}function G(e,t,n){var i=T(e),o=new ae.Rect([i.left,i.top],[i.width,i.height]),r=new se.Image(t,o);I(r,z(e,i,"content")),n.append(r)}function q(e,n){var i=y(e),o=y(n),r=t(w(i,"z-index")),s=t(w(o,"z-index")),a=w(i,"position"),l=w(o,"position");return isNaN(r)&&isNaN(s)?/static|absolute/.test(a)&&/static|absolute/.test(l)?0:"static"==a?-1:"static"==l?1:0:isNaN(r)?0===s?0:s>0?-1:1:isNaN(s)?0===r?0:r>0?1:-1:t(r)-t(s)}function $(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function Y(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function K(e,t){var i=y(e),o=w(i,"color"),r=e.getBoundingClientRect();"checkbox"==e.type?(t.append(se.Path.fromRect(new ae.Rect([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(o,1)),e.checked&&t.append((new se.Path).stroke(o,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))):(t.append(new se.Circle(new ae.Circle([(r.left+r.right)/2,(r.top+r.bottom)/2],n.min(r.width-2,r.height-2)/2)).stroke(o,1)),e.checked&&t.append(new se.Circle(new ae.Circle([(r.left+r.right)/2,(r.top+r.bottom)/2],n.min(r.width-8,r.height-8)/2)).fill(o).stroke(null)))}function X(e,t){var n,i,o,r,s,a=e.tagName.toLowerCase();if("input"==a&&("checkbox"==e.type||"radio"==e.type))return K(e,t);if(n=e.parentNode,i=e.ownerDocument,o=i.createElement(he),o.style.cssText=H(y(e)),o.style.display="inline-block","input"==a&&(o.style.whiteSpace="pre"),("select"==a||"textarea"==a)&&(o.style.overflow="auto"),"select"==a)if(e.multiple)for(s=0;e.options.length>s;++s)r=i.createElement(he),r.style.cssText=H(y(e.options[s])),r.style.display="block",r.textContent=e.options[s].textContent,o.appendChild(r);else r=Y(e),r&&(o.textContent=r.textContent);else o.textContent=e.value;n.insertBefore(o,e),o.scrollLeft=e.scrollLeft,o.scrollTop=e.scrollTop,Q(o,t),n.removeChild(o)}function Q(e,t){var n,i,o,r,s,a,l,c,u;switch(fe._stackingContext.element===e&&(fe._stackingContext.group=t),e.tagName.toLowerCase()){case"img":G(e,e.src,t);break;case"canvas":try{G(e,e.toDataURL("image/png"),t)}catch(h){}break;case"textarea":case"input":case"select":X(e,t);break;default:for(n=[],i=[],o=[],r=[],s=e.firstChild;s;s=s.nextSibling)switch(s.nodeType){case 3:/\S/.test(s.data)&&Z(e,s,t);break;case 1:a=y(s),l=w(a,"display"),c=w(a,"float"),u=w(a,"position"),"static"!=u?r.push(s):"inline"!=l?"none"!=c?i.push(s):n.push(s):o.push(s)}n.sort(q).forEach(function(e){ee(e,t)}),i.sort(q).forEach(function(e){ee(e,t)}),o.sort(q).forEach(function(e){ee(e,t)}),r.sort(q).forEach(function(e){ee(e,t)})}}function Z(e,i,o){function r(){var e,t,o,r,a,l,d,f=u,p=c.substr(u).search(/\S/);if(u+=p,0>p||u>=h)return!0;if(m.setStart(i,u),m.setEnd(i,u+1),e=m.getBoundingClientRect(),t=!1,b&&(p=c.substr(u).search(/\s/),p>=0&&(m.setEnd(i,u+p),o=m.getBoundingClientRect(),o.bottom==e.bottom&&(e=o,t=!0,u+=p))),!t){if(p=function g(t,n,o){m.setEnd(i,n);var r=x(m);return r.bottom!=e.bottom&&n>t?g(t,t+n>>1,n):r.right!=e.right?(e=r,o>n?g(n,n+o>>1,o):n):n}(u,n.min(h,u+C),h),p==u)return!0;if(u=p,p=(""+m).search(/\s+$/),0===p)return;p>0&&(m.setEnd(i,m.startOffset+p),e=m.getBoundingClientRect())}if(ce.msie&&(e=m.getClientRects()[0]),r=""+m,/^(?:pre|pre-wrap)$/i.test(k)){if(/\t/.test(r)){for(a=0,p=f;m.startOffset>p;++p)l=c.charCodeAt(p),9==l?a+=8-a%8:10==l||13==l?a=0:a++;for(;(p=r.search(" "))>=0;)d=" ".substr(0,8-(a+p)%8),r=r.substr(0,p)+d+r.substr(p+1)}}else r=r.replace(/\s+/g," ");s(r,e)}function s(e,t){var n,i,r;ce.msie&&!isNaN(f)&&(n=kendo.util.measureText(e,{font:p}),i=(t.top+t.bottom-n.height)/2,t={top:i,right:t.right,bottom:i+n.height,left:t.left,height:n.height,width:t.right-t.left}),r=new ne(e,new ae.Rect([t.left,t.top],[t.width,t.height]),{font:p,fill:{color:g}}),o.append(r),a(t)}function a(e){function t(t,n){var i,r;t&&(i=d/12,r=new se.Path({stroke:{width:i,color:t}}),n-=i,r.moveTo(e.left,n).lineTo(e.right,n),o.append(r))}t(fe.underline,e.bottom),t(fe["line-through"],e.bottom-e.height/2.7),t(fe.overline,e.top)}var l,c,u,h,d,f,p,g,m,_,b,k,C;if(!v()&&(l=y(e),!(t(w(l,"text-indent"))<-500)&&(c=i.data,u=0,h=c.search(/\S\s*$/)+1,h&&(d=w(l,"font-size"),f=w(l,"line-height"),p=[w(l,"font-style"),w(l,"font-variant"),w(l,"font-weight"),d,w(l,"font-family")].join(" "),d=t(d),f=t(f),0!==d))))for(g=w(l,"color"),m=e.ownerDocument.createRange(),_=w(l,"text-align"),b="justify"==_,k=w(l,"white-space"),C=e.getBoundingClientRect().width/d*5,0===C&&(C=500);!r(););}function J(e,n,i){var o,r,s,a,l,c;for("auto"!=i?(o=fe._stackingContext.group,i=t(i)):(o=n,i=0),r=o.children,s=0;r.length>s&&!(null!=r[s]._dom_zIndex&&r[s]._dom_zIndex>i);++s);return a=new se.Group,o.insertAt(a,s),a._dom_zIndex=i,o!==n&&fe._clipbox&&(l=fe._matrix.invert(),c=fe._clipbox.transformCopy(l),I(a,se.Path.fromRect(c))),a}function ee(e,n){var i,o,r,s,a,h,d,f=y(e),m=w(f,"counter-reset");m&&u(oe(m,/^\s+/),c,0),i=w(f,"counter-increment"),i&&u(oe(i,/^\s+/),l,1),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=fe._clipbox&&(o=t(w(f,"opacity")),r=w(f,"visibility"),s=w(f,"display"),0!==o&&"hidden"!=r&&"none"!=s&&(a=A(f),d=w(f,"z-index"),(a||1>o)&&"auto"==d&&(d=0),h=J(e,n,d),1>o&&h.opacity(o*h.opacity()),p(e,f,h),a?C(e,function(){var t,n,i,o;b(e.style,"transform","none","important"),b(e.style,"transition","none","important"),"static"==w(f,"position")&&b(e.style,"position","relative","important"),t=e.getBoundingClientRect(),n=t.left+a.origin[0],i=t.top+a.origin[1],o=[1,0,0,1,-n,-i],o=te(o,a.matrix),o=te(o,[1,0,0,1,n,i]),o=P(h,o),fe._matrix=fe._matrix.multiplyCopy(o),V(e,h)}):V(e,h),g()))}function te(e,t){var n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=t[0],c=t[1],u=t[2],h=t[3],d=t[4],f=t[5];return[n*l+i*u,n*c+i*h,o*l+r*u,o*c+r*h,s*l+a*u+d,s*c+a*h+f]}var ne,ie,oe,re,se=kendo.drawing,ae=kendo.geometry,le=Array.prototype.slice,ce=kendo.support.browser,ue=kendo.util.arabicToRoman,he="KENDO-PSEUDO-ELEMENT",de={},fe={};fe._root=fe,ne=se.Text.extend({nodeType:"Text",init:function(e,t,n){se.Text.fn.init.call(this,e,t.getOrigin(),n),this._pdfRect=t},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),se.drawDOM=i,i.getFontFaces=o,ie=function(){function e(e){function p(){var t=a.exec(e);t&&(e=e.substr(t[1].length))}function g(t){p();var n=t.exec(e);return n?(e=e.substr(n[1].length),n[1]):void 0}function m(){var t,o,r=kendo.parseColor(e,!0);return r?(e=e.substr(r.match[0].length),r=r.toRGB(),(t=g(i))||(o=g(n)),{color:r,length:t,percent:o}):void 0}function v(t){var i,r,a,h,d,f,p=[],v=!1;if(g(l)){for(i=g(s),i?(i=E(i),g(u)):(r=g(o),"to"==r?r=g(o):r&&/^-/.test(t)&&(v=!0),a=g(o),g(u)),/-moz-/.test(t)&&null==i&&null==r&&(h=g(n),d=g(n),v=!0,"0%"==h?r="left":"100%"==h&&(r="right"),"0%"==d?a="top":"100%"==d&&(a="bottom"),g(u));e&&!g(c)&&(f=m());)p.push(f),g(u);return{type:"linear",angle:i,to:r&&a?r+" "+a:r?r:a?a:null,stops:p,reverse:v}}}function _(){if(g(l)){var e=g(d);return e=e.replace(/^['"]+|["']+$/g,""),g(c),{type:"url",url:e}}}var y,w=e;return r(f,w)?f[w]:((y=g(t))?y=v(y):(y=g(h))&&(y=_()),f[w]=y||{type:"none"})}var t=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,n=/^([-0-9.]+%)/,i=/^([-0-9.]+px)/,o=/^(left|right|top|bottom|to|center)\W/,s=/^([-0-9.]+(deg|grad|rad|turn))/,a=/^(\s+)/,l=/^(\()/,c=/^(\))/,u=/^(,)/,h=/^(url)\(/,d=/^(.*?)\)/,f={},p={};return function(t){return r(p,t)?p[t]:p[t]=oe(t).map(e)}}(),oe=function(){var e={};return function(t,n){function i(e){return d=e.exec(t.substr(c))}function o(e){return e.replace(/^\s+|\s+$/g,"")}var s,a,l,c,u,h,d;if(n||(n=/^\s*,\s*/),s=t+n,r(e,s))return e[s];for(a=[],l=0,c=0,u=0,h=!1;t.length>c;)!h&&i(/^[\(\[\{]/)?(u++,c++):!h&&i(/^[\)\]\}]/)?(u--,c++):!h&&i(/^[\"\']/)?(h=d[0],c++):"'"==h&&i(/^\\\'/)?c+=2:'"'==h&&i(/^\\\"/)?c+=2:"'"==h&&i(/^\'/)?(h=!1,c++):'"'==h&&i(/^\"/)?(h=!1,c++):i(n)?(!h&&!u&&c>l&&(a.push(o(t.substring(l,c))),l=c+d[0].length),c+=d[0].length):c++;return c>l&&a.push(o(t.substring(l,c))),e[s]=a}}(),re=function(){var e={};return function(t){var n,i=e[t];return i||((n=/url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(t))?i=e[t]=n[2]:(n=/url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t))&&(i=e[t]=n[2])),i}}()}(window.kendo.jQuery,parseFloat,Math)}(),function(){!function(e){var t=e.noop,n=window.kendo,i=n.Class,o=n.util,r=n.animationFrame,s=n.deepExtend,a=i.extend({init:function(e,t){var n=this;n.options=s({},n.options,t),n.element=e},options:{duration:500,easing:"swing"},setup:t,step:t,play:function(){var t=this,n=t.options,i=e.easing[n.easing],s=n.duration,a=n.delay||0,l=o.now()+a,c=l+s;0===s?(t.step(1),t.abort()):setTimeout(function(){var e=function(){var n,a,u,h;t._stopped||(n=o.now(),a=o.limitValue(n-l,0,s),u=a/s,h=i(u,a,0,1,s),t.step(h),c>n?r(e):t.abort())};e()},a)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),l=function(){this._items=[]};l.prototype={register:function(e,t){this._items.push({name:e,type:t})},create:function(e,t){var n,i,o,r=this._items;if(t&&t.type)for(i=t.type.toLowerCase(),o=0;r.length>o;o++)if(r[o].name.toLowerCase()===i){n=r[o];break}return n?new n.type(e,t):void 0}},l.current=new l,a.create=function(e,t,n){return l.current.create(e,t,n)},s(n.drawing,{Animation:a,AnimationFactory:l})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){var n={top:0,right:0,bottom:0,left:0};return t=t||0,"number"==typeof e?n[Le]=n[ze]=n[ce]=n[De]=e:(n[Le]=e[Le]||t,n[ze]=e[ze]||t,n[ce]=e[ce]||t,n[De]=e[De]||t),n}function i(e,t){var n=e.tickX,i=e.tickY,o=e.position,r=new Q.Path({stroke:{width:t.width,color:t.color}});return e.vertical?r.moveTo(n,o).lineTo(n+t.size,o):r.moveTo(o,i).lineTo(o,i+t.size),b(r),r}function o(e,t){var n=e.lineStart,i=e.lineEnd,o=e.position,r=new Q.Path({stroke:{width:t.width,color:t.color,dashType:t.dashType}});return e.vertical?r.moveTo(n,o).lineTo(i,o):r.moveTo(o,n).lineTo(o,i),b(r),r}function r(e,t){var n,i,o,r=h(t-e,ye-1);if(0===r){if(0===t)return.1;r=re.abs(t)}return n=re.pow(10,re.floor(re.log(r)/re.log(10))),i=h(r/n,ye),o=1,o=1.904762>i?.2:4.761904>i?.5:9.523809>i?1:2,h(n*o,ye)}function s(e,t,n,i,o){var r=o*be;return new je(n+(e-n)*re.cos(r)+(t-i)*re.sin(r),i-(e-n)*re.sin(r)+(t-i)*re.cos(r))}function a(t,n){if(t.x1==n.x1&&t.y1==n.y1&&t.x2==n.x2&&t.y2==n.y2)return n;var i=re.min(t.x1,n.x1),o=re.max(t.x1,n.x1),r=re.min(t.x2,n.x2),s=re.max(t.x2,n.x2),a=re.min(t.y1,n.y1),l=re.max(t.y1,n.y1),c=re.min(t.y2,n.y2),u=re.max(t.y2,n.y2),h=[];return h[0]=C(o,a,r,l),h[1]=C(i,l,o,c),h[2]=C(r,l,s,c),h[3]=C(o,c,r,u),t.x1==i&&t.y1==a||n.x1==i&&n.y1==a?(h[4]=C(i,a,o,l),h[5]=C(r,c,s,u)):(h[4]=C(r,a,s,l),h[5]=C(i,c,o,u)),e.grep(h,function(e){return e.height()>0&&e.width()>0})[0]}function l(e,t){return-1!=ne(e,t)}function c(e,t){return h(re.ceil(e/t)*t,_e)}function u(e,t){return h(re.floor(e/t)*t,_e)}function h(e,t){var n=re.pow(10,t||0);return re.round(e*n)/n}function d(e,t){return re.log(e)/re.log(t)}function f(e,t,n){var i=h(re.abs(e%t),_e),o=t*(1-n);return 0===i||i>o}function p(e,t,n){return h(e+(t-e)*n,he)}function g(e,t){return e-t}function m(e,t){return e.match(xe)?W.format.apply(this,arguments):W.toString(t,e)}function v(e,t){return 0>-e.x*t.y+e.y*t.x}function _(e,t){return e&&t?e.getTime()-t.getTime():-1}function y(e){var t=e.originalEvent,n=0;return t.wheelDelta&&(n=-t.wheelDelta/120,n=n>0?re.ceil(n):re.floor(n)),t.detail&&(n=h(t.detail/3)),n}function w(e){if(!e||!e.indexOf||e.indexOf("&")<0)return e;var t=w._element;return t.innerHTML=e,t.textContent||t.innerText}function b(e){var t,n;if(!W.support.vml)for(t=.5,e.options.stroke&&q(e.options.stroke.width)&&e.options.stroke.width%2===0&&(t=0),n=0;e.segments.length>n;n++)e.segments[n].anchor().round(0).translate(t,t);return e}function x(e){var t,n,i=e.stops,o=e.innerRadius/e.radius*100,r=i.length,s=[];for(t=0;r>t;t++)n=se({},i[t]),n.offset=(n.offset*(100-o)+o)/100,s.push(n);return s}function k(e){
|
|
var t=e.origin,n=e.bottomRight();return new C(t.x,t.y,n.x,n.y)}var C,S,T,D,A,M,E,P,I,R,B,F,z,L,O,N,H,V,U,W=window.kendo,j=W.util,G=j.append,q=j.defined,$=j.last,Y=j.valueOrDefault,K=W.dataviz,X=K.geometry,Q=K.drawing,Z=Q.util.measureText,J=W.Class,ee=W.template,te=e.noop,ne=e.inArray,ie=e.isPlainObject,oe=e.trim,re=Math,se=W.deepExtend,ae="axisLabelClick",le="#000",ce="bottom",ue="center",he=3,de="clip",fe="circle",pe="cross",ge="12px sans-serif",me=400,ve=7,_e=6,ye=10,we=600,be=re.PI/180,xe=/\{\d+:?/,ke="height",Ce=1e5,Se=600,Te="inside",De="left",Ae="linear",Me=Number.MAX_VALUE,Ee=-Number.MAX_VALUE,Pe="none",Ie="noteClick",Re="noteHover",Be="outside",Fe="radial",ze="right",Le="top",Oe="triangle",Ne="width",He="#fff",Ve="x",Ue="y",We=.2,je=function(e,n){var i=this;return i instanceof je?(i.x=e||0,i.y=n||0,t):new je(e,n)};je.fn=je.prototype={clone:function(){var e=this;return new je(e.x,e.y)},equals:function(e){return e&&e.x===this.x&&e.y===this.y},rotate:function(e,t){var n=this,i=t*be,o=re.cos(i),r=re.sin(i),s=e.x,a=e.y,l=n.x,c=n.y;return n.x=h(s+(l-s)*o+(c-a)*r,he),n.y=h(a+(c-a)*o-(l-s)*r,he),n},multiply:function(e){var t=this;return t.x*=e,t.y*=e,t},distanceTo:function(e){var t=this.x-e.x,n=this.y-e.y;return re.sqrt(t*t+n*n)}},je.onCircle=function(e,t,n){return t*=be,new je(e.x-n*re.cos(t),e.y-n*re.sin(t))},C=function(e,n,i,o){var r=this;return r instanceof C?(r.x1=e||0,r.x2=i||0,r.y1=n||0,r.y2=o||0,t):new C(e,n,i,o)},C.fn=C.prototype={width:function(){return this.x2-this.x1},height:function(){return this.y2-this.y1},translate:function(e,t){var n=this;return n.x1+=e,n.x2+=e,n.y1+=t,n.y2+=t,n},move:function(e,t){var n=this,i=n.height(),o=n.width();return q(e)&&(n.x1=e,n.x2=n.x1+o),q(t)&&(n.y1=t,n.y2=n.y1+i),n},wrap:function(e){var t=this;return t.x1=re.min(t.x1,e.x1),t.y1=re.min(t.y1,e.y1),t.x2=re.max(t.x2,e.x2),t.y2=re.max(t.y2,e.y2),t},wrapPoint:function(e){return this.wrap(new C(e.x,e.y,e.x,e.y)),this},snapTo:function(e,t){var n=this;return t!=Ve&&t||(n.x1=e.x1,n.x2=e.x2),t!=Ue&&t||(n.y1=e.y1,n.y2=e.y2),n},alignTo:function(e,t){var n,i,o=this,r=o.height(),s=o.width(),a=t==Le||t==ce?Ue:Ve,l=a==Ue?r:s;return t===ue?(n=e.center(),i=o.center(),o.x1+=n.x-i.x,o.y1+=n.y-i.y):o[a+1]=t===Le||t===De?e[a+1]-l:e[a+2],o.x2=o.x1+s,o.y2=o.y1+r,o},shrink:function(e,t){var n=this;return n.x2-=e,n.y2-=t,n},expand:function(e,t){return this.shrink(-e,-t),this},pad:function(e){var t=this,i=n(e);return t.x1-=i.left,t.x2+=i.right,t.y1-=i.top,t.y2+=i.bottom,t},unpad:function(e){var t=this,i=n(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,t.pad(i)},clone:function(){var e=this;return new C(e.x1,e.y1,e.x2,e.y2)},center:function(){var e=this;return new je(e.x1+e.width()/2,e.y1+e.height()/2)},containsPoint:function(e){var t=this;return e.x>=t.x1&&t.x2>=e.x&&e.y>=t.y1&&t.y2>=e.y},points:function(){var e=this;return[new je(e.x1,e.y1),new je(e.x2,e.y1),new je(e.x2,e.y2),new je(e.x1,e.y2)]},getHash:function(){var e=this;return[e.x1,e.y1,e.x2,e.y2].join(",")},overlaps:function(e){return!(this.y1>e.y2||e.y1>this.y2||this.x1>e.x2||e.x1>this.x2)},rotate:function(e){var t=this,n=t.width(),i=t.height(),o=t.center(),r=o.x,a=o.y,l=s(0,0,r,a,e),c=s(n,0,r,a,e),u=s(n,i,r,a,e),h=s(0,i,r,a,e);return n=re.max(l.x,c.x,u.x,h.x)-re.min(l.x,c.x,u.x,h.x),i=re.max(l.y,c.y,u.y,h.y)-re.min(l.y,c.y,u.y,h.y),t.x2=t.x1+n,t.y2=t.y1+i,t},toRect:function(){return new X.Rect([this.x1,this.y1],[this.width(),this.height()])},hasSize:function(){return 0!==this.width()&&0!==this.height()},align:function(e,t,n){var i=this,o=t+1,r=t+2,s=t===Ve?Ne:ke,a=i[s]();l(n,[De,Le])?(i[o]=e[o],i[r]=i[o]+a):l(n,[ze,ce])?(i[r]=e[r],i[o]=i[r]-a):n==ue&&(i[o]=e[o]+(e[s]()-a)/2,i[r]=i[o]+a)}},S=J.extend({init:function(e,t,n,i,o){var r=this;r.c=e,r.ir=t,r.r=n,r.startAngle=i,r.angle=o},clone:function(){var e=this;return new S(e.c,e.ir,e.r,e.startAngle,e.angle)},middle:function(){return this.startAngle+this.angle/2},radius:function(e,t){var n=this;return t?n.ir=e:n.r=e,n},point:function(e,t){var n=this,i=e*be,o=re.cos(i),r=re.sin(i),s=t?n.ir:n.r,a=h(n.c.x-o*s,he),l=h(n.c.y-r*s,he);return new je(a,l)},adjacentBox:function(e,t,n){var i=this.clone().expand(e),o=i.middle(),r=i.point(o),s=t/2,a=n/2,l=r.x-s,c=r.y-a,u=re.sin(o*be),h=re.cos(o*be);return re.abs(u)<.9&&(l+=s*-h/re.abs(h)),re.abs(h)<.9&&(c+=a*-u/re.abs(u)),new C(l,c,l+t,c+n)},containsPoint:function(e){var t=this,n=t.c,i=t.ir,o=t.r,r=t.startAngle,s=t.startAngle+t.angle,a=e.x-n.x,l=e.y-n.y,c=new je(a,l),u=t.point(r),d=new je(u.x-n.x,u.y-n.y),f=t.point(s),p=new je(f.x-n.x,f.y-n.y),g=h(a*a+l*l,he);return(d.equals(c)||v(d,c))&&!v(p,c)&&g>=i*i&&o*o>=g},getBBox:function(){var e,t,n,i=this,o=new C(Me,Me,Ee,Ee),r=h(i.startAngle%360),s=h((r+i.angle)%360),a=i.ir,l=[0,90,180,270,r,s].sort(g),c=ne(r,l),u=ne(s,l);for(e=r==s?l:u>c?l.slice(c,u+1):[].concat(l.slice(0,u+1),l.slice(c,l.length)),t=0;e.length>t;t++)n=i.point(e[t]),o.wrapPoint(n),o.wrapPoint(n,a);return a||o.wrapPoint(i.c),o},expand:function(e){return this.r+=e,this}}),T=S.extend({init:function(e,t,n,i){S.fn.init.call(this,e,0,t,n,i)},expand:function(e){return S.fn.expand.call(this,e)},clone:function(){var e=this;return new T(e.c,e.r,e.startAngle,e.angle)},radius:function(e){return S.fn.radius.call(this,e)},point:function(e){return S.fn.point.call(this,e)}}),D=function(){},D.fn=D.prototype={createRing:function(e,t){var n,i=e.startAngle+180,o=e.angle+i,r=new X.Point(e.c.x,e.c.y),s=re.max(e.r,0),a=re.max(e.ir,0),l=new X.Arc(r,{startAngle:i,endAngle:o,radiusX:s,radiusY:s}),c=Q.Path.fromArc(l,t).close();return a?(l.radiusX=l.radiusY=a,n=l.pointAt(o),c.lineTo(n.x,n.y),c.arc(o,i,a,a,!0)):c.lineTo(r.x,r.y),c}},D.current=new D,A=J.extend({init:function(e){var t=this;t.children=[],t.options=se({},t.options,e)},reflow:function(e){var t,n,i,o=this,r=o.children;for(n=0;r.length>n;n++)i=r[n],i.reflow(e),t=t?t.wrap(i.box):i.box.clone();o.box=t||e},destroy:function(){var e,t=this,n=t.children;for(this.animation&&this.animation.destroy(),e=0;n.length>e;e++)n[e].destroy()},getRoot:function(){var e=this.parent;return e?e.getRoot():null},getChart:function(){var e=this.getRoot();return e?e.chart:t},translateChildren:function(e,t){var n,i=this,o=i.children,r=o.length;for(n=0;r>n;n++)o[n].box.translate(e,t)},append:function(){G(this.children,arguments);for(var e=0;e<arguments.length;e++)arguments[e].parent=this},renderVisual:function(){this.options.visible!==!1&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},addVisual:function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},renderChildren:function(){var e,t=this.children;for(e=0;t.length>e;e++)t[e].renderVisual()},createVisual:function(){this.visual=new K.drawing.Group({zIndex:this.options.zIndex,visible:Y(this.options.visible,!0)})},createAnimation:function(){this.visual&&(this.animation=Q.Animation.create(this.visual,this.options.animation))},appendVisual:function(e){e.chartElement||(e.chartElement=this),e.options.noclip?this.clipRoot().visual.append(e):q(e.options.zIndex)?this.stackRoot().stackVisual(e):this.visual?this.visual.append(e):this.parent.appendVisual(e)},clipRoot:function(){return this.parent?this.parent.clipRoot():this},stackRoot:function(){return this.parent?this.parent.stackRoot():this},stackVisual:function(e){var t,n,i,o=e.options.zIndex||0,r=this.visual.children;for(t=0;r.length>t&&(n=r[t],i=Y(n.options.zIndex,0),!(i>o));t++);this.visual.insertAt(e,t)},traverse:function(e){var t,n,i=this.children;for(t=0;i.length>t;t++)n=i[t],e(n),n.traverse&&n.traverse(e)},closest:function(e){for(var n=this,i=!1;n&&!i;)i=e(n),i||(n=n.parent);return i?n:t},renderComplete:e.noop,hasHighlight:function(){var e=(this.options||{}).highlight;return!(!this.createHighlight||e&&e.visible===!1)},toggleHighlight:function(t){var n,i=this,o=i._highlight,r=(i.options||{}).highlight,s=(r||{}).visual;if(!o){if(n={fill:{color:He,opacity:.2},stroke:{color:He,width:1,opacity:.2}},s){if(o=i._highlight=s(e.extend(i.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(n)},sender:i.getChart(),series:i.series,dataItem:i.dataItem,category:i.category,value:i.value,percentage:i.percentage,runningTotal:i.runningTotal,total:i.total})),!o)return}else o=i._highlight=i.createHighlight(n);o.options.zIndex=i.options.zIndex,i.appendVisual(o)}o.visible(t)},createGradientOverlay:function(e,t,n){var i=new Q.Path(se({stroke:{color:Pe},fill:this.createGradient(n),closed:e.options.closed},t));return i.segments.elements(e.segments.elements()),i},createGradient:function(e){return this.parent?this.parent.createGradient(e):t}}),M=A.extend({init:function(e){var t=this;t.gradients={},A.fn.init.call(t,e)},options:{width:we,height:me,background:He,border:{color:le,width:0},margin:n(5),zIndex:-2},reflow:function(){var e,t=this,n=t.options,i=t.children,o=new C(0,0,n.width,n.height);for(t.box=o.unpad(n.margin),e=0;i.length>e;e++)i[e].reflow(o),o=a(o,i[e].box)||C()},createVisual:function(){this.visual=new Q.Group,this.createBackground()},createBackground:function(){var e=this.options,t=e.border||{},n=this.box.clone().pad(e.margin).unpad(t.width),i=Q.Path.fromRect(n.toRect(),{stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},fill:{color:e.background,opacity:e.opacity},zIndex:-10});this.visual.append(i)},getRoot:function(){return this},createGradient:function(e){var t,n,i=this.gradients,o=j.objectKey(e),r=K.Gradients[e.gradient];return i[o]?t=i[o]:(n=se({},r,e),"linear"==r.type?t=new Q.LinearGradient(n):(e.innerRadius&&(n.stops=x(n)),t=new Q.RadialGradient(n),t.supportVML=r.supportVML!==!1),i[o]=t),t}}),E=A.extend({options:{align:De,vAlign:Le,margin:{},padding:{},border:{color:le,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0},reflow:function(e){function t(){a.align(e,Ve,l.align),a.align(e,Ue,l.vAlign),a.paddingBox=i.clone().unpad(f).unpad(g)}var i,o,r,s,a=this,l=a.options,c=l.width,u=l.height,h=c&&u,d=l.shrinkToFit,f=n(l.margin),p=n(l.padding),g=l.border.width,m=a.children;for(o=e.clone(),h&&(o.x2=o.x1+c,o.y2=o.y1+u),d&&o.unpad(f).unpad(g).unpad(p),A.fn.reflow.call(a,o),i=h?a.box=C(0,0,c,u):a.box,d&&h?(t(),o=a.contentBox=a.paddingBox.clone().unpad(p)):(o=a.contentBox=i.clone(),i.pad(p).pad(g).pad(f),t()),a.translateChildren(i.x1-o.x1+f.left+g+p.left,i.y1-o.y1+f.top+g+p.top),r=0;m.length>r;r++)s=m[r],s.reflow(s.box)},align:function(e,t,n){this.box.align(e,t,n)},hasBox:function(){var e=this.options;return e.border.width||e.background},createVisual:function(){A.fn.createVisual.call(this);var e=this.options;e.visible&&this.hasBox()&&this.visual.append(Q.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},visualStyle:function(){var e=this,t=e.options,n=t.border||{};return{stroke:{width:n.width,color:n.color,opacity:Y(n.opacity,t.opacity),dashType:n.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}}}),P=A.extend({init:function(e,t){var n=this;A.fn.init.call(n,t),n.content=e,n.reflow(C())},options:{font:ge,color:le,align:De,vAlign:""},reflow:function(e){var t,n=this,i=n.options;t=i.size=Z(n.content,{font:i.font}),n.baseline=t.baseline,n.box=C(e.x1,e.y1,e.x1+t.width,e.y1+t.height)},createVisual:function(){var e=this.options;this.visual=new Q.Text(this.content,this.box.toRect().topLeft(),{font:e.font,fill:{color:e.color,opacity:e.opacity},cursor:e.cursor})}}),I=A.extend({init:function(e){A.fn.init.call(this,e),this._initDirection()},_initDirection:function(){var e=this.options;e.vertical?(this.groupAxis=Ve,this.elementAxis=Ue,this.groupSizeField=Ne,this.elementSizeField=ke,this.groupSpacing=e.spacing,this.elementSpacing=e.vSpacing):(this.groupAxis=Ue,this.elementAxis=Ve,this.groupSizeField=ke,this.elementSizeField=Ne,this.groupSpacing=e.vSpacing,this.elementSpacing=e.spacing)},options:{vertical:!0,wrap:!0,vSpacing:0,spacing:0},reflow:function(e){this.box=e.clone(),this.reflowChildren()},reflowChildren:function(){var e,t,n,i,o,r,s,a,l,c,u=this,h=u.box,d=u.elementAxis,f=u.groupAxis,p=u.elementSizeField,g=u.groupSizeField,m=u.groupOptions(),v=m.groups,_=v.length,y=h[f+1]+u.alignStart(m.groupsSize,h[g]()),w=y;if(_){for(s=0;_>s;s++){for(n=v[s],i=n.groupElements,o=i.length,e=h[d+1],r=0;o>r;r++)a=i[r],c=u.elementSize(a),t=w+u.alignStart(c[g],n.groupSize),l=C(),l[f+1]=t,l[f+2]=t+c[g],l[d+1]=e,l[d+2]=e+c[p],a.reflow(l),e+=c[p]+u.elementSpacing;w+=n.groupSize+u.groupSpacing}h[f+1]=y,h[f+2]=y+m.groupsSize,h[d+2]=h[d+1]+m.maxGroupElementsSize}},alignStart:function(e,t){var n=0,i=this.options.align;return i==ze||i==ce?n=t-e:i==ue&&(n=(t-e)/2),n},groupOptions:function(){var e,t,n=this,i=n.box,o=n.children,r=o.length,s=this.elementSizeField,a=this.groupSizeField,l=this.elementSpacing,c=this.groupSpacing,u=h(i[s]()),d=0,f=0,p=0,g=0,m=[],v=[],_=0;for(d=0;r>d;d++)t=o[d],t.box||t.reflow(i),e=this.elementSize(t),n.options.wrap&&h(p+l+e[s])>u&&(m.push({groupElements:v,groupSize:f,groupElementsSize:p}),_=re.max(_,p),g+=c+f,f=0,p=0,v=[]),f=re.max(f,e[a]),p>0&&(p+=l),p+=e[s],v.push(t);return m.push({groupElements:v,groupSize:f,groupElementsSize:p}),_=re.max(_,p),g+=f,{groups:m,groupsSize:g,maxGroupElementsSize:_}},elementSize:function(e){return{width:e.box.width(),height:e.box.height()}},createVisual:te}),R=E.extend({ROWS_SPLIT_REGEX:/\n|\\n/m,init:function(e,t){var n=this;n.content=e,E.fn.init.call(n,t),n._initContainer(),n.reflow(C())},_initContainer:function(){var e,t,n=this,i=n.options,o=(n.content+"").split(n.ROWS_SPLIT_REGEX),r=new I({vertical:!0,align:i.align,wrap:!1}),s=se({},i,{opacity:1,animation:null});for(n.container=r,n.append(r),t=0;o.length>t;t++)e=new P(oe(o[t]),s),r.append(e)},reflow:function(e){var t,i,o,r=this.options,s=r.visual;this.container.options.align=r.align,s&&!this._boxReflow?(e.hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),this.visual=s(this.visualContext(e)),t=e,this.visual&&(t=k(this.visual.clippedBBox()||new X.Rect),this.visual.options.zIndex=r.zIndex,this.visual.options.noclip=r.noclip),this.box=this.contentBox=this.paddingBox=t):(E.fn.reflow.call(this,e),r.rotation&&(i=n(r.margin),o=this.box.unpad(i),this.targetBox=e,this.normalBox=o.clone(),o=this.rotate(),o.translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=o.clone(),o.pad(i)))},createVisual:function(){var e,t=this.options;t.visible&&(this.visual=new K.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(e=Q.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(e)))},renderVisual:function(){this.options.visual?(this.addVisual(),this.createAnimation()):E.fn.renderVisual.call(this)},visualOptions:function(){var e=this.options;return{background:e.background,border:e.border,color:e.color,font:e.font,margin:e.margin,padding:e.padding,visible:e.visible}},visualContext:function(e){var t=this;return{text:t.content,rect:e.toRect(),sender:this.getChart(),options:t.visualOptions(),createVisual:function(){return t._boxReflow=!0,t.reflow(e),t._boxReflow=!1,t.getDefaultVisual()}}},getDefaultVisual:function(){this.createVisual(),this.renderChildren();var e=this.visual;return delete this.visual,e},rotate:function(){var e=this.options;return this.box.rotate(e.rotation),this.align(this.targetBox,Ve,e.align),this.align(this.targetBox,Ue,e.vAlign),this.box},rotationTransform:function(){var e,t,n,i,o=this.options.rotation;return o?(e=this.normalBox.center(),t=e.x,n=e.y,i=this.rotatedBox.center(),X.transform().translate(i.x-t,i.y-n).rotate(o,[t,n])):null}}),B=A.extend({init:function(e){var t=this;A.fn.init.call(t,e),e=t.options,t.append(new R(e.text,se({},e,{vAlign:e.position})))},options:{color:le,position:Le,align:ue,margin:n(5),padding:n(5)},reflow:function(e){var t=this;A.fn.reflow.call(t,e),t.box.snapTo(e,Ve)}}),B.buildTitle=function(e,t,n){var i;return"string"==typeof e&&(e={text:e}),e=se({visible:!0},n,e),e&&e.visible&&e.text&&(i=new B(e),t.append(i)),i},F=R.extend({init:function(e,t,n,i,o){var r=this;r.text=t,r.value=e,r.index=n,r.dataItem=i,R.fn.init.call(r,t,o)},visualContext:function(e){var t=R.fn.visualContext.call(this,e);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},click:function(t,n){var i=this;t.trigger(ae,{element:e(n.target),value:i.value,text:i.text,index:i.index,dataItem:i.dataItem,axis:i.parent.options})},rotate:function(){var e,t;return this.options.alignRotation!=ue?(e=this.normalBox.toRect(),t=this.rotationTransform(),this.box=k(e.bbox(t.matrix()))):R.fn.rotate.call(this),this.box},rotationTransform:function(){var e,t,n,i,o,r,s,a,l,c,u,d,f,p,g,m,v,_,y=this.options,w=y.rotation;return w?y.alignRotation==ue?R.fn.rotationTransform.call(this):(e=X.transform().rotate(w).matrix(),t=this.normalBox.toRect(),n=this.targetBox.toRect(),i=y.rotationOrigin||Le,o=i==Le||i==ce?Ve:Ue,r=i==Le||i==ce?Ue:Ve,s=i==Le||i==De?n.origin:n.bottomRight(),a=t.topLeft().transformCopy(e),l=t.topRight().transformCopy(e),c=t.bottomRight().transformCopy(e),u=t.bottomLeft().transformCopy(e),d=X.Rect.fromPoints(a,l,c,u),f={},f[r]=n.origin[r]-d.origin[r],p=re.abs(a[r]+f[r]-s[r]),g=re.abs(l[r]+f[r]-s[r]),h(p,_e)===h(g,_e)?(m=a,v=l):p>g?(m=l,v=c):(m=a,v=u),_=m[o]+(v[o]-m[o])/2,f[o]=n.center()[o]-_,X.transform().translate(f.x,f.y).rotate(w)):null}}),z=A.extend({init:function(e){var t=this;A.fn.init.call(t,e),t.options.visible||(t.options=se({},t.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),t.options.minorTicks=se({},{color:t.options.line.color,width:t.options.line.width,visible:t.options.minorTickType!=Pe},t.options.minorTicks,{size:t.options.minorTickSize,align:t.options.minorTickType}),t.options.majorTicks=se({},{color:t.options.line.color,width:t.options.line.width,visible:t.options.majorTickType!=Pe},t.options.majorTicks,{size:t.options.majorTickSize,align:t.options.majorTickType}),this.options._deferLabels||t.createLabels(),t.createTitle(),t.createNotes()},options:{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:le,visible:!0},title:{visible:!0,position:ue},majorTicks:{align:Be,size:4,skip:0,step:1},minorTicks:{align:Be,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:Be,minorTickType:Pe,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:le,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1},labelsRange:function(){return{min:this.options.labels.skip,max:this.labelsCount()}},createLabels:function(){var t,n,i,o,r=this,s=r.options,a=s.vertical?ze:ue,l=se({},s.labels,{align:a,zIndex:s.zIndex}),c=re.max(1,l.step);if(r.children=e.grep(r.children,function(e){return!(e instanceof F)}),r.labels=[],l.visible)for(t=r.labelsRange(),n=l.rotation,ie(n)&&(l.alignRotation=n.align,l.rotation=n.angle),"auto"==l.rotation&&(l.rotation=0,s.autoRotateLabels=!0),o=t.min;t.max>o;o+=c)i=r.createAxisLabel(o,l),i&&(r.append(i),r.labels.push(i))},lineBox:function(){var e=this,t=e.options,n=e.box,i=t.vertical,o=t.labels.mirror,r=o?n.x1:n.x2,s=o?n.y2:n.y1,a=t.line.width||0;return i?C(r,n.y1,r,n.y2-a):C(n.x1,s,n.x2-a,s)},createTitle:function(){var e,t=this,n=t.options,i=se({rotation:n.vertical?-90:0,text:"",zIndex:1,visualSize:!0},n.title);i.visible&&i.text&&(e=new R(i.text,i),t.append(e),t.title=e)},createNotes:function(){var e,t,n,i=this,o=i.options,r=o.notes,s=r.data||[];for(i.notes=[],e=0;s.length>e;e++)t=se({},r,s[e]),t.value=i.parseNoteValue(t.value),n=new L(t.value,t.label.text,null,null,null,t),n.options.visible&&(q(n.options.position)?o.vertical&&!l(n.options.position,[De,ze])?n.options.position=o.reverse?De:ze:o.vertical||l(n.options.position,[Le,ce])||(n.options.position=o.reverse?ce:Le):n.options.position=o.vertical?o.reverse?De:ze:o.reverse?ce:Le,i.append(n),i.notes.push(n))},parseNoteValue:function(e){return e},renderVisual:function(){A.fn.renderVisual.call(this),this.createPlotBands()},createVisual:function(){A.fn.createVisual.call(this),this.createBackground(),this.createLine()},gridLinesVisual:function(){var e=this._gridLines;return e||(e=this._gridLines=new Q.Group({zIndex:-2}),this.appendVisual(this._gridLines)),e},createTicks:function(e){function t(t,n,o){var a,c=t.length;if(n.visible)for(a=n.skip;c>a;a+=n.step)q(o)&&a%o===0||(l.tickX=s?r.x2:r.x2-n.size,l.tickY=s?r.y1-n.size:r.y1,l.position=t[a],e.append(i(l,n)))}var n=this,o=n.options,r=n.lineBox(),s=o.labels.mirror,a=o.majorTicks.visible?o.majorUnit:0,l={vertical:o.vertical};t(n.getMajorTickPositions(),o.majorTicks),t(n.getMinorTickPositions(),o.minorTicks,a/o.minorUnit)},createLine:function(){var e,t,n=this,i=n.options,o=i.line,r=n.lineBox();o.width>0&&o.visible&&(e=new Q.Path({stroke:{width:o.width,color:o.color,dashType:o.dashType}}),e.moveTo(r.x1,r.y1).lineTo(r.x2,r.y2),i._alignLines&&b(e),t=this._lineGroup=new Q.Group,t.append(e),this.visual.append(t),this.createTicks(t))},getActualTickSize:function(){var e=this,t=e.options,n=0;return t.majorTicks.visible&&t.minorTicks.visible?n=re.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?n=t.majorTicks.size:t.minorTicks.visible&&(n=t.minorTicks.size),n},createBackground:function(){var e=this,t=e.options,n=t.background,i=e.box;n&&(e._backgroundPath=Q.Path.fromRect(i.toRect(),{fill:{color:n},stroke:null}),this.visual.append(e._backgroundPath))},createPlotBands:function(){var t,n,i,o,r,s,a=this,l=a.options,c=l.plotBands||[],u=l.vertical,h=a.plotArea;0!==c.length&&(r=this._plotbandGroup=new Q.Group({zIndex:-1}),s=e.grep(a.pane.axes,function(e){return e.options.vertical!==a.options.vertical})[0],e.each(c,function(e,l){var c,d;i=Y(l.from,Ee),o=Y(l.to,Me),u?(t=(s||h.axisX).lineBox(),n=a.getSlot(l.from,l.to,!0)):(t=a.getSlot(l.from,l.to,!0),n=(s||h.axisY).lineBox()),0!==t.width()&&0!==n.height()&&(c=new X.Rect([t.x1,n.y1],[t.width(),n.height()]),d=Q.Path.fromRect(c,{fill:{color:l.color,opacity:l.opacity},stroke:null}),r.append(d))}),a.appendVisual(r))},createGridLines:function(e){function t(e,t,i){var r,a=e.length;if(t.visible)for(r=t.skip;a>r;r+=t.step)n=h(e[r]),l(n,g)||r%i===0||s&&f===n||(p.position=n,m.append(o(p,t)),g.push(n))}var n,i=this,r=i.options,s=e.options.line.visible,a=r.majorGridLines,c=a.visible?r.majorUnit:0,u=r.vertical,d=e.lineBox(),f=d[u?"y1":"x1"],p={lineStart:d[u?"x1":"y1"],lineEnd:d[u?"x2":"y2"],vertical:u},g=[],m=this.gridLinesVisual();return t(i.getMajorTickPositions(),r.majorGridLines),t(i.getMinorTickPositions(),r.minorGridLines,c/r.minorUnit),m.children},reflow:function(e){var t,n,i=this,o=i.options,r=o.vertical,s=i.labels,a=s.length,l=i.title,c=r?Ne:ke,u=l?l.box[c]():0,h=i.getActualTickSize()+o.margin+u,d=0,f=(this.getRoot()||{}).box||e,p=f[c]();for(n=0;a>n;n++)t=s[n].box[c](),p>=t+h&&(d=re.max(d,t));i.box=r?C(e.x1,e.y1,e.x1+d+h,e.y2):C(e.x1,e.y1,e.x2,e.y1+d+h),i.arrangeTitle(),i.arrangeLabels(),i.arrangeNotes()},getLabelsTickPositions:function(){return this.getMajorTickPositions()},labelTickIndex:function(e){return e.index},arrangeLabels:function(){var e,t,n,i,o,r,s,a,l,c,u,h=this,d=h.options,f=h.labels,p=!d.justified,g=d.vertical,m=h.lineBox(),v=d.labels.mirror,_=h.getLabelsTickPositions(),y=h.getActualTickSize()+d.margin;for(n=0;f.length>n;n++)i=f[n],o=h.labelTickIndex(i),r=g?i.box.height():i.box.width(),s=_[o]-r/2,g?(p&&(a=_[o],l=_[o+1],c=a+(l-a)/2,s=c-r/2),u=m.x2,v?(u+=y,i.options.rotationOrigin=De):(u-=y+i.box.width(),i.options.rotationOrigin=ze),e=i.box.move(u,s)):(p?(a=_[o],l=_[o+1]):(a=s,l=s+r),t=m.y1,v?(t-=y+i.box.height(),i.options.rotationOrigin=ce):(t+=y,i.options.rotationOrigin=Le),e=C(a,t,l,t+i.box.height())),i.reflow(e)},autoRotateLabels:function(){var e,t,n,i,o,r;if(this.options.autoRotateLabels&&!this.options.vertical){for(e=this.getMajorTickPositions(),t=this.labels,r=0;t.length>r;r++)if(o=e[r+1]-e[r],n=t[r].box,n.width()>o){if(n.height()>o){i=-90;break}i=-45}if(i){for(r=0;t.length>r;r++)t[r].options.rotation=i,t[r].reflow(C());return!0}}},arrangeTitle:function(){var e=this,t=e.options,n=t.labels.mirror,i=t.vertical,o=e.title;o&&(i?(o.options.align=n?ze:De,o.options.vAlign=o.options.position):(o.options.align=o.options.position,o.options.vAlign=n?Le:ce),o.reflow(e.box))},arrangeNotes:function(){var e,t,n,i,o=this;for(e=0;o.notes.length>e;e++)t=o.notes[e],i=t.options.value,q(i)?(o.shouldRenderNote(i)?t.show():t.hide(),n=o.getSlot(i)):t.hide(),t.reflow(n||o.lineBox())},alignTo:function(e){var t=this,n=e.lineBox(),i=t.options.vertical,o=i?Ue:Ve;t.box.snapTo(n,o),i?t.box.shrink(0,t.lineBox().height()-n.height()):t.box.shrink(t.lineBox().width()-n.width(),0),t.box[o+1]-=t.lineBox()[o+1]-n[o+1],t.box[o+2]-=t.lineBox()[o+2]-n[o+2]},axisLabelText:function(e,t,n){var i,o=e;return n.template?(i=ee(n.template),o=i({value:e,dataItem:t,format:n.format,culture:n.culture})):n.format&&(o=n.format.match(xe)?W.format(n.format,e):W.toString(e,n.format,n.culture)),o},slot:function(e,n){var i=this.getSlot(e,n);return i?i.toRect():t},contentBox:function(){var e=this.box.clone(),t=this.labels;return t.length&&(t[0].options.visible&&e.wrap(t[0].box),$(t).options.visible&&e.wrap($(t).box)),e},limitRange:function(e,n,i,o){var r=this.options,s=n-e;return i>e&&(!q(r.min)||r.min>i)?(e=i,n=e+s):n>o&&(!q(r.max)||o>r.max)&&(n=o,e=n-s),e>=i&&o>=n?{min:e,max:n}:t}}),L=E.extend({init:function(e,t,n,i,o,r){var s=this;E.fn.init.call(s,r),s.value=e,s.text=t,s.dataItem=n,s.category=i,s.series=o,s.render()},options:{icon:{visible:!0,type:fe},label:{position:Te,visible:!0,align:ue,vAlign:ue},line:{visible:!0},visible:!0,position:Le,zIndex:2},hide:function(){this.options.visible=!1},show:function(){this.options.visible=!0},render:function(){var e,t,n,i,o=this,r=o.options,s=r.label,a=o.text,l=r.icon,c=l.size,u=C();r.visible&&(q(s)&&s.visible&&(s.template?(i=ee(s.template),a=i({dataItem:o.dataItem,category:o.category,value:o.value,text:a,series:o.series})):s.format&&(a=m(s.format,a)),o.label=new R(a,se({},s)),s.position!==Te||q(c)||(l.type===fe?c=re.max(o.label.box.width(),o.label.box.height()):(t=o.label.box.width(),n=o.label.box.height()),u.wrap(o.label.box))),l.width=t||c||ve,l.height=n||c||ve,e=new O(se({},l)),o.marker=e,o.append(e),o.label&&o.append(o.label),e.reflow(C()),o.wrapperBox=u.wrap(e.box))},reflow:function(e){var t,n,i,o=this,r=o.options,s=e.center(),a=o.wrapperBox,c=r.line.length,u=r.position,h=o.label,d=o.marker;r.visible&&(l(u,[De,ze])?u===De?(i=a.alignTo(e,u).translate(-c,e.center().y-a.center().y),r.line.visible&&(t=[e.x1,s.y],o.linePoints=[t,[i.x2,s.y]],n=i.clone().wrapPoint(t))):(i=a.alignTo(e,u).translate(c,e.center().y-a.center().y),r.line.visible&&(t=[e.x2,s.y],o.linePoints=[t,[i.x1,s.y]],n=i.clone().wrapPoint(t))):u===ce?(i=a.alignTo(e,u).translate(e.center().x-a.center().x,c),r.line.visible&&(t=[s.x,e.y2],o.linePoints=[t,[s.x,i.y1]],n=i.clone().wrapPoint(t))):(i=a.alignTo(e,u).translate(e.center().x-a.center().x,-c),r.line.visible&&(t=[s.x,e.y1],o.linePoints=[t,[s.x,i.y2]],n=i.clone().wrapPoint(t))),d&&d.reflow(i),h&&(h.reflow(i),d&&(r.label.position===Be&&h.box.alignTo(d.box,u),h.reflow(h.box))),o.contentBox=i,o.targetBox=e,o.box=n||i)},createVisual:function(){E.fn.createVisual.call(this),this.options.visible&&this.createLine()},renderVisual:function(){var e=this,t=e.options,n=t.visual;t.visible&&n?(e.visual=n({dataItem:e.dataItem,category:e.category,value:e.value,text:e.text,sender:e.getChart(),series:e.series,rect:e.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}}),e.addVisual()):E.fn.renderVisual.call(e)},createLine:function(){var e,t=this.options.line;this.linePoints&&(e=Q.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}}),b(e),this.visual.append(e))},click:function(e,t){var n=this.eventArgs(t);e.trigger(Ie,n)||t.preventDefault()},hover:function(e,t){var n=this.eventArgs(t);e.trigger(Re,n)||t.preventDefault()},leave:function(e){e._unsetActivePoint()},eventArgs:function(t){var n=this,i=n.options;return{element:e(t.target),text:q(i.label)?i.label.text:"",dataItem:n.dataItem,series:n.series,value:n.value,category:n.category,visual:n.visual}}}),O=E.extend({init:function(e,t){this.pointData=t,E.fn.init.call(this,e)},options:{type:fe,align:ue,vAlign:ue},getElement:function(){var e,t,n=this,i=n.options,o=i.type,r=i.rotation,s=n.paddingBox,a=s.center(),l=s.width()/2;if(i.visible&&n.hasBox())return t=n.visualStyle(),o===fe?e=new Q.Circle(new X.Circle([h(s.x1+l,he),h(s.y1+s.height()/2,he)],l),t):o===Oe?e=Q.Path.fromPoints([[s.x1+l,s.y1],[s.x1,s.y2],[s.x2,s.y2]],t).close():o===pe?(e=new Q.MultiPath(t),e.moveTo(s.x1,s.y1).lineTo(s.x2,s.y2),e.moveTo(s.x1,s.y2).lineTo(s.x2,s.y1)):e=Q.Path.fromRect(s.toRect(),t),r&&e.transform(X.transform().rotate(-r,[a.x,a.y])),e.options.zIndex=this.options.zIndex,e},createElement:function(){var e,t=this,n=t.options.visual,i=t.pointData||{};return e=n?n({value:i.value,dataItem:i.dataItem,sender:t.getChart(),series:i.series,category:i.category,rect:t.paddingBox.toRect(),options:t.visualOptions(),createVisual:function(){return t.getElement()}}):t.getElement()},visualOptions:function(){var e=this.options;return{background:e.background,border:e.border,margin:e.margin,padding:e.padding,type:e.type,size:e.width,visible:e.visible}},createVisual:function(){this.visual=this.createElement()}}),N=z.extend({init:function(e,t,n){var i=this,o=i.initDefaults(e,t,n);z.fn.init.call(i,o)},startValue:function(){return 0},options:{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:le},labels:{format:"#.####################"},zIndex:1},initDefaults:function(e,t,n){var i,o=this,s=n.narrowRange,a=o.autoAxisMin(e,t,s),l=o.autoAxisMax(e,t,s),h=r(a,l),d={majorUnit:h};return n.roundToMajorUnit!==!1&&(0>a&&f(a,h,1/3)&&(a-=h),l>0&&f(l,h,1/3)&&(l+=h)),d.min=u(a,h),d.max=c(l,h),this.totalMin=q(n.min)?re.min(d.min,n.min):d.min,this.totalMax=q(n.max)?re.max(d.max,n.max):d.max,this.totalMajorUnit=h,n&&(i=q(n.min)||q(n.max),i&&n.min===n.max&&(n.min>0?n.min=0:n.max=1),n.majorUnit?(d.min=u(d.min,n.majorUnit),d.max=c(d.max,n.majorUnit)):i&&(n=se(d,n),d.majorUnit=r(n.min,n.max))),d.minorUnit=(n.majorUnit||d.majorUnit)/5,se(d,n)},range:function(){var e=this.options;return{min:e.min,max:e.max}},autoAxisMax:function(e,t,n){var i,o;if(!e&&!t)return 1;if(0>=e&&0>=t){if(t=e==t?0:t,o=re.abs((t-e)/t),n===!1||!n&&o>We)return 0;i=re.min(0,t-(e-t)/2)}else e=e==t?0:e,i=t;return i},autoAxisMin:function(e,t,n){var i,o;if(!e&&!t)return 0;if(e>=0&&t>=0){if(e=e==t?0:e,o=(t-e)/t,n===!1||!n&&o>We)return 0;i=re.max(0,e-(t-e)/2)}else t=e==t?0:t,i=e;return i},getDivisions:function(e){if(0===e)return 1;var t=this.options,n=t.max-t.min;return re.floor(h(n/e,he))+1},getTickPositions:function(e,t){var n,i=this,o=i.options,r=o.vertical,s=o.reverse,a=i.lineBox(),l=r?a.height():a.width(),c=o.max-o.min,u=l/c,d=e*u,f=0,p=i.getDivisions(e),g=(r?-1:1)*(s?-1:1),m=1===g?1:2,v=a[(r?Ue:Ve)+m],_=[];for(t&&(f=t/e),n=0;p>n;n++)n%f!==0&&_.push(h(v,he)),v+=d*g;return _},getMajorTickPositions:function(){var e=this;return e.getTickPositions(e.options.majorUnit)},getMinorTickPositions:function(){var e=this;return e.getTickPositions(e.options.minorUnit)},getSlot:function(e,t,n){var i,o,r=this,s=r.options,a=s.reverse,l=s.vertical,c=l?Ue:Ve,u=r.lineBox(),h=u[c+(a?2:1)],d=l?u.height():u.width(),f=a?-1:1,p=f*(d/(s.max-s.min)),g=new C(u.x1,u.y1,u.x1,u.y1);return q(e)||(e=t||0),q(t)||(t=e||0),n&&(e=re.max(re.min(e,s.max),s.min),t=re.max(re.min(t,s.max),s.min)),l?(i=s.max-re.max(e,t),o=s.max-re.min(e,t)):(i=re.min(e,t)-s.min,o=re.max(e,t)-s.min),g[c+1]=re.max(re.min(h+p*(a?o:i),Ce),-Ce),g[c+2]=re.max(re.min(h+p*(a?i:o),Ce),-Ce),g},getValue:function(e){var t,n=this,i=n.options,o=i.reverse,r=i.vertical,s=1*i.max,a=1*i.min,l=r?Ue:Ve,c=n.lineBox(),u=c[l+(o?2:1)],d=r?c.height():c.width(),f=o?-1:1,p=f*(e[l]-u),g=(s-a)/d,m=p*g;return 0>p||p>d?null:(t=r?s-m:a+m,h(t,_e))},translateRange:function(e){
|
|
var t=this,n=t.options,i=t.lineBox(),o=n.vertical,r=n.reverse,s=o?i.height():i.width(),a=n.max-n.min,l=s/a,c=h(e/l,_e);return!o&&!r||o&&r||(c=-c),{min:n.min+c,max:n.max+c}},scaleRange:function(e){var t=this,n=t.options,i=-e*n.majorUnit;return{min:n.min-i,max:n.max+i}},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n=this,i=n.options,o=h(i.min+e*i.majorUnit,_e),r=n.axisLabelText(o,null,t);return new F(o,r,e,null,t)},shouldRenderNote:function(e){var t=this.range();return e>=t.min&&t.max>=e},pan:function(e){var t=this.translateRange(e);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax)},pointsRange:function(e,t){var n=this.getValue(e),i=this.getValue(t),o=re.min(n,i),r=re.max(n,i);return{min:o,max:r}},zoomRange:function(e){var n=this.scaleRange(e),i=this.totalMax,o=this.totalMin,r=j.limitValue(n.min,o,i),s=j.limitValue(n.max,o,i),a=this.options.max-this.options.min;return this.totalMajorUnit>a||s-r>=this.totalMajorUnit?{min:r,max:s}:t}}),H=z.extend({init:function(e,t,n){this.options=this._initOptions(e,t,n),z.fn.init.call(this,n)},startValue:function(){return this.options.min},options:{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:le},zIndex:1},getSlot:function(e,n,i){var o,r,s=this,a=s.options,l=a.reverse,c=a.vertical,u=c?Ue:Ve,h=s.lineBox(),f=h[u+(l?2:1)],p=c?h.height():h.width(),g=l?-1:1,m=a.majorUnit,v=s.logMin,_=s.logMax,y=g*(p/(_-v)),w=new C(h.x1,h.y1,h.x1,h.y1);return q(e)||(e=n||1),q(n)||(n=e||1),0>=e||0>=n?t:(i&&(e=re.max(re.min(e,a.max),a.min),n=re.max(re.min(n,a.max),a.min)),e=d(e,m),n=d(n,m),c?(o=_-re.max(e,n),r=_-re.min(e,n)):(o=re.min(e,n)-v,r=re.max(e,n)-v),w[u+1]=f+y*(l?r:o),w[u+2]=f+y*(l?o:r),w)},getValue:function(e){var t,n=this,i=n.options,o=i.reverse,r=i.vertical,s=n.lineBox(),a=i.majorUnit,l=n.logMin,c=n.logMax,u=r===o?1:-1,d=1===u?1:2,f=r?s.height():s.width(),p=(c-l)/f,g=r?Ue:Ve,m=s[g+d],v=u*(e[g]-m),_=v*p;return 0>v||v>f?null:(t=l+_,h(re.pow(a,t),_e))},range:function(){var e=this.options;return{min:e.min,max:e.max}},scaleRange:function(e){var t=this,n=t.options,i=n.majorUnit,o=-e;return{min:re.pow(i,t.logMin-o),max:re.pow(i,t.logMax+o)}},translateRange:function(e){var t=this,n=t.options,i=n.majorUnit,o=t.lineBox(),r=n.vertical,s=n.reverse,a=r?o.height():o.width(),l=a/(t.logMax-t.logMin),c=h(e/l,_e);return!r&&!s||r&&s||(c=-c),{min:re.pow(i,t.logMin+c),max:re.pow(i,t.logMax+c)}},labelsCount:function(){var e=this,t=re.floor(e.logMax),n=re.floor(t-e.logMin)+1;return n},getMajorTickPositions:function(){var e=this,t=[];return e.traverseMajorTicksPositions(function(e){t.push(e)},{step:1,skip:0}),t},createTicks:function(e){function t(t,n){u.tickX=a?s.x2:s.x2-n.size,u.tickY=a?s.y1-n.size:s.y1,u.position=t,e.append(i(u,n))}var n=this,o=[],r=n.options,s=n.lineBox(),a=r.labels.mirror,l=r.majorTicks,c=r.minorTicks,u={vertical:r.vertical};return l.visible&&n.traverseMajorTicksPositions(t,l),c.visible&&n.traverseMinorTicksPositions(t,c),o},createGridLines:function(e){function t(e,t){l(e,h)||(u.position=e,d.append(o(u,t)),h.push(e))}var n=this,i=n.options,r=i.majorGridLines,s=i.minorGridLines,a=i.vertical,c=e.lineBox(),u={lineStart:c[a?"x1":"y1"],lineEnd:c[a?"x2":"y2"],vertical:a},h=[],d=this.gridLinesVisual();return r.visible&&n.traverseMajorTicksPositions(t,r),s.visible&&n.traverseMinorTicksPositions(t,s),d.children},traverseMajorTicksPositions:function(e,t){var n,i,o=this,r=o._lineOptions(),s=r.lineStart,a=r.step,l=o.logMin,c=o.logMax;for(n=re.ceil(l)+t.skip;c>=n;n+=t.step)i=h(s+a*(n-l),_e),e(i,t)},traverseMinorTicksPositions:function(e,t){var n,i,o,r,s,a=this,l=a.options,c=a._lineOptions(),u=c.lineStart,f=c.step,p=l.majorUnit,g=a.logMin,m=a.logMax,v=re.floor(g),_=l.max,y=l.min,w=l.minorUnit;for(n=v;m>n;n++)for(r=a._minorIntervalOptions(n),s=t.skip;w>s&&(i=r.value+s*r.minorStep,!(i>_));s+=t.step)i>=y&&(o=h(u+f*(d(i,p)-g),_e),e(o,t))},createAxisLabel:function(e,t){var n=this,i=n.options,o=re.ceil(n.logMin+e),r=Math.pow(i.majorUnit,o),s=n.axisLabelText(r,null,t);return new F(r,s,e,null,t)},shouldRenderNote:function(e){var t=this.range();return e>=t.min&&t.max>=e},_throwNegativeValuesError:function(){throw Error("Non positive values cannot be used for a logarithmic axis")},_initOptions:function(e,t,n){var i=this,o=se({},i.options,{min:e,max:t},n),r=o.min,s=o.max,a=o.majorUnit,l=this._autoMax(t,a),c=this._autoMin(e,t,o);return 0>=o.axisCrossingValue&&i._throwNegativeValuesError(),q(n.max)?0>=n.max&&i._throwNegativeValuesError():s=l,q(n.min)?0>=n.min&&i._throwNegativeValuesError():r=c,this.totalMin=q(n.min)?re.min(c,n.min):c,this.totalMax=q(n.max)?re.max(l,n.max):l,i.logMin=h(d(r,a),_e),i.logMax=h(d(s,a),_e),o.max=s,o.min=r,o.minorUnit=n.minorUnit||h(a-1,_e),o},_autoMin:function(e,t,n){var i=e,o=n.majorUnit;return 0>=e?i=1>=t?re.pow(o,-2):1:n.narrowRange||(i=re.pow(o,re.floor(d(e,o)))),i},_autoMax:function(e,t){var n,i=h(d(e,t),_e)%1;return n=0>=e?t:0!==i&&(.3>i||i>.9)?re.pow(t,d(e,t)+.2):re.pow(t,re.ceil(d(e,t)))},pan:function(e){var t=this.translateRange(e);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,-e)},pointsRange:function(e,t){var n=this.getValue(e),i=this.getValue(t),o=re.min(n,i),r=re.max(n,i);return{min:o,max:r}},zoomRange:function(e){var n=this.options,i=this.scaleRange(e),o=this.totalMax,r=this.totalMin,s=j.limitValue(i.min,r,o),a=j.limitValue(i.max,r,o),l=n.majorUnit,c=a>s&&n.min&&n.max&&h(d(n.max,l)-d(n.min,l),_e)<1,u=!(n.min===r&&n.max===o)&&h(d(a,l)-d(s,l),_e)>=1;return c||u?{min:s,max:a}:t},_minorIntervalOptions:function(e){var t=this.options.majorUnit,n=re.pow(t,e),i=re.pow(t,e+1),o=i-n,r=o/this.options.minorUnit;return{value:n,minorStep:r}},_lineOptions:function(){var e=this,t=e.options,n=t.reverse,i=t.vertical,o=i?Ue:Ve,r=e.lineBox(),s=i===n?1:-1,a=1===s?1:2,l=i?r.height():r.width(),c=s*(l/(e.logMax-e.logMin)),u=r[o+a];return{step:c,lineStart:u,lineBox:r}}}),K.Gradients={glass:{type:Ae,rotation:0,stops:[{offset:0,color:He,opacity:0},{offset:.25,color:He,opacity:.3},{offset:1,color:He,opacity:0}]},sharpBevel:{type:Fe,stops:[{offset:0,color:He,opacity:.55},{offset:.65,color:He,opacity:0},{offset:.95,color:He,opacity:.25}]},roundedBevel:{type:Fe,stops:[{offset:.33,color:He,opacity:.06},{offset:.83,color:He,opacity:.2},{offset:.95,color:He,opacity:0}]},roundedGlass:{type:Fe,supportVML:!1,stops:[{offset:0,color:He,opacity:0},{offset:.5,color:He,opacity:.3},{offset:.99,color:He,opacity:0}]},sharpGlass:{type:Fe,supportVML:!1,stops:[{offset:0,color:He,opacity:.2},{offset:.15,color:He,opacity:.15},{offset:.17,color:He,opacity:.35},{offset:.85,color:He,opacity:.05},{offset:.87,color:He,opacity:.15},{offset:.99,color:He,opacity:0}]}},V={extend:function(e,t){if(!e.exportVisual)throw Error("Mixin target has no exportVisual method defined.");e.exportSVG=this.exportSVG,e.exportImage=this.exportImage,e.exportPDF=this.exportPDF,t||(e.svg=this.svg,e.imageDataURL=this.imageDataURL)},exportSVG:function(e){return Q.exportSVG(this.exportVisual(),e)},exportImage:function(e){return Q.exportImage(this.exportVisual(e),e)},exportPDF:function(e){return Q.exportPDF(this.exportVisual(),e)},svg:function(){if(Q.svg.Surface)return Q.svg._exportGroup(this.exportVisual());throw Error("SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface")},imageDataURL:function(){var t,n,i;if(!W.support.canvas)return null;if(Q.canvas.Surface)return t=e("<div />").css({display:"none",width:this.element.width(),height:this.element.height()}).appendTo(document.body),n=new Q.canvas.Surface(t),n.draw(this.exportVisual()),i=n._rootElement.toDataURL(),n.destroy(),t.remove(),i;throw Error("Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface")}},U=function(e){this.closed=e},U.prototype=U.fn={WEIGHT:.333,EXTREMUM_ALLOWED_DEVIATION:.01,process:function(e){var t,n,i,o,r,s,a,l,c,u,h=this,d=h.closed,f=e.slice(0),p=f.length,g=[];if(p>2&&(h.removeDuplicates(0,f),p=f.length),2>p||2==p&&f[0].equals(f[1]))return g;for(t=f[0],n=f[1],i=f[2],g.push(new Q.Segment(t));t.equals(f[p-1]);)d=!0,f.pop(),p--;if(2==p)return a=h.tangent(t,n,Ve,Ue),$(g).controlOut(h.firstControlPoint(a,t,n,Ve,Ue)),g.push(new Q.Segment(n,h.secondControlPoint(a,t,n,Ve,Ue))),g;for(d?(t=f[p-1],n=f[0],i=f[1],o=h.controlPoints(t,n,i),r=o[1],s=o[0]):(a=h.tangent(t,n,Ve,Ue),r=h.firstControlPoint(a,t,n,Ve,Ue)),l=r,c=0;p-3>=c;c++)h.removeDuplicates(c,f),p=f.length,p>=c+3&&(t=f[c],n=f[c+1],i=f[c+2],o=h.controlPoints(t,n,i),$(g).controlOut(l),l=o[1],u=o[0],g.push(new Q.Segment(n,u)));return d?(t=f[p-2],n=f[p-1],i=f[0],o=h.controlPoints(t,n,i),$(g).controlOut(l),g.push(new Q.Segment(n,o[0])),$(g).controlOut(o[1]),g.push(new Q.Segment(i,s))):(a=h.tangent(n,i,Ve,Ue),$(g).controlOut(l),g.push(new Q.Segment(i,h.secondControlPoint(a,n,i,Ve,Ue)))),g},removeDuplicates:function(e,t){for(;t[e].equals(t[e+1])||t[e+1].equals(t[e+2]);)t.splice(e+1,1)},invertAxis:function(e,t,n){var i,o,r=this,s=!1;return e.x===t.x?s=!0:t.x===n.x?(n.y>t.y&&t.y>=e.y||t.y>n.y&&e.y>=t.y)&&(s=!0):(i=r.lineFunction(e,t),o=r.calculateFunction(i,n.x),t.y>=e.y&&o>=n.y||e.y>=t.y&&n.y>=o||(s=!0)),s},isLine:function(e,t,n){var i=this,o=i.lineFunction(e,t),r=i.calculateFunction(o,n.x);return e.x==t.x&&t.x==n.x||h(r,1)===h(n.y,1)},lineFunction:function(e,t){var n=(t.y-e.y)/(t.x-e.x),i=e.y-n*e.x;return[i,n]},controlPoints:function(e,t,n){var i,o,r,s,a,l,c=this,u=Ve,h=Ue,d=!1,f=!1,p=c.EXTREMUM_ALLOWED_DEVIATION;return c.isLine(e,t,n)?i=c.tangent(e,t,Ve,Ue):(o={x:c.isMonotonicByField(e,t,n,Ve),y:c.isMonotonicByField(e,t,n,Ue)},o.x&&o.y?(i=c.tangent(e,n,Ve,Ue),d=!0):(c.invertAxis(e,t,n)&&(u=Ue,h=Ve),o[u]?i=0:(a=e[h]>n[h]&&t[h]>=e[h]||n[h]>e[h]&&e[h]>=t[h]?c.sign((n[h]-e[h])*(t[u]-e[u])):-c.sign((n[u]-e[u])*(t[h]-e[h])),i=p*a,f=!0))),s=c.secondControlPoint(i,e,t,u,h),f&&(l=u,u=h,h=l),r=c.firstControlPoint(i,t,n,u,h),d&&(c.restrictControlPoint(e,t,s,i),c.restrictControlPoint(t,n,r,i)),[s,r]},sign:function(e){return 0>=e?-1:1},restrictControlPoint:function(e,t,n,i){t.y>e.y?n.y>t.y?(n.x=e.x+(t.y-e.y)/i,n.y=t.y):e.y>n.y&&(n.x=t.x-(t.y-e.y)/i,n.y=e.y):t.y>n.y?(n.x=e.x-(e.y-t.y)/i,n.y=t.y):n.y>e.y&&(n.x=t.x+(e.y-t.y)/i,n.y=e.y)},tangent:function(e,t,n,i){var o,r=t[n]-e[n],s=t[i]-e[i];return o=0===r?0:s/r},isMonotonicByField:function(e,t,n,i){return n[i]>t[i]&&t[i]>e[i]||t[i]>n[i]&&e[i]>t[i]},firstControlPoint:function(e,t,n,i,o){var r=this,s=t[i],a=n[i],l=(a-s)*r.WEIGHT;return r.point(s+l,t[o]+l*e,i,o)},secondControlPoint:function(e,t,n,i,o){var r=this,s=t[i],a=n[i],l=(a-s)*r.WEIGHT;return r.point(a-l,n[o]-l*e,i,o)},point:function(e,t,n,i){var o=new X.Point;return o[n]=e,o[i]=t,o},calculateFunction:function(e,t){var n,i=0,o=e.length;for(n=0;o>n;n++)i+=Math.pow(t,n)*e[n];return i}},w._element=document.createElement("span"),se(W.dataviz,{AXIS_LABEL_CLICK:ae,COORD_PRECISION:he,DEFAULT_PRECISION:_e,DEFAULT_WIDTH:we,DEFAULT_HEIGHT:me,DEFAULT_FONT:ge,INITIAL_ANIMATION_DURATION:Se,NOTE_CLICK:Ie,NOTE_HOVER:Re,CLIP:de,Axis:z,AxisLabel:F,Box2D:C,BoxElement:E,ChartElement:A,CurveProcessor:U,ExportMixin:V,FloatElement:I,LogarithmicAxis:H,Note:L,NumericAxis:N,Point2D:je,Ring:S,RootElement:M,Sector:T,ShapeBuilder:D,ShapeElement:O,Text:P,TextBox:R,Title:B,alignPathToPixel:b,autoFormat:m,autoMajorUnit:r,boxDiff:a,dateComparer:_,decodeEntities:w,getSpacing:n,inArray:l,interpolateValue:p,mwDelta:y,rectToBox:k,rotatePoint:s,round:h,ceil:c,floor:u})}(window.kendo.jQuery)}(),function(){!function(e){function t(t,n){return e.map(t,function(e,t){return[[e,n[t]]]})}var n=window.kendo,i=n.dataviz.ui,o=n.deepExtend,r=1.5,s=.4,a="#000",l="Arial,Helvetica,sans-serif",c="11px "+l,u="12px "+l,h="16px "+l,d="#fff",f={title:{font:h},legend:{labels:{font:u}},seriesDefaults:{visible:!0,labels:{font:c},donut:{margin:1},line:{width:2},vericalLine:{width:2},scatterLine:{width:1},area:{opacity:.4,markers:{visible:!1,size:6},highlight:{markers:{border:{color:"#fff",opacity:1,width:1}}},line:{opacity:1,width:0}},verticalArea:{opacity:.4,markers:{visible:!1,size:6},line:{opacity:1,width:0}},radarLine:{width:2,markers:{visible:!1}},radarArea:{opacity:.5,markers:{visible:!1,size:6},line:{opacity:1,width:0}},candlestick:{line:{width:1,color:a},border:{width:1,_brightness:.8},gap:1,spacing:.3,downColor:d,highlight:{line:{width:2},border:{width:2,opacity:1}}},ohlc:{line:{width:1},gap:1,spacing:.3,highlight:{line:{width:3,opacity:1}}},bubble:{opacity:.6,border:{width:0},labels:{background:"transparent"}},bar:{gap:r,spacing:s},column:{gap:r,spacing:s},rangeColumn:{gap:r,spacing:s},rangeBar:{gap:r,spacing:s},waterfall:{gap:.5,spacing:s,line:{width:1,color:a}},horizontalWaterfall:{gap:.5,spacing:s,line:{width:1,color:a}},bullet:{gap:r,spacing:s,target:{color:"#ff0000"}},verticalBullet:{gap:r,spacing:s,target:{color:"#ff0000"}},boxPlot:{outliersField:"",meanField:"",whiskers:{width:1,color:a},mean:{width:1,color:a},median:{width:1,color:a},border:{width:1,_brightness:.8},gap:1,spacing:.3,downColor:d,highlight:{whiskers:{width:2},border:{width:2,opacity:1}}},funnel:{labels:{color:"",background:""}},notes:{icon:{border:{width:1}},label:{padding:3,font:u},line:{length:10,width:1},visible:!0}},categoryAxis:{majorGridLines:{visible:!0}},axisDefaults:{labels:{font:u},title:{font:h,margin:5},crosshair:{tooltip:{font:u}},notes:{icon:{size:7,border:{width:1}},label:{padding:3,font:u},line:{length:10,width:1},visible:!0}},tooltip:{font:u},navigator:{pane:{height:90,margin:{top:10}}}},p={scale:{labels:{font:u}}},g={shapeDefaults:{hover:{opacity:.2},stroke:{width:0}},editable:{resize:{handles:{width:7,height:7}}},selectable:{stroke:{width:1,dashType:"dot"}},connectionDefaults:{stroke:{width:2},selection:{handles:{width:8,height:8}},editable:{tools:["edit","delete"]}}},m=i.themes,v=i.registerTheme=function(e,t){var n,i={};i.chart=o({},f,t.chart),i.gauge=o({},p,t.gauge),i.diagram=o({},g,t.diagram),i.treeMap=o({},t.treeMap),n=i.chart.seriesDefaults,n.verticalLine=o({},n.line),n.verticalArea=o({},n.area),n.polarArea=o({},n.radarArea),n.polarLine=o({},n.radarLine),m[e]=i};v("black",{chart:{title:{color:d},legend:{labels:{color:d},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:d},errorBars:{color:d},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:d},line:{color:"#8e8e8e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#3d3d3d"}},scatter:{markers:{background:"#3d3d3d"}},scatterLine:{markers:{background:"#3d3d3d"}},waterfall:{line:{color:"#8e8e8e"}},horizontalWaterfall:{line:{color:"#8e8e8e"}},candlestick:{downColor:"#555",line:{color:d},border:{_brightness:1.5,opacity:1},highlight:{border:{color:d,opacity:.2}}},ohlc:{line:{color:d}}},chartArea:{background:"#3d3d3d"},seriesColors:["#0081da","#3aafff","#99c900","#ffeb3d","#b20753","#ff4195"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:d},majorGridLines:{color:"#545454"},minorGridLines:{color:"#454545"},title:{color:d},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:d},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#0070e4"},scale:{rangePlaceholderColor:"#1d1d1d",labels:{color:d},minorTicks:{color:d},majorTicks:{color:d},line:{color:d}}},diagram:{shapeDefaults:{fill:{color:"#0066cc"},connectorDefaults:{fill:{color:d},stroke:{color:"#384049"},hover:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#3d3d3d"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:d}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:d}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0081da","#314b5c"],["#3aafff","#3c5464"],["#99c900","#4f5931"],["#ffeb3d","#64603d"],["#b20753","#543241"],["#ff4195","#643e4f"]]}}),v("blueopal",{chart:{title:{color:"#293135"},legend:{labels:{color:"#293135"},inactiveItems:{labels:{color:"#27A5BA"},markers:{color:"#27A5BA"}}},seriesDefaults:{labels:{color:a,background:d,opacity:.5},errorBars:{color:"#293135"},candlestick:{downColor:"#c4d0d5",line:{color:"#9aabb2"}},waterfall:{line:{color:"#9aabb2"}},horizontalWaterfall:{line:{color:"#9aabb2"}},notes:{icon:{background:"transparent",border:{color:"#9aabb2"}},label:{color:"#293135"},line:{color:"#9aabb2"}}},seriesColors:["#0069a5","#0098ee","#7bd2f6","#ffb800","#ff8517","#e34a00"],axisDefaults:{line:{color:"#9aabb2"},labels:{color:"#293135"},majorGridLines:{color:"#c4d0d5"},minorGridLines:{color:"#edf1f2"},title:{color:"#293135"},crosshair:{color:"#9aabb2"},notes:{icon:{background:"transparent",border:{color:"#9aabb2"}},label:{color:"#293135"},line:{color:"#9aabb2"}}}},gauge:{pointer:{color:"#005c83"},scale:{rangePlaceholderColor:"#daecf4",labels:{color:"#293135"},minorTicks:{color:"#293135"},majorTicks:{color:"#293135"},line:{color:"#293135"}}},diagram:{shapeDefaults:{fill:{color:"#7ec6e3"},connectorDefaults:{fill:{color:"#003f59"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#003f59"}}},content:{color:"#293135"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#003f59"},hover:{fill:{color:"#003f59"},stroke:{color:"#003f59"}}}},rotate:{thumb:{stroke:{color:"#003f59"},fill:{color:"#003f59"}}}},selectable:{stroke:{color:"#003f59"}},connectionDefaults:{stroke:{color:"#003f59"},content:{color:"#293135"},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0069a5","#bad7e7"],["#0098ee","#b9e0f5"],["#7bd2f6","#ceeaf6"],["#ffb800","#e6e3c4"],["#ff8517","#e4d8c8"],["#e34a00","#ddccc2"]]}}),v("highcontrast",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#66465B"},markers:{color:"#66465B"}}},seriesDefaults:{labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#ffffff"}},label:{color:"#ffffff"},line:{color:"#ffffff"}},pie:{overlay:{gradient:"sharpGlass"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#2c232b"}},scatter:{markers:{background:"#2c232b"}},scatterLine:{markers:{background:"#2c232b"}},area:{opacity:.5},waterfall:{line:{color:"#ffffff"}},horizontalWaterfall:{line:{color:"#ffffff"}},candlestick:{downColor:"#664e62",line:{color:"#ffffff"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#ffffff",opacity:1}}},ohlc:{line:{color:"#ffffff"}}},chartArea:{background:"#2c232b"},seriesColors:["#a7008f","#ffb800","#3aafff","#99c900","#b20753","#ff4195"],axisDefaults:{line:{color:"#ffffff"},labels:{color:"#ffffff"},majorGridLines:{color:"#664e62"},minorGridLines:{color:"#4f394b"},title:{color:"#ffffff"},crosshair:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#ffffff"}},label:{color:"#ffffff"},line:{color:"#ffffff"}}}},gauge:{pointer:{color:"#a7008f"},scale:{rangePlaceholderColor:"#2c232b",labels:{color:"#ffffff"},minorTicks:{color:"#2c232b"},majorTicks:{color:"#664e62"},line:{color:"#ffffff"}}},diagram:{shapeDefaults:{fill:{color:"#a7018f"},connectorDefaults:{fill:{color:d},stroke:{color:"#2c232b"},hover:{fill:{color:"#2c232b"},stroke:{color:d}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#2c232b"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:d}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:d}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#2c232b"},stroke:{color:d}}}}},treeMap:{colors:[["#a7008f","#451c3f"],["#ffb800","#564122"],["#3aafff","#2f3f55"],["#99c900","#424422"],["#b20753","#471d33"],["#ff4195","#562940"]]}}),v("default",{chart:{title:{color:"#8e8e8e"},legend:{labels:{color:"#232323"},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:a,background:d,opacity:.5},errorBars:{color:"#232323"},candlestick:{downColor:"#dedede",line:{color:"#8d8d8d"}},waterfall:{line:{color:"#8e8e8e"}},horizontalWaterfall:{line:{color:"#8e8e8e"}},notes:{icon:{background:"transparent",border:{color:"#8e8e8e"}},label:{color:"#232323"},line:{color:"#8e8e8e"}}},seriesColors:["#ff6800","#a0a700","#ff8d00","#678900","#ffb53c","#396000"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:"#232323"},minorGridLines:{color:"#f0f0f0"},majorGridLines:{color:"#dfdfdf"},title:{color:"#232323"},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"transparent",border:{color:"#8e8e8e"}},label:{color:"#232323"},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#ea7001"},scale:{rangePlaceholderColor:"#dedede",labels:{color:"#2e2e2e"},minorTicks:{color:"#2e2e2e"},majorTicks:{color:"#2e2e2e"},line:{color:"#2e2e2e"}}},diagram:{shapeDefaults:{fill:{color:"#e15613"},connectorDefaults:{fill:{color:"#282828"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#282828"}}},content:{color:"#2e2e2e"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#282828"},hover:{fill:{color:"#282828"},stroke:{color:"#282828"}}}},rotate:{thumb:{stroke:{color:"#282828"},fill:{color:"#282828"}}}},selectable:{stroke:{color:"#a7018f"}},connectionDefaults:{stroke:{color:"#282828"},content:{color:"#2e2e2e"},selection:{handles:{fill:{color:d},stroke:{color:"#282828"}}}}},treeMap:{colors:[["#ff6800","#edcfba"],["#a0a700","#dadcba"],["#ff8d00","#edd7ba"],["#678900","#cfd6ba"],["#ffb53c","#eddfc6"],["#396000","#c6ceba"]]}}),v("silver",{chart:{title:{color:"#4e5968"},legend:{labels:{color:"#4e5968"},inactiveItems:{labels:{color:"#B1BCC8"},markers:{color:"#B1BCC8"}}},seriesDefaults:{labels:{color:"#293135",background:"#eaeaec",opacity:.5},errorBars:{color:"#4e5968"},notes:{icon:{background:"transparent",border:{color:"#4e5968"}},label:{color:"#4e5968"},line:{color:"#4e5968"}},line:{markers:{background:"#eaeaec"}},scatter:{markers:{background:"#eaeaec"}},scatterLine:{markers:{background:"#eaeaec"}},pie:{connectors:{color:"#A6B1C0"}},donut:{connectors:{color:"#A6B1C0"}},waterfall:{line:{color:"#a6b1c0"}},horizontalWaterfall:{line:{color:"#a6b1c0"}},candlestick:{downColor:"#a6afbe"}},chartArea:{background:"#eaeaec"},seriesColors:["#007bc3","#76b800","#ffae00","#ef4c00","#a419b7","#430B62"],axisDefaults:{line:{color:"#a6b1c0"},labels:{color:"#4e5968"},majorGridLines:{color:"#dcdcdf"},minorGridLines:{color:"#eeeeef"},title:{color:"#4e5968"},crosshair:{color:"#a6b1c0"},notes:{icon:{background:"transparent",border:{color:"#4e5968"}},label:{color:"#4e5968"},line:{color:"#4e5968"}}}},gauge:{pointer:{color:"#0879c0"},scale:{rangePlaceholderColor:"#f3f3f4",labels:{color:"#515967"},minorTicks:{color:"#515967"},majorTicks:{color:"#515967"},line:{color:"#515967"}}},diagram:{shapeDefaults:{fill:{color:"#1c82c2"},connectorDefaults:{fill:{color:"#515967"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#282828"}}},content:{color:"#515967"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#515967"},hover:{fill:{color:"#515967"},stroke:{color:"#515967"}}}},rotate:{thumb:{stroke:{color:"#515967"},fill:{color:"#515967"}}}},selectable:{stroke:{color:"#515967"}},connectionDefaults:{stroke:{color:"#515967"},content:{color:"#515967"},selection:{handles:{fill:{color:d},stroke:{color:"#515967"}}}}},treeMap:{colors:[["#007bc3","#c2dbea"],["#76b800","#dae7c3"],["#ffae00","#f5e5c3"],["#ef4c00","#f2d2c3"],["#a419b7","#e3c7e8"],["#430b62","#d0c5d7"]]}}),v("metro",{chart:{title:{color:"#777777"},legend:{labels:{color:"#777777"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:a},errorBars:{color:"#777777"},notes:{icon:{background:"transparent",border:{color:"#777777"}},label:{color:"#777777"},line:{color:"#777777"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},waterfall:{line:{color:"#c7c7c7"}},horizontalWaterfall:{line:{color:"#c7c7c7"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#8ebc00","#309b46","#25a0da","#ff6900","#e61e26","#d8e404","#16aba9","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#c7c7c7"},labels:{color:"#777777"},minorGridLines:{color:"#c7c7c7"},majorGridLines:{color:"#c7c7c7"},title:{color:"#777777"},crosshair:{color:"#c7c7c7"},notes:{icon:{background:"transparent",border:{color:"#777777"}},label:{color:"#777777"},line:{color:"#777777"}}}},gauge:{pointer:{color:"#8ebc00"},scale:{rangePlaceholderColor:"#e6e6e6",labels:{color:"#777"},minorTicks:{color:"#777"},majorTicks:{color:"#777"},line:{color:"#777"}}},diagram:{shapeDefaults:{fill:{color:"#8ebc00"},connectorDefaults:{fill:{color:a},stroke:{color:d},hover:{fill:{color:d},stroke:{color:a}}},content:{color:"#777"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:"#787878"},fill:{color:"#787878"}}}},selectable:{stroke:{color:"#515967"}},connectionDefaults:{stroke:{color:"#787878"},content:{color:"#777"},selection:{handles:{fill:{color:d},stroke:{color:"#787878"}}}}},treeMap:{colors:[["#8ebc00","#e8f2cc"],["#309b46","#d6ebda"],["#25a0da","#d3ecf8"],["#ff6900","#ffe1cc"],["#e61e26","#fad2d4"],["#d8e404","#f7facd"],["#16aba9","#d0eeee"],["#7e51a1","#e5dcec"],["#313131","#d6d6d6"],["#ed1691","#fbd0e9"]]}}),v("metroblack",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#797979"},markers:{color:"#797979"}}},seriesDefaults:{border:{_brightness:1},labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#cecece"}},label:{color:"#ffffff"},line:{color:"#cecece"}},line:{markers:{background:"#0e0e0e"}},bubble:{opacity:.6},scatter:{markers:{background:"#0e0e0e"}},scatterLine:{markers:{background:"#0e0e0e"}},candlestick:{downColor:"#828282",line:{color:"#ffffff"}},waterfall:{line:{color:"#cecece"}},horizontalWaterfall:{line:{color:"#cecece"}},overlay:{gradient:"none"}},chartArea:{background:"#0e0e0e"},seriesColors:["#00aba9","#309b46","#8ebc00","#ff6900","#e61e26","#d8e404","#25a0da","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#cecece"},labels:{color:"#ffffff"},minorGridLines:{color:"#2d2d2d"},majorGridLines:{color:"#333333"},title:{color:"#ffffff"},crosshair:{color:"#cecece"},notes:{icon:{background:"transparent",border:{color:"#cecece"}},label:{color:"#ffffff"},line:{color:"#cecece"}}}},gauge:{pointer:{color:"#00aba9"},scale:{rangePlaceholderColor:"#2d2d2d",labels:{color:"#ffffff"},minorTicks:{color:"#333333"},majorTicks:{color:"#cecece"},line:{color:"#cecece"}}},diagram:{shapeDefaults:{fill:{color:"#00aba9"},connectorDefaults:{fill:{color:d},stroke:{color:"#0e0e0e"},hover:{fill:{color:"#0e0e0e"},stroke:{color:d}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#0e0e0e"},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:"#787878"}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#0e0e0e"},stroke:{color:d}}}}},treeMap:{colors:[["#00aba9","#0b2d2d"],["#309b46","#152a19"],["#8ebc00","#28310b"],["#ff6900","#3e200b"],["#e61e26","#391113"],["#d8e404","#36390c"],["#25a0da","#132b37"],["#7e51a1","#241b2b"],["#313131","#151515"],["#ed1691","#3b1028"]]}}),v("moonlight",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#A1A7AB"},markers:{color:"#A1A7AB"}}},seriesDefaults:{labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#8c909e"}},label:{color:"#ffffff"},line:{color:"#8c909e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#212a33"}},bubble:{opacity:.6},scatter:{markers:{background:"#212a33"}},scatterLine:{markers:{background:"#212a33"}},area:{opacity:.3},candlestick:{downColor:"#757d87",line:{color:"#ea9d06"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:d,opacity:.2}}},waterfall:{line:{color:"#8c909e"}},horizontalWaterfall:{line:{color:"#8c909e"}},ohlc:{line:{color:"#ea9d06"}}},chartArea:{background:"#212a33"},seriesColors:["#ffca08","#ff710f","#ed2e24","#ff9f03","#e13c02","#a00201"],axisDefaults:{line:{color:"#8c909e"},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},labels:{color:"#ffffff"},majorGridLines:{color:"#3e424d"},minorGridLines:{color:"#2f3640"},title:{color:"#ffffff"},crosshair:{color:"#8c909e"},notes:{icon:{background:"transparent",border:{color:"#8c909e"}},label:{color:"#ffffff"},line:{color:"#8c909e"}}}},gauge:{pointer:{color:"#f4af03"},scale:{rangePlaceholderColor:"#2f3640",labels:{color:d},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},line:{color:"#8c909e"}}},diagram:{shapeDefaults:{fill:{color:"#f3ae03"},connectorDefaults:{fill:{color:d},stroke:{color:"#414550"},hover:{fill:{color:"#414550"},stroke:{color:d}}},content:{color:d}},editable:{resize:{handles:{fill:{color:"#414550"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:d}}}},rotate:{thumb:{stroke:{color:d},fill:{color:d}}}},selectable:{stroke:{color:d}},connectionDefaults:{stroke:{color:d},content:{color:d},selection:{handles:{fill:{color:"#414550"},stroke:{color:d}}}}},treeMap:{colors:[["#ffca08","#4e4b2b"],["#ff710f","#4e392d"],["#ed2e24","#4b2c31"],["#ff9f03","#4e422a"],["#e13c02","#482e2a"],["#a00201","#3b232a"]]}}),v("uniform",{chart:{title:{color:"#686868"},legend:{labels:{color:"#686868"},inactiveItems:{labels:{color:"#B6B6B6"},markers:{color:"#B6B6B6"}}},seriesDefaults:{labels:{color:"#686868"},errorBars:{color:"#686868"},notes:{icon:{background:"transparent",border:{color:"#9e9e9e"}},label:{color:"#686868"},line:{color:"#9e9e9e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.3},candlestick:{downColor:"#cccccc",line:{color:"#cccccc"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#cccccc",opacity:.2}}},waterfall:{line:{color:"#9e9e9e"}},horizontalWaterfall:{line:{color:"#9e9e9e"}},ohlc:{line:{color:"#cccccc"}}},chartArea:{background:"#ffffff"},seriesColors:["#527aa3","#6f91b3","#8ca7c2","#a8bdd1","#c5d3e0","#e2e9f0"],axisDefaults:{line:{color:"#9e9e9e"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},labels:{color:"#686868"},majorGridLines:{color:"#dadada"},minorGridLines:{color:"#e7e7e7"},title:{color:"#686868"},crosshair:{color:"#9e9e9e"},notes:{icon:{background:"transparent",border:{color:"#9e9e9e"}},label:{color:"#686868"},line:{color:"#9e9e9e"}}}},gauge:{pointer:{color:"#527aa3"},scale:{rangePlaceholderColor:"#e7e7e7",labels:{color:"#686868"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},line:{color:"#9e9e9e"}}},diagram:{shapeDefaults:{fill:{color:"#d1d1d1"},connectorDefaults:{fill:{color:"#686868"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#686868"}}},content:{color:"#686868"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#686868"},hover:{fill:{color:"#686868"},stroke:{color:"#686868"}}}},rotate:{thumb:{stroke:{color:"#686868"},fill:{color:"#686868"}}}},selectable:{stroke:{color:"#686868"}},connectionDefaults:{stroke:{color:"#686868"},content:{color:"#686868"},selection:{handles:{fill:{color:d},stroke:{color:"#686868"}}}}},treeMap:{colors:[["#527aa3","#d0d8e1"],["#6f91b3","#d6dde4"],["#8ca7c2","#dce1e7"],["#a8bdd1","#e2e6ea"],["#c5d3e0","#e7eaed"],["#e2e9f0","#edeff0"]]}}),v("bootstrap",{chart:{title:{color:"#333333"},legend:{labels:{color:"#333333"},inactiveItems:{labels:{color:"#999999"},markers:{color:"#9A9A9A"}}},seriesDefaults:{labels:{color:"#333333"},overlay:{gradient:"none"},errorBars:{color:"#343434"},notes:{icon:{background:"#000000",border:{color:"#000000"}},label:{color:"#333333"},line:{color:"#000000"}},pie:{overlay:{gradient:"none"}},donut:{overlay:{gradient:"none"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"
|
|
}},area:{opacity:.8},candlestick:{downColor:"#d0d0d0",line:{color:"#333333"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#b8b8b8",opacity:.2}}},waterfall:{line:{color:"#cccccc"}},horizontalWaterfall:{line:{color:"#cccccc"}},ohlc:{line:{color:"#333333"}}},chartArea:{background:"#ffffff"},seriesColors:["#428bca","#5bc0de","#5cb85c","#f2b661","#e67d4a","#da3b36"],axisDefaults:{line:{color:"#cccccc"},minorTicks:{color:"#ebebeb"},majorTicks:{color:"#cccccc"},labels:{color:"#333333"},majorGridLines:{color:"#cccccc"},minorGridLines:{color:"#ebebeb"},title:{color:"#333333"},crosshair:{color:"#000000"},notes:{icon:{background:"#000000",border:{color:"#000000"}},label:{color:"#ffffff"},line:{color:"#000000"}}}},gauge:{pointer:{color:"#428bca"},scale:{rangePlaceholderColor:"#cccccc",labels:{color:"#333333"},minorTicks:{color:"#ebebeb"},majorTicks:{color:"#cccccc"},line:{color:"#cccccc"}}},diagram:{shapeDefaults:{fill:{color:"#428bca"},connectorDefaults:{fill:{color:"#333333"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#333333"}}},content:{color:"#333333"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#333333"},hover:{fill:{color:"#333333"},stroke:{color:"#333333"}}}},rotate:{thumb:{stroke:{color:"#333333"},fill:{color:"#333333"}}}},selectable:{stroke:{color:"#333333"}},connectionDefaults:{stroke:{color:"#c4c4c4"},content:{color:"#333333"},selection:{handles:{fill:{color:d},stroke:{color:"#333333"}},stroke:{color:"#333333"}}}},treeMap:{colors:[["#428bca","#d1e0ec"],["#5bc0de","#d6eaf0"],["#5cb85c","#d6e9d6"],["#5cb85c","#f4e8d7"],["#e67d4a","#f2ddd3"],["#da3b36","#f0d0cf"]]}}),v("flat",{chart:{title:{color:"#4c5356"},legend:{labels:{color:"#4c5356"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#4c5356"},errorBars:{color:"#4c5356"},notes:{icon:{background:"transparent",border:{color:"#cdcdcd"}},label:{color:"#4c5356"},line:{color:"#cdcdcd"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#cdcdcd"}},horizontalWaterfall:{line:{color:"#cdcdcd"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#10c4b2","#ff7663","#ffb74f","#a2df53","#1c9ec4","#ff63a5","#1cc47b"],axisDefaults:{line:{color:"#cdcdcd"},labels:{color:"#4c5356"},minorGridLines:{color:"#cdcdcd"},majorGridLines:{color:"#cdcdcd"},title:{color:"#4c5356"},crosshair:{color:"#cdcdcd"},notes:{icon:{background:"transparent",border:{color:"#cdcdcd"}},label:{color:"#4c5356"},line:{color:"#cdcdcd"}}}},gauge:{pointer:{color:"#10c4b2"},scale:{rangePlaceholderColor:"#cdcdcd",labels:{color:"#4c5356"},minorTicks:{color:"#4c5356"},majorTicks:{color:"#4c5356"},line:{color:"#4c5356"}}},diagram:{shapeDefaults:{fill:{color:"#10c4b2"},connectorDefaults:{fill:{color:"#363940"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#363940"}}},content:{color:"#4c5356"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#363940"},hover:{fill:{color:"#363940"},stroke:{color:"#363940"}}}},rotate:{thumb:{stroke:{color:"#363940"},fill:{color:"#363940"}}}},selectable:{stroke:{color:"#363940"}},connectionDefaults:{stroke:{color:"#cdcdcd"},content:{color:"#4c5356"},selection:{handles:{fill:{color:d},stroke:{color:"#363940"}},stroke:{color:"#363940"}}}},treeMap:{colors:[["#10c4b2","#cff3f0"],["#ff7663","#ffe4e0"],["#ffb74f","#fff1dc"],["#a2df53","#ecf9dd"],["#1c9ec4","#d2ecf3"],["#ff63a5","#ffe0ed"],["#1cc47b","#d2f3e5"]]}}),v("material",{chart:{title:{color:"#444444"},legend:{labels:{color:"#444444"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#444444"},errorBars:{color:"#444444"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#444444"},line:{color:"#e5e5e5"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#e5e5e5"}},horizontalWaterfall:{line:{color:"#e5e5e5"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#ff9800","#ff5722"],axisDefaults:{line:{color:"#e5e5e5"},labels:{color:"#444444"},minorGridLines:{color:"#e5e5e5"},majorGridLines:{color:"#e5e5e5"},title:{color:"#444444"},crosshair:{color:"#7f7f7f"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#444444"},line:{color:"#e5e5e5"}}}},gauge:{pointer:{color:"#3f51b5"},scale:{rangePlaceholderColor:"#e5e5e5",labels:{color:"#444444"},minorTicks:{color:"#444444"},majorTicks:{color:"#444444"},line:{color:"#444444"}}},diagram:{shapeDefaults:{fill:{color:"#3f51b5"},connectorDefaults:{fill:{color:"#7f7f7f"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#7f7f7f"}}},content:{color:"#444444"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#444444"},hover:{fill:{color:"#444444"},stroke:{color:"#444444"}}}},rotate:{thumb:{stroke:{color:"#444444"},fill:{color:"#444444"}}}},selectable:{stroke:{color:"#444444"}},connectionDefaults:{stroke:{color:"#7f7f7f"},content:{color:"#444444"},selection:{handles:{fill:{color:d},stroke:{color:"#444444"}},stroke:{color:"#444444"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),v("materialblack",{chart:{title:{color:"#fff"},legend:{labels:{color:"#fff"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#fff"},errorBars:{color:"#fff"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#fff"},line:{color:"#e5e5e5"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#4d4d4d"}},horizontalWaterfall:{line:{color:"#4d4d4d"}},overlay:{gradient:"none"},border:{_brightness:1}},chartArea:{background:"#1c1c1c"},seriesColors:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#ff9800","#ff5722"],axisDefaults:{line:{color:"#4d4d4d"},labels:{color:"#fff"},minorGridLines:{color:"#4d4d4d"},majorGridLines:{color:"#4d4d4d"},title:{color:"#fff"},crosshair:{color:"#7f7f7f"},notes:{icon:{background:"transparent",border:{color:"#4d4d4d"}},label:{color:"#fff"},line:{color:"#4d4d4d"}}}},gauge:{pointer:{color:"#3f51b5"},scale:{rangePlaceholderColor:"#4d4d4d",labels:{color:"#fff"},minorTicks:{color:"#fff"},majorTicks:{color:"#fff"},line:{color:"#fff"}}},diagram:{shapeDefaults:{fill:{color:"#3f51b5"},connectorDefaults:{fill:{color:"#7f7f7f"},stroke:{color:d},hover:{fill:{color:d},stroke:{color:"#7f7f7f"}}},content:{color:"#fff"}},editable:{resize:{handles:{fill:{color:d},stroke:{color:"#fff"},hover:{fill:{color:"#fff"},stroke:{color:"#fff"}}}},rotate:{thumb:{stroke:{color:"#fff"},fill:{color:"#fff"}}}},selectable:{stroke:{color:"#fff"}},connectionDefaults:{stroke:{color:"#7f7f7f"},content:{color:"#fff"},selection:{handles:{fill:{color:d},stroke:{color:"#fff"}},stroke:{color:"#fff"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),function(){function e(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var n="#333333",i="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#dddddd",a=["#008fd3","#99d101","#f39b02","#f05662","#c03c53","#acacac"],l=["#cbe8f5","#eaf5cb","#fceacc","#fbdcdf","#f2d7dc","#eeeeee"],c=a[0],u=d;v("fiori",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:e(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(a,l)}})}(),function(){function e(){return{icon:{background:"#00b0ff",border:{color:"#00b0ff"}},label:{color:"#ffffff"},line:{color:r}}}var n="#4e4e4e",i="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#e5e5e5",a=["#0072c6","#5db2ff","#008a17","#82ba00","#ff8f32","#ac193d"],l=["#cbe2f3","#deeffe","#cbe7d0","#e5f0cb","#fee8d5","#eed0d7"],c=a[0],u=d;v("office365",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:e(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(a,l)}})}(),function(){function e(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var n="#32364c",i="#7f7f7f",o="#bdbdbd",r="#dfe0e1",s="#dfe0e1",a=["#ff4350","#ff9ea5","#00acc1","#80deea","#ffbf46","#ffd78c"],l=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],c=a[0],u=d;v("nova",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:e(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:n},notes:e()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(a,l)}})}()}(window.kendo.jQuery)}(),function(){!function(e,t){function n(){return this}function i(){this._defaults={}}function o(e,t,n,i){var o,r,s=(i.x-n.x)*(e.y-n.y)-(i.y-n.y)*(e.x-n.x),a=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y);return 0!==a&&(r=s/a,o=new Qt(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y))),o}function r(e,t){var n,i,o,r=e.series,a=r.length,l=e.seriesDefaults,c=Ft({},e.seriesDefaults),u=t?Ft({},t.seriesDefaults):{},h=Ft({},u);for(s(c),s(h),n=0;a>n;n++)i=r[n].type||e.seriesDefaults.type,o=Ft({data:[]},h,u[i],{tooltip:e.tooltip},c,l[i]),r[n]._defaults=o,r[n]=Ft({},o,r[n])}function s(e){delete e.bar,delete e.column,delete e.rangeColumn,delete e.line,delete e.verticalLine,delete e.pie,delete e.donut,delete e.area,delete e.verticalArea,delete e.scatter,delete e.scatterLine,delete e.bubble,delete e.candlestick,delete e.ohlc,delete e.boxPlot,delete e.bullet,delete e.verticalBullet,delete e.polarArea,delete e.polarLine,delete e.radarArea,delete e.radarLine,delete e.waterfall}function a(e){var t,n,i,o,r=e.series,s=e.seriesColors||[];for(t=0;r.length>t;t++)n=r[t],i=s[t%s.length],n.color=n.color||i,o=n._defaults,o&&(o.color=o.color||i)}function l(e){var t;xt([Un,$o,er,tr],function(){t=this+"Axes",e[t]&&(e[this+"Axis"]=e[t],delete e[t])})}function c(t,n){var i=(n||{}).axisDefaults||{};xt([Un,$o,er,tr],function(){var n=this+"Axis",o=[].concat(t[n]),r=t.axisDefaults||{};o=e.map(o,function(e){var t=(e||{}).color,o=Ft({},i,i[n],r,r[n],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete o[n],o}),t[n]=o.length>1?o:o[0]})}function u(e){var t,n=e.length,i=0;for(t=0;n>t;t++)i=Tt.max(i,e[t].data.length);return i}function h(e){return e*e}function d(e,t){if(null===t)return t;var n=zt(e,!0);return n(t)}function f(e,t){if(null===t)return t;var n="_date_"+e,i=t[n];return i||(i=p(zt(e,!0)(t)),t[n]=i),i}function p(e){var t,n;if(e instanceof Date)t=e;else if(typeof e===Eo)t=Et.parseDate(e)||new Date(e);else if(e)if(kt(e))for(t=[],n=0;e.length>n;n++)t.push(p(e[n]));else t=new Date(e);return t}function g(e){return kt(e)?St(e,g):e?p(e).getTime():t}function m(e,t,n,i){var o,r=e;return e&&(e=p(e),o=e.getHours(),n===nr?(r=new Date(e.getFullYear()+t,0,1),Et.date.adjustDST(r,0)):n===Gi?(r=new Date(e.getFullYear(),e.getMonth()+t,1),Et.date.adjustDST(r,o)):n===Zo?(r=m(v(e,i),7*t,ni),Et.date.adjustDST(r,o)):n===ni?(r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),Et.date.adjustDST(r,o)):n===Ti?(r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+t),t>0&&T(e,r)&&(r=m(e,t+1,n,i))):n===ji?(r=new Date(e.getTime()+t*Ro),r.getSeconds()>0&&r.setSeconds(0)):n===yo&&(r=new Date(e.getTime()+t*Io)),r.getMilliseconds()>0&&r.setMilliseconds(0)),r}function v(e,t){var n=e.getDay(),i=0;if(!isNaN(n))for(t=t||0;n!==t;)0===n?n=6:n--,i++;return b(e,-i*Fo)}function _(e,t,n){return e=p(e),m(e,0,t,n)}function y(e,t,n){return e=p(e),e&&_(e,t,n).getTime()===e.getTime()?e:m(e,1,t,n)}function w(e,t){var n=e.getTime()-t,i=e.getTimezoneOffset()-t.getTimezoneOffset();return n-i*Ro}function b(e,t){var n=e.getTimezoneOffset(),i=new Date(e.getTime()+t),o=i.getTimezoneOffset()-n;return new Date(i.getTime()+o*Ro)}function x(e,t,n){var i;return i=n===nr?t.getFullYear()-e.getFullYear():n===Gi?12*x(e,t,nr)+t.getMonth()-e.getMonth():Tt.floor(n===ni?w(t,e)/Fo:(t-e)/No[n])}function k(e){return 1===e.length?e[0]:e}function C(e){var t,n,i,o=e.length;if(o>0)for(n=0;o>n;n++)i=e[n].contentBox(),t?t.wrap(i):t=i.clone();return t||Ut()}function S(e,t){return e&&t?e.toLowerCase()===t.toLowerCase():e===t}function T(e,t){return e&&t?g(e)===g(t):e===t}function D(e,t){null!==t&&e.push(t)}function A(e,t){for(var n,i,o=0,r=t.length-1;r>=o;)if(n=Tt.floor((o+r)/2),i=t[n],e>i)o=n+1;else{if(!(i>e)){for(;T(t[n-1],e);)n--;return n}r=n-1}return e>=t[n]?n:n-1}function M(e){return"number"==typeof e&&!isNaN(e)}function E(e){var t,n,i=e.length,o=0;for(t=0;i>t;t++)n=e[t],M(n)&&o++;return o}function P(e){return E(e)===e.length}function I(e){var t,n,i,o={};for(t=0;e.length>t;t++)n=e[t],i=n.options.name,i&&(o[i]=n.range());return o}function R(e,t,n,i){var o,r,s,a,l,c=!1;if(n=n||{},s=n.excluded=n.excluded||[],a=n.defaults=n.defaults||{},l=n.depth=n.depth||0,!(l>Hi)){for(o in e)!cn(o,n.excluded)&&e.hasOwnProperty(o)&&(r=e[o],Lt(r)?(c=!0,i||(e[o]=xn(r(t),a[o]))):typeof r===io&&(n.defaults=a[o],n.depth++,c=R(r,t,n,i)||c,n.depth--));return c}}function B(e,n){var i,o,r,s=[],a=e.groupNameTemplate,l=n.length;if(0===l)return r=Ft({},e),r.visibleInLegend=!1,[r];for(gn(a)?(Et.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"),a&&(i=Ot(a))):(i=Ot(e.name||""),0===i._slotCount&&(i=Ot(gn(e.name)?"#= group.value #: #= series.name #":"#= group.value #"))),o=0;l>o;o++)r=Ft({},e),Lt(r.color)||(r.color=t),r._groupIx=o,s.push(r),i&&(r.name=i({series:r,group:n[o]}));return s}function F(e,t){var n,i,o=[];for(t=[].concat(t),n=0;e.length>n;n++)i=e[n],cn(i.type,t)&&o.push(i);return o}function z(t,n){if(t instanceof Date){for(var i=0,o=n.length;o>i;i++)if(T(n[i],t))return i;return-1}return e.inArray(t,n)}function L(e,t){t=t||an;for(var n=1,i=e.length;i>n;n++)if(t(e[n],e[n-1])<0){e.sort(t);break}return e}function O(e,t){var n,i=L(e,t),o=i.length,r=o>0?[i[0]]:[];for(t=t||an,n=1;o>n;n++)0!==t(i[n],mn(r))&&r.push(i[n]);return r}function N(e,t){var n=e.type,i=t instanceof Date;return!n&&i||S(n,ti)}function H(e){var t,n,i,o,r=[],s=e.length;for(t=0;s>t;t++)for(n=e[t],o=n.length,i=0;o>i;i++)r[i]=r[i]||[],r[i].push(n[i]);return r}function V(e,t){if(e.indexOf(".")>-1)for(var n,i=e.split("."),o="";i.length>1;)o+=i.shift(),n=Et.getter(o)(t)||{},Et.setter(o)(t,n),o+="."}function U(e){var t,n,i,o=e.data,r=0;for(t=0;o.length>t;t++)n=Q.current.bindPoint(e,t),i=n.valueFields.value,typeof i===Eo&&(i=parseFloat(i)),M(i)&&n.fields.visible!==!1&&(r+=Tt.abs(i));return r}function W(e){var t=e.overlay;return t&&t.gradient&&"none"!=t.gradient}function j(e){for(var t=0;e.length>t;t++)if(gn(e[t].zIndex))return!0}function G(){this._defaultPrevented=!0}function q(e,t){if(e)for(var n=0;e.length>n;n++)if(e[n].category===t)return[e[n]]}function $(e){return gn(e)&&null!==e}function Y(e){var t,n,i={};for(n=0;e.length>n;n++)t=e[n],t.axis.options.name&&(i[t.axis.options.name]={min:t.range.min,max:t.range.max});return i}function K(e,t){var n=(t||"").toLowerCase(),i="none"==n&&!(e.ctrlKey||e.shiftKey||e.altKey)||e[n+"Key"];return i}var X,Q,Z,J,ee,te,ne,ie,oe,re,se,ae,le,ce,ue,he,de,fe,pe,ge,me,ve,_e,ye,we,be,xe,ke,Ce,Se,Te,De,Ae,Me,Ee,Pe,Ie,Re,Be,Fe,ze,Le,Oe,Ne,He,Ve,Ue,We,je,Ge,qe,$e,Ye,Ke,Xe,Qe,Ze,Je,et,tt,nt,it,ot,rt,st,at,lt,ct,ut,ht,dt,ft,pt,gt,mt,vt,_t,yt,wt,bt,xt=e.each,kt=e.isArray,Ct=e.isPlainObject,St=e.map,Tt=Math,Dt=e.noop,At=e.extend,Mt=e.proxy,Et=window.kendo,Pt=Et.Class,It=Et.Observable,Rt=Et.data.DataSource,Bt=Et.ui.Widget,Ft=Et.deepExtend,zt=Et.getter,Lt=Et.isFunction,Ot=Et.template,Nt=Et.dataviz,Ht=Nt.Axis,Vt=Nt.AxisLabel,Ut=Nt.Box2D,Wt=Nt.BoxElement,jt=Nt.ChartElement,Gt=Et.drawing.Color,qt=Nt.CurveProcessor,$t=Nt.FloatElement,Yt=Nt.Note,Kt=Nt.LogarithmicAxis,Xt=Nt.NumericAxis,Qt=Nt.Point2D,Zt=Nt.RootElement,Jt=Nt.Ring,en=Nt.ShapeElement,tn=Nt.ShapeBuilder,nn=Nt.TextBox,on=Nt.Title,rn=Nt.alignPathToPixel,sn=Nt.autoFormat,an=Nt.dateComparer,ln=Nt.getSpacing,cn=Nt.inArray,un=Nt.interpolateValue,hn=Nt.mwDelta,dn=Nt.round,fn=Et.util,pn=fn.append,gn=fn.defined,mn=fn.last,vn=fn.limitValue,_n=fn.sparseArrayLimits,yn=fn.sparseArrayMin,wn=fn.sparseArrayMax,bn=fn.renderTemplate,xn=fn.valueOrDefault,kn=Nt.geometry,Cn=Nt.drawing,Sn=".kendoChart",Tn="above",Dn="area",An="auto",Mn="fit",En=Nt.AXIS_LABEL_CLICK,Pn="bar",In=6,Rn=.8,Bn="below",Fn="#000",zn="both",Ln="bottom",On="boxPlot",Nn="bubble",Hn="bullet",Vn="candlestick",Un="category",Wn="center",jn="change",Gn="circle",qn="contextmenu"+Sn,$n=Nt.CLIP,Yn="color",Kn="column",Xn=Nt.COORD_PRECISION,Qn="cross",Zn="k-",Jn="custom",ei="dataBound",ti="date",ni="days",ii=Nt.DEFAULT_FONT,oi=Nt.DEFAULT_HEIGHT,ri=Nt.DEFAULT_PRECISION,si=Nt.DEFAULT_WIDTH,ai=4,li="donut",ci=50,ui="drag",hi="dragEnd",di="dragStart",fi="errorLow",pi="errorHigh",gi="xErrorLow",mi="xErrorHigh",vi="yErrorLow",_i="yErrorHigh",yi="fadeIn",wi="first",bi="from",xi="funnel",ki="glass",Ci="horizontal",Si="horizontalWaterfall",Ti="hours",Di=Nt.INITIAL_ANIMATION_DURATION,Ai="insideBase",Mi="insideEnd",Ei="interpolate",Pi="leave",Ii="left",Ri="legendItemClick",Bi="legendItemHover",Fi="line",zi=8,Li="linear",Oi="log",Ni="max",Hi=5,Vi=Number.MAX_VALUE,Ui="min",Wi=-Number.MAX_VALUE,ji="minutes",Gi="months",qi="mouseleave"+Sn,$i="mousemove.tracking",Yi="mouseover"+Sn,Ki="mouseout"+Sn,Xi="mousemove"+Sn,Qi=20,Zi=150,Ji="DOMMouseScroll"+Sn+" mousewheel"+Sn,eo=Nt.NOTE_CLICK,to=Nt.NOTE_HOVER,no="noteText",io="object",oo="ohlc",ro="outsideEnd",so="pie",ao=70,lo="plotAreaClick",co="pointer",uo="rangeBar",ho="rangeColumn",fo="render",po="right",go="roundedBevel",mo="roundedGlass",vo="scatter",_o="scatterLine",yo="seconds",wo="selectStart",bo="select",xo="selectEnd",ko="seriesClick",Co="seriesHover",So=.001,To="step",Do="smooth",Ao="stderr",Mo="stddev",Eo="string",Po="summary",Io=1e3,Ro=60*Io,Bo=60*Ro,Fo=24*Bo,zo=7*Fo,Lo=31*Fo,Oo=365*Fo,No={years:Oo,months:Lo,weeks:zo,days:Fo,hours:Bo,minutes:Ro,seconds:Io},Ho="to",Vo="top",Uo=150,Wo=5,jo=100,Go=100,qo="chart-tooltip-inverse",$o="value",Yo="verticalArea",Ko="verticalBullet",Xo="verticalLine",Qo="waterfall",Zo="weeks",Jo="#fff",er="x",tr="y",nr="years",ir="zero",or=3,rr="zoomStart",sr="zoom",ar="zoomEnd",lr=[yo,ji,Ti,ni,Zo,Gi,nr],cr=[Pn,Kn,oo,Vn,On,Hn,ho,uo,Qo,Si],ur={seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},hr=Bt.extend({init:function(e,n){var i,o,r=this;Et.destroy(e),Bt.fn.init.call(r,e),r.element.addClass(Zn+this.options.name.toLowerCase()).css("position","relative"),n&&(o=n.dataSource,n.dataSource=t),i=Ft({},r.options,n),r._originalOptions=Ft({},i),r._initTheme(i),r._initSurface(),r.bind(r.events,r.options),r.wrapper=r.element,n&&(n.dataSource=o),r._initDataSource(n),Et.notify(r,Nt.ui)},_initTheme:function(n){var i,o=this,r=Nt.ui.themes||{},s=n.theme,c=r[s]||r[s.toLowerCase()],u=s&&c?c.chart:{},h=[],d=n.series||[];for(i=0;d.length>i;i++)h.push(e.extend({},d[i]));n.series=h,l(n),o._applyDefaults(n,u),null===n.seriesColors&&(n.seriesColors=t),o.options=Ft({},u,n),a(o.options)},_initDataSource:function(e){var t=this,n=(e||{}).dataSource;t._dataChangeHandler=Mt(t._onDataChanged,t),t.dataSource=Rt.create(n).bind(jn,t._dataChangeHandler),t._bindCategories(),n&&(t._hasDataSource=!0),t._redraw(),t._attachEvents(),n&&t.options.autoBind&&t.dataSource.fetch()},setDataSource:function(e){var t=this;t.dataSource.unbind(jn,t._dataChangeHandler),t.dataSource=e=Rt.create(e),t._hasDataSource=!0,t._hasData=!1,e.bind(jn,t._dataChangeHandler),t.options.autoBind&&e.fetch()},events:[ei,ko,Co,En,Ri,Bi,lo,di,ui,hi,rr,sr,ar,wo,bo,xo,eo,to,fo],items:function(){return e()},options:{name:"Chart",renderAs:"",theme:"default",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},autoBind:!0,seriesDefaults:{type:Kn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1},refresh:function(){var e=this;e._applyDefaults(e.options),a(e.options),e._bindSeries(),e._bindCategories(),e.trigger(ei),e._redraw()},getSize:function(){return Et.dimensions(this.element)},_resize:function(){var e=this.options.transitions;this.options.transitions=!1,this._redraw(),this.options.transitions=e},redraw:function(e){var t,n,i=this;i._applyDefaults(i.options),a(i.options),e?(n=i._model._plotArea,t=n.findPane(e),n.redraw(t)):i._redraw()},getAxis:function(e){var t,n=this._plotArea.axes;for(t=0;n.length>t;t++)if(n[t].options.name===e)return new bt(n[t])},toggleHighlight:function(e,t){var n,i,o,r,s=this._plotArea,a=this._highlight,l=(s.srcSeries||s.series||[])[0];if(Ct(t)?(n=t.series,i=t.category):n=i=t,o=l.type===li?q(s.pointsBySeriesName(n),i):l.type===so||l.type===xi?q((s.charts[0]||{}).points,i):s.pointsBySeriesName(n))for(r=0;o.length>r;r++)a.togglePointHighlight(o[r],e)},_initSurface:function(){var e=this.surface,t=this._surfaceWrap(),n=this.options.chartArea;n.width&&t.css("width",n.width),n.height&&t.css("height",n.height),e&&e.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Cn.Surface.create(t,{type:this.options.renderAs}))},_surfaceWrap:function(){return this.element},_redraw:function(){var e,t=this,n=t._getModel();t._destroyView(),t._model=n,t._plotArea=n._plotArea,n.renderVisual(),this.options.transitions!==!1&&n.traverse(function(e){e.animation&&e.animation.setup()}),t._initSurface(),t.surface.draw(n.visual),this.options.transitions!==!1&&n.traverse(function(e){e.animation&&e.animation.play()}),t._tooltip=t._createTooltip(),t._highlight=new ct(e),t._setupSelection(),t._createPannable(),t._createZoomSelection(),t._createMousewheelZoom(),t._hasDataSource&&!t._hasData&&t.options.autoBind||t.trigger(fo)},exportVisual:function(e){var t,n,i,o;return e&&(e.width||e.height)?(n=this.options.chartArea,i=this._originalOptions.chartArea,Ft(n,e),o=this._getModel(),n.width=i.width,n.height=i.height,o.renderVisual(),t=o.visual):t=this.surface.exportVisual(),t},_sharedTooltip:function(){var e=this,t=e.options;return e._plotArea instanceof nt&&t.tooltip.shared},_createPannable:function(){var e=this.options;e.pannable!==!1&&(this._pannable=new vt(this._plotArea,e.pannable))},_createZoomSelection:function(){var e=this.options.zoomable,t=(e||{}).selection;e!==!1&&t!==!1&&(this._zoomSelection=new _t(this,t))},_createMousewheelZoom:function(){var e=this.options.zoomable,t=(e||{}).mousewheel;e!==!1&&t!==!1&&(this._mousewheelZoom=new yt(this._plotArea,t))},_createTooltip:function(){var e,t=this,n=t.options,i=t.element;return e=t._sharedTooltip()?new dt(i,t._plotArea,n.tooltip):new ht(i,n.tooltip),e.bind(Pi,Mt(t._tooltipleave,t)),e},_tooltipleave:function(){var e=this,t=e._plotArea,n=e._highlight;t.hideCrosshairs(),n.hide()},_applyDefaults:function(e,t){c(e,t),r(e,t)},_getModel:function(){var e,t=this,n=t.options,i=new Zt(t._modelOptions());return i.chart=t,on.buildTitle(n.title,i),e=i._plotArea=t._createPlotArea(),n.legend.visible&&i.append(new te(e.options.legend)),i.append(e),i.reflow(),i},_modelOptions:function(){var e=this,t=e.options,n=e.element,i=Tt.floor(n.height()),o=Tt.floor(n.width());return e._size=null,Ft({width:o||si,height:i||oi,transitions:t.transitions},t.chartArea)},_createPlotArea:function(e){var t=this,n=t.options;return X.current.create(e?[]:n.series,n)},_setupSelection:function(){var e,t,n,i,o,r,s=this,a=s._plotArea,l=a.axes,c=s._selections=[];for(s._selectStartHandler||(s._selectStartHandler=Mt(s._selectStart,s),s._selectHandler=Mt(s._select,s),s._selectEndHandler=Mt(s._selectEnd,s)),t=0;l.length>t;t++)n=l[t],r=n.options,n instanceof ne&&r.select&&!r.vertical&&(i=0,o=r.categories.length-1,n instanceof ie&&(i=r.categories[i],o=r.categories[o]),r.justified||(n instanceof ie?o=m(o,1,r.baseUnit,r.weekStartDay):o++),e=new mt(s,n,Ft({min:i,max:o},r.select)),e.bind(wo,s._selectStartHandler),e.bind(bo,s._selectHandler),e.bind(xo,s._selectEndHandler),c.push(e))},_selectStart:function(e){return this.trigger(wo,e)},_select:function(e){return this.trigger(bo,e)},_selectEnd:function(e){return this.trigger(xo,e)},_attachEvents:function(){var e=this,t=e.element;t.on(qn,Mt(e._click,e)),t.on(Yi,Mt(e._mouseover,e)),t.on(Ki,Mt(e._mouseout,e)),t.on(Ji,Mt(e._mousewheel,e)),t.on(qi,Mt(e._mouseleave,e)),e._mousemove=Et.throttle(Mt(e._mousemove,e),Qi),e._shouldAttachMouseMove()&&t.on(Xi,e._mousemove),Et.UserEvents&&(e._userEvents=new Et.UserEvents(t,{global:!0,filter:":not(.k-selector)",multiTouch:!1,tap:Mt(e._tap,e),start:Mt(e._start,e),move:Mt(e._move,e),end:Mt(e._end,e)}))},_mouseout:function(e){var t=this,n=t._getChartElement(e);n&&n.leave&&n.leave(t,e)},_start:function(e){var t=this,n=t._events;gn(n[di]||n[ui]||n[hi])&&t._startNavigation(e,di),t._pannable&&t._pannable.start(e),t._zoomSelection&&t._zoomSelection.start(e)},_move:function(e){var t,n,i,o,r,s,a=this,l=a._navState,c=a._pannable,u={};if(c)e.preventDefault(),u=c.move(e),u&&!a.trigger(ui,{axisRanges:u,originalEvent:e})&&c.pan();else if(l){for(e.preventDefault(),t=l.axes,n=0;t.length>n;n++)i=t[n],o=i.options.name,o&&(r=i.options.vertical?e.y:e.x,s=r.startLocation-r.location,0!==s&&(u[i.options.name]=i.translateRange(s)));l.axisRanges=u,a.trigger(ui,{axisRanges:u,originalEvent:e})}a._zoomSelection&&a._zoomSelection.move(e)},_end:function(e){if(this._endNavigation(e,hi),this._zoomSelection){var t=this._zoomSelection.end(e);t&&!this.trigger(sr,{axisRanges:t,originalEvent:e})&&this._zoomSelection.zoom()}this._pannable&&this._pannable.end(e)},_mousewheel:function(e){var t,n,i,o,r,s,a=this,l=e.originalEvent,c=hn(e),u=a._navState,h={},d=a._mousewheelZoom;if(d)e.preventDefault(),h=d.updateRanges(c),h&&!a.trigger(sr,{delta:c,axisRanges:h,originalEvent:e})&&d.zoom();else if(u||(t=a._startNavigation(l,rr),t||(u=a._navState)),u){for(n=u.totalDelta||c,u.totalDelta=n+c,i=a._navState.axes,o=0;i.length>o;o++)r=i[o],s=r.options.name,s&&(h[s]=r.scaleRange(-n));a.trigger(sr,{delta:c,axisRanges:h,originalEvent:e}),a._mwTimeout&&clearTimeout(a._mwTimeout),a._mwTimeout=setTimeout(function(){a._endNavigation(e,ar)},Zi)}},_startNavigation:function(e,t){var n,i,o,r=this,s=r._eventCoordinates(e),a=r._model._plotArea,l=a.findPointPane(s),c=a.axes.slice(0),u=!1;if(l){for(n=0;c.length>n;n++)if(i=c[n],i.box.containsPoint(s)){u=!0;break}!u&&a.backgroundBox().containsPoint(s)&&(o=r.trigger(t,{axisRanges:I(c),originalEvent:e}),o?r._userEvents.cancel():(r._suppressHover=!0,r._unsetActivePoint(),r._navState={pane:l,axes:c}))}},_endNavigation:function(e,t){var n=this;n._navState&&(n.trigger(t,{axisRanges:n._navState.axisRanges,originalEvent:e}),n._suppressHover=!1,n._navState=null)},_getChartElement:function(e,n){var i,o=this.surface.eventTarget(e);if(o){for(;o&&!i;)i=o.chartElement,o=o.parent;return i?(i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),n&&(i=i.closest(n)),i):t}},_eventCoordinates:function(e){var t=this,n=gn((e.x||{}).client),i=n?e.x.client:e.clientX,o=n?e.y.client:e.clientY;return t._toModelCoordinates(i,o)},_toModelCoordinates:function(t,n){var i=this.element,o=i.offset(),r=parseInt(i.css("paddingLeft"),10),s=parseInt(i.css("paddingTop"),10),a=e(window);return new Qt(t-o.left-r+a.scrollLeft(),n-o.top-s+a.scrollTop())},_tap:function(e){var t=this,n=t._getChartElement(e);t._activePoint===n?t._click(e):(t._startHover(e)||t._unsetActivePoint(),t._click(e))},_click:function(e){for(var t=this,n=t._getChartElement(e);n;)n.click&&n.click(t,e),n=n.parent},_startHover:function(e){var n,i=this,o=i._getChartElement(e),r=i._tooltip,s=i._highlight,a=i.options.tooltip;if(!i._suppressHover&&s&&!s.isHighlighted(o)&&!i._sharedTooltip())return n=i._getChartElement(e,function(e){return e.hover}),n&&!n.hover(i,e)?(i._activePoint=n,a=Ft({},a,n.options.tooltip),a.visible&&r.show(n),s.show(n),n.tooltipTracking):t},_mouseover:function(t){var n=this;n._startHover(t)&&e(document).on($i,Mt(n._mouseMoveTracking,n))},_mouseMoveTracking:function(t){var n,i,o=this,r=o.options,s=o._tooltip,a=o._highlight,l=o._eventCoordinates(t),c=o._activePoint;o._plotArea.box.containsPoint(l)?c&&c.tooltipTracking&&c.series&&c.parent.getNearestPoint&&(i=c.parent.getNearestPoint(l.x,l.y,c.seriesIx),i&&i!=c&&(i.hover(o,t),o._activePoint=i,n=Ft({},r.tooltip,c.options.tooltip),n.visible&&s.show(i),a.show(i))):(e(document).off($i),o._unsetActivePoint())},_mousemove:function(e){var t=this._eventCoordinates(e);this._trackCrosshairs(t),this._sharedTooltip()&&this._trackSharedTooltip(t,e)},_trackCrosshairs:function(e){var t,n,i=this._plotArea.crosshairs;for(t=0;i.length>t;t++)n=i[t],n.box.containsPoint(e)?n.showAt(e):n.hide()},_trackSharedTooltip:function(t,n){var i,o,r,s,a=this,l=a.options,c=a._plotArea,u=c.categoryAxis,h=a._tooltip,d=l.tooltip,f=a._highlight;c.box.containsPoint(t)&&(i=u.pointCategoryIndex(t),i!==a._tooltipCategoryIx&&(o=c.pointsByCategoryIndex(i),r=e.map(o,function(e){return e.eventArgs(n)}),s=r[0]||{},s.categoryPoints=r,o.length>0&&!this.trigger(Co,s)?(d.visible&&h.showAt(o,t),f.show(o)):h.hide(),a._tooltipCategoryIx=i))},_mouseleave:function(t){var n=this,i=n._plotArea,o=n._tooltip,r=n._highlight,s=t.relatedTarget;s&&e(s).closest(o.element).length||(n._mousemove.cancel(),i.hideCrosshairs(),r.hide(),setTimeout(Mt(o.hide,o),Go),n._tooltipCategoryIx=null)},_unsetActivePoint:function(){
|
|
var e=this,t=e._tooltip,n=e._highlight;e._activePoint=null,t&&t.hide(),n&&n.hide()},_onDataChanged:function(){var e,t,n=this,i=n.options,o=n._sourceSeries||i.series,r=o.length,s=n.dataSource.view(),l=(n.dataSource.group()||[]).length>0,c=[];for(e=0;r>e;e++)t=o[e],n._isBindable(t)&&l?pn(c,B(t,s)):c.push(t||[]);n._sourceSeries=o,i.series=c,a(n.options),n._bindSeries(),n._bindCategories(),n._hasData=!0,n._deferRedraw()},_deferRedraw:function(){var e=this;Et.support.vml?(e._clearRedrawTimeout(),e._redrawTimeout=setTimeout(function(){e.surface&&(e.trigger(ei),e._redraw())},0)):(e.trigger(ei),e._redraw())},_clearRedrawTimeout:function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},_bindSeries:function(){var e,t,n,i,o=this,r=o.dataSource.view(),s=o.options.series,a=s.length;for(e=0;a>e;e++)t=s[e],o._isBindable(t)&&(n=t._groupIx,i=gn(n)?(r[n]||{}).items:r,t.autoBind!==!1&&(t.data=i))},_bindCategories:function(){var e,t,n=this,i=n.dataSource.view()||[],o=(n.dataSource.group()||[]).length>0,r=i,s=n.options,a=[].concat(s.categoryAxis);for(o&&i.length&&(r=i[0].items),e=0;a.length>e;e++)t=a[e],t.autoBind!==!1&&n._bindCategoryAxis(t,r,e)},_bindCategoryAxis:function(e,t,n){var i,o,r,s=(t||[]).length;if(e.field)for(e.categories=[],i=0;s>i;i++)r=t[i],o=d(e.field,r),0===i?(e.categories=[o],e.dataItems=[r]):(e.categories.push(o),e.dataItems.push(r));else this._bindCategoryAxisFromSeries(e,n)},_bindCategoryAxisFromSeries:function(e,t){var n,i,o,r,s,a,l,c,u,h,p,g=this,m=[],v=g.options.series,_=v.length,y={};for(i=0;_>i;i++)if(o=v[i],r=o.categoryAxis===e.name||!o.categoryAxis&&0===t,s=o.data,l=s.length,o.categoryField&&r&&l>0)for(p=N(e,d(o.categoryField,s[0])),h=p?f:d,a=0;l>a;a++)c=s[a],u=h(o.categoryField,c),(p||!y[u])&&(m.push([u,c]),p||(y[u]=!0));m.length>0&&(p&&(m=O(m,function(e,t){return an(e[0],t[0])})),n=H(m),e.categories=n[0],e.dataItems=n[1])},_isBindable:function(e){var t,n,i=Q.current.valueFields(e),o=!0;for(n=0;i.length>n;n++)if(t=i[n],t===$o?t="field":t+="Field",!gn(e[t])){o=!1;break}return o},_legendItemClick:function(e,t){var n,i,o,r=this,s=r._plotArea,a=(s.srcSeries||s.series)[e],l=(r._sourceSeries||[])[e]||a;cn(a.type,[so,li,xi])?(o=l.data[t],i=gn(o.visible)?!o.visible:!1,o.visible=i):(i=!l.visible,l.visible=i,a.visible=i),r.options.transitions&&(r.options.transitions=!1,n=!0),r.redraw(),n&&(r.options.transitions=!0)},_legendItemHover:function(e,t){var n,i,o=this,r=o._plotArea,s=o._highlight,a=(r.srcSeries||r.series)[e];n=cn(a.type,[so,li,xi])?t:e,i=r.pointsBySeriesIndex(n),s.show(i)},_shouldAttachMouseMove:function(){var e=this;return e._plotArea.crosshairs.length||e._tooltip&&e._sharedTooltip()},setOptions:function(n){var i=this,o=n.dataSource;n.dataSource=t,i._originalOptions=Ft(i._originalOptions,n),i.options=Ft({},i._originalOptions),i._sourceSeries=null,e(document).off(Xi),Bt.fn._setEvents.call(i,n),i._initTheme(i.options),o&&i.setDataSource(o),i._hasDataSource?i._onDataChanged():(i._bindCategories(),i.redraw()),i._shouldAttachMouseMove()&&i.element.on(Xi,i._mousemove)},destroy:function(){var t=this,n=t.dataSource;t.element.off(Sn),n.unbind(jn,t._dataChangeHandler),e(document).off($i),t._userEvents&&t._userEvents.destroy(),t._destroyView(),t.surface.destroy(),t.surface=null,t._clearRedrawTimeout(),Bt.fn.destroy.call(t)},_destroyView:function(){var e=this,t=e._model,n=e._selections;if(t&&(t.destroy(),e._model=null),n)for(;n.length>0;)n.shift().destroy();e._unsetActivePoint(),e._tooltip&&e._tooltip.destroy(),e._highlight&&e._highlight.destroy(),e._zoomSelection&&e._zoomSelection.destroy()}});Nt.ExportMixin.extend(hr.fn),Et.PDFMixin&&Et.PDFMixin.extend(hr.fn),X=Pt.extend({init:function(){this._registry=[]},register:function(e,t){this._registry.push({type:e,seriesTypes:t})},create:function(e,t){var n,i,o,r=this._registry,s=r[0];for(n=0;r.length>n;n++)if(i=r[n],o=F(e,i.seriesTypes),o.length>0){s=i;break}return new s.type(o,t)}}),X.current=new X,Q=Pt.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(e,n,i){var o,r,s=this;for(n=n||[$o],o=0;e.length>o;o++)r=e[o],s._valueFields[r]=n,s._otherFields[r]=i,s._nullValue[r]=s._makeValue(n,null),s._undefinedValue[r]=s._makeValue(n,t)},canonicalFields:function(e){return this.valueFields(e).concat(this.otherFields(e))},valueFields:function(e){return this._valueFields[e.type]||[$o]},otherFields:function(e){return this._otherFields[e.type]||[$o]},bindPoint:function(e,t){var n,i,o,r,s,a=this,l=e.data,c=l[t],u={valueFields:{value:c}},h=a.valueFields(e),d=a._otherFields[e.type];return null===c?s=a._nullValue[e.type]:gn(c)?kt(c)?(i=c.slice(h.length),s=a._bindFromArray(c,h),n=a._bindFromArray(i,d)):typeof c===io&&(o=a.sourceFields(e,h),r=a.sourceFields(e,d),s=a._bindFromObject(c,h,o),n=a._bindFromObject(c,d,r)):s=a._undefinedValue[e.type],gn(s)&&(1===h.length?u.valueFields.value=s[h[0]]:u.valueFields=s),u.fields=n||{},u},_makeValue:function(e,t){var n,i,o={},r=e.length;for(n=0;r>n;n++)i=e[n],o[i]=t;return o},_bindFromArray:function(e,t){var n,i,o={};if(t)for(i=Tt.min(t.length,e.length),n=0;i>n;n++)o[t[n]]=e[n];return o},_bindFromObject:function(e,t,n){var i,o,r,s,a={};if(t)for(o=t.length,n=n||t,i=0;o>i;i++)r=t[i],s=n[i],a[r]=d(s,e);return a},sourceFields:function(e,t){var n,i,o,r,s;if(t)for(i=t.length,r=[],n=0;i>n;n++)o=t[n],s=o===$o?"field":o+"Field",r.push(e[s]||o);return r}}),Q.current=new Q,Z=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),this.textBox=new nn(e,n.options),n.append(this.textBox)},options:{position:ro,margin:ln(3),padding:ln(4),color:Fn,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:yi,delay:Di},zIndex:2},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(e){var t=this,n=t.options,i=n.vertical,o=n.aboveAxis,r=t.children[0],s=r.box,a=r.options.padding;r.options.align=i?Wn:Ii,r.options.vAlign=i?Vo:Wn,n.position==Mi?i?(r.options.vAlign=Vo,!o&&s.height()<e.height()&&(r.options.vAlign=Ln)):r.options.align=o?po:Ii:n.position==Wn?(r.options.vAlign=Wn,r.options.align=Wn):n.position==Ai?i?r.options.vAlign=o?Ln:Vo:r.options.align=o?Ii:po:n.position==ro&&(i?e=o?new Ut(e.x1,e.y1-s.height(),e.x2,e.y1):new Ut(e.x1,e.y2,e.x2,e.y2+s.height()):(r.options.align=Wn,e=o?new Ut(e.x2,e.y1,e.x2+s.width(),e.y2):new Ut(e.x1-s.width(),e.y1,e.x1,e.y2))),n.rotation||(i?a.left=a.right=(e.width()-r.contentBox.width())/2:a.top=a.bottom=(e.height()-r.contentBox.height())/2),r.reflow(e)},alignToClipBox:function(e){var t,n=this,i=n.options.vertical,o=i?tr:er,r=o+"1",s=o+"2",a=n.children[0],l=n.parent.box;(e[r]>l[r]||l[s]>e[s])&&(t=a.paddingBox.clone(),t[r]=Tt.max(l[r],e[r]),t[s]=Tt.min(l[s],e[s]),this.reflow(t))}}),J=Wt.extend({init:function(e){var t=this;Wt.fn.init.call(t,e),t.createContainer(),t.createMarker(),t.createLabel()},createContainer:function(){var e=this;e.container=new $t({vertical:!1,wrap:!1,align:Wn}),e.append(e.container)},createMarker:function(){this.container.append(new en(this.markerOptions()))},markerOptions:function(){var e=this.options,t=e.markerColor;return Ft({},e.markers,{background:t,border:{color:t}})},createLabel:function(){var e=this,t=e.options,n=Ft({},t.labels);e.container.append(new nn(t.text,n))},renderComplete:function(){var e,t;jt.fn.renderComplete.call(this),e=this.options.cursor||{},t=this._itemOverlay=Cn.Path.fromRect(this.container.box.toRect(),{fill:{color:Jo,opacity:0},stroke:null,cursor:e.style||e}),this.appendVisual(t)},click:function(e,t){var n=this.eventArgs(t);e.trigger(Ri,n)||(t.preventDefault(),e._legendItemClick(n.seriesIndex,n.pointIndex))},hover:function(e,t){var n=this.eventArgs(t);return e.trigger(Bi,n)||(t.preventDefault(),e._legendItemHover(n.seriesIndex,n.pointIndex)),!0},leave:function(e){e._unsetActivePoint()},eventArgs:function(t){var n=this.options;return{element:e(t.target),text:n.text,series:n.series,seriesIndex:n.series.index,pointIndex:n.pointIndex}},renderVisual:function(){var e=this,t=e.options,n=t.visual;n?(e.visual=n({active:t.active,series:t.series,pointIndex:t.pointIndex,options:{markers:e.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):jt.fn.renderVisual.call(e)}}),ee=jt.extend({render:function(){var e,t,n=this.children,i=this.options,o=i.vertical;for(this.visual=new Cn.Layout(null,{spacing:o?0:i.spacing,lineSpacing:o?i.spacing:0,orientation:o?"vertical":"horizontal"}),t=0;n.length>t;t++)e=n[t],e.reflow(new Ut),e.renderVisual()},reflow:function(e){this.visual.rect(e.toRect()),this.visual.reflow();var t=this.visual.clippedBBox();this.box=t?Nt.rectToBox(t):new Ut},renderVisual:function(){this.addVisual()},createVisual:Dt}),te=jt.extend({init:function(e){var t=this;jt.fn.init.call(t,e),cn(t.options.position,[Vo,po,Ln,Ii,Jn])||(t.options.position=po),t.createContainer(),t.createItems()},options:{position:po,items:[],labels:{margin:{left:6}},offsetX:0,offsetY:0,margin:ln(5),padding:ln(5),border:{color:Fn,width:0},item:{cursor:co},spacing:6,background:"",zIndex:1,markers:{border:{width:1},width:7,height:7,type:"rect",align:Ii,vAlign:Wn}},createContainer:function(){var e=this,t=e.options,n=t.align,i=t.position,o=i,r=Wn;i==Jn?o=Ii:cn(i,[Vo,Ln])?(o="start"==n?Ii:"end"==n?po:Wn,r=i):n&&("start"==n?r=Vo:"end"==n&&(r=Ln)),e.container=new Wt({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),e.append(e.container)},createItems:function(){var e,t,n,i=this,o=i.options,r=o.items,s=r.length,a=i.isVertical();for(e=new ee({vertical:a,spacing:o.spacing}),o.reverse&&(r=r.slice(0).reverse()),t=0;s>t;t++)n=r[t],e.append(new J(Ft({},{markers:o.markers,labels:o.labels},o.item,n)));e.render(),i.container.append(e)},isVertical:function(){var e=this,t=e.options,n=t.orientation,i=t.position,o=i==Jn&&n!=Ci||(gn(n)?n!=Ci:cn(i,[Ii,po]));return o},hasItems:function(){return this.container.children[0].children.length>0},reflow:function(e){var n=this,i=n.options;return e=e.clone(),n.hasItems()?(i.position===Jn?(n.containerCustomReflow(e),n.box=e):n.containerReflow(e),t):(n.box=e,t)},containerReflow:function(e){var t,n=this,i=n.options,o=i.position,r=o==Vo||o==Ln?er:tr,s=e.clone(),a=n.container,l=i.width,c=i.height,u=n.isVertical(),h=e.clone();(o==Ii||o==po)&&(s.y1=h.y1=0),u&&c?(s.y2=s.y1+c,s.align(h,tr,a.options.vAlign)):!u&&l&&(s.x2=s.x1+l,s.align(h,er,a.options.align)),a.reflow(s),s=a.box,t=s.clone(),(i.offsetX||i.offsetY)&&(s.translate(i.offsetX,i.offsetY),n.container.reflow(s)),t[r+1]=e[r+1],t[r+2]=e[r+2],n.box=t},containerCustomReflow:function(e){var t=this,n=t.options,i=n.offsetX,o=n.offsetY,r=t.container,s=n.width,a=n.height,l=t.isVertical(),c=e.clone();l&&a?c.y2=c.y1+a:!l&&s&&(c.x2=c.x1+s),r.reflow(c),c=r.box,r.reflow(Ut(i,o,i+c.width(),o+c.height()))},renderVisual:function(){this.hasItems()&&jt.fn.renderVisual.call(this)}}),ne=Ht.extend({init:function(e){var t=this;e=e||{},this._initFields(),this._initCategories(e),Ht.fn.init.call(t,e)},_initFields:function(){this._ticks={},this.outOfRangeMin=0,this.outOfRangeMax=0},_initCategories:function(e){var t,n,i=(e.categories||[]).slice(0);e.categories=i,e.limitCategories&&(gn(e.min)||gn(e.max))&&i.length&&(e.srcCategories=e.categories,t=gn(e.min)?Tt.floor(e.min):0,n=gn(e.max)?Tt.ceil(e.max)+1:i.length,e.outOfRangePoints&&(t-1>=0&&(t--,this.outOfRangeMin=1),e.srcCategories.length>n+1&&(n++,this.outOfRangeMax=1)),e.categories=e.categories.slice(t,n))},options:{type:Un,categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:Fn},labels:{zIndex:1},justified:!1},rangeIndices:function(){var e,t,n,i,o=this.options;return o.limitCategories?(t=(o.categories.length||1)-1,n=this.outOfRangeMin+(gn(o.min)?o.min%1:0),i=(gn(o.max)&&o.max%1!==0?t-(1-o.max%1):t)-this.outOfRangeMax,e={min:n,max:i}):e=this.totalRangeIndices(),e},totalRangeIndices:function(){var e=this.options;return{min:M(e.min)?e.min:0,max:M(e.max)?e.max:((e.srcCategories||e.categories).length||1)-1}},range:function(){var e=this.options;return{min:M(e.min)?e.min:0,max:M(e.max)?e.max:e.categories.length}},totalRange:function(){return{min:0,max:(this.options.srcCategories||this.options.categories).length}},getScale:function(){var e=this.rangeIndices(),t=e.min,n=e.max+(this.options.justified?0:1),i=this.lineBox(),o=this.options.vertical?i.height():i.width(),r=o/(n-t||1);return r*(this.options.reverse?-1:1)},getTickPositions:function(e){for(var t=this,n=t.options,i=n.vertical,o=t.lineBox(),r=n.reverse,s=t.getScale(),a=t.rangeIndices(),l=a.min,c=a.max+(n.justified?0:1),u=l%1!==0?Tt.floor(l/1)+e:l,h=o[(i?tr:er)+(r?2:1)],d=[];c>=u;)d.push(h+dn(s*(u-l),Xn)),u+=e;return d},getLabelsTickPositions:function(){var e=this.getMajorTickPositions().slice(0),t=this.rangeIndices(),n=this.getScale();return t.min%1!==0&&e.unshift(e[0]-n),t.max%1!==0&&e.push(mn(e)+n),e},labelTickIndex:function(e){var t=e.index,n=this.rangeIndices();return n.min>0&&(t-=Tt.floor(n.min)),t},arrangeLabels:function(){Ht.fn.arrangeLabels.call(this),this.hideOutOfRangeLabels()},hideOutOfRangeLabels:function(){var e=this.box,t=this.labels,n=this.options.vertical?tr:er,i=e[n+1],o=e[n+2],r=t[0],s=mn(t);t.length&&((r.box[n+1]>o||i>r.box[n+2])&&(r.options.visible=!1),(s.box[n+1]>o||i>s.box[n+2])&&(s.options.visible=!1))},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var e,t=this,n=t._ticks,i=t.options,o=t.rangeIndices(),r=i.reverse,s=i.justified,a=t.lineBox();return e=a.getHash()+o.min+","+o.max+r+s,n._hash!==e&&(n._hash=e,n.majorTicks=t.getTickPositions(1),n.minorTicks=t.getTickPositions(.5)),n},getSlot:function(e,t,n){var i,o,r=this,s=r.options,a=s.reverse,l=s.justified,c=s.vertical?tr:er,u=r.lineBox(),h=r.totalRange(),d=r.rangeIndices(),f=d.min,p=this.getScale(),g=u[c+(a?2:1)],m=u.clone(),v=!gn(t);return e=xn(e,0),t=xn(t,e),e=vn(e,h.min,h.max||1),t=vn(t-1,e,h.max||1),t=Tt.max(e,t),i=g+(e-f)*p,o=g+(t+1-f)*p,v&&l&&(o=i),n&&(i=vn(i,u[c+1],u[c+2]),o=vn(o,u[c+1],u[c+2])),m[c+1]=a?o:i,m[c+2]=a?i:o,m},pointCategoryIndex:function(e){var t,n,i,o=this,r=o.options,s=r.reverse,a=r.justified,l=r.vertical?tr:er,c=o.lineBox(),u=o.rangeIndices(),h=s?u.max+(a?0:1):u.min,d=this.getScale(),f=c[l+1],p=c[l+2],g=e[l];return f>g||g>p?null:(t=g-f,n=t/d,n=h+n,i=n%1,a?n=Tt.round(n):0===i&&n>0&&n--,Tt.floor(n))},getCategory:function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.options.categories[t]},categoryIndex:function(e){return z(e,this.options.categories)},translateRange:function(e){var t=this,n=t.options,i=t.lineBox(),o=n.vertical?i.height():i.width(),r=n.categories.length,s=o/r,a=dn(e/s,ri);return{min:a,max:r+a}},zoomRange:function(e){var n=this.totalRangeIndices(),i=this.totalRange(),o=i.max-1,r=i.min,s=vn(n.min+e,r,o),a=vn(n.max-e,r,o);return a-s>=0?{min:s,max:a}:t},scaleRange:function(e){var t=this,n=t.options,i=n.categories.length,o=e*i;return{min:-o,max:i+o}},labelsCount:function(){var e=this.labelsRange();return e.max-e.min},labelsRange:function(){var e,t=this.options,n=t.labels,i=t.justified,o=this.totalRangeIndices(),r=o.min,s=o.max,a=t.limitCategories?Tt.floor(r)-this.outOfRangeMin:0;return i?(r=Tt.ceil(r),s=Tt.floor(s)):(r=Tt.floor(r),s=Tt.ceil(s)),e=r>n.skip?n.skip+n.step*Tt.ceil((r-n.skip)/n.step):n.skip,{min:e-a,max:(t.categories.length?s+1:0)-a}},createAxisLabel:function(e,t){var n=this,i=n.options,o=i.dataItems?i.dataItems[e]:null,r=xn(i.categories[e],""),s=n.axisLabelText(r,o,t);return new Vt(r,s,e,o,t)},shouldRenderNote:function(e){var t=this.options.categories;return t.length&&t.length>e&&e>=0},pan:function(e){var t=this.totalRangeIndices(),n=this.getScale(),i=dn(e/n,ri),o=this.totalRange(),r=t.min+i,s=t.max+i;return this.limitRange(r,s,o.min,o.max-1)},pointsRange:function(e,t,n){var i=this,o=i.options,r=o.reverse,s=o.justified,a=o.vertical?tr:er,l=i.lineBox(),c=i.totalRangeIndices(),u=this.getScale(),h=l[a+(r?2:1)],d=e[a]-h,f=t[a]-h,p=c.min+d/u,g=c.min+f/u;return p=Tt.min(p,g),g=Tt.max(p,g),n||s||g--,{min:p,max:g}}}),ie=ne.extend({init:function(e){var t,n,i=this;e=e||{},e=Ft({roundToBaseUnit:!0},e,{categories:p(e.categories),min:p(e.min),max:p(e.max)}),e.categories&&e.categories.length>0?(t=(e.baseUnit||"").toLowerCase(),n=t!==Mn&&!cn(t,lr),n&&(e.baseUnit=i.defaultBaseUnit(e)),(t===Mn||e.baseUnitStep===An)&&i.autoBaseUnit(e),i.groupCategories(e)):e.baseUnit=e.baseUnit||ni,this._initFields(),Ht.fn.init.call(i,e)},options:{type:ti,labels:{dateFormats:ur},autoBaseUnitSteps:{seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10},shouldRenderNote:function(e){var t=this,n=t.range(),i=t.options.categories||[];return an(e,n.min)>=0&&an(e,n.max)<=0&&i.length},parseNoteValue:function(e){return p(e)},translateRange:function(e){var t,n,i=this,o=i.options,r=o.baseUnit,s=o.weekStartDay,a=i.lineBox(),l=o.vertical?a.height():a.width(),c=i.range(),u=l/(c.max-c.min),h=dn(e/u,ri);return c.min&&c.max&&(t=b(o.min||c.min,h),n=b(o.max||c.max,h),c={min:m(t,0,r,s),max:m(n,0,r,s)}),c},scaleRange:function(e){var t,n=this,i=Tt.abs(e),o=n.range(),r=o.min,s=o.max;if(o.min&&o.max){for(;i--;)o=w(r,s),t=Tt.round(.1*o),0>e?(r=b(r,t),s=b(s,-t)):(r=b(r,-t),s=b(s,t));o={min:r,max:s}}return o},defaultBaseUnit:function(e){var t,n,i,o,r,s=e.categories,a=gn(s)?s.length:0,l=Vi;for(t=0;a>t;t++)n=s[t],n&&o&&(i=w(n,o),i>0&&(l=Tt.min(l,i),r=l>=Oo?nr:l>=Lo-3*Fo?Gi:l>=zo?Zo:l>=Fo?ni:l>=Bo?Ti:l>=Ro?ji:yo)),o=n;return r||ni},_categoryRange:function(e){var t=e._range;return t||(t=e._range=_n(e)),t},totalRange:function(){return{min:0,max:this.options.categories.length}},rangeIndices:function(){var e,t=this.options,n=t.categories,i=this._categoryRange(t.srcCategories||n),o=t.min||p(i.min),r=t.max||p(i.max),s=n.length-1,a=0,l=0;return n.length&&(e=w(mn(n),n[0])||1,a=w(o,n[0])/e*s,l=s-w(mn(n),r)/e*s,t.justified||t.roundToBaseUnit||l==s||l--,t.roundToBaseUnit&&(a=Tt.floor(a),l=Tt.floor(l))),{min:a,max:l}},labelsRange:function(){var e=this.options,t=e.labels,n=this.rangeIndices(),i=Tt.floor(n.min),o=Tt.ceil(n.max);return{min:i+t.skip,max:e.categories.length?o+1:0}},panRange:function(e,t){var n=this._categoryRange(this.options.srcCategories),i=this.options,o=i.baseUnit,r=i.baseUnitStep||1,s=i.weekStartDay,a=g(m(n.min,0,o,s)),l=g(m(n.max,i.justified||i.roundToBaseUnit?0:r,o,s));return this.limitRange(e,t,a,l)},datesRange:function(){var e=this._categoryRange(this.options.srcCategories);return{min:p(e.min),max:p(e.max)}},pan:function(e){var t,n,i,o=this,r=o.options,s=r.baseUnit,a=o.lineBox(),l=r.vertical?a.height():a.width(),c=o.range(),u=l/(c.max-c.min),h=dn(e/u,ri);return c.min&&c.max&&(n=b(r.min||c.min,h),i=b(r.max||c.max,h),t=this.panRange(n,i),t&&(t.baseUnit=s,t.baseUnitStep=r.baseUnitStep||1)),t},pointsRange:function(e,t){var n=ne.fn.pointsRange.call(this,e,t,!0),i=this.options.categories,o=i.length-1,r=w(mn(i),i[0]),s=b(i[0],n.min/o*r),a=b(i[0],n.max/o*r);return{min:s,max:a}},zoomRange:function(e){var n=this.options,i=this._categoryRange(this.options.categories),o=this._categoryRange(this.options.srcCategories),r=n.baseUnit,s=n.baseUnitStep||1,a=n.weekStartDay,l=m(p(n.min||i.min),e*s,r,a),c=m(p(n.max||i.max),-e*s,r,a),u=No[r]*s;return l=p(vn(l,o.min,o.max)),c=p(vn(c,o.min,o.max)),w(c,l)>u?{min:m(l,0,r,a),max:m(c,0,r,a)}:t},range:function(e){var t,n,i,o,r,s,a,l,c,u,h,d;return e=e||this.options,t=e.categories,n=e.baseUnit===Mn,i=n?lr[0]:e.baseUnit,o=e.baseUnitStep||1,r=g(e.min),s=g(e.max),a=this._categoryRange(t),l=this._categoryRange(e.srcCategories||t),c=g(a.min),u=g(a.max),h=m(r||c,0,i,e.weekStartDay),d=m(s||u,o,i,e.weekStartDay),e.outOfRangePoints&&(h>l.min&&(h=m(h,-o,i,e.weekStartDay)),l.max>=d&&(d=m(d,o,i,e.weekStartDay))),e.limitRange&&(d=vn(d,l.min,m(l.max,o,i,e.weekStartDay))),{min:p(h),max:p(d)}},autoBaseUnit:function(e){for(var t,n,i,o=this,r=o.range(Ft({},e,{baseUnitStep:1})),s=e.baseUnit===Mn,a=0,l=s?lr[a++]:e.baseUnit,c=r.max-r.min,u=c/No[l],h=u,d=e.maxDateGroups||o.options.maxDateGroups,f=Ft({},o.options.autoBaseUnitSteps,e.autoBaseUnitSteps);!n||u>d;)if(t=t||f[l].slice(0),i=t.shift())n=i,u=h/n;else{if(l===mn(lr)){n=Tt.ceil(h/d);break}if(!s){u>d&&(n=Tt.ceil(h/d));break}l=lr[a++]||mn(lr),h=c/No[l],t=null}e.baseUnitStep=n,e.baseUnit=l},_timeScale:function(){var e,t,n,i=this,o=i.range(),r=i.options,s=i.lineBox(),a=r.vertical,l=a?s.height():s.width();return r.justified&&r._collapse!==!1?(t=this._categoryRange(r.categories),n=g(t.max),e=p(n)-o.min):e=o.max-o.min,l/e},groupCategories:function(e){var t,n,i=this,o=e.categories,r=p(wn(o)),s=e.baseUnit,a=e.baseUnitStep||1,l=i.range(e),c=l.max,u=[];for(t=l.min;c>t&&(u.push(t),n=m(t,a,s,e.weekStartDay),!(n>r)||e.max);t=n);e.srcCategories=o,e.categories=u},createAxisLabel:function(e,n){var i,o,r=this.options,s=r.dataItems?r.dataItems[e]:null,a=r.categories[e],l=r.baseUnit,c=!0,u=n.dateFormats[l];return r.justified?(i=_(a,l,r.weekStartDay),c=T(i,a)):r.roundToBaseUnit||(c=!T(this.range().max,a)),c&&(n.format=n.format||u,o=this.axisLabelText(a,s,n))?new Vt(a,o,e,s,n):t},categoryIndex:function(e,t,n){var i,o=this,r=o.options,s=r.categories;return e=p(e),t=t||o.range(),n&&e&&r.roundToBaseUnit&&e>=t.max?s.length:!e||t.min>e||e>=t.max?-1:i=A(e,s)},getSlot:function(e,t,n){var i=this;return typeof e===io&&(e=i.categoryIndex(e,null,n)),typeof t===io&&(t=i.categoryIndex(t,null,n)),ne.fn.getSlot.call(i,e,t,n)}}),oe=Ht.extend({init:function(e,t,n){var i=this;n=n||{},Ft(n,{min:p(n.min),max:p(n.max),axisCrossingValue:p(n.axisCrossingValues||n.axisCrossingValue)}),n=i.applyDefaults(p(e),p(t),n),Ht.fn.init.call(i,n)},options:{type:ti,majorGridLines:{visible:!0,width:1,color:Fn},labels:{dateFormats:ur}},applyDefaults:function(e,n,i){var o=this,r=i.min||e,s=i.max||n,a=i.baseUnit||o.timeUnits(s-r),l=No[a],c=_(g(r)-1,a)||p(s),u=y(g(s)+1,a),h=i.majorUnit?i.majorUnit:t,d=h||Nt.ceil(Nt.autoMajorUnit(c.getTime(),u.getTime()),l)/l,f=x(c,u,a),v=Nt.ceil(f,d),w=v-f,b=Tt.floor(w/2),k=w-b;return i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||a,i.min=i.min||m(c,-b,a),i.max=i.max||m(u,k,a),i.minorUnit=i.minorUnit||d/5,i.majorUnit=d,this.totalMin=g(_(g(e)-1,a)),this.totalMax=g(y(g(n)+1,a)),i},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return Tt.floor(x(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,n,i,o=this.options,r=o.vertical,s=o.reverse,a=this.lineBox(),l=(r?-1:1)*(s?-1:1),c=1===l?1:2,u=a[(r?tr:er)+c],h=this.getDivisions(e),d=o.max-o.min,f=r?a.height():a.width(),p=f/d,g=[u];for(t=1;h>t;t++)n=m(o.min,t*o.majorUnit,o.baseUnit),i=u+(n-o.min)*p*l,g.push(dn(i,Xn));return g},getMajorTickPositions:function(){var e=this;return e.getTickPositions(e.options.majorUnit)},getMinorTickPositions:function(){var e=this;return e.getTickPositions(e.options.minorUnit)},getSlot:function(e,t,n){return Xt.fn.getSlot.call(this,p(e),p(t),n)},getValue:function(e){var t=Xt.fn.getValue.call(this,e);return null!==t?p(t):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n,i,o=this.options,r=e*o.majorUnit,s=o.min;return r>0&&(s=m(s,r,o.baseUnit)),n=t.dateFormats[o.baseUnit],t.format=t.format||n,i=this.axisLabelText(s,null,t),new Vt(s,i,e,null,t)},timeUnits:function(e){var t=Ti;return e>=Oo?t=nr:e>=Lo?t=Gi:e>=zo?t=Zo:e>=Fo&&(t=ni),t},translateRange:function(e,t){var n=this,i=n.options,o=i.baseUnit,r=i.weekStartDay,s=n.lineBox(),a=i.vertical?s.height():s.width(),l=n.range(),c=a/(l.max-l.min),u=dn(e/c,ri),h=b(i.min,u),d=b(i.max,u);return t||(h=m(h,0,o,r),d=m(d,0,o,r)),{min:h,max:d}},scaleRange:function(e){for(var t,n,i=this,o=i.options,r=Tt.abs(e),s=o.min,a=o.max;r--;)t=w(s,a),n=Tt.round(.1*t),0>e?(s=b(s,n),a=b(a,-n)):(s=b(s,-n),a=b(a,n));return{min:s,max:a}},shouldRenderNote:function(e){var t=this.range();return an(e,t.min)>=0&&an(e,t.max)<=0},pan:function(e){var n=this.translateRange(e,!0),i=this.limitRange(g(n.min),g(n.max),this.totalMin,this.totalMax);return i?{min:p(i.min),max:p(i.max)}:t},pointsRange:function(e,t){var n=this.getValue(e),i=this.getValue(t),o=Tt.min(n,i),r=Tt.max(n,i);return{min:p(o),max:p(r)}},zoomRange:function(e){var t=this.scaleRange(e),n=p(vn(g(t.min),this.totalMin,this.totalMax)),i=p(vn(g(t.max),this.totalMin,this.totalMax));return{min:n,max:i}}}),re=jt.extend({options:{vertical:!1,gap:0,spacing:0},reflow:function(e){var t,n,i=this,o=i.options,r=o.vertical,s=r?tr:er,a=i.children,l=o.gap,c=o.spacing,u=a.length,h=u+l+c*(u-1),d=(r?e.height():e.width())/h,f=e[s+1]+d*(l/2);for(n=0;u>n;n++)t=(a[n].box||e).clone(),t[s+1]=f,t[s+2]=f+d,a[n].reflow(t),u-1>n&&(f+=d*c),f+=d}}),se=jt.extend({options:{vertical:!0},reflow:function(e){var t,n,i,o=this.options,r=o.vertical,s=r?er:tr,a=this.children,l=this.box=new Ut,c=a.length;for(t=0;c>t;t++)n=a[t],n.visible!==!1&&(i=n.box.clone(),i.snapTo(e,s),0===t&&(l=this.box=i.clone()),n.reflow(i),l.wrap(i))}}),ae={click:function(e,t){return e.trigger(ko,this.eventArgs(t))},hover:function(e,t){return e.trigger(Co,this.eventArgs(t))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:e((t||{}).target),originalEvent:t,point:this}}},le={createNote:function(){var e=this,t=e.options.notes,n=e.noteText||t.label.text;t.visible!==!1&&gn(n)&&null!==n&&(e.note=new Yt(e.value,n,e.dataItem,e.category,e.series,e.options.notes),e.append(e.note))}},ce=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n),n.options=t,n.color=t.color||Jo,n.aboveAxis=xn(n.options.aboveAxis,!0),n.value=e},defaults:{border:{width:1},vertical:!0,overlay:{gradient:ki},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var e,t,n=this.options,i=n.labels;i.visible&&(i.template?(t=Ot(i.template),e=t({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):e=this.formatValue(i.format),this.label=new Z(e,Ft({vertical:n.vertical},n.labels)),this.append(this.label))},formatValue:function(e){return this.owner.formatPointValue(this,e)},reflow:function(e){var t,n,i;if(this.render(),t=this,n=t.label,t.box=e,n&&(n.options.aboveAxis=t.aboveAxis,n.reflow(e)),t.note&&t.note.reflow(e),t.errorBars)for(i=0;t.errorBars.length>i;i++)t.errorBars[i].reflow(e)},createVisual:function(){var e,t=this,n=t.box,i=t.options,o=i.visual;t.visible!==!1&&(jt.fn.createVisual.call(t),o?(e=this.rectVisual=o({category:t.category,dataItem:t.dataItem,value:t.value,sender:t.getChart(),series:t.series,percentage:t.percentage,runningTotal:t.runningTotal,total:t.total,rect:n.toRect(),createVisual:function(){var e=new Cn.Group;return t.createRect(e),e},options:i}),e&&t.visual.append(e)):n.width()>0&&n.height()>0&&t.createRect(t.visual))},createRect:function(e){var n,i,o,r,s=this.options,a=s.border,l=gn(a.opacity)?a.opacity:s.opacity,c=this.box.toRect();c.size.width=Math.round(c.size.width),n=this.rectVisual=Cn.Path.fromRect(c,{fill:{color:this.color,opacity:s.opacity},stroke:{color:this.getBorderColor(),width:a.width,opacity:l,dashType:a.dashType}}),i=this.box.width(),o=this.box.height(),r=s.vertical?i:o,r>In&&(rn(n),(1>i||1>o)&&(n.options.stroke.lineJoin="round")),e.append(n),W(s)&&e.append(this.createGradientOverlay(n,{baseColor:this.color},Ft({end:s.vertical?t:[0,1]},s.overlay)))},createHighlight:function(e){var t=Cn.Path.fromRect(this.box.toRect(),e);return rn(t)},highlightVisual:function(){return this.rectVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},getBorderColor:function(){var e=this,t=e.options,n=e.color,i=t.border,o=i.color,r=i._brightness||Rn;return gn(o)||(o=new Gt(n).brightness(r).toHex()),o},tooltipAnchor:function(e,t){var n,i,o,r,s=this,a=s.options,l=s.box,c=a.vertical,u=s.aboveAxis,h=s.owner.pane.clipBox()||l;return c?(n=l.x2+Wo,i=u?Tt.max(l.y1,h.y1):Tt.min(l.y2,h.y2)-t):(o=Tt.max(l.x1,h.x1),r=Tt.min(l.x2,h.x2),a.isStacked?(n=u?r-e:o,i=l.y1-t-Wo):(n=u?r+Wo:o-e-Wo,i=l.y1)),new Qt(n,i)}}),Ft(ce.fn,ae),Ft(ce.fn,le),ue=Cn.Animation.extend({options:{duration:Di},setup:function(){var e,t,n=this.element,i=this.options,o=n.bbox();o?(this.origin=i.origin,e=i.vertical?tr:er,t=this.fromScale=new kn.Point(1,1),t[e]=So,n.transform(kn.transform().scale(t.x,t.y))):this.abort()},step:function(e){var t=un(this.fromScale.x,1,e),n=un(this.fromScale.y,1,e);this.element.transform(kn.transform().scale(t,n,this.origin))},abort:function(){Cn.Animation.fn.abort.call(this),this.element.transform(null)}}),Cn.AnimationFactory.current.register(Pn,ue),he=Cn.Animation.extend({options:{duration:200,easing:Li},setup:function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},step:function(e){this.element.opacity(e*this.fadeTo)}}),Cn.AnimationFactory.current.register(yi,he),de=function(e,t,n){var i=this;i.initGlobalRanges(e,t,n)},de.prototype=de.fn={percentRegex:/percent(?:\w*)\((\d+)\)/,standardDeviationRegex:RegExp("^"+Mo+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),initGlobalRanges:function(e,t,n){var i,o,r,s,a,l=this,c=t.data,u=l.standardDeviationRegex.exec(e);u?(l.valueGetter=l.createValueGetter(t,n),i=l.getAverage(c),o=l.getStandardDeviation(c,i,!1),r=u[1]?parseFloat(u[1]):1,s={low:i.value-o*r,high:i.value+o*r},l.globalRange=function(){return s}):e.indexOf&&e.indexOf(Ao)>=0&&(l.valueGetter=l.createValueGetter(t,n),a=l.getStandardError(c,l.getAverage(c)),l.globalRange=function(e){return{low:e-a,high:e+a}})},createValueGetter:function(e,t){var n,i,o,r=e.data,s=Q.current,a=s.valueFields(e),l=gn(r[0])?r[0]:{};return kt(l)?(n=t?z(t,a):0,o=zt("["+n+"]")):M(l)?o=zt():typeof l===io&&(i=s.sourceFields(e,a),o=zt(i[z(t,a)])),o},getErrorRange:function(e,t){var n,i,o,r,s=this;if(gn(t)){if(s.globalRange)return s.globalRange(e);if(kt(t))n=e-t[0],i=e+t[1];else if(M(o=parseFloat(t)))n=e-o,i=e+o;else{if(!(o=s.percentRegex.exec(t)))throw Error("Invalid ErrorBar value: "+t);r=e*(parseFloat(o[1])/100),n=e-Tt.abs(r),i=e+Tt.abs(r)}return{low:n,high:i}}},getStandardError:function(e,t){return this.getStandardDeviation(e,t,!0)/Tt.sqrt(t.count)},getStandardDeviation:function(e,t,n){var i,o,r=0,s=e.length,a=n?t.count-1:t.count;for(o=0;s>o;o++)i=this.valueGetter(e[o]),M(i)&&(r+=Tt.pow(i-t.value,2));return Tt.sqrt(r/a)},getAverage:function(e){var t,n,i=0,o=0,r=e.length;for(n=0;r>n;n++)t=this.valueGetter(e[n]),M(t)&&(i+=t,o++);return{value:i/o,count:o}}},fe=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),n.plotArea=e,n.categoryAxis=e.seriesCategoryAxis(t.series[0]),n.valueAxisRanges={},n.points=[],n.categoryPoints=[],n.seriesPoints=[],n.seriesOptions=[],n._evalSeries=[],n.render()},options:{series:[],invertAxes:!1,isStacked:!1,clip:!0},render:function(){var e=this;e.traverseDataPoints(Mt(e.addValue,e))},pointOptions:function(e,t){var n,i=this.seriesOptions[t];return i||(n=this.pointType().fn.defaults,this.seriesOptions[t]=i=Ft({},n,{vertical:!this.options.invertAxes},e)),i},plotValue:function(e){var t,n,i,o,r,s,a,l;if(!e)return 0;if(this.options.isStacked100&&M(e.value)){for(t=e.categoryIx,n=this.categoryPoints[t],i=0,o=[],r=0;n.length>r;r++)if(s=n[r]){if(a=e.series.stack,l=s.series.stack,a&&l&&a.group!==l.group)continue;M(s.value)&&(i+=Tt.abs(s.value),o.push(Tt.abs(s.value)))}if(i>0)return e.value/i}return e.value},plotRange:function(e,t){var n,i,o,r,s,a,l,c,u,h,d,f,p=e.categoryIx,g=this.categoryPoints[p];if(this.options.isStacked){for(t=t||0,n=this.plotValue(e),i=n>=0,o=t,r=!1,s=0;g.length>s&&(a=g[s],e!==a);s++){if(l=e.series.stack,c=a.series.stack,l&&c){if(typeof l===Eo&&l!==c)continue;if(l.group&&l.group!==c.group)continue}u=this.plotValue(a),(u>=0&&i||0>u&&!i)&&(o+=u,
|
|
n+=u,r=!0,this.options.isStacked100&&(n=Tt.min(n,1)))}return r&&(o-=t),[o,n]}return h=e.series,d=this.seriesValueAxis(h),f=this.categoryAxisCrossingValue(d),[f,e.value||f]},stackLimits:function(e,t){var n,i,o,r,s,a=Vi,l=Wi;for(n=0;this.categoryPoints.length>n;n++)for(i=this.categoryPoints[n],o=0;i.length>o;o++)r=i[o],r&&(r.series.stack===t||r.series.axis===e)&&(s=this.plotRange(r,0)[1],gn(s)&&isFinite(s)&&(l=Tt.max(l,s),a=Tt.min(a,s)));return{min:a,max:l}},updateStackRange:function(){var e,t,n,i,o,r,s=this,a=s.options.series,l=s.options.isStacked,c={};if(l)for(t=0;a.length>t;t++)n=a[t],i=n.axis,o=i+n.stack,e=c[o],e||(e=s.stackLimits(i,n.stack),r=s.errorTotals,r&&(r.negative.length&&(e.min=Tt.min(e.min,yn(r.negative))),r.positive.length&&(e.max=Tt.max(e.max,wn(r.positive)))),e.min!==Vi||e.max!==Wi?c[o]=e:e=null),e&&(s.valueAxisRanges[i]=e)},addErrorBar:function(e,t,n){var i,o=this,r=e.value,s=e.series,a=e.seriesIx,l=e.options.errorBars,c=t.fields[fi],u=t.fields[pi];M(c)&&M(u)?i={low:c,high:u}:l&&gn(l.value)&&(o.seriesErrorRanges=o.seriesErrorRanges||[],o.seriesErrorRanges[a]=o.seriesErrorRanges[a]||new de(l.value,s,$o),i=o.seriesErrorRanges[a].getErrorRange(r,l.value)),i&&(e.low=i.low,e.high=i.high,o.addPointErrorBar(e,n))},addPointErrorBar:function(e,t){var n,i,o,r=this,s=e.series,a=e.low,l=e.high,c=!r.options.invertAxes,u=e.options.errorBars;r.options.isStacked?(i=r.stackedErrorRange(e,t),a=i.low,l=i.high):(o={categoryIx:t,series:s},r.updateRange({value:a},o),r.updateRange({value:l},o)),n=new be(a,l,c,r,s,u),e.errorBars=[n],e.append(n)},stackedErrorRange:function(e,t){var n=this,i=n.plotRange(e,0)[1]-e.value,o=e.low+i,r=e.high+i;return n.errorTotals=n.errorTotals||{positive:[],negative:[]},0>o&&(n.errorTotals.negative[t]=Tt.min(n.errorTotals.negative[t]||0,o)),r>0&&(n.errorTotals.positive[t]=Tt.max(n.errorTotals.positive[t]||0,r)),{low:o,high:r}},addValue:function(t,n){var i,o,r=this,s=n.categoryIx,a=n.series,l=n.seriesIx,c=r.categoryPoints[s];c||(r.categoryPoints[s]=c=[]),i=r.seriesPoints[l],i||(r.seriesPoints[l]=i=[]),o=r.createPoint(t,n),o&&(e.extend(o,n),o.owner=r,o.dataItem=a.data[s],o.noteText=t.fields.noteText,r.addErrorBar(o,t,s)),r.points.push(o),i.push(o),c.push(o),r.updateRange(t.valueFields,n)},evalPointOptions:function(e,t,n,i,o,r){var s={defaults:o._defaults,excluded:["data","aggregate","_events","tooltip","template","visual","toggle"]},a=this._evalSeries[r];return gn(a)||(this._evalSeries[r]=a=R(e,{},s,!0)),a&&(e=Ft({},e),R(e,{value:t,category:n,index:i,series:o,dataItem:o.data[i]},s)),e},updateRange:function(e,t){var n=this,i=t.series.axis,o=e.value,r=n.valueAxisRanges[i];isFinite(o)&&null!==o&&(r=n.valueAxisRanges[i]=r||{min:Vi,max:Wi},r.min=Tt.min(r.min,o),r.max=Tt.max(r.max,o))},seriesValueAxis:function(e){var t=this.plotArea,n=e.axis,i=n?t.namedValueAxes[n]:t.valueAxis;if(!i)throw Error("Unable to locate value axis with name "+n);return i},reflow:function(e){var t,n,i,o=this,r=0,s=o.categorySlots=[],a=o.points,l=o.categoryAxis;o.traverseDataPoints(function(e,c){var u,h,d,f,p=c.categoryIx,g=c.series;t=o.pointValue(e),n=o.seriesValueAxis(g),i=a[r++],u=s[p],u||(s[p]=u=o.categorySlot(l,p,n)),i&&(h=o.plotRange(i,n.startValue()),d=n.getSlot(h[0],h[1],!o.options.clip),d?(f=o.pointSlot(u,d),i.aboveAxis=o.aboveAxis(i,n),o.options.isStacked100&&(i.percentage=o.plotValue(i)),o.reflowPoint(i,f)):i.visible=!1)}),o.reflowCategories(s),o.box=e},aboveAxis:function(e,t){var n=this.categoryAxisCrossingValue(t),i=e.value;return t.options.reverse?n>i:i>=n},categoryAxisCrossingValue:function(e){var t=this.categoryAxis,n=e.options,i=[].concat(n.axisCrossingValues||n.axisCrossingValue);return i[t.axisIndex||0]||0},reflowPoint:function(e,t){e.reflow(t)},reflowCategories:function(){},pointSlot:function(e,t){var n=this,i=n.options,o=i.invertAxes,r=o?t:e,s=o?e:t;return new Ut(r.x1,s.y1,r.x2,s.y2)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,n,i,o,r,s=this,a=s.options,l=a.series,c=s.categoryAxis.options.categories||[],h=u(l),d=l.length;for(t=0;h>t;t++)for(n=0;d>n;n++)r=l[n],o=c[t],i=this._bindPoint(r,n,t),e(i,{category:o,categoryIx:t,series:r,seriesIx:n})},_bindPoint:function(e,t,n){var i,o;return this._bindCache||(this._bindCache=[]),i=this._bindCache[t],i||(i=this._bindCache[t]=[]),o=i[n],o||(o=i[n]=Q.current.bindPoint(e,n)),o},formatPointValue:function(e,t){return null===e.value?"":sn(t,e.value)},pointValue:function(e){return e.valueFields.value}}),pe=fe.extend({options:{animation:{type:Pn}},render:function(){var e=this;fe.fn.render.apply(e),e.updateStackRange()},pointType:function(){return ce},clusterType:function(){return re},stackType:function(){return se},stackLimits:function(e,t){var n=fe.fn.stackLimits.call(this,e,t);return n},createPoint:function(e,t){var n,i,o,r,s=this,a=t.categoryIx,l=t.category,c=t.series,u=t.seriesIx,h=s.pointValue(e),d=s.options,f=s.children,p=s.options.isStacked,g=s.pointType(),m=s.clusterType(),v=this.pointOptions(c,u),_=v.labels;return p&&_.position==ro&&(_.position=Mi),v.isStacked=p,o=e.fields.color||c.color,0>h&&v.negativeColor&&(o=v.negativeColor),v=s.evalPointOptions(v,h,l,a,c,u),Et.isFunction(c.color)&&(o=v.color),n=new g(h,v),n.color=o,i=f[a],i||(i=new m({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing}),s.append(i)),p?(r=s.getStackWrap(c,i),r.append(n)):i.append(n),n},getStackWrap:function(e,t){var n,i,o,r=e.stack,s=r?r.group||r:r,a=t.children;if(typeof s===Eo){for(i=0;a.length>i;i++)if(a[i]._stackGroup===s){n=a[i];break}}else n=a[0];return n||(o=this.stackType(),n=new o({vertical:!this.options.invertAxes}),n._stackGroup=s,t.append(n)),n},categorySlot:function(e,t,n){var i,o,r=this,s=r.options,a=e.getSlot(t),l=n.startValue();return s.isStacked&&(o=n.getSlot(l,l,!0),i=s.invertAxes?er:tr,a[i+1]=a[i+2]=o[i+1]),a},reflowCategories:function(e){var t,n=this,i=n.children,o=i.length;for(t=0;o>t;t++)i[t].reflow(e[t])},createAnimation:function(){this._setAnimationOptions(),jt.fn.createAnimation.call(this),j(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var e,t,n,i=this.points;for(n=0;i.length>n;n++)e=i[n],t=e.visual,t&&gn(t.options.zIndex)&&(e.options.animation=this.options.animation,e.createAnimation())},_setAnimationOptions:function(){var e,t,n=this.options,i=n.animation||{};this.options.isStacked?(t=this.seriesValueAxis(n.series[0]),e=t.getSlot(t.startValue())):e=this.categoryAxis.getSlot(0),i.origin=new kn.Point(e.x1,e.y1),i.vertical=!n.invertAxes}}),ge=ce.extend({defaults:{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}},createLabel:function(){var e=this.options.labels,t=Ft({},e,e.from),n=Ft({},e,e.to);t.visible&&(this.labelFrom=this._createLabel(t),this.append(this.labelFrom)),n.visible&&(this.labelTo=this._createLabel(n),this.append(this.labelTo))},_createLabel:function(e){var t,n;return e.template?(n=Ot(e.template),t=n({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):t=this.formatValue(e.format),new Z(t,Ft({vertical:this.options.vertical},e))},reflow:function(e){this.render();var t=this,n=t.labelFrom,i=t.labelTo;t.box=e,n&&(n.options.aboveAxis=t.value.from>t.value.to,n.reflow(e)),i&&(i.options.aboveAxis=t.value.to>t.value.from,i.reflow(e)),t.note&&t.note.reflow(e)}}),me=pe.extend({pointType:function(){return ge},pointValue:function(e){return e.valueFields},formatPointValue:function(e,t){return null===e.value.from&&null===e.value.to?"":sn(t,e.value.from,e.value.to)},plotLimits:fe.fn.plotLimits,plotRange:function(e){return e?[e.value.from,e.value.to]:0},updateRange:function(e,t){var n=this,i=t.series.axis,o=e.from,r=e.to,s=n.valueAxisRanges[i];null!==e&&M(o)&&M(r)&&(s=n.valueAxisRanges[i]=s||{min:Vi,max:Wi},s.min=Tt.min(s.min,o),s.max=Tt.max(s.max,o),s.min=Tt.min(s.min,r),s.max=Tt.max(s.max,r))},aboveAxis:function(e){var t=e.value;return t.to>t.from}}),ve=fe.extend({init:function(e,t){var n=this;n.wrapData(t),fe.fn.init.call(n,e,t)},options:{animation:{type:Pn}},wrapData:function(e){var t,n,i,o=e.series;for(t=0;o.length>t;t++)i=o[t],n=i.data,n&&!kt(n[0])&&typeof n[0]!=io&&(i.data=[n])},reflowCategories:function(e){var t,n=this,i=n.children,o=i.length;for(t=0;o>t;t++)i[t].reflow(e[t])},plotRange:function(e){var t=e.series,n=this.seriesValueAxis(t),i=this.categoryAxisCrossingValue(n);return[i,e.value.current||i]},createPoint:function(e,t){var n,i,o=this,r=t.categoryIx,s=t.category,a=t.series,l=t.seriesIx,c=e.valueFields,u=o.options,h=o.children,d=Ft({vertical:!u.invertAxes,overlay:a.overlay,categoryIx:r,invertAxes:u.invertAxes},a),f=e.fields.color||a.color;return d=o.evalPointOptions(d,c,s,r,a,l),Et.isFunction(a.color)&&(f=d.color),n=new _e(c,d),n.color=f,i=h[r],i||(i=new re({vertical:u.invertAxes,gap:u.gap,spacing:u.spacing}),o.append(i)),i.append(n),n},updateRange:function(e,t){var n=this,i=t.series.axis,o=e.current,r=e.target,s=n.valueAxisRanges[i];gn(o)&&!isNaN(o)&&gn(r&&!isNaN(r))&&(s=n.valueAxisRanges[i]=s||{min:Vi,max:Wi},s.min=Tt.min.apply(Tt,[s.min,o,r]),s.max=Tt.max.apply(Tt,[s.max,o,r]))},formatPointValue:function(e,t){return sn(t,e.value.current,e.value.target)},pointValue:function(e){return e.valueFields.current},aboveAxis:function(e){var t=e.value.current;return t>0},createAnimation:function(){var e,t,n=this.points;for(this._setAnimationOptions(),t=0;n.length>t;t++)e=n[t],e.options.animation=this.options.animation,e.createAnimation()},_setAnimationOptions:pe.fn._setAnimationOptions}),_e=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),n.aboveAxis=n.options.aboveAxis,n.color=t.color||Jo,n.value=e},options:{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}</br>Target: {1}"}},render:function(){var e=this,t=e.options;e._rendered||(e._rendered=!0,gn(e.value.target)&&(e.target=new ye({type:t.target.shape,background:t.target.color||e.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:Vo,align:po}),e.append(e.target)),e.createNote())},reflow:function(e){this.render();var t,n=this,i=n.options,o=n.owner,r=n.target,s=i.invertAxes,a=o.seriesValueAxis(n.options),l=o.categorySlot(o.categoryAxis,i.categoryIx,a),c=a.getSlot(n.value.target),u=s?c:l,h=s?l:c;r&&(t=new Ut(u.x1,h.y1,u.x2,h.y2),r.options.height=s?t.height():i.target.line.width,r.options.width=s?i.target.line.width:t.width(),r.reflow(t)),n.note&&n.note.reflow(e),n.box=e},createVisual:function(){var e,t;jt.fn.createVisual.call(this),e=this.options,t=Cn.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null}),e.border.width>0&&t.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:xn(e.border.opacity,e.opacity)}),this.bodyVisual=t,rn(t),this.visual.append(t)},createAnimation:function(){this.bodyVisual&&(this.animation=Cn.Animation.create(this.bodyVisual,this.options.animation))},tooltipAnchor:function(e,t){var n,i,o,r,s=this,a=s.options,l=s.box,c=a.vertical,u=s.aboveAxis,h=s.owner.pane.clipBox()||l;return c?(n=l.x2+Wo,i=u?Tt.max(l.y1,h.y1):Tt.min(l.y2,h.y2)-t):(o=Tt.max(l.x1,h.x1),r=Tt.min(l.x2,h.x2),a.isStacked?(n=u?r-e:o,i=l.y1-t-Wo):(n=u?r+Wo:o-e-Wo,i=l.y1)),new Qt(n,i)},createHighlight:function(e){return Cn.Path.fromRect(this.box.toRect(),e)},highlightVisual:function(){return this.bodyVisual},highlightVisualArgs:function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Ft(_e.fn,ae),Ft(_e.fn,le),ye=en.extend(),Ft(ye.fn,ae),we=jt.extend({init:function(e,t,n,i,o,r){var s=this;s.low=e,s.high=t,s.isVertical=n,s.chart=i,s.series=o,jt.fn.init.call(s,r)},options:{animation:{type:yi,delay:Di},endCaps:!0,line:{width:1},zIndex:1},getAxis:function(){},reflow:function(e){var t,n=this,i=n.options.endCaps,o=n.isVertical,r=n.getAxis(),s=r.getSlot(n.low,n.high),a=e.center(),l=n.getCapsWidth(e,o),c=o?a.x:a.y,u=c-l,h=c+l;o?(t=[Qt(a.x,s.y1),Qt(a.x,s.y2)],i&&t.push(Qt(u,s.y1),Qt(h,s.y1),Qt(u,s.y2),Qt(h,s.y2)),n.box=Ut(u,s.y1,h,s.y2)):(t=[Qt(s.x1,a.y),Qt(s.x2,a.y)],i&&t.push(Qt(s.x1,u),Qt(s.x1,h),Qt(s.x2,u),Qt(s.x2,h)),n.box=Ut(s.x1,u,s.x2,h)),n.linePoints=t},getCapsWidth:function(e,t){var n=t?e.width():e.height(),i=Tt.min(Tt.floor(n/2),ai)||ai;return i},createVisual:function(){var e=this,t=e.options,n=t.visual;n?e.visual=n({low:e.low,high:e.high,rect:e.box.toRect(),sender:e.getChart(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):e.createDefaultVisual()},createDefaultVisual:function(){var e,t,n=this,i=n.options,o={stroke:{color:i.color,width:i.line.width,dashType:i.line.dashType}},r=n.linePoints;for(jt.fn.createVisual.call(this),e=0;r.length>e;e+=2)t=new Cn.Path(o).moveTo(r[e].x,r[e].y).lineTo(r[e+1].x,r[e+1].y),this.visual.append(t)}}),be=we.extend({getAxis:function(){var e=this,t=e.chart,n=e.series,i=t.seriesValueAxis(n);return i}}),xe=we.extend({getAxis:function(){var e=this,t=e.chart,n=e.series,i=t.seriesAxes(n),o=e.isVertical?i.y:i.x;return o}}),ke=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n),n.value=e,n.options=t,n.aboveAxis=xn(n.options.aboveAxis,!0),n.tooltipTracking=!0},defaults:{vertical:!0,markers:{visible:!0,background:Jo,size:zi,type:Gn,border:{width:2},opacity:1},labels:{visible:!1,position:Tn,margin:ln(3),padding:ln(4),animation:{type:yi,delay:Di}},notes:{label:{}},highlight:{markers:{border:{}}}},render:function(){var e,t=this,n=t.options,i=n.markers,o=n.labels,r=t.value;t._rendered||(t._rendered=!0,i.visible&&i.size&&(t.marker=t.createMarker(),t.append(t.marker)),o.visible&&(o.template?(e=Ot(o.template),r=e({dataItem:t.dataItem,category:t.category,value:t.value,percentage:t.percentage,series:t.series})):o.format&&(r=t.formatValue(o.format)),t.label=new nn(r,Ft({align:Wn,vAlign:Wn,margin:{left:5,right:5},zIndex:xn(o.zIndex,this.series.zIndex)},o)),t.append(t.label)),t.createNote(),t.errorBar&&t.append(t.errorBar))},markerBorder:function(){var e=this.options.markers,t=e.background,n=Ft({color:this.color},e.border);return gn(n.color)||(n.color=new Gt(t).brightness(Rn).toHex()),n},createVisual:Dt,createMarker:function(){var e=this.options.markers,t=new en({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:this.markerBorder(),opacity:e.opacity,zIndex:xn(e.zIndex,this.series.zIndex),animation:e.animation,visual:e.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});return t},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(e){var t,n,i,o,r=this,s=r.options,a=s.vertical,l=r.aboveAxis;if(r.render(),r.box=e,t=e.clone(),a?l?t.y1-=t.height():t.y2+=t.height():l?t.x1+=t.width():t.x2-=t.width(),r._childBox=t,r.marker&&r.marker.reflow(t),r.reflowLabel(t),r.errorBars)for(i=0;r.errorBars.length>i;i++)r.errorBars[i].reflow(t);r.note&&(o=r.markerBox(),r.marker||(n=o.center(),o=Ut(n.x,n.y,n.x,n.y)),r.note.reflow(o))},reflowLabel:function(e){var t=this,n=t.options,i=t.label,o=n.labels.position;i&&(o=o===Tn?Vo:o,o=o===Bn?Ln:o,i.reflow(e),i.box.alignTo(t.markerBox(),o),i.reflow(i.box))},createHighlight:function(){var e=this.options.highlight,t=e.markers,n=this.markerBorder().color,i=this.options.markers,o=new en({type:i.type,width:i.size,height:i.size,rotation:i.rotation,background:t.color||n,border:{color:t.border.color,width:t.border.width,opacity:xn(t.border.opacity,1)},opacity:xn(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var e,t,n,i,o,r=this.marker;return r?(t=r.paddingBox.toRect(),e=r.visual):(n=this.options.markers.size,i=n/2,o=this.box.center(),t=new kn.Rect([o.x-i,o.y-i],[n,n])),{options:this.options,rect:t,visual:e}},tooltipAnchor:function(e,n){var i=this,o=i.markerBox(),r=i.aboveAxis,s=o.x2+Wo,a=r?o.y1-n:o.y2,l=i.owner.pane.clipBox(),c=!l||l.overlaps(o);return c?Qt(s,a):t},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Ft(ke.fn,ae),Ft(ke.fn,le),Ce=ke.extend({init:function(e,t){var n=this;ke.fn.init.call(n,e,t),n.category=e.category},defaults:{labels:{position:Wn},highlight:{opacity:1,border:{width:1,opacity:1}}},createHighlight:function(){var e=this.options.highlight,t=e.border,n=this.options.markers,i=this.box.center(),o=n.size/2-t.width/2,r=new Cn.Circle(new kn.Circle([i.x,i.y],o),{stroke:{color:t.color||new Gt(n.background).brightness(Rn).toHex(),width:t.width,opacity:t.opacity},fill:{color:n.background,opacity:e.opacity}});return r}}),Se=jt.extend({init:function(e,t,n){var i=this;jt.fn.init.call(i),i.linePoints=e,i.series=t,i.seriesIx=n},options:{closed:!1},points:function(e){var t,n,i=this,o=i.linePoints.concat(e||[]),r=[];for(t=0,n=o.length;n>t;t++)o[t].visible!==!1&&r.push(o[t]._childBox.toRect().center());return r},createVisual:function(){var e,t=this.options,n=this.series,i=n._defaults,o=n.color;Lt(o)&&i&&(o=i.color),e=Cn.Path.fromPoints(this.points(),{stroke:{color:o,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),t.closed&&e.close(),this.visual=e},aliasFor:function(e,t){var n=this,i=n.seriesIx;return n.parent.getNearestPoint(t.x,t.y,i)}}),Te={renderSegments:function(){var e,t,n,i,o,r,s,a,l=this,c=l.options,u=c.series,h=l.seriesPoints,d=h.length;for(this._segments=[],t=0;d>t;t++){for(e=u[t],n=l.sortPoints(h[t]),s=n.length,i=[],r=0;s>r;r++)o=n[r],o?i.push(o):l.seriesMissingValues(e)!==Ei&&(i.length>1&&(a=l.createSegment(i,e,t,a),this._addSegment(a)),i=[]);i.length>1&&(a=l.createSegment(i,e,t,a),this._addSegment(a))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(e){this._segments.push(e),e.parent=this},sortPoints:function(e){return e},seriesMissingValues:function(e){var t=e.missingValues,n=!t&&this.options.isStacked;return n?ir:t||Ei},getNearestPoint:function(e,t,n){var i,o,r,s,a,l=new Qt(e,t),c=this.seriesPoints[n],u=Vi;for(o=0;c.length>o;o++)r=c[o],r&&gn(r.value)&&null!==r.value&&r.visible!==!1&&(s=r.box,a=s.center().distanceTo(l),u>a&&(i=r,u=a));return i}},De={createAnimation:function(){var e,t,n=this.getRoot();n&&(n.options||{}).transitions!==!1&&(e=n.box,t=Cn.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Me(t,{box:e}),j(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(e){var t,n,i=this.animationPoints();for(n=0;i.length>n;n++)t=i[n],t&&t.visual&&gn(t.visual.options.zIndex)&&t.visual.clip(e)}},Ae=fe.extend({render:function(){var e=this;fe.fn.render.apply(e),e.updateStackRange(),e.renderSegments()},pointType:function(){return ke},createPoint:function(e,t){var n,i,o,r=this,s=t.categoryIx,a=t.category,l=t.series,c=t.seriesIx,u=e.valueFields.value,h=r.seriesMissingValues(l);if(!gn(u)||null===u){if(h!==ir)return null;u=0}return i=this.pointOptions(l,c),i=r.evalPointOptions(i,u,a,s,l,c),o=e.fields.color||l.color,Et.isFunction(l.color)&&(o=i.color),n=new ke(u,i),n.color=o,r.append(n),n},plotRange:function(e){var t,n,i,o,r=this.plotValue(e);if(this.options.isStacked)for(t=e.categoryIx,n=this.categoryPoints[t],i=0;n.length>i&&(o=n[i],e!==o);i++)r+=this.plotValue(o);return[r,r]},createSegment:function(e,t,n){var i,o=t.style;return new(i=o===To?Ee:o===Do?Pe:Se)(e,t,n)},animationPoints:function(){var e,t=this.points,n=[];for(e=0;t.length>e;e++)n.push((t[e]||{}).marker);return n.concat(this._segments)}}),Ft(Ae.fn,Te,De),Me=Cn.Animation.extend({options:{duration:Di},setup:function(){this._setEnd(this.options.box.x1)},step:function(e){var t=this.options.box;this._setEnd(un(t.x1,t.x2,e))},_setEnd:function(e){var t=this.element,n=t.segments,i=n[1].anchor(),o=n[2].anchor();t.suspend(),i.setX(e),t.resume(),o.setX(e)}}),Cn.AnimationFactory.current.register($n,Me),Ee=Se.extend({points:function(e){var t,n=this;return t=n.calculateStepPoints(n.linePoints),e&&e.length&&(t=t.concat(n.calculateStepPoints(e).reverse())),t},calculateStepPoints:function(e){var t,n,i,o,r,s=this,a=s.parent,l=a.plotArea,c=l.seriesCategoryAxis(s.series),u=a.seriesMissingValues(s.series)===Ei,h=e.length,d=c.options.reverse,f=c.options.vertical,p=d?2:1,g=d?1:2,m=[];for(i=1;h>i;i++)t=e[i-1],n=e[i],o=t.markerBox().center(),r=n.markerBox().center(),c.options.justified?(m.push(new kn.Point(o.x,o.y)),m.push(f?new kn.Point(o.x,r.y):new kn.Point(r.x,o.y)),m.push(new kn.Point(r.x,r.y))):f?(m.push(new kn.Point(o.x,t.box[tr+p])),m.push(new kn.Point(o.x,t.box[tr+g])),u&&m.push(new kn.Point(o.x,n.box[tr+p])),m.push(new kn.Point(r.x,n.box[tr+p])),m.push(new kn.Point(r.x,n.box[tr+g]))):(m.push(new kn.Point(t.box[er+p],o.y)),m.push(new kn.Point(t.box[er+g],o.y)),u&&m.push(new kn.Point(n.box[er+p],o.y)),m.push(new kn.Point(n.box[er+p],r.y)),m.push(new kn.Point(n.box[er+g],r.y)));return m||[]}}),Pe=Se.extend({createVisual:function(){var e,t,n,i=this.series,o=i._defaults,r=i.color;Lt(r)&&o&&(r=o.color),e=new qt(this.options.closed),t=e.process(this.points()),n=new Cn.Path({stroke:{color:r,width:i.width,opacity:i.opacity,dashType:i.dashType},zIndex:i.zIndex}),n.segments.push.apply(n.segments,t),this.visual=n}}),Ie={points:function(){var e,t,n=this,i=n.parent,o=i.plotArea,r=i.options.invertAxes,s=i.seriesValueAxis(n.series),a=s.lineBox(),l=o.seriesCategoryAxis(n.series),c=l.lineBox(),u=r?c.x1:c.y1,h=n.stackPoints,d=n._linePoints(h),f=r?er:tr;return u=vn(u,a[f+1],a[f+2]),!n.stackPoints&&d.length>1&&(e=d[0],t=mn(d),r?(d.unshift(new kn.Point(u,e.y)),d.push(new kn.Point(u,t.y))):(d.unshift(new kn.Point(e.x,u)),d.push(new kn.Point(t.x,u)))),d},createVisual:function(){var e=this.series,t=e._defaults,n=e.color;Lt(n)&&t&&(n=t.color),this.visual=new Cn.Group({zIndex:e.zIndex}),this.createArea(n),this.createLine(n)},createLine:function(e){var t,n=this.series,i=Ft({color:e,opacity:n.opacity},n.line);i.visible!==!1&&i.width>0&&(t=Cn.Path.fromPoints(this._linePoints(),{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType,lineCap:"butt"}}),this.visual.append(t))},createArea:function(e){var t=this.series,n=Cn.Path.fromPoints(this.points(),{fill:{color:e,opacity:t.opacity},stroke:null});this.visual.append(n)}},Re=Se.extend({init:function(e,t,n,i){var o=this;o.stackPoints=t,Se.fn.init.call(o,e,n,i)},_linePoints:Se.fn.points}),Ft(Re.fn,Ie),Be=Ae.extend({createSegment:function(e,t,n,i){var o,r,s,a=this,l=a.options,c=l.isStacked,u=(t.line||{}).style;return c&&n>0&&i&&(s=this.seriesMissingValues(t),o="gap"!=s?i.linePoints:this._gapStackPoints(e,n,u),u!==To&&(o=o.slice(0).reverse())),u===Do?new Fe(e,i,c,t,n):new(r=u===To?ze:Re)(e,o,t,n)},reflow:function(e){var t,n,i,o;if(Ae.fn.reflow.call(this,e),t=this._stackPoints)for(o=0;t.length>o;o++)n=t[o],i=this.categoryAxis.getSlot(n.categoryIx),n.reflow(i)},_gapStackPoints:function(e,t,n){var i,o,r,s,a=this.seriesPoints,l=e[0].categoryIx,c=l+e.length,u=[];for(this._stackPoints=this._stackPoints||[],s=l;c>s;s++){i=t;do i--,o=a[i][s];while(i>0&&!o);o?(n!==To&&s>l&&!a[i][s-1]&&u.push(this._previousSegmentPoint(s,s-1,i)),u.push(o),n!==To&&c>s+1&&!a[i][s+1]&&u.push(this._previousSegmentPoint(s,s+1,i))):(r=this._createGapStackPoint(s),this._stackPoints.push(r),u.push(r))}return u},_previousSegmentPoint:function(e,t,n){for(var i,o=this.seriesPoints;n>0&&!i;)n--,i=o[n][t];return i?i=o[n][e]:(i=this._createGapStackPoint(e),this._stackPoints.push(i)),i},_createGapStackPoint:function(e){var t=this.pointOptions({},0),n=new ke(0,t);return n.categoryIx=e,n.series={},n},seriesMissingValues:function(e){return e.missingValues||ir}}),Fe=Re.extend({init:function(e,t,n,i,o){var r=this;r.prevSegment=t,r.isStacked=n,Se.fn.init.call(r,e,i,o)},strokeSegments:function(){var e,t,n=this._strokeSegments;return n||(e=new qt(this.options.closed),t=Se.fn.points.call(this),n=this._strokeSegments=e.process(t)),n},createVisual:function(){var e=this.series,t=e._defaults,n=e.color;Lt(n)&&t&&(n=t.color),this.visual=new Cn.Group({zIndex:e.zIndex}),this.createFill({fill:{color:n,opacity:e.opacity},stroke:null}),this.createStroke({stroke:Ft({color:n,opacity:e.opacity,lineCap:"butt"},e.line)})},createFill:function(t){var n,i,o,r,s,a=this.strokeSegments(),l=a.slice(0),c=this.prevSegment;this.isStacked&&c&&(n=c.strokeSegments(),i=mn(n).anchor(),l.push(new Cn.Segment(i,i,mn(a).anchor())),o=e.map(n,function(e){return new Cn.Segment(e.anchor(),e.controlOut(),e.controlIn())}).reverse(),pn(l,o),r=l[0].anchor(),l.push(new Cn.Segment(r,r,mn(o).anchor()))),s=new Cn.Path(t),s.segments.push.apply(s.segments,l),this.closeFill(s),this.visual.append(s)},closeFill:function(e){var t=this,n=t.parent,i=t.prevSegment,o=n.plotArea,r=n.options.invertAxes,s=n.seriesValueAxis(t.series),a=s.lineBox(),l=o.seriesCategoryAxis(t.series),c=l.lineBox(),u=r?c.x1:c.y1,h=r?er:tr,d=t.strokeSegments(),f=d[0].anchor(),p=mn(d).anchor();u=vn(u,a[h+1],a[h+2]),n.options.isStacked&&i||!(d.length>1)||(r?e.lineTo(u,p.y).lineTo(u,f.y):e.lineTo(p.x,u).lineTo(f.x,u))},createStroke:function(e){if(e.stroke.width>0){var t=new Cn.Path(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)}}}),ze=Ee.extend({init:function(e,t,n,i){var o=this;o.stackPoints=t,Ee.fn.init.call(o,e,n,i)},_linePoints:Ee.fn.points}),Ft(ze.fn,Ie),Le=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),n.plotArea=e,n.xAxisRanges={},n.yAxisRanges={},n.points=[],n.seriesPoints=[],n.seriesOptions=[],n._evalSeries=[],n.render()},options:{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0},render:function(){var e=this;e.traverseDataPoints(Mt(e.addValue,e))},addErrorBar:function(e,t,n){var i,o=this,r=e.value[t],s=t+"Value",a=t+"ErrorLow",l=t+"ErrorHigh",c=n.seriesIx,u=n.series,h=e.options.errorBars,d=n[a],f=n[l];M(r)&&(M(d)&&M(f)&&(i={low:d,high:f}),h&&gn(h[s])&&(o.seriesErrorRanges=o.seriesErrorRanges||{x:[],y:[]},o.seriesErrorRanges[t][c]=o.seriesErrorRanges[t][c]||new de(h[s],u,t),i=o.seriesErrorRanges[t][c].getErrorRange(r,h[s])),i&&o.addPointErrorBar(i,e,t))},addPointErrorBar:function(e,t,n){var i,o=this,r=e.low,s=e.high,a=t.series,l=n===tr,c=t.options.errorBars,u={};t[n+"Low"]=r,t[n+"High"]=s,t.errorBars=t.errorBars||[],i=new xe(r,s,l,o,a,c),t.errorBars.push(i),t.append(i),u[n]=r,o.updateRange(u,a),u[n]=s,o.updateRange(u,a)},addValue:function(e,t){var n,i=this,o=e.x,r=e.y,s=t.seriesIx,a=this.options.series[s],l=this.seriesMissingValues(a),c=i.seriesPoints[s];$(o)&&$(r)||(e=this.createMissingValue(e,l)),e&&(n=i.createPoint(e,t),n&&(At(n,t),i.addErrorBar(n,er,t),i.addErrorBar(n,tr,t)),i.updateRange(e,t.series)),i.points.push(n),c.push(n)},seriesMissingValues:function(e){return e.missingValues},createMissingValue:Dt,updateRange:function(e,t){var n=this,i=e.x,o=e.y,r=t.xAxis,s=t.yAxis,a=n.xAxisRanges[r],l=n.yAxisRanges[s];$(i)&&(a=n.xAxisRanges[r]=a||{min:Vi,max:Wi},typeof i===Eo&&(i=p(i)),a.min=Tt.min(a.min,i),a.max=Tt.max(a.max,i)),$(o)&&(l=n.yAxisRanges[s]=l||{min:Vi,max:Wi},typeof o===Eo&&(o=p(o)),l.min=Tt.min(l.min,o),l.max=Tt.max(l.max,o))},evalPointOptions:function(e,t,n){var i=n.series,o=n.seriesIx,r={defaults:i._defaults,excluded:["data","tooltip","tempate","visual","toggle"]},s=this._evalSeries[o];return gn(s)||(this._evalSeries[o]=s=R(e,{},r,!0)),s&&(e=Ft({},e),R(e,{value:t,series:i,dataItem:n.dataItem},r)),e},pointType:function(){return ke},pointOptions:function(e,t){var n,i=this.seriesOptions[t];return i||(n=this.pointType().fn.defaults,this.seriesOptions[t]=i=Ft({},n,{markers:{opacity:e.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},e)),i},createPoint:function(e,t){var n,i=this,o=t.series,r=this.pointOptions(o,t.seriesIx),s=t.color||o.color;return r=i.evalPointOptions(r,e,t),Et.isFunction(o.color)&&(s=r.color),n=new ke(e,r),n.color=s,i.append(n),n},seriesAxes:function(e){var t=this.plotArea,n=e.xAxis,i=n?t.namedXAxes[n]:t.axisX,o=e.yAxis,r=o?t.namedYAxes[o]:t.axisY;if(!i)throw Error("Unable to locate X axis with name "+n);if(!r)throw Error("Unable to locate Y axis with name "+o);return{x:i,y:r}},reflow:function(e){var t,n,i=this,o=i.points,r=0,s=!i.options.clip;i.traverseDataPoints(function(e,a){t=o[r++],n=i.seriesAxes(a.series);var l,c=n.x.getSlot(e.x,e.x,s),u=n.y.getSlot(e.y,e.y,s);t&&(c&&u?(l=i.pointSlot(c,u),t.reflow(l)):t.visible=!1)}),i.box=e},pointSlot:function(e,t){return new Ut(e.x1,t.y1,e.x2,t.y2)},traverseDataPoints:function(e){var t,n,i,o,r,s,a,l=this,c=l.options,u=c.series,h=l.seriesPoints;for(n=0;u.length>n;n++)for(i=u[n],o=h[n],o||(h[n]=[]),t=0;i.data.length>t;t++)r=this._bindPoint(i,n,t),s=r.valueFields,a=r.fields,e(s,Ft({pointIx:t,series:i,seriesIx:n,dataItem:i.data[t],owner:l},a))},_bindPoint:fe.fn._bindPoint,formatPointValue:function(e,t){var n=e.value;return sn(t,n.x,n.y)},animationPoints:function(){var e,t=this.points,n=[];for(e=0;t.length>e;e++)n.push((t[e]||{}).marker);return n}}),Ft(Le.fn,De),Oe=Le.extend({render:function(){var e=this;Le.fn.render.call(e),e.renderSegments()},createSegment:function(e,t,n){var i,o=t.style;return new(i=o===Do?Pe:Se)(e,t,n)},animationPoints:function(){var e=Le.fn.animationPoints.call(this);return e.concat(this._segments)},createMissingValue:function(e,t){if(t===ir){var n={x:e.x,y:e.y};return $(n.x)||(n.x=0),$(n.y)||(n.y=0),n}}}),Ft(Oe.fn,Te),Ne=Le.extend({init:function(e,t){this._maxSize=Wi,Le.fn.init.call(this,e,t)},options:{tooltip:{format:"{3}"},labels:{format:"{3}"}},addValue:function(e,t){null!==e.size&&(e.size>0||0>e.size&&t.series.negativeValues.visible)?(this._maxSize=Tt.max(this._maxSize,Tt.abs(e.size)),Le.fn.addValue.call(this,e,t)):(this.points.push(null),this.seriesPoints[t.seriesIx].push(null))},reflow:function(e){var t=this;t.updateBubblesSize(e),Le.fn.reflow.call(t,e)},pointType:function(){return Ce},createPoint:function(e,t){var n,i,o=this,r=t.series,s=r.data.length,a=t.pointIx*(Di/s),l={delay:a,duration:Di-a,type:Nn},c=t.color||r.color;return 0>e.size&&r.negativeValues.visible&&(c=xn(r.negativeValues.color,c)),i=Ft({labels:{animation:{delay:a,duration:Di-a}}},this.pointOptions(r,t.seriesIx),{markers:{type:Gn,border:r.border,opacity:r.opacity,animation:l}}),i=o.evalPointOptions(i,e,t),Et.isFunction(r.color)&&(c=i.color),i.markers.background=c,n=new Ce(e,i),n.color=c,o.append(n),n},updateBubblesSize:function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,g,m,v,_=this,y=_.options,w=y.series,b=Tt.min(e.width(),e.height());for(t=0;w.length>t;t++)for(i=w[t],o=_.seriesPoints[t],r=i.minSize||Tt.max(.02*b,10),s=i.maxSize||.2*b,a=r/2,l=s/2,c=Tt.PI*a*a,u=Tt.PI*l*l,h=u-c,d=h/_._maxSize,n=0;o.length>n;n++)f=o[n],f&&(p=Tt.abs(f.value.size)*d,g=Tt.sqrt((c+p)/Tt.PI),m=xn(f.options.zIndex,0),v=m+(1-g/l),Ft(f.options,{zIndex:v,markers:{size:2*g,zIndex:v},labels:{zIndex:v+1}}))},formatPointValue:function(e,t){var n=e.value;return sn(t,n.x,n.y,n.size,e.category)},createAnimation:Dt,createVisual:Dt}),He=jt.extend({init:function(e,t){jt.fn.init.call(this,t),this.value=e},options:{border:{_brightness:.8},line:{width:2},overlay:{gradient:ki},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{4:d}</th><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}},reflow:function(e){var t,n,i,o=this,r=o.options,s=o.owner,a=o.value,l=s.seriesValueAxis(r),c=[];n=l.getSlot(a.open,a.close),i=l.getSlot(a.low,a.high),n.x1=i.x1=e.x1,n.x2=i.x2=e.x2,o.realBody=n,t=i.center().x,c.push([[t,i.y1],[t,n.y1]]),c.push([[t,n.y2],[t,i.y2]]),o.lines=c,o.box=i.clone().wrap(n),o._rendered||(o._rendered=!0,o.createNote()),o.reflowNote()},reflowNote:function(){var e=this;e.note&&e.note.reflow(e.box)},createVisual:function(){jt.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(e){var t=new Cn.Group;
|
|
return this.createBody(t,e),this.createLines(t,e),t},createBody:function(e,t){var n=Cn.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});t.border.width>0&&n.options.set("stroke",{color:this.getBorderColor(),width:t.border.width,dashType:t.border.dashType,opacity:xn(t.border.opacity,t.opacity)}),rn(n),e.append(n),W(t)&&e.append(this.createGradientOverlay(n,{baseColor:this.color},Ft({},t.overlay)))},createLines:function(e,t){this.drawLines(e,t,this.lines,t.line)},drawLines:function(e,t,n,i){var o,r,s;if(n)for(o={stroke:{color:i.color||this.color,opacity:xn(i.opacity,t.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},r=0;n.length>r;r++)s=Cn.Path.fromPoints(n[r],o),rn(s),e.append(s)},getBorderColor:function(){var e=this,t=e.options,n=t.border,i=n.color;return gn(i)||(i=new Gt(e.color).brightness(n._brightness).toHex()),i},createOverlay:function(){var e=Cn.Path.fromRect(this.box.toRect(),{fill:{color:Jo,opacity:0},stroke:null});this.visual.append(e)},createHighlight:function(){var e,t=this.options.highlight,n=this.color;return this.color=t.color||this.color,e=this.mainVisual(Ft({},this.options,{line:{color:this.getBorderColor()}},t)),this.color=n,e},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var e=this,t=e.box,n=e.owner.pane.clipBox()||t;return new Qt(t.x2+Wo,Tt.max(t.y1,n.y1)+Wo)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Ft(He.fn,ae),Ft(He.fn,le),Ve=fe.extend({options:{},reflowCategories:function(e){var t,n=this,i=n.children,o=i.length;for(t=0;o>t;t++)i[t].reflow(e[t])},addValue:function(e,t){var n,i,o=this,r=t.categoryIx,s=t.category,a=t.series,l=t.seriesIx,c=o.options,u=e.valueFields,h=o.children,d=o.splitValue(u),f=P(d),p=o.categoryPoints[r],g=a.data[r];p||(o.categoryPoints[r]=p=[]),f&&(n=o.createPoint(e,t)),i=h[r],i||(i=new re({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),o.append(i)),n&&(o.updateRange(u,t),i.append(n),n.categoryIx=r,n.category=s,n.series=a,n.seriesIx=l,n.owner=o,n.dataItem=g,n.noteText=e.fields.noteText),o.points.push(n),p.push(n)},pointType:function(){return He},createPoint:function(e,t){var n,i=this,o=t.categoryIx,r=t.category,s=t.series,a=t.seriesIx,l=e.valueFields,c=Ft({},s),u=i.pointType(),h=e.fields.color||s.color;return c=i.evalPointOptions(c,l,r,o,s,a),s.type==Vn&&l.open>l.close&&(h=e.fields.downColor||s.downColor||s.color),Et.isFunction(s.color)&&(h=c.color),n=new u(l,c),n.color=h,n},splitValue:function(e){return[e.low,e.open,e.close,e.high]},updateRange:function(e,t){var n=this,i=t.series.axis,o=n.valueAxisRanges[i],r=n.splitValue(e);o=n.valueAxisRanges[i]=o||{min:Vi,max:Wi},o=n.valueAxisRanges[i]={min:Tt.min.apply(Tt,r.concat([o.min])),max:Tt.max.apply(Tt,r.concat([o.max]))}},formatPointValue:function(e,t){var n=e.value;return sn(t,n.open,n.high,n.low,n.close,e.category)},animationPoints:function(){return this.points}}),Ft(Ve.fn,De),Ue=He.extend({reflow:function(e){var t,n,i,o,r=this,s=r.options,a=r.owner,l=r.value,c=a.seriesValueAxis(s),u=[],h=[],d=[];o=c.getSlot(l.low,l.high),n=c.getSlot(l.open,l.open),i=c.getSlot(l.close,l.close),n.x1=i.x1=o.x1=e.x1,n.x2=i.x2=o.x2=e.x2,t=o.center().x,u.push([n.x1,n.y1]),u.push([t,n.y1]),h.push([t,i.y1]),h.push([i.x2,i.y1]),d.push([t,o.y1]),d.push([t,o.y2]),r.lines=[u,h,d],r.box=o.clone().wrap(n.clone().wrap(i)),r.reflowNote()},createBody:e.noop}),We=Ve.extend({pointType:function(){return Ue}}),je=Ve.extend({addValue:function(e,t){var n,i,o=this,r=t.categoryIx,s=t.category,a=t.series,l=t.seriesIx,c=o.options,u=o.children,h=e.valueFields,d=o.splitValue(h),f=P(d),p=o.categoryPoints[r],g=a.data[r];p||(o.categoryPoints[r]=p=[]),f&&(n=o.createPoint(e,t)),i=u[r],i||(i=new re({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),o.append(i)),n&&(o.updateRange(h,t),i.append(n),n.categoryIx=r,n.category=s,n.series=a,n.seriesIx=l,n.owner=o,n.dataItem=g),o.points.push(n),p.push(n)},pointType:function(){return Ge},splitValue:function(e){return[e.lower,e.q1,e.median,e.q3,e.upper]},updateRange:function(e,t){var n=this,i=t.series.axis,o=n.valueAxisRanges[i],r=n.splitValue(e).concat(n.filterOutliers(e.outliers));gn(e.mean)&&(r=r.concat(e.mean)),o=n.valueAxisRanges[i]=o||{min:Vi,max:Wi},o=n.valueAxisRanges[i]={min:Tt.min.apply(Tt,r.concat([o.min])),max:Tt.max.apply(Tt,r.concat([o.max]))}},formatPointValue:function(e,t){var n=e.value;return sn(t,n.lower,n.q1,n.median,n.q3,n.upper,n.mean,e.category)},filterOutliers:function(e){var t,n,i=(e||[]).length,o=[];for(t=0;i>t;t++)n=e[t],gn(n)&&D(o,n);return o}}),Ge=He.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),n.value=e,n.createNote()},options:{border:{_brightness:.8},line:{width:2},mean:{width:2,dashType:"dash"},overlay:{gradient:ki},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{6:d}</th><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:zi,type:Qn,background:Jo,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:zi,type:Gn,background:Jo,border:{width:2,opacity:1},opacity:0}},reflow:function(e){var t,n,i,o,r,s=this,a=s.options,l=s.owner,c=s.value,u=l.seriesValueAxis(a);i=u.getSlot(c.q1,c.q3),s.boxSlot=i,n=u.getSlot(c.lower,c.upper),o=u.getSlot(c.median),i.x1=n.x1=e.x1,i.x2=n.x2=e.x2,s.realBody=i,c.mean&&(r=u.getSlot(c.mean),s.meanPoints=[[[e.x1,r.y1],[e.x2,r.y1]]]),t=n.center().x,s.whiskerPoints=[[[t-5,n.y1],[t+5,n.y1],[t,n.y1],[t,i.y1]],[[t-5,n.y2],[t+5,n.y2],[t,n.y2],[t,i.y2]]],s.medianPoints=[[[e.x1,o.y1],[e.x2,o.y1]]],s.box=n.clone().wrap(i),s.reflowNote()},renderOutliers:function(e){var t,n,i,o,r=this,s=e.markers||{},a=r.value,l=a.outliers||[],c=3*Tt.abs(a.q3-a.q1),u=[];for(o=0;l.length>o;o++)i=l[o],s=a.q3+c>i&&i>a.q1-c?e.outliers:e.extremes,t=Ft({},s.border),gn(t.color)||(t.color=gn(r.color)?r.color:new Gt(s.background).brightness(Rn).toHex()),n=new en({type:s.type,width:s.size,height:s.size,rotation:s.rotation,background:s.background,border:t,opacity:s.opacity}),n.value=i,u.push(n);return this.reflowOutliers(u),u},reflowOutliers:function(e){var t,n,i,o=this.owner.seriesValueAxis(this.options),r=this.box.center().x;for(t=0;e.length>t;t++)n=e[t].value,i=o.getSlot(n).move(r),this.box=this.box.wrap(i),e[t].reflow(i)},mainVisual:function(e){var t,n,i=He.fn.mainVisual.call(this,e),o=this.renderOutliers(e);for(t=0;o.length>t;t++)n=o[t].getElement(),n&&i.append(n);return i},createLines:function(e,t){this.drawLines(e,t,this.whiskerPoints,t.line),this.drawLines(e,t,this.medianPoints,t.median),this.drawLines(e,t,this.meanPoints,t.mean)},getBorderColor:function(){return this.color?this.color:He.getBorderColor.call(this)}}),Ft(Ge.fn,ae),qe=jt.extend({init:function(e,t,n){var i=this;i.value=e,i.sector=t,jt.fn.init.call(i,n)},options:{color:Jo,overlay:{gradient:go},border:{width:.5},labels:{visible:!1,distance:35,font:ii,margin:ln(.5),align:Gn,zIndex:1,position:ro},animation:{type:so},highlight:{visible:!0,border:{width:1}},visible:!0},render:function(){var e,t=this,n=t.options,i=n.labels,o=t.value;t._rendered||t.visible===!1||(t._rendered=!0,i.template?(e=Ot(i.template),o=e({dataItem:t.dataItem,category:t.category,value:t.value,series:t.series,percentage:t.percentage})):i.format&&(o=sn(i.format,o)),i.visible&&o&&(t.label=new nn(o,Ft({},i,{align:Wn,vAlign:"",animation:{type:yi,delay:t.animationDelay}})),t.append(t.label)))},reflow:function(e){var t=this;t.render(),t.box=e,t.reflowLabel()},reflowLabel:function(){var e,t,n,i,o=this,r=o.sector.clone(),s=o.options,a=o.label,l=s.labels,c=l.distance,u=r.middle();a&&(i=a.box.height(),n=a.box.width(),l.position==Wn?(r.r=Tt.abs((r.r-i)/2)+i,e=r.point(u),a.reflow(Ut(e.x,e.y-i/2,e.x,e.y))):l.position==Mi?(r.r=r.r-i/2,e=r.point(u),a.reflow(Ut(e.x,e.y-i/2,e.x,e.y))):(e=r.clone().expand(c).point(u),e.x>=r.c.x?(t=e.x+n,a.orientation=po):(t=e.x-n,a.orientation=Ii),a.reflow(Ut(t,e.y-i,e.x,e.y))))},createVisual:function(){var e,t,n=this,i=n.sector,o=n.options;jt.fn.createVisual.call(this),n.value&&(o.visual?(e=(i.startAngle+180)%360,t=o.visual({category:n.category,dataItem:n.dataItem,value:n.value,series:n.series,percentage:n.percentage,center:new kn.Point(i.c.x,i.c.y),radius:i.r,innerRadius:i.ir,startAngle:e,endAngle:e+i.angle,options:o,createVisual:function(){var e=new Cn.Group;return n.createSegmentVisual(e),e}}),t&&n.visual.append(t)):n.createSegmentVisual(n.visual))},createSegmentVisual:function(e){var t,n=this,i=n.sector,o=n.options,r=o.border||{},s=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},a=o.color,l={color:a,opacity:o.opacity};t=n.createSegment(i,Ft({fill:l,stroke:{opacity:o.opacity},zIndex:o.zIndex},s)),e.append(t),W(o)&&e.append(this.createGradientOverlay(t,{baseColor:a,fallbackFill:l},Ft({center:[i.c.x,i.c.y],innerRadius:i.ir,radius:i.r,userSpace:!0},o.overlay)))},createSegment:function(e,t){return t.singleSegment?new Cn.Circle(new kn.Circle(new kn.Point(e.c.x,e.c.y),e.r),t):tn.current.createRing(e,t)},createAnimation:function(){var e=this.options,t=this.sector.c;Ft(e,{animation:{center:[t.x,t.y],delay:this.animationDelay}}),jt.fn.createAnimation.call(this)},createHighlight:function(e){var t=this,n=t.options.highlight||{},i=n.border||{};return t.createSegment(t.sector,Ft({},e,{fill:{color:n.color,opacity:n.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var e=this.sector;return{options:this.options,radius:e.r,innerRadius:e.ir,center:new kn.Point(e.c.x,e.c.y),startAngle:e.startAngle,endAngle:e.angle+e.startAngle,visual:this.visual}},tooltipAnchor:function(e,t){var n=this,i=n.sector.adjacentBox(Wo,e,t);return new Qt(i.x1,i.y1)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Ft(qe.fn,ae),$e={createLegendItem:function(e,t,n){var i,o,r,s,a,l=this,c=l.options.legend||{},u=c.labels||{},h=c.inactiveItems||{},d=h.labels||{};n&&n.visibleInLegend!==!1&&(a=n.visible!==!1,i=n.category||"",o=a?u.template:d.template||u.template,o&&(i=Ot(o)({text:i,series:n.series,dataItem:n.dataItem,percentage:n.percentage,value:e})),a?(s={},r=t.color):(s={color:d.color,font:d.font},r=(h.markers||{}).color),i&&l.legendItems.push({pointIndex:n.index,text:i,series:n.series,markerColor:r,labels:s}))}},Ye=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),n.plotArea=e,n.points=[],n.legendItems=[],n.render()},options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4},inactiveItems:{markers:{},labels:{}}},render:function(){var e=this;e.traverseDataPoints(Mt(e.addValue,e))},traverseDataPoints:function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f,p=this,g=p.options,m=p.plotArea.options.seriesColors||[],v=m.length,_=g.series,y=_.length,w=0;for(o=0;y>o;o++){for(t=_[o],s=t.data,h=U(t),a=360/h,d=gn(t.startAngle)?t.startAngle:g.startAngle,o!=y-1&&t.labels.position==ro&&(t.labels.position=Wn),f=0;s.length>f;f++)n=Q.current.bindPoint(t,f),l=n.valueFields.value,c=Tt.abs(l),i=n.fields,r=c*a,u=1!=s.length&&!!i.explode,Lt(t.color)||(t.color=i.color||m[f%v]),e(l,new Jt(null,0,0,d,r),{owner:p,category:i.category||"",index:w,series:t,seriesIx:o,dataItem:s[f],percentage:0!==h?c/h:0,explode:u,visibleInLegend:i.visibleInLegend,visible:i.visible,zIndex:y-o,animationDelay:p.animationDelay(f,o,y)}),n.fields.visible!==!1&&(d+=r),w++;w=0}},evalSegmentOptions:function(e,t,n){var i=n.series;R(e,{value:t,series:i,dataItem:n.dataItem,category:n.category,percentage:n.percentage},{defaults:i._defaults,excluded:["data","template","visual","toggle"]})},addValue:function(e,t,n){var i,o=this,r=Ft({},n.series,{index:n.index});o.evalSegmentOptions(r,e,n),o.createLegendItem(e,r,n),n.visible!==!1&&(i=new qe(e,t,r),At(i,n),o.append(i),o.points.push(i))},reflow:function(e){var t,n,i,o,r,s,a,l,c=this,u=c.options,h=e.clone(),d=5,f=Tt.min(h.width(),h.height()),p=f/2,g=f-.85*f,m=xn(u.padding,g),v=Ut(h.x1,h.y1,h.x1+f,h.y1+f),_=v.center(),y=c.seriesConfigs||[],w=h.center(),b=c.points,x=b.length,k=u.series.length,C=[],S=[];for(m=m>p-d?p-d:m,v.translate(w.x-_.x,w.y-_.y),s=p-m,l=Qt(s+v.x1+m,s+v.y1+m),a=0;x>a;a++)o=b[a],r=o.sector,r.r=s,r.c=l,n=o.seriesIx,y.length&&(t=y[n],r.ir=t.ir,r.r=t.r),n==k-1&&o.explode&&(r.c=r.clone().radius(.15*r.r).point(r.middle())),o.reflow(v),i=o.label,i&&i.options.position===ro&&n==k-1&&(i.orientation===po?S.push(i):C.push(i));C.length>0&&(C.sort(c.labelComparator(!0)),c.leftLabelsReflow(C)),S.length>0&&(S.sort(c.labelComparator(!1)),c.rightLabelsReflow(S)),c.box=v},leftLabelsReflow:function(e){var t=this,n=t.distanceBetweenLabels(e);t.distributeLabels(n,e)},rightLabelsReflow:function(e){var t=this,n=t.distanceBetweenLabels(e);t.distributeLabels(n,e)},distanceBetweenLabels:function(e){var t,n,i,o=this,r=o.points,s=r[r.length-1],a=s.sector,l=e[0].box,c=e.length-1,u=a.r+s.options.labels.distance,h=[];for(n=dn(l.y1-(a.c.y-u-l.height()-l.height()/2)),h.push(n),i=0;c>i;i++)l=e[i].box,t=e[i+1].box,n=dn(t.y1-l.y2),h.push(n);return n=dn(a.c.y+u-e[c].box.y2-e[c].box.height()/2),h.push(n),h},distributeLabels:function(e,t){var n,i,o,r,s=this,a=e.length;for(r=0;a>r;r++)for(i=o=r,n=-e[r];n>0&&(i>=0||a>o);)n=s._takeDistance(e,r,--i,n),n=s._takeDistance(e,r,++o,n);s.reflowLabels(e,t)},_takeDistance:function(e,t,n,i){if(e[n]>0){var o=Tt.min(e[n],i);i-=o,e[n]-=o,e[t]+=o}return i},reflowLabels:function(e,t){var n,i,o,r,s=this,a=s.points,l=a[a.length-1],c=l.sector,u=t.length,h=l.options.labels,d=h.distance,f=c.c.y-(c.r+d)-t[0].box.height();for(e[0]+=2,r=0;u>r;r++)n=t[r],f+=e[r],o=n.box,i=s.hAlignLabel(o.x2,c.clone().expand(d),f,f+o.height(),n.orientation==po),n.orientation==po?(h.align!==Gn&&(i=c.r+c.c.x+d),n.reflow(Ut(i+o.width(),f,i,f))):(h.align!==Gn&&(i=c.c.x-c.r-d),n.reflow(Ut(i-o.width(),f,i,f))),f+=o.height()},createVisual:function(){var e,t,n,i,r,s,a,l,c,u,h,d,f,p,g=this,m=g.options,v=m.connectors,_=g.points,y=_.length,w=4;for(jt.fn.createVisual.call(this),this._connectorLines=[],a=0;y>a;a++)i=_[a],t=i.sector,n=t.middle(),s=i.label,r={seriesId:i.seriesIx},s&&(e=new Cn.Path({stroke:{color:v.color,width:v.width},animation:{type:yi,delay:i.animationDelay}}),s.options.position===ro&&0!==i.value&&(l=s.box,c=t.c,u=t.point(n),h=Qt(l.x1,l.center().y),u=t.clone().expand(v.padding).point(n),e.moveTo(u.x,u.y),s.orientation==po?(f=Qt(l.x1-v.padding,l.center().y),p=o(c,u,h,f),h=Qt(f.x-w,f.y),p=p||h,p.x=Tt.min(p.x,h.x),g.pointInCircle(p,t.c,t.r+w)||t.c.x>p.x?(d=t.c.x+t.r+w,i.options.labels.align!==Kn?h.x>d?e.lineTo(d,u.y):e.lineTo(u.x+2*w,u.y):e.lineTo(d,u.y),e.lineTo(h.x,f.y)):(p.y=f.y,e.lineTo(p.x,p.y))):(f=Qt(l.x2+v.padding,l.center().y),p=o(c,u,h,f),h=Qt(f.x+w,f.y),p=p||h,p.x=Tt.max(p.x,h.x),g.pointInCircle(p,t.c,t.r+w)||p.x>t.c.x?(d=t.c.x-t.r-w,i.options.labels.align!==Kn?d>h.x?e.lineTo(d,u.y):e.lineTo(u.x-2*w,u.y):e.lineTo(d,u.y),e.lineTo(h.x,f.y)):(p.y=f.y,e.lineTo(p.x,p.y))),e.lineTo(f.x,f.y),this._connectorLines.push(e),this.visual.append(e)))},labelComparator:function(e){return e=e?-1:1,function(t,n){return t=(t.parent.sector.middle()+270)%360,n=(n.parent.sector.middle()+270)%360,(t-n)*e}},hAlignLabel:function(e,t,n,i,o){var r=t.c.x,s=t.c.y,a=t.r,l=Tt.min(Tt.abs(s-n),Tt.abs(s-i));return l>a?e:r+Tt.sqrt(a*a-l*l)*(o?1:-1)},pointInCircle:function(e,t,n){return h(t.x-e.x)+h(t.y-e.y)<h(n)},formatPointValue:function(e,t){return sn(t,e.value)},animationDelay:function(e){return e*ao}}),Ft(Ye.fn,$e),Ke=qe.extend({options:{overlay:{gradient:mo},labels:{position:Wn},animation:{type:so}},reflowLabel:function(){var e,t,n=this,i=n.sector.clone(),o=n.options,r=n.label,s=o.labels,a=i.middle();r&&(t=r.box.height(),s.position==Wn?(i.r-=(i.r-i.ir)/2,e=i.point(a),r.reflow(new Ut(e.x,e.y-t/2,e.x,e.y))):qe.fn.reflowLabel.call(n))},createSegment:function(e,t){return tn.current.createRing(e,t)}}),Ft(Ke.fn,ae),Xe=Ye.extend({options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4}},addValue:function(e,t,n){var i,o=this,r=Ft({},n.series,{index:n.index});o.evalSegmentOptions(r,e,n),o.createLegendItem(e,r,n),e&&n.visible!==!1&&(i=new Ke(e,t,r),At(i,n),o.append(i),o.points.push(i))},reflow:function(e){var t,n,i,o,r,s,a=this,l=a.options,c=e.clone(),u=5,h=Tt.min(c.width(),c.height()),d=h/2,f=h-.85*h,p=xn(l.padding,f),g=l.series,m=g.length,v=0,_=0,y=0,w=0;for(a.seriesConfigs=[],p=p>d-u?d-u:p,i=d-p,r=0;m>r;r++)t=g[r],0===r&&gn(t.holeSize)&&(n=t.holeSize,i-=t.holeSize),gn(t.size)?i-=t.size:v++,gn(t.margin)&&r!=m-1&&(i-=t.margin);for(gn(n)||(w=(d-p)/(m+.75),n=.75*w,i-=n),y=n,r=0;m>r;r++)t=g[r],o=xn(t.size,i/v),y+=_,s=y+o,a.seriesConfigs.push({ir:y,r:s}),_=t.margin||0,y=s;Ye.fn.reflow.call(a,e)},animationDelay:function(e,t,n){return e*ci+Di*(t+1)/(n+1)}}),Qe=pe.extend({render:function(){pe.fn.render.call(this),this.createSegments()},traverseDataPoints:function(e){var t,n,i,o,r,s,a,l,c,h,d=this.options.series,f=this.categoryAxis.options.categories||[],p=u(d),g=!this.options.invertAxes;for(t=0;d.length>t;t++)for(n=d[t],i=0,o=0,r=0;p>r;r++)s=Q.current.bindPoint(n,r),a=s.valueFields.value,l=s.fields.summary,c=i,l?"total"===l.toLowerCase()?(s.valueFields.value=i,c=0,h=i):(s.valueFields.value=o,h=c-o,o=0):M(a)&&(o+=a,i+=a,h=i),e(s,{category:f[r],categoryIx:r,series:n,seriesIx:t,total:i,runningTotal:o,from:c,to:h,isVertical:g})},updateRange:function(e,t){pe.fn.updateRange.call(this,{value:t.to},t)},aboveAxis:function(e){return e.value>=0},plotRange:function(e){return[e.from,e.to]},createSegments:function(){var e,t,n,i,o,r,s,a=this.options.series,l=this.seriesPoints,c=this.segments=[];for(e=0;a.length>e;e++)if(t=a[e],n=l[e])for(o=0;n.length>o;o++)r=n[o],r&&i&&(s=new Ze(i,r,t),c.push(s),this.append(s)),i=r}}),Ze=jt.extend({init:function(e,t,n){var i=this;jt.fn.init.call(i),i.from=e,i.to=t,i.series=n},options:{animation:{type:yi,delay:Di}},linePoints:function(){var e,t,n=[],i=this.from,o=i.box,r=this.to.box;return i.isVertical?(e=i.aboveAxis?o.y1:o.y2,n.push([o.x1,e],[r.x2,e])):(t=i.aboveAxis?o.x2:o.x1,n.push([t,o.y1],[t,r.y2])),n},createVisual:function(){var e,t;jt.fn.createVisual.call(this),e=this.series.line||{},t=Cn.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}}),rn(t),this.visual.append(t)}}),Je=Wt.extend({init:function(e){var t=this;Wt.fn.init.call(t,e),e=t.options,t.id=Et.guid(),t.createTitle(),t.content=new jt,t.chartContainer=new et({},t),t.append(t.content),t.axes=[],t.charts=[]},options:{zIndex:-1,shrinkToFit:!0,title:{align:Ii},visible:!0},createTitle:function(){var e=this,t=e.options.title;typeof t===io&&(t=Ft({},t,{align:t.position,position:Vo})),e.title=on.buildTitle(t,e,Je.fn.options.title)},appendAxis:function(e){var t=this;t.content.append(e),t.axes.push(e),e.pane=t},appendChart:function(e){var t=this;t.chartContainer.parent!==t.content&&t.content.append(t.chartContainer),t.charts.push(e),t.chartContainer.append(e),e.pane=t},empty:function(){var e,t=this,n=t.parent;if(n){for(e=0;t.axes.length>e;e++)n.removeAxis(t.axes[e]);for(e=0;t.charts.length>e;e++)n.removeChart(t.charts[e])}t.axes=[],t.charts=[],t.content.destroy(),t.content.children=[],t.chartContainer.children=[]},reflow:function(e){var t,n=this;mn(n.children)===n.content&&(t=n.children.pop()),Wt.fn.reflow.call(n,e),t&&n.children.push(t),n.title&&(n.contentBox.y1+=n.title.box.height())},visualStyle:function(){var e=Wt.fn.visualStyle.call(this);return e.zIndex=-10,e},renderComplete:function(){this.options.visible&&this.createGridLines()},stackRoot:n,clipRoot:n,createGridLines:function(){var e,t,n,i,o,r,s=this,a=s.axes,l=a.concat(s.parent.axes),c=[],u=[];for(t=0;a.length>t;t++)for(i=a[t],o=i.options.vertical,e=o?c:u,n=0;l.length>n;n++)0===e.length&&(r=l[n],o!==r.options.vertical&&pn(e,i.createGridLines(r)))},refresh:function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=e.proxy(this.createGradient,this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete()},clipBox:function(){return this.chartContainer.clipBox}}),et=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,e),n.pane=t},shouldClip:function(){var e,t=this,n=t.children,i=n.length;for(e=0;i>e;e++)if(n[e].options.clip===!0)return!0;return!1},_clipBox:function(){var e,t,n,i,o=this,r=o.pane,s=r.axes,a=s.length,l=r.box.clone();for(t=0;a>t;t++)i=s[t],e=i.options.vertical?tr:er,n=i.lineBox(),l[e+1]=n[e+1],l[e+2]=n[e+2];return l},createVisual:function(){var e,t,n;this.visual=new Cn.Group({zIndex:0}),this.shouldClip()&&(e=this.clipBox=this._clipBox(),t=e.toRect(),n=Cn.Path.fromRect(t),this.visual.clip(n),this.unclipLabels())},stackRoot:n,unclipLabels:function(){var e,t,n,i,o,r=this,s=r.children,a=r.clipBox;for(n=0;s.length>n;n++)for(e=s[n].points||{},o=e.length,i=0;o>i;i++)t=e[i],t&&t.label&&t.label.options.visible&&t.box.overlaps(a)&&(t.label.alignToClipBox&&t.label.alignToClipBox(a),t.label.options.noclip=!0)},destroy:function(){jt.fn.destroy.call(this),delete this.parent}}),tt=jt.extend({init:function(e,t){var n=this;jt.fn.init.call(n,t),n.series=e,n.initSeries(),n.charts=[],n.options.legend.items=[],n.axes=[],n.crosshairs=[],n.createPanes(),n.render(),n.createCrosshairs()},options:{series:[],plotArea:{margin:{}},background:"",border:{color:Fn,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}},initSeries:function(){var e,t,n=this.series;for(e=0;n.length>e;e++)t=n[e],t.index=e},createPanes:function(){var e,t,n=this,i=[],o=n.options.panes||[],r=Tt.max(o.length,1);for(e=0;r>e;e++)t=new Je(o[e]),t.paneIndex=e,i.push(t),n.append(t);n.panes=i},createCrosshairs:function(e){var t,n,i,o,r,s=this;for(e=e||s.panes,t=0;e.length>t;t++)for(i=e[t],n=0;i.axes.length>n;n++)o=i.axes[n],o.options.crosshair&&o.options.crosshair.visible&&(r=new ft(o,o.options.crosshair),s.crosshairs.push(r),i.content.append(r))},removeCrosshairs:function(e){var t,n,i=this,o=i.crosshairs,r=e.axes;for(t=o.length-1;t>=0;t--)for(n=0;r.length>n;n++)if(o[t].axis===r[n]){o.splice(t,1);break}},hideCrosshairs:function(){var e,t=this.crosshairs;for(e=0;t.length>e;e++)t[e].hide()},findPane:function(e){var t,n,i=this,o=i.panes;for(t=0;o.length>t;t++)if(o[t].options.name===e){n=o[t];break}return n||o[0]},findPointPane:function(e){var t,n,i=this,o=i.panes;for(t=0;o.length>t;t++)if(o[t].box.containsPoint(e)){n=o[t];break}return n},appendAxis:function(e){var t=this,n=t.findPane(e.options.pane);n.appendAxis(e),t.axes.push(e),e.plotArea=t},removeAxis:function(e){var t,n,i=this,o=[];for(t=0;i.axes.length>t;t++)n=i.axes[t],e!==n?o.push(n):n.destroy();i.axes=o},appendChart:function(e,t){var n=this;n.charts.push(e),t?t.appendChart(e):n.append(e)},removeChart:function(e){var t,n,i=this,o=[];for(t=0;i.charts.length>t;t++)n=i.charts[t],n!==e?o.push(n):n.destroy();i.charts=o},addToLegend:function(e){var t,n,i,o,r,s,a,l,c,u=e.length,h=[],d=this.options.legend,f=d.labels||{},p=d.inactiveItems||{},g=p.labels||{};for(t=0;u>t;t++)n=e[t],l=n.visible!==!1,n.visibleInLegend!==!1&&(i=n.name||"",c=l?f.template:g.template||f.template,c&&(i=Ot(c)({text:i,series:n})),o=n.color,a=n._defaults,Lt(o)&&a&&(o=a.color),l?(r={},s=o):(r={color:g.color,font:g.font},s=p.markers.color),i&&h.push({text:i,labels:r,markerColor:s,series:n,active:l}));pn(d.items,h)},groupAxes:function(e){var t,n,i,o,r=[],s=[];for(i=0;e.length>i;i++)for(t=e[i].axes,o=0;t.length>o;o++)n=t[o],n.options.vertical?s.push(n):r.push(n);return{x:r,y:s,any:r.concat(s)}},groupSeriesByPane:function(){var e,t,n,i=this,o=i.series,r={};for(e=0;o.length>e;e++)n=o[e],t=i.seriesPaneName(n),r[t]?r[t].push(n):r[t]=[n];return r},filterVisibleSeries:function(e){var t,n,i=[];for(t=0;e.length>t;t++)n=e[t],n.visible!==!1&&i.push(n);return i},reflow:function(e){var t=this,n=t.options.plotArea,i=t.panes,o=ln(n.margin);t.box=e.clone().unpad(o),t.reflowPanes(),t.reflowAxes(i),t.reflowCharts(i)},redraw:function(e){var t,n=this;for(e=[].concat(e),this.initSeries(),t=0;e.length>t;t++)n.removeCrosshairs(e[t]),e[t].empty();for(n.render(e),n.reflowAxes(n.panes),n.reflowCharts(e),n.createCrosshairs(e),t=0;e.length>t;t++)e[t].refresh()},axisCrossingValues:function(e,t){var n,i=e.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=t.length-o.length,s=o[0]||0;for(n=0;r>n;n++)o.push(s);return o},alignAxisTo:function(e,t,n,i){var o=e.getSlot(n,n,!0),r=e.options.reverse?2:1,s=t.getSlot(i,i,!0),a=t.options.reverse?2:1,l=e.box.translate(s[er+a]-o[er+r],s[tr+a]-o[tr+r]);e.pane!==t.pane&&l.translate(0,e.pane.box.y1-t.pane.box.y1),e.reflow(l)},alignAxes:function(e,t){var n,i,o,r,s=this,a=e[0],l=t[0],c=s.axisCrossingValues(a,t),u=s.axisCrossingValues(l,e),h={},d={},f={},p={};for(r=0;t.length>r;r++)o=t[r],n=o.pane,i=n.id,s.alignAxisTo(o,a,u[r],c[r]),o.options._overlap||(dn(o.lineBox().x1)===dn(a.lineBox().x1)&&(h[i]&&o.reflow(o.box.alignTo(h[i].box,Ii).translate(-o.options.margin,0)),h[i]=o),dn(o.lineBox().x2)===dn(a.lineBox().x2)&&(o._mirrored||(o.options.labels.mirror=!o.options.labels.mirror,o._mirrored=!0),s.alignAxisTo(o,a,u[r],c[r]),d[i]&&o.reflow(o.box.alignTo(d[i].box,po).translate(o.options.margin,0)),d[i]=o),0!==r&&l.pane===o.pane&&(o.alignTo(l),o.reflow(o.box)));for(r=0;e.length>r;r++)o=e[r],n=o.pane,i=n.id,s.alignAxisTo(o,l,c[r],u[r]),o.options._overlap||(dn(o.lineBox().y1)===dn(l.lineBox().y1)&&(o._mirrored||(o.options.labels.mirror=!o.options.labels.mirror,o._mirrored=!0),s.alignAxisTo(o,l,c[r],u[r]),f[i]&&o.reflow(o.box.alignTo(f[i].box,Vo).translate(0,-o.options.margin)),f[i]=o),dn(o.lineBox().y2,Xn)===dn(l.lineBox().y2,Xn)&&(p[i]&&o.reflow(o.box.alignTo(p[i].box,Ln).translate(0,o.options.margin)),p[i]=o),0!==r&&(o.alignTo(a),o.reflow(o.box)))},shrinkAxisWidth:function(e){var t,n,i,o=this,r=o.groupAxes(e).any,s=C(r),a=0;for(t=0;e.length>t;t++)n=e[t],n.axes.length>0&&(a=Tt.max(a,s.width()-n.contentBox.width()));if(0!==a)for(t=0;r.length>t;t++)i=r[t],i.options.vertical||i.reflow(i.box.shrink(a,0))},shrinkAxisHeight:function(e){var t,n,i,o,r,s,a;for(t=0;e.length>t;t++)if(n=e[t],i=n.axes,o=Tt.max(0,C(i).height()-n.contentBox.height()),0!==o){for(r=0;i.length>r;r++)s=i[r],s.options.vertical&&s.reflow(s.box.shrink(0,o));a=!0}return a},fitAxes:function(e){var t,n,i,o,r,s,a,l,c=this,u=c.groupAxes(e).any,h=0;for(a=0;e.length>a;a++)if(r=e[a],t=r.axes,n=r.contentBox,t.length>0)for(i=C(t),h=Tt.max(h,n.x1-i.x1),o=Tt.max(n.y1-i.y1,n.y2-i.y2),l=0;t.length>l;l++)s=t[l],s.reflow(s.box.translate(0,o));for(a=0;u.length>a;a++)s=u[a],s.reflow(s.box.translate(h,0))},reflowAxes:function(e){var t,n=this,i=n.groupAxes(e);for(t=0;e.length>t;t++)n.reflowPaneAxes(e[t]);i.x.length>0&&i.y.length>0&&(n.alignAxes(i.x,i.y),n.shrinkAxisWidth(e),n.autoRotateAxisLabels(i),n.alignAxes(i.x,i.y),n.shrinkAxisWidth(e)&&n.alignAxes(i.x,i.y),n.shrinkAxisHeight(e),n.alignAxes(i.x,i.y),n.shrinkAxisHeight(e)&&n.alignAxes(i.x,i.y),n.fitAxes(e))},autoRotateAxisLabels:function(e){var t,n,i,o=this.axes,r=this.panes;for(n=0;o.length>n;n++)t=o[n],t.autoRotateLabels()&&(i=!0);if(i){for(n=0;r.length>n;n++)this.reflowPaneAxes(r[n]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(r))}},reflowPaneAxes:function(e){var t,n=e.axes,i=n.length;if(i>0)for(t=0;i>t;t++)n[t].reflow(e.contentBox)},reflowCharts:function(e){var t,n,i=this,o=i.charts,r=o.length,s=i.box;for(n=0;r>n;n++)t=o[n].pane,(!t||cn(t,e))&&o[n].reflow(s)},reflowPanes:function(){var e,t,n,i,o,r=this,s=r.box,a=r.panes,l=a.length,c=s.height(),u=l,h=0,d=s.y1;for(e=0;l>e;e++)t=a[e],i=t.options.height,t.options.width=s.width(),t.options.height?(i.indexOf&&i.indexOf("%")&&(o=parseInt(i,10)/100,t.options.height=o*s.height()),t.reflow(s.clone()),c-=t.options.height):h++;for(e=0;l>e;e++)t=a[e],t.options.height||(t.options.height=c/h);for(e=0;l>e;e++)t=a[e],n=s.clone().move(s.x1,d),t.reflow(n),u--,d+=t.options.height},backgroundBox:function(){var e,t,n,i,o,r,s=this,a=s.axes,l=a.length;for(n=0;l>n;n++)for(o=a[n],i=0;l>i;i++)r=a[i],o.options.vertical!==r.options.vertical&&(e=o.lineBox().clone().wrap(r.lineBox()),t=t?t.wrap(e):e);return t||s.box},createVisual:function(){var e,t,n,i,o,r;jt.fn.createVisual.call(this),e=this.backgroundBox(),t=this.options.plotArea,n=t.border||{},i=t.background,o=t.opacity,fn.isTransparent(i)&&(i=Jo,o=0),r=this._bgVisual=Cn.Path.fromRect(e.toRect(),{fill:{color:i,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1}),this.appendVisual(r)},pointsByCategoryIndex:function(e){var t,n,i,o,r,s=this.charts,a=[];if(null!==e)for(t=0;s.length>t;t++)if(r=s[t],"_navigator"!==r.pane.options.name&&(i=s[t].categoryPoints[e],i&&i.length))for(n=0;i.length>n;n++)o=i[n],o&&gn(o.value)&&null!==o.value&&a.push(o);return a},pointsBySeriesIndex:function(e){var t,n,i,o,r,s=this.charts,a=[];for(i=0;s.length>i;i++)for(r=s[i],t=r.points,o=0;t.length>o;o++)n=t[o],n&&n.options.index===e&&a.push(n);return a},pointsBySeriesName:function(e){var t,n,i,o,r,s=this.charts,a=[];for(i=0;s.length>i;i++)for(r=s[i],t=r.points,o=0;t.length>o;o++)n=t[o],n&&n.series.name===e&&a.push(n);return a},paneByPoint:function(e){var t,n,i=this,o=i.panes;for(n=0;o.length>n;n++)if(t=o[n],t.box.containsPoint(e))return t}}),nt=tt.extend({init:function(e,t){var n,i,o=this;if(o.namedCategoryAxes={},o.namedValueAxes={},o.valueAxisRangeTracker=new it,e.length>0)for(o.invertAxes=cn(e[0].type,[Pn,Hn,Xo,Yo,uo,Si]),n=0;e.length>n;n++)if(i=e[n].stack,i&&"100%"===i.type){o.stack100=!0;break}tt.fn.init.call(o,e,t)},options:{categoryAxis:{categories:[]},valueAxis:{}},render:function(e){var t=this;e=e||t.panes,t.createCategoryAxes(e),t.aggregateCategories(e),t.createCategoryAxesLabels(e),t.createCharts(e),t.createValueAxes(e)},removeAxis:function(e){var t=this,n=e.options.name;tt.fn.removeAxis.call(t,e),e instanceof ne?delete t.namedCategoryAxes[n]:(t.valueAxisRangeTracker.reset(n),delete t.namedValueAxes[n]),e===t.categoryAxis&&delete t.categoryAxis,e===t.valueAxis&&delete t.valueAxis},createCharts:function(e){var t,n,i,o,r,s,a=this.groupSeriesByPane();for(t=0;e.length>t;t++)if(n=e[t],i=a[n.options.name||"default"]||[],this.addToLegend(i),o=this.filterVisibleSeries(i))for(r=this.groupSeriesByCategoryAxis(o),s=0;r.length>s;s++)this.createChartGroup(r[s],n)},createChartGroup:function(e,t){this.createAreaChart(F(e,[Dn,Yo]),t),this.createBarChart(F(e,[Kn,Pn]),t),this.createRangeBarChart(F(e,[ho,uo]),t),this.createBulletChart(F(e,[Hn,Ko]),t),this.createCandlestickChart(F(e,Vn),t),this.createBoxPlotChart(F(e,On),t),this.createOHLCChart(F(e,oo),t),this.createWaterfallChart(F(e,[Qo,Si]),t),this.createLineChart(F(e,[Fi,Xo]),t)},aggregateCategories:function(e){var t,n,i,o,r,s=this,a=s.srcSeries||s.series,l=[];for(t=0;a.length>t;t++)n=a[t],i=s.seriesCategoryAxis(n),o=s.findPane(i.options.pane),r=S(i.options.type,ti),(r||n.categoryField)&&cn(o,e)&&(n=s.aggregateSeries(n,i)),l.push(n);s.srcSeries=a,s.series=l},aggregateSeries:function(e,t){var n,o,r,s,a,l=t.options,c=S(t.options.type,ti),u=l.categories,h=l.srcCategories||u,p=e.data,g=[],m=t.range(),v=Ft({},e),_=Ft({},e),y=l.dataItems||[],w=d;for(v.data=s=[],c&&(w=f),n=0;p.length>n;n++)o=e.categoryField?w(e.categoryField,p[n]):h[n],r=t.categoryIndex(o,m),r>-1&&(g[r]=g[r]||[],g[r].push(n));for(a=new wt(_,Q.current,i.current),n=0;u.length>n;n++)s[n]=a.aggregatePoints(g[n],u[n]),g[n]&&(y[n]=s[n]);return t.options.dataItems=y,v},appendChart:function(e,t){for(var n=this,i=e.options.series,o=n.seriesCategoryAxis(i[0]),r=o.options.categories,s=Tt.max(0,u(i)-r.length);s--;)r.push("");n.valueAxisRangeTracker.update(e.valueAxisRanges),tt.fn.appendChart.call(n,e,t)},seriesPaneName:function(t){var n=this,i=n.options,o=t.axis,r=[].concat(i.valueAxis),s=e.grep(r,function(e){return e.name===o})[0],a=i.panes||[{}],l=(a[0]||{}).name||"default",c=(s||{}).pane||l;
|
|
return c},seriesCategoryAxis:function(e){var t=this,n=e.categoryAxis,i=n?t.namedCategoryAxes[n]:t.categoryAxis;if(!i)throw Error("Unable to locate category axis with name "+n);return i},stackableChartOptions:function(e,t){var n,i=e.stack,o=i&&"100%"===i.type;return gn(t.options.clip)?n=t.options.clip:o&&(n=!1),{isStacked:i,isStacked100:o,clip:n}},groupSeriesByCategoryAxis:function(n){function i(t,i){return e.grep(n,function(e){return 0===i&&!e.categoryAxis||e.categoryAxis==t})}var o,r,s,a={},l=e.map(n,function(e){var n=e.categoryAxis||"$$default$$";return a.hasOwnProperty(n)?t:(a[n]=!0,n)}),c=[];for(o=0;l.length>o;o++)r=l[o],s=i(r,o),0!==s.length&&c.push(s);return c},createBarChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new pe(n,At({series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing},n.stackableChartOptions(i,t)));n.appendChart(o,t)}},createRangeBarChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new me(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(o,t)}},createBulletChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new ve(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing,clip:t.options.clip});n.appendChart(o,t)}},createLineChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new Ae(n,At({invertAxes:n.invertAxes,series:e},n.stackableChartOptions(i,t)));n.appendChart(o,t)}},createAreaChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new Be(n,At({invertAxes:n.invertAxes,series:e},n.stackableChartOptions(i,t)));n.appendChart(o,t)}},createOHLCChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new We(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip});n.appendChart(o,t)}},createCandlestickChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new Ve(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip});n.appendChart(o,t)}},createBoxPlotChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new je(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip});n.appendChart(o,t)}},createWaterfallChart:function(e,t){if(0!==e.length){var n=this,i=e[0],o=new Qe(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(o,t)}},axisRequiresRounding:function(e,t){var n,i,o,r,s=this,a=F(s.series,cr);for(n=0;s.series.length>n;n++)o=s.series[n],(o.type===Fi||o.type===Dn)&&(r=o.line,r&&r.style===To&&a.push(o));for(n=0;a.length>n;n++)if(i=a[n].categoryAxis||"",i===e||!i&&0===t)return!0},aggregatedAxis:function(e,t){var n,i,o=this,r=o.series;for(n=0;r.length>n;n++)if(i=r[n].categoryAxis||"",(i===e||!i&&0===t)&&r[n].categoryField)return!0},axisRequiresOutOfRangePoints:function(e,t){var n,i,o,r=this,s=F(r.series,[Fi,Xo,Dn,Yo]);for(n=0;s.length>n;n++)if(o=s[n].categoryAxis||"",i=s[n].line,!(o!==e&&(o||0!==t)||i&&i.style===To))return!0},createCategoryAxesLabels:function(){var e,t=this.axes;for(e=0;t.length>e;e++)t[e]instanceof ne&&t[e].createLabels()},createCategoryAxes:function(e){var t,n,i,o,r,s,a,l,c=this,u=c.invertAxes,h=[].concat(c.options.categoryAxis),d=[];for(t=0;h.length>t;t++)if(n=h[t],i=c.findPane(n.pane),cn(i,e)){if(s=n.name,o=n.categories||[],r=n.type||"",n=Ft({vertical:u,axisCrossingValue:u?Vi:0,_deferLabels:!0},n),gn(n.justified)||(n.justified=c.isJustified()),c.axisRequiresRounding(s,t)&&(n.justified=!1),c.axisRequiresOutOfRangePoints(s,t)&&(n.outOfRangePoints=!0),N(n,o[0])?a=new ie(n):(n.limitCategories=c.aggregatedAxis(s,t),a=new ne(n)),s){if(c.namedCategoryAxes[s])throw Error("Category axis with name "+s+" is already defined");c.namedCategoryAxes[s]=a}a.axisIndex=t,d.push(a),c.appendAxis(a)}l=c.categoryAxis||d[0],c.categoryAxis=l,u?c.axisY=l:c.axisX=l},isJustified:function(){var e,t,n=this,i=n.series;for(e=0;i.length>e;e++)if(t=i[e],!cn(t.type,[Dn,Yo]))return!1;return!0},createValueAxes:function(e){var t,n,i,o,r,s,a,l,c,u=this,h=u.valueAxisRangeTracker,d=h.query(),f=[].concat(u.options.valueAxis),p=u.invertAxes,g={vertical:!p},m=[];for(u.stack100&&(g.roundToMajorUnit=!1,g.labels={format:"P0"}),c=0;f.length>c;c++)if(t=f[c],n=u.findPane(t.pane),cn(n,e)){if(l=t.name,a=S(t.type,Oi)?{min:.1,max:1}:{min:0,max:1},r=h.query(l)||d||a,0===c&&r&&d&&(r.min=Tt.min(r.min,d.min),r.max=Tt.max(r.max,d.max)),s=S(t.type,Oi)?Kt:Xt,i=new s(r.min,r.max,Ft({},g,t)),l){if(u.namedValueAxes[l])throw Error("Value axis with name "+l+" is already defined");u.namedValueAxes[l]=i}i.axisIndex=c,m.push(i),u.appendAxis(i)}o=u.valueAxis||m[0],u.valueAxis=o,p?u.axisX=o:u.axisY=o},click:function(t,n){var i,o,r,s=this,a=t._eventCoordinates(n),l=new Qt(a.x,a.y),c=s.pointPane(l),u=[],h=[];if(c){for(i=c.axes,o=0;i.length>o;o++)r=i[o],r.getValue?D(h,r.getValue(l)):D(u,r.getCategory(l));0===u.length&&D(u,s.categoryAxis.getCategory(l)),u.length>0&&h.length>0&&t.trigger(lo,{element:e(n.target),originalEvent:n,category:k(u),value:k(h)})}},pointPane:function(e){var t,n,i=this,o=i.panes;for(n=0;o.length>n;n++)if(t=o[n],t.contentBox.containsPoint(e))return t},updateAxisOptions:function(e,t){var n=[].concat(e instanceof ne?this.options.categoryAxis:this.options.valueAxis);Ft(n[e.axisIndex],t)}}),it=Pt.extend({init:function(){var e=this;e.axisRanges={}},update:function(e){var t,n,i,o=this,r=o.axisRanges;for(i in e)t=r[i],n=e[i],r[i]=t=t||{min:Vi,max:Wi},t.min=Tt.min(t.min,n.min),t.max=Tt.max(t.max,n.max)},reset:function(e){this.axisRanges[e]=t},query:function(e){return this.axisRanges[e]}}),ot=tt.extend({init:function(e,t){var n=this;n.namedXAxes={},n.namedYAxes={},n.xAxisRangeTracker=new it,n.yAxisRangeTracker=new it,tt.fn.init.call(n,e,t)},options:{xAxis:{},yAxis:{}},render:function(e){var t,n,i,o,r=this,s=r.groupSeriesByPane();for(e=e||r.panes,t=0;e.length>t;t++)n=e[t],i=s[n.options.name||"default"]||[],r.addToLegend(i),o=r.filterVisibleSeries(i),o&&(r.createScatterChart(F(o,vo),n),r.createScatterLineChart(F(o,_o),n),r.createBubbleChart(F(o,Nn),n));r.createAxes(e)},appendChart:function(e,t){var n=this;n.xAxisRangeTracker.update(e.xAxisRanges),n.yAxisRangeTracker.update(e.yAxisRanges),tt.fn.appendChart.call(n,e,t)},removeAxis:function(e){var t=this,n=e.options.name;tt.fn.removeAxis.call(t,e),e.options.vertical?(t.yAxisRangeTracker.reset(n),delete t.namedYAxes[n]):(t.xAxisRangeTracker.reset(n),delete t.namedXAxes[n]),e===t.axisX&&delete t.axisX,e===t.axisY&&delete t.axisY},seriesPaneName:function(t){var n=this,i=n.options,o=t.xAxis,r=[].concat(i.xAxis),s=e.grep(r,function(e){return e.name===o})[0],a=t.yAxis,l=[].concat(i.yAxis),c=e.grep(l,function(e){return e.name===a})[0],u=i.panes||[{}],h=u[0].name||"default",d=(s||{}).pane||(c||{}).pane||h;return d},createScatterChart:function(e,t){var n=this;e.length>0&&n.appendChart(new Le(n,{series:e,clip:t.options.clip}),t)},createScatterLineChart:function(e,t){var n=this;e.length>0&&n.appendChart(new Oe(n,{series:e,clip:t.options.clip}),t)},createBubbleChart:function(e,t){var n=this;e.length>0&&n.appendChart(new Ne(n,{series:e,clip:t.options.clip}),t)},createXYAxis:function(e,t,n){var i,o,r,s,a,l,c,u,h=this,d=e.name,f=t?h.namedYAxes:h.namedXAxes,p=t?h.yAxisRangeTracker:h.xAxisRangeTracker,g=Ft({},e,{vertical:t}),m=S(g.type,Oi),v=p.query(),_=m?{min:.1,max:1}:{min:0,max:1},y=p.query(d)||v||_,w=h.series,b=[g.min,g.max];for(r=0;w.length>r;r++)if(s=w[r],a=s[t?"yAxis":"xAxis"],a==g.name||0===n&&!a){l=Q.current.bindPoint(s,0).valueFields,b.push(l[t?"y":"x"]);break}for(0===n&&v&&(y.min=Tt.min(y.min,v.min),y.max=Tt.max(y.max,v.max)),u=0;b.length>u;u++)if(b[u]instanceof Date){c=!0;break}if(o=S(g.type,ti)||!g.type&&c?oe:m?Kt:Xt,i=new o(y.min,y.max,g),d){if(f[d])throw Error((t?"Y":"X")+" axis with name "+d+" is already defined");f[d]=i}return h.appendAxis(i),i},createAxes:function(e){var t,n=this,i=n.options,o=[].concat(i.xAxis),r=[],s=[].concat(i.yAxis),a=[];xt(o,function(i){t=n.findPane(this.pane),cn(t,e)&&r.push(n.createXYAxis(this,!1,i))}),xt(s,function(i){t=n.findPane(this.pane),cn(t,e)&&a.push(n.createXYAxis(this,!0,i))}),n.axisX=n.axisX||r[0],n.axisY=n.axisY||a[0]},click:function(t,n){var i,o,r,s,a=this,l=t._eventCoordinates(n),c=new Qt(l.x,l.y),u=a.axes,h=u.length,d=[],f=[];for(i=0;h>i;i++)o=u[i],s=o.options.vertical?f:d,r=o.getValue(c),null!==r&&s.push(r);d.length>0&&f.length>0&&t.trigger(lo,{element:e(n.target),originalEvent:n,x:k(d),y:k(f)})},updateAxisOptions:function(e,t){var n=e.options.vertical,i=z(e,[].concat(n?this.axisY:this.axisX)),o=[].concat(n?this.options.yAxis:this.options.xAxis)[i];Ft(o,t)}}),rt=tt.extend({render:function(){var e=this,t=e.series;e.createPieChart(t)},createPieChart:function(e){var t=this,n=e[0],i=new Ye(t,{series:e,padding:n.padding,startAngle:n.startAngle,connectors:n.connectors,legend:t.options.legend});t.appendChart(i)},appendChart:function(e,t){tt.fn.appendChart.call(this,e,t),pn(this.options.legend.items,e.legendItems)}}),st=rt.extend({render:function(){var e=this,t=e.series;e.createDonutChart(t)},createDonutChart:function(e){var t=this,n=e[0],i=new Xe(t,{series:e,padding:n.padding,connectors:n.connectors,legend:t.options.legend});t.appendChart(i)}}),at=Cn.Animation.extend({options:{easing:"easeOutElastic",duration:Di},setup:function(){this.element.transform(kn.transform().scale(So,So,this.options.center))},step:function(e){this.element.transform(kn.transform().scale(e,e,this.options.center))}}),Cn.AnimationFactory.current.register(so,at),lt=Cn.Animation.extend({options:{easing:"easeOutElastic"},setup:function(){var e=this.center=this.element.bbox().center();this.element.transform(kn.transform().scale(So,So,e))},step:function(e){this.element.transform(kn.transform().scale(e,e,this.center))}}),Cn.AnimationFactory.current.register(Nn,lt),ct=Pt.extend({init:function(){this._points=[]},destroy:function(){this._points=[]},show:function(e){var t,n;for(e=[].concat(e),this.hide(),t=0;e.length>t;t++)n=e[t],n&&n.toggleHighlight&&n.hasHighlight()&&(this.togglePointHighlight(n,!0),this._points.push(n))},togglePointHighlight:function(e,t){var n,i=(e.options.highlight||{}).toggle;i?(n={category:e.category,series:e.series,dataItem:e.dataItem,value:e.value,preventDefault:G,visual:e.highlightVisual(),show:t},i(n),n._defaultPrevented||e.toggleHighlight(t)):e.toggleHighlight(t)},hide:function(){for(var e=this._points;e.length;)this.togglePointHighlight(e.pop(),!1)},isHighlighted:function(e){var t,n,i=this._points;for(t=0;i.length>t;t++)if(n=i[t],e==n)return!0;return!1}}),ut=It.extend({init:function(t,n){var i,o,r=this;It.fn.init.call(r),r.options=Ft({},r.options,n),r.chartElement=t,r.template=ut.template,r.template||(r.template=ut.template=bn("<div class='"+Zn+"tooltip "+Zn+"chart-tooltip' style='display:none; position: absolute; font: #= d.font #;border: #= d.border.width #px solid;opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>")),i=ln(r.options.padding||{},"auto"),r.element=e(r.template(r.options)).css({"padding-top":i.top,"padding-right":i.right,"padding-bottom":i.bottom,"padding-left":i.left}),r.move=Mt(r.move,r),r._mouseleave=Mt(r._mouseleave,r),o=Et.format("[{0}='content'],[{0}='scroller']",Et.attr("role")),r._mobileScroller=t.closest(o).data("kendoMobileScroller")},destroy:function(){this._clearShowTimeout(),this.element&&(this.element.off(qi).remove(),this.element=null)},options:{border:{width:1},opacity:1,animation:{duration:Uo}},move:function(){var e,t=this,n=t.options,i=t.element;t.anchor&&t.element&&(e=t._offset(),t.visible||i.css({top:e.top,left:e.left}),t.visible=!0,t._ensureElement(document.body),i.stop(!0,!0).show().animate({left:e.left,top:e.top},n.animation.duration))},_clearShowTimeout:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},_padding:function(){if(!this._chartPadding){var e=this.chartElement;this._chartPadding={top:parseInt(e.css("paddingTop"),10),left:parseInt(e.css("paddingLeft"),10)}}return this._chartPadding},_offset:function(){var t,n,i=this,o=i._measure(),r=i.anchor,s=i._padding(),a=i.chartElement.offset(),l=dn(r.y+s.top+a.top),c=dn(r.x+s.left+a.left),u=Et.support.zoomLevel(),h=e(window),d=window.pageYOffset||document.documentElement.scrollTop||0,f=window.pageXOffset||document.documentElement.scrollLeft||0,p=(this._mobileScroller||{}).movable;return p&&1!==p.scale?(t=kn.transform().scale(p.scale,p.scale,[p.x,p.y]),n=new kn.Point(c,l).transform(t),c=n.x,l=n.y):(l+=i._fit(l-d,o.height,h.outerHeight()/u),c+=i._fit(c-f,o.width,h.outerWidth()/u)),{top:l,left:c}},setStyle:function(e,t){var n,i,o=e.background,r=e.border.color;t&&(n=t.color||t.options.color,o=xn(o,n),r=xn(r,n)),gn(e.color)||(i=new Gt(o).percBrightness(),this.element.toggleClass(Zn+qo,i>180)),this.element.css({backgroundColor:o,borderColor:r,font:e.font,color:e.color,opacity:e.opacity,borderWidth:e.border.width})},show:function(){this._clearShowTimeout(),this.showTimeout=setTimeout(this.move,jo)},hide:function(){var e=this;clearTimeout(e.showTimeout),e._hideElement(),e.visible&&(e.point=null,e.visible=!1,e.index=null)},_measure:function(){this._ensureElement();var e={width:this.element.outerWidth(),height:this.element.outerHeight()};return e},_ensureElement:function(){this.element&&this.element.appendTo(document.body).on(qi,this._mouseleave)},_mouseleave:function(t){var n=t.relatedTarget,i=this.chartElement[0];n&&n!==i&&!e.contains(i,n)&&(this.trigger(Pi),this.hide())},_hideElement:function(){var e=this,t=this.element;t&&t.fadeOut({always:function(){e.visible||t.off(qi).remove()}})},_pointContent:function(e){var t,n,i=this,o=Ft({},i.options,e.options.tooltip);return gn(e.value)&&(t=""+e.value),o.template?(n=Ot(o.template),t=n({value:e.value,category:e.category,series:e.series,dataItem:e.dataItem,percentage:e.percentage,runningTotal:e.runningTotal,total:e.total,low:e.low,high:e.high,xLow:e.xLow,xHigh:e.xHigh,yLow:e.yLow,yHigh:e.yHigh})):o.format&&(t=e.formatValue(o.format)),t},_pointAnchor:function(e){var t=this._measure();return e.tooltipAnchor(t.width,t.height)},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i}}),ht=ut.extend({show:function(e){var t=this,n=Ft({},t.options,e.options.tooltip);e&&e.tooltipAnchor&&t.element&&(t.element.html(t._pointContent(e)),t.anchor=t._pointAnchor(e),t.anchor?(t.setStyle(n,e),ut.fn.show.call(t,e)):t.hide())}}),dt=ut.extend({init:function(e,t,n){var i=this;ut.fn.init.call(i,e,n),i.plotArea=t},options:{sharedTemplate:"<table><th colspan='2'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(point.series.name) { # <td> #= point.series.name #:</td># } #<td>#= content(point) #</td></tr># } #</table>",categoryFormat:"{0:d}"},showAt:function(t,n){var i,o=this,r=o.options,s=o.plotArea,a=s.categoryAxis,l=a.pointCategoryIndex(n),c=a.getCategory(n),u=a.getSlot(l);t=e.grep(t,function(e){var t=e.series.tooltip,n=t&&t.visible===!1;return!n}),t.length>0&&(i=o._content(t,c),o.element.html(i),o.anchor=o._slotAnchor(n,u),o.setStyle(r,t[0]),ut.fn.show.call(o))},_slotAnchor:function(e,t){var n,i=this,o=i.plotArea,r=o.categoryAxis,s=this._measure(),a=e.y-s.height/2;return n=r.options.vertical?Qt(e.x,a):Qt(t.center().x,a)},_content:function(e,t){var n,i,o=this;return n=Et.template(o.options.sharedTemplate),i=n({points:e,category:t,categoryText:sn(o.options.categoryFormat,t),content:o._pointContent})}}),ft=jt.extend({init:function(e,t){jt.fn.init.call(this,t),this.axis=e,this.stickyMode=e instanceof ne},options:{color:Fn,width:1,zIndex:-1,tooltip:{visible:!1}},showAt:function(e){this.point=e,this.moveLine(),this.line.visible(!0);var t=this.options.tooltip;t.visible&&(this.tooltip||(this.tooltip=new pt(this,Ft({},t,{stickyMode:this.stickyMode}))),this.tooltip.showAt(e))},hide:function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},moveLine:function(){var e,t,n,i=this,o=i.axis,r=o.options.vertical,s=i.getBox(),a=i.point,l=r?tr:er;t=new kn.Point(s.x1,s.y1),n=r?new kn.Point(s.x2,s.y1):new kn.Point(s.x1,s.y2),a&&(i.stickyMode?(e=o.getSlot(o.pointCategoryIndex(a)),t[l]=n[l]=e.center()[l]):t[l]=n[l]=a[l]),i.box=s,this.line.moveTo(t).lineTo(n)},getBox:function(){var e,t,n,i=this,o=i.axis,r=o.pane.axes,s=r.length,a=o.options.vertical,l=o.lineBox().clone(),c=a?er:tr;for(n=0;s>n;n++)t=r[n],t.options.vertical!=a&&(e?e.wrap(t.lineBox()):e=t.lineBox().clone());return l[c+1]=e[c+1],l[c+2]=e[c+2],l},createVisual:function(){jt.fn.createVisual.call(this);var e=this.options;this.line=new Cn.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},destroy:function(){var e=this;e.tooltip&&e.tooltip.destroy(),jt.fn.destroy.call(e)}}),pt=ut.extend({init:function(e,t){var n=this,i=e.axis.getRoot().chart.element;n.crosshair=e,ut.fn.init.call(n,i,Ft({},n.options,{background:e.axis.plotArea.options.seriesColors[0]},t)),n.setStyle(n.options)},options:{padding:10},showAt:function(e){var t=this,n=t.element;n&&(t.point=e,t.element.html(t.content(e)),t.anchor=t.getAnchor(),t.move())},move:function(){var e=this,t=e.element,n=e._offset();e._ensureElement(),t.css({top:n.top,left:n.left}).show()},content:function(e){var t,n,i,o=this,r=o.options,s=o.crosshair.axis,a=s.options;return n=t=s[r.stickyMode?"getCategory":"getValue"](e),r.template?(i=Ot(r.template),t=i({value:n})):r.format?t=sn(r.format,n):a.type===ti&&(t=sn(a.labels.dateFormats[a.baseUnit],n)),t},getAnchor:function(){var e,t=this,n=t.options,i=n.position,o=this.crosshair,r=!o.axis.options.vertical,s=o.line.bbox(),a=this._measure(),l=a.width/2,c=a.height/2,u=n.padding;return e=r?i===Ln?s.bottomLeft().translate(-l,u):s.topLeft().translate(-l,-a.height-u):i===Ii?s.topLeft().translate(-a.width-u,-c):s.topRight().translate(u,-c)},hide:function(){this.element.hide(),this.point=null},destroy:function(){ut.fn.destroy.call(this),this.point=null}}),gt={min:function(e){var t,n,i=Vi,o=e.length;for(t=0;o>t;t++)n=e[t],M(n)&&(i=Tt.min(i,n));return i===Vi?e[0]:i},max:function(e){var t,n,i=Wi,o=e.length;for(t=0;o>t;t++)n=e[t],M(n)&&(i=Tt.max(i,n));return i===Wi?e[0]:i},sum:function(e){var t,n,i=e.length,o=0;for(t=0;i>t;t++)n=e[t],M(n)&&(o+=n);return o},sumOrNull:function(e){var t=null;return E(e)&&(t=gt.sum(e)),t},count:function(e){var t,n,i=e.length,o=0;for(t=0;i>t;t++)n=e[t],null!==n&&gn(n)&&o++;return o},avg:function(e){var t=e[0],n=E(e);return n>0&&(t=gt.sum(e)/n),t},first:function(e){var t,n,i=e.length;for(t=0;i>t;t++)if(n=e[t],null!==n&&gn(n))return n;return e[0]}},i.prototype={register:function(e,t){for(var n=0;e.length>n;n++)this._defaults[e[n]]=t},query:function(e){return this._defaults[e]}},i.current=new i,mt=It.extend({init:function(t,n,i){var o,r,s=this,a=t.element,l=n.lineBox(),c=s.getValueAxis(n),u=c.lineBox(),h="."+Zn;It.fn.init.call(s),s.options=Ft({},s.options,i),i=s.options,s.chart=t,s.chartElement=a,s.categoryAxis=n,s._dateAxis=s.categoryAxis instanceof ie,s.valueAxis=c,s._dateAxis&&Ft(i,{min:p(i.min),max:p(i.max),from:p(i.from),to:p(i.to)}),s.template=mt.template,s.template||(s.template=mt.template=bn("<div class='"+Zn+"selector' style='width: #= d.width #px; height: #= d.height #px; top: #= d.offset.top #px; left: #= d.offset.left #px;'><div class='"+Zn+"mask'></div><div class='"+Zn+"mask'></div><div class='"+Zn+"selection'><div class='"+Zn+"selection-bg'></div><div class='"+Zn+"handle "+Zn+"leftHandle'><div></div></div><div class='"+Zn+"handle "+Zn+"rightHandle'><div></div></div></div></div>")),r={left:parseInt(a.css("paddingLeft"),10),right:parseInt(a.css("paddingTop"),10)},s.options=Ft({},{width:l.width(),height:u.height(),padding:r,offset:{left:u.x2+r.left,top:u.y1+r.right},from:i.min,to:i.max},i),s.options.visible&&(s.wrapper=o=e(s.template(s.options)).appendTo(a),s.selection=o.find(h+"selection"),s.leftMask=o.find(h+"mask").first(),s.rightMask=o.find(h+"mask").last(),s.leftHandle=o.find(h+"leftHandle"),s.rightHandle=o.find(h+"rightHandle"),s.options.selection={border:{left:parseFloat(s.selection.css("border-left-width"),10),right:parseFloat(s.selection.css("border-right-width"),10)}},s.leftHandle.css("top",(s.selection.height()-s.leftHandle.height())/2),s.rightHandle.css("top",(s.selection.height()-s.rightHandle.height())/2),s.set(s._index(i.from),s._index(i.to)),s.bind(s.events,s.options),s.wrapper[0].style.cssText=s.wrapper[0].style.cssText,s.wrapper.on(Ji,Mt(s._mousewheel,s)),Et.UserEvents?s.userEvents=new Et.UserEvents(s.wrapper,{global:!0,stopPropagation:!0,multiTouch:!0,start:Mt(s._start,s),move:Mt(s._move,s),end:Mt(s._end,s),tap:Mt(s._tap,s),gesturestart:Mt(s._gesturechange,s),gesturechange:Mt(s._gesturechange,s)}):s.leftHandle.add(s.rightHandle).removeClass(Zn+"handle"))},events:[wo,bo,xo],options:{visible:!0,mousewheel:{zoom:zn},min:Wi,max:Vi},destroy:function(){var e=this,t=e.userEvents;t&&t.destroy(),clearTimeout(e._mwTimeout),e._state=null,e.wrapper.remove()},_rangeEventArgs:function(e){var t=this;return{axis:t.categoryAxis.options,from:t._value(e.from),to:t._value(e.to)}},_start:function(t){var n,i=this,o=i.options,r=e(t.event.target);!i._state&&r&&(i.chart._unsetActivePoint(),i._state={moveTarget:r.parents(".k-handle").add(r).first(),startLocation:t.x?t.x.location:0,range:{from:i._index(o.from),to:i._index(o.to)}},n=i._rangeEventArgs({from:i._index(o.from),to:i._index(o.to)}),i.trigger(wo,n)&&(i.userEvents.cancel(),i._state=null))},_move:function(e){if(this._state){var t=this,n=t._state,i=t.options,o=t.categoryAxis.options.categories,r=t._index(i.from),s=t._index(i.to),a=t._index(i.min),l=t._index(i.max),c=n.startLocation-e.x.location,u=n.range,h={from:u.from,to:u.to},d=u.to-u.from,f=n.moveTarget,p=t.wrapper.width()/(o.length-1),g=Tt.round(c/p);f&&(e.preventDefault(),f.is(".k-selection, .k-selection-bg")?(u.from=Tt.min(Tt.max(a,r-g),l-d),u.to=Tt.min(u.from+d,l)):f.is(".k-leftHandle")?(u.from=Tt.min(Tt.max(a,r-g),l-1),u.to=Tt.max(u.from+1,u.to)):f.is(".k-rightHandle")&&(u.to=Tt.min(Tt.max(a+1,s-g),l),u.from=Tt.min(u.to-1,u.from)),(u.from!==h.from||u.to!==h.to)&&(t.move(u.from,u.to),t.trigger(bo,t._rangeEventArgs(u))))}},_end:function(){var e=this,t=e._state.range;delete e._state,e.set(t.from,t.to),e.trigger(xo,e._rangeEventArgs(t))},_gesturechange:function(e){if(this._state){var t=this,n=t.chart,i=t._state,o=t.options,r=t.categoryAxis,s=i.range,a=n._toModelCoordinates(e.touches[0].x.location).x,l=n._toModelCoordinates(e.touches[1].x.location).x,c=Tt.min(a,l),u=Tt.max(a,l);e.preventDefault(),i.moveTarget=null,s.from=r.pointCategoryIndex(new Nt.Point2D(c))||o.min,s.to=r.pointCategoryIndex(new Nt.Point2D(u))||o.max,t.move(s.from,s.to)}},_tap:function(e){var t=this,n=t.options,i=t.chart._eventCoordinates(e),o=t.categoryAxis,r=o.pointCategoryIndex(new Nt.Point2D(i.x,o.box.y1)),s=t._index(n.from),a=t._index(n.to),l=t._index(n.min),c=t._index(n.max),u=a-s,h=s+u/2,d=Tt.round(h-r),f={},p=3===e.event.which;t._state||p||(e.preventDefault(),t.chart._unsetActivePoint(),o.options.justified||d--,f.from=Tt.min(Tt.max(l,s-d),c-u),f.to=Tt.min(f.from+u,c),t._start(e),t._state&&(t._state.range=f,t.trigger(bo,t._rangeEventArgs(f)),t._end()))},_mousewheel:function(e){var t,n=this,i=n.options,o=hn(e);n._start({event:{target:n.selection}}),n._state&&(t=n._state.range,e.preventDefault(),e.stopPropagation(),Tt.abs(o)>1&&(o*=or),i.mousewheel.reverse&&(o*=-1),n.expand(o)&&n.trigger(bo,{axis:n.categoryAxis.options,delta:o,originalEvent:e,from:n._value(t.from),to:n._value(t.to)}),n._mwTimeout&&clearTimeout(n._mwTimeout),n._mwTimeout=setTimeout(function(){n._end()},Zi))},_index:function(e){var t=this,n=t.categoryAxis,i=n.options.categories,o=e;return e instanceof Date&&(o=A(e,i),!n.options.justified&&e>mn(i)&&(o+=1)),o},_value:function(e){var t=this,n=this.categoryAxis,i=n.options.categories,o=e;return t._dateAxis&&(o=e>i.length-1?t.options.max:i[e]),o},_slot:function(e){var t=this,n=this.categoryAxis;return n.getSlot(t._index(e))},move:function(e,t){var n,i,o,r,s=this,a=s.options,l=a.offset,c=a.padding,u=a.selection.border;o=s._slot(e),n=dn(o.x1-l.left+c.left),s.leftMask.width(n),s.selection.css("left",n),o=s._slot(t),i=dn(a.width-(o.x1-l.left+c.left)),s.rightMask.width(i),r=a.width-i,r!=a.width&&(r+=u.right),s.rightMask.css("left",r),s.selection.width(Tt.max(a.width-(n+i)-u.right,0))},set:function(e,t){var n=this,i=n.options,o=n._index(i.min),r=n._index(i.max);e=vn(n._index(e),o,r),t=vn(n._index(t),e+1,r),i.visible&&n.move(e,t),i.from=n._value(e),i.to=n._value(t)},expand:function(e){var n=this,i=n.options,o=n._index(i.min),r=n._index(i.max),s=i.mousewheel.zoom,a=n._index(i.from),l=n._index(i.to),c={from:a,to:l},u=Ft({},c);return n._state&&(c=n._state.range),s!==po&&(c.from=vn(vn(a-e,0,l-1),o,r)),s!==Ii&&(c.to=vn(vn(l+e,c.from+1,r),o,r)),c.from!==u.from||c.to!==u.to?(n.set(c.from,c.to),!0):t},getValueAxis:function(e){var t,n,i=e.pane.axes,o=i.length;for(t=0;o>t;t++)if(n=i[t],n.options.vertical!==e.options.vertical)return n}}),vt=Pt.extend({init:function(e,t){this.plotArea=e,this.options=Ft({},this.options,t)},options:{key:"none",lock:"none"},start:function(e){this._active=K(e.event,this.options.key)},move:function(e){if(this._active){var t=this.axisRanges=this._panAxes(e,er).concat(this._panAxes(e,tr));if(t.length)return this.axisRanges=t,Y(t)}},end:function(){this._active=!1},pan:function(){var e,t,n=this.plotArea,i=this.axisRanges;if(i.length){for(t=0;i.length>t;t++)e=i[t],n.updateAxisOptions(e.axis,e.range);n.redraw(n.panes)}},_panAxes:function(e,t){var n,i,o,r,s=this.plotArea,a=-e[t].delta,l=(this.options.lock||"").toLowerCase(),c=[];if(0!==a&&(l||"").toLowerCase()!=t)for(n=s.axes,r=0;n.length>r;r++)i=n[r],(t==er&&!i.options.vertical||t==tr&&i.options.vertical)&&(o=i.pan(a),o&&(o.limitRange=!0,c.push({axis:i,range:o})));return c}}),_t=Pt.extend({init:function(t,n){this.chart=t,this.options=Ft({},this.options,n),this._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>")},options:{key:"shift",lock:"none"},start:function(e){var t,n,i,o,r;K(e.event,this.options.key)&&(t=this.chart,n=t._toModelCoordinates(e.x.client,e.y.client),i=this._zoomPane=t._plotArea.paneByPoint(n),i&&(o=i.clipBox().clone(),r=this._elementOffset(),o.translate(r.left,r.top),this._zoomPaneClipBox=o,this._marquee.appendTo(document.body).css({left:e.x.client+1,top:e.y.client+1,width:0,height:0})))},_elementOffset:function(){var e=this.chart.element,t=e.offset();return{left:parseInt(e.css("paddingTop"),10)+t.left,top:parseInt(e.css("paddingLeft"),10)+t.top}},move:function(e){var t,n=this._zoomPane;n&&(t=this._selectionPosition(e),this._marquee.css(t))},end:function(e){var n,i,o,r,s=this._zoomPane;return s?(n=this._elementOffset(),i=this._selectionPosition(e),i.left-=n.left,i.top-=n.top,o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height},this._updateAxisRanges(o,r),this._marquee.remove(),delete this._zoomPane,Y(this.axisRanges)):t},zoom:function(){var e,t,n,i=this.axisRanges;if(i&&i.length){for(e=this.chart._plotArea,n=0;i.length>n;n++)t=i[n],e.updateAxisOptions(t.axis,t.range);e.redraw(e.panes)}},destroy:function(){this._marquee.remove(),delete this._marquee},_updateAxisRanges:function(e,t){var n,i,o,r,s=(this.options.lock||"").toLowerCase(),a=[],l=this._zoomPane.axes;for(o=0;l.length>o;o++)n=l[o],i=n.options.vertical,s==er&&!i||s===tr&&i||(r=n.pointsRange(e,t),a.push({axis:n,range:r}));this.axisRanges=a},_selectionPosition:function(e){var t=(this.options.lock||"").toLowerCase(),n=Tt.min(e.x.startLocation,e.x.location),i=Tt.min(e.y.startLocation,e.y.location),o=Tt.abs(e.x.initialDelta),r=Tt.abs(e.y.initialDelta),s=this._zoomPaneClipBox;return t==er&&(n=s.x1,o=s.width()),t==tr&&(i=s.y1,r=s.height()),e.x.location>s.x2&&(o=s.x2-e.x.startLocation),s.x1>e.x.location&&(o=e.x.startLocation-s.x1),e.y.location>s.y2&&(r=s.y2-e.y.startLocation),s.y1>e.y.location&&(r=e.y.startLocation-s.y1),{left:Tt.max(n,s.x1),top:Tt.max(i,s.y1),width:o,height:r}}}),yt=Pt.extend({init:function(e,t){this.plotArea=e,this.options=Ft({},this.options,t)},updateRanges:function(e){var t,n,i,o,r=(this.options.lock||"").toLowerCase(),s=[],a=this.plotArea.axes;for(i=0;a.length>i;i++)t=a[i],n=t.options.vertical,r==er&&!n||r===tr&&n||(o=t.zoomRange(-e),o&&s.push({axis:t,range:o}));return this.axisRanges=s,Y(s)},zoom:function(){var e,t,n,i=this.axisRanges;if(i&&i.length){for(e=this.plotArea,n=0;i.length>n;n++)t=i[n],e.updateAxisOptions(t.axis,t.range);e.redraw(e.panes)}}}),wt=function(e,t,n){var i,o,r,s=this,a=t.canonicalFields(e),l=t.valueFields(e),c=t.sourceFields(e,a),u=s._seriesFields=[],h=n.query(e.type),d=e.aggregate||h;for(s._series=e,s._binder=t,i=0;a.length>i;i++){if(o=a[i],typeof d===io)r=d[o];else{if(0!==i&&!cn(o,l))break;r=d}r&&u.push({canonicalName:o,name:c[i],transform:Lt(r)?r:gt[r]})}},wt.prototype={aggregatePoints:function(e,t){var n,i,o,r,s,a=this,l=a._bindPoints(e||[]),c=a._series,u=a._seriesFields,h=l.dataItems[0],d={};for(!h||M(h)||kt(h)||(s=function(){},s.prototype=h,d=new s),n=0;u.length>n;n++){if(i=u[n],o=a._bindField(l.values,i.canonicalName),r=i.transform(o,c,l.dataItems,t),null!==r&&typeof r===io&&!gn(r.length)){d=r;break}gn(r)&&(V(i.name,d),Et.setter(i.name)(d,r))}return d},_bindPoints:function(e){var t,n,i=this,o=i._binder,r=i._series,s=[],a=[];for(t=0;e.length>t;t++)n=e[t],s.push(o.bindPoint(r,n)),a.push(r.data[n]);return{values:s,dataItems:a}},_bindField:function(e,t){var n,i,o,r,s=[],a=e.length;for(n=0;a>n;n++)i=e[n],r=i.valueFields,o=gn(r[t])?r[t]:i.fields[t],s.push(o);return s}},bt=Pt.extend({init:function(e){this._axis=e},slot:function(e,t){return this._axis.slot(e,t)},range:function(){return this._axis.range()}}),At(e.easing,{easeOutElastic:function(e,t,n,i){var o=1.70158,r=0,s=i;return 0===e?n:1===e?n+i:(r||(r=.5),s<Tt.abs(i)?(s=i,o=r/4):o=r/(2*Tt.PI)*Tt.asin(i/s),s*Tt.pow(2,-10*e)*Tt.sin((1*e-o)*(1.1*Tt.PI)/r)+i+n)}}),Nt.ui.plugin(hr),X.current.register(nt,[Pn,Kn,Fi,Xo,Dn,Yo,Vn,oo,Hn,Ko,On,ho,uo,Qo,Si]),X.current.register(ot,[vo,_o,Nn]),X.current.register(rt,[so]),X.current.register(st,[li]),Q.current.register([Pn,Kn,Fi,Xo,Dn,Yo],[$o],[Un,Yn,no,fi,pi]),Q.current.register([ho,uo],[bi,Ho],[Un,Yn,no]),Q.current.register([Qo,Si],[$o],[Un,Yn,no,Po]),i.current.register([Pn,Kn,Fi,Xo,Dn,Yo,Qo,Si],{value:Ni,color:wi,noteText:wi,errorLow:Ui,errorHigh:Ni}),i.current.register([ho,uo],{from:Ui,to:Ni,color:wi,noteText:wi}),Q.current.register([vo,_o,Nn],[er,tr],[Yn,no,gi,mi,vi,_i]),Q.current.register([Nn],[er,tr,"size"],[Yn,Un,no]),Q.current.register([Vn,oo],["open","high","low","close"],[Un,Yn,"downColor",no]),i.current.register([Vn,oo],{open:Ni,high:Ni,low:Ui,close:Ni,color:wi,downColor:wi,noteText:wi}),Q.current.register([On],["lower","q1","median","q3","upper","mean","outliers"],[Un,Yn,no]),i.current.register([On],{lower:Ni,q1:Ni,median:Ni,q3:Ni,upper:Ni,mean:Ni,outliers:wi,color:wi,noteText:wi}),Q.current.register([Hn,Ko],["current","target"],[Un,Yn,"visibleInLegend",no]),i.current.register([Hn,Ko],{current:Ni,target:Ni,color:wi,noteText:wi}),Q.current.register([so,li],[$o],[Un,Yn,"explode","visibleInLegend","visible"]),Ft(Nt,{EQUALLY_SPACED_SERIES:cr,Aggregates:gt,AreaChart:Be,AreaSegment:Re,AxisGroupRangeTracker:it,Bar:ce,BarChart:pe,BarLabel:Z,BubbleChart:Ne,Bullet:_e,BulletChart:ve,CandlestickChart:Ve,Candlestick:He,CategoricalChart:fe,CategoricalErrorBar:be,CategoricalPlotArea:nt,CategoryAxis:ne,ChartAxis:bt,ChartContainer:et,ClipAnimation:Me,ClusterLayout:re,Crosshair:ft,CrosshairTooltip:pt,DateCategoryAxis:ie,DateValueAxis:oe,DefaultAggregates:i,DonutChart:Xe,DonutPlotArea:st,DonutSegment:Ke,ErrorBarBase:we,ErrorRangeCalculator:de,Highlight:ct,SharedTooltip:dt,Legend:te,LegendItem:J,LegendLayout:ee,LineChart:Ae,LinePoint:ke,LineSegment:Se,Pane:Je,PieAnimation:at,PieChart:Ye,PieChartMixin:$e,PiePlotArea:rt,PieSegment:qe,PlotAreaBase:tt,PlotAreaFactory:X,PointEventsMixin:ae,RangeBar:ge,RangeBarChart:me,ScatterChart:Le,ScatterErrorBar:xe,ScatterLineChart:Oe,Selection:mt,SeriesAggregator:wt,SeriesBinder:Q,ShapeElement:en,SplineSegment:Pe,SplineAreaSegment:Fe,StackWrap:se,Tooltip:ht,OHLCChart:We,OHLCPoint:Ue,WaterfallChart:Qe,WaterfallSegment:Ze,XYPlotArea:ot,addDuration:m,areNumbers:P,axisGroupBox:C,categoriesCount:u,ceilDate:y,countNumbers:E,
|
|
duration:x,ensureTree:V,indexOf:z,isNumber:M,floorDate:_,filterSeriesByType:F,hasValue:$,lteDateIndex:A,evalOptions:R,seriesTotal:U,singleItemOrArray:k,sortDates:L,startOfWeek:v,transpose:H,toDate:p,toTime:g,uniqueDates:O})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){return e.value.x-t.value.x}function i(e,t){return 180-C.abs(C.abs(e-t)-180)}var o,r,s,a,l,c,u,h,d,f,p,g,m,v,_,y,w,b,x,k,C=Math,S=window.kendo,T=S.deepExtend,D=S.util,A=D.append,M=S.drawing,E=S.geometry,P=S.dataviz,I=P.AreaSegment,R=P.Axis,B=P.AxisGroupRangeTracker,F=P.BarChart,z=P.Box2D,L=P.CategoryAxis,O=P.CategoricalChart,N=P.CategoricalPlotArea,H=P.ChartElement,V=P.CurveProcessor,U=P.DonutSegment,W=P.LineChart,j=P.LineSegment,G=P.LogarithmicAxis,q=P.NumericAxis,$=P.PlotAreaBase,Y=P.PlotAreaFactory,K=P.Point2D,X=P.Ring,Q=P.ScatterChart,Z=P.ScatterLineChart,J=P.SeriesBinder,ee=P.ShapeBuilder,te=P.SplineSegment,ne=P.SplineAreaSegment,ie=P.getSpacing,oe=P.filterSeriesByType,re=D.limitValue,se=P.round,ae="arc",le="#000",ce=P.COORD_PRECISION,ue=.15,he=C.PI/180,de="gap",fe="interpolate",pe="log",ge="plotAreaClick",me="polarArea",ve="polarLine",_e="polarScatter",ye="radarArea",we="radarColumn",be="radarLine",xe="smooth",ke="x",Ce="y",Se="zero",Te=[me,ve,_e],De=[ye,we,be],Ae={createGridLines:function(e){var t,n,i=this,o=i.options,r=C.abs(i.box.center().y-e.lineBox().y1),s=!1,a=[];return o.majorGridLines.visible&&(t=i.majorGridLineAngles(e),s=!0,a=i.renderMajorGridLines(t,r,o.majorGridLines)),o.minorGridLines.visible&&(n=i.minorGridLineAngles(e,s),A(a,i.renderMinorGridLines(n,r,o.minorGridLines,e,s))),a},renderMajorGridLines:function(e,t,n){return this.renderGridLines(e,t,n)},renderMinorGridLines:function(e,t,n,i,o){var r=this.radiusCallback&&this.radiusCallback(t,i,o);return this.renderGridLines(e,t,n,r)},renderGridLines:function(e,t,n,i){var o,r,s={stroke:{width:n.width,color:n.color,dashType:n.dashType}},a=this.box.center(),l=new E.Circle([a.x,a.y],t),c=this.gridLinesVisual();for(o=0;e.length>o;o++)r=new M.Path(s),i&&(l.radius=i(e[o])),r.moveTo(l.center).lineTo(l.pointAt(e[o])),c.append(r);return c.children},gridLineAngles:function(n,i,o,r,s){var a=this,l=a.intervals(i,o,r,s),c=n.options,u=c.visible&&(c.line||{}).visible!==!1;return e.map(l,function(e){var n=a.intervalAngle(e);return u&&90===n?t:n})}},Me=L.extend({options:{startAngle:90,labels:{margin:ie(10)},majorGridLines:{visible:!0},justified:!0},range:function(){return{min:0,max:this.options.categories.length}},reflow:function(e){this.box=e,this.reflowLabels()},lineBox:function(){return this.box},reflowLabels:function(){var e,t,n=this,i=n.options.labels,o=i.skip||0,r=i.step||1,s=new z,a=n.labels;for(t=0;a.length>t;t++)a[t].reflow(s),e=a[t].box,a[t].reflow(n.getSlot(o+t*r).adjacentBox(0,e.width(),e.height()))},intervals:function(e,t,n,i){var o,r=this,s=r.options,a=s.categories.length,l=0,c=a/e||1,u=360/c,h=[];for(t=t||0,n=n||1,o=t;c>o;o+=n)l=s.reverse?360-o*u:o*u,l=se(l,ce)%360,i&&P.inArray(l,i)||h.push(l);return h},majorIntervals:function(){return this.intervals(1)},minorIntervals:function(){return this.intervals(.5)},intervalAngle:function(e){return(360+e+this.options.startAngle)%360},majorAngles:function(){return e.map(this.majorIntervals(),e.proxy(this.intervalAngle,this))},createLine:function(){return[]},majorGridLineAngles:function(e){var t=this.options.majorGridLines;return this.gridLineAngles(e,1,t.skip,t.step)},minorGridLineAngles:function(e,t){var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=t?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(e,.5,i.skip,i.step,r)},radiusCallback:function(e,n,i){var o,r,s,a;return n.options.type!==ae?(o=360/(2*this.options.categories.length),r=C.cos(o*he)*e,s=this.majorAngles(),a=function(t){return!i&&P.inArray(t,s)?e:r}):t},createPlotBands:function(){var e,t,n,i,o,r,s,a=this,l=a.options,c=l.plotBands||[],u=this._plotbandGroup=new M.Group({zIndex:-1});for(e=0;c.length>e;e++)t=c[e],n=a.plotBandSlot(t),i=a.getSlot(t.from),o=t.from-C.floor(t.from),n.startAngle+=o*i.angle,r=C.ceil(t.to)-t.to,n.angle-=(r+o)*i.angle,s=ee.current.createRing(n,{fill:{color:t.color,opacity:t.opacity},stroke:{opacity:t.opacity}}),u.append(s);a.appendVisual(u)},plotBandSlot:function(e){return this.getSlot(e.from,e.to-1)},getSlot:function(e,t){var n,i,o,r=this,s=r.options,a=s.justified,l=r.box,c=r.majorAngles(),u=c.length,h=360/u;return s.reverse&&!a&&(e=(e+1)%u),e=re(C.floor(e),0,u-1),i=c[e],a&&(i-=h/2,0>i&&(i+=360)),t=re(C.ceil(t||e),e,u-1),n=t-e+1,o=h*n,new X(l.center(),0,l.height()/2,i,o)},slot:function(e,t){var n=this.getSlot(e,t),i=n.startAngle+180,o=i+n.angle;return new E.Arc([n.c.x,n.c.y],{startAngle:i,endAngle:o,radiusX:n.r,radiusY:n.r})},pointCategoryIndex:function(e){var t,n,i=this,o=null,r=i.options.categories.length;for(t=0;r>t;t++)if(n=i.getSlot(t),n.containsPoint(e)){o=t;break}return o}});T(Me.fn,Ae),o={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var e,t,n,i,o,r,s=this,a=s.options,l=a.plotBands||[],c=a.majorGridLines.type,u=s.plotArea.polarAxis,h=u.majorAngles(),d=u.box.center(),f=this._plotbandGroup=new M.Group({zIndex:-1});for(e=0;l.length>e;e++)t=l[e],n={fill:{color:t.color,opacity:t.opacity},stroke:{opacity:t.opacity}},i=s.getSlot(t.from,t.to,!0),o=new X(d,d.y-i.y2,d.y-i.y1,0,360),r=c===ae?ee.current.createRing(o,n):M.Path.fromPoints(s.plotBandPoints(o,h),n).close(),f.append(r);s.appendVisual(f)},plotBandPoints:function(e,t){var n,i=[],o=[],r=[e.c.x,e.c.y],s=new E.Circle(r,e.ir),a=new E.Circle(r,e.r);for(n=0;t.length>n;n++)i.push(s.pointAt(t[n])),o.push(a.pointAt(t[n]));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(e){var t,n=this,i=n.options,o=n.radarMajorGridLinePositions(),r=e.majorAngles(),s=e.box.center(),a=[];return i.majorGridLines.visible&&(a=n.renderGridLines(s,o,r,i.majorGridLines)),i.minorGridLines.visible&&(t=n.radarMinorGridLinePositions(),A(a,n.renderGridLines(s,t,r,i.minorGridLines))),a},renderGridLines:function(e,t,n,i){var o,r,s,a,l,c={stroke:{width:i.width,color:i.color,dashType:i.dashType}},u=this.gridLinesVisual();for(r=0;t.length>r;r++)if(o=e.y-t[r],o>0)if(a=new E.Circle([e.x,e.y],o),i.type===ae)u.append(new M.Circle(a,c));else{for(l=new M.Path(c),s=0;n.length>s;s++)l.lineTo(a.pointAt(n[s]));l.close(),u.append(l)}return u.children},getValue:function(e){var t,n,o,r,s,a,l,c=this,u=c.options,h=c.lineBox(),d=c.plotArea.polarAxis,f=d.majorAngles(),p=d.box.center(),g=e.distanceTo(p),m=g;return u.majorGridLines.type!==ae&&f.length>1&&(t=e.x-p.x,n=e.y-p.y,o=(C.atan2(n,t)/he+540)%360,f.sort(function(e,t){return i(e,o)-i(t,o)}),r=i(f[0],f[1])/2,s=i(o,f[0]),a=90-r,l=180-s-a,m=g*(C.sin(l*he)/C.sin(a*he))),c.axisType().fn.getValue.call(c,new K(h.x1,h.y2-m))}},r=q.extend({radarMajorGridLinePositions:function(){return this.getTickPositions(this.options.majorUnit)},radarMinorGridLinePositions:function(){var e=this,t=e.options,n=0;return t.majorGridLines.visible&&(n=t.majorUnit),e.getTickPositions(t.minorUnit,n)},axisType:function(){return q}}),T(r.fn,o),s=G.extend({radarMajorGridLinePositions:function(){var e=this,t=[];return e.traverseMajorTicksPositions(function(e){t.push(e)},e.options.majorGridLines),t},radarMinorGridLinePositions:function(){var e=this,t=[];return e.traverseMinorTicksPositions(function(e){t.push(e)},e.options.minorGridLines),t},axisType:function(){return G}}),T(s.fn,o),a=R.extend({init:function(e){var t=this;R.fn.init.call(t,e),e=t.options,e.minorUnit=e.minorUnit||t.options.majorUnit/2},options:{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:ie(10)},majorGridLines:{color:le,visible:!0,width:1},minorGridLines:{color:"#aaa"}},getDivisions:function(e){return q.fn.getDivisions.call(this,e)-1},reflow:function(e){this.box=e,this.reflowLabels()},reflowLabels:function(){var e,t,n=this,i=n.options,o=i.labels,r=o.skip||0,s=o.step||1,a=new z,l=n.intervals(i.majorUnit,r,s),c=n.labels;for(t=0;c.length>t;t++)c[t].reflow(a),e=c[t].box,c[t].reflow(n.getSlot(l[t]).adjacentBox(0,e.width(),e.height()))},lineBox:function(){return this.box},intervals:function(e,t,n,i){var o,r,s=this,a=s.options,l=s.getDivisions(e),c=a.min,u=[];for(t=t||0,n=n||1,r=t;l>r;r+=n)o=(360+c+r*e)%360,i&&P.inArray(o,i)||u.push(o);return u},majorIntervals:function(){return this.intervals(this.options.majorUnit)},minorIntervals:function(){return this.intervals(this.options.minorUnit)},intervalAngle:function(e){return(540-e-this.options.startAngle)%360},majorAngles:Me.fn.majorAngles,createLine:function(){return[]},majorGridLineAngles:function(e){var t=this.options.majorGridLines;return this.gridLineAngles(e,this.options.majorUnit,t.skip,t.step)},minorGridLineAngles:function(e,t){var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=t?this.intervals(n.majorUnit,o.skip,o.step):null;return this.gridLineAngles(e,this.options.minorUnit,i.skip,i.step,r)},createPlotBands:Me.fn.createPlotBands,plotBandSlot:function(e){return this.getSlot(e.from,e.to)},getSlot:function(e,t){var n,i=this,o=i.options,r=o.startAngle,s=i.box;return e=re(e,o.min,o.max),t=re(t||e,e,o.max),o.reverse&&(e*=-1,t*=-1),e=(540-e-r)%360,t=(540-t-r)%360,e>t&&(n=e,e=t,t=n),new X(s.center(),0,s.height()/2,e,t-e)},slot:function(e,t){var n,i,o,r,s=this.options,a=360-s.startAngle,l=this.getSlot(e,t);return P.util.defined(t)||(t=e),o=C.min(e,t),r=C.max(e,t),s.reverse?(n=o,i=r):(n=360-r,i=360-o),n=(n+a)%360,i=(i+a)%360,new E.Arc([l.c.x,l.c.y],{startAngle:n,endAngle:i,radiusX:l.r,radiusY:l.r})},getValue:function(e){var t=this,n=t.options,i=t.box.center(),o=e.x-i.x,r=e.y-i.y,s=C.round(C.atan2(r,o)/he),a=n.startAngle;return n.reverse||(s*=-1,a*=-1),(s+a+360)%360},range:q.fn.range,labelsCount:q.fn.labelsCount,createAxisLabel:q.fn.createAxisLabel}),T(a.fn,Ae),l=H.extend({options:{gap:1,spacing:0},reflow:function(e){var t,n,i=this,o=i.options,r=i.children,s=o.gap,a=o.spacing,l=r.length,c=l+s+a*(l-1),u=e.angle/c,h=e.startAngle+u*(s/2);for(n=0;l>n;n++)t=e.clone(),t.startAngle=h,t.angle=u,r[n].sector&&(t.r=r[n].sector.r),r[n].reflow(t),r[n].sector=t,h+=u+u*a}}),c=H.extend({reflow:function(e){var t,n,i=this,o=i.options.isReversed,r=i.children,s=r.length,a=o?s-1:0,l=o?-1:1;for(i.box=new z,n=a;n>=0&&s>n;n+=l)t=r[n].sector,t.startAngle=e.startAngle,t.angle=e.angle}}),u=U.extend({init:function(e,t){U.fn.init.call(this,e,null,t)},options:{overlay:{gradient:null},labels:{distance:10}}}),h=F.extend({pointType:function(){return u},clusterType:function(){return l},stackType:function(){return c},categorySlot:function(e,t){return e.getSlot(t)},pointSlot:function(e,t){var n=e.clone(),i=e.c.y;return n.r=i-t.y1,n.ir=i-t.y2,n},reflow:O.fn.reflow,reflowPoint:function(e,t){e.sector=t,e.reflow()},options:{clip:!1,animation:{type:"pie"}},createAnimation:function(){this.options.animation.center=this.box.toRect().center(),F.fn.createAnimation.call(this)}}),d=W.extend({options:{clip:!1},pointSlot:function(e,t){var n=e.c.y-t.y1,i=K.onCircle(e.c,e.middle(),n);return new z(i.x,i.y,i.x,i.y)},createSegment:function(e,t,n){var i,o,r=t.style;return o=r==xe?te:j,i=new o(e,t,n),e.length===t.data.length&&(i.options.closed=!0),i}}),f=I.extend({points:function(){return j.fn.points.call(this,this.stackPoints)}}),p=ne.extend({closeFill:e.noop}),g=d.extend({createSegment:function(e,t,n,i){var o,r,s=this,a=s.options,l=a.isStacked,c=(t.line||{}).style;return c===xe?(r=new p(e,i,l,t,n),r.options.closed=!0):(l&&n>0&&i&&(o=i.linePoints.slice(0).reverse()),e.push(e[0]),r=new f(e,o,t,n)),r},seriesMissingValues:function(e){return e.missingValues||Se}}),m=Q.extend({pointSlot:function(e,t){var n=e.c.y-t.y1,i=K.onCircle(e.c,e.startAngle,n);return new z(i.x,i.y,i.x,i.y)},options:{clip:!1}}),v=Z.extend({pointSlot:m.fn.pointSlot,options:{clip:!1}}),_=I.extend({points:function(){var e=this,t=e.parent,n=t.plotArea,i=n.polarAxis,o=i.box.center(),r=e.stackPoints,s=j.fn.points.call(e,r);return s.unshift([o.x,o.y]),s.push([o.x,o.y]),s}}),y=ne.extend({closeFill:function(e){var t=this._polarAxisCenter();e.lineTo(t.x,t.y)},_polarAxisCenter:function(){var e=this.parent,t=e.plotArea,n=t.polarAxis,i=n.box.center();return i},strokeSegments:function(){var e,t,n,i=this._strokeSegments;return i||(e=this._polarAxisCenter(),t=new V(!1),n=j.fn.points.call(this),n.push(e),i=this._strokeSegments=t.process(n),i.pop()),i}}),w=v.extend({createSegment:function(e,t,n){var i,o=(t.line||{}).style;return i=o==xe?new y(e,null,!1,t,n):new _(e,[],t,n)},createMissingValue:function(e,t){var n;return P.hasValue(e.x)&&t!=fe&&(n={x:e.x,y:e.y},t==Se&&(n.y=0)),n},seriesMissingValues:function(e){return e.missingValues||Se},_hasMissingValuesGap:function(){var e,t=this.options.series;for(e=0;t.length>e;e++)if(this.seriesMissingValues(t[e])===de)return!0},sortPoints:function(e){var t,i,o;if(e.sort(n),this._hasMissingValuesGap())for(o=0;e.length>o;o++)i=e[o],i&&(t=i.value,P.hasValue(t.y)||this.seriesMissingValues(i.series)!==de||delete e[o]);return e}}),b=$.extend({init:function(e,t){var n=this;n.valueAxisRangeTracker=new B,$.fn.init.call(n,e,t)},render:function(){var e=this;e.addToLegend(e.series),e.createPolarAxis(),e.createCharts(),e.createValueAxis()},alignAxes:function(){var e=this.valueAxis,t=e.range(),n=e.options.reverse?t.max:t.min,i=e.getSlot(n),o=this.polarAxis.getSlot(0).c,r=e.box.translate(o.x-i.x1,o.y-i.y1);e.reflow(r)},createValueAxis:function(){var e,t,n,i,o=this,a=o.valueAxisRangeTracker,l=a.query(),c=o.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});c.type===pe?(n=s,i={min:.1,max:1}):(n=r,i={min:0,max:1}),e=a.query(name)||l||i,e&&l&&(e.min=C.min(e.min,l.min),e.max=C.max(e.max,l.max)),t=new n(e.min,e.max,c),o.valueAxis=t,o.appendAxis(t)},reflowAxes:function(){var e,t=this,n=t.options.plotArea,i=t.valueAxis,o=t.polarAxis,r=t.box,s=C.min(r.width(),r.height())*ue,a=ie(n.padding||{},s),l=r.clone().unpad(a),c=l.clone().shrink(0,l.height()/2);o.reflow(l),i.reflow(c),e=i.lineBox().height()-i.box.height(),i.reflow(i.box.unpad({top:e})),t.axisBox=l,t.alignAxes(l)},backgroundBox:function(){return this.box}}),x=b.extend({options:{categoryAxis:{categories:[]},valueAxis:{}},createPolarAxis:function(){var e,t=this;e=new Me(t.options.categoryAxis),t.polarAxis=e,t.categoryAxis=e,t.appendAxis(e)},valueAxisOptions:function(e){var t=this;return t._hasBarCharts&&T(e,{majorGridLines:{type:ae},minorGridLines:{type:ae}}),t._isStacked100&&T(e,{roundToMajorUnit:!1,labels:{format:"P0"}}),T(e,t.options.valueAxis)},appendChart:N.fn.appendChart,createCharts:function(){var e=this,t=e.filterVisibleSeries(e.series),n=e.panes[0];e.createAreaChart(oe(t,[ye]),n),e.createLineChart(oe(t,[be]),n),e.createBarChart(oe(t,[we]),n)},chartOptions:function(e){var t,n,i={series:e},o=e[0];return o&&(t=this.filterVisibleSeries(e),n=o.stack,i.isStacked=n&&t.length>1,i.isStacked100=n&&"100%"===n.type&&t.length>1,i.isStacked100&&(this._isStacked100=!0)),i},createAreaChart:function(e,t){if(0!==e.length){var n=new g(this,this.chartOptions(e));this.appendChart(n,t)}},createLineChart:function(e,t){if(0!==e.length){var n=new d(this,this.chartOptions(e));this.appendChart(n,t)}},createBarChart:function(e,t){var n,i,o;0!==e.length&&(n=e[0],i=this.chartOptions(e),i.gap=n.gap,i.spacing=n.spacing,o=new h(this,i),this.appendChart(o,t),this._hasBarCharts=!0)},seriesCategoryAxis:function(){return this.categoryAxis},click:function(t,n){var i,o,r=this,s=t._eventCoordinates(n),a=new K(s.x,s.y);i=r.categoryAxis.getCategory(a),o=r.valueAxis.getValue(a),null!==i&&null!==o&&t.trigger(ge,{element:e(n.target),category:i,value:o})},createCrosshairs:e.noop}),k=b.extend({options:{xAxis:{},yAxis:{}},createPolarAxis:function(){var e,t=this;e=new a(t.options.xAxis),t.polarAxis=e,t.axisX=e,t.appendAxis(e)},valueAxisOptions:function(e){var t=this;return T(e,{majorGridLines:{type:ae},minorGridLines:{type:ae}},t.options.yAxis)},createValueAxis:function(){var e=this;b.fn.createValueAxis.call(e),e.axisY=e.valueAxis},appendChart:function(e,t){var n=this;n.valueAxisRangeTracker.update(e.yAxisRanges),$.fn.appendChart.call(n,e,t)},createCharts:function(){var e=this,t=e.filterVisibleSeries(e.series),n=e.panes[0];e.createLineChart(oe(t,[ve]),n),e.createScatterChart(oe(t,[_e]),n),e.createAreaChart(oe(t,[me]),n)},createLineChart:function(e,t){if(0!==e.length){var n=this,i=new v(n,{series:e});n.appendChart(i,t)}},createScatterChart:function(e,t){if(0!==e.length){var n=this,i=new m(n,{series:e});n.appendChart(i,t)}},createAreaChart:function(e,t){if(0!==e.length){var n=this,i=new w(n,{series:e});n.appendChart(i,t)}},click:function(t,n){var i,o,r=this,s=t._eventCoordinates(n),a=new K(s.x,s.y);i=r.axisX.getValue(a),o=r.axisY.getValue(a),null!==i&&null!==o&&t.trigger(ge,{element:e(n.target),x:i,y:o})},createCrosshairs:e.noop}),Y.current.register(k,Te),Y.current.register(x,De),J.current.register(Te,[ke,Ce],["color"]),J.current.register(De,["value"],["color"]),P.DefaultAggregates.current.register(De,{value:"max",color:"first"}),T(P,{PolarAreaChart:w,PolarAxis:a,PolarLineChart:v,PolarPlotArea:k,RadarAreaChart:g,RadarBarChart:h,RadarCategoryAxis:Me,RadarClusterLayout:l,RadarLineChart:d,RadarNumericAxis:r,RadarPlotArea:x,SplinePolarAreaSegment:y,SplineRadarAreaSegment:p,RadarStackLayout:c})}(window.kendo.jQuery)}(),function(){!function(e,t){var n,i=window.kendo,o=i.deepExtend,r=e.extend,s=i.isFunction,a=i.template,l=i.util,c=l.append,u=i.drawing,h=i.geometry,d=i.dataviz,f=i.drawing.Color,p=d.ChartElement,g=d.PieChartMixin,m=d.PlotAreaBase,v=d.PlotAreaFactory,_=d.Point2D,y=d.Box2D,w=d.SeriesBinder,b=d.TextBox,x=d.autoFormat,k=d.evalOptions,C=l.limitValue,S=d.seriesTotal,T="category",D="color",A="funnel",M="value",E="black",P="white",I=m.extend({render:function(){var e=this,t=e.series;e.createFunnelChart(t)},createFunnelChart:function(e){var t=this,n=e[0],i=new R(t,{series:e,legend:t.options.legend,neckRatio:n.neckRatio,dynamicHeight:n.dynamicHeight,dynamicSlope:n.dynamicSlope,segmentSpacing:n.segmentSpacing,highlight:n.highlight});t.appendChart(i)},appendChart:function(e,t){m.fn.appendChart.call(this,e,t),c(this.options.legend.items,e.legendItems)}}),R=p.extend({init:function(e,t){var n=this;p.fn.init.call(n,t),n.plotArea=e,n.points=[],n.labels=[],n.legendItems=[],n.render()},options:{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:"center",position:"center"}},formatPointValue:function(e,t){return x(t,e.value)},render:function(){var e,n,i,r,a,l,c,u=this,h=u.options,d=u.plotArea.options.seriesColors||[],f=d.length,p=h.series[0],g=p.data;if(g)for(i=S(p),a=0;g.length>a;a++)e=w.current.bindPoint(p,a),r=e.valueFields.value,null!==r&&r!==t&&(n=e.fields,s(p.color)||(p.color=n.color||d[a%f]),n=o({index:a,owner:u,series:p,category:n.category,dataItem:g[a],percentage:Math.abs(r)/i,visibleInLegend:n.visibleInLegend,visible:n.visible},n),l=u.createSegment(r,n),c=u.createLabel(r,n),l&&c&&l.append(c))},evalSegmentOptions:function(e,t,n){var i=n.series;k(e,{value:t,series:i,dataItem:n.dataItem,index:n.index},{defaults:i._defaults,excluded:["data","toggle","visual"]})},createSegment:function(e,i){var s,a=this,l=o({},i.series);return a.evalSegmentOptions(l,e,i),a.createLegendItem(e,l,i),i.visible!==!1?(s=new n(e,l,i),r(s,i),a.append(s),a.points.push(s),s):t},createLabel:function(e,n){var i,r,s,l=this,c=n.series,u=n.dataItem,h=o({},l.options.labels,c.labels),d=e;return h.visible?(h.template?(r=a(h.template),d=r({dataItem:u,value:e,percentage:n.percentage,category:n.category,series:c})):h.format&&(d=x(h.format,d)),h.color||"center"!==h.align||(s=new f(c.color).percBrightness(),h.color=s>180?E:P),l.evalSegmentOptions(h,e,n),i=new b(d,o({vAlign:h.position},h)),l.labels.push(i),i):t},labelPadding:function(){var e,t,n,i,o=this.labels,r={left:0,right:0};for(i=0;o.length>i;i++)e=o[i],t=e.options.align,"center"!==t&&(n=o[i].box.width(),"left"===t?r.left=Math.max(r.left,n):r.right=Math.max(r.right,n));return r},reflow:function(t){var n,i,o,r,s,a,l,c,u,d,f,p,g=this,m=g.options,v=g.points,_=v.length,y=1>=m.neckRatio,w=t.clone().unpad(g.labelPadding()),b=w.width(),x=0,k=y?0:(b-b/m.neckRatio)/2,S=m.segmentSpacing,T=m.dynamicSlope,D=w.height()-S*(_-1),A=y?m.neckRatio*b:b;if(_){if(T)for(l=v[0],c=l,e.each(v,function(e,t){t.percentage>c.percentage&&(c=t)}),o=l.percentage/c.percentage*b,k=(b-o)/2,n=0;_>n;n++)s=v[n].percentage,u=v[n+1],d=u?u.percentage:s,r=v[n].points=[],i=m.dynamicHeight?D*s:D/_,a=(b-o*(d/s))/2,a=C(a,0,b),r.push(new h.Point(w.x1+k,w.y1+x)),r.push(new h.Point(w.x1+b-k,w.y1+x)),r.push(new h.Point(w.x1+b-a,w.y1+i+x)),r.push(new h.Point(w.x1+a,w.y1+i+x)),k=a,x+=i+S,o*=d/s,o=C(o,0,b);else for(f=y?b:b-2*k,p=(f-A)/2,n=0;_>n;n++)r=v[n].points=[],s=v[n].percentage,a=m.dynamicHeight?p*s:p/_,i=m.dynamicHeight?D*s:D/_,r.push(new h.Point(w.x1+k,w.y1+x)),r.push(new h.Point(w.x1+b-k,w.y1+x)),r.push(new h.Point(w.x1+b-k-a,w.y1+i+x)),r.push(new h.Point(w.x1+k+a,w.y1+i+x)),k+=a,x+=i+S;for(n=0;_>n;n++)v[n].reflow(t)}}});o(R.fn,g),n=p.extend({init:function(e,t,n){var i=this;p.fn.init.call(i,t),i.value=e,i.options.index=n.index},options:{color:P,border:{width:1}},reflow:function(e){var t=this,n=t.points,i=t.children[0];t.box=new y(n[0].x,n[0].y,n[1].x,n[2].y),i&&i.reflow(new y(e.x1,n[0].y,e.x2,n[2].y))},createVisual:function(){var e,t=this,n=t.options;p.fn.createVisual.call(this),e=n.visual?n.visual({category:t.category,dataItem:t.dataItem,value:t.value,series:t.series,percentage:t.percentage,points:t.points,options:n,createVisual:function(){return t.createPath()}}):t.createPath(),e&&this.visual.append(e)},createPath:function(){var e=this.options,t=e.border,n=u.Path.fromPoints(this.points,{fill:{color:e.color,opacity:e.opacity},stroke:{color:t.color,opacity:t.opacity,width:t.width}}).close();return n},createHighlight:function(e){return u.Path.fromPoints(this.points,e)},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var e=u.Path.fromPoints(this.points).close();return{options:this.options,path:e}},highlightOverlay:function(e,t){var n,i,o,s=this.options,a=s.highlight||{};if(a.visible!==!1)return n=a.border||{},i=r({},t,{fill:a.color,stroke:n.color,strokeOpacity:n.opacity,strokeWidth:n.width,fillOpacity:a.opacity}),o=e.createPolyline(this.points,!0,i)},tooltipAnchor:function(e){var t=this.box;return new _(t.center().x-e/2,t.y1)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),o(n.fn,d.PointEventsMixin),v.current.register(I,[A]),w.current.register([A],[M],[T,D,"visibleInLegend","visible"]),o(d,{FunnelChart:R,FunnelSegment:n})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){var n=e.box,i=e.children[0].box,r=t.border||{},s=t.background||"",a=new A,l=M.fromRect(new E([n.x1,n.y1],[n.width(),n.height()]),{stroke:{}}),c=new P(e.text,new D(i.x1,i.y1),{font:t.font,fill:{color:t.color}}),u=o(c.bbox().clone(),t.padding),h=M.fromRect(u,{stroke:{color:r.width?r.color:"",width:r.width,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:s}});return a.append(l),a.append(h),a.append(c),a}function i(e,t,n){var i=w(e.from)?e.from:V,o=w(e.to)?e.to:H;return e.from=l.max(l.min(o,i),t),e.to=l.min(l.max(o,i),n),e}function o(e,t){var n=e.getOrigin(),i=e.getSize(),o=k(t);return e.setOrigin([n.x-o.left,n.y-o.top]),e.setSize([i.width+(o.left+o.right),i.height+(o.top+o.bottom)]),e}function r(e,t){var n=k(t);return n.left=-n.left,n.top=-n.top,n.right=-n.right,n.bottom=-n.bottom,o(e,n)}var s,a,l=Math,c=window.kendo,u=c.util,h=c.ui.Widget,d=c.deepExtend,f=c.dataviz,p=f.autoMajorUnit,g=f.ChartElement,m=f.NumericAxis,v=f.Axis,_=f.Box2D,y=c.Class,w=u.defined,b=u.isNumber,x=f.interpolateValue,k=f.getSpacing,C=f.round,S=f.geometry,T=f.drawing,D=S.Point,A=T.Group,M=T.Path,E=S.Rect,P=T.Text,I=150,R=250,B="arrow",F="arrowPointer",z="barPointer",L="#000",O=.05,N=f.COORD_PRECISION,H=Number.MAX_VALUE,V=-Number.MAX_VALUE,U=200,W=.5,j=200,G=60,q=60,$=5,Y=l.PI/180,K=180,X="inside",Q="linear",Z="needle",J="outside",ee="radialPointer",te="x",ne="y",ie=y.extend({init:function(e,t){var n=this,i=e.options;g.fn.init.call(n,t),t=n.options,t.fill=t.color,n.scale=e,t.value=w(t.value)?l.min(l.max(t.value,i.min),i.max):i.min},options:{color:L},value:function(e){var n=this,i=n.options,o=i.value,r=n.scale.options;return 0===arguments.length?o:(i._oldValue=i._oldValue!==t?i.value:r.min,i.value=l.min(l.max(e,r.min),r.max),n.elements&&n.repaint(),t)}}),oe=ie.extend({options:{shape:Z,cap:{size:O},arrow:{width:16,height:14},animation:{type:ee,duration:I}},setRadius:function(e){var t=this;e&&(t.elements.clear(),t.render(t.parent,t.center,e))},setAngle:function(e){this.elements.transform(S.transform().rotate(e,this.center))},repaint:function(){var e=this,t=e.scale,n=e.options,i=t.slotAngle(n._oldValue),o=t.slotAngle(n.value);n.animation.transitions===!1?e.setAngle(o):new fe(e.elements,d(n.animation,{oldAngle:i,newAngle:o})).play()},render:function(){var e=this,t=e.scale,n=t.arc.center,i=e.options,o=new A;return i.animation!==!1&&d(i.animation,{startAngle:0,center:n,reverse:t.options.reverse}),i.shape===Z?o.append(e._renderNeedle(),e._renderCap()):o.append(e._renderArrow()),e.elements=o,e.setAngle(Y),o},reflow:function(e){var t=this,n=t.center=e.center,i=t.radius=e.getRadiusX(),o=t.capSize=Math.round(i*t.options.cap.size);t.bbox=E.fromPoints(new D(n.x-o,n.y-o),new D(n.x+o,n.y+o))},_renderNeedle:function(){var e=this,t=e.options,n=e.scale.options.minorTicks.size,i=e.center,o=t.color,r=new M({fill:{color:o},stroke:{color:o,width:W}});return r.moveTo(i.x+e.radius-n,i.y).lineTo(i.x,i.y-e.capSize/2).lineTo(i.x,i.y+e.capSize/2).close(),r},_renderCap:function(){var e=this,t=e.options,n=t.cap.color||t.color,i=new S.Circle(e.center,e.capSize),o=new T.Circle(i,{fill:{color:n},stroke:{color:n}});return o}}),re=m.extend({init:function(e){var t=this;t.options=d({},t.options,e),t.options.majorUnit=t.options.majorUnit||p(t.options.min,t.options.max),t.options.minorUnit=t.options.minorUnit||t.options.majorUnit/10,v.fn.init.call(t,t.options)},options:{min:0,max:100,majorTicks:{size:15,align:X,color:L,width:W,visible:!0},minorTicks:{size:10,align:X,color:L,width:W,visible:!0},startAngle:-30,endAngle:210,labels:{position:X,padding:2}},render:function(e,t){var n=this,i=n.renderArc(e,t);n.bbox=i.bbox(),n.labelElements=n.renderLabels(),n.ticks=n.renderTicks(),n.ranges=n.renderRanges()},reflow:function(e){var n=this,i=e.center(),o=l.min(e.height(),e.width())/2;return n.bbox===t?n.render(i,o):(n.bbox=n.arc.bbox(),n.radius(n.arc.getRadiusX()),n.repositionRanges(),n.renderLabels(),t)},slotAngle:function(e){var t,n=this.options,i=n.startAngle,o=n.reverse,r=n.endAngle-i,s=n.min,a=n.max;return t=o?n.endAngle-(e-s)/(a-s)*r:(e-s)/(a-s)*r+i,t+K},renderLabels:function(){var e,i,o,r,s,a,c,u,h,d,p,g,m,v,_=this,y=_.options,w=y.majorTicks.size,b=_.arc.clone(),x=b.getRadiusX(),k=_.tickAngles(b,y.majorUnit),C=_.labels,T=C.length,M=y.labels,P=M.padding,I=.05*x,R=y.rangeSize=y.rangeSize||.1*x,B=y.ranges||[],F=new A;for(_.options.rangeDistance!==t?I=_.options.rangeDistance:_.options.rangeDistance=I,M.position===X&&(x-=w,B.length&&_.labelElements===t&&(x-=R+I),b.setRadiusX(x).setRadiusY(x)),c=0;T>c;c++)s=C[c],e=s.box.width()/2,i=s.box.height()/2,r=k[c],o=(r-K)*Y,d=M.position===X,a=b.pointAt(r),u=a.x+l.cos(o)*(e+P)*(d?1:-1),h=a.y+l.sin(o)*(i+P)*(d?1:-1),s.reflow(new f.Box2D(u-e,h-i,u+e,h+i)),g=new D(s.box.x1,s.box.y1),_.labelElements===t?(p=n(s,y.labels),F.append(p)):(p=_.labelElements.children[c],m=p.bbox().origin,v=p.transform()||S.transform(),v.translate(g.x-m.x,g.y-m.y),p.transform(v)),_.bbox=E.union(_.bbox,p.bbox());return F},repositionRanges:function(){var e,t,n,i=this,o=i.ranges.children,r=i.options.rangeSize,s=i.options.rangeDistance;if(o.length>0){for(e=i.getRangeRadius(),i.options.labels.position===X&&(e+=r+s),t=e+r/2,n=0;o.length>n;n++)o[n]._geometry.setRadiusX(t).setRadiusY(t);i.bbox=E.union(i.bbox,i.ranges.bbox())}},renderRanges:function(){var e,t,n,i,o,r,s=this,a=s.arc,l=new A,c=s.rangeSegments(),u=c.length,h=s.options.reverse,d=s.options.rangeSize,f=s.options.rangeDistance;if(u)for(i=s.getRangeRadius(),s.radius(s.radius()-d-f),r=0;u>r;r++)n=c[r],e=s.slotAngle(n[h?"to":"from"]),t=s.slotAngle(n[h?"from":"to"]),t-e!==0&&(o=new S.Arc(a.center,{radiusX:i+d/2,radiusY:i+d/2,startAngle:e,endAngle:t}),l.append(new T.Arc(o,{stroke:{width:d,color:n.color,opacity:n.opacity}})));return l},rangeSegments:function(){function e(e,t,n,i){return{from:e,to:t,color:n,opacity:i}}var t,n,o,r,s,a=this,l=a.options,c=l.ranges||[],u=c.length,h=l.rangePlaceholderColor,d=[],f=l.min,p=l.max;if(u)for(d.push(e(f,p,h)),r=0;u>r;r++)for(t=i(c[r],f,p),n=d.length,s=0;n>s;s++)if(o=d[s],t.from>=o.from&&o.to>=t.from){d.push(e(t.from,t.to,t.color,t.opacity)),t.to>=o.from&&o.to>=t.to&&d.push(e(t.to,o.to,h,t.opacity)),o.to=t.from;break}return d},getRangeRadius:function(){var e,t=this,n=t.options,i=n.majorTicks.size,o=n.rangeSize,r=n.rangeDistance,s=t.arc;return e=n.labels.position===J?s.getRadiusX()-i-r-o:s.getRadiusX()-o},renderArc:function(e,t){var n=this,i=n.options,o=n.arc=new S.Arc(e,{radiusX:t,radiusY:t,startAngle:i.startAngle+K,endAngle:i.endAngle+K});return o},renderTicks:function(){function e(e,t,n,i){var o,r,s,a=new A,l=e.center,c=e.getRadiusX(),u=i.visible;if(u)for(o=0;t.length>o;o++)r=e.pointAt(t[o]),s=new D(l.x+c-i.size,l.y).rotate(t[o],l),a.append(new M({stroke:{color:i.color,width:i.width}}).moveTo(r).lineTo(s));return a}var t=this,n=t.arc,i=t.options,o=i.labels.position,r=new A,s=i.majorTicks.size,a=i.minorTicks.size,l=n.clone(),c=l.getRadiusX();return t.majorTickAngles=t.tickAngles(n,i.majorUnit),t.majorTicks=e(l,t.majorTickAngles,i.majorUnit,i.majorTicks),r.append(t.majorTicks),t._tickDifference=s-a,o===J&&l.setRadiusX(c-s+a).setRadiusY(c-s+a),t.minorTickAngles=t.normalizeTickAngles(t.tickAngles(n,i.minorUnit)),t.minorTicks=e(l,t.minorTickAngles,i.minorUnit,i.minorTicks,i.majorUnit),r.append(t.minorTicks),r},normalizeTickAngles:function(e){var t,n=this,i=n.options,o=i.majorUnit/i.minorUnit;for(t=e.length-1;t>=0;t--)t%o===0&&e.splice(t,1);return e},tickAngles:function(e,t){var n,i=this,o=i.options,r=o.reverse,s=o.max-o.min,a=e.endAngle-e.startAngle,l=e.startAngle,c=s/t,u=a/c,h=[];for(r&&(l+=a,u=-u),n=0;c>n;n++)h.push(C(l,N)),l+=u;return C(l)<=e.endAngle&&h.push(l),h},radius:function(e){var n=this;return e?(n.arc.setRadiusX(e).setRadiusY(e),n.repositionTicks(n.majorTicks.children,n.majorTickAngles),n.repositionTicks(n.minorTicks.children,n.minorTickAngles,!0),t):n.arc.getRadiusX()},repositionTicks:function(e,t,n){var i,o,r,s,a,l=this,c=n?l._tickDifference||0:0,u=l.arc,h=u.getRadiusX();for(n&&l.options.labels.position===J&&0!==c&&(u=l.arc.clone(),u.setRadiusX(h-c).setRadiusY(h-c)),i=0;e.length>i;i++)o=u.pointAt(t[i]),r=e[i].segments,s=o.x-r[0].anchor().x,a=o.y-r[0].anchor().y,e[i].transform((new S.Transformation).translate(s,a))}}),se=h.extend({init:function(t,n){var i,o,r,s,a,l=this,u=f.ui.themes||{};if(c.destroy(t),e(t).empty(),h.fn.init.call(l,t),l.wrapper=l.element,l._originalOptions=d({},n),i=d({},l.options,n),r=i.theme,s=u[r]||u[r.toLowerCase()],o=r&&s?s.gauge:{},l.options=d({},o,i),e.isArray(i.pointer))for(a=0;i.pointer.length>a;a++)l.options.pointer[a]=d({},o.pointer,i.pointer[a]);l.element.addClass("k-gauge"),l.surface=l._createSurface(),l.redraw()},options:{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}},destroy:function(){this.surface.destroy(),h.fn.destroy.call(this)},value:function(e){var n=this,i=n.pointers[0];return 0===arguments.length?i.value():(i.value(e),n._setValueOptions(e),t)},_draw:function(){var e=this.surface;e.clear(),e.draw(this._visuals)},exportVisual:function(){return this._visuals},allValues:function(t){var n,i=this,o=i.pointers,r=[];if(0===arguments.length){for(n=0;o.length>n;n++)r.push(o[n].value());return r}if(e.isArray(t))for(n=0;t.length>n;n++)b(t[n])&&o[n].value(t[n]);i._setValueOptions(t)},_setValueOptions:function(e){var t,n=[].concat(this.options.pointer);for(e=[].concat(e),t=0;e.length>t;t++)n[t].value=e[t]},_resize:function(){var e,t=this,n=t.options.transitions;for(t.options.transitions=!1,e=0;t.pointers.length>e;e++)t.pointers[e].options.animation.transitions=!1;
|
|
for(t.redraw(),t.options.transitions=n,e=0;t.pointers.length>e;e++)t.pointers[e].options.animation.transitions=n},redraw:function(){var e,t=this,n=d(t._getSize(),t.options.gaugeArea),i=new E([0,0],[n.width,n.height]);t.surface.clear(),t.gaugeArea=t._createGaugeArea(),t.surface.element.css({width:n.width,height:n.height}),t._createModel(),e=r(i.bbox(),t._gaugeAreaMargin),t.reflow(e)},_createGaugeArea:function(){var e,t=this,n=t.options.gaugeArea,i=t.surface.size(),o=n.border||{},s=new E([0,0],[i.width,i.height]);return t._gaugeAreaMargin=n.margin||$,o.width>0&&(s=r(s,o.width)),e=M.fromRect(s,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n.background}})},_createSurface:function(){var t,n=this,i=n.options,o=n._getSize();return o=i.gaugeArea?d(o,i.gaugeArea):o,t=e("<div></div>").appendTo(n.element).css({width:o.width,height:o.height}),new T.Surface.create(t,{type:i.renderAs})},getSize:function(){return this._getSize()},_getSize:function(){var e=this,t=e.element,n=t.width(),i=t.height();return n||(n=j),i||(i=U),{width:n,height:i}}}),ae=se.extend({init:function(e,t){var n=this;se.fn.init.call(n,e,t),c.notify(n,f.ui)},options:{name:"RadialGauge",transitions:!0,gaugeArea:{background:""}},reflow:function(e){var t,n=this,i=n.pointers;for(n.scale.reflow(e),n._initialPlotArea=n.scale.bbox,t=0;i.length>t;t++)i[t].reflow(n.scale.arc),n._initialPlotArea=E.union(n._initialPlotArea,i[t].bbox);n.fitScale(e),n.alignScale(e),n._buildVisual(n.gaugeArea,i,n.scale),n._draw()},_buildVisual:function(e,t,n){var i,o,r=new A;for(r.append(e),r.append(n.ticks),r.append(n.ranges),o=0;t.length>o;o++)i=t[o],i.render(),r.append(i.elements),i.value(i.options.value);r.append(n.labelElements),this._visuals=r},fitScale:function(e){for(var t,n,i,o,r,s=this,a=s.scale,c=a.arc,u=s._initialPlotArea,h=l.abs(s.getDiff(u,e)),d=C(h,N),f=C(-h,N),p=0,g=0;!(!(g++<100)||(p=r===i?p+1:0,p>5)||d!=o&&(t=s.getPlotBox(d,e,c),t>=0&&2>=t)||f!=o&&(i=s.getPlotBox(f,e,c),i>=0&&2>=i)||(o=t>0&&i>0?2*d:0>t&&0>i?2*f:C((d+f)/2||1,N),n=s.getPlotBox(o,e,c),n>=0&&2>=n));)r=i,n>0?(f=o,i=n):(d=o,t=n)},getPlotBox:function(e,t,n){var i,o=this,r=o.scale,s=o.pointers,a=n.getRadiusX();for(n=n.clone(),n.setRadiusX(a+e).setRadiusY(a+e),r.arc=n,r.reflow(t),o.plotBbox=r.bbox,i=0;s.length>i;i++)s[i].reflow(n),o.plotBbox=E.union(o.plotBbox,s[i].bbox);return o.getDiff(o.plotBbox,t)},getDiff:function(e,t){return l.min(t.width()-e.width(),t.height()-e.height())},alignScale:function(e){var t,n=this,i=n.plotBbox.center(),o=e.center(),r=i.x-o.x,s=i.y-o.y,a=n.scale,l=n.pointers;for(a.arc.center.x-=r,a.arc.center.y-=s,a.reflow(e),t=0;l.length>t;t++)l[t].reflow(a.arc),n.plotBbox=E.union(a.bbox,l[t].bbox)},_createModel:function(){var t,n,i=this,o=i.options,r=o.pointer,s=i.scale=new re(o.scale);for(i.pointers=[],r=e.isArray(r)?r:[r],n=0;r.length>n;n++)t=new oe(s,d({},r[n],{animation:{transitions:o.transitions}})),i.pointers.push(t)}}),le=se.extend({init:function(e,t){var n=this;se.fn.init.call(n,e,t),c.notify(n,f.ui)},options:{name:"LinearGauge",transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}},reflow:function(e){var t,n=this,i=n.pointers,o=e.origin.x,r=e.origin.y,s=new f.Box2D(o,o,o+e.width(),r+e.height());for(n.scale.reflow(s),t=0;i.length>t;t++)i[t].reflow();n.bbox=n._getBox(s),n._alignElements(),n._shrinkElements(),n._buildVisual(),n._draw()},_buildVisual:function(){var e,t,n=this,i=new A,o=n.scale.render(),r=n.pointers;for(i.append(n.gaugeArea),i.append(o),t=0;r.length>t;t++)e=r[t],i.append(e.render()),e.value(e.options.value);n._visuals=i},_createModel:function(){var t,n,i,o=this,r=o.options,s=r.pointer,a=o.scale=new ce(r.scale);for(o.pointers=[],s=e.isArray(s)?s:[s],i=0;s.length>i;i++)n=d({},s[i],{animation:{transitions:r.transitions}}),t=n.shape===B?new he(a,n):new de(a,n),o.pointers.push(t)},_getSize:function(){var e=this,t=e.element,n=t.width(),i=t.height(),o=e.options.scale.vertical;return n||(n=o?G:j),i||(i=o?U:q),{width:n,height:i}},_getBox:function(e){var t,n,i=this,o=i.scale,r=i.pointers,s=e.center(),a=r[0].box.clone().wrap(o.box);for(n=0;r.length>n;n++)a.wrap(r[n].box.clone());return o.options.vertical?(t=a.width()/2,a=new _(s.x-t,e.y1,s.x+t,e.y2)):(t=a.height()/2,a=new _(e.x1,s.y-t,e.x2,s.y+t)),a},_alignElements:function(){var e,t,n=this,i=n.scale,o=n.pointers,r=i.box,s=o[0].box.clone().wrap(i.box),a=n.bbox;for(t=0;o.length>t;t++)s.wrap(o[t].box.clone());for(i.options.vertical?(e=a.center().x-s.center().x,i.reflow(new _(r.x1+e,a.y1,r.x2+e,a.y2))):(e=a.center().y-s.center().y,i.reflow(new _(a.x1,r.y1+e,a.x2,r.y2+e))),t=0;o.length>t;t++)o[t].reflow(n.bbox)},_shrinkElements:function(){var e,t=this,n=t.scale,i=t.pointers,o=n.box.clone(),r=n.options.vertical?"y":"x",s=i[0].box;for(e=0;i.length>e;e++)s.wrap(i[e].box.clone());for(o[r+1]+=l.max(o[r+1]-s[r+1],0),o[r+2]-=l.max(s[r+2]-o[r+2],0),n.reflow(o),e=0;i.length>e;e++)i[e].reflow(t.bbox)}}),ce=m.extend({init:function(e){var t=this;t.options=d({},t.options,e),t.options=d({},t.options,{labels:{mirror:t.options.mirror}}),t.options.majorUnit=t.options.majorUnit||p(t.options.min,t.options.max),v.fn.init.call(t,t.options),t.options.minorUnit=t.options.minorUnit||t.options.majorUnit/10},options:{min:0,max:50,majorTicks:{size:15,align:X,color:L,width:W,visible:!0},minorTicks:{size:10,align:X,color:L,width:W,visible:!0},line:{width:W},labels:{position:X,padding:2},mirror:!1,_alignLines:!1},render:function(){var e=this,t=e.elements=new A,n=e.renderLabels(),i=e.renderLine(),o=e.renderTicks(),r=e.renderRanges();return t.append(i,n,o,r),t},renderRanges:function(){var e,t,n,o,r,s=this,a=s.options,l=a.min,c=a.max,u=a.ranges||[],h=a.vertical,d=a.labels.mirror,f=new A,p=u.length,g=a.rangeSize||a.minorTicks.size/2;if(p)for(r=0;p>r;r++)e=i(u[r],l,c),t=s.getSlot(e.from,e.to),n=h?s.lineBox():t,o=h?t:s.lineBox(),h?n.x1-=g*(d?-1:1):o.y2+=g*(d?-1:1),f.append(M.fromRect(new E([n.x1,o.y1],[n.x2-n.x1,o.y2-o.y1]),{fill:{color:e.color,opacity:e.opacity},stroke:{}}));return f},renderLabels:function(){var e,t=this,i=t.options,o=t.labels,r=new A;for(e=0;o.length>e;e++)r.append(n(o[e],i.labels));return r},renderLine:function(){var e,t=this,n=t.options,i=n.line,o=t.lineBox(),r=new A;return i.width>0&&i.visible&&(e=new M({stroke:{color:i.color,dashType:i.dashType,width:i.width}}),e.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),r.append(e)),r},renderTicks:function(){function e(e,i){var s,l=e.length;if(i.visible)for(s=i.skip;l>s;s+=i.step)s%i.skipUnit!==0&&(a.tickX=r?o.x2:o.x2-i.size,a.tickY=r?o.y1-i.size:o.y1,a.position=e[s],n.append(t.renderAxisTick(a,i)))}var t=this,n=new A,i=t.options,o=t.lineBox(),r=i.labels.mirror,s=i.majorTicks.visible?i.majorUnit:0,a={_alignLines:i._alignLines,vertical:i.vertical};return e(t.getMajorTickPositions(),i.majorTicks),e(t.getMinorTickPositions(),d({},{skipUnit:s/i.minorUnit},i.minorTicks)),n},renderAxisTick:function(e,t){var n,i,o,r=e.tickX,s=e.tickY,a=e.position;return e.vertical?(n=new D(r,a),i=new D(r+t.size,a)):(n=new D(a,s),i=new D(a,s+t.size)),o=new M({stroke:{color:t.color,width:t.width}}).moveTo(n).lineTo(i)}}),ue=ie.extend({init:function(e,t){var n=this;ie.fn.init.call(n,e,t),n.options=d({track:{visible:w(t.track)}},n.options)},options:{shape:z,track:{border:{width:1}},color:L,border:{width:1},opacity:1,margin:k(3),animation:{type:z},visible:!0},reflow:function(){var e,t,n,i=this,o=i.options,r=i.scale,s=r.lineBox(),a=o.track.size||o.size,l=o.size/2,c=r.options.mirror,u=k(o.margin),h=r.options.vertical,d=h?u[c?"left":"right"]:u[c?"bottom":"top"];d=c?-d:d,h?(n=new _(s.x1+d,s.y1,s.x1+d,s.y2),c?n.x1-=a:n.x2+=a,o.shape!==z&&(t=new _(s.x2+d,s.y1-l,s.x2+d,s.y2+l),e=t)):(n=new _(s.x1,s.y1-d,s.x2,s.y1-d),c?n.y2+=a:n.y1-=a,o.shape!==z&&(t=new _(s.x1-l,s.y1-d,s.x2+l,s.y1-d),e=t)),i.trackBox=n,i.pointerRangeBox=t,i.box=e||n.clone().pad(o.border.width)},getElementOptions:function(){var e=this.options;return{fill:{color:e.color,opacity:e.opacity},stroke:w(e.border)?{color:e.border.width?e.border.color||e.color:"",width:e.border.width,dashType:e.border.dashType,opacity:e.opacity}:null}},_margin:function(){var e=this,t=e.options,n=e.scale,i=n.options.mirror,o=k(t.margin),r=n.options.vertical,s=r?o[i?"left":"right"]:o[i?"bottom":"top"];return s}}),he=ue.extend({init:function(e,n){ue.fn.init.call(this,e,n),this.options.size===t&&(this.options.size=.6*this.scale.options.majorTicks.size)},pointerShape:function(){var e,t,n=this,i=n.options,o=n.scale,r=i.size,s=o.options.vertical,a=r/2,l=o.options.mirror?-1:1,c=o.options.reverse;return s?(e=c?"y2":"y1",t=[new D(0,0-a),new D(0-l*r,0),new D(0,0+a)]):(e=c?"x1":"x2",t=[new D(0-a,0),new D(0,0+l*r),new D(0+a,0)]),t},repaint:function(){var e=this,t=e.scale,n=e.options,i=new s(e.elements,d(n.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:e._margin(n.margin),from:t.getSlot(n._oldValue),to:t.getSlot(n.value)}));n.animation.transitions===!1&&(i.options.duration=0),i.setup(),i.play()},render:function(){var e,t=this,n=t.options,i=new A,o=t.scale,r=t.getElementOptions(),s=t.pointerShape(n.value);return n.animation.type=F,i=new M({stroke:r.stroke,fill:r.fill}).moveTo(s[0]).lineTo(s[1]).lineTo(s[2]).close(),e=o.getSlot(n.value),i.transform(S.transform().translate(e.x1,e.y1)),t.elements=i,i}}),de=ue.extend({init:function(e,n){ue.fn.init.call(this,e,n),this.options.size===t&&(this.options.size=.3*this.scale.options.majorTicks.size)},pointerShape:function(e){var t,n,i,o=this,r=o.options,s=o.scale,a=s.options.vertical,l=s.options.mirror,c=l==a?-1:1,u=r.size*c,h=s.getSlot(s.options.min),d=s.getSlot(e),f=a?ne:te,p=a?te:ne,g=o._margin()*c,m=new D;return m[f]=h[f+"1"],m[p]=h[p+"1"],t=new D,t[f]=d[f+"1"],t[p]=d[p+"1"],a?(m.translate(g,0),t.translate(g,0)):(m.translate(0,g),t.translate(0,g)),n=t.clone(),i=m.clone(),a?(n.translate(u,0),i.translate(u,0)):(n.translate(0,u),i.translate(0,u)),[m,t,n,i]},repaint:function(){var e,t=this,n=t.scale,i=t.options,o=t.pointerShape(i.value),r=t.elements.children[0],s=t.pointerShape(i._oldValue);r.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),e=new a(r,d(i.animation,{reverse:n.options.reverse,vertical:n.options.vertical,oldPoints:[s[1],s[2]],newPoints:[o[1],o[2]]})),i.animation.transitions===!1&&(e.options.duration=0),e.setup(),e.play()},render:function(){var e=this,t=new A,n=e.getElementOptions(),i=new M({stroke:n.stroke,fill:n.fill});return t.append(i),e.elements=t,t}}),fe=T.Animation.extend({init:function(e,t){T.Animation.fn.init.call(this,e,t),t=this.options,t.duration=l.max(l.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)},options:{easing:Q,duration:I},step:function(e){var t=this,n=t.options,i=x(n.oldAngle,n.newAngle,e);t.element.transform(S.transform().rotate(i,n.center))}});T.AnimationFactory.current.register(ee,fe),s=T.Animation.extend({options:{easing:Q,duration:R},setup:function(){var e,t,n=this.options,i=n.margin,o=n.from,r=n.to,s=n.vertical?"x1":"y1";n.mirror==n.vertical?(o[s]-=i,r[s]-=i):(o[s]+=i,r[s]+=i),e=this.fromScale=new D(o.x1,o.y1),t=this.toScale=new D(r.x1,r.y1),0!==n.duration&&(n.duration=l.max(e.distanceTo(t)/n.duration*1e3,1))},step:function(e){var t=x(this.fromScale.x,this.toScale.x,e),n=x(this.fromScale.y,this.toScale.y,e);this.element.transform(S.transform().translate(t,n))}}),T.AnimationFactory.current.register(F,s),a=T.Animation.extend({options:{easing:Q,speed:R},setup:function(){var e=this.options,t=e.newPoints,n=e.oldPoints,i=this.axis=e.vertical?ne:te,o=this.to=t[0][i],r=this.from=n[0][i];0!==e.duration&&(e.duration=l.max(l.abs(o-r)/e.speed*1e3,1)),this._set(r)},step:function(e){var t=x(this.from,this.to,e);this._set(t)},_set:function(e){var t="set"+this.axis.toUpperCase(),n=this.options.newPoints;n[0][t](e),n[1][t](e)}}),T.AnimationFactory.current.register(z,a),f.ui.plugin(ae),f.ui.plugin(le),f.ExportMixin.extend(se.fn),d(f,{Gauge:se,RadialPointer:oe,LinearPointer:ue,ArrowLinearPointer:he,BarLinearPointer:de,LinearScale:ce,RadialScale:re,LinearGauge:le,RadialGauge:ae})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t,n){return e.substring(t,t+n)}var i,o,r,s,a,l,c=window.kendo,u=c.ui.Widget,h=e.extend,d=c.deepExtend,f=e.inArray,p=e.isPlainObject,g=c.drawing,m=c.geometry,v=c.util,_=v.defined,y=c.dataviz,w=y.Box2D,b=y.TextBox,x=300,k=100,C=10,S=/^\d+$/,T=/^[a-z0-9]+$/i,D="Character '{0}' is not valid for symbology {1}",A=c.Class.extend({init:function(e){this.setOptions(e)},setOptions:function(e){var t=this;t.options=h({},t.options,e),t.quietZoneLength=t.options.addQuietZone?2*t.options.quietZoneLength:0},encode:function(e,t,n){var i=this;return _(e)&&(e+=""),i.initValue(e,t,n),i.options.addQuietZone&&i.addQuietZone(),i.addData(),i.options.addQuietZone&&i.addQuietZone(),{baseUnit:i.baseUnit,pattern:i.pattern}},options:{quietZoneLength:C,addQuietZone:!0,addCheckSum:!0},initValue:function(){},addQuietZone:function(){this.pattern.push(this.options.quietZoneLength||C)},addData:function(){},invalidCharacterError:function(e){throw Error(c.format(D,e,this.name))}}),M={},E=A.extend({minBaseUnitLength:.7,addData:function(){var e,t=this,n=t.value;for(t.addStart(),e=0;n.length>e;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.pushCheckSum(),t.addStop(),t.prepareValues()},addCharacter:function(e){var t=this,n=t.characterMap[e];n||t.invalidCharacterError(e),t.addBase(n)},addBase:function(){}}),P={addCharacter:function(e){var t=this;t.characterMap[e]?t.addBase(t.characterMap[e]):e.charCodeAt(0)>127?t.invalidCharacterError(e):t.addExtended(e.charCodeAt(0))},addExtended:function(e){var n,i,o,r=this;for(i=0;r.extendedMappings.length>i;i++)if(n=r.extendedMappings[i].call(r,e)){for(o=0;n.length>o;o++)r.addBase(n[o]);return r.dataLength+=n.length-1,t}},extendedMappings:[function(e){if(e>=97&&122>=e){var t=this;return[t.characterMap[t.shiftCharacters[0]],t.characterMap[String.fromCharCode(e-32)]]}},function(e){if(e>=33&&58>=e){var t=this;return[t.characterMap[t.shiftCharacters[1]],t.characterMap[String.fromCharCode(e+32)]]}},function(e){if(e>=1&&26>=e){var t=this;return[t.characterMap[t.shiftCharacters[2]],t.characterMap[String.fromCharCode(e+64)]]}},function(e){var t,n,i,o=this;if(o.specialAsciiCodes[e])for(t=[],i=0;o.specialAsciiCodes[e].length>i;i++)t.push(o.characterMap[o.shiftCharacters[3]]),t.push(o.characterMap[o.specialAsciiCodes[e][i]]);else n=6*Math.floor(e/32)+(e-27)%32+64,t=[o.characterMap[o.shiftCharacters[3]],o.characterMap[String.fromCharCode(n)]];return t}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]};M.code39=E.extend({name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",initValue:function(e,t,n){var i=this;i.width=t,i.height=n,i.value=e,i.dataLength=e.length,i.pattern=[],i.patternString=""},prepareValues:function(){var e,t,n=this,i=n.minBaseUnitLength,o=n.maxRatio,r=n.minRatio,s=Math.max(.15*n.width,24);if(s>n.height)throw Error("Insufficient Height. The minimum height for value: "+n.value+" is: "+s);for(;(e=n.getBaseUnit(o))<i&&o>r;)o=parseFloat((o-.1).toFixed(1));if(i>e)throw t=Math.ceil(n.getBaseWidth(r)*i),Error("Insufficient width. The minimum width for value: "+n.value+" is: "+t);n.ratio=o,n.baseUnit=e,n.patternString=n.patternString.substring(0,n.patternString.length-1),n.pattern=n.pattern.concat(n.patternString.replace(/ratio/g,o).split(n.splitCharacter))},getBaseUnit:function(e){return this.width/this.getBaseWidth(e)},getBaseWidth:function(e){var t=this,n=3*(e+2);return t.quietZoneLength+n*(t.dataLength+2)+t.gapWidth*(t.dataLength+1)},addStart:function(){var e=this;e.addPattern(e.characterMap.START.pattern),e.addCharacterGap()},addBase:function(e){this.addPattern(e.pattern),this.addCharacterGap()},addStop:function(){this.addPattern(this.characterMap.START.pattern)},addPattern:function(e){for(var t=0;e.length>t;t++)this.patternString+=this.patternMappings[e.charAt(t)]},addCharacterGap:function(){var e=this;e.patternString+=e.gapWidth+e.splitCharacter},patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}},options:{addCheckSum:!1}}),M.code39extended=M.code39.extend(d({},P,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})),M.code93=E.extend({name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,initValue:function(e,t,n){var i=this;i.value=e,i.width=t,i.height=n,i.pattern=[],i.values=[],i.dataLength=e.length},prepareValues:function(){var e=this,t=Math.max(.15*e.width,24);if(t>e.height)throw Error("Insufficient Height");if(e.setBaseUnit(),e.minBaseUnitLength>e.baseUnit)throw Error("Insufficient Width")},setBaseUnit:function(){var e=this,t=2;e.baseUnit=e.width/(9*(e.dataLength+2+t)+e.quietZoneLength+1)},addStart:function(){var e=this.characterMap.START.pattern;this.addPattern(e)},addStop:function(){var e=this;e.addStart(),e.pattern.push(e.characterMap.TERMINATION_BAR)},addBase:function(e){this.addPattern(e.pattern),this.values.push(e.value)},pushCheckSum:function(){var e,t,n=this,i=n._getCheckValues();for(n.checksum=i.join(""),t=0;i.length>t;t++)e=n.characterMap[n._findCharacterByValue(i[t])],n.addPattern(e.pattern)},_getCheckValues:function(){var e,t,n,i=this,o=i.values,r=o.length,s=0;for(n=r-1;n>=0;n--)s+=i.weightedValue(o[n],r-n,i.cCheckSumTotal);for(e=s%i.checkSumMod,s=i.weightedValue(e,1,i.kCheckSumTotal),n=r-1;n>=0;n--)s+=i.weightedValue(o[n],r-n+1,i.kCheckSumTotal);return t=s%i.checkSumMod,[e,t]},_findCharacterByValue:function(e){for(var t in this.characterMap)if(this.characterMap[t].value===e)return t},weightedValue:function(e,t,n){return(t%n||n)*e},addPattern:function(e){var t,n;for(n=0;e.length>n;n++)t=parseInt(e.charAt(n),10),this.pattern.push(t)},characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}}),M.code93extended=M.code93.extend(d({},P,{name:"Code 93 extended",pushCheckSum:function(){var e,t,n=this,i=n._getCheckValues();for(n.checksum=i.join(""),t=0;i.length>t;t++)e=i[t],n.shiftValuesAsciiCodes[e]?n.addExtended(n.shiftValuesAsciiCodes[e]):n.addPattern(n.characterMap[n._findCharacterByValue(e)].pattern)}})),i=c.Class.extend({init:function(e){this.encoding=e},addStart:function(){},is:function(){},move:function(){},pushState:function(){}}),o=i.extend({FNC4:"FNC4",init:function(e,t){var n=this;n.encoding=e,n.states=t,n._initMoves(t)},addStart:function(){this.encoding.addPattern(this.START)},is:function(e,t){var n=e.charCodeAt(t);return this.isCode(n)},move:function(e){for(var t=this,n=0;!t._moves[n].call(t,e)&&t._moves.length>n;)n++},pushState:function(e){var t,n,i=this,o=i.states,r=e.value,s=r.length;for(f("C",o)>=0&&(n=r.substr(e.index).match(/\d{4,}/g),n&&(s=r.indexOf(n[0],e.index)));(t=e.value.charCodeAt(e.index))>=0&&i.isCode(t)&&s>e.index;)i.encoding.addPattern(i.getValue(t)),e.index++},_initMoves:function(e){var t=this;t._moves=[],f(t.FNC4,e)>=0&&t._moves.push(t._moveFNC),f(t.shiftKey,e)>=0&&t._moves.push(t._shiftState),t._moves.push(t._moveState)},_moveFNC:function(e){return e.fnc?(e.fnc=!1,e.previousState==this.key):t},_shiftState:function(e){var n=this;return e.previousState==n.shiftKey&&(e.index+1>=e.value.length||n.encoding[n.shiftKey].is(e.value,e.index+1))?(n.encoding.addPattern(n.SHIFT),e.shifted=!0,!0):t},_moveState:function(){return this.encoding.addPattern(this.MOVE),!0},SHIFT:98}),r={},r.A=o.extend({key:"A",shiftKey:"B",isCode:function(e){return e>=0&&96>e},getValue:function(e){return 32>e?e+64:e-32},MOVE:101,START:103}),r.B=o.extend({key:"B",shiftKey:"A",isCode:function(e){return e>=32&&128>e},getValue:function(e){return e-32},MOVE:100,START:104}),r.C=i.extend({key:"C",addStart:function(){this.encoding.addPattern(this.START)},is:function(e,t){var i=n(e,t,4);return(e.length>=t+4||2==e.length)&&S.test(i)},move:function(){this.encoding.addPattern(this.MOVE)},pushState:function(e){for(var t;(t=n(e.value,e.index,2))&&S.test(t)&&2==t.length;)this.encoding.addPattern(parseInt(t,10)),e.index+=2},getValue:function(e){return e},MOVE:99,START:105}),r.FNC4=i.extend({key:"FNC4",dependentStates:["A","B"],init:function(e,t){this.encoding=e,this._initSubStates(t)},addStart:function(e){var t=e.value.charCodeAt(0)-128,n=this._getSubState(t);this.encoding[n].addStart()},is:function(e,t){var n=e.charCodeAt(t);return this.isCode(n)},isCode:function(e){return e>=128&&256>e},pushState:function(e){var t,n=this,i=n._initSubState(e),o=n.encoding,r=i.value.length;if(e.index+=r,3>r)for(;r>i.index;i.index++)t=i.value.charCodeAt(i.index),i.state=n._getSubState(t),i.previousState!=i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(t));else i.state!=i.previousState&&o[i.state].move(i),n._pushStart(i),o.pushData(i,n.subStates),e.value.length>e.index&&n._pushStart(i);e.fnc=!0,e.state=i.state},_pushStart:function(e){var t=this;t.encoding.addPattern(t.encoding[e.state].MOVE),t.encoding.addPattern(t.encoding[e.state].MOVE)},_initSubState:function(e){var t=this,n={value:t._getAll(e.value,e.index),index:0};return n.state=t._getSubState(n.value.charCodeAt(0)),n.previousState=e.previousState==t.key?n.state:e.previousState,n},_initSubStates:function(e){var t,n=this;for(n.subStates=[],t=0;e.length>t;t++)f(e[t],n.dependentStates)>=0&&n.subStates.push(e[t])},_getSubState:function(e){var t,n=this;for(t=0;n.subStates.length>t;t++)if(n.encoding[n.subStates[t]].isCode(e))return n.subStates[t]},_getAll:function(e,t){for(var n,i="";(n=e.charCodeAt(t++))&&this.isCode(n);)i+=String.fromCharCode(n-128);return i}}),r.FNC1=i.extend({key:"FNC1",startState:"C",dependentStates:["C","B"],startAI:"(",endAI:")",init:function(e,t){this.encoding=e,this.states=t},addStart:function(){this.encoding[this.startState].addStart()},is:function(){return f(this.key,this.states)>=0},pushState:function(e){var t,n,i,o=this,r=o.encoding,s=e.value.replace(/\s/g,""),a=RegExp("["+o.startAI+o.endAI+"]","g"),l=e.index,c={state:o.startState};for(r.addPattern(o.START);;){if(c.index=0,i=s.charAt(l)===o.startAI?2:0,t=i>0?o.getBySeparator(s,l):o.getByLength(s,l),t.ai.length)n=l+i+t.id.length+t.ai.length;else if(n=s.indexOf(o.startAI,l+1),0>n){if(s.length>l+t.ai.max+t.id.length+i)throw Error("Separators are required after variable length identifiers");n=s.length}if(c.value=s.substring(l,n).replace(a,""),o.validate(t,c.value),r.pushData(c,o.dependentStates),n>=s.length)break;l=n,c.state!=o.startState&&(r[o.startState].move(c),c.state=o.startState),t.ai.length||r.addPattern(o.START)}e.index=e.value.length},validate:function(e,t){var n=t.substr(e.id.length),i=e.ai;if(!i.type&&!S.test(n))throw Error("Application identifier "+e.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"==i.type&&!T.test(n))throw Error("Application identifier "+e.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==n.length)throw Error("Application identifier "+e.id+" must be "+i.length+" characters long.");if(i.min&&i.min>n.length)throw Error("Application identifier "+e.id+" must be at least "+i.min+" characters long.");if(i.max&&n.length>i.max)throw Error("Application identifier "+e.id+" must be at most "+i.max+" characters long.")},getByLength:function(e,t){var i,o,r,s=this;for(r=2;4>=r;r++)if(i=n(e,t,r),o=s.getAI(i)||s.getAI(i.substring(0,i.length-1)))return{id:i,ai:o};s.unsupportedAIError(i)},unsupportedAIError:function(e){throw Error(c.format("'{0}' is not a supported Application Identifier"),e)},getBySeparator:function(e,t){var n=this,i=e.indexOf(n.startAI,t),o=e.indexOf(n.endAI,i),r=e.substring(i+1,o),s=n.getAI(r)||n.getAI(r.substr(r.length-1));return s||n.unsupportedAIError(r),{ai:s,id:r}},getAI:function(e){var t,n,i,o=this.applicationIdentifiers,r=o.multiKey;if(o[e])return o[e];for(t=0;r.length>t;t++){if(r[t].ids&&f(e,r[t].ids)>=0)return r[t].type;if(r[t].ranges)for(n=r[t].ranges,i=0;n.length>i;i++)if(e>=n[i][0]&&n[i][1]>=e)return r[t].type}},applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102}),s=A.extend({init:function(e){A.fn.init.call(this,e),this._initStates()},_initStates:function(){var e,t=this;for(e=0;t.states.length>e;e++)t[t.states[e]]=new r[t.states[e]](t,t.states)},initValue:function(e,t,n){var i=this;i.pattern=[],i.value=e,i.width=t,i.height=n,i.checkSum=0,i.totalUnits=0,i.index=0,i.position=1},addData:function(){var e=this,t={value:e.value,index:0,state:""};0!==e.value.length&&(t.state=t.previousState=e.getNextState(t,e.states),e.addStart(t),e.pushData(t,e.states),e.addCheckSum(),e.addStop(),e.setBaseUnit())},pushData:function(e,t){for(var n,i=this;;){if(i[e.state].pushState(e),e.index>=e.value.length)break;e.shifted?(n=e.state,e.state=e.previousState,e.previousState=n,e.shifted=!1):(e.previousState=e.state,e.state=i.getNextState(e,t),i[e.state].move(e))}},addStart:function(e){this[e.state].addStart(e),this.position=1},addCheckSum:function(){var e=this;e.checksum=e.checkSum%103,e.addPattern(e.checksum)},addStop:function(){this.addPattern(this.STOP)},setBaseUnit:function(){var e=this;e.baseUnit=e.width/(e.totalUnits+e.quietZoneLength)},addPattern:function(e){var t,n,i=this,o=""+i.characterMap[e];for(n=0;o.length>n;n++)t=parseInt(o.charAt(n),10),i.pattern.push(t),i.totalUnits+=t;i.checkSum+=e*i.position++},getNextState:function(e,t){for(var n=0;t.length>n;n++)if(this[t[n]].is(e.value,e.index))return t[n];this.invalidCharacterError(e.value.charAt(e.index))},characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106}),M.code128a=s.extend({name:"Code 128 A",states:["A"]}),M.code128b=s.extend({name:"Code 128 B",states:["B"]}),M.code128c=s.extend({name:"Code 128 C",states:["C"]}),M.code128=s.extend({name:"Code 128",states:["C","B","A","FNC4"]}),M["gs1-128"]=s.extend({name:"Code GS1-128",states:["FNC1","C","B"]}),a=A.extend({initValue:function(e,t){var n=this;n.pattern=[],n.value=e,n.checkSumLength=0,n.width=t},setBaseUnit:function(){var e=this,t=7;e.baseUnit=e.width/(12*(e.value.length+e.checkSumLength)+e.quietZoneLength+t)},addData:function(){var e,t=this,n=t.value;for(t.addPattern(t.START),e=0;n.length>e;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.STOP),t.setBaseUnit()},addCharacter:function(e){var t=this,n=t.characterMap[e];n||t.invalidCharacterError(e),t.addPattern(n)},addPattern:function(e){for(var t=0;e.length>t;t++)this.pattern.push(parseInt(e.charAt(t),10))},addCheckSum:function(){var e,t=this,n=t.checkSums[t.checkSumType],i=n.call(t.checkSums,t.value);for(t.checksum=i.join(""),e=0;i.length>e;e++)t.checkSumLength++,t.addPattern(t.characterMap[i[e]])},checkSums:{Modulo10:function(e){var t,n,i,o=[0,""],r=e.length%2;for(t=0;e.length>t;t++)o[(t+r)%2]+=parseInt(e.charAt(t),10);for(i=o[0],n=""+2*o[1],t=0;n.length>t;t++)i+=parseInt(n.charAt(t),10);return[(10-i%10)%10]},Modulo11:function(e){var t,n,i,o=0,r=11,s=e.length;for(i=0;s>i;i++)t=((s-i)%6||6)+1,o+=t*e.charAt(i);return n=(r-o%r)%r,10!=n?[n]:[1,0]},Modulo11Modulo10:function(e){var t,n=this.Modulo11(e);return t=e+n[0],n.concat(this.Modulo10(t))},Modulo10Modulo10:function(e){var t,n=this.Modulo10(e);return t=e+n[0],n.concat(this.Modulo10(t))}},characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",
|
|
checkSumType:""}),M.msimod10=a.extend({name:"MSI Modulo10",checkSumType:"Modulo10"}),M.msimod11=a.extend({name:"MSI Modulo11",checkSumType:"Modulo11"}),M.msimod1110=a.extend({name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"}),M.msimod1010=a.extend({name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"}),M.code11=A.extend({name:"Code 11",cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221",initValue:function(e,t){var n=this;n.pattern=[],n.value=e,n.width=t,n.totalUnits=0},addData:function(){var e,t=this,n=t.value;for(t.addPattern(t.START),e=0;n.length>e;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.STOP),t.setBaseUnit()},setBaseUnit:function(){var e=this;e.baseUnit=e.width/(e.totalUnits+e.quietZoneLength)},addCheckSum:function(){var e,t=this,n=t.value,i=n.length,o=t.getWeightedSum(n,i,t.cCheckSumTotal)%t.checkSumMod;t.checksum=o+"",t.addPattern(t.characterMap[o]),i++,i>=t.kCheckSumMinLength&&(e=(o+t.getWeightedSum(n,i,t.kCheckSumTotal))%t.checkSumMod,t.checksum+=e,t.addPattern(t.characterMap[e]))},getWeightedSum:function(e,t,n){var i,o=0;for(i=0;e.length>i;i++)o+=this.weightedValue(this.getValue(e.charAt(i)),t,i,n);return o},weightedValue:function(e,t,n,i){var o=(t-n)%i||i;return o*e},getValue:function(e){var t=this;return isNaN(e)?(e!==t.DASH&&t.invalidCharacterError(e),t.DASH_VALUE):parseInt(e,10)},addCharacter:function(e){var t=this,n=t.getValue(e),i=t.characterMap[n];t.addPattern(i)},addPattern:function(e){var t,n;for(n=0;e.length>n;n++)t=parseInt(e.charAt(n),10),this.pattern.push(t),this.totalUnits+=t},characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],options:{addCheckSum:!0}}),M.postnet=A.extend({name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",initValue:function(e,t,n){var i=this;i.height=n,i.width=t,i.baseHeight=n/2,i.value=e.replace(RegExp(i.DIGIT_SEPARATOR,"g"),""),i.pattern=[],i.validate(i.value),i.checkSum=0,i.setBaseUnit()},addData:function(){var e,t=this,n=t.value;for(t.addPattern(t.START),e=0;n.length>e;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.START),t.pattern.pop()},addCharacter:function(e){var t=this,n=t.characterMap[e];t.checkSum+=parseInt(e,10),t.addPattern(n)},addCheckSum:function(){var e=this;e.checksum=(10-e.checkSum%10)%10,e.addCharacter(e.checksum)},setBaseUnit:function(){var e=this,t=3;e.baseUnit=e.width/(10*(e.value.length+1)+t+e.quietZoneLength)},validate:function(e){var t=this;if(S.test(e)||t.invalidCharacterError(e.match(/[^0-9]/)[0]),f(e.length,t.VALID_CODE_LENGTHS)<0)throw Error("Invalid value length. Valid lengths for the Postnet symbology are "+t.VALID_CODE_LENGTHS.join(","))},addPattern:function(e){var t,n,i=this;for(n=0;e.length>n;n++)t=i.height-i.baseHeight*e.charAt(n),i.pattern.push({width:1,y1:t,y2:i.height}),i.pattern.push(1)},characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]}),M.ean13=A.extend({initValue:function(e,t,n){if(e+="",12!=e.length||/\D/.test(e))throw Error('The value of the "EAN13" encoding should be 12 symbols');var i=this;i.pattern=[],i.options.height=n,i.baseUnit=t/(95+i.quietZoneLength),i.value=e,i.checksum=i.calculateChecksum(),i.leftKey=e[0],i.leftPart=e.substr(1,6),i.rightPart=e.substr(7)+i.checksum},addData:function(){var e=this;e.addPieces(e.characterMap.start),e.addSide(e.leftPart,e.leftKey),e.addPieces(e.characterMap.middle),e.addSide(e.rightPart),e.addPieces(e.characterMap.start)},addSide:function(e,t){var n,i=this;for(n=0;e.length>n;n++)t&&parseInt(i.keyTable[t].charAt(n),10)?i.addPieces(Array.prototype.slice.call(i.characterMap.digits[e.charAt(n)]).reverse(),!0):i.addPieces(i.characterMap.digits[e.charAt(n)],!0)},addPieces:function(e,t){var n,i=this;for(n=0;e.length>n;n++)i.pattern.push(t?{y1:0,y2:.95*i.options.height,width:e[n]}:e[n])},calculateChecksum:function(){var e,t,n=0,i=0,o=this.value.split("").reverse().join("");for(e=0;o.length>e;e++)e%2?i+=parseInt(o.charAt(e),10):n+=parseInt(o.charAt(e),10);return t=(10-(3*n+i)%10)%10},keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}}),M.ean8=M.ean13.extend({initValue:function(e,t,n){var i=this;if(7!=e.length||/\D/.test(e))throw Error("Invalid value provided");i.value=e,i.options.height=n,i.checksum=i.calculateChecksum(i.value),i.leftPart=i.value.substr(0,4),i.rightPart=i.value.substr(4)+i.checksum,i.pattern=[],i.baseUnit=t/(67+i.quietZoneLength)}}),l=u.extend({init:function(t,n){var i=this;u.fn.init.call(i,t,n),i.element=e(t),i.wrapper=i.element,i.element.addClass("k-barcode").css("display","block"),i.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),i.surface=g.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},setOptions:function(e){var t=this;if(t.type=(e.type||t.options.type).toLowerCase(),"upca"==t.type&&(t.type="ean13",e.value="0"+e.value),"upce"==t.type&&(t.type="ean8",e.value="0"+e.value),!M[t.type])throw Error("Encoding "+t.type+"is not supported.");t.encoding=new M[t.type],t.options=h(!0,t.options,e),_(e.value)&&t.redraw()},redraw:function(){var e=this._getSize();this.surface.clear(),this.surface.setSize({width:e.width,height:e.height}),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return c.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},_render:function(){var e,t,n,i=this,o=i.options,r=o.value,s=o.text,a=y.getSpacing(s.margin),l=i._getSize(),c=o.border||{},u=i.encoding,h=w(0,0,l.width,l.height).unpad(c.width).unpad(o.padding),d=h.height(),f=new g.Group;return i.contentBox=h,f.append(i._getBackground(l)),s.visible&&(n=g.util.measureText(r,{font:s.font}).height,d-=n+a.top+a.bottom),e=u.encode(r,h.width(),d),s.visible&&(t=r,o.checksum&&_(u.checksum)&&(t+=" "+u.checksum),f.append(i._getText(t))),i.barHeight=d,this._bandsGroup=this._getBands(e.pattern,e.baseUnit),f.append(this._bandsGroup),f},exportVisual:function(){return this._render()},_getSize:function(){var e=this,t=e.element,n=new m.Size(x,k);return t.width()>0&&(n.width=t.width()),t.height()>0&&(n.height=t.height()),e.options.width&&(n.width=e.options.width),e.options.height&&(n.height=e.options.height),n},value:function(e){var n=this;return _(e)?(n.options.value=e+"",n.redraw(),t):n.options.value},_getBands:function(e,t){var n,i,o,r,s,a=this,l=a.contentBox,c=l.x1,u=new g.Group;for(o=0;e.length>o;o++)i=p(e[o])?e[o]:{width:e[o],y1:0,y2:a.barHeight},n=i.width*t,o%2&&(r=m.Rect.fromPoints(new m.Point(c,i.y1+l.y1),new m.Point(c+n,i.y2+l.y1)),s=g.Path.fromRect(r,{fill:{color:a.options.color},stroke:null}),u.append(s)),c+=n;return u},_getBackground:function(e){var t=this,n=t.options,i=n.border||{},o=w(0,0,e.width,e.height).unpad(i.width/2),r=g.Path.fromRect(o.toRect(),{fill:{color:n.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}});return r},_getText:function(e){var t=this,n=t.options.text,i=t._textbox=new b(e,{font:n.font,color:n.color,align:"center",vAlign:"bottom",margin:n.margin});return i.reflow(t.contentBox),i.renderVisual(),i.visual},options:{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}}}),y.ExportMixin.extend(l.fn),y.ui.plugin(l),c.deepExtend(y,{encodings:M,Encoding:A})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e){return parseInt(e,2)}function i(e,t){var n=(+e).toString(2);return t>n.length&&(n=Array(t-n.length+1).join(0)+n),n}function o(e,t){for(var n=[],i=0;e.length>i;)n.push(e.substring(i,i+t)),i+=t;return n}function r(e,t,n,i){for(var o=0;e.length>o;o++)e[o][n][i]=t}function s(e,t,n,i){for(var o=0;ve.length>o;o++)e[o][n][i]=ve[o](n,i)?1^t:parseInt(t,10)}function a(){var e,t;for(t=1;255>t;t++)e=2*re[t-1],e>255&&(e=285^e),re[t]=e,oe[e]=t;e=2*re[t-1]^285,re[t]=e,re[-1]=0}function l(){var e,t,n,i=68;for(e=2;i>=e;e++)t=se[e-1],n=[e,0],se[e]=w(t,n)}function c(e,n){var i=[],o=e.length-1;do i[o]=re[(e[o]+n)%255],o--;while(e[o]!==t);return i}function u(e,t){return parseInt(e.charAt(t),10)}function h(e,t,n,i,o){t[e][i]=(t[e][i]<<1^o)%128,t[e][i]==me&&(n[e]+=40)}function d(e,t,n,i,o,r){n[e][r]==i?o[e][r]++:(n[e][r]=i,o[e][r]>=5&&(t[e]+=3+o[e][r]-5),o[e][r]=1)}function f(e,t){var n=Math.floor(e/t*100),i=n%5,o=Math.abs(n-i-50),r=Math.abs(n+5-i-50),s=10*Math.min(o/5,r/5);return s}var p,g,m,v,_,y,w,b,x,k,C,S,T,D,A,M,E,P,I,R,B,F,z,L,O,N,H,V,U,W,j,G,q,$,Y=window.kendo,K=e.extend,X=Y.drawing,Q=Y.dataviz,Z=Y.ui.Widget,J=Q.Box2D,ee="0000",te="numeric",ne="alphanumeric",ie="byte",oe={1:0},re={0:1},se=[[1,0],[1,25,0]],ae={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},le=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],ce=[1,0,1,1,1],ue=[1,0,1],he={L:"01",M:"00",Q:"11",H:"10"},de="101010000010010",fe="10100110111",pe="1111100100101",ge=["11101100","00010001"],me=93,ve=[function(e,t){return(e+t)%2===0},function(e){return e%2===0},function(e,t){return t%3===0},function(e,t){return(e+t)%3===0},function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2===0},function(e,t){return e*t%2+e*t%3===0},function(e,t){return(e*t%2+e*t%3)%2===0},function(e,t){return((e+t)%2+e*t%3)%2===0}],_e=/^\d+/,ye="A-Z0-9 $%*+./:-",we="A-Z $%*+./:-",be=RegExp("^["+we+"]+"),xe=RegExp("^["+ye+"]+"),ke=RegExp("^[^"+ye+"]+"),Ce=8,Se=5,Te=8,De=17,Ae=9,Me=16,Ee=Math.round,Pe=Y.Class.extend({getVersionIndex:function(e){return 10>e?0:e>26?2:1},getBitsCharacterCount:function(e){var t=this;return t.bitsInCharacterCount[t.getVersionIndex(e||40)]},getModeCountString:function(e,t){var n=this;return n.modeIndicator+i(e,n.getBitsCharacterCount(t))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Ie={};Ie[te]=Pe.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(e){return parseInt(e,10)},encode:function(e,t){var n,r=this,s=o(e,3),a=r.getModeCountString(e.length,t);for(n=0;s.length-1>n;n++)a+=i(s[n],10);return a+i(s[n],1+3*s[n].length)},getStringBitsLength:function(e,t){var n=e%3;return 4+this.getBitsCharacterCount(t)+10*Math.floor(e/3)+3*n+(0===n?0:1)}}),Ie[ne]=Pe.extend({characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010",getValue:function(e){return this.characters[e]},encode:function(e,t){var n,r,s=this,a=o(e,2),l=s.getModeCountString(e.length,t);for(r=0;a.length-1>r;r++)n=45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)),l+=i(n,11);return n=2==a[r].length?45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)):s.getValue(a[r].charAt(0)),l+i(n,1+5*a[r].length)},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+11*Math.floor(e/2)+6*(e%2)}}),Ie[ie]=Pe.extend({bitsInCharacterCount:[8,16,16],modeIndicator:"0100",getValue:function(e){var t=e.charCodeAt(0);if(127>=t||t>=160&&255>=t)return t;throw Error("Unsupported character: "+e)},encode:function(e,t){var n,o=this,r=o.getModeCountString(e.length,t);for(n=0;e.length>n;n++)r+=i(o.getValue(e.charAt(n)),8);return r},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+8*e}}),p={};for(g in Ie)p[g]=new Ie[g];m=function(e){var n=this,i=e.length-1,o=e.length-1,r=o,s=-1,a=0;n.move=function(){i+=s*a,a^=1,o=r-a},n.getNextCell=function(){for(;e[i][o]!==t;)n.move(),(0>i||i>=e.length)&&(s=-s,r-=8!=r?2:3,o=r,i=0>s?e.length-1:0);return{row:i,column:o}},n.getNextRemainderCell=function(){return n.move(),e[i][o]===t?{row:i,column:o}:t}},v=function(e,t){var n,i,o,r,a,l,c=new m(e[0]);for(r=0;t.length>r;r++)for(n=t[r],i=0;n.length>0;){for(a=0;n.length>a;a++)for(l=0;8>l;l++)o=c.getNextCell(),s(e,n[a][i].charAt(l),o.row,o.column);for(i++;n[0]&&i==n[0].length;)n.splice(0,1)}for(;o=c.getNextRemainderCell();)s(e,0,o.row,o.column)},_=function(e,t){for(var n=8*t,i=0,o=0;n>e.length&&ee.length>i;)e+=ee.charAt(i++);for(e.length%8!==0&&(e+=Array(9-e.length%8).join("0"));n>e.length;)e+=ge[o],o^=1;return e},y=function(e,t){var n,i=[],o=e.length-2;for(n=o;n>=0;n--)i[n]=e[n]^t[n];return i},w=function(e,n){var i,o,r=[];for(i=0;e.length>i;i++)for(o=0;n.length>o;o++)r[i+o]=r[i+o]===t?(e[i]+(n[o]>=0?n[o]:0))%255:oe[re[r[i+o]]^re[(e[i]+n[o])%255]];return r},a(),l(),b=function(e,t){var n,o,r=se[t-1],s=Array(t).concat(e),a=Array(s.length-r.length).concat(r),l=e.length,u=[];for(o=0;l>o;o++)n=c(a,oe[s[s.length-1]]),a.splice(0,1),s=y(n,s);for(o=s.length-1;o>=0;o--)u[t-1-o]=i(s[o],8);return u},x=function(e,t){var i,o,r,s,a,l,c,u,h=0,d=[],f=[],p=t.groups;for(l=0;p.length>l;l++)for(r=p[l][0],c=0;r>c;c++){for(o=p[l][1],i=[],s=[],u=1;o>=u;u++)a=e.substring(h,h+8),i.push(a),s[o-u]=n(a),h+=8;d.push(i),f.push(b(s,t.errorCodewordsPerBlock))}return[d,f]},k=function(e,t,n,i,o){var r,s,a=_e.exec(e),l=a?a[0]:"",c=be.exec(e),u=c?c[0]:"",h=xe.exec(e),d=h?h[0]:"";return l&&(l.length>=t||e.length==l.length||l.length>=n&&!xe.test(e.charAt(l.length)))?(r=te,s=l):d&&(e.length==d.length||d.length>=i||o==ne)?(r=ne,s=l||u):(r=ie,s=d?d+ke.exec(e.substring(d.length))[0]:ke.exec(e)[0]),{mode:r,modeString:s}},C=function(e){var t,n,i=[],o=0;for(i.push(k(e,Ce,Se,Te,t)),t=i[0].mode,e=e.substr(i[0].modeString.length);e.length>0;)n=k(e,De,Ae,Me,t),n.mode!=t?(t=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,e=e.substr(n.modeString.length);return i},S=function(e){var t,n,i=0;for(n=0;e.length>n;n++)t=p[e[n].mode],i+=t.getStringBitsLength(e[n].modeString.length);return Math.ceil(i/8)},T=function(e,t){var n=0,i=le.length-1,o=Math.floor(le.length/2);do le[o][t].totalDataCodewords>e?i=o:n=o,o=n+Math.floor((i-n)/2);while(i-n>1);return le[n][t].totalDataCodewords>=e?o+1:i+1},D=function(e,t){var n,i,o="";for(i=0;e.length>i;i++)n=p[e[i].mode],o+=n.encode(e[i].modeString,t);return o},A=function(e){var t,i,o=n(e),r="";if(0===o)return"101010000010010";for(t=M(n(e),fe,15),i=0;t.length>i;i++)r+=t.charAt(i)^de.charAt(i);return r},M=function(e,t,o){var r=n(t),s=t.length-1,a=e<<s,l=o-s,c=i(e,l),u=E(a,r);return u=c+i(u,s)},E=function(e,t){var n=t.toString(2).length,i=e.toString(2).length;do e^=t<<i-n,i=e.toString(2).length;while(i>=n);return e},P=function(e){var t,n,i=[],o=17+4*e;for(t=0;ve.length>t;t++)for(i[t]=Array(o),n=0;o>n;n++)i[t][n]=Array(o);return i},I=function(e,t){var n,i,o=e[0],s=0,a=t.length;for(n=0,i=8;8>=n;n++)6!==n&&r(e,u(t,a-1-s++),n,i);for(n=8,i=7;i>=0;i--)6!==i&&r(e,u(t,a-1-s++),n,i);for(s=0,i=o.length-1,n=8;i>=o.length-8;i--)r(e,u(t,a-1-s++),n,i);for(r(e,1,o.length-8,8),n=o.length-7,i=8;o.length>n;n++)r(e,u(t,a-1-s++),n,i)},R=function(e){return M(e,pe,18)},B=function(e,t){var n,i,o,s,a=e[0],l=a.length,c=0,h=l-11,d=l-11,f=0;for(s=0;t.length>s;s++)n=Math.floor(s/3),i=s%3,o=u(t,t.length-s-1),r(e,o,c+n,h+i),r(e,o,d+i,f+n)},F=function(e,t,n,i){var o,s,a,l=t.length+2,c=t.length+1;for(s=0;t.length>s;s++)for(a=s;l-s>a;a++)o=t[s],r(e,o,n+a,i+s),r(e,o,n+s,i+a),r(e,o,n+c-a,i+c-s),r(e,o,n+c-s,i+c-a)},z=function(e,t,n,i){var o=n,s=i,a=e[0];do r(e,0,o,i),r(e,0,n,s),o+=t[0],s+=t[1];while(o>=0&&a.length>o)},L=function(e){var t=e[0].length;F(e,ce,0,0),z(e,[-1,-1],7,7),F(e,ce,t-7,0),z(e,[1,-1],t-8,7),F(e,ce,0,t-7),z(e,[-1,1],7,t-8)},O=function(e,n){var i,o,r,s,a,l,c,u,h;if(!(2>n)){for(i=e[0],o=i.length,r=Math.floor(n/7),s=[6],c=0,(a=ae[n])?l=(o-13-a)/r:a=l=(o-13)/(r+1),s.push(s[c++]+a);o>s[c]+l;)s.push(s[c++]+l);for(u=0;s.length>u;u++)for(h=0;s.length>h;h++)i[s[u]][s[h]]===t&&F(e,ue,s[u]-2,s[h]-2)}},N=function(e){var t,n=6,i=6,o=1,s=e[0].length;for(t=8;s-8>t;t++)r(e,o,n,t),r(e,o,t,i),o^=1},H=function(e){var t,n,i,o,r,s,a,l=[],c=[],u=[],p=[],g=[],m=0,v=1,_=e[0].length;for(n=0;e.length>n;n++)l[n]=0,u[n]=0,g[n]=[0,0],p[n]=[0,0],c[n]=[];for(n=0;_>n;n++)for(i=0;_>i;i++)for(o=0;e.length>o;o++)t=e[o],u[o]+=parseInt(t[n][i],10),c[o][m]===t[n][i]&&_>n+1&&i-1>=0&&t[n+1][i]==c[o][m]&&t[n+1][i-1]==c[o][m]&&(l[o]+=3),h(o,p,l,m,t[n][i]),h(o,p,l,v,t[i][n]),d(o,l,c,t[n][i],g,m),d(o,l,c,t[i][n],g,v);for(r=_*_,a=Number.MAX_VALUE,n=0;l.length>n;n++)l[n]+=f(u[n],r),a>l[n]&&(a=l[n],s=n);return s},V=function(e,t){this.dataString=e,this.version=t},U=function(){this.getEncodingResult=function(e,t){var n=C(e),i=S(n),o=T(i,t),r=D(n,o);return new V(r,o)}},W=function(){this.mode=p[this.encodingMode]},W.fn=W.prototype={encodingMode:ie,utfBOM:"111011111011101110111111",initialModeCountStringLength:20,getEncodingResult:function(e,t){var n=this,i=n.encode(e),o=n.getDataCodewordsCount(i),r=T(o,t),s=n.mode.getModeCountString(i.length/8,r)+i;return new V(s,r)},getDataCodewordsCount:function(e){var t=this,n=e.length,i=Math.ceil((t.initialModeCountStringLength+n)/8);return i},encode:function(e){var t,n=this,i=n.utfBOM;for(t=0;e.length>t;t++)i+=n.encodeCharacter(e.charCodeAt(t));return i},encodeCharacter:function(e){var t,n,o=this.getBytesCount(e),r=o-1,s="";if(1==o)s=i(e,8);else{for(t=8-o,n=0;r>n;n++)s=i(e>>6*n&63|128,8)+s;s=(e>>6*r|255>>t<<t).toString(2)+s}return s},getBytesCount:function(e){var t,n=this.ranges;for(t=0;n.length>t;t++)if(n[t]>e)return t+1},ranges:[128,2048,65536,2097152,67108864]},j=function(e){return e&&e.toLowerCase().indexOf("utf_8")>=0?new W:new U},G=function(e,t,n){var o,r,s,a=new j(n),l=a.getEncodingResult(e,t),c=l.version,u=le[c-1][t],h=_(l.dataString,u.totalDataCodewords),d=x(h,u),f=P(c);return L(f),O(f,c),N(f),c>=7&&B(f,i(0,18)),I(f,i(0,15)),v(f,d),o=H(f),r=f[o],c>=7&&B([r],R(c)),s=he[t]+i(o,3),I([r],A(s)),r},q={DEFAULT_SIZE:200,QUIET_ZONE_LENGTH:4,DEFAULT_ERROR_CORRECTION_LEVEL:"L",DEFAULT_BACKGROUND:"#fff",DEFAULT_DARK_MODULE_COLOR:"#000",MIN_BASE_UNIT_SIZE:1},$=Z.extend({init:function(t,n){var i=this;Z.fn.init.call(i,t,n),i.element=e(t),i.wrapper=i.element,i.element.addClass("k-qrcode"),i.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),i.surface=X.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},redraw:function(){var e=this._getSize();this.surfaceWrap.css({width:e,height:e}),this.surface.clear(),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return Y.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},exportVisual:function(){return this._render()},_render:function(){var e,t,n,i,o,r,s,a=this,l=a._value,c=a.options.border||{},u=a.options.padding||0,h=c.width||0;return c.width=h,s=new X.Group,l&&(n=G(l,a.options.errorCorrection,a.options.encoding),i=a._getSize(),r=i-2*(h+u),e=a._calculateBaseUnit(r,n.length),o=n.length*e,t=h+u+(r-o)/2,s.append(a._renderBackground(i,c)),s.append(a._renderMatrix(n,e,t))),s},_getSize:function(){var e,t,n,i=this;return i.options.size?e=parseInt(i.options.size,10):(t=i.element,n=Math.min(t.width(),t.height()),e=n>0?n:q.DEFAULT_SIZE),e},_calculateBaseUnit:function(e,t){var n=Math.floor(e/t);if(q.MIN_BASE_UNIT_SIZE>n)throw Error("Insufficient size.");return n*t>=e&&n-1>=q.MIN_BASE_UNIT_SIZE&&n--,n},_renderMatrix:function(e,t,n){var i,o,r,s,a,l,c,u,h=new X.MultiPath({fill:{color:this.options.color},stroke:null});for(i=0;e.length>i;i++)for(o=n+i*t,r=0;e.length>r;){for(;0===e[i][r]&&e.length>r;)r++;if(e.length>r){for(s=r;1==e[i][r];)r++;a=Ee(n+s*t),l=Ee(o),c=Ee(n+r*t),u=Ee(o+t),h.moveTo(a,l).lineTo(a,u).lineTo(c,u).lineTo(c,l).close();
|
|
}}return h},_renderBackground:function(e,t){var n=J(0,0,e,e).unpad(t.width/2);return X.Path.fromRect(n.toRect(),{fill:{color:this.options.background},stroke:{color:t.color,width:t.width}})},setOptions:function(e){var n=this;e=e||{},n.options=K(n.options,e),e.value!==t&&(n._value=n.options.value+""),n.redraw()},value:function(e){var n=this;return e===t?n._value:(n._value=e+"",n.redraw(),t)},options:{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:q.DEFAULT_ERROR_CORRECTION_LEVEL,background:q.DEFAULT_BACKGROUND,color:q.DEFAULT_DARK_MODULE_COLOR,size:"",padding:0,border:{color:"",width:0}}}),Q.ExportMixin.extend($.fn),Q.ui.plugin($),Y.deepExtend(Q,{QRCode:$,QRCodeDefaults:q,QRCodeFunctions:{FreeCellVisitor:m,fillData:v,padDataString:_,generateErrorCodewords:b,xorPolynomials:y,getBlocks:x,multiplyPolynomials:w,chooseMode:k,getModes:C,getDataCodewordsCount:S,getVersion:T,getDataString:D,encodeFormatInformation:A,encodeBCH:M,dividePolynomials:E,initMatrices:P,addFormatInformation:I,encodeVersionInformation:R,addVersionInformation:B,addCentricPattern:F,addFinderSeparator:z,addFinderPatterns:L,addAlignmentPatterns:O,addTimingFunctions:N,scoreMaskMatrixes:H,encodeData:G,UTF8Encoder:W},QRCodeFields:{modes:p,powersOfTwo:oe,powersOfTwoResult:re,generatorPolynomials:se}})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(){}function i(e){return n.prototype=e,new n}var o,r=window.kendo,s=r.Class,a=r.Observable,l=r.deepExtend,c=Math,u=e.proxy,h=r.util,d=h.last,f=h.renderTemplate,p=r.dataviz,g=h.defined,m=p.filterSeriesByType,v=r.template,_=p.ui.Chart,y=p.Selection,w=p.addDuration,b=h.limitValue,x=p.lteDateIndex,k=p.toDate,C=p.toTime,S=28,T="change",D="k-",A="drag",M="dragEnd",E="_navigator",P=E,I=p.EQUALLY_SPACED_SERIES,R=3,B="zoom",F="zoomEnd",z=_.extend({init:function(t,n){e(t).addClass(D+"chart"),_.fn.init.call(this,t,n)},_applyDefaults:function(e,t){var n=this,i=n.element.width()||p.DEFAULT_WIDTH,o={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:c.floor(i/S)}}};t&&(t=l({},t,o)),n._navigator||L.setup(e,t),_.fn._applyDefaults.call(n,e,t)},_initDataSource:function(e){var t,n,i=e||{},o=i.dataSource,r=o&&o.serverFiltering,s=[].concat(i.categoryAxis)[0],a=i.navigator||{},c=a.select,u=c&&c.from&&c.to;r&&u&&(t=[].concat(o.filter||[]),n=new p.DateCategoryAxis(l({baseUnit:"fit"},s,{categories:[c.from,c.to]})),o.filter=L.buildFilter(n.range().min,c.to).concat(t)),_.fn._initDataSource.call(this,e)},options:{name:"StockChart",dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0,template:"#= kendo.toString(category, 'd') #"},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}},_resize:function(){var e=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=e},_redraw:function(){var e=this,t=e._navigator;!this._dirty()&&t&&t.dataSource?t.redrawSlaves():e._fullRedraw()},_dirty:function(){var t=this.options,n=[].concat(t.series,t.navigator.series),i=e.grep(n,function(e){return e&&e.visible}).length,o=this._seriesCount!==i;return this._seriesCount=i,o},_fullRedraw:function(){var e=this,t=e._navigator;t||(t=e._navigator=new L(e)),t._setRange(),_.fn._redraw.call(e),t._initSelection()},_onDataChanged:function(){var e=this;_.fn._onDataChanged.call(e),e._dataBound=!0},_bindCategoryAxis:function(e,t,n){var i,o=this,r=o.options.categoryAxis,s=r.length;if(_.fn._bindCategoryAxis.apply(this,arguments),e.name===P)for(;s>n;)i=r[n++],i.pane==E&&(i.categories=e.categories)},_trackSharedTooltip:function(e){var t=this,n=t._plotArea,i=n.paneByPoint(e);i&&i.options.name===E?t._unsetActivePoint():_.fn._trackSharedTooltip.call(t,e)},destroy:function(){var e=this;e._navigator.destroy(),_.fn.destroy.call(e)}}),L=a.extend({init:function(e){var t=this;t.chart=e,t.options=l({},t.options,e.options.navigator),t._initDataSource(),g(t.options.hint.visible)||(t.options.hint.visible=t.options.visible),e.bind(A,u(t._drag,t)),e.bind(M,u(t._dragEnd,t)),e.bind(B,u(t._zoom,t)),e.bind(F,u(t._zoomEnd,t))},options:{},_initDataSource:function(){var e=this,t=e.options,n=t.autoBind,i=t.dataSource;g(n)||(n=e.chart.options.autoBind),e._dataChangedHandler=u(e._onDataChanged,e),i&&(e.dataSource=r.data.DataSource.create(i).bind(T,e._dataChangedHandler),n&&e.dataSource.fetch())},_onDataChanged:function(){var e,t,n,i,o,r=this,s=r.chart,a=s.options.series,l=a.length,c=s.options.categoryAxis,u=c.length,h=r.dataSource.view();for(e=0;l>e;e++)n=a[e],n.axis==P&&s._isBindable(n)&&(n.data=h);for(t=0;u>t;t++)i=c[t],i.pane==E&&(i.name==P?(s._bindCategoryAxis(i,h,t),o=i.categories):i.categories=o);s._model&&(r.redraw(),r.filterAxes(),(!s.options.dataSource||s.options.dataSource&&s._dataBound)&&r.redrawSlaves())},destroy:function(){var e=this,t=e.dataSource;t&&t.unbind(T,e._dataChangeHandler),e.selection&&e.selection.destroy()},redraw:function(){this._redrawSelf(),this._initSelection()},_initSelection:function(){var t=this,n=t.chart,r=t.options,s=t.mainAxis(),a=i(s),l=s.range(),c=l.min,u=l.max,h=s.options.categories,d=t.options.select,f=t.selection,p=k(d.from),g=k(d.to);0!==h.length&&(f&&(f.destroy(),f.wrapper.remove()),a.box=s.box,f=t.selection=new y(n,a,{min:c,max:u,from:p,to:g,selectStart:e.proxy(t._selectStart,t),select:e.proxy(t._select,t),selectEnd:e.proxy(t._selectEnd,t),mousewheel:{zoom:"left"}}),r.hint.visible&&(t.hint=new o(n.element,{min:c,max:u,template:r.hint.template,format:r.hint.format})))},_setRange:function(){var e,t=this.chart._createPlotArea(!0),n=t.namedCategoryAxes[P],i=n.options,o=n.range(),r=o.min,s=w(o.max,i.baseUnitStep,i.baseUnit),a=this.options.select||{},l=k(a.from)||r;r>l&&(l=r),e=k(a.to)||s,e>s&&(e=s),this.options.select={from:l,to:e},this.filterAxes()},_redrawSelf:function(e){var t=this.chart._plotArea;t&&t.redraw(d(t.panes),e)},redrawSlaves:function(){var e=this,t=e.chart,n=t._plotArea,i=n.panes.slice(0,-1);n.srcSeries=t.options.series,n.redraw(i)},_drag:function(e){var t,n,i,o=this,r=o.chart,s=r._eventCoordinates(e.originalEvent),a=o.mainAxis(),l=a.datesRange(),c=a.pane.box.containsPoint(s),u=r._plotArea.categoryAxis,h=e.axisRanges[u.options.name],d=o.options.select,f=o.selection;h&&!c&&f&&(t=d.from&&d.to?C(d.to)-C(d.from):C(f.options.to)-C(f.options.from),n=k(b(C(h.min),l.min,C(l.max)-t)),i=k(b(C(n)+t,C(l.min)+t,l.max)),o.options.select={from:n,to:i},o._liveDrag()&&(o.filterAxes(),o.redrawSlaves()),f.set(n,i),o.showHint(n,i))},_dragEnd:function(){var e=this;e.filterAxes(),e.filterDataSource(),e.redrawSlaves(),e.hint&&e.hint.hide()},_liveDrag:function(){var e=r.support,t=e.touch,n=e.browser,i=n.mozilla,o=n.msie&&9>n.version;return!t&&!i&&!o},readSelection:function(){var e=this,t=e.selection,n=t.options,i=e.options.select;i.from=n.from,i.to=n.to},filterAxes:function(){var e,t,n=this,i=n.options.select||{},o=n.chart,r=o.options.categoryAxis,s=i.from,a=i.to;for(e=0;r.length>e;e++)t=r[e],t.pane!==E&&(t.min=k(s),t.max=k(a))},filterDataSource:function(){var e,t=this,n=t.options.select||{},i=t.chart,o=i.dataSource,r=o&&o.options.serverFiltering;t.dataSource&&r&&(e=new p.DateCategoryAxis(l({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[n.from,n.to]})).options,o.filter(L.buildFilter(w(e.min,-e.baseUnitStep,e.baseUnit),w(e.max,e.baseUnitStep,e.baseUnit))))},_zoom:function(e){var t,n,i=this,o=i.chart,s=e.delta,a=o._plotArea.categoryAxis,l=i.options.select,u=i.selection,h=i.mainAxis().options.categories;u&&(t=x(u.options.from,h),n=x(u.options.to,h),e.originalEvent.preventDefault(),c.abs(s)>1&&(s*=R),n-t>1?(u.expand(s),i.readSelection()):(a.options.min=l.from,l.from=a.scaleRange(-e.delta).min),r.support.touch||(i.filterAxes(),i.redrawSlaves()),u.set(l.from,l.to),i.showHint(i.options.select.from,i.options.select.to))},_zoomEnd:function(e){this._dragEnd(e)},showHint:function(e,t){var n=this,i=n.chart,o=i._plotArea;n.hint&&n.hint.show(e,t,o.backgroundBox())},_selectStart:function(e){var t=this.chart;t._selectStart.call(t,e)},_select:function(e){var t=this,n=t.chart;t.showHint(e.from,e.to),n._select.call(n,e)},_selectEnd:function(e){var t=this,n=t.chart;t.hint&&t.hint.hide(),t.readSelection(),t.filterAxes(),t.filterDataSource(),t.redrawSlaves(),n._selectEnd.call(n,e)},mainAxis:function(){var e=this.chart._plotArea;return e?e.namedCategoryAxes[P]:t}});L.setup=function(e,t){e=e||{},t=t||{};var n=l({},t.navigator,e.navigator),i=e.panes=[].concat(e.panes),o=l({},n.pane,{name:E});n.visible||(o.visible=!1,o.height=.1),i.push(o),L.attachAxes(e,n),L.attachSeries(e,n,t)},L.attachAxes=function(e,t){var n=t.series||[],i=e.categoryAxis=[].concat(e.categoryAxis),o=e.valueAxis=[].concat(e.valueAxis),r=m(n,I),s=0===r.length,a=l({type:"date",pane:E,roundToBaseUnit:!s,justified:s,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:!t.dataSource,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]},_overlap:!1}),c=t.categoryAxis;i.push(l({},a,{maxDateGroups:200},c,{name:P,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),l({},a,c,{name:P+"_labels",maxDateGroups:20,baseUnitStep:"auto",plotBands:[],autoBaseUnitSteps:{minutes:[]}}),l({},a,c,{name:P+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],labels:{visible:!1,mirror:!0}})),o.push(l({name:P,pane:E,majorGridLines:{visible:!1},visible:!1},t.valueAxis))},L.attachSeries=function(e,t,n){var i,o=e.series=e.series||[],r=[].concat(t.series||[]),s=n.seriesColors,a=t.seriesDefaults;for(i=0;r.length>i;i++)o.push(l({color:s[i%s.length],categoryField:t.dateField,visibleInLegend:!1,tooltip:{visible:!1}},a,r[i],{axis:P,categoryAxis:P,autoBind:!t.dataSource}))},L.buildFilter=function(e,t){return[{field:"Date",operator:"gte",value:k(e)},{field:"Date",operator:"lt",value:k(t)}]},o=s.extend({init:function(t,n){var i=this;i.options=l({},i.options,n),i.container=t,i.chartPadding={top:parseInt(t.css("paddingTop"),10),left:parseInt(t.css("paddingLeft"),10)},i.template=i.template,i.template||(i.template=i.template=f("<div class='"+D+"navigator-hint' style='display: none; position: absolute; top: 1px; left: 1px;'><div class='"+D+"tooltip "+D+"chart-tooltip'> </div><div class='"+D+"scroll' /></div>")),i.element=e(i.template()).appendTo(t)},options:{format:"{0:d} - {1:d}",hideDelay:500},show:function(e,t,n){var i,o=this,s=k(C(e)+C(t-e)/2),a=o.options,l=r.format(o.options.format,e,t),c=o.element.find("."+D+"tooltip"),u=o.element.find("."+D+"scroll"),h=.4*n.width(),d=n.center().x-h,f=n.center().x,p=f-d,g=a.max-a.min,m=p/g,_=s-a.min;o._hideTimeout&&clearTimeout(o._hideTimeout),o._visible||(o.element.stop(!1,!0).css("visibility","hidden").show(),o._visible=!0),a.template&&(i=v(a.template),l=i({from:e,to:t})),c.html(l).css({left:n.center().x-c.outerWidth()/2,top:n.y1}),u.css({width:h,left:d+_*m,top:n.y1+parseInt(c.css("margin-top"),10)+parseInt(c.css("border-top-width"),10)+c.height()/2}),o.element.css("visibility","visible")},hide:function(){var e=this;e._hideTimeout&&clearTimeout(e._hideTimeout),e._hideTimeout=setTimeout(function(){e._visible=!1,e.element.fadeOut("slow")},e.options.hideDelay)}}),p.ui.plugin(z),l(p,{Navigator:L})}(window.kendo.jQuery)}(),function(){!function(e){function t(e){return"number"==typeof e?[e]:e}var n=window.kendo,i=n.dataviz,o=i.ui.Chart,r=n.data.ObservableArray,s=i.SharedTooltip,a=n.deepExtend,l=e.isArray,c=e.proxy,u=i.inArray,h=Math,d="k-",f=150,p=150,g="bar",m="bullet",v="pie",_="leave",y=[g,m],w=o.extend({init:function(n,i){var s=this,c=s.stage=e("<span />"),f=i||{};n=e(n).addClass(d+"sparkline").empty().append(c),s._initialWidth=h.floor(n.width()),f=t(f),(l(f)||f instanceof r)&&(f={seriesDefaults:{data:f}}),f.series||(f.series=[{data:t(f.data)}]),a(f,{seriesDefaults:{type:f.type}}),(u(f.series[0].type,y)||u(f.seriesDefaults.type,y))&&(f=a({},{categoryAxis:{crosshair:{visible:!1}}},f)),o.fn.init.call(s,n,f)},options:{name:"Sparkline",chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]},_modelOptions:function(){var t,n,i=this,o=i.options,r=i._initialWidth,s=i.stage;return i.stage.children().hide(),n=e("<span> </span>"),i.stage.append(n),t=a({width:r?r:i._autoWidth(),height:s.height(),transitions:o.transitions},o.chartArea,{inline:!0,align:!1}),s.css({width:t.width,height:t.height}),n.remove(),i.stage.children().show(),i.surface.resize(),t},_createTooltip:function(){var e,t=this,n=t.options,i=t.element;return e=t._sharedTooltip()?new b(i,t._plotArea,n.tooltip):o.fn._createTooltip.call(t),e.bind(_,c(t._tooltipleave,t)),e},_surfaceWrap:function(){return this.stage},_autoWidth:function(){var e,t,n,o=this,r=o.options,s=i.getSpacing(r.chartArea.margin),a=r.series,l=o.dataSource.total(),c=0;for(t=0;a.length>t;t++){if(n=a[t],n.type===g)return f;if(n.type===m)return p;if(n.type===v)return o.stage.height();n.data&&(c=h.max(c,n.data.length))}return e=h.max(l,c)*r.pointWidth,e>0&&(e+=s.left+s.right),e}}),b=s.extend({options:{animation:{duration:0}},_anchor:function(e,t){var n=s.fn._anchor.call(this,e,t),i=this._measure();return n.y=-i.height-this.options.offset,n},_hideElement:function(){this.element&&this.element.hide().remove()}});i.ui.plugin(w),a(i,{SparklineSharedTooltip:b})}(window.kendo.jQuery)}(),function(){!function(e,t){var n,i=Math,o=i.abs,r=i.atan,s=i.atan2,a=i.cos,l=i.max,c=i.min,u=i.sin,h=i.tan,d=window.kendo,f=d.Class,p=d.dataviz,g=d.deepExtend,m=d.util,v=m.defined,_=m.deg,y=m.rad,w=m.round,b=m.sqr,x=m.valueOrDefault,k=f.extend({init:function(e,t){1===arguments.length?(this.lat=e[0],this.lng=e[1]):(this.lat=e,this.lng=t)},DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6},{1:N6}",toArray:function(){return[this.lat,this.lng]},equals:function(e){return e&&e.lat===this.lat&&e.lng===this.lng},clone:function(){return new k(this.lat,this.lng)},round:function(e){return this.lng=w(this.lng,e),this.lat=w(this.lat,e),this},wrap:function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},distanceTo:function(e,t){return this.greatCircleTo(e,t).distance},destination:function(e,t,n){var o,r,l,c,h;return t=y(t),n=n||p.map.datums.WGS84,o=y(this.lat),r=y(this.lng),l=e/d.dataviz.map.datums.WGS84.a,c=i.asin(u(o)*a(l)+a(o)*u(l)*a(t)),h=r+s(u(t)*u(l)*a(o),a(l)-u(o)*u(c)),new k(_(c),_(h))},greatCircleTo:function(e,t){var n,l,c,d,f,g,m,v,x,C,S,T,D,A,M,E,P,I,R,B,F,z,L,O,N,H,V,U,W;if(e=k.create(e),t=t||p.map.datums.WGS84,!e||this.clone().round(8).equals(e.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(n=t.a,l=t.b,c=t.f,d=y(e.lng-this.lng),f=r((1-c)*h(y(this.lat))),g=u(f),m=a(f),v=r((1-c)*h(y(e.lat))),x=u(v),C=a(v),S=d,D=this.DISTANCE_ITERATIONS,A=!1;!A&&D-->0;)M=u(S),E=a(S),P=i.sqrt(b(C*M)+b(m*x-g*C*E)),R=g*x+m*C*E,F=s(P,R),z=m*C*M/P,I=1-b(z),B=0,0!==I&&(B=R-2*g*x/I),T=S,L=c/16*I*(4+c*(4-3*I)),S=d+(1-L)*c*z*(F+L*P*(B+L*R*(-1+2*b(B)))),A=o(S-T)<=this.DISTANCE_CONVERGENCE;return O=I*(b(n)-b(l))/b(l),N=1+O/16384*(4096+O*(-768+O*(320-175*O))),H=O/1024*(256+O*(-128+O*(74-47*O))),V=H*P*(B+H/4*(R*(-1+2*b(B))-H/6*B*(-3+4*b(P))*(-3+4*b(B)))),U=s(C*M,m*x-g*C*E),W=s(m*M,-g*C+m*x*E),{distance:w(l*N*(F-V),this.DISTANCE_PRECISION),azimuthFrom:_(U),azimuthTo:_(W)}}});k.fn.toString=function(){return d.format(this.FORMAT,this.lat,this.lng)},k.fromLngLat=function(e){return new k(e[1],e[0])},k.fromLatLng=function(e){return new k(e[0],e[1])},k.create=function(e,n){return v(e)?e instanceof k?e.clone():1===arguments.length&&2===e.length?k.fromLatLng(e):new k(e,n):t},n=f.extend({init:function(e,t){e=k.create(e),t=k.create(t),e.lng+180>t.lng+180&&t.lat+90>e.lat+90?(this.se=e,this.nw=t):(this.se=t,this.nw=e)},contains:function(e){var t=this.nw,n=this.se,i=x(e.lng,e[1]),o=x(e.lat,e[0]);return e&&i+180>=t.lng+180&&n.lng+180>=i+180&&o+90>=n.lat+90&&t.lat+90>=o+90},center:function(){var e=this.nw,t=this.se,n=e.lng+(t.lng-e.lng)/2,i=e.lat+(t.lat-e.lat)/2;return new k(i,n)},containsAny:function(e){var t,n=!1;for(t=0;e.length>t;t++)n=n||this.contains(e[t]);return n},include:function(e){var t=this.nw,n=this.se,i=x(e.lng,e[1]),o=x(e.lat,e[0]);t.lng=c(t.lng,i),t.lat=l(t.lat,o),n.lng=l(n.lng,i),n.lat=c(n.lat,o)},includeAll:function(e){for(var t=0;e.length>t;t++)this.include(e[t])},edges:function(){var e=this.nw,t=this.se;return{nw:this.nw,ne:new k(e.lat,t.lng),se:this.se,sw:new k(t.lat,e.lng)}},toArray:function(){var e=this.nw,t=this.se;return[e,new k(e.lat,t.lng),t,new k(t.lat,e.lng)]},overlaps:function(e){return this.containsAny(e.toArray())||e.containsAny(this.toArray())}}),n.World=new n([90,-180],[-90,180]),n.create=function(e,i){return e instanceof n?e:e&&i?new n(e,i):e&&4===e.length&&!i?new n([e[0],e[1]],[e[2],e[3]]):t},g(p,{map:{Extent:n,Location:k}})}(window.kendo.jQuery)}(),function(){!function(){var e=window.kendo,t=e.ui.Widget,n=e.template,i=e.util.valueOrDefault,o=e.util.defined,r=t.extend({init:function(e,n){t.fn.init.call(this,e,n),this._initOptions(n),this.items=[],this.element.addClass("k-widget k-attribution")},options:{name:"Attribution",separator:" | ",itemTemplate:"#= text #"},filter:function(e,t){this._extent=e,this._zoom=t,this._render()},add:function(e){o(e)&&("string"==typeof e&&(e={text:e}),this.items.push(e),this._render())},remove:function(e){var t,n,i=[];for(t=0;this.items.length>t;t++)n=this.items[t],n.text!==e&&i.push(n);this.items=i,this._render()},clear:function(){this.items=[],this.element.empty()},_render:function(){var e,t,i,o=[],r=n(this.options.itemTemplate);for(e=0;this.items.length>e;e++)t=this.items[e],i=this._itemText(t),""!==i&&o.push(r({text:i}));o.length>0?this.element.empty().append(o.join(this.options.separator)).show():this.element.hide()},_itemText:function(e){var t="",n=this._inZoomLevel(e.minZoom,e.maxZoom),i=this._inArea(e.extent);return n&&i&&(t+=e.text),t},_inZoomLevel:function(e,t){var n=!0;return e=i(e,-Number.MAX_VALUE),t=i(t,Number.MAX_VALUE),n=this._zoom>e&&t>this._zoom},_inArea:function(e){var t=!0;return e&&(t=e.contains(this._extent)),t}});e.dataviz.ui.plugin(r)}(window.kendo.jQuery)}(),function(){!function(e){function t(e){return n.format('<button class="k-button k-navigator-{0}"><span class="k-icon k-i-arrow-{0}"/></button>',e)}var n=window.kendo,i=n.ui.Widget,o=n.keys,r=e.proxy,s=".kendoNavigator",a=t("n")+t("e")+t("s")+t("w"),l=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._initOptions(t),this.element.addClass("k-widget k-header k-shadow k-navigator").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=o.length>0?o:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"Navigator",panStep:1},events:["pan"],dispose:function(){this._keyroot.off("keydown",this._keydown)},_pan:function(e,t){var n=this.options.panStep;this.trigger("pan",{x:e*n,y:t*n})},_click:function(t){var n=0,i=0,o=e(t.currentTarget);o.is(".k-navigator-n")?i=1:o.is(".k-navigator-s")?i=-1:o.is(".k-navigator-e")?n=1:o.is(".k-navigator-w")&&(n=-1),this._pan(n,i),t.preventDefault()},_keydown:function(e){switch(e.which){case o.UP:this._pan(0,1),e.preventDefault();break;case o.DOWN:this._pan(0,-1),e.preventDefault();break;case o.RIGHT:this._pan(1,0),e.preventDefault();break;case o.LEFT:this._pan(-1,0),e.preventDefault()}}});n.dataviz.ui.plugin(l)}(window.kendo.jQuery)}(),function(){!function(e){function t(e,t){return n.format('<button class="k-button k-zoom-{0}" title="zoom-{0}">{1}</button>',e,t)}var n=window.kendo,i=n.ui.Widget,o=n.keys,r=e.proxy,s=".kendoZoomControl",a=t("in","+")+t("out","-"),l=187,c=189,u=61,h=173,d=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._initOptions(t),this.element.addClass("k-widget k-zoom-control k-button-wrap k-buttons-horizontal").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=o.length>0?o:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"ZoomControl",zoomStep:1},events:["change"],_change:function(e){var t=this.options.zoomStep;this.trigger("change",{delta:e*t})},_click:function(t){var n=e(t.currentTarget),i=1;n.is(".k-zoom-out")&&(i=-1),this._change(i),t.preventDefault()},_keydown:function(e){switch(e.which){case o.NUMPAD_PLUS:case l:case u:this._change(1);break;case o.NUMPAD_MINUS:case c:case h:this._change(-1)}}});n.dataviz.ui.plugin(d)}(window.kendo.jQuery)}(),function(){!function(){var e=Math,t=e.atan,n=e.exp,i=e.pow,o=e.sin,r=e.log,s=e.tan,a=window.kendo,l=a.Class,c=a.dataviz,u=a.deepExtend,h=a.geometry,d=h.Point,f=c.map,p=f.Location,g=a.util,m=g.rad,v=g.deg,_=g.limitValue,y=e.PI,w=y/2,b=y/4,x=y/180,k={a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149},C=l.extend({init:function(e){this._initOptions(e)},MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12,options:{centralMeridian:0,datum:k},forward:function(e,t){var n=this,i=n.options,o=i.datum,r=o.a,s=i.centralMeridian,a=_(e.lat,-n.MAX_LAT,n.MAX_LAT),l=t?_(e.lng,-n.MAX_LNG,n.MAX_LNG):e.lng,c=m(l-s)*r,u=n._projectLat(a);return new d(c,u)},_projectLat:function(e){var t=this.options.datum,n=t.e,a=t.a,l=m(e),c=s(b+l/2),u=n*o(l),h=i((1-u)/(1+u),n/2);return a*r(c*h)},inverse:function(e,t){var n=this,i=n.options,o=i.datum,r=o.a,s=i.centralMeridian,a=e.x/(x*r)+s,l=_(n._inverseY(e.y),-n.MAX_LAT,n.MAX_LAT);return t&&(a=_(a,-n.MAX_LNG,n.MAX_LNG)),new p(l,a)},_inverseY:function(r){var s,a,l,c,u=this,h=u.options.datum,d=h.a,f=h.e,p=f/2,g=n(-r/d),m=w-2*t(g);for(s=0;u.INVERSE_ITERATIONS>=s&&(a=f*o(m),l=i((1-a)/(1+a),p),c=w-2*t(g*l)-m,m+=c,!(e.abs(c)<=u.INVERSE_CONVERGENCE));s++);return v(m)}}),S=C.extend({MAX_LAT:85.0511287798,_projectLat:function(e){var t=this.options.datum.a,n=m(e),i=s(b+n/2);return t*r(i)},_inverseY:function(e){var i=this.options.datum.a,o=n(-e/i);return v(w-2*t(o))}}),T=l.extend({forward:function(e){return new d(e.lng,e.lat)},inverse:function(e){return new p(e.y,e.x)}}),D=l.extend({init:function(){var e=this,t=e._proj=new S,n=this.c=2*y*t.options.datum.a;this._tm=h.transform().translate(.5,.5).scale(1/n,-1/n),this._itm=h.transform().scale(n,-n).translate(-.5,-.5)},toPoint:function(e,t,n){var i=this._proj.forward(e,n);return i.transform(this._tm).scale(t||1)},toLocation:function(e,t,n){return e=e.clone().scale(1/(t||1)).transform(this._itm),this._proj.inverse(e,n)}}),A=l.extend({init:function(){this._proj=new C},toPoint:function(e){return this._proj.forward(e)},toLocation:function(e){return this._proj.inverse(e)}}),M=l.extend({init:function(){this._proj=new T},toPoint:function(e){return this._proj.forward(e)},toLocation:function(e){return this._proj.inverse(e)}});u(c,{map:{crs:{EPSG3395:A,EPSG3857:D,EPSG4326:M},datums:{WGS84:k},projections:{Equirectangular:T,Mercator:C,SphericalMercator:S}}})}(window.kendo.jQuery)}(),function(){!function(e){var t=e.proxy,n=window.kendo,i=n.Class,o=n.dataviz,r=n.deepExtend,s=o.map.Extent,a=n.util,l=a.defined,c=i.extend({init:function(n,i){this._initOptions(i),this.map=n,this.element=e("<div class='k-layer'></div>").css({zIndex:this.options.zIndex,opacity:this.options.opacity}).appendTo(n.scrollElement),this._beforeReset=t(this._beforeReset,this),this._reset=t(this._reset,this),this._resize=t(this._resize,this),this._panEnd=t(this._panEnd,this),this._activate(),this._updateAttribution()},destroy:function(){this._deactivate()},show:function(){this.reset(),this._activate(),this._applyExtent(!0)},hide:function(){this._deactivate(),this._setVisibility(!1)},reset:function(){this._beforeReset(),this._reset()},_reset:function(){this._applyExtent()},_beforeReset:e.noop,_resize:e.noop,_panEnd:function(){this._applyExtent()},_applyExtent:function(){var e=this.options,t=this.map.zoom(),n=!l(e.minZoom)||t>=e.minZoom,i=!l(e.maxZoom)||e.maxZoom>=t,o=s.create(e.extent),r=!o||o.overlaps(this.map.extent());this._setVisibility(n&&i&&r)},_setVisibility:function(e){this.element.css("display",e?"":"none")},_activate:function(){var e=this.map;e.bind("beforeReset",this._beforeReset),e.bind("reset",this._reset),e.bind("resize",this._resize),e.bind("panEnd",this._panEnd)},_deactivate:function(){var e=this.map;e.unbind("beforeReset",this._beforeReset),e.unbind("reset",this._reset),e.unbind("resize",this._resize),e.unbind("panEnd",this._panEnd)},_updateAttribution:function(){var e=this.map.attribution;e&&e.add(this.options.attribution)}});r(o,{map:{layers:{Layer:c}}})}(window.kendo.jQuery)}(),function(){!function(e){var t=e.proxy,n=window.kendo,i=n.Class,o=n.data.DataSource,r=n.dataviz,s=n.deepExtend,a=n.util.last,l=n.util.defined,c=n.geometry,u=n.drawing,h=u.Group,d=r.map,f=d.Location,p=d.layers.Layer,g=p.extend({init:function(e,t){p.fn.init.call(this,e,t),this.surface=u.Surface.create(this.element,{width:e.scrollElement.width(),height:e.scrollElement.height()}),this._initRoot(),this.movable=new n.ui.Movable(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this._initDataSource()},options:{autoBind:!0},destroy:function(){p.fn.destroy.call(this),this.surface.destroy(),this.dataSource.unbind("change",this._dataChange)},setDataSource:function(e){this.dataSource&&this.dataSource.unbind("change",this._dataChange),this.dataSource=n.data.DataSource.create(e),this.dataSource.bind("change",this._dataChange),this.options.autoBind&&this.dataSource.fetch()},_reset:function(){p.fn._reset.call(this),this._translateSurface(),this._data&&this._load(this._data)},_initRoot:function(){this._root=new h,this.surface.draw(this._root)},_beforeReset:function(){this.surface.clear(),this._initRoot()},_resize:function(){this.surface.size(this.map.size())},_initDataSource:function(){var e=this.options.dataSource;this._dataChange=t(this._dataChange,this),this.dataSource=o.create(e).bind("change",this._dataChange),e&&this.options.autoBind&&this.dataSource.fetch()},_dataChange:function(e){this._data=e.sender.view(),this._load(this._data)},_load:function(e){var t,n,i;for(this._clearMarkers(),this._loader||(this._loader=new m(this.map,this.options.style,this)),t=new h,n=0;e.length>n;n++)i=this._loader.parse(e[n]),i&&t.append(i);this._root.clear(),this._root.append(t)},shapeCreated:function(e){var t,n=!1;return e instanceof u.Circle&&(n=l(this._createMarker(e))),n||(t={layer:this,shape:e},n=this.map.trigger("shapeCreated",t)),n},_createMarker:function(e){var t=this.map.markers.bind({location:e.location},e.dataItem);return t&&this._markers.push(t),t},_clearMarkers:function(){for(var e=0;this._markers.length>e;e++)this.map.markers.remove(this._markers[e]);this._markers=[]},_panEnd:function(e){p.fn._panEnd.call(this,e),this._translateSurface()},_translateSurface:function(){var e=this.map,t=e.locationToView(e.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},_handler:function(e){var t=this;return function(n){if(n.element){var i={layer:t,shape:n.element,originalEvent:n.originalEvent};t.map.trigger(e,i)}}}}),m=i.extend({init:function(e,t,n){this.observer=n,this.locator=e,this.style=t},parse:function(e){var t=new h;return"Feature"===e.type?this._loadGeometryTo(t,e.geometry,e):this._loadGeometryTo(t,e,e),2>t.children.length&&(t=t.children[0]),t},_shapeCreated:function(e){var t=!1;return this.observer&&this.observer.shapeCreated&&(t=this.observer.shapeCreated(e)),t},_loadGeometryTo:function(e,t,n){var i,o,r=t.coordinates;switch(t.type){case"LineString":o=this._loadPolygon(e,[r],n),this._setLineFill(o);break;case"MultiLineString":for(i=0;r.length>i;i++)o=this._loadPolygon(e,[r[i]],n),this._setLineFill(o);break;case"Polygon":this._loadPolygon(e,r,n);break;case"MultiPolygon":for(i=0;r.length>i;i++)this._loadPolygon(e,r[i],n);break;case"Point":this._loadPoint(e,r,n);break;case"MultiPoint":for(i=0;r.length>i;i++)this._loadPoint(e,r[i],n)}},_setLineFill:function(e){var t=e.segments;(4>t.length||!t[0].anchor().equals(a(t).anchor()))&&(e.options.fill=null)},_loadShape:function(e,t){return this._shapeCreated(t)||e.append(t),t},_loadPolygon:function(e,t,n){var i=this._buildPolygon(t);return i.dataItem=n,this._loadShape(e,i)},_buildPolygon:function(e){var t,n,i,o=e.length>1?u.MultiPath:u.Path,r=new o(this.style);for(t=0;e.length>t;t++)for(n=0;e[t].length>n;n++)i=this.locator.locationToView(f.fromLngLat(e[t][n])),0===n?r.moveTo(i.x,i.y):r.lineTo(i.x,i.y);return r},_loadPoint:function(e,t,n){var i=f.fromLngLat(t),o=this.locator.locationToView(i),r=new c.Circle(o,10),s=new u.Circle(r,this.style);return s.dataItem=n,s.location=i,this._loadShape(e,s)}});s(n.data,{schemas:{geojson:{type:"json",data:function(e){return"FeatureCollection"===e.type?e.features:"GeometryCollection"===e.type?e.geometries:e}}},transports:{geojson:{read:{dataType:"json"}}}}),s(r,{map:{layers:{shape:g,ShapeLayer:g},GeoJSONLoader:m}})}(window.kendo.jQuery)}(),function(){!function(){var e=window.kendo,t=e.getter,n=e.dataviz,i=e.deepExtend,o=e.util,r=o.defined,s=e.geometry,a=e.drawing,l=n.map,c=l.Location,u=l.layers.ShapeLayer,h=u.extend({options:{autoBind:!0,locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle"},_load:function(e){var n,i,o,s,a,l,u,h,d,f,p;if(this.surface.clear(),0!==e.length)for(n=this.options,i=t(n.valueField),e=e.slice(0),e.sort(function(e,t){return i(t)-i(e)}),o=this._scaleType(),a=0;e.length>a;a++)l=e[a],u=t(n.locationField)(l),h=t(n.valueField)(l),r(u)&&r(h)&&(s||(s=new o([0,h],[n.minSize,n.maxSize])),u=c.create(u),d=this.map.locationToView(u),f=s.map(h),p=this._createSymbol({center:d,size:f,style:n.style,dataItem:l,location:u}),p.dataItem=l,p.location=u,p.value=h,this._drawSymbol(p))},_scaleType:function(){var t=this.options.scale;return e.isFunction(t)?t:n.map.scales[t]},_createSymbol:function(t){var i=this.options.symbol;return e.isFunction(i)||(i=n.map.symbols[i]),i(t)},_drawSymbol:function(e){var t={layer:this,shape:e},n=this.map.trigger("shapeCreated",t);n||this.surface.draw(e)}}),d=e.Class.extend({init:function(e,t){var n,i;this._domain=e,this._range=t,n=Math.sqrt(e[1])-Math.sqrt(e[0]),i=t[1]-t[0],this._ratio=i/n},map:function(e){var t=(Math.sqrt(e)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t}}),f={circle:function(e){var t=new s.Circle(e.center,e.size/2);return new a.Circle(t,e.style)},square:function(e){var t=new a.Path(e.style),n=e.size/2,i=e.center;return t.moveTo(i.x-n,i.y-n).lineTo(i.x+n,i.y-n).lineTo(i.x+n,i.y+n).lineTo(i.x-n,i.y+n).close(),t}};i(n,{map:{layers:{bubble:h,BubbleLayer:h},scales:{sqrt:d},symbols:f}})}(window.kendo.jQuery)}(),function(){!function(e){function t(e){return new u(p(e.x),p(e.y))}var n=Math,i=e.proxy,o=window.kendo,r=o.Class,s=o.template,a=o.dataviz,l=o.deepExtend,c=o.geometry,u=c.Point,h=a.map.layers.Layer,d=o.util,f=d.objectKey,p=d.round,g=d.renderSize,m=d.limitValue,v=h.extend({init:function(e,t){h.fn.init.call(this,e,t),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var n=this._viewType();this._view=new n(this.element,this.options)},destroy:function(){h.fn.destroy.call(this),this._view.destroy(),this._view=null},_reset:function(){h.fn._reset.call(this),this._updateView(),this._view.reset()},_viewType:function(){
|
|
return _},_activate:function(){h.fn._activate.call(this),o.support.mobileOS||(this._pan||(this._pan=o.throttle(i(this._render,this),100)),this.map.bind("pan",this._pan))},_deactivate:function(){h.fn._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},_updateView:function(){var e=this._view,t=this.map,n=t.extent(),i={nw:t.locationToLayer(n.nw).round(),se:t.locationToLayer(n.se).round()};e.center(t.locationToLayer(t.center())),e.extent(i),e.zoom(t.zoom())},_resize:function(){this._render()},_panEnd:function(e){h.fn._panEnd.call(this,e),this._render()},_render:function(){this._updateView(),this._view.render()}}),_=r.extend({init:function(e,t){this.element=e,this._initOptions(t),this.pool=new w},options:{tileSize:256,subdomains:["a","b","c"],urlTemplate:""},center:function(e){this._center=e},extent:function(e){this._extent=e},zoom:function(e){this._zoom=e},pointToTileIndex:function(e){return new u(n.floor(e.x/this.options.tileSize),n.floor(e.y/this.options.tileSize))},tileCount:function(){var e=this.size(),t=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,o=this.indexToPoint(t).translate(-i.x,-i.y);return{x:n.ceil((n.abs(o.x)+e.width)/this.options.tileSize),y:n.ceil((n.abs(o.y)+e.height)/this.options.tileSize)}},size:function(){var e=this._extent.nw,t=this._extent.se,n=t.clone().translate(-e.x,-e.y);return{width:n.x,height:n.y}},indexToPoint:function(e){var t=e.x,n=e.y;return new u(t*this.options.tileSize,n*this.options.tileSize)},subdomainText:function(){var e=this.options.subdomains;return e[this.subdomainIndex++%e.length]},destroy:function(){this.element.empty(),this.pool.empty()},reset:function(){this.pool.reset(),this.subdomainIndex=0,this.basePoint=this._extent.nw,this.render()},render:function(){var e,t,n,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw);for(t=0;i.x>t;t++)for(n=0;i.y>n;n++)e=this.createTile({x:o.x+t,y:o.y+n}),e.visible||e.show()},createTile:function(e){var t=this.tileOptions(e),n=this.pool.get(this._center,t);return 0===n.element.parent().length&&this.element.append(n.element),n},tileOptions:function(e){var n=this.wrapIndex(e),i=this.indexToPoint(e),o=this.basePoint,r=i.clone().translate(-o.x,-o.y);return{index:n,currentIndex:e,point:i,offset:t(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},wrapIndex:function(e){var t=n.pow(2,this._zoom);return{x:this.wrapValue(e.x,t),y:m(e.y,0,t-1)}},wrapValue:function(e,t){var i=n.abs(e)%t;return e=e>=0?i:t-(0===i?t:i)}}),y=r.extend({init:function(e,t){this.id=e,this.visible=!0,this._initOptions(t),this.createElement(),this.show()},options:{urlTemplate:"",errorUrlTemplate:""},createElement:function(){this.element=e("<img style='position: absolute; display: block;' />").css({width:this.options.size,height:this.options.size}).error(i(function(e){this.errorUrl()?e.target.setAttribute("src",this.errorUrl()):e.target.removeAttribute("src")},this))},show:function(){var e,t=this.element[0];t.style.top=g(this.options.offset.y),t.style.left=g(this.options.offset.x),e=this.url(),e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},hide:function(){this.element[0].style.visibility="hidden",this.visible=!1},url:function(){var e=s(this.options.urlTemplate);return e(this.urlOptions())},errorUrl:function(){var e=s(this.options.errorUrlTemplate);return e(this.urlOptions())},urlOptions:function(){var e=this.options;return{zoom:e.zoom,subdomain:e.subdomain,z:e.zoom,x:e.index.x,y:e.index.y,s:e.subdomain,quadkey:e.quadkey,q:e.quadkey,culture:e.culture,c:e.culture}},destroy:function(){this.element&&(this.element.remove(),this.element=null)}}),w=r.extend({init:function(){this._items=[]},options:{maxSize:100},get:function(e,t){return this._items.length>=this.options.maxSize&&this._remove(e),this._create(t)},empty:function(){var e,t=this._items;for(e=0;t.length>e;e++)t[e].destroy();this._items=[]},reset:function(){var e,t=this._items;for(e=0;t.length>e;e++)t[e].hide()},_create:function(e){var t,n,i=this._items,o=d.hashKey(f(e)+f(e.currentIndex));for(n=0;i.length>n;n++)i[n].id===o&&(t=i[n]);return t?t.show():(t=new y(o,e),this._items.push(t)),t},_remove:function(e){var t,n,i=this._items,o=-1,r=-1;for(t=0;i.length>t;t++)n=i[t].options.point.distanceTo(e),n>o&&(r=t,o=n);-1!==r&&(i[r].destroy(),i.splice(r,1))}});l(a,{map:{layers:{tile:v,TileLayer:v,ImageTile:y,TilePool:w,TileView:_}}})}(window.kendo.jQuery)}(),function(){!function(e,t){var n=window.kendo,i=n.dataviz,o=n.deepExtend,r=n.util.defined,s=i.map.Extent,a=i.map.Location,l=i.map.layers.TileLayer,c=i.map.layers.TileView,u=l.extend({init:function(t,n){l.fn.init.call(this,t,n),this._onMetadata=e.proxy(this._onMetadata,this),this._fetchMetadata()},options:{baseUrl:"//dev.virtualearth.net/REST/v1/Imagery/Metadata/",imagerySet:"road"},_fetchMetadata:function(){var t=this.options;if(!t.key)throw Error("Bing tile layer: API key is required");e.ajax({url:t.baseUrl+t.imagerySet,data:{output:"json",include:"ImageryProviders",key:t.key,uriScheme:this._scheme(window.location.protocol)},type:"get",dataType:"jsonp",jsonp:"jsonp",success:this._onMetadata})},_scheme:function(e){return"https"===e.replace(":","")?"https":"http"},_onMetadata:function(e){var t,n;e&&e.resourceSets.length&&(t=this.resource=e.resourceSets[0].resources[0],o(this._view.options,{urlTemplate:t.imageUrl.replace("{subdomain}","#= subdomain #").replace("{quadkey}","#= quadkey #").replace("{culture}","#= culture #"),subdomains:t.imageUrlSubdomains}),n=this.options,r(n.minZoom)||(n.minZoom=t.zoomMin),r(n.maxZoom)||(n.maxZoom=t.zoomMax),this._addAttribution(),"none"!==this.element.css("display")&&this.reset())},_viewType:function(){return h},_addAttribution:function(){var e,t,n,i,o,r=this.map.attribution;if(r&&(e=this.resource.imageryProviders))for(t=0;e.length>t;t++)for(n=e[t],i=0;n.coverageAreas.length>i;i++)o=n.coverageAreas[i],r.add({text:n.attribution,minZoom:o.zoomMin,maxZoom:o.zoomMax,extent:new s(new a(o.bbox[2],o.bbox[1]),new a(o.bbox[0],o.bbox[3]))})},imagerySet:function(e){return e?(this.options.imagerySet=e,this.map.attribution.clear(),this._fetchMetadata(),this._reset(),t):this.options.imagerySet}}),h=c.extend({options:{culture:"en-US"},tileOptions:function(e){var t=c.fn.tileOptions.call(this,e);return t.culture=this.options.culture,t.quadkey=this.tileQuadKey(this.wrapIndex(e)),t},tileQuadKey:function(e){var t,n,i,o="";for(i=this._zoom;i>0;i--)t=0,n=1<<i-1,0!==(e.x&n)&&t++,0!==(e.y&n)&&(t+=2),o+=t;return o}});o(i,{map:{layers:{bing:u,BingLayer:u,BingView:h}}})}(window.kendo.jQuery)}(),function(){!function(e,t){var n=document,i=Math,o=e.inArray,r=e.proxy,s=window.kendo,a=s.Class,l=s.data.DataSource,c=s.ui.Tooltip,u=s.dataviz,h=s.deepExtend,d=u.map,f=d.Location,p=d.layers.Layer,g=p.extend({init:function(e,t){p.fn.init.call(this,e,t),this._markerClick=r(this._markerClick,this),this.element.on("click",".k-marker",this._markerClick),this.items=[],this._initDataSource()},destroy:function(){p.fn.destroy.call(this),this.element.off("click",".k-marker",this._markerClick),this.dataSource.unbind("change",this._dataChange),this.clear()},options:{zIndex:1e3,autoBind:!0,dataSource:{},locationField:"location",titleField:"title"},add:function(t){if(!e.isArray(t))return this._addOne(t);for(var n=0;t.length>n;n++)this._addOne(t[n])},remove:function(e){e.destroy();var t=o(e,this.items);t>-1&&this.items.splice(t,1)},clear:function(){for(var e=0;this.items.length>e;e++)this.items[e].destroy();this.items=[]},update:function(e){var t,n=e.location();n&&(e.showAt(this.map.locationToView(n)),t={marker:e,layer:this},this.map.trigger("markerActivate",t))},_reset:function(){var e,t;for(p.fn._reset.call(this),e=this.items,t=0;e.length>t;t++)this.update(e[t])},bind:function(e,n){var i,o,r=d.Marker.create(e,this.options);return r.dataItem=n,i={marker:r,layer:this},o=this.map.trigger("markerCreated",i),o?t:(this.add(r),r)},setDataSource:function(e){this.dataSource&&this.dataSource.unbind("change",this._dataChange),this.dataSource=s.data.DataSource.create(e),this.dataSource.bind("change",this._dataChange),this.options.autoBind&&this.dataSource.fetch()},_addOne:function(e){var t=m.create(e,this.options);return t.addTo(this),t},_initDataSource:function(){var e=this.options.dataSource;this._dataChange=r(this._dataChange,this),this.dataSource=l.create(e).bind("change",this._dataChange),e&&this.options.autoBind&&this.dataSource.fetch()},_dataChange:function(e){this._load(e.sender.view())},_load:function(e){var t,n,i,o;for(this._data=e,this.clear(),t=s.getter(this.options.locationField),n=s.getter(this.options.titleField),i=0;e.length>i;i++)o=e[i],this.bind({location:t(o),title:n(o)},o)},_markerClick:function(t){var n={marker:e(t.target).data("kendoMarker"),layer:this};this.map.trigger("markerClick",n)}}),m=a.extend({init:function(e){this.options=e||{}},addTo:function(e){this.layer=e.markers||e,this.layer.items.push(this),this.layer.update(this)},location:function(e){return e?(this.options.location=f.create(e).toArray(),this.layer&&this.layer.update(this),this):f.create(this.options.location)},showAt:function(e){this.render(),this.element.css({left:i.round(e.x),top:i.round(e.y)}),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},hide:function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},destroy:function(){this.layer=null,this.hide()},render:function(){var t,i;this.element||(t=this.options,i=this.layer,this.element=e(n.createElement("span")).addClass("k-marker k-marker-"+s.toHyphens(t.shape||"pin")).attr("title",t.title).attr(t.attributes||{}).data("kendoMarker",this).css("zIndex",t.zIndex),i&&i.element.append(this.element),this.renderTooltip())},renderTooltip:function(){var e,t,n=this,i=n.options.title,o=n.options.tooltip||{};o&&c&&(e=o.template,e&&(t=s.template(e),o.content=function(e){return e.location=n.location(),e.marker=n,t(e)}),(i||o.content||o.contentUrl)&&(this.tooltip=new c(this.element,o),this.tooltip.marker=this))}});m.create=function(e,t){return e instanceof m?e:new m(h({},t,e))},h(u,{map:{layers:{marker:g,MarkerLayer:g},Marker:m}})}(window.kendo.jQuery)}(),function(){!function(e){var t=document,n=Math,i=n.min,o=n.pow,r=e.proxy,s=window.kendo,a=s.ui.Widget,l=s.deepExtend,c=s.dataviz,u=c.ui,h=s.geometry,d=h.Point,f=c.map,p=f.Extent,g=f.Location,m=f.crs.EPSG3857,v=s.util,_=v.defined,y=v.limitValue,w=v.renderPos,b=v.valueOrDefault,x="k-",k=.9,C=.93,S="DOMMouseScroll mousewheel",T=5,D=a.extend({init:function(e,n){s.destroy(e),a.fn.init.call(this,e),this._initOptions(n),this.bind(this.events,n),this.crs=new m,this.element.addClass(x+this.options.name.toLowerCase()).css("position","relative").empty().append(t.createElement("div")),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheel=r(this._mousewheel,this),this.element.bind("click",r(this._click,this)),this.element.bind(S,this._mousewheel)},options:{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0},events:["beforeReset","click","reset","pan","panEnd","markerActivate","markerClick","markerCreated","shapeClick","shapeCreated","shapeMouseEnter","shapeMouseLeave","zoomStart","zoomEnd"],destroy:function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),this.markers.destroy();for(var e=0;this.layers.length>e;e++)this.layers[e].destroy();a.fn.destroy.call(this)},zoom:function(e){var t=this.options;return _(e)?(e=n.round(y(e,t.minZoom,t.maxZoom)),t.zoom!==e&&(t.zoom=e,this._reset()),this):t.zoom},center:function(e){return e?(this.options.center=g.create(e).toArray(),this._reset(),this):g.create(this.options.center)},extent:function(e){return e?(this._setExtent(e),this):this._getExtent()},setOptions:function(e){a.fn.setOptions.call(this,e),this._reset()},locationToLayer:function(e,t){var n=!this.options.wraparound;return e=g.create(e),this.crs.toPoint(e,this._layerSize(t),n)},layerToLocation:function(e,t){var n=!this.options.wraparound;return e=d.create(e),this.crs.toLocation(e,this._layerSize(t),n)},locationToView:function(e){var t,n;return e=g.create(e),t=this.locationToLayer(this._viewOrigin),n=this.locationToLayer(e),n.translateWith(t.scale(-1))},viewToLocation:function(e,t){var n=this.locationToLayer(this._getOrigin(),t);return e=d.create(e),e=e.clone().translateWith(n),this.layerToLocation(e,t)},eventOffset:function(e){var t=this.element.offset(),n=e.originalEvent||e,i=b(n.pageX,n.clientX)-t.left,o=b(n.pageY,n.clientY)-t.top;return new h.Point(i,o)},eventToView:function(e){var t=this.eventOffset(e);return this.locationToView(this.viewToLocation(t))},eventToLayer:function(e){return this.locationToLayer(this.eventToLocation(e))},eventToLocation:function(e){var t=this.eventOffset(e);return this.viewToLocation(t)},viewSize:function(){var e=this.element,t=this._layerSize(),n=e.width();return this.options.wraparound||(n=i(t,n)),{width:n,height:i(t,e.height())}},exportVisual:function(){return this._reset(),!1},_setOrigin:function(e,t){var n,i=this.viewSize();return e=this._origin=g.create(e),n=this.locationToLayer(e,t),n.x+=i.width/2,n.y+=i.height/2,this.options.center=this.layerToLocation(n,t).toArray(),this},_getOrigin:function(e){var t,n=this.viewSize();return(e||!this._origin)&&(t=this.locationToLayer(this.center()),t.x-=n.width/2,t.y-=n.height/2,this._origin=this.layerToLocation(t)),this._origin},_setExtent:function(e){var t,i,o,r,s,a,l;for(e=p.create(e),this.center(e.center()),t=this.element.width(),i=this.element.height(),o=this.options.maxZoom;o>=this.options.minZoom&&(r=this.locationToLayer(e.nw,o),s=this.locationToLayer(e.se,o),a=n.abs(s.x-r.x),l=n.abs(s.y-r.y),!(t>=a&&i>=l));o--);this.zoom(o)},_getExtent:function(){var e,t=this._getOrigin(),n=this.locationToLayer(t),i=this.viewSize();return n.x+=i.width,n.y+=i.height,e=this.layerToLocation(n),new p(t,e)},_zoomAround:function(e,t){this._setOrigin(this.layerToLocation(e,t),t),this.zoom(t)},_initControls:function(){var e=this.options.controls;u.Attribution&&e.attribution&&this._createAttribution(e.attribution),s.support.mobileOS||(u.Navigator&&e.navigator&&this._createNavigator(e.navigator),u.ZoomControl&&e.zoom&&this._createZoomControl(e.zoom))},_createControlElement:function(t,n){var i=t.position||n,o="."+w(i).replace(" ","."),r=e(".k-map-controls"+o,this.element);return 0===r.length&&(r=e("<div>").addClass("k-map-controls "+w(i)).appendTo(this.element)),e("<div>").appendTo(r)},_createAttribution:function(e){var t=this._createControlElement(e,"bottomRight");this.attribution=new u.Attribution(t,e)},_createNavigator:function(e){var t=this._createControlElement(e,"topLeft"),n=this.navigator=new u.Navigator(t,e);this._navigatorPan=r(this._navigatorPan,this),n.bind("pan",this._navigatorPan),this._navigatorCenter=r(this._navigatorCenter,this),n.bind("center",this._navigatorCenter)},_navigatorPan:function(e){var t=this,n=t.scroller,i=n.scrollLeft+e.x,o=n.scrollTop-e.y,r=this._virtualSize,s=this.element.height(),a=this.element.width();i=y(i,r.x.min,r.x.max-a),o=y(o,r.y.min,r.y.max-s),t.scroller.one("scroll",function(e){t._scrollEnd(e)}),t.scroller.scrollTo(-i,-o)},_navigatorCenter:function(){this.center(this.options.center)},_createZoomControl:function(e){var t=this._createControlElement(e,"topLeft"),n=this.zoomControl=new u.ZoomControl(t,e);this._zoomControlChange=r(this._zoomControlChange,this),n.bind("change",this._zoomControlChange)},_zoomControlChange:function(e){this.trigger("zoomStart",{originalEvent:e})||(this.zoom(this.zoom()+e.delta),this.trigger("zoomEnd",{originalEvent:e}))},_initScroller:function(){var e=s.support.mobileOS?C:k,t=this.options.zoomable!==!1,n=this.scroller=new s.mobile.ui.Scroller(this.element.children(0),{friction:e,velocityMultiplier:T,zoom:t,mousewheelScrolling:!1});n.bind("scroll",r(this._scroll,this)),n.bind("scrollEnd",r(this._scrollEnd,this)),n.userEvents.bind("gesturestart",r(this._scaleStart,this)),n.userEvents.bind("gestureend",r(this._scale,this)),this.scrollElement=n.scrollElement},_initLayers:function(){var e,t,n,i,o,r=this.options.layers,s=this.layers=[];for(e=0;r.length>e;e++)t=r[e],n=t.type||"shape",i=this.options.layerDefaults[n],o=c.map.layers[n],s.push(new o(this,l({},i,t)))},_initMarkers:function(){this.markers=new f.layers.MarkerLayer(this,this.options.markerDefaults),this.markers.add(this.options.markers)},_scroll:function(e){var t=this.locationToLayer(this._viewOrigin).round(),n=e.sender.movable,i=new h.Point(n.x,n.y).scale(-1).scale(1/n.scale);t.x+=i.x,t.y+=i.y,this._scrollOffset=i,this._setOrigin(this.layerToLocation(t)),this.trigger("pan",{originalEvent:e,origin:this._getOrigin(),center:this.center()})},_scrollEnd:function(e){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTS=new Date,this.trigger("panEnd",{originalEvent:e,origin:this._getOrigin(),center:this.center()}))},_panComplete:function(){return new Date-(this._panEndTS||0)>50},_scaleStart:function(e){if(this.trigger("zoomStart",{originalEvent:e})){var t=e.touches[1];t&&t.cancel()}},_scale:function(e){var t=this.scroller.movable.scale,n=this._scaleToZoom(t),i=new h.Point(e.center.x,e.center.y),o=this.viewToLocation(i,n),r=this.locationToLayer(o,n),s=r.translate(-i.x,-i.y);this._zoomAround(s,n),this.trigger("zoomEnd",{originalEvent:e})},_scaleToZoom:function(e){var t=this._layerSize()*e,i=t/this.options.minSize,o=n.log(i)/n.log(2);return n.round(o)},_reset:function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},_resetScroller:function(){var e,t,n,i,r=this.scroller,s=r.dimensions.x,a=r.dimensions.y,l=this._layerSize(),c=this.extent().nw,u=this.locationToLayer(c).round();r.movable.round=!0,r.reset(),r.userEvents.cancel(),e=this.zoom(),r.dimensions.forcedMinScale=o(2,this.options.minZoom-e),r.dimensions.maxScale=o(2,this.options.maxZoom-e),t={min:-u.x,max:l-u.x},n={min:-u.y,max:l-u.y},this.options.wraparound&&(t.max=20*l,t.min=-t.max),this.options.pannable===!1&&(i=this.viewSize(),t.min=n.min=0,t.max=i.width,n.max=i.height),s.makeVirtual(),a.makeVirtual(),s.virtualSize(t.min,t.max),a.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},_renderLayers:function(){var e,t,n,i,o,r=this.options.layers,s=this.layers=[],a=this.scrollWrap;for(a.empty(),e=0;r.length>e;e++)t=r[e],n=t.type||"shape",i=this.options.layerDefaults[n],o=c.map.layers[n],s.push(new o(this,l({},i,t)))},_layerSize:function(e){return e=b(e,this.options.zoom),this.options.minSize*o(2,e)},_click:function(e){if(this._panComplete()){var t=this.eventOffset(e);this.trigger("click",{originalEvent:e,location:this.viewToLocation(t)})}},_mousewheel:function(e){var t,n,i,o,r,s,a,l;e.preventDefault(),t=c.mwDelta(e)>0?-1:1,n=this.options,i=this.zoom(),o=y(i+t,n.minZoom,n.maxZoom),n.zoomable!==!1&&o!==i&&(this.trigger("zoomStart",{originalEvent:e})||(r=this.eventOffset(e),s=this.viewToLocation(r),a=this.locationToLayer(s,o),l=a.translate(-r.x,-r.y),this._zoomAround(l,o),this.trigger("zoomEnd",{originalEvent:e})))}});c.ui.plugin(D)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,n,i){function o(e){for(var t=1;e*t%1;)t*=10;return t}var r,s,a,l;if(t===e||t===n)return[];if(i&&h.sign(n-e)!=h.sign(i))throw"The sign of the increment should allow to reach the stop-value.";if(i=i||1,e=e||0,n=n||e,(n-e)/i===1/0)throw"Infinite range defined.";if(r=[],s=-1,l=o(Math.abs(i)),e*=l,n*=l,i*=l,e>n&&i>0&&(i=-i),0>i)for(;(a=e+i*++s)>=n;)r.push(a/l);else for(;(a=e+i*++s)<=n;)r.push(a/l);return r}function i(e,t){if(e==t)return 0;var n=t.x-e.x,i=e.y-t.y,o=Math.atan(n/i);return i>=0?0>n?o+2*Math.PI:o:o+Math.PI}var o,r,s=window.kendo,a=s.dataviz.diagram={},l=s.deepExtend,c=e.isArray,u=1e-6,h={};l(h,{isNearZero:function(e){return Math.abs(e)<u},isDefined:function(e){return t!==e},isUndefined:function(e){return t===e||null===e},isObject:function(e){return e===Object(e)},has:function(e,t){return Object.hasOwnProperty.call(e,t)},isString:function(e){return"[object String]"==Object.prototype.toString.call(e)},isBoolean:function(e){return"[object Boolean]"==Object.prototype.toString.call(e)},isType:function(e,t){return Object.prototype.toString.call(e)=="[object "+t+"]"},isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isEmpty:function(e){if(null===e)return!0;if(c(e)||h.isString(e))return 0===e.length;for(var t in e)if(h.has(e,t))return!1;return!0},simpleExtend:function(e,t){if(h.isObject(t))for(var n in t)e[n]=t[n]},initArray:function(e,t){var n,i=[];for(n=0;e>n;++n)i[n]=t;return i},serializePoints:function(e){var t,n,i=[];for(t=0;e.length>t;t++)n=e[t],i.push(n.x+";"+n.y);return i.join(";")},deserializePoints:function(e){var t,n=e.split(";"),i=[];if(n.length%2!==0)throw"Not an array of points.";for(t=0;n.length>t;t+=2)i.push(new a.Point(parseInt(n[t],10),parseInt(n[t+1],10)));return i},randomInteger:function(e,t){return parseInt(Math.floor(Math.random()*t)+e,10)},DFT:function(e,t){var n,i;if(t(e),e.childNodes)for(n=0;e.childNodes.length>n;n++)i=e.childNodes[n],this.DFT(i,t)},getMatrixAngle:function(e){return null===e||0===e.d?0:180*Math.atan2(e.b,e.d)/Math.PI},getMatrixScaling:function(e){var t=Math.sqrt(e.a*e.a+e.c*e.c),n=Math.sqrt(e.b*e.b+e.d*e.d);return[t,n]}}),h.sign=function(e){return e?0>e?-1:1:0},h.findAngle=function(e,t){return 180*i(e,t)/Math.PI},h.forEach=function(e,t,n){for(var i=0;e.length>i;i++)t.call(n,e[i],i,e)},h.any=function(e,t){for(var n=0;e.length>n;++n)if(t(e[n]))return e[n];return null},h.remove=function(e,t){for(var n;-1!==(n=h.indexOf(e,t));)e.splice(n,1);return e},h.contains=function(e,t){return-1!==h.indexOf(e,t)},h.indexOf=function(t,n){return e.inArray(n,t)},h.fold=function(e,t,n,i){var o,r,s=arguments.length>2;for(o=0;e.length>o;o++)r=e[o],s?n=t.call(i,n,r,o,e):(n=r,s=!0);if(!s)throw"Reduce of empty array with no initial value";return n},h.find=function(e,t,n){var i;return h.any(e,function(e,o,r){return t.call(n,e,o,r)?(i=e,!0):!1}),i},h.first=function(e,t,n){return 0===e.length?null:h.isUndefined(t)?e[0]:h.find(e,t,n)},h.insert=function(e,t,n){return e.splice(n,0,t),e},h.all=function(e,t,n){var i,o,r=!0;for(o=0;e.length>o&&(i=e[o],r=r&&t.call(n,i,o,e),r);o++);return r},h.clear=function(e){e.splice(0,e.length)},h.bisort=function(e,t,n){if(h.isUndefined(e))throw"First array is not specified.";if(h.isUndefined(t))throw"Second array is not specified.";if(e.length!=t.length)throw"The two arrays should have equal length";var i,o=[];for(i=0;e.length>i;i++)o.push({x:e[i],y:t[i]});for(o.sort(h.isUndefined(n)?function(e,t){return e.x-t.x}:function(e,t){return n(e.x,t.x)}),h.clear(e),h.clear(t),i=0;o.length>i;i++)e.push(o[i].x),t.push(o[i].y)},h.addRange=function(e,t){e.push.apply(e,t)},o={easeInOut:function(e){return-Math.cos(e*Math.PI)/2+.5}},r=s.Class.extend({init:function(){this.adapters=[],this.target=0,this.tick=0,this.interval=20,this.duration=800,this.lastTime=null,this.handlers=[];var e=this;this.transition=o.easeInOut,this.timerDelegate=function(){e.onTimerEvent()}},addAdapter:function(e){this.adapters.push(e)},onComplete:function(e){this.handlers.push(e)},removeHandler:function(t){this.handlers=e.grep(this.handlers,function(e){return e!==t})},trigger:function(){var e=this;this.handlers&&h.forEach(this.handlers,function(t){return t.call(null!==e.caller?e.caller:e)})},onStep:function(){},seekTo:function(e){this.seekFromTo(this.tick,e)},seekFromTo:function(e,t){this.target=Math.max(0,Math.min(1,t)),this.tick=Math.max(0,Math.min(1,e)),this.lastTime=(new Date).getTime(),this.intervalId||(this.intervalId=window.setInterval(this.timerDelegate,this.interval))},stop:function(){this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null,this.trigger())},play:function(e){0!==this.adapters.length&&(null!==e&&(this.caller=e),this.initState(),this.seekFromTo(0,1))},reverse:function(){this.seekFromTo(1,0)},initState:function(){if(0!==this.adapters.length)for(var e=0;this.adapters.length>e;e++)this.adapters[e].initState()},propagate:function(){var e,t=this.transition(this.tick);for(e=0;this.adapters.length>e;e++)this.adapters[e].update(t)},onTimerEvent:function(){var e,t=(new Date).getTime(),n=t-this.lastTime;this.lastTime=t,e=n/this.duration*(this.target>this.tick?1:-1),Math.abs(e)>=Math.abs(this.tick-this.target)?this.tick=this.target:this.tick+=e;try{this.propagate()}finally{this.onStep.call(this),this.target==this.tick&&this.stop()}}}),s.deepExtend(a,{init:function(e){s.init(e,a.ui)},Utils:h,Range:n,Ticker:r})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e){return Math.abs(e)<R}function i(e,t,i,o,r){var s,a,l,c,u=(t.x-e.x)*(o.y-i.y)-(t.y-e.y)*(o.x-i.x);if(!n(u)&&(s=(e.y-i.y)*(o.x-i.x)-(e.x-i.x)*(o.y-i.y),a=(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y),l=s/u,c=a/u,!r||!(0>l||l>1||0>c||c>1)))return new A(e.x+l*(t.x-e.x),e.y+l*(t.y-e.y))}function o(e,t){var n,i,o;do n=2*Math.random()-1,i=2*Math.random()-1,o=n*n+i*i;while(!o||o>1);return e+t*n*Math.sqrt(-2*Math.log(o)/o)}function r(e){var t,n,i;for(D.isUndefined(e)&&(e=10),t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",i=e;i>0;--i)t+=n.charAt(Math.round(Math.random()*(n.length-1)));return t}var s,a,l,c,u,h,d,f,p,g,m,v,_,y,w,b,x=window.kendo,k=x.dataviz.diagram,C=x.Class,S=x.deepExtend,T=x.dataviz,D=k.Utils,A=T.Point2D,M=x.isFunction,E=D.contains,P=e.map,I=3,R=1e-6;S(A.fn,{plus:function(e){return new A(this.x+e.x,this.y+e.y)},minus:function(e){return new A(this.x-e.x,this.y-e.y)},offset:function(e){return new A(this.x-e,this.y-e)},times:function(e){return new A(this.x*e,this.y*e)},normalize:function(){return 0===this.length()?new A:this.times(1/this.length())},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},toString:function(){return"("+this.x+","+this.y+")"},lengthSquared:function(){return this.x*this.x+this.y*this.y},middleOf:function(e,t){return new A(t.x-e.x,t.y-e.y).times(.5).plus(e)},toPolar:function(e){var t,n,i,o=1;if(e&&(o=180/Math.PI),t=Math.atan2(Math.abs(this.y),Math.abs(this.x)),n=Math.PI/2,i=this.length(),0===this.x){if(0===this.y)return new h(0,0);if(this.y>0)return new h(i,o*n);if(0>this.y)return new h(i,3*o*n)}else if(this.x>0){if(0===this.y)return new h(i,0);if(this.y>0)return new h(i,o*t);if(0>this.y)return new h(i,o*(4*n-t))}else{if(0===this.y)return new h(i,2*n);if(this.y>0)return new h(i,o*(2*n-t));if(0>this.y)return new h(i,o*(2*n+t))}},isOnLine:function(e,t){var n,i,o,r,s;return e.x>t.x&&(n=t,t=e,e=n),i=new a(e.x,e.y).inflate(I,I),o=new a(t.x,t.y).inflate(I,I),i.union(o).contains(this)?e.x===t.x||e.y===t.y?!0:(t.y>e.y?(r=i.x+(o.x-i.x)*(this.y-(i.y+i.height))/(o.y+o.height-(i.y+i.height)),s=i.x+i.width+(o.x+o.width-(i.x+i.width))*(this.y-i.y)/(o.y-i.y)):(r=i.x+(o.x-i.x)*(this.y-i.y)/(o.y-i.y),s=i.x+i.width+(o.x+o.width-(i.x+i.width))*(this.y-(i.y+i.height))/(o.y+o.height-(i.y+i.height))),this.x>r&&s>this.x):!1}}),S(A,{parse:function(e){var n=e.slice(1,e.length-1),i=n.split(","),o=parseInt(i[0],10),r=parseInt(i[1],10);return isNaN(o)||isNaN(r)?t:new A(o,r)}}),s=C.extend({init:function(e,t,n){this.point=e,this.left=t,this.right=n}}),a=C.extend({init:function(e,t,n,i){this.x=e||0,this.y=t||0,this.width=n||0,this.height=i||0},contains:function(e){return e.x>=this.x&&this.x+this.width>=e.x&&e.y>=this.y&&this.y+this.height>=e.y},inflate:function(e,n){return n===t&&(n=e),this.x-=e,this.y-=n,this.width+=2*e+1,this.height+=2*n+1,this},offset:function(e,t){var n=e,i=t;return e instanceof A&&(n=e.x,i=e.y),this.x+=n,this.y+=i,this},union:function(e){var t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x+this.width,e.x+e.width),o=Math.max(this.y+this.height,e.y+e.height);return new a(t,n,i-t,o-n)},center:function(){return new A(this.x+this.width/2,this.y+this.height/2)},top:function(){return new A(this.x+this.width/2,this.y)},right:function(){return new A(this.x+this.width,this.y+this.height/2)},bottom:function(){return new A(this.x+this.width/2,this.y+this.height)},left:function(){return new A(this.x,this.y+this.height/2)},topLeft:function(){return new A(this.x,this.y)},topRight:function(){return new A(this.x+this.width,this.y)},bottomLeft:function(){return new A(this.x,this.y+this.height)},bottomRight:function(){return new A(this.x+this.width,this.y+this.height)},clone:function(){return new a(this.x,this.y,this.width,this.height)},isEmpty:function(){return!this.width&&!this.height},equals:function(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},rotatedBounds:function(e){var t=this.clone(),n=this.rotatedPoints(e),i=n[0],o=n[1],r=n[2],s=n[3];return t.x=Math.min(r.x,i.x,o.x,s.x),t.y=Math.min(r.y,i.y,o.y,s.y),t.width=Math.max(r.x,i.x,o.x,s.x)-t.x,t.height=Math.max(r.y,i.y,o.y,s.y)-t.y,t},rotatedPoints:function(e){var t=this,n=t.center(),i=t.bottomRight().rotate(n,360-e),o=t.topLeft().rotate(n,360-e),r=t.topRight().rotate(n,360-e),s=t.bottomLeft().rotate(n,360-e);return[o,r,i,s]},toString:function(e){return e=e||" ",this.x+e+this.y+e+this.width+e+this.height},scale:function(e,t,n,i,o){var r,s,a,l=this.topLeft(),c=this.center();l.rotate(c,360-o).rotate(i,o),r=n.minus(l),s=new A(r.x*e,r.y*t),a=r.minus(s),l=l.plus(a),l.rotate(i,360-o).rotate(c,o),this.x=l.x,this.y=l.y,this.width*=e,this.height*=t},zoom:function(e){return this.x*=e,this.y*=e,this.width*=e,this.height*=e,this},overlaps:function(e){var t=this.bottomRight(),n=e.bottomRight(),i=!(e.x>t.x||e.y>t.y||this.x>n.x||this.y>n.y);return i}}),l=C.extend({init:function(e,t){this.width=e,this.height=t}}),l.prototype.Empty=new l(0,0),a.toRect=function(e){return e instanceof a||(e=new a(e.x,e.y,e.width,e.height)),e},a.empty=function(){return new a(0,0,0,0)},a.fromPoints=function(e,t){if(isNaN(e.x)||isNaN(e.y)||isNaN(t.x)||isNaN(t.y))throw"Some values are NaN.";return new a(Math.min(e.x,t.x),Math.min(e.y,t.y),Math.abs(e.x-t.x),Math.abs(e.y-t.y))},c={lines:function(e,t,n,o){return i(e,t,n,o)},segments:function(e,t,n,o){return i(e,t,n,o,!0)},rectWithLine:function(e,t,n){return c.segments(t,n,e.topLeft(),e.topRight())||c.segments(t,n,e.topRight(),e.bottomRight())||c.segments(t,n,e.bottomLeft(),e.bottomRight())||c.segments(t,n,e.topLeft(),e.bottomLeft())},rects:function(e,t,n){var i,o,r=t.topLeft(),s=t.topRight(),a=t.bottomLeft(),l=t.bottomRight(),u=t.center();return n&&(r=r.rotate(u,n),s=s.rotate(u,n),a=a.rotate(u,n),l=l.rotate(u,n)),i=e.contains(r)||e.contains(s)||e.contains(a)||e.contains(l)||c.rectWithLine(e,r,s)||c.rectWithLine(e,r,a)||c.rectWithLine(e,s,l)||c.rectWithLine(e,a,l),i||(r=e.topLeft(),s=e.topRight(),a=e.bottomLeft(),l=e.bottomRight(),n&&(o=360-n,r=r.rotate(u,o),s=s.rotate(u,o),a=a.rotate(u,o),l=l.rotate(u,o)),i=t.contains(r)||t.contains(s)||t.contains(a)||t.contains(l)),i}},u=C.extend({init:function(e){this.container=a.toRect(e)},align:function(e,t){var n,i=t.toLowerCase().split(" ");for(n=0;i.length>n;n++)e=this._singleAlign(e,i[n]);return e},_singleAlign:function(e,t){return M(this[t])?this[t](e):e},left:function(e){return this._align(e,this._left)},center:function(e){return this._align(e,this._center)},right:function(e){return this._align(e,this._right)},stretch:function(e){return this._align(e,this._stretch)},top:function(e){return this._align(e,this._top)},middle:function(e){return this._align(e,this._middle)},bottom:function(e){return this._align(e,this._bottom)},_left:function(e,t){t.x=e.x},_center:function(e,t){t.x=(e.width-t.width)/2||0},_right:function(e,t){t.x=e.width-t.width;
|
|
},_top:function(e,t){t.y=e.y},_middle:function(e,t){t.y=(e.height-t.height)/2||0},_bottom:function(e,t){t.y=e.height-t.height},_stretch:function(e,t){t.x=0,t.y=0,t.height=e.height,t.width=e.width},_align:function(e,t){return e=a.toRect(e),t(this.container,e),e}}),h=C.extend({init:function(e,t){this.r=e,this.angle=t}}),d=C.extend({init:function(e,t,n,i,o,r){this.a=e||0,this.b=t||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},plus:function(e){this.a+=e.a,this.b+=e.b,this.c+=e.c,this.d+=e.d,this.e+=e.e,this.f+=e.f},minus:function(e){this.a-=e.a,this.b-=e.b,this.c-=e.c,this.d-=e.d,this.e-=e.e,this.f-=e.f},times:function(e){return new d(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)},apply:function(e){return new A(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)},applyRect:function(e){return a.fromPoints(this.apply(e.topLeft()),this.apply(e.bottomRight()))},toString:function(){return"matrix("+this.a+" "+this.b+" "+this.c+" "+this.d+" "+this.e+" "+this.f+")"}}),S(d,{fromSVGMatrix:function(e){var t=new d;return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},fromMatrixVector:function(e){var t=new d;return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},fromList:function(e){if(6!==e.length)throw"The given list should consist of six elements.";var t=new d;return t.a=e[0],t.b=e[1],t.c=e[2],t.d=e[3],t.e=e[4],t.f=e[5],t},translation:function(e,t){var n=new d;return n.a=1,n.b=0,n.c=0,n.d=1,n.e=e,n.f=t,n},unit:function(){return new d(1,0,0,1,0,0)},rotation:function(e,t,n){var i=new d;return i.a=Math.cos(e*Math.PI/180),i.b=Math.sin(e*Math.PI/180),i.c=-i.b,i.d=i.a,i.e=t-t*i.a+n*i.b||0,i.f=n-n*i.a-t*i.b||0,i},scaling:function(e,t){var n=new d;return n.a=e,n.b=0,n.c=0,n.d=t,n.e=0,n.f=0,n},parse:function(e){var t,n;if(e){if(e=e.trim(),"matrix"===e.slice(0,6).toLowerCase()){if(n=e.slice(7,e.length-1).trim(),t=n.split(","),6===t.length)return d.fromList(P(t,function(e){return parseFloat(e)}));if(t=n.split(" "),6===t.length)return d.fromList(P(t,function(e){return parseFloat(e)}))}if("("===e.slice(0,1)&&")"===e.slice(e.length-1)&&(e=e.substr(1,e.length-1)),e.indexOf(",")>0&&(t=e.split(","),6===t.length))return d.fromList(P(t,function(e){return parseFloat(e)}));if(e.indexOf(" ")>0&&(t=e.split(" "),6===t.length))return d.fromList(P(t,function(e){return parseFloat(e)}))}return t}}),f=C.extend({init:function(e,t,n,i,o,r){this.a=e||0,this.b=t||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},fromMatrix:function(e){var t=new f;return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t}}),p={_distanceToLineSquared:function(e,t,n){function i(e,t){return(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)}if(t===n)return i(e,t);var o=n.x-t.x,r=n.y-t.y,s=(e.x-t.x)*o+(e.y-t.y)*r;return 0>s?i(t,e):(s=(n.x-e.x)*o+(n.y-e.y)*r,0>s?i(n,e):(s=(n.x-e.x)*r-(n.y-e.y)*o,s*s/(o*o+r*r)))},distanceToLine:function(e,t,n){return Math.sqrt(this._distanceToLineSquared(e,t,n))},distanceToPolyline:function(e,t){var n,i,o,r,s=Number.MAX_VALUE;if(D.isUndefined(t)||0===t.length)return Number.MAX_VALUE;for(n=0;t.length-1>n;n++)i=t[n],o=t[n+1],r=this._distanceToLineSquared(e,i,o),s>r&&(s=r);return Math.sqrt(s)}},g=x.Class.extend({init:function(){this._buckets=[],this.length=0},add:function(e,t){var n=this._createGetBucket(e);return D.isDefined(t)&&(n.value=t),n},get:function(e){return this._bucketExists(e)?this._createGetBucket(e):null},set:function(e,t){this.add(e,t)},containsKey:function(e){return this._bucketExists(e)},remove:function(e){if(this._bucketExists(e)){var t=this._hash(e);return delete this._buckets[t],this.length--,e}},forEach:function(e){var t,n,i,o,r=this._hashes();for(t=0,n=r.length;n>t;t++)i=r[t],o=this._buckets[i],D.isUndefined(o)||e(o)},clone:function(){var e,t,n,i,o=new g,r=this._hashes();for(e=0,t=r.length;t>e;e++)n=r[e],i=this._buckets[n],D.isUndefined(i)||o.add(i.key,i.value);return o},_hashes:function(){var e,t=[];for(e in this._buckets)this._buckets.hasOwnProperty(e)&&t.push(e);return t},_bucketExists:function(e){var t=this._hash(e);return D.isDefined(this._buckets[t])},_createGetBucket:function(e){var t=this._hash(e),n=this._buckets[t];return D.isUndefined(n)&&(n={key:e},this._buckets[t]=n,this.length++),n},_hash:function(e){if(D.isNumber(e))return e;if(D.isString(e))return this._hashString(e);if(D.isObject(e))return this._objectHashId(e);throw"Unsupported key type."},_hashString:function(e){var t,n,i=0;if(0===e.length)return i;for(t=0;e.length>t;t++)n=e.charCodeAt(t),i=32*i-i+n;return i},_objectHashId:function(e){var t=e._hashId;return D.isUndefined(t)&&(t=r(),e._hashId=t),t}}),m=x.Observable.extend({init:function(t){var n,i=this;if(x.Observable.fn.init.call(i),this._hashTable=new g,this.length=0,D.isDefined(t))if(e.isArray(t))for(n=0;t.length>n;n++)this.add(t[n]);else t.forEach(function(e,t){this.add(e,t)},this)},add:function(e,t){var n=this._hashTable.get(e);n||(n=this._hashTable.add(e),this.length++,this.trigger("changed")),n.value=t},set:function(e,t){this.add(e,t)},get:function(e){var t=this._hashTable.get(e);if(t)return t.value;throw Error("Cannot find key "+e)},containsKey:function(e){return this._hashTable.containsKey(e)},remove:function(e){return this.containsKey(e)?(this.trigger("changed"),this.length--,this._hashTable.remove(e)):t},forEach:function(e,t){this._hashTable.forEach(function(n){e.call(t,n.key,n.value)})},forEachValue:function(e,t){this._hashTable.forEach(function(n){e.call(t,n.value)})},forEachKey:function(e,t){this._hashTable.forEach(function(n){e.call(t,n.key)})},keys:function(){var e=[];return this.forEachKey(function(t){e.push(t)}),e}}),v=x.Class.extend({init:function(){this._tail=null,this._head=null,this.length=0},enqueue:function(e){var t={value:e,next:null};this._head?(this._tail.next=t,this._tail=this._tail.next):(this._head=t,this._tail=this._head),this.length++},dequeue:function(){if(1>this.length)throw Error("The queue is empty.");var e=this._head.value;return this._head=this._head.next,this.length--,e},contains:function(e){for(var t=this._head;t;){if(t.value===e)return!0;t=t.next}return!1}}),_=x.Observable.extend({init:function(e){var t=this;x.Observable.fn.init.call(t),this._hashTable=new g,this.length=0,D.isDefined(e)&&(e instanceof g?e.forEach(function(e){this.add(e)}):e instanceof m&&e.forEach(function(e,t){this.add({key:e,value:t})},this))},contains:function(e){return this._hashTable.containsKey(e)},add:function(e){var t=this._hashTable.get(e);t||(this._hashTable.add(e,e),this.length++,this.trigger("changed"))},get:function(e){return this.contains(e)?this._hashTable.get(e).value:null},hash:function(e){return this._hashTable._hash(e)},remove:function(e){this.contains(e)&&(this._hashTable.remove(e),this.length--,this.trigger("changed"))},forEach:function(e,t){this._hashTable.forEach(function(t){e(t.value)},t)},toArray:function(){var e=[];return this.forEach(function(t){e.push(t)}),e}}),y=x.Class.extend({init:function(e,t){if(this.links=[],this.outgoing=[],this.incoming=[],this.weight=1,this.id=D.isDefined(e)?e:r(),D.isDefined(t)){this.associatedShape=t;var n=t.bounds();this.width=n.width,this.height=n.height,this.x=n.x,this.y=n.y}else this.associatedShape=null;this.data=null,this.type="Node",this.shortForm="Node '"+this.id+"'",this.isVirtual=!1},isIsolated:function(){return D.isEmpty(this.links)},bounds:function(e){return D.isDefined(e)?(this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,t):new k.Rect(this.x,this.y,this.width,this.height)},isLinkedTo:function(e){var t=this;return D.any(t.links,function(n){return n.getComplement(t)===e})},getChildren:function(){var e,t,n,i;if(0===this.outgoing.length)return[];for(e=[],t=0,n=this.outgoing.length;n>t;t++)i=this.outgoing[t],e.push(i.getComplement(this));return e},getParents:function(){var e,t,n,i;if(0===this.incoming.length)return[];for(e=[],t=0,n=this.incoming.length;n>t;t++)i=this.incoming[t],e.push(i.getComplement(this));return e},clone:function(){var e=new y;return D.isDefined(this.weight)&&(e.weight=this.weight),D.isDefined(this.balance)&&(e.balance=this.balance),D.isDefined(this.owner)&&(e.owner=this.owner),e.associatedShape=this.associatedShape,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},adjacentTo:function(e){return null!==this.isLinkedTo(e)},removeLink:function(e){e.source===this&&(D.remove(this.links,e),D.remove(this.outgoing,e),e.source=null),e.target===this&&(D.remove(this.links,e),D.remove(this.incoming,e),e.target=null)},hasLinkTo:function(e){return D.any(this.outgoing,function(t){return t.target===e})},degree:function(){return this.links.length},incidentWith:function(e){return E(this.links,e)},getLinksWith:function(e){return D.all(this.links,function(t){return t.getComplement(this)===e},this)},getNeighbors:function(){var e=[];return D.forEach(this.incoming,function(t){e.push(t.getComplement(this))},this),D.forEach(this.outgoing,function(t){e.push(t.getComplement(this))},this),e}}),w=x.Class.extend({init:function(e,t,n,i){if(D.isUndefined(e))throw"The source of the new link is not set.";if(D.isUndefined(t))throw"The target of the new link is not set.";var o,s;o=D.isString(e)?new y(e):e,s=D.isString(t)?new y(t):t,this.source=o,this.target=s,this.source.links.push(this),this.target.links.push(this),this.source.outgoing.push(this),this.target.incoming.push(this),this.id=D.isDefined(n)?n:r(),this.associatedConnection=D.isDefined(i)?i:null,this.type="Link",this.shortForm="Link '"+this.source.id+"->"+this.target.id+"'"},getComplement:function(e){if(this.source!==e&&this.target!==e)throw"The given node is not incident with this link.";return this.source===e?this.target:this.source},getCommonNode:function(e){return this.source===e.source||this.source===e.target?this.source:this.target===e.source||this.target===e.target?this.target:null},isBridging:function(e,t){return this.source===e&&this.target===t||this.source===t&&this.target===e},getNodes:function(){return[this.source,this.target]},incidentWith:function(e){return this.source===e||this.target===e},adjacentTo:function(e){return E(this.source.links,e)||E(this.target.links,e)},changeSource:function(e){D.remove(this.source.links,this),D.remove(this.source.outgoing,this),e.links.push(this),e.outgoing.push(this),this.source=e},changeTarget:function(e){D.remove(this.target.links,this),D.remove(this.target.incoming,this),e.links.push(this),e.incoming.push(this),this.target=e},changesNodes:function(e,t){this.source===e?this.changeSource(t):this.target===e&&this.changeTarget(t)},reverse:function(){var e=this.source,t=this.target;return this.source=t,D.remove(e.outgoing,this),this.source.outgoing.push(this),this.target=e,D.remove(t.incoming,this),this.target.incoming.push(this),this},directTo:function(e){if(this.source!==e&&this.target!==e)throw"The given node is not incident with this link.";this.target!==e&&this.reverse()},createReverseEdge:function(){var e=this.clone();return e.reverse(),e.reversed=!0,e},clone:function(){var e=new w(this.source,this.target);return e}}),b=x.Class.extend({init:function(e){this.links=[],this.nodes=[],this._nodeMap=new m,this.diagram=null,this._root=null,D.isDefined(e)?D.isString(e)?this.id=e:(this.diagram=e,this.id=e.id):this.id=r(),this.bounds=new a,this._hasCachedRelationships=!1,this.type="Graph"},cacheRelationships:function(e){var t,n,i;if(D.isUndefined(e)&&(e=!1),!this._hasCachedRelationships||e){for(t=0,n=this.nodes.length;n>t;t++)i=this.nodes[t],i.children=this.getChildren(i),i.parents=this.getParents(i);this._hasCachedRelationships=!0}},assignLevels:function(e,t,n){var i,o,r,s;if(!e)throw"Start node not specified.";for(D.isUndefined(t)&&(t=0),this.cacheRelationships(),D.isUndefined(n)&&(n=new m,D.forEach(this.nodes,function(e){n.add(e,!1)})),n.set(e,!0),e.level=t,i=e.children,o=0,r=i.length;r>o;o++)s=i[o],s&&!n.get(s)&&this.assignLevels(s,t+1,n)},root:function(e){if(D.isUndefined(e)){if(this._root)return this._root;var t=D.first(this.nodes,function(e){return 0===e.incoming.length});return t?t:D.first(this.nodes)}this._root=e},getConnectedComponents:function(){var e,t,n,i,o;for(this.componentIndex=0,this.setItemIndices(),e=D.initArray(this.nodes.length,-1),t=0;this.nodes.length>t;t++)-1===e[t]&&(this._collectConnectedNodes(e,t),this.componentIndex++);for(n=[],i=0;this.componentIndex>i;++i)n[i]=new b;for(i=0;e.length>i;++i)o=n[e[i]],o.addNodeAndOutgoings(this.nodes[i]);return n.sort(function(e,t){return t.nodes.length-e.nodes.length}),n},_collectConnectedNodes:function(e,t){e[t]=this.componentIndex;var n=this.nodes[t];D.forEach(n.links,function(t){var i=t.getComplement(n),o=i.index;-1===e[o]&&this._collectConnectedNodes(e,o)},this)},calcBounds:function(){var e,t,n,i;if(this.isEmpty())return this.bounds=new a;for(e=null,t=0,n=this.nodes.length;n>t;t++)i=this.nodes[t],e=e?e.union(i.bounds()):i.bounds();return this.bounds=e},getSpanningTree:function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f=new b,p=new m;for(f.root=e.clone(),f.root.level=0,f.root.id=e.id,p.add(e,f.root),e.level=0,i=[],o=[],f._addNode(f.root),i.push(e),o.push(e),r=1;o.length>0;)for(s=o.pop(),a=0;s.links.length>a;a++)l=s.links[a],c=l.getComplement(s),E(i,c)||(c.level=s.level+1,c.level+1>r&&(r=c.level+1),E(o,c)||o.push(c),E(i,c)||i.push(c),p.containsKey(s)?t=p.get(s):(t=s.clone(),t.level=s.level,t.id=s.id,p.add(s,t)),p.containsKey(c)?n=p.get(c):(n=c.clone(),n.level=c.level,n.id=c.id,p.add(c,n)),u=new w(t,n),f.addLink(u));for(h=[],d=0;r>d;d++)h.push([]);return D.forEach(f.nodes,function(e){h[e.level].push(e)}),f.treeLevels=h,f.cacheRelationships(),f},takeRandomNode:function(t,n){if(D.isUndefined(t)&&(t=[]),D.isUndefined(n)&&(n=4),0===this.nodes.length)return null;if(1===this.nodes.length)return E(t,this.nodes[0])?null:this.nodes[0];var i=e.grep(this.nodes,function(e){return!E(t,e)&&e.degree()<=n});return D.isEmpty(i)?null:i[D.randomInteger(0,i.length)]},isEmpty:function(){return D.isEmpty(this.nodes)},isHealthy:function(){return D.all(this.links,function(e){return E(this.nodes,e.source)&&E(this.nodes,e.target)},this)},getParents:function(e){if(!this.hasNode(e))throw"The given node is not part of this graph.";return e.getParents()},getChildren:function(e){if(!this.hasNode(e))throw"The given node is not part of this graph.";return e.getChildren()},addLink:function(e,n,i){var o,r,s;if(D.isUndefined(e))throw"The source of the link is not defined.";if(D.isUndefined(n)){if(D.isDefined(e.type)&&"Link"===e.type)return this.addExistingLink(e),t;throw"The target of the link is not defined."}return o=this.getNode(e),D.isUndefined(o)&&(o=this.addNode(e)),r=this.getNode(n),D.isUndefined(r)&&(r=this.addNode(n)),s=new w(o,r),D.isDefined(i)&&(s.owner=i),this.links.push(s),s},removeAllLinks:function(){for(;this.links.length>0;){var e=this.links[0];this.removeLink(e)}},addExistingLink:function(e){var t,n;this.hasLink(e)||(this.links.push(e),this.hasNode(e.source.id)?(t=this.getNode(e.source.id),e.changeSource(t)):this.addNode(e.source),this.hasNode(e.target.id)?(n=this.getNode(e.target.id),e.changeTarget(n)):this.addNode(e.target))},hasLink:function(e){if(D.isString(e))return D.any(this.links,function(t){return t.id===e});if("Link"===e.type)return E(this.links,e);throw"The given object is neither an identifier nor a Link."},getNode:function(e){var n=e.id||e;return this._nodeMap.containsKey(n)?this._nodeMap.get(n):t},hasNode:function(e){var t=e.id||e;return this._nodeMap.containsKey(t)},_addNode:function(e){this.nodes.push(e),this._nodeMap.add(e.id,e)},_removeNode:function(e){D.remove(this.nodes,e),this._nodeMap.remove(e.id)},removeNode:function(e){var t,n,i,o,r=e;if(D.isString(e)&&(r=this.getNode(e)),!D.isDefined(r))throw"The identifier should be a Node or the Id (string) of a node.";for(t=r.links,r.links=[],n=0,i=t.length;i>n;n++)o=t[n],this.removeLink(o);this._removeNode(r)},areConnected:function(e,t){return D.any(this.links,function(n){return n.source==e&&n.target==t||n.source==t&&n.target==e})},removeLink:function(e){D.remove(this.links,e),D.remove(e.source.outgoing,e),D.remove(e.source.links,e),D.remove(e.target.incoming,e),D.remove(e.target.links,e)},addNode:function(e,t,n){var i=null;if(!D.isDefined(e))throw"No Node or identifier for a new Node is given.";if(D.isString(e)){if(this.hasNode(e))return this.getNode(e);i=new y(e)}else{if(this.hasNode(e))return this.getNode(e);i=e}return D.isDefined(t)&&i.bounds(t),D.isDefined(n)&&(i.owner=n),this._addNode(i),i},addNodeAndOutgoings:function(e){this.hasNode(e)||this._addNode(e);var t=e.outgoing;e.outgoing=[],D.forEach(t,function(e){this.addExistingLink(e)},this)},setItemIndices:function(){var e;for(e=0;this.nodes.length>e;++e)this.nodes[e].index=e;for(e=0;this.links.length>e;++e)this.links[e].index=e},clone:function(e){var t,n=new b,i=D.isDefined(e)&&e===!0;return i&&(n.nodeMap=new m,n.linkMap=new m),t=new m,D.forEach(this.nodes,function(e){var o=e.clone();t.set(e,o),n._addNode(o),i&&n.nodeMap.set(o,e)}),D.forEach(this.links,function(e){if(t.containsKey(e.source)&&t.containsKey(e.target)){var o=n.addLink(t.get(e.source),t.get(e.target));i&&n.linkMap.set(o,e)}}),n},linearize:function(e){return b.Utils.linearize(this,e)},depthFirstTraversal:function(e,t){var n,i;if(D.isUndefined(e))throw"You need to supply a starting node.";if(D.isUndefined(t))throw"You need to supply an action.";if(!this.hasNode(e))throw"The given start-node is not part of this graph";n=this.getNode(e),i=[],this._dftIterator(n,t,i)},_dftIterator:function(e,t,n){var i,o,r,s;for(t(e),n.push(e),i=e.getChildren(),o=0,r=i.length;r>o;o++)s=i[o],E(n,s)||this._dftIterator(s,t,n)},breadthFirstTraversal:function(e,t){var n,i,o,r,s,a,l,c;if(D.isUndefined(e))throw"You need to supply a starting node.";if(D.isUndefined(t))throw"You need to supply an action.";if(!this.hasNode(e))throw"The given start-node is not part of this graph";for(n=this.getNode(e),i=new v,o=[],i.enqueue(n);i.length>0;)for(r=i.dequeue(),t(r),o.push(r),s=r.getChildren(),a=0,l=s.length;l>a;a++)c=s[a],E(o,c)||E(i,c)||i.enqueue(c)},_stronglyConnectedComponents:function(e,t,n,i,o,r,s){var a,l,c,u,h;for(n.add(t,s),i.add(t,s),s++,r.push(t),a=t.getChildren(),c=0,u=a.length;u>c;c++)l=a[c],n.containsKey(l)?E(r,l)&&i.add(t,Math.min(i.get(t),n.get(l))):(this._stronglyConnectedComponents(e,l,n,i,o,r,s),i.add(t,Math.min(i.get(t),i.get(l))));if(i.get(t)===n.get(t)){h=[];do l=r.pop(),h.push(l);while(l!==t);(!e||h.length>1)&&o.push(h)}},findCycles:function(e){var t,n,i,o,r,s,a;for(D.isUndefined(e)&&(e=!0),t=new m,n=new m,i=[],o=[],r=0,s=this.nodes.length;s>r;r++)a=this.nodes[r],t.containsKey(a)||this._stronglyConnectedComponents(e,a,t,n,i,o,0);return i},isAcyclic:function(){return D.isEmpty(this.findCycles())},isSubGraph:function(e){var t=e.linearize(),n=this.linearize();return D.all(t,function(e){return E(n,e)})},makeAcyclic:function(){var e,t,n,i,o,r,s,a,l,c,u,h,d,f,p,g,v,_,y,w,b,x,k,C,S,T,A,M,E,P,I,R;if(this.isEmpty()||1>=this.nodes.length||1>=this.links.length)return[];if(2==this.nodes.length){if(e=[],this.links.length>1)for(t=this.links[0],n=t.source,i=0,o=this.links.length;o>i;i++)r=this.links[i],r.source!=n&&(s=r.reverse(),e.push(s));return e}for(a=this.clone(!0),l=this.nodes.length,c=new m,u=function(e){return 0===e.outgoing.length?2-l:0===e.incoming.length?l-2:e.outgoing.length-e.incoming.length},h=function(e,t){var n=u(e,l);t.containsKey(n)||t.set(n,[]),t.get(n).push(e)},D.forEach(a.nodes,function(e){h(e,c)}),d=[],f=[];a.nodes.length>0;){if(c.containsKey(2-l))for(_=c.get(2-l);_.length>0;){for(g=_.pop(),y=0;g.links.length>y;y++)w=g.links[y],p=w.getComplement(g),v=u(p,l),D.remove(c.get(v),p),p.removeLink(w),h(p,c);a._removeNode(g),f.unshift(g)}if(c.containsKey(l-2))for(b=c.get(l-2);b.length>0;){for(p=b.pop(),x=0;p.links.length>x;x++)k=p.links[x],g=k.getComplement(p),v=u(g,l),D.remove(c.get(v),g),g.removeLink(k),h(g,c);d.push(p),a._removeNode(p)}if(a.nodes.length>0)for(C=l-3;C>2-l;C--)if(c.containsKey(C)&&c.get(C).length>0){for(S=c.get(C),T=S.pop(),A=0;T.links.length>A;A++)M=T.links[A],E=M.getComplement(T),v=u(E,l),D.remove(c.get(v),E),E.removeLink(M),h(E,c);d.push(T),a._removeNode(T);break}}for(d=d.concat(f),P=new m,I=0;this.nodes.length>I;I++)P.set(a.nodeMap.get(d[I]),I);return R=[],D.forEach(this.links,function(e){P.get(e.source)>P.get(e.target)&&(e.reverse(),R.push(e))}),R}}),b.Predefined={EightGraph:function(){return b.Utils.parse(["1->2","2->3","3->4","4->1","3->5","5->6","6->7","7->3"])},Mindmap:function(){return b.Utils.parse(["0->1","0->2","0->3","0->4","0->5","1->6","1->7","7->8","2->9","9->10","9->11","3->12","12->13","13->14","4->15","4->16","15->17","15->18","18->19","18->20","14->21","14->22","5->23","23->24","23->25","6->26"])},ThreeGraph:function(){return b.Utils.parse(["1->2","2->3","3->1"])},BinaryTree:function(e){return D.isUndefined(e)&&(e=5),b.Utils.createBalancedTree(e,2)},Linear:function(e){return D.isUndefined(e)&&(e=10),b.Utils.createBalancedTree(e,1)},Tree:function(e,t){return b.Utils.createBalancedTree(e,t)},Forest:function(e,t,n){return b.Utils.createBalancedForest(e,t,n)},Workflow:function(){return b.Utils.parse(["0->1","1->2","2->3","1->4","4->3","3->5","5->6","6->3","6->7","5->4"])},Grid:function(e,t){var n,i,o,r,s,a=new k.Graph;if(0>=e&&0>=t)return a;for(n=0;e+1>n;n++)for(i=null,o=0;t+1>o;o++)r=new y(""+n+"."+o),a.addNode(r),i&&a.addLink(i,r),n>0&&(s=a.getNode(""+(n-1)+"."+o),a.addLink(s,r)),i=r;return a}},b.Utils={parse:function(e){var t,n,i,o,r,s=new k.Graph,a=e.slice();for(n=0,i=a.length;i>n;n++){if(o=a[n],D.isString(o)){if(o.indexOf("->")<0)throw"The link should be specified as 'a->b'.";if(r=o.split("->"),2!=r.length)throw"The link should be specified as 'a->b'.";t=new w(r[0],r[1]),s.addLink(t)}if(D.isObject(o)){if(!t)throw"Specification found before Link definition.";x.deepExtend(t,o)}}return s},linearize:function(e,t){var n,i,o,r;if(D.isUndefined(e))throw"Expected an instance of a Graph object in slot one.";for(D.isUndefined(t)&&(t=!1),n=[],i=0,o=e.links.length;o>i;i++)r=e.links[i],n.push(r.source.id+"->"+r.target.id),t&&n.push({id:r.id});return n},_addShape:function(e,t,n,i){return D.isUndefined(t)&&(t=new k.Point(0,0)),D.isUndefined(n)&&(n=r()),i=x.deepExtend({width:20,height:20,id:n,radius:10,fill:"#778899",data:"circle",undoable:!1,x:t.x,y:t.y},i),e.addShape(i)},_addConnection:function(e,t,n,i){return e.connect(t,n,i)},createDiagramFromGraph:function(e,t,n,i){var o,r,s,l,c,u,h,d,f,p,g,m,v,_,y,w;if(D.isUndefined(e))throw"The diagram surface is undefined.";if(D.isUndefined(t))throw"No graph specification defined.";for(D.isUndefined(n)&&(n=!0),D.isUndefined(i)&&(i=!1),o=e.element.clientWidth||200,r=e.element.clientHeight||200,s=[],u=0,h=t.nodes.length;h>u;u++)l=t.nodes[u],d=l.position,D.isUndefined(d)&&(d=D.isDefined(l.x)&&D.isDefined(l.y)?new A(l.x,l.y):new A(D.randomInteger(10,o-20),D.randomInteger(10,r-20))),f={},"0"===l.id||i&&x.deepExtend(f,{width:150*Math.random()+20,height:80*Math.random()+50,data:"rectangle",fill:{color:"#778899"}}),c=this._addShape(e,d,l.id,f),p=c.bounds(),D.isDefined(p)&&(l.x=p.x,l.y=p.y,l.width=p.width,l.height=p.height),s[l.id]=c;for(g=0;t.links.length>g;g++)m=t.links[g],v=s[m.source.id],D.isUndefined(v)||(_=s[m.target.id],D.isUndefined(_)||this._addConnection(e,v,_,{id:m.id}));if(n)for(y=new e.SpringLayout(e),y.layoutGraph(t,{limitToView:!1}),w=0;t.nodes.length>w;w++)l=t.nodes[w],c=s[l.id],c.bounds(new a(l.x,l.y,l.width,l.height))},createBalancedTree:function(e,t){var n,i,o,r,s,a,l,c,u,h;if(D.isUndefined(e)&&(e=3),D.isUndefined(t)&&(t=3),n=new k.Graph,i=-1,o=[],0>=e||0>=t)return n;for(s=new y(""+ ++i),n.addNode(s),n.root=s,o.push(s),a=0;e>a;a++){for(r=[],l=0;o.length>l;l++)for(c=o[l],u=0;t>u;u++)h=new y(""+ ++i),n.addLink(c,h),r.push(h);o=r}return n},createBalancedForest:function(e,t,n){var i,o,r,s,a,l,c,u,h,d,f;if(D.isUndefined(e)&&(e=3),D.isUndefined(t)&&(t=3),D.isUndefined(n)&&(n=5),i=new k.Graph,o=-1,r=[],0>=e||0>=t||0>=n)return i;for(a=0;n>a;a++)for(l=new y(""+ ++o),i.addNode(l),r=[l],c=0;e>c;c++){for(s=[],u=0;r.length>u;u++)for(h=r[u],d=0;t>d;d++)f=new y(""+ ++o),i.addLink(h,f),s.push(f);r=s}return i},createRandomConnectedGraph:function(e,t,n){var i,o,r,s,a,l,c,u,h,d;if(D.isUndefined(e)&&(e=40),D.isUndefined(t)&&(t=4),D.isUndefined(n)&&(n=!1),i=new k.Graph,o=-1,0>=e)return i;if(r=new y(""+ ++o),i.addNode(r),1===e)return i;if(e>1){for(s=1;e>s&&(a=i.takeRandomNode([],t),a);s++)l=i.addNode(""+s),i.addLink(a,l);if(!n&&e>1)for(c=D.randomInteger(1,e),u=0;c>u;u++)h=i.takeRandomNode([],t),d=i.takeRandomNode([],t),h&&d&&!i.areConnected(h,d)&&i.addLink(h,d);return i}},randomDiagram:function(e,t,n,i,o){var r=x.dataviz.diagram.Graph.Utils.createRandomConnectedGraph(t,n,i);b.Utils.createDiagramFromGraph(e,r,!1,o)}},x.deepExtend(k,{init:function(e){x.init(e,k.ui)},Point:A,Intersect:c,Geometry:p,Rect:a,Size:l,RectAlign:u,Matrix:d,MatrixVector:f,normalVariable:o,randomId:r,Dictionary:m,HashTable:g,Queue:v,Set:_,Node:y,Link:w,Graph:b,PathDefiner:s})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){var n,i,o,r=this.options,s=!1;for(o=0;t.length>o;o++)i=t[o],n=e[i],O(n)&&r[i]!==n&&(r[i]=n,s=!0);return s}function i(e){return{x:e.x||0,y:e.y||0,width:e.width||0,height:e.height||0}}function o(e){if(e){var t=e;return N(t)&&(t={color:t}),t.color&&(t.color=r(t.color)),t}}function r(e){var t;return t=e!=G?new U.Color(e).toHex():e}function s(e,t){var n=t.x-e.x,i=t.y-e.y,o=E.util.deg(Math.atan2(i,n));return o}function a(e,t){return new U.Segment(new V.Point(e,t))}function l(e){return e?new V.Rect([e.x,e.y],[e.width,e.height]):t}var c,u,h,d,f,p,g,m,v,_,y,w,b,x,k,C,S,T,D,A,M,E=window.kendo,P=E.dataviz.diagram,I=E.Class,R=E.deepExtend,B=P.Point,F=P.Rect,z=P.Matrix,L=P.Utils,O=L.isNumber,N=L.isString,H=P.MatrixVector,V=E.geometry,U=E.drawing,W=E.util.defined,j=e.inArray,G="transparent",q={none:"none",arrowStart:"ArrowStart",filledCircle:"FilledCircle",arrowEnd:"ArrowEnd"},$=360,Y="start",K="end",X="width",Q="height",Z="x",J="y";P.Markers=q,c=I.extend({init:function(e,t){this.x=e,this.y=t},toMatrix:function(){return z.scaling(this.x,this.y)},toString:function(){return E.format("scale({0},{1})",this.x,this.y)},invert:function(){return new c(1/this.x,1/this.y)}}),u=I.extend({init:function(e,t){this.x=e,this.y=t},toMatrixVector:function(){return new H(0,0,0,0,this.x,this.y)},toMatrix:function(){return z.translation(this.x,this.y)},toString:function(){return E.format("translate({0},{1})",this.x,this.y)},plus:function(e){this.x+=e.x,this.y+=e.y},times:function(e){this.x*=e,this.y*=e},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},normalize:function(){0!==this.Length&&this.times(1/this.length())},invert:function(){return new u(-this.x,-this.y)}}),h=I.extend({init:function(e,t,n){this.x=t||0,this.y=n||0,this.angle=e},toString:function(){return this.x&&this.y?E.format("rotate({0},{1},{2})",this.angle,this.x,this.y):E.format("rotate({0})",this.angle)},toMatrix:function(){return z.rotation(this.angle,this.x,this.y)},center:function(){return new B(this.x,this.y)},invert:function(){return new h($-this.angle,this.x,this.y)}}),h.ZERO=new h(0),h.create=function(e){return new h(e.angle,e.x,e.y)},h.parse=function(e){var t=e.slice(1,e.length-1).split(","),n=t[0],i=t[1],o=t[2],r=new h(n,i,o);return r},d=I.extend({init:function(e,n,i,o,r,s){this.translate=new u(e,n),i!==t&&o!==t&&(this.scale=new c(i,o)),r!==t&&(this.rotate=s?new h(r,s.x,s.y):new h(r))},toString:function(){var e=function(e){return e?""+e:""};return e(this.translate)+e(this.rotate)+e(this.scale)},render:function(e){e._transform=this,e._renderTransform()},toMatrix:function(){var e=z.unit();return this.translate&&(e=e.times(this.translate.toMatrix())),this.rotate&&(e=e.times(this.rotate.toMatrix())),this.scale&&(e=e.times(this.scale.toMatrix())),e},invert:function(){var e,n,i=this.rotate?this.rotate.invert():t,o=i?i.toMatrix():z.unit(),r=this.scale?this.scale.invert():t,s=r?r.toMatrix():z.unit(),a=new B(-this.translate.x,-this.translate.y);return a=o.times(s).apply(a),e=new u(a.x,a.y),n=new d,n.translate=e,n.rotate=i,n.scale=r,n}}),f={_setScale:function(){var e=this.options,t=this._originWidth,n=this._originHeight,i=e.width/t,o=e.height/n;O(i)||(i=1),O(o)||(o=1),this._transform.scale=new c(i,o)},_setTranslate:function(){var e=this.options,t=e.x||0,n=e.y||0;this._transform.translate=new u(t,n)},_initSize:function(){var e=this.options,t=!1;e.autoSize!==!1&&(W(e.width)||W(e.height))&&(this._measure(!0),this._setScale(),t=!0),(W(e.x)||W(e.y))&&(this._setTranslate(),t=!0),t&&this._renderTransform()},_updateSize:function(e){var t=!1;return this.options.autoSize!==!1&&this._diffNumericOptions(e,[X,Q])&&(t=!0,this._measure(!0),this._setScale()),this._diffNumericOptions(e,[Z,J])&&(t=!0,this._setTranslate()),t&&this._renderTransform(),t}},p=I.extend({init:function(e){var t=this;t.options=R({},t.options,e),t.id=t.options.id,t._originSize=F.empty(),t._transform=new d},visible:function(e){return this.drawingContainer().visible(e)},redraw:function(e){e&&e.id&&(this.id=e.id)},position:function(e,n){var i=this.options;return W(e)?(W(n)?(i.x=e,i.y=n):e instanceof B&&(i.x=e.x,i.y=e.y),this._transform.translate=new u(i.x,i.y),this._renderTransform(),t):new B(i.x,i.y)},rotate:function(e,t){return W(e)&&(this._transform.rotate=new h(e,t.x,t.y),this._renderTransform()),this._transform.rotate||h.ZERO},drawingContainer:function(){return this.drawingElement},_renderTransform:function(){var e=this._transform.toMatrix();this.drawingContainer().transform(new V.Matrix(e.a,e.b,e.c,e.d,e.e,e.f))},_hover:function(){},_diffNumericOptions:n,_measure:function(e){var t,n,i;return!this._measured||e?(n=this._boundingBox()||new V.Rect,i=n.topLeft(),t=new F(i.x,i.y,n.width(),n.height()),this._originSize=t,this._originWidth=t.width,this._originHeight=t.height,this._measured=!0):t=this._originSize,t},_boundingBox:function(){return this.drawingElement.rawBBox()}}),g=p.extend({init:function(e){p.fn.init.call(this,e),e=this.options,e.fill=o(e.fill),e.stroke=o(e.stroke)},options:{stroke:{color:"gray",width:1},fill:{color:G}},fill:function(e,t){this._fill({color:r(e),opacity:t})},stroke:function(e,t,n){this._stroke({color:r(e),width:t,opacity:n})},redraw:function(e){var t,n;e&&(t=e.stroke,n=e.fill,t&&this._stroke(o(t)),n&&this._fill(o(n)),p.fn.redraw.call(this,e))},_hover:function(e){var t,n=this.drawingElement,i=this.options,r=i.hover;r&&r.fill&&(t=e?o(r.fill):i.fill,n.fill(t.color,t.opacity))},_stroke:function(e){var t,n=this.options;R(n,{stroke:e}),e=n.stroke,t=null,e.width>0&&(t={color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}),this.drawingElement.options.set("stroke",t)},_fill:function(e){var t,n,i,o=this.options;R(o,{fill:e||{}}),t=o.fill,t.gradient?(n=t.gradient,i="radial"===n.type?U.RadialGradient:U.LinearGradient,this.drawingElement.fill(new i(n))):this.drawingElement.fill(t.color,t.opacity)}}),m=g.extend({init:function(e){this._textColor(e),g.fn.init.call(this,e),this._font(),this._initText(),this._initSize()},options:{fontSize:15,fontFamily:"sans-serif",stroke:{width:0},fill:{color:"black"},autoSize:!0},_initText:function(){var e=this.options;this.drawingElement=new U.Text(W(e.text)?e.text:"",new V.Point,{font:e.font}),this._fill(),this._stroke()},_textColor:function(e){e&&e.color&&R(e,{fill:{color:e.color}})},_font:function(){var e=this.options;e.fontFamily&&W(e.fontSize)?e.font=e.fontSize+"px "+e.fontFamily:delete e.font},content:function(e){return this.drawingElement.content(e)},redraw:function(e){var t,n;e&&(t=!1,n=this.options,this._textColor(e),g.fn.redraw.call(this,e),(e.fontFamily||W(e.fontSize))&&(R(n,{fontFamily:e.fontFamily,fontSize:e.fontSize}),this._font(),this.drawingElement.options.set("font",n.font),t=!0),e.text&&(this.content(e.text),t=!0),!this._updateSize(e)&&t&&this._initSize())}}),R(m.fn,f),v=g.extend({init:function(e){g.fn.init.call(this,e),this._initPath(),this._setPosition()},_setPosition:function(){var e=this.options,t=e.x,n=e.y;(W(t)||W(n))&&this.position(t||0,n||0)},redraw:function(e){e&&(g.fn.redraw.call(this,e),this._diffNumericOptions(e,[X,Q])&&this._drawPath(),this._diffNumericOptions(e,[Z,J])&&this._setPosition());
|
|
},_initPath:function(){var e=this.options;this.drawingElement=new U.Path({stroke:e.stroke,closed:!0}),this._fill(),this._drawPath()},_drawPath:function(){var e=this.drawingElement,t=i(this.options),n=t.width,o=t.height;e.segments.elements([a(0,0),a(n,0),a(n,o),a(0,o)])}}),_=g.extend({init:function(e){g.fn.init.call(this,e);var t=this.options.anchor;this.anchor=new V.Point(t.x,t.y),this.createElement()},options:{stroke:{color:G,width:0},fill:{color:"black"}},_transformToPath:function(e,t){var n=t.transform();return e&&n&&(e=e.transformCopy(n)),e},redraw:function(e){e&&(e.position&&(this.options.position=e.position),g.fn.redraw.call(this,e))}}),y=_.extend({options:{radius:4,anchor:{x:0,y:0}},createElement:function(){var e=this.options;this.drawingElement=new U.Circle(new V.Circle(this.anchor,e.radius),{fill:e.fill,stroke:e.stroke})},positionMarker:function(e){var t,n,i=this.options,o=i.position,r=e.segments;t=o==Y?r[0]:r[r.length-1],t&&(n=this._transformToPath(t.anchor(),e),this.drawingElement.transform(V.transform().translate(n.x,n.y)))}}),w=_.extend({options:{path:"M 0 0 L 10 5 L 0 10 L 3 5 z",anchor:{x:10,y:5}},createElement:function(){var e=this.options;this.drawingElement=U.Path.parse(e.path,{fill:e.fill,stroke:e.stroke})},positionMarker:function(e){var t,n,i=this._linePoints(e),o=i.start,r=i.end,a=V.transform();o&&a.rotate(s(o,r),r),r&&(t=this.anchor,n=r.clone().translate(-t.x,-t.y),a.translate(n.x,n.y)),this.drawingElement.transform(a)},_linePoints:function(e){var n,i,o,r,s,a=this.options,l=e.segments;return a.position==Y?(o=l[0],o&&(i=o.anchor(),n=o.controlOut(),r=l[1],!n&&r&&(n=r.anchor()))):(o=l[l.length-1],o&&(i=o.anchor(),n=o.controlIn(),s=l[l.length-2],!n&&s&&(n=s.anchor()))),i?{start:this._transformToPath(n,e),end:this._transformToPath(i,e)}:t}}),b={_getPath:function(e){var n=this.drawingElement;return n instanceof U.MultiPath&&(n=e==Y?n.paths[0]:n.paths[n.paths.length-1]),n&&n.segments.length?n:t},_normalizeMarkerOptions:function(e){var t=e.startCap,n=e.endCap;N(t)&&(e.startCap={type:t}),N(n)&&(e.endCap={type:n})},_removeMarker:function(e){var t=this._markers[e];t&&(this.drawingContainer().remove(t.drawingElement),delete this._markers[e])},_createMarkers:function(){var e=this.options;this._normalizeMarkerOptions(e),this._markers={},this._markers[Y]=this._createMarker(e.startCap,Y),this._markers[K]=this._createMarker(e.endCap,K)},_createMarker:function(e,n){var i,o,r=(e||{}).type,s=this._getPath(n);return s?(r==q.filledCircle?i=y:r==q.arrowStart||r==q.arrowEnd?i=w:this._removeMarker(n),i?(o=new i(R({},e,{position:n})),o.positionMarker(s),this.drawingContainer().append(o.drawingElement),o):t):(this._removeMarker(n),t)},_positionMarker:function(e){var t,n=this._markers[e];n&&(t=this._getPath(e),t?n.positionMarker(t):this._removeMarker(e))},_capMap:{start:"startCap",end:"endCap"},_redrawMarker:function(e,t,n){var i,o,r,s,a;return this._normalizeMarkerOptions(n),i=this.options,o=this._capMap[t],r=(i[o]||{}).type,s=n[o],a=!1,s?(i[o]=R({},i[o],s),s.type&&r!=s.type?(this._removeMarker(t),this._markers[t]=this._createMarker(i[o],t),a=!0):this._markers[t]&&this._markers[t].redraw(s)):e&&!this._markers[t]&&i[o]&&(this._markers[t]=this._createMarker(i[o],t),a=!0),a},_redrawMarkers:function(e,t){!this._redrawMarker(e,Y,t)&&e&&this._positionMarker(Y),!this._redrawMarker(e,K,t)&&e&&this._positionMarker(K)}},x=g.extend({init:function(e){g.fn.init.call(this,e),this.container=new U.Group,this._createElements(),this._initSize()},options:{autoSize:!0},drawingContainer:function(){return this.container},data:function(e){var n=this.options;return e?(n.data!=e&&(n.data=e,this._setData(e),this._initSize(),this._redrawMarkers(!0,{})),t):n.data},redraw:function(e){var t,n;e&&(g.fn.redraw.call(this,e),t=this.options,n=e.data,W(n)&&t.data!=n?(t.data=n,this._setData(n),this._updateSize(e)||this._initSize(),this._redrawMarkers(!0,e)):(this._updateSize(e),this._redrawMarkers(!1,e)))},_createElements:function(){var e=this.options;this.drawingElement=U.Path.parse(e.data||"",{stroke:e.stroke}),this._fill(),this.container.append(this.drawingElement),this._createMarkers()},_setData:function(e){var t=this.drawingElement,n=U.Path.parse(e||""),i=n.paths.slice(0);n.paths.elements([]),t.paths.elements(i)}}),R(x.fn,f),R(x.fn,b),k=g.extend({init:function(e){g.fn.init.call(this,e),this.container=new U.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},redraw:function(e){var t,n;e&&(e=e||{},t=e.from,n=e.to,t&&(this.options.from=t),n&&(this.options.to=n),t||n?(this._drawPath(),this._redrawMarkers(!0,e)):this._redrawMarkers(!1,e),g.fn.redraw.call(this,e))},_initPath:function(){var e=this.options,t=this.drawingElement=new U.Path({stroke:e.stroke});this._fill(),this._drawPath(),this.container.append(t)},_drawPath:function(){var e=this.options,t=this.drawingElement,n=e.from||new B,i=e.to||new B;t.segments.elements([a(n.x,n.y),a(i.x,i.y)])}}),R(k.fn,b),C=g.extend({init:function(e){g.fn.init.call(this,e),this.container=new U.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},points:function(e){var n=this.options;return e?(n.points=e,this._updatePath(),t):n.points},redraw:function(e){if(e){var t=e.points;g.fn.redraw.call(this,e),t&&this._pointsDiffer(t)?(this.points(t),this._redrawMarkers(!0,e)):this._redrawMarkers(!1,e)}},_initPath:function(){var e=this.options;this.drawingElement=new U.Path({stroke:e.stroke}),this._fill(),this.container.append(this.drawingElement),e.points&&this._updatePath()},_pointsDiffer:function(e){var t,n=this.options.points,i=n.length!==e.length;if(!i)for(t=0;e.length>t;t++)if(n[t].x!==e[t].x||n[t].y!==e[t].y){i=!0;break}return i},_updatePath:function(){var e,t,n=this.drawingElement,i=this.options,o=i.points,r=[];for(t=0;o.length>t;t++)e=o[t],r.push(a(e.x,e.y));n.segments.elements(r)},options:{points:[]}}),R(C.fn,b),S=p.extend({init:function(e){p.fn.init.call(this,e),this._initImage()},redraw:function(e){e&&(e.source&&this.drawingElement.src(e.source),this._diffNumericOptions(e,[X,Q,Z,J])&&this.drawingElement.rect(this._rect()),p.fn.redraw.call(this,e))},_initImage:function(){var e=this.options,t=this._rect();this.drawingElement=new U.Image(e.source,t,{})},_rect:function(){var e=i(this.options),t=new V.Point(e.x,e.y),n=new V.Size(e.width,e.height);return new V.Rect(t,n)}}),T=p.extend({init:function(e){this.children=[],p.fn.init.call(this,e),this.drawingElement=new U.Group,this._initSize()},options:{autoSize:!1},append:function(e){this.drawingElement.append(e.drawingContainer()),this.children.push(e),this._childrenChange=!0},remove:function(e){this._remove(e)&&(this._childrenChange=!0)},_remove:function(e){var n=j(e,this.children);return n>=0?(this.drawingElement.removeAt(n),this.children.splice(n,1),!0):t},clear:function(){this.drawingElement.clear(),this.children=[],this._childrenChange=!0},toFront:function(e){var t,n;for(n=0;e.length>n;n++)t=e[n],this._remove(t)&&this.append(t)},toBack:function(e){this._reorderChildren(e,0)},toIndex:function(e,t){this._reorderChildren(e,t)},_reorderChildren:function(e,t){var n,i,o,r,s,a=this.drawingElement,l=a.children.slice(0),c=this.children,u=O(t);for(n=0;e.length>n;n++)s=e[n],r=s.drawingContainer(),i=j(s,c),i>=0&&(l.splice(i,1),c.splice(i,1),o=u?t:t[n],l.splice(o,0,r),c.splice(o,0,s));a.clear(),a.append.apply(a,l)},redraw:function(e){e&&(this._childrenChange?(this._childrenChange=!1,this._updateSize(e)||this._initSize()):this._updateSize(e),p.fn.redraw.call(this,e))},_boundingBox:function(){var e,t,n,i,o=this.children;for(i=0;o.length>i;i++)t=o[i],t.visible()&&t._includeInBBox!==!1&&(n=t.drawingContainer().clippedBBox(null),n&&(e=e?F.union(e,n):n));return e}}),R(T.fn,f),D=T.extend({init:function(e,t){this.children=[],p.fn.init.call(this,t),this.drawingElement=new U.Layout(l(e),t),this._initSize()},rect:function(e){if(e)this.drawingElement.rect(l(e));else{var t=this.drawingElement.rect();if(t)return new F(t.origin.x,t.origin.y,t.size.width,t.size.height)}},reflow:function(){this.drawingElement.reflow()},redraw:function(e){E.deepExtend(this.drawingElement.options,e),T.fn.redraw.call(this,e)}}),A=g.extend({init:function(e){g.fn.init.call(this,e),this._initCircle(),this._initSize()},redraw:function(e){if(e){var t=this.options;e.center&&(R(t,{center:e.center}),this._center.move(t.center.x,t.center.y)),this._diffNumericOptions(e,["radius"])&&this._circle.setRadius(t.radius),this._updateSize(e),g.fn.redraw.call(this,e)}},_initCircle:function(){var e,t=this.options,n=t.width,i=t.height,o=t.radius;W(o)||(W(n)||(n=i),W(i)||(i=n),t.radius=o=Math.min(n,i)/2),e=t.center||{x:o,y:o},this._center=new V.Point(e.x,e.y),this._circle=new V.Circle(this._center,o),this.drawingElement=new U.Circle(this._circle,{stroke:t.stroke}),this._fill()}}),R(A.fn,f),M=I.extend({init:function(e,t){t=t||{},this.element=e,this.surface=U.Surface.create(e,t),E.isFunction(this.surface.translate)&&(this.translate=this._translate),this.drawingElement=new U.Group,this._viewBox=new F(0,0,t.width,t.height),this.size(this._viewBox)},bounds:function(){var e=this.drawingElement.clippedBBox();return new F(0,0,e.width(),e.height())},size:function(e){var t=this._viewBox;return W(e)&&(t.width=e.width,t.height=e.height,this.surface.setSize(e)),{width:t.width,height:t.height}},_translate:function(e,t){var n=this._viewBox;return W(e)&&W(t)&&(n.x=e,n.y=t,this.surface.translate({x:e,y:t})),{x:n.x,y:n.y}},draw:function(){this.surface.draw(this.drawingElement)},append:function(e){return this.drawingElement.append(e.drawingContainer()),this},remove:function(e){this.drawingElement.remove(e.drawingContainer())},insertBefore:function(){},clear:function(){this.drawingElement.clear()},destroy:function(t){this.surface.destroy(),t&&e(this.element).remove()}}),E.deepExtend(P,{init:function(e){E.init(e,P.ui)},diffNumericOptions:n,Element:p,Scale:c,Translation:u,Rotation:h,Circle:A,Group:T,Rectangle:v,Canvas:M,Path:x,Layout:D,Line:k,MarkerBase:_,ArrowMarker:w,CircleMarker:y,Polyline:C,CompositeTransform:d,TextBlock:m,Image:S,VisualBase:g})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){e.isSelected?t.ctrlKey&&e.select(!1):e.diagram.select(e,{addToSelection:t.ctrlKey})}function i(e){return e.ctrlKey===!1&&e.altKey===!1&&e.shiftKey===!1}function o(e,t){var n=e!==!1;return e.key&&"none"!=e.key&&(n=t[e.key+"Key"]),n}function r(e,t){return t.charCodeAt(0)==e||t.toUpperCase().charCodeAt(0)==e}function s(e,t){var n;return-1==e.x&&-1==e.y?n=t.bottomRight():1==e.x&&1==e.y?n=t.topLeft():-1==e.x&&1==e.y?n=t.topRight():1==e.x&&-1==e.y?n=t.bottomLeft():0===e.x&&-1==e.y?n=t.bottom():0===e.x&&1==e.y?n=t.top():1==e.x&&0===e.y?n=t.left():-1==e.x&&0===e.y&&(n=t.right()),n}function a(e){var t=e.options.editable;return t&&t.drag!==!1}function l(e,t){var n,i,o,r;for(r=0;e.connectors.length>r;r++)if(n=e.connectors[r],i=n.position(),o=new q(i.x,i.y),o.inflate(se,se),o.contains(t))return n}var c,u,h,d,f,p,g,m,v,_,y,w,b,x,k,C,S,T,D,A,M,E,P,I,R,B,F,z,L,O,N,H,V=window.kendo,U=V.dataviz,W=U.diagram,j=V.Class,G=W.Group,q=W.Rect,$=W.Rectangle,Y=W.Utils,K=Y.isUndefined,X=W.Point,Q=W.Circle,Z=W.Ticker,J=V.deepExtend,ee=V.ui.Movable,te=V.support.browser,ne=V.util.defined,ie=e.inArray,oe=e.proxy,re={arrow:"default",grip:"pointer",cross:"pointer",add:"pointer",move:"move",select:"pointer",south:"s-resize",east:"e-resize",west:"w-resize",north:"n-resize",rowresize:"row-resize",colresize:"col-resize"},se=10,ae="Auto",le="Top",ce="Right",ue="Left",he="Bottom",de=10,fe=10,pe="dragStart",ge="drag",me="dragEnd",ve="itemRotate",_e="itemBoundsChange",ye=5,we=5,be="mouseEnter",xe="mouseLeave",ke="zoomStart",Ce="zoomEnd",Se=-2e4,Te=2e4,De=.9,Ae=.93,Me=5,Ee="transparent",Pe="pan",Ie="rotated";W.Cursors=re,c=V.Class.extend({init:function(e){this.layoutState=e,this.diagram=e.diagram},initState:function(){function e(e,t){var n=this.diagram.getShapeById(e);n&&(this.subjects.push(n),this.froms.push(n.bounds().topLeft()),this.tos.push(t.topLeft()))}this.froms=[],this.tos=[],this.subjects=[],this.layoutState.nodeMap.forEach(e,this)},update:function(e){if(!(0>=this.subjects.length))for(var t=0;this.subjects.length>t;t++)this.subjects[t].position(new X(this.froms[t].x+(this.tos[t].x-this.froms[t].x)*e,this.froms[t].y+(this.tos[t].y-this.froms[t].y)*e))}}),u=j.extend({init:function(e,t,n){this.animate=K(n)?!1:n,this._initialState=e,this._finalState=t,this.title="Diagram layout"},undo:function(){this.setState(this._initialState)},redo:function(){this.setState(this._finalState)},setState:function(e){var t,n=e.diagram;this.animate?(e.linkMap.forEach(function(e,t){var i=n.getShapeById(e);i.visible(!1),i&&i.points(t)}),t=new Z,t.addAdapter(new c(e)),t.onComplete(function(){e.linkMap.forEach(function(e){var t=n.getShapeById(e);t.visible(!0)})}),t.play()):(e.nodeMap.forEach(function(e,t){var i=n.getShapeById(e);i&&i.position(t.topLeft())}),e.linkMap.forEach(function(e,t){var i=n.getShapeById(e);i&&i.points(t)}))}}),h=j.extend({init:function(e){this.units=[],this.title="Composite unit",e!==t&&this.units.push(e)},add:function(e){this.units.push(e)},undo:function(){for(var e=0;this.units.length>e;e++)this.units[e].undo()},redo:function(){for(var e=0;this.units.length>e;e++)this.units[e].redo()}}),d=j.extend({init:function(e,t,n){this.item=e,this._redoSource=t,this._redoTarget=n,ne(t)&&(this._undoSource=e.source()),ne(n)&&(this._undoTarget=e.target()),this.title="Connection Editing"},undo:function(){this._undoSource!==t&&this.item._updateConnector(this._undoSource,"source"),this._undoTarget!==t&&this.item._updateConnector(this._undoTarget,"target"),this.item.updateModel()},redo:function(){this._redoSource!==t&&this.item._updateConnector(this._redoSource,"source"),this._redoTarget!==t&&this.item._updateConnector(this._redoTarget,"target"),this.item.updateModel()}}),f=j.extend({init:function(e,t,n){this.item=e,this._undoSource=t,this._undoTarget=n,this._redoSource=e.source(),this._redoTarget=e.target(),this.title="Connection Editing"},undo:function(){this.item._updateConnector(this._undoSource,"source"),this.item._updateConnector(this._undoTarget,"target"),this.item.updateModel()},redo:function(){this.item._updateConnector(this._redoSource,"source"),this.item._updateConnector(this._redoTarget,"target"),this.item.updateModel()}}),p=j.extend({init:function(e){this.connection=e,this.diagram=e.diagram,this.targetConnector=e.targetConnector,this.title="Delete connection"},undo:function(){this.diagram._addConnection(this.connection,!1)},redo:function(){this.diagram.remove(this.connection,!1)}}),g=j.extend({init:function(e){this.shape=e,this.diagram=e.diagram,this.title="Deletion"},undo:function(){this.diagram._addShape(this.shape,!1),this.shape.select(!1)},redo:function(){this.shape.select(!1),this.diagram.remove(this.shape,!1)}}),m=j.extend({init:function(e,t,n){var i,o;for(this.shapes=e,this.undoStates=t,this.title="Transformation",this.redoStates=[],this.adorner=n,i=0;this.shapes.length>i;i++)o=this.shapes[i],this.redoStates.push(o.bounds())},undo:function(){var e,t;for(e=0;this.shapes.length>e;e++)t=this.shapes[e],t.bounds(this.undoStates[e]),t.hasOwnProperty("layout")&&t.layout(t,this.redoStates[e],this.undoStates[e]),t.updateModel();this.adorner&&(this.adorner.refreshBounds(),this.adorner.refresh())},redo:function(){var e,t;for(e=0;this.shapes.length>e;e++)t=this.shapes[e],t.bounds(this.redoStates[e]),t.hasOwnProperty("layout")&&t.layout(t,this.undoStates[e],this.redoStates[e]),t.updateModel();this.adorner&&(this.adorner.refreshBounds(),this.adorner.refresh())}}),v=j.extend({init:function(e,t){this.connection=e,this.diagram=t,this.title="New connection"},undo:function(){this.diagram.remove(this.connection,!1)},redo:function(){this.diagram._addConnection(this.connection,!1)}}),_=j.extend({init:function(e,t){this.shape=e,this.diagram=t,this.title="New shape"},undo:function(){this.diagram.deselect(),this.diagram.remove(this.shape,!1)},redo:function(){this.diagram._addShape(this.shape,!1)}}),y=j.extend({init:function(e,t,n){this.initial=e,this.finalPos=t,this.diagram=n,this.title="Pan Unit"},undo:function(){this.diagram.pan(this.initial)},redo:function(){this.diagram.pan(this.finalPos)}}),w=j.extend({init:function(e,t,n){var i,o;for(this.shapes=t,this.undoRotates=n,this.title="Rotation",this.redoRotates=[],this.redoAngle=e._angle,this.adorner=e,this.center=e._innerBounds.center(),i=0;this.shapes.length>i;i++)o=this.shapes[i],this.redoRotates.push(o.rotate().angle)},undo:function(){var e,t;for(e=0;this.shapes.length>e;e++)t=this.shapes[e],t.rotate(this.undoRotates[e],this.center,!1),t.hasOwnProperty("layout")&&t.layout(t),t.updateModel();this.adorner&&(this.adorner._initialize(),this.adorner.refresh())},redo:function(){var e,t;for(e=0;this.shapes.length>e;e++)t=this.shapes[e],t.rotate(this.redoRotates[e],this.center,!1),t.hasOwnProperty("layout")&&t.layout(t),t.updateModel();this.adorner&&(this.adorner._initialize(),this.adorner.refresh())}}),b=j.extend({init:function(e,t,n){this.diagram=e,this.indices=n,this.items=t,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toFront(this.items,!1)}}),x=j.extend({init:function(e,t,n){this.diagram=e,this.indices=n,this.items=t,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toBack(this.items,!1)}}),k=V.Observable.extend({init:function(e){V.Observable.fn.init.call(this,e),this.bind(this.events,e),this.stack=[],this.index=0,this.capacity=100},events:["undone","redone"],begin:function(){this.composite=new h},cancel:function(){this.composite=t},commit:function(e){this.composite.units.length>0&&this._restart(this.composite,e),this.composite=t},addCompositeItem:function(e){this.composite?this.composite.add(e):this.add(e)},add:function(e,t){this._restart(e,t)},pop:function(){this.index>0&&(this.stack.pop(),this.index--)},count:function(){return this.stack.length},undo:function(){this.index>0&&(this.index--,this.stack[this.index].undo(),this.trigger("undone"))},redo:function(){this.stack.length>0&&this.stack.length>this.index&&(this.stack[this.index].redo(),this.index++,this.trigger("redone"))},_restart:function(e,t){this.stack.splice(this.index,this.stack.length-this.index),this.stack.push(e),t!==!1?this.redo():this.index++,this.stack.length>this.capacity&&(this.stack.splice(0,this.stack.length-this.capacity),this.index=this.capacity)},clear:function(){this.stack=[],this.index=0}}),C=j.extend({init:function(e){this.toolService=e},start:function(){},move:function(){},end:function(){},tryActivate:function(){return!1},getCursor:function(){return re.arrow}}),S=C.extend({init:function(t){var n,i,o,r,s=this,a=V.support.mobileOS?Ae:De;C.fn.init.call(s,t),n=s.toolService.diagram,i=n.canvas,o=n.scroller=s.scroller=e(n.scrollable).kendoMobileScroller({friction:a,velocityMultiplier:Me,mousewheelScrolling:!1,zoom:!1,scroll:oe(s._move,s)}).data("kendoMobileScroller"),i.translate&&(s.movableCanvas=new ee(i.element)),r=function(e,t,n){e.makeVirtual(),e.virtualSize(t||Se,n||Te)},r(o.dimensions.x),r(o.dimensions.y),o.disable()},tryActivate:function(e,t){var n=this.toolService,o=n.diagram.options.pannable,r=t.ctrlKey;return ne(o.key)&&(r=o.key&&"none"!=o.key?t[o.key+"Key"]&&!(t.ctrlKey&&ne(n.hoveredItem)):i(t)),o!==!1&&r&&!ne(n.hoveredAdorner)&&!ne(n._hoveredConnector)},start:function(){this.scroller.enable()},move:function(){},_move:function(e){var t=this,n=t.toolService.diagram,i=n.canvas,o=new X(e.scrollLeft,e.scrollTop);i.translate?(n._storePan(o.times(-1)),t.movableCanvas.moveTo(o),i.translate(o.x,o.y)):o=o.plus(n._pan.times(-1)),n.trigger(Pe,{pan:o})},end:function(){this.scroller.disable()},getCursor:function(){return re.move}}),T=j.extend({init:function(e){this.toolService=e},tryActivate:function(){return!0},start:function(e,t){var i=this.toolService,r=i.diagram,s=i.hoveredItem,a=r.options.selectable;s&&(o(a,t)&&n(s,t),s.adorner&&(this.adorner=s.adorner,this.handle=this.adorner._hitTest(e))),this.handle||(this.handle=r._resizingAdorner._hitTest(e),this.handle&&(this.adorner=r._resizingAdorner)),this.adorner&&(this.adorner.isDragHandle(this.handle)&&r.trigger(pe,{shapes:this.adorner.shapes,connections:[]})?(i.startPoint=e,i.end(e)):this.adorner.start(e))},move:function(e){this.adorner&&(this.adorner.move(this.handle,e),this.adorner.isDragHandle(this.handle)&&this.toolService.diagram.trigger(ge,{shapes:this.adorner.shapes,connections:[]}))},end:function(e,n){var i,o=this.toolService.diagram,r=this.toolService,s=this.adorner;s&&(s.isDragHandle(this.handle)&&o.trigger(me,{shapes:s.shapes,connections:[]})?s.cancel():(i=s.stop(),i&&o.undoRedoService.add(i,!1))),r.hoveredItem&&this.toolService.triggerClick({item:r.hoveredItem,point:e,meta:n}),this.adorner=t,this.handle=t},getCursor:function(e){return this.toolService.hoveredItem?this.toolService.hoveredItem._getCursor(e):re.arrow}}),D=j.extend({init:function(e){this.toolService=e},tryActivate:function(e,t){var n=this.toolService,i=o(n.diagram.options.selectable,t);return i&&!ne(n.hoveredItem)&&!ne(n.hoveredAdorner)},start:function(e){var t=this.toolService.diagram;t.deselect(),t.selector.start(e)},move:function(e){var t=this.toolService.diagram;t.selector.move(e)},end:function(e,t){var n=this.toolService.diagram,i=this.toolService.hoveredItem,o=n.selector.bounds();i&&i.isSelected||t.ctrlKey||n.deselect(),o.isEmpty()||n.selectArea(o),n.selector.end()},getCursor:function(){return re.arrow}}),A=j.extend({init:function(e){this.toolService=e,this.type="ConnectionTool"},tryActivate:function(){return this.toolService._hoveredConnector},start:function(e,t){var i=this.toolService.diagram,o=this.toolService._hoveredConnector,r=i._createConnection({},o._c,e);a(r)&&!i.trigger(pe,{shapes:[],connections:[r]})&&i._addConnection(r)?(this.toolService._connectionManipulation(r,o._c.shape,!0),this.toolService._removeHover(),n(this.toolService.activeConnection,t)):(r.source(null),this.toolService.end(e))},move:function(e){var t=this.toolService,n=t.activeConnection;return n.target(e),t.diagram.trigger(ge,{shapes:[],connections:[n]}),!0},end:function(e){var t,n=this.toolService,i=n.diagram,o=n.activeConnection,r=n.hoveredItem,s=n._hoveredConnector;o&&(t=s&&s._c!=o.sourceConnector?s._c:r&&r instanceof W.Shape?r.getConnector(ae)||r.getConnector(e):e,o.target(t),i.trigger(me,{shapes:[],connections:[o]})?(i.remove(o,!1),i.undoRedoService.pop()):(o.updateModel(),i._syncConnectionChanges()),n._connectionManipulation())},getCursor:function(){return re.arrow}}),M=j.extend({init:function(e){this.toolService=e,this.type="ConnectionTool"},tryActivate:function(e,t){var n=this.toolService,i=n.diagram,r=i.options.selectable,s=n.hoveredItem,a=o(r,t)&&s&&s.path&&!(s.isSelected&&t.ctrlKey);return a&&(this._c=s),a},start:function(e,t){var i,o=this._c;n(o,t),i=o.adorner,a(o)&&i&&!this.toolService.diagram.trigger(pe,{shapes:[],connections:[o]})?(this.handle=i._hitTest(e),i.start(e)):(this.toolService.startPoint=e,this.toolService.end(e))},move:function(e){var n=this._c.adorner;return a(this._c)&&n?(n.move(this.handle,e),this.toolService.diagram.trigger(ge,{shapes:[],connections:[this._c]}),!0):t},end:function(e,t){var n,i=this._c,o=i.adorner,r=this.toolService,s=r.diagram;o&&(r.triggerClick({item:i,point:e,meta:t}),a(i)&&(n=o.stop(e),s.trigger(me,{shapes:[],connections:[i]})?n.undo():(s.undoRedoService.add(n,!1),i.updateModel(),s._syncConnectionChanges())))},getCursor:function(){return re.move}}),E=j.extend({init:function(e){this.diagram=e,this.tools=[new S(this),new M(this),new A(this),new D(this),new T(this)],this.activeTool=t},start:function(e,t){return t=J({},t),this.activeTool&&this.activeTool.end(e,t),this._updateHoveredItem(e),this._activateTool(e,t),this.activeTool.start(e,t),this._updateCursor(e),this.diagram.focus(),this.startPoint=e,!0},move:function(e,t){t=J({},t);var n=!0;return this.activeTool&&(n=this.activeTool.move(e,t)),n&&this._updateHoveredItem(e),this._updateCursor(e),!0},end:function(e,n){return n=J({},n),this.activeTool&&this.activeTool.end(e,n),this.activeTool=t,this._updateCursor(e),!0},keyDown:function(e,t){var n,i=this.diagram;if(t=J({ctrlKey:!1,metaKey:!1,altKey:!1},t),!t.ctrlKey&&!t.metaKey||t.altKey){if(46===e||8===e)return n=this.diagram._triggerRemove(i.select()),n.length&&(this.diagram.remove(n,!0),this.diagram._syncChanges(),this.diagram._destroyToolBar()),!0;if(27===e)return this._discardNewConnection(),i.deselect(),i._destroyToolBar(),!0}else{if(r(e,"a"))return i.selectAll(),i._destroyToolBar(),!0;if(r(e,"z"))return i.undo(),i._destroyToolBar(),!0;if(r(e,"y"))return i.redo(),i._destroyToolBar(),!0;r(e,"c")?(i.copy(),i._destroyToolBar()):r(e,"x")?(i.cut(),i._destroyToolBar()):r(e,"v")?(i.paste(),i._destroyToolBar()):r(e,"l")?(i.layout(),i._destroyToolBar()):r(e,"d")&&(i._destroyToolBar(),i.copy(),i.paste())}},wheel:function(e,t){var n=this.diagram,i=t.delta,o=n.zoom(),r=n.options,s=r.zoomRate,a={point:e,meta:t,zoom:o};if(!n.trigger(ke,a))return 0>i?o+=s:o-=s,o=V.dataviz.round(Math.max(r.zoomMin,Math.min(r.zoomMax,o)),2),a.zoom=o,n.zoom(o,a),n.trigger(Ce,a),!0},setTool:function(e,t){e.toolService=this,this.tools[t]=e},triggerClick:function(e){this.startPoint.equals(e.point)&&this.diagram.trigger("click",e)},_discardNewConnection:function(){this.newConnection&&(this.diagram.remove(this.newConnection),this.newConnection=t)},_activateTool:function(e,t){var n,i;for(n=0;this.tools.length>n;n++)if(i=this.tools[n],i.tryActivate(e,t)){this.activeTool=i;break}},_updateCursor:function(e){var t=this.diagram.element,n=this.activeTool?this.activeTool.getCursor(e):this.hoveredAdorner?this.hoveredAdorner._getCursor(e):this.hoveredItem?this.hoveredItem._getCursor(e):re.arrow;t.css({cursor:n}),te.msie&&7==te.version&&(t[0].style.cssText=t[0].style.cssText)},_connectionManipulation:function(e,n,i){this.activeConnection=e,this.disabledShape=n,this.newConnection=i?this.activeConnection:t},_updateHoveredItem:function(e){var n=this._hitTest(e),i=this.diagram;n==this.hoveredItem||this.disabledShape&&n==this.disabledShape||(this.hoveredItem&&(i.trigger(xe,{item:this.hoveredItem}),this.hoveredItem._hover(!1)),n&&n.options.enable?(i.trigger(be,{item:n}),this.hoveredItem=n,this.hoveredItem._hover(!0)):this.hoveredItem=t)},_removeHover:function(){this.hoveredItem&&(this.hoveredItem._hover(!1),this.hoveredItem=t)},_hitTest:function(e){var n,i,o,r,s=this.diagram;if(this._hoveredConnector&&(this._hoveredConnector._hover(!1),this._hoveredConnector=t),s._connectorsAdorner._visible&&(n=s._connectorsAdorner._hitTest(e)))return n;if(n=this.diagram._resizingAdorner._hitTest(e)){if(this.hoveredAdorner=s._resizingAdorner,0!==n.x||0!==n.y)return;n=t}else this.hoveredAdorner=t;if(!this.activeTool||"ConnectionTool"!==this.activeTool.type){for(r=[],o=0;s._selectedItems.length>o;o++)i=s._selectedItems[o],i instanceof W.Connection&&r.push(i);n=this._hitTestItems(r,e)}return n||this._hitTestElements(e)},_hitTestElements:function(e){var t,n,i,o,r=this.diagram,s=this._hitTestItems(r.shapes,e),a=this._hitTestItems(r.connections,e);return this.activeTool&&"ConnectionTool"==this.activeTool.type||!s||!a||l(s,e)||(n=r.mainLayer,i=ie(s.visual,n.children),o=ie(a.visual,n.children),t=i>o?s:a),t||s||a},_hitTestItems:function(e,t){var n,i,o;for(n=e.length-1;n>=0;n--)if(i=e[n],o=i._hitTest(t))return o}}),P=V.Class.extend({init:function(){}}),I=P.extend({init:function(e){var t=this;P.fn.init.call(t),this.connection=e},hitTest:function(e){var t=this.getBounds().inflate(se);return t.contains(e)?W.Geometry.distanceToPolyline(e,this.connection.allPoints())<se:!1},getBounds:function(){var e,t=this.connection.allPoints(),n=t[0],i=t[t.length-1],o=Math.max(n.x,i.x),r=Math.min(n.x,i.x),s=Math.min(n.y,i.y),a=Math.max(n.y,i.y);for(e=1;t.length-1>e;++e)o=Math.max(o,t[e].x),r=Math.min(r,t[e].x),s=Math.min(s,t[e].y),a=Math.max(a,t[e].y);return new q(r,s,o-r,a-s)}}),R=I.extend({init:function(e){var t=this;I.fn.init.call(t),this.connection=e},route:function(){}}),B=I.extend({SAME_SIDE_DISTANCE_RATIO:5,init:function(e){var t=this;I.fn.init.call(t),this.connection=e},routePoints:function(e,t,n,i){var o;return o=n&&i?this._connectorPoints(e,t,n,i):this._floatingPoints(e,t,n)},route:function(){var e=this.connection._resolvedSourceConnector,t=this.connection._resolvedTargetConnector,n=this.connection.sourcePoint(),i=this.connection.targetPoint(),o=this.routePoints(n,i,e,t);this.connection.points(o)},_connectorSides:[{name:"Top",axis:"y",boundsPoint:"topLeft",secondarySign:1},{name:"Left",axis:"x",boundsPoint:"topLeft",secondarySign:1},{name:"Bottom",axis:"y",boundsPoint:"bottomRight",secondarySign:-1},{name:"Right",axis:"x",boundsPoint:"bottomRight",secondarySign:-1}],_connectorSide:function(e,t){var n,i,o,r,s,a=e.position(),l=e.shape.bounds(Ie),c={topLeft:l.topLeft(),bottomRight:l.bottomRight()},u=this._connectorSides,h=V.util.MAX_NUM;for(s=0;u.length>s;s++)r=u[s],o=r.axis,n=Math.round(Math.abs(a[o]-c[r.boundsPoint][o])),h>n?(h=n,i=r):n===h&&(a[o]-t[o])*r.secondarySign>(a[i.axis]-t[i.axis])*i.secondarySign&&(i=r);return i.name},_sameSideDistance:function(e){var t=e.shape.bounds(Ie);return Math.min(t.width,t.height)/this.SAME_SIDE_DISTANCE_RATIO},_connectorPoints:function(e,t,n,i){var o,r,s=this._connectorSide(n,t),a=this._connectorSide(i,e),l=t.x-e.x,c=t.y-e.y,u=this._sameSideDistance(n),h=[];return s===le||s==he?a==le||a==he?s==a?(r=s==le?Math.min(e.y,t.y)-u:Math.max(e.y,t.y)+u,h=[new X(e.x,r),new X(t.x,r)]):h=[new X(e.x,e.y+c/2),new X(t.x,e.y+c/2)]:h=[new X(e.x,t.y)]:a==ue||a==ce?s==a?(o=s==ue?Math.min(e.x,t.x)-u:Math.max(e.x,t.x)+u,h=[new X(o,e.y),new X(o,t.y)]):h=[new X(e.x+l/2,e.y),new X(e.x+l/2,e.y+c)]:h=[new X(t.x,e.y)],h},_floatingPoints:function(e,t,n){var i,o,r,s=n?this._connectorSide(n,t):null,a=this._startHorizontal(e,t,s),l=[e,e,t,t],c=t.x-e.x,u=t.y-e.y,h=l.length;for(r=1;h-1>r;++r)a?r%2!==0?(i=c/(h/2),o=0):(i=0,o=u/((h-1)/2)):r%2!==0?(i=0,o=u/(h/2)):(i=c/((h-1)/2),o=0),l[r]=new X(l[r-1].x+i,l[r-1].y+o);return r--,l[h-2]=a&&r%2!==0||!a&&r%2===0?new X(l[h-1].x,l[h-2].y):new X(l[h-2].x,l[h-1].y),[l[1],l[2]]},_startHorizontal:function(e,t,n){var i;return i=null===n||n!==ce&&n!==ue?Math.abs(e.x-t.x)>Math.abs(e.y-t.y):!0}}),F=j.extend({init:function(e,t){var n=this;n.diagram=e,n.options=J({},n.options,t),n.visual=new G,n.diagram._adorners.push(n)},refresh:function(){}}),z=F.extend({init:function(e,t){var n,i,o,r=this;r.connection=e,n=r.connection.diagram,r._ts=n.toolService,F.fn.init.call(r,n,t),i=r.connection.sourcePoint(),o=r.connection.targetPoint(),r.spVisual=new Q(J(r.options.handles,{center:i})),r.epVisual=new Q(J(r.options.handles,{center:o})),r.visual.append(r.spVisual),r.visual.append(r.epVisual)},options:{handles:{}},_getCursor:function(){return re.move},start:function(e){switch(this.handle=this._hitTest(e),this.startPoint=e,this._initialSource=this.connection.source(),this._initialTarget=this.connection.target(),this.handle){case-1:this.connection.targetConnector&&this._ts._connectionManipulation(this.connection,this.connection.targetConnector.shape);break;case 1:this.connection.sourceConnector&&this._ts._connectionManipulation(this.connection,this.connection.sourceConnector.shape)}},move:function(e,t){switch(e){case-1:this.connection.source(t);break;case 1:this.connection.target(t);break;default:var n=t.minus(this.startPoint);this.startPoint=t,this.connection.sourceConnector||this.connection.source(this.connection.sourcePoint().plus(n)),this.connection.targetConnector||this.connection.target(this.connection.targetPoint().plus(n))}return this.refresh(),!0},stop:function(e){var n,i=this.diagram.toolService,o=i.hoveredItem;return n=i._hoveredConnector?i._hoveredConnector._c:o&&o instanceof W.Shape?o.getConnector(ae)||o.getConnector(e):e,-1===this.handle?this.connection.source(n):1===this.handle&&this.connection.target(n),this.handle=t,this._ts._connectionManipulation(),new f(this.connection,this._initialSource,this._initialTarget)},_hitTest:function(e){var t=this.connection.sourcePoint(),n=this.connection.targetPoint(),i=this.options.handles.width/2,o=this.options.handles.height/2,r=new q(t.x,t.y).inflate(i,o),s=new q(n.x,n.y).inflate(i,o);
|
|
return r.contains(e)?-1:s.contains(e)?1:0},refresh:function(){this.spVisual.redraw({center:this.diagram.modelToLayer(this.connection.sourcePoint())}),this.epVisual.redraw({center:this.diagram.modelToLayer(this.connection.targetPoint())})}}),L=F.extend({init:function(e,t){var n=this;F.fn.init.call(n,e,t),n._refreshHandler=function(e){e.item==n.shape&&n.refresh()}},show:function(e){var t,n,i,o=this;for(o._visible=!0,o.shape=e,o.diagram.bind(_e,o._refreshHandler),t=e.connectors.length,o.connectors=[],o.visual.clear(),n=0;t>n;n++)i=new H(e.connectors[n]),o.connectors.push(i),o.visual.append(i.visual);o.visual.visible(!0),o.refresh()},destroy:function(){var e=this;e.diagram.unbind(_e,e._refreshHandler),e.shape=t,e._visible=t,e.visual.visible(!1)},_hitTest:function(e){var t,n;for(n=0;this.connectors.length>n;n++)if(t=this.connectors[n],t._hitTest(e)){t._hover(!0),this.diagram.toolService._hoveredConnector=t;break}},refresh:function(){if(this.shape){var t=this.shape.bounds();t=this.diagram.modelToLayer(t),this.visual.position(t.topLeft()),e.each(this.connectors,function(){this.refresh()})}}}),O=F.extend({init:function(e,t){var n=this;F.fn.init.call(n,e,t),n._manipulating=!1,n.map=[],n.shapes=[],n._initSelection(),n._createHandles(),n.redraw(),n.diagram.bind("select",function(e){n._initialize(e.selected)}),n._refreshHandler=function(){n._internalChange||(n.refreshBounds(),n.refresh())},n._rotatedHandler=function(){1==n.shapes.length&&(n._angle=n.shapes[0].rotate().angle),n._refreshHandler()},n.diagram.bind(_e,n._refreshHandler).bind(ve,n._rotatedHandler),n.refreshBounds(),n.refresh()},options:{handles:{fill:{color:"#fff"},stroke:{color:"#282828"},height:7,width:7,hover:{fill:{color:"#282828"},stroke:{color:"#282828"}}},selectable:{stroke:{color:"#778899",width:1,dashType:"dash"},fill:{color:Ee}},offset:10},_initSelection:function(){var e=this,t=e.diagram,n=t.options.selectable,i=J({},e.options.selectable,n);e.rect=new $(i),e.visual.append(e.rect)},_resizable:function(){return this.options.editable&&this.options.editable.resize!==!1},_handleOptions:function(){return(this.options.editable.resize||{}).handles||this.options.handles},_createHandles:function(){var e,t,n,i;if(this._resizable())for(e=this._handleOptions(),i=-1;1>=i;i++)for(n=-1;1>=n;n++)(0!==i||0!==n)&&(t=new $(e),t.drawingElement._hover=oe(this._hover,this),this.map.push({x:i,y:n,visual:t}),this.visual.append(t))},bounds:function(e){return e?(this._innerBounds=e.clone(),this._bounds=this.diagram.modelToLayer(e).inflate(this.options.offset,this.options.offset),t):this._bounds},_hitTest:function(e){var n,i,o,r,s=this.diagram.modelToLayer(e),a=this.map.length;if(this._angle&&(s=s.clone().rotate(this._bounds.center(),this._angle)),this._resizable())for(n=0;a>n;n++)if(r=this.map[n],i=new X(r.x,r.y),o=this._getHandleBounds(i),o.offset(this._bounds.x,this._bounds.y),o.contains(s))return i;return this._bounds.contains(s)?new X(0,0):t},_getHandleBounds:function(e){if(this._resizable()){var t=this._handleOptions(),n=t.width,i=t.height,o=new q(0,0,n,i);return 0>e.x?o.x=-n/2:0===e.x?o.x=Math.floor(this._bounds.width/2)-n/2:e.x>0&&(o.x=this._bounds.width+1-n/2),0>e.y?o.y=-i/2:0===e.y?o.y=Math.floor(this._bounds.height/2)-i/2:e.y>0&&(o.y=this._bounds.height+1-i/2),o}},_getCursor:function(e){var t,n=this._hitTest(e);if(n&&n.x>=-1&&1>=n.x&&n.y>=-1&&1>=n.y&&this._resizable()){if(t=this._angle,t&&(t=360-t,n.rotate(new X(0,0),t),n=new X(Math.round(n.x),Math.round(n.y))),-1==n.x&&-1==n.y)return"nw-resize";if(1==n.x&&1==n.y)return"se-resize";if(-1==n.x&&1==n.y)return"sw-resize";if(1==n.x&&-1==n.y)return"ne-resize";if(0===n.x&&-1==n.y)return"n-resize";if(0===n.x&&1==n.y)return"s-resize";if(1==n.x&&0===n.y)return"e-resize";if(-1==n.x&&0===n.y)return"w-resize"}return this._manipulating?re.move:re.select},_initialize:function(){var e,t,n=this,i=n.diagram.select();for(n.shapes=[],e=0;i.length>e;e++)t=i[e],t instanceof W.Shape&&(n.shapes.push(t),t._rotationOffset=new X);n._angle=1==n.shapes.length?n.shapes[0].rotate().angle:0,n._startAngle=n._angle,n._rotates(),n._positions(),n.refreshBounds(),n.refresh(),n.redraw()},_rotates:function(){var e,t,n=this;for(n.initialRotates=[],e=0;n.shapes.length>e;e++)t=n.shapes[e],n.initialRotates.push(t.rotate().angle)},_positions:function(){var e,t,n=this;for(n.initialStates=[],e=0;n.shapes.length>e;e++)t=n.shapes[e],n.initialStates.push(t.bounds())},_hover:function(e,t){if(this._resizable()){var n=this._handleOptions(),i=n.hover,o=n.stroke,r=n.fill;e&&Y.isDefined(i.stroke)&&(o=J({},o,i.stroke)),e&&Y.isDefined(i.fill)&&(r=i.fill),t.stroke(o.color,o.width,o.opacity),t.fill(r.color,r.opacity)}},start:function(e){var t,n;for(this._sp=e,this._cp=e,this._lp=e,this._manipulating=!0,this._internalChange=!0,this.shapeStates=[],t=0;this.shapes.length>t;t++)n=this.shapes[t],this.shapeStates.push(n.bounds())},redraw:function(){var e,t,n=this._resizable();for(e=0;this.map.length>e;e++)t=this.map[e],t.visual.visible(n)},angle:function(e){return ne(e)&&(this._angle=e),this._angle},rotate:function(){var e,t,n=this._innerBounds.center(),i=this.angle();for(this._internalChange=!0,e=0;this.shapes.length>e;e++)t=this.shapes[e],i=(i+this.initialRotates[e]-this._startAngle)%360,t.rotate(i,n);this.refresh()},move:function(e,n){var i,o,r,l,c,u,h,d,f,p,g,m,v,_,y=new X,w=new X,b=0;if(-2===e.y&&-1===e.x){for(l=this._innerBounds.center(),this._angle=this._truncateAngle(Y.findAngle(l,n)),u=0;this.shapes.length>u;u++)c=this.shapes[u],h=(this._angle+this.initialRotates[u]-this._startAngle)%360,c.rotate(h,l),c.hasOwnProperty("layout")&&c.layout(c),this._rotating=!0;this.refresh()}else{if(this.shouldSnap()){if(m=this._truncateDistance(n.minus(this._lp)),0===m.x&&0===m.y)return this._cp=n,t;i=m,this._lp=new X(this._lp.x+m.x,this._lp.y+m.y)}else i=n.minus(this._cp);for(this.isDragHandle(e)?(w=y=i,o=!0):(this._angle&&i.rotate(new X(0,0),this._angle),-1==e.x?y.x=i.x:1==e.x&&(w.x=i.x),-1==e.y?y.y=i.y:1==e.y&&(w.y=i.y)),o||(f=s(e,this._innerBounds),p=(this._innerBounds.width+i.x*e.x)/this._innerBounds.width,g=(this._innerBounds.height+i.y*e.y)/this._innerBounds.height),u=0;this.shapes.length>u;u++){if(c=this.shapes[u],r=c.bounds(),o){if(!a(c))continue;d=this._displaceBounds(r,y,w,o)}else d=r.clone(),d.scale(p,g,f,this._innerBounds.center(),c.rotate().angle),v=d.center(),v.rotate(r.center(),-this._angle),d=new q(v.x-d.width/2,v.y-d.height/2,d.width,d.height);d.width>=c.options.minWidth&&d.height>=c.options.minHeight&&(_=r,c.bounds(d),c.hasOwnProperty("layout")&&c.layout(c,_,d),(_.width!==d.width||_.height!==d.height)&&c.rotate(c.rotate().angle),b+=1)}b&&(b==u?(d=this._displaceBounds(this._innerBounds,y,w,o),this.bounds(d)):this.refreshBounds(),this.refresh()),this._positions()}this._cp=n},isDragHandle:function(e){return 0===e.x&&0===e.y},cancel:function(){var e,n=this.shapes,i=this.shapeStates;for(e=0;n.length>e;e++)n[e].bounds(i[e]);this.refreshBounds(),this.refresh(),this._manipulating=t,this._internalChange=t,this._rotating=t},_truncatePositionToGuides:function(e){return this.diagram.ruler?this.diagram.ruler.truncatePositionToGuides(e):e},_truncateSizeToGuides:function(e){return this.diagram.ruler?this.diagram.ruler.truncateSizeToGuides(e):e},_truncateAngle:function(e){var t=this.snapOptions(),n=Math.max(t.angle||fe,we);return t?Math.floor(e%360/n)*n:e%360},_truncateDistance:function(e){var t,n;return e instanceof W.Point?new W.Point(this._truncateDistance(e.x),this._truncateDistance(e.y)):(t=this.snapOptions()||{},n=Math.max(t.size||de,ye),t?Math.floor(e/n)*n:e)},snapOptions:function(){var e=this.diagram.options.editable,t=((e||{}).drag||{}).snap||{};return t},shouldSnap:function(){var e=this.diagram.options.editable,t=(e||{}).drag,n=(t||{}).snap;return e!==!1&&t!==!1&&n!==!1},_displaceBounds:function(e,t,n,i){var o,r=e.topLeft().plus(t),s=e.bottomRight().plus(n),a=q.fromPoints(r,s);return i||(o=a.center(),o.rotate(e.center(),-this._angle),a=new q(o.x-a.width/2,o.y-a.height/2,a.width,a.height)),a},stop:function(){var e,n,i,o;if(this._cp!=this._sp)if(this._rotating)e=new w(this,this.shapes,this.initialRotates),this._rotating=!1;else if(this._diffStates()){if(this.diagram.ruler)for(n=0;this.shapes.length>n;n++)i=this.shapes[n],o=i.bounds(),o=this._truncateSizeToGuides(this._truncatePositionToGuides(o)),i.bounds(o),this.refreshBounds(),this.refresh();for(n=0;this.shapes.length>n;n++)i=this.shapes[n],i.updateModel();e=new m(this.shapes,this.shapeStates,this),this.diagram._syncShapeChanges()}return this._manipulating=t,this._internalChange=t,this._rotating=t,e},_diffStates:function(){var e,t=this.shapes,n=this.shapeStates;for(e=0;t.length>e;e++)if(!t[e].bounds().equals(n[e]))return!0;return!1},refreshBounds:function(){var e=1==this.shapes.length?this.shapes[0].bounds().clone():this.diagram.boundingBox(this.shapes,!0);this.bounds(e)},refresh:function(){var t,n,i,o,r=this;this.shapes.length>0?(n=this.bounds(),this.visual.visible(!0),this.visual.position(n.topLeft()),e.each(this.map,function(){t=r._getHandleBounds(new X(this.x,this.y)),this.visual.position(t.topLeft())}),this.visual.position(n.topLeft()),i=new X(n.width/2,n.height/2),this.visual.rotate(this._angle,i),this.rect.redraw({width:n.width,height:n.height}),this.rotationThumb&&(o=this.options.editable.rotate.thumb,this._rotationThumbBounds=new q(n.center().x,n.y+o.y,0,0).inflate(o.width),this.rotationThumb.redraw({x:n.width/2-o.width/2}))):this.visual.visible(!1)}}),N=j.extend({init:function(e){var t=e.options.selectable;this.options=J({},this.options,t),this.visual=new $(this.options),this.diagram=e},options:{stroke:{color:"#778899",width:1,dashType:"dash"},fill:{color:Ee}},start:function(e){this._sp=this._ep=e,this.refresh(),this.diagram._adorn(this,!0)},end:function(){this._sp=this._ep=t,this.diagram._adorn(this,!1)},bounds:function(e){return e&&(this._bounds=e),this._bounds},move:function(e){this._ep=e,this.refresh()},refresh:function(){if(this._sp){var e=q.fromPoints(this.diagram.modelToLayer(this._sp),this.diagram.modelToLayer(this._ep));this.bounds(q.fromPoints(this._sp,this._ep)),this.visual.position(e.topLeft()),this.visual.redraw({height:e.height+1,width:e.width+1})}}}),H=j.extend({init:function(e){this.options=J({},e.options),this._c=e,this.visual=new Q(this.options),this.refresh()},_hover:function(e){var t=this.options,n=t.hover,i=t.stroke,o=t.fill;e&&Y.isDefined(n.stroke)&&(i=J({},i,n.stroke)),e&&Y.isDefined(n.fill)&&(o=n.fill),this.visual.redraw({stroke:i,fill:o})},refresh:function(){var e=this._c.shape.diagram.modelToView(this._c.position()),t=e.minus(this._c.shape.bounds("transformed").topLeft()),n=new q(e.x,e.y,0,0);n.inflate(this.options.width/2,this.options.height/2),this._visualBounds=n,this.visual.redraw({center:new X(t.x,t.y)})},_hitTest:function(e){var t=this._c.shape.diagram.modelToView(e);return this._visualBounds.contains(t)}}),J(W,{CompositeUnit:h,TransformUnit:m,PanUndoUnit:y,AddShapeUnit:_,AddConnectionUnit:v,DeleteShapeUnit:g,DeleteConnectionUnit:p,ConnectionEditAdorner:z,ConnectionTool:A,ConnectorVisual:H,UndoRedoService:k,ResizingAdorner:O,Selector:N,ToolService:E,ConnectorsAdorner:L,LayoutUndoUnit:u,ConnectionEditUnit:d,ToFrontUnit:b,ToBackUnit:x,ConnectionRouterBase:P,PolylineRouter:R,CascadingRouter:B,SelectionTool:D,ScrollerTool:S,PointerTool:T,ConnectionEditTool:M,RotateUnit:w})}(window.kendo.jQuery)}(),function(){!function(e){var t=window.kendo,n=t.dataviz.diagram,i=n.Graph,o=n.Node,r=n.Link,s=t.deepExtend,a=n.Size,l=n.Rect,c=n.Dictionary,u=n.Set,h=n.Graph,d=n.Utils,f=n.Point,p=1e-6,g=Math.PI/180,m=d.contains,v=e.grep,_=t.Class.extend({defaultOptions:{type:"Tree",subtype:"Down",roots:null,animate:!1,limitToView:!1,friction:.9,nodeDistance:50,iterations:300,horizontalSeparation:90,verticalSeparation:50,underneathVerticalTopOffset:15,underneathHorizontalOffset:15,underneathVerticalSeparation:15,grid:{width:1500,offsetX:50,offsetY:50,componentSpacingX:20,componentSpacingY:20},layerSeparation:50,layeredIterations:2,startRadialAngle:0,endRadialAngle:360,radialSeparation:150,radialFirstLevelSeparation:200,keepComponentsInOneRadialLayout:!1,ignoreContainers:!0,layoutContainerChildren:!1,ignoreInvisible:!0,animateTransitions:!1},init:function(){},gridLayoutComponents:function(e){var t,n,i,o,r,s,a,l,c,u,h,p,g,m,v;if(!e)throw"No components supplied.";for(d.forEach(e,function(e){e.calcBounds()}),e.sort(function(e,t){return t.bounds.width-e.bounds.width}),t=this.options.grid.width,n=this.options.grid.componentSpacingX,i=this.options.grid.componentSpacingY,o=0,r=this.options.grid.offsetX,s=this.options.grid.offsetY,a=r,l=s,u=[],h=[];e.length>0;){for(a>=t&&(a=r,l+=o+i,o=0),p=e.pop(),this.moveToOffset(p,new f(a,l)),c=0;p.nodes.length>c;c++)h.push(p.nodes[c]);for(c=0;p.links.length>c;c++)u.push(p.links[c]);g=p.bounds,m=g.height,(0>=m||isNaN(m))&&(m=0),v=g.width,(0>=v||isNaN(v))&&(v=0),m>=o&&(o=m),a+=v+n}return{nodes:h,links:u}},moveToOffset:function(e,t){var n,i,o,r,s,a,c,u,h=e.bounds,d=t.x-h.x,p=t.y-h.y;for(n=0;e.nodes.length>n;n++)o=e.nodes[n],r=o.bounds(),0===r.width&&0===r.height&&0===r.x&&0===r.y&&(r=new l(0,0,0,0)),r.x+=d,r.y+=p,o.bounds(r);for(n=0;e.links.length>n;n++)if(s=e.links[n],s.points){for(a=[],c=s.points,i=0;c.length>i;i++)u=c[i],u.x+=d,u.y+=p,a.push(u);s.points=a}return this.currentHorizontalOffset+=h.width+this.options.grid.offsetX,new f(d,p)},transferOptions:function(e){this.options=t.deepExtend({},this.defaultOptions),d.isUndefined(e)||(this.options=t.deepExtend(this.options,e||{}))}}),y=t.Class.extend({init:function(e){this.nodeMap=new c,this.shapeMap=new c,this.nodes=[],this.edges=[],this.edgeMap=new c,this.finalNodes=[],this.finalLinks=[],this.ignoredConnections=[],this.ignoredShapes=[],this.hyperMap=new c,this.hyperTree=new i,this.finalGraph=null,this.diagram=e},convert:function(e){if(d.isUndefined(this.diagram))throw"No diagram to convert.";return this.options=t.deepExtend({ignoreInvisible:!0,ignoreContainers:!0,layoutContainerChildren:!1},e||{}),this.clear(),this._renormalizeShapes(),this._renormalizeConnections(),this.finalNodes=new c(this.nodes),this.finalLinks=new c(this.edges),this.finalGraph=new i,this.finalNodes.forEach(function(e){this.finalGraph.addNode(e)},this),this.finalLinks.forEach(function(e){this.finalGraph.addExistingLink(e)},this),this.finalGraph},mapConnection:function(e){return this.edgeMap.get(e.id)},mapShape:function(e){return this.nodeMap.get(e.id)},getEdge:function(e,t){return d.first(e.links,function(n){return n.getComplement(e)===t})},clear:function(){this.finalGraph=null,this.hyperTree=!this.options.ignoreContainers&&this.options.layoutContainerChildren?new h:null,this.hyperMap=!this.options.ignoreContainers&&this.options.layoutContainerChildren?new c:null,this.nodeMap=new c,this.shapeMap=new c,this.nodes=[],this.edges=[],this.edgeMap=new c,this.ignoredConnections=[],this.ignoredShapes=[],this.finalNodes=[],this.finalLinks=[]},listToRoot:function(e){var t=[],n=e.container;if(!n)return t;for(t.push(n);n.parentContainer;)n=n.parentContainer,t.push(n);return t.reverse(),t},firstNonIgnorableContainer:function(e){return e.isContainer&&!this._isIgnorableItem(e)?e:e.parentContainer?this.firstNonIgnorableContainer(e.parentContainer):null},isContainerConnection:function(e,t){return e.isContainer&&this.isDescendantOf(e,t)?!0:t.isContainer&&this.isDescendantOf(t,e)},isDescendantOf:function(e,t){var n,i,o,r;if(!e.isContainer)throw"Expecting a container.";if(e===t)return!1;if(m(e.children,t))return!0;for(n=[],i=0,o=e.children.length;o>i;i++)r=e.children[i],r.isContainer&&this.isDescendantOf(r,t)&&n.push(r);return n.length>0},isIgnorableItem:function(e){return this.options.ignoreInvisible?e.isCollapsed&&this._isVisible(e)?!1:!e.isCollapsed&&this._isVisible(e)?!1:!0:e.isCollapsed&&!this._isTop(e)},isShapeMapped:function(e){return e.isCollapsed&&!this._isVisible(e)&&!this._isTop(e)},leastCommonAncestor:function(e,t){var n,i,o,r,s,a;if(!e)throw"Parameter should not be null.";if(!t)throw"Parameter should not be null.";if(!this.hyperTree)throw"No hypertree available.";if(n=this.listToRoot(e),i=this.listToRoot(t),o=null,d.isEmpty(n)||d.isEmpty(i))return this.hyperTree.root.data;for(r=n[0],s=i[0],a=0;r===s&&(o=n[a],a++,!(a>=n.length||a>=i.length));)r=n[a],s=i[a];return o?v(this.hyperTree.nodes,function(e){return e.data.container===o}):this.hyperTree.root.data},_isTop:function(e){return!e.parentContainer},_isVisible:function(e){return e.visible()?e.parentContainer?this._isVisible(e.parentContainer):e.visible():!1},_isCollapsed:function(e){return e.isContainer&&e.isCollapsed?!0:e.parentContainer&&this._isCollapsed(e.parentContainer)},_renormalizeShapes:function(){var e,t,n,i;if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";for(e=0,t=this.diagram.shapes.length;t>e;e++)n=this.diagram.shapes[e],this.options.ignoreInvisible&&!this._isVisible(n)||n.isContainer?this.ignoredShapes.push(n):(i=new o(n.id,n),i.isVirtual=!1,this.nodeMap.add(n.id,i),this.nodes.push(i))},_renormalizeConnections:function(){var e,t,n,i,o,s,a,l;if(0!==this.diagram.connections.length)for(e=0,t=this.diagram.connections.length;t>e;e++)if(n=this.diagram.connections[e],this.isIgnorableItem(n))this.ignoredConnections.push(n);else if(i=n.sourceConnector?n.sourceConnector.shape:null,o=n.targetConnector?n.targetConnector.shape:null,i&&o)if(!m(this.ignoredShapes,i)||this.shapeMap.containsKey(i))if(!m(this.ignoredShapes,o)||this.shapeMap.containsKey(o))if(this.shapeMap.containsKey(i)&&(i=this.shapeMap[i]),this.shapeMap.containsKey(o)&&(o=this.shapeMap[o]),s=this.mapShape(i),a=this.mapShape(o),s===a||this.areConnectedAlready(s,a))this.ignoredConnections.push(n);else{if(null===s||null===a)throw"A shape was not mapped to a node.";if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";s.isVirtual||a.isVirtual?this.ignoredConnections.push(n):(l=new r(s,a,n.id,n),this.edgeMap.add(n.id,l),this.edges.push(l))}else this.ignoredConnections.push(n);else this.ignoredConnections.push(n);else this.ignoredConnections.push(n)},areConnectedAlready:function(e,t){return d.any(this.edges,function(n){return n.source===e&&n.target===t||n.source===t&&n.target===e})}}),w=_.extend({init:function(e){var t=this;if(_.fn.init.call(t),d.isUndefined(e))throw"Diagram is not specified.";this.diagram=e},layout:function(e){var t,i,o,r,s,a;if(this.transferOptions(e),t=new y(this.diagram),i=t.convert(e),!i.isEmpty()&&(o=i.getConnectedComponents(),!d.isEmpty(o))){for(r=0;o.length>r;r++)s=o[r],this.layoutGraph(s,e);return a=this.gridLayoutComponents(o),new n.LayoutState(this.diagram,a)}},layoutGraph:function(e,t){var n,i,o;for(d.isDefined(t)&&this.transferOptions(t),this.graph=e,n=9*this.options.nodeDistance,this.temperature=n,i=this._expectedBounds(),this.width=i.width,this.height=i.height,o=0;this.options.iterations>o;o++)this.refineStage=o>=5*this.options.iterations/6,this.tick(),this.temperature=this.refineStage?n/30:n*(1-o/(2*this.options.iterations))},tick:function(){var e,t,n;for(e=0;this.graph.nodes.length>e;e++)this._repulsion(this.graph.nodes[e]);for(e=0;this.graph.links.length>e;e++)this._attraction(this.graph.links[e]);for(e=0;this.graph.nodes.length>e;e++){if(t=this.graph.nodes[e],n=Math.sqrt(t.dx*t.dx+t.dy*t.dy),0===n)return;t.x+=Math.min(n,this.temperature)*t.dx/n,t.y+=Math.min(n,this.temperature)*t.dy/n,this.options.limitToView&&(t.x=Math.min(this.width,Math.max(t.width/2,t.x)),t.y=Math.min(this.height,Math.max(t.height/2,t.y)))}},_shake:function(e){var t=Math.random()*this.options.nodeDistance/4,n=2*Math.random()*Math.PI;e.x+=t*Math.cos(n),e.y-=t*Math.sin(n)},_InverseSquareForce:function(e,t,n){var i,o,r,s,a,l,c;return this.refineStage?(o=t.x-n.x,r=t.y-n.y,s=t.width/2,a=t.height/2,l=n.width/2,c=n.height/2,i=Math.pow(o,2)/Math.pow(s+l+this.options.nodeDistance,2)+Math.pow(r,2)/Math.pow(a+c+this.options.nodeDistance,2)):i=Math.pow(e,2)/Math.pow(this.options.nodeDistance,2),4*i/3},_SquareForce:function(e,t,n){return 1/this._InverseSquareForce(e,t,n)},_repulsion:function(e){e.dx=0,e.dy=0,d.forEach(this.graph.nodes,function(t){var n,i,o,r;if(t!==e){for(;e.x===t.x&&e.y===t.y;)this._shake(t);n=e.x-t.x,i=e.y-t.y,o=Math.sqrt(n*n+i*i),r=2*this._SquareForce(o,e,t),e.dx+=n/o*r,e.dy+=i/o*r}},this)},_attraction:function(e){var t,n,i,o,r,s,a=e.target,l=e.source;if(l!==a){for(;l.x===a.x&&l.y===a.y;)this._shake(a);t=l.x-a.x,n=l.y-a.y,i=Math.sqrt(t*t+n*n),o=5*this._InverseSquareForce(i,l,a),r=t/i*o,s=n/i*o,a.dx+=r,a.dy+=s,l.dx-=r,l.dy-=s}},_expectedBounds:function(){var e,t,n,i,o,r=this.graph.nodes.length,s=1.5,a=4;return 0===r?e:(e=d.fold(this.graph.nodes,function(e,t){var n=t.width*t.height;return n>0?e+=Math.sqrt(n):0},0,this),t=e/r,n=t*Math.ceil(Math.sqrt(r)),i=n*Math.sqrt(s),o=n/Math.sqrt(s),{width:i*a,height:o*a})}}),b=t.Class.extend({init:function(e){this.center=null,this.options=e},layout:function(e,t){if(this.graph=e,this.graph.nodes&&0!==this.graph.nodes.length){if(!m(this.graph.nodes,t))throw"The given root is not in the graph.";this.center=t,this.graph.cacheRelationships(),this.layoutSwitch()}},layoutLeft:function(e){var t,n,i,o,r,s,l,c;for(this.setChildrenDirection(this.center,"Left",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,n=0,o=0;e.length>o;o++)r=e[o],r.TreeDirection="Left",s=this.measure(r,a.Empty),n=Math.max(n,s.Width),t+=s.height+this.options.verticalSeparation;for(t-=this.options.verticalSeparation,l=this.center.x-this.options.horizontalSeparation,i=this.center.y+(this.center.height-t)/2,o=0;e.length>o;o++)r=e[o],c=new f(l-r.Size.width,i),this.arrange(r,c),i+=r.Size.height+this.options.verticalSeparation},layoutRight:function(e){var t,n,i,o,r,s,l,c;for(this.setChildrenDirection(this.center,"Right",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,n=0,o=0;e.length>o;o++)r=e[o],r.TreeDirection="Right",s=this.measure(r,a.Empty),n=Math.max(n,s.Width),t+=s.height+this.options.verticalSeparation;for(t-=this.options.verticalSeparation,l=this.center.x+this.options.horizontalSeparation+this.center.width,i=this.center.y+(this.center.height-t)/2,o=0;e.length>o;o++)r=e[o],c=new f(l,i),this.arrange(r,c),i+=r.Size.height+this.options.verticalSeparation},layoutUp:function(e){var t,n,i,o,r,s,l;for(this.setChildrenDirection(this.center,"Up",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,o=0;e.length>o;o++)i=e[o],i.TreeDirection="Up",r=this.measure(i,a.Empty),t+=r.width+this.options.horizontalSeparation;for(t-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-t/2,o=0;e.length>o;o++)i=e[o],n=this.center.y-this.options.verticalSeparation-i.Size.height,l=new f(s,n),this.arrange(i,l),s+=i.Size.width+this.options.horizontalSeparation},layoutDown:function(e){var t,n,i,o,r,s,l;for(this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),i=0,n=0;e.length>n;n++)t=e[n],t.treeDirection="Down",r=this.measure(t,a.Empty),i+=r.width+this.options.horizontalSeparation;for(i-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-i/2,o=this.center.y+this.options.verticalSeparation+this.center.height,n=0;e.length>n;n++)t=e[n],l=new f(s,o),this.arrange(t,l),s+=t.Size.width+this.options.horizontalSeparation},layoutRadialTree:function(){var e,t;if(this.setChildrenDirection(this.center,"Radial",!1),this.setChildrenLayout(this.center,"Default",!1),this.previousRoot=null,e=this.options.startRadialAngle*g,t=this.options.endRadialAngle*g,e>=t)throw"Final angle should not be less than the start angle.";this.maxDepth=0,this.origin=new f(this.center.x,this.center.y),this.calculateAngularWidth(this.center,0),this.maxDepth>0&&this.radialLayout(this.center,this.options.radialFirstLevelSeparation,e,t),this.center.Angle=t-e},tipOverTree:function(e,t){var n,i,o,r,s,l,c;for(d.isUndefined(t)&&(t=0),this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),this.setChildrenLayout(this.center,"Underneath",!1,t),n=0,r=0;e.length>r;r++)o=e[r],o.TreeDirection="Down",s=this.measure(o,a.Empty),n+=s.width+this.options.horizontalSeparation;for(n-=this.options.horizontalSeparation,n-=e[e.length-1].width,n+=e[e.length-1].associatedShape.bounds().width,l=this.center.x+this.center.width/2-n/2,i=this.center.y+this.options.verticalSeparation+this.center.height,r=0;e.length>r;r++)o=e[r],c=new f(l,i),this.arrange(o,c),l+=o.Size.width+this.options.horizontalSeparation},calculateAngularWidth:function(e,t){var n,i,o,r,s,a,l;if(t>this.maxDepth&&(this.maxDepth=t),n=0,i=1e3,o=1e3,r=0===t?0:Math.sqrt(i*i+o*o)/t,e.children.length>0){for(s=0,a=e.children.length;a>s;s++)l=e.children[s],n+=this.calculateAngularWidth(l,t+1);n=Math.max(r,n)}else n=r;return e.sectorAngle=n,n},sortChildren:function(e){var t,n,i,o,r,s,a,l,c,u,h,p=0;if(e.parents.length>1)throw"Node is not part of a tree.";if(n=e.parents[0],n&&(i=new f(n.x,n.y),o=new f(e.x,e.y),p=this.normalizeAngle(Math.atan2(i.y-o.y,i.x-o.x))),r=e.children.length,0===r)return null;for(s=[],a=[],t=0;r>t;++t)l=e.children[t],c=new f(l.x,l.y),a[t]=t,s[t]=this.normalizeAngle(-p+Math.atan2(c.y-c.y,c.x-c.x));for(d.bisort(s,a),u=[],h=e.children,t=0;r>t;++t)u.push(h[a[t]]);return u},normalizeAngle:function(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;0>e;)e+=2*Math.PI;return e},radialLayout:function(e,t,n,i){var o,r,s,a,l,c=i-n,u=c/2,h=e.sectorAngle,d=0,f=this.sortChildren(e);for(o=0,r=f.length;r>o;o++)s=f[o],a=s,l=a.sectorAngle/h,s.children.length>0&&this.radialLayout(s,t+this.options.radialSeparation,n+d*c,n+(d+l)*c),this.setPolarLocation(s,t,n+d*c+l*u),a.angle=l*c,d+=l},setPolarLocation:function(e,t,n){e.x=this.origin.x+t*Math.cos(n),e.y=this.origin.y+t*Math.sin(n),e.BoundingRectangle=new l(e.x,e.y,e.width,e.height)},setChildrenDirection:function(e,t,n){var i=e.treeDirection;this.graph.depthFirstTraversal(e,function(e){e.treeDirection=t}),n||(e.treeDirection=i)},setChildrenLayout:function(e,t,n,i){d.isUndefined(i)&&(i=0);var o=e.childrenLayout;i>0?(this.graph.assignLevels(e),this.graph.depthFirstTraversal(e,function(e){e.level>=i+1&&(e.childrenLayout=t)})):(this.graph.depthFirstTraversal(e,function(e){e.childrenLayout=t}),n||(e.childrenLayout=o))},measure:function(e,t){var n,i,o,r,s,l,c,u=0,h=0,f=new a(0,0);if(!e)throw"";if(i=e.associatedShape.bounds(),o=i.width,r=i.height,1!==e.parents.length)throw"Node not in a spanning tree.";if(s=e.parents[0],"Undefined"===e.treeDirection&&(e.treeDirection=s.treeDirection),d.isEmpty(e.children))f=new a(Math.abs(o)<p?50:o,Math.abs(r)<p?25:r);else if(1===e.children.length){switch(e.treeDirection){case"Radial":n=this.measure(e.children[0],t),u=o+this.options.radialSeparation*Math.cos(e.AngleToParent)+n.width,h=r+Math.abs(this.options.radialSeparation*Math.sin(e.AngleToParent))+n.height;break;case"Left":case"Right":switch(e.childrenLayout){case"TopAlignedWithParent":break;case"BottomAlignedWithParent":break;case"Underneath":n=this.measure(e.children[0],t),u=o+n.width+this.options.underneathHorizontalOffset,h=r+this.options.underneathVerticalTopOffset+n.height;break;case"Default":n=this.measure(e.children[0],t),u=o+this.options.horizontalSeparation+n.width,h=Math.max(r,n.height);break;default:throw"Unhandled TreeDirection in the Radial layout measuring."}break;case"Up":case"Down":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":n=this.measure(e.children[0],t),u=Math.max(o,n.width+this.options.underneathHorizontalOffset),h=r+this.options.underneathVerticalTopOffset+n.height;break;case"Default":n=this.measure(e.children[0],t),h=r+this.options.verticalSeparation+n.height,u=Math.max(o,n.width);break;default:throw"Unhandled TreeDirection in the Down layout measuring."}break;default:throw"Unhandled TreeDirection in the layout measuring."}f=new a(u,h)}else{switch(e.treeDirection){case"Left":case"Right":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(u=o,h=r+this.options.underneathVerticalTopOffset,l=0;e.children.length>l;l++)c=e.children[l],n=this.measure(c,t),u=Math.max(u,n.width+this.options.underneathHorizontalOffset),h+=n.height+this.options.underneathVerticalSeparation;h-=this.options.underneathVerticalSeparation;break;case"Default":for(u=o,h=0,l=0;e.children.length>l;l++)c=e.children[l],n=this.measure(c,t),u=Math.max(u,o+this.options.horizontalSeparation+n.width),h+=n.height+this.options.verticalSeparation;h-=this.options.verticalSeparation;break;default:throw"Unhandled TreeDirection in the Right layout measuring."}break;case"Up":case"Down":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(u=o,h=r+this.options.underneathVerticalTopOffset,l=0;e.children.length>l;l++)c=e.children[l],n=this.measure(c,t),u=Math.max(u,n.width+this.options.underneathHorizontalOffset),h+=n.height+this.options.underneathVerticalSeparation;h-=this.options.underneathVerticalSeparation;break;case"Default":for(u=0,h=0,l=0;e.children.length>l;l++)c=e.children[l],n=this.measure(c,t),u+=n.width+this.options.horizontalSeparation,h=Math.max(h,n.height+this.options.verticalSeparation+r);u-=this.options.horizontalSeparation;break;default:throw"Unhandled TreeDirection in the Down layout measuring."}break;default:throw"Unhandled TreeDirection in the layout measuring."}f=new a(u,h)}return e.SectorAngle=Math.sqrt(u*u/4+h*h/4),e.Size=f,f},arrange:function(e,t){var n,i,o,r,s,a,c,u,h=e.associatedShape.bounds(),g=h.width,m=h.height;if(d.isEmpty(e.children))e.x=t.x,e.y=t.y,e.BoundingRectangle=new l(t.x,t.y,g,m);else switch(e.treeDirection){case"Left":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(u=t,e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),c=t.y+m+this.options.underneathVerticalTopOffset,n=0;r.children.length>n;n++)r=r.children[n],a=u.x-r.associatedShape.width-this.options.underneathHorizontalOffset,i=new f(a,c),this.arrange(r,i),c+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(u=new f(t.x+e.Size.width-g,t.y+(e.Size.height-m)/2),e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),a=u.x-this.options.horizontalSeparation,c=t.y,n=0;e.children.length>n;n++)r=e.children[n],i=new f(a-r.Size.width,c),this.arrange(r,i),c+=r.Size.height+this.options.verticalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"Right":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(u=t,e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),a=t.x+g+this.options.underneathHorizontalOffset,c=t.y+m+this.options.underneathVerticalTopOffset,n=0;e.children.length>n;n++)r=e.children[n],i=new f(a,c),this.arrange(r,i),c+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(u=new f(t.x,t.y+(e.Size.height-m)/2),e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),a=t.x+g+this.options.horizontalSeparation,c=t.y,n=0;e.children.length>n;n++)r=e.children[n],i=new f(a,c),this.arrange(r,i),c+=r.Size.height+this.options.verticalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"Up":if(u=new f(t.x+(e.Size.width-g)/2,t.y+e.Size.height-m),e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),Math.abs(u.x-t.x)<p){for(s=0,n=0;e.children.length>n;n++)o=e.children[n],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=t.x+(g-s)/2}else a=t.x;for(n=0;e.children.length>n;n++)r=e.children[n],c=u.y-this.options.verticalSeparation-r.Size.height,i=new f(a,c),this.arrange(r,i),a+=r.Size.width+this.options.horizontalSeparation;break;case"Down":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(u=t,e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),a=t.x+this.options.underneathHorizontalOffset,c=t.y+m+this.options.underneathVerticalTopOffset,n=0;e.children.length>n;n++)r=e.children[n],i=new f(a,c),this.arrange(r,i),c+=r.Size.height+this.options.underneathVerticalSeparation;
|
|
break;case"Default":if(u=new f(t.x+(e.Size.width-g)/2,t.y),e.x=u.x,e.y=u.y,e.BoundingRectangle=new l(e.x,e.y,e.width,e.height),Math.abs(u.x-t.x)<p){for(s=0,n=0;e.children.length>n;n++)o=e.children[n],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=t.x+(g-s)/2}else a=t.x;for(n=0;e.children.length>n;n++)r=e.children[n],c=u.y+this.options.verticalSeparation+m,i=new f(a,c),this.arrange(r,i),a+=r.Size.width+this.options.horizontalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"None":break;default:throw"Unsupported TreeDirection"}},layoutSwitch:function(){var e,t,n,i,o,r;if(this.center&&!d.isEmpty(this.center.children))switch(e=this.options.subtype,d.isUndefined(e)&&(e="Down"),r=this.center.children,e.toLowerCase()){case"radial":case"radialtree":this.layoutRadialTree();break;case"mindmaphorizontal":case"mindmap":t=this.center.children,1===this.center.children.length?this.layoutRight(t):(o=r.length/2,n=v(this.center.children,function(e){return d.indexOf(r,e)<o}),i=v(this.center.children,function(e){return d.indexOf(r,e)>=o}),this.layoutLeft(n),this.layoutRight(i));break;case"mindmapvertical":t=this.center.children,1===this.center.children.length?this.layoutDown(t):(o=r.length/2,n=v(this.center.children,function(e){return d.indexOf(r,e)<o}),i=v(this.center.children,function(e){return d.indexOf(r,e)>=o}),this.layoutUp(n),this.layoutDown(i));break;case"right":this.layoutRight(this.center.children);break;case"left":this.layoutLeft(this.center.children);break;case"up":case"bottom":this.layoutUp(this.center.children);break;case"down":case"top":this.layoutDown(this.center.children);break;case"tipover":case"tipovertree":if(0>this.options.tipOverTreeStartLevel)throw"The tip-over level should be a positive integer.";this.tipOverTree(this.center.children,this.options.tipOverTreeStartLevel);break;case"undefined":case"none":}}}),x=_.extend({init:function(e){var t=this;if(_.fn.init.call(t),d.isUndefined(e))throw"No diagram specified.";this.diagram=e},layout:function(e){var t,i;return this.transferOptions(e),t=new y(this.diagram),this.graph=t.convert(),i=this.layoutComponents(),new n.LayoutState(this.diagram,i)},layoutComponents:function(){var e,t,n,i,o,r,s,a;if(!this.graph.isEmpty()&&(e=this.graph.getConnectedComponents(),!d.isEmpty(e))){for(t=new b(this.options),n=[],i=0;e.length>i;i++){if(o=e[i],r=this.getTree(o),!r)throw"Failed to find a spanning tree for the component.";s=r.root,a=r.tree,t.layout(a,s),n.push(a)}return this.gridLayoutComponents(n)}},getTree:function(e){var t,n,i,o,r,s=null;if(this.options.roots&&this.options.roots.length>0)for(t=0,n=e.nodes.length;n>t;t++)for(i=e.nodes[t],o=0;this.options.roots.length>o;o++)if(r=this.options.roots[o],r===i.associatedShape){s=i;break}if(!s&&(s=e.root(),!s))throw"Unable to find a root for the tree.";return this.getTreeForRoot(e,s)},getTreeForRoot:function(e,t){var n=e.getSpanningTree(t);return d.isUndefined(n)||n.isEmpty()?null:{tree:n,root:n.root}}}),k=_.extend({init:function(e){var t=this;if(_.fn.init.call(t),d.isUndefined(e))throw"Diagram is not specified.";this.diagram=e},layout:function(e){var t,i,o,r,s,a;if(this.transferOptions(e),t=new y(this.diagram),i=t.convert(e),!i.isEmpty()&&(o=i.getConnectedComponents(),!d.isEmpty(o))){for(r=0;o.length>r;r++)s=o[r],this.layoutGraph(s,e);return a=this.gridLayoutComponents(o),new n.LayoutState(this.diagram,a)}},_initRuntimeProperties:function(){var e,t;for(e=0;this.graph.nodes.length>e;e++)t=this.graph.nodes[e],t.layer=-1,t.downstreamLinkCount=0,t.upstreamLinkCount=0,t.isVirtual=!1,t.uBaryCenter=0,t.dBaryCenter=0,t.upstreamPriority=0,t.downstreamPriority=0,t.gridPosition=0},_prepare:function(e){var t,n,i,o,r,s,a,l,u,h,f,p=[],g=new c,v=0;for(d.forEach(e.nodes,function(e){0===e.incoming.length&&(g.set(e,0),p.push(e))});p.length>0;)for(r=p.shift(),t=0;r.outgoing.length>t;t++)i=r.outgoing[t],s=i.target,o=g.containsKey(s)?Math.max(g.get(r)+1,g.get(s)):g.get(r)+1,g.set(s,o),o>v&&(v=o),m(p,s)||p.push(s);for(a=g.keys(),a.sort(function(e,t){var n=g.get(e),i=g.get(t);return d.sign(i-n)}),l=0;a.length>l;++l)if(u=a[l],h=Number.MAX_VALUE,0!==u.outgoing.length){for(n=0;u.outgoing.length>n;++n)i=u.outgoing[n],h=Math.min(h,g.get(i.target));h>1&&g.set(u,h-1)}for(this.layers=[],t=0;v+1>t;t++)f=[],f.linksTo={},this.layers.push(f);for(g.forEach(function(e,t){e.layer=t,this.layers[t].push(e)},this),n=0;this.layers.length>n;n++)for(f=this.layers[n],t=0;f.length>t;t++)f[t].gridPosition=t},layoutGraph:function(e,t){if(d.isUndefined(e))throw"No graph given or graph analysis of the diagram failed.";d.isDefined(t)&&this.transferOptions(t),this.graph=e,e.setItemIndices();var n=e.makeAcyclic();this._initRuntimeProperties(),this._prepare(e,t),this._dummify(),this._optimizeCrossings(),this._swapPairs(),this.arrangeNodes(),this._moveThingsAround(),this._dedummify(),d.forEach(n,function(e){e.points&&e.points.reverse()})},setMinDist:function(e,t,n){var i=e.layer,o=e.layerIndex;this.minDistances[i][o]=n},getMinDist:function(e,t){var n,i=0,o=e.layerIndex,r=t.layerIndex,s=e.layer,a=Math.min(o,r),l=Math.max(o,r);for(n=a;l>n;++n)i+=this.minDistances[s][n];return i},placeLeftToRight:function(e){var t,n,i,o,r,s,a,l,u,h,f=new c;for(i=0;this.layers.length>i;++i)if(o=e[i]){for(t=0;o.length>t;t++)n=o[t],f.containsKey(n)||this.placeLeft(n,f,i);for(r=Number.POSITIVE_INFINITY,t=0;o.length>t;t++)n=o[t],s=this.rightSibling(n),s&&this.nodeLeftClass.get(s)!==i&&(r=Math.min(r,f.get(s)-f.get(n)-this.getMinDist(n,s)));if(r===Number.POSITIVE_INFINITY){for(a=[],t=0;o.length>t;t++)for(n=o[t],l=[],d.addRange(l,this.upNodes.get(n)),d.addRange(l,this.downNodes.get(n)),u=0;l.length>u;u++)h=l[u],this.nodeLeftClass.get(h)<i&&a.push(f.get(h)-f.get(n));a.sort(),r=0===a.length?0:a.length%2===1?a[this.intDiv(a.length,2)]:(a[this.intDiv(a.length,2)-1]+a[this.intDiv(a.length,2)])/2}for(t=0;o.length>t;t++)n=o[t],f.set(n,f.get(n)+r)}return f},placeRightToLeft:function(e){var t,n,i,o,r,s,a,l,u,h,f=new c;for(i=0;this.layers.length>i;++i)if(o=e[i]){for(t=0;o.length>t;t++)n=o[t],f.containsKey(n)||this.placeRight(n,f,i);for(r=Number.NEGATIVE_INFINITY,t=0;o.length>t;t++)n=o[t],s=this.leftSibling(n),s&&this.nodeRightClass.get(s)!==i&&(r=Math.max(r,f.get(s)-f.get(n)+this.getMinDist(s,n)));if(r===Number.NEGATIVE_INFINITY){for(a=[],t=0;o.length>t;t++)for(n=o[t],l=[],d.addRange(l,this.upNodes.get(n)),d.addRange(l,this.downNodes.get(n)),u=0;l.length>u;u++)h=l[u],this.nodeRightClass.get(h)<i&&a.push(f.get(n)-f.get(h));a.sort(),r=0===a.length?0:a.length%2===1?a[this.intDiv(a.length,2)]:(a[this.intDiv(a.length,2)-1]+a[this.intDiv(a.length,2)])/2}for(t=0;o.length>t;t++)n=o[t],f.set(n,f.get(n)+r)}return f},_getLeftWing:function(){var e={value:null},t=this.computeClasses(e,1);return this.nodeLeftClass=e.value,t},_getRightWing:function(){var e={value:null},t=this.computeClasses(e,-1);return this.nodeRightClass=e.value,t},computeClasses:function(e,t){var n,i,o,r,s,a,l,u,h,d=0,f=e.value=new c;for(n=0;this.layers.length>n;++n)for(d=n,i=this.layers[n],o=1===t?0:i.length-1;o>=0&&i.length>o;o+=t)if(r=i[o],f.containsKey(r))d=f.get(r);else if(f.set(r,d),r.isVirtual)for(s=this._nodesInLink(r),a=0;s.length>a;a++)l=s[a],f.set(l,d);for(u=[],h=0;this.layers.length>h;h++)u.push(null);return f.forEach(function(e,t){null===u[t]&&(u[t]=[]),u[t].push(e)}),u},_isVerticalLayout:function(){return"up"===this.options.subtype.toLowerCase()||"down"===this.options.subtype.toLowerCase()||"vertical"===this.options.subtype.toLowerCase()},_isHorizontalLayout:function(){return"right"===this.options.subtype.toLowerCase()||"left"===this.options.subtype.toLowerCase()||"horizontal"===this.options.subtype.toLowerCase()},_isIncreasingLayout:function(){return"right"===this.options.subtype.toLowerCase()||"down"===this.options.subtype.toLowerCase()},_moveThingsAround:function(){function e(e,t){var n,i,o=Number.MIN_VALUE;for(n=0;e.length>n;++n)i=e[n],o=t._isVerticalLayout()?Math.max(o,i.height):Math.max(o,i.width);return o}var t,n,i,o,r,s,a,l,u,h,f,p,g,m,v,_,y,w,b,x,k,C,S,T,D,A,M;for(n=0;this.layers.length>n;++n)o=this.layers[n],o.sort(this._gridPositionComparer);for(this.minDistances=[],n=0;this.layers.length>n;++n)for(o=this.layers[n],this.minDistances[n]=[],r=0;o.length>r;++r)i=o[r],i.layerIndex=r,this.minDistances[n][r]=this.options.nodeDistance,o.length-1>r&&(this.minDistances[n][r]+=this._isVerticalLayout()?(i.width+o[r+1].width)/2:(i.height+o[r+1].height)/2);for(this.downNodes=new c,this.upNodes=new c,d.forEach(this.graph.nodes,function(e){this.downNodes.set(e,[]),this.upNodes.set(e,[])},this),d.forEach(this.graph.links,function(e){var t=e.source,n=e.target,i=null,o=null;t.layer>n.layer?(i=e.source,o=e.target):(o=e.source,i=e.target),this.downNodes.get(o).push(i),this.upNodes.get(i).push(o)},this),this.downNodes.forEachValue(function(e){e.sort(this._gridPositionComparer)},this),this.upNodes.forEachValue(function(e){e.sort(this._gridPositionComparer)},this),n=0;this.layers.length-1>n;++n)for(o=this.layers[n],s=0;o.length-1>s;s++)if(a=o[s],a.isVirtual&&(l=this.downNodes.get(a)[0],l.isVirtual))for(r=s+1;o.length>r;++r)i=o[r],i.isVirtual&&(u=this.downNodes.get(i)[0],u.isVirtual&&l.gridPosition>u.gridPosition&&(h=l.gridPosition,l.gridPosition=u.gridPosition,u.gridPosition=h,f=l.layerIndex,p=u.layerIndex,this.layers[n+1][f]=u,this.layers[n+1][p]=l,l.layerIndex=p,u.layerIndex=f));for(g=this._getLeftWing(),m=this._getRightWing(),v=this.placeLeftToRight(g),_=this.placeRightToLeft(m),y=new c,d.forEach(this.graph.nodes,function(e){y.set(e,(v.get(e)+_.get(e))/2)}),w=new c,b=new c,n=0;this.layers.length>n;++n)for(o=this.layers[n],x=-1,k=-1,r=0;o.length>r;++r)i=o[r],w.set(i,0),b.set(i,!1),i.isVirtual&&(-1===x?x=r:x===r-1?x=r:(k=r,w.set(o[x],0),y.get(i)-y.get(o[x])===this.getMinDist(o[x],i)?b.set(o[x],!0):b.set(o[x],!1),x=r));for(C=[1,-1],d.forEach(C,function(e){var n,i,o,r,s,a,l,c=1===e?0:this.layers.length-1;for(n=c;n>=0&&this.layers.length>n;n+=e){if(i=this.layers[n],o=this._firstVirtualNode(i),r=null,s=null,-1!==o)for(r=i[o],s=[],t=0;o>t;t++)s.push(i[t]);else r=null,s=i;if(s.length>0){for(this._sequencer(y,null,r,e,s),t=0;s.length-1>t;++t)this.setMinDist(s[t],s[t+1],y.get(s[t+1])-y.get(s[t]));r&&this.setMinDist(s[s.length-1],r,y.get(r)-y.get(s[s.length-1]))}for(;r;){if(a=this.nextVirtualNode(i,r)){if(w.get(r)===e){for(o=r.layerIndex,l=a.layerIndex,s=[],t=o+1;l>t;t++)s.push(i[t]);s.length>0&&this._sequencer(y,r,a,e,s),b.set(r,!0)}}else{for(o=r.layerIndex,s=[],t=o+1;i.length>t;t++)s.push(i[t]);if(s.length>0){for(this._sequencer(y,r,null,e,s),t=0;s.length-1>t;++t)this.setMinDist(s[t],s[t+1],y.get(s[t+1])-y.get(s[t]));this.setMinDist(r,s[0],y.get(s[0])-y.get(r))}}r=a}this.adjustDirections(n,e,w,b)}},this),S=this._isIncreasingLayout()?0:this.layers.length-1,T=function(e,t){return t._isIncreasingLayout()?t.layers.length>e:e>=0},D=this._isIncreasingLayout()?1:-1,A=0,t=S;T(t,this);t+=D){for(o=this.layers[t],M=e(o,this),r=0;o.length>r;++r)i=o[r],this._isVerticalLayout()?(i.x=y.get(i),i.y=A+M/2):(i.x=A+M/2,i.y=y.get(i));A+=this.options.layerSeparation+M}},adjustDirections:function(e,t,n,i){var o,r,s,a,l,c,u,h,d,f,p,g,m,v;if(!(0>e+t||e+t>=this.layers.length))for(o=null,r=null,s=this.layers[e+t],a=0;s.length>a;++a)if(l=s[a],l.isVirtual&&(c=this.getNeighborOnLayer(l,e),c.isVirtual)){if(o){for(u=i.get(r),h=this.layers[e],d=r.layerIndex,f=c.layerIndex,p=d+1;f>p;++p)h[p].isVirtual&&(u=u&&i.get(h[p]));if(u)for(n.set(o,t),g=o.layerIndex,m=l.layerIndex,v=g+1;m>v;++v)s[v].isVirtual&&n.set(s[v],t)}o=l,r=c}},getNeighborOnLayer:function(e,t){var n=this.upNodes.get(e)[0];return n.layer===t?n:(n=this.downNodes.get(e)[0],n.layer===t?n:null)},_sequencer:function(e,t,n,i,o){if(1===o.length&&this._sequenceSingle(e,t,n,i,o[0]),o.length>1){var r=o.length,s=this.intDiv(r,2);this._sequencer(e,t,n,i,o.slice(0,s)),this._sequencer(e,t,n,i,o.slice(s)),this.combineSequences(e,t,n,i,o)}},_sequenceSingle:function(e,t,n,i,o){var r=-1===i?this.downNodes.get(o):this.upNodes.get(o),s=r.length;0!==s&&(s%2===1?e.set(o,e.get(r[this.intDiv(s,2)])):e.set(o,(e.get(r[this.intDiv(s,2)-1])+e.get(r[this.intDiv(s,2)]))/2),t&&e.set(o,Math.max(e.get(o),e.get(t)+this.getMinDist(t,o))),n&&e.set(o,Math.min(e.get(o),e.get(n)-this.getMinDist(o,n))))},combineSequences:function(e,t,n,i,o){var r,s,a,l,c,u,h,d,f,p,g=o.length,m=this.intDiv(g,2),v=[];for(r=0;m>r;++r){for(s=0,l=-1===i?this.downNodes.get(o[r]):this.upNodes.get(o[r]),a=0;l.length>a;++a)c=l[a],e.get(c)>=e.get(o[r])?s++:(s--,v.push({k:e.get(c)+this.getMinDist(o[r],o[m-1]),v:2}));v.push({k:e.get(o[r])+this.getMinDist(o[r],o[m-1]),v:s})}for(t&&v.push({k:e.get(t)+this.getMinDist(t,o[m-1]),v:Number.MAX_VALUE}),v.sort(this._positionDescendingComparer),h=[],r=m;g>r;++r){for(s=0,l=-1===i?this.downNodes.get(o[r]):this.upNodes.get(o[r]),a=0;l.length>a;++a)c=l[a],e.get(c)<=e.get(o[r])?s++:(s--,h.push({k:e.get(c)-this.getMinDist(o[r],o[m]),v:2}));h.push({k:e.get(o[r])-this.getMinDist(o[r],o[m]),v:s})}for(n&&h.push({k:e.get(n)-this.getMinDist(n,o[m]),v:Number.MAX_VALUE}),h.sort(this._positionAscendingComparer),d=0,f=0,p=this.getMinDist(o[m-1],o[m]);e.get(o[m])-e.get(o[m-1])<p;)if(f>d){if(0===v.length){e.set(o[m-1],e.get(o[m])-p);break}u=v.shift(),d+=u.v,e.set(o[m-1],u.k),e.set(o[m-1],Math.max(e.get(o[m-1]),e.get(o[m])-p))}else{if(0===h.length){e.set(o[m],e.get(o[m-1])+p);break}u=h.shift(),f+=u.v,e.set(o[m],u.k),e.set(o[m],Math.min(e.get(o[m]),e.get(o[m-1])+p))}for(r=m-2;r>=0;r--)e.set(o[r],Math.min(e.get(o[r]),e.get(o[m-1])-this.getMinDist(o[r],o[m-1])));for(r=m+1;g>r;r++)e.set(o[r],Math.max(e.get(o[r]),e.get(o[m])+this.getMinDist(o[r],o[m])))},placeLeft:function(e,t,n){var i=Number.NEGATIVE_INFINITY;d.forEach(this._getComposite(e),function(e){var o=this.leftSibling(e);o&&this.nodeLeftClass.get(o)===this.nodeLeftClass.get(e)&&(t.containsKey(o)||this.placeLeft(o,t,n),i=Math.max(i,t.get(o)+this.getMinDist(o,e)))},this),i===Number.NEGATIVE_INFINITY&&(i=0),d.forEach(this._getComposite(e),function(e){t.set(e,i)})},placeRight:function(e,t,n){var i=Number.POSITIVE_INFINITY;d.forEach(this._getComposite(e),function(e){var o=this.rightSibling(e);o&&this.nodeRightClass.get(o)===this.nodeRightClass.get(e)&&(t.containsKey(o)||this.placeRight(o,t,n),i=Math.min(i,t.get(o)-this.getMinDist(e,o)))},this),i===Number.POSITIVE_INFINITY&&(i=0),d.forEach(this._getComposite(e),function(e){t.set(e,i)})},leftSibling:function(e){var t=this.layers[e.layer],n=e.layerIndex;return 0===n?null:t[n-1]},rightSibling:function(e){var t=this.layers[e.layer],n=e.layerIndex;return n===t.length-1?null:t[n+1]},_getComposite:function(e){return e.isVirtual?this._nodesInLink(e):[e]},arrangeNodes:function(){var e,t,n,i,o,r,s,a;for(t=0;this.layers.length>t;t++)for(i=this.layers[t],n=0;i.length>n;n++)o=i[n],o.upstreamPriority=o.upstreamLinkCount,o.downstreamPriority=o.downstreamLinkCount;for(r=2,s=0;r>s;s++){for(e=this.layers.length-1;e>=1;e--)this.layoutLayer(!1,e);for(e=0;this.layers.length-1>e;e++)this.layoutLayer(!0,e)}for(a=Number.MAX_VALUE,t=0;this.layers.length>t;t++)for(i=this.layers[t],n=0;i.length>n;n++)o=i[n],a=Math.min(a,o.gridPosition);if(0>a)for(t=0;this.layers.length>t;t++)for(i=this.layers[t],n=0;i.length>n;n++)o=i[n],o.gridPosition=o.gridPosition-a},layoutLayer:function(e,t){var n,i,o,r;for(i=e?this.layers[n=t+1]:this.layers[n=t-1],o=[],r=0;i.length>r;r++)o.push(i[r]);o.sort(function(e,t){var n=(e.upstreamPriority+e.downstreamPriority)/2,i=(t.upstreamPriority+t.downstreamPriority)/2;return Math.abs(n-i)<1e-4?0:i>n?1:-1}),d.forEach(o,function(e){var t=e.gridPosition,n=this.calcBaryCenter(e),o=(e.upstreamPriority+e.downstreamPriority)/2;if(!(Math.abs(t-n)<1e-4||Math.abs(t-n)<.2501))if(n>t)for(;n>t&&this.moveRight(e,i,o);)t=e.gridPosition;else for(;t>n&&this.moveLeft(e,i,o);)t=e.gridPosition},this),n>0&&this.calcDownData(n-1),this.layers.length-1>n&&this.calcUpData(n+1)},moveRight:function(e,t,n){var i,o,r=d.indexOf(t,e);return r===t.length-1?(e.gridPosition=e.gridPosition+.5,!0):(i=t[r+1],o=(i.upstreamPriority+i.downstreamPriority)/2,i.gridPosition>e.gridPosition+1?(e.gridPosition=e.gridPosition+.5,!0):o>n||Math.abs(o-n)<1e-4?!1:this.moveRight(i,t,n)?(e.gridPosition=e.gridPosition+.5,!0):!1)},moveLeft:function(e,t,n){var i,o,r=d.indexOf(t,e);return 0===r?(e.gridPosition=e.gridPosition-.5,!0):(i=t[r-1],o=(i.upstreamPriority+i.downstreamPriority)/2,e.gridPosition-1>i.gridPosition?(e.gridPosition=e.gridPosition-.5,!0):o>n||Math.abs(o-n)<1e-4?!1:this.moveLeft(i,t,n)?(e.gridPosition=e.gridPosition-.5,!0):!1)},mapVirtualNode:function(e,t){this.nodeToLinkMap.set(e,t),this.linkToNodeMap.containsKey(t)||this.linkToNodeMap.set(t,[]),this.linkToNodeMap.get(t).push(e)},_nodesInLink:function(e){return this.linkToNodeMap.get(this.nodeToLinkMap.get(e))},_dummify:function(){var e,t,n,i,s,a,l,u,h,f,p,g,m,v,_,y,w,b,x,k;for(this.linkToNodeMap=new c,this.nodeToLinkMap=new c,h=this.graph.links.slice(0),f=this.layers,p=function(e,t,n){f[e].linksTo[t]=f[e].linksTo[t]||[],f[e].linksTo[t].push(n)},u=0;h.length>u;u++)if(g=h[u],m=g.source,v=g.target,_=m.layer,y=v.layer,w=m.gridPosition,b=v.gridPosition,x=(b-w)/Math.abs(y-_),k=m,_-y>1){for(l=_-1;l>y;l--){for(n=new o,n.x=m.x,n.y=m.y,n.width=m.width/100,n.height=m.height/100,e=f[l],t=(l-y)*x+w,t>e.length&&(t=e.length),w>=f[_].length-1&&b>=f[y].length-1?t=e.length:0===w&&0===b&&(t=0),n.layer=l,n.uBaryCenter=0,n.dBaryCenter=0,n.upstreamLinkCount=0,n.downstreamLinkCount=0,n.gridPosition=t,n.isVirtual=!0,d.insert(e,n,t),s=t+1;e.length>s;s++)i=e[s],i.gridPosition=i.gridPosition+1;a=new r(k,n),a.depthOfDumminess=0,p(l-1,l,a),k=n,this.graph._addNode(n),this.graph.addLink(a),n.index=this.graph.nodes.length-1,this.mapVirtualNode(n,g)}p(y-1,y,a),g.changeSource(k),g.depthOfDumminess=_-y-1}else if(-1>_-y){for(l=_+1;y>l;l++){for(n=new o,n.x=m.x,n.y=m.y,n.width=m.width/100,n.height=m.height/100,e=f[l],t=(l-_)*x+w,t>e.length&&(t=e.length),w>=f[_].length-1&&b>=f[y].length-1?t=e.length:0===w&&0===b&&(t=0),n.layer=l,n.uBaryCenter=0,n.dBaryCenter=0,n.upstreamLinkCount=0,n.downstreamLinkCount=0,n.gridPosition=t,n.isVirtual=!0,t&=t,d.insert(e,n,t),s=t+1;e.length>s;s++)i=e[s],i.gridPosition=i.gridPosition+1;a=new r(k,n),a.depthOfDumminess=0,p(l-1,l,a),k=n,this.graph._addNode(n),this.graph.addLink(a),n.index=this.graph.nodes.length-1,this.mapVirtualNode(n,g)}p(y-1,y,g),g.changeSource(k),g.depthOfDumminess=y-_-1}else p(_,y,g)},_dedummify:function(){for(var e,t,n,i,o,r,s,a,l=!0;l;)for(l=!1,e=0;this.graph.links.length>e;e++)if(t=this.graph.links[e],t.depthOfDumminess){for(n=[],n.unshift({x:t.target.x,y:t.target.y}),n.unshift({x:t.source.x,y:t.source.y}),i=t,o=t.depthOfDumminess,r=0;o>r;r++)s=i.source,a=s.incoming[0],n.unshift({x:a.source.x,y:a.source.y}),i=a;t.changeSource(i.source),t.depthOfDumminess=0,n.length>2?(n.splice(0,1),n.splice(n.length-1),t.points=n):t.points=[],l=!0;break}},_optimizeCrossings:function(){for(var e,t=-1,n=3,i=0;0!==t&&!(i++>n);){for(t=0,e=this.layers.length-1;e>=1;e--)t+=this.optimizeLayerCrossings(!1,e);for(e=0;this.layers.length-1>e;e++)t+=this.optimizeLayerCrossings(!0,e)}},calcUpData:function(e){var t,n,i,o,r,s,a,l,c;if(0!==e){for(t=this.layers[e],r=new u,s=this.layers[e-1],n=0;s.length>n;n++)r.add(s[n]);for(n=0;t.length>n;n++){for(a=t[n],l=0,c=0,i=0;a.incoming.length>i;i++)o=a.incoming[i],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(i=0;a.outgoing.length>i;i++)o=a.outgoing[i],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.uBaryCenter=l/c,a.upstreamLinkCount=c):(a.uBaryCenter=n,a.upstreamLinkCount=0)}}},calcDownData:function(e){var t,n,i,o,r,s,a,l,c;if(e!==this.layers.length-1){for(t=this.layers[e],r=new u,s=this.layers[e+1],n=0;s.length>n;n++)r.add(s[n]);for(n=0;t.length>n;n++){for(a=t[n],l=0,c=0,i=0;a.incoming.length>i;i++)o=a.incoming[i],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(i=0;a.outgoing.length>i;i++)o=a.outgoing[i],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.dBaryCenter=l/c,a.downstreamLinkCount=c):(a.dBaryCenter=n,a.downstreamLinkCount=0)}}},optimizeLayerCrossings:function(e,t){var n,i,o,r,s,a,l,c;for(i=e?this.layers[n=t+1]:this.layers[n=t-1],o=i.slice(0),e?this.calcUpData(n):this.calcDownData(n),r=this,i.sort(function(e,t){var n,i=r.calcBaryCenter(e),o=r.calcBaryCenter(t);return Math.abs(i-o)<1e-4?e.degree()===t.degree()?r.compareByIndex(e,t):e.degree()<t.degree()?1:-1:(n=1e3*(o-i),n>0?-1:0>n?1:r.compareByIndex(e,t))}),a=0,s=0;i.length>s;s++)i[s]!==o[s]&&a++;if(a>0)for(l=0,s=0;i.length>s;s++)c=i[s],c.gridPosition=l++;return a},_swapPairs:function(){for(var e,t,n,i,o,r,s,a,l,c,u,h,d,f,p,g,m,v=this.options.layeredIterations,_=0;;){if(_++>v)break;for(e=1>=_%4,t=_%4===1,n=e?0:this.layers.length-1;e?this.layers.length-1>=n:n>=0;n+=e?1:-1){for(i=this.layers[n],o=!1,r=!0,s=0,a=0;i.length-1>a;a++)l=0,c=0,u=0,r?(0!==n&&(l=this.countLinksCrossingBetweenTwoLayers(n-1,n)),n!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(n,n+1)),e?l*=2:c*=2,u=l+c):u=s,0!==u&&(h=i[a],d=i[a+1],f=h.gridPosition,p=d.gridPosition,i[a]=d,i[a+1]=h,h.gridPosition=p,d.gridPosition=f,l=0,0!==n&&(l=this.countLinksCrossingBetweenTwoLayers(n-1,n)),c=0,n!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(n,n+1)),e?l*=2:c*=2,g=l+c,m=!1,m=t?g>=u:g>u,m?(h=i[a],d=i[a+1],f=h.gridPosition,p=d.gridPosition,i[a]=d,i[a+1]=h,h.gridPosition=p,d.gridPosition=f,s=u,r=!1):(o=!0,r=!0));o&&(n!==this.layers.length-1&&this.calcUpData(n+1),0!==n&&this.calcDownData(n-1))}}},countLinksCrossingBetweenTwoLayers:function(e,t){var n,i,o,r,s,a,l,c,u,h,d,f,p=this.layers[e].linksTo[t],g=0,m=p.length;for(l=0;m>l;l++)for(n=p[l],c=l+1;m>c;c++)i=p[c],n.target.layer===t?(o=n.source,r=n.target):(o=n.target,r=n.source),i.target.layer===t?(s=i.source,a=i.target):(s=i.target,a=i.source),u=o.gridPosition,h=r.gridPosition,d=s.gridPosition,f=a.gridPosition,0>(u-d)*(h-f)&&g++;return g},calcBaryCenter:function(e){var t=e.upstreamLinkCount,n=e.downstreamLinkCount,i=e.uBaryCenter,o=e.dBaryCenter;return t>0&&n>0?(i+o)/2:t>0?i:n>0?o:0},_gridPositionComparer:function(e,t){return t.gridPosition>e.gridPosition?-1:e.gridPosition>t.gridPosition?1:0},_positionAscendingComparer:function(e,t){return t.k>e.k?-1:e.k>t.k?1:0},_positionDescendingComparer:function(e,t){return t.k>e.k?1:e.k>t.k?-1:0},_firstVirtualNode:function(e){for(var t=0;e.length>t;t++)if(e[t].isVirtual)return t;return-1},compareByIndex:function(e,t){var n=e.index,i=t.index;return i>n?1:n>i?-1:0},intDiv:function(e,t){return(e-e%t)/t},nextVirtualNode:function(e,t){var n,i=t.layerIndex;for(n=i+1;e.length>n;++n)if(e[n].isVirtual)return e[n];return null}}),C=t.Class.extend({init:function(e,t){if(d.isUndefined(e))throw"No diagram given";this.diagram=e,this.nodeMap=new c,this.linkMap=new c,this.capture(t?t:e)},capture:function(e){var t,i,o,r,s,a,c,u,h;if(e instanceof n.Graph){for(r=0;e.nodes.length>r;r++)t=e.nodes[r],o=t.associatedShape,this.nodeMap.set(o.visual.id,new l(t.x,t.y,t.width,t.height));for(r=0;e.links.length>r;r++)a=e.links[r],s=a.associatedConnection,this.linkMap.set(s.visual.id,a.points())}else if(e instanceof Array)for(i=e,r=0;i.length>r;r++)t=i[r],o=t.associatedShape,o&&this.nodeMap.set(o.visual.id,new l(t.x,t.y,t.width,t.height));else if(e.hasOwnProperty("links")&&e.hasOwnProperty("nodes")){for(i=e.nodes,c=e.links,r=0;i.length>r;r++)t=i[r],o=t.associatedShape,o&&this.nodeMap.set(o.visual.id,new l(t.x,t.y,t.width,t.height));for(r=0;c.length>r;r++)a=c[r],s=a.associatedConnection,s&&this.linkMap.set(s.visual.id,a.points)}else{for(u=this.diagram.shapes,h=this.diagram.connections,r=0;u.length>r;r++)o=u[r],this.nodeMap.set(o.visual.id,o.bounds());for(r=0;h.length>r;r++)s=h[r],this.linkMap.set(s.visual.id,s.points())}}});s(n,{init:function(e){t.init(e,n.ui)},SpringLayout:w,TreeLayout:x,GraphAdapter:y,LayeredLayout:k,LayoutBase:_,LayoutState:C})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(){var e,t=this.options.anchor,n=t.outerWidth();k.wrap(this.element).addClass("k-split-wrapper"),e="border-box"!==this.element.css("box-sizing")?n-(this.element.outerWidth()-this.element.width()):n,this.element.css({fontFamily:t.css("font-family"),"min-width":e})}function i(e){e.target.is(".k-toggle-button")||e.target.toggleClass(O,"press"==e.type)}function o(t){return t=e(t),t.hasClass("km-actionsheet")?t.closest(".km-popup-wrapper"):t.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function r(e){e.preventDefault()}function s(t,n){var i="next"===n?e.fn.next:e.fn.prev,o="next"===n?e.fn.first:e.fn.last,r=i.call(t);return r.is(":kendoFocusable")||!r.length?r:r.find(":kendoFocusable").length?o.call(r.find(":kendoFocusable")):s(r,n)}var a,l,c,u,h,d,f,p,g,m,v,_,y,w,b,x,k=window.kendo,C=k.Class,S=k.ui.Widget,T=e.proxy,D=k.isFunction,A=k.keys,M="k-toolbar",E="k-button",P="k-overflow-button",I="k-toggle-button",R="k-button-group",B="k-split-button",F="k-separator",z="k-popup",L="k-toolbar-resizable",O="k-state-active",N="k-state-disabled",H="k-state-hidden",V="k-group-start",U="k-group-end",W="k-primary",j="k-icon",G="k-i-",q="k-button-icon",$="k-button-icontext",Y="k-list-container k-split-container",K="k-split-button-arrow",X="k-overflow-anchor",Q="k-overflow-container",Z="k-toolbar-first-visible",J="k-toolbar-last-visible",ee="click",te="toggle",ne="open",ie="close",oe="overflowOpen",re="overflowClose",se="never",ae="auto",le="always",ce="k-overflow-hidden",ue=k.attr("uid");k.toolbar={},a={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},k.toolbar.registerComponent=function(e,t,n){a[e]={toolbar:t,overflow:n}},l=k.Class.extend({addOverflowAttr:function(){this.element.attr(k.attr("overflow"),this.options.overflow||ae)},addUidAttr:function(){this.element.attr(ue,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(H).show(),this.options.hidden=!1},hide:function(){this.element.addClass(H).hide(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(e){e===t&&(e=!0),this.element.toggleClass(N,!e),this.options.enable=e},twin:function(){var e=this.element.attr(ue);return this.overflow?this.toolbar.element.find("["+ue+"='"+e+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ue+"='"+e+"']").data(this.options.type):t}}),k.toolbar.Item=l,c=l.extend({init:function(n,i){var o=e(n.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=o,this.options=n,this.toolbar=i,this.attributes(),n.primary&&o.addClass(W),n.togglable&&(o.addClass(I),this.toggle(n.selected)),n.url===t||n.useButtonTag||(o.attr("href",n.url),n.mobile&&o.attr(k.attr("role"),"button")),n.group&&(o.attr(k.attr("group"),n.group),(this.overflow&&this.options.overflow===le||!this.overflow)&&(this.group=this.toolbar.addToGroup(this,n.group))),!n.togglable&&n.click&&D(n.click)&&(this.clickHandler=n.click),n.togglable&&n.toggle&&D(n.toggle)&&(this.toggleHandler=n.toggle)},toggle:function(e,t){e=!!e,this.group&&e?this.group.select(this):this.group||this.select(e),t&&this.twin()&&this.twin().toggle(e)},getParentGroup:function(){return this.options.isChild?this.element.closest("."+R).data("buttonGroup"):t},_addGraphics:function(){var t,n,i,o=this.element,r=this.options.icon,s=this.options.spriteCssClass,a=this.options.imageUrl;(s||a||r)&&(t=!0,o.contents().not("span.k-sprite,span."+j+",img.k-image").each(function(n,i){(1==i.nodeType||3==i.nodeType&&e.trim(i.nodeValue).length>0)&&(t=!1)}),o.addClass(t?q:$)),r?(n=o.children("span."+j).first(),n[0]||(n=e('<span class="'+j+'"></span>').prependTo(o)),n.addClass(G+r)):s?(n=o.children("span.k-sprite").first(),n[0]||(n=e('<span class="k-sprite"></span>').prependTo(o)),n.addClass(s)):a&&(i=o.children("img.k-image").first(),i[0]||(i=e('<img alt="icon" class="k-image" />').prependTo(o)),i.attr("src",a))}}),k.toolbar.Button=c,u=c.extend({init:function(e,t){c.fn.init.call(this,e,t);var n=this.element;n.addClass(E),this.addIdAttr(),e.align&&n.addClass("k-align-"+e.align),"overflow"!=e.showText&&e.text&&n.html(e.mobile?'<span class="km-text">'+e.text+"</span>":e.text),e.hasIcon="overflow"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),e.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(e){e===t&&(e=!1),this.element.toggleClass(O,e),this.options.selected=e}}),k.toolbar.ToolBarButton=u,h=c.extend({init:function(e,t){this.overflow=!0,c.fn.init.call(this,e,t);var n=this.element;"toolbar"!=e.showText&&e.text&&n.html(e.mobile?'<span class="km-text">'+e.text+"</span>":'<span class="k-text">'+e.text+"</span>"),e.hasIcon="toolbar"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),e.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),n.addClass(P+" "+E),e.hidden&&this.hide(),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(ce)},select:function(e){e===t&&(e=!1),this.options.isChild?this.element.toggleClass(O,e):this.element.find(".k-button").toggleClass(O,e),this.options.selected=e}}),k.toolbar.OverflowButton=h,k.toolbar.registerComponent("button",u,h),d=l.extend({createButtons:function(t){var n,i,o=this.options,r=o.buttons||[];for(i=0;r.length>i;i++)r[i].uid||(r[i].uid=k.guid()),n=new t(e.extend({mobile:o.mobile,isChild:!0,type:"button"},r[i]),this.toolbar),n.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+H+"'):first").addClass(V),this.element.children().filter(":not('."+H+"'):last").addClass(U)}}),k.toolbar.ButtonGroup=d,f=d.extend({init:function(t,n){var i=this.element=e("<div></div>");this.options=t,this.toolbar=n,this.addIdAttr(),t.align&&i.addClass("k-align-"+t.align),this.createButtons(u),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(R),this.element.data({type:"buttonGroup",buttonGroup:this})}}),k.toolbar.ToolBarButtonGroup=f,p=d.extend({init:function(t,n){var i=this.element=e("<li></li>");this.options=t,this.toolbar=n,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(h),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((t.mobile?"":R)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.OverflowButtonGroup=p,k.toolbar.registerComponent("buttonGroup",f,p),g=l.extend({init:function(t,n){var i=this.element=e('<div class="'+B+'" tabindex="0"></div>');this.options=t,this.toolbar=n,this.mainButton=new u(t,n),this.arrowButton=e('<a class="'+E+" "+K+'"><span class="'+(t.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-s")+'"></span></a>'),this.popupElement=e('<ul class="'+Y+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),t.align&&i.addClass("k-align-"+t.align),t.id||(t.id=t.uid),i.attr("id",t.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var t=this;t.popupElement.on("keydown","."+E,function(n){var i=e(n.target).parent();n.preventDefault(),n.keyCode===A.ESC||n.keyCode===A.TAB||n.altKey&&n.keyCode===A.UP?(t.toggle(),t.focus()):n.keyCode===A.DOWN?s(i,"next").focus():n.keyCode===A.UP?s(i,"prev").focus():(n.keyCode===A.SPACEBAR||n.keyCode===A.ENTER)&&t.toolbar.userEvents.trigger("tap",{
|
|
target:e(n.target)})})},createMenuButtons:function(){var t,n,i=this.options,o=i.menuButtons;for(n=0;o.length>n;n++)t=new u(e.extend({mobile:i.mobile,type:"button",click:i.click},o[n]),this.toolbar),t.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var t=this.options,i=this.element;this.popupElement.attr("id",t.id+"_optionlist").attr(ue,t.rootUid),t.mobile&&(this.popupElement=o(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:t.mobile?e(t.mobile).children(".km-pane"):null,anchor:i,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:t.animation,open:n,activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(){i.focus()}}).data("kendoPopup"),this.popup.element.on(ee,"a.k-button",r)},remove:function(){this.popup.element.off(ee,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(e){e===t&&(e=!0),this.mainButton.enable(e),this.options.enable=e},focus:function(){this.element.focus()}}),k.toolbar.ToolBarSplitButton=g,m=l.extend({init:function(t,n){var i,o,r=this.element=e('<li class="'+B+'"></li>'),s=t.menuButtons;for(this.options=t,this.toolbar=n,this.overflow=!0,this.mainButton=new h(e.extend({isChild:!0},t)),this.mainButton.element.appendTo(r),o=0;s.length>o;o++)i=new h(e.extend({mobile:t.mobile,isChild:!0},s[o]),this.toolbar),i.element.appendTo(r);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,r.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.OverflowSplitButton=m,k.toolbar.registerComponent("splitButton",g,m),v=l.extend({init:function(t,n){var i=this.element=e("<div> </div>");this.element=i,this.options=t,this.toolbar=n,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(F),i.data({type:"separator",separator:this})}}),_=l.extend({init:function(t,n){var i=this.element=e("<li> </li>");this.element=i,this.options=t,this.toolbar=n,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(F),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.registerComponent("separator",v,_),y=l.extend({init:function(t,n,i){var o=D(t)?t(n):t;o=o instanceof jQuery?o.wrap("<div></div>").parent():e("<div></div>").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})}}),k.toolbar.TemplateItem=y,w=l.extend({init:function(t,n,i){var o=e(D(t)?t(n):t);o=o instanceof jQuery?o.wrap("<li></li>").parent():e("<li></li>").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.OverflowTemplateItem=w,b=C.extend({init:function(e){this.name=e,this.buttons=[]},add:function(e){this.buttons[this.buttons.length]=e},remove:function(t){var n=e.inArray(t,this.buttons);this.buttons.splice(n,1)},select:function(e){var t,n;for(n=0;this.buttons.length>n;n++)t=this.buttons[n],t.select(!1),t.twin()&&t.twin().select(!1);e.select(!0)}}),x=S.extend({init:function(t,n){var o,s=this;if(S.fn.init.call(s,t,n),n=s.options,t=s.wrapper=s.element,t.addClass(M+" k-widget"),this.uid=k.guid(),this._isRtl=k.support.isRtl(t),this._groups={},t.attr(ue,this.uid),s.isMobile="boolean"==typeof n.mobile?n.mobile:s.element.closest(".km-root")[0],s.animation=s.isMobile?{open:{effects:"fade"}}:{},s.isMobile&&(t.addClass("km-widget"),j="km-icon",G="km-",E="km-button",R="km-buttongroup km-widget",O="km-state-active",N="km-state-disabled"),n.resizable?(s._renderOverflow(),t.addClass(L),s.overflowUserEvents=new k.UserEvents(s.element,{threshold:5,allowSelection:!0,filter:"."+X,tap:T(s._toggleOverflow,s)}),s._resizeHandler=k.onResize(function(){s.resize()})):s.popup={element:e([])},n.items&&n.items.length)for(o=0;n.items.length>o;o++)s.add(n.items[o]);s.userEvents=new k.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+ue+"="+this.uid+"] ."+E+", ["+ue+"="+this.uid+"] ."+P,tap:T(s._buttonClick,s),press:i,release:i}),s.element.on(ee,"a.k-button",r),s._navigatable(),n.resizable&&s.popup.element.on(ee,NaN,r),n.resizable&&this._toggleOverflowAnchor(),k.notify(s)},events:[ee,te,ne,ie,oe,re],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(e,t){var n;return n=this._groups[t]?this._groups[t]:this._groups[t]=new b,n.add(e),n},destroy:function(){var t=this;t.element.find("."+B).each(function(t,n){e(n).data("kendoPopup").destroy()}),t.element.off(ee,"a.k-button"),t.userEvents.destroy(),t.options.resizable&&(k.unbindResize(t._resizeHandler),t.overflowUserEvents.destroy(),t.popup.element.off(ee,"a.k-button"),t.popup.destroy()),S.fn.destroy.call(t)},add:function(t){var n,i,o=a[t.type],r=t.template,s=this,l=s.isMobile?"":"k-item k-state-default",c=t.overflowTemplate;e.extend(t,{uid:k.guid(),animation:s.animation,mobile:s.isMobile,rootUid:s.uid}),r&&!c?t.overflow=se:t.overflow||(t.overflow=ae),t.overflow!==se&&s.options.resizable&&(c?i=new w(c,t,s):o&&(i=new o.overflow(t,s),i.element.addClass(l)),i&&(t.overflow===ae&&i.overflowHidden(),i.element.appendTo(s.popup.container),s.angular("compile",function(){return{elements:i.element.get()}}))),t.overflow!==le&&(r?n=new y(r,t,s):o&&(n=new o.toolbar(t,s)),n&&(s.options.resizable?(n.element.appendTo(s.element).css("visibility","hidden"),s._shrink(s.element.innerWidth()),n.element.css("visibility","visible")):n.element.appendTo(s.element),s.angular("compile",function(){return{elements:n.element.get()}})))},_getItem:function(e){var t,n,i,o,r=this.options.resizable;return t=this.element.find(e),o=t.length?t.data("type"):"",n=t.data(o),n&&n.main&&(t=t.parent("."+B),o="splitButton",n=t.data(o)),!t.length&&r&&(t=this.popup.element.find(e),o=t.data("type"),i=t.data(o)),i&&i.main&&(t=t.parent("."+B),o="splitButton",i=t.data(o)),n&&r&&(i=n.twin()),{type:o,toolbar:n,overflow:i}},remove:function(e){var t=this._getItem(e);t.toolbar&&t.toolbar.remove(),t.overflow&&t.overflow.remove(),this.resize(!0)},hide:function(e){var t=this._getItem(e);t.toolbar&&(t.toolbar.hide(),"button"===t.toolbar.options.type&&t.toolbar.options.isChild&&t.toolbar.getParentGroup().refresh()),t.overflow&&(t.overflow.hide(),"button"===t.overflow.options.type&&t.overflow.options.isChild&&t.overflow.getParentGroup().refresh()),this.resize(!0)},show:function(e){var t=this._getItem(e);t.toolbar&&(t.toolbar.show(),"button"===t.toolbar.options.type&&t.toolbar.options.isChild&&t.toolbar.getParentGroup().refresh()),t.overflow&&(t.overflow.show(),"button"===t.overflow.options.type&&t.overflow.options.isChild&&t.overflow.getParentGroup().refresh()),this.resize(!0)},enable:function(e,n){var i=this._getItem(e);t===n&&(n=!0),i.toolbar&&i.toolbar.enable(n),i.overflow&&i.overflow.enable(n)},getSelectedFromGroup:function(e){return this.element.find("."+I+"[data-group='"+e+"']").filter("."+O)},toggle:function(n,i){var o=e(n),r=o.data("button");r.options.togglable&&(i===t&&(i=!0),r.toggle(i,!0))},_renderOverflow:function(){var t=this,n=a.overflowContainer,i=t._isRtl,r=i?"left":"right";t.overflowAnchor=e(a.overflowAnchor).addClass(E),t.element.append(t.overflowAnchor),t.isMobile?(t.overflowAnchor.append('<span class="km-icon km-more"></span>'),n=o(n)):t.overflowAnchor.append('<span class="k-icon k-i-arrow-s"></span>'),t.popup=new k.ui.Popup(n,{origin:"bottom "+r,position:"top "+r,anchor:t.overflowAnchor,isRtl:i,animation:t.animation,appendTo:t.isMobile?e(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(n){var o=k.wrap(t.popup.element).addClass("k-overflow-wrapper");t.isMobile?t.popup.container.css("max-height",parseFloat(e(".km-content:visible").innerHeight())-15+"px"):o.css("margin-left",(i?-1:1)*((o.outerWidth()-o.width())/2+1)),t.trigger(oe)&&n.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){t.trigger(re)&&e.preventDefault(),this.element.focus()}}),t.popup.element.on("keydown","."+E,function(n){var i,o=e(n.target),r=o.parent(),a=r.is("."+R)||r.is("."+B);n.preventDefault(),n.keyCode===A.ESC||n.keyCode===A.TAB||n.altKey&&n.keyCode===A.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):n.keyCode===A.DOWN?(i=!a||a&&o.is(":last-child")?r:o,s(i,"next").focus()):n.keyCode===A.UP?(i=!a||a&&o.is(":first-child")?r:o,s(i,"prev").focus()):(n.keyCode===A.SPACEBAR||n.keyCode===A.ENTER)&&t.userEvents.trigger("tap",{target:e(n.target)})}),t.popup.container=t.isMobile?t.popup.element.find("."+Q):t.popup.element,t.popup.container.attr(ue,this.uid)},_toggleOverflowAnchor:function(){this.overflowAnchor.css(this.popup.element.children(":not(."+ce+", ."+z+")").length>0?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(n){var i,o,r,s,a,l,c=this,u=n.target.closest("."+K).length;return n.preventDefault(),u?(c._toggle(n),t):(o=e(n.target).closest("."+E,c.element),o.hasClass(X)||(r=o.data("button"),!r&&c.popup&&(o=e(n.target).closest("."+P,c.popup.container),r=o.parent("li").data("button")),r&&r.options.enable&&(r.options.togglable?(a=D(r.toggleHandler)?r.toggleHandler:null,r.toggle(!r.options.selected,!0),l={target:o,group:r.options.group,checked:r.options.selected,id:r.options.id},a&&a.call(c,l),c.trigger(te,l)):(a=D(r.clickHandler)?r.clickHandler:null,l={sender:c,target:o,id:r.options.id},a&&a.call(c,l),c.trigger(ee,l)),r.options.url&&(window.location.href=r.options.url),o.hasClass(P)&&c.popup.close(),s=o.closest(".k-split-container"),s[0]&&(i=s.data("kendoPopup"),(i?i:s.parents(".km-popup-wrapper").data("kendoPopup")).close()))),t)},_navigatable:function(){var t=this;t.element.attr("tabindex",0).focus(function(){var t=e(this).find(":kendoFocusable:first");t.is("."+X)&&(t=s(t,"next")),t[0].focus()}).on("keydown",T(t._keydown,t))},_keydown:function(n){var i,o,r,s,a=e(n.target),l=n.keyCode,c=this.element.children(":not(.k-separator):visible");return l===A.TAB&&(i=a.parentsUntil(this.element).last(),o=!1,i.length||(i=a),i.is("."+X)&&(n.shiftKey&&n.preventDefault(),c.last().is(":kendoFocusable")?c.last().focus():c.last().find(":kendoFocusable").last().focus()),n.shiftKey||c.index(i)!==c.length-1||(o=i.is("."+R)?a.is(":last-child"):!0),o&&(n.preventDefault(),this.overflowAnchor.focus())),n.altKey&&l===A.DOWN?(r=e(document.activeElement).data("splitButton"),s=e(document.activeElement).is("."+X),r?r.toggle():s&&this._toggleOverflow(),t):l===A.SPACEBAR||l===A.ENTER?(n.preventDefault(),a.is("."+B)&&(a=a.children().first()),this.userEvents.trigger("tap",{target:a}),t):t},_toggle:function(t){var n,i=e(t.target).closest("."+B).data("splitButton");t.preventDefault(),i.options.enable&&(n=i.popup.element.is(":visible")?this.trigger(ie,{target:i.element}):this.trigger(ne,{target:i.element}),n||i.toggle())},_toggleOverflow:function(){this.popup.toggle()},_resize:function(e){var t=e.width;this.options.resizable&&(this.popup.close(),this._shrink(t),this._stretch(t),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var t=0;return this.element.children(":visible:not('."+H+"')").each(function(){t+=e(this).outerWidth(!0)}),Math.ceil(t)},_shrink:function(e){var t,n,i;if(e<this._childrenWidth())for(n=this.element.children(":visible:not([data-overflow='never'], ."+X+")"),i=n.length-1;i>=0&&(t=n.eq(i),!(e>this._childrenWidth()));i--)this._hideItem(t)},_stretch:function(e){var t,n,i;if(e>this._childrenWidth())for(n=this.element.children(":hidden:not('."+H+"')"),i=0;n.length>i&&(t=n.eq(i),!(e<this._childrenWidth())&&this._showItem(t,e));i++);},_hideItem:function(e){e.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").removeClass(ce)},_showItem:function(e,t){return e.length&&t>this._childrenWidth()+e.outerWidth(!0)?(e.show(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(ce),!0):!1},_markVisibles:function(){var e=this.popup.container.children(),t=this.element.children(":not(.k-overflow-anchor)"),n=e.filter(":not(.k-overflow-hidden)"),i=t.filter(":visible");e.add(t).removeClass(Z+" "+J),n.first().add(i.first()).addClass(Z),n.last().add(i.last()).addClass(J)}}),k.ui.plugin(x)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t,n,i){var o,r=e.getFullYear(),s=t.getFullYear(),a=n.getFullYear();return r-=r%i,o=r+(i-1),s>r&&(r=s),o>a&&(o=a),r+"-"+o}function i(e){for(var t,n=0,i=e.min,o=e.max,r=e.start,s=e.setter,l=e.build,c=e.cells||12,u=e.perRow||4,h=e.content||P,d=e.empty||I,f=e.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';c>n;n++)n>0&&n%u===0&&(f+='</tr><tr role="row">'),r=new pe(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0),S(r,0),t=l(r,n),f+=a(r,i,o)?h(t):d(t),s(r,1);return f+"</tr></tbody></table>"}function o(e,t,n){var i=e.getFullYear(),o=t.getFullYear(),r=o,s=0;return n&&(o-=o%n,r=o-o%n+n-1),i>r?s=1:o>i&&(s=-1),s}function r(){var e=new pe;return new pe(e.getFullYear(),e.getMonth(),e.getDate())}function s(e,t,n){var i=r();return e&&(i=new pe(+e)),t>i?i=new pe(+t):i>n&&(i=new pe(+n)),i}function a(e,t,n){return+e>=+t&&+n>=+e}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function c(e,t,n){t=t instanceof pe?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function u(t){e(this).toggleClass($,ie.indexOf(t.type)>-1||t.type==te)}function h(e){e.preventDefault()}function d(e){return A(e).calendars.standard}function f(e){var n=ge[e.start],i=ge[e.depth],o=A(e.culture);e.format=T(e.format||o.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=U),(i===t||i>n)&&(e.depth=U),e.dates||(e.dates=[])}function p(e){B&&e.find("*").attr("unselectable","on")}function g(e,t){for(var n=0,i=t.length;i>n;n++)if(e===+t[n])return!0;return!1}function m(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function v(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth():!1}var _,y=window.kendo,w=y.support,b=y.ui,x=b.Widget,k=y.keys,C=y.parseDate,S=y.date.adjustDST,T=y._extractFormat,D=y.template,A=y.getCulture,M=y.support.transitions,E=M?M.css+"transform-origin":"",P=D('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),I=D('<td role="gridcell"> </td>',{useWithBlock:!1}),R=y.support.browser,B=R.msie&&9>R.version,F=".kendoCalendar",z="click"+F,L="keydown"+F,O="id",N="min",H="left",V="slideIn",U="month",W="century",j="change",G="navigate",q="value",$="k-state-hover",Y="k-state-disabled",K="k-state-focused",X="k-other-month",Q=' class="'+X+'"',Z="k-nav-today",J="td:has(.k-link)",ee="blur"+F,te="focus",ne=te+F,ie=w.touch?"touchstart":"mouseenter",oe=w.touch?"touchstart"+F:"mouseenter"+F,re=w.touch?"touchend"+F+" touchmove"+F:"mouseleave"+F,se=6e4,ae=864e5,le="_prevArrow",ce="_nextArrow",ue="aria-disabled",he="aria-selected",de=e.proxy,fe=e.extend,pe=Date,ge={month:0,year:1,decade:2,century:3},me=x.extend({init:function(t,n){var i,o,r=this;x.fn.init.call(r,t,n),t=r.wrapper=r.element,n=r.options,n.url=window.unescape(n.url),r._templates(),r._header(),r._footer(r.footer),o=t.addClass("k-widget k-calendar").on(oe+" "+re,J,u).on(L,"table.k-content",de(r._move,r)).on(z,J,function(t){var n=t.currentTarget.firstChild;-1!=n.href.indexOf("#")&&t.preventDefault(),r._click(e(n))}).on("mouseup"+F,"table.k-content, .k-footer",function(){r._focusView(r.options.focusOnNav!==!1)}).attr(O),o&&(r._cellID=o+"_cell_selected"),f(n),i=C(n.value,n.format,n.culture),r._index=ge[n.start],r._current=new pe(+s(i,n.min,n.max)),r._addClassProxy=function(){r._active=!0,r._cell.addClass(K)},r._removeClassProxy=function(){r._active=!1,r._cell.removeClass(K)},r.value(i),y.notify(r)},options:{name:"Calendar",value:null,min:new pe(1900,0,1),max:new pe(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:U,depth:U,animation:{horizontal:{effects:V,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[j,G],setOptions:function(e){var t=this;f(e),e.dates[0]||(e.dates=t.options.dates),x.fn.setOptions.call(t,e),t._templates(),t._footer(t.footer),t._index=ge[t.options.start],t.navigate()},destroy:function(){var e=this,t=e._today;e.element.off(F),e._title.off(F),e[le].off(F),e[ce].off(F),y.destroy(e._table),t&&y.destroy(t.off(F)),x.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.focus()},min:function(e){return this._option(N,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(le,-1)},navigateToFuture:function(){this._navigate(ce,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(Y)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,o=n.options.depth;if(e)return i===ge[o]?(+n._value!=+e&&(n.value(e),n.trigger(j)),t):(n.navigate(e,--i),t)},navigate:function(n,i){i=isNaN(i)?ge[i]:i;var o,r,a,l,c=this,u=c.options,h=u.culture,d=u.min,f=u.max,g=c._title,m=c._table,v=c._oldTable,y=c._value,w=c._current,b=n&&+n>+w,x=i!==t&&i!==c._index;n||(n=w),c._current=n=new pe(+s(n,d,f)),i===t?i=c._index:c._index=i,c._view=r=_.views[i],a=r.compare,l=i===ge[W],g.toggleClass(Y,l).attr(ue,l),l=a(n,d)<1,c[le].toggleClass(Y,l).attr(ue,l),l=a(n,f)>-1,c[ce].toggleClass(Y,l).attr(ue,l),m&&v&&v.data("animating")&&(v.kendoStop(!0,!0),m.kendoStop(!0,!0)),c._oldTable=m,(!m||c._changeView)&&(g.html(r.title(n,d,f,h)),c._table=o=e(r.content(fe({min:d,max:f,date:n,url:u.url,dates:u.dates,format:u.format,culture:h},c[r.name]))),p(o),c._animate({from:m,to:o,vertical:x,future:b}),c._focus(n),c.trigger(G)),i===ge[u.depth]&&y&&c._class("k-state-selected",r.toDateString(y)),c._class(K,r.toDateString(n)),!m&&c._cell&&c._cell.removeClass(K),c._changeView=!0},value:function(e){var n=this,i=n._view,o=n.options,r=n._view,s=o.min,l=o.max;return e===t?n._value:(e=C(e,o.format,o.culture),null!==e&&(e=new pe(+e),a(e,s,l)||(e=null)),n._value=e,r&&null===e&&n._cell?n._cell.removeClass("k-state-selected"):(n._changeView=!e||i&&0!==i.compare(e,n._current),n.navigate(e)),t)},_move:function(t){var n,i,o,r,a=this,l=a.options,c=t.keyCode,u=a._view,h=a._index,d=new pe(+a._current),f=y.support.isRtl(a.wrapper);return t.target===a._table[0]&&(a._active=!0),t.ctrlKey?c==k.RIGHT&&!f||c==k.LEFT&&f?(a.navigateToFuture(),i=!0):c==k.LEFT&&!f||c==k.RIGHT&&f?(a.navigateToPast(),i=!0):c==k.UP?(a.navigateUp(),i=!0):c==k.DOWN&&(a._click(e(a._cell[0].firstChild)),i=!0):(c==k.RIGHT&&!f||c==k.LEFT&&f?(n=1,i=!0):c==k.LEFT&&!f||c==k.RIGHT&&f?(n=-1,i=!0):c==k.UP?(n=0===h?-7:-4,i=!0):c==k.DOWN?(n=0===h?7:4,i=!0):c==k.ENTER?(a._click(e(a._cell[0].firstChild)),i=!0):c==k.HOME||c==k.END?(o=c==k.HOME?"first":"last",r=u[o](d),d=new pe(r.getFullYear(),r.getMonth(),r.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),i=!0):c==k.PAGEUP?(i=!0,a.navigateToPast()):c==k.PAGEDOWN&&(i=!0,a.navigateToFuture()),(n||o)&&(o||u.setDate(d,n),a._focus(s(d,l.min,l.max)))),i&&t.preventDefault(),a._current},_animate:function(e){var t=this,n=e.from,i=e.to,o=t._active;n?n.parent().data("animating")?(n.off(F),n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(o)):n.is(":visible")&&t.options.animation!==!1?t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(n),n.off(F).remove(),t._focusView(o)):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,o=i._active,r=i.options.animation.horizontal,s=r.effects,a=e.outerWidth();s&&-1!=s.indexOf(V)&&(e.add(t).css({width:a}),e.wrap("<div/>"),i._focusView(o,e),e.parent().css({position:"relative",width:2*a,"float":H,"margin-left":n?0:-a}),t[n?"insertAfter":"insertBefore"](e),fe(r,{effects:V+":"+(n?"right":H),complete:function(){e.off(F).remove(),i._oldTable=null,t.unwrap(),i._focusView(o)}}),e.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(e,t){var n,i,o=this,r=o.options.animation.vertical,s=r.effects,a=o._active;s&&-1!=s.indexOf("zoom")&&(t.css({position:"absolute",top:e.prev().outerHeight(),left:0}).insertBefore(e),E&&(n=o._cellByDate(o._view.toDateString(o._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),t.css(E,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(F).remove(),o._oldTable=null,t.css({position:"static",top:0,left:0}),o._focusView(a)}}),t.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(t){return this._table.find("td:not(."+X+")").filter(function(){return e(this.firstChild).attr(y.attr(q))===t})},_class:function(t,n){var i=this,o=i._cellID,r=i._cell;r&&r.removeAttr(he).removeAttr("aria-label").removeAttr(O),r=i._table.find("td:not(."+X+")").removeClass(t).filter(function(){return e(this.firstChild).attr(y.attr(q))===n}).attr(he,!0),t!==K||i._active||i.options.focusOnNav===!1||(t=""),r.addClass(t),r[0]&&(i._cell=r),o&&(r.attr(O,o),i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",o))},_bindTable:function(e){e.on(ne,this._addClassProxy).on(ee,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date(+t._current),o=e.attr(y.attr(q)).split("/");o=new pe(o[0],o[1],o[2]),S(o,0),t._view.setDate(i,o),t.navigateDown(s(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(K,n.toDateString(e)))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,o=r(),s=i.element,a=s.find(".k-footer");return n?(a[0]||(a=e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(s)),i._today=a.show().find(".k-link").html(n(o)).attr("title",y.toString(o,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),a.hide(),t)},_header:function(){var e,t=this,n=t.element;n.find(".k-header")[0]||n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-w"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next"><span class="k-icon k-i-arrow-e"></span></a></div>'),e=n.find(".k-link").on(oe+" "+re+" "+ne+" "+ee,u).click(!1),t._title=e.eq(1).on(z,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[le]=e.eq(0).on(z,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[ce]=e.eq(2).on(z,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var n=this,i=n._index+1,o=new pe(+n._current);e=n[e],e.hasClass(Y)||(i>3?o.setFullYear(o.getFullYear()+100*t):_.views[i].setDate(o,t),n.navigate(o))},_option:function(e,n){var i,o=this,r=o.options,s=o._value||o._current;return n===t?r[e]:(n=C(n,r.format,r.culture),n&&(r[e]=new pe(+n),i=e===N?n>s:s>n,(i||v(s,n))&&(i&&(o._value=null),o._changeView=!0),o._changeView||(o._changeView=!(!r.month.content&&!r.month.empty)),o.navigate(o._value),o._toggle()),t)},_toggle:function(e){var n=this,i=n.options,o=n._today;e===t&&(e=a(r(),i.min,i.max)),o&&(o.off(z),e?o.addClass(Z).removeClass(Y).on(z,de(n._todayClick,n)):o.removeClass(Z).addClass(Y).on(z,h))},_todayClick:function(e){var t=this,n=ge[t.options.depth],i=r();e.preventDefault(),0===t._view.compare(t._current,i)&&t._index==n&&(t._changeView=!1),t._value=i,t.navigate(i,n),t.trigger(j)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,o=i.content,r=i.empty;e.month={content:D('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+y.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(o||"#=data.value#")+"</a></td>",{useWithBlock:!!o}),empty:D('<td role="gridcell">'+(r||" ")+"</td>",{useWithBlock:!!r})},e.footer=n!==!1?D(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}):null}});b.plugin(me),_={firstDayOfMonth:function(e){return new pe(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||y.culture().calendar;for(var n=t.firstDay,i=new pe(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)_.setTime(i,-1*ae);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new pe(e.getTime()+t),o=i.getTimezoneOffset()-n;e.setTime(i.getTime()+o*se)},views:[{name:U,title:function(e,t,n,i){return d(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){for(var t=this,n=0,o=e.min,r=e.max,s=e.date,a=e.dates,c=e.format,u=e.culture,h=e.url,f=h&&a[0],p=d(u),m=p.firstDay,v=p.days,w=l(v.names,m),b=l(v.namesShort,m),x=_.firstVisibleDay(s,p),k=t.first(s),C=t.last(s),T=t.toDateString,D=new pe,A='<table tabindex="0" role="grid" class="k-content" cellspacing="0"><thead><tr role="row">';7>n;n++)A+='<th scope="col" title="'+w[n]+'">'+b[n]+"</th>";return D=new pe(D.getFullYear(),D.getMonth(),D.getDate()),S(D,0),D=+D,i({cells:42,perRow:7,html:A+='</tr></thead><tbody><tr role="row">',start:x,min:new pe(o.getFullYear(),o.getMonth(),o.getDate()),max:new pe(r.getFullYear(),r.getMonth(),r.getDate()),content:e.content,empty:e.empty,setter:t.setDate,build:function(e){var t=[],n=e.getDay(),i="",o="#";return(k>e||e>C)&&t.push(X),+e===D&&t.push("k-today"),(0===n||6===n)&&t.push("k-weekend"),f&&g(+e,a)&&(o=h.replace("{0}",y.toString(e,c,u)),i=" k-action-link"),{date:e,dates:a,ns:y.ns,title:y.toString(e,"D",u),value:e.getDate(),dateString:T(e),cssClass:t[0]?' class="'+t.join(" ")+'"':"",linkClass:i,url:o}}})},first:function(e){return _.firstDayOfMonth(e)},last:function(e){var t=new pe(e.getFullYear(),e.getMonth()+1,0),n=_.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),o=e.getFullYear(),r=t.getMonth(),s=t.getFullYear();return n=o>s?1:s>o?-1:i==r?0:i>r?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof pe?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):_.setTime(e,t*ae),S(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=d(e.culture).months.namesAbbr,n=this.toDateString,o=e.min,r=e.max;return i({min:new pe(o.getFullYear(),o.getMonth(),1),max:new pe(r.getFullYear(),r.getMonth(),1),start:new pe(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:y.ns,dateString:n(e),cssClass:""}}})},first:function(e){return new pe(e.getFullYear(),0,e.getDate())},last:function(e){return new pe(e.getFullYear(),11,e.getDate())},compare:function(e,t){return o(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof pe?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),S(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:new pe(t-t%10-1,0,1),min:new pe(e.min.getFullYear(),0,1),max:new pe(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:y.ns,dateString:n(e),cssClass:0===t||11==t?Q:""}}})},first:function(e){var t=e.getFullYear();return new pe(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new pe(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return o(e,t,10)},setDate:function(e,t){c(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:W,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),o=e.max.getFullYear(),r=this.toDateString,s=n,a=o;return s-=s%10,a-=a%10,10>a-s&&(a=s+9),i({start:new pe(t-t%100-10,0,1),min:new pe(s,0,1),max:new pe(a,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),s=i+9;return n>i&&(i=n),s>o&&(s=o),{ns:y.ns,value:i+" - "+s,dateString:r(e),cssClass:0===t||11==t?Q:""}}})},first:function(e){var t=e.getFullYear();return new pe(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new pe(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return o(e,t,100)},setDate:function(e,t){c(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},_.isEqualDatePart=m,_.makeUnselectable=p,_.restrictValue=s,_.isInRange=a,_.normalize=f,_.viewsEnum=ge,y.calendar=_}(window.kendo.jQuery)}(),function(){!function(e,t){function n(t){var n=t.parseFormats,i=t.format;z.normalize(t),n=e.isArray(n)?n:[n],n.length||n.push("yyyy-MM-dd"),-1===e.inArray(i,n)&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var o,r=window.kendo,s=r.ui,a=s.Widget,l=r.parseDate,c=r.keys,u=r.template,h=r._activeElement,d="<div />",f="<span />",p=".kendoDatePicker",g="click"+p,m="open",v="close",_="change",y="disabled",w="readonly",b="k-state-default",x="k-state-focused",k="k-state-selected",C="k-state-disabled",S="k-state-hover",T="mouseenter"+p+" mouseleave"+p,D="mousedown"+p,A="id",M="min",E="max",P="month",I="aria-disabled",R="aria-expanded",B="aria-hidden",F="aria-readonly",z=r.calendar,L=z.isInRange,O=z.restrictValue,N=z.isEqualDatePart,H=e.extend,V=e.proxy,U=Date,W=function(t){var n,i=this,o=document.body,a=e(d).attr(B,"true").addClass("k-calendar-container").appendTo(o);i.options=t=t||{},n=t.id,n&&(n+="_dateview",a.attr(A,n),i._dateViewID=n),i.popup=new s.Popup(a,H(t.popup,t,{name:"Popup",isRtl:r.support.isRtl(t.anchor)})),i.div=a,i.value(t.value)};W.prototype={_calendar:function(){var t,n=this,o=n.calendar,a=n.options;o||(t=e(d).attr(A,r.guid()).appendTo(n.popup.element).on(D,i).on(g,"td:has(.k-link)",V(n._click,n)),n.calendar=o=new s.Calendar(t),n._setOptions(a),r.calendar.makeUnselectable(o.element),o.navigate(n._value||n._current,a.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,start:e.start})},setOptions:function(e){var t=this.options;this.options=H(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(M,e)},max:function(e){this._option(E,e)},toggle:function(){var e=this;e[e.popup.visible()?v:m]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,o=e.ctrlKey&&n==c.DOWN||n==c.ENTER,r=!1;if(e.altKey)n==c.DOWN?(t.open(),e.preventDefault(),r=!0):n==c.UP&&(t.close(),e.preventDefault(),r=!0);else if(t.popup.visible()){if(n==c.ESC||o&&i._cell.hasClass(k))return t.close(),e.preventDefault(),!0;t._current=i._move(e),r=!0}return r},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options;t._value=e,t._current=new U(+O(e,i.min,i.max)),n&&n.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(k)&&this.close()},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},W.normalize=n,r.DateView=W,o=a.extend({init:function(t,i){var o,s,c=this;a.fn.init.call(c,t,i),t=c.element,i=c.options,i.min=l(t.attr("min"))||l(i.min),i.max=l(t.attr("max"))||l(i.max),n(i),c._initialOptions=H({},i),c._wrapper(),c.dateView=new W(H({},i,{id:t.attr(A),anchor:c.wrapper,change:function(){c._change(this.value()),c.close()},close:function(e){c.trigger(v)?e.preventDefault():(t.attr(R,!1),s.attr(B,!0))},open:function(e){var n,i=c.options;c.trigger(m)?e.preventDefault():(c.element.val()!==c._oldText&&(n=l(t.val(),i.parseFormats,i.culture),
|
|
c.dateView[n?"current":"value"](n)),t.attr(R,!0),s.attr(B,!1),c._updateARIA(n))}})),s=c.dateView.div,c._icon();try{t[0].setAttribute("type","text")}catch(u){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":c.dateView._dateViewID}),c._reset(),c._template(),o=t.is("[disabled]")||e(c.element).parents("fieldset").is(":disabled"),o?c.enable(!1):c.readonly(t.is("[readonly]")),c._old=c._update(i.value||c.element.val()),c._oldText=t.val(),r.notify(c)},events:[m,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:P,depth:P,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,i=t._value;a.fn.setOptions.call(t,e),e=t.options,e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),i&&(t.element.val(r.toString(i,e.format,e.culture)),t._updateARIA(i))},_editable:function(e){var t=this,n=t._dateIcon.off(p),o=t.element.off(p),r=t._inputWrapper.off(p),s=e.readonly,a=e.disable;s||a?(r.addClass(a?C:b).removeClass(a?b:C),o.attr(y,a).attr(w,s).attr(I,a).attr(F,s)):(r.addClass(b).removeClass(C).on(T,t._toggleHover),o.removeAttr(y).removeAttr(w).attr(I,!1).attr(F,!1).on("keydown"+p,V(t._keydown,t)).on("focusout"+p,V(t._blur,t)).on("focus"+p,function(){t._inputWrapper.addClass(x)}),n.on(g,V(t._click,t)).on(D,i))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;a.fn.destroy.call(e),e.dateView.destroy(),e.element.off(p),e._dateIcon.off(p),e._inputWrapper.off(p),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(M,e)},max:function(e){return this._option(E,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(x)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),r.support.touch||t[0]===h()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t._typing||t.element.trigger(_),t.trigger(_)),t._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),o=!1;n.popup.visible()||e.keyCode!=c.ENTER||i===t._oldText?(o=n.move(e),t._updateARIA(n._current),o||(t._typing=!0)):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span>').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,o=i.options;return n===t?o[e]:(n=l(n,o.parseFormats,o.culture),n&&(o[e]=new U(+n),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,o=i.min,s=i.max,a=n._value,c=l(e,i.parseFormats,i.culture),u=null===c&&null===a||c instanceof Date&&a instanceof Date;return+c===+a&&u?(t=r.toString(c,i.format,i.culture),t!==e&&n.element.val(null===c?e:t),c):(null!==c&&N(c,o)?c=O(c,o,s):L(c,o,s)||(c=null),n._value=c,n.dateView.value(c),n.element.val(c?r.toString(c,i.format,i.culture):e),n._updateARIA(c),c)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(f).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(f).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),s.plugin(o)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){return'<span unselectable="on" class="k-link"><span unselectable="on" class="k-icon k-i-arrow-'+e+'" title="'+t+'">'+t+"</span></span>"}var i=window.kendo,o=i.caret,r=i.keys,s=i.ui,a=s.Widget,l=i._activeElement,c=i._extractFormat,u=i.parseFloat,h=i.support.placeholder,d=i.getCulture,f=i._round,p="change",g="disabled",m="readonly",v="k-input",_="spin",y=".kendoNumericTextBox",w="touchend",b="mouseleave"+y,x="mouseenter"+y+" "+b,k="k-state-default",C="k-state-focused",S="k-state-hover",T="focus",D=".",A="k-state-selected",M="k-state-disabled",E="aria-disabled",P="aria-readonly",I=/^(-)?(\d*)$/,R=null,B=e.proxy,F=e.extend,z=a.extend({init:function(n,o){var r,s,l,u,h,d=this,f=o&&o.step!==t;a.fn.init.call(d,n,o),o=d.options,n=d.element.on("focusout"+y,B(d._focusout,d)).attr("role","spinbutton"),o.placeholder=o.placeholder||n.attr("placeholder"),d._initialOptions=F({},o),d._reset(),d._wrapper(),d._arrows(),d._input(),i.support.mobileOS?d._text.on(w+y+" "+T+y,function(){d._toggleText(!1),n.focus()}):d._text.on(T+y,B(d._click,d)),r=d.min(n.attr("min")),s=d.max(n.attr("max")),l=d._parse(n.attr("step")),o.min===R&&r!==R&&(o.min=r),o.max===R&&s!==R&&(o.max=s),f||l===R||(o.step=l),n.attr("aria-valuemin",o.min).attr("aria-valuemax",o.max),o.format=c(o.format),u=o.value,d.value(u!==R?u:n.val()),h=n.is("[disabled]")||e(d.element).parents("fieldset").is(":disabled"),h?d.enable(!1):d.readonly(n.is("[readonly]")),i.notify(d)},options:{name:"NumericTextBox",decimals:R,min:R,max:R,value:R,step:1,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},events:[p,_],_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t._text.add(n),s=t._inputWrapper.off(x);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+y).off("keypress"+y).off("paste"+y),o||i?(s.addClass(i?M:k).removeClass(i?k:M),r.attr(g,i).attr(m,o).attr(E,i).attr(P,o)):(s.addClass(k).removeClass(M).on(x,t._toggleHover),r.removeAttr(g).removeAttr(m).attr(E,!1).attr(P,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(A)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(A)}),t.element.on("keydown"+y,B(t._keydown,t)).on("keypress"+y,B(t._keypress,t)).on("paste"+y,B(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(y),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),a.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n,i=this;return e===t?i._value:(e=i._parse(e),n=i._adjust(e),e===n&&(i._update(e),i._old=i._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,i=n.min,o=n.max;return e===R?e:(i!==R&&i>e?e=i:o!==R&&e>o&&(e=o),e)},_arrows:function(){var t,o=this,r=function(){clearTimeout(o._spinning),t.removeClass(A)},s=o.options,a=s.spinners,l=o.element;t=l.siblings(".k-icon"),t[0]||(t=e(n("n",s.upArrowText)+n("s",s.downArrowText)).insertAfter(l),t.wrapAll('<span class="k-select"/>')),a||(t.parent().toggle(a),o._inputWrapper.addClass("k-expand-padding")),o._upArrow=t.eq(0),o._upArrowEventHandler=new i.UserEvents(o._upArrow,{release:r}),o._downArrow=t.eq(1),o._downArrowEventHandler=new i.UserEvents(o._downArrow,{release:r})},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,i,r,s=e.target,a=o(s)[0],l=s.value.substring(0,a),c=t._format(t.options.format),u=c[","],h=0;u&&(i=RegExp("\\"+u,"g"),r=RegExp("([\\d\\"+u+"]+)(\\"+c[D]+")?(\\d+)?")),r&&(n=r.exec(l)),n&&(h=n[0].replace(i,"").length,-1!=l.indexOf("(")&&0>t._value&&h++),t._focusin(),o(t.element[0],h)})},_change:function(e){var t=this;t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(p),t.trigger(p)),t._typing=!1},_culture:function(e){return e||d(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(C),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(C).removeClass(S),e._blur()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,i="k-formatted-value",o=n.element.addClass(v).show()[0],r=o.accessKey,s=n.wrapper;t=s.find(D+i),t[0]||(t=e('<input type="text"/>').insertBefore(o).addClass(i));try{o.setAttribute("type","text")}catch(a){o.type="text"}t[0].tabIndex=o.tabIndex,t[0].style.cssText=o.style.cssText,t[0].title=o.title,t.prop("placeholder",n.options.placeholder),r&&(t.attr("accesskey",r),o.accessKey=""),n._text=t.addClass(o.className)},_keydown:function(e){var t=this,n=e.keyCode;t._key=n,n==r.DOWN?t._step(-1):n==r.UP?t._step(1):n==r.ENTER?t._change(t.element.val()):t._typing=!0},_keypress:function(e){var t,n,i,s,a,l,c,u,h,d,f;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===r.BACKSPACE||e.keyCode===r.ENTER||(t=this,n=t.options.min,i=t.element,s=o(i),a=s[0],l=s[1],c=String.fromCharCode(e.which),u=t._format(t.options.format),h=t._key===r.NUMPAD_DOT,d=i.val(),h&&(c=u[D]),d=d.substring(0,a)+c+d.substring(l),f=t._numericRegex(u).test(d),f&&h?(i.val(d),o(i,a+c.length),e.preventDefault()):(null!==n&&n>=0&&"-"===d.charAt(0)||!f)&&e.preventDefault(),t._key=0)},_numericRegex:function(e){var t=this,n=e[D],i=t.options.decimals;return n===D&&(n="\\"+n),i===R&&(i=e.decimals),0===i?I:(t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d*)?)|("+n+"\\d*)))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value;setTimeout(function(){t._parse(n.value)===R&&t._update(i)})},_option:function(e,n){var i=this,o=i.options;return n===t?o[e]:(n=i._parse(n),(n||"step"!==e)&&(o[e]=n,i.element.attr("aria-value"+e,n).attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._parse(n.val())||0;l()!=n[0]&&t._focusin(),i+=t.options.step*e,t._update(t._adjust(i)),t._typing=!1,t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return u(e,this._culture(t),this.options.format)},_update:function(e){var t,n=this,o=n.options,r=o.format,s=o.decimals,a=n._culture(),l=n._format(r,a);s===R&&(s=l.decimals),e=n._parse(e,a),t=e!==R,t&&(e=parseFloat(f(e,s))),n._value=e=n._adjust(e),n._placeholder(i.toString(e,r,a)),t?(e=""+e,-1!==e.indexOf("e")&&(e=f(+e,s)),e=e.replace(D,l[D])):e="",n.element.val(e).attr("aria-valuenow",e)},_placeholder:function(e){this._text.val(e),h||e||this._text.val(this.options.placeholder)},_wrapper:function(){var t,n=this,i=n.element,o=i[0];t=i.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=o.style.cssText,o.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(o.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=o.on("reset",t._resetHandler))}});s.plugin(z)}(window.kendo.jQuery)}(),function(){!function(e){function t(t){var n,i=a.ui.validator.ruleResolvers||{},o={};for(n in i)e.extend(!0,o,i[n].resolve(t));return o}function n(e){return e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function i(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function o(t){return e(e.parseHTML?e.parseHTML(t):t)}function r(t,n){var i,o,r,s,l=e();for(r=0,s=t.length;s>r;r++)i=t[r],h.test(i.className)&&(o=i.getAttribute(a.attr("for")),o===n&&(l=l.add(i)));return l}var s,a=window.kendo,l=a.ui.Widget,c=".kendoValidator",u="k-invalid-msg",h=RegExp(u,"i"),d="k-invalid",f="k-valid",p=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,g=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,m=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",v=":checkbox:not([disabled],[readonly])",_="[type=number],[type=range]",y="blur",w="name",b="form",x="novalidate",k=e.proxy,C=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)},S=function(e,t,n){var i=e.val();return e.filter(t).length&&""!==i?C(i,n):!0},T=function(e,t){return e.length?null!=e[0].attributes[t]:!1};a.ui.validator||(a.ui.validator={rules:{},messages:{}}),s=l.extend({init:function(n,i){var o=this,r=t(n),s="["+a.attr("validate")+"!=false]";i=i||{},i.rules=e.extend({},a.ui.validator.rules,r.rules,i.rules),i.messages=e.extend({},a.ui.validator.messages,r.messages,i.messages),l.fn.init.call(o,n,i),o._errorTemplate=a.template(o.options.errorTemplate),o.element.is(b)&&o.element.attr(x,x),o._inputSelector=m+s,o._checkboxSelector=v+s,o._errors={},o._attachEvents(),o._isValidated=!1},events:["validate","change"],options:{name:"Validator",errorTemplate:'<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-warning"> </span> #=message#</span>',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date",dateCompare:"End date should be greater than or equal to the start date"},rules:{required:function(e){var t=e.filter("[type=checkbox]").length&&!e.is(":checked"),n=e.val();return!(T(e,"required")&&(""===n||!n||t))},pattern:function(e){return e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length&&""!==e.val()?C(e.val(),e.attr("pattern")):!0},min:function(e){if(e.filter(_+",["+a.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=a.parseFloat(e.val());return n>=t}return!0},max:function(e){if(e.filter(_+",["+a.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=a.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(_+",["+a.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,o=parseFloat(e.attr("step"))||1,r=parseFloat(e.val()),s=i(o);return s?(t=Math.pow(10,s),Math.floor((r-n)*t)%(o*t)/Math.pow(100,s)===0):(r-n)%o===0}return!0},email:function(e){return S(e,"[type=email],["+a.attr("type")+"=email]",p)},url:function(e){return S(e,"[type=url],["+a.attr("type")+"=url]",g)},date:function(e){return e.filter("[type^=date],["+a.attr("type")+"=date]").length&&""!==e.val()?null!==a.parseDate(e.val(),e.attr(a.attr("format"))):!0}},validateOnBlur:!0},destroy:function(){l.fn.destroy.call(this),this.element.off(c)},value:function(){return this._isValidated?0===this.errors().length:!1},_submit:function(e){return this.validate()?!0:(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger("change")},_attachEvents:function(){var t=this;t.element.is(b)&&t.element.on("submit"+c,k(t._submit,t)),t.options.validateOnBlur&&(t.element.is(m)?(t.element.on(y+c,function(){t._checkElement(t.element)}),t.element.is(v)&&t.element.on("click"+c,function(){t._checkElement(t.element)})):(t.element.on(y+c,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+c,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,n,i,o=!1,r=this.value();if(this._errors={},this.element.is(m))o=this.validateInput(this.element);else{for(i=!1,e=this.element.find(this._inputSelector),t=0,n=e.length;n>t;t++)this.validateInput(e.eq(t))||(i=!0);o=!i}return this.trigger("validate",{valid:o}),r!==o&&this.trigger("change"),o},validateInput:function(t){var i,r,s,l,c,h,p,g,m,v;return t=e(t),this._isValidated=!0,i=this,r=i._errorTemplate,s=i._checkValidity(t),l=s.valid,c="."+u,h=t.attr(w)||"",p=i._findMessageContainer(h).add(t.next(c).filter(function(){var t=e(this);return t.filter("["+a.attr("for")+"]").length?t.attr(a.attr("for"))===h:!0})).hide(),t.removeAttr("aria-invalid"),l?delete i._errors[h]:(g=i._extractMessage(t,s.key),i._errors[h]=g,m=o(r({message:n(g)})),v=p.attr("id"),i._decorateMessageContainer(m,h),v&&m.attr("id",v),p.replaceWith(m).length||m.insertAfter(t),m.show(),t.attr("aria-invalid",!0)),t.toggleClass(d,!l),t.toggleClass(f,l),l},hideMessages:function(){var e=this,t="."+u,n=e.element;n.is(m)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){var n,i,o,s=a.ui.validator.messageLocators,l=e();for(i=0,o=this.element.length;o>i;i++)l=l.add(r(this.element[i].getElementsByTagName("*"),t));for(n in s)l=l.add(s[n].locate(this.element,t));return l},_decorateMessageContainer:function(e,t){var n,i=a.ui.validator.messageLocators;e.addClass(u).attr(a.attr("for"),t||"");for(n in i)i[n].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var n=this,i=n.options.messages[t],o=e.attr(w);return i=a.isFunction(i)?i(e):i,a.format(e.attr(a.attr(t+"-msg"))||e.attr("validationMessage")||e.attr("title")||i||"",o,e.attr(t))},_checkValidity:function(e){var t,n=this.options.rules;for(t in n)if(!n[t].call(this,e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],n=this._errors;for(e in n)t.push(n[e]);return t}}),a.ui.plugin(s)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function i(t){t.find(":input:not(:button, ["+a.attr("role")+"=upload], ["+a.attr("skip")+"], [type=file]), select").each(function(){var t=a.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",o=this.name;-1===n.indexOf(i)&&o&&(n+=(n.length?",":"")+i+o,e(this).attr(t,n))})}function o(e){var t,i,o=(e.model.fields||e.model)[e.field],r=n(o),s=o?o.validation:{},l=a.attr("type"),c=a.attr("bind"),u={name:e.field};for(t in s)i=s[t],p(t,_)>=0?u[l]=t:d(i)||(u[t]=f(i)?i.value||t:i),u[a.attr(t+"-msg")]=i.message;return p(r,_)>=0&&(u[l]=r),u[c]=("boolean"===r?"checked:":"value:")+e.field,u}function r(e){var t,n,i,o,r,s;if(e&&e.length)for(s=[],t=0,n=e.length;n>t;t++)i=e[t],r=i.text||i.value||i,o=null==i.value?i.text||i:i.value,s[t]={text:r,value:o};return s}function s(e,t){var n,i,o=e?e.validation||{}:{};for(n in o)i=o[n],f(i)&&i.value&&(i=i.value),d(i)&&(t[n]=i)}var a=window.kendo,l=a.ui,c=l.Widget,u=e.extend,h=a.support.browser.msie&&9>a.support.browser.version,d=a.isFunction,f=e.isPlainObject,p=e.inArray,g=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,m='<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',v="change",_=["url","email","number","date","boolean"],y={number:function(t,n){var i=o(n);e('<input type="text"/>').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},date:function(t,n){var i=o(n),r=n.format;r&&(r=a._extractFormat(r)),i[a.attr("format")]=r,e('<input type="text"/>').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},string:function(t,n){var i=o(n);e('<input type="text" class="k-input k-textbox"/>').attr(i).appendTo(t)},"boolean":function(t,n){var i=o(n);e('<input type="checkbox" />').attr(i).appendTo(t)},values:function(t,n){var i=o(n),s=a.stringify(r(n.values));e("<select "+a.attr("text-field")+'="text"'+a.attr("value-field")+'="value"'+a.attr("source")+"='"+(s?s.replace(/\'/g,"'"):s)+"'"+a.attr("role")+'="dropdownlist"/>').attr(i).appendTo(t),e("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)}},w=c.extend({init:function(t,n){var i=this;n.target&&(n.$angular=n.target.options.$angular),c.fn.init.call(i,t,n),i._validateProxy=e.proxy(i._validate,i),i.refresh()},events:[v],options:{name:"Editable",editors:y,clearContainer:!0,errorTemplate:m},editor:function(e,t){var i=this,o=i.options.editors,r=f(e),s=r?e.field:e,l=i.options.model||{},c=r&&e.values,h=c?"values":n(t),d=r&&e.editor,p=d?e.editor:o[h],m=i.element.find("["+a.attr("container-for")+"="+s.replace(g,"\\$1")+"]");p=p?p:o.string,d&&"string"==typeof e.editor&&(p=function(t){t.append(e.editor)}),m=m.length?m:i.element,p(m,u(!0,{},r?e:{field:s},{model:l}))},_validate:function(t){var n,i=this,o=t.value,r=i._validationEventInProgress,s={},l=a.attr("bind"),c=t.field.replace(g,"\\$1"),u=RegExp("(value|checked)\\s*:\\s*"+c+"\\s*(,|$)");s[t.field]=t.value,n=e(":input["+l+'*="'+c+'"]',i.element).filter("["+a.attr("validate")+"!='false']").filter(function(){return u.test(e(this).attr(l))}),n.length>1&&(n=n.filter(function(){var t=e(this);return!t.is(":radio")||t.val()==o}));try{i._validationEventInProgress=!0,(!i.validatable.validateInput(n)||!r&&i.trigger(v,{values:s}))&&t.preventDefault()}finally{i._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element}}),c.fn.destroy.call(e),e.options.model.unbind("set",e._validateProxy),a.unbind(e.element),e.validatable&&e.validatable.destroy(),a.destroy(e.element),e.element.removeData("kendoValidator"),e.element.is("["+a.attr("role")+"=editable]")&&e.element.removeAttr(a.attr("role"))},refresh:function(){var n,o,r,l,c,u,d,p,g=this,m=g.options.fields||[],v=g.options.clearContainer?g.element.empty():g.element,_=g.options.model||{},y={};for(e.isArray(m)||(m=[m]),n=0,o=m.length;o>n;n++)r=m[n],l=f(r),c=l?r.field:r,u=(_.fields||_)[c],s(u,y),g.editor(r,u);if(g.options.target&&g.angular("compile",function(){return{elements:v,data:v.map(function(){return{dataItem:_}})}}),!o){d=_.fields||_;for(c in d)s(d[c],y)}i(v),g.validatable&&g.validatable.destroy(),a.bind(v,g.options.model),g.options.model.unbind("set",g._validateProxy),g.options.model.bind("set",g._validateProxy),g.validatable=new a.ui.Validator(v,{validateOnBlur:!1,errorTemplate:g.options.errorTemplate||t,rules:y}),p=v.find(":kendoFocusable").eq(0).focus(),h&&p.focus()}});l.plugin(w)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e){return t!==e}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),parseInt(t,10))}function o(e,t){return function(){var n=this,i=n.wrapper,o=i[0].style,r=n.options;return r.isMaximized||r.isMinimized?n:(n.restoreOptions={width:o.width,height:o.height},i.children(k).hide().end().children(b).find(G).parent().hide().eq(0).before(J.action({name:"Restore"})),t.call(n),"maximize"==e?n.wrapper.children(b).find(Y).parent().hide():n.wrapper.children(b).find(Y).parent().show(),n)}}function r(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function s(e){var t=this;t.owner=e,t._draggable=new u(e.wrapper,{filter:">"+k,group:e.wrapper.id+"-resizing",dragstart:f(t.dragstart,t),drag:f(t.drag,t),dragend:f(t.dragend,t)}),t._draggable.userEvents.bind("press",f(t.addOverlay,t)),t._draggable.userEvents.bind("release",f(t.removeOverlay,t))}function a(e,t){var n=this;n.owner=e,n._draggable=new u(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:f(n.dragstart,n),drag:f(n.drag,n),dragend:f(n.dragend,n),dragcancel:f(n.dragcancel,n)}),n._draggable.userEvents.stopPropagation=!1}var l=window.kendo,c=l.ui.Widget,u=l.ui.Draggable,h=e.isPlainObject,d=l._activeElement,f=e.proxy,p=e.extend,g=e.each,m=l.template,v="body",_=".kendoWindow",y=".k-window",w=".k-window-title",b=w+"bar",x=".k-window-content",k=".k-resize-handle",C=".k-overlay",S="k-content-frame",T="k-loading",D="k-state-hover",A="k-state-focused",M="k-window-maximized",E=":visible",P="hidden",I="cursor",R="open",B="activate",F="deactivate",z="close",L="refresh",O="resize",N="resizeEnd",H="dragstart",V="dragend",U="error",W="overflow",j="zIndex",G=".k-window-actions .k-i-minimize,.k-window-actions .k-i-maximize",q=".k-i-pin",$=".k-i-unpin",Y=q+","+$,K=".k-window-titlebar .k-window-action",X=".k-window-titlebar .k-i-refresh",Q=l.isLocalUrl,Z=c.extend({init:function(i,o){var s,a,u,d,p,g,m,v=this,k={},C=!1,S=o&&o.actions&&!o.actions.length;c.fn.init.call(v,i,o),o=v.options,d=o.position,i=v.element,p=o.content,S&&(o.actions=[]),v.appendTo=e(o.appendTo),p&&!h(p)&&(p=o.content={url:p}),i.find("script").filter(r).remove(),i.parent().is(v.appendTo)||d.top!==t&&d.left!==t||(i.is(E)?(k=i.offset(),C=!0):(a=i.css("visibility"),u=i.css("display"),i.css({visibility:P,display:""}),k=i.offset(),i.css({visibility:a,display:u})),d.top===t&&(d.top=k.top),d.left===t&&(d.left=k.left)),n(o.visible)&&null!==o.visible||(o.visible=i.is(E)),s=v.wrapper=i.closest(y),i.is(".k-content")&&s[0]||(i.addClass("k-window-content k-content"),v._createWindow(i,o),s=v.wrapper=i.closest(y),v._dimensions()),v._position(),o.pinned&&v.pin(!0),p&&v.refresh(p),o.visible&&v.toFront(),g=s.children(x),v._tabindex(g),o.visible&&o.modal&&v._overlay(s.is(E)).css({opacity:.5}),s.on("mouseenter"+_,K,f(v._buttonEnter,v)).on("mouseleave"+_,K,f(v._buttonLeave,v)).on("click"+_,"> "+K,f(v._windowActionHandler,v)),g.on("keydown"+_,f(v._keydown,v)).on("focus"+_,f(v._focus,v)).on("blur"+_,f(v._blur,v)),this._resizable(),this._draggable(),m=i.attr("id"),m&&(m+="_wnd_title",s.children(b).children(w).attr("id",m),g.attr({role:"dialog","aria-labelledby":m})),s.add(s.children(".k-resize-handle,"+b)).on("mousedown"+_,f(v.toFront,v)),v.touchScroller=l.touchScroller(i),v._resizeHandler=f(v._onDocumentResize,v),v._marker=l.guid().substring(0,8),e(window).on("resize"+_+v._marker,v._resizeHandler),o.visible&&(v.trigger(R),v.trigger(B)),l.notify(v)},_buttonEnter:function(t){e(t.currentTarget).addClass(D)},_buttonLeave:function(t){e(t.currentTarget).removeClass(D)},_focus:function(){this.wrapper.addClass(A)},_blur:function(){this.wrapper.removeClass(A)},_dimensions:function(){var e,t,n=this.wrapper,o=this.options,r=o.width,s=o.height,a=o.maxHeight,l=["minWidth","minHeight","maxWidth","maxHeight"];for(this.title(o.title),e=0;l.length>e;e++)t=o[l[e]],t&&t!=1/0&&n.css(l[e],t);a&&a!=1/0&&this.element.css("maxHeight",a),r&&n.width((""+r).indexOf("%")>0?r:i(r,o.minWidth,o.maxWidth)),s&&n.height((""+s).indexOf("%")>0?s:i(s,o.minHeight,o.maxHeight)),o.visible||n.hide()},_position:function(){var e=this.wrapper,t=this.options.position;0===t.top&&(t.top=""+t.top),0===t.left&&(t.left=""+t.left),e.css({top:t.top||"",left:t.left||""})},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_resize:function(){l.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&(n.off("dblclick"+_).children(k).remove(),this.resizing.destroy(),this.resizing=null),t&&(n.on("dblclick"+_,b,f(function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),g("n e s w se sw ne nw".split(" "),function(e,t){n.append(J.resizeHandle(t))}),this.resizing=new s(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new a(this,e.dragHandle||b))},_actions:function(){var t=this.options.actions,n=this.wrapper.children(b),i=n.find(".k-window-actions");t=e.map(t,function(e){return{name:e}}),i.html(l.render(J.action,t))},setOptions:function(e){var n,i;c.fn.setOptions.call(this,e),n=this.options.scrollable!==!1,this.restore(),this._dimensions(),this._position(),this._resizable(),this._draggable(),this._actions(),t!==e.modal&&(i=this.options.visible!==!1,this._overlay(e.modal&&i)),this.element.css(W,n?"":"hidden")},events:[R,B,F,z,L,O,N,H,V,U],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:"body"},_closable:function(){return e.inArray("close",e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydown:function(e){var t,n,o,r,s,a,c=this,u=c.options,h=l.keys,d=e.keyCode,f=c.wrapper,p=10,g=c.options.isMaximized;e.target!=e.currentTarget||c._closing||(d==h.ESC&&c._closable()&&c._close(!1),!u.draggable||e.ctrlKey||g||(t=l.getOffset(f),d==h.UP?n=f.css("top",t.top-p):d==h.DOWN?n=f.css("top",t.top+p):d==h.LEFT?n=f.css("left",t.left-p):d==h.RIGHT&&(n=f.css("left",t.left+p))),u.resizable&&e.ctrlKey&&!g&&(d==h.UP?(n=!0,
|
|
r=f.height()-p):d==h.DOWN&&(n=!0,r=f.height()+p),d==h.LEFT?(n=!0,o=f.width()-p):d==h.RIGHT&&(n=!0,o=f.width()+p),n&&(s=i(o,u.minWidth,u.maxWidth),a=i(r,u.minHeight,u.maxHeight),isNaN(s)||(f.width(s),c.options.width=s+"px"),isNaN(a)||(f.height(a),c.options.height=a+"px"),c.resize())),n&&e.preventDefault())},_overlay:function(t){var n=this.appendTo.children(C),i=this.wrapper;return n.length||(n=e("<div class='k-overlay' />")),n.insertBefore(i[0]).toggle(t).css(j,parseInt(i.css(j),10)-1),n},_actionForIcon:function(e){var t=/\bk-i-\w+\b/.exec(e[0].className)[0];return{"k-i-close":"_close","k-i-maximize":"maximize","k-i-minimize":"minimize","k-i-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[t]},_windowActionHandler:function(n){var i,o;if(!this._closing)return i=e(n.target).closest(".k-window-action").find(".k-icon"),o=this._actionForIcon(i),o?(n.preventDefault(),this[o](),!1):t},_modals:function(){var t=this,n=e(y).filter(function(){var n=e(this),i=t._object(n),o=i&&i.options;return o&&o.modal&&o.visible&&o.appendTo===t.options.appendTo&&n.is(E)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(x),i=l.widgetInstance(n);return i instanceof Z?i:t},center:function(){var t,n,i=this,o=i.options.position,r=i.wrapper,s=e(window),a=0,l=0;return i.options.isMaximized?i:(i.options.pinned||(a=s.scrollTop(),l=s.scrollLeft()),n=l+Math.max(0,(s.width()-r.width())/2),t=a+Math.max(0,(s.height()-r.height()-parseInt(r.css("paddingTop"),10))/2),r.css({left:n,top:t}),o.top=t,o.left=n,i)},title:function(e){var t,n=this,i=n.wrapper,o=n.options,r=i.children(b),s=r.children(w);return arguments.length?(e===!1?(i.addClass("k-window-titleless"),r.remove()):(r.length?s.html(e):(i.prepend(J.titlebar(o)),n._actions(),r=i.children(b)),t=r.outerHeight(),i.css("padding-top",t),r.css("margin-top",-t)),n.options.title=e,n):s.text()},content:function(e,t){var i=this.wrapper.children(x),o=i.children(".km-scroll-container");return i=o[0]?o:i,n(e)?(this.angular("cleanup",function(){return{elements:i.children()}}),l.destroy(this.element.children()),i.empty().html(e),this.angular("compile",function(){var e,n=[];for(e=i.length;--e>=0;)n.push({dataItem:t});return{elements:i.children(),data:n}}),this):i.html()},open:function(){var t,n,i=this,o=i.wrapper,r=i.options,s=this._animationOptions("open"),a=o.children(x),c=e(document);return i.trigger(R)||(i._closing&&o.kendoStop(!0,!0),i._closing=!1,i.toFront(),r.autoFocus&&i.element.focus(),r.visible=!0,r.modal&&(t=i._overlay(!1),t.kendoStop(!0,!0),s.duration&&l.effects.Fade?(n=l.fx(t).fadeIn(),n.duration(s.duration||0),n.endValue(.5),n.play()):t.css("opacity",.5),t.show()),o.is(E)||(a.css(W,P),o.show().kendoStop().kendoAnimate({effects:s.effects,duration:s.duration,complete:f(this._activate,this)}))),r.isMaximized&&(i._documentScrollTop=c.scrollTop(),i._documentScrollLeft=c.scrollLeft(),e("html, body").css(W,P)),i},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css(W,e?"":"hidden"),this.trigger(B)},_removeOverlay:function(n){var i,o=this._modals(),r=this.options,s=r.modal&&!o.length,a=r.modal?this._overlay(!0):e(t),c=this._animationOptions("close");s?!n&&c.duration&&l.effects.Fade?(i=l.fx(a).fadeOut(),i.duration(c.duration||0),i.startValue(.5),i.play()):this._overlay(!1).remove():o.length&&this._object(o.last())._overlay(!0)},_close:function(t){var n=this,i=n.wrapper,o=n.options,r=this._animationOptions("open"),s=this._animationOptions("close"),a=e(document);if(i.is(E)&&!n.trigger(z,{userTriggered:!t})){if(n._closing)return;n._closing=!0,o.visible=!1,e(y).each(function(t,n){var o=e(n).children(x);n!=i&&o.find("> ."+S).length>0&&o.children(C).remove()}),this._removeOverlay(),i.kendoStop().kendoAnimate({effects:s.effects||r.effects,reverse:s.reverse===!0,duration:s.duration,complete:f(this._deactivate,this)})}n.options.isMaximized&&(e("html, body").css(W,""),n._documentScrollTop&&n._documentScrollTop>0&&a.scrollTop(n._documentScrollTop),n._documentScrollLeft&&n._documentScrollLeft>0&&a.scrollLeft(n._documentScrollLeft))},_deactivate:function(){var e,t=this;t.wrapper.hide().css("opacity",""),t.trigger(F),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(K+","+K+" .k-icon,:input,a")},_shouldFocus:function(t){var n=d(),i=this.element;return this.options.autoFocus&&!e(n).is(i)&&!this._actionable(t)&&(!i.find(n).length||!i.find(t).length)},toFront:function(t){var n,i,o=this,r=o.wrapper,s=r[0],a=+r.css(j),l=a,c=t&&t.target||null;return e(y).each(function(t,n){var i=e(n),o=i.css(j),r=i.children(x);isNaN(o)||(a=Math.max(+o,a)),n!=s&&r.find("> ."+S).length>0&&r.append(J.overlay)}),(!r[0].style.zIndex||a>l)&&r.css(j,a+2),o.element.find("> .k-overlay").remove(),o._shouldFocus(c)&&(o.element.focus(),n=e(window).scrollTop(),i=parseInt(r.position().top,10),i>0&&n>i&&(n>0?e(window).scrollTop(i):r.css("top",n))),r=null,o},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,n=t.options,i=n.minHeight,o=t.restoreOptions,r=e(document);return n.isMaximized||n.isMinimized?(i&&i!=1/0&&t.wrapper.css("min-height",i),t.wrapper.css({position:n.pinned?"fixed":"absolute",left:o.left,top:o.top,width:o.width,height:o.height}).removeClass(M).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-restore").parent().remove().end().end().find(G).parent().show().end().end().find(Y).parent().show(),t.options.width=o.width,t.options.height=o.height,e("html, body").css(W,""),this._documentScrollTop&&this._documentScrollTop>0&&r.scrollTop(this._documentScrollTop),this._documentScrollLeft&&this._documentScrollLeft>0&&r.scrollLeft(this._documentScrollLeft),n.isMaximized=n.isMinimized=!1,t.resize(),t):t},maximize:o("maximize",function(){var t=this,n=t.wrapper,i=n.position(),o=e(document);p(t.restoreOptions,{left:i.left,top:i.top}),n.css({left:0,top:0,position:"fixed"}).addClass(M),this._documentScrollTop=o.scrollTop(),this._documentScrollLeft=o.scrollLeft(),e("html, body").css(W,P),t.options.isMaximized=!0,t._onDocumentResize()}),minimize:o("minimize",function(){var e=this;e.wrapper.css({height:"",minHeight:""}),e.element.hide(),e.options.isMinimized=!0}),pin:function(t){var n=this,i=e(window),o=n.wrapper,r=parseInt(o.css("top"),10),s=parseInt(o.css("left"),10);(t||!n.options.pinned&&!n.options.isMaximized)&&(o.css({position:"fixed",top:r-i.scrollTop(),left:s-i.scrollLeft()}),o.children(b).find(q).addClass("k-i-unpin").removeClass("k-i-pin"),n.options.pinned=!0)},unpin:function(){var t=this,n=e(window),i=t.wrapper,o=parseInt(i.css("top"),10),r=parseInt(i.css("left"),10);t.options.pinned&&!t.options.isMaximized&&(i.css({position:"",top:o+n.scrollTop(),left:r+n.scrollLeft()}),i.children(b).find($).addClass("k-i-pin").removeClass("k-i-unpin"),t.options.pinned=!1)},_onDocumentResize:function(){var t,n,i=this,o=i.wrapper,r=e(window),s=l.support.zoomLevel();i.options.isMaximized&&(t=r.width()/s,n=r.height()/s-parseInt(o.css("padding-top"),10),o.css({width:t,height:n}),i.options.width=t,i.options.height=n,i.resize())},refresh:function(t){var i,o,r,s=this,a=s.options,l=e(s.element);return h(t)||(t={url:t}),t=p({},a.content,t),o=n(a.iframe)?a.iframe:t.iframe,r=t.url,r?(n(o)||(o=!Q(r)),o?(i=l.find("."+S)[0],i?i.src=r||i.src:l.html(J.contentFrame(p({},a,{content:t}))),l.find("."+S).unbind("load"+_).on("load"+_,f(this._triggerRefresh,this))):s._ajaxRequest(t)):(t.template&&s.content(m(t.template)({})),s.trigger(L)),l.toggleClass("k-window-iframecontent",!!o),s},_triggerRefresh:function(){this.trigger(L)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(X).removeClass(T)},_ajaxError:function(e,t){this.trigger(U,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=m(e)(t||{})),this.content(n,t),this.element.prop("scrollTop",0),this.trigger(L)}},_showLoading:function(){this.wrapper.find(X).addClass(T)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(f(this._showLoading,this),100),e.ajax(p({type:"GET",dataType:"html",cache:!1,error:f(this._ajaxError,this),complete:f(this._ajaxComplete,this),success:f(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(_).children(x).off(_).end().find(".k-resize-handle,.k-window-titlebar").off(_),e(window).off("resize"+_+this._marker),clearTimeout(this._loadingIconTimeout),c.fn.destroy.call(this),this.unbind(t),l.destroy(this.wrapper),this._removeOverlay(!0)},destroy:function(){this._destroy(),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t,n,i=this.element,o=this.options,r=l.support.isRtl(i);o.scrollable===!1&&i.attr("style","overflow:hidden;"),n=e(J.wrapper(o)),t=i.find("iframe:not(.k-content)").map(function(){var e=this.getAttribute("src");return this.src="",e}),n.toggleClass("k-rtl",r).appendTo(this.appendTo).append(i).find("iframe:not(.k-content)").each(function(e){this.src=t[e]}),n.find(".k-window-title").css(r?"left":"right",n.find(".k-window-actions").outerWidth()+10),i.css("visibility","").show(),i.find("[data-role=editor]").each(function(){var t=e(this).data("kendoEditor");t&&t.refresh()}),n=i=null}}),J={wrapper:m("<div class='k-widget k-window' />"),action:m("<a role='button' href='\\#' class='k-window-action k-link'><span role='presentation' class='k-icon k-i-#= name.toLowerCase() #'>#= name #</span></a>"),titlebar:m("<div class='k-window-titlebar k-header'> <span class='k-window-title'>#= title #</span><div class='k-window-actions' /></div>"),overlay:"<div class='k-overlay' />",contentFrame:m("<iframe frameborder='0' title='#= title #' class='"+S+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:m("<div class='k-resize-handle k-resize-#= data #'></div>")};s.prototype={addOverlay:function(){this.owner.wrapper.append(J.overlay)},removeOverlay:function(){this.owner.wrapper.find(C).remove()},dragstart:function(t){var n=this,i=n.owner,o=i.wrapper;n.elementPadding=parseInt(o.css("padding-top"),10),n.initialPosition=l.getOffset(o,"position"),n.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),n.initialSize={width:o.width(),height:o.height()},n.containerOffset=l.getOffset(i.appendTo,"position"),o.children(k).not(t.currentTarget).hide(),e(v).css(I,t.currentTarget.css(I))},drag:function(e){var t,n,o,r,s=this,a=s.owner,l=a.wrapper,c=a.options,u=s.resizeDirection,h=s.containerOffset,d=s.initialPosition,f=s.initialSize,p=Math.max(e.x.location,h.left),g=Math.max(e.y.location,h.top);u.indexOf("e")>=0?(t=p-d.left,l.width(i(t,c.minWidth,c.maxWidth))):u.indexOf("w")>=0&&(r=d.left+f.width,t=i(r-p,c.minWidth,c.maxWidth),l.css({left:r-t-h.left,width:t})),u.indexOf("s")>=0?(n=g-d.top-s.elementPadding,l.height(i(n,c.minHeight,c.maxHeight))):u.indexOf("n")>=0&&(o=d.top+f.height,n=i(o-g,c.minHeight,c.maxHeight),l.css({top:o-n-h.top,height:n})),t&&(a.options.width=t+"px"),n&&(a.options.height=n+"px"),a.resize()},dragend:function(t){var n=this,i=n.owner,o=i.wrapper;return o.children(k).not(t.currentTarget).show(),e(v).css(I,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&o.css(n.initialPosition).css(n.initialSize),i.trigger(N),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},a.prototype={dragstart:function(t){var n=this.owner,i=n.element,o=i.find(".k-window-actions"),r=l.getOffset(n.appendTo);n.trigger(H),n.initialWindowPosition=l.getOffset(n.wrapper,"position"),n.startPosition={left:t.x.client-n.initialWindowPosition.left,top:t.y.client-n.initialWindowPosition.top},n.minLeftPosition=o.length>0?o.outerWidth()+parseInt(o.css("right"),10)-i.outerWidth():20-i.outerWidth(),n.minLeftPosition-=r.left,n.minTopPosition=-r.top,n.wrapper.append(J.overlay).children(k).hide(),e(v).css(I,t.currentTarget.css(I))},drag:function(t){var n=this.owner,i=n.options.position,o=Math.max(t.y.client-n.startPosition.top,n.minTopPosition),r=Math.max(t.x.client-n.startPosition.left,n.minLeftPosition),s={left:r,top:o};e(n.wrapper).css(s),i.top=o,i.left=r},_finishDrag:function(){var t=this.owner;t.wrapper.children(k).toggle(!t.options.isMinimized).end().find(C).remove(),e(v).css(I,"")},dragcancel:function(e){this._finishDrag(),e.currentTarget.closest(y).css(this.owner.initialWindowPosition)},dragend:function(){return this._finishDrag(),this.owner.trigger(V),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},l.ui.plugin(Z)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){var n,i,o,r=t.length,s=[];for(i=0;e.length>i;i++)for(n=e[i],o=0;r>o;o++)n===t[o]&&s.push({index:i,item:n});return s}function i(t,n){var o,r=!1;return t.filters&&(o=e.grep(t.filters,function(e){return r=i(e,n),e.filters?e.filters.length:e.field!=n}),r||t.filters.length===o.length||(r=!0),t.filters=o),r}var o,r,s=window.kendo,a=s.ui,l=a.Widget,c=s.keys,u=s.support,h=s.htmlEncode,d=s._activeElement,f=s.data.ObservableArray,p="id",g="change",m="k-state-focused",v="k-state-hover",_="k-loading",y="open",w="close",b="select",x="selected",k="requestStart",C="requestEnd",S="width",T=e.extend,D=e.proxy,A=e.isArray,M=u.browser,E=M.msie&&9>M.version,P=/"/g,I={ComboBox:"DropDownList",DropDownList:"ComboBox"},R=s.ui.DataBoundWidget.extend({init:function(t,n){var i,o=this,r=o.ns;l.fn.init.call(o,t,n),t=o.element,n=o.options,o._isSelect=t.is(b),o._isSelect&&o.element[0].length&&(n.dataSource||(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value")),o.ul=e('<ul unselectable="on" class="k-list k-reset"/>').attr({tabIndex:-1,"aria-hidden":!0}),o.list=e("<div class='k-list-container'/>").append(o.ul).on("mousedown"+r,D(o._listMousedown,o)),i=t.attr(p),i&&(o.list.attr(p,i+"-list"),o.ul.attr(p,i+"_listbox")),o._header(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,headerTemplate:""},setOptions:function(e){l.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable)},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},_listOptions:function(e){var t=this.options;return e=e||{},e={height:e.height||t.height,dataValueField:e.dataValueField||t.dataValueField,dataTextField:e.dataTextField||t.dataTextField,groupTemplate:e.groupTemplate||t.groupTemplate,fixedGroupTemplate:e.fixedGroupTemplate||t.fixedGroupTemplate,template:e.template||t.template},e.template||(e.template="#:"+s.expr(e.dataTextField,"data")+"#"),e},_initList:function(){var n=this,i=n.options,o=i.virtual,r=!!o,a=i.value,l=D(n._listBound,n),c={autoBind:!1,selectable:!0,dataSource:n.dataSource,click:D(n._click,n),change:D(n._listChange,n),activate:D(n._activateItem,n),deactivate:D(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding"),n._angularItems("cleanup")},dataBound:l,listBound:l,selectedItemChange:D(n._listChange,n)};c=e.extend(n._listOptions(),c,"object"==typeof o?o:{}),n.listView=r?new s.ui.VirtualList(n.ul,c):new s.ui.StaticList(n.ul,c),a!==t&&n.listView.value(a).done(function(){var e=i.text;!n.listView.filter()&&n.input&&(-1===n.selectedIndex?((e===t||null===e)&&(e=a),n._accessor(a),n.input.val(e),n._placeholder()):-1===n._oldIndex&&(n._oldIndex=n.selectedIndex))})},_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_filterSource:function(e,t){var n=this,o=n.options,r=n.dataSource,s=T({},r.filter()||{}),a=i(s,o.dataTextField);(e||a)&&n.trigger("filtering",{filter:e})||(s={filters:s.filters||[],logic:"and"},e&&s.filters.push(e),t?r.read({filter:s}):r.filter(s))},_header:function(){var t,n=this,i=n.options.headerTemplate;e.isFunction(i)&&(i=i({})),i&&(n.list.prepend(i),t=n.ul.prev(),n.header=t[0]?t:null,n.header&&n.angular("compile",function(){return{elements:n.header}}))},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},_focus:function(e){return this.listView.focus(e)},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;l.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(n){var i=this;if(n===t)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=e(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var e=this.listView.focus();e&&this._focused.add(this.filterInput).attr("aria-activedescendant",e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var e=this,t=e.element,n=e.options,i=s.getter,o=t.attr(s.attr("text-field")),r=t.attr(s.attr("value-field"));!n.dataTextField&&o&&(n.dataTextField=o),!n.dataValueField&&r&&(n.dataValueField=r),e._text=i(n.dataTextField),e._value=i(n.dataValueField)},_aria:function(e){var n=this,i=n.options,o=n._focused.add(n.filterInput);i.suggest!==t&&o.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,o.attr("aria-owns",e),n.ul.attr("aria-live",i.filter&&"none"!==i.filter?"polite":"off")},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,n=this,i=n.selectedIndex,o=n.options.value,r=n.value();n._isSelect&&!n.listView.isBound()&&o&&(r=o),r!==n._old?e=!0:i!==t&&i!==n._oldIndex&&(e=!0),e&&(n._old=r,n._oldIndex=i,n._typing||n.element.trigger(g),n.trigger(g)),n.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_offsetHeight:function(){var t=0,n=this.listView.content.prevAll(":visible");return n.each(function(){var n=e(this);t+=n.hasClass("k-list-filter")?n.children().outerHeight():n.outerHeight()}),t},_height:function(e){var t,n,i=this,o=i.list,r=i.options.height,s=i.popup.visible();return e&&(n=o.add(o.parent(".k-animation-container")).show(),r=i.listView.content[0].scrollHeight>r?r:"auto",n.height(r),"auto"!==r&&(t=i._offsetHeight(),t&&(r-=t)),i.listView.content.height(r),s||n.hide()),r},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,o=this.wrapper;if(n.data(S)||!i)return e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=e?parseFloat(e.width):o.outerWidth(),e&&M.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i="border-box"!==n.css("box-sizing")?t-(n.outerWidth()-n.width()):t,n.css({fontFamily:o.css("font-family"),width:i}).data(S,i),!0},_openHandler:function(e){this._adjustListWidth(),this.trigger(y)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger(w)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,n=e.focus(),i=e.select();i=i[i.length-1],i===t&&this.options.highlightFirst&&!n&&(i=0),i!==t?e.focus(i):e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),n=this.listView.content.prev(".k-group-header"),i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=s.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("padding-right"),10),n.css("padding-right",i))},_firstOpen:function(){var e=this._height(this.dataSource.flatView().length);this._calculateGroupPadding(e)},_popup:function(){var e=this;e.popup=new a.Popup(e.list,T({},e.options.popup,{anchor:e.wrapper,open:D(e._openHandler,e),close:D(e._closeHandler,e),animation:e.options.animation,isRtl:u.isRtl(e.wrapper)})),e.options.virtual||e.popup.one(y,D(e._firstOpen,e))},_makeUnselectable:function(){E&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(v,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,o=u.mobileOS&&(u.touch||u.MSPointers||u.pointers);e=e!==t?e:!i.popup.visible(),n||o||i._focused[0]===d()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?y:w]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e._old===e.value()&&e._oldIndex===e.selectedIndex||(e._cascadeTriggered=!0,e.trigger("cascade",{userTriggered:e._userTriggered}))},_unbindDataSource:function(){var e=this;e.dataSource.unbind(k,e._requestStartHandler).unbind(C,e._requestEndHandler).unbind("error",e._errorHandler)}});T(R,{inArray:function(e,t){var n,i,o=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=o.length;i>n;n++)if(e===o[n])return n;return-1}}),s.ui.List=R,a.Select=R.extend({init:function(e,t){R.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){var t,n=this;n.options.dataSource=e,n._dataSource(),n.listView.setDataSource(n.dataSource),n.options.autoBind&&n.dataSource.fetch(),t=n._parentWidget(),t&&n._cascadeSelect(t)},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:(n._select(e),n._old=n._accessor(),n._oldIndex=n.selectedIndex,t)},search:function(e){var t,n,i,o,r,s;e="string"==typeof e?e:this.text(),t=this,n=e.length,i=t.options,o=i.ignoreCase,r=i.filter,s=i.dataTextField,clearTimeout(t._typingTimeout),(!n||n>=i.minLength)&&(t._state="filter",t.listView.filter(!0),"none"===r?t._filter(e):(t._open=!0,t._filterSource({value:o?e.toLowerCase():e,field:s,operator:r,ignoreCase:o})))},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var n=this.element[0];return e===t?n.value:(null===e&&(e=""),n.value=e,t)},_accessorSelect:function(e,n){var i,o=this.element[0],r=o.selectedIndex;return e===t?(r>-1&&(i=o.options[r]),i&&(e=i.value),e||""):(r>-1&&o.options[r].removeAttribute(x),n===t&&(n=-1),null!==e&&""!==e&&-1==n?this._custom(e):(e?o.value=e:o.selectedIndex=n,o.selectedIndex>-1&&(i=o.options[o.selectedIndex]),i&&i.setAttribute(x,x)),t)},_custom:function(t){var n=this,i=n.element,o=n._customOption;o||(o=e("<option/>"),n._customOption=o,i.append(o)),o.text(t),o[0].setAttribute(x,x),o[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrow.removeClass(_),e._focused.attr("aria-busy",!1),e._busy=null},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(function(){e._arrow&&(e._focused.attr("aria-busy",!0),e._arrow.addClass(_))},100))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,n=this,i=n.element,o=n.options,r=o.dataSource||{};r=e.isArray(r)?{data:r}:r,n._isSelect&&(t=i[0].selectedIndex,t>-1&&(o.index=t),r.select=i,r.fields=[{field:o.dataTextField},{field:o.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=D(n._showBusy,n),n._requestEndHandler=D(n._requestEnd,n),n._errorHandler=D(n._hideBusy,n)),n.dataSource=s.data.DataSource.create(r).bind(k,n._requestStartHandler).bind(C,n._requestEndHandler).bind("error",n._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){this.listView.focusNext()},_prevItem:function(){this.listView.focusPrev()},_move:function(e){var n,i,o,r,s=this,a=e.keyCode,l=a===c.DOWN;if(a===c.UP||l){if(e.altKey)s.toggle(l);else{if(!s.listView.isBound())return s._fetch||(s.dataSource.one(g,function(){s._fetch=!1,s._move(e)}),s._fetch=!0,s._filterSource()),e.preventDefault(),!0;if(o=s._focus(),s._fetch||o&&!o.hasClass("k-state-selected")||(l?(s._nextItem(),s._focus()||s._lastItem()):(s._prevItem(),s._focus()||s._firstItem())),s.trigger(b,{item:s.listView.focus()}))return s._focus(o),t;s._select(s._focus(),!0),s.popup.visible()||s._blur()}e.preventDefault(),i=!0}else if(a===c.ENTER||a===c.TAB){if(s.popup.visible()&&e.preventDefault(),o=s._focus(),n=s.dataItem(),s.popup.visible()||n&&s.text()===s._text(n)||(o=null),r=s.filterInput&&s.filterInput[0]===d(),o){if(s.trigger(b,{item:o}))return;s._select(o)}else s.input&&(s._accessor(s.input.val()),s.listView.value(s.input.val()));s._focusElement&&s._focusElement(s.wrapper),r&&a===c.TAB?s.wrapper.focusout():s._blur(),s.close(),i=!0}else a===c.ESC&&(s.popup.visible()&&e.preventDefault(),s.close(),i=!0);return i},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.isBound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done(function(){e._fetch=!1}))},_options:function(e,n,i){var o,r,s,a,l=this,c=l.element,u=e.length,d="",f=0;for(n&&(d=n);u>f;f++)o="<option",r=e[f],s=l._text(r),a=l._value(r),a!==t&&(a+="",-1!==a.indexOf('"')&&(a=a.replace(P,""")),o+=' value="'+a+'"'),o+=">",s!==t&&(o+=h(s)),o+="</option>",d+=o;c.html(d),i!==t&&(c[0].value=i,c[0].value&&!i&&(c[0].selectedIndex=-1))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=o.on("reset",t._resetHandler))},_parentWidget:function(){var t=this.options.name,n=e("#"+this.options.cascadeFrom),i=n.data("kendo"+t);return i||(i=n.data("kendo"+I[t])),i},_cascade:function(){var e,t=this,n=t.options,i=n.cascadeFrom;if(i){if(e=t._parentWidget(),!e)return;n.autoBind=!1,e.first("cascade",function(n){t._userTriggered=n.userTriggered,t.listView.isBound()&&t._clearSelection(e,!0),t._cascadeSelect(e)}),e.listView.isBound()?t._cascadeSelect(e):e.value()||t.enable(!1)}},_cascadeChange:function(e){var t=this,n=t._accessor();t._userTriggered?t._clearSelection(e,!0):n?(n!==t.listView.value()[0]&&t.value(n),t.dataSource.view()[0]&&-1!==t.selectedIndex||t._clearSelection(e,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._userTriggered=!1},_cascadeSelect:function(e){var t,n,o,r=this,s=e.dataItem(),a=s?e._value(s):null,l=r.options.cascadeFromField||e.options.dataValueField;a||0===a?(t=r.dataSource.filter()||{},i(t,l),n=t.filters||[],n.push({field:l,operator:"eq",value:a}),o=function(){r.unbind("dataBound",o),r._cascadeChange(e)},r.first("dataBound",o),r.dataSource.filter(n)):(r.enable(!1),r._clearSelection(e),r._triggerCascade(),r._userTriggered=!1)}}),o=".StaticList",r=s.ui.DataBoundWidget.extend({init:function(t,n){l.fn.init.call(this,t,n),this.element.attr("role","listbox").on("click"+o,"li",D(this._click,this)).on("mouseenter"+o,"li",function(){e(this).addClass(v)}).on("mouseleave"+o,"li",function(){e(this).removeClass(v)}),this.content=this.element.wrap("<div unselectable='on'></div>").parent().css({overflow:"auto",position:"relative"}),this.header=this.content.before('<div class="k-group-header" style="display:none"></div>').prev(),this._bound=!1,this._optionID=s.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var i=this.options.value;i&&(this._values=e.isArray(i)?i.slice(0):[i]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=D(function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout(function(){e._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click","change","activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=s.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(g,i._refreshHandler),n=i.value(),i.value([]),i._bound=!1,i.value(n)):i._refreshHandler=D(i.refresh,i),i.dataSource=o.bind(g,i._refreshHandler),i._fixedHeader()},setOptions:function(e){l.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(o),this._refreshHandler&&this.dataSource.unbind(g,this._refreshHandler),clearTimeout(this._scrollId),l.fn.destroy.call(this)},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],n=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=n+i;o>n?o=n:s>o+r&&(o=s-r),t.scrollTop=o}},selectedDataItems:function(n){var i=this._valueGetter;return n===t?this._dataItems.slice():(this._dataItems=n,this._values=e.map(n,function(e){return i(e)}),t)},focusNext:function(){var e=this.focus();e=e?e.next():0,this.focus(e)},focusPrev:function(){var e=this.focus();e=e?e.prev():this.element[0].children.length-1,this.focus(e)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(this.element[0].children[this.element[0].children.length-1])},focus:function(n){var i,o=this,r=o._optionID;return n===t?o._current:(n=o._get(n),n=n[n.length-1],n=e(this.element[0].children[n]),o._current&&(o._current.removeClass(m).removeAttr("aria-selected").removeAttr(p),o.trigger("deactivate")),i=!!n[0],i&&(n.addClass(m),o.scroll(n),n.attr("id",r)),o._current=i?n:null,o.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},filter:function(e){return e===t?this._filtered:(this._filtered=e,t)},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var i,o=this,r=o.options.selectable,s="multiple"!==r&&r!==!1,a=o._selectedIndices,l=[],c=[];if(n===t)return a.slice();if(n=o._get(n),1===n.length&&-1===n[0]&&(n=[]),!o._filtered||s||!o._deselectFiltered(n)){if(s&&!o._filtered&&-1!==e.inArray(n[n.length-1],a))return o._dataItems.length&&o._view.length&&(o._dataItems=[o._view[a[0]].item]),t;i=o._deselect(n),c=i.removed,n=i.indices,n.length&&(s&&(n=[n[n.length-1]]),l=o._select(n)),(l.length||c.length)&&(o._valueComparer=null,o.trigger("change",{added:l,removed:c}))}},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(t){t=e.isArray(t)||t instanceof f?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(n){var i,o=this,r=o._valueDeferred;return n===t?o._values.slice():(o.setValue(n),r&&"resolved"!==r.state()||(o._valueDeferred=r=e.Deferred()),o.isBound()&&(i=o._valueIndices(o._values),"multiple"===o.options.selectable&&o.select(-1),o.select(i),r.resolve()),o._skipUpdate=!1,r)},items:function(){return this.element.children(".k-item")},_click:function(t){t.isDefaultPrevented()||this.trigger("click",{item:e(t.currentTarget)})||this.select(t.currentTarget)},_valueExpr:function(e,n){var i,o,r,s=this,a=0,l=[];if(!s._valueComparer||s._valueType!==e){for(s._valueType=e;n.length>a;a++)i=n[a],i!==t&&""!==i&&null!==i&&("boolean"===e?i=!!i:"number"===e?i=+i:"string"===e&&(i=""+i)),l.push(i);o="for (var idx = 0; idx < "+l.length+"; idx++) { if (current === values[idx]) { return idx; }} return -1;",r=Function(["current","values"],o),s._valueComparer=function(e){return r(e,l)}}return s._valueComparer},_dataItemPosition:function(e,t){var n=this._valueGetter(e),i=this._valueExpr(typeof n,t);return i(n)},_getter:function(){this._valueGetter=s.getter(this.options.dataValueField)},_deselect:function(t){var n,i,o,r=this,s=r.element[0].children,a=r.options.selectable,l=r._selectedIndices,c=r._dataItems,u=r._values,h=[],d=0,f=0;if(t=t.slice(),a!==!0&&t.length){if("multiple"===a)for(;t.length>d;d++)if(i=t[d],
|
|
e(s[i]).hasClass("k-state-selected"))for(n=0;l.length>n;n++)if(o=l[n],o===i){e(s[o]).removeClass("k-state-selected"),h.push({position:n+f,dataItem:c.splice(n,1)[0]}),l.splice(n,1),t.splice(d,1),u.splice(n,1),f+=1,d-=1,n-=1;break}}else{for(;l.length>d;d++)e(s[l[d]]).removeClass("k-state-selected"),h.push({position:d,dataItem:c[d]});r._values=[],r._dataItems=[],r._selectedIndices=[]}return{indices:t,removed:h}},_deselectFiltered:function(t){for(var n,i,o,r=this.element[0].children,s=[],a=0;t.length>a;a++)i=t[a],n=this._view[i].item,o=this._dataItemPosition(n,this._values),o>-1&&(s.push(this.removeAt(o)),e(r[i]).removeClass("k-state-selected"));return s.length?(this.trigger("change",{added:[],removed:s}),!0):!1},_select:function(t){var n,i,o=this,r=o.element[0].children,s=o._view,a=[],l=0;for(-1!==t[t.length-1]&&o.focus(t);t.length>l;l++)i=t[l],n=s[i],-1!==i&&n&&(n=n.item,o._selectedIndices.push(i),o._dataItems.push(n),o._values.push(o._valueGetter(n)),e(r[i]).addClass("k-state-selected").attr("aria-selected",!0),a.push({dataItem:n}));return a},_get:function(n){return"number"==typeof n?n=[n]:A(n)||(n=e(n).data("offset-index"),n===t&&(n=-1),n=[n]),n},_template:function(){var e=this,t=e.options,n=t.template;return n?(n=s.template(n),n=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+n(e)+"</li>"}):n=s.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+s.expr(t.dataTextField,"data")+"}</li>",{useWithBlock:!1}),n},_templates:function(){var e,t,n={template:this.options.template,groupTemplate:this.options.groupTemplate,fixedGroupTemplate:this.options.fixedGroupTemplate};for(t in n)e=n[t],e&&"function"!=typeof e&&(n[t]=s.template(e));this.templates=n},_normalizeIndices:function(e){for(var n=[],i=0;e.length>i;i++)e[i]!==t&&n.push(e[i]);return n},_valueIndices:function(e,t){var n,i=this._view,o=0;if(t=t?t.slice():[],!e.length)return[];for(;i.length>o;o++)n=this._dataItemPosition(i[o].item,e),-1!==n&&(t[n]=o);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var t=this.element[0],n=this.content[0],i=n.scrollTop,o=e(t.children[0]).height(),r=Math.floor(i/o)||0,s=t.children[r]||t.lastChild,a=i>s.offsetTop;s;)if(a){if(s.offsetTop+o>i||!s.nextSibling)break;s=s.nextSibling}else{if(i>=s.offsetTop||!s.previousSibling)break;s=s.previousSibling}return this._view[e(s).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e,t=this.templates.fixedGroupTemplate;t&&(e=this._firstVisibleItem(),e&&this.header.html(t(e.group)))},_renderItem:function(e){var t='<li tabindex="-1" role="option" unselectable="on" class="k-item',n=e.item,i=0!==e.index,o=e.selected;return i&&e.newGroup&&(t+=" k-first"),o&&(t+=" k-state-selected"),t+='"'+(o?' aria-selected="true"':"")+' data-offset-index="'+e.index+'">',t+=this.templates.template(n),i&&e.newGroup&&(t+='<div class="k-group">'+this.templates.groupTemplate(e.group)+"</div>"),t+"</li>"},_render:function(){var e,t,n,i,o="",r=0,s=0,a=[],l=this.dataSource.view(),c=this.value(),u=this.isGrouped();if(u)for(r=0;l.length>r;r++)for(t=l[r],n=!0,i=0;t.items.length>i;i++)e={selected:this._selected(t.items[i],c),item:t.items[i],group:t.value,newGroup:n,index:s},a[s]=e,s+=1,o+=this._renderItem(e),n=!1;else for(r=0;l.length>r;r++)e={selected:this._selected(l[r],c),item:l[r],index:r},a[r]=e,o+=this._renderItem(e);this._view=a,this.element[0].innerHTML=o,u&&a.length&&this._renderHeader()},_selected:function(e,t){var n=!this._filtered||"multiple"===this.options.selectable;return n&&-1!==this._dataItemPosition(e,t)},refresh:function(e){var t,i=this,o=e&&e.action;i.trigger("dataBinding"),i._fixedHeader(),i._render(),i._bound=!0,"itemchange"===o?(t=n(i._dataItems,e.items),t.length&&i.trigger("selectedItemChange",{items:t})):i._filtered||i._skipUpdate?(i.focus(0),i._skipUpdate&&(i._skipUpdate=!1,i._selectedIndices=i._valueIndices(i._values,i._selectedIndices))):i.options.skipUpdateOnBind||o&&"add"!==o||i.value(i._values),i._valueDeferred&&i._valueDeferred.resolve(),i.trigger("dataBound")},isBound:function(){return this._bound},isGrouped:function(){return(this.dataSource.group()||[]).length}}),a.plugin(r)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t,n){for(var i,o=0,r=t.length-1;r>o;++o)i=t[o],i in e||(e[i]={}),e=e[i];e[t[r]]=n}var i=window.kendo,o=i.ui,r=o.Select,s=i.support,a=i._activeElement,l=i.data.ObservableObject,c=i.keys,u=".kendoDropDownList",h="disabled",d="readonly",f="change",p="k-state-focused",g="k-state-default",m="k-state-disabled",v="aria-disabled",_="aria-readonly",y="mouseenter"+u+" mouseleave"+u,w="tabindex",b="filter",x="accept",k=e.proxy,C=r.extend({init:function(n,o){var s,a,l,c=this,h=o&&o.index;c.ns=u,o=e.isArray(o)?{dataSource:o}:o,r.fn.init.call(c,n,o),o=c.options,n=c.element.on("focus"+u,k(c._focusHandler,c)),c._focusInputHandler=e.proxy(c._focusInput,c),c._inputTemplate(),c._reset(),c._prev="",c._word="",c.optionLabel=e(),c._wrapper(),c._tabindex(),c.wrapper.data(w,c.wrapper.attr(w)),c._span(),c._popup(),c._mobile(),c._dataSource(),c._ignoreCase(),c._filterHeader(),c._aria(),c._enable(),c._oldIndex=c.selectedIndex=-1,h!==t&&(o.index=h),c._initialIndex=o.index,c._optionLabel(),c._initList(),c._cascade(),o.autoBind?c.dataSource.fetch():-1===c.selectedIndex&&(a=o.text||"",a||(s=o.optionLabel,s&&0===o.index?a=s:c._isSelect&&(a=n.children(":selected").text())),c._textAccessor(a)),l=e(c.element).parents("fieldset").is(":disabled"),l&&c.enable(!1),c.listView.bind("click",function(e){e.preventDefault()}),i.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#"},events:["open","close",f,"select","filtering","dataBinding","dataBound","cascade"],setOptions:function(e){r.fn.setOptions.call(this,e),this.listView.setOptions(this._listOptions(e)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._filterHeader(),this._enable(),this._aria(),!this.value()&&this.optionLabel[0]&&this.select(0)},destroy:function(){var e=this;e.wrapper.off(u),e.element.off(u),e._inputWrapper.off(u),e._arrow.off(),e._arrow=null,e.optionLabel.off(),r.fn.destroy.call(e)},open:function(){var e=this;e.popup.visible()||(e.listView.isBound()&&e._state!==x?e._allowOpening()&&(e.popup.one("activate",e._focusInputHandler),e.popup.open(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_allowOpening:function(){return this.optionLabel[0]||this.filterInput||this.dataSource.view().length},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;return e===t?(n=this.listView.focus(),!n&&0===this.selectedIndex&&this.optionLabel[0]?this.optionLabel:n):(this._focus(e),t)},dataItem:function(n){var i=this,o=null,r=!!i.optionLabel[0],s=i.options.optionLabel;if(n===t)o=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:e(i.items()).index(n)}else r&&(n-=1);o=i.dataSource.flatView()[n]}return!o&&r&&(o=e.isPlainObject(s)?new l(s):i._assignInstance(i._optionLabelText(),"")),o},refresh:function(){this.listView.refresh()},text:function(e){var n,i,o=this,r=o.options.ignoreCase;return e=null===e?"":e,e===t?o._textAccessor():("string"==typeof e&&(i=r?e.toLowerCase():e,o._select(function(e){return e=o._text(e),r&&(e=(e+"").toLowerCase()),e===i}),n=o.dataItem(),n&&(e=n)),o._textAccessor(e),t)},value:function(e){var n=this,i=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(e&&(n._initialIndex=null),n._request&&n.options.cascadeFrom&&n.listView.isBound()?(n._valueSetter&&i.unbind(f,n._valueSetter),n._valueSetter=k(function(){n.value(e)},n),i.one(f,n._valueSetter),t):(n.listView.value(e).done(function(){-1===n.selectedIndex&&n.text()&&(n.text(""),n._accessor("",-1)),n._old=n._accessor(),n._oldIndex=n.selectedIndex}),n._fetchData(),t))},_optionLabel:function(){var n=this,o=n.options,r=o.optionLabel,s=o.optionLabelTemplate;return r?(s||(s="#:",s+="string"==typeof r?"data":i.expr(o.dataTextField,"data"),s+="#"),"function"!=typeof s&&(s=i.template(s)),n.optionLabelTemplate=s,n.optionLabel[0]||(n.optionLabel=e('<div class="k-list-optionlabel"></div>').prependTo(n.list)),n.optionLabel.html(s(r)).off().click(k(n._click,n)).on(y,n._toggleHover),n.angular("compile",function(){return{elements:n.optionLabel}}),t):(n.optionLabel.off().remove(),n.optionLabel=e(),t)},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_listBound:function(){var e,t,n,i=this,o=i._initialIndex,r=i.options.optionLabel,s=i._state===b,a=i.dataSource.flatView(),l=a.length;i._angularItems("compile"),i._presetValue=!1,i.options.virtual||(t=i._height(s?l||1:l),i._calculateGroupPadding(t)),i.popup.position(),i._isSelect&&(n=i.value(),l?r&&(r=i._option("",i._optionLabelText())):n&&(r=i._option(n,i.text())),i._options(a,r,n)),i._makeUnselectable(),s||(i._open&&i.toggle(i._allowOpening()),i._open=!1,i._fetch||(l?(!i.listView.value().length&&o>-1&&null!==o&&i.select(o),i._initialIndex=null,e=i.listView.selectedDataItems()[0],e&&i.text()!==i._text(e)&&i._selectValue(e)):i._textAccessor()!==i._optionLabelText()&&(i.listView.value(""),i._selectValue(null),i._oldIndex=i.selectedIndex))),i._hideBusy(),i.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&-1===this._oldIndex)&&(this._oldIndex=this.selectedIndex)},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(p),this._prevent=!1},_focusoutHandler:function(){var e=this,t=e._state===b,n=window.self!==window.top,i=e._focus();e._prevent||(clearTimeout(e._typingTimeout),t&&i&&!e.trigger("select",{item:i})&&e._select(i,!e.dataSource.view().length),s.mobileOS.ios&&n?e._change():e._blur(),e._inputWrapper.removeClass(p),e._prevent=!0,e._open=!1,e.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._toggle()},_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t.wrapper.add(t.filterInput).off(u),s=t._inputWrapper.off(y);o||i?i?(r.removeAttr(w),s.addClass(m).removeClass(g)):(s.addClass(g).removeClass(m),r.on("focusin"+u,k(t._focusinHandler,t)).on("focusout"+u,k(t._focusoutHandler,t))):(n.removeAttr(h).removeAttr(d),s.addClass(g).removeClass(m).on(y,t._toggleHover),r.attr(w,r.data(w)).attr(v,!1).attr(_,!1).on("keydown"+u,k(t._keydown,t)).on("focusin"+u,k(t._focusinHandler,t)).on("focusout"+u,k(t._focusoutHandler,t)).on("mousedown"+u,k(t._wrapperMousedown,t)),t.wrapper.on("click"+u,k(t._wrapperClick,t)),t.filterInput||r.on("keypress"+u,k(t._keypress,t))),n.attr(h,i).attr(d,o),r.attr(v,i).attr(_,o)},_option:function(e,t){return'<option value="'+e+'">'+t+"</option>"},_keydown:function(e){var n,i,o=this,r=e.keyCode,s=e.altKey,l=o.popup.visible();if(o.filterInput&&(n=o.filterInput[0]===a()),r===c.LEFT?(r=c.UP,i=!0):r===c.RIGHT&&(r=c.DOWN,i=!0),!i||!n){if(e.keyCode=r,s&&r===c.UP&&o._focusElement(o.wrapper),r===c.ENTER&&o._typingTimeout&&o.filterInput&&l)return e.preventDefault(),t;i=o._move(e),i||(l&&o.filterInput||(r===c.HOME?(i=!0,o._firstItem()):r===c.END&&(i=!0,o._lastItem()),i&&(o._select(o._focus()),e.preventDefault())),s||i||!o.filterInput||o._search())}},_matchText:function(e,t){var n=this,i=n.options.ignoreCase,o=!1;return e+="",i&&(e=e.toLowerCase()),0===e.indexOf(n._word)&&(n.optionLabel[0]&&(t+=1),n._select(t),n.popup.visible()||n._change(),o=!0),o},_selectNext:function(e){for(var t,n=this,i=e,o=n.dataSource.flatView(),r=o.length;r>e;e++)if(t=n._text(o[e]),t&&n._matchText(t,e)&&(1!==n._word.length||i!==n.selectedIndex))return!0;if(i>0&&r>i)for(e=0;i>=e;e++)if(t=n._text(o[e]),t&&n._matchText(t,e))return!0;return!1},_keypress:function(e){var t,n,o,r=this;0!==e.which&&e.keyCode!==i.keys.ENTER&&(t=String.fromCharCode(e.charCode||e.keyCode),n=r.selectedIndex,o=r._word.length,r.options.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),o||(r._word=t),r._last===t&&1>=o&&n>-1&&r._selectNext(n)||(o&&(r._word+=t),r._last=t,r._search()))},_popupOpen:function(){var e=this.popup;e.wrapper=i.wrap(e.element),e.element.closest(".km-root")[0]&&(e.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){r.fn._popup.call(this),this.popup.one("open",k(this._popupOpen,this))},_click:function(n){var i=n.item||e(n.currentTarget);return this.trigger("select",{item:i})?(this.close(),t):(this._userTriggered=!0,this._select(i),this._focusElement(this.wrapper),this._blur(),t)},_focusElement:function(e){var t=a(),n=this.wrapper,i=this.filterInput,o=e===i?n:i,r=s.mobileOS&&(s.touch||s.MSPointers||s.pointers);i&&i[0]===e[0]&&r||i&&o[0]===t&&(this._prevent=!0,this._focused=e.focus())},_filter:function(e){var n,i;e&&(n=this,i=n.options.ignoreCase,i&&(e=e.toLowerCase()),n._select(function(o){var r=n._text(o);return r!==t?(r+="",i&&(r=r.toLowerCase()),0===r.indexOf(e)):t}))},_search:function(){var e=this,n=e.dataSource,i=e.selectedIndex;if(clearTimeout(e._typingTimeout),"none"!==e.options.filter)e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t)),e._typingTimeout=null},e.options.delay);else{if(e._typingTimeout=setTimeout(function(){e._word=""},e.options.delay),-1===i&&(i=0),!e.ul[0].firstChild)return n.fetch().done(function(){n.data()[0]&&i>-1&&e._selectNext(i)}),t;e._selectNext(i)}},_get:function(t){var n,i,o,r="function"==typeof t,s=r?e():e(t);if(this.optionLabel[0]&&("number"==typeof t?t>-1&&(t-=1):s.hasClass("k-list-optionlabel")&&(t=-1)),r){for(n=this.dataSource.flatView(),o=0;n.length>o;o++)if(t(n[o])){t=o,i=!0;break}i||(t=-1)}return t},_firstItem:function(){this.optionLabel[0]?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this.optionLabel.removeClass("k-state-focused"),this.listView.focusLast()},_nextItem:function(){this.optionLabel.hasClass("k-state-focused")?(this.optionLabel.removeClass("k-state-focused"),this.listView.focusFirst()):this.listView.focusNext()},_prevItem:function(){this.optionLabel.hasClass("k-state-focused")||(this.listView.focusPrev(),this.listView.focus()||this.optionLabel.addClass("k-state-focused"))},_focusItem:function(){var e=this.listView,n=e.focus(),i=e.select();i=i[i.length-1],i===t&&this.options.highlightFirst&&!n&&(i=0),i!==t?e.focus(i):this.options.optionLabel?(this._focus(this.optionLabel),this._select(this.optionLabel)):e.scrollToIndex(0)},_focus:function(e){var n=this.listView,i=this.optionLabel;return e===t?(e=n.focus(),!e&&i.hasClass("k-state-focused")&&(e=i),e):(i.removeClass("k-state-focused"),e=this._get(e),n.focus(e),-1===e&&i.addClass("k-state-focused"),t)},_select:function(e,t){var n=this;e=n._get(e),n.listView.select(e),t||n._state!==b||(n.listView.filter(!1),n._state=x),-1===e&&n._selectValue(null)},_selectValue:function(e){var n=this,i=n.options.optionLabel,o=n.optionLabel,r=n.listView.select(),s="",a="";r=r[r.length-1],r===t&&(r=-1),o.removeClass("k-state-focused k-state-selected"),e?(a=e,s=n._dataValue(e),i&&(r+=1)):i&&(n._focus(o.addClass("k-state-selected")),a=n._optionLabelText(),s="string"==typeof i?"":n._value(i),r=0),n.selectedIndex=r,null===s&&(s=""),n._textAccessor(a),n._accessor(s,r),n._triggerCascade()},_mobile:function(){var e=this,t=e.popup,n=s.mobileOS,i=t.element.parents(".km-root").eq(0);i.length&&n&&(t.options.animation.open.effects=n.android||n.meego?"fadeIn":n.ios||n.wp?"slideIn:up":t.options.animation.open.effects)},_filterHeader:function(){var t,n=this.options,i="none"!==n.filter;this.filterInput&&(this.filterInput.off(u).parent().remove(),this.filterInput=null),i&&(t='<span unselectable="on" class="k-icon k-i-search">select</span>',this.filterInput=e('<input class="k-textbox"/>').attr({role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.list.prepend(e('<span class="k-list-filter" />').append(this.filterInput.add(t))))},_span:function(){var t,n=this,i=n.wrapper,o="span.k-input";t=i.find(o),t[0]||(i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input"> </span><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element),t=i.find(o)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),n.hide(),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1})},_clearSelection:function(e){this.select(e.value()?0:-1)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;n=n?i.template(n):e.proxy(i.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=n},_textAccessor:function(n){var i,o=null,r=this.valueTemplate,s=this.options,a=s.optionLabel,c=this.span;return n===t?c.text():(e.isPlainObject(n)||n instanceof l?o=n:a&&this._optionLabelText()===n&&(o=a,r=this.optionLabelTemplate),o||(o=this._assignInstance(n,this._accessor())),i=function(){return{elements:c.get(),data:[{dataItem:o}]}},this.angular("cleanup",i),c.html(r(o)),this.angular("compile",i),t)},_preselect:function(e,t){e||t||(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var i=this.options.dataTextField,o={};return i?(n(o,i.split("."),e),n(o,this.options.dataValueField.split("."),t),o=new l(o)):o=e,o}});o.plugin(C)}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e){var t=e.originalEvent,n=0;return t.wheelDelta?(n=-t.wheelDelta/40,n=n>0?_e.ceil(n):_e.floor(n)):t.detail&&(n=t.detail),n}function i(e){return e.options.name.toLowerCase()===Ee.toLowerCase()}function o(e,t){var n,o,r,s,a=Fe,l=t.connectors;for(o=0;l.length>o;o++)r=l[o],i(r)||(s=e.distanceTo(r.position()),a>s&&(a=s,n=r));return n}function r(e,t){var n,i,o,r=[],s=e.drawingContainer().children,a=s.length;for(n=0;t.length>n;n++)for(i=t[n],o=0;a>o;o++)if(s[o]==i.drawingContainer()){r.push(o);break}return r}function s(e){var t={};return e=e||{},fe(e.text)&&null!==e.text&&(t.text=e.text),fe(e.x)&&null!==e.x&&(t.x=e.x),fe(e.y)&&null!==e.y&&(t.y=e.y),fe(e.width)&&null!==e.width&&(t.width=e.width),fe(e.height)&&null!==e.height&&(t.height=e.height),fe(e.type)&&null!==e.type&&(t.type=e.type),t}function a(e){var t={};return e=e||{},fe(e.text)&&null!==e.text&&(t.content=e.text),fe(e.type)&&null!==e.type&&(t.type=e.type),fe(e.from)&&null!==e.from&&(t.from=e.from),fe(e.fromConnector)&&null!==e.fromConnector&&(t.fromConnector=e.fromConnector),fe(e.fromX)&&null!==e.fromX&&(t.fromX=e.fromX),fe(e.fromY)&&null!==e.fromY&&(t.fromY=e.fromY),fe(e.to)&&null!==e.to&&(t.to=e.to),fe(e.toConnector)&&null!==e.toConnector&&(t.toConnector=e.toConnector),fe(e.toX)&&null!==e.toX&&(t.toX=e.toX),fe(e.toY)&&null!==e.toY&&(t.toY=e.toY),t}function l(t,n){var i,o=this.dataSource.reader.model;o&&(i=o.fn.fields.text?"text":o.idField,e("<input name='"+n.field+"' />").appendTo(t).kendoDropDownList({dataValueField:o.idField,dataTextField:i,dataSource:this.dataSource.data().toJSON(),optionLabel:" ",valuePrimitive:!0}))}function c(e){this.dataItem=e,this.callbacks=[]}function u(){this.items={}}function h(e){var t=e;return e instanceof kendo.data.Model&&(t=e.toJSON(),t[e.idField]=e._defaultId),t}function d(e){var t,n,i=[],o=[];for(n=0;e.length>n;n++)t=e[n],t instanceof w?o.push(t):i.push(t);return{shapes:o,connections:i}}function f(e,t){return e.reader.model?new e.reader.model(t):new kendo.data.ObservableObject(t)}function p(e,t){fe(t[e])&&t.set(e,null)}function g(e,t,n){var i,o;for(o=0;n.length>o;o++)i=n[o],t&&!fe(t[i])&&(t[i]=e[i])}function m(e){var t=e.drawingContainer().clippedBBox(null);(0!==t.origin.x||0!==t.origin.y)&&e.position(-t.origin.x,-t.origin.y)}var v,_,y,w,b,x,k,C,S,T,D,A,M=kendo.dataviz,E=kendo.drawing,P=kendo.geometry,I=M.diagram,R=kendo.ui.Widget,B=kendo.Class,F=e.proxy,z=kendo.deepExtend,L=e.extend,O=kendo.data.HierarchicalDataSource,N=I.Canvas,H=I.Group,V=I.Rectangle,U=I.Circle,W=I.CompositeTransform,j=I.Rect,G=I.Path,q=I.DeleteShapeUnit,$=I.DeleteConnectionUnit,Y=I.TextBlock,K=I.Image,X=I.Point,Q=I.Intersect,Z=I.ConnectionEditAdorner,J=I.UndoRedoService,ee=I.ToolService,te=I.Selector,ne=I.ResizingAdorner,ie=I.ConnectorsAdorner,oe=I.Cursors,re=I.Utils,se=kendo.Observable,ae=I.ToBackUnit,le=I.ToFrontUnit,ce=I.PolylineRouter,ue=I.CascadingRouter,he=re.isUndefined,de=re.isDefined,fe=kendo.util.defined,pe=e.isArray,ge=kendo.isFunction,me=re.isString,ve=e.isPlainObject,_e=Math,ye=".kendoDiagram",we="cascading",be="itemBoundsChange",xe="change",ke="click",Ce="drag",Se="dragEnd",Te="dragStart",De="mouseEnter",Ae="mouseLeave",Me="error",Ee="Auto",Pe="Top",Ie="Right",Re="Left",Be="Bottom",Fe=9007199254740992,ze="select",Le="itemRotate",Oe="pan",Ne="zoomStart",He="zoomEnd",Ve="none",Ue=600,We=600,je="rectangle",Ge=100,qe=100,$e=20,Ye=20,Ke=0,Xe="Yellow",Qe=Number.MAX_VALUE,Ze=-Number.MAX_VALUE,Je="absolute",et="transformed",tt="rotated",nt="transparent",it="width",ot="height",rt="x",st="y",at="DOMMouseScroll"+ye+" mousewheel"+ye,lt=.05,ct=5,ut='<a class="k-button k-button-icontext #=className#" href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',ht=5;I.DefaultConnectors=[{name:Pe},{name:Be},{name:Re},{name:Ie},{name:Ee,position:function(e){return e.getPosition("center")}}],v={cancel:{text:"Cancel",imageClass:"k-cancel",className:"k-diagram-cancel",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-diagram-update",iconClass:"k-icon"}},I.shapeDefaults=function(e){var t={type:je,path:"",autoSize:!0,visual:null,x:Ke,y:Ke,minWidth:$e,minHeight:Ye,width:Ge,height:qe,hover:{},editable:{connect:!0,tools:[]},connectors:I.DefaultConnectors,rotation:{angle:0}};return re.simpleExtend(t,e),t},_=se.extend({init:function(e){var t=this;t.dataItem=(e||{}).dataItem,se.fn.init.call(t),t.options=z({id:I.randomId()},t.options,e),t.isSelected=!1,t.visual=new H({id:t.options.id,autoSize:t.options.autoSize}),t.id=t.options.id,t._template()},options:{hover:{},cursor:oe.grip,content:{align:"center middle"},selectable:!0,serializable:!0,enable:!0},_getCursor:function(e){return this.adorner?this.adorner._getCursor(e):this.options.cursor},visible:function(e){return he(e)?this.visual.visible():(this.visual.visible(e),t)},bounds:function(){},refresh:function(){this.visual.redraw()},position:function(e){this.options.x=e.x,this.options.y=e.y,this.visual.position(e)},toString:function(){return this.options.id},serialize:function(){var e=z({},{options:this.options});return this.dataItem&&(e.dataItem=""+this.dataItem),e},_content:function(e){var n,i,o;return e!==t&&(n=this.options,I.Utils.isString(e)?n.content.text=e:z(n.content,e),i=n.content,o=this._contentVisual,o?this._updateContentVisual(i):this._createContentVisual(i)),this.options.content.text},_createContentVisual:function(e){e.text&&(this._contentVisual=new Y(e),this._contentVisual._includeInBBox=!1,this.visual.append(this._contentVisual))},_updateContentVisual:function(e){this._contentVisual.redraw(e)},_hitTest:function(e){var t=this.bounds();return this.visible()&&t.contains(e)&&this.options.enable},_template:function(){var e,t,n=this;n.options.content.template&&(e=n.dataItem||{},t=kendo.template(n.options.content.template,{paramName:"dataItem"}),n.options.content.text=t(e))},_canSelect:function(){return this.options.selectable!==!1},toJSON:function(){return{id:this.options.id}}}),y=B.extend({init:function(e,t){this.options=z({},this.options,t),this.connections=[],this.shape=e},options:{width:7,height:7,fill:{color:Xe},hover:{}},position:function(){return this.options.position?this.options.position(this.shape):this.shape.getPosition(this.options.name)},toJSON:function(){return{shapeId:""+this.shape,connector:this.options.name}}}),y.parse=function(e,t){var n,i,o=t.split(":"),r=o[0],s=o[1]||Ee;for(n=0;e.shapes.length>n;n++)if(i=e.shapes[n],i.options.id==r)return i.getConnector(s.trim())},w=_.extend({init:function(e,t){var n=this;_.fn.init.call(n,e),this.diagram=t,this.updateOptionsFromModel(),e=n.options,n.connectors=[],n.type=e.type,n.createShapeVisual(),n.updateBounds(),n.content(n.content()),n._createConnectors()},options:I.shapeDefaults(),_setOptionsFromModel:function(e){var t=s(e||this.dataItem);this.options=z({},this.options,t),this.redrawVisual(),this.options.content&&(this._template(),this.content(this.options.content))},updateOptionsFromModel:function(e,t){var n,i;this.diagram&&this.diagram._isEditable&&(n=s(e||this.dataItem),e&&t?M.inArray(t,["x","y","width","height"])?(i=this.bounds(),i[t]=e[t],this.bounds(i)):(this.options.visual?this.redrawVisual():n.type&&(this.options=z({},this.options,n),this.redrawVisual()),this.options.content&&(this._template(),this.content(this.options.content))):this.options=z({},this.options,n))},redrawVisual:function(){this.visual.clear(),this._contentVisual=null,this.options.dataItem=this.dataItem,this.createShapeVisual(),this.updateBounds()},updateModel:function(e){var t,n,i=this.diagram;i&&i._isEditable&&(t=this._bounds,n=this.dataItem,n&&(i._suspendModelRefresh(),fe(n.x)&&t.x!==n.x&&n.set("x",t.x),fe(n.y)&&t.y!==n.y&&n.set("y",t.y),fe(n.width)&&t.width!==n.width&&n.set("width",t.width),fe(n.height)&&t.height!==n.height&&n.set("height",t.height),this.dataItem=n,i._resumeModelRefresh(),e&&i._syncShapeChanges()))},updateBounds:function(){var e=this.visual._measure(!0),t=this.options;this.bounds(new j(t.x,t.y,e.width,e.height)),this._rotate(),this._alignContent()},content:function(e){var t=this._content(e);return this._alignContent(),t},_alignContent:function(){var e,t,n,i,o,r=this.options.content||{},s=this._contentVisual;s&&r.align&&(e=this.visual._measure(),t=new I.RectAlign(e),n=s.drawingElement.bbox(null),i=new j(0,0,n.width(),n.height()),o=t.align(i,r.align),s.position(o.topLeft()))},_createConnectors:function(){var e,t,n=this.options,i=n.connectors.length,o=n.connectorDefaults;for(t=0;i>t;t++)e=new y(this,z({},o,n.connectors[t])),this.connectors.push(e)},bounds:function(e){var t,n;if(e)if(me(e))switch(e){case et:t=this._transformedBounds();break;case Je:t=this._transformedBounds(),n=this.diagram._pan,t.x+=n.x,t.y+=n.y;break;case tt:t=this._rotatedBounds();break;default:t=this._bounds}else this._setBounds(e),this._triggerBoundsChange(),this.diagram&&this.diagram._layouting||this.refreshConnections();else t=this._bounds;return t},_setBounds:function(e){var t=this.options,n=e.topLeft(),i=t.x=n.x,o=t.y=n.y,r=t.width=_e.max(e.width,t.minWidth),s=t.height=_e.max(e.height,t.minHeight);this._bounds=new j(i,o,r,s),this.visual.redraw({x:i,y:o,width:r,height:s})},position:function(e){return e?(this.bounds(new j(e.x,e.y,this._bounds.width,this._bounds.height)),t):this._bounds.topLeft()},clone:function(){var e=this.serialize();return e.options.id=I.randomId(),this.diagram&&this.diagram._isEditable&&fe(this.dataItem)&&(e.options.dataItem=h(this.dataItem)),new w(e.options)},select:function(e){var n,i,o=this.diagram;return he(e)&&(e=!0),this._canSelect()&&this.isSelected!=e?(n=[],i=[],this.isSelected=e,this.isSelected?(o._selectedItems.push(this),n.push(this)):(re.remove(o._selectedItems,this),i.push(this)),o._internalSelection||o._selectionChanged(n,i),!0):t},rotate:function(e,n,i){var o,r,s,a,l=this.visual.rotate();return e!==t&&(i!==!1&&this.diagram&&this.diagram.undoRedoService&&e!==l.angle&&this.diagram.undoRedoService.add(new I.RotateUnit(this.diagram._resizingAdorner,[this],[l.angle]),!1),o=this.bounds(),r=new X(o.width/2,o.height/2),n&&(s=e-l.angle,a=o.center().rotate(n,360-s).minus(r),this._rotationOffset=this._rotationOffset.plus(a.minus(o.topLeft())),this.position(a)),this.visual.rotate(e,r),this.options.rotation.angle=e,this.diagram&&this.diagram._connectorsAdorner&&this.diagram._connectorsAdorner.refresh(),this.refreshConnections(),this.diagram&&this.diagram.trigger(Le,{item:this})),l},connections:function(e){var t,n,i,o,r,s,a,l=[];for(t=0;this.connectors.length>t;t++)for(r=this.connectors[t],o=r.connections,n=0,o;o.length>n;n++)i=o[n],"out"==e?(s=i.source(),s.shape&&s.shape==this&&l.push(i)):"in"==e?(a=i.target(),a.shape&&a.shape==this&&l.push(i)):l.push(i);return l},refreshConnections:function(){e.each(this.connections(),function(){this.refresh()})},getConnector:function(e){var t,n;if(!me(e))return e instanceof X?o(e,this):this.connectors.length?this.connectors[0]:null;for(e=e.toLocaleLowerCase(),t=0;this.connectors.length>t;t++)if(n=this.connectors[t],n.options.name.toLocaleLowerCase()==e)return n},getPosition:function(e){var t=this.bounds(),n=e.charAt(0).toLowerCase()+e.slice(1);return ge(t[n])?this._transformPoint(t[n]()):t.center()},redraw:function(e){var t,n;e&&(t=this.options,this.shapeVisual.redraw(this._visualOptions(e)),this._diffNumericOptions(e,[it,ot,rt,st])&&(this.bounds(new j(t.x,t.y,t.width,t.height)),n=!0),e.connectors&&(t.connectors=e.connectors,this._updateConnectors()),t=z(t,e),(e.rotation||n)&&this._rotate(),t.content&&this.content(t.content))},_updateConnectors:function(){var e,t,n,i,o=this.connections();for(this.connectors=[],this._createConnectors(),i=0;o.length>i;i++)e=o[i],t=e.source(),n=e.target(),t.shape&&t.shape===this?e.source(this.getConnector(t.options.name)||null):n.shape&&n.shape===this&&e.target(this.getConnector(n.options.name)||null),e.updateModel()},_diffNumericOptions:I.diffNumericOptions,_visualOptions:function(e){return{data:e.path,source:e.source,hover:e.hover,fill:e.fill,stroke:e.stroke}},_triggerBoundsChange:function(){this.diagram&&this.diagram.trigger(be,{item:this,bounds:this._bounds.clone()})},_transformPoint:function(e){var t=this.rotate(),n=this.bounds(),i=n.topLeft();return t.angle&&e.rotate(t.center().plus(i),360-t.angle),e},_transformedBounds:function(){var e=this.bounds(),t=e.topLeft(),n=e.bottomRight();return j.fromPoints(this.diagram.modelToView(t),this.diagram.modelToView(n))},_rotatedBounds:function(){var e=this.bounds().rotatedBounds(this.rotate().angle),t=e.topLeft(),n=e.bottomRight();return j.fromPoints(t,n)},_rotate:function(){var e=this.options.rotation;e&&e.angle&&this.rotate(e.angle),this._rotationOffset=new X},_hover:function(e){var t=this.options,n=t.hover,i=t.stroke,o=t.fill;e&&de(n.stroke)&&(i=z({},i,n.stroke)),e&&de(n.fill)&&(o=n.fill),this.shapeVisual.redraw({stroke:i,fill:o}),t.editable&&t.editable.connect&&this.diagram._showConnectors(this,e)},_hitTest:function(e){if(this.visible()){var t,n=this.bounds(),i=this.rotate().angle;if(e.isEmpty&&!e.isEmpty())return Q.rects(e,n,i?i:0);if(t=e.clone().rotate(n.center(),i),n.contains(t))return this}},toJSON:function(){return{shapeId:this.options.id}},createShapeVisual:function(){var e,t=this.options,n=this._visualOptions(t),i=t.visual,o=(t.type+"").toLocaleLowerCase();n.width=t.width,n.height=t.height,ge(i)?e=i.call(this,t):n.data?(e=new G(n),m(e)):e="rectangle"==o?new V(n):"circle"==o?new U(n):"text"==o?new Y(n):"image"==o?new K(n):new G(n),this.shapeVisual=e,this.visual.append(this.shapeVisual)}}),b=_.extend({init:function(e,t,n){var i=this;_.fn.init.call(i,n),
|
|
this.updateOptionsFromModel(),this._initRouter(),i.path=new I.Polyline(i.options),i.path.fill(nt),i.visual.append(i.path),i._sourcePoint=i._targetPoint=new X,i._setSource(e),i._setTarget(t),i.content(i.options.content),i.definers=[],fe(n)&&n.points&&i.points(n.points)},options:{hover:{stroke:{}},startCap:Ve,endCap:Ve,points:[],selectable:!0,fromConnector:Ee,toConenctor:Ee},_setOptionsFromModel:function(e){this.updateOptionsFromModel(e||this.dataItem)},updateOptionsFromModel:function(e){var t,n,i,o;this.diagram&&this.diagram._isEditable&&(t=this.diagram._dataMap,n=a(e||this.dataItem),e?(fe(n.from)?(i=t[n.from],i&&fe(n.fromConnector)&&(i=i.getConnector(n.fromConnector)),this.source(i)):fe(n.fromX)&&fe(n.fromY)&&this.source(new X(n.fromX,n.fromY)),fe(n.to)?(o=t[n.to],o&&fe(n.toConnector)&&(o=o.getConnector(n.toConnector)),this.target(o)):fe(n.toX)&&fe(n.toY)&&this.target(new X(n.toX,n.toY)),fe(n.type)&&this.type()!==n.type&&(this.points([]),this.type(n.type)),this.dataItem=e,this._template(),this.redraw(this.options)):this.options=z({},n,this.options))},updateModel:function(e){if(this.diagram&&this.diagram._isEditable&&this.diagram.connectionsDataSource){var t=this.diagram.connectionsDataSource.getByUid(this.dataItem.uid);t&&(this.diagram._suspendModelRefresh(),fe(this.options.fromX)&&null!==this.options.fromX?(p("from",t),p("fromConnector",t),t.set("fromX",this.options.fromX),t.set("fromY",this.options.fromY)):(t.set("from",this.options.from),fe(t.fromConnector)&&t.set("fromConnector",this.sourceConnector?this.sourceConnector.options.name:null),p("fromX",t),p("fromY",t)),fe(this.options.toX)&&null!==this.options.toX?(p("to",t),p("toConnector",t),t.set("toX",this.options.toX),t.set("toY",this.options.toY)):(t.set("to",this.options.to),fe(t.toConnector)&&t.set("toConnector",this.targetConnector?this.targetConnector.options.name:null),p("toX",t),p("toY",t)),fe(this.options.type)&&fe(t.type)&&t.set("type",this.options.type),this.dataItem=t,this.diagram._resumeModelRefresh(),e&&this.diagram._syncConnectionChanges())}},sourcePoint:function(){return this._resolvedSourceConnector?this._resolvedSourceConnector.position():this._sourcePoint},_setSource:function(e){var n,i=e instanceof w,o=this.options.fromConnector||Ee;(!i||e.getConnector(o))&&(e!==t&&(this.from=e),this._removeFromSourceConnector(),null===e?this.sourceConnector&&(this._sourcePoint=(this._resolvedSourceConnector||this.sourceConnector).position(),this._clearSourceConnector(),this._setFromOptions(null,this._sourcePoint)):e instanceof y?(n=e.shape.dataItem,n&&this._setFromOptions(n.id),this.sourceConnector=e,this.sourceConnector.connections.push(this)):e instanceof X?(this._setFromOptions(null,e),this._sourcePoint=e,this.sourceConnector&&this._clearSourceConnector()):i&&(n=e.dataItem,n&&this._setFromOptions(n.id),this.sourceConnector=e.getConnector(o),this.sourceConnector.connections.push(this)))},source:function(e,t){return de(e)&&(t&&this.diagram&&this.diagram.undoRedoService.addCompositeItem(new I.ConnectionEditUnit(this,e)),this._setSource(e),this.refresh()),this.sourceConnector?this.sourceConnector:this._sourcePoint},_setFromOptions:function(e,t){this.options.from=e,t?(this.options.fromX=t.x,this.options.fromY=t.y):(this.options.fromX=null,this.options.fromY=null)},sourceDefiner:function(e){if(!e)return this._sourceDefiner||(this._sourceDefiner=new I.PathDefiner(this.sourcePoint(),null,null)),this._sourceDefiner;if(!(e instanceof I.PathDefiner))throw"The sourceDefiner needs to be a PathDefiner.";e.left=null,this._sourceDefiner=e,this.source(e.point)},targetPoint:function(){return this._resolvedTargetConnector?this._resolvedTargetConnector.position():this._targetPoint},_setTarget:function(e){var n,i=e instanceof w,o=this.options.toConnector||Ee;(!i||e.getConnector(o))&&(e!==t&&(this.to=e),this._removeFromTargetConnector(),null===e?this.targetConnector&&(this._targetPoint=(this._resolvedTargetConnector||this.targetConnector).position(),this._clearTargetConnector(),this._setToOptions(null,this._targetPoint)):e instanceof y?(n=e.shape.dataItem,n&&this._setToOptions(n.id),this.targetConnector=e,this.targetConnector.connections.push(this)):e instanceof X?(this._setToOptions(null,e),this._targetPoint=e,this.targetConnector&&this._clearTargetConnector()):i&&(n=e.dataItem,n&&this._setToOptions(n.id),this.targetConnector=e.getConnector(o),this.targetConnector.connections.push(this)))},target:function(e,n){return de(e)&&(n&&this.diagram&&this.diagram.undoRedoService.addCompositeItem(new I.ConnectionEditUnit(this,t,e)),this._setTarget(e),this.refresh()),this.targetConnector?this.targetConnector:this._targetPoint},_setToOptions:function(e,t){this.options.to=e,t?(this.options.toX=t.x,this.options.toY=t.y):(this.options.toX=null,this.options.toY=null)},targetDefiner:function(e){if(!e)return this._targetDefiner||(this._targetDefiner=new I.PathDefiner(this.targetPoint(),null,null)),this._targetDefiner;if(!(e instanceof I.PathDefiner))throw"The sourceDefiner needs to be a PathDefiner.";e.right=null,this._targetDefiner=e,this.target(e.point)},_updateConnectors:function(){this._updateConnector(this.source(),"source"),this._updateConnector(this.target(),"target")},_updateConnector:function(e,t){var n,i,o,r,s=this,a=s.diagram;e instanceof y&&!a.getShapeById(e.shape.id)?(n=e.shape.dataItem,i=e.options.name,o=function(){var o=a._dataMap[n.id];e=o.getConnector(i),s[t](e,!1),s.updateModel()},a._dataMap[n.id]?o():(r=a._inactiveShapeItems.getByUid(n.uid),r&&a._deferredConnectionUpdates.push(r.onActivate(o)))):s[t](e,!1)},content:function(e){var t=this._content(e);return fe(e)&&this._alignContent(),t},_createContentVisual:function(e){var t;return ge(e.visual)?t=e.visual.call(this,e):e.text&&(t=new Y(e)),t&&(this._contentVisual=t,t._includeInBBox=!1,this.visual.append(t)),t},_updateContentVisual:function(e){ge(e.visual)?(this.visual.remove(this._contentVisual),this._createContentVisual(e)):this._contentVisual.redraw(e)},_alignContent:function(){var e,t,n,i,o,r,s,a,l,c,u,h,d,f,p,g;if(this._contentVisual){for(e=ht,t=this.allPoints(),n=_e.floor(t.length/2),i=n-1;i>0&&t[i].equals(t[n]);)i--,n++;o=t[n],r=t[i],s=this._contentVisual._measure(),a=s.width,l=s.height,c=t.length%2===0,u=r.distanceTo(o),c&&t.length>2&&u>0&&(r.y===o.y&&a>u||r.x===o.x&&l>u)&&(c=!1,e=0),c?(d=kendo.util.deg(_e.atan2(o.y-r.y,o.x-r.x)),h=new X((o.x-r.x)/2+r.x,(o.y-r.y)/2+r.y),90===_e.abs(d)?(h.x+=e,h.y-=l/2):d%180===0?(h.x-=a/2,h.y-=l+e):-90>d||d>0&&90>d?h.y-=l:(0>d||d>90)&&(h.x-=a,h.y-=l)):(f=_e.floor(t.length/2),h=t[f].clone(),r=t[f-1],o=t[f+1],p=h.x>=r.x&&h.x>=o.x?e:-s.width-e,g=h.y>=r.y&&h.y>=o.y?e:-s.height-e,h.x+=p,h.y+=g),this._contentVisual.position(h)}},select:function(e){var n,i,o=this.diagram;return this._canSelect()&&this.isSelected!==e?(this.isSelected=e,n=[],i=[],this.isSelected?(this.adorner=new Z(this,this.options.selection),o._adorn(this.adorner,!0),o._selectedItems.push(this),n.push(this)):this.adorner&&(o._adorn(this.adorner,!1),re.remove(o._selectedItems,this),this.adorner=t,i.push(this)),this.adorner&&this.adorner.refresh(),o._internalSelection||o._selectionChanged(n,i),!0):t},bounds:function(e){return!e||me(e)?this._bounds:(this._bounds=e,t)},type:function(e){var n=this.options;return e?(e!==n.type&&(n.type=e,this._initRouter(),this.refresh()),t):n.type},_initRouter:function(){var e=(this.options.type||"").toLowerCase();this._router=e==we?new ue(this):new ce(this)},points:function(e){var t,n,i,o;if(!e){if(i=[],de(this.definers))for(o=0;this.definers.length>o;o++)i.push(this.definers[o].point);return i}for(this.definers=[],t=0;e.length>t;t++)if(n=e[t],n instanceof I.Point)this.definers.push(new I.PathDefiner(n));else{if(!n.hasOwnProperty("x")||!n.hasOwnProperty("y"))throw"A Connection point needs to be a Point or an object with x and y properties.";this.definers.push(new I.PathDefiner(new X(n.x,n.y)))}},allPoints:function(){var e,t=[this.sourcePoint()];if(this.definers)for(e=0;this.definers.length>e;e++)t.push(this.definers[e].point);return t.push(this.targetPoint()),t},refresh:function(){this._resolveConnectors(),this._refreshPath(),this._alignContent(),this.adorner&&this.adorner.refresh()},_resolveConnectors:function(){var e,t,n,r,s=this,a=s.source(),l=s.target();a instanceof X?e=a:a instanceof y&&(i(a)?n=a.shape:(s._resolvedSourceConnector=a,e=a.position())),l instanceof X?t=l:l instanceof y&&(i(l)?r=l.shape:(s._resolvedTargetConnector=l,t=l.position())),e?r&&(s._resolvedTargetConnector=o(e,r)):n&&(t?s._resolvedSourceConnector=o(t,n):r&&this._resolveAutoConnectors(n,r))},_resolveAutoConnectors:function(e,t){var n,o,r,s,a,l,c,u,h,d,f,p,g=Fe,m=Fe,v=e.connectors;for(d=0;v.length>d;d++)if(u=v[d],!i(u))for(s=u.position(),n=t.connectors,f=0;n.length>f;f++)h=n[f],i(h)||(a=h.position(),p=_e.round(s.distanceTo(a)),g>p&&this.diagram&&this._testRoutePoints(s,a,u,h)&&(g=p,o=u,r=h),m>p&&(l=u,c=h,m=p));o&&(l=o,c=r),this._resolvedSourceConnector=l,this._resolvedTargetConnector=c},_testRoutePoints:function(e,t,n,i){var o,r,s,a,l,c=this._router,u=!0;if(c instanceof ue)for(o=c.routePoints(e,t,n,i),o.unshift(e),o.push(t),l=1;o.length>l;l++)if(r=o[l-1],s=o[l],a=new j(_e.min(r.x,s.x),_e.min(r.y,s.y),_e.abs(r.x-s.x),_e.abs(r.y-s.y)),a.width>0&&(a.x++,a.width-=2),a.height>0&&(a.y++,a.height-=2),!a.isEmpty()&&this.diagram._shapesQuadTree.hitTestRect(a)){u=!1;break}return u},redraw:function(e){if(e){this.options=z({},this.options,e);var t=this.options.points;fe(t)&&t.length>0&&(this.points(t),this._refreshPath()),(e&&e.content||e.text)&&this.content(e.content),this.path.redraw({fill:e.fill,stroke:e.stroke,startCap:e.startCap,endCap:e.endCap})}},clone:function(){var e=this.serialize();return this.diagram&&this.diagram._isEditable&&fe(this.dataItem)&&(e.options.dataItem=h(this.dataItem)),new b(this.from,this.to,e.options)},serialize:function(){var e=this.from.toJSON?this.from.toJSON:""+this.from,t=this.to.toJSON?this.to.toJSON:""+this.to,n=z({},{options:this.options,from:e,to:t});return fe(this.dataItem)&&(n.dataItem=""+this.dataItem),n.options.points=this.points(),n},_hitTest:function(e){if(this.visible()){var t=new X(e.x,e.y),n=this.sourcePoint(),i=this.targetPoint();if(e.isEmpty&&!e.isEmpty()&&e.contains(n)&&e.contains(i))return this;if(this._router.hitTest(t))return this}},_hover:function(e){var t=(this.options.stroke||{}).color;e&&de(this.options.hover.stroke.color)&&(t=this.options.hover.stroke.color),this.path.redraw({stroke:{color:t}})},_refreshPath:function(){fe(this.path)&&(this._drawPath(),this.bounds(this._router.getBounds()))},_drawPath:function(){var e,t,n;this._router&&this._router.route(),e=this.sourcePoint(),t=this.targetPoint(),n=this.points(),this.path.redraw({points:[e].concat(n,[t])})},_clearSourceConnector:function(){this.sourceConnector=t,this._resolvedSourceConnector=t},_clearTargetConnector:function(){this.targetConnector=t,this._resolvedTargetConnector=t},_removeFromSourceConnector:function(){this.sourceConnector&&re.remove(this.sourceConnector.connections,this)},_removeFromTargetConnector:function(){this.targetConnector&&re.remove(this.targetConnector.connections,this)},toJSON:function(){var e,t,n,i=this;return i.from&&i.from.toJSON?e=i.from.toJSON():(n=i._sourcePoint,e={x:n.x,y:n.y}),i.to&&i.to.toJSON?t=i.to.toJSON():(n=i._targetPoint,t={x:n.x,y:n.y}),{from:e,to:t}}}),x=R.extend({init:function(e,t){var n=this;kendo.destroy(e),R.fn.init.call(n,e,t),n._initTheme(),n._initElements(),n._extendLayoutOptions(n.options),n._initDefaults(t),n._initCanvas(),n.mainLayer=new H({id:"main-layer"}),n.canvas.append(n.mainLayer),n._shapesQuadTree=new A(n),n._pan=new X,n._adorners=[],n.adornerLayer=new H({id:"adorner-layer"}),n.canvas.append(n.adornerLayer),n._createHandlers(),n._initialize(),n._fetchFreshData(),n._createGlobalToolBar(),n._resizingAdorner=new ne(n,{editable:n.options.editable}),n._connectorsAdorner=new ie(n),n._adorn(n._resizingAdorner,!0),n._adorn(n._connectorsAdorner,!0),n.selector=new te(n),n._clipboard=[],n.pauseMouseHandlers=!1,n._createOptionElements(),n.zoom(n.options.zoom),n.canvas.draw()},options:{name:"Diagram",theme:"default",layout:"",zoomRate:.1,zoom:1,zoomMin:0,zoomMax:2,dataSource:{},draggable:!0,template:"",autoBind:!0,editable:{rotate:{},resize:{},text:!0,tools:[],drag:{snap:{size:10,angle:10}},remove:!0},pannable:{key:"ctrl"},selectable:{key:"none"},tooltip:{enabled:!0,format:"{0}"},copy:{enabled:!0,offsetX:20,offsetY:20},shapeDefaults:I.shapeDefaults({undoable:!0}),connectionDefaults:{editable:{tools:[]},type:we},shapes:[],connections:[]},events:[He,Ne,Oe,ze,Le,be,xe,ke,De,Ae,"toolBarClick","save","cancel","edit","remove","add","dataBound",Te,Ce,Se],items:function(){return e()},_createGlobalToolBar:function(){var e,t=this.options.editable;t&&(e=t.tools,!this._isEditable||e===!1||e&&0!==e.length||(e=["createShape","undo","redo","rotateClockwise","rotateAnticlockwise"]),e&&e.length&&(this.toolBar=new k(this,{tools:e||{},click:F(this._toolBarClick,this),modal:!1}),this.toolBar.element.css({textAlign:"left"}),this.element.prepend(this.toolBar.element),this._resize()))},createShape:function(){var e,t,n,i,o,r;(this.editor&&this.editor.end()||!this.editor)&&(e=this.dataSource,t=e.view()||[],n=t.length,i=f(e,{}),o=this._createShape(i,{}),this.trigger("add",{shape:o})||(e.insert(n,i),r=this._inactiveShapeItems.getByUid(i.uid),r.element=o,this.edit(o)))},_createShape:function(e,t){t=z({},this.options.shapeDefaults,t),t.dataItem=e;var n=new w(t,this);return n},createConnection:function(){var e,t,n,i,o;(this.editor&&this.editor.end()||!this.editor)&&(e=this.connectionsDataSource,t=e.view()||[],n=t.length,i=f(e,{}),o=this._createConnection(i),this.trigger("add",{connection:o})||(this._connectionsDataMap[i.uid]=o,e.insert(n,i),this.addConnection(o,!1),this.edit(o)))},_createConnection:function(e,t,n){var i,o=z({},this.options.connectionDefaults);return o.dataItem=e,i=new b(t||new X,n||new X,o)},editModel:function(e,t){var n,i,o,r;if(this.cancelEdit(),o=this.options.editable,"shape"==t)n=o.shapeEditors,i=o.shapeTemplate;else{if("connection"!=t)return;r=F(l,this),n=z({},{from:r,to:r},o.connectionEditors),i=o.connectionTemplate}this.editor=new S(this.element,{update:F(this._update,this),cancel:F(this._cancel,this),model:e,type:t,target:this,editors:n,template:i}),this.trigger("edit",this._editArgs())},edit:function(e){if(e.dataItem){var t=e instanceof w?"shape":"connection";this.editModel(e.dataItem,t)}},cancelEdit:function(){this.editor&&(this._getEditDataSource().cancelChanges(this.editor.model),this._destroyEditor())},saveEdit:function(){this.editor&&this.editor.end()&&!this.trigger("save",this._editArgs())&&this._getEditDataSource().sync()},_update:function(){this.editor&&this.editor.end()&&!this.trigger("save",this._editArgs())&&(this._getEditDataSource().sync(),this._destroyEditor())},_cancel:function(){var e,t;this.editor&&!this.trigger("cancel",this._editArgs())&&(e=this.editor.model,this._getEditDataSource().cancelChanges(e),t=this._connectionsDataMap[e.uid]||this._dataMap[e.id],t&&t._setOptionsFromModel(e),this._destroyEditor())},_getEditDataSource:function(){return"shape"===this.editor.options.type?this.dataSource:this.connectionsDataSource},_editArgs:function(){var e={container:this.editor.wrapper};return e[this.editor.options.type]=this.editor.model,e},_destroyEditor:function(){this.editor&&(this.editor.close(),this.editor=null)},_initElements:function(){this.wrapper=this.element.empty().css("position","relative").attr("tabindex",0).addClass("k-widget k-diagram"),this.scrollable=e("<div />").appendTo(this.element)},_initDefaults:function(e){var t=this.options,n=t.editable,i=t.shapeDefaults,o=t.connectionDefaults,r=(e||{}).shapeDefaults;n===!1?(i.editable=!1,o.editable=!1):(g(n,i.editable,["drag","remove","connect"]),g(n,o.editable,["drag","remove"])),r&&r.connectors&&(t.shapeDefaults.connectors=r.connectors)},_initCanvas:function(){var t=e("<div class='k-layer'></div>").appendTo(this.scrollable)[0],n=this.viewport();this.canvas=new N(t,{width:n.width||Ue,height:n.height||We})},_createHandlers:function(){var e=this,t=e.element;t.on(at,F(e._wheel,e)),kendo.support.touch||kendo.support.mobileOS?(e._userEvents=new kendo.UserEvents(t,{multiTouch:!0,tap:F(e._tap,e)}),e._userEvents.bind(["gesturestart","gesturechange","gestureend"],{gesturestart:F(e._gestureStart,e),gesturechange:F(e._gestureChange,e),gestureend:F(e._gestureEnd,e)}),e.toolService=new ee(e),e.options.pannable!==!1&&e.scroller.enable()):(e.toolService=new ee(e),this.scroller.wrapper.on("mousemove"+ye,F(e._mouseMove,e)).on("mouseup"+ye,F(e._mouseUp,e)).on("mousedown"+ye,F(e._mouseDown,e)).on("mouseover"+ye,F(e._mouseover,e)).on("mouseout"+ye,F(e._mouseout,e)),t.on("keydown"+ye,F(e._keydown,e))),this._syncHandler=F(e._syncChanges,e),e._resizeHandler=F(e.resize,e,!1),kendo.onResize(e._resizeHandler),this.bind(Ne,F(e._destroyToolBar,e)),this.bind(Oe,F(e._destroyToolBar,e))},_tap:function(e){var t,n=this.toolService,i=this._caculateMobilePosition(e);n._updateHoveredItem(i),n.hoveredItem&&(t=n.hoveredItem,this.options.selectable!==!1&&(this._destroyToolBar(),t.isSelected?t.select(!1):this.select(t,{addToSelection:!0}),this._createToolBar()),this.trigger("click",{item:t,point:i}))},_caculateMobilePosition:function(e){return this.documentToModel(X(e.x.location,e.y.location))},_gestureStart:function(e){var t,n;this._destroyToolBar(),this.scroller.disable(),t=this.documentToModel(new X(e.center.x,e.center.y)),n={point:t,zoom:this.zoom()},this.trigger(Ne,n)||(this._gesture=e,this._initialCenter=t)},_gestureChange:function(e){var t,n,i=this._gesture,o=this._initialCenter,r=this.documentToView(new X(e.center.x,e.center.y)),s=e.distance/i.distance,a=this._zoom,l=!1;_e.abs(s-1)>=lt&&(this._zoom=a=this._getValidZoom(a*s),this.options.zoom=a,this._gesture=e,l=!0),t=o.times(a),n=r.minus(t),(l||this._pan.distanceTo(n)>=ct)&&(this._panTransform(n),this._updateAdorners()),e.preventDefault()},_gestureEnd:function(){this.options.pannable!==!1&&this.scroller.enable(),this.trigger(He,{point:this._initialCenter,zoom:this.zoom()})},_resize:function(){var e=this.viewport();this.canvas&&this.canvas.size(e),this.scrollable&&this.toolBar&&this.scrollable.height(e.height)},_mouseover:function(e){var t=e.target._kendoNode;t&&t.srcElement._hover&&t.srcElement._hover(!0,t.srcElement)},_mouseout:function(e){var t=e.target._kendoNode;t&&t.srcElement._hover&&t.srcElement._hover(!1,t.srcElement)},_initTheme:function(){var e=this,t=M.ui.themes||{},n=((e.options||{}).theme||"").toLowerCase(),i=(t[n]||{}).diagram;e.options=z({},i,e.options),e.options.editable===!0&&z(e.options,{editable:(i||{}).editable})},_createOptionElements:function(){var e=this.options,t=e.shapes.length;t&&this._createShapes(),e.connections.length&&this._createConnections(),t&&e.layout&&this.layout(e.layout)},_createShapes:function(){var e,t,n=this,i=n.options,o=i.shapes;for(t=0;o.length>t;t++)e=o[t],n.addShape(e)},_createConnections:function(){var e,t,n,i,o=this,r=o.options,s=r.connectionDefaults,a=r.connections;for(i=0;a.length>i;i++)e=a[i],t=o._findConnectionTarget(e.from),n=o._findConnectionTarget(e.to),o.connect(t,n,z({},s,e))},_findConnectionTarget:function(e){var t,n=this,i=me(e)?e:e.shapeId||e.id;return i?(t=n.getShapeById(i),e.connector&&(t=t.getConnector(e.connector))):t=new X(e.x||0,e.y||0),t},destroy:function(){var e=this;R.fn.destroy.call(e),this._userEvents&&this._userEvents.destroy(),kendo.unbindResize(e._resizeHandler),e.clear(),e.element.off(ye),e.scroller.wrapper.off(ye),e.canvas.destroy(!0),e.canvas=t,e._destroyEditor(),e.destroyScroller(),e._destroyGlobalToolBar(),e._destroyToolBar()},destroyScroller:function(){var e=this.scroller;e&&(e.destroy(),e.element.remove(),this.scroller=null)},save:function(){var e,t,n,i={shapes:[],connections:[]};for(e=0;this.shapes.length>e;e++)n=this.shapes[e],n.options.serializable&&i.shapes.push(n.options);for(e=0;this.connections.length>e;e++)t=this.connections[e],i.connections.push(z({},t.options,t.toJSON()));return i},focus:function(){if(!this.element.is(kendo._activeElement())){var e,t=this.element,n=t[0],i=[],o=[],r=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),o.push(n.scrollTop));while(n!=r);for(t.focus(),e=0;i.length>e;e++)i[e].scrollTop=o[e]}},load:function(e){this.clear(),this.setOptions(e),this._createShapes(),this._createConnections()},setOptions:function(e){z(this.options,e)},clear:function(){var e=this;e.select(!1),e.mainLayer.clear(),e._shapesQuadTree.clear(),e._initialize()},connect:function(e,t,n){var i,o;return this.connectionsDataSource&&this._isEditable?(o=this.connectionsDataSource.add({}),i=this._connectionsDataMap[o.uid],i.source(e),i.target(t),i.redraw(n),i.updateModel()):(i=new b(e,t,z({},this.options.connectionDefaults,n)),this.addConnection(i)),i},connected:function(e,t){var n,i;for(n=0;this.connections.length>n;n++)if(i=this.connections[n],i.from==e&&i.to==t)return!0;return!1},addConnection:function(e,t){return t!==!1&&this.undoRedoService.add(new I.AddConnectionUnit(e,this),!1),e.diagram=this,e._setOptionsFromModel(),e.refresh(),this.mainLayer.append(e.visual),this.connections.push(e),this.trigger(xe,{added:[e],removed:[]}),e},_addConnection:function(e,t){var n,i=this.connectionsDataSource;if(i&&this._isEditable){if(n=f(i,h(e.dataItem)),e.dataItem=n,e.updateModel(),!this.trigger("add",{connection:e}))return this._connectionsDataMap[n.uid]=e,i.add(n),this.addConnection(e,t),e._updateConnectors(),e}else if(!this.trigger("add",{connection:e}))return this.addConnection(e,t),e._updateConnectors(),e},addShape:function(e,t){var n,i=this.options.shapeDefaults;if(e instanceof w)n=e;else{if(e instanceof kendo.Class)return;i=z({},i,e||{}),n=new w(i,this)}return t!==!1&&this.undoRedoService.add(new I.AddShapeUnit(n,this),!1),this.shapes.push(n),n.diagram!==this&&(this._shapesQuadTree.insert(n),n.diagram=this),this.mainLayer.append(n.visual),this.trigger(xe,{added:[n],removed:[]}),n},_addShape:function(e,t){var n,i,o=this,r=o.dataSource;if(r&&this._isEditable){if(n=f(r,h(e.dataItem)),e.dataItem=n,e.updateModel(),!this.trigger("add",{shape:e}))return this.dataSource.add(n),i=this._inactiveShapeItems.getByUid(n.uid),i.element=e,i.undoable=t,e}else if(!this.trigger("add",{shape:e}))return this.addShape(e,t)},remove:function(e,t){var n,i,o,r;for(e=pe(e)?e.slice(0):[e],n=d(e),i=n.shapes,o=n.connections,fe(t)||(t=!0),t&&this.undoRedoService.begin(),this._suspendModelRefresh(),r=i.length-1;r>=0;r--)this._removeItem(i[r],t,o);for(r=o.length-1;r>=0;r--)this._removeItem(o[r],t);this._resumeModelRefresh(),t&&this.undoRedoService.commit(!1),this.trigger(xe,{added:[],removed:e})},_removeShapeDataItem:function(e){this._isEditable&&(this.dataSource.remove(e.dataItem),delete this._dataMap[e.dataItem.id])},_removeConnectionDataItem:function(e){this._isEditable&&(this.connectionsDataSource.remove(e.dataItem),delete this._connectionsDataMap[e.dataItem.uid])},_triggerRemove:function(e){var t,n,i,o,r=[];for(o=0;e.length>o;o++)t=e[o],i=t.options.editable,n=t instanceof w?{shape:t}:{connection:t},i&&i.remove!==!1&&!this.trigger("remove",n)&&r.push(t);return r},undo:function(){this.undoRedoService.undo()},redo:function(){this.undoRedoService.redo()},select:function(e,t){if(!de(e))return this._selectedItems;t=z({addToSelection:!1},t);var n,i,o=t.addToSelection,r=[],s=[];for(o||this.deselect(),this._internalSelection=!0,e instanceof Array?r=e:e instanceof _&&(r=[e]),n=0;r.length>n;n++)i=r[n],i.select(!0)&&s.push(i);this._selectionChanged(s,[]),this._internalSelection=!1},selectAll:function(){this.select(this.shapes.concat(this.connections))},selectArea:function(e){var t,n,i,o;if(this._internalSelection=!0,o=[],e instanceof j)for(n=this.shapes.concat(this.connections),t=0;n.length>t;t++)i=n[t],e&&!i._hitTest(e)||!i.options.enable||i.select(!0)&&o.push(i);this._selectionChanged(o,[]),this._internalSelection=!1},deselect:function(e){this._internalSelection=!0;var t,n,i=[],o=[];for(e instanceof Array?o=e:e instanceof _?o.push(e):de(e)||(o=this._selectedItems.slice(0)),n=0;o.length>n;n++)t=o[n],t.select(!1)&&i.push(t);this._selectionChanged([],i),this._internalSelection=!1},toFront:function(e,t){var n,i,o;e||(e=this._selectedItems.slice()),n=this._getDiagramItems(e),!fe(t)||t?(i=r(this.mainLayer,n.visuals),o=new le(this,e,i),this.undoRedoService.add(o)):(this.mainLayer.toFront(n.visuals),this._fixOrdering(n,!0))},toBack:function(e,t){var n,i,o;e||(e=this._selectedItems.slice()),n=this._getDiagramItems(e),!fe(t)||t?(i=r(this.mainLayer,n.visuals),o=new ae(this,e,i),this.undoRedoService.add(o)):(this.mainLayer.toBack(n.visuals),this._fixOrdering(n,!1))},bringIntoView:function(e,t){var n,i,o,r,s=this.viewport(),a=new I.RectAlign(s);0!==s.width&&0!==s.height&&(t=z({animate:!1,align:"center middle"},t),"none"==t.align&&(t.align="center middle"),e instanceof _?i=e.bounds(et):pe(e)?i=this.boundingBox(e):e instanceof j&&(i=e.clone()),o=i.clone(),i.zoom(this._zoom),(i.width>s.width||i.height>s.height)&&(this._zoom=this._getValidZoom(_e.min(s.width/o.width,s.height/o.height)),i=o.clone().zoom(this._zoom)),this._zoomMainLayer(),n=i.clone(),a.align(i,t.align),r=i.topLeft().minus(n.topLeft()),this.pan(r.times(-1),t.animate))},alignShapes:function(e){var t,n,i,o,r,s,a;if(he(e)&&(e="Left"),t=this.select(),0!==t.length){switch(e.toLowerCase()){case"left":case"top":n=Qe;break;case"right":case"bottom":n=Ze}for(o=0;t.length>o;o++)if(i=t[o],i instanceof w)switch(e.toLowerCase()){case"left":n=_e.min(n,i.options.x);break;case"top":n=_e.min(n,i.options.y);break;case"right":n=_e.max(n,i.options.x);break;case"bottom":n=_e.max(n,i.options.y)}for(r=[],s=[],o=0;t.length>o;o++)if(i=t[o],i instanceof w)switch(s.push(i),r.push(i.bounds()),e.toLowerCase()){case"left":case"right":i.position(new X(n,i.options.y));break;case"top":case"bottom":i.position(new X(i.options.x,n))}a=new I.TransformUnit(s,r),this.undoRedoService.add(a,!1)}},zoom:function(e,t){var n,i,o,r;return e&&(n=t?t.point:new I.Point(0,0),e=this._zoom=this._getValidZoom(e),he(n)||(n=new I.Point(_e.round(n.x),_e.round(n.y)),i=n.times(e),o=this.modelToView(n),r=o.minus(i),this._storePan(new I.Point(_e.round(r.x),_e.round(r.y)))),t&&(t.zoom=e),this._panTransform(),this._updateAdorners()),this._zoom},_getPan:function(e){var t=this.canvas;return t.translate||(e=e.plus(this._pan)),e},pan:function(e,t){var n,i;e instanceof X&&(n=this,i=n.scroller,e=n._getPan(e),e=e.times(-1),t?i.animatedScrollTo(e.x,e.y,function(){n._updateAdorners()}):(i.scrollTo(e.x,e.y),n._updateAdorners()))},viewport:function(){var e=this.element,t=e.width(),n=e.height();return this.toolBar&&(n-=this.toolBar.element.outerHeight()),new j(0,0,t,n)},copy:function(){var e,t;if(this.options.copy.enabled)for(this._clipboard=[],this._copyOffset=1,e=0;this._selectedItems.length>e;e++)t=this._selectedItems[e],this._clipboard.push(t)},cut:function(){var e,t;if(this.options.copy.enabled){for(this._clipboard=[],this._copyOffset=0,e=0;this._selectedItems.length>e;e++)t=this._selectedItems[e],this._clipboard.push(t);this.remove(this._clipboard,!0)}},paste:function(){var e,t,n,i,o,r,s,a;if(this._clipboard.length>0){for(i={},o=d(this._clipboard),r=o.connections,s=o.shapes,a={x:this._copyOffset*this.options.copy.offsetX,y:this._copyOffset*this.options.copy.offsetY},this.deselect(),n=0;s.length>n;n++)e=s[n],t=e.clone(),i[e.id]=t,t.position(new X(e.options.x+a.x,e.options.y+a.y)),t.diagram=this,t=this._addShape(t),t&&t.select();for(n=0;r.length>n;n++)e=r[n],t=this._addConnection(e.clone()),t&&(this._updateCopiedConnection(t,e,"source",i,a),this._updateCopiedConnection(t,e,"target",i,a),t.select(!0),t.updateModel());this._syncChanges(),this._copyOffset+=1}},_updateCopiedConnection:function(e,t,n,i,o){var r,s,a,l=t[n](),c=this;l instanceof y&&i[l.shape.id]?(a=i[l.shape.id],c.getShapeById(a.id)?e[n](a.getConnector(l.options.name)):(s=c._inactiveShapeItems.getByUid(a.dataItem.uid),s&&(r=function(t){a=c._dataMap[t.id],e[n](a.getConnector(l.options.name)),e.updateModel()},c._deferredConnectionUpdates.push(s.onActivate(r))))):e[n](new X(t[n+"Point"]().x+o.x,t[n+"Point"]().y+o.y))},boundingBox:function(e,t){var n,i,o,r=j.empty(),s=de(e)?this._getDiagramItems(e):{shapes:this.shapes};if(s.shapes.length>0)for(i=s.shapes[0],r=i.bounds(tt),o=1;s.shapes.length>o;o++)i=s.shapes[o],n=i.bounds(tt),t===!0&&(n.x-=i._rotationOffset.x,n.y-=i._rotationOffset.y),r=r.union(n);return r},_containerOffset:function(){var e=this.element.offset();return this.toolBar&&(e.top+=this.toolBar.element.outerHeight()),e},documentToView:function(e){var t=this._containerOffset();return new X(e.x-t.left,e.y-t.top)},viewToDocument:function(e){var t=this._containerOffset();return new X(e.x+t.left,e.y+t.top)},viewToModel:function(e){return this._transformWithMatrix(e,this._matrixInvert)},modelToView:function(e){return this._transformWithMatrix(e,this._matrix)},modelToLayer:function(e){return this._transformWithMatrix(e,this._layerMatrix)},layerToModel:function(e){return this._transformWithMatrix(e,this._layerMatrixInvert)},documentToModel:function(e){var t=this.documentToView(e);return this.canvas.translate||(t.x=t.x+this.scroller.scrollLeft,t.y=t.y+this.scroller.scrollTop),this.viewToModel(t)},modelToDocument:function(e){return this.viewToDocument(this.modelToView(e))},_transformWithMatrix:function(e,t){var n,i,o=e;return e instanceof X?t&&(o=t.apply(e)):(n=this._transformWithMatrix(e.topLeft(),t),i=this._transformWithMatrix(e.bottomRight(),t),o=j.fromPoints(n,i)),o},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&this.dataSource.fetch()},setConnectionsDataSource:function(e){this.options.connectionsDataSource=e,this._connectionDataSource(),this.options.autoBind&&this.connectionsDataSource.fetch()},layout:function(e){var t,n,i,o,r;switch(this._layouting=!0,he(e)&&(e=this.options.layout),t=he(e)||he(e.type)?"Tree":e.type,t.toLowerCase()){case"tree":n=new I.TreeLayout(this);break;case"layered":n=new I.LayeredLayout(this);break;case"forcedirected":case"force":case"spring":case"springembedder":n=new I.SpringLayout(this);break;default:throw"Layout algorithm '"+t+"' is not supported."}i=new I.LayoutState(this),o=n.layout(e),o&&(r=new I.LayoutUndoUnit(i,o,e?e.animate:null),this.undoRedoService.add(r)),this._layouting=!1,this._redrawConnections()},getShapeById:function(e){var t;return(t=re.first(this.shapes,function(t){return t.visual.id===e}))?t:t=re.first(this.connections,function(t){return t.visual.id===e})},_extendLayoutOptions:function(e){e.layout&&(e.layout=z(I.LayoutBase.fn.defaultOptions||{},e.layout))},_selectionChanged:function(e,t){(e.length||t.length)&&this.trigger(ze,{selected:e,deselected:t})},_getValidZoom:function(e){return _e.min(_e.max(e,this.options.zoomMin),this.options.zoomMax)},_panTransform:function(e){var t=this,n=e||t._pan;t.canvas.translate?(t.scroller.scrollTo(n.x,n.y),t._zoomMainLayer()):(t._storePan(n),t._transformMainLayer())},_finishPan:function(){this.trigger(Oe,{total:this._pan,delta:Number.NaN})},_storePan:function(e){this._pan=e,this._storeViewMatrix()},_zoomMainLayer:function(){var e=this._zoom,t=new W(0,0,e,e);t.render(this.mainLayer),this._storeLayerMatrix(t),this._storeViewMatrix()},_transformMainLayer:function(){var e=this._pan,t=this._zoom,n=new W(e.x,e.y,t,t);n.render(this.mainLayer),this._storeLayerMatrix(n),this._storeViewMatrix()},_storeLayerMatrix:function(e){this._layerMatrix=e.toMatrix(),this._layerMatrixInvert=e.invert().toMatrix()},_storeViewMatrix:function(){var e=this._pan,t=this._zoom,n=new W(e.x,e.y,t,t);this._matrix=n.toMatrix(),this._matrixInvert=n.invert().toMatrix()},_toIndex:function(e,t){var n=this._getDiagramItems(e);this.mainLayer.toIndex(n.visuals,t),this._fixOrdering(n,!1)},_fixOrdering:function(e,t){var n,i,o=t?this.shapes.length-1:0,r=t?this.connections.length-1:0;for(n=0;e.shapes.length>n;n++)i=e.shapes[n],re.remove(this.shapes,i),re.insert(this.shapes,i,o);for(n=0;e.cons.length>n;n++)i=e.cons[n],re.remove(this.connections,i),re.insert(this.connections,i,r);
|
|
},_getDiagramItems:function(e){var t,n,i={},o=e;for(i.visuals=[],i.shapes=[],i.cons=[],e?pe(e)||(o=[e]):o=this._selectedItems.slice(),t=0;o.length>t;t++)n=o[t],n instanceof w?(i.shapes.push(n),i.visuals.push(n.visual)):n instanceof b&&(i.cons.push(n),i.visuals.push(n.visual));return i},_removeItem:function(e,t,n){e.select(!1),e instanceof w?(this._removeShapeDataItem(e),this._removeShape(e,t,n)):e instanceof b&&(this._removeConnectionDataItem(e),this._removeConnection(e,t)),this.mainLayer.remove(e.visual)},_removeShape:function(e,t,n){var i,o,r,s,a=[],l=[];for(this.toolService._removeHover(),t&&this.undoRedoService.addCompositeItem(new q(e)),re.remove(this.shapes,e),this._shapesQuadTree.remove(e),i=0;e.connectors.length>i;i++)for(r=e.connectors[i],s=0;r.connections.length>s;s++)o=r.connections[s],n&&M.inArray(o,n)||(o.sourceConnector==r?a.push(o):o.targetConnector==r&&l.push(o));for(i=0;a.length>i;i++)a[i].source(null,t),a[i].updateModel();for(i=0;l.length>i;i++)l[i].target(null,t),l[i].updateModel()},_removeConnection:function(e,t){e.sourceConnector&&re.remove(e.sourceConnector.connections,e),e.targetConnector&&re.remove(e.targetConnector.connections,e),t&&this.undoRedoService.addCompositeItem(new $(e)),re.remove(this.connections,e)},_removeDataItems:function(e,t){var n,i,o,r;for(e=pe(e)?e:[e];e.length;)if(n=e.shift(),o=this._dataMap[n.uid],o&&(this._removeShapeConnections(o),this._removeItem(o,!1),delete this._dataMap[n.uid],t&&n.hasChildren&&n.loaded()))for(i=n.children.data(),r=0;i.length>r;r++)e.push(i[r])},_removeShapeConnections:function(e){var t,n=e.connections();if(n)for(t=0;n.length>t;t++)this._removeItem(n[t],!1)},_addDataItem:function(e,t){var n,i;if(fe(e))return(n=this._dataMap[e.id])?n:(i=z({},this.options.shapeDefaults),i.dataItem=e,n=new w(i,this),this.addShape(n,t!==!1),this._dataMap[e.id]=n,n)},_addDataItemByUid:function(e){var t,n;if(fe(e))return(t=this._dataMap[e.uid])?t:(n=z({},this.options.shapeDefaults),n.dataItem=e,t=new w(n,this),this.addShape(t),this._dataMap[e.uid]=t,t)},_addDataItems:function(e,t){var n,i,o,r,s;for(i=0;e.length>i;i++)n=e[i],o=this._addDataItemByUid(n),r=this._addDataItemByUid(t),r&&!this.connected(r,o)&&(s=this.connect(r,o))},_refreshSource:function(e){var t,n,i=this,o=e.node,r=e.action,s=e.items,a=i.options;if(!e.field){if("remove"==r)this._removeDataItems(e.items,!0);else for(r&&"itemloaded"!==r||this._bindingRoots||(this._bindingRoots=!0,n=!0),r||o||i.clear(),this._addDataItems(s,o),t=0;s.length>t;t++)s[t].load();a.layout&&(n||"remove"==r||"add"==r)&&i.layout(a.layout),n&&(this.trigger("dataBound"),this._bindingRoots=!1)}},_mouseDown:function(e){var t=this._calculatePosition(e);1==e.which&&this.toolService.start(t,this._meta(e))&&(this._destroyToolBar(),e.preventDefault())},_addItem:function(e){e instanceof w?this.addShape(e):e instanceof b&&this.addConnection(e)},_mouseUp:function(e){var t=this._calculatePosition(e);1==e.which&&this.toolService.end(t,this._meta(e))&&(this._createToolBar(),e.preventDefault())},_createToolBar:function(){var e,t,n,i,o,r,s,a,l,c=this.toolService.diagram;this.singleToolBar||1!==c.select().length||(e=c.select()[0],e&&e.options.editable!==!1&&(t=e.options.editable,n=t.tools,this._isEditable&&0===n.length&&(e instanceof w?n=["edit","rotateClockwise","rotateAnticlockwise"]:e instanceof b&&(n=["edit"]),t&&t.remove!==!1&&n.push("delete")),n&&n.length&&(i=20,this.singleToolBar=new k(c,{tools:n,click:F(this._toolBarClick,this),modal:!0}),r=this.singleToolBar._popup.element.outerWidth(),s=this.singleToolBar._popup.element.outerHeight(),e instanceof w?(a=this.modelToView(e.bounds(tt)),o=X(a.x,a.y).minus(X((r-a.width)/2,s+i))):e instanceof b&&(l=this.modelToView(e.bounds()),o=X(l.x,l.y).minus(X((r-l.width-20)/2,s+i))),o?(this.canvas.translate||(o=o.minus(X(this.scroller.scrollLeft,this.scroller.scrollTop))),o=this.viewToDocument(o),o=X(_e.max(o.x,0),_e.max(o.y,0)),this.singleToolBar.showAt(o)):this._destroyToolBar())))},_toolBarClick:function(e){this.trigger("toolBarClick",e),this._destroyToolBar()},_mouseMove:function(e){if(!this.pauseMouseHandlers){var t=this._calculatePosition(e);0!==e.which&&1!=e.which||!this.toolService.move(t,this._meta(e))||e.preventDefault()}},_keydown:function(e){this.toolService.keyDown(e.keyCode,this._meta(e))&&e.preventDefault()},_wheel:function(e){var t=n(e),i=this._calculatePosition(e),o=z(this._meta(e),{delta:t});this.toolService.wheel(i,o)&&e.preventDefault()},_meta:function(e){return{ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,shiftKey:e.shiftKey}},_calculatePosition:function(e){var n=e.pageX===t?e.originalEvent:e,i=new X(n.pageX,n.pageY),o=this.documentToModel(i);return o},_normalizePointZoom:function(e){return e.times(1/this.zoom())},_initialize:function(){this.shapes=[],this._selectedItems=[],this.connections=[],this._dataMap={},this._connectionsDataMap={},this._inactiveShapeItems=new u,this._deferredConnectionUpdates=[],this.undoRedoService=new J({undone:this._syncHandler,redone:this._syncHandler}),this.id=I.randomId()},_fetchFreshData:function(){var e=this;e._dataSource(),e._isEditable&&e._connectionDataSource(),e.options.autoBind&&(e._isEditable?(this._loadingShapes=!0,this._loadingConnections=!0,e.dataSource.fetch(),e.connectionsDataSource.fetch()):e.dataSource.fetch())},_dataSource:function(){var e,t;fe(this.options.connectionsDataSource)?(this._isEditable=!0,e=this.options.dataSource||{},t=pe(e)?{data:e}:e,this.dataSource&&this._shapesRefreshHandler?this.dataSource.unbind("change",this._shapesRefreshHandler).unbind("requestStart",this._shapesRequestStartHandler).unbind("error",this._shapesErrorHandler):(this._shapesRefreshHandler=F(this._refreshShapes,this),this._shapesRequestStartHandler=F(this._shapesRequestStart,this),this._shapesErrorHandler=F(this._error,this)),this.dataSource=kendo.data.DataSource.create(t).bind("change",this._shapesRefreshHandler).bind("requestStart",this._shapesRequestStartHandler).bind("error",this._shapesErrorHandler)):(this._treeDataSource(),this._isEditable=!1)},_connectionDataSource:function(){var e,t=this.options.connectionsDataSource;t&&(e=pe(t)?{data:t}:t,this.connectionsDataSource&&this._connectionsRefreshHandler?this.connectionsDataSource.unbind("change",this._connectionsRefreshHandler).unbind("requestStart",this._connectionsRequestStartHandler).unbind("error",this._connectionsErrorHandler):(this._connectionsRefreshHandler=F(this._refreshConnections,this),this._connectionsRequestStartHandler=F(this._connectionsRequestStart,this),this._connectionsErrorHandler=F(this._connectionsError,this)),this.connectionsDataSource=kendo.data.DataSource.create(e).bind("change",this._connectionsRefreshHandler).bind("requestStart",this._connectionsRequestStartHandler).bind("error",this._connectionsErrorHandler))},_shapesRequestStart:function(e){"read"==e.type&&(this._loadingShapes=!0)},_connectionsRequestStart:function(e){"read"==e.type&&(this._loadingConnections=!0)},_error:function(){this._loadingShapes=!1},_connectionsError:function(){this._loadingConnections=!1},_refreshShapes:function(e){"remove"===e.action?this._shouldRefresh()&&this._removeShapes(e.items):"itemchange"===e.action?this._shouldRefresh()&&this._updateShapes(e.items,e.field):"add"===e.action?this._inactiveShapeItems.add(e.items):"sync"===e.action?this._syncShapes(e.items):this.refresh()},_shouldRefresh:function(){return!this._suspended},_suspendModelRefresh:function(){this._suspended=(this._suspended||0)+1},_resumeModelRefresh:function(){this._suspended=_e.max((this._suspended||0)-1,0)},refresh:function(){this._loadingShapes=!1,this._loadingConnections||this._rebindShapesAndConnections()},_rebindShapesAndConnections:function(){this.clear(),this._addShapes(this.dataSource.view()),this.connectionsDataSource&&this._addConnections(this.connectionsDataSource.view(),!1),this.options.layout?this.layout(this.options.layout):this._redrawConnections(),this.trigger("dataBound")},refreshConnections:function(){this._loadingConnections=!1,this._loadingShapes||this._rebindShapesAndConnections()},_redrawConnections:function(){var e,t=this.connections;for(e=0;t.length>e;e++)t[e].refresh()},_removeShapes:function(e){var t,n,i=this._dataMap;for(n=0;e.length>n;n++)t=e[n],i[t.id]&&(this.remove(i[t.id],!1),i[t.id]=null)},_syncShapes:function(){var e=this,t=e._inactiveShapeItems;t.forEach(function(n){var i=n.dataItem,o=n.element;i.isNew()||(o?(o._setOptionsFromModel(),e.addShape(o,n.undoable),e._dataMap[i.id]=o):e._addDataItem(i),n.activate(),t.remove(i))})},_updateShapes:function(e,t){var n,i,o;for(n=0;e.length>n;n++)i=e[n],o=this._dataMap[i.id],o&&o.updateOptionsFromModel(i,t)},_addShapes:function(e){for(var t=0;e.length>t;t++)this._addDataItem(e[t],!1)},_refreshConnections:function(e){"remove"===e.action?this._shouldRefresh()&&this._removeConnections(e.items):"add"===e.action?this._addConnections(e.items):"sync"===e.action||("itemchange"===e.action?this._shouldRefresh()&&this._updateConnections(e.items):this.refreshConnections())},_removeConnections:function(e){for(var t=0;e.length>t;t++)this.remove(this._connectionsDataMap[e[t].uid],!1),this._connectionsDataMap[e[t].uid]=null},_updateConnections:function(e){var t,n,i;for(t=0;e.length>t;t++)n=e[t],i=this._connectionsDataMap[n.uid],i.updateOptionsFromModel(n)},_addConnections:function(e,t){var n,i,o=e.length;for(n=0;o>n;n++)i=e[n],this._addConnectionDataItem(i,t)},_addConnectionDataItem:function(e,t){var n,i,o,r;this._connectionsDataMap[e.uid]||(n=this._validateConnector(e.from),fe(n)&&null!==n||(n=new X(e.fromX,e.fromY)),i=this._validateConnector(e.to),fe(i)&&null!==i||(i=new X(e.toX,e.toY)),fe(n)&&fe(i)&&(o=z({},this.options.connectionDefaults),o.dataItem=e,r=new b(n,i,o),this._connectionsDataMap[e.uid]=r,this.addConnection(r,t)))},_validateConnector:function(e){var t;return fe(e)&&null!==e&&(t=this._dataMap[e]),t},_treeDataSource:function(){var e=this,t=e.options,n=t.dataSource;n=pe(n)?{data:n}:n,n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource&&e._refreshHandler&&e._unbindDataSource(),e._refreshHandler=F(e._refreshSource,e),e._errorHandler=F(e._error,e),e.dataSource=O.create(n).bind(xe,e._refreshHandler).bind(Me,e._errorHandler)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(xe,e._refreshHandler).unbind(Me,e._errorHandler)},_adorn:function(e,n){n!==t&&e&&(n?(this._adorners.push(e),this.adornerLayer.append(e.visual)):(re.remove(this._adorners,e),this.adornerLayer.remove(e.visual)))},_showConnectors:function(e,t){t?this._connectorsAdorner.show(e):this._connectorsAdorner.destroy()},_updateAdorners:function(){var e,t,n=this._adorners;for(e=0;n.length>e;e++)t=n[e],t.refreshBounds&&t.refreshBounds(),t.refresh()},_refresh:function(){for(var e=0;this.connections.length>e;e++)this.connections[e].refresh()},_destroyToolBar:function(){this.singleToolBar&&(this.singleToolBar.hide(),this.singleToolBar.destroy(),this.singleToolBar=null)},_destroyGlobalToolBar:function(){this.toolBar&&(this.toolBar.hide(),this.toolBar.destroy(),this.toolBar=null)},exportDOMVisual:function(){var e=this.canvas._viewBox,t=P.transform().translate(-e.x,-e.y),n=new P.Rect([0,0],[e.width,e.height]),i=E.Path.fromRect(n),o=new E.Group({transform:t}),r=new E.Group({clip:i}),s=this.canvas.drawingElement.children[0];return r.append(o),o.children.push(s),r},exportVisual:function(){var e=P.transform().scale(1/this._zoom),t=new E.Group({transform:e}),n=this.mainLayer.drawingElement;return t.children.push(n),t},_syncChanges:function(){this._syncShapeChanges(),this._syncConnectionChanges()},_syncShapeChanges:function(){this.dataSource&&this._isEditable&&this.dataSource.sync()},_syncConnectionChanges:function(){var t=this;t.connectionsDataSource&&t._isEditable&&(e.when.apply(e,t._deferredConnectionUpdates).then(function(){t.connectionsDataSource.sync()}),t.deferredConnectionUpdates=[])}}),M.ExportMixin.extend(x.fn,!0),kendo.PDFMixin&&kendo.PDFMixin.extend(x.fn),k=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),this.diagram=e,this.options=z({},this.options,t),this._tools=[],this.createToolBar(),this.createTools(),this.appendTools(),this.options.modal&&this.createPopup(),this.bind(this.events,t)},events:["click"],createPopup:function(){this.container=e("<div/>").append(this.element),this._popup=this.container.kendoPopup({}).getKendoPopup()},appendTools:function(){var e,t;for(e=0;this._tools.length>e;e++)t=this._tools[e],(t.buttons&&t.buttons.length||!fe(t.buttons))&&this._toolBar.add(t)},createToolBar:function(){this.element=e("<div/>"),this._toolBar=this.element.kendoToolBar({click:F(this.click,this),resizable:!1}).getKendoToolBar(),this.element.css("border","none")},createTools:function(){for(var e=0;this.options.tools.length>e;e++)this.createTool(this.options.tools[e])},createTool:function(e){var t=(ve(e)?e.name:e)+"Tool";this[t]?this[t](e):this._tools.push(e)},showAt:function(e){this._popup&&this._popup.open(e.x,e.y)},hide:function(){this._popup&&this._popup.close()},newGroup:function(){return{type:"buttonGroup",buttons:[]}},editTool:function(){this._tools.push({spriteCssClass:"k-icon k-i-pencil",showText:"overflow",type:"button",text:"Edit",attributes:this._setAttributes({action:"edit"})})},deleteTool:function(){this._tools.push({spriteCssClass:"k-icon k-i-close",showText:"overflow",type:"button",text:"Delete",attributes:this._setAttributes({action:"delete"})})},rotateAnticlockwiseTool:function(e){this._appendGroup("rotate"),this._rotateGroup.buttons.push({spriteCssClass:"k-icon k-i-rotateccw",showText:"overflow",text:"RotateAnticlockwise",group:"rotate",attributes:this._setAttributes({action:"rotateAnticlockwise",step:e.step})})},rotateClockwiseTool:function(e){this._appendGroup("rotate"),this._rotateGroup.buttons.push({spriteCssClass:"k-icon k-i-rotatecw",attributes:this._setAttributes({action:"rotateClockwise",step:e.step}),showText:"overflow",text:"RotateClockwise",group:"rotate"})},createShapeTool:function(){this._appendGroup("create"),this._createGroup.buttons.push({spriteCssClass:"k-icon k-i-shape",showText:"overflow",text:"CreateShape",group:"create",attributes:this._setAttributes({action:"createShape"})})},createConnectionTool:function(){this._appendGroup("create"),this._createGroup.buttons.push({spriteCssClass:"k-icon k-i-connector",showText:"overflow",text:"CreateConnection",group:"create",attributes:this._setAttributes({action:"createConnection"})})},undoTool:function(){this._appendGroup("history"),this._historyGroup.buttons.push({spriteCssClass:"k-icon k-i-undo",showText:"overflow",text:"Undo",group:"history",attributes:this._setAttributes({action:"undo"})})},redoTool:function(){this._appendGroup("history"),this._historyGroup.buttons.push({spriteCssClass:"k-icon k-i-redo",showText:"overflow",text:"Redo",group:"history",attributes:this._setAttributes({action:"redo"})})},_appendGroup:function(e){var t="_"+e+"Group";this[t]||(this[t]=this.newGroup(),this._tools.push(this[t]))},_setAttributes:function(e){var t={};return e.action&&(t[kendo.attr("action")]=e.action),e.step&&(t[kendo.attr("step")]=e.step),t},_getAttributes:function(e){var t,n={},i=e.attr(kendo.attr("action"));return i&&(n.action=i),t=e.attr(kendo.attr("step")),t&&(n.step=t),n},click:function(t){var n=this._getAttributes(e(t.target)),i=n.action;i&&this[i](n),this.trigger("click",this.eventData(i))},eventData:function(e){var t=this.selectedElements(),n=[],i=[];return t instanceof w?n.push(t):i.push(t),{shapes:n,connections:i,action:e}},"delete":function(){var e=this.diagram,t=e._triggerRemove(this.selectedElements());t.length&&(this.diagram.remove(t,!0),this.diagram._syncChanges())},edit:function(){this.diagram.edit(this.selectedElements()[0])},rotateClockwise:function(e){var t=parseFloat(e.step||90);this._rotate(t)},rotateAnticlockwise:function(e){var t=parseFloat(e.step||90);this._rotate(-t)},_rotate:function(e){var t=this.diagram._resizingAdorner;t.angle(t.angle()+e),t.rotate()},selectedElements:function(){return this.diagram.select()},createShape:function(){this.diagram.createShape()},createConnection:function(){this.diagram.createConnection()},undo:function(){this.diagram.undo()},redo:function(){this.diagram.redo()},destroy:function(){this.diagram=null,this.element=null,this.options=null,this._toolBar&&this._toolBar.destroy(),this._popup&&this._popup.destroy()}}),C=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),this.options=L(!0,{},this.options,t),this.element=e,this.model=this.options.model,this.fields=this._getFields(),this._initContainer(),this.createEditable()},options:{editors:{}},_initContainer:function(){this.wrapper=this.element},createEditable:function(){var e=this.options;this.editable=new kendo.ui.Editable(this.wrapper,{fields:this.fields,target:e.target,clearContainer:!1,model:this.model})},_isEditable:function(e){return this.model.editable&&this.model.editable(e)},_getFields:function(){var e,t,n,i=[],o=this.model.fields;for(e in o)t={},this._isEditable(e)&&(n=this.options.editors[e],n&&(t.editor=n),t.field=e,i.push(t));return i},end:function(){return this.editable.end()},destroy:function(){this.editable.destroy(),this.editable.element.find("["+kendo.attr("container-for")+"]").empty(),this.model=this.wrapper=this.element=this.columns=this.editable=null}}),S=C.extend({init:function(e,t){C.fn.init.call(this,e,t),this.bind(this.events,this.options),this.open()},events:["update","cancel"],options:{window:{modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1}},_initContainer:function(){var t,n=this;this.wrapper=e('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"),this.model.uid),t="",this.options.template?(t+=this._renderTemplate(),this.fields=[]):t+=this._renderFields(),t+=this._renderButtons(),this.wrapper.append(e('<div class="k-edit-form-container"/>').append(t)),this.window=new kendo.ui.Window(this.wrapper.appendTo(this.element),this.options.window),this.window.bind("close",function(e){e.userTriggered&&(e.sender.element.focus(),n._cancelClick(e))}),this._attachButtonEvents()},_renderTemplate:function(){var e=this.options.template;return"string"==typeof e&&(e=window.unescape(e)),e=kendo.template(e)(this.model)},_renderFields:function(){var e,t,n="";for(e=0;this.fields.length>e;e++)t=this.fields[e],n+='<div class="k-edit-label"><label for="'+t.field+'">'+(t.field||"")+"</label></div>",this._isEditable(t.field)&&(n+="<div "+kendo.attr("container-for")+'="'+t.field+'" class="k-edit-field"></div>');return n},_renderButtons:function(){var e='<div class="k-edit-buttons k-state-default">';return e+=this._createButton("update"),e+=this._createButton("cancel"),e+="</div>"},_createButton:function(e){return kendo.template(ut)(v[e])},_attachButtonEvents:function(){this._cancelClickHandler=F(this._cancelClick,this),this.window.element.on(ke+ye,"a.k-diagram-cancel",this._cancelClickHandler),this._updateClickHandler=F(this._updateClick,this),this.window.element.on(ke+ye,"a.k-diagram-update",this._updateClickHandler)},_updateClick:function(e){e.preventDefault(),this.trigger("update")},_cancelClick:function(e){e.preventDefault(),this.trigger("cancel")},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",F(this.destroy,this)).close()},destroy:function(){this.window.close().destroy(),this.window.element.off(ke+ye,"a.k-diagram-cancel",this._cancelClickHandler),this.window.element.off(ke+ye,"a.k-diagram-update",this._updateClickHandler),this._cancelClickHandler=null,this._editUpdateClickHandler=null,this.window=null,C.fn.destroy.call(this)}}),c.fn=c.prototype={onActivate:function(t){var n=e.Deferred();return this.callbacks.push({callback:t,deferred:n}),n},activate:function(){var e,t,n=this.callbacks;for(t=0;n.length>t;t++)e=this.callbacks[t],e.callback(this.dataItem),e.deferred.resolve();this.callbacks=[]}},u.fn=u.prototype={add:function(e){for(var t=0;e.length>t;t++)this.items[e[t].uid]=new c(e[t])},forEach:function(e){for(var t in this.items)e(this.items[t])},getByUid:function(e){return this.items[e]},remove:function(e){delete this.items[e.uid]}},T=B.extend({init:function(){this.shapes=[]},_add:function(e,t){this.shapes.push({bounds:t,shape:e}),e._quadNode=this},insert:function(e,t){this._add(e,t)},remove:function(e){var t,n=this.shapes,i=n.length;for(t=0;i>t;t++)if(n[t].shape===e){n.splice(t,1);break}},hitTestRect:function(e){var t,n=this.shapes,i=n.length;for(t=0;i>t;t++)if(this._testRect(n[t].shape,e))return!0},_testRect:function(e,t){var n,i=e.rotate().angle,o=e.bounds();return n=i?Q.rects(t,o,-i):o.overlaps(t)}}),D=T.extend({init:function(e){T.fn.init.call(this),this.children=[],this.rect=e},inBounds:function(e){var t=this.rect,n=t.bottomRight(),i=e.bottomRight(),o=e.x>=t.x&&e.y>=t.y&&n.x>=i.x&&n.y>=i.y;return o},overlapsBounds:function(e){return this.rect.overlaps(e)},insert:function(e,t){var n,i=!1,o=this.children,r=o.length;if(this.inBounds(t)){if(!r&&4>this.shapes.length)this._add(e,t);else{for(r||this._initChildren(),n=0;o.length>n;n++)if(o[n].insert(e,t)){i=!0;break}i||this._add(e,t)}i=!0}return i},_initChildren:function(){var e,t,n=this.rect,i=this.children,o=this.shapes,r=n.center(),s=n.width/2,a=n.height/2;for(i.push(new D(new j(n.x,n.y,s,a)),new D(new j(r.x,n.y,s,a)),new D(new j(n.x,r.y,s,a)),new D(new j(r.x,r.y,s,a))),t=o.length-1;t>=0;t--)for(e=0;i.length>e;e++)if(i[e].insert(o[t].shape,o[t].bounds)){o.splice(t,1);break}},hitTestRect:function(e){var t,n=this.children,i=n.length,o=!1;if(this.overlapsBounds(e))if(T.fn.hitTestRect.call(this,e))o=!0;else for(t=0;i>t;t++)if(n[t].hitTestRect(e)){o=!0;break}return o}}),A=B.extend({ROOT_SIZE:1e3,init:function(e){var t=F(this._boundsChange,this);e.bind(be,t),e.bind(Le,t),this.initRoots()},initRoots:function(){this.rootMap={},this.root=new T},clear:function(){this.initRoots()},_boundsChange:function(e){e.item._quadNode&&e.item._quadNode.remove(e.item),this.insert(e.item)},insert:function(e){var t=e.bounds(tt),n=this.ROOT_SIZE,i=this.getSectors(t),o=i[0][0],r=i[1][0];this.inRoot(i)?this.root.insert(e,t):(this.rootMap[o]||(this.rootMap[o]={}),this.rootMap[o][r]||(this.rootMap[o][r]=new D(new j(o*n,r*n,n,n))),this.rootMap[o][r].insert(e,t))},remove:function(e){e._quadNode&&e._quadNode.remove(e)},inRoot:function(e){return e[0].length>1||e[1].length>1},getSectors:function(e){var t,n,i=this.ROOT_SIZE,o=e.bottomRight(),r=_e.floor(o.x/i),s=_e.floor(o.y/i),a=[[],[]];for(t=_e.floor(e.x/i);r>=t;t++)a[0].push(t);for(n=_e.floor(e.y/i);s>=n;n++)a[1].push(n);return a},hitTestRect:function(e){var t,n,i,o,r,s=this.getSectors(e);if(this.root.hitTestRect(e))return!0;for(t=0;s[0].length>t;t++)for(i=s[0][t],n=0;s[1].length>n;n++)if(o=s[1][n],r=(this.rootMap[i]||{})[o],r&&r.hitTestRect(e))return!0;return!1}}),M.ui.plugin(x),z(I,{Shape:w,Connection:b,Connector:y,DiagramToolBar:k,QuadNode:D,QuadRoot:T,ShapesQuadTree:A,PopupEditor:S})}(window.kendo.jQuery)}(),function(){!function(e,t){function n(e,t){if(null===t)return t;var n=x(e,!0);return n(t)}function i(e){return typeof e!==P}function o(e,t,n){var i,o,l=a(e),c=a(t),u=h(e)-h(t)<0,d=[];for(d.push(e),i=0;n>i;i++)o={r:r(l.r,c.r,i,n,u),g:r(l.g,c.g,i,n,u),b:r(l.b,c.b,i,n,u)},d.push(s(o));return d.push(t),d}function r(e,t,n,i,o){var r,s=f.min(f.abs(e),f.abs(t)),a=f.max(f.abs(e),f.abs(t)),l=(a-s)/(i+1),c=l*(n+1);return r=o?s+c:a-c}function s(e){return"#"+l(e.r)+l(e.g)+l(e.b)}function a(e){e=e.replace("#","");var t=c(e);return{r:u(t.r),g:u(t.g),b:u(t.b)}}function l(e){var t=f.round(e).toString(16).toUpperCase();return 1===t.length&&(t="0"+t),t}function c(e){var t=e.length,n={};return 3===t?(n.r=e[0],n.g=e[1],n.b=e[2]):(n.r=e.substring(0,2),n.g=e.substring(2,4),n.b=e.substring(4,6)),n}function u(e){return parseInt(e.toString(16),16)}function h(e){var t=0;return e&&(e=a(e),t=f.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)),t}function d(e){var t=f.pow(10,4);return f.round(e*t)/t}var f=Math,p=e.proxy,g=e.isArray,m=window.kendo,v=m.Class,_=m.ui.Widget,y=m.template,w=m.deepExtend,b=m.data.HierarchicalDataSource,x=m.getter,k=m.dataviz,C=".kendoTreeMap",S="change",T="dataBound",D="itemCreated",A=Number.MAX_VALUE,M="mouseover"+C,E="mouseleave"+C,P="undefined",I=_.extend({init:function(t,n){m.destroy(t),e(t).empty(),_.fn.init.call(this,t,n),this.wrapper=this.element,this._initTheme(this.options),this.element.addClass("k-widget k-treemap"),this._setLayout(),this._originalOptions=w({},this.options),this._initDataSource(),this._attachEvents(),m.notify(this,k.ui)},options:{name:"TreeMap",theme:"default",autoBind:!0,textField:"text",valueField:"value",colorField:"color"},events:[T,D],_initTheme:function(e){var t=this,n=k.ui.themes||{},i=((e||{}).theme||"").toLowerCase(),o=(n[i]||{}).treeMap;t.options=w({},o,e)},_attachEvents:function(){this.element.on(M,p(this._mouseover,this)).on(E,p(this._mouseleave,this))},_setLayout:function(){"horizontal"===this.options.type?(this._layout=new F(!1),this._view=new z(this,this.options)):"vertical"===this.options.type?(this._layout=new F(!0),this._view=new z(this,this.options)):(this._layout=new R,this._view=new B(this,this.options))},_initDataSource:function(){var e=this,t=e.options,n=t.dataSource;e._dataChangeHandler=p(e._onDataChange,e),e.dataSource=b.create(n).bind(S,e._dataChangeHandler),n&&e.options.autoBind&&e.dataSource.fetch()},setDataSource:function(e){var t=this;t.dataSource.unbind(S,t._dataChangeHandler),t.dataSource=e.bind(S,t._dataChangeHandler),e&&t.options.autoBind&&t.dataSource.fetch()},_onDataChange:function(e){var t,n,i,o,r=e.node,s=e.items,a=this.options;if(r){if(s.length){for(i=this._getByUid(r.uid),i.children=[],s=new m.data.Query(s)._sortForGrouping(a.valueField,"desc"),n=0;s.length>n;n++)t=s[n],i.children.push(this._wrapItem(t));o=this._view.htmlSize(i),this._layout.compute(i.children,i.coord,o),this._setColors(i.children),this._view.render(i)}}else this.element.empty(),t=this._wrapItem(s[0]),this._layout.createRoot(t,this.element.outerWidth(),this.element.outerHeight(),"vertical"===this.options.type),this._view.createRoot(t),this._root=t,this._colorIdx=0;for(n=0;s.length>n;n++)s[n].load();r&&this.trigger(T,{node:r})},_setColors:function(e){var t,n,r,s,a=this.options.colors,l=this._colorIdx,c=a[l%a.length];for(g(c)&&(t=o(c[0],c[1],e.length)),r=!1,s=0;e.length>s;s++)n=e[s],i(n.color)||(n.color=t?t[s]:c),n.dataItem.hasChildren||(r=!0);r&&this._colorIdx++},_contentSize:function(e){this.view.renderHeight(e)},_wrapItem:function(e){var t={};return i(this.options.valueField)&&(t.value=n(this.options.valueField,e)),i(this.options.colorField)&&(t.color=n(this.options.colorField,e)),i(this.options.textField)&&(t.text=n(this.options.textField,e)),t.level=e.level(),t.dataItem=e,t},_getByUid:function(e){for(var t,n=[this._root];n.length;){if(t=n.pop(),t.dataItem.uid===e)return t;t.children&&(n=n.concat(t.children))}},dataItem:function(t){var n=e(t).attr(m.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},findByUid:function(e){return this.element.find(".k-treemap-tile["+m.attr("uid")+"='"+e+"']")},_mouseover:function(t){var n=e(t.target);n.hasClass("k-leaf")&&(this._removeActiveState(),n.removeClass("k-state-hover").addClass("k-state-hover"))},_removeActiveState:function(){this.element.find(".k-state-hover").removeClass("k-state-hover")},_mouseleave:function(){this._removeActiveState()},destroy:function(){_.fn.destroy.call(this),this.element.off(C),this.dataSource&&this.dataSource.unbind(S,this._dataChangeHandler),this._root=null,m.destroy(this.element)},items:function(){return e()},getSize:function(){return m.dimensions(this.element)},_resize:function(){this.dataSource.fetch()},setOptions:function(e){var n=e.dataSource;e.dataSource=t,this._originalOptions=w(this._originalOptions,e),this.options=w({},this._originalOptions),this._setLayout(),this._initTheme(this.options),_.fn._setEvents.call(this,e),n&&this.setDataSource(b.create(n)),this.options.autoBind&&this.dataSource.fetch()}}),R=v.extend({createRoot:function(e,t,n){e.coord={width:t,height:n,top:0,left:0}},leaf:function(e){return!e.children},layoutChildren:function(e,t){var n,i,o,r,s=t.width*t.height,a=0,l=[];for(n=0;e.length>n;n++)l[n]=parseFloat(e[n].value),a+=l[n];for(n=0;l.length>n;n++)e[n].area=s*l[n]/a;i=this.layoutHorizontal()?t.height:t.width,o=[e[0]],r=e.slice(1),this.squarify(r,o,i,t)},squarify:function(e,t,n,i){this.computeDim(e,t,n,i)},computeDim:function(e,n,i,o){var r,s,a;return e.length+n.length==1?(r=1==e.length?e:n,this.layoutLast(r,i,o),t):(e.length>=2&&0===n.length&&(n=[e[0]],e=e.slice(1)),0===e.length?(n.length>0&&this.layoutRow(n,i,o),t):(s=e[0],this.worstAspectRatio(n,i)>=this.worstAspectRatio([s].concat(n),i)?this.computeDim(e.slice(1),n.concat([s]),i,o):(a=this.layoutRow(n,i,o),this.computeDim(e,[],a.dim,a)),t))},layoutLast:function(e,t,n){e[0].coord=n},layoutRow:function(e,t,n){return this.layoutHorizontal()?this.layoutV(e,t,n):this.layoutH(e,t,n)},orientation:"h",layoutVertical:function(){return"v"===this.orientation},layoutHorizontal:function(){return"h"===this.orientation},layoutChange:function(){this.orientation=this.layoutVertical()?"h":"v"},worstAspectRatio:function(e,t){var n,i,o,r,s;if(!e||0===e.length)return A;for(n=0,i=0,o=A,r=0;e.length>r;r++)s=e[r].area,n+=s,o=s>o?o:s,i=i>s?i:s;return f.max(t*t*i/(n*n),n*n/(t*t*o))},compute:function(e,t,n){if(t.width>=t.height&&this.layoutHorizontal()||this.layoutChange(),e&&e.length>0){var i={width:t.width,height:t.height-n.text,top:0,left:0};this.layoutChildren(e,i)}},layoutV:function(e,t,n){var i,o,r,s=this._totalArea(e),a=0;for(t=d(s/t),i=0;e.length>i;i++)o=d(e[i].area/t),e[i].coord={height:o,width:t,top:n.top+a,left:n.left},a+=o;return r={height:n.height,width:n.width-t,top:n.top,left:n.left+t},r.dim=f.min(r.width,r.height),r.dim!=r.height&&this.layoutChange(),r},layoutH:function(e,t,n){var i,o,r=this._totalArea(e),s=d(r/t),a=n.top,l=0;for(i=0;e.length>i;i++)e[i].coord={height:s,width:d(e[i].area/s),top:a,left:n.left+l},l+=e[i].coord.width;return o={height:n.height-s,width:n.width,top:n.top+s,left:n.left},o.dim=f.min(o.width,o.height),o.dim!=o.width&&this.layoutChange(),o},_totalArea:function(e){var t,n=0;for(t=0;e.length>t;t++)n+=e[t].area;return n}}),B=v.extend({init:function(t,n){this.options=w({},this.options,n),this.treeMap=t,this.element=e(t.element),this.offset=0},htmlSize:function(e){var t,n,i=this._getByUid(e.dataItem.uid),o={text:0};return e.children&&(this._clean(i),t=this._getText(e),t&&(n=this._createTitle(e),i.append(n),o.text=n.height()),i.append(this._createWrap()),this.offset=(i.outerWidth()-i.innerWidth())/2),o},_getByUid:function(e){return this.element.find(".k-treemap-tile["+m.attr("uid")+"='"+e+"']")},render:function(e){var t,n,i,o,r=this._getByUid(e.dataItem.uid),s=e.children;if(s)for(t=r.find(".k-treemap-wrap"),n=0;s.length>n;n++)i=s[n],o=this._createLeaf(i),t.append(o),this.treeMap.trigger(D,{element:o})},createRoot:function(e){var t=this._createLeaf(e);this.element.append(t),this.treeMap.trigger(D,{element:t})},_clean:function(e){e.css("background-color",""),e.removeClass("k-leaf"),e.removeClass("k-inverse"),e.empty()},_createLeaf:function(t){return this._createTile(t).css("background-color",t.color).addClass("k-leaf").toggleClass("k-inverse",this._tileColorBrightness(t)>180).append(e("<div></div>").html(this._getText(t)))},_createTile:function(t){var n,o={width:t.coord.width,height:t.coord.height,left:t.coord.left,top:t.coord.top};return o.width+=o.left&&this.offset?2*this.offset:this.offset,o.height+=o.top?2*this.offset:this.offset,n=e("<div class='k-treemap-tile'></div>").css({width:o.width,height:o.height,left:o.left,top:o.top}),i(t.dataItem)&&i(t.dataItem.uid)&&n.attr(m.attr("uid"),t.dataItem.uid),n},_getText:function(e){var t=e.text;return this.options.template&&(t=this._renderTemplate(e)),t},_renderTemplate:function(e){var t=y(this.options.template);return t({dataItem:e.dataItem,text:e.text})},_createTitle:function(t){return e("<div class='k-treemap-title'></div>").append(e("<div></div>").html(this._getText(t)))},_createWrap:function(){return e("<div class='k-treemap-wrap'></div>");
|
|
},_tileColorBrightness:function(e){return h(e.color)}}),F=v.extend({createRoot:function(e,t,n,i){e.coord={width:t,height:n,top:0,left:0},e.vertical=i},init:function(e){this.vertical=e,this.quotient=e?1:0},compute:function(e,t,n){var i,o,r;e.length>0&&(i=t.width,o=t.height,this.vertical?o-=n.text:i-=n.text,r={width:i,height:o,top:0,left:0},this.layoutChildren(e,r))},layoutChildren:function(e,t){var n,i,o=t.width*t.height,r=0,s=[];for(n=0;e.length>n;n++)i=e[n],s[n]=parseFloat(e[n].value),r+=s[n],i.vertical=this.vertical;for(n=0;s.length>n;n++)e[n].area=o*s[n]/r;this.sliceAndDice(e,t)},sliceAndDice:function(e,t){var n=this._totalArea(e);e[0].level%2===this.quotient?this.layoutHorizontal(e,t,n):this.layoutVertical(e,t,n)},layoutHorizontal:function(e,t,n){var i,o,r,s=0;for(i=0;e.length>i;i++)o=e[i],r=o.area/(n/t.width),o.coord={height:t.height,width:r,top:t.top,left:t.left+s},s+=r},layoutVertical:function(e,t,n){var i,o,r,s=0;for(i=0;e.length>i;i++)o=e[i],r=o.area/(n/t.height),o.coord={height:r,width:t.width,top:t.top+s,left:t.left},s+=r},_totalArea:function(e){var t,n=0;for(t=0;e.length>t;t++)n+=e[t].area;return n}}),z=B.extend({htmlSize:function(e){var t,n,i=this._getByUid(e.dataItem.uid),o={text:0,offset:0};return e.children&&(this._clean(i),t=this._getText(e),t&&(n=this._createTitle(e),i.append(n),o.text=e.vertical?n.height():n.width()),i.append(this._createWrap()),this.offset=(i.outerWidth()-i.innerWidth())/2),o},_createTitle:function(t){var n;return n=e(t.vertical?"<div class='k-treemap-title'></div>":"<div class='k-treemap-title-vertical'></div>"),n.append(e("<div></div>").html(this._getText(t)))}});k.ui.plugin(I)}(window.kendo.jQuery)}(),function(){!function(e,t,n){"use strict";function i(e){var t=C;try{return C=function(e){return e()},e()}finally{C=t}}function o(t,i,o,c,u,m){function v(){var n,m,v,_,y,k,C;return o.kRebind&&(n=e(e(i)[0].cloneNode(!0))),S=r(t,i,o,c,x).options,i.is("select")&&!function(t){if(t.length>0){var n=e(t[0]);!/\S/.test(n.text())&&/^\?/.test(n.val())&&n.remove()}}(i[0].options),m=x.call(i,D=S).data(c),l(m,t,o,c,u),t.$emit("kendoWidgetCreated",m),v=f(t,m),o.kRebind&&g(m,t,i,n,o.kRebind,v,o),o.kNgDisabled&&(_=o.kNgDisabled,y=t.$eval(_),y&&m.enable(!y),s(m,t,i,_)),o.kNgReadonly&&(k=o.kNgReadonly,C=t.$eval(k),C&&m.readonly(C),a(m,t,i,k)),o.kNgModel&&d(m,t,o.kNgModel),w&&h(m,t,i,w,b),m&&p(m,i),m}var _,y,w,b,x,k,S,T,A,M,E,P,I,R;if(!(i instanceof jQuery))throw Error("The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.");if(_=o.kNgDelay,y=t.$eval(_),m=m||[],w=m[0],b=m[1],x=e(i)[c],!x)return window.console.error("Could not find: "+c),null;if(k=r(t,i,o,c,x),S=k.options,k.unresolved.length){for(T=[],A=0,M=k.unresolved.length;M>A;A++)E=k.unresolved[A],P=e.Deferred(function(e){var i=t.$watch(E.path,function(t){t!==n&&(i(),e.resolve())})}).promise(),T.push(P);return e.when.apply(null,T).then(v),n}return _&&!y?(I=t.$root||t,R=function(){var e=t.$watch(_,function(t){t!==n&&(e(),i.removeAttr(o.$attr.kNgDelay),_=null,C(v))})},/^\$(digest|apply)$/.test(I.$$phase)?R():t.$apply(R),n):v()}function r(i,o,r,s,a){function l(e,o){var r=t.copy(i.$eval(o));r===n?p.push({option:e,path:o}):c[e]=r}var c,u,h,d,f=s.replace(/^kendo/,""),p=[],g=r.kOptions||r.options,m=i.$eval(g);return g&&m===n&&p.push({option:"options",path:g}),c=t.extend({},r.defaultOptions,m),u=a.widget.prototype.options,h=a.widget.prototype.events,e.each(r,function(e,t){var n,i,o,r;"source"!==e&&"kDataSource"!==e&&"kScopeField"!==e&&"scopeField"!==e&&(n="data"+e.charAt(0).toUpperCase()+e.slice(1),0===e.indexOf("on")&&(i=e.replace(/^on./,function(e){return e.charAt(2).toLowerCase()}),h.indexOf(i)>-1&&(c[i]=t)),u.hasOwnProperty(n)?l(n,t):u.hasOwnProperty(e)&&!E[e]?l(e,t):M[e]||(o=e.match(/^k(On)?([A-Z].*)/),o&&(r=o[2].charAt(0).toLowerCase()+o[2].slice(1),o[1]&&"kOnLabel"!=e?c[r]=t:("kOnLabel"==e&&(r="onLabel"),l(r,t)))))}),d=r.kDataSource||r.source,d&&(c.dataSource=A(i,o,f,d)),c.$angular=[i],{options:c,unresolved:p}}function s(e,t,i,o){return kendo.ui.PanelBar&&e instanceof kendo.ui.PanelBar||kendo.ui.Menu&&e instanceof kendo.ui.Menu?(T.warn("k-ng-disabled specified on a widget that does not have the enable() method: "+e.options.name),n):(t.$watch(o,function(t,n){t!=n&&e.enable(!t)}),n)}function a(e,t,i,o){return"function"!=typeof e.readonly?(T.warn("k-ng-readonly specified on a widget that does not have the readonly() method: "+e.options.name),n):(t.$watch(o,function(t,n){t!=n&&e.readonly(t)}),n)}function l(e,t,n,i,o){if(n[o]){var r=k(n[o]).assign;if(!r)throw Error(o+" attribute used but expression in it is not assignable: "+n[i]);r(t,e)}}function c(e){return/checkbox|radio/i.test(e.attr("type"))?e.prop("checked"):e.val()}function u(e){return P.test(e[0].tagName)}function h(e,t,i,o,r){var s,a,l,h;e.value&&(s=u(i)?function(){return c(i)}:function(){return e.value()},o.$render=function(){var i=o.$viewValue;i===n&&(i=o.$modelValue),i===n&&(i=null),setTimeout(function(){if(e){var n=t[e.element.attr("k-ng-model")];n&&(i=n),e.value(i)}},0)},a=!1,u(i)&&i.on("change",function(){a=!0}),l=function(e){return function(){var n;a||(e&&r&&(n=r.$pristine),o.$setViewValue(s()),e&&(o.$setPristine(),n&&r.$setPristine()),_(t))}},e.first("change",l(!1)),kendo.ui.AutoComplete&&e instanceof kendo.ui.AutoComplete||e.first("dataBound",l(!0)),h=s(),isNaN(o.$viewValue)||h==o.$viewValue||(o.$isEmpty(o.$viewValue)?null!=h&&""!==h&&h!=o.$viewValue&&o.$setViewValue(h):e.value(o.$viewValue)),o.$setPristine())}function d(t,i,o){var r,s,a,l,c,u,h,d,f;return"function"!=typeof t.value?(T.warn("k-ng-model specified on a widget that does not have the value() method: "+t.options.name),n):(r=e(t.element).parents("form"),s=i[r.attr("name")],a=k(o),l=a.assign,c=!1,u=a(i),t.$angular_setLogicValue(u),h=kendo.ui.MultiSelect&&t instanceof kendo.ui.MultiSelect,h&&(d=u.length),f=function(e){if(e===n&&(e=null),h){if(e==u&&e.length==d)return}else if(e==u)return;c||(u=e,h&&(d=u.length),t.$angular_setLogicValue(e))},h?i.$watchCollection(o,f):i.$watch(o,f),t.first("change",function(){c=!0,s&&s.$pristine&&s.$setDirty(),_(i,function(){l(i,t.$angular_getLogicValue())}),c=!1}),n)}function f(e,t){var n=e.$on("$destroy",function(){n(),t&&(t.element&&(t=v(t.element),t&&t.destroy()),t=null)});return n}function p(t,n){function i(){s.disconnect()}function o(){s.observe(e(n)[0],{attributes:!0})}var r,s;window.MutationObserver&&t.wrapper&&(r=[].slice.call(e(n)[0].classList),s=new MutationObserver(function(n){i(),t&&(n.forEach(function(n){var i,o=e(t.wrapper)[0];switch(n.attributeName){case"class":i=[].slice.call(n.target.classList),i.forEach(function(e){r.indexOf(e)<0&&(o.classList.add(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.add(e))}),r.forEach(function(e){i.indexOf(e)<0&&(o.classList.remove(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.remove(e))}),r=i;break;case"disabled":"function"!=typeof t.enable||t.element.attr("readonly")||t.enable(!e(n.target).attr("disabled"));break;case"readonly":"function"!=typeof t.readonly||t.element.attr("disabled")||t.readonly(!!e(n.target).attr("readonly"))}}),o())}),o(),t.first("destroy",i))}function g(t,n,i,o,r,s,a){var l=n.$watch(r,function(r,c){var u,h,d,f;t._muteRebind||r===c||(l(),u=z[t.options.name],u&&u.forEach(function(t){var i=n.$eval(a["k"+t]);i&&o.append(e(i).attr(kendo.toHyphens("k"+t),""))}),h=e(t.wrapper)[0],d=e(t.element)[0],f=i.injector().get("$compile"),t._destroy(),s&&s(),t=null,d&&(h&&h.parentNode.replaceChild(d,h),e(i).replaceWith(o)),f(o)(n))},!0);_(n)}function m(e,n){function i(e,t){b.directive(e,["directiveFactory",function(n){return n.create(t,e)}])}var o,r,s,a,l=n?"Mobile":"";l+=e.fn.options.name,o=l,r="kendo"+l.charAt(0)+l.substr(1).toLowerCase(),l="kendo"+l,s=l.replace(/([A-Z])/g,"-$1"),-1==R.indexOf(l.replace("kendo",""))&&(a=l===r?[l]:[l,r],t.forEach(a,function(e){b.directive(e,function(){return{restrict:"E",replace:!0,template:function(e,t){var n=I[o]||"div",i=t.kScopeField||t.scopeField;return"<"+n+" "+s+(i?'="'+i+'"':"")+">"+e.html()+"</"+n+">"}}})})),B.indexOf(l.replace("kendo",""))>-1||(i(l,l),r!=l&&i(r,l))}function v(t){return t=e(t),kendo.widgetInstance(t,kendo.ui)||kendo.widgetInstance(t,kendo.mobile.ui)||kendo.widgetInstance(t,kendo.dataviz.ui)}function _(e,t){var n=e.$root||e,i=/^\$(digest|apply)$/.test(n.$$phase);t?i?t():n.$apply(t):i||n.$digest()}function y(t,n){t.$destroy(),n&&e(n).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function w(n,i,o){var r,s,a;if(e.isArray(n))return t.forEach(n,function(e){w(e,i,o)});if("string"==typeof n){for(r=n.split("."),s=kendo;s&&r.length>0;)s=s[r.shift()];if(!s)return F.push([n,i,o]),!1;n=s.prototype}return a=n[i],n[i]=function(){var e=this,t=arguments;return o.apply({self:e,next:function(){return a.apply(e,arguments.length>0?arguments:t)}},t)},!0}var b,x,k,C,S,T,D,A,M,E,P,I,R,B,F,z;t&&t.injector&&(b=t.module("kendo.directives",[]),x=t.injector(["ng"]),k=x.get("$parse"),C=x.get("$timeout"),T=x.get("$log"),A=function(){var e={TreeList:"TreeListDataSource",TreeView:"HierarchicalDataSource",Scheduler:"SchedulerDataSource",PanelBar:"$PLAIN",Menu:"$PLAIN",ContextMenu:"$PLAIN"},t=function(e,t){return"$PLAIN"==t?e:kendo.data[t].create(e)};return function(n,i,o,r){var s=e[o]||"DataSource",a=n.$eval(r),l=t(a,s);return n.$watch(r,function(e){var n,o=v(i);o&&"function"==typeof o.setDataSource&&e!==a&&(n=t(e,s),o.setDataSource(n),a=e)}),l}}(),M={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},E={name:!0,title:!0,style:!0},P=/^(input|select|textarea)$/i,b.factory("directiveFactory",["$compile",function(t){var n,i,r=!1;return S=t,i=function(t,i){return{restrict:"AC",require:["?ngModel","^?form"],scope:!1,controller:["$scope","$attrs","$element",function(e,t){var n=this;n.template=function(e,n){t[e]=kendo.stringify(n)},e.$on("$destroy",function(){n.template=null,n=null})}],link:function(s,a,l,c){var u,h=e(a),d=t.replace(/([A-Z])/g,"-$1");h.attr(d,h.attr("data-"+d)),h[0].removeAttribute("data-"+d),u=o(s,a,l,t,i,c),u&&(n&&clearTimeout(n),n=setTimeout(function(){s.$emit("kendoRendered"),r||(r=!0,e("form").each(function(){var t=e(this).controller("form");t&&t.$setPristine()}))}))}}},{create:i}}]),I={Editor:"textarea",NumericTextBox:"input",DatePicker:"input",DateTimePicker:"input",TimePicker:"input",AutoComplete:"input",ColorPicker:"input",MaskedTextBox:"input",MultiSelect:"input",Upload:"input",Validator:"form",Button:"button",MobileButton:"a",MobileBackButton:"a",MobileDetailButton:"a",ListView:"ul",MobileListView:"ul",TreeView:"ul",Menu:"ul",ContextMenu:"ul",ActionSheet:"ul"},R=["MobileView","MobileDrawer","MobileLayout","MobileSplitView","MobilePane","MobileModalView"],B=["MobileApplication","MobileView","MobileModalView","MobileLayout","MobileActionSheet","MobileDrawer","MobileSplitView","MobilePane","MobileScrollView","MobilePopOver"],t.forEach(["MobileNavBar","MobileButton","MobileBackButton","MobileDetailButton","MobileTabStrip","MobileScrollView","MobileScroller"],function(e){B.push(e),e="kendo"+e,b.directive(e,function(){return{restrict:"A",link:function(t,n,i){o(t,n,i,e,e)}}})}),F=[],kendo.onWidgetRegistered(function(t){F=e.grep(F,function(e){return!w.apply(null,e)}),m(t.widget,"Mobile"==t.prefix)}),w(["ui.Widget","mobile.ui.Widget"],"angular",function(o,r){var s,a=this.self;return"init"==o?(!r&&D&&(r=D),D=null,r&&r.$angular&&(a.$angular_scope=r.$angular[0],a.$angular_init(a.element,r)),n):(s=a.$angular_scope,s&&i(function(){var i,l,c=r(),u=c.elements,h=c.data;if(u.length>0)switch(o){case"cleanup":t.forEach(u,function(t){var n=e(t).data("$$kendoScope");n&&n!==s&&n.$$kendoScope&&y(n,t)});break;case"compile":i=a.element.injector(),l=i?i.get("$compile"):S,t.forEach(u,function(t,i){var o,r;c.scopeFrom?o=c.scopeFrom:(r=h&&h[i],r!==n?(o=e.extend(s.$new(),r),o.$$kendoScope=!0):o=s),e(t).data("$$kendoScope",o),l(t)(o)}),_(s)}}),n)}),w("ui.Widget","$angular_getLogicValue",function(){return this.self.value()}),w("ui.Widget","$angular_setLogicValue",function(e){this.self.value(e)}),w("ui.Select","$angular_getLogicValue",function(){var e=this.self.dataItem(),t=this.self.options.dataValueField;return e?this.self.options.valuePrimitive?t?e[t]:e:e.toJSON():null}),w("ui.Select","$angular_setLogicValue",function(e){var t=this.self,i=t.options,o=i.dataValueField,r=i.text||"";e===n&&(e=""),o&&!i.valuePrimitive&&e&&(r=e[i.dataTextField]||"",e=e[o||i.dataTextField]),t.options.autoBind!==!1||t.listView.isBound()?t.value(e):!r&&e&&i.valuePrimitive?t.value(e):t._preselect(e,r)}),w("ui.MultiSelect","$angular_getLogicValue",function(){var t=this.self.dataItems().slice(0),n=this.self.options.dataValueField;return n&&this.self.options.valuePrimitive&&(t=e.map(t,function(e){return e[n]})),t}),w("ui.MultiSelect","$angular_setLogicValue",function(t){var n,i,o,r;null==t&&(t=[]),n=this.self,i=n.options,o=i.dataValueField,r=t,o&&!i.valuePrimitive&&(t=e.map(t,function(e){return e[o]})),i.autoBind!==!1||i.valuePrimitive||n.listView.isBound()?n.value(t):n._preselect(r,t)}),w("ui.AutoComplete","$angular_getLogicValue",function(){var e,t,n,i,o,r=this.self.options,s=this.self.value().split(r.separator),a=r.valuePrimitive,l=this.self.dataSource.data(),c=[];for(e=0,t=l.length;t>e;e++)for(n=l[e],i=r.dataTextField?n[r.dataTextField]:n,o=0;s.length>o;o++)if(i===s[o]){c.push(a?i:n.toJSON());break}return c}),w("ui.AutoComplete","$angular_setLogicValue",function(t){null==t&&(t=[]);var n=this.self,i=n.options.dataTextField;i&&!n.options.valuePrimitive&&(t=e.map(t,function(e){return e[i]})),n.value(t)}),w("ui.Widget","$angular_init",function(t,n){var i,o,r,s,a=this.self;if(n&&!e.isArray(n))for(i=a.$angular_scope,o=a.events.length;--o>=0;)r=a.events[o],s=n[r],s&&"string"==typeof s&&(n[r]=a.$angular_makeEventHandler(r,i,s))}),w("ui.Widget","$angular_makeEventHandler",function(e,t,n){return n=k(n),function(e){_(t,function(){n(t,{kendoEvent:e})})}}),w(["ui.Grid","ui.ListView","ui.TreeView"],"$angular_makeEventHandler",function(e,n,i){return"change"!=e?this.next():(i=k(i),function(e){var o,r,s,a,l,c,u,h,d,f=e.sender,p=f.options,g={kendoEvent:e};for(t.isString(p.selectable)&&(o=-1!==p.selectable.indexOf("cell"),r=-1!==p.selectable.indexOf("multiple")),s=g.selected=this.select(),a=g.data=[],l=g.columns=[],u=0;s.length>u;u++)h=o?s[u].parentNode:s[u],d=f.dataItem(h),o?(t.element.inArray(d,a)<0&&a.push(d),c=t.element(s[u]).index(),t.element.inArray(c,l)<0&&l.push(c)):a.push(d);r||(g.dataItem=g.data=a[0],g.selected=s[0]),_(n,function(){i(n,g)})})}),w("ui.Grid","$angular_init",function(i,o){if(this.next(),o.columns){var r=e.extend({},kendo.Template,o.templateSettings);t.forEach(o.columns,function(e){!e.field||e.template||e.format||e.values||e.encoded!==n&&!e.encoded||(e.template="<span ng-bind='"+kendo.expr(e.field,"dataItem")+"'>#: "+kendo.expr(e.field,r.paramName)+"#</span>")})}}),w("mobile.ui.ButtonGroup","value",function(e){var t=this.self;return null!=e&&(t.select(t.element.children("li.km-button").eq(e)),t.trigger("change"),t.trigger("select",{index:t.selectedIndex})),t.selectedIndex}),w("mobile.ui.ButtonGroup","_select",function(){this.next(),this.self.trigger("change")}),b.directive("kendoMobileApplication",function(){return{terminal:!0,link:function(e,t,n){o(e,t,n,"kendoMobileApplication","kendoMobileApplication")}}}).directive("kendoMobileView",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileView","kendoMobileView")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileDrawer",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileDrawer","kendoMobileDrawer")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileModalView",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileModalView","kendoMobileModalView")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileSplitView",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileSplitView","kendoMobileSplitView")},post:function(e,t,n){n._instance._layout()}}}}).directive("kendoMobilePane",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,o(e,t,n,"kendoMobilePane","kendoMobilePane")}}}}).directive("kendoMobileLayout",function(){return{link:{pre:function(e,t,n){o(e,t,n,"kendoMobileLayout","kendoMobileLayout")}}}}).directive("kendoMobileActionSheet",function(){return{restrict:"A",link:function(t,n,i){n.find("a[k-action]").each(function(){e(this).attr("data-"+kendo.ns+"action",e(this).attr("k-action"))}),o(t,n,i,"kendoMobileActionSheet","kendoMobileActionSheet")}}}).directive("kendoMobilePopOver",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,o(e,t,n,"kendoMobilePopOver","kendoMobilePopOver")}}}}).directive("kendoViewTitle",function(){return{restrict:"E",replace:!0,template:function(e){return"<span data-"+kendo.ns+"role='view-title'>"+e.html()+"</span>"}}}).directive("kendoMobileHeader",function(){return{restrict:"E",link:function(e,t){t.addClass("km-header").attr("data-role","header")}}}).directive("kendoMobileFooter",function(){return{restrict:"E",link:function(e,t){t.addClass("km-footer").attr("data-role","footer")}}}).directive("kendoMobileScrollViewPage",function(){return{restrict:"E",replace:!0,template:function(e){return"<div data-"+kendo.ns+"role='page'>"+e.html()+"</div>"}}}),t.forEach(["align","icon","rel","transition","actionsheetContext"],function(e){var t="k"+e.slice(0,1).toUpperCase()+e.slice(1);b.directive(t,function(){return{restrict:"A",priority:2,link:function(n,i,o){i.attr(kendo.attr(kendo.toHyphens(e)),n.$eval(o[t]))}}})}),z={TreeMap:["Template"],MobileListView:["HeaderTemplate","Template"],MobileScrollView:["EmptyTemplate","Template"],Grid:["AltRowTemplate","DetailTemplate","RowTemplate"],ListView:["EditTemplate","Template","AltTemplate"],Pager:["SelectTemplate","LinkTemplate"],PivotGrid:["ColumnHeaderTemplate","DataCellTemplate","RowHeaderTemplate"],Scheduler:["AllDayEventTemplate","DateHeaderTemplate","EventTemplate","MajorTimeHeaderTemplate","MinorTimeHeaderTemplate"],TreeView:["Template"],Validator:["ErrorTemplate"]},function(){var e={};t.forEach(z,function(n,i){t.forEach(n,function(t){e[t]||(e[t]=[]),e[t].push("?^^kendo"+i)})}),t.forEach(e,function(e,t){var n="k"+t,i=kendo.toHyphens(n);b.directive(n,function(){return{restrict:"A",require:e,terminal:!0,compile:function(t,o){if(""===o[n]){t.removeAttr(i);var r=t[0].outerHTML;return function(o,s,a,l){for(var c;!c&&l.length;)c=l.shift();c?(c.template(n,r),t.remove()):T.warn(i+" without a matching parent widget found. It can be one of the following: "+e.join(", "))}}}}})})}())}(window.kendo.jQuery,window.angular)}(),function(){!function(e,t,n){function i(e,t){var i=e.getAttribute(t);return null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:p.test(i)?i=parseFloat(i):d.test(i)&&!f.test(i)&&(i=Function("return ("+i+")")()),i}function o(e,t){var n={};return Object.keys(t).concat("dataSource").forEach(function(t){e.hasAttribute(kendo.toHyphens(t))&&(n[t]=i(e,kendo.toHyphens(t)))}),n}function r(e){var t={};return Object.keys(e).forEach(function(n){"_"!=n[0]&&(t[n]=e[n])}),t}function s(e,t){var n=document.createEvent("CustomEvent");n.initCustomEvent(e,!1,!0,r(t)),this.dispatchEvent(n),n.defaultPrevented&&t.preventDefault()}function a(e,t){var n,i=Object.keys(t);for(n=0;i.length>=n;n++)if("function"==typeof t[i[n]])e[i[n]]||(e[i[n]]=t[i[n]].bind(e.widget));else{if("options"===i[n])continue;e[i[n]]=e[i[n]]||t[i[n]]}}function l(t,n){var i=n.prototype.options,r=Object.create(HTMLElement.prototype);Object.defineProperty(r,"options",{get:function(){return this.widget.options},set:function(n){var i,o,r,s=this.widget;n=e.extend(!0,{},s.options,n),i=e(s.wrapper)[0],o=e(s.element)[0],s._destroy(),r=document.createElement(c[t]||"div"),i&&o&&(i.parentNode.replaceChild(o,i),e(o).replaceWith(r)),s.value&&(n.value=s.value()),s.init(r,n),this.bindEvents()}}),r.bindEvents=function(){n.prototype.events.forEach(function(e){this.widget.bind(e,s.bind(this,e)),this.hasAttribute(u+e)&&this.bind(e,function(t){window[this.getAttribute(u+e)].call(this,t)}.bind(this))}.bind(this))},r.attachedCallback=function(){var r,s=this,l=document.createElement(c[t]||"div");e(l).append(s.childNodes),e(l).attr("class",e(s).attr("class")),e(l).attr("style",e(s).attr("style")),s.appendChild(l),s.widget=new n(l,o(s,i)),r=s.widget;do a(s,r);while(r=Object.getPrototypeOf(r));this.bindEvents()},r.detachedCallback=function(){kendo.destroy(this.element)},kendo.webComponents.push("kendo-"+t),document.registerElement("kendo-"+t,{prototype:r})}var c,u,h,d,f,p;kendo.support.customElements&&!kendo.webComponents.length&&(!t||1!=t.version.major&&!t.injector)&&(c={editor:"textarea",numerictextbox:"input",datepicker:"input",datetimepicker:"input",timepicker:"input",autocomplete:"input",colorpicker:"input",maskedtextbox:"input",dropdownlist:"select",multiselect:"select",upload:"input",validator:"form",button:"button",mobilebutton:"a",mobilebackbutton:"a",mobiledetailbutton:"a",listview:"ul",mobilelistview:"ul",treeview:"ul",menu:"ul",contextmenu:"ul",actionsheet:"ul"},u="on-",h=[],kendo.onWidgetRegistered(function(e){var t=e.prefix+e.widget.prototype.options.name.toLowerCase();-1===h.indexOf(t)&&(h.push(t),l(t,e.widget))}),d=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,f=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/,p=/^(\+|-?)\d+(\.?)\d*$/)}(window.kendo.jQuery,window.angular)}(),function(){!function(e,t){var n,i;t&&t.register&&(n=this&&this.__decorate||function(e,t,n,i){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,i);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,i){return void(i&&i(t,n))},void 0);case 4:return e.reduceRight(function(e,i){return i&&i(t,n,e)||e},i)}},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},t.register("kendo/angular2",["angular2/angular2"],function(t){var o,r;return{setters:[function(e){o=e}],execute:function(){r=function(){function t(e,t){var n=this;this.elementRef=t,this.onChange=function(){},this.onTouched=function(){},this.element=t.nativeElement,this.element.addEventListener("change",function(){n.onChange(n.element.value())}),this.element.addEventListener("spin",function(){n.onChange(n.element.value())}),e.valueAccessor=this,this.cd=e,e.valueAccessor=this}return t.prototype.writeValue=function(e){this.element.value(e)},t.prototype.registerOnChange=function(e){this.onChange=e},t.prototype.registerOnTouched=function(e){this.onTouched=e},t=n([o.Directive({selector:e.webComponents.join(",")}),i("design:paramtypes",[o.NgControl,o.ElementRef])],t)}(),t("KendoValueAccessor",r)}}}))}(window.kendo,window.System)}();return window.kendo},typeof define=="function"&&define.amd?define:function(_,f){f()}); |