/** 
 * Kendo UI v2018.3.1017 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2018 Telerik EAD. 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(e,define){define("kendo.core.min",["jquery"],e)}(function(){return function(e,t,i){function n(){}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 i=e.charAt(0),n=e.substring(1);return"="===i?"+("+n+")+":":"===i?"+$kendoHtmlEncode("+n+")+":";"+e+";$kendoOutput+="}function r(e,t,i){return e+="",t=t||2,i=t-e.length,i?W[t].substring(0,i)+e:e}function s(e){var t=e.css(ve.support.transitions.css+"box-shadow")||e.css("box-shadow"),i=t?t.match(Ae)||[0,0,0,0,0]:[0,0,0,0,0],n=xe.max(+i[3],+(i[4]||0));return{left:-i[1]+n,right:+i[1]+n,bottom:+i[2]+n}}function a(t,i){var n,o,r,s,a,l,c,d=Se.browser,u=ve._outerWidth,h=ve._outerHeight;return t.parent().hasClass("k-animation-container")?(l=t.parent(".k-animation-container"),c=l[0].style,l.is(":hidden")&&l.css({display:"",position:""}),n=Te.test(c.width)||Te.test(c.height),n||l.css({width:i?u(t)+1:u(t),height:h(t),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(o=t[0].style.width,r=t[0].style.height,s=Te.test(o),a=Te.test(r),n=s||a,!s&&(!i||i&&o)&&(o=i?u(t)+1:u(t)),!a&&(!i||i&&r)&&(r=h(t)),t.wrap(e("<div/>").addClass("k-animation-container").css({width:o,height:r})),n&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),d.msie&&xe.floor(d.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function l(e){var t=1,i=arguments.length;for(t=1;t<i;t++)c(e,arguments[t]);return e}function c(e,t){var i,n,o,r,s,a=ve.data.ObservableArray,l=ve.data.LazyObservableArray,d=ve.data.DataSource,u=ve.data.HierarchicalDataSource;for(i in t)n=t[i],o=typeof n,r=o===Fe&&null!==n?n.constructor:null,r&&r!==Array&&r!==a&&r!==l&&r!==d&&r!==u&&r!==RegExp?n instanceof Date?e[i]=new Date(n.getTime()):R(n.clone)?e[i]=n.clone():(s=e[i],e[i]=typeof s===Fe?s||{}:{},c(e[i],n)):o!==Be&&(e[i]=n);return e}function d(e,t,n){for(var o in t)if(t.hasOwnProperty(o)&&t[o].test(e))return o;return n!==i?n:e}function u(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function h(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function p(t,i){var n,o={};return document.defaultView&&document.defaultView.getComputedStyle?(n=document.defaultView.getComputedStyle(t,""),i&&e.each(i,function(e,t){o[t]=n.getPropertyValue(t)})):(n=t.currentStyle,i&&e.each(i,function(e,t){o[t]=n[h(t)]})),ve.size(o)||(o=n),o}function f(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=p(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function m(t,n){var o,r=Se.browser.webkit,s=Se.browser.mozilla,a=t instanceof e?t[0]:t;if(t)return o=Se.isRtl(t),n===i?o&&r?a.scrollWidth-a.clientWidth-a.scrollLeft:Math.abs(a.scrollLeft):(a.scrollLeft=o&&r?a.scrollWidth-a.clientWidth-n:o&&s?-n:n,i)}function g(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&i++;return i}function v(e,i,n){var o,r,s;return i||(i="offset"),o=e[i](),r={top:o.top,right:o.right,bottom:o.bottom,left:o.left},Se.browser.msie&&(Se.pointers||Se.msPointers)&&!n&&(s=Se.isRtl(e)?1:-1,r.top-=t.pageYOffset-document.documentElement.scrollTop,r.left-=t.pageXOffset+s*document.documentElement.scrollLeft),r}function _(e){var t={};return be("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function b(e){return new ve.effects.Element(e)}function w(e,t,i,n){return typeof e===Me&&(R(t)&&(n=t,t=400,i=!1),R(i)&&(n=i,i=!1),typeof t===ze&&(i=t,t=400),e={effects:e,duration:t,reverse:i,complete:n}),_e({effects:{},duration:400,reverse:!1,init:ke,teardown:ke,hide:!1},e,{completeCallback:e.complete,complete:ke})}function y(t,i,n,o,r){for(var s,a=0,l=t.length;a<l;a++)s=e(t[a]),s.queue(function(){q.promise(s,w(i,n,o,r))});return t}function k(e,t,i,n){return t&&(t=t.split(" "),be(t,function(t,i){e.toggleClass(i,n)})),e}function x(e){return(""+e).replace(j,"&amp;").replace(G,"&lt;").replace(Y,"&gt;").replace($,"&quot;").replace(K,"&#39;")}function C(e,t){var n;return 0===t.indexOf("data")&&(t=t.substring(4),t=t.charAt(0).toLowerCase()+t.substring(1)),t=t.replace(oe,"-$1"),n=e.getAttribute("data-"+ve.ns+t),null===n?n=i:"null"===n?n=null:"true"===n?n=!0:"false"===n?n=!1:Ee.test(n)&&"mask"!=t?n=parseFloat(n):ie.test(n)&&!ne.test(n)&&(n=Function("return ("+n+")")()),n}function S(t,n,o){var r,s,a={};for(r in n)s=C(t,r),s!==i&&(te.test(r)&&("string"==typeof s?e("#"+s).length?s=ve.template(e("#"+s).html()):o&&(s=ve.template(o[s])):s=t.getAttribute(r)),a[r]=s);return a}function T(t,i){return e.contains(t,i)?-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 i=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(i)?!e.disabled:"a"===i?e.href||t:t)&&E(e)}function E(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function I(e,t){return new I.fn.init(e,t)}var M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G,$,K,Y,Q,X,Z,J,ee,te,ie,ne,oe,re,se,ae,le,ce,de,ue,he,pe,fe,me,ge,ve=t.kendo=t.kendo||{cultures:{}},_e=e.extend,be=e.each,we=e.isArray,ye=e.proxy,ke=e.noop,xe=Math,Ce=t.JSON||{},Se={},Te=/%/,De=/\{(\d+)(:[^\}]+)?\}/g,Ae=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Ee=/^(\+|-?)\d+(\.?)\d*$/,Ie="function",Me="string",Re="number",Fe="object",Pe="null",ze="boolean",Be="undefined",Le={},He={},Ne=[].slice;ve.version="2018.3.1017".replace(/^\s+|\s+$/g,""),n.extend=function(e){var t,i,n=function(){},o=this,r=e&&e.init?e.init:function(){o.apply(this,arguments)};n.prototype=o.prototype,i=r.fn=r.prototype=new n;for(t in e)i[t]=null!=e[t]&&e[t].constructor===Object?_e(!0,{},n.prototype[t],e[t]):e[t];return i.constructor=r,r.extend=o.extend,r},n.prototype._initOptions=function(e){this.options=l({},this.options,e)},R=ve.isFunction=function(e){return"function"==typeof e},F=function(){this._defaultPrevented=!0},P=function(){return this._defaultPrevented===!0},z=n.extend({init:function(){this._events={}},bind:function(e,t,n){var o,r,s,a,l,c=this,d=typeof e===Me?[e]:e,u=typeof t===Ie;if(t===i){for(o in e)c.bind(o,e[o]);return c}for(o=0,r=d.length;o<r;o++)e=d[o],a=u?t:t[e],a&&(n&&(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 i,n,o,r,s=this,a=typeof e===Me?[e]:e,l=typeof t===Ie;for(i=0,n=a.length;i<n;i++)e=a[i],o=l?t:t[e],o&&(r=s._events[e]=s._events[e]||[],r.unshift(o));return s},trigger:function(e,t){var i,n,o=this,r=o._events[e];if(r){for(t=t||{},t.sender=o,t._defaultPrevented=!1,t.preventDefault=F,t.isDefaultPrevented=P,r=r.slice(),i=0,n=r.length;i<n;i++)r[i].call(o,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var n,o=this,r=o._events[e];if(e===i)o._events={};else if(r)if(t)for(n=r.length-1;n>=0;n--)r[n]!==t&&r[n].original!==t||r.splice(n,1);else o._events[e]=[];return o}}),B=/^\w+/,L=/\$\{([^}]*)\}/g,H=/\\\}/g,N=/__CURLY__/g,O=/\\#/g,V=/__SHARP__/g,W=["","0","00","000","0000"],M={paramName:"data",useWithBlock:!0,render:function(e,t){var i,n,o="";for(i=0,n=t.length;i<n;i++)o+=e(t[i]);return o},compile:function(e,t){var i,n,r,s=_e({},this,t),a=s.paramName,l=a.match(B)[0],c=s.useWithBlock,d="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(R(e))return e;for(d+=c?"with("+a+"){":"",d+="$kendoOutput=",n=e.replace(H,"__CURLY__").replace(L,"#=$kendoHtmlEncode($1)#").replace(N,"}").replace(O,"__SHARP__").split("#"),r=0;r<n.length;r++)d+=o(n[r],r%2===0);d+=c?";}":";",d+="return $kendoOutput;",d=d.replace(V,"#");try{return i=Function(l,d),i._slotCount=Math.floor(n.length/2),i}catch(u){throw Error(ve.format("Invalid template:'{0}' Generated code:'{1}'",e,d))}}},function(){function e(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,function(e){var t=a[e];return typeof t===Me?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(r,s){var a,c,d,u,h,p,f=i,m=s[r];if(m&&typeof m===Fe&&typeof m.toJSON===Ie&&(m=m.toJSON(r)),typeof o===Ie&&(m=o.call(s,r,m)),p=typeof m,p===Me)return e(m);if(p===Re)return isFinite(m)?m+"":Pe;if(p===ze||p===Pe)return m+"";if(p===Fe){if(!m)return Pe;if(i+=n,h=[],"[object Array]"===l.apply(m)){for(u=m.length,a=0;a<u;a++)h[a]=t(a,m)||Pe;return d=0===h.length?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+f+"]":"["+h.join(",")+"]",i=f,d}if(o&&typeof o===Fe)for(u=o.length,a=0;a<u;a++)typeof o[a]===Me&&(c=o[a],d=t(c,m),d&&h.push(e(c)+(i?": ":":")+d));else for(c in m)Object.hasOwnProperty.call(m,c)&&(d=t(c,m),d&&h.push(e(c)+(i?": ":":")+d));return d=0===h.length?"{}":i?"{\n"+i+h.join(",\n"+i)+"\n"+f+"}":"{"+h.join(",")+"}",i=f,d}}var i,n,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":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==Ie&&(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!==Ie&&(Ce.stringify=function(e,r,s){var a;if(i="",n="",typeof s===Re)for(a=0;a<s;a+=1)n+=" ";else typeof s===Me&&(n=s);if(o=r,r&&typeof r!==Ie&&(typeof r!==Fe||typeof r.length!==Re))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function t(e){if(e){if(e.numberFormat)return e;if(typeof e===Me){var t=ve.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function n(e){return e&&(e=t(e)),e||ve.cultures.current}function o(e,t,o){o=n(o);var s=o.calendars.standard,a=s.days,l=s.months;return t=s.patterns[t]||t,t.replace(d,function(t){var n,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=xe.floor(e.getMilliseconds()/100):"ff"===t?(o=e.getMilliseconds(),o>99&&(o=xe.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?(n=e.getTimezoneOffset(),c=n<0,o=(""+xe.abs(n/60)).split(".")[0],n=xe.abs(n)-60*o,o=(c?"+":"-")+r(o),o+=":"+r(n)):"zz"!==t&&"z"!==t||(o=e.getTimezoneOffset()/60,c=o<0,o=(""+xe.abs(o)).split(".")[0],o=(c?"+":"-")+("zz"===t?r(o):o)),o!==i?o:t.slice(1,t.length-1)})}function s(e,t,o){var r,s,c,d,w,y,k,x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G,$,K,Y;if(o=n(o),r=o.numberFormat,s=r[m],c=r.decimals,d=r.pattern[0],w=[],T=e<0,M=f,R=f,G=-1,e===i)return f;if(!isFinite(e))return e;if(!t)return o.name.length?e.toLocaleString():""+e;if(S=u.exec(t)){if(t=S[1].toLowerCase(),k="c"===t,x="p"===t,(k||x)&&(r=k?r.currency:r.percent,s=r[m],c=r.decimals,y=r.symbol,d=r.pattern[T?0:1]),C=S[2],C&&(c=+C),"e"===t)return K=C?e.toExponential(c):e.toExponential(),K.replace(m,r[m]);if(x&&(e*=100),e=l(e,c),T=e<0,e=e.split(m),D=e[0],A=e[1],T&&(D=D.substring(1)),R=a(D,0,D.length,r),A&&(R+=s+A),"n"===t&&!T)return R;for(e=f,F=0,P=d.length;F<P;F++)z=d.charAt(F),e+="n"===z?R:"$"===z||"%"===z?y:z;return e}if((t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(h,function(e){var t=e.charAt(0).replace("\\",""),i=e.slice(1).replace(t,"");return w.push(i),b})),t=t.split(";"),T&&t[1])t=t[1],L=!0;else if(0===e&&t[2]){if(t=t[2],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(U=t.indexOf("%"),q=t.indexOf("$"),x=U!=-1,k=q!=-1,x&&(e*=100),k&&"\\"===t[q-1]&&(t=t.split("\\").join(""),k=!1),(k||x)&&(r=k?r.currency:r.percent,s=r[m],c=r.decimals,y=r.symbol),B=t.indexOf(g)>-1,B&&(t=t.replace(p,f)),H=t.indexOf(m),P=t.length,H!=-1)if(A=(""+e).split("e"),A=A[1]?l(e,Math.abs(A[1])):A[0],A=A.split(m)[1]||f,O=t.lastIndexOf(_)-H,N=t.lastIndexOf(v)-H,V=O>-1,W=N>-1,F=A.length,V||W||(t=t.substring(0,H)+t.substring(H+1),P=t.length,H=-1,F=0),V&&O>N)F=O;else if(N>O)if(W&&F>N){for(Y=l(e,N,T);Y.charAt(Y.length-1)===_&&N>0&&N>O;)N--,Y=l(e,N,T);F=N}else V&&F<O&&(F=O);if(e=l(e,F,T),N=t.indexOf(v),j=O=t.indexOf(_),G=N==-1&&O!=-1?O:N!=-1&&O==-1?N:N>O?O:N,N=t.lastIndexOf(v),O=t.lastIndexOf(_),$=N==-1&&O!=-1?O:N!=-1&&O==-1?N:N>O?N:O,G==P&&($=G),G!=-1){for(R=(""+e).split(m),D=R[0],A=R[1]||f,E=D.length,I=A.length,T&&e*-1>=0&&(T=!1),e=t.substring(0,G),T&&!L&&(e+="-"),F=G;F<P;F++){if(z=t.charAt(F),H==-1){if($-F<E){e+=D;break}}else if(O!=-1&&O<F&&(M=f),H-F<=E&&H-F>-1&&(e+=D,F=H),H===F){e+=(A?s:f)+A,F+=$-H+1;continue}z===_?(e+=z,M=z):z===v&&(e+=M)}if(B&&(e=a(e,G+(T&&!L?1:0),Math.max($,E+G),r)),$>=G&&(e+=t.substring($+1)),k||x){for(R=f,F=0,P=e.length;F<P;F++)z=e.charAt(F),R+="$"===z||"%"===z?y:z;e=R}if(P=w.length)for(F=0;F<P;F++)e=e.replace(b,w[F])}return e}var a,l,c,d=/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,u=/^(n|c|p|e)(\d*)$/i,h=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,p=/\,/g,f="",m=".",g=",",v="#",_="0",b="??",w="en-US",y={}.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 n,o=ve.cultures;return e===i?o.current:(n=t(e)||o[w],n.calendar=n.calendars.standard,o.current=n,i)},ve.findCulture=t,ve.getCulture=n,ve.culture(w),a=function(e,t,n,o){var r,s,a,l,c,d,u=e.indexOf(o[m]),h=o.groupSize.slice(),p=h.shift();if(n=u!==-1?u:n+1,r=e.substring(t,n),s=r.length,s>=p){for(a=s,l=[];a>-1;)if(c=r.substring(a-p,a),c&&l.push(c),a-=p,d=h.shift(),p=d!==i?d:p,0===p){a>0&&l.push(r.substring(0,a));break}r=l.reverse().join(o[g]),e=e.substring(0,t)+r+e.substring(n)}return e},l=function(e,t,i){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),i&&(e=-e),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},c=function(e,t,n){if(t){if("[object Date]"===y.call(e))return o(e,t,n);if(typeof e===Re)return s(e,t,n)}return e!==i?e:""},ve.format=function(e){var t=arguments;return e.replace(De,function(e,i,n){var o=t[parseInt(i,10)+1];return c(o,n?n.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._outerWidth=function(t,i){return e(t).outerWidth(i||!1)||0},ve._outerHeight=function(t,i){return e(t).outerHeight(i||!1)||0},ve.toString=c}(),function(){function t(e,t,i){return!(e>=t&&e<=i)}function n(e){return e.charAt(0)}function o(t){return e.map(t,n)}function r(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function s(e){for(var t=0,i=e.length,n=[];t<i;t++)n[t]=(e[t]+"").toLowerCase();return n}function a(e){var t,i={};for(t in e)i[t]=s(e[t]);return i}function l(e,n,s,l){if(!e)return null;var c,d,u,h,p,g,v,_,b,y,k,x,C,S=function(e){for(var t=0;n[L]===e;)t++,L++;return t>0&&(L-=1),t},T=function(t){var i=w[t]||RegExp("^\\d{1,"+t+"}"),n=e.substr(H,t).match(i);return n?(n=n[0],H+=n.length,parseInt(n,10)):null},D=function(t,i){for(var n,o,r,s=0,a=t.length,l=0,c=0;s<a;s++)n=t[s],o=n.length,r=e.substr(H,o),i&&(r=r.toLowerCase()),r==n&&o>l&&(l=o,c=s);return l?(H+=l,c+1):null},A=function(){var t=!1;return e.charAt(H)===n[L]&&(H++,t=!0),t},E=s.calendars.standard,I=null,M=null,R=null,F=null,P=null,z=null,B=null,L=0,H=0,N=!1,O=new Date,V=E.twoDigitYearMax||2029,W=O.getFullYear();for(n||(n="d"),h=E.patterns[n],h&&(n=h),n=n.split(""),u=n.length;L<u;L++)if(c=n[L],N)"'"===c?N=!1:A();else if("d"===c){if(d=S("d"),E._lowerDays||(E._lowerDays=a(E.days)),null!==R&&d>2)continue;if(R=d<3?T(2):D(E._lowerDays[3==d?"namesAbbr":"names"],!0),null===R||t(R,1,31))return null}else if("M"===c){if(d=S("M"),E._lowerMonths||(E._lowerMonths=a(E.months)),M=d<3?T(2):D(E._lowerMonths[3==d?"namesAbbr":"names"],!0),null===M||t(M,1,12))return null;M-=1}else if("y"===c){if(d=S("y"),I=T(d),null===I)return null;2==d&&("string"==typeof V&&(V=W+parseInt(V,10)),I=W-W%100+I,I>V&&(I-=100))}else if("h"===c){if(S("h"),F=T(2),12==F&&(F=0),null===F||t(F,0,11))return null}else if("H"===c){if(S("H"),F=T(2),null===F||t(F,0,23))return null}else if("m"===c){if(S("m"),P=T(2),null===P||t(P,0,59))return null}else if("s"===c){if(S("s"),z=T(2),null===z||t(z,0,59))return null}else if("f"===c){if(d=S("f"),C=e.substr(H,d).match(w[3]),B=T(d),null!==B&&(B=parseFloat("0."+C[0],10),B=ve._round(B,3),B*=1e3),null===B||t(B,0,999))return null}else if("t"===c){if(d=S("t"),_=E.AM,b=E.PM,1===d&&(_=o(_),b=o(b)),p=D(b),!p&&!D(_))return null}else if("z"===c){if(g=!0,d=S("z"),"Z"===e.substr(H,1)){A();continue}if(v=e.substr(H,6).match(d>2?m:f),!v)return null;if(v=v[0].split(":"),y=v[0],k=v[1],!k&&y.length>3&&(H=y.length-2,k=y.substring(H),y=y.substring(0,H)),y=parseInt(y,10),t(y,-12,13))return null;if(d>2&&(k=v[0][0]+k,k=parseInt(k,10),isNaN(k)||t(k,-59,59)))return null}else if("'"===c)N=!0,A();else if(!A())return null;return l&&!/^\s*$/.test(e.substr(H))?null:(x=null!==F||null!==P||z||null,null===I&&null===M&&null===R&&x?(I=W,M=O.getMonth(),R=O.getDate()):(null===I&&(I=W),null===R&&(R=1)),p&&F<12&&(F+=12),g?(y&&(F+=-y),k&&(P+=-k),e=new Date(Date.UTC(I,M,R,F,P,z,B))):(e=new Date(I,M,R,F,P,z,B),r(e,F)),I<100&&e.setFullYear(I),e.getDate()!==R&&g===i?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}function d(e){var t,i,n,o=xe.max(_.length,b.length),r=e.calendar||e.calendars.standard,s=r.patterns,a=[];for(n=0;n<o;n++){for(t=_[n],i=0;i<t.length;i++)a.push(s[t[i]]);a=a.concat(b[n])}return a}function u(e,t,i,n){var o,r,s,a;if("[object Date]"===y.call(e))return e;if(o=0,r=null,e&&0===e.indexOf("/D")&&(r=g.exec(e)))return r=r[1],a=v.exec(r.substring(1)),r=new Date(parseInt(r,10)),a&&(a=c(a[0]),r=ve.timezone.apply(r,0),r=ve.timezone.convert(r,0,-1*a)),r;for(i=ve.getCulture(i),t||(t=d(i)),t=we(t)?t:[t],s=t.length;o<s;o++)if(r=l(e,t[o],i,n))return r;return r}var h=/\u00A0/g,p=/[eE][\-+]?[0-9]+/,f=/[+|\-]\d{1,2}/,m=/[+|\-]\d{1,2}:?\d{2}/,g=/^\/Date\((.*?)\)\/$/,v=/[+-]\d*/,_=[[],["G","g","F"],["D","d","y","m","T","t"]],b=[["yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:ss.fff","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy/MM/dd HH:mm:ss"],["yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm","yyyy/MM/dd HH:mm"],["yyyy/MM/dd","yyyy-MM-dd","HH:mm:ss","HH:mm"]],w={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},y={}.toString;ve.parseDate=function(e,t,i){return u(e,t,i,!1)},ve.parseExactDate=function(e,t,i){return u(e,t,i,!0)},ve.parseInt=function(e,t){var i=ve.parseFloat(e,t);return i&&(i=0|i),i},ve.parseFloat=function(e,t,i){if(!e&&0!==e)return null;if(typeof e===Re)return e;e=""+e,t=ve.getCulture(t);var n,o,r=t.numberFormat,s=r.percent,a=r.currency,l=a.symbol,c=s.symbol,d=e.indexOf("-");return p.test(e)?(e=parseFloat(e.replace(r["."],".")),isNaN(e)&&(e=null),e):d>0?null:(d=d>-1,e.indexOf(l)>-1||i&&i.toLowerCase().indexOf("c")>-1?(r=a,n=r.pattern[0].replace("$",l).split("n"),e.indexOf(n[0])>-1&&e.indexOf(n[1])>-1&&(e=e.replace(n[0],"").replace(n[1],""),d=!0)):e.indexOf(c)>-1&&(o=!0,r=s,l=c),e=e.replace("-","").replace(l,"").replace(h," ").split(r[","].replace(h," ")).join("").replace(r["."],"."),e=parseFloat(e),isNaN(e)?e=null:d&&(e*=-1),e&&o&&(e/=100),e)}}(),function(){var n,o,r,s,a,l,c,u,h,p;Se._scrollbar=i,Se.scrollbar=function(e){if(isNaN(Se._scrollbar)||e){var t,i=document.createElement("div");return i.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",i.innerHTML="&nbsp;",document.body.appendChild(i),Se._scrollbar=t=i.offsetWidth-i.scrollWidth,document.body.removeChild(i),t}return Se._scrollbar},Se.isRtl=function(t){return e(t).closest(".k-rtl").length>0},n=document.createElement("table");try{n.innerHTML="<tr><td></td></tr>",Se.tbodyInnerHtml=!0}catch(f){Se.tbodyInnerHtml=!1}Se.touch="ontouchstart"in t,o=document.documentElement.style,r=Se.transitions=!1,s=Se.transforms=!1,a="HTMLElement"in t?HTMLElement.prototype:[],Se.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in o||"msPerspective"in o,Se.cssFlexbox="flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,be(["Moz","webkit","O","ms"],function(){var e,t=""+this,i=typeof n.style[t+"Transition"]===Me;if(i||typeof n.style[t+"Transform"]===Me)return e=t.toLowerCase(),s={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},i&&(r=s,r.event=r.event?r.event+"TransitionEnd":"transitionend"),!1}),n=null,Se.transforms=s,Se.transitions=r,Se.devicePixelRatio=t.devicePixelRatio===i?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(f){Se.screenWidth=t.screen.availWidth,Se.screenHeight=t.screen.availHeight}Se.detectOS=function(e){var i,n,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},u={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(n in a)if(a.hasOwnProperty(n)&&(r=e.match(a[n]))){if("windows"==n&&"plugins"in navigator)return!1;o={},o.device=n,o.tablet=d(n,c,!1),o.browser=d(e,u,"default"),o.name=d(n,l),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=(r[3]||"0").replace("_","."),i=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+i+Array(3-(i.length<3?i.length:2)).join("0"),o.cordova=typeof t.PhoneGap!==Be||typeof t.cordova!==Be,o.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||o.cordova,o.android&&(Se.devicePixelRatio<1.5&&o.flatVersion<400||s)&&(Se.screenWidth>800||Se.screenHeight>800)&&(o.tablet=n);break}return o},l=Se.mobileOS=Se.detectOS(navigator.userAgent),Se.wpDevicePixelRatio=l.wp?screen.width/320:0,Se.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(Se.hasNativeScrolling=l),Se.delayedClick=function(){if(Se.touch){if(l.ios)return!0;if(l.android)return!Se.browser.chrome||!(Se.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},Se.mouseAndTouchPresent=Se.touch&&!(Se.mobileOS.ios||Se.mobileOS.android),Se.detectBrowser=function(e){var t,i=!1,n=[],o={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\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)&&(n=e.match(o[t]))){i={},i[t]=!0,i[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,i.version=parseInt(document.documentMode||n[2],10);break}return i},Se.browser=Se.detectBrowser(navigator.userAgent),Se.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return Se.browser.chrome&&(e.paste=!1,Se.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},Se.clipboard=Se.detectClipboardAccess(),Se.zoomLevel=function(){var e,i,n;try{return e=Se.browser,i=0,n=document.documentElement,e.msie&&11==e.version&&n.scrollHeight>n.clientHeight&&!Se.touch&&(i=Se.scrollbar()),Se.touch?n.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+i)/(top||t).innerWidth:1}catch(o){return 1}},Se.cssBorderSpacing=i!==o.borderSpacing&&!(Se.browser.msie&&Se.browser.version<8),function(t){var i="",n=e(document.documentElement),o=parseInt(t.version,10);t.msie?i="ie":t.mozilla?i="ff":t.safari?i="safari":t.webkit?i="webkit":t.opera?i="opera":t.edge&&(i="edge"),i&&(i="k-"+i+" k-"+i+o),Se.mobileOS&&(i+=" k-mobile"),Se.cssFlexbox||(i+=" k-no-flexbox"),n.addClass(i)}(Se.browser),Se.eventCapture=document.documentElement.addEventListener,c=document.createElement("input"),Se.placeholder="placeholder"in c,Se.propertyChangeEvent="onpropertychange"in c,Se.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],i=t.length,n="test",o={},r=0;r<i;r++)e=t[r],c.setAttribute("type",e),c.value=n,o[e.replace("-","")]="text"!==c.type&&c.value!==n;return o}(),c.style.cssText="float:left;",Se.cssFloat=!!c.style.cssFloat,c=null,Se.stableSort=function(){var e,t=513,i=[{index:0,field:"b"}];for(e=1;e<t;e++)i.push({index:e,field:"a"});return i.sort(function(e,t){return e.field>t.field?1:e.field<t.field?-1:0}),1===i[0].index}(),Se.matchesSelector=a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.matchesSelector||a.matches||function(t){for(var i=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),n=i.length;n--;)if(i[n]==this)return!0;return!1},Se.matchMedia="matchMedia"in t,Se.pushState=t.history&&t.history.pushState,u=document.documentMode,Se.hashChange="onhashchange"in t&&!(Se.browser.msie&&(!u||u<=8)),Se.customElements="registerElement"in t.document,h=Se.browser.chrome,p=Se.browser.mozilla,Se.msPointers=!h&&t.MSPointerEvent,Se.pointers=!h&&!p&&t.PointerEvent,Se.kineticScrollNeeded=l&&(Se.touch||Se.msPointers||Se.pointers)}(),U={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},q={},e.extend(q,{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}}),q.promiseShim=q.promise,"kendoAnimate"in e.fn||_e(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,i,n){return y(this,e,t,i,n)},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,i){return ve.toggleClass(this,e,t,i)}}),j=/&/g,G=/</g,$=/"/g,K=/'/g,Y=/>/g,Q=function(e){return e.target},Se.touch&&(Q=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},be(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,i){e.fn[i]=function(e){return this.bind(i,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"),X=function(e,t){var i,n,o,r,s=t||"d",a=1;for(n=0,o=e.length;n<o;n++)r=e[n],""!==r&&(i=r.indexOf("["),0!==i&&(i==-1?r="."+r:(a++,r="."+r.substring(0,i)+" || {})"+r.substring(i))),a++,s+=r+(n<o-1?" || {})":")"));return Array(a).join("(")+s},Z=/^([a-z]+:)?\/\//i,_e(ve,{widgets:[],_widgetRegisteredCallbacks:[],ui:ve.ui||{},fx:ve.fx||b,effects:ve.effects||q,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||y,ns:"",attr:function(e){return"data-"+ve.ns+e},getShadows:s,wrap:a,deepExtend:l,getComputedStyles:p,webComponents:ve.webComponents||[],isScrollable:f,scrollLeft:m,size:g,toCamelCase:h,toHyphens:u,getOffset:ve.getOffset||v,parseEffects:ve.parseEffects||_,toggleClass:ve.toggleClass||k,directions:ve.directions||U,Observable:z,Class:n,Template:M,template:ye(M.compile,M),render:ye(M.render,M),stringify:ye(Ce.stringify,Ce),eventTarget:Q,htmlEncode:x,isLocalUrl:function(e){return e&&!Z.test(e)},expr:function(e,t,i){return e=e||"",typeof t==Me&&(i=t,t=!1),i=i||"d",e&&"["!==e.charAt(0)&&(e="."+e),t?(e=e.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),e=e.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),e=X(e.split("."),i),e=e.replace(/_\$DOT\$_/g,".")):e=i+e,e},getter:function(e,t){var i=e+t;return Le[i]=Le[i]||Function("d","return "+ve.expr(e,t))},setter:function(e){return He[e]=He[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,i="";for(e=0;e<32;e++)t=16*xe.random()|0,8!=e&&12!=e&&16!=e&&20!=e||(i+="-"),i+=(12==e?4:16==e?3&t|8:t).toString(16);return i},roleSelector:function(e){return e.replace(/(\S+)/g,"["+ve.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(e){var t,i=e.split(" ");if(i)for(t=0;t<i.length;t++)"view"!=i[t]&&(i[t]=i[t].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));
return i.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,i=ve.widgets.length;t<i;t++)e(ve.widgets[t]);ve._widgetRegisteredCallbacks.push(e)},logToConsole:function(e,n){var o=t.console;!ve.suppressLog&&i!==o&&o.log&&o[n||"log"](e)}}),J=z.extend({init:function(e,t){var i,n=this;n.element=ve.jQuery(e).handler(n),n.angular("init",t),z.fn.init.call(n),i=t?t.dataSource:null,i&&(t=_e({},t,{dataSource:{}})),t=n.options=_e(!0,{},n.options,t),i&&(t.dataSource=i),n.element.attr(ve.attr("role"))||n.element.attr(ve.attr("role"),(t.name||"").toLowerCase()),n.element.data("kendo"+t.prefix+t.name,n),n.bind(n.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,i="tabindex",n=e.attr(i)||t.attr(i);t.removeAttr(i),e.attr(i,isNaN(n)?0:n)},setOptions:function(t){this._setEvents(t),e.extend(this.options,t)},_setEvents:function(e){for(var t,i=this,n=0,o=i.events.length;n<o;n++)t=i.events[n],i.options[t]&&e[t]&&i.unbind(t,i.options[t]);i.bind(i.events,e)},resize:function(e){var t=this.getSize(),i=this._size;(e||(t.width>0||t.height>0)&&(!i||t.width!==i.width||t.height!==i.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),i):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 i=this;i.angular(t,function(){return{elements:i.items(),data:e.map(i.dataItems(),function(e){return{dataItem:e}})}})}}),ve.dimensions=function(e,t){var i=e[0];return t&&e.css(t),{width:i.offsetWidth,height:i.offsetHeight}},ve.notify=ke,te=/template$/i,ie=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ne=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,oe=/([A-Z])/g,ve.initWidget=function(n,o,r){var s,a,l,c,d,u,h,p,f,m,g,v,_;if(r?r.roles&&(r=r.roles):r=ve.ui.roles,n=n.nodeType?n:n[0],u=n.getAttribute("data-"+ve.ns+"role")){f=u.indexOf(".")===-1,l=f?r[u]:ve.getter(u)(t),g=e(n).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",m=f?RegExp("^kendo.*"+u+"$","i"):RegExp("^"+v+"$","i");for(_ in g)if(_.match(m)){if(_!==v)return g[_];s=g[_]}if(l){for(p=C(n,"dataSource"),o=e.extend({},S(n,l.fn.options),o),p&&(o.dataSource=typeof p===Me?ve.getter(p)(t):p),c=0,d=l.fn.events.length;c<d;c++)a=l.fn.events[c],h=C(n,a),h!==i&&(o[a]=ve.getter(h)(t));return s?e.isEmptyObject(o)||s.setOptions(o):s=new l(n,o),s}}},ve.rolesFromNamespaces=function(e){var t,i,n=[];for(e[0]||(e=[ve.ui,ve.dataviz.ui]),t=0,i=e.length;t<i;t++)n[t]=e[t].roles;return _e.apply(null,[{}].concat(n.reverse()))},ve.init=function(t){var i=ve.rolesFromNamespaces(Ne.call(arguments,1));e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){ve.initWidget(this,{},i)})},ve.destroy=function(t){e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){var t,i=e(this).data();for(t in i)0===t.indexOf("kendo")&&typeof i[t].destroy===Ie&&i[t].destroy()})},ve.resize=function(t,i){var n,o=e(t).find("[data-"+ve.ns+"role]").addBack().filter(D);o.length&&(n=e.makeArray(o),n.sort(T),e.each(n,function(){var t=ve.widgetInstance(e(this));t&&t.resize(i)}))},ve.parseOptions=S,_e(ve.ui,{Widget:J,DataBoundWidget:ee,roles:{},progress:function(t,i,n){var o,r,s,a,l,c=t.find(".k-loading-mask"),d=ve.support,u=d.browser;n=e.extend({},{width:"100%",height:"100%",top:t.scrollTop(),opacity:!1},n),l=n.opacity?"k-loading-mask k-opaque":"k-loading-mask",i?c.length||(o=d.isRtl(t),r=o?"right":"left",a=t.scrollLeft(),s=u.webkit&&o?t[0].scrollWidth-t.width()-2*a:0,c=e(ve.format("<div class='{0}'><span class='k-loading-text'>{1}</span><div class='k-loading-image'/><div class='k-loading-color'/></div>",l,ve.ui.progress.messages.loading)).width(n.width).height(n.height).css("top",n.top).css(r,Math.abs(a)+s).prependTo(t)):c&&c.remove()},plugin:function(t,n,o){var r,s,a,l,c=t.fn.options.name;for(n=n||ve.ui,o=o||"",n[c]=t,n.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;a<l;a++)ve._widgetRegisteredCallbacks[a](s);e.fn[c]=function(n){var o,r=this;return typeof n===Me?(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",n,c));if(t=a[n],typeof t!==Ie)throw Error(ve.format("Cannot find method '{0}' of {1}",n,c));if(s=t.apply(a,o),s!==i)return r=s,!1})):this.each(function(){return new t(this,n)}),r},e.fn[c].widget=t,e.fn[r]=function(){return this.data(c)}}}),ve.ui.progress.messages={loading:"Loading..."},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,i){return i||(i={}),i.useNative=!0,e(t).map(function(t,n){return n=e(n),!(!Se.kineticScrollNeeded||!ve.mobile.ui.Scroller||n.data("kendoMobileScroller"))&&(n.kendoMobileScroller(i),n.data("kendoMobileScroller"))})[0]},ve.preventDefault=function(e){e.preventDefault()},ve.widgetInstance=function(e,i){var n,o,r,s,a,l=e.data(ve.ns+"role"),c=[];if(l){if("content"===l&&(l="scroller"),"editortoolbar"===l&&(r=e.data("kendoEditorToolbar")))return r;if(i)if(i[0])for(n=0,o=i.length;n<o;n++)c.push(i[n].roles[l]);else c.push(i.roles[l]);else c=[ve.ui.roles[l],ve.dataviz.ui.roles[l],ve.mobile.ui.roles[l]];for(l.indexOf(".")>=0&&(c=[ve.getter(l)(t)]),n=0,o=c.length;n<o;n++)if(s=c[n],s&&(a=e.data("kendo"+s.fn.options.prefix+s.fn.options.name)))return a}},ve.onResize=function(i){var n=i;return Se.mobileOS.android&&(n=function(){setTimeout(i,600)}),e(t).on(Se.resize,n),n},ve.unbindResize=function(i){e(t).off(Se.resize,i)},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 i=e.attr(t,"tabindex");return A(t,!isNaN(i)&&i>-1)}}),ae=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],le="label, input, [data-rel=external]",ce={setupMouseMute:function(){var t,i=0,n=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;i++)o.addEventListener(ae[i],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)}},de={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},Se.touch&&(Se.mobileOS.ios||Se.mobileOS.android)?de={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:Se.pointers?de={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:Se.msPointers&&(de={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!Se.msPointers||"onmspointerenter"in t||e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,i){e.event.special[t]={delegateType:i,bindType:i,handle:function(t){var n,o=this,r=t.relatedTarget,s=t.handleObj;return r&&(r===o||e.contains(o,r))||(t.type=s.origType,n=s.handler.apply(this,arguments),t.type=i),n}}}),ue=function(e){return de[e]||e},he=/([^ ]+)/g,ve.applyEventMap=function(e,t){return e=e.replace(he,ue),t&&(e=e.replace(he,"$1."+t)),e},pe=e.fn.on,_e(!0,I,e),I.fn=I.prototype=new e,I.fn.constructor=I,I.fn.init=function(t,i){return i&&i instanceof e&&!(i instanceof I)&&(i=I(i)),e.fn.init.call(this,t,i,fe)},I.fn.init.prototype=I.fn,fe=I(document),_e(I.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,i,n,o,r,s=this,a=s.data("kendoNS");return 1===arguments.length?pe.call(s,arguments[0]):(e=s,t=Ne.call(arguments),typeof t[t.length-1]===Be&&t.pop(),i=t[t.length-1],n=ve.applyEventMap(t[0],a),Se.mouseAndTouchPresent&&n.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(ce.setupMouseMute(),o=2===t.length?null:t[1],r=n.indexOf("click")>-1&&n.indexOf("touchend")>-1,pe.call(this,{touchstart:ce.muteMouse,touchend:ce.unMuteMouse},o,{bustClick:r})),typeof i===Me&&(e=s.data("handler"),i=e[i],t[t.length-1]=function(t){i.call(e,t)}),t[0]=n,pe.apply(s,t),s)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ve.jQuery=I,ve.eventMap=de,ve.timezone=function(){function e(e,t){var i,n,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")?(i=new Date(Date.UTC(e,d[r]+1,1,a[0]-24,a[1],a[2],0)),n=u[s.substr(4,3)],o=i.getUTCDay(),i.setUTCDate(i.getUTCDate()+n-o-(n>o?7:0))):s.indexOf(">=")>=0&&(i=new Date(Date.UTC(e,d[r],s.substr(5),a[0],a[1],a[2],0)),n=u[s.substr(0,3)],o=i.getUTCDay(),i.setUTCDate(i.getUTCDate()+n-o+(n<o?7:0))):i=new Date(Date.UTC(e,d[r],s,a[0],a[1],a[2],0)),l[e]=i)}function t(t,i,n){var o,r,s,a;return(i=i[n])?(s=new Date(t).getUTCFullYear(),i=jQuery.grep(i,function(e){var t=e[0],i=e[1];return t<=s&&(i>=s||t==s&&"only"==i||"max"==i)}),i.push(t),i.sort(function(t,i){return"number"!=typeof t&&(t=+e(s,t)),"number"!=typeof i&&(i=+e(s,i)),t-i}),a=i[jQuery.inArray(t,i)-1]||i[i.length-1],isNaN(a)?a:null):(o=n.split(":"),r=0,o.length>1&&(r=60*o[0]+ +o[1]),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"])}function i(e,t,i){var n,o,r,s=t[i];if("string"==typeof s&&(s=t[s]),!s)throw Error('Timezone "'+i+'" is either incorrect, or kendo.timezones.min.js is not included.');for(n=s.length-1;n>=0&&(o=s[n][3],!(o&&e>o));n--);if(r=s[n+1],!r)throw Error('Timezone "'+i+'" not found on '+e+".");return r}function n(e,n,o,r){typeof e!=Re&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var s=i(e,n,r);return{zone:s,rule:t(e,o,s[1])}}function o(e,t){var i,o,r;return"Etc/UTC"==t||"Etc/GMT"==t?0:(i=n(e,this.zones,this.rules,t),o=i.zone,r=i.rule,ve.parseFloat(r?o[0]-r[6]:o[0]))}function r(e,t){var i=n(e,this.zones,this.rules,t),o=i.zone,r=i.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,i){var n,o,r,s=i;return typeof t==Me&&(t=this.offset(e,t)),typeof i==Me&&(i=this.offset(e,i)),o=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-i)),r=e.getTimezoneOffset(),typeof s==Me&&(s=this.offset(e,s)),n=r-o+(i-s),new Date(e.getTime()+6e4*n)}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 d={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},u={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)}function t(t,i,n){var o=t.getHours();n=n||1,i=(i-t.getDay()+7*n)%7,t.setDate(t.getDate()+i),e(t,o)}function n(e,i,n){return e=new Date(e),t(e,i,n),e}function o(e){return new Date(e.getFullYear(),e.getMonth(),1)}function r(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),i=o(e),n=Math.abs(t.getTimezoneOffset()-i.getTimezoneOffset());return n&&t.setHours(i.getHours()+n/60),t}function s(e,t){return 1!==t?f(n(e,t,-1),4):f(e,4-(e.getDay()||7))}function a(e,t){var i=new Date(e.getFullYear(),0,1,(-6)),n=s(e,t),o=n.getTime()-i.getTime(),r=Math.floor(o/y);return 1+Math.floor(r/7)}function l(e,t){var n,o,r;return t===i&&(t=ve.culture().calendar.firstDay),n=f(e,-7),o=f(e,7),r=a(e,t),0===r?a(n,t)+1:53===r&&a(o,t)>1?1:r}function c(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function d(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function u(e){return b(e).getTime()-c(b(e))}function h(e,t,i){var n,o=u(t),r=u(i);return!e||o==r||(t>=i&&(i+=y),n=u(e),o>n&&(n+=y),r<o&&(r+=y),n>=o&&n<=r)}function p(e,t,i){var n,o=t.getTime(),r=i.getTime();return o>=r&&(r+=y),n=e.getTime(),n>=o&&n<=r}function f(t,i){var n=t.getHours();return t=new Date(t),m(t,i*y),e(t,n),t}function m(e,t,i){var n,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),i||(n=e.getTimezoneOffset()-o,e.setTime(e.getTime()+n*w))}function g(t,i){return t=new Date(ve.date.getDate(t).getTime()+ve.date.getMilliseconds(i)),e(t,i.getHours()),t}function v(){return c(new Date)}function _(e){return c(e).getTime()==v().getTime()}function b(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 w=6e4,y=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:c,isInDateRange:p,isInTimeRange:h,isToday:_,nextDay:function(e){return f(e,1)},previousDay:function(e){return f(e,-1)},toUtcTime:d,MS_PER_DAY:y,MS_PER_HOUR:60*w,MS_PER_MINUTE:w,setTime:m,setHours:g,addDays:f,today:v,toInvariantTime:b,firstDayOfMonth:o,lastDayOfMonth:r,weekInYear:l,getMilliseconds:u}}(),ve.stripWhitespace=function(e){var t,i,n;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(i=0;i<e.childNodes.length;i++)n=e.childNodes[i],3!=n.nodeType||/\S/.test(n.nodeValue)||(e.removeChild(n),i--),1==n.nodeType&&ve.stripWhitespace(n)},me=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ve.animationFrame=function(e){me.call(t,e)},ge=[],ve.queueAnimation=function(e){ge[ge.length]=e,1===ge.length&&ve.runNextAnimation()},ve.runNextAnimation=function(){ve.animationFrame(function(){ge[0]&&(ge.shift()(),ge[0]&&ve.runNextAnimation())})},ve.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",i={},n=t.split(/&|=/),o=n.length,r=0;r<o;r+=2)""!==n[r]&&(i[decodeURIComponent(n[r])]=decodeURIComponent(n[r+1]));return i},ve.elementUnderCursor=function(e){if(i!==e.x.client)return document.elementFromPoint(e.x.client,e.y.client)},ve.wheelDeltaY=function(e){var t,n=e.originalEvent,o=n.wheelDeltaY;return n.wheelDelta?(o===i||o)&&(t=n.wheelDelta):n.detail&&n.axis===n.VERTICAL_AXIS&&(t=10*-n.detail),t},ve.throttle=function(e,t){var n,o,r=0;return!t||t<=0?e:(o=function(){function o(){e.apply(s,l),r=+new Date}var s=this,a=+new Date-r,l=arguments;return r?(n&&clearTimeout(n),a>t?o():n=setTimeout(o,t-a),i):o()},o.cancel=function(){clearTimeout(n)},o)},ve.caret=function(t,n,o){var r,s,a,l,c,d=n!==i;if(o===i&&(o=n),t[0]&&(t=t[0]),!d||!t.disabled){try{t.selectionStart!==i?d?(t.focus(),s=Se.mobileOS,s.wp||s.android?setTimeout(function(){t.setSelectionRange(n,o)},0):t.setSelectionRange(n,o)):n=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),r=t.createTextRange(),d?(r.collapse(!0),r.moveStart("character",n),r.moveEnd("character",o-n),r.select()):(a=r.duplicate(),r.moveToBookmark(document.selection.createRange().getBookmark()),a.setEndPoint("EndToStart",r),l=a.text.length,c=l+r.text.length,n=[l,c]))}catch(u){n=[]}return n}},ve.compileMobileDirective=function(e,i){var n=t.angular;return e.attr("data-"+ve.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),n.element(e).injector().invoke(["$compile",function(t){t(e)(i),/^\$(digest|apply)$/.test(i.$$phase)||i.$digest()}]),ve.widgetInstance(e,ve.mobile.ui)},ve.antiForgeryTokens=function(){var t={},n=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!==i&&n!==i&&(t[o]=n),t},ve.cycleForm=function(e){function t(e){var t=ve.widgetInstance(e);t&&t.focus?t.focus():e.focus()}var i=e.find("input, .k-widget").first(),n=e.find("button, .k-button").last();n.on("keydown",function(e){e.keyCode!=ve.keys.TAB||e.shiftKey||(e.preventDefault(),t(i))}),i.on("keydown",function(e){e.keyCode==ve.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(n))})},ve.focusElement=function(i){var n=[],o=i.parentsUntil("body").filter(function(e,t){var i=ve.getComputedStyles(t,["overflow"]);return"visible"!==i.overflow}).add(t);o.each(function(t,i){n[t]=e(i).scrollTop()});try{i[0].setActive()}catch(r){i[0].focus()}o.each(function(t,i){e(i).scrollTop(n[t])})},ve.matchesMedia=function(e){var i=ve._bootstrapToMedia(e)||e;return Se.matchMedia&&t.matchMedia(i).matches},ve._bootstrapToMedia=function(e){return{xs:"(max-width: 576px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}[e]},function(){function i(t,i,n,o){var r,s,a=e("<form>").attr({action:n,method:"POST",target:o}),l=ve.antiForgeryTokens();l.fileName=i,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 n(e,t){var i,n,o,r,s,a=e;if("string"==typeof e){for(i=e.split(";base64,"),n=i[0],o=atob(i[1]),r=new Uint8Array(o.length),s=0;s<o.length;s++)r[s]=o.charCodeAt(s);a=new Blob([r.buffer],{type:n})}navigator.msSaveBlob(a,t)}function o(e,i){t.Blob&&e instanceof Blob&&(e=URL.createObjectURL(e)),r.download=i,r.href=e;var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n),setTimeout(function(){URL.revokeObjectURL(e)})}var r=document.createElement("a"),s="download"in r&&!ve.support.browser.edge;ve.saveAs=function(e){var t=i;e.forceProxy||(s?t=o:navigator.msSaveBlob&&(t=n)),t(e.dataURI,e.fileName,e.proxyURL,e.proxyTarget)}}(),ve.proxyModelSetters=function(e){var t={};return Object.keys(e||{}).forEach(function(i){Object.defineProperty(t,i,{get:function(){return e[i]},set:function(t){e[i]=t,e.dirty=!0}})}),t}}(jQuery,window),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.router.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(e,t){if(!t)return e;e+"/"===t&&(e=t);var i=RegExp("^"+t,"i");return i.test(e)||(e=t+"/"+e),p.protocol+"//"+(p.host+"/"+e).replace(/\/\/+/g,"/")}function n(e){return e?"#!":"#"}function o(e){var t=p.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",d="back",u="same",h=l.support,p=window.location,f=window.history,m=50,g=l.support.browser.msie,v=/^#*/,_=window.document,b=l.Class.extend({back:function(){g?setTimeout(function(){f.back()}):f.back()},forward:function(){g?setTimeout(function(){f.forward()}):f.forward()},length:function(){return f.length},replaceLocation:function(e){p.replace(e)}}),w=b.extend({init:function(e){this.root=e},navigate:function(e){f.pushState({},_.title,i(e,this.root))},replace:function(e){f.replaceState({},_.title,i(e,this.root))},normalize:function(e){return r(this.root,e)},current:function(){var e=p.pathname;return p.search&&(e+=p.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=p.pathname,a=o(n(e.hashBang));r===s+"/"&&(t=r),r===s&&a&&(t=i(a.replace(v,""),r)),t&&f.pushState({},_.title,t)}}),y=b.extend({init:function(e){this._id=l.guid(),this.prefix=n(e),this.fix=e?a:s},navigate:function(e){p.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){h.hashChange?e(window).on("hashchange."+this._id,t):this._interval=setInterval(t,m)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return o(this.prefix)},normalizeCurrent:function(e){var t=p.pathname,i=e.root;return!(!e.pushState||i===t)&&(this.replaceLocation(i+this.prefix+r(i,t)),!0)}}),k=l.Observable.extend({start:function(t){if(t=t||{},this.bind([c,d,u],t),!this._started){this._started=!0,t.root=t.root||"/";var i,n=this.createAdapter(t);n.normalizeCurrent(t)||(i=n.current(),e.extend(this,{adapter:n,root:t.root,historyLength:n.length(),current:i,locations:[i]}),n.change(e.proxy(this,"_checkUrl")))}},createAdapter:function(e){return h.pushState&&e.pushState?new w(e.root):new y(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,i){return"#:back"===e?(this.backCalled=!0,this.adapter.back(),t):(this._navigate(e,i,function(t){t.navigate(e),this.locations.push(this.current)}),t)},_navigate:function(e,i,n){var o=this.adapter;return e=o.normalize(e),this.current===e||this.current===decodeURIComponent(e)?(this.trigger(u),t):(!i&&this.trigger(c,{url:e,decode:!1})||(this.current=e,n.call(this,o),this.historyLength=o.length()),t)},_checkUrl:function(){var e=this.adapter,i=e.current(),n=e.length(),o=this.historyLength===n,r=i===this.locations[this.locations.length-2]&&o,s=this.backCalled,a=this.current;return null===i||this.current===i||this.current===decodeURIComponent(i)||(this.historyLength=n,this.backCalled=!1,this.current=i,r&&this.trigger("back",{url:a,to:i})?(e.forward(),this.current=a,t):this.trigger(c,{url:i,backButtonPressed:!s})?(r?e.forward():(e.back(),this.historyLength--),this.current=a,t):(r?this.locations.pop():this.locations.push(i),t))}});l.History=k,l.History.HistoryAdapter=b,l.History.HashAdapter=y,l.History.PushStateAdapter=w,l.absoluteURL=i,l.history=new k}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t,i){return RegExp("^"+t.replace(f,"\\$&").replace(u,"(?:$1)?").replace(h,e).replace(p,"(.*?)")+"$",i?"i":"")}function i(e){return e.replace(/(\?.*)|(#.*)/g,"")}var n=window.kendo,o=n.history,r=n.Observable,s="init",a="routeMissing",l="change",c="back",d="same",u=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,m=n.Class.extend({init:function(e,i,n){e instanceof RegExp||(e=t(e,n)),this.route=e,this._callback=i},callback:function(e,t,o){var r,s,a=0,l=n.parseQueryStringParams(e);if(l._back=t,e=i(e),r=this.route.exec(e).slice(1),s=r.length,o)for(;a<s;a++)void 0!==r[a]&&(r[a]=decodeURIComponent(r[a]));r.push(l),this._callback.apply(null,r)},worksWith:function(e,t,n){return!!this.route.test(i(e))&&(this.callback(e,t,n),!0)}}),g=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,d],e)},destroy:function(){o.unbind(l,this._urlChangedProxy),o.unbind(d,this._sameProxy),o.unbind(c,this._backProxy),this.unbind()},start:function(){var e,t=this,i=function(){t._same()},n=function(e){t._back(e)},r=function(e){t._urlChanged(e)};o.start({same:i,change:r,back:n,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=n},route:function(e,t){this.routes.push(new m(e,t,this.ignoreCase))},navigate:function(e,t){n.history.navigate(e,t)},replace:function(e,t){n.history.replace(e,t)},_back:function(e){this.trigger(c,{url:e.url,to:e.to})&&e.preventDefault()},_same:function(){this.trigger(d)},_urlChanged:function(e){var t,i,o,r,s=e.url,c=!!e.decode,d=e.backButtonPressed;if(s||(s="/"),this.trigger(l,{url:e.url,params:n.parseQueryStringParams(e.url),backButtonPressed:d}))return void e.preventDefault();for(t=0,i=this.routes,r=i.length;t<r;t++)if(o=i[t],o.worksWith(s,d,c))return;this.trigger(a,{url:s,params:n.parseQueryStringParams(s),backButtonPressed:d})&&e.preventDefault()}});n.Router=g}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.data.odata.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(n,o){var r,s,a,l,c,d,u,h,p=[],f=n.logic||"and",g=n.filters;for(r=0,s=g.length;r<s;r++)n=g[r],a=n.field,u=n.value,d=n.operator,n.filters?n=i(n,o):(h=n.ignoreCase,a=a.replace(/\./g,"/"),n=w[d],o&&(n=y[d]),"isnullorempty"===d?n=m.format("{0} {1} null or {0} {1} ''",a,n):"isnotnullorempty"===d?n=m.format("{0} {1} null and {0} {1} ''",a,n):"isnull"===d||"isnotnull"===d?n=m.format("{0} {1} null",a,n):"isempty"===d||"isnotempty"===d?n=m.format("{0} {1} ''",a,n):n&&u!==t&&(l=e.type(u),"string"===l?(c="'{1}'",u=u.replace(/'/g,"''"),h===!0&&(a="tolower("+a+")")):"date"===l?o?(c="{1:yyyy-MM-ddTHH:mm:ss+00:00}",u=m.timezone.apply(u,"Etc/UTC")):c="datetime'{1:yyyy-MM-ddTHH:mm:ss}'":c="{1}",n.length>3?"substringof"!==n?c="{0}({2},"+c+")":(c="{0}("+c+",{2})","doesnotcontain"===d&&(o?(c="{0}({2},'{1}') eq -1",n="indexof"):c+=" eq false")):c="{2} {0} "+c,n=m.format(c,n,u,a))),p.push(n);return n=p.join(" "+f+" "),p.length>1&&(n="("+n+")"),n}function n(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function o(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function r(e){return e+o()+"-"+o()+"-"+o()}function s(e,t){var i=v+"--"+e;return t&&(i+="--"),i}function a(e,t,i,n){var o=e.options[n].url,r=m.format("{0} ",i);return b(o)?r+o(t):r+o}function l(e,t){var i="";return i+=s(e,!1),i+=v+"Content-Type: application/http",i+=v+"Content-Transfer-Encoding: binary",i+=v+"Content-ID: "+t}function c(e){var t="";return t+=v+"Content-Type: application/json;odata=minimalmetadata",t+=v+"Prefer: return=representation",t+=_+m.stringify(e)}function d(e,t,i,n,o,r){var s,d="";for(s=0;s<e.length;s++)d+=l(t,i),d+=_+a(o,e[s],o.options[n].type,n)+" HTTP/1.1",r||(d+=c(e[s])),d+=v,i++;return d}function u(e,t,i,n,o,r,a){var l="";return l+=h(t,i),l+=d(e,i,n,r,o,a),l+=s(i,!0),l+=v}function h(e,t){var i="";return i+="--"+e+v,i+="Content-Type: multipart/mixed; boundary="+t+v}function p(e,t){var i={},n=r("sf_batch_"),o="",a=0,l=e.options.batch.url,c=r("sf_changeset_");return i.type=e.options.batch.type,i.url=b(l)?l():l,i.headers={"Content-Type":"multipart/mixed; boundary="+n},t.updated.length&&(o+=u(t.updated,n,c,a,e,"update",!1),a+=t.updated.length,c=r("sf_changeset_")),t.destroyed.length&&(o+=u(t.destroyed,n,c,a,e,"destroy",!0),a+=t.destroyed.length,c=r("sf_changeset_")),t.created.length&&(o+=u(t.created,n,c,a,e,"create",!1)),o+=s(n,!0),i.data=o,i}function f(e){var t,i,n,o,r,s,a=e.match(/--changesetresponse_[a-z0-9-]+$/gm),l=0,c=[];for(c.push({models:[],passed:!0}),s=0;s<a.length;s++)o=a[s],o.lastIndexOf("--",o.length-1)?s<a.length-1&&c.push({models:[],passed:!0}):(l=l?e.indexOf(o,l+o.length):e.indexOf(o),t=e.substring(l,e.indexOf("--",l+1)),i=t.match(/^HTTP\/1\.\d (\d{3}) (.*)$/gm).pop(),n=m.parseFloat(i.match(/\d{3}/g).pop()),n>=200&&n<=299?(r=t.match(/\{.*\}/gm),r&&c[c.length-1].models.push(JSON.parse(r[0]))):c[c.length-1].passed=!1);return c}var m=window.kendo,g=e.extend,v="\r\n",_="\r\n\r\n",b=m.isFunction,w={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isnullorempty:"eq",isnotnullorempty:"ne",isempty:"eq",isnotempty:"ne"},y=g({},w,{contains:"contains"}),k={pageSize:e.noop,page:e.noop,filter:function(e,t,n){t&&(t=i(t,n),t&&(e.$filter=t))},sort:function(t,i){var n=e.map(i,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");n&&(t.$orderby=n)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},x={read:{dataType:"jsonp"}};g(!0,m.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,i){var n,o,r,s;if(e=e||{},t=t||"read",s=(this.options||x)[t],s=s?s.dataType:"json","read"===t){n={$inlinecount:"allpages"},"json"!=s&&(n.$format="json");for(r in e)k[r]?k[r](n,e[r],i):n[r]=e[r]}else{if("json"!==s)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(r in e)o=e[r],"number"==typeof o&&(e[r]=o+"");n=m.stringify(e)}}return n}}}}),g(!0,m.data,{schemas:{"odata-v4":{type:"json",data:function(t){if(e.isArray(t)){for(var i=0;i<t.length;i++)n(t[i]);return t}return t=e.extend({},t),n(t),t.value?t.value:[t]},total:function(e){return e["@odata.count"]}}},transports:{"odata-v4":{batch:{type:"POST"},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 i=m.data.transports.odata.parameterMap(e,t,!0);return"read"==t&&(i.$count=!0,delete i.$inlinecount),i},submit:function(t){var i=this,n=p(i,t.data),o=t.data;(o.updated.length||o.destroyed.length||o.created.length)&&e.ajax(g(!0,{},{success:function(e){var i,n=f(e),r=0;o.updated.length&&(i=n[r],i.passed&&t.success(i.models.length?i.models:[],"update"),r++),o.destroyed.length&&(i=n[r],i.passed&&t.success([],"destroy"),r++),o.created.length&&(i=n[r],i.passed&&t.success(i.models,"create"))},error:function(e,i,n){t.error(e,i,n)}},n))}}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.data.xml.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=e.isArray,o=e.isPlainObject,r=e.map,s=e.each,a=e.extend,l=i.getter,c=i.Class,d=c.extend({init:function(t){var l,c,d,u,h=this,p=t.total,f=t.model,m=t.parse,g=t.errors,v=t.serialize,_=t.data;
f&&(o(f)&&(l=t.modelBase||i.data.Model,f.fields&&s(f.fields,function(t,i){o(i)&&i.field?e.isFunction(i.field)||(i=a(i,{field:h.getter(i.field)})):i={field:h.getter(i)},f.fields[t]=i}),c=f.id,c&&(d={},d[h.xpathToMember(c,!0)]={field:h.getter(c)},f.fields=a(d,f.fields),f.id=h.xpathToMember(c)),f=l.define(f)),h.model=f),p&&("string"==typeof p?(p=h.getter(p),h.total=function(e){return parseInt(p(e),10)}):"function"==typeof p&&(h.total=p)),g&&("string"==typeof g?(g=h.getter(g),h.errors=function(e){return g(e)||null}):"function"==typeof g&&(h.errors=g)),_&&("string"==typeof _?(_=h.xpathToMember(_),h.data=function(e){var t,i=h.evaluate(e,_);return i=n(i)?i:[i],h.model&&f.fields?(t=new h.model,r(i,function(e){if(e){var i,n={};for(i in f.fields)n[i]=t._parse(i,f.fields[i].field(e));return n}})):i}):"function"==typeof _&&(h.data=_)),"function"==typeof m&&(u=h.parse,h.parse=function(e){var t=m.call(h,e);return u.call(h,t)}),"function"==typeof v&&(h.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 i,o,r,s,a,l,c,d={},u=e.attributes,h=u.length;for(c=0;c<h;c++)l=u[c],d["@"+l.nodeName]=l.nodeValue;for(o=e.firstChild;o;o=o.nextSibling)r=o.nodeType,3===r||4===r?d["#text"]=o.nodeValue:1===r&&(i=this.parseDOM(o),s=o.nodeName,a=d[s],n(a)?a.push(i):a=a!==t?[a,i]:i,d[s]=a);return d},evaluate:function(e,t){for(var i,o,r,s,a,l=t.split(".");i=l.shift();)if(e=e[i],n(e)){for(o=[],t=l.join("."),a=0,r=e.length;a<r;a++)s=this.evaluate(e[a],t),s=n(s)?s:[s],o.push.apply(o,s);return o}return e},parse:function(t){var i,n,o={};return i=t.documentElement||e.parseXML(t).documentElement,n=this.parseDOM(i),o[i.nodeName]=n,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,i.data,{XmlDataReader:d,readers:{xml:d}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.data.min",["kendo.core.min","kendo.data.odata.min","kendo.data.xml.min"],e)}(function(){return function(e,t){function i(e,t,i,n){return function(o){var r,s={};for(r in o)s[r]=o[r];s.field=n?i+"."+o.field:i,t==Ie&&e._notifyChange&&e._notifyChange(s),e.trigger(t,s)}}function n(t,i){if(t===i)return!0;var o,r=e.type(t),s=e.type(i);if(r!==s)return!1;if("date"===r)return t.getTime()===i.getTime();if("object"!==r&&"array"!==r)return!1;for(o in t)if(!n(t[o],i[o]))return!1;return!0}function o(e,t){var i,n;for(n in e){if(i=e[n],pe(i)&&i.field&&i.field===t)return i;if(i===t)return i}return null}function r(e){this.data=e||[]}function s(e,i){if(e){var n=typeof e===Ce?{field:e,dir:i}:e,o=me(n)?n:n!==t?[n]:[];return ge(o,function(e){return!!e.dir})}}function a(e){var t,i,n,o,r=e.filters;if(r)for(t=0,i=r.length;t<i;t++)n=r[t],o=n.operator,o&&typeof o===Ce&&(n.operator=J[o.toLowerCase()]||o),a(n)}function l(e){if(e&&!fe(e))return!me(e)&&e.filters||(e={logic:"and",filters:me(e)?e:[e]}),a(e),e}function c(e,t){return!e.logic&&!t.logic&&(e.field===t.field&&e.value===t.value&&e.operator===t.operator)}function d(e){return e=e||{},fe(e)?{logic:"and",filters:[]}:l(e)}function u(e,t){return t.logic||e.field>t.field?1:e.field<t.field?-1:0}function h(e,t){var i,n,o,r,s;if(e=d(e),t=d(t),e.logic!==t.logic)return!1;if(o=(e.filters||[]).slice(),r=(t.filters||[]).slice(),o.length!==r.length)return!1;for(o=o.sort(u),r=r.sort(u),s=0;s<o.length;s++)if(i=o[s],n=r[s],i.logic&&n.logic){if(!h(i,n))return!1}else if(!c(i,n))return!1;return!0}function p(e){return me(e)?e:[e]}function f(e,i){var n=typeof e===Ce?{field:e,dir:i}:e,o=me(n)?n:n!==t?[n]:[];return q(o,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates}})}function m(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function g(e,t,i,n,o,r){var s,a,l,c,d;for(t=t||[],c=t.length,s=0;s<c;s++)a=t[s],l=a.aggregate,d=a.field,e[d]=e[d]||{},r[d]=r[d]||{},r[d][l]=r[d][l]||{},e[d][l]=ee[l.toLowerCase()](e[d][l],i,we.accessor(d),n,o,r[d][l])}function v(e){return"number"==typeof e&&!isNaN(e)}function _(e){return e&&e.getTime}function b(e){var t,i=e.length,n=Array(i);for(t=0;t<i;t++)n[t]=e[t].toJSON();return n}function w(e,t,i,n,o){var r,s,a,l,c,d={};for(l=0,c=e.length;l<c;l++){r=e[l];for(s in t)a=o[s],a&&a!==s&&(d[a]||(d[a]=we.setter(a)),d[a](r,t[s](r)),delete r[s])}}function y(e,t,i,n,o){var r,s,a,l,c;for(l=0,c=e.length;l<c;l++){r=e[l];for(s in t)r[s]=i._parse(s,t[s](r)),a=o[s],a&&a!==s&&delete r[a]}}function k(e,t,i,n,o){var r,s,a,l;for(s=0,l=e.length;s<l;s++)r=e[s],a=n[r.field],a&&a!=r.field&&(r.field=a),r.value=i._parse(r.field,r.value),r.hasSubgroups?k(r.items,t,i,n,o):y(r.items,t,i,n,o)}function x(e,t,i,n,o,r){return function(s){return s=e(s),C(t,i,n,o,r)(s)}}function C(e,t,i,n,o){return function(r){return r&&!fe(i)&&("[object Array]"===Ye.call(r)||r instanceof Ze||(r=[r]),t(r,i,new e,n,o)),r||[]}}function S(e,t){var i,n,o;if(t.items&&t.items.length)for(o=0;o<t.items.length;o++)i=e.items[o],n=t.items[o],i&&n?i.hasSubgroups?S(i,n):i.field&&i.value==n.value?i.items.push.apply(i.items,n.items):e.items.push.apply(e.items,[n]):n&&e.items.push.apply(e.items,[n])}function T(e,t,i,n){for(var o,r,s,a=0;t.length&&n&&(o=t[a],r=o.items,s=r.length,e&&e.field===o.field&&e.value===o.value?(e.hasSubgroups&&e.items.length?T(e.items[e.items.length-1],o.items,i,n):(r=r.slice(i,i+n),e.items=e.items.concat(r)),t.splice(a--,1)):o.hasSubgroups&&r.length?(T(o,r,i,n),o.items.length||t.splice(a--,1)):(r=r.slice(i,i+n),o.items=r,o.items.length||t.splice(a--,1)),0===r.length?i-=s:(i=0,n-=r.length),!(++a>=t.length)););a<t.length&&t.splice(a,t.length-a)}function D(e){var t,i,n,o,r,s=[];for(t=0,i=e.length;t<i;t++)if(r=e.at(t),r.hasSubgroups)s=s.concat(D(r.items));else for(n=r.items,o=0;o<n.length;o++)s.push(n.at(o));return s}function A(e,t){var i,n,o;if(t)for(i=0,n=e.length;i<n;i++)o=e.at(i),o.hasSubgroups?A(o.items,t):o.items=new j(o.items,t,o.items._events)}function E(e,t){for(var i=0;i<e.length;i++)if(e[i].hasSubgroups){if(E(e[i].items,t))return!0}else if(t(e[i].items,e[i]))return!0}function I(e,t,i,n){for(var o=0;o<e.length&&e[o].data!==t&&!M(e[o].data,i,n);o++);}function M(e,t,i){for(var n=0,o=e.length;n<o;n++){if(e[n]&&e[n].hasSubgroups)return M(e[n].items,t,i);if(e[n]===t||e[n]===i)return e[n]=i,!0}}function R(e,i,n,o,r){var s,a,l,c;for(s=0,a=e.length;s<a;s++)if(l=e[s],l&&!(l instanceof o))if(l.hasSubgroups===t||r){for(c=0;c<i.length;c++)if(i[c]===l){e[s]=i.at(c),I(n,i,l,e[s]);break}}else R(l.items,i,n,o,r)}function F(e,t){var i,n,o=e.length;for(n=0;n<o;n++)if(i=e[n],i.uid&&i.uid==t.uid)return e.splice(n,1),i}function P(e,t){return t?B(e,function(e){return e.uid&&e.uid==t.uid||e[t.idField]===t.id&&t.id!==t._defaultId}):-1}function z(e,t){return t?B(e,function(e){return e.uid==t.uid}):-1}function B(e,t){var i,n;for(i=0,n=e.length;i<n;i++)if(t(e[i]))return i;return-1}function L(e,t){var i,n;return e&&!fe(e)?(i=e[t],n=pe(i)?i.from||i.field||t:e[t]||t,ye(n)?t:n):t}function H(e,t){var i,n,o,r={};for(o in e)"filters"!==o&&(r[o]=e[o]);if(e.filters)for(r.filters=[],i=0,n=e.filters.length;i<n;i++)r.filters[i]=H(e.filters[i],t);else r.field=L(t.fields,r.field);return r}function N(e,t){var i,n,o,r,s,a=[];for(i=0,n=e.length;i<n;i++){o={},r=e[i];for(s in r)o[s]=r[s];o.field=L(t.fields,o.field),o.aggregates&&me(o.aggregates)&&(o.aggregates=N(o.aggregates,t)),a.push(o)}return a}function O(t,i){var n,o,r,s,a,l,c,d,u,h;for(t=e(t)[0],n=t.options,o=i[0],r=i[1],s=[],a=0,l=n.length;a<l;a++)u={},d=n[a],c=d.parentNode,c===t&&(c=null),d.disabled||c&&c.disabled||(c&&(u.optgroup=c.label),u[o.field]=d.text,h=d.attributes.value,h=h&&h.specified?d.value:d.text,u[r.field]=h,s.push(u));return s}function V(t,i){var n,o,r,s,a,l,c,d=e(t)[0].tBodies[0],u=d?d.rows:[],h=i.length,p=[];for(n=0,o=u.length;n<o;n++){for(a={},c=!0,s=u[n].cells,r=0;r<h;r++)l=s[r],"th"!==l.nodeName.toLowerCase()&&(c=!1,a[i[r].field]=l.innerHTML);c||p.push(a)}return p}function W(e){return function(){var t=this._data,i=re.fn[e].apply(this,$e.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),i}}function U(t,i){function n(e,t){return e.filter(t).add(e.find(t))}var o,r,s,a,l,c,d,u,h=e(t).children(),p=[],f=i[0].field,m=i[1]&&i[1].field,g=i[2]&&i[2].field,v=i[3]&&i[3].field;for(o=0,r=h.length;o<r;o++)s={_loaded:!0},a=h.eq(o),c=a[0].firstChild,u=a.children(),t=u.filter("ul"),u=u.filter(":not(ul)"),l=a.attr("data-id"),l&&(s.id=l),c&&(s[f]=3==c.nodeType?c.nodeValue:u.text()),m&&(s[m]=n(u,"a").attr("href")),v&&(s[v]=n(u,"img").attr("src")),g&&(d=n(u,".k-sprite").prop("className"),s[g]=d&&e.trim(d.replace("k-sprite",""))),t.length&&(s.items=U(t.eq(0),i)),"true"==a.attr("data-hasChildren")&&(s.hasChildren=!0),p.push(s);return p}var q,j,G,$,K,Y,Q,X,Z,J,ee,te,ie,ne,oe,re,se,ae,le,ce,de,ue=e.extend,he=e.proxy,pe=e.isPlainObject,fe=e.isEmptyObject,me=e.isArray,ge=e.grep,ve=e.ajax,_e=e.each,be=e.noop,we=window.kendo,ye=we.isFunction,ke=we.Observable,xe=we.Class,Ce="string",Se="function",Te="create",De="read",Ae="update",Ee="destroy",Ie="change",Me="sync",Re="get",Fe="error",Pe="requestStart",ze="progress",Be="requestEnd",Le=[Te,De,Ae,Ee],He=function(e){return e},Ne=we.getter,Oe=we.stringify,Ve=Math,We=[].push,Ue=[].join,qe=[].pop,je=[].splice,Ge=[].shift,$e=[].slice,Ke=[].unshift,Ye={}.toString,Qe=we.support.stableSort,Xe=/^\/Date\((.*?)\)\/$/,Ze=ke.extend({init:function(e,t){var i=this;i.type=t||G,ke.fn.init.call(i),i.length=e.length,i.wrapAll(e,i)},at:function(e){return this[e]},toJSON:function(){var e,t,i=this.length,n=Array(i);for(e=0;e<i;e++)t=this[e],t instanceof G&&(t=t.toJSON()),n[e]=t;return n},parent:be,wrapAll:function(e,t){var i,n,o=this,r=function(){return o};for(t=t||[],i=0,n=e.length;i<n;i++)t[i]=o.wrap(e[i],r);return t},wrap:function(e,t){var i,n=this;return null!==e&&"[object Object]"===Ye.call(e)&&(i=e instanceof n.type||e instanceof Y,i||(e=e instanceof G?e.toJSON():e,e=new n.type(e)),e.parent=t,e.bind(Ie,function(e){n.trigger(Ie,{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,i=this.wrapAll(arguments);return e=We.apply(this,i),this.trigger(Ie,{action:"add",index:t,items:i}),e},slice:$e,sort:[].sort,join:Ue,pop:function(){var e=this.length,t=qe.apply(this);return e&&this.trigger(Ie,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,i){var n,o,r,s=this.wrapAll($e.call(arguments,2));if(n=je.apply(this,[e,t].concat(s)),n.length)for(this.trigger(Ie,{action:"remove",index:e,items:n}),o=0,r=n.length;o<r;o++)n[o]&&n[o].children&&n[o].unbind(Ie);return i&&this.trigger(Ie,{action:"add",index:e,items:s}),n},shift:function(){var e=this.length,t=Ge.apply(this);return e&&this.trigger(Ie,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Ke.apply(this,t),this.trigger(Ie,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,i,n=this;for(t=0,i=n.length;t<i;t++)if(n[t]===e)return t;return-1},forEach:function(e,t){for(var i=0,n=this.length,o=t||window;i<n;i++)e.call(o,this[i],i,this)},map:function(e,t){for(var i=0,n=[],o=this.length,r=t||window;i<o;i++)n[i]=e.call(r,this[i],i,this);return n},reduce:function(e){var t,i=0,n=this.length;for(2==arguments.length?t=arguments[1]:i<n&&(t=this[i++]);i<n;i++)t=e(t,this[i],i,this);return t},reduceRight:function(e){var t,i=this.length-1;for(2==arguments.length?t=arguments[1]:i>0&&(t=this[i--]);i>=0;i--)t=e(t,this[i],i,this);return t},filter:function(e,t){for(var i,n=0,o=[],r=this.length,s=t||window;n<r;n++)i=this[n],e.call(s,i,n,this)&&(o[o.length]=i);return o},find:function(e,t){for(var i,n=0,o=this.length,r=t||window;n<o;n++)if(i=this[n],e.call(r,i,n,this))return i},every:function(e,t){for(var i,n=0,o=this.length,r=t||window;n<o;n++)if(i=this[n],!e.call(r,i,n,this))return!1;return!0},some:function(e,t){for(var i,n=0,o=this.length,r=t||window;n<o;n++)if(i=this[n],e.call(r,i,n,this))return!0;return!1},remove:function(e){var t=this.indexOf(e);t!==-1&&this.splice(t,1)},empty:function(){this.splice(0,this.length)}});"undefined"!=typeof Symbol&&Symbol.iterator&&!Ze.prototype[Symbol.iterator]&&(Ze.prototype[Symbol.iterator]=[][Symbol.iterator]),j=Ze.extend({init:function(e,t,i){ke.fn.init.call(this),this.type=t||G,i&&(this._events=i);for(var n=0;n<e.length;n++)this[n]=e[n];this.length=n,this._parent=he(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}}),G=ke.extend({init:function(e){var t,i,n=this,o=function(){return n};ke.fn.init.call(this),this._handlers={};for(i in e)t=e[i],"object"==typeof t&&t&&!t.getTime&&"_"!=i.charAt(0)&&(t=n.wrap(t,i,o)),n[i]=t;n.uid=we.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_handlers"!==e&&"_events"!==e&&typeof this[e]!==Se&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(){var e,t,i={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof G||e instanceof Ze)&&(e=e.toJSON()),i[t]=e);return i},get:function(e){var t,i=this;return i.trigger(Re,{field:e}),t="this"===e?i:we.getter(e,!0)(i)},_set:function(e,t){var i,n,o,r=this,s=e.indexOf(".")>=0;if(s)for(i=e.split("."),n="";i.length>1;){if(n+=i.shift(),o=we.getter(n,!0)(r),o instanceof G)return o.set(i.join("."),t),s;n+="."}return we.setter(e)(r,t),s},set:function(e,t){var i=this,n=!1,o=e.indexOf(".")>=0,r=we.getter(e,!0)(i);return r!==t&&(r instanceof ke&&this._handlers[e]&&(this._handlers[e].get&&r.unbind(Re,this._handlers[e].get),r.unbind(Ie,this._handlers[e].change)),n=i.trigger("set",{field:e,value:t}),n||(o||(t=i.wrap(t,e,function(){return i})),(!i._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&i.trigger(Ie,{field:e}))),n},parent:be,wrap:function(e,t,n){var o,r,s,a,l=this,c=Ye.call(e);return null==e||"[object Object]"!==c&&"[object Array]"!==c||(s=e instanceof Ze,a=e instanceof re,"[object Object]"!==c||a||s?("[object Array]"===c||s||a)&&(s||a||(e=new Ze(e)),r=i(l,Ie,t,!1),e.bind(Ie,r),l._handlers[t]={change:r}):(e instanceof G||(e=new G(e)),o=i(l,Re,t,!0),e.bind(Re,o),r=i(l,Ie,t,!0),e.bind(Ie,r),l._handlers[t]={get:o,change:r}),e.parent=n),e}}),$={number:function(e){return typeof e===Ce&&"null"===e.toLowerCase()?null:we.parseFloat(e)},date:function(e){return typeof e===Ce&&"null"===e.toLowerCase()?null:we.parseDate(e)},"boolean":function(e){return typeof e===Ce?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===Ce&&"null"===e.toLowerCase()?null:null!=e?e+"":e},"default":function(e){return e}},K={string:"",number:0,date:new Date,"boolean":!1,"default":""},Y=G.extend({init:function(i){var n,o,r=this;if((!i||e.isEmptyObject(i))&&(i=e.extend({},r.defaults,i),r._initializers))for(n=0;n<r._initializers.length;n++)o=r._initializers[n],i[o]=r.defaults[o]();G.fn.init.call(r,i),r.dirty=!1,r.dirtyFields={},r.idField&&(r.id=r.get(r.idField),r.id===t&&(r.id=r._defaultId))},shouldSerialize:function(e){return G.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"dirtyFields"!==e&&"_accessors"!==e},_parse:function(e,t){var i,n=this,r=e,s=n.fields||{};return e=s[e],e||(e=o(s,r)),e&&(i=e.parse,!i&&e.type&&(i=$[e.type.toLowerCase()])),i?i(t):t},_notifyChange:function(e){var t=e.action;"add"!=t&&"remove"!=t||(this.dirty=!0,this.dirtyFields[e.field]=!0)},editable:function(e){return e=(this.fields||{})[e],!e||e.editable!==!1},set:function(e,t,i){var o=this,r=o.dirty;o.editable(e)&&(t=o._parse(e,t),n(t,o.get(e))?o.trigger("equalSet",{field:e,value:t}):(o.dirty=!0,o.dirtyFields[e]=!0,G.fn.set.call(o,e,t,i)&&!r&&(o.dirty=r,o.dirty||(o.dirtyFields[e]=!1))))},accept:function(e){var t,i,n=this,o=function(){return n};for(t in e)i=e[t],"_"!=t.charAt(0)&&(i=n.wrap(e[t],t,o)),n._set(t,i);n.idField&&(n.id=n.get(n.idField)),n.dirty=!1,n.dirtyFields={}},isNew:function(){return this.id===this._defaultId}}),Y.define=function(e,i){i===t&&(i=e,e=Y);var n,o,r,s,a,l,c,d,u=ue({defaults:{}},i),h={},p=u.id,f=[];if(p&&(u.idField=p),u.id&&delete u.id,p&&(u.defaults[p]=u._defaultId=""),"[object Array]"===Ye.call(u.fields)){for(l=0,c=u.fields.length;l<c;l++)r=u.fields[l],typeof r===Ce?h[r]={}:r.field&&(h[r.field]=r);u.fields=h}for(o in u.fields)r=u.fields[o],s=r.type||"default",a=null,d=o,o=typeof r.field===Ce?r.field:o,r.nullable||(a=u.defaults[d!==o?d:o]=r.defaultValue!==t?r.defaultValue:K[s.toLowerCase()],"function"==typeof a&&f.push(o)),i.id===o&&(u._defaultId=a),u.defaults[d!==o?d:o]=a,r.parse=r.parse||$[s];return f.length>0&&(u._initializers=f),n=e.extend(u),n.define=function(e){return Y.define(n,e)},u.fields&&(n.fields=u.fields,n.idField=u.idField),n},Q={selector:function(e){return ye(e)?e:Ne(e)},compare:function(e){var t=this.selector(e);return function(e,i){return e=t(e),i=t(i),null==e&&null==i?0:null==e?-1:null==i?1:e.localeCompare?e.localeCompare(i):e>i?1:e<i?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,i){return t(i,e,!0)}:t},combine:function(e){return function(t,i){var n,o,r=e[0](t,i);for(n=1,o=e.length;n<o;n++)r=r||e[n](t,i);return r}}},X=ue({},Q,{asc:function(e){var t=this.selector(e);return function(e,i){var n=t(e),o=t(i);return n&&n.getTime&&o&&o.getTime&&(n=n.getTime(),o=o.getTime()),n===o?e.__position-i.__position:null==n?-1:null==o?1:n.localeCompare?n.localeCompare(o):n>o?1:-1}},desc:function(e){var t=this.selector(e);return function(e,i){var n=t(e),o=t(i);return n&&n.getTime&&o&&o.getTime&&(n=n.getTime(),o=o.getTime()),n===o?e.__position-i.__position:null==n?1:null==o?-1:o.localeCompare?o.localeCompare(n):n<o?1:-1}},create:function(e){return this[e.dir](e.field)}}),q=function(e,t){var i,n=e.length,o=Array(n);for(i=0;i<n;i++)o[i]=t(e[i],i,e);return o},Z=function(){function e(e){return"string"==typeof e&&(e=e.replace(/[\r\n]+/g,"")),JSON.stringify(e)}function t(t){return function(i,n,o){return n+="",o&&(i="("+i+" || '').toString().toLowerCase()",n=n.toLowerCase()),t(i,e(n),o)}}function i(t,i,n,o){if(null!=n){if(typeof n===Ce){var r=Xe.exec(n);r?n=new Date((+r[1])):o?(n=e(n.toLowerCase()),i="(("+i+" || '')+'').toLowerCase()"):n=e(n)}n.getTime&&(i="("+i+"&&"+i+".getTime?"+i+".getTime():"+i+")",n=n.getTime())}return i+" "+t+" "+n}function n(e){var t,i,n,o;for(t="/^",i=!1,n=0;n<e.length;++n){if(o=e.charAt(n),i)t+="\\"+o;else{if("~"==o){i=!0;continue}t+="*"==o?".*":"?"==o?".":".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(o)>=0?"\\"+o:o}i=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,n){return i("==",e,t,n)},neq:function(e,t,n){return i("!=",e,t,n)},gt:function(e,t,n){return i(">",e,t,n)},gte:function(e,t,n){return i(">=",e,t,n)},lt:function(e,t,n){return i("<",e,t,n)},lte:function(e,t,n){return i("<=",e,t,n)},startswith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == 0"}),doesnotstartwith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == -1"}),endswith:t(function(e,t){var i=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+i+") >= 0"}),doesnotendwith:t(function(e,t){var i=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+i+") < 0"}),contains:t(function(e,t){return e+".indexOf("+t+") >= 0"}),doesnotcontain:t(function(e,t){return e+".indexOf("+t+") == -1"}),matches:t(function(e,t){return t=t.substring(1,t.length-1),n(t)+".test("+e+")"}),doesnotmatch:t(function(e,t){return t=t.substring(1,t.length-1),"!"+n(t)+".test("+e+")"}),isempty:function(e){return e+" === ''"},isnotempty:function(e){return e+" !== ''"},isnull:function(e){return"("+e+" == null)"},isnotnull:function(e){return"("+e+" != null)"},isnullorempty:function(e){return"("+e+" === null) || ("+e+" === '')"},isnotnullorempty:function(e){return"("+e+" !== null) && ("+e+" !== '')"}}}(),r.filterExpr=function(e){var i,n,o,s,a,l,c=[],d={and:" && ",or:" || "},u=[],h=[],p=e.filters;for(i=0,n=p.length;i<n;i++)o=p[i],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["+(h.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(u.length+t)+"]"}),h.push.apply(h,s.operators),u.push.apply(u,s.fields)):(typeof a===Se?(s="__f["+u.length+"](d)",u.push(a)):s=we.expr(a),typeof l===Se?(o="__o["+h.length+"]("+s+", "+Z.quote(o.value)+")",h.push(l)):o=Z[(l||"eq").toLowerCase()](s,o.value,o.ignoreCase===t||o.ignoreCase)),c.push(o);return{expression:"("+c.join(d[e.logic])+")",fields:u,operators:h}},J={"==":"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",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},r.normalizeFilter=l,r.compareFilters=h,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(q(this.data,e))},order:function(e,t,i){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new r(i?this.data.sort(Q.create(n)):this.data.slice(0).sort(Q.create(n)))},orderBy:function(e,t){return this.order(e,"asc",t)},orderByDescending:function(e,t){return this.order(e,"desc",t)},sort:function(e,t,i,n){var o,r,a=s(e,t),l=[];if(i=i||Q,a.length){for(o=0,r=a.length;o<r;o++)l.push(i.create(a[o]));return this.orderBy({compare:i.combine(l)},n)}return this},filter:function(e){var t,i,n,o,s,a,c,d,u=this.data,h=[];if(e=l(e),!e||0===e.filters.length)return this;for(o=r.filterExpr(e),a=o.fields,c=o.operators,s=d=Function("d, __f, __o","return "+o.expression),(a.length||c.length)&&(d=function(e){return s(e,a,c)}),t=0,n=u.length;t<n;t++)i=u[t],d(i)&&h.push(i);return new r(h)},group:function(e,t){e=f(e||[]),t=t||this.data;var i,n=this,o=new r(n.data);return e.length>0&&(i=e[0],o=o.groupBy(i).select(function(n){var o=new r(t).filter([{field:n.field,operator:"eq",value:n.value,ignoreCase:!1}]);return{field:n.field,value:n.value,items:e.length>1?new r(n.items).group(e.slice(1),o.toArray()).toArray():n.items,hasSubgroups:e.length>1,aggregates:o.aggregate(i.aggregates)}})),o},groupBy:function(e){if(fe(e)||!this.data.length)return new r([]);var t,i,n,o,s=e.field,a=this._sortForGrouping(s,e.dir||"asc"),l=we.accessor(s),c=l.get(a[0],s),d={field:s,value:c,items:[]},u=[d];for(n=0,o=a.length;n<o;n++)t=a[n],i=l.get(t,s),m(c,i)||(c=i,d={field:s,value:c,items:[]},u.push(d)),d.items.push(t);return new r(u)},_sortForGrouping:function(e,t){var i,n,o=this.data;if(!Qe){for(i=0,n=o.length;i<n;i++)o[i].__position=i;for(o=new r(o).sort(e,t,X).toArray(),i=0,n=o.length;i<n;i++)delete o[i].__position;return o}return this.sort(e,t).toArray()},aggregate:function(e){var t,i,n={},o={};if(e&&e.length)for(t=0,i=this.data.length;t<i;t++)g(n,e,this.data[t],t,i,o);return n}},ee={sum:function(e,t,i){var n=i.get(t);return v(e)?v(n)&&(e+=n):e=n,e},count:function(e){return(e||0)+1},average:function(e,i,n,o,r,s){var a=n.get(i);return s.count===t&&(s.count=0),v(e)?v(a)&&(e+=a):e=a,v(a)&&s.count++,o==r-1&&v(e)&&(e/=s.count),e},max:function(e,t,i){var n=i.get(t);return v(e)||_(e)||(e=n),e<n&&(v(n)||_(n))&&(e=n),e},min:function(e,t,i){var n=i.get(t);return v(e)||_(e)||(e=n),e>n&&(v(n)||_(n))&&(e=n),e}},r.normalizeGroup=f,r.normalizeSort=s,r.process=function(e,i,n){i=i||{};var o,a=new r(e),l=i.group,c=f(l||[]).concat(s(i.sort||[])),d=i.filterCallback,u=i.filter,h=i.skip,p=i.take;return c&&n&&(a=a.sort(c,t,t,n)),u&&(a=a.filter(u),d&&(a=d(a)),o=a.toArray().length),c&&!n&&(a=a.sort(c),l&&(e=a.toArray())),h!==t&&p!==t&&(a=a.range(h,p)),l&&(a=a.group(l,e)),{total:o,data:a.toArray()}},te=xe.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)}}),ie=xe.extend({init:function(e){var t,i=this;e=i.options=ue({},i.options,e),_e(Le,function(t,i){typeof e[i]===Ce&&(e[i]={url:e[i]})}),i.cache=e.cache?ne.create(e.cache):{find:be,add:be},t=e.parameterMap,e.submit&&(i.submit=e.submit),ye(e.push)&&(i.push=e.push),i.push||(i.push=He),i.parameterMap=ye(t)?t:function(e){var i={};return _e(e,function(e,n){e in t&&(e=t[e],pe(e)&&(n=e.value(n),e=e.key)),i[e]=n}),i}},options:{parameterMap:He},create:function(e){return ve(this.setup(e,Te))},read:function(i){var n,o,r,s=this,a=s.cache;i=s.setup(i,De),n=i.success||be,o=i.error||be,r=a.find(i.data),r!==t?n(r):(i.success=function(e){a.add(i.data,e),n(e)},e.ajax(i))},update:function(e){return ve(this.setup(e,Ae))},destroy:function(e){return ve(this.setup(e,Ee))},setup:function(e,t){e=e||{};var i,n=this,o=n.options[t],r=ye(o.data)?o.data(e.data):o.data;return e=ue(!0,{},o,e),i=ue(!0,{},r,e.data),e.data=n.parameterMap(i,t),ye(e.url)&&(e.url=e.url(i)),e}}),ne=xe.extend({init:function(){this._store={}},add:function(e,i){e!==t&&(this._store[Oe(e)]=i)},find:function(e){return this._store[Oe(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Oe(e)]}}),ne.create=function(e){var t={inmemory:function(){return new ne}};return pe(e)&&ye(e.find)?e:e===!0?new ne:t[e]()},oe=xe.extend({init:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m=this;e=e||{};for(t in e)i=e[t],m[t]=typeof i===Ce?Ne(i):i;o=e.modelBase||Y,pe(m.model)&&(m.model=n=o.define(m.model)),r=he(m.data,m),m._dataAccessFunction=r,m.model&&(s=he(m.groups,m),a=he(m.serialize,m),l={},c={},d={},u={},h=!1,n=m.model,n.fields&&(_e(n.fields,function(e,t){var i;p=e,pe(t)&&t.field?p=t.field:typeof t===Ce&&(p=t),pe(t)&&t.from&&(i=t.from),h=h||i&&i!==e||p!==e,f=i||p,c[e]=f.indexOf(".")!==-1?Ne(f,!0):Ne(f),d[e]=Ne(e),l[i||p]=e,u[e]=i||p}),!e.serialize&&h&&(m.serialize=x(a,n,w,d,l,u))),m._dataAccessFunction=r,m._wrapDataAccessBase=C(n,y,c,l,u),m.data=x(r,n,y,c,l,u),m.groups=x(s,n,k,c,l,u))},errors:function(e){return e?e.errors:null},parse:He,data:He,total:function(e){return e.length},groups:He,aggregates:function(){return{}},serialize:function(e){return e}}),re=ke.extend({init:function(e){var i,n,o,r=this;e&&(n=e.data),e=r.options=ue({},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=f(e.group),r._aggregate=e.aggregate,r._total=e.total,r._shouldDetachObservableParents=!0,ke.fn.init.call(r),r.transport=se.create(e,n,r),ye(r.transport.push)&&r.transport.push({pushCreate:he(r._pushCreate,r),pushUpdate:he(r._pushUpdate,r),pushDestroy:he(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,Oe(r.reader.serialize(e)))}}):r._storage=e.offlineStorage),r.reader=new we.data.readers[e.schema.type||"json"](e.schema),i=r.reader.model||{},r._detachObservableParents(),r._data=r._observe(r._data),r._online=!0,r.bind(["push",Fe,Ie,Pe,Me,Be,ze],e)},options:{data:null,schema:{modelBase:Y},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1,inPlaceSort:!1},clone:function(){return this},online:function(i){return i!==t?this._online!=i&&(this._online=i,i)?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 i=this._readData(e);i||(i=e),this[t](i)},_flatData:function(e,t){if(e){if(this._isServerGrouped())return D(e);if(!t)for(var i=0;i<e.length;i++)e.at(i)}return e},parent:be,get:function(e){var t,i,n=this._flatData(this._data,this.options.useRanges);for(t=0,i=n.length;t<i;t++)if(n[t].id==e)return n[t]},getByUid:function(e){return this._getByUid(e,this._data)},_getByUid:function(e,t){var i,n,o=this._flatData(t,this.options.useRanges);if(o)for(i=0,n=o.length;i<n;i++)if(o[i].uid==e)return o[i]},indexOf:function(e){return z(this._data,e)},at:function(e){return this._data.at(e)},data:function(e){var i,n=this;if(e===t){if(n._data)for(i=0;i<n._data.length;i++)n._data.at(i);return n._data}n._detachObservableParents(),n._data=this._observe(e),n._pristineData=e.slice(0),n._storeData(),n._ranges=[],n.trigger("reset"),n._addRange(n._data),n._total=n._data.length,n._pristineTotal=n._total,n._process(n._data)},view:function(e){return e===t?this._view:(this._view=this._observeView(e),t)},_observeView:function(e){var t,i=this;return R(e,i._data,i._ranges,i.reader.model||G,i._isServerGrouped()),t=new j(e,i.reader.model),t.parent=function(){return i.parent()},t},flatView:function(){var e=this.group()||[];return e.length?D(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 G?e:new G(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof Y||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,this._wrapInEmptyGroup(t)):this._data.splice(e,0,t),this._insertModelInRange(e,t),t},pushInsert:function(t,i){var n,o,r,s,a,l,c=this,d=c._getCurrentRangeSpan();i||(i=t,t=0),me(i)||(i=[i]),n=[],o=this.options.autoSync,this.options.autoSync=!1;try{for(r=0;r<i.length;r++)s=i[r],a=this.insert(t,s),n.push(a),l=a.toJSON(),this._isServerGrouped()&&(l=this._wrapInEmptyGroup(l)),this._pristineData.push(l),d&&d.length&&e(d).last()[0].pristineData.push(l),t++}finally{this.options.autoSync=o}n.length&&this.trigger("push",{type:"create",items:n})},pushCreate:function(e){this.pushInsert(this._data.length,e)},pushUpdate:function(e){var t,i,n,o,r;for(me(e)||(e=[e]),t=[],i=0;i<e.length;i++)n=e[i],o=this._createNewModel(n),r=this.get(o.id),r?(t.push(r),r.accept(n),r.trigger(Ie),this._updatePristineForModel(r,n)):this.pushCreate(n);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,i){var n,o,r,s,a,l,c;me(e)||(e=[e]),n=t===i||i,o=[],r=this.options.autoSync,this.options.autoSync=!1;try{for(s=0;s<e.length;s++)a=e[s],l=this._createNewModel(a),c=!1,this._eachItem(this._data,function(e){var t,i;for(t=0;t<e.length;t++)if(i=e.at(t),i.id===l.id){o.push(i),e.splice(t,1),c=!0;break}}),c&&n&&(this._removePristineForModel(l),this._destroyed.pop())}finally{this.options.autoSync=r}return o},remove:function(e){var t,i=this,n=i._isServerGrouped();return this._eachItem(i._data,function(o){if(t=F(o,e),t&&n)return t.isNew&&t.isNew()||i._destroyed.push(t),!0}),this._removeModelFromRanges(e),e},destroyed:function(){return this._destroyed},created:function(){var e,t,i=[],n=this._flatData(this._data,this.options.useRanges);for(e=0,t=n.length;e<t;e++)n[e].isNew&&n[e].isNew()&&i.push(n[e]);return i},updated:function(){var e,t,i=[],n=this._flatData(this._data,this.options.useRanges);for(e=0,t=n.length;e<t;e++)n[e].isNew&&!n[e].isNew()&&n[e].dirty&&i.push(n[e]);return i},sync:function(){var t,i=this,n=[],o=[],r=i._destroyed,s=e.Deferred().resolve().promise();if(i.online()){if(!i.reader.model)return s;n=i.created(),o=i.updated(),t=[],i.options.batch&&i.transport.submit?t=i._sendSubmit(n,o,r):(t.push.apply(t,i._send("create",n)),
t.push.apply(t,i._send("update",o)),t.push.apply(t,i._send("destroy",r))),s=e.when.apply(null,t).then(function(){var e,t;for(e=0,t=arguments.length;e<t;e++)arguments[e]&&i._accept(arguments[e]);i._storeData(!0),i._syncEnd(),i._change({action:"sync"}),i.trigger(Me)})}else i._storeData(!0),i._syncEnd(),i._change({action:"sync"});return s},_syncEnd:be,cancelChanges:function(e){var t=this;e instanceof we.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,0),t._changesCanceled(),t._change(),t._markOfflineUpdatesAsDirty())},_changesCanceled:be,_markOfflineUpdatesAsDirty:function(){var e=this;null!=e.options.offlineStorage&&e._eachItem(e._data,function(e){var t,i;for(t=0;t<e.length;t++)i=e.at(t),"update"!=i.__state__&&"create"!=i.__state__||(i.dirty=!0)})},hasChanges:function(){var e,t,i=this._flatData(this._data,this.options.useRanges);if(this._destroyed.length)return!0;for(e=0,t=i.length;e<t;e++)if(i[e].isNew&&i[e].isNew()||i[e].dirty)return!0;return!1},_accept:function(t){var i,n=this,o=t.models,r=t.response,s=0,a=n._isServerGrouped(),l=n._pristineData,c=t.type;if(n.trigger(Be,{response:r,type:c}),r&&!fe(r)){if(r=n.reader.parse(r),n._handleCustomErrors(r))return;r=n.reader.data(r),me(r)||(r=[r])}else r=e.map(o,function(e){return e.toJSON()});for("destroy"===c&&(n._destroyed=[]),s=0,i=o.length;s<i;s++)"destroy"!==c?(o[s].accept(r[s]),"create"===c?l.push(a?n._wrapInEmptyGroup(o[s]):r[s]):"update"===c&&n._updatePristineForModel(o[s],r[s])):n._removePristineForModel(o[s])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,i){we.deepExtend(i[e],t)})},_executeOnPristineForModel:function(e,t){this._eachPristineItem(function(i){var n=P(i,e);if(n>-1)return t(n,i),!0})},_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){var t=this,i=t.options,n=t._getCurrentRangeSpan();t._eachItem(t._pristineData,e),i.serverPaging&&i.useRanges&&_e(n,function(i,n){t._eachItem(n.pristineData,e)})},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?E(e,t):t(e))},_pristineForModel:function(e){var t,i,n=function(n){if(i=P(n,e),i>-1)return t=n[i],!0};return this._eachPristineItem(n),t},_cancelModel:function(e){var t=this,i=this._pristineForModel(e);this._eachItem(this._data,function(n){var o=z(n,e);o>=0&&(!i||e.isNew()&&!i.__state__?(t._modelCanceled(e),n.splice(o,1),t._removeModelFromRanges(e)):(n[o].accept(i),"update"==i.__state__&&(n[o].dirty=!0)))})},_modelCanceled:be,_submit:function(t,i){var n=this;n.trigger(Pe,{type:"submit"}),n.trigger(ze),n.transport.submit(ue({success:function(i,n){var o=e.grep(t,function(e){return e.type==n})[0];o&&o.resolve({response:i,models:o.models,type:n})},error:function(e,i,o){for(var r=0;r<t.length;r++)t[r].reject(e);n.error(e,i,o)}},i))},_sendSubmit:function(t,i,n){var o=this,r=[];return o.options.batch&&(t.length&&r.push(e.Deferred(function(e){e.type="create",e.models=t})),i.length&&r.push(e.Deferred(function(e){e.type="update",e.models=i})),n.length&&r.push(e.Deferred(function(e){e.type="destroy",e.models=n})),o._submit(r,{data:{created:o.reader.serialize(b(t)),updated:o.reader.serialize(b(i)),destroyed:o.reader.serialize(b(n))}})),r},_promise:function(t,i,n){var o=this;return e.Deferred(function(e){o.trigger(Pe,{type:n}),o.trigger(ze),o.transport[n].call(o.transport,ue({success:function(t){e.resolve({response:t,models:i,type:n})},error:function(t,i,n){e.reject(t),o.error(t,i,n)}},t))}).promise()},_send:function(e,t){var i,n,o=this,r=[],s=o.reader.serialize(b(t));if(o.options.batch)t.length&&r.push(o._promise({data:{models:s}},t,e));else for(i=0,n=t.length;i<n;i++)r.push(o._promise({data:s[i]},[t[i]],e));return r},read:function(t){var i=this,n=i._params(t),o=e.Deferred();return i._queueRequest(n,function(){var e=i.trigger(Pe,{type:"read"});e?(i._dequeueRequest(),o.resolve(e)):(i.trigger(ze),i._ranges=[],i.trigger("reset"),i.online()?i.transport.read({data:n,success:function(e){i._ranges=[],i.success(e,n),o.resolve()},error:function(){var e=$e.call(arguments);i.error.apply(i,e),o.reject.apply(o,e)}}):null!=i.options.offlineStorage&&(i.success(i.offlineData(),n),o.resolve()))}),o.promise()},_readAggregates:function(e){return this.reader.aggregates(e)},success:function(e){var i,n,o,r,s,a,l,c,d,u,h,p=this,f=p.options;if(p.trigger(Be,{response:e,type:"read"}),p.online()){if(e=p.reader.parse(e),p._handleCustomErrors(e))return p._dequeueRequest(),t;p._total=p.reader.total(e),p._pageSize>p._total&&(p._pageSize=p._total,p.options.pageSize&&p.options.pageSize>p._pageSize&&(p._pageSize=p.options.pageSize)),p._aggregate&&f.serverAggregates&&(p._aggregateResult=p._readAggregates(e)),e=p._readData(e),p._destroyed=[]}else{for(e=p._readData(e),i=[],o={},r=p.reader.model,s=r?r.idField:"id",a=0;a<this._destroyed.length;a++)l=this._destroyed[a][s],o[l]=l;for(a=0;a<e.length;a++)c=e[a],d=c.__state__,"destroy"==d?o[c[s]]||this._destroyed.push(this._createNewModel(c)):i.push(c);e=i,p._total=e.length}if(p._pristineTotal=p._total,n=p._skip&&p._data.length&&p._skip<p._data.length,p.options.endless)for(n&&p._pristineData.splice(p._skip,p._pristineData.length),i=e.slice(0),u=0;u<i.length;u++)p._pristineData.push(i[u]);else p._pristineData=e.slice(0);if(p._detachObservableParents(),p.options.endless){for(p._data.unbind(Ie,p._changeHandler),p._isServerGrouped()&&p._data[p._data.length-1].value===e[0].value&&(S(p._data[p._data.length-1],e[0]),e.shift()),e=p._observe(e),n&&p._data.splice(p._skip,p._data.length),h=0;h<e.length;h++)p._data.push(e[h]);p._data.bind(Ie,p._changeHandler)}else p._data=p._observe(e);p._markOfflineUpdatesAsDirty(),p._storeData(),p._addRange(p._data),p._process(p._data),p._dequeueRequest()},_detachObservableParents:function(){if(this._data&&this._shouldDetachObservableParents)for(var e=0;e<this._data.length;e++)this._data[e].parent&&(this._data[e].parent=be)},_storeData:function(e){function t(e){var i,n,o,r=[];for(i=0;i<e.length;i++)n=e.at(i),o=n.toJSON(),s&&n.items?o.items=t(n.items):(o.uid=n.uid,a&&(n.isNew()?o.__state__="create":n.dirty&&(o.__state__="update"))),r.push(o);return r}var i,n,o,r,s=this._isServerGrouped(),a=this.reader.model;if(null!=this.options.offlineStorage){for(i=t(this._data),n=[],o=0;o<this._destroyed.length;o++)r=this._destroyed[o].toJSON(),r.__state__="destroy",n.push(r);this.offlineData(i.concat(n)),e&&(this._pristineData=this.reader.reader?this.reader.reader._wrapDataAccessBase(i):this.reader._wrapDataAccessBase(i))}},_addRange:function(e,i){var n=this,o=t!==i?i:n._skip||0,r=o+n._flatData(e,!0).length;n._ranges.push({start:o,end:r,data:e,pristineData:e.toJSON(),timestamp:n._timeStamp()}),n._sortRanges()},_sortRanges:function(){this._ranges.sort(function(e,t){return e.start-t.start})},error:function(e,t,i){this._dequeueRequest(),this.trigger(Be,{}),this.trigger(Fe,{xhr:e,status:t,errorThrown:i})},_params:function(e){var t=this,i=ue({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 i.take,delete i.skip,delete i.page,delete i.pageSize),t.options.serverGrouping?t.reader.model&&i.group&&(i.group=N(i.group,t.reader.model)):delete i.group,t.options.serverFiltering?t.reader.model&&i.filter&&(i.filter=H(i.filter,t.reader.model)):delete i.filter,t.options.serverSorting?t.reader.model&&i.sort&&(i.sort=N(i.sort,t.reader.model)):delete i.sort,t.options.serverAggregates?t.reader.model&&i.aggregate&&(i.aggregate=N(i.aggregate,t.reader.model)):delete i.aggregate,i},_queueRequest:function(e,i){var n=this;n._requestInProgress?n._pending={callback:he(i,n),options:e}:(n._requestInProgress=!0,n._pending=t,i())},_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(Fe,{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)},_observe:function(e){var t,i=this,n=i.reader.model;return i._shouldDetachObservableParents=!0,e instanceof Ze?(i._shouldDetachObservableParents=!1,i._shouldWrap(e)&&(e.type=i.reader.model,e.wrapAll(e,e))):(t=i.pageSize()&&!i.options.serverPaging?j:Ze,e=new t(e,i.reader.model),e.parent=function(){return i.parent()}),i._isServerGrouped()&&A(e,n),i._changeHandler&&i._data&&i._data instanceof Ze?i._data.unbind(Ie,i._changeHandler):i._changeHandler=he(i._change,i),e.bind(Ie,i._changeHandler)},_updateTotalForAction:function(e,t){var i=this,n=parseInt(i._total,10);v(i._total)||(n=parseInt(i._pristineTotal,10)),"add"===e?n+=t.length:"remove"===e?n-=t.length:"itemchange"===e||"sync"===e||i.options.serverPaging?"sync"===e&&(n=i._pristineTotal=parseInt(i._total,10)):n=i._pristineTotal,i._total=n},_change:function(e){var t,i,n,o=this,r=e?e.action:"";if("remove"===r)for(t=0,i=e.items.length;t<i;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)):(n=function(t){"sync"===t.action&&(o.unbind("change",n),o._updateTotalForAction(r,e.items))},o.first("change",n),o.sync())},_calculateAggregates:function(e,t){t=t||{};var i=new r(e),n=t.aggregate,o=t.filter;return o&&(i=i.filter(o)),i.aggregate(n)},_process:function(e,i){var n,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.useRanges&&(r.skip=o.currentRangeStart())),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.options.serverGrouping&&o._clearEmptyGroups(e),n=o._queryProcess(e,r),o.options.serverAggregates!==!0&&(o._aggregateResult=o._calculateAggregates(n.dataToAggregate||e,r)),o.view(n.data),o._setFilterTotal(n.total,!1),i=i||{},i.items=i.items||o._view,o.trigger(Ie,i)},_clearEmptyGroups:function(e){var t,i;for(t=e.length-1;t>=0;t--)i=e[t],i.hasSubgroups?this._clearEmptyGroups(i.items):i.items&&!i.items.length&&je.apply(i.parent(),[t,1])},_queryProcess:function(e,t){return this.options.inPlaceSort?r.process(e,t,this.options.inPlaceSort):r.process(e,t)},_mergeState:function(e){var i=this;return e!==t&&(i._pageSize=e.pageSize,i._page=e.page,i._sort=e.sort,i._filter=e.filter,i._group=e.group,i._aggregate=e.aggregate,i._skip=i._currentRangeStart=e.skip,i._take=e.take,i._skip===t&&(i._skip=i._currentRangeStart=i.skip(),e.skip=i.skip()),i._take===t&&i._pageSize!==t&&(i._take=i._pageSize,e.take=i._take),e.sort&&(i._sort=e.sort=s(e.sort)),e.filter&&(i._filter=e.filter=l(e.filter)),e.group&&(i._group=e.group=f(e.group)),e.aggregate&&(i._aggregate=e.aggregate=p(e.aggregate))),e},query:function(i){var n,o,r,s=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return s||(this._data===t||0===this._data.length)&&!this._destroyed.length?(this.options.endless&&(o=i.pageSize-this.pageSize(),o>0?(o=this.pageSize(),i.page=i.pageSize/o,i.pageSize=o):(i.page=1,this.options.endless=!1)),this.read(this._mergeState(i))):(r=this.trigger(Pe,{type:"read"}),r||(this.trigger(ze),n=this._queryProcess(this._data,this._mergeState(i)),this._setFilterTotal(n.total,!0),this._aggregateResult=this._calculateAggregates(n.dataToAggregate||this._data,i),this.view(n.data),this.trigger(Be,{type:"read"}),this.trigger(Ie,{items:n.data})),e.Deferred().resolve(r).promise())},_setFilterTotal:function(e,i){var n=this;n.options.serverFiltering||(e!==t?n._total=e:i&&(n._total=n._data.length))},fetch:function(e){var t=this,i=function(i){i!==!0&&ye(e)&&e.call(t)};return this._query().then(i)},_query:function(e){var t=this;return t.query(ue({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var t=this,i=t.page(),n=t.total();if(e=e||{},i&&!(n&&i+1>t.totalPages()))return t._skip=t._currentRangeStart=i*t.take(),i+=1,e.page=i,t._query(e),i},prev:function(e){var t=this,i=t.page();if(e=e||{},i&&1!==i)return t._skip=t._currentRangeStart=t._skip-t.take(),i-=1,e.page=i,t._query(e),i},page:function(e){var i,n=this;return e!==t?(e=Ve.max(Ve.min(Ve.max(e,1),n.totalPages()),1),n._query(n._pageableQueryOptions({page:e})),t):(i=n.skip(),i!==t?Ve.round((i||0)/(n.take()||1))+1:t)},pageSize:function(e){var i=this;return e!==t?(i._query(i._pageableQueryOptions({pageSize:e,page:1})),t):i.take()},sort:function(e){var i=this;return e!==t?(i._query({sort:e}),t):i._sort},filter:function(e){var i=this;return e===t?i._filter:(i.trigger("reset"),i._query({filter:e,page:1}),t)},group:function(e){var i=this;return e!==t?(i._query({group:e}),t):i._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var i=this;return e!==t?(i._query({aggregate:e}),t):i._aggregate},aggregates:function(){var e=this._aggregateResult;return fe(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,i,n={};if(!fe(e))for(t={},me(e)||(e=[e]),i=0;i<e.length;i++)t[e[i].aggregate]=0,n[e[i].field]=t;return n},_pageableQueryOptions:function(e){return e},_wrapInEmptyGroup:function(e){var t,i,n,o,r=this.group();for(n=r.length-1,o=0;n>=o;n--)i=r[n],t={value:e.get(i.field),field:i.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(i.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Ve.ceil((e.total()||0)/t)},inRange:function(e,t){var i=this,n=Ve.min(e+t,i.total());return!i.options.serverPaging&&i._data.length>0||i._findRange(e,n).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,i,n){this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=Ve.min(e||0,this.total()),n=ye(n)?n:be;var o,r=this,s=Ve.max(Ve.floor(e/i),0)*i,a=Ve.min(s+i,r.total());return o=r._findRange(e,Ve.min(e+i,r.total())),o.length||0===r.total()?(r._processRangeData(o,e,i,s,a),n(),t):(i!==t&&(r._rangeExists(s,a)?s<e&&r.prefetch(a,i,function(){r.range(e,i,n)}):r.prefetch(s,i,function(){e>s&&a<r.total()&&!r._rangeExists(a,Ve.min(a+i,r.total()))?r.prefetch(a,i,function(){r.range(e,i,n)}):r.range(e,i,n)})),t)},_findRange:function(e,i){var n,o,r,a,l,c,d,u,h,p,m,g,v=this,_=v._ranges,b=[],w=v.options,y=w.serverSorting||w.serverPaging||w.serverFiltering||w.serverGrouping||w.serverAggregates;for(o=0,m=_.length;o<m;o++)if(n=_[o],e>=n.start&&e<=n.end){for(p=0,r=o;r<m;r++)if(n=_[r],h=v._flatData(n.data,!0),h.length&&e+p>=n.start&&(c=n.data,d=n.end,y||(w.inPlaceSort?u=v._queryProcess(n.data,{filter:v.filter()}):(g=f(v.group()||[]).concat(s(v.sort()||[])),u=v._queryProcess(n.data,{sort:g,filter:v.filter()})),h=c=u.data,u.total!==t&&(d=u.total)),a=0,e+p>n.start&&(a=e+p-n.start),l=h.length,d>i&&(l-=d-i),p+=l-a,b=v._mergeGroups(b,c,a,l),i<=n.end&&p==i-e))return b;break}return[]},_mergeGroups:function(e,t,i,n){if(this._isServerGrouped()){var o,r=t.toJSON();return e.length&&(o=e[e.length-1]),T(o,r,i,n),e.concat(r)}return e.concat(t.slice(i,n))},_processRangeData:function(e,i,n,o,r){var s,a,l,c,d=this;d._pending=t,d._skip=i>d.skip()?Ve.min(r,(d.totalPages()-1)*d.take()):o,d._currentRangeStart=i,d._take=n,s=d.options.serverPaging,a=d.options.serverSorting,l=d.options.serverFiltering,c=d.options.serverAggregates;try{d.options.serverPaging=!0,d._isServerGrouped()||d.group()&&d.group().length||(d.options.serverSorting=!0),d.options.serverFiltering=!0,d.options.serverPaging=!0,d.options.serverAggregates=!0,s&&(d._detachObservableParents(),d._data=e=d._observe(e)),d._process(e)}finally{d.options.serverPaging=s,d.options.serverSorting=a,d.options.serverFiltering=l,d.options.serverAggregates=c}},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,i,n){var o=this,r=o._timeStamp();return function(s){var a,l,c,d=!1,u={start:e,end:t,data:[],timestamp:o._timeStamp()};if(o._dequeueRequest(),o.trigger(Be,{response:s,type:"read"}),s=o.reader.parse(s),c=o._readData(s),c.length){for(a=0,l=o._ranges.length;a<l;a++)if(o._ranges[a].start===e){d=!0,u=o._ranges[a],u.pristineData=c,u.data=o._observe(c),u.end=u.start+o._flatData(u.data,!0).length,o._sortRanges();break}d||o._addRange(o._observe(c),e)}o._total=o.reader.total(s),(n||r>=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&(i&&c.length?i():o.trigger(Ie,{}))}},prefetch:function(e,t,i){var n=this,o=Ve.min(e+t,n.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:n._sort,filter:n._filter,group:n._group,aggregate:n._aggregate};n._rangeExists(e,o)?i&&i():(clearTimeout(n._timeout),n._timeout=setTimeout(function(){n._queueRequest(r,function(){n.trigger(Pe,{type:"read"})?n._dequeueRequest():n.transport.read({data:n._params(r),success:n._prefetchSuccessHandler(e,o,i),error:function(){var e=$e.call(arguments);n.error.apply(n,e)}})})},100))},_multiplePrefetch:function(e,t,i){var n=this,o=Ve.min(e+t,n.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:n._sort,filter:n._filter,group:n._group,aggregate:n._aggregate};n._rangeExists(e,o)?i&&i():n.trigger(Pe,{type:"read"})||n.transport.read({data:n._params(r),success:n._prefetchSuccessHandler(e,o,i,!0)})},_rangeExists:function(e,t){var i,n,o=this,r=o._ranges;for(i=0,n=r.length;i<n;i++)if(r[i].start<=e&&r[i].end>=t)return!0;return!1},_getCurrentRangeSpan:function(){var e,t,i=this,n=i._ranges,o=i.currentRangeStart(),r=o+(i.take()||0),s=[],a=n.length;for(t=0;t<a;t++)e=n[t],(e.start<=o&&e.end>=o||e.start>=o&&e.start<=r)&&s.push(e);return s},_removeModelFromRanges:function(e){var t,i,n,o,r=this;for(n=0,o=this._ranges.length;n<o&&(i=this._ranges[n],this._eachItem(i.data,function(i){t=F(i,e)}),!t);n++);r._updateRangesLength()},_insertModelInRange:function(e,t){var i,n,o=this,r=o._ranges||[],s=r.length;for(n=0;n<s;n++)if(i=r[n],i.start<=e&&i.end>=e){o._getByUid(t.uid,i.data)||(o._isServerGrouped()?i.data.splice(e,0,o._wrapInEmptyGroup(t)):i.data.splice(e,0,t));break}o._updateRangesLength()},_updateRangesLength:function(){var e,t,i=this,n=i._ranges||[],o=n.length,r=!1,s=0,a=0;for(t=0;t<o;t++)e=n[t],a=i._flatData(e.data,!0).length-Ve.abs(e.end-e.start),r||0===a?r&&(e.start+=s,e.end+=s):(r=!0,s=a,e.end+=s)}}),se={},se.create=function(t,i,n){var o,r=t.transport?e.extend({},t.transport):null;return r?(r.read=typeof r.read===Ce?{url:r.read}:r.read,"jsdo"===t.type&&(r.dataSource=n),t.type&&(we.data.transports=we.data.transports||{},we.data.schemas=we.data.schemas||{},we.data.transports[t.type]?pe(we.data.transports[t.type])?r=ue(!0,{},we.data.transports[t.type],r):o=new we.data.transports[t.type](ue(r,{data:i})):we.logToConsole("Unknown DataSource transport type '"+t.type+"'.\nVerify that registration scripts for this type are included after Kendo UI on the page.","warn"),t.schema=ue(!0,{},we.data.schemas[t.type],t.schema)),o||(o=ye(r.read)?r:new ie(r))):o=new te({data:t.data||[]}),o},re.create=function(e){(me(e)||e instanceof Ze)&&(e={data:e});var i,n,o,r=e||{},s=r.data,a=r.fields,l=r.table,c=r.select,d={};if(s||!a||r.transport||(l?s=V(l,a):c&&(s=O(c,a),r.group===t&&s[0]&&s[0].optgroup!==t&&(r.group="optgroup"))),we.data.Model&&a&&(!r.schema||!r.schema.model)){for(i=0,n=a.length;i<n;i++)o=a[i],o.type&&(d[o.field]=o);fe(d)||(r.schema=ue(!0,r.schema,{model:{fields:d}}))}return r.data=s,c=null,r.select=null,l=null,r.table=null,r instanceof re?r:new re(r)},ae=Y.define({idField:"id",init:function(e){var t,i=this,n=i.hasChildren||e&&e.hasChildren,o="items",r={};we.data.Model.fn.init.call(i,e),typeof i.children===Ce&&(o=i.children),r={schema:{data:o,model:{hasChildren:n,id:i.idField,fields:i.fields}}},typeof i.children!==Ce&&ue(r,i.children),r.data=e,n||(n=r.schema.data),typeof n===Ce&&(n=we.getter(n)),ye(n)&&(t=n.call(i,i),i.hasChildren=(!t||0!==t.length)&&!!t),i._childrenOptions=r,i.hasChildren&&i._initChildren(),i._loaded=!(!e||!e._loaded)},_initChildren:function(){var e,t,i,n=this;n.children instanceof le||(e=n.children=new le(n._childrenOptions),t=e.transport,i=t.parameterMap,t.parameterMap=function(e,t){return e[n.idField||"id"]=n.id,i&&(e=i(e,t)),e},e.parent=function(){return n},e.bind(Ie,function(e){e.node=e.node||n,n.trigger(Ie,e)}),e.bind(Fe,function(e){var t=n.parent();t&&(e.node=e.node||n,t.trigger(Fe,e))}),n._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 i,n,o={},r="_query";return this.hasChildren?(this._initChildren(),i=this.children,o[this.idField||"id"]=this.id,this._loaded||(i._data=t,r="read"),i.one(Ie,he(this._childrenLoaded,this)),this._matchFilter&&(o.filter={field:"_matchFilter",operator:"eq",value:!0}),n=i[r](o)):this.loaded(!0),n||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 Y.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),le=re.extend({init:function(e){var t=ae.define({children:e});e.filter&&!e.serverFiltering&&(this._hierarchicalFilter=e.filter,e.filter=null),re.fn.init.call(this,ue(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(Fe,function(t){e.trigger(Fe,t)})},read:function(e){var t=re.fn.read.call(this,e);return this._hierarchicalFilter&&(this._data&&this._data.length>0?this.filter(this._hierarchicalFilter):(this.options.filter=this._hierarchicalFilter,this._filter=l(this.options.filter),this._hierarchicalFilter=null)),t},remove:function(e){var t,i=e.parentNode(),n=this;return i&&i._initChildren&&(n=i.children),t=re.fn.remove.call(n,e),i&&!n.data().length&&(i.hasChildren=!1),t},success:W("success"),data:W("data"),insert:function(e,t){var i=this.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),re.fn.insert.call(this,e,t)},filter:function(e){return e===t?this._filter:(!this.options.serverFiltering&&this._markHierarchicalQuery(e)&&(e={logic:"or",filters:[e,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:e,page:1}),t)},_markHierarchicalQuery:function(e){var t,i,n,o,s;return e=l(e),e&&0!==e.filters.length?(t=r.filterExpr(e),n=t.fields,o=t.operators,i=s=Function("d, __f, __o","return "+t.expression),(n.length||o.length)&&(s=function(e){return i(e,n,o)}),this._updateHierarchicalFilter(s),!0):(this._updateHierarchicalFilter(function(){return!0}),!1)},_updateHierarchicalFilter:function(e){var t,i,n=this._data,o=!1;for(i=0;i<n.length;i++)t=n[i],t.hasChildren?(t._matchFilter=t.children._updateHierarchicalFilter(e),t._matchFilter||(t._matchFilter=e(t))):t._matchFilter=e(t),t._matchFilter&&(o=!0);return o},_find:function(e,t){var i,n,o,r,s=this._data;if(s){if(o=re.fn[e].call(this,t))return o;for(s=this._flatData(this._data),i=0,n=s.length;i<n;i++)if(r=s[i].children,r instanceof le&&(o=r[e](t)))return o}},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),le.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},i=t.data,n=t.fields,o=t.list;return i&&i._dataSource?i._dataSource:(i||!n||t.transport||o&&(i=U(o,n)),t.data=i,t instanceof le?t:new le(t))},ce=we.Observable.extend({init:function(e,t,i){we.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!i;var n=this;e.bind("change",function(){n._change()}),e.bind("reset",function(){n._reset()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var i=this.pageSize,n=!0;return e>=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e<this.dataOffset||e>=this.skip+i)&&(n=this.range(Math.floor(e/i)*i)),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),n?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,i=e.skip-e.viewSize+t,n=Ve.max(Ve.floor(i/t),0)*t;this.offset=i,this.dataSource.prefetch(n,t,function(){e._goToRange(i,!0)})},range:function(e,t){if(this.offset===e)return!0;var i=this,n=this.pageSize,o=Ve.max(Ve.floor(e/n),0)*n,r=this.dataSource;return t&&(o+=n),r.inRange(e,n)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(r.prefetch(o,n,function(){i.offset=e,i._recalculate(),i._goToRange(e,!0)}),!1)},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,i=this.skip+t,n=this.dataSource;n.inRange(i,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:i,take:t}),n.prefetch(i,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:i,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,i=this.viewSize,n=Math.ceil(t/e)*e;this.skip=n,this.midPageThreshold=n+e-1,this.nextPageThreshold=n+i-1,this.prefetchThreshold=n+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=n+e-i,this.nextFullRange=n,this.previousMidRange=t-i,this.previousFullRange=n-e}}),de=we.Observable.extend({init:function(e,t){var i=this;we.Observable.fn.init.call(i),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new ce(e,3*t),this.buffer.bind({endreached:function(e){i.trigger("endreached",{index:e.index})},prefetching:function(e){i.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){i.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){i._total=0,i.trigger("reset")},resize:function(){i._total=Math.ceil(this.length/i.batchSize),i.trigger("resize",{total:i.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,i,n=this.buffer,o=e*this.batchSize,r=this.batchSize,s=[];for(n.offset>o&&n.at(n.offset-1),i=0;i<r&&(t=n.at(o+i),null!==t);i++)s.push(t);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),ue(!0,we.data,{readers:{json:oe},Query:r,DataSource:re,HierarchicalDataSource:le,Node:ae,ObservableObject:G,ObservableArray:Ze,LazyObservableArray:j,LocalTransport:te,RemoteTransport:ie,Cache:ne,DataReader:oe,Model:Y,Buffer:ce,BatchBuffer:de})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.binder.min",["kendo.core.min","kendo.data.min"],e)}(function(){return function(e,t){function i(t,i,n){return v.extend({init:function(e,t,i){var n=this;v.fn.init.call(n,e.element[0],t,i),n.widget=e,n._dataBinding=M(n.dataBinding,n),n._dataBound=M(n.dataBound,n),n._itemChange=M(n.itemChange,n)},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,i,n=this.widget,o=e.removedItems||n.items();for(t=0,i=o.length;t<i;t++)c(o[t],!1)},_ns:function(t){t=t||C.ui;var i=[C.ui,C.dataviz.ui,C.mobile.ui];return i.splice(e.inArray(t,i),1),i.unshift(t),C.rolesFromNamespaces(i)},dataBound:function(e){var n,o,r,a,l=this.widget,c=e.addedItems||l.items(),d=l[i],u=C.data.HierarchicalDataSource;if(!(u&&d instanceof u)&&c.length)for(r=e.addedDataItems||d.flatView(),a=this.bindings[t]._parents(),n=0,o=r.length;n<o;n++)c[n]&&s(c[n],r[n],this._ns(e.ns),[r[n]].concat(a))},refresh:function(e){var o,r,s,a,l=this,c=l.widget;e=e||{},e.action||(l.destroy(),c.bind("dataBinding",l._dataBinding),c.bind("dataBound",l._dataBound),c.bind("itemChange",l._itemChange),o=l.bindings[t].get(),c[i]instanceof C.data.DataSource&&c[i]!=o&&(o instanceof C.data.DataSource?c[n](o):o&&o._dataSource?c[n](o._dataSource):(r=C.ui.Select&&c instanceof C.ui.Select,s=C.ui.MultiSelect&&c instanceof C.ui.MultiSelect,a=C.ui.DropDownTree&&c instanceof C.ui.DropDownTree,a?c.treeview[i].data(o):c[i].data(o),l.bindings.value&&(r||s)&&c.value(p(l.bindings.value.get(),c.options.dataValueField)))))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}})}function n(e,t){var i=C.initWidget(e,{},t);if(i)return new y(i)}function o(e){var t,i,n,r,s,a,l,c={};for(l=e.match(k),t=0,i=l.length;t<i;t++)n=l[t],r=n.indexOf(":"),s=n.substring(0,r),a=n.substring(r+1),"{"==a.charAt(0)&&(a=o(a)),c[s]=a;return c}function r(e,t,i){var n,o={};for(n in e)o[n]=new i(t,e[n]);return o}function s(e,t,i,a){var c,d,u,h,p,v,_,b,y;if(e&&!e.getAttribute("data-"+C.ns+"stop")&&(c=e.getAttribute("data-"+C.ns+"role"),u=e.getAttribute("data-"+C.ns+"bind"),h=[],p=!0,_={},a=a||[t],(c||u)&&l(e,!1),c&&(b=n(e,i)),u&&(u=o(u.replace(x,"")),b||(_=C.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:N,valuePrimitive:!1,autoBind:!0},t),_.roles=i,b=new w(e,_)),b.source=t,v=r(u,a,f),_.template&&(v.template=new g(a,"",_.template)),v.click&&(u.events=u.events||{},u.events.click=u.click,v.click.destroy(),delete v.click),v.source&&(p=!1),u.attr&&(v.attr=r(u.attr,a,f)),u.style&&(v.style=r(u.style,a,f)),u.events&&(v.events=r(u.events,a,m)),u.css&&(v.css=r(u.css,a,f)),b.bind(v)),b&&(e.kendoBindingTarget=b),y=e.children,p&&y)){for(d=0;d<y.length;d++)h[d]=y[d];for(d=0;d<h.length;d++)s(h[d],t,i,a)}}function a(t,i){var n,o,r,a=C.rolesFromNamespaces([].slice.call(arguments,2));for(i=C.observable(i),t=e(t),n=0,o=t.length;n<o;n++)r=t[n],1===r.nodeType&&s(r,i,a)}function l(t,i){var n,o=t.kendoBindingTarget;o&&(o.destroy(),L?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),i&&(n=C.widgetInstance(e(t)),n&&typeof n.destroy===H&&n.destroy())}function c(e,t){l(e,t),d(e,t)}function d(e,t){var i,n,o=e.children;
if(o)for(i=0,n=o.length;i<n;i++)c(o[i],t)}function u(t){var i,n;for(t=e(t),i=0,n=t.length;i<n;i++)c(t[i],!1)}function h(e,t){var i=e.element,n=i[0].kendoBindingTarget;n&&a(i,n.source,t)}function p(e,t){var i,n,o=[],r=0;if(!t)return e;if(e instanceof D){for(i=e.length;r<i;r++)n=e[r],o[r]=n.get?n.get(t):n[t];e=o}else e instanceof T&&(e=e.get(t));return e}var f,m,g,v,_,b,w,y,k,x,C=window.kendo,S=C.Observable,T=C.data.ObservableObject,D=C.data.ObservableArray,A={}.toString,E={},I=C.Class,M=e.proxy,R="value",F="source",P="events",z="checked",B="css",L=!0,H="function",N="change";!function(){var e=document.createElement("a");try{delete e.test}catch(t){L=!1}}(),f=S.extend({init:function(e,t){var i=this;S.fn.init.call(i),i.source=e[0],i.parents=e,i.path=t,i.dependencies={},i.dependencies[t]=!0,i.observable=i.source instanceof S,i._access=function(e){i.dependencies[e.field]=!0},i.observable&&(i._change=function(e){i.change(e)},i.source.bind(N,i._change))},_parents:function(){var t,i=this.parents,n=this.get();return n&&"function"==typeof n.parent&&(t=n.parent(),e.inArray(t,i)<0&&(i=[t].concat(i))),i},change:function(e){var t,i,n=e.field,o=this;if("this"===o.path)o.trigger(N,e);else for(t in o.dependencies)if(0===t.indexOf(n)&&(i=t.charAt(n.length),!i||"."===i||"["===i)){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,i=e.source,n=0,o=e.path,r=i;if(!e.observable)return r;for(e.start(e.source),r=i.get(o);r===t&&i;)i=e.parents[++n],i instanceof T&&(r=i.get(o));if(r===t)for(i=e.source;r===t&&i;)i=i.parent(),i instanceof T&&(r=i.get(o));return"function"==typeof r&&(n=o.lastIndexOf("."),n>0&&(i=i.get(o.substring(0,n))),e.start(i),r=i!==e.source?r.call(i,e.source):r.call(i),e.stop(i)),i&&i!==e.source&&(e.currentSource=i,i.unbind(N,e._change).bind(N,e._change)),e.stop(e.source),r},set:function(e){var t=this.currentSource||this.source,i=C.getter(this.path)(t);"function"==typeof i?t!==this.source?i.call(t,this.source,e):i.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()}}),m=f.extend({get:function(){var e,t=this.source,i=this.path,n=0;for(e=t.get(i);!e&&t;)t=this.parents[++n],t instanceof T&&(e=t.get(i));return M(e,t)}}),g=f.extend({init:function(e,t,i){var n=this;f.fn.init.call(n,e,t),n.template=i},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=I.extend({init:function(e,t,i){this.element=e,this.bindings=t,this.options=i},bind:function(e,t){var i=this;e=t?e[t]:e,e.bind(N,function(e){i.refresh(t||e)}),i.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}}),E.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),E.css=v.extend({init:function(e,t,i){v.fn.init.call(this,e,t,i),this.classes={}},refresh:function(t){var i=e(this.element),n=this.bindings.css[t],o=this.classes[t]=n.get();o?i.addClass(t):i.removeClass(t)}}),E.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),E.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),E.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),E.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),E.events=v.extend({init:function(e,t,i){v.fn.init.call(this,e,t,i),this.handlers={}},refresh:function(t){var i=e(this.element),n=this.bindings.events[t],o=this.handlers[t];o&&i.off(t,o),o=this.handlers[t]=n.get(),i.on(t,n.source,o)},destroy:function(){var t,i=e(this.element);for(t in this.handlers)i.off(t,this.handlers[t])}}),E.text=v.extend({refresh:function(){var t=this.bindings.text.get(),i=this.element.getAttribute("data-format")||"";null==t&&(t=""),e(this.element).text(C.toString(t,i))}}),E.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),E.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),E.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),E.value=_.extend({init:function(t,i,n){_.fn.init.call(this,t,i,n),this._change=M(this.change,this),this.eventName=n.valueUpdate||N,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=N,this.bindings[R].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[R].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)}}),E.source=v.extend({init:function(e,t,i){v.fn.init.call(this,e,t,i);var n=this.bindings.source.get();n instanceof C.data.DataSource&&i.autoBind!==!1&&n.fetch()},refresh:function(e){var t=this,i=t.bindings.source.get();i instanceof D||i 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,i=this.container().nodeName.toLowerCase();return t||(t="select"==i?e.valueField||e.textField?C.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==i?"<tr><td>#:data#</td></tr>":"ul"==i||"ol"==i?"<li>#:data#</li>":"#:data#",t=C.template(t)),t},add:function(t,i){var n,o,r,a,l=this.container(),c=l.cloneNode(!1),d=l.children[t];if(e(c).html(C.render(this.template(),i)),c.children.length)for(n=this.bindings.source._parents(),o=0,r=i.length;o<r;o++)a=c.children[0],l.insertBefore(a,d||null),s(a,i[o],this.options.roles,[i[o]].concat(n))},remove:function(e,t){var i,n,o=this.container();for(i=0;i<t.length;i++)n=o.children[e],c(n,!0),n.parentNode==o&&o.removeChild(n)},render:function(){var t,i,n,o=this.bindings.source.get(),r=this.container(),a=this.template();if(null!=o)if(o instanceof C.data.DataSource&&(o=o.view()),o instanceof D||"[object Array]"===A.call(o)||(o=[o]),this.bindings.template){if(d(r,!0),e(r).html(this.bindings.template.render(o)),r.children.length)for(t=this.bindings.source._parents(),i=0,n=o.length;i<n;i++)s(r.children[i],o[i],this.options.roles,[o[i]].concat(t))}else e(r).html(C.render(a,o))}}),E.input={checked:_.extend({init:function(t,i,n){_.fn.init.call(this,t,i,n),this._change=M(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,i,n=this.element,o=this.value();if("radio"==n.type)o=this.parsedValue(),this.bindings[z].set(o);else if("checkbox"==n.type)if(e=this.bindings[z].get(),e instanceof D){if(o=this.parsedValue(),o instanceof Date){for(i=0;i<e.length;i++)if(e[i]instanceof Date&&+e[i]===+o){t=i;break}}else t=e.indexOf(o);t>-1?e.splice(t,1):e.push(o)}else this.bindings[z].set(o)},refresh:function(){var e,i,n=this.bindings[z].get(),o=n,r=this.dataType(),s=this.element;if("checkbox"==s.type)if(o instanceof D){if(e=-1,n=this.parsedValue(),n instanceof Date){for(i=0;i<o.length;i++)if(o[i]instanceof Date&&+o[i]===+n){e=i;break}}else e=o.indexOf(n);s.checked=e>=0}else s.checked=o;else"radio"==s.type&&("date"==r?n=C.toString(n,"yyyy-MM-dd"):"datetime-local"==r&&(n=C.toString(n,"yyyy-MM-ddTHH:mm:ss")),s.checked=null!==n&&t!==n&&s.value===""+n)},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)}})},E.select={source:E.source.extend({refresh:function(i){var n,o=this,r=o.bindings.source.get();r instanceof D||r instanceof C.data.DataSource?(i=i||{},"add"==i.action?o.add(i.index,i.items):"remove"==i.action?o.remove(i.index,i.items):"itemchange"!=i.action&&i.action!==t||(o.render(),o.bindings.value&&o.bindings.value&&(n=p(o.bindings.value.get(),e(o.element).data("valueField")),null===n?o.element.selectedIndex=-1:o.element.value=n))):o.render()}}),value:_.extend({init:function(t,i,n){_.fn.init.call(this,t,i,n),this._change=M(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,i,n,o=this.dataType(),r=[];for(i=0,n=this.element.options.length;i<n;i++)t=this.element.options[i],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,i,n,o,r,s,a,l,c=[],d=this.element,u=this.options.valueField||this.options.textField,h=this.options.valuePrimitive;for(r=0,s=d.options.length;r<s;r++)i=d.options[r],i.selected&&(o=i.attributes.value,o=o&&o.specified?i.value:i.text,c.push(u?o:this._parseValue(o,this.dataType())));if(u)for(e=this.bindings.source.get(),e instanceof C.data.DataSource&&(e=e.view()),n=0;n<c.length;n++)for(r=0,s=e.length;r<s;r++)if(a=e[r].get(u),l=a+""===c[n]){c[n]=e[r];break}o=this.bindings[R].get(),o instanceof D?o.splice.apply(o,[0,o.length].concat(c)):this.bindings[R].set(h||!(o instanceof T||null===o||o===t)&&u?c[0].get(u):c[0])},refresh:function(){var e,t,i,n=this.element,o=n.options,r=this.bindings[R].get(),s=r,a=this.options.valueField||this.options.textField,l=!1,c=this.dataType();for(s instanceof D||(s=new D([r])),n.selectedIndex=-1,i=0;i<s.length;i++)for(r=s[i],a&&r instanceof T&&(r=r.get(a)),"date"==c?r=C.toString(s[i],"yyyy-MM-dd"):"datetime-local"==c&&(r=C.toString(s[i],"yyyy-MM-ddTHH:mm:ss")),e=0;e<o.length;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)}})},E.widget={events:v.extend({init:function(e,t,i){v.fn.init.call(this,e.element[0],t,i),this.widget=e,this.handlers={}},refresh:function(e){var t=this.bindings.events[e],i=this.handlers[e];i&&this.widget.unbind(e,i),i=t.get(),this.handlers[e]=function(e){e.data=t.source,i(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,i){v.fn.init.call(this,e.element[0],t,i),this.widget=e,this._change=M(this.change,this),this.widget.bind(N,this._change)},change:function(){this.bindings[z].set(this.value())},refresh:function(){this.widget.check(this.bindings[z].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,i){v.fn.init.call(this,e.element[0],t,i),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,i){v.fn.init.call(this,e.element[0],t,i),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,i){v.fn.init.call(this,e.element[0],t,i),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:v.extend({init:function(e,t,i){v.fn.init.call(this,e.element[0],t,i),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:i("source","dataSource","setDataSource"),value:v.extend({init:function(t,i,n){v.fn.init.call(this,t.element[0],i,n),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change);var o=this.bindings.value.get();this._valueIsObservableObject=!n.valuePrimitive&&(null==o||o instanceof T),this._valueIsObservableArray=o instanceof D,this._initChange=!1},_source:function(){var e;return this.widget.dataItem&&(e=this.widget.dataItem(),e&&e instanceof T)?[e]:(this.bindings.source&&(e=this.bindings.source.get()),(!e||e instanceof C.data.DataSource)&&(e=this.widget.dataSource.flatView()),e)},change:function(){var e,t,i,n,o,r,s,a=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,c="[object Array]"===A.call(a),d=this._valueIsObservableObject,u=[];if(this._initChange=!0,l)if(""===a&&(d||this.options.valuePrimitive))a=null;else{for(s=this._source(),c&&(t=a.length,u=a.slice(0)),o=0,r=s.length;o<r;o++)if(i=s[o],n=i.get(l),c){for(e=0;e<t;e++)if(n==u[e]){u[e]=i;break}}else if(n==a){a=d?i:n;break}u[0]&&(a=this._valueIsObservableArray?u:d||!l?u[0]:u[0].get(l))}this.bindings.value.set(a),this._initChange=!1},refresh:function(){var e,i,n,o,r,s,a,l,c;if(!this._initChange){if(e=this.widget,i=e.options,n=i.dataTextField,o=i.dataValueField||n,r=this.bindings.value.get(),s=i.text||"",a=0,c=[],r===t&&(r=null),o)if(r instanceof D){for(l=r.length;a<l;a++)c[a]=r[a].get(o);r=c}else r instanceof T&&(s=r.get(n),r=r.get(o));i.autoBind!==!1||i.cascadeFrom||!e.listView||e.listView.bound()?e.value(r):(n!==o||s||(s=r),s||!r&&0!==r||!i.valuePrimitive?e._preselect(r,s):e.value(r))}this._initChange=!1},destroy:function(){this.widget.unbind(N,this._change)}}),dropdowntree:{value:v.extend({init:function(t,i,n){v.fn.init.call(this,t.element[0],i,n),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change),this._initChange=!1},change:function(){var e,i,n,o,r,s,a,l,c,d=this,u=d.bindings[R].get(),h=d.options.valuePrimitive,p=d.widget.treeview.select(),f=d.widget._isMultipleSelection()?d.widget._getAllChecked():d.widget.treeview.dataItem(p)||d.widget.value(),m=h||d.widget.options.autoBind===!1?d.widget.value():f,g=this.options.dataValueField||this.options.dataTextField;if(m=m.slice?m.slice(0):m,d._initChange=!0,u instanceof D){for(e=[],i=m.length,n=0,o=0,r=u[n],s=!1;r!==t;){for(c=!1,o=0;o<i;o++)if(h?s=m[o]==r:(l=m[o],l=l.get?l.get(g):l,s=l==(r.get?r.get(g):r)),s){m.splice(o,1),i-=1,c=!0;break}c?n+=1:(e.push(r),b(u,n,1),a=n),r=u[n]}b(u,u.length,0,m),e.length&&u.trigger("change",{action:"remove",items:e,index:a}),m.length&&u.trigger("change",{action:"add",items:m,index:u.length-1})}else d.bindings[R].set(m);d._initChange=!1},refresh:function(){if(!this._initChange){var e,t,i=this.options,n=this.widget,o=i.dataValueField||i.dataTextField,r=this.bindings.value.get(),s=r,a=0,l=[];if(o)if(r instanceof D){for(e=r.length;a<e;a++)t=r[a],l[a]=t.get?t.get(o):t;r=l}else r instanceof T&&(r=r.get(o));i.autoBind===!1&&i.valuePrimitive!==!0?n._preselect(s,r):n.value(r)}},destroy:function(){this.widget.unbind(N,this._change)}})},gantt:{dependencies:i("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:v.extend({init:function(t,i,n){v.fn.init.call(this,t.element[0],i,n),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change),this._initChange=!1},change:function(){var e,i,n,o,r,s,a,l,c,d=this,u=d.bindings[R].get(),h=d.options.valuePrimitive,p=h?d.widget.value():d.widget.dataItems(),f=this.options.dataValueField||this.options.dataTextField;if(p=p.slice(0),d._initChange=!0,u instanceof D){for(e=[],i=p.length,n=0,o=0,r=u[n],s=!1;r!==t;){for(c=!1,o=0;o<i;o++)if(h?s=p[o]==r:(l=p[o],l=l.get?l.get(f):l,s=l==(r.get?r.get(f):r)),s){p.splice(o,1),i-=1,c=!0;break}c?n+=1:(e.push(r),b(u,n,1),a=n),r=u[n]}b(u,u.length,0,p),e.length&&u.trigger("change",{action:"remove",items:e,index:a}),p.length&&u.trigger("change",{action:"add",items:p,index:u.length-1})}else d.bindings[R].set(p);d._initChange=!1},refresh:function(){if(!this._initChange){var e,i,n=this.options,o=this.widget,r=n.dataValueField||n.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;l<e;l++)i=s[l],c[l]=i.get?i.get(r):i;s=c}else s instanceof T&&(s=s.get(r));n.autoBind!==!1||n.valuePrimitive===!0||o._isBound()?o.value(s):o._preselect(a,s)}},destroy:function(){this.widget.unbind(N,this._change)}})},scheduler:{source:i("source","dataSource","setDataSource").extend({dataBound:function(e){var t,i,n,o,r=this.widget,a=e.addedItems||r.items();if(a.length)for(n=e.addedDataItems||r.dataItems(),o=this.bindings.source._parents(),t=0,i=n.length;t<i;t++)s(a[t],n[t],this._ns(e.ns),[n[t]].concat(o))}})}},b=function(e,t,i,n){var o,r,s,a,l;if(n=n||[],i=i||0,o=n.length,r=e.length,s=[].slice.call(e,t+i),a=s.length,o){for(o=t+o,l=0;t<o;t++)e[t]=n[l],l++;e.length=o}else if(i)for(e.length=t,i+=t;t<i;)delete e[--i];if(a){for(a=t+a,l=0;t<a;t++)e[t]=s[l],l++;e.length=a}for(t=e.length;t<r;)delete e[t],t++},w=I.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,i,n,o,r,s,a=this instanceof y,l=this.binders();for(t in e)t==R?i=!0:t==F?n=!0:t!=P||a?t==z?r=!0:t==B?s=!0:this.applyBinding(t,e,l):o=!0;n&&this.applyBinding(F,e,l),i&&this.applyBinding(R,e,l),r&&this.applyBinding(z,e,l),o&&!a&&this.applyBinding(P,e,l),s&&!a&&this.applyBinding(B,e,l)},binders:function(){return E[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(e,t,i){var n,o=i[e]||E[e],r=this.toDestroy,s=t[e];if(o)if(o=new o(this.target,t,this.options),r.push(o),s instanceof f)o.bind(s),r.push(s);else for(n in s)o.bind(s,n),r.push(s[n]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,i=this.toDestroy;for(e=0,t=i.length;e<t;e++)i[e].destroy()}}),y=w.extend({binders:function(){return E.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(e,t,i){var n,o=i[e]||E.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 f)o.bind(s),r.push(s);else for(n in s)o.bind(s,n),r.push(s[n])}}),k=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,x=/\s/g,C.unbind=u,C.bind=a,C.data.binders=E,C.data.Binder=v,C.notify=h,C.observable=function(e){return e instanceof T||(e=new T(e)),e},C.observableHierarchy=function(e){function t(e){var i,n;for(i=0;i<e.length;i++)e[i]._initChildren(),n=e[i].children,n.fetch(),e[i].items=n.data(),t(e[i].items)}var i=C.data.HierarchicalDataSource.create(e);return i.fetch(),t(i.data()),i._data._dataSource=i,i._data}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.fx.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(e){return parseInt(e,10)}function n(e,t){return i(e.css(t))}function o(e){var t,i=[];for(t in e)i.push(t);return i}function r(e){for(var t in e)W.indexOf(t)!=-1&&U.indexOf(t)==-1&&delete e[t];return e}function s(e,t){var i,n,o,r,s=[],a={};for(n in t)i=n.toLowerCase(),r=M&&W.indexOf(i)!=-1,!E.hasHW3D&&r&&U.indexOf(i)==-1?delete t[n]:(o=t[n],r?s.push(n+"("+o+")"):a[n]=o);return s.length&&(a[ae]=s.join(" ")),a}function a(e,t){var n,o,r;return M?(n=e.css(ae),n==Y?"scale"==t?1:0:(o=n.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),r=0,o?r=i(o[1]):(o=n.match(B)||[0,0,0,0,0],t=t.toLowerCase(),H.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 i=f.extend(t),n=i.prototype.directions;S[l(e)]=i,S.Element.prototype[e]=function(e,t,n,o){return new i(this.element,e,t,n,o)},T(n,function(t,n){S.Element.prototype[e+l(n)]=function(e,t,o){return new i(this.element,n,e,t,o)}})}function d(e,i,n,o){c(e,{directions:g,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,d=l.element.data(i),u=!(isNaN(d)||d==n);s=u?d:t!==this._startValue?this._startValue:c?n:o,a=t!==this._endValue?this._endValue:c?o:n,this._reverse?(e[i]=a,r[i]=s):(e[i]=s,r[i]=a),l._shouldHide=r[i]===o}})}function u(e,t){var i=C.directions[t].vertical,n=e[i?Z:X]()/2+"px";return _[t].replace("$size",n)}var h,p,f,m,g,v,_,b,w,y,k,x,C=window.kendo,S=C.effects,T=e.each,D=e.extend,A=e.proxy,E=C.support,I=E.browser,M=E.transforms,R=E.transitions,F={scale:0,scalex:0,scaley:0,scale3d:0},P={translate:0,translatex:0,translatey:0,translate3d:0},z=t!==document.documentElement.style.zoom&&!M,B=/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,H=/translatex?$/i,N=/(zoom|fade|expand)(\w+)/,O=/(zoom|fade|expand)/,V=/[xy]$/i,W=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],U=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],q={rotate:"deg",scale:"",skew:"px",translate:"px"},j=M.css,G=Math.round,$="",K="px",Y="none",Q="auto",X="width",Z="height",J="hidden",ee="origin",te="abortId",ie="overflow",ne="translate",oe="position",re="completeCallback",se=j+"transition",ae=j+"transform",le=j+"backface-visibility",ce=j+"perspective",de="1500px",ue="perspective("+de+")",he={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=he,D(e.fn,{kendoStop:function(e,t){return R?S.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),M&&!R&&(T(U,function(i,n){e.fn[n]=function(i){if(t===i)return a(this,n);var o=e(this)[0],r=n+"("+i+q[n.replace(V,"")]+")";return o.style.cssText.indexOf(ae)==-1?e(this).css(ae,r):o.style.cssText=o.style.cssText.replace(RegExp(n+"\\(.*?\\)","i"),r),this},e.fx.step[n]=function(t){e(t.elem)[n](t.now)}}),h=e.fx.prototype.cur,e.fx.prototype.cur=function(){return U.indexOf(this.prop)!=-1?parseFloat(e(this.elem)[this.prop]()):h.apply(this,arguments)}),C.toggleClass=function(e,t,i,n){return t&&(t=t.split(" "),R&&(i=D({exclusive:"all",duration:400,ease:"ease-out"},i),e.css(se,i.exclusive+" "+i.duration+"ms "+i.ease),setTimeout(function(){e.css(se,"").css(Z)},i.duration)),T(t,function(t,i){e.toggleClass(i,n)})),e},C.parseEffects=function(e,t){var i={};return"string"==typeof e?T(e.split(" "),function(e,n){var o=!O.test(n),r=n.replace(N,function(e,t,i){return t+":"+i.toLowerCase()}),s=r.split(":"),a=s[1],l={};s.length>1&&(l.direction=t&&o?he[a].reverse:a),i[s[0]]=l}):T(e,function(e){var n=this.direction;n&&t&&!O.test(e)&&(this.direction=he[n].reverse),i[e]=this}),i},R&&D(S,{transition:function(t,i,n){var r,a,l,c,d=0,u=t.data("keys")||[];n=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},n),l=!1,c=function(){l||(l=!0,a&&(clearTimeout(a),a=null),t.removeData(te).dequeue().css(se,"").css(se),n.complete.call(t))},n.duration=e.fx?e.fx.speeds[n.duration]||n.duration:n.duration,r=s(t,i),e.merge(u,o(r)),t.data("keys",e.unique(u)).height(),t.css(se,n.exclusive+" "+n.duration+"ms "+n.ease).css(se),t.css(r).css(ae),R.event&&(t.one(R.event,c),0!==n.duration&&(d=500)),a=setTimeout(c,n.duration+d),t.data(te,a),t.data(re,c)},stopQueue:function(e,t,i){var n,o=e.data("keys"),r=!i&&o,s=e.data(re);return r&&(n=C.getComputedStyles(e[0],o)),s&&s(),r&&e.css(n),e.removeData("keys").stop(t)}}),p=C.Class.extend({init:function(e,t){var i=this;i.element=e,i.effects=[],i.options=t,i.restore=[]},run:function(t){var i,n,o,a,l,c,d,u=this,h=t.length,p=u.element,f=u.options,m=e.Deferred(),g={},v={};for(u.effects=t,m.done(e.proxy(u,"complete")),p.data("animating",!0),n=0;n<h;n++)for(i=t[n],i.setReverse(f.reverse),i.setOptions(f),u.addRestoreProperties(i.restore),i.prepare(g,v),l=i.children(),o=0,c=l.length;o<c;o++)l[o].duration(f.duration).run();for(d in f.effects)D(v,f.effects[d].properties);for(p.is(":visible")||D(g,{display:p.data("olddisplay")||"block"}),M&&!f.reset&&(a=p.data("targetTransform"),a&&(g=D(a,g))),g=s(p,g),M&&!R&&(g=r(g)),p.css(g).css(ae),n=0;n<h;n++)t[n].setup();return f.init&&f.init(),p.data("targetTransform",v),S.animate(p,v,D({},f,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,i=this.element,n=0,o=e.length;n<o;n++)t=e[n],this.restore.push(t),i.data(t)||i.data(t,i.css(t))},restoreCallback:function(){var e,t,i,n=this.element;for(e=0,t=this.restore.length;e<t;e++)i=this.restore[e],n.css(i,n.data(i))},complete:function(){var t=this,i=0,n=t.element,o=t.options,r=t.effects,s=r.length;for(n.removeData("animating").dequeue(),o.hide&&n.data("olddisplay",n.css("display")).hide(),this.restoreCallback(),z&&!M&&setTimeout(e.proxy(this,"restoreCallback"),0);i<s;i++)r[i].teardown();o.completeCallback&&o.completeCallback(n)}}),S.promise=function(e,t){var i,n,o,r=[],s=new p(e,t),a=C.parseEffects(t.effects);t.effects=a;for(o in a)i=S[l(o)],i&&(n=new i(e,a[o].direction),r.push(n));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(i,o,s){var a=s.transition!==!1;delete s.transition,R&&"transition"in S&&a?S.transition(i,o,s):M?i.animate(r(o),{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete}):i.each(function(){var i=e(this),r={};T(W,function(e,s){var a,l,c,d,u,h,p,f=o?o[s]+" ":null;f&&(l=o,s in F&&o[s]!==t?(a=f.match(L),M&&D(l,{scale:+a[0]})):s in P&&o[s]!==t&&(c=i.css(oe),d="absolute"==c||"fixed"==c,i.data(ne)||(d?i.data(ne,{top:n(i,"top")||0,left:n(i,"left")||0,bottom:n(i,"bottom"),right:n(i,"right")}):i.data(ne,{top:n(i,"marginTop")||0,left:n(i,"marginLeft")||0})),u=i.data(ne),a=f.match(L),a&&(h=s==ne+"y"?0:+a[1],p=s==ne+"y"?+a[1]:+a[2],d?(isNaN(u.right)?isNaN(h)||D(l,{left:u.left+h}):isNaN(h)||D(l,{right:u.right-h}),isNaN(u.bottom)?isNaN(p)||D(l,{top:u.top+p}):isNaN(p)||D(l,{bottom:u.bottom-p})):(isNaN(h)||D(l,{marginLeft:u.left+h}),isNaN(p)||D(l,{marginTop:u.top+p})))),!M&&"scale"!=s&&s in l&&delete l[s],l&&D(r,l))}),I.msie&&delete r.scale,i.animate(r,{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete})})}}),S.animatedPromise=S.promise,f=C.Class.extend({init:function(e,t){var i=this;i.element=e,i._direction=t,i.options={},i._additionalEffects=[],i.restore||(i.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 p(e.element,{reverse:e._reverse,duration:e._duration}),i=e._additionalEffects.concat([e]);return t.run(i)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,i,n=this,o=n.element,a=0,l=n.restore,c=l.length,d=e.Deferred(),u={},h={},p=n.children(),f=p.length;for(d.done(e.proxy(n,"_complete")),o.data("animating",!0),a=0;a<c;a++)t=l[a],o.data(t)||o.data(t,o.css(t));for(a=0;a<f;a++)p[a].duration(n._duration).run();return n.prepare(u,h),o.is(":visible")||D(u,{display:o.data("olddisplay")||"block"}),M&&(i=o.data("targetTransform"),i&&(u=D(i,u))),u=s(o,u),M&&!R&&(u=r(u)),o.css(u).css(ae),n.setup(),o.data("targetTransform",h),S.animate(o,h,{duration:n._duration,complete:d.resolve}),d.promise()},stop:function(){var t=0,i=this.children(),n=i.length;for(t=0;t<n;t++)i[t].stop();return e(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var e,t,i,n=this.element;for(e=0,t=this.restore.length;e<t;e++)i=this.restore[e],n.css(i,n.data(i))},_complete:function(){var t=this,i=t.element;i.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&i.data("olddisplay",i.css("display")).hide(),z&&!M&&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}}),m=["left","right","up","down"],g=["in","out"],c("slideIn",{directions:m,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var i,n=this,o=n.element,r=C._outerWidth,s=C._outerHeight,a=he[n._direction],l=-a.modifier*(a.vertical?s(o):r(o)),c=l/(n.options&&n.options.divisor||1)+K,d="0px";n._reverse&&(i=e,e=t,t=i),M?(e[a.transition]=c,t[a.transition]=d):(e[a.property]=c,t[a.property]=d)}}),c("tile",{directions:m,init:function(e,t,i){f.prototype.init.call(this,e,t),this.options={previous:i}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,i=e.options.previous,n=e.options.previousDivisor||1,o=e._direction,r=[C.fx(e.element).slideIn(o).setReverse(t)];return i&&r.push(C.fx(i).slideIn(he[o].reverse).divisor(n).setReverse(!t)),r}}),d("fade","opacity",1,0),d("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var i,n=this,o=n.element,r=n.options,s=o.data(ee),a=r.offset,l=n._reverse;l||null!==s||o.data(ee,parseFloat(o.css("margin-"+r.axis))),i=o.data(ee)||0,t["margin-"+r.axis]=l?i:i+a}}),c("slideTo",{prepare:function(e,t){var i=this,n=i.element,o=i.options,r=o.offset.split(","),s=i._reverse;M?(t.translatex=s?0:r[0],t.translatey=s?0:r[1]):(t.left=s?0:r[0],t.top=s?0:r[1]),n.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[ie],prepare:function(e,i){var n=this,o=n.element,r=n.options,s=n._reverse,a="vertical"===n._direction?Z:X,l=o[0].style[a],c=o.data(a),d=parseFloat(c||l),u=G(o.css(a,Q)[a]());e.overflow=J,d=r&&r.reset?u||d:d||u,i[a]=(s?0:d)+K,e[a]=(s?d:0)+K,c===t&&o.data(a,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,i="vertical"===e._direction?Z:X,n=t.data(i);n!=Q&&n!==$||setTimeout(function(){t.css(i,Q).css(i)},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 i=this,n=i.element,o=S.box(n),r=S.box(i.options.target),s=a(n,"scale"),l=S.fillScale(r,o),c=S.transformOrigin(r,o);D(e,v),t.scale=1,n.css(ae,"scale(1)").css(ae),n.css(ae,"scale("+s+")"),e.top=o.top,e.left=o.left,e.transformOrigin=c.x+K+" "+c.y+K,i._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)"},b={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:m,init:function(e,t,i){f.prototype.init.call(this,e,t),this._container=i},prepare:function(e,t){var i=this,n=i._reverse,o=n?he[i._direction].reverse:i._direction,r=b[o];e.zIndex=1,i._clipInHalf&&(e.clip=u(i._container,C.directions[o].reverse)),
e[le]=J,t[ae]=ue+(n?r.start:r.end),e[ae]=ue+(n?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,i=e._face;return t&&!i||!t&&i},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:m,init:function(e,t,i){f.prototype.init.call(this,e,t),this._container=i},restore:["clip"],prepare:function(e,t){var i=this,n=i._reverse?he[i._direction].reverse:i._direction;e.clip=u(i._container,n),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,i=e._face;return t&&!i||!t&&i},face:function(e){return this._face=e,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(e,t,i,n){f.prototype.init.call(this,e,t),this.options={},this.options.face=i,this.options.back=n},children:function(){var e,t=this,i=t.options,n="horizontal"===t._direction?"left":"top",o=C.directions[n].reverse,r=t._reverse,s=i.face.clone(!0).removeAttr("id"),a=i.back.clone(!0).removeAttr("id"),l=t.element;return r&&(e=n,n=o,o=e),[C.fx(i.face).staticPage(n,l).face(!0).setReverse(r),C.fx(i.back).staticPage(o,l).setReverse(r),C.fx(s).turningPage(n,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]=de,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,i,n){f.prototype.init.call(this,e,t),this.options={},this.options.face=i,this.options.back=n},children:function(){var e,t=this,i=t.options,n="horizontal"===t._direction?"left":"top",o=C.directions[n].reverse,r=t._reverse,s=t.element;return r&&(e=n,n=o,o=e),[C.fx(i.face).turningPage(n,s).face(!0).setReverse(r),C.fx(i.back).turningPage(o,s).setReverse(r)]},prepare:function(e){e[ce]=de,e.transformStyle="preserve-3d"}}),w=!E.mobileOS.android,y=".km-touch-scrollbar, .km-actionsheet-wrapper",c("replace",{_before:e.noop,_after:e.noop,init:function(t,i,n){f.prototype.init.call(this,t),this._previous=e(i),this._transitionClass=n},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(y))){var i=this.container;i.removeClass("k-fx-end").removeClass(this._containerClass()).off(R.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),w&&i.css(ie,""),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,i=this,n=i.element,o=i._previous,r=n.parents().filter(o.parents()).first(),s=i._both(),a=e.Deferred(),l=n.css(oe);return r.length||(r=n.parent()),this.container=r,this.deferred=a,this.isAbsolute="absolute"==l,this.isAbsolute||s.css(oe,"absolute"),w&&(t=r.css(ie),r.css(ie,"hidden")),R?(n.addClass("k-fx-hidden"),r.addClass(this._containerClass()),this.completeProxy=e.proxy(this,"complete"),r.on(R.event,this.completeProxy),C.animationFrame(function(){n.removeClass("k-fx-hidden").addClass("k-fx-next"),o.css("display","").addClass("k-fx-current"),i._before(o,n),C.animationFrame(function(){r.removeClass("k-fx-start").addClass("k-fx-end"),i._after(o,n)})})):this.complete(),a.promise()},stop:function(){this.complete()}}),k=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))}}),x=k.extend({init:function(e){var t=this;D(t,e),k.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,i=t.movable;t.initial=i[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(x,{easeOutExpo:function(e,t,i,n){return e==n?t+i:i*(-Math.pow(2,-10*e/n)+1)+t},easeOutBack:function(e,t,i,n,o){return o=1.70158,i*((e=e/n-1)*e*((o+1)*e+o)+1)+t}}),S.Animation=k,S.Transition=x,S.createEffect=c,S.box=function(t){t=e(t);var i=t.offset();return i.width=C._outerWidth(t),i.height=C._outerHeight(t),i},S.transformOrigin=function(e,t){var i=(e.left-t.left)*t.width/(t.width-e.width),n=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(i)?0:i,y:isNaN(n)?0:n}},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),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],e)}(function(){return function(e,t){function i(e){if(!e)return{};var t=e.match(_)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var n=window.kendo,o=n.Observable,r="SCRIPT",s="init",a="show",l="hide",c="transitionStart",d="transitionEnd",u="attach",h="detach",p=/unrecognized expression/,f=o.extend({init:function(e,t){var i=this;t=t||{},o.fn.init.call(i),i.content=e,i.id=n.guid(),i.tagName=t.tagName||"div",i.model=t.model,i._wrap=t.wrap!==!1,this._evalTemplate=t.evalTemplate||!1,i._fragments={},i.bind([s,a,l,c,d],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(s)),t&&(i._eachFragment(u),i.trigger(a)),i.element},clone:function(){return new m(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(c,{type:e})},afterTransition:function(e){this.trigger(d,{type:e})},hide:function(){this._eachFragment(h),this.element.detach(),this.trigger(l)},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,o,s=this,a="<"+s.tagName+" />";try{i=e(document.getElementById(s.content)||s.content),i[0].tagName===r&&(i=i.html())}catch(l){p.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&&(o=e(n.template(e("<div />").append(t.clone(!0)).html())(s.model||{})),e.contains(document,t[0])&&t.replaceWith(o),t=o),s._wrap&&(t=t.wrapAll(a).parent())),t}}),m=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,i){this.container(e).show(t,i)},_createContainer:function(e){var t,i=this.render(),n=i.find(e);if(!n.length&&i.is(e)){if(!i.is(e))throw Error("can't find a container with the specified "+e+" selector");n=i}return t=new b(n),t.bind("accepted",function(e){e.view.render(n)}),t}}),v=f.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),_=/^(\w+)(:(\w+))?( (\w+))?$/,b=o.extend({init:function(e){o.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,t,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,d=t||(c?a[a.length-1].transition:e.transition),u=i(d);return r.running&&r.effect.stop(),"none"===d&&(d=null),r.trigger("accepted",{view:e}),r.view=e,r.previous=s,r.running=!0,c?a.pop():a.push({id:o,transition:d}),s?(d&&n.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),c&&!t&&(u.reverse=!u.reverse),r.effect=n.fx(e.element).replace(s.element,u.type).beforeTransition(function(){e.beforeTransition("show"),s.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),s.afterTransition("hide")}).direction(u.direction).setReverse(u.reverse),r.effect.run().then(function(){r.end()})):(e.showStart(),r.end()),!0):(e.showStart(),e.showEnd(),r.after(),!0)}});n.ViewContainer=b,n.Fragment=v,n.Layout=g,n.View=f,n.ViewClone=m}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dom.min",["kendo.core.min"],e)}(function(){return function(e){function t(){this.node=null}function i(){}function n(e,t,i){this.nodeName=e,this.attr=t||{},this.children=i||[]}function o(e){this.nodeValue=e+""}function r(e){this.html=e}function s(e,t){for(h.innerHTML=t;h.firstChild;)e.appendChild(h.firstChild)}function a(e){return new r(e)}function l(e,t,i){return new n(e,t,i)}function c(e){return new o(e)}function d(e){this.root=e,this.children=[]}var u,h;t.prototype={remove:function(){this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.attr={}},attr:{},text:function(){return""}},i.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}},u=new i,n.prototype=new t,n.prototype.appendTo=function(e){var t,i=document.createElement(this.nodeName),n=this.children;for(t=0;t<n.length;t++)n[t].render(i,u);return e.appendChild(i),i},n.prototype.render=function(e,t){var i,n,o,r,s,a;if(t.nodeName!==this.nodeName)t.remove(),i=this.appendTo(e);else{if(i=t.node,o=this.children,r=o.length,s=t.children,a=s.length,Math.abs(a-r)>2)return void this.render({appendChild:function(i){e.replaceChild(i,t.node)}},u);for(n=0;n<r;n++)o[n].render(i,s[n]||u);for(n=r;n<a;n++)s[n].remove()}this.node=i,this.syncAttributes(t.attr),this.removeAttributes(t.attr)},n.prototype.syncAttributes=function(e){var t,i,n,o=this.attr;for(t in o)i=o[t],n=e[t],"style"===t?this.setStyle(i,n):i!==n&&this.setAttribute(t,i,n)},n.prototype.setStyle=function(e,t){var i,n=this.node;if(t)for(i in e)e[i]!==t[i]&&(n.style[i]=e[i]);else for(i in e)n.style[i]=e[i]},n.prototype.removeStyle=function(e){var t,i=this.attr.style||{},n=this.node;for(t in e)void 0===i[t]&&(n.style[t]="")},n.prototype.removeAttributes=function(e){var t,i=this.attr;for(t in e)"style"===t?this.removeStyle(e.style):void 0===i[t]&&this.removeAttribute(t)},n.prototype.removeAttribute=function(e){var t=this.node;"style"===e?t.style.cssText="":"className"===e?t.className="":t.removeAttribute(e)},n.prototype.setAttribute=function(e,t){var i=this.node;void 0!==i[e]?i[e]=t:i.setAttribute(e,t)},n.prototype.text=function(){var e,t="";for(e=0;e<this.children.length;++e)t+=this.children[e].text();return t},o.prototype=new t,o.prototype.nodeName="#text",o.prototype.render=function(e,t){var i;t.nodeName!==this.nodeName?(t.remove(),i=document.createTextNode(this.nodeValue),e.appendChild(i)):(i=t.node,this.nodeValue!==t.nodeValue&&i.parentNode&&(i.nodeValue=this.nodeValue)),this.node=i},o.prototype.text=function(){return this.nodeValue},r.prototype={nodeName:"#html",attr:{},remove:function(){var e,t;for(e=0;e<this.nodes.length;e++)t=this.nodes[e],t.parentNode&&t.parentNode.removeChild(t)},render:function(e,t){var i,n;if(t.nodeName!==this.nodeName||t.html!==this.html)for(t.remove(),i=e.lastChild,s(e,this.html),this.nodes=[],n=i?i.nextSibling:e.firstChild;n;n=n.nextSibling)this.nodes.push(n);else this.nodes=t.nodes.slice(0)}},h=document.createElement("div"),d.prototype={html:a,element:l,text:c,render:function(e){var t,i,n,o=this.children;for(t=0,i=e.length;t<i;t++)n=o[t],n?n.node&&n.node.parentNode||(n.remove(),n=u):n=u,e[t].render(this.root,n);for(t=i;t<o.length;t++)o[t].remove();this.children=e}},e.dom={html:a,text:c,element:l,Tree:d,Node:t}}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("ooxml/utils.min",["kendo.core.min"],e)}(function(){!function(){kendo.ooxml=kendo.ooxml||{},kendo.ooxml.createZip=function(){if("undefined"==typeof JSZip)throw Error("JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.");return new JSZip}}()},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("ooxml/kendo-ooxml.min",["kendo.core.min","ooxml/utils.min"],e)}(function(){!function(e){function t(e,t,i){return(1461*(e+4800+((t-13)/12|0))/4|0)+(367*(t-1-12*((t-13)/12|0))/12|0)-(3*((e+4900+((t-13)/12|0))/100|0)/4|0)+i-32075}function i(e,i,n){return t(e,i,n)-N}function n(e,t,i,n){return(e+(t+(i+n/1e3)/60)/60)/24}function o(e){var t=n(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),o=i(e.getFullYear(),e.getMonth(),e.getDate());return o<0?o-1+t:o+t}function r(e){return O+e}function s(e,t){return t.indexOf(e)}function a(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;")}function l(e,t){var i,n="";for(i=0;i<e;++i)n+=t(i);return n}function c(e,t){var i,n="";for(i=0;i<e.length;++i)n+=t(e[i],i);return n}function d(e){return"string"==typeof e?"<f>"+a(e)+"</f>":'<f t="array" ref="'+e.ref+'">'+a(e.src)+"</f>"}function u(e){var t=Math.floor(e/26)-1;return(t>=0?u(t):"")+String.fromCharCode(65+e%26)}function h(e,t){return u(t)+(e+1)}function p(e,t){return"$"+u(t)+"$"+(e+1)}function f(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function m(e){return(e/7*100+.5)/100}function g(e){return.75*e}function v(e){return(e+"").replace(/[\x00-\x09\x0B\x0C\x0E-\x1F]/g,"").replace(/\r?\n/g,"\r\n")}function _(e){var t=e;return t.length<6&&(t=t.replace(/(\w)/g,function(e,t){return t+t})),t=t.substring(1).toUpperCase(),t.length<8&&(t="FF"+t),t}function b(e){var t="thin";return 2===e?t="medium":3===e&&(t="thick"),t}function w(e,t){var i="";return t&&(i+="<"+e+' style="'+b(t.size)+'">',t.color&&(i+='<color rgb="'+_(t.color)+'"/>'),i+="</"+e+">"),i}function y(e){return"<border>"+w("left",e.left)+w("right",e.right)+w("top",e.top)+w("bottom",e.bottom)+"</border>"}function k(e,t){var i,n,o,r=[],s=[];for(x(e,function(e,t){var i={_source:e,index:t,height:e.height,cells:[]};r.push(i),s[t]=i}),i=C(r).slice(0),n={rowData:r,rowsByIndex:s,mergedCells:t},o=0;o<i.length;o++)A(i[o],n),delete i[o]._source;return C(r)}function x(e,t){var i,n,o;for(i=0;i<e.length;i++)n=e[i],n&&(o=n.index,"number"!=typeof o&&(o=i),t(n,o))}function C(e){return e.sort(function(e,t){return e.index-t.index})}function S(e,t){e.indexOf(t)<0&&e.push(t)}function T(e,t){var i,n,o,r,s;for(i=0;i<e.length;++i)if(n=e[i],o=n.split(":"),r=o[0],r===t)return s=o[1],r=D(r),s=D(s),{rowSpan:s.row-r.row+1,colSpan:s.col-r.col+1}}function D(e){function t(e){var t,i=e.toUpperCase(),n=0;for(t=0;t<i.length;++t)n=26*n+i.charCodeAt(t)-64;return n-1}function i(e){return parseInt(e,10)-1}var n=/^([a-z]+)(\d+)$/i.exec(e);return{row:i(n[2]),col:t(n[1])}}function A(e,t){var i,n,o,r,s,a,l,c,d,u=e._source,p=e.index,f=u.cells,m=e.cells;if(f)for(i=0;i<f.length;i++)if(n=f[i]||re,o=n.rowSpan||1,r=n.colSpan||1,s=E(m,n),a=h(p,s),1===o&&1===r&&(l=T(t.mergedCells,a),l&&(r=l.colSpan,o=l.rowSpan)),R(n,m,s,r),(o>1||r>1)&&S(t.mergedCells,a+":"+h(p+o-1,s+r-1)),o>1)for(c=p+1;c<p+o;c++)d=t.rowsByIndex[c],d||(d=t.rowsByIndex[c]={index:c,cells:[]},t.rowData.push(d)),R(n,d.cells,s-1,r+1)}function E(e,t){var i;return"number"==typeof t.index?(i=t.index,I(e,t,t.index)):i=M(e,t),i}function I(e,t,i){e[i]=t}function M(e,t){var i,n=e.length;for(i=0;i<e.length+1;i++)if(!e[i]){e[i]=t,n=i;break}return n}function R(e,t,i,n){var o,r;for(o=1;o<n;o++)r={borderTop:e.borderTop,borderRight:e.borderRight,borderBottom:e.borderBottom,borderLeft:e.borderLeft},I(t,r,i+o)}function F(e){return se({ref:e.ref,columns:e.columns,generators:{custom:ae,dynamic:le,top:ce,value:de}})}var P,z,B,L,H,N,O,V,W,U,q,j,G,$,K,Y,Q,X,Z,J,ee,te,ie,ne,oe,re,se,ae,le,ce,de;window.kendo.ooxml=window.kendo.ooxml||{},P=kendo.ooxml,z=e.map,B=P.createZip,L={toString:function(e){return e}},H=kendo.Class.extend({}),H.register=function(e){L=e},H.toString=function(e,t){return L.toString(e,t)},N=t(1900,0,-1),O="data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,",V={compression:"DEFLATE",type:"base64"},W=JSON.parse.bind(JSON),U='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r',q=U+'\n            <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n               <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>\n               <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>\n               <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>\n            </Relationships>',j=function(e){var t=e.creator,i=e.lastModifiedBy,n=e.created,o=e.modified;return U+'\n <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties"\n   xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"\n   xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n   <dc:creator>'+a(t)+"</dc:creator>\n   <cp:lastModifiedBy>"+a(i)+'</cp:lastModifiedBy>\n   <dcterms:created xsi:type="dcterms:W3CDTF">'+a(n)+'</dcterms:created>\n   <dcterms:modified xsi:type="dcterms:W3CDTF">'+a(o)+"</dcterms:modified>\n</cp:coreProperties>"},G=function(e){var t=e.sheets;return U+'\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">\n  <Application>Microsoft Excel</Application>\n  <DocSecurity>0</DocSecurity>\n  <ScaleCrop>false</ScaleCrop>\n  <HeadingPairs>\n    <vt:vector size="2" baseType="variant">\n      <vt:variant>\n        <vt:lpstr>Worksheets</vt:lpstr>\n      </vt:variant>\n      <vt:variant>\n        <vt:i4>'+t.length+'</vt:i4>\n      </vt:variant>\n    </vt:vector>\n  </HeadingPairs>\n  <TitlesOfParts>\n    <vt:vector size="'+t.length+'" baseType="lpstr">'+c(t,function(e,t){return e.options.title?"<vt:lpstr>"+a(e.options.title)+"</vt:lpstr>":"<vt:lpstr>Sheet"+(t+1)+"</vt:lpstr>"})+"</vt:vector>\n  </TitlesOfParts>\n  <LinksUpToDate>false</LinksUpToDate>\n  <SharedDoc>false</SharedDoc>\n  <HyperlinksChanged>false</HyperlinksChanged>\n  <AppVersion>14.0300</AppVersion>\n</Properties>"},$=function(e){var t=e.count;return U+'\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\n  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />\n  <Default Extension="xml" ContentType="application/xml" />\n  <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" />\n  <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>\n  <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>\n  '+l(t,function(e){return'<Override PartName="/xl/worksheets/sheet'+(e+1)+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />'})+'\n  <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />\n  <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" />\n</Types>'},K=function(e){var t=e.sheets,i=e.filterNames,n=e.userNames;return U+'\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n  <fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" />\n  <workbookPr defaultThemeVersion="124226" />\n  <bookViews>\n    <workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" />\n  </bookViews>\n  <sheets>\n  '+c(t,function(e,t){var i=e.options,n=i.name||i.title||"Sheet"+(t+1);return'<sheet name="'+a(n)+'" sheetId="'+(t+1)+'" r:id="rId'+(t+1)+'" />'})+"\n  </sheets>\n  "+(i.length||n.length?"\n    <definedNames>\n      "+c(i,function(e){return'\n         <definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="'+e.localSheetId+'">'+a(e.name)+"!"+a(e.from)+":"+a(e.to)+"</definedName>"})+"\n      "+c(n,function(e){return'\n         <definedName name="'+e.name+'" hidden="'+(e.hidden?1:0)+'" '+(null!=e.localSheetId?'localSheetId="'+e.localSheetId+'"':"")+">"+a(e.value)+"</definedName>"})+"\n    </definedNames>":"")+'\n  <calcPr fullCalcOnLoad="1" calcId="145621" />\n</workbook>'},Y=function(e){var t=e.frozenColumns,i=e.frozenRows,n=e.columns,o=e.defaults,r=e.data,s=e.index,l=e.mergeCells,u=e.autoFilter,h=e.filter,p=e.showGridLines,f=e.hyperlinks,v=e.validations,_=e.defaultCellStyleId,b=e.rtl;return U+'\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac">\n   <dimension ref="A1" />\n\n   <sheetViews>\n     <sheetView '+(b?'rightToLeft="1"':"")+" "+(0===s?'tabSelected="1"':"")+' workbookViewId="0" '+(p===!1?'showGridLines="0"':"")+">\n     "+(i||t?'\n       <pane state="frozen"\n         '+(t?'xSplit="'+t+'"':"")+"\n         "+(i?'ySplit="'+i+'"':"")+'\n         topLeftCell="'+(String.fromCharCode(65+(t||0))+((i||0)+1))+'"\n       />':"")+'\n     </sheetView>\n   </sheetViews>\n\n   <sheetFormatPr x14ac:dyDescent="0.25" defaultRowHeight="'+(o.rowHeight?.75*o.rowHeight:15)+'"\n     '+(o.columnWidth?'defaultColWidth="'+m(o.columnWidth)+'"':"")+" />\n\n   "+(null!=_||n&&n.length>0?"\n     <cols>\n       "+(n&&n.length?"":'\n         <col min="1" max="16384" style="'+_+'"\n              '+(o.columnWidth?'width="'+m(o.columnWidth)+'"':"")+" /> ")+"\n       "+c(n,function(e,t){var i="number"==typeof e.index?e.index+1:t+1;return 0===e.width?"<col "+(null!=_?'style="'+_+'"':"")+'\n                        min="'+i+'" max="'+i+'" hidden="1" customWidth="1" />':"<col "+(null!=_?'style="'+_+'"':"")+'\n                      min="'+i+'" max="'+i+'" customWidth="1"\n                      '+(e.autoWidth?'width="'+(7*e.width+5)/7*256/256+'" bestFit="1"':'width="'+m(e.width)+'"')+" />"})+"\n     </cols>":"")+"\n\n   <sheetData>\n     "+c(r,function(e,t){var i="number"==typeof e.index?e.index+1:t+1;return'\n         <row r="'+i+'" x14ac:dyDescent="0.25"\n              '+(0===e.height?'hidden="1"':e.height?'ht="'+g(e.height)+'" customHeight="1"':"")+">\n           "+c(e.data,function(e){return'\n             <c r="'+e.ref+'" '+(e.style?'s="'+e.style+'"':"")+" "+(e.type?'t="'+e.type+'"':"")+">\n               "+(null!=e.formula?d(e.formula):"")+"\n               "+(null!=e.value?"<v>"+a(e.value)+"</v>":"")+"\n             </c>"})+"\n         </row>\n       "})+"\n   </sheetData>\n\n   "+(u?'<autoFilter ref="'+u.from+":"+u.to+'"/>':h?F(h):"")+"\n\n   "+(l.length?'\n     <mergeCells count="'+l.length+'">\n       '+c(l,function(e){return'<mergeCell ref="'+e+'"/>'})+"\n     </mergeCells>":"")+"\n\n   "+(v.length?"\n     <dataValidations>\n       "+c(v,function(e){return'\n         <dataValidation sqref="'+e.sqref.join(" ")+'"\n                         showErrorMessage="'+e.showErrorMessage+'"\n                         type="'+a(e.type)+'"\n                         '+("list"!==e.type?'operator="'+a(e.operator)+'"':"")+'\n                         allowBlank="'+e.allowBlank+'"\n                         showDropDown="'+e.showDropDown+'"\n                         '+(e.error?'error="'+a(e.error)+'"':"")+"\n                         "+(e.errorTitle?'errorTitle="'+a(e.errorTitle)+'"':"")+">\n           "+(e.formula1?"<formula1>"+a(e.formula1)+"</formula1>":"")+"\n           "+(e.formula2?"<formula2>"+a(e.formula2)+"</formula2>":"")+"\n         </dataValidation>"})+"\n     </dataValidations>":"")+"\n\n   "+(f.length?"\n     <hyperlinks>\n       "+c(f,function(e,t){return'\n         <hyperlink ref="'+e.ref+'" r:id="rId'+t+'"/>'})+"\n     </hyperlinks>":"")+'\n\n   <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n</worksheet>'},Q=function(e){var t=e.count;return U+'\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n  '+l(t,function(e){return'\n    <Relationship Id="rId'+(e+1)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(e+1)+'.xml" />'})+'\n  <Relationship Id="rId'+(t+1)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />\n  <Relationship Id="rId'+(t+2)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />\n</Relationships>'},X=function(e){var t=e.hyperlinks;return U+'\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n  '+c(t,function(e,t){return'\n    <Relationship Id="rId'+t+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+a(e.target)+'" TargetMode="External" />'})+"\n</Relationships>"},Z=function(e){var t=e.count,i=e.uniqueCount,n=e.indexes;return U+'\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="'+t+'" uniqueCount="'+i+'">\n  '+c(Object.keys(n),function(e){return'\n    <si><t xml:space="preserve">'+a(e.substring(1))+"</t></si>"})+"\n</sst>"},J=function(e){var t=e.formats,i=e.fonts,n=e.fills,o=e.borders,r=e.styles;return U+'\n<styleSheet\n    xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"\n    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"\n    mc:Ignorable="x14ac"\n    xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">\n  <numFmts count="'+t.length+'">\n  '+c(t,function(e,t){return'\n    <numFmt formatCode="'+a(e.format)+'" numFmtId="'+(165+t)+'" />'})+'\n  </numFmts>\n  <fonts count="'+(i.length+1)+'" x14ac:knownFonts="1">\n    <font>\n       <sz val="11" />\n       <color theme="1" />\n       <name val="Calibri" />\n       <family val="2" />\n       <scheme val="minor" />\n    </font>\n    '+c(i,function(e){return'\n    <font>\n      <sz val="'+(e.fontSize||11)+'" />\n      '+(e.bold?"<b/>":"")+"\n      "+(e.italic?"<i/>":"")+"\n      "+(e.underline?"<u/>":"")+"\n      "+(e.color?'<color rgb="'+a(e.color)+'" />':'<color theme="1" />')+"\n      "+(e.fontFamily?'\n        <name val="'+a(e.fontFamily)+'" />\n        <family val="2" />\n      ':'\n        <name val="Calibri" />\n        <family val="2" />\n        <scheme val="minor" />\n      ')+"\n    </font>"})+'\n  </fonts>\n  <fills count="'+(n.length+2)+'">\n      <fill><patternFill patternType="none"/></fill>\n      <fill><patternFill patternType="gray125"/></fill>\n    '+c(n,function(e){return"\n      "+(e.background?'\n        <fill>\n          <patternFill patternType="solid">\n              <fgColor rgb="'+a(e.background)+'"/>\n          </patternFill>\n        </fill>\n      ':"")})+'\n  </fills>\n  <borders count="'+(o.length+1)+'">\n    <border><left/><right/><top/><bottom/><diagonal/></border>\n    '+c(o,y)+'\n  </borders>\n  <cellStyleXfs count="1">\n    <xf borderId="0" fillId="0" fontId="0" />\n  </cellStyleXfs>\n  <cellXfs count="'+(r.length+1)+'">\n    <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />\n    '+c(r,function(e){return'\n      <xf xfId="0"\n          '+(e.fontId?'fontId="'+e.fontId+'" applyFont="1"':"")+"\n          "+(e.fillId?'fillId="'+e.fillId+'" applyFill="1"':"")+"\n          "+(e.numFmtId?'numFmtId="'+e.numFmtId+'" applyNumberFormat="1"':"")+"\n          "+(e.textAlign||e.verticalAlign||e.wrap?'applyAlignment="1"':"")+"\n          "+(e.borderId?'borderId="'+e.borderId+'" applyBorder="1"':"")+">\n        "+(e.textAlign||e.verticalAlign||e.wrap?"\n        <alignment\n          "+(e.textAlign?'horizontal="'+a(e.textAlign)+'"':"")+"\n          "+(e.verticalAlign?'vertical="'+a(e.verticalAlign)+'"':"")+"\n          "+(e.wrap?'wrapText="1"':"")+" />\n        ":"")+"\n      </xf>\n    "})+'\n  </cellXfs>\n  <cellStyles count="1">\n    <cellStyle name="Normal" xfId="0" builtinId="0"/>\n  </cellStyles>\n  <dxfs count="0" />\n  <tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" />\n</styleSheet>'},ee=kendo.Class.extend({init:function(e,t,i,n){this.options=e,this._strings=t,this._styles=i,this._borders=n,this._validations={}},relsToXML:function(){var e=this.options.hyperlinks||[];return e.length?X({hyperlinks:e}):""},toXML:function(e){var t,i,n,o,r,s,a,l=this,c=this.options.mergedCells||[],d=this.options.rows||[],u=k(d,c);this._readCells(u),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:h(f(this.options),t.from),to:h(f(this.options),t.to)}:t&&t.ref&&t.columns&&(i=t,t=null),n=[];for(o in this._validations)Object.prototype.hasOwnProperty.call(l._validations,o)&&n.push(l._validations[o]);return r=null,this.options.defaultCellStyle&&(r=this._lookupStyle(this.options.defaultCellStyle)),s=this.options.freezePane||{},a=this.options.defaults||{},Y({frozenColumns:this.options.frozenColumns||s.colSplit,frozenRows:this.options.frozenRows||s.rowSplit,columns:this.options.columns,defaults:a,data:u,index:e,mergeCells:c,autoFilter:t,filter:i,showGridLines:this.options.showGridLines,hyperlinks:this.options.hyperlinks||[],validations:n,defaultCellStyleId:r,rtl:void 0!==this.options.rtl?this.options.rtl:a.rtl})},_lookupString:function(e){var t,i="$"+e,n=this._strings.indexes[i];return void 0!==n?t=n:(t=this._strings.indexes[i]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,t},_lookupStyle:function(e){var t,i=JSON.stringify(e);return"{}"===i?0:(t=s(i,this._styles),t<0&&(t=this._styles.push(i)-1),t+1)},_lookupBorder:function(e){var t,i=JSON.stringify(e);if("{}"!==i)return t=s(i,this._borders),t<0&&(t=this._borders.push(i)-1),t+1},_readCells:function(e){var t,i,n,o,r,s=this;for(t=0;t<e.length;t++)for(i=e[t],n=i.cells,i.data=[],o=0;o<n.length;o++)r=s._cell(n[o],i.index,o),r&&i.data.push(r)},_cell:function(e,t,i){var n,r,s,a,l,c,d,u,p;return e&&e!==re?(n=e.value,r={},e.borderLeft&&(r.left=e.borderLeft),e.borderRight&&(r.right=e.borderRight),
e.borderTop&&(r.top=e.borderTop),e.borderBottom&&(r.bottom=e.borderBottom),r=this._lookupBorder(r),s=this.options.defaultCellStyle||{},a={borderId:r},function(e){e("color"),e("background"),e("bold"),e("italic"),e("underline"),e("fontFamily")||e("fontName","fontFamily"),e("fontSize"),e("format"),e("textAlign")||e("hAlign","textAlign"),e("verticalAlign")||e("vAlign","verticalAlign"),e("wrap")}(function(t,i){var n=e[t];if(void 0===n&&(n=s[t]),void 0!==n)return a[i||t]=n,!0}),l=this.options.columns||[],c=l[i],d=typeof n,c&&c.autoWidth&&(u=n,"number"===d&&(u=H.toString(n,e.format)),c.width=Math.max(c.width||0,(u+"").length)),"string"===d?(n=v(n),n=this._lookupString(n),d="s"):"number"===d?d="n":"boolean"===d?(d="b",n=+n):n&&n.getTime?(d=null,n=o(n),a.format||(a.format="mm-dd-yy")):(d=null,n=null),a=this._lookupStyle(a),p=h(t,i),e.validation&&this._addValidation(e.validation,p),{value:n,formula:e.formula,type:d,style:a,ref:p}):null},_addValidation:function(e,t){var i={showErrorMessage:"reject"===e.type?1:0,formula1:e.from,formula2:e.to,type:ie[e.dataType]||e.dataType,operator:te[e.comparerType]||e.comparerType,allowBlank:e.allowNulls?1:0,showDropDown:e.showButton?0:1,error:e.messageTemplate,errorTitle:e.titleTemplate},n=JSON.stringify(i);this._validations[n]||(this._validations[n]=i,i.sqref=[]),this._validations[n].sqref.push(t)}}),te={greaterThanOrEqualTo:"greaterThanOrEqual",lessThanOrEqualTo:"lessThanOrEqual"},ie={number:"decimal"},ne={General:0,0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49,"[$-404]e/m/d":27,"m/d/yy":30,t0:59,"t0.00":60,"t#,##0":61,"t#,##0.00":62,"t0%":67,"t0.00%":68,"t# ?/?":69,"t# ??/??":70},oe=kendo.Class.extend({init:function(e){var t=this;this.options=e||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._borders=[],this._sheets=z(this.options.sheets||[],function(e){return e.defaults=t.options,new ee(e,t._strings,t._styles,t._borders)})},toZIP:function(){var e,t,i,n,o,r,a,l,c,d,u,h,m,g,v,b,w,y=this,k=B(),x=k.folder("docProps");for(x.file("core.xml",j({creator:this.options.creator||"Kendo UI",lastModifiedBy:this.options.creator||"Kendo UI",created:this.options.date||(new Date).toJSON(),modified:this.options.date||(new Date).toJSON()})),e=this._sheets.length,x.file("app.xml",G({sheets:this._sheets})),t=k.folder("_rels"),t.file(".rels",q),i=k.folder("xl"),n=i.folder("_rels"),n.file("workbook.xml.rels",Q({count:e})),o={},i.file("workbook.xml",K({sheets:this._sheets,filterNames:z(this._sheets,function(e,t){var i,n,r,s,a=e.options,l=a.name||a.title||"Sheet"+(t+1);if(o[l.toLowerCase()]=t,i=a.filter){if(i.ref)return n=i.ref.split(":"),r=D(n[0]),s=D(n[1]),{localSheetId:t,name:l,from:p(r.row,r.col),to:p(s.row,s.col)};if(void 0!==i.from&&void 0!==i.to)return{localSheetId:t,name:l,from:p(f(a),i.from),to:p(f(a),i.to)}}}),userNames:z(this.options.names||[],function(e){return{name:e.localName,localSheetId:e.sheet?o[e.sheet.toLowerCase()]:null,value:e.value,hidden:e.hidden}})})),r=i.folder("worksheets"),a=r.folder("_rels"),l=0;l<e;l++)c=y._sheets[l],d="sheet"+(l+1)+".xml",u=c.relsToXML(),u&&a.file(d+".rels",u),r.file(d,c.toXML(l));return h=z(this._borders,W),m=z(this._styles,W),g=function(e){return e.underline||e.bold||e.italic||e.color||e.fontFamily||e.fontSize},v=z(m,function(e){if(e.color&&(e.color=_(e.color)),g(e))return e}),b=z(m,function(e){if(e.format&&void 0===ne[e.format])return e}),w=z(m,function(e){if(e.background)return e.background=_(e.background),e}),i.file("styles.xml",J({fonts:v,fills:w,formats:b,borders:h,styles:z(m,function(e){var t={};return g(e)&&(t.fontId=s(e,v)+1),e.background&&(t.fillId=s(e,w)+2),t.textAlign=e.textAlign,t.verticalAlign=e.verticalAlign,t.wrap=e.wrap,t.borderId=e.borderId,e.format&&(t.numFmtId=void 0!==ne[e.format]?ne[e.format]:165+s(e,b)),t})})),i.file("sharedStrings.xml",Z(this._strings)),k.file("[Content_Types].xml",$({count:e})),k},toDataURL:function(){var e=this.toZIP();return e.generateAsync?e.generateAsync(V).then(r):r(e.generate(V))}}),re={},se=function(e){var t=e.ref,i=e.columns,n=e.generators;return'\n<autoFilter ref="'+t+'">\n  '+c(i,function(e){return'\n    <filterColumn colId="'+e.index+'">\n      '+n[e.filter](e)+"\n    </filterColumn>\n  "})+"\n</autoFilter>"},ae=function(e){var t=e.logic,i=e.criteria;return"\n<customFilters "+("and"===t?'and="1"':"")+">\n"+c(i,function(e){var t=F.customOperator(e),i=F.customValue(e);return"<customFilter "+(t?'operator="'+t+'"':"")+' val="'+i+'"/>'})+"\n</customFilters>"},le=function(e){var t=e.type;return'<dynamicFilter type="'+F.dynamicFilterType(t)+'" />'},ce=function(e){var t=e.type,i=e.value;return'<top10 percent="'+(/percent$/i.test(t)?1:0)+'"\n       top="'+(/^top/i.test(t)?1:0)+'"\n       val="'+i+'" />'},de=function(e){var t=e.blanks,i=e.values;return"<filters "+(t?'blank="1"':"")+">\n    "+c(i,function(e){return'\n      <filter val="'+e+'" />'})+"\n  </filters>"},F.customOperator=function(e){return{eq:"equal",gt:"greaterThan",gte:"greaterThanOrEqual",lt:"lessThan",lte:"lessThanOrEqual",ne:"notEqual",doesnotstartwith:"notEqual",doesnotendwith:"notEqual",doesnotcontain:"notEqual",doesnotmatch:"notEqual"}[e.operator.toLowerCase()]},F.customValue=function(e){function t(e){return e.replace(/([*?])/g,"~$1")}switch(e.operator.toLowerCase()){case"startswith":case"doesnotstartwith":return t(e.value)+"*";case"endswith":case"doesnotendwith":return"*"+t(e.value);case"contains":case"doesnotcontain":return"*"+t(e.value)+"*";default:return e.value}},F.dynamicFilterType=function(e){return{quarter1:"Q1",quarter2:"Q2",quarter3:"Q3",quarter4:"Q4",january:"M1",february:"M2",march:"M3",april:"M4",may:"M5",june:"M6",july:"M7",august:"M8",september:"M9",october:"M10",november:"M11",december:"M12"}[e.toLowerCase()]||e},kendo.deepExtend(kendo.ooxml,{IntlService:H,Workbook:oe,Worksheet:ee})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("ooxml/main.min",["kendo.core.min","ooxml/kendo-ooxml.min"],e)}(function(){!function(e){var t=kendo.ooxml.Workbook;kendo.ooxml.IntlService.register({toString:kendo.toString}),kendo.ooxml.Workbook=t.extend({toDataURL:function(){var e=t.fn.toDataURL.call(this);if("string"!=typeof e)throw Error("The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.");return e},toDataURLAsync:function(){var i=e.Deferred(),n=t.fn.toDataURL.call(this);return"string"==typeof n?n=i.resolve(n):n&&n.then&&n.then(function(e){i.resolve(e)},function(){i.reject()}),i.promise()}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.ooxml.min",["ooxml/main.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("excel/kendo-excel.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e.title+": "+e.value}function i(e,t){var i,n=[];for(i=0;i<e;i++)n.push(t(i));return n}var n,o,r,s,a;window.kendo.excel=window.kendo.excel||{},n=kendo.getter,o=e.map,r={compile:function(e){return e}},s=kendo.Class.extend({}),s.register=function(e){r=e},s.compile=function(e){return r.compile(e)},a=kendo.Class.extend({init:function(e){e.columns=this._trimColumns(e.columns||[]),this.allColumns=o(this._leafColumns(e.columns||[]),this._prepareColumn),this.columns=this.allColumns.filter(function(e){return!e.hidden}),this.options=e,this.data=e.data||[],this.aggregates=e.aggregates||{},this.groups=[].concat(e.groups||[]),this.hierarchy=e.hierarchy},workbook:function(){var e={sheets:[{columns:this._columns(),rows:this.hierarchy?this._hierarchyRows():this._rows(),freezePane:this._freezePane(),filter:this._filter()}]};return e},_trimColumns:function(e){var t=this;return e.filter(function(e){var i=!!e.field;return!i&&e.columns&&(i=t._trimColumns(e.columns).length>0),i})},_leafColumns:function(e){var t,i=this,n=[];for(t=0;t<e.length;t++)e[t].columns?n=n.concat(i._leafColumns(e[t].columns)):n.push(e[t]);return n},_prepareColumn:function(i){var o,r;return i.field?(o=function(e){return n(i.field,!0)(e)},r=null,i.values&&(r={},i.values.forEach(function(e){r[e.value]=e.text}),o=function(e){return r[n(i.field,!0)(e)]}),e.extend({},i,{value:o,values:r,groupHeaderTemplate:i.groupHeaderTemplate?s.compile(i.groupHeaderTemplate):t,groupFooterTemplate:i.groupFooterTemplate?s.compile(i.groupFooterTemplate):null,footerTemplate:i.footerTemplate?s.compile(i.footerTemplate):null})):null},_filter:function(){if(!this.options.filterable)return null;var e=this._depth();return{from:e,to:e+this.columns.length-1}},_createPaddingCells:function(t){var n=this;return i(t,function(){return e.extend({background:"#dfdfdf",color:"#333"},n.options.paddingCellOptions)})},_dataRow:function(t,i,n){var o,r,s,a,l,c,d,u,h=this,p=this._createPaddingCells(i);if(n&&t.items)return o=this.allColumns.filter(function(e){return e.field===t.field})[0],r=o&&o.title?o.title:t.field,s=o?o.groupHeaderTemplate:null,a=e.extend({title:r,field:t.field,value:o&&o.values?o.values[t.value]:t.value,aggregates:t.aggregates,items:t.items},t.aggregates[t.field]),l=r+": "+t.value,s&&(l=s(a)),p.push(e.extend({value:l,background:"#dfdfdf",color:"#333",colSpan:this.columns.length+n-i},(o||{}).groupHeaderCellOptions)),c=this._dataRows(t.items,i+1),c.unshift({type:"group-header",cells:p}),c.concat(this._footer(t));for(d=[],u=0;u<this.columns.length;u++)d[u]=h._cell(t,h.columns[u]);return this.hierarchy&&(d[0].colSpan=n-i+1),[{type:"data",cells:p.concat(d)}]},_dataRows:function(e,t){var i,n=this,o=this._depth(),r=[];for(i=0;i<e.length;i++)r.push.apply(r,n._dataRow(e[i],t,o));return r},_hierarchyRows:function(){var e,t,i,n,o,r=this,s=this._depth(),a=this.data,l=this.hierarchy.itemLevel,c=this._hasFooterTemplate(),d=[],u=[],h=0;for(t=0;t<a.length;t++)i=a[t],n=l(i),c&&(n>h?u.push({id:e,level:h}):n<h&&d.push.apply(d,r._hierarchyFooterRows(u,n,s)),h=n,e=i.id),d.push.apply(d,r._dataRow(i,n+1,s));return c&&(d.push.apply(d,this._hierarchyFooterRows(u,0,s)),o=a.length?this.aggregates[a[0].parentId]:{},d.push(this._hierarchyFooter(o,0,s))),this._prependHeaderRows(d),d},_hierarchyFooterRows:function(e,t,i){for(var n,o=this,r=[];e.length&&e[e.length-1].level>=t;)n=e.pop(),r.push(o._hierarchyFooter(o.aggregates[n.id],n.level+1,i));return r},_hasFooterTemplate:function(){var e,t=this.columns;for(e=0;e<t.length;e++)if(t[e].footerTemplate)return!0},_hierarchyFooter:function(t,i,n){var o=this.columns.map(function(o,r){var s=r?1:n-i+1;return o.footerTemplate?e.extend({background:"#dfdfdf",color:"#333",colSpan:s,value:o.footerTemplate(e.extend({},(t||{})[o.field]))},o.footerCellOptions):e.extend({background:"#dfdfdf",color:"#333",colSpan:s},o.footerCellOptions)});return{type:"footer",cells:this._createPaddingCells(i).concat(o)}},_footer:function(t){var i,n,o,r=[],s=this.columns.some(function(e){return e.groupFooterTemplate});return s&&(n={group:{items:t.items,field:t.field,value:t.value}},i={},Object.keys(t.aggregates).forEach(function(o){i[o]=e.extend({},t.aggregates[o],n)})),o=this.columns.map(function(o){if(o.groupFooterTemplate){var r=e.extend({},i,t.aggregates[o.field],n);return e.extend({background:"#dfdfdf",color:"#333",value:o.groupFooterTemplate(r)},o.groupFooterCellOptions)}return e.extend({background:"#dfdfdf",color:"#333"},o.groupFooterCellOptions)}),s&&r.push({type:"group-footer",cells:this._createPaddingCells(this.groups.length).concat(o)}),r},_isColumnVisible:function(e){return this._visibleColumns([e]).length>0&&(e.field||e.columns)},_visibleColumns:function(e){var t=this;return e.filter(function(e){var i=!e.hidden;return i&&e.columns&&(i=t._visibleColumns(e.columns).length>0),i})},_headerRow:function(t,n){var o=this,r=t.cells.map(function(i){return e.extend(i,{colSpan:i.colSpan>1?i.colSpan:1,rowSpan:t.rowSpan>1&&!i.colSpan?t.rowSpan:1})});return this.hierarchy&&(r[0].colSpan=this._depth()+1),{type:"header",cells:i(n.length,function(){return e.extend({background:"#7a7a7a",color:"#fff"},o.options.headerPaddingCellOptions)}).concat(r)}},_prependHeaderRows:function(e){var t,i=this,n=this.groups,o=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(o,this.options.columns),t=o.length-1;t>=0;t--)e.unshift(i._headerRow(o[t],n))},_prepareHeaderRows:function(t,i,n,o){var r,s,a,l=this,c=o||t[t.length-1],d=t[c.index+1],u=0;for(r=0;r<i.length;r++)s=i[r],l._isColumnVisible(s)&&(a=e.extend({background:"#7a7a7a",color:"#fff",value:s.title||s.field,colSpan:0},s.headerCellOptions),c.cells.push(a),s.columns&&s.columns.length&&(d||(d={rowSpan:0,cells:[],index:t.length},t.push(d)),a.colSpan=l._trimColumns(l._visibleColumns(s.columns)).length,l._prepareHeaderRows(t,s.columns,a,d),u+=a.colSpan-1,c.rowSpan=t.length-c.index));n&&(n.colSpan+=u)},_rows:function(){var t,i,n=this,o=this._dataRows(this.data,0);return this.columns.length&&(this._prependHeaderRows(o),t=!1,i=this.columns.map(function(i){return i.footerTemplate?(t=!0,e.extend({background:"#dfdfdf",color:"#333",value:i.footerTemplate(e.extend({},n.aggregates,n.aggregates[i.field]))},i.footerCellOptions)):e.extend({background:"#dfdfdf",color:"#333"},i.footerCellOptions)}),t&&o.push({type:"footer",cells:this._createPaddingCells(this.groups.length).concat(i)})),o},_headerDepth:function(e){var t,i,n=this,o=1,r=0;for(t=0;t<e.length;t++)e[t].columns&&(i=n._headerDepth(e[t].columns),i>r&&(r=i));return o+r},_freezePane:function(){var e=this._visibleColumns(this.options.columns||[]),t=this._visibleColumns(this._trimColumns(this._leafColumns(e.filter(function(e){return e.locked})))).length;return{rowSplit:this._headerDepth(e),colSplit:t?t+this.groups.length:0}},_cell:function(t,i){return e.extend({value:i.value(t)},i.cellOptions)},_depth:function(){var e=0;return e=this.hierarchy?this.hierarchy.depth:this.groups.length},_columns:function(){var e=this._depth(),t=i(e,function(){return{width:20}});return t.concat(this.columns.map(function(e){return{width:parseInt(e.width,10),autoWidth:!e.width}}))}}),kendo.deepExtend(kendo.excel,{ExcelExporter:a,TemplateService:s})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("excel/main.min",["kendo.core.min","kendo.data.min","excel/kendo-excel.min"],e)}(function(){return function(e,t){var i=t.excel.ExcelExporter,n=e.extend;t.excel.TemplateService.register({compile:t.template}),t.ExcelExporter=t.Class.extend({init:function(e){var i,o,r;this.options=e,i=e.dataSource,i instanceof t.data.DataSource?(i.filter()||(i.options.filter=void 0),this.dataSource=new i.constructor(n({},i.options,{page:e.allPages?0:i.page(),filter:i.filter(),pageSize:e.allPages?i.total():i.pageSize()||i.total(),sort:i.sort(),group:i.group(),aggregate:i.aggregate()})),o=i.data(),o.length>0&&(this.dataSource._data=o,r=this.dataSource.transport,i._isServerGrouped()&&r.options&&r.options.data&&(r.options.data=null))):this.dataSource=t.data.DataSource.create(i)},_hierarchy:function(){var e,t,i,n,o=this.options.hierarchy,r=this.dataSource;if(o&&r.level){for(o={itemLevel:function(e){return r.level(e)}},e=r.view(),t=0,n=0;n<e.length;n++)i=r.level(e[n]),i>t&&(t=i);o.depth=t+1}else o=!1;return{hierarchy:o}},workbook:function(){return e.Deferred(e.proxy(function(t){this.dataSource.fetch().then(e.proxy(function(){var e=new i(n({},this.options,this._hierarchy(),{data:this.dataSource.view(),groups:this.dataSource.group(),aggregates:this.dataSource.aggregates()})).workbook();t.resolve(e,this.dataSource.view())},this))},this)).promise()}})}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("excel/mixins.min",["excel/main.min","kendo.ooxml.min"],e)}(function(){return function(e,t){t.ExcelMixin={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",allPages:!1,filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var i=this.options.excel||{},n=new t.ExcelExporter({columns:this.columns,dataSource:this.dataSource,allPages:i.allPages,filterable:i.filterable,hierarchy:i.hierarchy});n.workbook().then(e.proxy(function(e,n){if(!this.trigger("excelExport",{workbook:e,data:n})){var o=new t.ooxml.Workbook(e);o.toDataURLAsync().then(function(n){t.saveAs({dataURI:n,fileName:e.fileName||i.fileName,proxyURL:i.proxyURL,forceProxy:i.forceProxy})})}},this))}}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.excel.min",["excel/main.min","excel/mixins.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.data.signalr.min",["kendo.data.min"],e)}(function(){return function(e){function t(e){return e&&o(e.done)&&o(e.fail)}function i(e){return e&&o(e.then)&&o(e["catch"])}var n=window.kendo,o=n.isFunction,r=n.data.RemoteTransport.extend({init:function(e){var o,r=e&&e.signalr?e.signalr:{},s=r.promise;if(!s)throw Error('The "promise" option must be set.');if(!t(s)&&!i(s))throw Error('The "promise" option must be a Promise.');if(this.promise=s,o=r.hub,!o)throw Error('The "hub" option must be set.');if("function"!=typeof o.on||"function"!=typeof o.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=o,n.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(o,r){var s,a,l=this.hub,c=this.promise,d=this.options.signalr.server;if(!d||!d[r])throw Error(n.format('The "server.{0}" option must be set.',r));s=[d[r]],a=this.parameterMap(o.data,r),e.isEmptyObject(a)||s.push(a),t(c)?c.done(function(){l.invoke.apply(l,s).done(o.success).fail(o.error)}):i(c)&&c.then(function(){l.invoke.apply(l,s).then(o.success)["catch"](o.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,n.data,{transports:{signalr:r}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("drawing/util.min",["kendo.core.min"],e)}(function(){return function(e){function t(){return e.Deferred()}function i(t){return e.when.apply(e,t)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:t,promiseAll:i})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.color.min",["kendo.core.min"],e)}(function(){function e(e,t,i){void 0===i&&(i="0");for(var n=e.toString(16);t>n.length;)n=i+n;return n}function t(e,t,i){var n=i;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i(e,t){var n,o,s;if(null==e||"none"===e)return null;if(e instanceof l)return e;if(s=e.toLowerCase(),n=a(s))return s="transparent"===n[1]?new c(1,1,1,0):i(r[n[1]],t),s.match=[n[1]],s;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(s))?o=new d(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(s))?o=new d(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(s))?o=new d(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(s))?o=new d(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(s))?o=new c(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(s))&&(o=new c(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4]))),o)o.match=n;else if(!t)throw Error("Cannot parse color: "+s);return o}var n,o,r,s,a,l,c,d,u,h,p;window.kendo=window.kendo||{},n=kendo.Class,o=kendo.support,r={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"},s=o.browser,a=function(e){var t,i=Object.keys(r);return i.push("transparent"),t=RegExp("^("+i.join("|")+")(\\W|$)","i"),a=function(e){return t.exec(e)},t.exec(e)},l=n.extend({init:function(){},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+", "+parseFloat((+this.a).toFixed(3))+")"},toDisplay:function(){return s.msie&&s.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()===i(e).toCssRgba()},diff:function(e){var t,i;return null===e?NaN:(t=this.toBytes(),i=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-i.r),2)+Math.pow(.59*(t.g-i.g),2)+Math.pow(.11*(t.b-i.b),2)))},clone:function(){var e=this.toBytes();return e===this&&(e=new d(e.r,e.g,e.b,e.a)),e}}),c=l.extend({init:function(e,t,i,n){l.fn.init.call(this),this.r=e,this.g=t,this.b=i,this.a=n},toHSV:function(){var e,t,i=this,n=i.r,o=i.g,r=i.b,s=Math.min(n,o,r),a=Math.max(n,o,r),l=a-s,c=a;return 0===l?new u(0,0,c,this.a):(0!==a?(t=l/a,e=n===a?(o-r)/l:o===a?2+(r-n)/l:4+(n-o)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new u(e,t,c,this.a))},toHSL:function(){var e,t,i,n=this,o=n.r,r=n.g,s=n.b,a=Math.max(o,r,s),l=Math.min(o,r,s),c=(a+l)/2;if(a===l)e=t=0;else{switch(i=a-l,t=c>.5?i/(2-a-l):i/(a+l),a){case o:e=(r-s)/i+(r<s?6:0);break;case r:e=(s-o)/i+2;break;case s:e=(o-r)/i+4}e*=60,t*=100,c*=100}return new h(e,t,c,this.a)},toBytes:function(){return new d(255*this.r,255*this.g,255*this.b,this.a)}}),d=c.extend({init:function(e,t,i,n){c.fn.init.call(this,Math.round(e),Math.round(t),Math.round(i),n)},toRGB:function(){return new c(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHSL:function(){return this.toRGB().toHSL()},toHex:function(){return e(this.r,2)+e(this.g,2)+e(this.b,2)},toBytes:function(){return this}}),u=l.extend({init:function(e,t,i,n){l.fn.init.call(this),this.h=e,this.s=t,this.v=i,this.a=n},toRGB:function(){var e,t,i,n,o,r,s,a,l=this,d=l.h,u=l.s,h=l.v;if(0===u)e=t=i=h;else switch(d/=60,n=Math.floor(d),o=d-n,r=h*(1-u),s=h*(1-u*o),a=h*(1-u*(1-o)),n){case 0:e=h,t=a,i=r;break;case 1:e=s,t=h,i=r;break;case 2:e=r,t=h,i=a;break;case 3:e=r,t=s,i=h;break;case 4:e=a,t=r,i=h;break;default:e=h,t=r,i=s}return new c(e,t,i,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),h=l.extend({init:function(e,t,i,n){l.fn.init.call(this),this.h=e,this.s=t,this.l=i,this.a=n},toRGB:function(){var e,i,n,o,r,s=this,a=s.h,l=s.s,d=s.l;return 0===l?e=i=n=d/100:(a/=360,l/=100,d/=100,o=d<.5?d*(1+l):d+l-d*l,r=2*d-o,e=t(r,o,a+1/3),i=t(r,o,a),n=t(r,o,a-1/3)),new c(e,i,n,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}}),p=n.extend({init:function(e){var t,i,n,o,r,s,a,l=this;if(1===arguments.length)for(t=p.formats,i=this.resolveColor(e),n=0;n<t.length;n++)o=t[n].re,r=t[n].process,s=o.exec(i),s&&(a=r(s),l.r=a[0],l.g=a[1],l.b=a[2]);else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)},toHex:function(){var e=this.padDigit,t=this.r.toString(16),i=this.g.toString(16),n=this.b.toString(16);return"#"+e(t)+e(i)+e(n)},resolveColor:function(e){var t=e||"black";return"#"===t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase(),t=p.namedColors[t]||t},normalizeByte:function(e){return e<0||isNaN(e)?0:e>255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this},percBrightness:function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}}),p.fromBytes=function(e,t,i,n){return new d(e,t,i,null!=n?n:1)},p.fromRGB=function(e,t,i,n){return new c(e,t,i,null!=n?n:1)},p.fromHSV=function(e,t,i,n){return new u(e,t,i,null!=n?n:1)},p.fromHSL=function(e,t,i,n){return new h(e,t,i,null!=n?n:1)},p.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],p.namedColors=r,kendo.deepExtend(kendo,{parseColor:i,Color:p})},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("util/text-metrics.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return(e+"").replace(a,l)}function i(e){var t,i=[];for(t in e)i.push(t+e[t]);return i.sort().join("")}function n(e){var t,i=2166136261;for(t=0;t<e.length;++t)i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24),i^=e.charCodeAt(t);return i>>>0}function o(){return{width:0,height:0,baseline:0}}function r(e,t,i){return u.current.measure(e,t,i)}var s,a,l,c,d,u;window.kendo.util=window.kendo.util||{},s=kendo.Class.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var i=this._map,n={key:e,value:t};i[e]=n,this._head?(this._tail.newer=n,n.older=this._tail,this._tail=n):this._head=this._tail=n,this._length>=this._size?(i[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(e){var t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}}),a=/\r?\n|\r|\t/g,l=" ",c={baselineMarkerSize:1},"undefined"!=typeof document&&(d=document.createElement("div"),d.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"),u=kendo.Class.extend({init:function(t){this._cache=new s(1e3),this.options=e.extend({},c,t)},measure:function(e,r,s){var a,l,c,u,h,p,f,m,g;if(void 0===s&&(s={}),!e)return o();if(a=i(r),l=n(e+a),c=this._cache.get(l))return c;u=o(),h=s.box||d,p=this._baselineMarker().cloneNode(!1);for(f in r)m=r[f],void 0!==m&&(h.style[f]=m);return g=s.normalizeText!==!1?t(e):e+"",h.textContent=g,h.appendChild(p),document.body.appendChild(h),g.length&&(u.width=h.offsetWidth-this.options.baselineMarkerSize,u.height=h.offsetHeight,u.baseline=p.offsetTop+this.options.baselineMarkerSize),u.width>0&&u.height>0&&this._cache.put(l,u),h.parentNode.removeChild(h),u},_baselineMarker:function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e}}),u.current=new u,kendo.deepExtend(kendo.util,{LRUCache:s,TextMetrics:u,measureText:r,objectKey:i,hashKey:n,normalizeText:t})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("drawing/kendo-drawing.min",["drawing/util.min","kendo.color.min","util/text-metrics.min"],e)}(function(){!function(e){function t(e,t){return e.push.apply(e,t),e}function i(e){for(var t=[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;)e<t[0]?t.shift():(i+=Qt[t[0]],e-=t[0]);return i}function n(e){return typeof e!==Xt}function o(){return"kdef"+Zt++}function r(e){return e/Jt}function s(e){var t,i,n="";for(t=0;t<e.length;t++)i=e.charCodeAt(t),i<128?n+=ni(i):i<2048?(n+=ni(192|i>>>6),n+=ni(128|63&i)):i<65536&&(n+=ni(224|i>>>12),n+=ni(128|i>>>6&63),n+=ni(128|63&i));return n}function a(e){for(var t,i,n,o,r,a,l,c="",d=0,u=s(e);d<u.length;)t=u.charCodeAt(d++),i=u.charCodeAt(d++),n=u.charCodeAt(d++),o=t>>2,r=(3&t)<<4|i>>4,a=(15&i)<<2|n>>6,l=63&n,isNaN(i)?a=l=64:isNaN(n)&&(l=64),c=c+ii.charAt(o)+ii.charAt(r)+ii.charAt(a)+ii.charAt(l);return c}function l(e){return n((e.x||{}).location)?{x:e.x.location,y:e.y.location}:{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}}function c(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function d(e){return""===e||null===e||"none"===e||"transparent"===e||!n(e)}function u(e){if(e)return e[e.length-1]}function h(e,t,i){return Math.max(Math.min(e,i),t)}function p(e,t){function i(e,i){for(var n=[],o=0,r=0,s=0;o<e.length&&r<i.length;)t(e[o],i[r])<=0?n[s++]=e[o++]:n[s++]=i[r++];return o<e.length&&n.push.apply(n,e.slice(o)),r<i.length&&n.push.apply(n,i.slice(r)),
n}return e.length<2?e.slice():function n(e){var t,o,r;return e.length<=1?e:(t=Math.floor(e.length/2),o=e.slice(0,t),r=e.slice(t),o=n(o),r=n(r),i(o,r))}(e)}function f(e){return e*Jt}function m(e){return e?Math.pow(10,e):1}function g(e,t){var i=m(t);return Math.round(e*i)/i}function v(e,t){return n(e)?e:t}function _(e,t){var i,n,o;for(i in t)for(n=i.trim().split(" "),o=0;o<n.length;o++)e.addEventListener(n[o],t[i],!1)}function b(e){var t=e.getBoundingClientRect(),i=document.documentElement;return{top:t.top+(window.pageYOffset||i.scrollTop)-(i.clientTop||0),left:t.left+(window.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}}function w(e,t){var i,n,o={},r=window.getComputedStyle(e)||{},s=Array.isArray(t)?t:[t];for(i=0;i<s.length;i++)n=s[i],o[n]=r[n];return o}function y(e){return isNaN(e)?e:e+"px"}function k(e,t){var i,o,r;return t?(i=t.width,o=t.height,n(i)&&(e.style.width=y(i)),n(o)&&(e.style.height=y(o)),void 0):(r=w(e,["width","height"]),{width:parseInt(r.width,10),height:parseInt(r.height,10)})}function x(e,t){var i,n,o;void 0===t&&(t={});for(i in t)for(n=i.trim().split(" "),o=0;o<n.length;o++)e.removeEventListener(n[o],t[i],!1)}function C(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function S(e){return function(){return this[e]}}function T(e,t){var i,n,o;for(i=0;i<t.length;i++)n=t[i],o=n.charAt(0).toUpperCase()+n.substring(1,n.length),e["set"+o]=C(n),e["get"+o]=S(n)}function D(e){return e&&"function"==typeof e.matrix?e.matrix():e}function A(e){return null===e?null:e instanceof ui?e:new ui(e)}function E(e,t,i,n){var o=0,r=0;return n&&(o=Math.atan2(n.c*i,n.a*t),0!==n.b&&(r=Math.atan2(n.d*i,n.b*t))),{x:o,y:r}}function I(e){var t="_"+e;return function(e){return n(e)?(this._observerField(t,e),this.geometryChange(),this):this[t]}}function M(e,t){for(var i=0;i<t.length;i++)e[t[i]]=I(t[i])}function R(e,t,i){return void 0===i&&(i=yi),0===g(Math.abs(e-t),i)}function F(e,t,i){return e<t||R(e,t,i)}function P(e,t,i,n){var o=t.x-e.x,r=n.x-i.x,s=t.y-e.y,a=n.y-i.y,l=e.x-i.x,c=e.y-i.y,d=o*a-r*s,u=(o*c-s*l)/d,h=(r*c-a*l)/d;if(u>=0&&u<=1&&h>=0&&h<=1)return new li(e.x+h*o,e.y+h*s)}function z(e,t,i,n,o,s){var a=g((o-e)/i,3),l=g((s-t)/n,3);return g(r(Math.atan2(l,a)))}function B(e){var t,i,n,o,s,a,l,c,d,u,h,p,m,v,_,b,w,y,k,x,C,S,T,D,A,E=e.x1,I=e.y1,M=e.x2,R=e.y2,F=e.rx,P=e.ry,z=e.largeArc,B=e.swipe,L=e.rotation;return void 0===L&&(L=0),t=f(L),i=Math.cos(t),n=Math.sin(t),o=i*(E-M)/2+n*(I-R)/2,s=-n*(E-M)/2+i*(I-R)/2,a=z!==B?1:-1,l=Math.pow(o,2),c=Math.pow(s,2),d=Math.pow(F,2),u=Math.pow(P,2),h=l/d+c/u,h>1&&(h=Math.sqrt(l/d+c/u),F=h*F,d=Math.pow(F,2),P=h*P,u=Math.pow(P,2)),p=a*Math.sqrt((d*u-d*c-u*l)/(d*c+u*l)),isNaN(p)&&(p=0),m=p*(F*s)/P,v=-p*(P*o)/F,_=i*m-n*v+(E+M)/2,b=n*m+i*v+(I+R)/2,w=(o-m)/F,y=(s-v)/P,k=-(o+m)/F,x=-(s+v)/P,C=(y>=0?1:-1)*r(Math.acos(w/Math.sqrt(w*w+y*y))),S=g((w*k+y*x)/(Math.sqrt(w*w+y*y)*Math.sqrt(k*k+x*x)),10),T=(w*x-y*k>=0?1:-1)*r(Math.acos(S)),!B&&T>0&&(T-=360),B&&T<0&&(T+=360),D=C+T,A=D>=0?1:-1,D=Math.abs(D)%360*A,{center:new li(_,b),startAngle:C,endAngle:D,radiusX:F,radiusY:P,xRotation:L}}function L(e,t){for(var i=e;i<t;)i+=90;return i}function H(e){var t="_"+e;return function(e){return n(e)?(this._observerField(t,li.create(e)),this.geometryChange(),this):this[t]}}function N(e,t){for(var i=0;i<t.length;i++)e[t[i]]=H(t[i])}function O(e,t,i){var n=r(Math.atan2(t.y-e.y,t.x-e.x)),o=i.transformCopy(A().rotate(-n,e));return o.x<e.x}function V(e,t,i){var n=1-e;return Math.pow(n,3)*i[0][t]+3*Math.pow(n,2)*e*i[1][t]+3*Math.pow(e,2)*n*i[2][t]+Math.pow(e,3)*i[3][t]}function W(e,t){return[-e[0][t]+3*e[1][t]-3*e[2][t]+e[3][t],3*(e[0][t]-2*e[1][t]+e[2][t]),3*(-e[0][t]+e[1][t]),e[0][t]]}function U(e){return e<0?-1:1}function q(e,t,i){var n=Math.sqrt(Math.pow(t,2)-4*e*i);return[(-t+n)/(2*e),(-t-n)/(2*e)]}function j(e,t,i,n){var o,r,s,a,l,c,d,u,h,p,f,m,v;return 0===e?q(t,i,n):(o=(3*e*i-Math.pow(t,2))/(3*Math.pow(e,2)),r=(2*Math.pow(t,3)-9*e*t*i+27*Math.pow(e,2)*n)/(27*Math.pow(e,3)),s=Math.pow(o/3,3)+Math.pow(r/2,2),a=new Fi(0,1),l=-t/(3*e),s<0?(c=new Fi(-r/2,Math.sqrt(-s)).nthRoot(3),d=new Fi(-r/2,(-Math.sqrt(-s))).nthRoot(3)):(c=-r/2+Math.sqrt(s),c=new Fi(U(c)*Math.pow(Math.abs(c),1/3)),d=-r/2-Math.sqrt(s),d=new Fi(U(d)*Math.pow(Math.abs(d),1/3))),u=c.add(d),f=c.add(d).multiplyConstant(-.5),m=c.add(d.negate()).multiplyConstant(Math.sqrt(3)/2),h=f.add(a.multiply(m)),p=f.add(a.negate().multiply(m)),v=[],u.isReal()&&v.push(g(u.real+l,yi)),h.isReal()&&v.push(g(h.real+l,yi)),p.isReal()&&v.push(g(p.real+l,yi)),v)}function G(e,t,i,n,o){var r,s,a=W(e,n),l=j(a[0],a[1],a[2],a[3]-t[n]);for(s=0;s<l.length;s++)if(0<=l[s]&&l[s]<=1&&(r=V(l[s],i,e),Math.abs(r-t[i])<=o))return!0}function $(e,t,i){var n,o,r,s=W(e,"x"),a=j(s[0],s[1],s[2],s[3]-t.x),l=0;for(r=0;r<a.length;r++)n=V(a[r],"y",e),o=R(n,t.y)||n>t.y,o&&((0===a[r]||1===a[r])&&i.bottomRight().x>t.x||0<a[r]&&a[r]<1)&&l++;return l}function K(e,t,i){var n,o,r,s,a,l;return e.x!==t.x&&(o=Math.min(e.x,t.x),r=Math.max(e.x,t.x),s=Math.min(e.y,t.y),a=Math.max(e.y,t.y),l=o<=i.x&&i.x<r,n=s===a?i.y<=s&&l:l&&(a-s)*((e.x-t.x)*(e.y-t.y)>0?i.x-o:r-i.x)/(r-o)+s-i.y>=0),n?1:0}function Y(e){var t,i=e.length,n=ei,o=ti;for(t=0;t<i;t++)o=Math.max(o,e[t]),n=Math.min(n,e[t]);return{min:n,max:o}}function Q(e,t,i){var n,o,r,s;for(o=0;o<e.length;o++)r=e[o],r.visible()&&(s=t?r.bbox(i):r.rawBBox(),s&&(n=n?di.union(n,s):s));return n}function X(e,t){var i,n,o,r;for(n=0;n<e.length;n++)o=e[n],o.visible()&&(r=o.clippedBBox(t),r&&(i=i?di.union(i,r):r));return i}function Z(e,t,i){var n,o=t?0:1;for(n=0;n<e.length;n+=2)e.splice(n+o,0,i)}function J(e,t){if(e&&t)return t.scaleCopy(2).translate(-e.x,-e.y)}function ee(e,t,i){var n=t.clone().scale(2/3);return{controlOut:n.clone().translateWith(e.scaleCopy(Li)),controlIn:n.translateWith(i.scaleCopy(Li))}}function te(e){var t=[];return e.replace(Ni,function(e,i){t.push(parseFloat(i))}),t}function ie(e,t,i){var n=i.transform()||A(),o=n.matrix();o.e+=e.x-t.origin.x,o.f+=e.y-t.origin.y,n.matrix(o),i.transform(n)}function ne(e,t,i,n,o){var r;return r="start"===i?t.origin[n]:"end"===i?t.origin[n]+t.size[o]-e:t.origin[n]+(t.size[o]-e)/2}function oe(e,t,i,n,o){var r;return r="start"===i?t.origin[n]+t.size[o]-e:"end"===i?t.origin[n]:t.origin[n]+(t.size[o]-e)/2}function re(e,t,i,n,o){var r,s,a;for(r=0;r<e.length;r++)s=e[r].clippedBBox(),s&&(a=s.origin.clone(),a[n]=ne(s.size[o],t,i||"start",n,o),ie(a,s,e[r]))}function se(e,t,i){re(e,t,i,"x","width")}function ae(e,t,i){re(e,t,i,"y","height")}function le(e,t,i,n){var o,r,s,a,l;if(e.length>1)for(o=new li,r=e[0].bbox,s=1;s<e.length;s++)a=e[s].element,l=e[s].bbox,o[t]=r.origin[t]+r.size[n],o[i]=l.origin[i],ie(o,l,a),l.origin[t]=o[t],r=l}function ce(e){var t,i,n,o=[];for(t=0;t<e.length;t++)i=e[t],n=i.clippedBBox(),n&&o.push({element:i,bbox:n});return o}function de(e){le(ce(e),"x","y","width")}function ue(e){le(ce(e),"y","x","height")}function he(e,t,i){var n,o,r,s,a=t.size[i],l=[],c=[],d=0,u=function(){c.push({element:n,bbox:o})};for(r=0;r<e.length;r++)n=e[r],o=n.clippedBBox(),o&&(s=o.size[i],d+s>a?c.length?(l.push(c),c=[],u(),d=s):(u(),l.push(c),c=[],d=0):(u(),d+=s));return c.length&&l.push(c),l}function pe(e,t,i,n,o){var r,s,a,l,c=he(e,t,o),d=t.origin.clone(),u=[];for(r=0;r<c.length;r++)for(s=c[r],a=s[0],d[n]=a.bbox.origin[n],ie(d,a.bbox,a.element),a.bbox.origin[i]=d[i],le(s,i,n,o),u.push([]),l=0;l<s.length;l++)u[r].push(s[l].element);return u}function fe(e,t){return pe(e,t,"x","y","width")}function me(e,t){return pe(e,t,"y","x","height")}function ge(e,t){var i,n,o,r,s=e.clippedBBox();s&&(i=s.size,n=t.size,(n.width<i.width||n.height<i.height)&&(o=Math.min(n.width/i.width,n.height/i.height),r=e.transform()||A(),r.scale(o,o),e.transform(r)))}function ve(e){return function(t){return n(t)?(this.options.set(e,t),this):this.options.get(e)}}function _e(e,t){for(var i=0;i<t.length;i++)e[t[i]]=ve(t[i])}function be(e){return.5-Math.cos(e*Math.PI)/2}function we(e){return e}function ye(e,t,i,n){var o=1.70158,r=0,s=n;return 0===e?i:1===e?i+n:(r||(r=.5),s<Math.abs(n)?(s=n,o=r/4):o=r/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*e)*Math.sin((+e-o)*(1.1*Math.PI)/r)+n+i)}function ke(e,t){return n(t)&&null!==t?" "+e+'="'+t+'" ':""}function xe(e){var t,i="";for(t=0;t<e.length;t++)i+=ke(e[t][0],e[t][1]);return i}function Ce(e){var t,i,o="";for(t=0;t<e.length;t++)i=e[t][1],n(i)&&(o+=e[t][0]+":"+i+";");if(""!==o)return o}function Se(e,t){return"clip"===e||"fill"===e&&(!t||"Gradient"===t.nodeType)}function Te(){var e,t=document.getElementsByTagName("base")[0],i=document.location.href,n="";return t&&!Gt.msie&&(e=i.indexOf("#"),e!==-1&&(i=i.substring(0,e)),n=i),n}function De(e){var t,i,n,o;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(r){}t&&(i=-t.e%1,n=-t.f%1,o=e.style,0===i&&0===n||(o.left=i+"px",o.top=n+"px"))}function Ae(e){if(!e||"string"!=typeof e||!Kn.test(e))return e;var t=Ae._element;return Kn.lastIndex=0,e.replace(Kn,function(e){return t.innerHTML=e,t.textContent||t.innerText})}function Ee(e){var t,i,n,o=new Pn({skipBaseHref:!0}),r=e.clippedBBox(),s=e;return r&&(t=r.getOrigin(),i=new Xi,i.transform(A().translate(-t.x,-t.y)),i.children.push(e),s=i),o.load([s]),n="<?xml version='1.0' ?><svg xmlns='"+_n+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+o.render()+"</svg>",o.destroy(),n}function Ie(e,t){var i,n,o,r,s,a,l=t.segments;if(0!==l.length){for(i=l[0],n=i.anchor(),e.moveTo(n.x,n.y),o=1;o<l.length;o++)i=l[o],n=i.anchor(),r=l[o-1],s=r.controlOut(),a=i.controlIn(),s&&a?e.bezierCurveTo(s.x,s.y,a.x,a.y,n.x,n.y):e.lineTo(n.x,n.y);t.options.closed&&e.closePath()}}function Me(e,t){return e._zIndex<t._zIndex?1:e._zIndex>t._zIndex?-1:0}function Re(e,t){var i,n,o;for(i=0;i<t.length;i++)n=t[i],o=kendo.parseColor(n.color()),o.a*=n.opacity(),e.addColorStop(n.offset(),o.toCssRgba())}function Fe(t,i){var n,o,r,s,a,l,c,d,u={width:"800px",height:"600px",cors:"Anonymous"},h=t,p=t.clippedBBox();return p&&(n=p.getOrigin(),h=new Xi,h.transform(A().translate(-n.x,-n.y)),h.children.push(t),o=p.getSize(),u.width=o.width+"px",u.height=o.height+"px"),r=e.extend(u,i),s=document.createElement("div"),a=s.style,a.display="none",a.width=r.width,a.height=r.height,document.body.appendChild(s),l=new ho(s,r),l.suspendTracking(),l.draw(h),c=l.image(),d=function(){l.destroy(),document.body.removeChild(s)},c.then(d,d),c}function Pe(e,t){var i=Ee(e);return t&&t.raw||(i="data:image/svg+xml;base64,"+a(i)),$t().resolve(i)}function ze(e){return Array.prototype.slice.call(e)}function Be(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Le(e,t){e.classList?e.classList.remove(t):e.className=e.className.split(/\s+/).reduce(function(e,i){return i!=t&&e.push(i),e},[]).join(" ")}function He(e,t){Object.keys(t).forEach(function(i){e.style[i]=t[i]})}function Ne(e,t){if(e.closest)return e.closest(t);for(;e&&!/^\[object (?:HTML)?Document\]$/.test(e+"");){if(1==e.nodeType&&Ao(e,t))return e;e=e.parentNode}}function Oe(e){return"number"==typeof e?{x:e,y:e}:Array.isArray(e)?{x:e[0],y:e[1]}:{x:e.x,y:e.y}}function Ve(e,t){function i(e){var i=new Xi,n=e.getBoundingClientRect();return gt(i,[s.x,0,0,s.y,-n.left*s.x,-n.top*s.y]),Co._clipbox=!1,Co._matrix=ai.unit(),Co._stackingContext={element:e,group:i},Co._avoidLinks=t.avoidLinks===!0?"a":t.avoidLinks,Be(e,"k-pdf-export"),Nt(e,i),Le(e,"k-pdf-export"),i}function n(e){if(null!=e)return"string"==typeof e&&(e=kendo.template(e.replace(/^\s+|\s+$/g,""))),"function"==typeof e?function(t){var i,n=e(t);return n&&"string"==typeof n&&(i=document.createElement("div"),i.innerHTML=n,n=i.firstElementChild),n}:function(){return e.cloneNode(!0)}}function o(e,t,i,o,r,s,a){function l(){("-"!=i||r)&&d(w);var t=p();w.parentNode.insertBefore(t,w),t.appendChild(w),v&&b.forEach(function(e,t){var i=v({element:e,pageNum:t+1,totalPages:b.length});i&&e.appendChild(i)}),Ze(b,function(){Xe(b,function(){e({pages:b,container:y})})})}function c(e){if(a.keepTogether&&Ao(e,a.keepTogether)&&e.offsetHeight<=r-k)return!0;var t=e.tagName;return!(/^h[1-6]$/i.test(t)&&e.offsetHeight>=r-k)&&(e.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(e.tagName))}function d(e){var t,n,o,s,a,l,u;if("TABLE"==e.tagName&&He(e,{tableLayout:"fixed"}),!c(e)){for(t=rt(e),n=parseFloat(st(t,"padding-bottom")),o=parseFloat(st(t,"border-bottom-width")),s=k,k+=n+o,a=!0,l=e.firstChild;l;l=l.nextSibling)if(1==l.nodeType){if(a=!1,Ao(l,i)){h(l);continue}if(!r){d(l);continue}if(!/^(?:static|relative)$/.test(st(rt(l),"position")))continue;u=f(l),1==u?h(l):u&&c(l)?h(l):d(l)}else 3==l.nodeType&&r&&(m(l,a),a=!1);k=s}}function u(e){var t=e.parentNode,i=t.firstChild;if(e===i)return!0;if(e===t.children[0]){if(7==i.nodeType||8==i.nodeType)return!0;if(3==i.nodeType)return!/\S/.test(i.data)}return!1}function h(e){var t,i,n,o,r,s,l;return 1==e.nodeType&&e!==w&&u(e)?h(e.parentNode):(t=Ne(e,"table"),i=t&&t.querySelector("colgroup"),a.repeatHeaders&&(n=t&&t.querySelector("thead"),o=Ne(e,".k-grid.k-widget"),o&&o.querySelector(".k-auto-scrollable")&&(r=o.querySelector(".k-grid-header"))),s=p(),l=_.createRange(),l.setStartBefore(w),l.setEndBefore(e),s.appendChild(l.extractContents()),w.parentNode.insertBefore(s,w),g(e.parentNode),t&&(t=Ne(e,"table"),a.repeatHeaders&&n&&t.insertBefore(n.cloneNode(!0),t.firstChild),i&&t.insertBefore(i.cloneNode(!0),t.firstChild)),void(a.repeatHeaders&&r&&(o=Ne(e,".k-grid.k-widget"),o.insertBefore(r.cloneNode(!0),o.firstChild))))}function p(){var e=_.createElement("KENDO-PDF-PAGE");return He(e,{display:"block",boxSizing:"content-box",width:o?o+"px":"auto",padding:s.top+"px "+s.right+"px "+s.bottom+"px "+s.left+"px",position:"relative",height:r?r+"px":"auto",overflow:r||o?"hidden":"visible",clear:"both"}),a&&a.pageClassName&&(e.className=a.pageClassName),b.push(e),e}function f(e){var t,i,n=e.getBoundingClientRect();return 0===n.width||0===n.height?0:(t=w.getBoundingClientRect().top,i=r-k,n.height>i?3:n.top-t>i?1:n.bottom-t>i?2:0)}function m(e,t){var i,n,o,r,s;/\S/.test(e.data)&&(i=e.data.length,n=_.createRange(),n.selectNodeContents(e),o=f(n),o&&(r=e,1==o?h(t?e.parentNode:e):(!function a(t,i,o){return n.setEnd(e,i),t==i||i==o?i:f(n)?a(t,t+i>>1,i):a(i,i+o>>1,o)}(0,i>>1,i),!/\S/.test(""+n)&&t?h(e.parentNode):(r=e.splitText(n.endOffset),s=p(),n.setStartBefore(w),s.appendChild(n.extractContents()),w.parentNode.insertBefore(s,w),g(r.parentNode))),m(r)))}function g(e){var t=Ne(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),g(t.parentNode))}var v=n(a.template),_=t.ownerDocument,b=[],w=a._destructive?t:Eo(t),y=_.createElement("KENDO-PDF-DOCUMENT"),k=0;ze(w.querySelectorAll("tfoot")).forEach(function(e){e.parentNode.appendChild(e)}),ze(w.querySelectorAll("ol")).forEach(function(e){ze(e.children).forEach(function(e,t){e.setAttribute("kendo-split-index",t)})}),He(y,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),o&&(He(y,{width:o+"px",paddingLeft:s.left+"px",paddingRight:s.right+"px"}),He(w,{overflow:"hidden"})),t.parentNode.insertBefore(y,t),y.appendChild(w),a.beforePageBreak?setTimeout(function(){a.beforePageBreak(y,l)},15):setTimeout(l,15)}var r,s;if(t||(t={}),r=$t(),!e)return r.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing.  You are using an unsupported browser, or running in IE8 compatibility mode.  Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf.defineFont(We(e.ownerDocument)),s=Oe(t.scale||1),Ze(e,function(){var n,a=t&&t.forcePageBreak,l=t&&t.paperSize&&"auto"!=t.paperSize,c=kendo.pdf.getPaperOptions(function(e,i){return"paperSize"==e?l?t[e]:"A4":e in t?t[e]:i}),d=l&&c.paperSize[0],u=l&&c.paperSize[1],h=t.margin&&c.margin,p=!!h;a||u?(h||(h={left:0,top:0,right:0,bottom:0}),d&&(d/=s.x),u&&(u/=s.y),h.left/=s.x,h.right/=s.x,h.top/=s.y,h.bottom/=s.y,n=new Xi({pdf:{multiPage:!0,paperSize:l?c.paperSize:"auto",_ignoreMargin:p}}),o(function(e){if(t.progress){var o=!1,s=0;!function a(){if(s<e.pages.length){var l=i(e.pages[s]);n.append(l),t.progress({page:l,pageNum:++s,totalPages:e.pages.length,cancel:function(){o=!0}}),o?e.container.parentNode.removeChild(e.container):setTimeout(a)}else e.container.parentNode.removeChild(e.container),r.resolve(n)}()}else e.pages.forEach(function(e){n.append(i(e))}),e.container.parentNode.removeChild(e.container),r.resolve(n)},e,a,d?d-h.left-h.right:null,u?u-h.top-h.bottom:null,h,t)):r.resolve(i(e))}),r}function We(e){function t(e){if(e){var t=null;try{t=e.cssRules}catch(i){}t&&n(e,t)}}function i(e){var t,i=st(e.style,"src");return i?Mo(i).reduce(function(e,t){var i=Ro(t);return i&&e.push(i),e},[]):(t=Ro(e.cssText),t?[t]:[])}function n(e,n){var r,s,a,l,c,d,u;for(r=0;r<n.length;++r)switch(s=n[r],s.type){case 3:t(s.styleSheet);break;case 5:a=s.style,l=Mo(st(a,"font-family")),c=/^([56789]00|bold)$/i.test(st(a,"font-weight")),d="italic"==st(a,"font-style"),u=i(s),u.length>0&&o(e,l,c,d,u[0])}}function o(e,t,i,n,o){/^data:/i.test(o)||/^[^\/:]+:\/\//.test(o)||/^\//.test(o)||(o=(e.href+"").replace(/[^\/]*$/,"")+o),t.forEach(function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),i&&(e+="|bold"),n&&(e+="|italic"),r[e]=o})}var r,s;for(null==e&&(e=document),r={},s=0;s<e.styleSheets.length;++s)t(e.styleSheets[s]);return r}function Ue(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qe(e){return e="_counter_"+e,Co[e]}function je(e){var t=[],i=Co;for(e="_counter_"+e;i;)Ue(i,e)&&t.push(i[e]),i=Object.getPrototypeOf(i);return t.reverse()}function Ge(e,t){var i=Co;for(e="_counter_"+e;i&&!Ue(i,e);)i=Object.getPrototypeOf(i);i||(i=Co._root),i[e]=(i[e]||0)+(null==t?1:t)}function $e(e,t){e="_counter_"+e,Co[e]=null==t?0:t}function Ke(e,t,i){var n,o,r;for(n=0;n<e.length;)o=e[n++],r=parseFloat(e[n]),isNaN(r)?t(o,i):(t(o,r),++n)}function Ye(e){var t,i=st(e,"counter-reset");i&&Ke(Mo(i,/^\s+/),$e,0),t=st(e,"counter-increment"),t&&Ke(Mo(t,/^\s+/),Ge,1)}function Qe(e,t){var i=kendo.parseColor(e,!0);return i&&(i=i.toRGB(),t?i=i.toCssRgba():0===i.a&&(i=null)),i}function Xe(e,t){function i(){--n<=0&&t()}var n=0;e.forEach(function(e){var t,o,r=e.querySelectorAll("img");for(t=0;t<r.length;++t)o=r[t],o.complete||(n++,o.onload=o.onerror=i)}),n||i()}function Ze(e,t){function i(e){xo[e]||(xo[e]=!0,s.push(e))}function n(e){/^img$/i.test(e.tagName)&&i(e.src),Io(st(rt(e),"background-image")).forEach(function(e){"url"==e.type&&i(e.url)}),e.children&&ze(e.children).forEach(n)}function o(){--r<=0&&t()}var r,s=[];Array.isArray(e)?e.forEach(n):n(e),r=s.length,0===r&&o(),s.forEach(function(e){var t=xo[e]=new window.Image;/^data:/i.test(e)||(t.crossOrigin="Anonymous"),t.src=e,t.complete?o():(t.onload=o,t.onerror=function(){xo[e]=null,o()})})}function Je(e){var t,i="";do t=e%26,i=String.fromCharCode(97+t)+i,e=Math.floor(e/26);while(e>0);return i}function et(e,t,i){var n,o;Co=Object.create(Co),Co[e.tagName.toLowerCase()]={element:e,style:t},n=st(t,"text-decoration"),n&&"none"!=n&&(o=st(t,"color"),n.split(/\s+/g).forEach(function(e){Co[e]||(Co[e]=o)})),ot(t)&&(Co._stackingContext={element:e,group:i})}function tt(){Co=Object.getPrototypeOf(Co)}function it(e){if(null!=Co._clipbox){var t=e.bbox(Co._matrix);Co._clipbox=Co._clipbox?di.intersect(Co._clipbox,t):t}}function nt(){var e=Co._clipbox;return null==e||(e?0===e.width()||0===e.height():void 0)}function ot(e){function t(t){return st(e,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0}function rt(e,t){return window.getComputedStyle(e,t||null)}function st(e,t,i){var n=e.getPropertyValue(t);return null!=n&&""!==n||(yo.webkit?n=e.getPropertyValue("-webkit-"+t):yo.mozilla?n=e.getPropertyValue("-moz-"+t):yo.opera?n=e.getPropertyValue("-o-"+t):To&&(n=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==n||""===n)?i:n}function at(e,t,i,n){e.setProperty(t,i,n),yo.webkit?e.setProperty("-webkit-"+t,i,n):yo.mozilla?e.setProperty("-moz-"+t,i,n):yo.opera?e.setProperty("-o-"+t,i,n):To&&(e.setProperty("-ms-"+t,i,n),t="ms"+t.replace(/(^|-)([a-z])/g,function(e,t,i){return t+i.toUpperCase()}),e[t]=i)}function lt(e,t){return t="border-"+t,{width:parseFloat(st(e,t+"-width")),style:st(e,t+"-style"),color:Qe(st(e,t+"-color"),!0)}}function ct(e,t){var i=e.style.cssText,n=t();return e.style.cssText=i,n}function dt(e,t){var i=st(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==i.length&&i.push(i[0]),bt({x:i[0],y:i[1]})}function ut(e){var t=e.getBoundingClientRect();return t=ht(t,"border-*-width",e),t=ht(t,"padding-*",e)}function ht(e,t,i){var n,o,r,s,a;return"string"==typeof t?(n=rt(i),o=parseFloat(st(n,t.replace("*","top"))),r=parseFloat(st(n,t.replace("*","right"))),s=parseFloat(st(n,t.replace("*","bottom"))),a=parseFloat(st(n,t.replace("*","left")))):"number"==typeof t&&(o=r=s=a=t),{top:e.top+o,right:e.right-r,bottom:e.bottom-s,left:e.left+a,width:e.right-e.left-r-a,height:e.bottom-e.top-s-o}}function pt(e){var t,i,n=st(e,"transform");return"none"==n?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(n),t?(i=st(e,"transform-origin"),t=t[1].split(/\s*,\s*/g).map(parseFloat),i=i.split(/\s+/g).map(parseFloat),{matrix:t,origin:i}):void 0)}function ft(e){return 180*e/Math.PI%360}function mt(e){var t=parseFloat(e);return/grad$/.test(e)?Math.PI*t/200:/rad$/.test(e)?t:/turn$/.test(e)?Math.PI*t*2:/deg$/.test(e)?Math.PI*t/180:void 0}function gt(e,t){return t=new ai(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function vt(e,t){e.clip(t)}function _t(e,t,i,n){for(var o=new Ci([t,i],n).curvePoints(),r=1;r<o.length;)e.curveTo(o[r++],o[r++],o[r++])}function bt(e){return(e.x<=0||e.y<=0)&&(e.x=e.y=0),e}function wt(e,t,i,n,o){var r=Math.max(0,t.x),s=Math.max(0,t.y),a=Math.max(0,i.x),l=Math.max(0,i.y),c=Math.max(0,n.x),d=Math.max(0,n.y),u=Math.max(0,o.x),h=Math.max(0,o.y),p=Math.min(e.width/(r+a),e.height/(l+d),e.width/(c+u),e.height/(h+s));return p<1&&(r*=p,s*=p,a*=p,l*=p,c*=p,d*=p,u*=p,h*=p),{tl:{x:r,y:s},tr:{x:a,y:l},br:{x:c,y:d},bl:{x:u,y:h}}}function yt(e,t,i){var n,o,r,s,a,l,c,d,u=rt(e),h=dt(u,"top-left"),p=dt(u,"top-right"),f=dt(u,"bottom-left"),m=dt(u,"bottom-right");return"padding"!=i&&"content"!=i||(n=lt(u,"top"),o=lt(u,"right"),r=lt(u,"bottom"),s=lt(u,"left"),h.x-=s.width,h.y-=n.width,p.x-=o.width,p.y-=n.width,m.x-=o.width,m.y-=r.width,f.x-=s.width,f.y-=r.width,"content"==i&&(a=parseFloat(st(u,"padding-top")),l=parseFloat(st(u,"padding-right")),c=parseFloat(st(u,"padding-bottom")),d=parseFloat(st(u,"padding-left")),h.x-=d,h.y-=a,p.x-=l,p.y-=a,m.x-=l,m.y-=c,f.x-=d,f.y-=c)),"number"==typeof i&&(h.x-=i,h.y-=i,p.x-=i,p.y-=i,m.x-=i,m.y-=i,f.x-=i,f.y-=i),kt(t,h,p,m,f)}function kt(e,t,i,n,o){var r=wt(e,t,i,n,o),s=r.tl,a=r.tr,l=r.br,c=r.bl,d=new Ui({fill:null,stroke:null});return d.moveTo(e.left,e.top+s.y),s.x&&_t(d,e.left+s.x,e.top+s.y,{startAngle:-180,endAngle:-90,radiusX:s.x,radiusY:s.y}),d.lineTo(e.right-a.x,e.top),a.x&&_t(d,e.right-a.x,e.top+a.y,{startAngle:-90,endAngle:0,radiusX:a.x,radiusY:a.y}),d.lineTo(e.right,e.bottom-l.y),l.x&&_t(d,e.right-l.x,e.bottom-l.y,{startAngle:0,endAngle:90,radiusX:l.x,radiusY:l.y}),d.lineTo(e.left+c.x,e.bottom),c.x&&_t(d,e.left+c.x,e.bottom-c.y,{startAngle:90,endAngle:180,radiusX:c.x,radiusY:c.y}),d.close()}function xt(e,t){var n=parseFloat(e)+"";switch(t){case"decimal-leading-zero":return n.length<2&&(n="0"+n),n;case"lower-roman":return i(e).toLowerCase();case"upper-roman":return i(e).toUpperCase();case"lower-latin":case"lower-alpha":return Je(e-1);case"upper-latin":case"upper-alpha":return Je(e-1).toUpperCase();default:return n}}function Ct(e,t){function i(e,t,i){return i?(i=i.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),je(e).map(function(e){return xt(e,t)}).join(i)):xt(qe(e)||0,t)}var n,o=Mo(t,/^\s+/),r=[];return o.forEach(function(t){var o;(n=/^\s*(["'])(.*)\1\s*$/.exec(t))?r.push(n[2].replace(/\\([0-9a-f]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})):(n=/^\s*counter\((.*?)\)\s*$/.exec(t))?(o=Mo(n[1]),r.push(i(o[0],o[1]))):(n=/^\s*counters\((.*?)\)\s*$/.exec(t))?(o=Mo(n[1]),r.push(i(o[0],o[2],o[1]))):r.push((n=/^\s*attr\((.*?)\)\s*$/.exec(t))?e.getAttribute(n[1])||"":t)}),r.join("")}function St(e){var t,i;if(e.cssText)return e.cssText;for(t=[],i=0;i<e.length;++i)t.push(e[i]+": "+st(e,e[i]));return t.join(";\n")}function Tt(e,t){function i(t,i){var o,r=rt(e,t),s=r.content;Ye(r),s&&"normal"!=s&&"none"!=s&&"0px"!=r.width&&(o=e.ownerDocument.createElement(ko),o.style.cssText=St(r),o.textContent=Ct(e,s),e.insertBefore(o,i),n.push(o))}var n,o;return e.tagName==ko?void Dt(e,t):(n=[],i(":before",e.firstChild),i(":after",null),void(n.length>0?(o=e.className,e.className+=" kendo-pdf-hide-pseudo-elements",Dt(e,t),e.className=o,n.forEach(function(t){e.removeChild(t)})):Dt(e,t)))}function Dt(e,t){function n(t){var i,n,o,r,s,a;if(/^td$/i.test(e.tagName)&&(i=Co.table,i&&"collapse"==st(i.style,"border-collapse"))){if(n=lt(i.style,"left").width,o=lt(i.style,"top").width,0===n&&0===o)return t;if(r=i.element.getBoundingClientRect(),s=i.element.rows[0].cells[0],a=s.getBoundingClientRect(),a.top==r.top||a.left==r.left)return ze(t).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 t}function o(e,i,n,o,r,s,a,l){function c(t,i,o){var r=Math.PI/2*t/(t+n),s={x:i.x-t,y:i.y-n},a=new Ui({fill:{color:e},stroke:null}).moveTo(0,0);gt(a,o),_t(a,0,i.y,{startAngle:-90,endAngle:-ft(r),radiusX:i.x,radiusY:i.y}),s.x>0&&s.y>0?(a.lineTo(s.x*Math.cos(r),i.y-s.y*Math.sin(r)),_t(a,0,i.y,{startAngle:-ft(r),endAngle:-90,radiusX:s.x,radiusY:s.y,anticlockwise:!0})):s.x>0?a.lineTo(s.x,n).lineTo(0,n):a.lineTo(s.x,n).lineTo(s.x,0),u.append(a.close())}if(!(n<=0)){var d,u=new Xi;gt(u,l),t.append(u),bt(s),bt(a),d=new Ui({fill:{color:e},stroke:null}),u.append(d),d.moveTo(s.x?Math.max(s.x,o):0,0).lineTo(i-(a.x?Math.max(a.x,r):0),0).lineTo(i-Math.max(a.x,r),n).lineTo(Math.max(s.x,o),n).close(),s.x&&c(o,s,[-1,0,0,1,s.x,0]),a.x&&c(r,a,[1,0,0,1,i-a.x,0])}}function r(e){var i,n,o=new Xi;for(vt(o,kt(e,S,T,A,D)),t.append(o),I&&(i=new Ui({fill:{color:I.toCssRgba()},stroke:null}),i.moveTo(e.left,e.top).lineTo(e.right,e.top).lineTo(e.right,e.bottom).lineTo(e.left,e.bottom).close(),o.append(i)),n=c.length;--n>=0;)s(o,e,c[n],d[n%d.length],u[n%u.length],h[n%h.length],p[n%p.length])}function s(t,i,n,o,r,s,a){function l(t,i,n,l,c){function d(){for(;g.origin.x>i.left;)g.origin.x-=n}function u(){for(;g.origin.y>i.top;)g.origin.y-=l}function h(){for(;g.origin.x<i.right;)c(t,g.clone()),g.origin.x+=n}var p,f,m,g,v,_=n/l,b=i;switch("content-box"==s?(b=ht(b,"border-*-width",e),b=ht(b,"padding-*",e)):"padding-box"==s&&(b=ht(b,"border-*-width",e)),/^\s*auto(\s+auto)?\s*$/.test(a)||("contain"==a?(p=Math.min(b.width/n,b.height/l),n*=p,l*=p):"cover"==a?(p=Math.max(b.width/n,b.height/l),n*=p,l*=p):(f=a.split(/\s+/g),n=/%$/.test(f[0])?b.width*parseFloat(f[0])/100:parseFloat(f[0]),l=1==f.length||"auto"==f[1]?n/_:/%$/.test(f[1])?b.height*parseFloat(f[1])/100:parseFloat(f[1]))),m=r+""){case"bottom":m="50% 100%";break;case"top":m="50% 0";break;case"left":m="0 50%";break;case"right":m="100% 50%";break;case"center":m="50% 50%"}if(m=m.split(/\s+/),1==m.length&&(m[1]="50%"),m[0]=/%$/.test(m[0])?parseFloat(m[0])/100*(b.width-n):parseFloat(m[0]),m[1]=/%$/.test(m[1])?parseFloat(m[1])/100*(b.height-l):parseFloat(m[1]),g=new di([b.left+m[0],b.top+m[1]],[n,l]),"no-repeat"==o)c(t,g);else if("repeat-x"==o)d(),h();else if("repeat-y"==o)for(u();g.origin.y<i.bottom;)c(t,g.clone()),g.origin.y+=l;else if("repeat"==o)for(d(),u(),v=g.origin.clone();g.origin.y<i.bottom;)g.origin.x=v.x,h(),g.origin.y+=l}if(n&&"none"!=n)if("url"==n.type){if(/^url\(\"data:image\/svg/i.test(n.url))return;var c=xo[n.url];c&&c.width>0&&c.height>0&&l(t,i,c.width,c.height,function(e,t){e.append(new Yi(n.url,t))})}else{if("linear"!=n.type)return;l(t,i,i.width,i.height,At(n))}}function a(){function n(i){ct(e,function(){e.style.position="relative";var n=e.ownerDocument.createElement(ko);n.style.position="absolute",n.style.boxSizing="border-box","outside"==r?(n.style.width="6em",n.style.left="-6.8em",n.style.textAlign="right"):n.style.left="0px",i(n),e.insertBefore(n,e.firstChild),Nt(n,t),e.removeChild(n)})}function o(t){var i,n=e.parentNode.children,o=e.getAttribute("kendo-split-index");if(null!=o)return t(0|o,n.length);for(i=0;i<n.length;++i)if(n[i]===e)return t(i,n.length)}var r,s=st(w,"list-style-type");if("none"!=s)switch(r=st(w,"list-style-position"),s){case"circle":case"disc":case"square":n(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:"■"}[s]});break;case"decimal":case"decimal-leading-zero":n(function(e){o(function(t){++t,"decimal-leading-zero"==s&&t<10&&(t="0"+t),e.innerHTML=t+"."})});break;case"lower-roman":case"upper-roman":n(function(e){o(function(t){t=i(t+1),"upper-roman"==s&&(t=t.toUpperCase()),e.innerHTML=t+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":n(function(e){o(function(t){t=Je(t),/^upper/i.test(s)&&(t=t.toUpperCase()),e.innerHTML=t+"."})})}}function l(i,n,s){function a(e){return{x:e.y,y:e.x}}var l,c,d,u,h,p,f,m;if(0!==i.width&&0!==i.height&&(r(i),l=C.width>0&&(n&&"ltr"==E||s&&"rtl"==E),c=k.width>0&&(s&&"ltr"==E||n&&"rtl"==E),0!==y.width||0!==C.width||0!==k.width||0!==x.width)){if(y.color==k.color&&y.color==x.color&&y.color==C.color&&y.width==k.width&&y.width==x.width&&y.width==C.width&&l&&c)return i=ht(i,y.width/2),d=yt(e,i,y.width/2),d.options.stroke={color:y.color,width:y.width},void t.append(d);if(0===S.x&&0===T.x&&0===A.x&&0===D.x&&y.width<2&&C.width<2&&k.width<2&&x.width<2)return y.width>0&&t.append(new Ui({stroke:{width:y.width,color:y.color}}).moveTo(i.left,i.top+y.width/2).lineTo(i.right,i.top+y.width/2)),x.width>0&&t.append(new Ui({stroke:{width:x.width,color:x.color}}).moveTo(i.left,i.bottom-x.width/2).lineTo(i.right,i.bottom-x.width/2)),l&&t.append(new Ui({stroke:{width:C.width,color:C.color}}).moveTo(i.left+C.width/2,i.top).lineTo(i.left+C.width/2,i.bottom)),void(c&&t.append(new Ui({stroke:{width:k.width,color:k.color}}).moveTo(i.right-k.width/2,i.top).lineTo(i.right-k.width/2,i.bottom)));u=wt(i,S,T,A,D),h=u.tl,p=u.tr,f=u.br,m=u.bl,o(y.color,i.width,y.width,C.width,k.width,h,p,[1,0,0,1,i.left,i.top]),o(x.color,i.width,x.width,k.width,C.width,f,m,[-1,0,0,-1,i.right,i.bottom]),o(C.color,i.height,C.width,x.width,y.width,a(m),a(h),[0,-1,1,0,i.left,i.bottom]),o(k.color,i.height,k.width,y.width,x.width,a(p),a(f),[0,1,-1,0,i.right,i.top])}}var c,d,u,h,p,f,m,g,v,_,b,w=rt(e),y=lt(w,"top"),k=lt(w,"right"),x=lt(w,"bottom"),C=lt(w,"left"),S=dt(w,"top-left"),T=dt(w,"top-right"),D=dt(w,"bottom-left"),A=dt(w,"bottom-right"),E=st(w,"direction"),I=st(w,"background-color");if(I=Qe(I),c=Io(st(w,"background-image")),d=Mo(st(w,"background-repeat")),u=Mo(st(w,"background-position")),h=Mo(st(w,"background-origin")),p=Mo(st(w,"background-size")),yo.msie&&yo.version<10&&(u=Mo(e.currentStyle.backgroundPosition)),f=ht(e.getBoundingClientRect(),"border-*-width",e),function(){var e,i,n,o,r,s,a,l=st(w,"clip"),c=/^\s*rect\((.*)\)\s*$/.exec(l);c&&(e=c[1].split(/[ ,]+/g),i="auto"==e[0]?f.top:parseFloat(e[0])+f.top,n="auto"==e[1]?f.right:parseFloat(e[1])+f.left,o="auto"==e[2]?f.bottom:parseFloat(e[2])+f.top,r="auto"==e[3]?f.left:parseFloat(e[3])+f.left,s=new Xi,a=(new Ui).moveTo(r,i).lineTo(n,i).lineTo(n,o).lineTo(r,o).close(),vt(s,a),t.append(s),t=s,it(a))}(),_=st(w,"display"),"table-row"==_)for(m=[],g=0,v=e.children;g<v.length;++g)m.push(v[g].getBoundingClientRect());else m=e.getClientRects(),1==m.length&&(m=[e.getBoundingClientRect()]);for(m=n(m),g=0;g<m.length;++g)l(m[g],0===g,g==m.length-1);return"A"==e.tagName&&e.href&&!/^#?$/.test(e.getAttribute("href"))&&(Co._avoidLinks&&Ao(e,Co._avoidLinks)||(b=document.createRange(),b.selectNodeContents(e),ze(b.getClientRects()).forEach(function(i){var n=new Xi;n._pdfLink={url:e.href,top:i.top,right:i.right,bottom:i.bottom,left:i.left},t.append(n)}))),m.length>0&&"list-item"==_&&!e.getAttribute("kendo-no-bullet")&&a(m[0]),function(){function i(){var i=yt(e,f,"padding"),n=new Xi;
vt(n,i),t.append(n),t=n,it(i)}Rt(e)?i():/^(hidden|auto|scroll)/.test(st(w,"overflow"))?i():/^(hidden|auto|scroll)/.test(st(w,"overflow-x"))?i():/^(hidden|auto|scroll)/.test(st(w,"overflow-y"))&&i()}(),Et(e,t)||Bt(e,t),t}function At(e){return function(t,i){var n,o,r,s,a,l,c,d,u,h,p,f,m,g=i.width(),v=i.height();switch(e.type){case"linear":switch(n=null!=e.angle?e.angle:Math.PI,e.to){case"top":n=0;break;case"left":n=-Math.PI/2;break;case"bottom":n=Math.PI;break;case"right":n=Math.PI/2;break;case"top left":case"left top":n=-Math.atan2(v,g);break;case"top right":case"right top":n=Math.atan2(v,g);break;case"bottom left":case"left bottom":n=Math.PI+Math.atan2(v,g);break;case"bottom right":case"right bottom":n=Math.PI-Math.atan2(v,g)}e.reverse&&(n-=Math.PI),n%=2*Math.PI,n<0&&(n+=2*Math.PI),o=Math.abs(g*Math.sin(n))+Math.abs(v*Math.cos(n)),r=Math.atan(g*Math.tan(n)/v),s=Math.sin(r),a=Math.cos(r),l=Math.abs(s)+Math.abs(a),c=l/2*s,d=l/2*a,n>Math.PI/2&&n<=3*Math.PI/2&&(c=-c,d=-d),u=[],h=0,p=e.stops.map(function(t,i){var n,r=t.percent;return r?r=parseFloat(r)/100:t.length?r=parseFloat(t.length)/o:0===i?r=0:i==e.stops.length-1&&(r=1),n={color:t.color.toCssRgba(),offset:r},null!=r?(h=r,u.forEach(function(e,t){var i=e.stop;i.offset=e.left+(h-e.left)*(t+1)/(u.length+1)}),u=[]):u.push({left:h,stop:n}),n}),f=[.5-c,.5+d],m=[.5+c,.5-d],t.append(Ui.fromRect(i).stroke(null).fill(new an({start:f,end:m,stops:p,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function Et(e,t){var i,n,o,r;return e._kendoExportVisual?i=e._kendoExportVisual():window.kendo&&window.kendo.jQuery&&e.getAttribute(window.kendo.attr("role"))&&(n=window.kendo.widgetInstance(window.kendo.jQuery(e)),n&&(n.exportDOMVisual||n.exportVisual)&&(i=n.exportDOMVisual?n.exportDOMVisual():n.exportVisual())),!!i&&(o=new Xi,o.children.push(i),r=e.getBoundingClientRect(),o.transform(A().translate(r.left,r.top)),t.append(o),!0)}function It(e,t,i){var n=ut(e),o=new di([n.left,n.top],[n.width,n.height]),r=new Yi(t,o);vt(r,yt(e,n,"content")),i.append(r)}function Mt(e,t){var i=rt(e),n=rt(t),o=parseFloat(st(i,"z-index")),r=parseFloat(st(n,"z-index")),s=st(i,"position"),a=st(n,"position");return isNaN(o)&&isNaN(r)?/static|absolute/.test(s)&&/static|absolute/.test(a)?0:"static"==s?-1:"static"==a?1:0:isNaN(o)?0===r?0:r>0?-1:1:isNaN(r)?0===o?0:o>0?1:-1:parseFloat(o)-parseFloat(r)}function Rt(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function Ft(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function Pt(e,t){var i=rt(e),n=st(i,"color"),o=e.getBoundingClientRect();"checkbox"==e.type?(t.append(Ui.fromRect(new di([o.left+1,o.top+1],[o.width-2,o.height-2])).stroke(n,1)),e.checked&&t.append((new Ui).stroke(n,1.2).moveTo(o.left+.22*o.width,o.top+.55*o.height).lineTo(o.left+.45*o.width,o.top+.75*o.height).lineTo(o.left+.78*o.width,o.top+.22*o.width))):(t.append(new wi(new fi([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-2,o.height-2)/2)).stroke(n,1)),e.checked&&t.append(new wi(new fi([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-8,o.height-8)/2)).fill(n).stroke(null)))}function zt(e,t){var i,n,o,r,s,a=e.tagName.toLowerCase();if("input"==a&&("checkbox"==e.type||"radio"==e.type))return Pt(e,t);if(i=e.parentNode,n=e.ownerDocument,o=n.createElement(ko),o.style.cssText=St(rt(e)),"input"==a&&(o.style.whiteSpace="pre"),"select"!=a&&"textarea"!=a||(o.style.overflow="auto"),"select"==a)if(e.multiple)for(s=0;s<e.options.length;++s)r=n.createElement(ko),r.style.cssText=St(rt(e.options[s])),r.style.display="block",r.textContent=e.options[s].textContent,o.appendChild(r);else r=Ft(e),r&&(o.textContent=r.textContent);else o.textContent=e.value;i.insertBefore(o,e),o.scrollLeft=e.scrollLeft,o.scrollTop=e.scrollTop,e.style.display="none",Bt(o,t),e.style.display="",i.removeChild(o)}function Bt(e,t){var i,n,o,r,s,a,l;switch(Co._stackingContext.element===e&&(Co._stackingContext.group=t),e.tagName.toLowerCase()){case"img":It(e,e.src,t);break;case"canvas":try{It(e,e.toDataURL("image/png"),t)}catch(c){}break;case"textarea":case"input":case"select":zt(e,t);break;default:for(i=[],n=[],o=[],r=e.firstChild;r;r=r.nextSibling)switch(r.nodeType){case 3:/\S/.test(r.data)&&Lt(e,r,t);break;case 1:s=rt(r),a=st(s,"float"),l=st(s,"position"),"static"!=l?o.push(r):"none"!=a?n.push(r):i.push(r)}p(i,Mt).forEach(function(e){Nt(e,t)}),p(n,Mt).forEach(function(e){Nt(e,t)}),p(o,Mt).forEach(function(e){Nt(e,t)})}}function Lt(e,t,i){function n(e){var t,i,n,o,r;if(To||yo.chrome){for(t=e.getClientRects(),i={top:1/0,right:-(1/0),bottom:-(1/0),left:1/0},n=!1,o=0;o<t.length;++o)r=t[o],r.width<=1||r.bottom===C||(i.left=Math.min(r.left,i.left),i.top=Math.min(r.top,i.top),i.right=Math.max(r.right,i.right),i.bottom=Math.max(r.bottom,i.bottom),n=!0);return n?(i.width=i.right-i.left,i.height=i.bottom-i.top,i):e.getBoundingClientRect()}return e.getBoundingClientRect()}function o(){var e,i,o,s,a,u,h,p=c,f=l.substr(c).search(/\S/);if(c+=f,f<0||c>=d)return!0;if(m.setStart(t,c),m.setEnd(t,c+1),e=n(m),i=!1,(v||_>1)&&(f=l.substr(c).search(/\s/),f>=0&&(m.setEnd(t,c+f),o=n(m),o.bottom==e.bottom&&(e=o,i=!0,c+=f))),!i){if(f=function g(i,o,r){m.setEnd(t,o);var s=n(m);return s.bottom!=e.bottom&&i<o?g(i,i+o>>1,o):s.right!=e.right?(e=s,o<r?g(o,o+r>>1,r):o):o}(c,Math.min(d,c+x),d),f==c)return!0;if(c=f,f=(""+m).search(/\s+$/),0===f)return!1;f>0&&(m.setEnd(t,m.startOffset+f),e=n(m))}if(To&&(e=m.getClientRects()[0]),s=""+m,/^(?:pre|pre-wrap)$/i.test(b)){if(/\t/.test(s)){for(a=0,f=p;f<m.startOffset;++f)u=l.charCodeAt(f),9==u?a+=8-a%8:10==u||13==u?a=0:a++;for(;(f=s.search("\t"))>=0;)h="        ".substr(0,8-(a+f)%8),s=s.substr(0,f)+h+s.substr(f+1)}}else s=s.replace(/\s+/g," ");i||(C=e.bottom),r(s,e)}function r(e,t){var n,o,r;switch(To&&!isNaN(h)&&(n=Fo(p),o=(t.top+t.bottom-n)/2,t={top:o,right:t.right,bottom:o+n,left:t.left,height:n,width:t.right-t.left}),w){case"uppercase":e=e.toUpperCase();break;case"lowercase":e=e.toLowerCase();break;case"capitalize":e=e.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})}r=new Do(e,new di([t.left,t.top],[t.width,t.height]),{font:p,fill:{color:f}}),i.append(r)}function s(e){function t(t,n){var o,r;t&&(o=u/12,r=new Ui({stroke:{width:o,color:t}}),n-=o,r.moveTo(e.left,n).lineTo(e.right,n),i.append(r))}t(S,e.bottom),t(T,e.bottom-e.height/2.7),t(D,e.top)}var a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A;if(!nt()&&(a=rt(e),!(parseFloat(st(a,"text-indent"))<-500)&&(l=t.data,c=0,d=l.search(/\S\s*$/)+1,d&&(u=st(a,"font-size"),h=st(a,"line-height"),p=[st(a,"font-style"),st(a,"font-variant"),st(a,"font-weight"),u,st(a,"font-family")].join(" "),u=parseFloat(u),h=parseFloat(h),0!==u)))){for(f=st(a,"color"),m=e.ownerDocument.createRange(),g=st(a,"text-align"),v="justify"==g,_=st(a,"column-count",1),b=st(a,"white-space"),w=st(a,"text-transform"),To&&(y=a.textOverflow,"ellipsis"==y&&(k=e.style.textOverflow,e.style.textOverflow="clip")),x=e.getBoundingClientRect().width/u*5,0===x&&(x=500),C=null,S=Co.underline,T=Co["line-through"],D=Co.overline,A=S||T||D;!o(););To&&"ellipsis"==y&&(e.style.textOverflow=k),A&&(m.selectNode(t),ze(m.getClientRects()).forEach(s))}}function Ht(e,t,i){var n,o,r,s,a,l;for("auto"!=i?(n=Co._stackingContext.group,i=parseFloat(i)):(n=t,i=0),o=n.children,r=0;r<o.length&&!(null!=o[r]._dom_zIndex&&o[r]._dom_zIndex>i);++r);return s=new Xi,n.insert(r,s),s._dom_zIndex=i,n!==t&&Co._clipbox&&(a=Co._matrix.invert(),l=Co._clipbox.transformCopy(a),vt(s,Ui.fromRect(l))),s}function Nt(e,t){var i,n,o,r,s,a,l=rt(e);Ye(l),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=Co._clipbox&&(i=parseFloat(st(l,"opacity")),n=st(l,"visibility"),o=st(l,"display"),0!==i&&"hidden"!=n&&"none"!=o&&(r=pt(l),a=st(l,"z-index"),(r||i<1)&&"auto"==a&&(a=0),s=Ht(e,t,a),i<1&&s.opacity(i*s.opacity()),et(e,l,s),r?ct(e,function(){var t,i,n,o;at(e.style,"transform","none","important"),at(e.style,"transition","none","important"),"static"==st(l,"position")&&at(e.style,"position","relative","important"),t=e.getBoundingClientRect(),i=t.left+r.origin[0],n=t.top+r.origin[1],o=[1,0,0,1,-i,-n],o=Ot(o,r.matrix),o=Ot(o,[1,0,0,1,i,n]),o=gt(s,o),Co._matrix=Co._matrix.multiplyCopy(o),Tt(e,s)}):Tt(e,s),tt()))}function Ot(e,t){var i=e[0],n=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=t[0],c=t[1],d=t[2],u=t[3],h=t[4],p=t[5];return[i*l+n*d,i*c+n*u,o*l+r*d,o*c+r*u,s*l+a*d+h,s*c+a*u+p]}var Vt,Wt,Ut,qt,jt,Gt,$t,Kt,Yt,Qt,Xt,Zt,Jt,ei,ti,ii,ni,oi,ri,si,ai,li,ci,di,ui,hi,pi,fi,mi,gi,vi,_i,bi,wi,yi,ki,xi,Ci,Si,Ti,Di,Ai,Ei,Ii,Mi,Ri,Fi,Pi,zi,Bi,Li,Hi,Ni,Oi,Vi,Wi,Ui,qi,ji,Gi,$i,Ki,Yi,Qi,Xi,Zi,Ji,en,tn,nn,on,rn,sn,an,ln,cn,dn,un,hn,pn,fn,mn,gn,vn,_n,bn,wn,yn,kn,xn,Cn,Sn,Tn,Dn,An,En,In,Mn,Rn,Fn,Pn,zn,Bn,Ln,Hn,Nn,On,Vn,Wn,Un,qn,jn,Gn,$n,Kn,Yn,Qn,Xn,Zn,Jn,eo,to,io,no,oo,ro,so,ao,lo,co,uo,ho,po,fo,mo,go,vo,_o,bo,wo,yo,ko,xo,Co,So,To,Do,Ao,Eo,Io,Mo,Ro,Fo,Po;window.kendo=window.kendo||{},Vt=kendo.drawing,Wt=Vt.util,Ut=kendo.Class,qt=kendo.util,jt=kendo.support,Gt=jt.browser,$t=Wt.createPromise,Kt=Wt.promiseAll,Yt={extend:function(e){var t,i=this;for(t in this)"extend"!==t&&(e[t]=i[t])},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(),i=t.indexOf(e);return i!==-1&&t.splice(i,1),this},trigger:function(e,t){var i,n,o=this._observers;if(o&&!this._suspended)for(i=0;i<o.length;i++)n=o[i],n[e]&&n[e](t);return this},optionsChange:function(e){void 0===e&&(e={}),e.element=this,this.trigger("optionsChange",e)},geometryChange:function(){this.trigger("geometryChange",{element:this})},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},_observerField:function(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}},Qt={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"},Xt="undefined",Zt=1,Jt=Math.PI/180,ei=Number.MAX_VALUE,ti=-Number.MAX_VALUE,ii="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ni=String.fromCharCode,oi={append:t,arabicToRoman:i,createPromise:$t,defined:n,definitionId:o,deg:r,encodeBase64:a,eventCoordinates:l,eventElement:c,isTransparent:d,last:u,limitValue:h,mergeSort:p,promiseAll:Kt,rad:f,round:g,valueOrDefault:v,bindEvents:_,elementOffset:b,elementSize:k,elementStyles:w,unbindEvents:x,DEG_TO_RAD:Jt,MAX_NUM:ei,MIN_NUM:ti},ri={}.toString,si=Ut.extend({init:function(e,t){var i,n,o=this;void 0===t&&(t=""),this.prefix=t;for(i in e)n=e[i],n=o._wrap(n,i),o[i]=n},get:function(e){for(var t,i=e.split("."),n=this;i.length&&n;)t=i.shift(),n=n[t];return n},set:function(e,t){var i=this.get(e);i!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))},_set:function(e,t){var i,n,o,r=this,s=e.indexOf(".")>=0,a=this,l=e;if(s){for(i=l.split("."),n=this.prefix;i.length>1;)l=i.shift(),n+=l+".",o=a[l],o||(o=new si({},n),o.addObserver(r),a[l]=o),a=o;l=i[0]}a._clear(l),a[l]=t},_clear:function(e){var t=this[e];t&&t.removeObserver&&t.removeObserver(this)},_wrap:function(e,t){var i=ri.call(e),o=e;return null!==o&&n(o)&&"[object Object]"===i&&(e instanceof si||e instanceof Ut||(o=new si(o,this.prefix+t+".")),o.addObserver(this)),o}}),Yt.extend(si.prototype),ai=Ut.extend({init:function(e,t,i,n,o,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===r&&(r=0),this.a=e,this.b=t,this.c=i,this.d=n,this.e=o,this.f=r},multiplyCopy:function(e){return new ai(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,t=e.a,i=e.b,n=e.c,o=e.d,r=e.e,s=e.f,a=t*o-i*n;return 0===a?null:new ai(o/a,-i/a,-n/a,t/a,(n*s-o*r)/a,(i*r-t*s)/a)},clone:function(){return new ai(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)},round:function(e){return this.a=g(this.a,e),this.b=g(this.b,e),this.c=g(this.c,e),this.d=g(this.d,e),this.e=g(this.e,e),this.f=g(this.f,e),this},toArray:function(e){var t,i=[this.a,this.b,this.c,this.d,this.e,this.f];if(n(e))for(t=0;t<i.length;t++)i[t]=g(i[t],e);return i},toString:function(e,t){return void 0===t&&(t=","),this.toArray(e).join(t)}}),ai.translate=function(e,t){return new ai(1,0,0,1,e,t)},ai.unit=function(){return new ai(1,0,0,1,0,0)},ai.rotate=function(e,t,i){var n=new ai;return n.a=Math.cos(f(e)),n.b=Math.sin(f(e)),n.c=-n.b,n.d=n.a,n.e=t-t*n.a+i*n.b||0,n.f=i-i*n.a-t*n.b||0,n},ai.scale=function(e,t){return new ai(e,0,0,t,0,0)},ai.IDENTITY=ai.unit(),li=Ut.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 li(this.x,this.y)},rotate:function(e,t){var i=li.create(t)||li.ZERO;return this.transform(ai.rotate(e,i.x,i.y))},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 void 0===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=D(e),i=this,n=i.x,o=i.y;return this.x=t.a*n+t.c*o+t.e,this.y=t.b*n+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,i=this.y-e.y;return Math.sqrt(t*t+i*i)},round:function(e){return this.x=g(this.x,e),this.y=g(this.y,e),this.geometryChange(),this},toArray:function(e){var t=n(e),i=t?g(this.x,e):this.x,o=t?g(this.y,e):this.y;return[i,o]},toString:function(e,t){var i,o,r;return void 0===t&&(t=" "),i=this,o=i.x,r=i.y,n(e)&&(o=g(o,e),r=g(r,e)),o+t+r}}),li.create=function(e,t){if(n(e))return e instanceof li?e:1===arguments.length&&2===e.length?new li(e[0],e[1]):new li(e,t)},li.min=function(){var e,t,i=arguments,n=ei,o=ei;for(e=0;e<arguments.length;e++)t=i[e],n=Math.min(t.x,n),o=Math.min(t.y,o);return new li(n,o)},li.max=function(){var e,t,i=arguments,n=ti,o=ti;for(e=0;e<arguments.length;e++)t=i[e],n=Math.max(t.x,n),o=Math.max(t.y,o);return new li(n,o)},li.minPoint=function(){return new li(ti,ti)},li.maxPoint=function(){return new li(ei,ei)},Object.defineProperties&&Object.defineProperties(li,{ZERO:{get:function(){return new li(0,0)}}}),T(li.prototype,["x","y"]),Yt.extend(li.prototype),ci=Ut.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 ci(this.width,this.height)},toArray:function(e){var t=n(e),i=t?g(this.width,e):this.width,o=t?g(this.height,e):this.height;return[i,o]}}),ci.create=function(e,t){if(n(e))return e instanceof ci?e:1===arguments.length&&2===e.length?new ci(e[0],e[1]):new ci(e,t)},Object.defineProperties&&Object.defineProperties(ci,{ZERO:{get:function(){return new ci(0,0)}}}),T(ci.prototype,["width","height"]),Yt.extend(ci.prototype),di=Ut.extend({init:function(e,t){void 0===e&&(e=new li),void 0===t&&(t=new ci),this.setOrigin(e),this.setSize(t)},clone:function(){return new di(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",li.create(e)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(e){return this._observerField("size",ci.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),i=this.topRight().transformCopy(e),n=this.bottomRight().transformCopy(e),o=this.bottomLeft().transformCopy(e);return di.fromPoints(t,i,n,o)},transformCopy:function(e){return di.fromPoints(this.topLeft().transform(e),this.bottomRight().transform(e))},expand:function(e,t){return void 0===t&&(t=e),this.size.width+=2*e,this.size.height+=2*t,this.origin.translate(-e,-t),this},expandCopy:function(e,t){return this.clone().expand(e,t)},containsPoint:function(e){var t=this.origin,i=this.bottomRight();return!(e.x<t.x||e.y<t.y||i.x<e.x||i.y<e.y)},_isOnPath:function(e,t){var i=this.expandCopy(t,t),n=this.expandCopy(-t,-t);return i.containsPoint(e)&&!n.containsPoint(e)}}),di.fromPoints=function(){var e=li.min.apply(null,arguments),t=li.max.apply(null,arguments),i=new ci(t.x-e.x,t.y-e.y);return new di(e,i)},di.union=function(e,t){return di.fromPoints(li.min(e.topLeft(),t.topLeft()),li.max(e.bottomRight(),t.bottomRight()))},di.intersect=function(e,t){var i={left:e.topLeft().x,top:e.topLeft().y,right:e.bottomRight().x,bottom:e.bottomRight().y},n={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y};if(i.left<=n.right&&n.left<=i.right&&i.top<=n.bottom&&n.top<=i.bottom)return di.fromPoints(new li(Math.max(i.left,n.left),Math.max(i.top,n.top)),new li(Math.min(i.right,n.right),Math.min(i.bottom,n.bottom)))},Yt.extend(di.prototype),ui=Ut.extend({init:function(e){void 0===e&&(e=ai.unit()),this._matrix=e},clone:function(){return new ui(this._matrix.clone())},equals:function(e){return e&&e._matrix.equals(this._matrix)},translate:function(e,t){return this._matrix=this._matrix.multiplyCopy(ai.translate(e,t)),this._optionsChange(),this},scale:function(e,t,i){void 0===t&&(t=e),void 0===i&&(i=null);var n=i;return n&&(n=li.create(n),this._matrix=this._matrix.multiplyCopy(ai.translate(n.x,n.y))),this._matrix=this._matrix.multiplyCopy(ai.scale(e,t)),n&&(this._matrix=this._matrix.multiplyCopy(ai.translate(-n.x,-n.y))),this._optionsChange(),this},rotate:function(e,t){var i=li.create(t)||li.ZERO;return this._matrix=this._matrix.multiplyCopy(ai.rotate(e,i.x,i.y)),this._optionsChange(),this},multiply:function(e){var t=D(e);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this},matrix:function(e){return e?(this._matrix=e,this._optionsChange(),this):this._matrix},_optionsChange:function(){this.optionsChange({field:"transform",value:this})}}),Yt.extend(ui.prototype),hi=Ut.extend({init:function(e){this._initOptions(e)},_initOptions:function(e){var t,i;void 0===e&&(e={}),t=e.clip,i=e.transform,i&&(e.transform=A(i)),t&&!t.id&&(t.id=o()),this.options=new si(e),this.options.addObserver(this)},transform:function(e){return n(e)?void this.options.set("transform",A(e)):this.options.get("transform")},parentTransform:function(){for(var e,t,i=this;i.parent;)i=i.parent,t=i.transform(),t&&(e=t.matrix().multiplyCopy(e||ai.unit()));if(e)return A(e)},currentTransform:function(e){var t,i,n,o;if(void 0===e&&(e=this.parentTransform()),t=this.transform(),i=D(t),n=D(e),o=i&&n?n.multiplyCopy(i):i||n)return A(o)},visible:function(e){return n(e)?(this.options.set("visible",e),this):this.options.get("visible")!==!1},clip:function(e){var t=this.options;return n(e)?(e&&!e.id&&(e.id=o()),t.set("clip",e),this):t.get("clip")},opacity:function(e){return n(e)?(this.options.set("opacity",e),this):v(this.options.get("opacity"),1)},clippedBBox:function(e){var t,i=this._clippedBBox(e);if(i)return t=this.clip(),t?di.intersect(i,t.bbox(e)):i},containsPoint:function(e,t){var i,n;return!!this.visible()&&(i=this.currentTransform(t),n=e,i&&(n=e.transformCopy(i.matrix().invert())),this._hasFill()&&this._containsPoint(n)||this._isOnPath&&this._hasStroke()&&this._isOnPath(n))},_hasFill:function(){var e=this.options.fill;return e&&!d(e.color)},_hasStroke:function(){var e=this.options.stroke;return e&&e.width>0&&!d(e.color)},_clippedBBox:function(e){return this.bbox(e)}}),hi.prototype.nodeType="Element",Yt.extend(hi.prototype),pi=Math.PI/2,fi=Ut.extend({init:function(e,t){void 0===e&&(e=new li),void 0===t&&(t=0),this.setCenter(e),this.setRadius(t)},setCenter:function(e){return this._observerField("center",li.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 fi(this.center.clone(),this.radius)},pointAt:function(e){return this._pointAt(f(e))},bbox:function(e){var t,i,n,o,r=this,s=E(this.center,this.radius,this.radius,e),a=li.maxPoint(),l=li.minPoint();for(t=0;t<4;t++)i=r._pointAt(s.x+t*pi).transformCopy(e),n=r._pointAt(s.y+t*pi).transformCopy(e),o=new li(i.x,n.y),a=li.min(a,o),l=li.max(l,o);return di.fromPoints(a,l)},_pointAt:function(e){var t=this,i=t.center,n=t.radius;return new li(i.x+n*Math.cos(e),i.y+n*Math.sin(e))},containsPoint:function(e){var t=this,i=t.center,n=t.radius,o=Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)<=Math.pow(n,2);return o},_isOnPath:function(e,t){var i=this,n=i.center,o=i.radius,r=n.distanceTo(e);return o-t<=r&&r<=o+t}}),T(fi.prototype,["radius"]),Yt.extend(fi.prototype),mi="Gradient",gi={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var i,o=this.options;return n(e)?(e&&e.nodeType!==mi?(i={color:e},n(t)&&(i.opacity=t),o.set("fill",i)):o.set("fill",e),this):o.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")}},vi=""+ai.IDENTITY,_i={extend:function(e){e.bbox=this.bbox,e.geometryChange=this.geometryChange},bbox:function(e){var t,i,n=D(this.currentTransform(e)),o=n?""+n:vi;return this._bboxCache&&this._matrixHash===o?t=this._bboxCache.clone():(t=this._bbox(n),this._bboxCache=t?t.clone():null,this._matrixHash=o),i=this.options.get("stroke.width"),i&&t&&t.expand(i/2),t},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},bi="#000",wi=hi.extend({init:function(e,t){void 0===e&&(e=new fi),void 0===t&&(t={}),hi.fn.init.call(this,t),this.geometry(e),n(this.options.stroke)||this.stroke(bi)},rawBBox:function(){return this._geometry.bbox()},_bbox:function(e){return this._geometry.bbox(e)},_containsPoint:function(e){return this.geometry().containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),wi.prototype.nodeType="Circle",gi.extend(wi.prototype),_i.extend(wi.prototype),M(wi.prototype,["geometry"]),yi=10,ki=45,xi=Math.pow,Ci=Ut.extend({init:function(e,t){void 0===e&&(e=new li),void 0===t&&(t={}),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation},clone:function(){return new Ci(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(e){return this._observerField("center",li.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(e){var t=this.center,i=f(e);return new li(t.x+this.radiusX*Math.cos(i),t.y+this.radiusY*Math.sin(i))},curvePoints:function(){var e,t,i,n,o=this,r=this.startAngle,s=this.anticlockwise?-1:1,a=[this.pointAt(r)],l=this._arcInterval(),c=l.endAngle-l.startAngle,d=Math.ceil(c/ki),u=c/d,h=r;for(this.xRotation&&(e=A().rotate(this.xRotation,this.center)),t=1;t<=d;t++)i=h+s*u,n=o._intervalCurvePoints(h,i,e),a.push(n.cp1,n.cp2,n.p2),h=i;return a},bbox:function(e){for(var t,i,n=this,o=this._arcInterval(),s=o.startAngle,a=o.endAngle,l=E(this.center,this.radiusX,this.radiusY,e),c=r(l.x),d=r(l.y),u=this.pointAt(a).transformCopy(e),h=L(c,s),p=L(d,s),f=this.pointAt(s).transformCopy(e),m=li.min(f,u),g=li.max(f,u);h<a||p<a;)t=void 0,h<a&&(t=n.pointAt(h).transformCopy(e),h+=90),i=void 0,p<a&&(i=n.pointAt(p).transformCopy(e),p+=90),f=new li(t.x,i.y),m=li.min(m,f),g=li.max(g,f);return di.fromPoints(m,g)},_arcInterval:function(){var e,t=this,i=t.startAngle,n=t.endAngle,o=t.anticlockwise;return o&&(e=i,i=n,n=e),(i>n||o&&i===n)&&(n+=360),{startAngle:i,endAngle:n}},_intervalCurvePoints:function(e,t,i){var n=this.pointAt(e),o=this.pointAt(t),r=this._derivativeAt(e),s=this._derivativeAt(t),a=(f(t)-f(e))/3,l=new li(n.x+a*r.x,n.y+a*r.y),c=new li(o.x-a*s.x,o.y-a*s.y);return i&&(n.transform(i),o.transform(i),l.transform(i),c.transform(i)),{p1:n,cp1:l,cp2:c,p2:o}},_derivativeAt:function(e){var t=f(e);return new li(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},containsPoint:function(e){var t,i,n,o=this._arcInterval(),r=o.endAngle-o.startAngle,s=this,a=s.center,l=s.radiusX,c=s.radiusY,d=a.distanceTo(e),u=Math.atan2(e.y-a.y,e.x-a.x),h=l*c/Math.sqrt(xi(l,2)*xi(Math.sin(u),2)+xi(c,2)*xi(Math.cos(u),2)),p=this.pointAt(this.startAngle).round(yi),f=this.pointAt(this.endAngle).round(yi),m=P(a,e.round(yi),p,f);return r<180?t=m&&F(a.distanceTo(m),d)&&F(d,h):(i=z(a.x,a.y,l,c,e.x,e.y),360!==i&&(i=(360+i)%360),n=o.startAngle<=i&&i<=o.endAngle,t=n&&F(d,h)||!n&&(!m||m.equals(e))),t},_isOnPath:function(e,t){var i,n=this._arcInterval(),o=this.center,r=z(o.x,o.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==r&&(r=(360+r)%360),i=n.startAngle<=r&&r<=n.endAngle,i&&this.pointAt(r).distanceTo(e)<=t}}),Ci.fromPoints=function(e,t,i,n,o,r,s){var a=B({x1:e.x,y1:e.y,x2:t.x,y2:t.y,rx:i,ry:n,largeArc:o,swipe:r,rotation:s});return new Ci(a.center,{startAngle:a.startAngle,endAngle:a.endAngle,radiusX:a.radiusX,radiusY:a.radiusY,xRotation:a.xRotation,anticlockwise:0===r})},T(Ci.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Yt.extend(Ci.prototype),Si=[].push,Ti=[].pop,Di=[].splice,Ai=[].shift,Ei=[].slice,Ii=[].unshift,Mi=Ut.extend({init:function(e){void 0===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=Si.apply(this,e);return this._add(e),t},slice:function(){return Ei.call(this)},pop:function(){var e=this.length,t=Ti.apply(this);return e&&this._remove([t]),t},splice:function(e,t){var i=Ei.call(arguments,2),n=this._splice(e,t,i);return this._change(),n},shift:function(){var e=this.length,t=Ai.apply(this);return e&&this._remove([t]),t},unshift:function(){var e=arguments,t=Ii.apply(this,e);return this._add(e),t},indexOf:function(e){var t,i=this,n=this.length;for(t=0;t<n;t++)if(i[t]===e)return t;return-1},_splice:function(e,t,i){var n=Di.apply(this,[e,t].concat(i));return this._clearObserver(n),this._setObserver(i),n},_add:function(e){this._setObserver(e),this._change()},_remove:function(e){this._clearObserver(e),this._change()},_setObserver:function(e){var t,i=this;for(t=0;t<e.length;t++)e[t].addObserver(i)},_clearObserver:function(e){var t,i=this;for(t=0;t<e.length;t++)e[t].removeObserver(i)},_change:function(){}}),Yt.extend(Mi.prototype),Ri=Mi.extend({_change:function(){this.geometryChange()}}),Fi=Ut.extend({init:function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.real=e,this.img=t},add:function(e){return new Fi(g(this.real+e.real,yi),g(this.img+e.img,yi))},addConstant:function(e){return new Fi(this.real+e,this.img)},negate:function(){return new Fi((-this.real),(-this.img))},multiply:function(e){return new Fi(this.real*e.real-this.img*e.img,this.real*e.img+this.img*e.real)},multiplyConstant:function(e){return new Fi(this.real*e,this.img*e)},nthRoot:function(e){var t=Math.atan2(this.img,this.real),i=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),n=Math.pow(i,1/e);return new Fi(n*Math.cos(t/e),n*Math.sin(t/e))},equals:function(e){return this.real===e.real&&this.img===e.img},isReal:function(){return 0===this.img}}),Pi=Ut.extend({init:function(e,t,i){this.anchor(e||new li),this.controlIn(t),this.controlOut(i)},bboxTo:function(e,t){var i,n=this.anchor().transformCopy(t),o=e.anchor().transformCopy(t);return i=this.controlOut()&&e.controlIn()?this._curveBoundingBox(n,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),o):this._lineBoundingBox(n,o)},_lineBoundingBox:function(e,t){return di.fromPoints(e,t)},_curveBoundingBox:function(e,t,i,n){var o=[e,t,i,n],r=this._curveExtremesFor(o,"x"),s=this._curveExtremesFor(o,"y"),a=Y([r.min,r.max,e.x,n.x]),l=Y([s.min,s.max,e.y,n.y]);return di.fromPoints(new li(a.min,l.min),new li(a.max,l.max))},_curveExtremesFor:function(e,t){var i=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:V(i.min,t,e),max:V(i.max,t,e)}},_curveExtremes:function(e,t,i,n){var o,r,s=e-3*t+3*i-n,a=-2*(e-2*t+i),l=e-t,c=Math.sqrt(a*a-4*s*l),d=0,u=1;return 0===s?0!==a&&(d=u=-l/a):isNaN(c)||(d=(-a+c)/(2*s),u=(-a-c)/(2*s)),o=Math.max(Math.min(d,u),0),(o<0||o>1)&&(o=0),r=Math.min(Math.max(d,u),1),(r>1||r<0)&&(r=1),{min:o,max:r}},_intersectionsTo:function(e,t){var i;return i=this.controlOut()&&e.controlIn()?$([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):K(this.anchor(),e.anchor(),t)},_isOnCurveTo:function(e,t,i,n){var o,r,s,a,l,c,d,u=this.bboxTo(e).expand(i,i);if(u.containsPoint(t))return o=this.anchor(),r=this.controlOut(),s=e.controlIn(),a=e.anchor(),"start"===n&&o.distanceTo(t)<=i?!O(o,r,t):"end"===n&&a.distanceTo(t)<=i?!O(a,s,t):(l=[o,r,s,a],!(!G(l,t,"x","y",i)&&!G(l,t,"y","x",i))||(c=A().rotate(45,t),d=[o.transformCopy(c),r.transformCopy(c),s.transformCopy(c),a.transformCopy(c)],G(d,t,"x","y",i)||G(d,t,"y","x",i)))},_isOnLineTo:function(e,t,i){var n=this.anchor(),o=e.anchor(),s=r(Math.atan2(o.y-n.y,o.x-n.x)),a=new di([n.x,n.y-i/2],[n.distanceTo(o),i]);return a.containsPoint(t.transformCopy(A().rotate(-s,n)))},_isOnPathTo:function(e,t,i,n){var o;return o=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,i/2,n):this._isOnLineTo(e,t,i)}}),N(Pi.prototype,["anchor","controlIn","controlOut"]),Yt.extend(Pi.prototype),zi=hi.extend({init:function(e){hi.fn.init.call(this,e),this.paths=new Ri,this.paths.addObserver(this),n(this.options.stroke)||this.stroke("#000")},moveTo:function(e,t){var i=new Ui;return i.moveTo(e,t),this.paths.push(i),this},lineTo:function(e,t){return this.paths.length>0&&u(this.paths).lineTo(e,t),this},curveTo:function(e,t,i){return this.paths.length>0&&u(this.paths).curveTo(e,t,i),this},arc:function(e,t,i,n,o){return this.paths.length>0&&u(this.paths).arc(e,t,i,n,o),this},arcTo:function(e,t,i,n,o,r){return this.paths.length>0&&u(this.paths).arcTo(e,t,i,n,o,r),this},close:function(){return this.paths.length>0&&u(this.paths).close(),this},_bbox:function(e){return Q(this.paths,!0,e)},rawBBox:function(){return Q(this.paths,!1)},_containsPoint:function(e){var t,i=this.paths;for(t=0;t<i.length;t++)if(i[t]._containsPoint(e))return!0;return!1},_isOnPath:function(e){var t,i=this.paths,n=this.options.stroke.width;for(t=0;t<i.length;t++)if(i[t]._isOnPath(e,n))return!0;return!1},_clippedBBox:function(e){return X(this.paths,this.currentTransform(e))}}),zi.prototype.nodeType="MultiPath",gi.extend(zi.prototype),_i.extend(zi.prototype),Bi={l:function(e,t){var i,n,o=t.parameters,r=t.position;for(i=0;i<o.length;i+=2)n=new li(o[i],o[i+1]),t.isRelative&&n.translateWith(r),e.lineTo(n.x,n.y),r.x=n.x,r.y=n.y},c:function(e,t){var i,n,o,r,s=t.parameters,a=t.position;for(i=0;i<s.length;i+=6)n=new li(s[i],s[i+1]),o=new li(s[i+2],s[i+3]),r=new li(s[i+4],s[i+5]),t.isRelative&&(o.translateWith(a),n.translateWith(a),r.translateWith(a)),e.curveTo(n,o,r),a.x=r.x,a.y=r.y},v:function(e,t){var i=t.isRelative?0:t.position.x;Z(t.parameters,!0,i),this.l(e,t)},h:function(e,t){var i=t.isRelative?0:t.position.y;Z(t.parameters,!1,i),
this.l(e,t)},a:function(e,t){var i,n,o,r,s,a,l,c=t.parameters,d=t.position;for(i=0;i<c.length;i+=7)n=c[i],o=c[i+1],r=c[i+2],s=c[i+3],a=c[i+4],l=new li(c[i+5],c[i+6]),t.isRelative&&l.translateWith(d),d.x===l.x&&d.y===l.y||(e.arcTo(l,n,o,s,a,r),d.x=l.x,d.y=l.y)},s:function(e,t){var i,n,o,r,s,a=t.parameters,l=t.position,c=t.previousCommand;for("s"!==c&&"c"!==c||(i=u(u(e.paths).segments).controlIn()),n=0;n<a.length;n+=4)o=new li(a[n],a[n+1]),r=new li(a[n+2],a[n+3]),s=void 0,t.isRelative&&(o.translateWith(l),r.translateWith(l)),s=i?J(i,l):l.clone(),i=o,e.curveTo(s,o,r),l.x=r.x,l.y=r.y},q:function(e,t){var i,n,o,r,s=t.parameters,a=t.position;for(i=0;i<s.length;i+=4)n=new li(s[i],s[i+1]),o=new li(s[i+2],s[i+3]),t.isRelative&&(n.translateWith(a),o.translateWith(a)),r=ee(a,n,o),e.curveTo(r.controlOut,r.controlIn,o),a.x=o.x,a.y=o.y},t:function(e,t){var i,n,o,r,s,a=t.parameters,l=t.position,c=t.previousCommand;for("q"!==c&&"t"!==c||(n=u(u(e.paths).segments),i=n.controlIn().clone().translateWith(l.scaleCopy(-1/3)).scale(1.5)),o=0;o<a.length;o+=2)r=new li(a[o],a[o+1]),t.isRelative&&r.translateWith(l),i=i?J(i,l):l.clone(),s=ee(l,i,r),e.curveTo(s.controlOut,s.controlIn,r),l.x=r.x,l.y=r.y}},Li=1/3,Hi=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,Ni=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,Oi="m",Vi="z",Wi=Ut.extend({parse:function(e,t){var i,n=new zi(t),o=new li;return e.replace(Hi,function(e,t,r,s){var a=t.toLowerCase(),l=a===t,c=te(r.trim());if(a===Oi&&(l?(o.x+=c[0],o.y+=c[1]):(o.x=c[0],o.y=c[1]),n.moveTo(o.x,o.y),c.length>2&&(a="l",c.splice(0,2))),Bi[a])Bi[a](n,{parameters:c,position:o,isRelative:l,previousCommand:i}),s&&s.toLowerCase()===Vi&&n.close();else if(a!==Oi)throw Error("Error while parsing SVG path. Unsupported command: "+a);i=a}),n}}),Wi.current=new Wi,Ui=hi.extend({init:function(e){hi.fn.init.call(this,e),this.segments=new Ri,this.segments.addObserver(this),n(this.options.stroke)||(this.stroke("#000"),n(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 i=n(t)?new li(e,t):e,o=new Pi(i);return this.segments.push(o),this},curveTo:function(e,t,i){var n,o;return this.segments.length>0&&(n=u(this.segments),o=new Pi(i,t),this.suspend(),n.controlOut(e),this.resume(),this.segments.push(o)),this},arc:function(e,t,i,n,o){var r,s,a,l,c;return this.segments.length>0&&(r=u(this.segments),s=r.anchor(),a=f(e),l=new li(s.x-i*Math.cos(a),s.y-n*Math.sin(a)),c=new Ci(l,{startAngle:e,endAngle:t,radiusX:i,radiusY:n,anticlockwise:o}),this._addArcSegments(c)),this},arcTo:function(e,t,i,n,o,r){var s,a,l;return this.segments.length>0&&(s=u(this.segments),a=s.anchor(),l=Ci.fromPoints(a,e,t,i,n,o,r),this._addArcSegments(l)),this},_addArcSegments:function(e){var t,i,n=this;for(this.suspend(),t=e.curvePoints(),i=1;i<t.length;i+=3)n.curveTo(t[i],t[i+1],t[i+2]);this.resume(),this.geometryChange()},close:function(){return this.options.closed=!0,this.geometryChange(),this},rawBBox:function(){return this._bbox()},_containsPoint:function(e){var t,i,n,o=this.segments,r=o.length,s=0;for(n=1;n<r;n++)t=o[n-1],i=o[n],s+=t._intersectionsTo(i,e);return!this.options.closed&&o[0].anchor().equals(o[r-1].anchor())||(s+=K(o[0].anchor(),o[r-1].anchor(),e)),s%2!==0},_isOnPath:function(e,t){var i,n=this.segments,o=n.length,r=t||this.options.stroke.width;if(o>1){if(n[0]._isOnPathTo(n[1],e,r,"start"))return!0;for(i=2;i<=o-2;i++)if(n[i-1]._isOnPathTo(n[i],e,r))return!0;if(n[o-2]._isOnPathTo(n[o-1],e,r,"end"))return!0}return!1},_bbox:function(e){var t,i,n,o,r=this.segments,s=r.length;if(1===s)i=r[0].anchor().transformCopy(e),t=new di(i,ci.ZERO);else if(s>0)for(n=1;n<s;n++)o=r[n-1].bboxTo(r[n],e),t=t?di.union(t,o):o;return t}}),Ui.fromRect=function(e,t){return new Ui(t).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close()},Ui.fromPoints=function(e,t){var i,n,o;if(e){for(i=new Ui(t),n=0;n<e.length;n++)o=li.create(e[n]),o&&(0===n?i.moveTo(o):i.lineTo(o));return i}},Ui.fromArc=function(e,t){var i=new Ui(t),n=e.startAngle,o=e.pointAt(n);return i.moveTo(o.x,o.y),i.arc(n,e.endAngle,e.radiusX,e.radiusY,e.anticlockwise),i},Ui.prototype.nodeType="Path",gi.extend(Ui.prototype),_i.extend(Ui.prototype),Ui.parse=function(e,t){return Wi.current.parse(e,t)},qi="#000",ji=hi.extend({init:function(e,t){void 0===e&&(e=new Ci),void 0===t&&(t={}),hi.fn.init.call(this,t),this.geometry(e),n(this.options.stroke)||this.stroke(qi)},_bbox:function(e){return this._geometry.bbox(e)},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var e,t=new Ui,i=this.geometry().curvePoints();if(i.length>0)for(t.moveTo(i[0].x,i[0].y),e=1;e<i.length;e+=3)t.curveTo(i[e],i[e+1],i[e+2]);return t},_containsPoint:function(e){return this.geometry().containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),ji.prototype.nodeType="Arc",gi.extend(ji.prototype),_i.extend(ji.prototype),M(ji.prototype,["geometry"]),Gi="12px sans-serif",$i="#000",Ki=hi.extend({init:function(e,t,i){void 0===t&&(t=new li),void 0===i&&(i={}),hi.fn.init.call(this,i),this.content(e),this.position(t),this.options.font||(this.options.font=Gi),n(this.options.fill)||this.fill($i)},content:function(e){return n(e)?(this.options.set("content",e),this):this.options.get("content")},measure:function(){var e=qt.measureText(this.content(),{font:this.options.get("font")});return e},rect:function(){var e=this.measure(),t=this.position().clone();return new di(t,[e.width,e.height])},bbox:function(e){var t=D(this.currentTransform(e));return this.rect().bbox(t)},rawBBox:function(){return this.rect().bbox()},_containsPoint:function(e){return this.rect().containsPoint(e)}}),Ki.prototype.nodeType="Text",gi.extend(Ki.prototype),N(Ki.prototype,["position"]),Yi=hi.extend({init:function(e,t,i){void 0===t&&(t=new di),void 0===i&&(i={}),hi.fn.init.call(this,i),this.src(e),this.rect(t)},src:function(e){return n(e)?(this.options.set("src",e),this):this.options.get("src")},bbox:function(e){var t=D(this.currentTransform(e));return this._rect.bbox(t)},rawBBox:function(){return this._rect.bbox()},_containsPoint:function(e){return this._rect.containsPoint(e)},_hasFill:function(){return this.src()}}),Yi.prototype.nodeType="Image",M(Yi.prototype,["rect"]),Qi={extend:function(e,t){e.traverse=function(e){var i,n,o=this[t];for(i=0;i<o.length;i++)n=o[i],n.traverse?n.traverse(e):e(n);return this}}},Xi=hi.extend({init:function(e){hi.fn.init.call(this,e),this.children=[]},childrenChange:function(e,t,i){this.trigger("childrenChange",{action:e,items:t,index:i})},append:function(){return t(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=this.children.indexOf(e);return t>=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},removeAt:function(e){if(0<=e&&e<this.children.length){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 Q(this.children,!0,this.currentTransform(e))},rawBBox:function(){return Q(this.children,!1)},_clippedBBox:function(e){return X(this.children,this.currentTransform(e))},currentTransform:function(e){return hi.prototype.currentTransform.call(this,e)||null},containsPoint:function(e,t){var i,n,o;if(this.visible())for(i=this.children,n=this.currentTransform(t),o=0;o<i.length;o++)if(i[o].containsPoint(e,n))return!0;return!1},_reparent:function(e,t){var i,n,o,r=this;for(i=0;i<e.length;i++)n=e[i],o=n.parent,o&&o!==r&&o.remove&&o.remove(n),n.parent=t}}),Xi.prototype.nodeType="Group",Qi.extend(Xi.prototype,"children"),Zi={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0,revers:!1},Ji=function(e,t){e.forEach(t)},en=function(e,t){var i,n=e.length;for(i=n-1;i>=0;i--)t(e[i],i)},tn=Xi.extend({init:function(t,i){Xi.fn.init.call(this,e.extend({},Zi,i)),this._rect=t,this._fieldMap={}},rect:function(e){return e?(this._rect=e,this):this._rect},_initMap:function(){var e=this.options,t=this._fieldMap;"horizontal"===e.orientation?(t.sizeField="width",t.groupsSizeField="height",t.groupAxis="x",t.groupsAxis="y"):(t.sizeField="height",t.groupsSizeField="width",t.groupAxis="y",t.groupsAxis="x"),e.reverse?(this.forEach=en,this.justifyAlign=oe):(this.forEach=Ji,this.justifyAlign=ne)},reflow:function(){var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C=this;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),e=this.options,t=this._rect,i=this._initGroups(),n=i.groups,o=i.groupsSize,r=this._fieldMap,s=r.sizeField,a=r.groupsSizeField,l=r.groupAxis,c=r.groupsAxis,d=new li,u=new li,h=new ci,p=ne(o,t,e.alignContent,c,a),v=function(t,i){var n=m.elements[i];u[l]=f,u[c]=ne(t.size[a],g,e.alignItems,c,a),ie(u,t,n),f+=t.size[s]+e.spacing},_=0;_<n.length;_++)m=n[_],d[l]=f=C.justifyAlign(m.size,t,e.justifyContent,l,s),d[c]=p,h[s]=m.size,h[a]=m.lineSize,g=new di(d,h),C.forEach(m.bboxes,v),p+=m.lineSize+e.lineSpacing;!e.wrap&&m.size>t.size[s]&&(b=t.size[s]/g.size[s],w=g.topLeft().scale(b,b),y=g.size[a]*b,k=ne(y,t,e.alignContent,c,a),x=A(),"x"===l?x.translate(t.origin.x-w.x,k-w.y):x.translate(k-w.x,t.origin.y-w.y),x.scale(b,b),this.transform(x))}},_initGroups:function(){var e,t,i,n=this,o=this,r=o.options,s=o.children,a=r.lineSpacing,l=r.wrap,c=r.spacing,d=this._fieldMap.sizeField,u=this._newGroup(),h=[],p=function(){h.push(u),f+=u.lineSize+a},f=-a;for(e=0;e<s.length;e++)t=s[e],i=s[e].clippedBBox(),t.visible()&&i&&(l&&u.size+i.size[d]+c>n._rect.size[d]?0===u.bboxes.length?(n._addToGroup(u,i,t),p(),u=n._newGroup()):(p(),u=n._newGroup(),n._addToGroup(u,i,t)):n._addToGroup(u,i,t));return u.bboxes.length&&p(),{groups:h,groupsSize:f}},_addToGroup:function(e,t,i){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(i)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),nn=hi.extend({init:function(e,t){void 0===e&&(e=new di),void 0===t&&(t={}),hi.fn.init.call(this,t),this.geometry(e),n(this.options.stroke)||this.stroke("#000")},_bbox:function(e){return this._geometry.bbox(e)},rawBBox:function(){return this._geometry.bbox()},_containsPoint:function(e){return this._geometry.containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),nn.prototype.nodeType="Rect",gi.extend(nn.prototype),_i.extend(nn.prototype),M(nn.prototype,["geometry"]),on=Mi.extend({_change:function(){this.optionsChange({field:"stops"})}}),rn=Ut.extend({init:function(e,t,i){this.options=new si({offset:e,color:t,opacity:n(i)?i:1}),this.options.addObserver(this)}}),rn.create=function(e){if(n(e)){var t;return t=e instanceof rn?e:e.length>1?new rn(e[0],e[1],e[2]):new rn(e.offset,e.color,e.opacity)}},_e(rn.prototype,["offset","color","opacity"]),Yt.extend(rn.prototype),sn=Ut.extend({init:function(e){void 0===e&&(e={}),this.stops=new on(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=o()},userSpace:function(e){return n(e)?(this._userSpace=e,this.optionsChange(),this):this._userSpace},_createStops:function(e){var t,i;for(void 0===e&&(e=[]),t=[],i=0;i<e.length;i++)t.push(rn.create(e[i]));return t},addStop:function(e,t,i){this.stops.push(new rn(e,t,i))},removeStop:function(e){var t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}}),sn.prototype.nodeType="Gradient",Yt.extend(sn.prototype),e.extend(sn.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),an=sn.extend({init:function(e){void 0===e&&(e={}),sn.fn.init.call(this,e),this.start(e.start||new li),this.end(e.end||new li(1,0))}}),N(an.prototype,["start","end"]),ln=sn.extend({init:function(e){void 0===e&&(e={}),sn.fn.init.call(this,e),this.center(e.center||new li),this._radius=n(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill},radius:function(e){return n(e)?(this._radius=e,this.geometryChange(),this):this._radius},fallbackFill:function(e){return n(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill}}),N(ln.prototype,["center"]),cn={swing:be,linear:we,easeOutElastic:ye},dn=Ut.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e,t){var i,n,o,r=this._items;if(t&&t.type)for(n=t.type.toLowerCase(),o=0;o<r.length;o++)if(r[o].name.toLowerCase()===n){i=r[o];break}if(i)return new i.type(e,t)}}),dn.current=new dn,un=Date.now||function(){return(new Date).getTime()},hn=Ut.extend({init:function(t,i){this.options=e.extend({},this.options,i),this.element=t},setup:function(){},step:function(){},play:function(){var e,t,i,n=this,o=this.options,r=o.duration,s=o.delay;void 0===s&&(s=0),e=cn[o.easing],t=un()+s,i=t+r,0===r?(this.step(1),this.abort()):setTimeout(function(){var o=function(){var s,a,l,c;n._stopped||(s=un(),a=h(s-t,0,r),l=a/r,c=e(l,a,0,1,r),n.step(c),s<i?kendo.animationFrame(o):n.abort())};o()},s)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),hn.prototype.options={duration:500,easing:"swing"},hn.create=function(e,t,i){return dn.current.create(e,t,i)},pn=Ut.extend({init:function(){this._items=[]},register:function(e,t,i){var n=this._items,o=n[0],r={name:e,type:t,order:i};!o||i<o.order?n.unshift(r):n.push(r)},create:function(e,t){var i,n,o=this._items,r=o[0];if(t&&t.type)for(i=t.type.toLowerCase(),n=0;n<o.length;n++)if(o[n].name===i){r=o[n];break}return r?new r.type(e,t):void kendo.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)}}),pn.current=new pn,fn=["click","mouseenter","mouseleave","mousemove","resize"],mn=kendo.Observable.extend({init:function(t,i){kendo.Observable.fn.init.call(this),this.options=e.extend({},i),this.element=t,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new Xi,k(t,this.options),this.bind(fn,this.options),this._enableTracking()},draw:function(e){this._visual.children.push(e)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()},eventTarget:function(e){for(var t,i=this,n=c(e);!t&&n&&(t=n._kendoNode,n!==i.element);)n=n.parentElement;if(t)return t.srcElement},exportVisual:function(){return this._visual},getSize:function(){return k(this.element)},currentSize:function(e){return e?void(this._size=e):this._size},setSize:function(e){k(this.element,e),this.currentSize(e),this._resize()},resize:function(e){var t=this.getSize(),i=this.currentSize();(e||(t.width>0||t.height>0)&&(!i||t.width!==i.width||t.height!==i.height))&&(this.currentSize(t),this._resize(t,e),this.trigger("resize",t))},size:function(e){return e?void this.setSize(e):this.getSize()},suspendTracking:function(){this._suspendedTracking=!0},resumeTracking:function(){this._suspendedTracking=!1},_enableTracking:function(){},_resize:function(){},_handler:function(e){var t=this;return function(i){var n=t.eventTarget(i);n&&!t._suspendedTracking&&t.trigger(e,{element:n,originalEvent:i,type:e})}},_elementOffset:function(){var e=this.element,t=w(e,["paddingLeft","paddingTop"]),i=t.paddingLeft,n=t.paddingTop,o=b(e),r=o.left,s=o.top;return{left:r+parseInt(i,10),top:s+parseInt(n,10)}},_surfacePoint:function(e){var t=this._elementOffset(),i=l(e),n=i.x-t.left,o=i.y-t.top;return new li(n,o)}}),mn.create=function(e,t){return pn.current.create(e,t)},mn.support={},gn=Ut.extend({init:function(e){this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())},destroy:function(){var e,t,i=this;for(this.srcElement&&this.srcElement.removeObserver(this),e=this.childNodes,t=0;t<e.length;t++)i.childNodes[t].destroy();this.parent=null},load:function(){},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 i,n=this,o=e+t;for(i=e;i<o;i++)n.childNodes[i].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()}}),vn={},_n="http://www.w3.org/2000/svg",bn="none",wn=function(e,t){e.innerHTML=t},"undefined"!=typeof document&&(yn="<svg xmlns='"+_n+"'></svg>",kn=document.createElement("div"),xn="undefined"!=typeof DOMParser,kn.innerHTML=yn,xn&&kn.firstChild.namespaceURI!==_n&&(wn=function(e,t){var i=new DOMParser,n=i.parseFromString(t,"text/xml"),o=document.adoptNode(n.documentElement);e.innerHTML="",e.appendChild(o)})),Cn=wn,Sn="transform",Tn={clip:"clip-path",fill:"fill"},Dn=gn.extend({init:function(e,t){gn.fn.init.call(this,e),this.definitions={},this.options=t},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),gn.fn.destroy.call(this)},load:function(e,t){var i,o,r,s,a,l=this;for(i=0;i<e.length;i++)o=e[i],r=o.children,s=new vn[o.nodeType](o,l.options),n(t)?l.insertAt(s,t):l.append(s),s.createDefinitions(),r&&r.length>0&&s.load(r),a=l.element,a&&s.attachTo(a,t)},root:function(){for(var e=this;e.parent;)e=e.parent;return e},attachTo:function(e,t){var i,o=document.createElement("div");Cn(o,"<svg xmlns='"+_n+"' version='1.1'>"+this.render()+"</svg>"),i=o.firstChild.firstChild,i&&(n(t)?e.insertBefore(i,e.childNodes[t]||null):e.appendChild(i),this.setElement(i))},setElement:function(e){var t,i,n;for(this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this,t=this.childNodes,i=0;i<t.length;i++)n=e.childNodes[i],t[i].setElement(n)},clear:function(){var e,t;for(this.clearDefinitions(),this.element&&(this.element.innerHTML=""),e=this.childNodes,t=0;t<e.length;t++)e[t].destroy();this.childNodes=[]},removeSelf:function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}gn.fn.removeSelf.call(this)},template:function(){return this.renderChildren()},render:function(){return this.template()},renderChildren:function(){var e,t=this.childNodes,i="";for(e=0;e<t.length;e++)i+=t[e].render();return i},optionsChange:function(e){var t=e.field,i=e.value;"visible"===t?this.css("display",i?"":bn):Tn[t]&&Se(t,i)?this.updateDefinition(t,i):"opacity"===t?this.attr("opacity",i):"cursor"===t?this.css("cursor",i):"id"===t&&(i?this.attr("id",i):this.removeAttr("id")),gn.fn.optionsChange.call(this,e)},attr:function(e,t){this.element&&this.element.setAttribute(e,t)},allAttr:function(e){var t,i=this;for(t=0;t<e.length;t++)i.attr(e[t][0],e[t][1])},css:function(e,t){this.element&&(this.element.style[e]=t)},allCss:function(e){var t,i=this;for(t=0;t<e.length;t++)i.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([Sn,"matrix("+e.matrix().toString(6)+")"]),t},renderTransform:function(){return xe(this.mapTransform(this.srcElement.transform()))},transformChange:function(e){e?this.allAttr(this.mapTransform(e)):this.removeAttr(Sn)},mapStyle:function(){var e=this.srcElement.options,t=[["cursor",e.cursor]];return e.visible===!1&&t.push(["display",bn]),t},renderStyle:function(){return ke("style",Ce(this.mapStyle(!0)))},renderOpacity:function(){return ke("opacity",this.srcElement.options.opacity)},renderId:function(){return ke("id",this.srcElement.options.id)},createDefinitions:function(){var e,t,i,n,o=this.srcElement,r=this.definitions;if(o){e=o.options;for(i in Tn)n=e.get(i),n&&Se(i,n)&&(r[i]=n,t=!0);t&&this.definitionChange({action:"add",definitions:r})}},definitionChange:function(e){this.parent&&this.parent.definitionChange(e)},updateDefinition:function(e,t){var i=this.definitions,n=i[e],o=Tn[e],r={};n&&(r[e]=n,this.definitionChange({action:"remove",definitions:r}),delete i[e]),t?(r[e]=t,this.definitionChange({action:"add",definitions:r}),i[e]=t,this.attr(o,this.refUrl(t.id))):n&&this.removeAttr(o)},clearDefinitions:function(){var e=this.definitions;this.definitionChange({action:"remove",definitions:e}),this.definitions={}},renderDefinitions:function(){return xe(this.mapDefinitions())},mapDefinitions:function(){var e,t=this,i=this.definitions,n=[];for(e in i)n.push([Tn[e],t.refUrl(i[e].id)]);return n},refUrl:function(e){var t=(this.options||{}).skipBaseHref,i=this.baseUrl().replace(/'/g,"\\'"),n=t?"":i;return"url("+n+"#"+e+")"},baseUrl:function(){return Te()}}),An=Dn.extend({template:function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},renderOffset:function(){return ke("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)}}),En=Dn.extend({init:function(e){Dn.fn.init.call(this,e),this.id=e.id,this.loadStops()},loadStops:function(){var e,t,i=this,n=this.srcElement.stops,o=this.element;for(e=0;e<n.length;e++)t=new An(n[e]),i.append(t),o&&t.attachTo(o)},optionsChange:function(e){"gradient.stops"===e.field?(gn.prototype.clear.call(this),this.loadStops()):"gradient"===e.field&&this.allAttr(this.mapCoordinates())},renderCoordinates:function(){return xe(this.mapCoordinates())},mapSpace:function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]}}),In=En.extend({template:function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},mapCoordinates:function(){var e=this.srcElement,t=e.start(),i=e.end(),n=[["x1",t.x],["y1",t.y],["x2",i.x],["y2",i.y],this.mapSpace()];return n}}),Mn=En.extend({template:function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},mapCoordinates:function(){var e=this.srcElement,t=e.center(),i=e.radius(),n=[["cx",t.x],["cy",t.y],["r",i],this.mapSpace()];return n}}),Rn=Dn.extend({init:function(e){Dn.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"}}),Fn=Dn.extend({init:function(){Dn.fn.init.call(this),this.definitionMap={}},attachTo:function(e){this.element=e},template:function(){return"<defs>"+this.renderChildren()+"</defs>"},definitionChange:function(e){var t=e.definitions,i=e.action;"add"===i?this.addDefinitions(t):"remove"===i&&this.removeDefinitions(t)},createDefinition:function(e,t){var i;return"clip"===e?i=Rn:"fill"===e&&(t instanceof an?i=In:t instanceof ln&&(i=Mn)),new i(t)},addDefinitions:function(e){var t,i=this;for(t in e)i.addDefinition(t,e[t])},addDefinition:function(e,t){var i,n=this,o=n.element,r=n.definitionMap,s=t.id,a=r[s];a?a.count++:(i=this.createDefinition(e,t),r[s]={element:i,count:1},this.append(i),o&&i.attachTo(this.element))},removeDefinitions:function(e){var t,i=this;for(t in e)i.removeDefinition(e[t])},removeDefinition:function(e){var t=this.definitionMap,i=e.id,n=t[i];n&&(n.count--,0===n.count&&(this.remove(this.childNodes.indexOf(n.element),1),delete t[i]))}}),Pn=Dn.extend({init:function(e){Dn.fn.init.call(this),this.options=e,this.defs=new Fn},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){gn.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(e){this.defs.definitionChange(e)}}),zn="rtl",Bn=mn.extend({init:function(t,i){mn.fn.init.call(this,t,i),this._root=new Pn(e.extend({rtl:w(t,"direction").direction===zn},this.options)),Cn(this.element,this._template()),this._rootElement=this.element.firstElementChild,De(this._rootElement),this._root.attachTo(this._rootElement),_(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,x(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),mn.fn.destroy.call(this)},translate:function(e){var t=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){mn.fn.draw.call(this,e),this._root.load([e])},clear:function(){mn.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template()},exportVisual:function(){var e,t=this,i=t._visual,n=t._offset;return n&&(e=new Xi,e.children.push(i),e.transform(A().translate(-n.x,-n.y)),i=e),i},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+_n+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"}}),Bn.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(mn.support.svg=!0,pn.current.register("svg",Bn,10)),Ln=Dn.extend({template:function(){return"<g"+(this.renderId()+this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},optionsChange:function(e){"transform"===e.field&&this.transformChange(e.value),Dn.fn.optionsChange.call(this,e)}}),vn.Group=Ln,Hn={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]},Nn="solid",On="butt",Vn={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Wn=" ",Un=Dn.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"transform":this.transformChange(e.value);break;default:var t=Vn[e.field];t&&this.attr(t,e.value)}Dn.fn.optionsChange.call(this,e)},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(e){var t,i,n,o,r,s=this,a=e.segments,l=a.length;if(l>0){for(t=[],o=1;o<l;o++)r=s.segmentType(a[o-1],a[o]),r!==n&&(n=r,t.push(r)),t.push("L"===r?s.printPoints(a[o].anchor()):s.printPoints(a[o-1].controlOut(),a[o].controlIn(),a[o].anchor()));return i="M"+this.printPoints(a[0].anchor())+Wn+t.join(Wn),e.options.closed&&(i+="Z"),i}},printPoints:function(){var e,t=arguments,i=t.length,n=[];for(e=0;e<i;e++)n.push(t[e].toString(3));return n.join(" ")},segmentType:function(e,t){return e.controlOut()&&t.controlIn()?"C":"L"},mapStroke:function(e){var t=[];return e&&!d(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]),n(e.opacity)&&t.push(["stroke-opacity",e.opacity]),n(e.dashType)&&t.push(["stroke-dasharray",this.renderDashType(e)])):t.push(["stroke",bn]),t},renderStroke:function(){return xe(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(e){var t,i,n,o=e.dashType,r=e.width;if(void 0===r&&(r=1),o&&o!==Nn){for(t=Hn[o.toLowerCase()],i=[],n=0;n<t.length;n++)i.push(t[n]*r);return i.join(" ")}},renderLinecap:function(e){var t=e.dashType,i=e.lineCap;return t&&"solid"!==t?On:i},mapFill:function(e){var t=[];return e&&"Gradient"===e.nodeType||(e&&!d(e.color)?(t.push(["fill",e.color]),n(e.opacity)&&t.push(["fill-opacity",e.opacity])):t.push(["fill",bn])),t},renderFill:function(){return xe(this.mapFill(this.srcElement.options.fill))},template:function(){return"<path "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" "+ke("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"}}),vn.Path=Un,qn=Un.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),vn.Arc=qn,jn=Un.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:function(){return"<circle "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"}}),vn.Circle=jn,Gn=Un.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:function(){return"<rect "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"}}),vn.Rect=Gn,$n=Un.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),Un.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 xe(this.mapPosition())},mapSource:function(e){var t=this.srcElement.src();return e&&(t=kendo.htmlEncode(t)),[["xlink:href",t]]},renderSource:function(){return xe(this.mapSource(!0))},template:function(){return"<image preserveAspectRatio='none' "+this.renderId()+" "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"}}),vn.Image=$n,Kn=/&(?:[a-zA-Z]+|#\d+);/g,"undefined"!=typeof document&&(Ae._element=document.createElement("span")),Yn=Un.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",Ce(this.mapStyle())),this.geometryChange()):"content"===e.field&&Un.fn.content.call(this,this.srcElement.content()),Un.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=Un.fn.mapStyle.call(this,e),i=this.srcElement.options.font;return e&&(i=kendo.htmlEncode(i)),t.push(["font",i],["white-space","pre"]),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=Ae(e),e=kendo.htmlEncode(e),qt.normalizeText(e)},renderTextAnchor:function(){var e;return!(this.options||{}).rtl||Gt.msie||Gt.edge||(e="end"),ke("text-anchor",e)},template:function(){return"<text "+this.renderId()+" "+this.renderTextAnchor()+" "+this.renderStyle()+" "+this.renderOpacity()+"x='"+this.pos().x+"' y='"+this.pos().y+"' "+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"}}),vn.Text=Yn,Qn=Un.extend({renderData:function(){var e,t,i=this,n=this.srcElement.paths;if(n.length>0){for(e=[],t=0;t<n.length;t++)e.push(i.printPath(n[t]));return e.join(" ")}}}),vn.MultiPath=Qn,Xn={Circle:fi,Arc:Ci,Rect:di,Point:li,Segment:Pi,Matrix:ai,Size:ci,toMatrix:D,Transformation:ui,transform:A},Zn={Surface:Bn,RootNode:Pn,Node:Dn,GroupNode:Ln,ArcNode:qn,CircleNode:jn,RectNode:Gn,ImageNode:$n,TextNode:Yn,PathNode:Un,MultiPathNode:Qn,DefinitionNode:Fn,ClipNode:Rn,GradientStopNode:An,LinearGradientNode:In,RadialGradientNode:Mn,exportGroup:Ee},Jn={},eo=gn.extend({init:function(e){gn.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(),gn.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(e){this.clip&&(e.beginPath(),Ie(e,this.clip),e.clip())},optionsChange:function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),gn.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,i){var o,r,s,a,l=this;for(o=0;o<e.length;o++)r=e[o],s=r.children,a=new Jn[r.nodeType](r,i),s&&s.length>0&&a.load(s,t,i),n(t)?l.insertAt(a,t):l.append(a)},load:function(e,t,i){this.loadElements(e,t,i),this.invalidate()},setOpacity:function(e){if(this.srcElement){var t=this.srcElement.opacity();n(t)&&this.globalAlpha(e,t)}},globalAlpha:function(e,t){var i=t;i&&e.globalAlpha&&(i*=e.globalAlpha),e.globalAlpha=i},visible:function(){var e=this.srcElement;return!e||e&&e.options.visible!==!1}}),to=eo.extend({renderTo:function(e){var t,i,n;if(this.visible()){for(e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),t=this.childNodes,i=0;i<t.length;i++)n=t[i],n.visible()&&n.renderTo(e);e.restore()}}}),Qi.extend(to.prototype,"childNodes"),Jn.Group=to,io=1e3/60,no=to.extend({init:function(e){to.fn.init.call(this),this.canvas=e,this.ctx=e.getContext("2d");var t=this._invalidate.bind(this);this.invalidate=kendo.throttle(function(){kendo.animationFrame(t)},io)},destroy:function(){to.fn.destroy.call(this),this.canvas=null,this.ctx=null},load:function(e,t,i){this.loadElements(e,t,i),this._invalidate()},_invalidate:function(){this.ctx&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx))}}),Qi.extend(no.prototype,"childNodes"),oo=Ut.extend({init:function(){this.shapes=[]},_add:function(e,t){this.shapes.push({bbox:t,shape:e}),e._quadNode=this},pointShapes:function(e){var t,i=this.shapes,n=i.length,o=[];for(t=0;t<n;t++)i[t].bbox.containsPoint(e)&&o.push(i[t].shape);return o},insert:function(e,t){this._add(e,t)},remove:function(e){var t,i=this.shapes,n=i.length;for(t=0;t<n;t++)if(i[t].shape===e){i.splice(t,1);break}}}),ro=oo.extend({init:function(e){oo.fn.init.call(this),this.children=[],this.rect=e},inBounds:function(e){var t=this.rect,i=t.bottomRight(),n=e.bottomRight(),o=t.origin.x<=e.origin.x&&t.origin.y<=e.origin.y&&n.x<=i.x&&n.y<=i.y;return o},pointShapes:function(e){var i,n=this.children,o=n.length,r=oo.fn.pointShapes.call(this,e);for(i=0;i<o;i++)t(r,n[i].pointShapes(e));return r},insert:function(e,t){var i,n=this.children,o=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(e,t);else{for(n.length||this._initChildren(),i=0;i<n.length;i++)if(n[i].insert(e,t)){o=!0;break}o||this._add(e,t)}o=!0}return o},_initChildren:function(){var e=this,t=e.rect,i=e.children,n=t.center(),o=t.width()/2,r=t.height()/2;i.push(new ro(new di([t.origin.x,t.origin.y],[o,r])),new ro(new di([n.x,t.origin.y],[o,r])),new ro(new di([t.origin.x,n.y],[o,r])),new ro(new di([n.x,n.y],[o,r])))}}),so=3e3,ao=1e4,lo=75,co=Ut.extend({init:function(){this.initRoots()},initRoots:function(){this.rootMap={},this.root=new oo,this.rootElements=[]},clear:function(){var e,t=this,i=this.rootElements;for(e=0;e<i.length;e++)t.remove(i[e]);this.initRoots()},pointShape:function(e){var t,i=(this.rootMap[Math.floor(e.x/so)]||{})[Math.floor(e.y/so)],n=this.root.pointShapes(e);for(i&&(n=n.concat(i.pointShapes(e))),this.assignZindex(n),n.sort(Me),t=0;t<n.length;t++)if(n[t].containsPoint(e))return n[t]},assignZindex:function(e){var t,i,n,o,r,s=this;for(t=0;t<e.length;t++){for(i=e[t],n=0,o=Math.pow(ao,lo),r=[];i;)r.push(i),i=i.parent;for(;r.length;)i=r.pop(),n+=((i.parent?i.parent.children:s.rootElements).indexOf(i)+1)*o,o/=ao;e[t]._zIndex=n}},optionsChange:function(e){"transform"!==e.field&&"stroke.width"!==e.field||this.bboxChange(e.element)},geometryChange:function(e){this.bboxChange(e.element)},bboxChange:function(e){var t,i=this;if("Group"===e.nodeType)for(t=0;t<e.children.length;t++)i.bboxChange(e.children[t]);else e._quadNode&&e._quadNode.remove(e),this._insertShape(e)},add:function(e){var i=Array.isArray(e)?e.slice(0):[e];t(this.rootElements,i),this._insert(i)},childrenChange:function(e){var t,i=this;if("remove"===e.action)for(t=0;t<e.items.length;t++)i.remove(e.items[t]);else this._insert(Array.prototype.slice.call(e.items,0))},_insert:function(e){for(var i,n=this;e.length>0;)i=e.pop(),i.addObserver(n),"Group"===i.nodeType?t(e,i.children):n._insertShape(i)},_insertShape:function(e){var t,i,n,o,r=e.bbox();r&&(t=this.getSectors(r),i=t[0][0],n=t[1][0],this.inRoot(t)?this.root.insert(e,r):(o=this.rootMap,o[i]||(o[i]={}),o[i][n]||(o[i][n]=new ro(new di([i*so,n*so],[so,so]))),o[i][n].insert(e,r)))},remove:function(e){var t,i,n=this;if(e.removeObserver(this),"Group"===e.nodeType)for(t=e.children,i=0;i<t.length;i++)n.remove(t[i]);else e._quadNode&&(e._quadNode.remove(e),delete e._quadNode)},inRoot:function(e){return e[0].length>1||e[1].length>1},getSectors:function(e){var t,i,n=e.bottomRight(),o=Math.floor(n.x/so),r=Math.floor(n.y/so),s=[[],[]];for(t=Math.floor(e.origin.x/so);t<=o;t++)s[0].push(t);for(i=Math.floor(e.origin.y/so);i<=r;i++)s[1].push(i);return s}}),uo=Ut.extend({init:function(e){e.bind("mouseenter",this._mouseenter.bind(this)),e.bind("mouseleave",this._mouseleave.bind(this)),this.element=e.element},clear:function(){this._resetCursor()},destroy:function(){this._resetCursor(),delete this.element},_mouseenter:function(e){var t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},_mouseleave:function(){this._resetCursor()},_shapeCursor:function(e){for(var t=e.element;t&&!n(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},_getCursor:function(){if(this.element)return this.element.style.cursor},_setCursor:function(e){this.element&&(this.element.style.cursor=e,this._current=e)},_resetCursor:function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)}}),ho=mn.extend({init:function(e,t){var i,n;mn.fn.init.call(this,e,t),this.element.innerHTML=this._template(this),i=this.element.firstElementChild,n=k(e),i.width=n.width,i.height=n.height,this._rootElement=i,this._root=new no(i),this._mouseTrackHandler=this._trackMouse.bind(this),_(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){mn.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(e){mn.fn.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},clear:function(){mn.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},eventTarget:function(e){var t,i;if(this._searchTree)return t=this._surfacePoint(e),i=this._searchTree.pointShape(t)},image:function(){var e,t,i=this,n=i._root,o=i._rootElement,r=[];return n.traverse(function(e){e.loading&&r.push(e.loading)}),e=$t(),t=function(){n._invalidate();try{var t=o.toDataURL();e.resolve(t)}catch(i){e.reject(i)}},Kt(r).then(t,t),e},suspendTracking:function(){mn.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var e,t,i;if(mn.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new co,e=this._root.childNodes,t=[],i=0;i<e.length;i++)t.push(e[i].srcElement);this._searchTree.add(t)}},_resize:function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.invalidate()},_template:function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},_enableTracking:function(){this._searchTree=new co,this._cursor=new uo(this),mn.fn._enableTracking.call(this)},_trackMouse:function(e){var t,i;this._suspendedTracking||(t=this.eventTarget(e),"click"!==e.type?(i=this._currentShape,i&&i!==t&&this.trigger("mouseleave",{element:i,originalEvent:e,type:"mouseleave"}),t&&i!==t&&this.trigger("mouseenter",{element:t,originalEvent:e,type:"mouseenter"}),this.trigger("mousemove",{element:t,originalEvent:e,type:"mousemove"}),this._currentShape=t):t&&this.trigger("click",{element:t,originalEvent:e,type:"click"}))}}),ho.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(mn.support.canvas=!0,pn.current.register("canvas",ho,20)),po=eo.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,i=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),i=!0):d(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),i=!0)),i},setGradientFill:function(e,t){var i,n,o,r,s=this.srcElement.rawBBox();t instanceof an?(n=t.start(),o=t.end(),i=e.createLinearGradient(n.x,n.y,o.x,o.y)):t instanceof ln&&(r=t.center(),i=e.createRadialGradient(r.x,r.y,0,r.x,r.y,t.radius())),Re(i,t.stops),e.save(),t.userSpace()||e.transform(s.width(),0,0,s.height(),s.origin.x,s.origin.y),e.fillStyle=i,e.fill(),e.restore()},setStroke:function(e){var t=this.srcElement.options.stroke;if(t&&!d(t.color)&&t.width>0)return e.strokeStyle=t.color,e.lineWidth=v(t.width,1),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0},dashType:function(){var e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()},setLineDash:function(e){var t,i=this.dashType();i&&i!==Nn&&(t=Hn[i],e.setLineDash?e.setLineDash(t):(e.mozDash=t,e.webkitLineDash=t))},setLineCap:function(e){var t=this.dashType(),i=this.srcElement.options.stroke;t&&t!==Nn?e.lineCap=On:i&&i.lineCap&&(e.lineCap=i.lineCap)},setLineJoin:function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},renderPoints:function(e,t){Ie(e,t)}}),Jn.Path=po,fo=po.extend({renderPoints:function(e){var t=this.srcElement.toPath();Ie(e,t)}}),Jn.Arc=fo,mo=po.extend({renderPoints:function(e){var t=this.srcElement.geometry(),i=t.center,n=t.radius;e.arc(i.x,i.y,n,0,2*Math.PI)}}),Jn.Circle=mo,go=po.extend({renderPoints:function(e){var t=this.srcElement.geometry(),i=t.origin,n=t.size;e.rect(i.x,i.y,n.width,n.height)}}),Jn.Rect=go,vo=po.extend({init:function(e,t){po.fn.init.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=$t();var i=this.img=new Image;t&&!/^data:/i.test(e.src())&&(i.crossOrigin=t),i.src=e.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(e){"src"===e.field?(this.loading=$t(),this.img.src=this.srcElement.src()):po.fn.optionsChange.call(this,e)},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(),i=t.topLeft();e.drawImage(this.img,i.x,i.y,t.width(),t.height())}}),Jn.Image=vo,_o=po.extend({renderTo:function(e){var t=this.srcElement,i=t.position(),n=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign="left",this.setFill(e)&&e.fillText(t.content(),i.x,i.y+n.baseline),this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),i.x,i.y+n.baseline)),e.restore()}}),Jn.Text=_o,bo=po.extend({renderPoints:function(e){var t,i=this.srcElement.paths;for(t=0;t<i.length;t++)Ie(e,i[t])}}),Jn.MultiPath=bo,wo={Surface:ho,RootNode:no,Node:eo,GroupNode:to,ArcNode:fo,CircleNode:mo,RectNode:go,ImageNode:vo,TextNode:_o,PathNode:po,MultiPathNode:bo},yo=Gt,ko="KENDO-PSEUDO-ELEMENT",xo={},Co={},Co._root=Co,So="undefined"!=typeof window,To=!!So&&(yo.msie||yo.edge),Do=Ki.extend({init:function(e,t,i){Ki.fn.init.call(this,e,t.getOrigin(),i),this._pdfRect=t},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),Ao="undefined"!=typeof Element&&Element.prototype&&function(e){return e.matches?function(e,t){return e.matches(t)}:e.webkitMatchesSelector?function(e,t){return e.webkitMatchesSelector(t)}:e.mozMatchesSelector?function(e,t){return e.mozMatchesSelector(t)}:e.msMatchesSelector?function(e,t){return e.msMatchesSelector(t)}:function(e){return[].indexOf.call(document.querySelectorAll(e),this)!==-1}}(Element.prototype),Eo=function(e){return e?function t(i){var n,o,r,s,a=i.cloneNode(!1);if(1==i.nodeType){n=e(i),o=e(a),s=n.data();for(r in s)o.data(r,s[r]);for(/^canvas$/i.test(i.tagName)?a.getContext("2d").drawImage(i,0,0):/^(?:input|select|textarea|option)$/i.test(i.tagName)&&(a.removeAttribute("id"),a.removeAttribute("name"),a.value=i.value,a.checked=i.checked,a.selected=i.selected),r=i.firstChild;r;r=r.nextSibling)a.appendChild(t(r))}return a}:function(e){var t,i=function o(e){var t,i=e.cloneNode(!1);for(e._kendoExportVisual&&(i._kendoExportVisual=e._kendoExportVisual),t=e.firstChild;t;t=t.nextSibling)i.appendChild(o(t));return i}(e),n=e.querySelectorAll("canvas");return n.length&&ze(i.querySelectorAll("canvas")).forEach(function(e,t){e.getContext("2d").drawImage(n[t],0,0)}),t=e.querySelectorAll("input, select, textarea, option"),ze(i.querySelectorAll("input, select, textarea, option")).forEach(function(e,i){e.removeAttribute("id"),e.removeAttribute("name"),e.value=t[i].value,e.checked=t[i].checked,e.selected=t[i].selected}),i}}("undefined"!=typeof window&&window.kendo&&window.kendo.jQuery),Ve.getFontFaces=We,Ve.drawText=function(e){var t=new Xi;return Co._clipbox=!1,Co._matrix=ai.unit(),Co._stackingContext={element:e,group:t},et(e,rt(e),t),3==e.firstChild.nodeType?Lt(e,e.firstChild,t):Dt(e,t),tt(),t},Io=function(){function e(e){function p(){var t=s.exec(e);t&&(e=e.substr(t[1].length))}function f(t){p();var i=t.exec(e);if(i)return e=e.substr(i[1].length),i[1]}function m(){var t,o,r,s=kendo.parseColor(e,!0);if(s)return r=/^#[0-9a-f]+/i.exec(e)||/^rgba?\(.*?\)/i.exec(e)||/^..*?\b/.exec(e),e=e.substr(r[0].length),s=s.toRGB(),(t=f(n))||(o=f(i)),{color:s,length:t,percent:o}}function g(t){var n,s,d,u,h,p,g=[],v=!1;if(f(a)){for(n=f(r),n?(n=mt(n),f(c)):(s=f(o),"to"==s?s=f(o):s&&/^-/.test(t)&&(v=!0),d=f(o),f(c)),/-moz-/.test(t)&&null==n&&null==s&&(u=f(i),h=f(i),v=!0,"0%"==u?s="left":"100%"==u&&(s="right"),"0%"==h?d="top":"100%"==h&&(d="bottom"),f(c));e&&!f(l)&&(p=m());)g.push(p),f(c);return{type:"linear",angle:n,to:s&&d?s+" "+d:s?s:d?d:null,stops:g,reverse:v}}}function v(){if(f(a)){var e=f(u);return e=e.replace(/^['"]+|["']+$/g,""),f(l),{type:"url",url:e}}}var _,b=e;return Ue(h,b)?h[b]:((_=f(t))?_=g(_):(_=f(d))&&(_=v()),h[b]=_||{type:"none"})}var t=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,i=/^([-0-9.]+%)/,n=/^([-0-9.]+px)/,o=/^(left|right|top|bottom|to|center)\W/,r=/^([-0-9.]+(deg|grad|rad|turn))/,s=/^(\s+)/,a=/^(\()/,l=/^(\))/,c=/^(,)/,d=/^(url)\(/,u=/^(.*?)\)/,h={},p={};return function(t){return Ue(p,t)?p[t]:p[t]=Mo(t).map(e)}}(),Mo=function(){var e={};return function(t,i){function n(e){return u=e.exec(t.substr(l))}function o(e){return e.replace(/^\s+|\s+$/g,"")}var r,s,a,l,c,d,u;if(i||(i=/^\s*,\s*/),r=t+i,Ue(e,r))return e[r];for(s=[],a=0,l=0,c=0,d=!1;l<t.length;)!d&&n(/^[\(\[\{]/)?(c++,l++):!d&&n(/^[\)\]\}]/)?(c--,l++):!d&&n(/^[\"\']/)?(d=u[0],l++):"'"==d&&n(/^\\\'/)?l+=2:'"'==d&&n(/^\\\"/)?l+=2:"'"==d&&n(/^\'/)?(d=!1,l++):'"'==d&&n(/^\"/)?(d=!1,l++):n(i)?(!d&&!c&&l>a&&(s.push(o(t.substring(a,l))),a=l+u[0].length),l+=u[0].length):l++;return a<l&&s.push(o(t.substring(a,l))),e[r]=s}}(),Ro=function(e){return function(t){var i,n=e[t];return n||((i=/url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(t))?n=e[t]=i[2]:(i=/url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t))&&(n=e[t]=i[2])),n}}(Object.create?Object.create(null):{}),Fo=function(e){return function(t){var i=e[t];return null==i&&(i=e[t]=qt.measureText("Mapq",{font:t}).height),i}}(Object.create?Object.create(null):{}),Po={svg:Zn,canvas:wo,util:oi,PathParser:Wi,Surface:mn,BaseNode:gn,SurfaceFactory:pn,OptionsStore:si,exportImage:Fe,exportSVG:Pe,QuadNode:ro,ShapesQuadTree:co,ObserversMixin:Yt,Element:hi,Circle:wi,Arc:ji,Path:Ui,MultiPath:zi,Text:Ki,Image:Yi,Group:Xi,Layout:tn,Rect:nn,align:se,vAlign:ae,stack:de,vStack:ue,wrap:fe,vWrap:me,fit:ge,LinearGradient:an,RadialGradient:ln,GradientStop:rn,Gradient:sn,Animation:hn,AnimationFactory:dn,drawDOM:Ve},kendo.deepExtend(kendo,{drawing:Po,geometry:Xn}),kendo.drawing.Segment=kendo.geometry.Segment,kendo.dataviz.drawing=kendo.drawing,kendo.dataviz.geometry=kendo.geometry,kendo.drawing.util.measureText=kendo.util.measureText,kendo.drawing.util.objectKey=kendo.util.objectKey,kendo.drawing.Color=kendo.Color,kendo.util.encodeBase64=kendo.drawing.util.encodeBase64}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.popup.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(t,i){return!(!t||!i)&&(t===i||e.contains(t,i))}var n,o,r,s,a=window.kendo,l=a.ui,c=l.Widget,d=a.Class,u=a.support,h=a.getOffset,p=a._outerWidth,f=a._outerHeight,m="open",g="close",v="deactivate",_="activate",b="center",w="left",y="right",k="top",x="bottom",C="absolute",S="hidden",T="body",D="location",A="position",E="visible",I="effects",M="k-state-active",R="k-state-border",F=/k-state-border-(\w+)/,P=".k-picker-wrap, .k-dropdown-wrap, .k-link",z="down",B=e(document.documentElement),L=e.proxy,H=e(window),N="scroll",O=u.transitions.css,V=O+"transform",W=e.extend,U=".kendoPopup",q=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],j=c.extend({init:function(t,i){var n,o=this;i=i||{},i.isRtl&&(i.origin=i.origin||x+" "+y,i.position=i.position||k+" "+y),c.fn.init.call(o,t,i),t=o.element,i=o.options,o.collisions=i.collision?i.collision.split(" "):[],o.downEvent=a.applyEventMap(z,a.guid()),1===o.collisions.length&&o.collisions.push(o.collisions[0]),n=e(o.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||n[0]||document.body),o.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!i.isRtl).css({position:C}).appendTo(i.appendTo).attr("aria-hidden",!0).on("mouseenter"+U,function(){o._hovered=!0}).on("wheel"+U,function(t){var i=e(t.target).find(".k-list"),n=i.parent();i.length&&i.is(":visible")&&(0===n.scrollTop()&&t.originalEvent.deltaY<0||n.scrollTop()===n.prop("scrollHeight")-n.prop("offsetHeight")&&t.originalEvent.deltaY>0)&&t.preventDefault()}).on("mouseleave"+U,function(){o._hovered=!1}),o.wrapper=e(),i.animation===!1&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),W(i.animation.open,{complete:function(){o.wrapper.css({overflow:E}),o._activated=!0,o._trigger(_)}}),W(i.animation.close,{complete:function(){o._animationClose()}}),o._mousedownProxy=function(e){o._mousedown(e)},o._resizeProxy=u.mobileOS.android?function(e){setTimeout(function(){o._resize(e)},600)}:function(e){o._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+U,e.proxy(o.toggle,o))},events:[m,_,g,v],options:{name:"Popup",toggleEvent:"click",origin:x+" "+w,position:k+" "+w,anchor:T,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 e=this,t=e.wrapper.data(D);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=T&&e._hideDirClass(),e._closing=!1,e._trigger(v)},destroy:function(){var t,i=this,n=i.options,o=i.element.off(U);c.fn.destroy.call(i),n.toggleTarget&&e(n.toggleTarget).off(U),n.modal||(B.unbind(i.downEvent,i._mousedownProxy),i._toggleResize(!1)),a.destroy(i.element.children()),o.removeData(),n.appendTo[0]===document.body&&(t=o.parent(".k-animation-container"),t[0]?t.remove():o.remove())},open:function(t,i){var n,o,r=this,s={isFixed:!isNaN(parseInt(i,10)),x:t,y:i},l=r.element,c=r.options,d=e(c.anchor),h=l[0]&&l.hasClass("km-widget");if(!r.visible()){if(c.copyAnchorStyles&&(h&&"font-size"==q[0]&&q.shift(),l.css(a.getComputedStyles(d[0],q))),l.data("animating")||r._trigger(m))return;r._activated=!1,c.modal||(B.unbind(r.downEvent,r._mousedownProxy).bind(r.downEvent,r._mousedownProxy),r._toggleResize(!1),r._toggleResize(!0)),r.wrapper=o=a.wrap(l,c.autosize).css({overflow:S,display:"block",position:C}).attr("aria-hidden",!1),u.mobileOS.android&&o.css(V,"translatez(0)"),o.css(A),e(c.appendTo)[0]==document.body&&o.css(k,"-10000px"),r.flipped=r._position(s),n=r._openAnimation(),c.anchor!=T&&r._showDirClass(n),l.data(I,n.effects).kendoStop(!0).kendoAnimate(n).attr("aria-hidden",!1)}},_location:function(t){var i,n,o=this,r=o.element,s=o.options,l=e(s.anchor),c=r[0]&&r.hasClass("km-widget");return s.copyAnchorStyles&&(c&&"font-size"==q[0]&&q.shift(),r.css(a.getComputedStyles(l[0],q))),o.wrapper=i=a.wrap(r,s.autosize).css({overflow:S,display:"block",position:C}),u.mobileOS.android&&i.css(V,"translatez(0)"),i.css(A),e(s.appendTo)[0]==document.body&&i.css(k,"-10000px"),o._position(t||{}),n=i.offset(),{width:a._outerWidth(i),height:a._outerHeight(i),left:n.left,top:n.top}},_openAnimation:function(){var e=W(!0,{},this.options.animation.open);return e.effects=a.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),i=((t.attr("class")||"").match(F)||["","down"])[1],n=R+"-"+i;t.removeClass(n).children(P).removeClass(M).removeClass(n),this.element.removeClass(R+"-"+a.directions[i].reverse)},_showDirClass:function(t){var i=t.effects.slideIn?t.effects.slideIn.direction:"down",n=R+"-"+i;e(this.options.anchor).addClass(n).children(P).addClass(M).addClass(n),this.element.addClass(R+"-"+a.directions[i].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?g:m]()},visible:function(){return this.element.is(":"+E)},close:function(i){var n,o,r,s,l=this,c=l.options;if(l.visible()){if(n=l.wrapper[0]?l.wrapper:a.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(g))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),n=t.data("kendoPopup");n&&n.close(i)}),B.unbind(l.downEvent,l._mousedownProxy),i?o={hide:!0,effects:{}}:(o=W(!0,{},c.animation.close),r=l.element.data(I),s=o.effects,!s&&!a.size(s)&&r&&a.size(r)&&(o.effects=r,o.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),n.css({overflow:S}).attr("aria-hidden",!0),l.element.kendoAnimate(o),i&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;u.resize.indexOf(e.type)!==-1?(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",i=u.resize;u.mobileOS.ios||u.mobileOS.android||(i+=" "+N),this._scrollableParents()[t](N,this._resizeProxy),H[t](i,this._resizeProxy)},_mousedown:function(t){var n=this,o=n.element[0],r=n.options,s=e(r.anchor)[0],l=r.toggleTarget,c=a.eventTarget(t),d=e(c).closest(".k-popup"),u=d.parent().parent(".km-shim").length;d=d[0],!u&&d&&d!==n.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(i(o,c)||i(s,c)||l&&i(e(l)[0],c)||n.close())},_fit:function(e,t,i){var n=0;return e+t>i&&(n=i-(e+t)),e<0&&(n=-e),n},_flip:function(e,t,i,n,o,r,s){var a=0;return s=s||t,r!==o&&r!==b&&o!==b&&(e+s>n&&(a+=-(i+t)),e+a<0&&(a+=i+t)),a},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return a.isScrollable(t)})},_position:function(t){var i,n,o,r,s,l,c,d,m,g,v,_,b,w,y,k,x,S=this,T=S.element,E=S.wrapper,I=S.options,M=e(I.viewport),R=u.zoomLevel(),F=!!(M[0]==window&&window.innerWidth&&R<=1.02),P=e(I.anchor),z=I.origin.toLowerCase().split(" "),B=I.position.toLowerCase().split(" "),L=S.collisions,H=10002,N=0,O=document.documentElement;if(s=I.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:M.offset(),F?(l=window.innerWidth,c=window.innerHeight):(l=M.width(),c=M.height()),F&&O.scrollHeight-O.clientHeight>0&&(d=I.isRtl?-1:1,l-=d*a.support.scrollbar()),i=P.parents().filter(E.siblings()),i[0])if(o=Math.max(+i.css("zIndex"),0))H=o+10;else for(n=P.parentsUntil(i),r=n.length;N<r;N++)o=+e(n[N]).css("zIndex"),o&&H<o&&(H=o+10);return E.css("zIndex",H),E.css(t&&t.isFixed?{left:t.x,top:t.y}:S._align(z,B)),m=h(E,A,P[0]===E.offsetParent()[0]),g=h(E),v=P.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),v.length&&(m=h(E,A,!0),g=h(E)),g.top-=s.top,g.left-=s.left,S.wrapper.data(D)||E.data(D,W({},m)),_=W({},g),b=W({},m),w=I.adjustSize,"fit"===L[0]&&(b.top+=S._fit(_.top,f(E)+w.height,c/R)),"fit"===L[1]&&(b.left+=S._fit(_.left,p(E)+w.width,l/R)),y=W({},b),k=f(T),x=f(E),!E.height()&&k&&(x+=k),"flip"===L[0]&&(b.top+=S._flip(_.top,k,f(P),c/R,z[0],B[0],x)),"flip"===L[1]&&(b.left+=S._flip(_.left,p(T),p(P),l/R,z[1],B[1],p(E))),T.css(A,C),E.css(b),b.left!=y.left||b.top!=y.top},_align:function(t,i){var n,o=this,r=o.wrapper,s=e(o.options.anchor),a=t[0],l=t[1],c=i[0],d=i[1],u=h(s),m=e(o.options.appendTo),g=p(r),v=f(r)||f(r.children().first()),_=p(s),w=f(s),k=u.top,C=u.left,S=Math.round;return m[0]!=document.body&&(n=h(m),k-=n.top,C-=n.left),a===x&&(k+=w),a===b&&(k+=S(w/2)),c===x&&(k-=v),c===b&&(k-=S(v/2)),l===y&&(C+=_),l===b&&(C+=S(_/2)),d===y&&(C-=g),d===b&&(C-=S(g/2)),{top:k,left:C}}});l.plugin(j),n=a.support.stableSort,o="kendoTabKeyTrap",r="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]",s=d.extend({init:function(t){this.element=e(t),this.element.autoApplyNS(o)},trap:function(){this.element.on("keydown",L(this._keepInTrap,this))},removeTrap:function(){this.element.kendoDestroy(o)},destroy:function(){this.element.kendoDestroy(o),this.element=t},shouldTrap:function(){return!0},_keepInTrap:function(e){var t,i,n;9===e.which&&this.shouldTrap()&&!e.isDefaultPrevented()&&(t=this._focusableElements(),i=this._sortFocusableElements(t),n=this._nextFocusable(e,i),this._focus(n),e.preventDefault())},_focusableElements:function(){var t=this.element.find(r).filter(function(t,i){return i.tabIndex>=0&&e(i).is(":visible")&&!e(i).is("[disabled]")});return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t,i;return n?t=e.sort(function(e,t){return e.tabIndex-t.tabIndex}):(i="__k_index",e.each(function(e,t){t.setAttribute(i,e)}),t=e.sort(function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(i),10)-parseInt(t.getAttribute(i),10):e.tabIndex-t.tabIndex}),e.removeAttr(i)),t},_nextFocusable:function(e,t){var i=t.length,n=t.index(e.target);return t.get((n+(e.shiftKey?-1:1))%i)},_focus:function(e){return"IFRAME"==e.nodeName?(e.contentWindow.document.body.focus(),t):(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length),t)},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}}),l.Popup.TabKeyTrap=s}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("drawing/surface-tooltip.min",["kendo.popup.min","drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=".kendo",i=window.kendo,n=i.deepExtend,o=i.drawing.util,r=o.defined,s=o.limitValue,a=o.eventCoordinates,l=i._outerWidth,c=i._outerHeight,d=e.proxy,u='<div class="k-tooltip"><div class="k-tooltip-content"></div></div>',h='<div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div>',p=i.Class.extend({init:function(t,i){this.element=e(u),this.content=this.element.children(".k-tooltip-content"),i=i||{},this.options=n({},this.options,this._tooltipOptions(i)),this.popupOptions={appendTo:i.appendTo,animation:i.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=e.proxy(this._openPopup,this),this.surface=t,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=d(this._showEvent,this),this._surfaceLeaveHandler=d(this._surfaceLeave,this),this._mouseleaveHandler=d(this._mouseleave,this),this._mousemoveHandler=d(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+t,this._surfaceLeaveHandler),this.element.on("click"+t,".k-tooltip-button",d(this._hideClick,this))},getPopup:function(){return this.popup||(this.popup=new i.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var e=this.popup;this.surface.unbind("click",this._showHandler),this.surface.unbind("mouseenter",this._showHandler),this.surface.unbind("mouseleave",this._mouseleaveHandler),this.surface.unbind("mousemove",this._mousemoveHandler),this.surface.element.off("mouseleave"+t,this._surfaceLeaveHandler),this.element.off("click"+t),e&&(e.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(e){return e=e||{},{position:e.position,showOn:e.showOn,offset:e.offset,autoHide:e.autoHide,width:e.width,height:e.height,content:e.content,shared:e.shared,hideDelay:e.hideDelay,showAfter:e.showAfter}},_tooltipShape:function(e){for(;e&&!e.options.tooltip;)e=e.parent;return e},_updateContent:function(e,t,n){var o=n.content;if(i.isFunction(o)&&(o=o({element:t,target:e})),o)return this.content.html(o),!0},_position:function(e,t,i,n){var o,r=t.position,l=t.offset||0,c=this.surface,d=c._instance._elementOffset(),u=c.getSize(),h=c._instance._offset,p=e.bbox(),f=i.width,m=i.height,g=0,v=0;return p.origin.translate(d.left,d.top),h&&p.origin.translate(-h.x,-h.y),"cursor"==r&&n?(o=a(n),g=o.x-f/2,v=o.y-m-l):"left"==r?(g=p.origin.x-f-l,v=p.center().y-m/2):"right"==r?(g=p.bottomRight().x+l,v=p.center().y-m/2):"bottom"==r?(g=p.center().x-f/2,v=p.bottomRight().y+l):(g=p.center().x-f/2,v=p.origin.y-m-l),
{left:s(g,d.left,d.left+u.width),top:s(v,d.top,d.top+u.height)}},show:function(e,t){this._show(e,e,n({},this.options,this._tooltipOptions(e.options.tooltip),t))},hide:function(){var e=this.popup,t=this._current;delete this._current,clearTimeout(this._showTimeout),e&&e.visible()&&t&&!this.surface.trigger("tooltipClose",{element:t.shape,target:t.target,popup:e})&&e.close()},_hideClick:function(e){e.preventDefault(),this.hide()},_show:function(e,t,i,n,o){var r,s,a=this._current;clearTimeout(this._timeout),a&&(a.shape===t&&i.shared||a.target===e)||(clearTimeout(this._showTimeout),r=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:t,target:e,popup:r})&&this._updateContent(e,t,i)&&(this._autoHide(i),s=this._measure(i),r.visible()&&r.close(!0),this._current={options:i,elementSize:s,shape:t,target:e,position:this._position(i.shared?t:e,i,s,n)},o?this._showTimeout=setTimeout(this._openPopupHandler,i.showAfter||0):this._openPopup()))},_openPopup:function(){var e=this._current,t=e.position;this.getPopup().open(t.left,t.top)},_autoHide:function(t){t.autoHide&&this._closeButton&&(this.element.removeClass("k-tooltip-closable"),this._closeButton.remove(),delete this._closeButton),t.autoHide||this._closeButton||(this.element.addClass("k-tooltip-closable"),this._closeButton=e(h).prependTo(this.element))},_showEvent:function(e){var t,i=this._tooltipShape(e.element);i&&(t=n({},this.options,this._tooltipOptions(i.options.tooltip)),t&&t.showOn==e.type&&this._show(e.element,i,t,e.originalEvent,!0))},_measure:function(e){var t,i,n,o=this.getPopup();return this.element.css({width:"auto",height:"auto"}),n=o.visible(),n||o.wrapper.show(),this.element.css({width:r(e.width)?e.width:"auto",height:r(e.height)?e.height:"auto"}),t=l(this.element),i=c(this.element),n||o.wrapper.hide(),{width:t,height:i}},_mouseleave:function(e){var t,i;this.popup&&!this._popupRelatedTarget(e.originalEvent)&&(t=this,i=t._current,i&&i.options.autoHide&&(t._timeout=setTimeout(function(){clearTimeout(t._showTimeout),t.hide()},i.options.hideDelay||0)))},_mousemove:function(e){var t,i,n=this._current;n&&e.element&&(t=n.options,"cursor"==t.position&&(i=this._position(e.element,t,n.elementSize,e.originalEvent),n.position=i,this.getPopup().wrapper.css({left:i.left,top:i.top})))},_surfaceLeave:function(e){this.popup&&!this._popupRelatedTarget(e)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(t){return t.relatedTarget&&e(t.relatedTarget).closest(this.popup.wrapper).length}});i.drawing.SurfaceTooltip=p}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("drawing/surface.min",["drawing/kendo-drawing.min","drawing/surface-tooltip.min"],e)}(function(){!function(e){function t(e){this._instance.translate(e)}var i,n=window.kendo,o=n.drawing,r=o.Surface,s=n.ui.Widget,a=n.deepExtend,l=e.proxy;n.support.svg=r.support.svg,n.support.canvas=r.support.canvas,i=s.extend({init:function(e,i){s.fn.init.call(this,e,{}),this.options=a({},this.options,i),this._instance=r.create(this.element[0],i),this._instance.translate&&(this.translate=t),this._triggerInstanceHandler=l(this._triggerInstanceEvent,this),this._bindHandler("click"),this._bindHandler("mouseenter"),this._bindHandler("mouseleave"),this._bindHandler("mousemove"),this._enableTracking()},options:{name:"Surface",tooltip:{}},events:["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],_triggerInstanceEvent:function(e){this.trigger(e.type,e)},_bindHandler:function(e){this._instance.bind(e,this._triggerInstanceHandler)},draw:function(e){this._instance.draw(e)},clear:function(){this._instance&&this._instance.clear(),this.hideTooltip()},destroy:function(){this._instance&&(this._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),s.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(e){return this._instance.eventTarget(e)},showTooltip:function(e,t){this._tooltip&&this._tooltip.show(e,t)},hideTooltip:function(){this._tooltip&&this._tooltip.hide()},suspendTracking:function(){this._instance.suspendTracking(),this.hideTooltip()},resumeTracking:function(){this._instance.resumeTracking()},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(e){this.element.css({width:e.width,height:e.height}),this._size=e,this._instance.currentSize(e),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){n.ui.Popup&&(this._tooltip=new o.SurfaceTooltip(this,this.options.tooltip||{}))}}),n.ui.plugin(i),i.create=function(e,t){return new i(e,t)},n.drawing.Surface=i}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("drawing/html.min",["drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=window.kendo,i=t.drawing,n=i.drawDOM;i.drawDOM=function(t,i){return n(e(t)[0],i)},i.drawDOM.drawText=n.drawText,i.drawDOM.getFontFaces=n.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.drawing.min",["drawing/util.min","drawing/kendo-drawing.min","drawing/surface-tooltip.min","drawing/surface.min","drawing/html.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.validator.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(t){var i,n=l.ui.validator.ruleResolvers||{},o={};for(i in n)e.extend(!0,o,n[i].resolve(t));return o}function n(e){return e.replace(/&amp/g,"&amp;").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">")}function o(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function r(t){return e(e.parseHTML?e.parseHTML(t):t)}function s(t,i){var n,o,r,s,a=e();for(r=0,s=t.length;r<s;r++)n=t[r],h.test(n.className)&&(o=n.getAttribute(l.attr("for")),o===i&&(a=a.add(n)));return a}var a,l=window.kendo,c=l.ui.Widget,d=".kendoValidator",u="k-invalid-msg",h=RegExp(u,"i"),p="k-invalid",f="k-valid",m=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/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,v=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",_=":checkbox:not([disabled],[readonly])",b="[type=number],[type=range]",w="blur",y="name",k="form",x="novalidate",C="validate",S="change",T="validateInput",D=e.proxy,A=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)},E=function(e,t,i){var n=e.val();return!e.filter(t).length||""===n||A(n,i)},I=function(e,t){return!!e.length&&null!=e[0].attributes[t]};l.ui.validator||(l.ui.validator={rules:{},messages:{}}),a=c.extend({init:function(t,n){var o=this,r=i(t),s="["+l.attr("validate")+"!=false]";n=n||{},n.rules=e.extend({},l.ui.validator.rules,r.rules,n.rules),n.messages=e.extend({},l.ui.validator.messages,r.messages,n.messages),c.fn.init.call(o,t,n),o._errorTemplate=l.template(o.options.errorTemplate),o.element.is(k)&&o.element.attr(x,x),o._inputSelector=v+s,o._checkboxSelector=_+s,o._errors={},o._attachEvents(),o._isValidated=!1},events:[C,S,T],options:{name:"Validator",errorTemplate:'<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-i-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"),i=e.val();return!(I(e,"required")&&(!i||""===i||0===i.length||t))},pattern:function(e){return!e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===e.val()||A(e.val(),e.attr("pattern"))},min:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,i=l.parseFloat(e.val());return t<=i}return!0},max:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,i=l.parseFloat(e.val());return t>=i}return!0},step:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,i=parseFloat(e.attr("min"))||0,n=parseFloat(e.attr("step"))||1,r=parseFloat(e.val()),s=o(n);return s?(t=Math.pow(10,s),Math.floor((r-i)*t)%(n*t)/Math.pow(100,s)===0):(r-i)%n===0}return!0},email:function(e){return E(e,"[type=email],["+l.attr("type")+"=email]",m)},url:function(e){return E(e,"[type=url],["+l.attr("type")+"=url]",g)},date:function(e){return!e.filter("[type^=date],["+l.attr("type")+"=date]").length||""===e.val()||null!==l.parseDate(e.val(),e.attr(l.attr("format")))}},validateOnBlur:!0},destroy:function(){c.fn.destroy.call(this),this.element.off(d)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(e){return!!this.validate()||(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger(S)},_attachEvents:function(){var t=this;t.element.is(k)&&t.element.on("submit"+d,D(t._submit,t)),t.options.validateOnBlur&&(t.element.is(v)?(t.element.on(w+d,function(){t._checkElement(t.element)}),t.element.is(_)&&t.element.on("click"+d,function(){t._checkElement(t.element)})):(t.element.on(w+d,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+d,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,i,n,o=!1,r=this.value();if(this._errors={},this.element.is(v))o=this.validateInput(this.element);else{for(n=!1,e=this.element.find(this._inputSelector),t=0,i=e.length;t<i;t++)this.validateInput(e.eq(t))||(n=!0);o=!n}return this.trigger(C,{valid:o}),r!==o&&this.trigger(S),o},validateInput:function(t){var i,o,s,a,c,d,h,m,g,v,_;return t=e(t),this._isValidated=!0,i=this,o=i._errorTemplate,s=i._checkValidity(t),a=s.valid,c="."+u,d=t.attr(y)||"",h=i._findMessageContainer(d).add(t.next(c).filter(function(){var t=e(this);return!t.filter("["+l.attr("for")+"]").length||t.attr(l.attr("for"))===d})).hide(),g=!t.attr("aria-invalid"),t.removeAttr("aria-invalid"),a?delete i._errors[d]:(m=i._extractMessage(t,s.key),i._errors[d]=m,v=r(o({message:n(m)})),_=h.attr("id"),i._decorateMessageContainer(v,d),_&&v.attr("id",_),h.replaceWith(v).length||v.insertAfter(t),v.show(),t.attr("aria-invalid",!0)),g!==a&&this.trigger(T,{valid:a,input:t}),t.toggleClass(p,!a),t.toggleClass(f,a),a},hideMessages:function(){var e=this,t="."+u,i=e.element;i.is(v)?i.next(t).hide():i.find(t).hide()},_findMessageContainer:function(t){var i,n,o,r=l.ui.validator.messageLocators,a=e();for(n=0,o=this.element.length;n<o;n++)a=a.add(s(this.element[n].getElementsByTagName("*"),t));for(i in r)a=a.add(r[i].locate(this.element,t));return a},_decorateMessageContainer:function(e,t){var i,n=l.ui.validator.messageLocators;e.addClass(u).attr(l.attr("for"),t||"");for(i in n)n[i].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var i,n=this,o=n.options.messages[t],r=e.attr(y);return l.ui.Validator.prototype.options.messages[t]||(i=l.isFunction(o)?o(e):o),o=l.isFunction(o)?o(e):o,l.format(e.attr(l.attr(t+"-msg"))||e.attr("validationMessage")||i||e.attr("title")||o||"",r,e.attr(t)||e.attr(l.attr(t)))},_checkValidity:function(e){var t,i=this.options.rules;for(t in i)if(!i[t].call(this,e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],i=this._errors;for(e in i)t.push(i[e]);return t}}),l.ui.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.userevents.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(e,t){var i=e.x.location,n=e.y.location,o=t.x.location,r=t.y.location,s=i-o,a=n-r;return{center:{x:(i+o)/2,y:(n+r)/2},distance:Math.sqrt(s*s+a*a)}}function n(e){var t,i,n,o=[],r=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(i=r?r.changedTouches:[],t=i.length;l<t;l++)n=i[l],o.push({location:n,event:e,target:n.target,currentTarget:a,id:n.identifier,type:"touch"});else o.push(s.pointers||s.msPointers?{location:r,event:e,target:e.target,currentTarget:a,id:r.pointerId,type:"pointer"}:{id:1,event:e,target:e.target,currentTarget:a,location:e,type:"mouse"});return o}function o(e){for(var t=r.eventMap.up.split(" "),i=0,n=t.length;i<n;i++)e(t[i])}var r=window.kendo,s=r.support,a=r.Class,l=r.Observable,c=e.now,d=e.extend,u=s.mobileOS,h=u&&u.android,p=800,f=300,m=s.browser.msie?5:0,g="press",v="hold",_="select",b="start",w="move",y="end",k="cancel",x="tap",C="doubleTap",S="release",T="gesturestart",D="gesturechange",A="gestureend",E="gesturetap",I={api:0,touch:0,mouse:9,pointer:9},M=!s.touch||s.mouseAndTouchPresent,R=a.extend({init:function(e,t){var i=this;i.axis=e,i._updateLocationData(t),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=c()},move:function(e){var t=this,i=e["page"+t.axis],n=c(),o=n-t.timeStamp||1;!i&&h||(t.delta=i-t.location,t._updateLocationData(e),t.initialDelta=i-t.startLocation,t.velocity=t.delta/o,t.timeStamp=n)},_updateLocationData:function(e){var t=this,i=t.axis;t.location=e["page"+i],t.client=e["client"+i],t.screen=e["screen"+i]}}),F=a.extend({init:function(e,t,i){d(this,{x:new R("X",i.location),y:new R("Y",i.location),type:i.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||I[i.type],userEvents:e,target:t,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(e.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(g,this.pressEvent)},_tap:function(e){var t=this;t.userEvents._clicks++,1==t.userEvents._clicks&&(t._clickTimeout=setTimeout(function(){1==t.userEvents._clicks?t._trigger(x,e):t._trigger(C,e),t.userEvents._clicks=0},f))},_hold:function(){this._trigger(v,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(P.current&&P.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(w,e)}},end:function(e){this.endTime=c(),this._finished||(this._finished=!0,this._trigger(S,e),this._moved?this._trigger(y,e):this.useClickAsTap||(this.supportDoubleTap?this._tap(e):this._trigger(x,e)),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var t=this.userEvents,i=t.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),i.splice(e.inArray(this,i),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(b,e)},_trigger:function(e,t){var i=this,n=t.event,o={touch:i,x:i.x,y:i.y,target:i.target,event:n};i.userEvents.notify(e,o)&&n.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}}),P=l.extend({init:function(t,i){var n,a,c,u,h=this,f=r.guid();i=i||{},n=h.filter=i.filter,h.threshold=i.threshold||m,h.minHold=i.minHold||p,h.touches=[],h._maxTouches=i.multiTouch?2:1,h.allowSelection=i.allowSelection,h.captureUpIfMoved=i.captureUpIfMoved,h.useClickAsTap=!i.fastTap&&!s.delayedClick(),h.eventNS=f,h._clicks=0,h.supportDoubleTap=i.supportDoubleTap,t=e(t).handler(h),l.fn.init.call(h),d(h,{element:t,surface:e(i.global&&M?t[0].ownerDocument.documentElement:i.surface||t),stopPropagation:i.stopPropagation,pressed:!1}),h.surface.handler(h).on(r.applyEventMap("move",f),"_move").on(r.applyEventMap("up cancel",f),"_end"),t.on(r.applyEventMap("down",f),n,"_start"),h.useClickAsTap&&t.on(r.applyEventMap("click",f),n,"_click"),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.css("-ms-touch-action",i.touchAction&&"none"!=i.touchAction?a+" "+i.touchAction:a)):t.css("touch-action",i.touchAction||"none")),i.preventDragEvent&&t.on(r.applyEventMap("dragstart",f),r.preventDefault),t.on(r.applyEventMap("mousedown",f),n,{root:t},"_select"),h.captureUpIfMoved&&s.eventCapture&&(c=h.surface[0],u=e.proxy(h.preventIfMoving,h),o(function(e){c.addEventListener(e,u,!0)})),h.bind([g,v,x,C,b,w,y,S,k,T,D,A,E,_],i)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&s.eventCapture&&(e=t.surface[0],o(function(i){e.removeEventListener(i,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(){P.current=this},cancel:function(){this._disposeAll(),this.trigger(k)},notify:function(e,t){var n=this,o=n.touches;if(this._isMultiTouch()){switch(e){case w:e=D;break;case y:e=A;break;case x:e=E}d(t,{touches:o},i(o[0],o[1]))}return this.trigger(e,d(t,{type:e}))},press:function(e,t,i){this._apiCall("_start",e,t,i)},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(_,{event:e})||e.preventDefault()},_start:function(t){var i,o,r=this,s=0,a=r.filter,l=n(t),c=l.length,d=t.which;if(!(d&&d>1||r._maxTouchesReached()))for(P.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();s<c&&!r._maxTouchesReached();s++)o=l[s],i=a?e(o.currentTarget):r.element,i.length&&(o=new F(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)},_click:function(t){var i={touch:{initialTouch:t.target,target:e(t.currentTarget),endTime:c(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:e(t.currentTarget),event:t,type:"tap"};this.trigger("tap",i)&&t.preventDefault()},_eachTouch:function(e,t){var i,o,r,s,a=this,l={},c=n(t),d=a.touches;for(i=0;i<d.length;i++)o=d[i],l[o.id]=o;for(i=0;i<c.length;i++)r=c[i],s=l[r.id],s&&s[e](r)},_apiCall:function(t,i,n,o){this[t]({api:!0,pageX:i,pageY:n,clientX:i,clientY:n,target:e(o||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});P.defaultThreshold=function(e){m=e},P.minHold=function(e){p=e},r.getTouches=n,r.touchDelta=i,r.UserEvents=P}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.draganddrop.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function i(t,i){try{return e.contains(t,i)||t==i}catch(n){return!1}}function n(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 i=A(e),o=_._outerWidth,r=_._outerHeight,s=i.left+n(e,"borderLeftWidth")+n(e,"paddingLeft"),a=i.top+n(e,"borderTopWidth")+n(e,"paddingTop"),l=s+e.width()-o(t,!0),c=a+e.height()-r(t,!0);return{x:{min:s,max:l},y:{min:a,max:c}}}function s(i,n,o){for(var r,s,a=0,l=n&&n.length,c=o&&o.length;i&&i.parentNode;){for(a=0;a<l;a++)if(r=n[a],r.element[0]===i)return{target:r,targetElement:i};for(a=0;a<c;a++)if(s=o[a],e.contains(s.element[0],i)&&b.matchesSelector.call(i,s.options.filter))return{target:s,targetElement:i};i=i.parentNode}return t}function a(e,t){var i,n=t.options.group,o=e[n];if(x.fn.destroy.call(t),o.length>1){for(i=0;i<o.length;i++)if(o[i]==t){o.splice(i,1);break}}else o.length=0,delete e[n]}function l(e){var t,i,n,o=c()[0];return e[0]===o?(i=o.scrollTop,n=o.scrollLeft,{top:i,left:n,bottom:i+y.height(),right:n+y.width()}):(t=e.offset(),t.bottom=t.top+e.height(),t.right=t.left+e.width(),t)}function c(){return e(_.support.browser.edge||_.support.browser.safari?w.body:w.documentElement)}function d(t){var i,n=c();if(!t||t===w.body||t===w.documentElement)return n;for(i=e(t)[0];i&&!_.isScrollable(i)&&i!==w.body;)i=i.parentNode;return i===w.body?n:e(i)}function u(e,t,i){var n={x:0,y:0},o=50;return e-i.left<o?n.x=-(o-(e-i.left)):i.right-e<o&&(n.x=o-(i.right-e)),t-i.top<o?n.y=-(o-(t-i.top)):i.bottom-t<o&&(n.y=o-(i.bottom-t)),n}var h,p,f,m,g,v,_=window.kendo,b=_.support,w=window.document,y=e(window),k=_.Class,x=_.ui.Widget,C=_.Observable,S=_.UserEvents,T=e.proxy,D=e.extend,A=_.getOffset,E={},I={},M={},R=_.elementUnderCursor,F="keyup",P="change",z="dragstart",B="hold",L="drag",H="dragend",N="dragcancel",O="hintDestroyed",V="dragenter",W="dragleave",U="drop",q=C.extend({init:function(t,i){var n=this,o=t[0];n.capture=!1,o.addEventListener?(e.each(_.eventMap.down.split(" "),function(){o.addEventListener(this,T(n._press,n),!0)}),e.each(_.eventMap.up.split(" "),function(){o.addEventListener(this,T(n._release,n),!0)})):(e.each(_.eventMap.down.split(" "),function(){o.attachEvent(this,T(n._press,n))}),e.each(_.eventMap.up.split(" "),function(){o.attachEvent(this,T(n._release,n))})),C.fn.init.call(n),n.bind(["press","release"],i||{})},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())}}),j=C.extend({init:function(t){var i=this;C.fn.init.call(i),i.forcedEnabled=!1,e.extend(i,t),i.scale=1,i.horizontal?(i.measure="offsetWidth",i.scrollSize="scrollWidth",i.axis="x"):(i.measure="offsetHeight",i.scrollSize="scrollHeight",i.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||e<this.min},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,i=t.virtual?t._virtualMax:t.getTotal(),n=i*t.scale,o=t.getSize();(0!==i||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=o,t.total=n,t.min=Math.min(t.max,o-n),t.minScale=o/i,t.centerOffset=(n-o)/2,t.enabled=t.forcedEnabled||n>o,e||t.trigger(P,t))}}),G=C.extend({init:function(e){var t=this;C.fn.init.call(t),t.x=new j(D({horizontal:!0},e)),t.y=new j(D({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(P,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(P)}}),$=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,i=t.dimension,n=t.axis,o=t.movable,r=o[n]+e;i.enabled&&((r<i.min&&e<0||r>i.max&&e>0)&&(e*=t.resistance),o.translateAxis(n,e),t.trigger(P,t))}}),K=k.extend({init:function(t){var i,n,o,r,s=this;D(s,{elastic:!0},t),o=s.elastic?.5:0,r=s.movable,s.x=i=new $({axis:"x",dimension:s.dimensions.x,resistance:o,movable:r}),s.y=n=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,d=e.center,u=e.distance/l.distance,h=s.dimensions.minScale,p=s.dimensions.maxScale;r.scale<=h&&u<1&&(u+=.8*(1-u)),r.scale*u>=p&&(u=p/r.scale),o=r.x+s.offset.left,a=r.y+s.offset.top,t={x:(o-c.x)*u+d.x-o,y:(a-c.y)*u+d.y-a},r.scaleWith(u),i.dragMove(t.x),n.dragMove(t.y),s.dimensions.rescale(r.scale),s.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(i.dimension.enabled||n.dimension.enabled?(i.dragMove(e.x.delta),n.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),Y=b.transitions.prefix+"Transform";p=b.hasHW3D?function(e,t,i){return"translate3d("+e+"px,"+t+"px,0) scale("+i+")"}:function(e,t,i){return"translate("+e+"px,"+t+"px) scale("+i+")"},f=C.extend({init:function(t){var i=this;C.fn.init.call(i),i.element=e(t),i.element[0].style.webkitTransformOrigin="left top",i.x=0,i.y=0,i.scale=1,i._saveCoordinates(p(i.x,i.y,i.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,i=t.x,n=t.y;t.round&&(i=Math.round(i),n=Math.round(n)),e=p(i,n,t.scale),e!=t.coordinates&&(_.support.browser.msie&&_.support.browser.version<10?(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[Y]=e,t._saveCoordinates(e),t.trigger(P))},_saveCoordinates:function(e){this.coordinates=e}}),m=x.extend({init:function(e,t){var i,n=this;x.fn.init.call(n,e,t),i=n.options.group,i in I?I[i].push(n):I[i]=[n]},events:[V,W,U],options:{name:"DropTarget",group:"default"},destroy:function(){a(I,this)},_trigger:function(e,t){var i=this,n=E[i.options.group];if(n)return i.trigger(e,D({},t.event,{draggable:n,dropTarget:t.dropTarget}))},_over:function(e){this._trigger(V,e)},_out:function(e){this._trigger(W,e)},_drop:function(e){var t=this,i=E[t.options.group];i&&(i.dropped=!t._trigger(U,e))}}),m.destroyGroup=function(e){var t,i=I[e]||M[e];if(i){for(t=0;t<i.length;t++)x.fn.destroy.call(i[t]);i.length=0,delete I[e],delete M[e]}},m._cache=I,g=m.extend({init:function(e,t){var i,n=this;x.fn.init.call(n,e,t),i=n.options.group,i in M?M[i].push(n):M[i]=[n]},destroy:function(){a(M,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),v=x.extend({init:function(e,t){var i=this;x.fn.init.call(i,e,t),i._activated=!1,i.userEvents=new S(i.element,{global:!0,allowSelection:!0,filter:i.options.filter,threshold:i.options.distance,start:T(i._start,i),hold:T(i._hold,i),move:T(i._drag,i),end:T(i._end,i),cancel:T(i._cancel,i),select:T(i._select,i)}),i._afterEndHandler=T(i._afterEnd,i),i._captureEscape=T(i._captureEscape,i)},events:[B,z,L,H,N,O],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 i,n=this,r=n.options,s=n.boundaries,a=r.axis,l=n.options.cursorOffset;l?i={left:t.x.location+l.left,top:t.y.location+l.top}:(n.hintOffset.left+=t.x.delta,n.hintOffset.top+=t.y.delta,i=e.extend({},n.hintOffset)),s&&(i.top=o(i.top,s.y),i.left=o(i.left,s.x)),"x"===a?delete i.top:"y"===a&&delete i.left,n.hint.css(i)},_shouldIgnoreTarget:function(t){var i=this.options.ignore;return i&&e(t).is(i)},_select:function(e){this._shouldIgnoreTarget(e.event.target)||e.preventDefault()},_start:function(i){var n,o=this,s=o.options,a=s.container?e(s.container):null,l=s.hint;return this._shouldIgnoreTarget(i.touch.initialTouch)||s.holdToDrag&&!o._activated?(o.userEvents.cancel(),t):(o.currentTarget=i.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,n=A(o.currentTarget),o.hintOffset=n,o.hint.css({position:"absolute",zIndex:2e4,left:n.left,top:n.top}).appendTo(w.body),o.angular("compile",function(){o.hint.removeAttr("ng-repeat");for(var t=e(i.target);!t.data("$$kendoScope")&&t.length;)t=t.parent();return{elements:o.hint.get(),scopeFrom:t.data("$$kendoScope")}})),E[s.group]=o,o.dropped=!1,a&&(o.boundaries=r(a,o.hint)),e(w).on(F,o._captureEscape),o._trigger(z,i)&&(o.userEvents.cancel(),o._afterEnd()),o.userEvents.capture(),t)},_hold:function(e){this.currentTarget=e.target,this._trigger(B,e)?this.userEvents.cancel():this._activated=!0},_drag:function(t){var i,n;t.preventDefault(),i=this._elementUnderCursor(t),this.options.autoScroll&&this._cursorElement!==i&&(this._scrollableParent=d(i),this._cursorElement=i),this._lastEvent=t,this._processMovement(t,i),this.options.autoScroll&&this._scrollableParent[0]&&(n=u(t.x.location,t.y.location,l(this._scrollableParent)),this._scrollCompenstation=e.extend({},this.hintOffset),this._scrollVelocity=n,0===n.y&&0===n.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(e.proxy(this,"_autoScroll"),50))),this.hint&&this._updateHint(t)},_processMovement:function(i,n){this._withDropTarget(n,function(n,o){if(!n)return h&&(h._trigger(W,D(i,{dropTarget:e(h.targetElement)})),h=null),t;if(h){if(o===h.targetElement)return;h._trigger(W,D(i,{dropTarget:e(h.targetElement)}))}n._trigger(V,D(i,{dropTarget:e(o)})),h=D(n,{targetElement:o})}),this._trigger(L,D(i,{dropTarget:h,elementUnderCursor:n}))},_autoScroll:function(){var e,t,i,n,o,r,s,a,l=this._scrollableParent[0],d=this._scrollVelocity,u=this._scrollCompenstation;l&&(e=this._elementUnderCursor(this._lastEvent),this._processMovement(this._lastEvent,e),n=l===c()[0],n?(t=w.body.scrollHeight>y.height(),i=w.body.scrollWidth>y.width()):(t=l.offsetHeight<=l.scrollHeight,i=l.offsetWidth<=l.scrollWidth),o=l.scrollTop+d.y,r=t&&o>0&&o<l.scrollHeight,s=l.scrollLeft+d.x,a=i&&s>0&&s<l.scrollWidth,r&&(l.scrollTop+=d.y),a&&(l.scrollLeft+=d.x),this.hint&&n&&(a||r)&&(r&&(u.top+=d.y),a&&(u.left+=d.x),this.hint.css(u)))},_end:function(t){this._withDropTarget(this._elementUnderCursor(t),function(i,n){
i&&(i._drop(D({},t,{dropTarget:e(n)})),h=null)}),this._cancel(this._trigger(H,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 i=this;return i.trigger(e,D({},t.event,{x:t.x,y:t.y,currentTarget:i.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(e){var t=R(e),n=this.hint;return n&&i(n[0],t)&&(n.hide(),t=R(e),t||(t=R(e)),n.show()),t},_withDropTarget:function(e,t){var i,n=this.options.group,o=I[n],r=M[n];(o&&o.length||r&&r.length)&&(i=s(e,o,r),i?t(i.target,i.targetElement):t())},destroy:function(){var e=this;x.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 E[t.options.group],t.trigger("destroy"),t.trigger(O),e(w).off(F,t._captureEscape)}}),_.ui.plugin(m),_.ui.plugin(g),_.ui.plugin(v),_.TapCapture=q,_.containerBoundaries=r,D(_.ui,{Pane:K,PaneDimensions:G,Movable:f}),_.ui.Draggable.utils={autoScrollVelocity:u,scrollableViewPort:l,findScrollableParent:d}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.scroller.min",["kendo.fx.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile,o=i.effects,r=n.ui,s=e.proxy,a=e.extend,l=r.Widget,c=i.Class,d=i.ui.Movable,u=i.ui.Pane,h=i.ui.PaneDimensions,p=o.Transition,f=o.Animation,m=Math.abs,g=500,v=.7,_=.96,b=10,w=55,y=.5,k=5,x="km-scroller-release",C="km-scroller-refresh",S="pull",T="change",D="resize",A="scroll",E=2,I=f.extend({init:function(e){var t=this;f.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.movable.scale<this.dimensions.minScale},done:function(){return this.dimensions.minScale-this.movable.scale<.01},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)}}),M=f.extend({init:function(e){var t=this;f.fn.init.call(t),a(t,e,{transition:new p({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 m(this.velocity)<1},start:function(e){var t,i=this;i.dimension.enabled&&(i.paneAxis.outOfBounds()?i._snapBack():(t=e.touch.id===E?0:e.touch[i.axis].velocity,i.velocity=Math.max(Math.min(t*i.velocityMultiplier,w),-w),i.tapCapture.captureNext(),f.fn.start.call(i)))},tick:function(){var e=this,t=e.dimension,i=e.paneAxis.outOfBounds()?y:e.friction,n=e.velocity*=i,o=e.movable[e.axis]+n;!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,i=e.movable[e.axis]>t.max?t.max:t.min;e._moveTo(i)},_moveTo:function(e){this.transition.moveTo({location:e,duration:g,ease:p.easeOutExpo})}}),R=f.extend({init:function(e){var t=this;i.effects.Animation.fn.init.call(this),a(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return m(this.offset.y)<k&&m(this.offset.x)<k},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&&i.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}}}),F=c.extend({init:function(t){var i=this,n="x"===t.axis,o=e('<div class="km-touch-scrollbar km-'+(n?"horizontal":"vertical")+'-scrollbar" />');a(i,t,{element:o,elementSize:0,movable:new d(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:n?"width":"height"}),i.scrollMovable.bind(T,s(i.refresh,i)),i.container.append(o),t.alwaysVisible&&i.show()},refresh:function(){var e=this,t=e.axis,i=e.dimension,n=i.size,o=e.scrollMovable,r=n/i.total,s=Math.round(-o[t]*r),a=Math.round(n*r);r>=1?this.element.css("display","none"):this.element.css("display",""),s+a>n?a=n-s:s<0&&(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})}}),P=l.extend({init:function(n,o){var r,c,p,f,g,v,_,b,w,y=this;return l.fn.init.call(y,n,o),n=y.element,(y._native=y.options.useNative&&i.support.hasNativeScrolling)?(n.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),a(y,{scrollElement:n,fixedContainer:n.children().first()}),t):(n.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),r=n.children().eq(1),c=new i.TapCapture(n),p=new d(r),f=new h({element:r,container:n,forcedEnabled:y.options.zoom}),g=this.options.avoidScrolling,v=new i.UserEvents(n,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:y.options.zoom,supportDoubleTap:y.options.supportDoubleTap,start:function(t){f.refresh();var i=m(t.x.velocity),n=m(t.y.velocity),o=2*i>=n,r=e.contains(y.fixedContainer[0],t.event.target),s=2*n>=i;!r&&!g(t)&&y.enabled&&(f.x.enabled&&o||f.y.enabled&&s)?v.capture():v.cancel()}}),_=new u({movable:p,dimensions:f,userEvents:v,elastic:y.options.elastic}),b=new I({movable:p,dimensions:f,userEvents:v,tapCapture:c}),w=new R({moveTo:function(e){y.scrollTo(e.x,e.y)}}),p.bind(T,function(){y.scrollTop=-p.y,y.scrollLeft=-p.x,y.trigger(A,{scrollTop:y.scrollTop,scrollLeft:y.scrollLeft})}),y.options.mousewheelScrolling&&n.on("DOMMouseScroll mousewheel",s(this,"_wheelScroll")),a(y,{movable:p,dimensions:f,zoomSnapBack:b,animatedScroller:w,userEvents:v,pane:_,tapCapture:c,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:n.children().first()}),y._initAxis("x"),y._initAxis("y"),y._wheelEnd=function(){y._wheel=!1,y.userEvents.end(0,y._wheelY)},f.refresh(),y.options.pullToRefresh&&y._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=i.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(m(e)),this.scrollElement.scrollTop(m(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,i){var n,o;this._native?this.scrollTo(e,t):(n={x:this.movable.x,y:this.movable.y},o={x:e,y:t},this.animatedScroller.setCoordinates(n,o),this.animatedScroller.setCallback(i),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=i.template(e.options.messages.pullTemplate),e.releaseTemplate=i.template(e.options.messages.releaseTemplate),e.refreshTemplate=i.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(x).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/y>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(C).addClass(x),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,i=t.movable,n=t.dimensions[e],o=t.tapCapture,r=t.pane[e],s=new F({axis:e,movable:i,dimension:n,container:t.element,alwaysVisible:t.options.visibleScrollHints});n.bind(T,function(){s.refresh()}),r.bind(T,function(){s.show()}),t[e+"inertia"]=new M({axis:e,paneAxis:r,movable:i,tapCapture:o,userEvents:t.userEvents,dimension:n,elastic:t.options.elastic,friction:t.options.friction||_,velocityMultiplier:t.options.velocityMultiplier||b,end:function(){s.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});r.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.groupable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function i(e){return e.position().top+3}var n=window.kendo,o=n.ui.Widget,r=n._outerWidth,s=e.proxy,a=!1,l=".kendoGroupable",c="change",d=n.template('<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-i-sort-${(data.dir || "asc") == "asc" ? "asc-sm" : "desc-sm"}" title="(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})"></span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close"></span></a></div>',{useWithBlock:!1}),u=function(t){var i=t.attr(n.attr("title"));return i&&(i=n.htmlEncode(i)),e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(i||t.attr(n.attr("field"))).prepend('<span class="k-icon k-drag-status k-i-cancel" />')},h=e('<div class="k-grouping-dropclue"/>'),p=o.extend({init:function(d,p){var f,m,g=this,v=n.guid(),_=s(g._intializePositions,g),b=g._dropCuePositions=[];o.fn.init.call(g,d,p),a=n.support.isRtl(d),m=a?"right":"left",g.draggable=f=g.options.draggable||new n.ui.Draggable(g.element,{filter:g.options.draggableElements,hint:u,group:v}),g.groupContainer=e(g.options.groupContainer,g.element).kendoDropTarget({group:f.options.group,dragenter:function(e){g._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus"),h.css("top",i(g.groupContainer)).css(m,0).appendTo(g.groupContainer))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"),h.remove()},drop:function(t){var i,o=t.draggable.currentTarget,r=o.attr(n.attr("field")),s=o.attr(n.attr("title")),l=g.indicator(r),c=g._dropCuePositions,d=c[c.length-1];(o.hasClass("k-group-indicator")||g._canDrag(o))&&(d?(i=g._dropCuePosition(n.getOffset(h).left+parseInt(d.element.css("marginLeft"),10)*(a?-1:1)+parseInt(d.element.css("marginRight"),10)),i&&g._canDrop(e(l),i.element,i.left)&&(i.before?i.element.before(l||g.buildIndicator(r,s)):i.element.after(l||g.buildIndicator(r,s)),g._change())):(g.groupContainer.append(g.buildIndicator(r,s)),g._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:u,group:f.options.group,dragcancel:s(g._dragCancel,g),dragstart:function(e){var t=e.currentTarget,n=parseInt(t.css("marginLeft"),10),o=t.position(),s=a?o.left-n:o.left+r(t);_(),h.css({top:i(g.groupContainer),left:s}).appendTo(g.groupContainer),this.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")},dragend:function(){g._dragEnd(this)},drag:s(g._drag,g)}).on("click"+l,".k-button",function(t){t.preventDefault(),g._removeIndicator(e(this).parent())}).on("click"+l,".k-link",function(t){var i=e(this).parent(),o=g.buildIndicator(i.attr(n.attr("field")),i.attr(n.attr("title")),"asc"==i.attr(n.attr("dir"))?"desc":"asc");i.before(o).remove(),g._change(),t.preventDefault()}),f.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){g._dragEnd(this)},dragcancel:s(g._dragCancel,g),dragstart:function(e){var i,n,o;return g.options.allowDrag||g._canDrag(e.currentTarget)?(_(),b.length?(i=b[b.length-1].element,n=parseInt(i.css("marginRight"),10),o=i.position().left+r(i)+n):o=0,t):(e.preventDefault(),t)},drag:s(g._drag,g)}),g.dataSource=g.options.dataSource,g.dataSource&&g._refreshHandler?g.dataSource.unbind(c,g._refreshHandler):g._refreshHandler=s(g.refresh,g),g.dataSource&&(g.dataSource.bind("change",g._refreshHandler),g.refresh())},refresh:function(){var t=this,i=t.dataSource;t.groupContainer&&t.groupContainer.empty().append(e.map(i.group()||[],function(i){var o=i.field,r=n.attr("field"),s=t.element.find(t.options.filter).filter(function(){return e(this).attr(r)===o});return t.buildIndicator(i.field,s.attr(n.attr("title")),i.dir)}).join("")),t._invalidateGroupContainer()},destroy:function(){var e=this;o.fn.destroy.call(e),e.groupContainer.off(l),e.groupContainer.data("kendoDropTarget")&&e.groupContainer.data("kendoDropTarget").destroy(),e.groupContainer.data("kendoDraggable")&&e.groupContainer.data("kendoDraggable").destroy(),e.options.draggable||e.draggable.destroy(),e.dataSource&&e._refreshHandler&&(e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=null),e.groupContainer=e.element=e.draggable=null},events:["change"],options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(t){var i=e(".k-group-indicator",this.groupContainer);return e.grep(i,function(i){return e(i).attr(n.attr("field"))===t})[0]},buildIndicator:function(e,t,i){return d({field:e.replace(/"/g,"'"),dir:i,title:t,ns:n.ns})},aggregates:function(){var t,i,o,r=this;return r.element.find(r.options.filter).map(function(){var r=e(this),s=r.attr(n.attr("aggregates")),a=r.attr(n.attr("field"));if(s&&""!==s)for(t=s.split(","),s=[],i=0,o=t.length;i<o;i++)s.push({field:a,aggregate:t[i]});return s}).toArray()},descriptors:function(){var t,i=this,o=e(".k-group-indicator",i.groupContainer),r=i.aggregates();return e.map(o,function(i){return i=e(i),t=i.attr(n.attr("field")),{field:t,dir:i.attr(n.attr("dir")),aggregates:r||[]}})},_removeIndicator:function(e){var t=this;e.remove(),t._invalidateGroupContainer(),t._change()},_change:function(){var e,i=this;if(i.dataSource){if(e=i.descriptors(),i.trigger("change",{groups:e}))return i.refresh(),t;i.dataSource.group(e)}},_dropCuePosition:function(t){var i,n,o,s,l,c=this._dropCuePositions;if(h.is(":visible")&&0!==c.length)return t=Math.ceil(t),i=c[c.length-1],n=i.left,o=i.right,s=parseInt(i.element.css("marginLeft"),10),l=parseInt(i.element.css("marginRight"),10),t>=o&&!a||t<n&&a?t={left:i.element.position().left+(a?-s:r(i.element)+l),element:i.element,before:!1}:(t=e.grep(c,function(e){return e.left<=t&&t<=e.right||a&&t>e.right})[0],t&&(t={left:a?t.element.position().left+r(t.element)+l:t.element.position().left-s,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&h.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(n.attr("field"));return"false"!=e.attr(n.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,i){var n=e.next(),o=e[0]!==t[0]&&(!n[0]||t[0]!==n[0]||!a&&i>n.position().left||a&&i<n.position().left);return o},_dragEnd:function(t){var i=this,o=t.currentTarget.attr(n.attr("field")),r=i.indicator(o);t!==i.options.draggable&&!t.dropped&&r&&i._removeIndicator(e(r)),i._dragCancel()},_dragCancel:function(){h.remove(),this._dropCuePositions=[]},_intializePositions:function(){var t,i=this,o=e(".k-group-indicator",i.groupContainer);i._dropCuePositions=e.map(o,function(i){return i=e(i),t=n.getOffset(i).left,{left:parseInt(t,10),right:parseInt(t+r(i),10),element:i}})},_invalidateGroupContainer:function(){var e=this.groupContainer;e&&e.is(":empty")&&e.html(this.options.messages.empty)}});n.ui.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.reorderable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function i(t,i){t=e(t),i?t.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"):t.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")}var n=window.kendo,o=n._outerWidth,r=n._outerHeight,s=n.getOffset,a=n.ui.Widget,l="change",c="k-reorderable",d=a.extend({init:function(t,d){var u,h=this,p=n.guid()+"-reorderable";a.fn.init.call(h,t,d),t=h.element.addClass(c),d=h.options,h.draggable=u=d.draggable||new n.ui.Draggable(t,{group:p,autoScroll:!0,filter:d.filter,hint:d.hint}),h.reorderDropCue=e('<div class="k-reorder-cue"></div></div>'),t.find(u.options.filter).kendoDropTarget({group:u.options.group,dragenter:function(e){var t,n,a,l;h._draggable&&(t=this.element,a=!h._dropTargetAllowed(t)||h._isLastDraggable(),i(e.draggable.hint,a),a||(n=s(t),l=n.left,d.inSameContainer&&!d.inSameContainer({source:t,target:h._draggable,sourceIndex:h._index(t),targetIndex:h._index(h._draggable)})?h._dropTarget=t:h._index(t)>h._index(h._draggable)&&(l+=o(t)),h.reorderDropCue.css({height:r(t),top:n.top,left:l}).appendTo(document.body)))},dragleave:function(e){i(e.draggable.hint,!0),h.reorderDropCue.remove(),h._dropTarget=null},drop:function(){var e,t;h._dropTarget=null,h._draggable&&(e=this.element,t=h._draggable,h._dropTargetAllowed(e)&&!h._isLastDraggable()&&h.trigger(l,{element:h._draggable,target:e,oldIndex:h._index(t),newIndex:h._index(e),position:s(h.reorderDropCue).left>s(e).left?"after":"before"}))}}),u.bind(["dragcancel","dragend","dragstart","drag"],{dragcancel:function(){h.reorderDropCue.remove(),h._draggable=null,h._elements=null},dragend:function(){h.reorderDropCue.remove(),h._draggable=null,h._elements=null},dragstart:function(e){h._draggable=e.currentTarget,h._elements=h.element.find(h.draggable.options.filter)},drag:function(e){var t,i;h._dropTarget&&!this.hint.find(".k-drag-status").hasClass("k-i-cancel")&&(t=s(h._dropTarget).left,i=o(h._dropTarget),h.reorderDropCue.css(e.pageX>t+i/2?{left:t+i}:{left:t}))}})},options:{name:"Reorderable",filter:"*"},events:[l],_isLastDraggable:function(){var e,t=this.options.inSameContainer,i=this._draggable[0],n=this._elements.get(),o=!1;if(!t)return!1;for(;!o&&n.length>0;)e=n.pop(),o=i!==e&&t({source:i,target:e,sourceIndex:this._index(i),targetIndex:this._index(e)});return!o},_dropTargetAllowed:function(e){var t=this.options.inSameContainer,i=this.options.dragOverContainers,n=this._draggable;return n[0]!==e[0]&&(!t||!i||(!!t({source:n,target:e,sourceIndex:this._index(n),targetIndex:this._index(e)})||i(this._index(n),this._index(e))))},_index:function(e){return this._elements.index(e)},destroy:function(){var t=this;a.fn.destroy.call(t),t.element.find(t.draggable.options.filter).each(function(){var t=e(this);t.data("kendoDropTarget")&&t.data("kendoDropTarget").destroy()}),t.draggable&&(t.draggable.destroy(),t.draggable.element=t.draggable=null),t.elements=t.reorderDropCue=t._elements=t._draggable=null}});n.ui.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.resizable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui,o=n.Widget,r=e.proxy,s=i.isFunction,a=e.extend,l="horizontal",c="vertical",d="start",u="resize",h="resizeend",p=o.extend({init:function(e,t){var i=this;o.fn.init.call(i,e,t),i.orientation=i.options.orientation.toLowerCase()!=c?l:c,i._positionMouse=i.orientation==l?"x":"y",i._position=i.orientation==l?"left":"top",i._sizingDom=i.orientation==l?"outerWidth":"outerHeight",i.draggable=new n.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:r(i._resize,i),dragcancel:r(i._cancel,i),dragstart:r(i._start,i),dragend:r(i._stop,i)}),i.userEvents=i.draggable.userEvents},events:[u,h,d],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var i=this,n=i.hint?i.hint[i._sizingDom]():0,o=i.options.max;return s(o)?o(e):o!==t?i._initialElementPosition+o-n:o},_min:function(e){var i=this,n=i.options.min;return s(n)?n(e):n!==t?i._initialElementPosition+n:n},_start:function(t){var i=this,n=i.options.hint,o=e(t.currentTarget);i._initialElementPosition=o.position()[i._position],i._initialMousePosition=t[i._positionMouse].startLocation,n&&(i.hint=s(n)?e(n(o)):n,i.hint.css({position:"absolute"}).css(i._position,i._initialElementPosition).appendTo(i.element)),i.trigger(d,t),i._maxPosition=i._max(t),i._minPosition=i._min(t),e(document.body).css("cursor",o.css("cursor"))},_resize:function(e){var i,n=this,o=n._maxPosition,r=n._minPosition,s=n._initialElementPosition+(e[n._positionMouse].location-n._initialMousePosition);i=r!==t?Math.max(r,s):s,n.position=i=o!==t?Math.min(o,i):i,n.hint&&n.hint.toggleClass(n.options.invalidClass||"",i==o||i==r).css(n._position,i),n.resizing=!0,n.trigger(u,a(e,{position:i}))},_stop:function(t){var i=this;i.hint&&i.hint.remove(),i.resizing=!1,i.trigger(h,a(t,{position:i.position})),e(document.body).css("cursor","")},_cancel:function(e){var i=this;i.hint&&(i.position=t,i.hint.css(i._position,i._initialElementPosition),i._stop(e))},destroy:function(){var e=this;o.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),i=this;i.userEvents.press(t.left,t.top,e[0]),i.targetPosition=t,i.target=e}},move:function(e){var i=this,n=i._position,o=i.targetPosition,r=i.position;r===t&&(r=o[n]),o[n]=r+e,i.userEvents.move(o.left,o.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});i.ui.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.sortable.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function i(t,i){try{return e.contains(t,i)||t==i}catch(n){return!1}}function n(e){return e.clone()}function o(e){return e.clone().removeAttr("id").css("visibility","hidden")}var r=window.kendo,s=r.ui.Widget,a=r._outerWidth,l=r._outerHeight,c="start",d="beforeMove",u="move",h="end",p="change",f="cancel",m="sort",g="remove",v="receive",_=">*",b=-1,w=s.extend({init:function(e,t){var i=this;s.fn.init.call(i,e,t),i.options.placeholder||(i.options.placeholder=o),i.options.hint||(i.options.hint=n),i.draggable=i._createDraggable()},events:[c,d,u,h,p,f],options:{name:"Sortable",hint:null,placeholder:null,filter:_,holdToDrag:!1,disabled:null,container:null,connectWith:null,handler:null,cursorOffset:null,axis:null,ignore:null,autoScroll:!1,cursor:"auto",moveOnDragEnter:!1},destroy:function(){this.draggable.destroy(),s.fn.destroy.call(this)},_createDraggable:function(){var t=this,i=t.element,n=t.options;return new r.ui.Draggable(i,{filter:n.filter,hint:r.isFunction(n.hint)?n.hint:e(n.hint),holdToDrag:n.holdToDrag,container:n.container?e(n.container):null,cursorOffset:n.cursorOffset,axis:n.axis,ignore:n.ignore,autoScroll:n.autoScroll,dragstart:e.proxy(t._dragstart,t),dragcancel:e.proxy(t._dragcancel,t),drag:e.proxy(t._drag,t),dragend:e.proxy(t._dragend,t)})},_dragstart:function(t){var i=this.draggedElement=t.currentTarget,n=this.options.disabled,o=this.options.handler,s=this.options.placeholder,a=this.placeholder=e(r.isFunction(s)?s.call(this,i):s);n&&i.is(n)?t.preventDefault():o&&!e(t.initialTarget).is(o)?t.preventDefault():this.trigger(c,{item:i,draggableEvent:t})?t.preventDefault():(i.css("display","none"),i.before(a),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(f,{item:this.draggedElement}),this._resetCursor()},_drag:function(i){var n,o,r,s,a,l=this.draggedElement,c=this._findTarget(i),d={left:i.x.location,top:i.y.location},u={x:i.x.delta,y:i.y.delta},h=this.options.axis,p=this.options.moveOnDragEnter,f={item:l,list:this,draggableEvent:i};if("x"===h||"y"===h)return this._movementByAxis(h,d,u[h],f),t;if(c){if(n=this._getElementCenter(c.element),o={left:Math.round(d.left-n.left),top:Math.round(d.top-n.top)},e.extend(f,{target:c.element}),c.appendToBottom)return this._movePlaceholder(c,null,f),t;if(c.appendAfterHidden&&this._movePlaceholder(c,"next",f),this._isFloating(c.element)?u.x<0&&p||!p&&o.left<0?r="prev":(u.x>0&&p||!p&&o.left>0)&&(r="next"):u.y<0&&p||!p&&o.top<0?r="prev":(u.y>0&&p||!p&&o.top>0)&&(r="next"),r){for(a="prev"===r?jQuery.fn.prev:jQuery.fn.next,s=a.call(c.element);s.length&&!s.is(":visible");)s=a.call(s);s[0]!=this.placeholder[0]&&this._movePlaceholder(c,r,f)}}},_dragend:function(i){var n,o,r,s,a=this.placeholder,l=this.draggedElement,c=this.indexOf(l),d=this.indexOf(a),u=this.options.connectWith;return this._resetCursor(),r={action:m,item:l,oldIndex:c,newIndex:d,draggableEvent:i},d>=0?o=this.trigger(h,r):(n=a.parents(u).getKendoSortable(),r.action=g,s=e.extend({},r,{action:v,oldIndex:b,newIndex:n.indexOf(a)}),o=!(!this.trigger(h,r)&&!n.trigger(h,s))),o||d===c?(this._cancel(),t):(a.replaceWith(l),l.show(),this.draggable.dropped=!0,r={action:this.indexOf(l)!=b?m:g,item:l,oldIndex:c,newIndex:this.indexOf(l),draggableEvent:i},this.trigger(p,r),n&&(s=e.extend({},r,{action:v,oldIndex:b,newIndex:n.indexOf(l)}),n.trigger(p,s)),t)},_findTarget:function(i){var n,o,r=this._findElementUnderCursor(i),s=this.options.connectWith;return e.contains(this.element[0],r)?(n=this.items(),o=n.filter(r)[0]||n.has(r)[0],o?{element:e(o),sortable:this}:null):this.element[0]==r&&this._isEmpty()?{element:this.element,sortable:this,appendToBottom:!0}:this.element[0]==r&&this._isLastHidden()?(o=this.items().eq(0),{element:o,sortable:this,appendAfterHidden:!0}):s?this._searchConnectedTargets(r,i):t},_findElementUnderCursor:function(e){var t=r.elementUnderCursor(e),n=e.sender;return i(n.hint[0],t)&&(n.hint.hide(),t=r.elementUnderCursor(e),t||(t=r.elementUnderCursor(e)),n.hint.show()),t},_searchConnectedTargets:function(t,i){var n,o,r,s,a=e(this.options.connectWith);for(s=0;s<a.length;s++)if(n=a.eq(s).getKendoSortable(),e.contains(a[s],t)){if(n)return o=n.items(),r=o.filter(t)[0]||o.has(t)[0],r?(n.placeholder=this.placeholder,{element:e(r),sortable:n}):null}else if(a[s]==t){if(n&&n._isEmpty())return{element:a.eq(s),sortable:n,appendToBottom:!0};if(this._isCursorAfterLast(n,i))return r=n.items().last(),{element:r,sortable:n}}},_isCursorAfterLast:function(e,t){var i,n,o=e.items().last(),s={left:t.x.location,top:t.y.location};return i=r.getOffset(o),i.top+=l(o),i.left+=a(o),n=this._isFloating(o)?i.left-s.left:i.top-s.top,n<0},_movementByAxis:function(t,i,n,o){var r,s="x"===t?i.left:i.top,a=n<0?this.placeholder.prev():this.placeholder.next(),l=this.items();a.length&&!a.is(":visible")&&(a=n<0?a.prev():a.next()),l.filter(a).length&&(e.extend(o,{target:a}),r=this._getElementCenter(a),r&&(r="x"===t?r.left:r.top),a.length&&n<0&&s-r<0?this._movePlaceholder({element:a,sortable:this},"prev",o):a.length&&n>0&&s-r>0&&this._movePlaceholder({element:a,sortable:this},"next",o))},_movePlaceholder:function(e,t,i){var n=this.placeholder;e.sortable.trigger(d,i)||(t?"prev"===t?e.element.before(n):"next"===t&&e.element.after(n):e.element.append(n),e.sortable.trigger(u,i))},_setCursor:function(){var t,i=this.options.cursor;i&&"auto"!==i&&(t=e(document.body),this._originalCursorType=t.css("cursor"),t.css({cursor:i}),this._cursorStylesheet||(this._cursorStylesheet=e("<style>* { cursor: "+i+" !important; }</style>")),this._cursorStylesheet.appendTo(t))},_resetCursor:function(){this._originalCursorType&&(e(document.body).css("cursor",this._originalCursorType),this._originalCursorType=null,this._cursorStylesheet.remove())},_getElementCenter:function(e){var t=e.length?r.getOffset(e):null;return t&&(t.top+=l(e)/2,t.left+=a(e)/2),t},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_cancel:function(){this.draggedElement.show(),this.placeholder.remove()},_items:function(){var e,t=this.options.filter;return e=t?this.element.find(t):this.element.children()},indexOf:function(e){var t=this._items(),i=this.placeholder,n=this.draggedElement;return i&&e[0]==i[0]?t.not(n).index(e):t.not(i).index(e)},items:function(){var e=this.placeholder,t=this._items();return e&&(t=t.not(e)),t},_isEmpty:function(){return!this.items().length},_isLastHidden:function(){return 1===this.items().length&&this.items().is(":hidden")}});r.ui.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function i(e,t){if(!e.is(":visible"))return!1;var i=o.getOffset(e),n=t.left+t.width,r=t.top+t.height;return i.right=i.left+o._outerWidth(e),i.bottom=i.top+o._outerHeight(e),!(i.left>n||i.right<t.left||i.top>r||i.bottom<t.top)}var n,o=window.kendo,r=o.ui.Widget,s=e.proxy,a=Math.abs,l="aria-selected",c="k-state-selected",d="k-state-selecting",u="k-selectable",h="change",p=".kendoSelectable",f="k-state-unselecting",m="input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",g=o.support.browser.msie,v=!1;!function(e){!function(){e('<div class="parent"><span /></div>').on("click",">*",function(){v=!0}).find("span").click().end().off()}()}(e),n=r.extend({init:function(t,i){var n,a=this;r.fn.init.call(a,t,i),a._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>"),a._lastActive=null,a.element.addClass(u),a.relatedTarget=a.options.relatedTarget,n=a.options.multiple,this.options.aria&&n&&a.element.attr("aria-multiselectable",!0),
a.userEvents=new o.UserEvents(a.element,{global:!0,allowSelection:!0,filter:(v?"":"."+u+" ")+a.options.filter,tap:s(a._tap,a),touchAction:n?"none":"pan-x pan-y"}),n&&a.userEvents.bind("start",s(a._start,a)).bind("move",s(a._move,a)).bind("end",s(a._end,a)).bind("select",s(a._select,a))},events:[h],options:{name:"Selectable",filter:">*",inputSelectors:m,multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,i=this.element,n=i.length,o=!1;for(e=e[0],t=0;t<n;t++)if(i[t]===e){o=!0;break}return o},_tap:function(t){var i,n=e(t.target),o=this,r=t.event.ctrlKey||t.event.metaKey,s=o.options.multiple,a=s&&t.event.shiftKey,l=t.event.which,d=t.event.button;!o._isElement(n.closest("."+u))||l&&3==l||d&&2==d||this._allowSelection(t.event.target)&&(i=n.hasClass(c),s&&r||o.clear(),n=n.add(o.relatedTarget(n)),a?o.selectRange(o._firstSelectee(),n,t):(i&&r?(o._unselect(n),o._notify(h,t)):o.value(n,t),o._lastActive=o._downTarget=n))},_start:function(i){var n,o=this,r=e(i.target),s=r.hasClass(c),a=i.event.ctrlKey||i.event.metaKey;if(this._allowSelection(i.event.target)){if(o._downTarget=r,!o._isElement(r.closest("."+u)))return o.userEvents.cancel(),t;o.options.useAllItems?o._items=o.element.find(o.options.filter):(n=r.closest(o.element),o._items=n.find(o.options.filter)),i.sender.capture(),o._marquee.appendTo(document.body).css({left:i.x.client+1,top:i.y.client+1,width:0,height:0}),a||o.clear(),r=r.add(o.relatedTarget(r)),s&&(o._selectElement(r,!0),a&&r.addClass(f))}},_move:function(e){var t=this,i={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:a(e.x.initialDelta),height:a(e.y.initialDelta)};t._marquee.css(i),t._invalidateSelectables(i,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(e){var t,i=this;i._marquee.remove(),i._unselect(i.element.find(i.options.filter+"."+f)).removeClass(f),t=i.element.find(i.options.filter+"."+d),t=t.add(i.relatedTarget(t)),i.value(t,e),i._lastActive=i._downTarget,i._items=null},_invalidateSelectables:function(e,t){var n,o,r,s,a=this._downTarget[0],l=this._items;for(n=0,o=l.length;n<o;n++)s=l.eq(n),r=s.add(this.relatedTarget(s)),i(s,e)?s.hasClass(c)?t&&a!==s[0]&&r.removeClass(c).addClass(f):s.hasClass(d)||s.hasClass(f)||r.addClass(d):s.hasClass(d)?r.removeClass(d):t&&s.hasClass(f)&&r.removeClass(f).addClass(c)},value:function(e,i){var n=this,o=s(n._selectElement,n);return e?(e.each(function(){o(this)}),n._notify(h,i),t):n.element.find(n.options.filter+"."+c)},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value(),e.length>0?e[0]:t.element.find(t.options.filter)[0])},_selectElement:function(t,i){var n=e(t),o=!i&&this._notify("select",{element:t});n.removeClass(d),o||(n.addClass(c),this.options.aria&&n.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){return e.removeClass(c),this.options.aria&&e.attr(l,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!g||g&&!e(o._activeElement()).is(this.options.inputSelectors))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+c);this._unselect(e)},selectRange:function(t,i,n){var o,r,s,a=this;for(a.clear(),a.element.length>1&&(s=a.options.continuousItems()),s&&s.length||(s=a.element.find(a.options.filter)),t=e.inArray(e(t)[0],s),i=e.inArray(e(i)[0],s),t>i&&(r=t,t=i,i=r),a.options.useAllItems||(i+=a.element.length-1),o=t;o<=i;o++)a._selectElement(s[o]);a._notify(h,n)},destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(p),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),n.parseOptions=function(e){var t="string"==typeof e&&e.toLowerCase();return{multiple:t&&t.indexOf("multiple")>-1,cell:t&&t.indexOf("cell")>-1}},o.ui.plugin(n)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("chat/view.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var i,n,o,r,s=window.kendo,a=s.ui.Widget,l=e.extend,c=e.proxy,d=".",u=" ",h=".kendoChat",p=s.template('<div #:text# class="#=styles.messageGroup# #= url ? "" : styles.noAvatar #"><p class="#=styles.author#">#:text#</p># if (url) { #<img src="#=url#" alt="#:text#" class="#=styles.avatar#"># } #</div>'),f=s.template('<div me class="#=styles.messageGroup# #=styles.self# #= url ? "" : styles.noAvatar #"># if (url) { #<img src="#=url#" alt="#:text#" class="#=styles.avatar#"># } #</div>'),m=s.template('<div class="#=styles.message#"><time class="#=styles.messageTime#">#= kendo.toString(kendo.parseDate(timestamp), "HH:mm:ss") #</time><div class="#=styles.bubble#">#:text#</div></div>'),g=s.template('<div class="#=styles.message#"><div class="#=styles.bubble#"><div class="#=styles.typingIndicator#"><span></span><span></span><span></span></div></div></div>'),v=s.template('<div class="#=styles.suggestedActions#"># for (var i = 0; i < suggestedActions.length; i++) { #<span class="#=styles.suggestedAction#" data-value="#:suggestedActions[i].value#">#:suggestedActions[i].title#</span># } #</div>'),_=s.template('<div class="#=styles.card# #=styles.cardRich#"># if (typeof images !== "undefined" && images.length > 0) { #<img src="#:images[0].url#" alt="#:images[0].alt#" class="#=styles.cardImage#" /># } #<div class="#=styles.cardBody#"># if (typeof title !== "undefined") { #<h5 class="#=styles.cardTitle#">#:title#</h5># } ## if (typeof subtitle !== "undefined") { #<h6 class="#=styles.cardSubtitle#">#:subtitle#</h6># } ## if (typeof text !== "undefined") { #<p>#:text#</p># } #</div># if (typeof buttons !== "undefined" && buttons.length > 0) { #<div class="#=styles.cardActions# #=styles.cardActionsVertical#"># for (var i = 0; i < buttons.length; i++) { #<span class="#=styles.cardAction#"><span class="#=styles.button# #=styles.buttonPrimary#" data-value="#:buttons[i].value#">#:buttons[i].title#</span></span># } #</div># } #</div>');s.chat={Templates:{},Components:{}},s.chat.registerTemplate=function(e,t){s.chat.Templates[e]=s.template(t)},s.chat.getTemplate=function(e){return s.chat.Templates[e]||m},s.chat.registerTemplate("text",m),s.chat.registerTemplate("message",m),s.chat.registerTemplate("typing",g),s.chat.registerTemplate("suggestedAction",v),s.chat.registerTemplate("heroCard",_),s.chat.registerTemplate("application/vnd.microsoft.card.hero",_),s.chat.registerComponent=function(e,t){s.chat.Components[e]=t},s.chat.getComponent=function(e){return s.chat.Components[e]||null},i=s.chat.Component=s.Class.extend({init:function(t,i){this.element=e("<div></div>"),this.options=t,this.view=i},destroy:function(){s.destroy(this.element)}}),n=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this.element.kendoCalendar({change:function(){t.trigger("suggestedAction",{text:s.toString(this.value(),"d"),type:"message"})}})},destroy:function(){}}),s.chat.registerComponent("calendar",n),o={wrapper:"k-widget k-chat",messageList:"k-avatars",messageListContent:"k-message-list-content",messageTime:"k-message-time",messageGroup:"k-message-group",message:"k-message",only:"k-only",first:"k-first",middle:"k-middle",last:"k-last",author:"k-author",avatar:"k-avatar",noAvatar:"k-no-avatar",self:"k-alt",button:"k-button",iconButton:"k-button-icon",buttonPrimary:"k-flat k-primary",scrollButtonIcon:"k-icon",scrollButtonIconLeft:"k-i-arrow-chevron-left",scrollButtonIconRight:"k-i-arrow-chevron-right",typingIndicator:"k-typing-indicator",bubble:"k-bubble",suggestedActions:"k-quick-replies",suggestedAction:"k-quick-reply",cardWrapper:"k-card-container",cardDeckScrollWrap:"k-card-deck-scrollwrap",cardDeck:"k-card-deck",cardList:"k-card-list",card:"k-card",cardRich:"k-card-type-rich",cardBody:"k-card-body",cardImage:"k-card-image",cardTitle:"k-card-title",cardSubtitle:"k-card-subtitle",cardActions:"k-card-actions",cardActionsVertical:"k-card-actions-vertical",cardAction:"k-card-action",selected:"k-state-selected"},r=s.chat.ChatView=a.extend({init:function(e,t){a.fn.init.call(this,e,t),this._list(),this._lastSender=null,this._attachEvents(),this._scrollable()},events:[],options:{},destroy:function(){a.fn.destroy.call(this),this._scrollDraggable&&this._scrollDraggable.destroy(),this.element.empty(),this.element.off(h),this.list=null,this._lastSender=null},_list:function(){var t=r.styles;this.element.addClass(t.messageList).attr("aria-live","polite"),this.list=e("<div>").addClass(t.messageListContent).appendTo(this.element)},_attachEvents:function(){var e=r.styles;this.element.on("click"+h,c(this._listClick,this)).on("click"+h,d+e.message,c(this._messageClick,this)).on("click"+h,d+e.suggestedAction,c(this._suggestedActionClick,this)).on("click"+h,d+e.cardAction+u+d+e.button,c(this._cardActionClick,this))},_scrollable:function(){var e=r.styles;this.element.on("click"+h,d+e.cardDeckScrollWrap+u+d+e.button,c(this._scrollButtonClick,this))},_scrollButtonClick:function(t){var i=r.styles,n=e(t.currentTarget),o=0!==n.find(d+i.scrollButtonIconLeft).length,s=n.siblings(d+i.cardDeck),a=s.find(d+i.card).last(),l=a.outerWidth(!0);s.scrollLeft(o?s.scrollLeft()-l:s.scrollLeft()+l)},getTemplate:function(e){return s.chat.getTemplate(e)},getComponent:function(e){return s.chat.getComponent(e)},renderMessage:function(e,t){e.timestamp||(e.timestamp=new Date);var i=this._renderTemplate(e.type,e);this._renderBubble(i,t),"typing"!==e.type&&(this._lastSender=t.id)},renderSuggestedActions:function(e){this._removeSuggestedActions();var t=this._renderTemplate("suggestedAction",{suggestedActions:e});this.list.append(t),this._scrollToBottom()},renderAttachments:function(e){var t,i,n=this._renderAttachmentWrapper(e.attachmentLayout),o="carousel"===e.attachmentLayout?n.find(d+r.styles.cardDeck):n,s=e.attachments;if(s.length){for(t=0;t<s.length;t++)i=this._renderTemplate(s[t].contentType,s[t].content),o.append(i);this._removeSuggestedActions(),this._removeTypingIndicator(),this.list.append(n),this._lastSender=null}},renderComponent:function(e){var t=this.getComponent(e),i=new t({},this);this.list.append(i.element),this._scrollToBottom()},_removeTypingIndicator:function(){var e,t,i=r.styles,n=this.list.find(d+i.typingIndicator);n.length&&(e=n.parents(d+i.message).first(),t=n.parents(d+i.messageGroup).first(),e.remove(),t.find(d+i.message).length||t.find(d+i.cardDeck).length||t.find(d+i.cardWrapper).length||t.remove())},_renderAttachmentWrapper:function(t){var i,n,o=r.styles,s=e("<div>");return"carousel"===t?(s.addClass(o.cardDeckScrollWrap),i=this._renderScrollButton(o.scrollButtonIconLeft),s.append(i),s.append(e("<div>").addClass(o.cardDeck)),n=this._renderScrollButton(o.scrollButtonIconRight),s.append(n)):s.addClass(o.cardList),s},_renderScrollButton:function(t){var i=r.styles;return e("<button>").addClass(i.button).addClass(i.iconButton).append(e("<span>").addClass(i.scrollButtonIcon).addClass(t))},_removeSuggestedActions:function(){this.list.find(d+r.styles.suggestedActions).remove()},_listClick:function(t){var i=r.styles,n=e(t.target);n.hasClass(i.message)||n.parents(d+i.message).length||this._clearSelection()},_messageClick:function(t){this._clearSelection(),e(t.currentTarget).addClass(r.styles.selected)},_suggestedActionClick:function(t){var i=e(t.target).data("value")||"";this.trigger("actionClick",{text:i}),this._removeSuggestedActions()},_cardActionClick:function(t){var i=e(t.target).data("value")||"";this.trigger("actionClick",{text:i})},_renderBubble:function(e,t){this._removeSuggestedActions(),this._removeTypingIndicator();var i=this._getMessageGroup(t);this._appendToGroup(i,e),this._scrollToBottom()},_renderTemplate:function(t,i){var n,o,s,a,c=this.getComponent(t);return c?(o=new c(i,this),n=o.element):(s=this.getTemplate(t),a=l(!0,{},i,{styles:r.styles}),n=e(s(a))),n},_getMessageGroup:function(t){var i,n=r.styles,o=this._getMessageGroupTemplate(t);return t.id===this._lastSender&&null!==this._lastSender&&(i=this.list.find(d+n.messageGroup).last(),i.length)?i:e(o({text:t.name,url:t.iconUrl,styles:n})).appendTo(this.list)},_getMessageGroupTemplate:function(e){var t=e.id===this.options.user.id,i=t?f:p;return i},_appendToGroup:function(e,t){var i=r.styles,n=e.find(d+i.message),o=n.length;t.addClass(0===o?i.only:i.last),n.filter(d+i.only).removeClass(i.only).addClass(i.first),n.filter(d+i.last).removeClass(i.last).addClass(i.middle),e.append(t)},_clearSelection:function(){var e=r.styles.selected;this.element.find(d+e).removeClass(e)},_scrollToBottom:function(){this.element.scrollTop(this.element.prop("scrollHeight"))}}),l(!0,r,{styles:o})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("chat/messageBox.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui.Widget,o=e.extend,r=e.proxy,s=".",a=".kendoChat",l=i.keys,c='<svg version="1.1" ixmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>',d='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"><g>   <path d="M128,240c0-26.4-21.6-48-48-48s-48,21.6-48,48s21.6,48,48,48S128,266.4,128,240z"/>   <path d="M192,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C213.6,192,192,213.6,192,240z"/>   <path d="M352,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C373.6,192,352,213.6,352,240z"/></g></svg>',u={input:"k-input",button:"k-button",buttonFlat:"k-flat",buttonIcon:"k-button-icon",buttonSend:"k-button-send",buttonToggle:"k-button-toggle",iconAdd:"k-icon k-i-add",hidden:"k-hidden"},h=i.chat.ChatMessageBox=n.extend({init:function(e,t){n.fn.init.call(this,e,t),this._wrapper(),this._attachEvents(),this._typing=!1},events:[],options:{messages:{placeholder:"Type a message..."}},destroy:function(){n.fn.destroy.call(this),this.input&&(this.input.off(a),this.input.remove(),this.input=null),this.element.off(a),this.element.empty()},_wrapper:function(){var t=h.styles,n=this.options,o=n.messages,r="inputId_"+i.guid();e("<label>").addClass(t.hidden).html(o.placeholder).attr("for",r).appendTo(this.element),this.input=e("<input type='text'>").addClass(t.input).attr("id",r).attr("placeholder",o.placeholder).appendTo(this.element),n.toolbar&&n.toolbar.toggleable&&n.toolbar.buttons&&e("<button>").addClass(t.button).addClass(t.buttonFlat).addClass(t.buttonIcon).addClass(t.buttonToggle).attr("type","button").append(e(d)).appendTo(this.element),e("<button>").addClass(t.button).addClass(t.buttonFlat).addClass(t.buttonIcon).addClass(t.buttonSend).append(e(c)).appendTo(this.element)},_attachEvents:function(){var e=h.styles;this.input.on("keydown"+a,r(this._keydown,this)).on("input"+a,r(this._input,this)).on("focusout"+a,r(this._inputFocusout,this)),this.element.on("click"+a,s+e.buttonSend,r(this._buttonClick,this)),this.element.on("click"+a,s+e.buttonToggle,r(this._toggleToolbar,this))},_input:function(){var e=this.input.val(),t=e.length>0;this._triggerTyping(t)},_keydown:function(e){var t=e.keyCode;switch(t){case l.ENTER:e.preventDefault(),this._sendMessage()}},_buttonClick:function(e){e.preventDefault(),this._sendMessage()},_sendMessage:function(){var e,t=this.input.val();t.length&&(this._triggerTyping(!1),e={text:t},this.trigger("sendMessage",e),this.input.val(""))},_inputFocusout:function(){this._triggerTyping(!1)},_triggerTyping:function(e){e?this._typing||(this.trigger("typingStart",{}),this._typing=!0):this._typing&&(this.trigger("typingEnd",{}),this._typing=!1)},_toggleToolbar:function(e){this.trigger("toggleToolbar",{originalEvent:e})}});o(!0,h,{styles:u})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("chat/toolbar.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui.Widget,o=e.extend,r=e.proxy,s=".",a=".kendoChat",l="kButtonName",c="chatToolbarScrollLeft",d="chatToolbarScrollRight",u=":visible",h={effects:"expand:vertical",duration:200},p={expand:{show:!0},collapse:{hide:!0}},f={button:"k-button",buttonFlat:"k-flat",buttonList:"k-button-list",scrollButton:"k-scroll-button",scrollButtonLeft:"k-scroll-button-left",scrollButtonRight:"k-scroll-button-right",scrollButtonLeftIcon:"k-icon k-i-arrow-chevron-left",scrollButtonRightIcon:"k-icon k-i-arrow-chevron-right",buttonIcon:"k-button-icon"},m=i.chat.ChatToolBar=n.extend({init:function(e,t){var i,s;t=o({},t,{name:"ChatToolbar"}),i=t.toolbar,s=i.buttons&&i.buttons.length,n.fn.init.call(this,e,t),s&&this._createButtonList(),s&&i.scrollable&&this.buttonsWidth()>this.element.width()&&this._initScrolling(),this._setupAnimation(),i.toggleable&&this.toggle(!0),this.element.on("click"+a,r(this._onClick,this))},events:["click"],destroy:function(){n.fn.destroy.call(this),this.element.off(a),this.element.empty()},_createButtonList:function(){var t,i,n=this,o=m.styles,r=n.options.toolbar.buttons,s=e("<div class='"+o.buttonList+"'></div>");for(t=0;t<r.length;t++)i=n._createButton(r[t]),s.append(i);s.appendTo(this.element),this.buttonList=s},_createButton:function(t){var i=m.styles,n=e("<button>");return"string"==typeof t&&(t={name:t}),n.attr(t.attr||{}).attr("title",t.text).attr("type","button").addClass(t.name).data(l,t.name).addClass(i.button),t.iconClass&&(n.addClass(i.buttonIcon),n.prepend("<span class='"+t.iconClass+"'></span>")),n},_onClick:function(t){var i=m.styles,n=e(t.target).closest(s+i.button);n.is(s+i.scrollButton)&&!this._scrolling&&this._scroll(n.data(l)),n.data(l)&&this.trigger("click",{button:n[0],name:n.data(l),originalEvent:t})},_initScrolling:function(){var e=m.styles;this.scrollButtonLeft=this._createButton({name:c,iconClass:e.scrollButtonLeftIcon,attr:{"class":e.scrollButton+" "+e.scrollButtonLeft}}),this.scrollButtonRight=this._createButton({name:d,iconClass:e.scrollButtonRightIcon,attr:{"class":e.scrollButton+" "+e.scrollButtonRight}}),this.element.prepend(this.scrollButtonLeft),this.element.append(this.scrollButtonRight),this._refreshScrollButtons(),this.element.on("keydown"+a,r(this._refreshScrollButtons,this))},_scroll:function(e){var t=this,i=t.buttonWidth(),n=this.maxScrollSize(),o=e===c?i*-1:i,r=this.currentScrollLeft(),s=r+o;s=Math.min(Math.max(s,0),n),e!==c&&e!==d||(t.buttonList.scrollLeft(s),t._refreshScrollButtons(s))},_refreshScrollButtons:function(e){var i=this.maxScrollSize(),n=e===t||isNaN(parseInt(e,10))?this.currentScrollLeft():e;(this.scrollButtonLeft||this.scrollButtonRight)&&(this.scrollButtonLeft.toggle(0!==n),this.scrollButtonRight.toggle(n!==i))},_setupAnimation:function(){var e=this.options.toolbar.animation,t=o({},h),i=o({reverse:!0,hide:!0},h);e=e===!1?o(!0,{},p):o(!0,{expand:t,collapse:i},e),this.options.toolbar.animation=e},_animationComplete:function(){this._refreshScrollButtons()},currentScrollLeft:function(){return Math.round(this.buttonList.scrollLeft())},maxScrollSize:function(){return Math.round(this.buttonList[0].scrollWidth-this.buttonList[0].clientWidth)},buttons:function(){var e=m.styles;return this.buttonList?this.buttonList.children(s+e.button):null},buttonWidth:function(){return Math.round(this.buttons().last().outerWidth(!0))},buttonsWidth:function(){var e=0;return this.buttons()&&(e=this.buttonWidth()*this.buttons().length),e},toggle:function(e){var t=this.options.toolbar.animation;e&&(t=o(!0,{},p)),t.expand.complete=r(this._animationComplete,this),t.collapse.complete=r(this._animationComplete,this),this.element.is(u)?this.element.kendoStop().kendoAnimate(t.collapse):this.element.kendoStop().kendoAnimate(t.expand)}});o(!0,m,{styles:f})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.chat.min",["chat/view.min","chat/messageBox.min","chat/toolbar.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui.Widget,o=e.extend,r=".",s={wrapper:"k-widget k-chat",canvas:"k-chat-canvas",viewWrapper:"k-message-list",messageBoxWrapper:"k-message-box",toolbarBoxWrapper:"k-toolbar-box"},a=n.extend({init:function(e,t,o){n.fn.init.call(this,e,t),o&&(this._events=o),this._user(),this._wrapper(),this._view(),this._messageBox(),t&&t.toolbar&&t.toolbar.buttons&&this._toolbar(),i.notify(this)},events:["typingStart","typingEnd","post","sendMessage","actionClick","toolClick"],options:{user:{name:"User",iconUrl:""},name:"Chat",messages:{placeholder:"Type a message..."},toolbar:!1},setOptions:function(t){this._setEvents(t),e.extend(!0,this.options,t),this.toolbar&&"toolbar"in t&&(this.toolbar.destroy(),this.toolbar=null),this.messageBox&&(this.messageBox.unbind(),this.messageBox.destroy(),this.messageBox=null),this._messageBox(),"toolbar"in t&&(this._resetToolbarButtons(t),this._toolbar())},_resetToolbarButtons:function(e){var t=this.wrapper.find(r+s.toolbarBoxWrapper);t.is(":visible")||t.show(),"buttons"in e.toolbar&&(this.options.toolbar.buttons=e.toolbar.buttons)},destroy:function(){this.view&&(this.view.unbind(),this.view.destroy(),this.view=null),this.messageBox&&(this.messageBox.unbind(),this.messageBox.destroy(),this.messageBox=null),this.toolbar&&(this.toolbar.destroy(),this.toolbar=null),n.fn.destroy.call(this)},_user:function(){this.options.user.id=i.guid()},getUser:function(){return o(!0,{},this.options.user)},_wrapper:function(){var e=a.styles,t=this.options,i=t.height,n=t.width,o="<div class='"+e.viewWrapper+"'></div><div class='"+e.messageBoxWrapper+"'></div><div class='"+e.toolbarBoxWrapper+"' role='toolbar' style='display:none;'></div>";this.wrapper=this.element.addClass(e.wrapper).append(o),t.toolbar&&t.toolbar.buttons&&t.toolbar.buttons.length&&this.wrapper.find(r+e.toolbarBoxWrapper).show(),i&&this.wrapper.height(i),n&&this.wrapper.css("max-width",n)},_view:function(){var e=this,t=a.styles,n=o(!0,{},this.options),s=this.wrapper.find(r+t.viewWrapper+"");this.view=new i.chat.ChatView(s,n),this.view.bind("actionClick",function(t){e.trigger("actionClick",t),e.postMessage(t.text)})},_messageBox:function(){var e=this,t=a.styles,n=o(!0,{},this.options),s=this.wrapper.find(r+t.messageBoxWrapper+"");this.messageBox=new i.chat.ChatMessageBox(s,n),this.messageBox.bind("typingStart",function(t){e.trigger("typingStart",t)}).bind("typingEnd",function(t){e.trigger("typingEnd",t)}).bind("sendMessage",function(t){e.trigger("sendMessage",t),e.postMessage(t.text)}).bind("toggleToolbar",function(){e.toggleToolbar()})},_toolbar:function(){var e=this,n=a.styles,s=o(!0,{},e.options),l=e.wrapper.find(r+n.toolbarBoxWrapper+"");s.toolbar.scrollable===t&&(this.options.toolbar.scrollable=s.toolbar.scrollable=!0),s.toolbar.toggleable===t&&(this.options.toolbar.toggleable=s.toolbar.toggleable=!1),e.toolbar=new i.chat.ChatToolBar(l,s),e.toolbar.bind("click",function(t){e.trigger("toolClick",{sender:e,name:t.name,button:t.button,messageBox:e.messageBox.input[0],originalEvent:t.originalEvent})})},postMessage:function(e){var t=o(!0,{},{text:e,type:"message",timestamp:new Date,from:this.getUser()});this.trigger("post",t),this.renderMessage(t,t.from)},renderMessage:function(e,t){this.view.renderMessage(e,t)},renderSuggestedActions:function(e){this.view.renderSuggestedActions(e)},renderAttachments:function(e,t){this.view.renderAttachments(e,t)},toggleToolbar:function(e){this.toolbar.toggle(e)}});i.ui.plugin(a),o(!0,a,{styles:s})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.button.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui.Widget,o=e.proxy,r=i.keys,s="click",a="k-button",l="k-button-icon",c="k-button-icontext",d=".kendoButton",u="disabled",h="k-state-disabled",p="k-state-focused",f="k-state-active",m=n.extend({init:function(e,t){var r=this;n.fn.init.call(r,e,t),e=r.wrapper=r.element,t=r.options,e.addClass(a).attr("role","button"),t.enable=t.enable&&!e.attr(u),r.enable(t.enable),t.enable&&r._tabindex(),r.iconElement(),e.on(s+d,o(r._click,r)).on("focus"+d,o(r._focus,r)).on("blur"+d,o(r._blur,r)).on("keydown"+d,o(r._keydown,r)).on("keyup"+d,o(r._keyup,r)),i.notify(r)},destroy:function(){var e=this;e.wrapper.off(d),n.fn.destroy.call(e)},events:[s],options:{name:"Button",icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(s,{event:e})&&e.preventDefault()},_focus:function(){this.options.enable&&this.element.addClass(p)},_blur:function(){var e=this;e.element.removeClass(p),setTimeout(function(){e.element.removeClass(f)})},_keydown:function(e){var t=this;e.keyCode!=r.ENTER&&e.keyCode!=r.SPACEBAR||(t.options.enable&&t.element.addClass(f),t._isNativeButton()||(e.keyCode==r.SPACEBAR&&e.preventDefault(),t._click(e)))},_keyup:function(){this.element.removeClass(f)},iconElement:function(){var t,i,n,o=this,r=o.element,s=o.options,a=s.icon,d=s.iconClass,u=s.spriteCssClass,h=s.imageUrl;(u||h||a||d)&&(n=!0,r.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(t,i){(1==i.nodeType||3==i.nodeType&&e.trim(i.nodeValue).length>0)&&(n=!1)}),r.addClass(n?l:c)),h?(i=r.children("img.k-image").first(),i[0]||(i=e('<img alt="icon" class="k-image" />').prependTo(r)),i.attr("src",h)):a||d?(t=r.children("span.k-icon").first(),t[0]||(t=e("<span></span>").prependTo(r)),t.attr("class",a?"k-icon k-i-"+a:d)):u&&(t=r.children("span.k-sprite").first(),t[0]||(t=e('<span class="k-sprite"></span>').prependTo(r)),t.addClass(u))},enable:function(e){var i=this,n=i.element;e===t&&(e=!0),e=!!e,i.options.enable=e,n.toggleClass(h,!e).attr("aria-disabled",!e).attr(u,!e),e&&i._tabindex();try{n.blur()}catch(o){}}});i.ui.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.buttongroup.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(i,o){i!==t&&e('<span class="k-badge">'+n.htmlEncode(i)+"</span>").appendTo(o)}var n=window.kendo,o=n.ui,r=o.Widget,s=n.keys,a=e.proxy,l=n.template,c=".kendoButtonGroup",d="k-widget",u="k-button-group",h="k-button",p="k-button-icontext",f="k-button-icon",m="k-state-active",g="k-state-focused",v="k-state-disabled",_="select",b="click",w="keydown",y="focus",k="blur",x="mousedown",C={item:l('<span class="#= item.selected ? " '+m+'" : "" #" #= item.enabled === false ? "disabled" : "" # # if (item.badge) { #'+n.attr("badge")+'="#=item.badge#"# } #>#= icon(iconClass) ##= image(item) ##= text #</span>'),image:l('<img alt="icon" src="#=data.imageUrl#" />'),icon:l('<span class="#=data#" />'),empty:l("")},S=r.extend({init:function(t,i){var n=this;r.fn.init.call(n,t,i),n.wrapper=n.element,n.options.items&&n._renderItems(n.options.items),n.selectedIndices=[],n.element.addClass(d+" "+u).attr("role","group").attr("tabindex",n.element.attr("tabindex")||"0").children().each(function(){var t=e(this);n._updateClasses.bind(n)(t)}),n._enable=!0,n.options.enable||(n._enable=!1,n.element.attr("aria-disabled",!0).addClass(v)),n.select(n.options.index),n.element.on(b+c,"."+h,a(n._click,n)).on(y+c,a(n._focus,n)).on(w+c,a(n._keyDown,n)).on(k+c,function(){n.preventFocus=!1,n.element.find("."+h).removeClass(g)}).on(x+c,function(){n.preventFocus=!0})},events:[_],options:{name:"ButtonGroup",selection:"single",index:-1,enable:!0},current:function(){return this.element.find("."+m)},_renderItems:function(t){var i=this;t.forEach(function(t){var o=e(C.item({image:t.imageUrl?C.image:C.empty,icon:t.imageUrl||!t.iconClass&&!t.icon?C.empty:C.icon,iconClass:t.iconClass||"k-icon k-i-"+t.icon,item:t,text:t.text?t.encoded===!1?t.text:n.htmlEncode(t.text):""}));t.attributes&&o.attr(t.attributes),(t.iconClass||t.icon||t.imageUrl)&&o.addClass(t.text?"k-button-icontext":"k-button-icon"),o.appendTo(i.element)})},_focus:function(){var t=e(this.element);this.preventFocus||(t.find("."+m).length?t.find("."+m).first().focus().addClass(g):t.children().first().focus().addClass(g))},_keyDown:function(t){var i,o=this,r=e(o.element),a=r.find("."+h),l=r.find("."+g),c=a.index(l),d=n.support.isRtl(o.element);t.keyCode===s.LEFT&&!d||t.keyCode===s.RIGHT&&d?(l.removeClass(g),i=0===c?a.eq(a.length-1):e(a[c-1]),i.focus().addClass(g),t.preventDefault()):t.keyCode===s.LEFT&&d||t.keyCode===s.RIGHT&&!d?(l.removeClass(g),i=c+1===a.length?a.eq(0):e(a[c+1]),i.focus().addClass(g),t.preventDefault()):t.keyCode!==s.ENTER&&t.keyCode!==s.SPACEBAR||(o._select(l),t.preventDefault())},select:function(i){var n,o=this,r=-1;i!==t&&i!==-1&&(o.element.find("."+h).removeClass(g),"number"==typeof i?(r=i,i=o.element.children().eq(i)):i.nodeType&&(i=e(i),r=i.index()),"multiple"===o.options.selection?(n="true"===i.attr("aria-pressed"),i.attr("aria-pressed",!n).toggleClass(m),o.selectedIndices.indexOf(r)===-1?o.selectedIndices.push(r):o.selectedIndices.splice(o.selectedIndices.indexOf(r),1)):(o.selectedIndices=[],o.current().attr("aria-pressed",!1).removeClass(m),i.attr("aria-pressed",!0).addClass(m),o.selectedIndices.push(r)),o.trigger(_,{indices:o.selectedIndices}))},badge:function(e,o){var r,s=this.element,a=isNaN(e)?s.find(e):s.children().eq(e),l=o||0===o;if(a.length){if(r=a.children(".k-badge").eq(0),!r.length&&l)return i(n.htmlEncode(o),a),n.htmlEncode(o);if(l)r.html(n.htmlEncode(o));else if(o===!1)return r.empty().remove(),t;return r.html()}},enable:function(e){t===e&&(e=!0),this.element.attr("aria-disabled",!e).toggleClass(v,!e),this._enable=this.options.enable=e},destroy:function(){var e=this;e.element.off(c),r.fn.destroy.call(e)},_updateClasses:function(t){var o=n.attrValue(t,"icon"),r=n.attrValue(t,"badge"),s=t.find("img").addClass("k-image"),a=!0;t.attr("aria-pressed",!1).attr("role","button").addClass(h),(t.is("[disabled]")||t.hasClass(v))&&t.addClass(v).attr("aria-disabled",!0).removeAttr("disabled"),t.is("."+m)&&(t.removeClass(m),(!t.hasClass(v)&&"single"===this.options.selection||"multiple"===this.options.selection)&&this.select(t[0])),!s[0]&&o&&t.prepend(e(C.icon("k-icon k-i-"+o))),t.contents().filter(function(){return!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(){(1==this.nodeType||3==this.nodeType&&e.trim(this.nodeValue).length>0)&&(a=!1)}),(s[0]||o)&&t.addClass(a?f:p),(r||0===r)&&i(r,t)},_click:function(t){var i=e(t.target).closest("."+h);t.isDefaultPrevented()||this._select(i)},_select:function(e){var i=e;return this.element.find("."+h).removeClass(g),!this._enable||i.is("."+v)?(i.addClass(g),t):(this.select(e[0]),i.addClass(g),t)}});o.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.pager.min",["kendo.data.min"],e)}(function(){return function(e,t){function i(e,t,i,n,o){return e({idx:t,text:i,ns:c.ns,numeric:n,title:o||""})}function n(e,t,i){return S({className:e.substring(1),text:t,wrapClassName:i||""})}function o(e,t,i,n){e.find(t).parent().attr(c.attr("page"),i).attr("tabindex",-1).toggleClass("k-state-disabled",n)}function r(e,t){o(e,p,1,t<=1)}function s(e,t){o(e,m,Math.max(1,t-1),t<=1)}function a(e,t,i){o(e,g,Math.min(i,t+1),t>=i)}function l(e,t,i){o(e,f,i,t>=i)}var c=window.kendo,d=c.ui,u=d.Widget,h=e.proxy,p=".k-i-arrow-end-left",f=".k-i-arrow-end-right",m=".k-i-arrow-60-left",g=".k-i-arrow-60-right",v="change",_=".kendoPager",b="click",w="keydown",y="disabled",k="down",x=e(document.documentElement),C=Number.MAX_VALUE,S=c.template('<a href="\\#" aria-label="#=text#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>'),T=u.extend({
init:function(t,i){var o,d,y,x,C=this;u.fn.init.call(C,t,i),i=C.options,C._createDataSource(i),C.linkTemplate=c.template(C.options.linkTemplate),C.selectTemplate=c.template(C.options.selectTemplate),C.currentPageTemplate=c.template(C.options.currentPageTemplate),o=C.page(),d=C.totalPages(),C._refreshHandler=h(C.refresh,C),C.dataSource.bind(v,C._refreshHandler),C.downEvent=c.applyEventMap(k,c.guid()),i.previousNext&&(C.element.find(p).length||(C.element.append(n(p,i.messages.first,"k-pager-first")),r(C.element,o,d)),C.element.find(m).length||(C.element.append(n(m,i.messages.previous)),s(C.element,o,d))),i.numeric&&(C.list=C.element.find(".k-pager-numbers"),C.list.length||(C.list=e('<ul class="k-pager-numbers k-reset" />').appendTo(C.element))),i.input&&(C.element.find(".k-pager-input").length||C.element.append('<span class="k-pager-input k-label">'+i.messages.page+'<input class="k-textbox">'+c.format(i.messages.of,d)+"</span>"),C.element.on(w+_,".k-pager-input input",h(C._keydown,C))),i.previousNext&&(C.element.find(g).length||(C.element.append(n(g,i.messages.next)),a(C.element,o,d)),C.element.find(f).length||(C.element.append(n(f,i.messages.last,"k-pager-last")),l(C.element,o,d))),i.pageSizes&&(C.element.find(".k-pager-sizes").length||(y=i.pageSizes.length?i.pageSizes:["all",5,10,20],x=e.map(y,function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"<option value='all'>"+i.messages.allPages+"</option>":"<option>"+e+"</option>"}),e('<span class="k-pager-sizes k-label"><select/>'+i.messages.itemsPerPage+"</span>").appendTo(C.element).find("select").html(x.join("")).end().appendTo(C.element)),C.element.find(".k-pager-sizes select").val(C.pageSize()),c.ui.DropDownList&&C.element.find(".k-pager-sizes select").show().kendoDropDownList(),C.element.on(v+_,".k-pager-sizes select",h(C._change,C))),i.refresh&&(C.element.find(".k-pager-refresh").length||C.element.append('<a href="#" class="k-pager-refresh k-link" title="'+i.messages.refresh+'" aria-label="'+i.messages.refresh+'"><span class="k-icon k-i-reload"></span></a>'),C.element.on(b+_,".k-pager-refresh",h(C._refreshClick,C))),i.info&&(C.element.find(".k-pager-info").length||C.element.append('<span class="k-pager-info k-label" />')),C.element.on(b+_,"a",h(C._click,C)).addClass("k-pager-wrap k-widget k-floatwrap"),C.element.on(b+_,".k-current-page",h(C._toggleActive,C)),i.autoBind&&C.refresh(),c.notify(C)},destroy:function(){var e=this;u.fn.destroy.call(e),e.element.off(_),e.dataSource.unbind(v,e._refreshHandler),e._refreshHandler=null,c.destroy(e.element),e.element=e.list=null},events:[v],options:{name:"Pager",selectTemplate:'<li><span class="k-state-selected">#=text#</span></li>',currentPageTemplate:'<li class="k-current-page"><span class="k-link k-pager-nav">#=text#</span></li>',linkTemplate:'<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',buttonCount:10,autoBind:!0,numeric:!0,info:!0,input:!1,previousNext:!0,pageSizes:!1,refresh:!1,messages:{allPages:"All",display:"{0} - {1} of {2} items",empty:"No items to display",page:"Page",of:"of {0}",itemsPerPage:"items per page",first:"Go to the first page",previous:"Go to the previous page",next:"Go to the next page",last:"Go to the last page",refresh:"Refresh",morePages:"More pages"}},setDataSource:function(e){var t=this;t.dataSource.unbind(v,t._refreshHandler),t.dataSource=t.options.dataSource=e,e.bind(v,t._refreshHandler),t.options.autoBind&&e.fetch()},_createDataSource:function(e){this.dataSource=c.data.DataSource.create(e.dataSource)},refresh:function(t){var n,o,d,u,h,p,f=this,m=1,g=f.page(),v="",_=f.options,b=f.pageSize(),w=f._collapsedTotal(),k=f.dataSource.total(),S=f.totalPages(),T=f.linkTemplate,D=_.buttonCount;if(x.unbind(f.downEvent,e.proxy(f._hideList,f)),!t||"itemchange"!=t.action){if(_.numeric){for(g>D&&(d=g%D,m=0===d?g-D+1:g-d+1),o=Math.min(m+D-1,S),m>1&&(v+=i(T,m-1,"...",!1,_.messages.morePages)),n=m;n<=o;n++)v+=i(n==g?f.selectTemplate:T,n,n,!0);o<S&&(v+=i(T,n,"...",!1,_.messages.morePages)),""===v&&(v=f.selectTemplate({text:0})),v=this.currentPageTemplate({text:g})+v,f.list.removeClass("k-state-expanded").html(v)}_.info&&(v=k>0?c.format(_.messages.display,f.dataSource.options.endless?1:Math.min((g-1)*b+1,w),Math.min(g*b,w),k):_.messages.empty,f.element.find(".k-pager-info").html(v)),_.input&&f.element.find(".k-pager-input").html(f.options.messages.page+'<input class="k-textbox" aria-label="'+g+'">'+c.format(_.messages.of,S)).find("input").val(g).attr(y,k<1).toggleClass("k-state-disabled",k<1),_.previousNext&&(r(f.element,g,S),s(f.element,g,S),a(f.element,g,S),l(f.element,g,S)),_.pageSizes&&(u=f.element.find(".k-pager-sizes option[value='all']").length>0,h=u&&(b===this.dataSource.total()||b==C),p=b,h&&(b="all",p=_.messages.allPages),f.element.find(".k-pager-sizes select").val(b).attr("aria-label",b).filter("["+c.attr("role")+"=dropdownlist]").kendoDropDownList("value",b).kendoDropDownList("text",p))}},_collapsedTotal:function(){return this.dataSource.total()},_keydown:function(e){if(e.keyCode===c.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),i=parseInt(t.val(),10);(isNaN(i)||i<1||i>this.totalPages())&&(i=this.page()),t.val(i),this.page(i)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var i=e.currentTarget.value,n=parseInt(i,10),o=this.dataSource;isNaN(n)?"all"==(i+"").toLowerCase()&&(o._pageSize=t,o._take=t,o.fetch()):o.pageSize(n)},_toggleActive:function(){var t=this;t.list.hasClass("k-state-expanded")?x.unbind(t.downEvent,e.proxy(t._hideList,t)):x.bind(t.downEvent,e.proxy(t._hideList,t)),t.list.toggleClass("k-state-expanded")},_hideList:function(t){var i=this,n=c.eventTarget(t);e.contains(i.list[0],n)||(x.unbind(i.downEvent,e.proxy(i._hideList,i)),i.list.removeClass("k-state-expanded"))},_click:function(t){var i=e(t.currentTarget);t.preventDefault(),i.is(".k-state-disabled")||this.page(i.attr(c.attr("page")))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/(this.pageSize()||1))},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(e){return e===t?this.dataSource.total()>0?this.dataSource.page():0:(this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(v,{index:e})),t)}});d.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.notification.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui.Widget,o=e.proxy,r=e.extend,s=window.setTimeout,a="click",l="show",c="hide",d="k-notification",u=".k-notification-wrap .k-i-close",h="k-hiding",p="info",f="success",m="warning",g="error",v="top",_="left",b="bottom",w="right",y="up",k=".kendoNotification",x='<div class="k-widget k-popup k-notification"></div>',C='<div class="k-notification-wrap"><span class="k-icon k-i-#=typeIcon#" title="#=typeIcon#"></span>#=content#<span class="k-icon k-i-close" title="Hide"></span></div>',S=C.replace("#=content#","#:content#"),T=n.extend({init:function(t,o){var r=this;n.fn.init.call(r,t,o),o=r.options,o.appendTo&&e(o.appendTo).is(t)||r.element.hide(),r._compileTemplates(o.templates),r._guid="_"+i.guid(),r._isRtl=i.support.isRtl(t),r._compileStacking(o.stacking,o.position.top,o.position.left),i.notify(r)},events:[l,c],options:{name:"Notification",position:{pinned:!0,top:null,left:null,bottom:20,right:20},stacking:"default",hideOnClick:!0,button:!1,allowHideAfter:0,autoHideAfter:5e3,appendTo:null,width:null,height:null,templates:[],animation:{open:{effects:"fade:in",duration:300},close:{effects:"fade:out",duration:600,hide:!0}}},_compileTemplates:function(t){var n=this,o=i.template;n._compiled={},e.each(t,function(t,i){n._compiled[i.type]=o(i.template||e("#"+i.templateId).html())}),n._defaultCompiled=o(C),n._safeCompiled=o(S)},_getCompiled:function(e,t){var i=t?this._safeCompiled:this._defaultCompiled;return e?this._compiled[e]||i:i},_compileStacking:function(e,t,i){var n,o,r=this,s={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},a=null!==i?_:w;switch(e){case"down":n=b+" "+a,o=v+" "+a,delete s.paddingBottom;break;case w:n=v+" "+w,o=v+" "+_,delete s.paddingRight;break;case _:n=v+" "+_,o=v+" "+w,delete s.paddingLeft;break;case y:n=v+" "+a,o=b+" "+a,delete s.paddingTop;break;default:null!==t?(n=b+" "+a,o=v+" "+a,delete s.paddingBottom):(n=v+" "+a,o=b+" "+a,delete s.paddingTop)}r._popupOrigin=n,r._popupPosition=o,r._popupPaddings=s},_attachPopupEvents:function(e,t){function i(e){e.on(a+k,function(){o._hidePopup(t)})}var n,o=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?t.bind("activate",function(){l?s(function(){i(t.element)},r):i(t.element)}):e.button&&(n=t.element.find(u),l?s(function(){i(n)},r):i(n))},_showPopup:function(t,n){var o,a,l=this,c=n.autoHideAfter,d=n.position.left,p=n.position.top;a=e("."+l._guid+":not(."+h+")").last(),o=new i.ui.Popup(t,{anchor:a[0]?a:document.body,origin:l._popupOrigin,position:l._popupPosition,animation:n.animation,modal:!0,collision:"",isRtl:l._isRtl,close:function(){l._triggerHide(this.element)},deactivate:function(e){e.sender.element.off(k),e.sender.element.find(u).off(k),e.sender.destroy()}}),l._attachPopupEvents(n,o),t.removeClass("k-group k-reset"),a[0]?o.open():(null===d&&(d=e(window).width()-t.width()-n.position.right),null===p&&(p=e(window).height()-t.height()-n.position.bottom),o.open(d,p)),o.wrapper.addClass(l._guid).css(r({margin:0,zIndex:10050},l._popupPaddings)),n.position.pinned?(o.wrapper.css("position","fixed"),a[0]&&l._togglePin(o.wrapper,!0)):a[0]||l._togglePin(o.wrapper,!1),c>0&&s(function(){l._hidePopup(o)},c)},_hidePopup:function(e){e.wrapper.addClass(h),e.close()},_togglePin:function(t,i){var n=e(window),o=i?-1:1;t.css({top:parseInt(t.css(v),10)+o*n.scrollTop(),left:parseInt(t.css(_),10)+o*n.scrollLeft()})},_attachStaticEvents:function(e,t){function i(e){e.on(a+k,o(n._hideStatic,n,t))}var n=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?l?s(function(){i(t)},r):i(t):e.button&&(l?s(function(){i(t.find(u))},r):i(t.find(u)))},_showStatic:function(t,i){var n,o=this,r=i.autoHideAfter,a=i.animation,l=i.stacking==y||i.stacking==_?"prependTo":"appendTo";t.removeClass("k-popup").addClass(o._guid)[l](i.appendTo).hide().kendoAnimate(a.open||!1),n=o.getNotifications(),n.each(function(t,n){o._attachStaticEvents(i,e(n)),r>0&&s(function(){o._hideStatic(e(n))},r)})},_hideStatic:function(e){e.kendoAnimate(r(this.options.animation.close||!1,{complete:function(){e.off(k).find(u).off(k),e.remove()}})),this._triggerHide(e)},_triggerHide:function(e){this.trigger(c,{element:e}),this.angular("cleanup",function(){return{elements:e}})},show:function(n,o,s){var a,c,u=this,h=u.options,f=e(x);return o||(o=p),null!==n&&n!==t&&""!==n&&(i.isFunction(n)&&(n=n()),c={typeIcon:o,content:""},a=e.isPlainObject(n)?r(c,n):r(c,{content:n}),f.addClass(d+"-"+o).toggleClass(d+"-button",h.button).attr("data-role","alert").css({width:h.width,height:h.height}).append(u._getCompiled(o,s)(a)),u.angular("compile",function(){return{elements:f,data:[{dataItem:a}]}}),e(h.appendTo)[0]?u._showStatic(f,h):u._showPopup(f,h),u.trigger(l,{element:f})),u},showText:function(e,t){this.show(e,t,!0)},info:function(e){return this.show(e,p)},success:function(e){return this.show(e,f)},warning:function(e){return this.show(e,m)},error:function(e){return this.show(e,g)},hide:function(){var t=this,i=t.getNotifications();return i.each(t.options.appendTo?function(i,n){t._hideStatic(e(n))}:function(i,n){var o=e(n).data("kendoPopup");o&&t._hidePopup(o)}),t},getNotifications:function(){var t=this,i=e("."+t._guid+":not(."+h+")");return t.options.appendTo?i:i.children("."+d)},setOptions:function(e){var i,o=this;n.fn.setOptions.call(o,e),i=o.options,e.templates!==t&&o._compileTemplates(i.templates),e.stacking===t&&e.position===t||o._compileStacking(i.stacking,i.position.top,i.position.left)},destroy:function(){n.fn.destroy.call(this),this.getNotifications().off(k).find(u).off(k)}});i.ui.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.tooltip.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function i(e){for(;e.length&&!n(e);)e=e.parent()}function n(e){var t=e.data(s.ns+"title");if(t)return e.attr("title",t),e.removeData(s.ns+"title"),!0}function o(e){var t=e.attr("title");if(t)return e.data(s.ns+"title",t),e.attr("title",""),!0}function r(e){for(;e.length&&!e.is("body")&&!o(e);)e=e.parent()}var s=window.kendo,a=s.ui.Widget,l=s.ui.Popup,c=s.isFunction,d=e.isPlainObject,u=e.extend,h=e.proxy,p=e(document),f=s.isLocalUrl,m="_tt_active",g="aria-describedby",v="show",_="hide",b="error",w="contentLoad",y="requestStart",k="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" title="Close"></a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',C=s.template("<iframe frameborder='0' class='"+k+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),S=".kendoTooltip",T={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"}},D={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},A={bottom:"n",top:"s",left:"e",right:"w",center:"n"},E={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},I=function(e){return e.target.data(s.ns+"title")},M=a.extend({init:function(e,t){var i,n=this;a.fn.init.call(n,e,t),i=n.options.position.match(/left|right/)?"horizontal":"vertical",n.dimensions=E[i],n._documentKeyDownHandler=h(n._documentKeyDown,n),n.element.on(n.options.showOn+S,n.options.filter,h(n._showOn,n)),this._isShownOnFocus()||n.element.on("mouseenter"+S,n.options.filter,h(n._mouseenter,n)),this.options.autoHide&&!this._isShownOnFocus()&&n.element.on("mouseleave"+S,n.options.filter,h(n._mouseleave,n)),this.options.autoHide&&this._isShownOnFocus()&&n.element.on("blur"+S,n.options.filter,h(n._blur,n))},options:{name:"Tooltip",filter:"",content:I,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[v,_,w,b,y],_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_mouseenter:function(t){r(e(t.currentTarget))},_showOn:function(t){var i=this,n=e(t.currentTarget);i.options.showOn&&i.options.showOn.match(/click/)?i._show(n):i._isShownOnFocus()?(r(n),i._show(n)):(clearTimeout(i.timeout),i.timeout=setTimeout(function(){i._show(n)},i.options.showAfter))},_appendContent:function(e){var t,i=this,n=i.options.content,o=i.content,r=i.options.iframe;d(n)&&n.url?("iframe"in i.options||(r=!f(n.url)),i.trigger(y,{options:n,target:e}),r?(o.hide(),t=o.find("."+k)[0],t?t.src=n.url||t.src:o.html(C({content:n})),o.find("."+k).off("load"+S).on("load"+S,function(){i.trigger(w),o.show()})):(o.empty(),s.ui.progress(o,!0),i._ajaxRequest(n))):n&&c(n)?(n=n({sender:this,target:e}),o.html(n||"")):o.html(n),i.angular("compile",function(){return{elements:o}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(u({type:"GET",dataType:"html",cache:!1,error:function(e,i){s.ui.progress(t.content,!1),t.trigger(b,{status:i,xhr:e})},success:h(function(e){s.ui.progress(t.content,!1),t.content.html(e),t.trigger(w)},t)},e))},_documentKeyDown:function(e){e.keyCode===s.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,r(e),this._show(e)},_show:function(e){var t=this,n=t.target();t.popup||t._initPopup(),n&&n[0]!=e[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),n&&n[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",function(){i(e),e.removeAttr(g),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+S,t._documentKeyDownHandler)}),t.popup.open()},_initPopup:function(){var t=this,i=t.options,n=e(s.template(x)({callout:i.callout&&"center"!==i.position,dir:A[i.position],autoHide:i.autoHide}));t.popup=new l(n,u({activate:function(){var e=this.options.anchor,n=e[0].id||t.element[0].id;n&&(e.attr(g,n+m),this.element.attr("id",n+m)),i.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),p.on("keydown"+S,t._documentKeyDownHandler),t.trigger(v)},close:function(){t.trigger(_)},copyAnchorStyles:!1,animation:i.animation},T[i.position])),n.css({width:i.width,height:i.height}),t.content=n.find(".k-tooltip-content"),t.arrow=n.find(".k-callout"),i.autoHide&&!this._isShownOnFocus()?n.on("mouseleave"+S,h(t._mouseleave,t)):n.on("click"+S,".k-tooltip-button",h(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){this._closePopup(e.currentTarget),clearTimeout(this.timeout)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup?this.popup.close():i(e(t))},target:function(){return this.popup?this.popup.options.anchor:null},_positionCallout:function(){var t=this,i=t.options.position,n=t.dimensions,o=n.offset,r=t.popup,s=r.options.anchor,a=e(s).offset(),l=e(r.element).offset(),c=A[r.flipped?D[i]:i],d=a[o]-l[o]+e(s)[n.size]()/2;t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+c).css(o,d)},destroy:function(){var e=this.popup;e&&(e.element.off(S),e.destroy()),clearTimeout(this.timeout),this.element.off(S),p.off("keydown"+S,this._documentKeyDownHandler),a.fn.destroy.call(this)}});s.ui.plugin(M)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.list.min",["kendo.data.min","kendo.popup.min"],e)}(function(){return function(e,t){function i(e,i){return e!==t&&""!==e&&null!==e&&("boolean"===i?e=!!e:"number"===i?e=+e:"string"===i&&(e=""+e)),e}function n(e){return e[e.length-1]}function o(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function r(e,t){var i,n,o,r,s=t.length,a=e.length,l=[],c=[];if(a)for(o=0;o<a;o++){for(i=e[o],n=!1,r=0;r<s;r++)if(i===t[r]){n=!0,l.push({index:o,item:i});break}n||c.push(i)}return{changed:l,unchanged:c}}function s(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function a(t,i){var n,o=!1;return t.filters&&(n=e.grep(t.filters,function(e){return o=a(e,i),e.filters?e.filters.length:e.field!=i}),o||t.filters.length===n.length||(o=!0),t.filters=n),o}var l,c,d=window.kendo,u=d.ui,h=d._outerHeight,p=/^\d+(\.\d+)?%$/i,f=u.Widget,m=d.keys,g=d.support,v=d.htmlEncode,_=d._activeElement,b=d._outerWidth,w=d.data.ObservableArray,y="id",k="change",x="k-state-focused",C="k-state-hover",S="k-i-loading",T=".k-group-header",D=".k-item",A="_label",E="open",I="close",M="cascade",R="select",F="selected",P="requestStart",z="requestEnd",B=e.extend,L=e.proxy,H=e.isArray,N=g.browser,O="k-hidden",V="width",W=N.msie,U=W&&N.version<9,q=/"/g,j={ComboBox:"DropDownList",DropDownList:"ComboBox"},G=d.ui.DataBoundWidget.extend({init:function(t,i){var n,o=this,r=o.ns;f.fn.init.call(o,t,i),t=o.element,i=o.options,o._isSelect=t.is(R),o._isSelect&&o.element[0].length&&(i.dataSource||(i.dataTextField=i.dataTextField||"text",i.dataValueField=i.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,L(o._listMousedown,o)),n=t.attr(y),n&&(o.list.attr(y,n+"-list"),o.ul.attr(y,n+"_listbox")),i.columns&&i.columns.length&&(o.ul.removeClass("k-list").addClass("k-grid-list"),o._columnsHeader()),o._header(),o._noData(),o._footer(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:"No data found."},setOptions:function(e){f.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_header:function(){var i,n=this,o=e(n.header),r=n.options.headerTemplate;return this._angularElement(o,"cleanup"),d.destroy(o),o.remove(),r?(i="function"!=typeof r?d.template(r):r,o=e(i({})),n.header=o[0]?o:null,n.list.prepend(o),this._angularElement(n.header,"compile"),t):(n.header=null,t)},_columnsHeader:function(){var t,i,n,o,r,s,a,l,c,u,h,f=this,m=e(f.columnsHeader);for(this._angularElement(m,"cleanup"),d.destroy(m),m.remove(),t="<div class='k-grid-header'><div class='k-grid-header-wrap'><table>",i="<colgroup>",n="<tr>",o=0;o<this.options.columns.length;o++)r=this.options.columns[o],s=r.title||r.field||"",a=r.headerTemplate||s,l="function"!=typeof a?d.template(a):a,c=r.width,u=parseInt(c,10),h="",c&&!isNaN(u)&&(h+="style='width:",h+=u,h+=p.test(c)?"%":"px",h+=";'"),i+="<col "+h+"/>",n+="<th class='k-header'>",n+=l(r),n+="</th>";i+="</colgroup>",n+="</tr>",t+=i,t+=n,t+="</table></div></div>",f.columnsHeader=m=e(t),f.list.prepend(m),this._angularElement(f.columnsHeader,"compile")},_noData:function(){var i=this,n=e(i.noData),o=i.options.noDataTemplate;return i.angular("cleanup",function(){return{elements:n}}),d.destroy(n),n.remove(),o?(i.noData=e('<div class="k-nodata" style="display:none"><div></div></div>').appendTo(i.list),i.noDataTemplate="function"!=typeof o?d.template(o):o,t):(i.noData=null,t)},_footer:function(){var i=this,n=e(i.footer),o=i.options.footerTemplate;return this._angularElement(n,"cleanup"),d.destroy(n),n.remove(),o?(i.footer=e('<div class="k-footer"></div>').appendTo(i.list),i.footerTemplate="function"!=typeof o?d.template(o):o,t):(i.footer=null,t)},_listOptions:function(t){var i=this,n=i.options,o=n.virtual,r={change:L(i._listChange,i)},s=L(i._listBound,i);return o="object"==typeof o?o:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:i.dataSource,click:L(i._click,i),activate:L(i._activateItem,i),columns:n.columns,deactivate:L(i._deactivateItem,i),dataBinding:function(){i.trigger("dataBinding")},dataBound:s,height:n.height,dataValueField:n.dataValueField,dataTextField:n.dataTextField,groupTemplate:n.groupTemplate,fixedGroupTemplate:n.fixedGroupTemplate,template:n.template},t,o,r),t.template||(t.template="#:"+d.expr(t.dataTextField,"data")+"#"),n.$angular&&(t.$angular=n.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:L(e._listChange,e)});e.listView=e.options.virtual?new d.ui.VirtualList(e.ul,t):new d.ui.StaticList(e.ul,t),e.listView.bind("listBound",L(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(L(this._updateSelectionState,this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){var e=this;e._clear&&e._clear.addClass(O)},_showClear:function(){this._clear&&this._clear.removeClass(O)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(e,t){var i,n,o=this,r=o.options,l=r.filterFields&&e&&e.logic&&e.filters&&e.filters.length,c=o.dataSource,d=B({},c.filter()||{}),u=e||d.filters&&d.filters.length&&!e,h=a(d,r.dataTextField);if(this._clearFilterExpressions(d),!e&&!h||!o.trigger("filtering",{filter:e}))return i={filters:[],logic:"and"},l?i.filters.push(e):this._pushFilterExpression(i,e),s(d)&&(i.logic===d.logic?i.filters=i.filters.concat(d.filters):i.filters.push(d)),o._cascading&&this.listView.setDSFilter(i),n=B({},{page:u?1:c.page(),pageSize:u?c.options.pageSize:c.pageSize(),sort:c.sort(),filter:c.filter(),group:c.group(),aggregate:c.aggregate()},{filter:i}),c[t?"read":"query"](c._mergeState(n))},_pushFilterExpression:function(t,i){s(i)&&e.trim(i.value).length&&t.filters.push(i)},_clearFilterExpressions:function(e){var t,i;if(e.filters){for(i=0;i<e.filters.length;i++)"fromFilter"in e.filters[i]&&(t=i);isNaN(t)||e.filters.splice(t,1)}},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.children(":first").html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_toggleNoData:function(t){e(this.noData).toggle(t)},_toggleHeader:function(e){var t=this.listView.content.prev(T);t.toggle(e)},_renderFooter:function(){var e=this,t=e.footer;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_allowOpening:function(){return this.options.noDataTemplate||this.dataSource.flatView().length},_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,i=t.dataSource.reader.model;i&&i.fields&&(e=i.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t,i,n=this,o=n.options,r=e.word,s=o.filterFields,a=o.dataTextField;if(s&&s.length)for(t={logic:"or",filters:[],fromFilter:!0},i=0;i<s.length;i++)this._pushFilterExpression(t,n._buildExpression(r,s[i]));else t=n._buildExpression(r,a);n._open=e.open,n._filterSource(t)},_buildExpression:function(e,t){var i=this,n=i.options,o=n.ignoreCase;return{value:o?e.toLowerCase():e,field:t,operator:n.filter,ignoreCase:o}},_clearButton:function(){var t=this,i=t.options.messages&&t.options.messages.clear?t.options.messages.clear:"clear";t._clear||(t._clear=e('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="'+i+'"></span>').attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},search:function(t){var i=this.options;t="string"==typeof t?t:this._inputValue(),clearTimeout(this._typingTimeout),(!i.enforceMinLength&&!t.length||t.length>=i.minLength)&&(this._state="filter",this.listView&&(this.listView._emptySearch=!e.trim(t).length),this._isFilterEnabled()?this._filter({word:t,open:!0}):this._searchByWord(t))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;f.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(i){var n=this;if(i===t)return n.listView.selectedDataItems()[0];if("number"!=typeof i){if(n.options.virtual)return n.dataSource.getByUid(e(i).data("uid"));i=e(n.items()).index(i)}return n.dataSource.flatView()[i]},_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,i=e.options,n=d.getter,o=t.attr(d.attr("text-field")),r=t.attr(d.attr("value-field"));!i.dataTextField&&o&&(i.dataTextField=o),!i.dataValueField&&r&&(i.dataValueField=r),e._text=n(i.dataTextField),e._value=n(i.dataValueField)},_aria:function(e){var i=this,n=i.options,o=i._focused.add(i.filterInput);n.suggest!==t&&o.attr("aria-autocomplete",n.suggest?"both":"list"),e=e?e+" "+i.ul[0].id:i.ul[0].id,o.attr("aria-owns",e),i.ul.attr("aria-live",i._isFilterEnabled()?"polite":"off"),i._ariaLabel()},_ariaLabel:function(){var t,i=this,n=i._focused,o=i.element,r=o.attr("id"),s=e('label[for="'+r+'"]'),a=o.attr("aria-label"),l=o.attr("aria-labelledby");n!==o&&(a?n.attr("aria-label",a):l?n.attr("aria-labelledby",l):s.length&&(t=s.attr("id")||i._generateLabelId(s,r),n.attr("aria-labelledby",t)))},_generateLabelId:function(e,t){var i=t+A;return e.attr("id",i),i},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,n=this,o=n.selectedIndex,r=n.options.value,s=n.value();n._isSelect&&!n.listView.bound()&&r&&(s=r),s!==i(n._old,typeof s)?e=!0:n._valueBeforeCascade!==t&&n._valueBeforeCascade!==i(n._old,typeof n._valueBeforeCascade)&&n._userTriggered?e=!0:o===t||o===n._oldIndex||n.listView.isFiltered()||(e=!0),e&&(n._valueBeforeCascade=n._old=null===n._old||""===n._old||""===s?s:n.dataItem()?n.options.dataValueField?n.dataItem()[n.options.dataValueField]:n.dataItem():null,n._oldIndex=o,n._typing||n.element.trigger(k),n.trigger(k)),n.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,i=e.options,n=e.element.is("[disabled]");i.enable!==t&&(i.enabled=i.enable),!i.enabled||n?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var i=this._value(e);return i===t&&(i=this._text(e)),i},_offsetHeight:function(){var t=0,i=this.listView.content.prevAll(":visible");return i.each(function(){var i=e(this);t+=h(i,!0)}),t},_height:function(i){var n,o,r,s=this,a=s.list,l=s.options.height,c=s.popup.visible();if(i||s.options.noDataTemplate){if(o=a.add(a.parent(".k-animation-container")).show(),!a.is(":visible"))return o.hide(),t;l=s.listView.content[0].scrollHeight>l?l:"auto",o.height(l),"auto"!==l&&(n=s._offsetHeight(),r=h(e(s.footer))||0,l=l-n-r),s.listView.content.height(l),c||o.hide()}return l},_openHandler:function(e){this._adjustListWidth(),this.trigger(E)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_adjustListWidth:function(){var e,t,i=this,n=i.list,o=n[0].style.width,r=i.wrapper;if(n.data(V)||!o)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||b(r),e&&N.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==n.css("box-sizing")?t-(b(n)-n.width()):t,n.css({fontFamily:r.css("font-family"),width:i.options.autoWidth?"auto":o,minWidth:o,whiteSpace:i.options.autoWidth?"nowrap":"normal"}).data(V,o),!0},_closeHandler:function(e){this.trigger(I)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,i=!e.focus(),o=n(e.select());o===t&&this.options.highlightFirst&&i&&(o=0),o!==t?e.focus(o):i&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),i=this.listView.content.prev(T),n=0;i[0]&&"none"!==i[0].style.display&&("auto"!==e&&(n=d.support.scrollbar()),n+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("padding-right"),10),i.css("padding-right",n))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){var t,i,n;this.options.columns&&this.options.columns.length&&(t=this,i=g.isRtl(t.wrapper),n=d.support.scrollbar(),t.columnsHeader.css(i?"padding-left":"padding-right","auto"!==e?n:0))},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):this.popup.one("open",function(e){return L(function(){this._calculatePopupHeight(e)},this);
}.call(this,e)))},_popup:function(){var e=this;e.popup=new u.Popup(e.list,B({},e.options.popup,{anchor:e.wrapper,open:L(e._openHandler,e),close:L(e._closeHandler,e),animation:e.options.animation,isRtl:g.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_makeUnselectable:function(){U&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_toggle:function(e,i){var n=this,o=g.mobileOS&&(g.touch||g.MSPointers||g.pointers);e=e!==t?e:!n.popup.visible(),i||o||n._focused[0]===_()||(n._prevent=!0,n._focused.focus(),n._prevent=!1),n[e?E:I]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===i(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(M,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(k)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(P,e._requestStartHandler).unbind(z,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){var i=(e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t);if(i&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw Error("ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function")}});B(G,{inArray:function(e,t){var i,n,o=t.children;if(!e||e.parentNode!==t)return-1;for(i=0,n=o.length;i<n;i++)if(e===o[i])return i;return-1},unifyType:i}),d.ui.List=G,u.Select=G.extend({init:function(e,t){G.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){var t,i=this;i.options.dataSource=e,i._dataSource(),i.listView.bound()&&(i._initialIndex=null,i.listView._current=null),i.listView.setDataSource(i.dataSource),i.options.autoBind&&i.dataSource.fetch(),t=i._parentWidget(),t&&i._cascadeSelect(t)},close:function(){this.popup.close()},select:function(e){var i=this;return e===t?i.selectedIndex:i._select(e).done(function(){i._cascadeValue=i._old=i._accessor(),i._oldIndex=i.selectedIndex})},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var i=this.element[0];return e===t?i.value:(null===e&&(e=""),i.value=e,t)},_accessorSelect:function(e,i){var n,r=this.element[0];return e===t?o(r).value||"":(o(r).selected=!1,i===t&&(i=-1),n=null!==e&&""!==e,n&&i==-1?this._custom(e):e?r.value=e:r.selectedIndex=i,t)},_syncValueAndText:function(){return!0},_custom:function(t){var i=this,n=i.element,o=i._customOption;o||(o=e("<option/>"),i._customOption=o,n.append(o)),o.text(t),o[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(S),e._focused.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(e){var t=this;e.isDefaultPrevented()||(t._request=!0,t._busy||(t._busy=setTimeout(function(){t._arrowIcon&&(t._focused.attr("aria-busy",!0),t._arrowIcon.addClass(S),t._hideClear())},100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,i=this,n=i.element,o=i.options,r=o.dataSource||{};r=e.isArray(r)?{data:r}:r,i._isSelect&&(t=n[0].selectedIndex,t>-1&&(o.index=t),r.select=n,r.fields=[{field:o.dataTextField},{field:o.dataValueField}]),i.dataSource?i._unbindDataSource():(i._requestStartHandler=L(i._showBusy,i),i._requestEndHandler=L(i._requestEnd,i),i._errorHandler=L(i._hideBusy,i)),i.dataSource=d.data.DataSource.create(r).bind(P,i._requestStartHandler).bind(z,i._requestEndHandler).bind("error",i._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 i,n,o,r,s,a,l=this,c=l.listView,d=e.keyCode,u=d===m.DOWN;if(d===m.UP||u){if(e.altKey)l.toggle(u);else{if(!c.bound()&&!l.ul[0].firstChild)return l._fetch||(l.dataSource.one(k,function(){l._fetch=!1,l._move(e)}),l._fetch=!0,l._filterSource()),e.preventDefault(),!0;if(o=l._focus(),l._fetch||o&&!o.hasClass("k-state-selected")||(u?(l._nextItem(),l._focus()||l._lastItem()):(l._prevItem(),l._focus()||l._firstItem())),i=c.dataItemByIndex(c.getElementIndex(l._focus())),l.trigger(R,{dataItem:i,item:l._focus()}))return l._focus(o),t;l._select(l._focus(),!0).done(function(){l.popup.visible()||l._blur(),l._cascadedValue=null===l._cascadedValue?l.value():l.dataItem()?l.dataItem()[l.options.dataValueField]||l.dataItem():null})}e.preventDefault(),n=!0}else if(d===m.ENTER||d===m.TAB){if(l.popup.visible()&&e.preventDefault(),o=l._focus(),i=l.dataItem(),l.popup.visible()||i&&l.text()===l._text(i)||(o=null),r=l.filterInput&&l.filterInput[0]===_(),o){if(i=c.dataItemByIndex(c.getElementIndex(o)),s=!0,i&&(s=l._value(i)!==G.unifyType(l.value(),typeof l._value(i))),s&&l.trigger(R,{dataItem:i,item:o}))return;l._select(o)}else l.input&&((l._syncValueAndText()||l._isSelect)&&l._accessor(l.input.val()),l.listView.value(l.input.val()));l._focusElement&&l._focusElement(l.wrapper),r&&d===m.TAB?l.wrapper.focusout():l._blur(),l.close(),n=!0}else d===m.ESC?(l.popup.visible()&&e.preventDefault(),l.close(),n=!0):!l.popup.visible()||d!==m.PAGEDOWN&&d!==m.PAGEUP||(e.preventDefault(),a=d===m.PAGEDOWN?1:-1,c.scrollWith(a*c.screenHeight()),n=!0);return n},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.bound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done(function(){e._fetch=!1}))},_options:function(e,i,n){var r,s,a,l,c=this,d=c.element,u=d[0],h=e.length,p="",f=0;for(i&&(p=i);f<h;f++)r="<option",s=e[f],a=c._text(s),l=c._value(s),l!==t&&(l+="",l.indexOf('"')!==-1&&(l=l.replace(q,"&quot;")),r+=' value="'+l+'"'),r+=">",a!==t&&(r+=v(a)),r+="</option>",p+=r;d.html(p),n!==t&&(u.value=n,u.value&&!n&&(u.selectedIndex=-1)),u.selectedIndex!==-1&&(r=o(u),r&&r.setAttribute(F,F))},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=o.on("reset",t._resetHandler))},_parentWidget:function(){var t,i,n=this.options.name;if(this.options.cascadeFrom)return t=e("#"+this.options.cascadeFrom),i=t.data("kendo"+n),i||(i=t.data("kendo"+j[n])),i},_cascade:function(){var e,t=this,i=t.options,n=i.cascadeFrom;if(n){if(e=t._parentWidget(),!e)return;t._cascadeHandlerProxy=L(t._cascadeHandler,t),t._cascadeFilterRequests=[],i.autoBind=!1,e.bind("set",function(){t.one("set",function(e){t._selectedValue=e.value||t._accessor()})}),e.first(M,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one("dataBound",function(){t._toggleCascadeOnFocus(),e.popup.visible()&&e._focused.focus()}),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),i=W?"blur":"focusout";t._focused.add(t.filterInput).bind("focus",function(){t.unbind(M,e._cascadeHandlerProxy),t.first(k,e._cascadeHandlerProxy)}),t._focused.add(t.filterInput).bind(i,function(){t.unbind(k,e._cascadeHandlerProxy),t.first(M,e._cascadeHandlerProxy)})},_cascadeHandler:function(e){var t=this._parentWidget(),i=this.value();this._userTriggered=e.userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,i)},_cascadeChange:function(e){var t=this,n=t._accessor()||t._selectedValue;t._cascadeFilterRequests.length||(t._selectedValue=null),t._userTriggered?t._clearSelection(e,!0):n?(n!==i(t.listView.value()[0],typeof n)&&t.value(n),t.dataSource.view()[0]&&t.selectedIndex!==-1||t._clearSelection(e,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._triggerChange(),t._userTriggered=!1},_cascadeSelect:function(e,i){var n,o,r=this,s=e.dataItem(),l=s?s[r.options.cascadeFromParentField]||e._value(s):null,c=r.options.cascadeFromField||e.options.dataValueField;r._valueBeforeCascade=i!==t?i:r.value(),l||0===l?(n=r.dataSource.filter()||{},a(n,c),o=function(){var t=r._cascadeFilterRequests.shift();t&&r.unbind("dataBound",t),t=r._cascadeFilterRequests[0],t&&r.first("dataBound",t),r._cascadeChange(e)},r._cascadeFilterRequests.push(o),1===r._cascadeFilterRequests.length&&r.first("dataBound",o),r._cascading=!0,r._filterSource({field:c,operator:"eq",value:l}),r._cascading=!1):(r.enable(!1),r._clearSelection(e),r._triggerCascade(),r._triggerChange(),r._userTriggered=!1)}}),l=".StaticList",c=d.ui.DataBoundWidget.extend({init:function(t,i){f.fn.init.call(this,t,i),this.element.attr("role","listbox").on("click"+l,"li",L(this._click,this)).on("mouseenter"+l,"li",function(){e(this).addClass(C)}).on("mouseleave"+l,"li",function(){e(this).removeClass(C)}),g.touch&&this._touchHandlers(),"multiple"===this.options.selectable&&this.element.attr("aria-multiselectable",!0),this.content=this.element.wrap("<div class='k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before('<div class="k-group-header" style="display:none"></div>').prev(),this.bound(!1),this._optionID=d.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var n=this.options.value;n&&(this._values=e.isArray(n)?n.slice(0):[n]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=L(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",k,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var i,n=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=d.data.DataSource.create(o),n.dataSource?(n.dataSource.unbind(k,n._refreshHandler),i=n.value(),n.value([]),n.bound(!1),n.value(i)):n._refreshHandler=L(n.refresh,n),n.setDSFilter(o.filter()),n.dataSource=o.bind(k,n._refreshHandler),n._fixedHeader()},_touchHandlers:function(){var t,i,n=this,o=function(e){return(e.originalEvent||e).changedTouches[0].pageY};n.element.on("touchstart"+l,function(e){t=o(e)}),n.element.on("touchend"+l,function(r){r.isDefaultPrevented()||(i=o(r),Math.abs(i-t)<10&&(r.preventDefault(),n.trigger("click",{item:e(r.target.closest(D))})))})},skip:function(){return this.dataSource.skip()},setOptions:function(e){f.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(k,this._refreshHandler),clearTimeout(this._scrollId),f.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],i=e.offsetTop,n=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=i+n;o>i?o=i:s>o+r&&(o=s-r),t.scrollTop=o}},selectedDataItems:function(e){return e===t?this._dataItems.slice():(this._dataItems=e,this._values=this._getValues(e),t)},_getValues:function(t){var i=this._valueGetter;return e.map(t,function(e){return i(e)})},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(n(this.element[0].children))},focus:function(i){var o,r=this,s=r._optionID;return i===t?r._current:(i=n(r._get(i)),i=e(this.element[0].children[i]),r._current&&(r._current.removeClass(x).removeAttr(y),r.trigger("deactivate")),o=!!i[0],o&&(i.addClass(x),r.scroll(i),i.attr("id",s)),r._current=o?i:null,r.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(i){var o,r,s,a=this,l=a.options.selectable,c="multiple"!==l&&l!==!1,d=a._selectedIndices,u=[],h=[];return i===t?d.slice():(i=a._get(i),1===i.length&&i[0]===-1&&(i=[]),r=e.Deferred().resolve(),s=a.isFiltered(),s&&!c&&a._deselectFiltered(i)?r:c&&!s&&e.inArray(n(i),d)!==-1?(a._dataItems.length&&a._view.length&&(a._dataItems=[a._view[d[0]].item]),r):(o=a._deselect(i),h=o.removed,i=o.indices,i.length&&(c&&(i=[n(i)]),u=a._select(i)),(u.length||h.length)&&(a._valueComparer=null,a.trigger(k,{added:u,removed:h})),r))},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 w?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(i){var n,o=this,r=o._valueDeferred;return i===t?o._values.slice():(o.setValue(i),r&&"resolved"!==r.state()||(o._valueDeferred=r=e.Deferred()),o.bound()&&(n=o._valueIndices(o._values),"multiple"===o.options.selectable&&o.select(-1),o.select(n),r.resolve()),o._skipUpdate=!1,r)},items:function(){return this.element.children(D)},_click:function(t){t.isDefaultPrevented()||this.trigger("click",{item:e(t.currentTarget)})||this.select(t.currentTarget)},_valueExpr:function(e,t){var n,o,r=this,s=0,a=[];if(!r._valueComparer||r._valueType!==e){for(r._valueType=e;s<t.length;s++)a.push(i(t[s],e));n="for (var idx = 0; idx < "+a.length+"; idx++) { if (current === values[idx]) {   return idx; }} return -1;",o=Function("current","values",n),r._valueComparer=function(e){return o(e,a)}}return r._valueComparer},_dataItemPosition:function(e,t){var i=this._valueGetter(e),n=this._valueExpr(typeof i,t);return n(i)},_getter:function(){this._valueGetter=d.getter(this.options.dataValueField)},_deselect:function(t){var i,n,o,r=this,s=r.element[0].children,a=r.options.selectable,l=r._selectedIndices,c=r._dataItems,d=r._values,u=[],h=0,p=0;if(t=t.slice(),a!==!0&&t.length){if("multiple"===a)for(;h<t.length;h++)if(n=t[h],e(s[n]).hasClass("k-state-selected"))for(i=0;i<l.length;i++)if(o=l[i],o===n){e(s[o]).removeClass("k-state-selected").attr("aria-selected",!1),u.push({position:i+p,dataItem:c.splice(i,1)[0]}),l.splice(i,1),t.splice(h,1),d.splice(i,1),p+=1,h-=1,i-=1;break}}else{for(;h<l.length;h++)e(s[l[h]]).removeClass("k-state-selected").attr("aria-selected",!1),u.push({position:h,dataItem:c[h]});r._values=[],r._dataItems=[],r._selectedIndices=[]}return{indices:t,removed:u}},_deselectFiltered:function(t){for(var i,n,o,r=this.element[0].children,s=[],a=0;a<t.length;a++)n=t[a],i=this._view[n].item,o=this._dataItemPosition(i,this._values),o>-1&&(s.push(this.removeAt(o)),e(r[n]).removeClass("k-state-selected"));return!!s.length&&(this.trigger(k,{added:[],removed:s}),!0)},_select:function(t){var i,o,r=this,s=r.element[0].children,a=r._view,l=[],c=0;for(n(t)!==-1&&r.focus(t);c<t.length;c++)o=t[c],i=a[o],o!==-1&&i&&(i=i.item,r._selectedIndices.push(o),r._dataItems.push(i),r._values.push(r._valueGetter(i)),e(s[o]).addClass("k-state-selected").attr("aria-selected",!0),l.push({dataItem:i}));return l},getElementIndex:function(t){return e(t).data("offset-index")},_get:function(e){return"number"==typeof e?e=[e]:H(e)||(e=this.getElementIndex(e),e=[e!==t?e:-1]),e},_template:function(){var e=this,t=e.options,i=t.template;return i?(i=d.template(i),i=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+i(e)+"</li>"}):i=d.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+d.expr(t.dataTextField,"data")+"}</li>",{useWithBlock:!1}),i},_templates:function(){var e,t,i,n,o,r=this.options,s={template:r.template,groupTemplate:r.groupTemplate,fixedGroupTemplate:r.fixedGroupTemplate};if(r.columns)for(t=0;t<r.columns.length;t++)i=r.columns[t],n=i.field?""+i.field:"text",s["column"+t]=i.template||"#: "+n+"#";for(o in s)e=s[o],e&&"function"!=typeof e&&(s[o]=d.template(e));this.templates=s},_normalizeIndices:function(e){for(var i=[],n=0;n<e.length;n++)e[n]!==t&&i.push(e[n]);return i},_valueIndices:function(e,t){var i,n=this._view,o=0;if(t=t?t.slice():[],!e.length)return[];for(;o<n.length;o++)i=this._dataItemPosition(n[o].item,e),i!==-1&&(t[i]=o);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var t=this.element[0],i=this.content[0],n=i.scrollTop,o=e(t.children[0]).height(),r=Math.floor(n/o)||0,s=t.children[r]||t.lastChild,a=s.offsetTop<n;s;)if(a){if(s.offsetTop+o>n||!s.nextSibling)break;s=s.nextSibling}else{if(s.offsetTop<=n||!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&&e.group&&this.header.html(t(e.group)))},_renderItem:function(e){var t='<li tabindex="-1" role="option" unselectable="on" class="k-item',i=e.item,n=0!==e.index,o=e.selected,r=this.isGrouped(),s=this.options.columns&&this.options.columns.length;return n&&e.newGroup&&(t+=" k-first"),e.isLastGroupedItem&&s&&(t+=" k-last"),o&&(t+=" k-state-selected"),t+='" aria-selected="'+(o?"true":"false")+'" data-offset-index="'+e.index+'">',t+=s?this._renderColumns(i):this.templates.template(i),n&&e.newGroup?t+=s?'<div class="k-cell k-group-cell"><span>'+this.templates.groupTemplate(e.group)+"</span></div>":'<div class="k-group">'+this.templates.groupTemplate(e.group)+"</div>":r&&s&&(t+="<div class='k-cell k-spacer-cell'></div>"),t+"</li>"},_renderColumns:function(e){var t,i,n,o,r="";for(t=0;t<this.options.columns.length;t++)i=this.options.columns[t].width,n=parseInt(i,10),o="",i&&!isNaN(n)&&(o+="style='width:",o+=n,o+=p.test(i)?"%":"px",o+=";'"),r+="<span class='k-cell' "+o+">",r+=this.templates["column"+t](e),r+="</span>";return r},_render:function(){var e,t,i,n,o="",r=0,s=0,a=[],l=this.dataSource.view(),c=this.value(),d=this.isGrouped();if(d)for(r=0;r<l.length;r++)for(t=l[r],i=!0,n=0;n<t.items.length;n++)e={selected:this._selected(t.items[n],c),item:t.items[n],group:t.value,newGroup:i,isLastGroupedItem:n===t.items.length-1,index:s},a[s]=e,s+=1,o+=this._renderItem(e),i=!1;else for(r=0;r<l.length;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,d&&a.length&&this._renderHeader()},_selected:function(e,t){var i=!this.isFiltered()||"multiple"===this.options.selectable;return i&&this._dataItemPosition(e,t)!==-1},setDSFilter:function(e){this._lastDSFilter=B({},e)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!d.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(e){var t,i=this,n=e&&e.action,o=i.options.skipUpdateOnBind,s="itemchange"===n;i.trigger("dataBinding"),i._angularItems("cleanup"),i._fixedHeader(),i._render(),i.bound(!0),s||"remove"===n?(t=r(i._dataItems,e.items),t.changed.length&&(s?i.trigger("selectedItemChange",{items:t.changed}):i.value(i._getValues(t.unchanged)))):i.isFiltered()||i._skipUpdate||i._emptySearch?(i.focus(0),i._skipUpdate&&(i._skipUpdate=!1,i._selectedIndices=i._valueIndices(i._values,i._selectedIndices))):o||n&&"add"!==n||i.value(i._values),i._valueDeferred&&i._valueDeferred.resolve(),i._angularItems("compile"),i.trigger("dataBound")},bound:function(e){return e===t?this._bound:(this._bound=e,t)},isGrouped:function(){return(this.dataSource.group()||[]).length}}),u.plugin(c)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.calendar.min",["kendo.core.min","kendo.selectable.min"],e)}(function(){return function(e,t){function i(e,t,i,n){var o,r=e.getFullYear(),s=t.getFullYear(),a=i.getFullYear();return r-=r%n,o=r+(n-1),r<s&&(r=s),o>a&&(o=a),r+"-"+o}function n(e){var t,i=0,n=e.min,o=e.max,r=e.start,s=e.setter,l=e.build,c=e.weekNumberBuild,d=e.cells||12,u=e.isWeekColumnVisible,h=e.perRow||4,p=e.weekNumber||U,m=e.content||V,g=e.empty||W,v=e.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';for(u&&(v+=p(c(r)));i<d;i++)i>0&&i%h===0&&(v+='</tr><tr role="row">',u&&(v+=p(c(r)))),r=f(r.getFullYear(),r.getMonth(),r.getDate()),F(r,0),t=l(r,i,e.disableDates),v+=a(r,n,o)?m(t):g(t),s(r,1);return v+"</tr></tbody></table>"}function o(e,t,i){var n=e.getFullYear(),o=t.getFullYear(),r=o,s=0;return i&&(o-=o%i,r=o-o%i+i-1),n>r?s=1:n<o&&(s=-1),s}function r(){var e=new Me;return new Me(e.getFullYear(),e.getMonth(),e.getDate())}function s(e,t,i){var n=r();return e&&(n=new Me((+e))),t>n?n=new Me((+t)):i<n&&(n=new Me((+i))),n}function a(e,t,i){return+e>=+t&&+e<=+i}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function c(e,t,i){t=t instanceof Me?t.getFullYear():e.getFullYear()+i*t,e.setFullYear(t)}function d(e,t){var i,n,o;return+t<+e&&(i=+e,T.views[0].setDate(e,t),T.views[0].setDate(t,new Date(i))),n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+o-+n)/D.date.MS_PER_DAY)}function u(e,t,i,n){var o,r;for(o=0;o<=t;o++)r=new Date(i.getTime()),r=new Date(r.setDate(r.getDate()+o)),n(r)||e.push(r)}function h(t){var i=e(this).hasClass("k-state-disabled");i||e(this).toggleClass(se,be.indexOf(t.type)>-1||t.type==ve)}function p(e){e.preventDefault()}function f(e,t,i){var n=new Me(e,t,i);return n.setFullYear(e,t,i),n}function m(e){return H(e).calendars.standard}function g(e){var i=Re[e.start],n=Re[e.depth],o=H(e.culture);e.format=B(e.format||o.calendars.standard.patterns.d),isNaN(i)&&(i=0,e.start=te),(n===t||n>i)&&(e.depth=te),null===e.dates&&(e.dates=[])}function v(e){j&&e.find("*").attr("unselectable","on")}function _(e,t){e.addClass("k-"+t)}function b(e,t){for(var i=0,n=t.length;i<n;i++)if(e===+t[i])return!0;return!1}function w(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}function y(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}function k(t){return D.isFunction(t)?t:e.isArray(t)?C(t):e.noop}function x(e){var t,i=[];for(t=0;t<e.length;t++)i.push(e[t].setHours(0,0,0,0));return i}function C(t){var i,n,o,r,s,a=[],l=["su","mo","tu","we","th","fr","sa"],c="if (found) { return true } else {return false}";if(t[0]instanceof Me)a=x(t),i="var found = date && window.kendo.jQuery.inArray(date.setHours(0, 0, 0, 0),["+a+"]) > -1;"+c;else{for(o=0;o<t.length;o++)r=t[o].slice(0,2).toLowerCase(),s=e.inArray(r,l),s>-1&&a.push(s);i="var found = date && window.kendo.jQuery.inArray(date.getDay(),["+a+"]) > -1;"+c}return n=Function("date",i)}function S(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}var T,D=window.kendo,A=D.support,E=D.ui,I=E.Widget,M=D.keys,R=D.parseDate,F=D.date.adjustDST,P=D.date.weekInYear,z=D.ui.Selectable,B=D._extractFormat,L=D.template,H=D.getCulture,N=D.support.transitions,O=N?N.css+"transform-origin":"",V=L('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),W=L('<td role="gridcell">&nbsp;</td>',{useWithBlock:!1}),U=L('<td class="k-alt">#= data.weekNumber #</td>',{useWithBlock:!1}),q=D.support.browser,j=q.msie&&q.version<9,G=D._outerHeight,$=D._outerWidth,K=".kendoCalendar",Y="click"+K,Q="keydown"+K,X="id",Z="min",J="left",ee="slideIn",te="month",ie="century",ne="change",oe="navigate",re="value",se="k-state-hover",ae="k-state-disabled",le="k-state-focused",ce="k-other-month",de=' class="'+ce+'"',ue="k-nav-today",he="td:has(.k-link)",pe="td:has(.k-link):not(."+ae+")",fe="td:not(:has(.k-link))",me="k-state-selected",ge="blur"+K,ve="focus",_e=ve+K,be=A.touch?"touchstart":"mouseenter",we=A.touch?"touchstart"+K:"mouseenter"+K,ye=A.touch?"touchend"+K+" touchmove"+K:"mouseleave"+K,ke=6e4,xe=864e5,Ce="_prevArrow",Se="_nextArrow",Te="aria-disabled",De="aria-selected",Ae="aria-label",Ee=e.proxy,Ie=e.extend,Me=Date,Re={month:0,year:1,decade:2,century:3},Fe=I.extend({init:function(t,i){var n,o,a=this;I.fn.init.call(a,t,i),t=a.wrapper=a.element,i=a.options,i.url=window.unescape(i.url),a.options.disableDates=k(a.options.disableDates),a._templates(),a._selectable(),a._header(),a._footer(a.footer),o=t.addClass("k-widget k-calendar "+(i.weekNumber?" k-week-number":"")).on(we+" "+ye,he,h).on(Q,"table.k-content",Ee(a._move,a)).on(Y,he,function(t){var n=t.currentTarget.firstChild,o=a._toDateObject(n);n.href.indexOf("#")!=-1&&t.preventDefault(),"month"==a._view.name&&a.options.disableDates(o)||"month"==a._view.name&&"single"!=i.selectable||a._click(e(n))}).on("mouseup"+K,"table.k-content, .k-footer",function(){a._focusView(a.options.focusOnNav!==!1)}).attr(X),o&&(a._cellID=o+"_cell_selected"),a._isMultipleSelection()&&a.options.weekNumber&&t.on(Y,fe,function(t){var i=e(t.currentTarget).closest("tr").find(pe).first(),n=a.selectable._lastActive=e(t.currentTarget).closest("tr").find(pe).last();a.selectable.selectRange(i,n,{event:t}),a._current=a._value=a._toDateObject(n.find("a")),a._class(le,a._current)}),g(i),n=R(i.value,i.format,i.culture),a._selectDates=[],a._index=Re[i.start],a._current=new Me((+s(n,i.min,i.max))),a._addClassProxy=function(){if(a._active=!0,a._cell.hasClass(ae)){var e=a._view.toDateString(r());a._cell=a._cellByDate(e)}a._cell.addClass(le)},a._removeClassProxy=function(){a._active=!1,a._cell.removeClass(le)},a.value(n),a._isMultipleSelection()&&i.selectDates.length>0&&a.selectDates(i.selectDates),D.notify(a)},options:{name:"Calendar",value:null,min:new Me(1900,0,1),max:new Me(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:te,depth:te,animation:{horizontal:{effects:ee,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:""}},events:[ne,oe],setOptions:function(e){var t=this;g(e),e.disableDates=k(e.disableDates),I.fn.setOptions.call(t,e),t._templates(),t._selectable(),t._footer(t.footer),t._index=Re[t.options.start],t.navigate()},destroy:function(){var e=this,t=e._today;e.element.off(K),e._title.off(K),e[Ce].off(K),e[Se].off(K),e._destroySelectable(),D.destroy(e._table),t&&D.destroy(t.off(K)),I.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(Z,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(Ce,-1)},navigateToFuture:function(){this._navigate(Se,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(ae)||e.navigate(e._current,++t)},navigateDown:function(e){var i=this,n=i._index,o=i.options.depth;if(e)return n===Re[o]?(S(i._value,i._current)&&S(i._value,e)||(i.value(e),i.trigger(ne)),t):(i.navigate(e,--n),t)},navigate:function(i,n){var o,r,a,l,c,d,u,h,p,f,m,g,b,w,y,k;n=isNaN(n)?Re[n]:n,o=this,r=o.options,a=r.culture,l=r.min,c=r.max,d=o._title,u=o._table,h=o._oldTable,p=o._current,f=i&&+i>+p,m=n!==t&&n!==o._index,i||(i=p),o._current=i=new Me((+s(i,l,c))),n===t?n=o._index:o._index=n,o._view=b=T.views[n],w=b.compare,y=n===Re[ie],d.toggleClass(ae,y).attr(Te,y),y=w(i,l)<1,o[Ce].toggleClass(ae,y).attr(Te,y),o[Ce].hasClass(ae)&&o[Ce].removeClass(se),y=w(i,c)>-1,o[Se].toggleClass(ae,y).attr(Te,y),o[Se].hasClass(ae)&&o[Se].removeClass(se),u&&h&&h.data("animating")&&(h.kendoStop(!0,!0),u.kendoStop(!0,!0)),o._oldTable=u,u&&!o._changeView||(d.html(b.title(i,l,c,a)),o._table=g=e(b.content(Ie({min:l,max:c,date:i,url:r.url,dates:r.dates,format:r.format,culture:a,disableDates:r.disableDates,isWeekColumnVisible:r.weekNumber,messages:r.messages},o[b.name]))),_(g,b.name),v(g),k=u&&u.data("start")===g.data("start"),o._animate({from:u,to:g,vertical:m,future:f,replace:k}),o.trigger(oe),o._focus(i)),n===Re[r.depth]&&o._selectDates.length>0&&o._visualizeSelectedDatesInView(),"single"===o.options.selectable&&n===Re[r.depth]&&o._value&&!o.options.disableDates(o._value)&&o._class("k-state-selected",o._value),o._class(le,i),!u&&o._cell&&o._cell.removeClass(le),o._changeView=!0},selectDates:function(i){var n,o,r=this;return i===t?r._selectDates:(o=i.map(function(e){return e.getTime()}).filter(function(e,t,i){return i.indexOf(e)===t}).map(function(e){return new Date(e)}),n=e.grep(o,function(e){if(e)return+r._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),r._selectDates=n.length>0?n:0===o.length?o:r._selectDates,r._visualizeSelectedDatesInView(),t)},value:function(e){var i,n=this,o=n._view,r=n._view;return e===t?n._value:(e=n._validateValue(e),e&&n._isMultipleSelection()&&(i=new Date((+e)),i.setHours(0,0,0,0),n._selectDates=[i],n.selectable._lastActive=null),o&&null===e&&n._cell?n._cell.removeClass(me):(n._changeView=!e||r&&0!==r.compare(e,n._current),n.navigate(e)),t)},_validateValue:function(e){var i=this,n=i.options,o=n.min,r=n.max;return null===e&&(i._current=f(i._current.getFullYear(),i._current.getMonth(),i._current.getDate())),e=R(e,n.format,n.culture),null!==e&&(e=new Me((+e)),a(e,o,r)||(e=null)),null!==e&&i.options.disableDates(new Date((+e)))?i._value===t&&(i._value=null):i._value=e,i._value},_visualizeSelectedDatesInView:function(){var t,i=this,n={};e.each(i._selectDates,function(e,t){n[D.calendar.views[0].toDateString(t)]=t}),i.selectable.clear(),t=i._table.find(he).filter(function(t,i){return n[e(i.firstChild).attr(D.attr(re))]}),t.length>0&&i.selectable._selectElement(t,!0)},_isMultipleSelection:function(){var e=this;return"multiple"===e.options.selectable},_selectable:function(){var e,t,i=this;i._isMultipleSelection()&&(e=i.options.selectable,t=z.parseOptions(e),t.multiple&&i.element.attr("aria-multiselectable","true"),i.selectable=new z(i.wrapper,{aria:!0,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",multiple:t.multiple,filter:"table.k-month:eq(0) "+pe,change:Ee(i._onSelect,i),relatedTarget:Ee(i._onRelatedTarget,i)}))},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(pe)&&(t._current=t._toDateObject(e.find("a")),t._class(le,t._toDateObject(e.find("a"))))},_onSelect:function(i){var n=this,o=i,r=z.parseOptions(n.options.selectable);return r.multiple?(o.event.ctrlKey||o.event.metaKey?e(o.event.currentTarget).is(pe)?n._toggleSelection(e(o.event.currentTarget)):(n._cellsBySelector(pe).each(function(t,i){var o=n._toDateObject(e(i).find("a"));n._deselect(o)}),n._addSelectedCellsToArray()):o.event.shiftKey?n._rangeSelection(n._cell):e(o.event.currentTarget).is(he)?n.value(n._toDateObject(e(o.event.currentTarget).find("a"))):(n._selectDates=[],n._addSelectedCellsToArray()),n.trigger(ne),t):(e(o.event.currentTarget).is("td")&&!e(o.event.currentTarget).hasClass("k-state-selected")?e(o.event.currentTarget).addClass("k-state-selected"):n._click(e(o.event.currentTarget).find("a")),t)},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=this,i=t._toDateObject(e.find("a"));e.hasClass("k-state-selected")?t._selectDates.push(i):t._deselect(i)},_rangeSelection:function(e,t){var i,n=this,o=t||n._toDateObject(n.selectable.value().first().find("a")),r=n._toDateObject(e.find("a"));n.selectable._lastActive||n._value?o=n.selectable._lastActive?n._toDateObject(n.selectable._lastActive.find("a")):new Date((+n._value)):n.selectable._lastActive=t?n._cellByDate(n._view.toDateString(t),pe):n.selectable.value().first(),n._selectDates=[],i=d(o,r),u(n._selectDates,i,o,n.options.disableDates),n._visualizeSelectedDatesInView()},_cellsBySelector:function(e){var t=this;return t._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each(function(i,n){var o=t._toDateObject(e(n.firstChild));
t.options.disableDates(o)||t._selectDates.push(o)})},_deselect:function(e){var t=this,i=t._selectDates.map(Number).indexOf(+e);i!=-1&&t._selectDates.splice(i,1)},_dateInView:function(e){var t=this,i=t._toDateObject(t._cellsBySelector(he+":first").find("a")),n=t._toDateObject(t._cellsBySelector(he+":last").find("a"));return+e<=+n&&+e>=+i},_move:function(i){var n,o,r,l,c,d=this,u=d.options,h=i.keyCode,p=d._view,m=d._index,g=d.options.min,v=d.options.max,_=new Me((+d._current)),b=D.support.isRtl(d.wrapper),w=d.options.disableDates;return i.target===d._table[0]&&(d._active=!0),h==M.RIGHT&&!b||h==M.LEFT&&b?(n=1,o=!0):h==M.LEFT&&!b||h==M.RIGHT&&b?(n=-1,o=!0):h==M.UP?(n=0===m?-7:-4,o=!0):h==M.DOWN?(n=0===m?7:4,o=!0):h==M.SPACEBAR?(n=0,o=!0):h!=M.HOME&&h!=M.END||(r=h==M.HOME?"first":"last",l=p[r](_),_=new Me(l.getFullYear(),l.getMonth(),l.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds()),_.setFullYear(l.getFullYear()),o=!0),i.ctrlKey||i.metaKey?h==M.RIGHT&&!b||h==M.LEFT&&b?(d.navigateToFuture(),o=!0):h==M.LEFT&&!b||h==M.RIGHT&&b?(d.navigateToPast(),o=!0):h==M.UP?(d.navigateUp(),o=!0):h==M.DOWN?(d._click(e(d._cell[0].firstChild)),o=!0):h!=M.ENTER&&h!=M.SPACEBAR||!d._isMultipleSelection()||(d._keyboardToggleSelection(i),c=d._toDateObject(e(d._cell[0]).find("a")),d._class(le,c)):i.shiftKey?(n!==t||r)&&(r||p.setDate(_,n),a(_,g,v)||(_=s(_,u.min,u.max)),w(_)&&(_=d._nextNavigatable(_,n)),g=f(g.getFullYear(),g.getMonth(),g.getDate()),d._isMultipleSelection()?d._keyboardRangeSelection(i,_):d._focus(_)):(h==M.ENTER||h==M.SPACEBAR?("month"==p.name&&d._isMultipleSelection()?(d.value(d._toDateObject(e(d._cell.find("a")))),d.selectable._lastActive=e(d._cell[0]),d.trigger(ne)):d._click(e(d._cell[0].firstChild)),o=!0):h==M.PAGEUP?(o=!0,d.navigateToPast()):h==M.PAGEDOWN&&(o=!0,d.navigateToFuture()),(n||r)&&(r||p.setDate(_,n),g=f(g.getFullYear(),g.getMonth(),g.getDate()),a(_,g,v)||(_=s(_,u.min,u.max)),w(_)&&(_=d._nextNavigatable(_,n)),d._isMultipleSelection()?d._dateInView(_)?(d._current=_,d._class(le,_)):d.navigate(_):d._focus(_))),o&&i.preventDefault(),d._current},_keyboardRangeSelection:function(e,i){var n,o,r=this;return r._dateInView(i)?(r.selectable.options.filter=r.wrapper.find("table").length>1&&+i>+r._current?"table.k-month:eq(1) "+pe:"table.k-month:eq(0) "+pe,r._class(le,i),r._current=i,r._rangeSelection(r._cellByDate(r._view.toDateString(i),pe),i),r.trigger(ne),r.selectable.options.filter="table.k-month:eq(0) "+pe,t):(r._selectDates=[],n=r.selectable._lastActive?r._toDateObject(r.selectable._lastActive.find("a")):i,o=d(n,new Date((+i))),u(r._selectDates,o,n,r.options.disableDates),r.navigate(i),r._current=i,r.selectable._lastActive=r.selectable._lastActive||r._cellByDate(r._view.toDateString(i),pe),r.trigger(ne),t)},_keyboardToggleSelection:function(t){var i=this;t.currentTarget=i._cell[0],i.selectable._lastActive=e(i._cell[0]),e(i._cell[0]).hasClass(me)?(i.selectable._unselect(e(i._cell[0])),i.selectable.trigger(ne,{event:t})):i.selectable.value(e(i._cell[0]),{event:t})},_nextNavigatable:function(e,t){var i=this,n=!0,o=i._view,r=i.options.min,s=i.options.max,l=i.options.disableDates,c=new Date(e.getTime());for(o.setDate(c,-t);n;){if(o.setDate(e,t),!a(e,r,s)){e=c;break}n=l(e)}return e},_animate:function(e){var t=this,i=e.from,n=e.to,o=t._active;i?i.parent().data("animating")?(i.off(K),i.parent().kendoStop(!0,!0).remove(),i.remove(),n.insertAfter(t.element[0].firstChild),t._focusView(o)):!i.is(":visible")||t.options.animation===!1||e.replace?(n.insertAfter(i),i.off(K).remove(),t._focusView(o)):t[e.vertical?"_vertical":"_horizontal"](i,n,e.future):(n.insertAfter(t.element[0].firstChild),t._bindTable(n))},_horizontal:function(e,t,i){var n=this,o=n._active,r=n.options.animation.horizontal,s=r.effects,a=$(e);s&&s.indexOf(ee)!=-1&&(e.add(t).css({width:a}),e.wrap("<div/>"),n._focusView(o,e),e.parent().css({position:"relative",width:2*a,"float":J,"margin-left":i?0:-a}),t[i?"insertAfter":"insertBefore"](e),Ie(r,{effects:ee+":"+(i?"right":J),complete:function(){e.off(K).remove(),n._oldTable=null,t.unwrap(),n._focusView(o)}}),e.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(e,t){var i,n,o=this,r=o.options.animation.vertical,s=r.effects,a=o._active;s&&s.indexOf("zoom")!=-1&&(t.css({position:"absolute",top:G(e.prev()),left:0}).insertBefore(e),O&&(i=o._cellByDate(o._view.toDateString(o._current)),n=i.position(),n=n.left+parseInt(i.width()/2,10)+"px "+(n.top+parseInt(i.height()/2,10)+"px"),t.css(O,n)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(K).remove(),o._oldTable=null,t.css({position:"static",top:0,left:0}),o._focusView(a)}}),t.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(t,i){return this._table.find(i?i:"td:not(."+ce+")").filter(function(){return e(this.firstChild).attr(D.attr(re))===t})},_class:function(e,t){var i,n=this,o=n._cellID,r=n._cell,s=n._view.toDateString(t);r&&r.removeAttr(De).removeAttr(Ae).removeAttr(X),t&&"month"==n._view.name&&(i=n.options.disableDates(t)),n._cellsBySelector(n._isMultipleSelection()?he:"td:not(."+ce+")").removeClass(e),r=n._cellByDate(s,"multiple"==n.options.selectable?he:"td:not(."+ce+")").attr(De,!0),(e===le&&!n._active&&n.options.focusOnNav!==!1||i)&&(e=""),r.addClass(e),r[0]&&(n._cell=r),o&&(r.attr(X,o),n._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",o))},_bindTable:function(e){e.on(_e,this._addClassProxy).on(ge,this._removeClassProxy)},_click:function(e){var t=this,i=t.options,n=new Date((+t._current)),o=t._toDateObject(e);F(o,0),"month"==t._view.name&&t.options.disableDates(o)&&(o=t._value),t._view.setDate(n,o),t.navigateDown(s(n,i.min,i.max))},_focus:function(e){var t=this,i=t._view;0!==i.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(le,e))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(i){var n=this,o=r(),s=n.element,a=s.find(".k-footer");return i?(a[0]||(a=e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(s)),n._today=a.show().find(".k-link").html(i(o)).attr("title",D.toString(o,"D",n.options.culture)),n._toggle(),t):(n._toggle(!1),a.hide(),t)},_header:function(){var e,t=this,i=t.element;i.find(".k-header")[0]||i.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev" '+Ae+'="Previous"><span class="k-icon k-i-arrow-60-left"></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" '+Ae+'="Next"><span class="k-icon k-i-arrow-60-right"></span></a></div>'),e=i.find(".k-link").on(we+" "+ye+" "+_e+" "+ge,h).click(!1),t._title=e.eq(1).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[Ce]=e.eq(0).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[Se]=e.eq(2).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var i,n=this,o=n._index+1,r=new Me((+n._current));n._isMultipleSelection()&&(i=n._table.find("td:not(.k-other-month)").has(".k-link").first(),r=n._toDateObject(i.find("a")),n._current=new Date((+r))),e=n[e],e.hasClass(ae)||(o>3?r.setFullYear(r.getFullYear()+100*t):T.views[o].setDate(r,t),n.navigate(r))},_option:function(e,i){var n,o=this,r=o.options,s=o._value||o._current;return i===t?r[e]:(i=R(i,r.format,r.culture),i&&(r[e]=new Me((+i)),n=e===Z?i>s:s>i,(n||y(s,i))&&(n&&(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 i=this,n=i.options,o=i.options.disableDates(r()),s=i._today;e===t&&(e=a(r(),n.min,n.max)),s&&(s.off(Y),e&&!o?s.addClass(ue).removeClass(ae).on(Y,Ee(i._todayClick,i)):s.removeClass(ue).addClass(ae).on(Y,p))},_todayClick:function(e){var t=this,i=Re[t.options.depth],n=t.options.disableDates,o=r();e.preventDefault(),n(o)||(0===t._view.compare(t._current,o)&&t._index==i&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[o],t.selectable._lastActive=null),t._value=o,t.navigate(o,i),t.trigger(ne))},_toDateObject:function(t){var i=e(t).attr(D.attr(re)).split("/");return i=f(i[0],i[1],i[2])},_templates:function(){var e=this,t=e.options,i=t.footer,n=t.month,o=n.content,r=n.weekNumber,s=n.empty,a='#= kendo.toString(data,"D","'+t.culture+'") #';e.month={content:L('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+D.attr(re)+'="#=data.dateString#" title="#=data.title#">'+(o||"#=data.value#")+"</a></td>",{useWithBlock:!!o}),empty:L('<td role="gridcell">'+(s||"&nbsp;")+"</td>",{useWithBlock:!!s}),weekNumber:L('<td class="k-alt">'+(r||"#= data.weekNumber #")+"</td>",{useWithBlock:!!r})},i&&i!==!0&&(a=i),e.footer=i!==!1?L(a,{useWithBlock:!1}):null}});E.plugin(Fe),T={firstDayOfMonth:function(e){return f(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||D.culture().calendar;var i=t.firstDay,n=new Me(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(n.setFullYear(e.getFullYear());n.getDay()!=i;)T.setTime(n,-1*xe);return n},setTime:function(e,t){var i=e.getTimezoneOffset(),n=new Me(e.getTime()+t),o=n.getTimezoneOffset()-i;e.setTime(n.getTime()+o*ke)},views:[{name:te,title:function(e,t,i,n){return m(n).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,i=0,o=e.min,s=e.max,a=e.date,c=e.dates,d=e.format,u=e.culture,h=e.url,p=e.isWeekColumnVisible,g=h&&c[0],v=m(u),_=v.firstDay,w=v.days,y=l(w.names,_),k=l(w.namesShort,_),x=T.firstVisibleDay(a,v),C=t.first(a),S=t.last(a),A=t.toDateString,E=r(),I='<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="'+A(x)+'"><thead><tr role="row">';for(p&&(I+='<th scope="col" class="k-alt">'+e.messages.weekColumnHeader+"</th>");i<7;i++)I+='<th scope="col" title="'+y[i]+'">'+k[i]+"</th>";return F(E,0),E=+E,n({cells:42,perRow:7,html:I+='</tr></thead><tbody><tr role="row">',start:x,isWeekColumnVisible:p,weekNumber:e.weekNumber,min:f(o.getFullYear(),o.getMonth(),o.getDate()),max:f(s.getFullYear(),s.getMonth(),s.getDate()),content:e.content,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,i){var n=[],o=e.getDay(),r="",s="#";return(e<C||e>S)&&n.push(ce),i(e)&&n.push(ae),+e===E&&n.push("k-today"),0!==o&&6!==o||n.push("k-weekend"),g&&b(+e,c)&&(s=h.replace("{0}",D.toString(e,d,u)),r=" k-action-link"),{date:e,dates:c,ns:D.ns,title:D.toString(e,"D",u),value:e.getDate(),dateString:A(e),cssClass:n[0]?' class="'+n.join(" ")+'"':"",linkClass:r,url:s}},weekNumberBuild:function(e){return{weekNumber:P(e,D.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return T.firstDayOfMonth(e)},last:function(e){var t=f(e.getFullYear(),e.getMonth()+1,0),i=T.firstDayOfMonth(e),n=Math.abs(t.getTimezoneOffset()-i.getTimezoneOffset());return n&&t.setHours(i.getHours()+n/60),t},compare:function(e,t){var i,n=e.getMonth(),o=e.getFullYear(),r=t.getMonth(),s=t.getFullYear();return i=o>s?1:o<s?-1:n==r?0:n>r?1:-1},setDate:function(e,t){var i=e.getHours();t instanceof Me?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):T.setTime(e,t*xe),F(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=m(e.culture).months.namesAbbr,i=this.toDateString,o=e.min,r=e.max;return n({min:f(o.getFullYear(),o.getMonth(),1),max:f(r.getFullYear(),r.getMonth(),1),start:f(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:D.ns,dateString:i(e),cssClass:""}}})},first:function(e){return f(e.getFullYear(),0,e.getDate())},last:function(e){return f(e.getFullYear(),11,e.getDate())},compare:function(e,t){return o(e,t)},setDate:function(e,t){var i,n=e.getHours();t instanceof Me?(i=t.getMonth(),e.setFullYear(t.getFullYear(),i,e.getDate()),i!==e.getMonth()&&e.setDate(0)):(i=e.getMonth()+t,e.setMonth(i),i>11&&(i-=12),i>0&&e.getMonth()!=i&&e.setDate(0)),F(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,n){return i(e,t,n,10)},content:function(e){var t=e.date.getFullYear(),i=this.toDateString;return n({start:f(t-t%10-1,0,1),min:f(e.min.getFullYear(),0,1),max:f(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:D.ns,dateString:i(e),cssClass:0===t||11==t?de:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(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:ie,title:function(e,t,n){return i(e,t,n,100)},content:function(e){var t=e.date.getFullYear(),i=e.min.getFullYear(),o=e.max.getFullYear(),r=this.toDateString,s=i,a=o;return s-=s%10,a-=a%10,a-s<10&&(a=s+9),n({start:f(t-t%100-10,0,1),min:f(s,0,1),max:f(a,0,1),setter:this.setDate,build:function(e,t){var n=e.getFullYear(),s=n+9;return n<i&&(n=i),s>o&&(s=o),{ns:D.ns,value:n+" - "+s,dateString:r(e),cssClass:0===t||11==t?de:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(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"}}]},T.isEqualDatePart=w,T.isEqualDate=S,T.makeUnselectable=v,T.restrictValue=s,T.isInRange=a,T.addClassToViewContainer=_,T.normalize=g,T.viewsEnum=Re,T.disabled=k,D.calendar=T}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dateinput.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(e,t,i,n){var o,r,s,a,l=e[n+e.length-i.length];if(e=e.substring(0,n+e.length-i.length),i=i.substring(0,n),o=[],e===i&&n>0)return o.push([t[n-1],i[n-1]]),o;if(0===e.indexOf(i)&&(0===i.length||t[i.length-1]!==t[i.length])){for(s="",r=i.length;r<e.length;r++)t[r]!==s&&w.indexOf(t[r])>=0&&(s=t[r],o.push([s,""]));return o}if(" "===i[i.length-1]||i[i.length-1]===l)return[[t[n-1]," "]];if(0===i.indexOf(e)||w.indexOf(t[n-1])===-1){for(a=t[0],r=Math.max(0,e.length-1);r<t.length;r++)if(w.indexOf(t[r])>=0){a=t[r];break}return[[a,i[n-1]]]}return[[t[n-1],i[n-1]]]}var n,o=window,r=o.kendo,s=r.caret,a=r.ui,l=a.Widget,c=r.keys,d=".kendoDateInput",u=e.proxy,h={}.toString,p=(r.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+d,f="k-state-disabled",m="k-state-default",g="k-state-invalid",v="disabled",_="readonly",b="change",w="dMyHhmftsz",y=l.extend({init:function(t,i){var n,o,s=this;l.fn.init.call(s,t,i),t=s.element,i=s.options,i.format=r._extractFormat(i.format||r.getCulture(i.culture).calendars.standard.patterns.d),i.min=r.parseDate(t.attr("min"))||r.parseDate(i.min),i.max=r.parseDate(t.attr("max"))||r.parseDate(i.max),n=(t.parent().attr("class")||"").indexOf("k-picker-wrap")>=0,n?s.wrapper=t.parent():(s.wrapper=t.wrap("<span class='k-widget k-dateinput'></span>").parent(),s.wrapper.addClass(t[0].className),s.wrapper[0].style.cssText=t[0].style.cssText,t.css({width:"100%",height:t[0].style.height})),e("<span class='k-icon k-i-warning'></span>").insertAfter(t),s._form(),s.element.addClass(n?" ":"k-textbox").attr("autocomplete","off").on("focusout"+d,function(){s._change()});try{t[0].setAttribute("type","text")}catch(a){t[0].type="text"}o=t.is("[disabled]")||e(s.element).parents("fieldset").is(":disabled"),o?s.enable(!1):s.readonly(t.is("[readonly]")),s.value(s.options.value||t.val()),r.notify(s)},options:{name:"DateInput",culture:"",value:"",format:"",min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:"year",month:"month",day:"day",weekday:"day of the week",hour:"hours",minute:"minutes",second:"seconds",dayperiod:"AM/PM"}},events:[b],min:function(e){return e===t?this.options.min:(this.options.min=e,t)},max:function(e){return e===t?this.options.max:(this.options.max=e,t)},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),this._unbindInput(),this._bindInput(),this._updateElementValue()},destroy:function(){var e=this;e.element.off(d),e._formElement&&e._formElement.off("reset",e._resetHandler),l.fn.destroy.call(e)},value:function(e){return e===t?this._dateTime.getDateObject():(null===e&&(e=""),"[object Date]"!==h.call(e)&&(e=r.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this._dateTime=new n(e,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=e,t)},_updateElementValue:function(){var e=this._dateTime.toPair(this.options.format,this.options.culture,this.options.messages);this.element.val(e[0]),this._oldText=e[0],this._format=e[1]},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e=this;e.element.on("paste"+d,u(e._paste,e)).on("keydown"+d,u(e._keydown,e)).on(p,u(e._input,e)).on("mouseup"+d,u(e._mouseUp,e)).on("DOMMouseScroll"+d+" mousewheel"+d,u(e._scroll,e))},_unbindInput:function(){this.element.off("keydown"+d).off("paste"+d).off(p).off("mouseup"+d).off("DOMMouseScroll"+d+" mousewheel"+d)},_editable:function(e){var t=this,i=t.element,n=e.disable,o=e.readonly,r=t.wrapper;t._unbindInput(),o||n?(n&&(r.addClass(f).removeClass(m),i.attr(v,n),i.removeAttr(_)),o&&i.attr(_,o)):(r.addClass(m).removeClass(f),i.removeAttr(v).removeAttr(_),t._bindInput())},_change:function(){var e=this,t=e._oldValue,i=e.value();i&&e.min()&&i<e.min()&&(e.value(e.min()),i=e.value()),i&&e.max()&&i>e.max()&&(e.value(e.max()),i=e.value()),(t&&i&&i.getTime()!==t.getTime()||t&&!i||!t&&i)&&(e._oldValue=i,e.trigger(b),e.element.trigger(b))},_input:function(){var e,t,n,o,a,l,c,d=this,u=d.element[0],h=!1;if(r._activeElement()===u){if(e=i(this._oldText,this._format,this.element[0].value,s(this.element[0])[0]),t=1===e.length&&" "===e[0][1],!t)for(n=0;n<e.length;n++)o=this._dateTime.parsePart(e[n][0],e[n][1]),h=h||!o;this._updateElementValue(),e.length&&" "!==e[0][0]&&(this._selectSegment(e[0][0]),t||(a=e[0][0],setTimeout(function(){d._selectSegment(a)}))),t&&(l={keyCode:39,preventDefault:function(){}},this._keydown(l)),h&&(clearTimeout(d._blinkInvalidTimeout),c=g,d.wrapper.addClass(g),d._blinkInvalidTimeout=setTimeout(function(){d.wrapper.removeClass(c)},100))}},_mouseUp:function(){var e=s(this.element[0]);e[0]===e[1]&&this._selectNearestSegment()},_scroll:function(e){if(r._activeElement()===this.element[0]&&!this.element.is("[readonly]")){e=window.event||e;var t={keyCode:37,preventDefault:function(){}};t.keyCode=e.shiftKey?(e.wheelDelta||-e.detail)>0?37:39:(e.wheelDelta||-e.detail)>0?38:40,this._keydown(t),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},_form:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(i[0].value)})},t._formElement=o.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,i,n,o,a,l,d=e.keyCode;if(37==d||39==d)for(e.preventDefault(),t=s(this.element[0]),t[0]!=t[1]&&this._selectNearestSegment(),i=37==d?-1:1,n=i==-1?s(this.element[0])[0]-1:s(this.element[0])[1]+1;n>=0&&n<this._format.length;){if(w.indexOf(this._format[n])>=0){this._selectSegment(this._format[n]);break}n+=i}38!=d&&40!=d||(e.preventDefault(),t=s(this.element[0]),o=this._format[t[0]],w.indexOf(o)>=0&&(this._dateTime.modifyPart(o,38==d?1:-1),this._updateElementValue(),this._selectSegment(o),this.element.trigger(b))),r.support.browser.msie&&r.support.browser.version<10&&(a=e.keyCode?e.keyCode:e.which,8!==a&&46!==a||(l=this,setTimeout(function(){l._input()},0))),d===c.ENTER&&this._change()},_selectNearestSegment:function(){var e,i,n=s(this.element[0]),o=n[0];for(e=o,i=o-1;e<this._format.length||i>=0;e++,i--){if(e<this._format.length&&w.indexOf(this._format[e])!==-1)return this._selectSegment(this._format[e]),t;if(i>=0&&w.indexOf(this._format[i])!==-1)return this._selectSegment(this._format[i]),t}},_selectSegment:function(e){var t,i=-1,n=0;for(t=0;t<this._format.length;t++)this._format[t]===e&&(n=t+1,i===-1&&(i=t));i<0&&(i=0),s(this.element,i,n)}});a.plugin(y),n=function(e,i,n,o){function s(e,t,i){return e+="",t=t||2,i=t-e.length,i?k[t].substring(0,i)+e:e}function a(e){return D=e,A}function l(e,t){switch(e){case"y":h=t;break;case"M":p=t,t||(u.setMonth(0),b="");break;case"d":f=t;break;case"H":case"h":m=t,t||(w="");break;case"m":g=t;break;case"s":v=t;break;default:return}}var c,d,u=null,h=!0,p=!0,f=!0,m=!0,g=!0,v=!0,_=!0,b="",w="",y={},k=["","0","00","000","0000"],x=/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,C=null,S=null,T=null,D=!1,A=function(e){var i,n,o,r,a;switch(e){case"d":o=f?u.getDate():y.day;break;case"dd":o=f?s(u.getDate()):y.day;break;case"ddd":o=f&&p&&h?T.namesAbbr[u.getDay()]:y.weekday;break;case"dddd":o=f&&p&&h?T.names[u.getDay()]:y.weekday;break;case"M":o=p?u.getMonth()+1:y.month;break;case"MM":o=p?s(u.getMonth()+1):y.month;break;case"MMM":o=p?C.namesAbbr[u.getMonth()]:y.month;break;case"MMMM":o=p?C.names[u.getMonth()]:y.month;break;case"yy":o=h?s(u.getFullYear()%100):y.year;break;case"yyyy":o=h?s(u.getFullYear(),4):y.year;break;case"h":o=m?u.getHours()%12||12:y.hour;break;case"hh":o=m?s(u.getHours()%12||12):y.hour;break;case"H":o=m?u.getHours():y.hour;break;case"HH":o=m?s(u.getHours()):y.hour;break;case"m":o=g?u.getMinutes():y.minute;break;case"mm":o=g?s(u.getMinutes()):y.minute;break;case"s":o=v?u.getSeconds():y.second;break;case"ss":o=v?s(u.getSeconds()):y.second;break;case"f":o=_?Math.floor(u.getMilliseconds()/100):_;break;case"ff":o=u.getMilliseconds(),o>99&&(o=Math.floor(o/10)),o=_?s(o):e;break;case"fff":o=_?s(u.getMilliseconds(),3):e;break;case"tt":o=m?u.getHours()<12?S.AM[0]:S.PM[0]:y.dayperiod;break;case"zzz":i=u.getTimezoneOffset(),n=i<0,o=(""+Math.abs(i/60)).split(".")[0],i=Math.abs(i)-60*o,o=(n?"+":"-")+s(o),o+=":"+s(i);break;case"z":case"zz":o=u.getTimezoneOffset()/60,n=o<0,o=(""+Math.abs(o)).split(".")[0],o=(n?"+":"-")+("zz"===e?s(o):o)}if(o=o!==t?o:e.slice(1,e.length-1),D){for(o=""+o,r="","ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE"),a=0;a<o.length;a++)r+=e[0];return r}return o};if(this.setValue=function(e){f=e},this.getValue=function(){return f},this.modifyPart=function(e,t){var i,n=new Date(u&&u.getTime?u.getTime():u);switch(e){case"y":n.setFullYear(n.getFullYear()+t);break;case"M":i=n.getMonth()+t,n.setMonth(i),n.getMonth()%12!==(i+12)%12&&(n.setDate(1),n.setMonth(i));break;case"d":case"E":n.setDate(n.getDate()+t);break;case"H":case"h":n.setHours(n.getHours()+t);break;case"m":n.setMinutes(n.getMinutes()+t);break;case"s":n.setSeconds(n.getSeconds()+t);break;case"t":n.setHours((n.getHours()+12)%24)}n.getFullYear()>0&&(l(e,!0),u=n)},this.parsePart=function(e,t){var i,n,o,r,s,a,c,d,_;if(!t)return l(e,!1),!0;switch(i=new Date(u&&u.getTime?u.getTime():u),e){case"d":if(o=(f?10*i.getDate():0)+parseInt(t,10),isNaN(o))return;for(;o>31;)o=parseInt((""+o).slice(1),10);if(o<1)f=!1;else{if(i.setDate(o),i.getMonth()!==u.getMonth())return;f=!0}break;case"M":if(r=(p?10*(i.getMonth()+1):0)+parseInt(t,10),isNaN(r)){for(s=S.months.names,b+=t.toLowerCase();b.length>0;){for(a=0;a<s.length;a++)if(0===s[a].toLowerCase().indexOf(b))return i.setMonth(a),p=!0,u=i,!0;b=b.substring(1,b.length)}return!1}for(;r>12;)r=parseInt((""+r).slice(1),10);r<1?p=!1:(i.setMonth(r-1),i.getMonth()!==r-1&&(i.setDate(1),i.setMonth(r-1)),p=!0);break;case"y":if(c=(h?10*i.getFullYear():0)+parseInt(t,10),isNaN(c))return;for(;c>9999;)c=parseInt((""+c).slice(1),10);c<1?h=!1:(i.setFullYear(c),h=!0);break;case"h":if(n=(m?10*(i.getHours()%12||12):0)+parseInt(t,10),isNaN(n))return;for(;n>12;)n=parseInt((""+n).slice(1),10);i.setHours(12*Math.floor(i.getHours()/12)+n%12),m=!0;break;case"H":if(n=(m?10*i.getHours():0)+parseInt(t,10),isNaN(n))return;for(;n>23;)n=parseInt((""+n).slice(1),10);i.setHours(n),m=!0;break;case"m":if(d=(g?10*i.getMinutes():0)+parseInt(t,10),isNaN(d))return;for(;d>59;)d=parseInt((""+d).slice(1),10);i.setMinutes(d),g=!0;break;case"s":if(_=(v?10*i.getSeconds():0)+parseInt(t,10),isNaN(_))return;for(;_>59;)_=parseInt((""+_).slice(1),10);i.setSeconds(_),v=!0;break;case"t":if(m){for(w+=t.toLowerCase();w.length>0;){if(0===S.AM[0].toLowerCase().indexOf(w)&&i.getHours()>=12||0===S.PM[0].toLowerCase().indexOf(w)&&i.getHours()<12)return i.setHours((i.getHours()+12)%24),u=i,!0;w=w.substring(1,w.length)}return!1}}return u=i,!0},this.toPair=function(e,t,i){return e?(t=r.getCulture(t),S=t.calendars.standard,e=S.patterns[e]||e,T=S.days,C=S.months,y=i,[e.replace(x,a(!1)),e.replace(x,a(!0))]):["",""]},this.getDateObject=function(){return h&&p&&f&&m&&g&&v&&_?new Date(u.getTime()):null},e)u=new Date(e.getTime());else for(u=new Date,c=this.toPair(i,n,o)[1],d=0;d<c.length;d++)l(c[d],!1)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.datepicker.min",["kendo.calendar.min","kendo.popup.min","kendo.dateinput.min"],e)}(function(){return function(e,t){function i(t){var i=t.parseFormats,n=t.format;L.normalize(t),i=e.isArray(i)?i:[i],i.length||i.push("yyyy-MM-dd"),e.inArray(n,i)===-1&&i.splice(0,0,t.format),t.parseFormats=i}function n(e){e.preventDefault()}var o,r=window.kendo,s=r.ui,a=s.Widget,l=r.parseDate,c=r.keys,d=r.support,u=r.template,h=r._activeElement,p="<div />",f="<span />",m=".kendoDatePicker",g="click"+m,v=d.mouseAndTouchPresent?r.applyEventMap("up",m.slice(1)):g,_="open",b="close",w="change",y="disabled",k="readonly",x="k-state-default",C="k-state-focused",S="k-state-selected",T="k-state-disabled",D="k-state-hover",A="mouseenter"+m+" mouseleave"+m,E="mousedown"+m,I="id",M="min",R="max",F="month",P="aria-disabled",z="aria-expanded",B="aria-hidden",L=r.calendar,H=L.isInRange,N=L.restrictValue,O=L.isEqualDatePart,V=e.extend,W=e.proxy,U=Date,q=function(t){var i,n=this,o=document.body,a=e(p).attr(B,"true").addClass("k-calendar-container").appendTo(o);n.options=t=t||{},i=t.id,i&&(i+="_dateview",a.attr(I,i),n._dateViewID=i),n.popup=new s.Popup(a,V(t.popup,t,{name:"Popup",isRtl:r.support.isRtl(t.anchor)})),n.div=a,n.value(t.value)};q.prototype={_calendar:function(){var t,i=this,o=i.calendar,a=i.options;o||(t=e(p).attr(I,r.guid()).appendTo(i.popup.element).on(E,n).on(g,"td:has(.k-link)",W(i._click,i)),i.calendar=o=new s.Calendar(t),i._setOptions(a),r.calendar.makeUnselectable(o.element),o.navigate(i._value||i._current,a.start),i.value(i._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,weekNumber:e.weekNumber,start:e.start,disableDates:e.disableDates})},setOptions:function(e){var t=this.options,i=e.disableDates;i&&(e.disableDates=L.disabled(i)),this.options=V(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,t=this;t._calendar(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout(function(){t.popup._hovered=e},1)},close:function(){this.popup.close()},min:function(e){this._option(M,e)},max:function(e){this._option(R,e)},toggle:function(){var e=this;e[e.popup.visible()?b:_]()},move:function(e){var t=this,i=e.keyCode,n=t.calendar,o=e.ctrlKey&&i==c.DOWN||i==c.ENTER,r=!1;if(e.altKey)i==c.DOWN?(t.open(),e.preventDefault(),r=!0):i==c.UP&&(t.close(),e.preventDefault(),r=!0);else if(t.popup.visible()){if(i==c.ESC||o&&n._cell.hasClass(S))return t.close(),e.preventDefault(),!0;i!=c.SPACEBAR&&(t._current=n._move(e)),r=!0}return r},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,i=t.calendar,n=t.options,o=n.disableDates;o&&o(e)&&(e=null),t._value=e,t._current=new U((+N(e,n.min,n.max))),i&&i.value(e)},_click:function(e){e.currentTarget.className.indexOf(S)!==-1&&this.close()},_option:function(e,t){var i=this,n=i.calendar;i.options[e]=t,n&&n[e](t)}},q.normalize=i,r.DateView=q,o=a.extend({init:function(t,n){var o,s,c=this;a.fn.init.call(c,t,n),t=c.element,n=c.options,n.disableDates=r.calendar.disabled(n.disableDates),n.min=l(t.attr("min"))||l(n.min),n.max=l(t.attr("max"))||l(n.max),i(n),c._initialOptions=V({},n),c._wrapper(),c.dateView=new q(V({},n,{id:t.attr(I),anchor:c.wrapper,change:function(){c._change(this.value()),c.close()},close:function(e){c.trigger(b)?e.preventDefault():(t.attr(z,!1),s.attr(B,!0))},open:function(e){var i,n=c.options;c.trigger(_)?e.preventDefault():(c.element.val()!==c._oldText&&(i=l(t.val(),n.parseFormats,n.culture),c.dateView[i?"current":"value"](i)),t.attr(z,!0),s.attr(B,!1),c._updateARIA(i))}})),s=c.dateView.div,c._icon();try{t[0].setAttribute("type","text")}catch(d){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":c.dateView._dateViewID,autocomplete:"off"}),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._createDateInput(n),c._old=c._update(n.value||c.element.val()),c._oldText=t.val(),r.notify(c)},events:[_,b,w],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:F,depth:F,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#',dateInput:!1,weekNumber:!1},setOptions:function(e){var t=this,n=t._value;a.fn.setOptions.call(t,e),e=t.options,e.min=l(e.min),e.max=l(e.max),i(e),t.dateView.setOptions(e),t._createDateInput(e),t._dateInput||t.element.val(r.toString(n,e.format,e.culture)),n&&t._updateARIA(n)},_editable:function(e){var t=this,i=t._dateIcon.off(m),o=t.element.off(m),r=t._inputWrapper.off(m),s=e.readonly,a=e.disable;s||a?(r.addClass(a?T:x).removeClass(a?x:T),o.attr(y,a).attr(k,s).attr(P,a)):(r.addClass(x).removeClass(T).on(A,t._toggleHover),o.removeAttr(y).removeAttr(k).attr(P,!1).on("keydown"+m,W(t._keydown,t)).on("focusout"+m,W(t._blur,t)).on("focus"+m,function(){t._inputWrapper.addClass(C)}),i.on(v,W(t._click,t)).on(E,n))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;a.fn.destroy.call(e),e.dateView.destroy(),e.element.off(m),e._dateIcon.off(m),e._inputWrapper.off(m),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(R,e)},value:function(e){var i=this;return e===t?i._value:(i._old=i._update(e),null===i._old&&i.element.val(""),i._oldText=i.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(D,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(C)},_click:function(e){var t=this;t.dateView.toggle(),t._focusElement(e.type)},_focusElement:function(e){var t=this.element;d.touch&&(!d.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===h()||t.focus()},_change:function(e){var t,i,n,o=this,s=o.element.val();e=o._update(e),t=!r.calendar.isEqualDate(o._old,e),i=t&&!o._typing,n=s!==o.element.val(),(i||n)&&o.element.trigger(w),t&&(o._old=e,o._oldText=o.element.val(),o.trigger(w)),o._typing=!1},_keydown:function(e){var t=this,i=t.dateView,n=t.element.val(),o=!1;i.popup.visible()||e.keyCode!=c.ENTER||n===t._oldText?(o=i.move(e),t._updateARIA(i._current),o?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():t._typing=!0):t._change(n)},_icon:function(){var t,i=this,n=i.element;t=n.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-calendar"></span></span>').insertAfter(n)),
i._dateIcon=t.attr({role:"button","aria-controls":i.dateView._dateViewID})},_option:function(e,i){var n=this,o=n.options;return i===t?o[e]:(i=l(i,o.parseFormats,o.culture),i&&(o[e]=new U((+i)),n.dateView[e](i)),t)},_update:function(e){var t,i=this,n=i.options,o=n.min,s=n.max,a=i._value,c=l(e,n.parseFormats,n.culture),d=null===c&&null===a||c instanceof Date&&a instanceof Date;return n.disableDates(c)&&(c=null,i._old||i.element.val()||(e=null)),+c===+a&&d?(t=r.toString(c,n.format,n.culture),t!==e&&i.element.val(null===c?e:t),c):(null!==c&&O(c,o)?c=N(c,o,s):H(c,o,s)||(c=null),i._value=c,i.dateView.value(c),i._dateInput&&c?i._dateInput.value(c||e):i.element.val(r.toString(c||e,n.format,n.culture)),i._updateARIA(c),c)},_wrapper:function(){var t,i=this,n=i.element;t=n.parents(".k-datepicker"),t[0]||(t=n.wrap(f).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(f).parent()),t[0].style.cssText=n[0].style.cssText,n.css({width:"100%",height:n[0].style.height}),i.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(n[0].className),i._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){t.value(i[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)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new s.DateInput(this.element,{culture:e.culture,format:e.format,min:e.min,max:e.max}))},_updateARIA:function(e){var t,i=this,n=i.dateView.calendar;i.element.removeAttr("aria-activedescendant"),n&&(t=n._cell,t.attr("aria-label",i._ariaTemplate({current:e||n.current()})),i.element.attr("aria-activedescendant",t.attr("id")))}}),s.plugin(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.virtuallist.min",["kendo.data.min"],e)}(function(){return function(e,t){function i(e){return e[e.length-1]}function n(e){return e instanceof Array?e:[e]}function o(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function r(e,t,i){return Math.ceil(e*t/i)}function s(e,t,i){var n=document.createElement(i||"div");return t&&(n.className=t),e.appendChild(n),n}function a(){var t,i=e('<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>');return i.css({position:"absolute",left:"-200000px",visibility:"hidden"}),i.appendTo(document.body),t=parseFloat(b.getComputedStyles(i.find(".k-item")[0],["line-height"])["line-height"]),i.remove(),t}function l(e,t,i){return{down:e*i,up:e*(t-1-i)}}function c(e,t){var i=(e.listScreens-1-e.threshold)*t,n=e.threshold*t;return function(e,t,o){return t>o?t-e.top<i:0===e.top||t-e.top>n}}function d(e,t){return function(i){return t(e.scrollTop,i)}}function u(e){return function(t,i){return e(t.items,t.index,i),t}}function h(e,t){b.support.browser.msie&&b.support.browser.version<10?e.style.top=t+"px":(e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)")}function p(t,i){return function(n,o){for(var r=0,s=n.length;r<s;r++)t(n[r],o[r],i),o[r].item&&this.trigger(O,{item:e(n[r]),data:o[r].item,ns:b.ui})}}function f(e,t){var i;return t>0?(i=e.splice(0,t),e.push.apply(e,i)):(i=e.splice(t,-t),e.unshift.apply(e,i)),i}function m(i,n,o){var r=o.template;i=e(i),n.item||(r=o.placeholderTemplate),0===n.index&&this.header&&n.group&&this.header.html(o.fixedGroupTemplate(n.group)),this.angular("cleanup",function(){return{elements:[i]}}),i.attr("data-uid",n.item?n.item.uid:"").attr("data-offset-index",n.index),i.html(this.options.columns&&this.options.columns.length&&n.item?g(this.options,n.item,o):r(n.item||{})),i.toggleClass(z,n.current),i.toggleClass(P,n.selected),i.toggleClass("k-first",n.newGroup),i.toggleClass("k-last",n.isLastGroupedItem),i.toggleClass("k-loading-item",!n.item),0!==n.index&&n.newGroup&&e("<div class="+F+"></div>").appendTo(i).html(o.groupTemplate(n.group)),n.top!==t&&h(i[0],n.top),this.angular("compile",function(){return{elements:[i],data:[{dataItem:n.item,group:n.group,newGroup:n.newGroup}]}})}function g(e,t,i){var n,o,r,s,a="";for(n=0;n<e.columns.length;n++)o=e.columns[n].width,r=parseInt(o,10),s="",o&&(s+="style='width:",s+=r,s+=C.test(o)?"%":"px",s+=";'"),a+="<span class='k-cell' "+s+">",a+=i["column"+n](t),a+="</span>";return a}function v(e,t){var i,n,o,r,s=t.length,a=e.length,l=[],c=[];if(a)for(o=0;o<a;o++){for(i=e[o],n=!1,r=0;r<s;r++)if(i===t[r]){n=!0,l.push({index:o,item:i});break}n||c.push(i)}return{changed:l,unchanged:c}}function _(e){return e&&"resolved"!==e.state()}var b=window.kendo,w=b.ui,y=w.Widget,k=w.DataBoundWidget,x=e.proxy,C=/^\d+(\.\d+)?%$/i,S="k-virtual-wrap",T="k-virtual-list",D="k-virtual-content",A="k-list",E="k-group-header",I="k-virtual-item",M="k-item",R="k-height-container",F="k-group",P="k-state-selected",z="k-state-focused",B="k-state-hover",L="change",H="click",N="listBound",O="itemChange",V="activate",W="deactivate",U=".VirtualList",q=k.extend({init:function(t,i){var o=this;o.bound(!1),o._fetching=!1,y.fn.init.call(o,t,i),o.options.itemHeight||(o.options.itemHeight=a()),i=o.options,o.element.addClass(A+" "+T).attr("role","listbox"),o.content=o.element.wrap("<div unselectable='on' class='"+D+"'></div>").parent(),o.wrapper=o.content.wrap("<div class='"+S+"'></div>").parent(),o.header=o.content.before("<div class='"+E+"'></div>").prev(),i.columns&&i.columns.length&&o.element.removeClass(A),o.element.on("mouseenter"+U,"li:not(.k-loading-item)",function(){e(this).addClass(B)}).on("mouseleave"+U,"li",function(){e(this).removeClass(B)}),o._values=n(o.options.value),o._selectedDataItems=[],o._selectedIndexes=[],o._rangesList={},o._promisesList=[],o._optionID=b.guid(),o._templates(),o.setDataSource(i.dataSource),o.content.on("scroll"+U,b.throttle(function(){o._renderItems(),o._triggerListBound()},i.delay)),o._selectable()},options:{name:"VirtualList",autoBind:!0,delay:100,height:null,listScreens:4,threshold:.5,itemHeight:null,oppositeBuffer:1,type:"flat",selectable:!1,value:[],dataValueField:null,template:"#:data#",placeholderTemplate:"loading...",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",mapValueTo:"index",valueMapper:null},events:[L,H,N,O,V,W],setOptions:function(e){y.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(H,"."+I,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(U),this.dataSource.unbind(L,this._refreshHandler),y.fn.destroy.call(this)},setDataSource:function(t){var i,n=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=b.data.DataSource.create(o),n.dataSource?(n.dataSource.unbind(L,n._refreshHandler),n._clean(),n.bound(!1),n._deferValueSet=!0,i=n.value(),n.value([]),n.mute(function(){n.value(i)})):n._refreshHandler=e.proxy(n.refresh,n),n.dataSource=o.bind(L,n._refreshHandler),n.setDSFilter(o.filter()),0!==o.view().length?n.refresh():n.options.autoBind&&o.fetch()},skip:function(){return this.dataSource.currentRangeStart()},_triggerListBound:function(){var e=this,t=e.skip();e.bound()&&!e._selectingValue&&e._skip!==t&&(e._skip=t,e.trigger(N))},_getValues:function(t){var i=this._valueGetter;return e.map(t,function(e){return i(e)})},_highlightSelectedItems:function(){var e,t;for(e=0;e<this._selectedDataItems.length;e++)t=this._getElementByDataItem(this._selectedDataItems[e]),t.length&&t.addClass(P)},refresh:function(e){var t,i=this,n=e&&e.action,o="itemchange"===n,r=this.isFiltered();i._mute||(i._deferValueSet=!1,i._fetching?(i._renderItems&&i._renderItems(!0),i._triggerListBound()):(r&&i.focus(0),i._createList(),n||!i._values.length||r||i.options.skipUpdateOnBind||i._emptySearch?(i.bound(!0),i._highlightSelectedItems(),i._triggerListBound()):(i._selectingValue=!0,i.bound(!0),i.value(i._values,!0).done(function(){i._selectingValue=!1,i._triggerListBound()}))),(o||"remove"===n)&&(t=v(i._selectedDataItems,e.items),t.changed.length&&(o?i.trigger("selectedItemChange",{items:t.changed}):i.value(i._getValues(t.unchanged)))),i._fetching=!1)},removeAt:function(e){return this._selectedIndexes.splice(e,1),this._values.splice(e,1),{position:e,dataItem:this._selectedDataItems.splice(e,1)[0]}},setValue:function(e){this._values=n(e)},value:function(i,o){var r,s=this;return i===t?s._values.slice():(null===i&&(i=[]),i=n(i),s._valueDeferred&&"resolved"!==s._valueDeferred.state()||(s._valueDeferred=e.Deferred()),r="multiple"===s.options.selectable&&s.select().length&&i.length,!r&&i.length||s.select(-1),s._values=i,(s.bound()&&!s._mute&&!s._deferValueSet||o)&&s._prefetchByValue(i),s._valueDeferred)},_checkValuesOrder:function(e){if(this._removedAddedIndexes&&this._removedAddedIndexes.length===e.length){var t=this._removedAddedIndexes.slice();return this._removedAddedIndexes=null,t}return e},_prefetchByValue:function(e){var i,n,r,s=this,a=s._dataView,l=s._valueGetter,c=s.options.mapValueTo,d=!1,u=[];for(n=0;n<e.length;n++)for(r=0;r<a.length;r++)i=a[r].item,i&&(d=o(i)?e[n]===i:e[n]===l(i),d&&u.push(a[r].index));return u.length===e.length?(s._values=[],s.select(u),t):("function"==typeof s.options.valueMapper?s.options.valueMapper({value:"multiple"===this.options.selectable?e:e[0],success:function(e){"index"===c?s.mapValueToIndex(e):"dataItem"===c&&s.mapValueToDataItem(e)}}):s.value()[0]?(s._selectingValue=!1,s._triggerListBound()):s.select([-1]),t)},mapValueToIndex:function(e){if(e=e===t||e===-1||null===e?[]:n(e),e.length){var i=this._deselect([]).removed;i.length&&this._triggerChange(i,[])}else e=[-1];this.select(e)},mapValueToDataItem:function(i){var o,r,s,a;if(i=i===t||null===i?[]:n(i),i.length){for(o=e.map(this._selectedDataItems,function(e,t){return{index:t,dataItem:e}}),r=e.map(i,function(e,t){return{index:t,dataItem:e}}),this._selectedDataItems=i,this._selectedIndexes=[],s=0;s<this._selectedDataItems.length;s++)a=this._getElementByDataItem(this._selectedDataItems[s]),this._selectedIndexes.push(this._getIndecies(a)[0]),a.addClass(P);this._triggerChange(o,r),this._valueDeferred&&this._valueDeferred.resolve()}else this.select([-1])},deferredRange:function(t){var i=this.dataSource,n=this.itemCount,o=this._rangesList,r=e.Deferred(),s=[],a=Math.floor(t/n)*n,l=Math.ceil(t/n)*n,c=l===a?[l]:[a,l];return e.each(c,function(t,r){var a,l=r+n,c=o[r];c&&c.end===l?a=c.deferred:(a=e.Deferred(),o[r]={end:l,deferred:a},i._multiplePrefetch(r,n,function(){a.resolve()})),s.push(a)}),e.when.apply(e,s).then(function(){r.resolve()}),r},prefetch:function(t){var i=this,n=this.itemCount,o=!i._promisesList.length;return _(i._activeDeferred)||(i._activeDeferred=e.Deferred(),i._promisesList=[]),e.each(t,function(e,t){i._promisesList.push(i.deferredRange(i._getSkip(t,n)))}),o&&e.when.apply(e,i._promisesList).done(function(){i._promisesList=[],i._activeDeferred.resolve()}),i._activeDeferred},_findDataItem:function(e,t){var i,n;if("group"===this.options.type)for(n=0;n<e.length;n++){if(i=e[n].items,!(i.length<=t))return i[t];t-=i.length}return e[t]},_getRange:function(e,t){return this.dataSource._findRange(e,Math.min(e+t,this.dataSource.total()))},dataItemByIndex:function(t){var i=this,n=i.itemCount,o=i._getSkip(t,n),r=this._getRange(o,n);return i._getRange(o,n).length?("group"===i.options.type&&(b.ui.progress(e(i.wrapper),!0),i.mute(function(){i.dataSource.range(o,n,function(){b.ui.progress(e(i.wrapper),!1)}),r=i.dataSource.view()})),i._findDataItem(r,[t-o])):null},selectedDataItems:function(){return this._selectedDataItems.slice()},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scrollTo:function(e){this.content.scrollTop(e)},scrollToIndex:function(e){this.scrollTo(e*this.options.itemHeight)},focus:function(n){var o,r,s,a,l,c,d=this.options.itemHeight,u=this._optionID,h=!0;if(n===t)return a=this.element.find("."+z),a.length?a:null;if("function"==typeof n)for(s=this.dataSource.flatView(),l=0;l<s.length;l++)if(n(s[l])){n=l;break}return n instanceof Array&&(n=i(n)),isNaN(n)?(o=e(n),r=parseInt(e(o).attr("data-offset-index"),10)):(r=n,o=this._getElementByIndex(r)),r===-1?(this.element.find("."+z).removeClass(z),this._focusedIndex=t,t):(o.length?(o.hasClass(z)&&(h=!1),this._focusedIndex!==t&&(a=this._getElementByIndex(this._focusedIndex),a.removeClass(z).removeAttr("id"),h&&this.trigger(W)),this._focusedIndex=r,o.addClass(z).attr("id",u),c=this._getElementLocation(r),"top"===c?this.scrollTo(r*d):"bottom"===c?this.scrollTo(r*d+d-this._screenHeight):"outScreen"===c&&this.scrollTo(r*d),h&&this.trigger(V)):(this._focusedIndex=r,this.items().removeClass(z),this.scrollToIndex(r)),t)},focusIndex:function(){return this._focusedIndex},focusFirst:function(){this.scrollTo(0),this.focus(0)},focusLast:function(){var e=this.dataSource.total();this.scrollTo(this.heightContainer.offsetHeight),this.focus(e-1)},focusPrev:function(){var e,t=this._focusedIndex;return!isNaN(t)&&t>0?(t-=1,this.focus(t),e=this.focus(),e&&e.hasClass("k-loading-item")&&(t+=1,this.focus(t)),t):(t=this.dataSource.total()-1,this.focus(t),t)},focusNext:function(){var e,t=this._focusedIndex,i=this.dataSource.total()-1;return!isNaN(t)&&t<i?(t+=1,this.focus(t),e=this.focus(),e&&e.hasClass("k-loading-item")&&(t-=1,this.focus(t)),t):(t=0,this.focus(t),t)},_triggerChange:function(e,t){e=e||[],t=t||[],(e.length||t.length)&&this.trigger(L,{removed:e,added:t})},select:function(n){var o,r,s,a,l,c,d=this,u="multiple"!==d.options.selectable,h=_(d._activeDeferred),p=this.isFiltered(),f=[];return n===t?d._selectedIndexes.slice():(d._selectDeferred&&"resolved"!==d._selectDeferred.state()||(d._selectDeferred=e.Deferred()),o=d._getIndecies(n),s=u&&!p&&i(o)===i(this._selectedIndexes),f=d._deselectCurrentValues(o),f.length||!o.length||s?(d._triggerChange(f),d._valueDeferred&&d._valueDeferred.resolve().promise(),d._selectDeferred.resolve().promise()):(1===o.length&&o[0]===-1&&(o=[]),r=o,l=d._deselect(o),f=l.removed,o=l.indices,u&&(h=!1,o.length&&(o=[i(o)])),c=function(){var e=d._select(o);(r.length===o.length||u)&&d.focus(o),d._triggerChange(f,e),d._valueDeferred&&d._valueDeferred.resolve(),d._selectDeferred.resolve()},a=d.prefetch(o),h||(a?a.done(c):c()),d._selectDeferred.promise()))},bound:function(e){return e===t?this._listCreated:(this._listCreated=e,t)},mute:function(e){this._mute=!0,x(e(),this),this._mute=!1},setDSFilter:function(t){this._lastDSFilter=e.extend({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!b.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},skipUpdate:e.noop,_getElementByIndex:function(t){return this.items().filter(function(i,n){return t===parseInt(e(n).attr("data-offset-index"),10)})},_getElementByDataItem:function(t){var i,n,r,s=this._dataView,a=this._valueGetter;for(r=0;r<s.length;r++)if(n=s[r].item&&o(s[r].item)?s[r].item===t:s[r].item&&t&&a(s[r].item)==a(t)){i=s[r];break}return i?this._getElementByIndex(i.index):e()},_clean:function(){this.result=t,this._lastScrollTop=t,this._skip=t,e(this.heightContainer).remove(),this.heightContainer=t,this.element.empty()},_height:function(){var e=!!this.dataSource.view().length,t=this.options.height,i=this.options.itemHeight,n=this.dataSource.total();return e?t/i>n&&(t=n*i):t=0,t},setScreenHeight:function(){var e=this._height();this.content.height(e),this._screenHeight=e},screenHeight:function(){return this._screenHeight},_getElementLocation:function(e){var t,i=this.content.scrollTop(),n=this._screenHeight,o=this.options.itemHeight,r=e*o,s=r+o,a=i+n;return t=r===i-o||s>i&&r<i?"top":r===a||r<a&&a<s?"bottom":r>=i&&r<=i+(n-o)?"inScreen":"outScreen"},_templates:function(){var e,t,i,n,o=this.options,r={template:o.template,placeholderTemplate:o.placeholderTemplate,groupTemplate:o.groupTemplate,fixedGroupTemplate:o.fixedGroupTemplate};if(o.columns)for(e=0;e<o.columns.length;e++)t=o.columns[e],i=t.field?""+t.field:"text",r["column"+e]=t.template||"#: "+i+"#";for(n in r)"function"!=typeof r[n]&&(r[n]=b.template(r[n]||""));this.templates=r},_generateItems:function(e,t){for(var i,n=[],o=this.options.itemHeight+"px";t-- >0;)i=document.createElement("li"),i.tabIndex=-1,i.className=I+" "+M,i.setAttribute("role","option"),i.style.height=o,i.style.minHeight=o,e.appendChild(i),n.push(i);return n},_saveInitialRanges:function(){var t,i=this.dataSource._ranges,n=e.Deferred();for(n.resolve(),this._rangesList={},t=0;t<i.length;t++)this._rangesList[i[t].start]={end:i[t].end,deferred:n}},_createList:function(){var t=this,i=t.content.get(0),n=t.options,o=t.dataSource;t.bound()&&t._clean(),t._saveInitialRanges(),t._buildValueGetter(),t.setScreenHeight(),t.itemCount=r(t._screenHeight,n.listScreens,n.itemHeight),t.itemCount>o.total()&&(t.itemCount=o.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(n.itemHeight*o.total()),t.options.type=(o.group()||[]).length?"group":"flat","flat"===t.options.type?t.header.hide():t.header.show(),t.getter=t._getter(function(){t._renderItems(!0)}),t._onScroll=function(e,i){var n=t._listItems(t.getter);return t._fixedHeader(e,n(e,i))},t._renderItems=t._whenChanged(d(i,t._onScroll),u(t._reorderList(t._items,e.proxy(m,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight),t._calculateColumnsHeaderPadding()},_setHeight:function(e){var t,i,n=this.heightContainer;if(n?t=n.offsetHeight:n=this.heightContainer=s(this.content[0],R),e!==t)for(n.innerHTML="";e>0;)i=Math.min(e,25e4),s(n).style.height=i+"px",e-=i},_getter:function(){var e=null,t=this.dataSource,i=t.skip(),n=this.options.type,o=this.itemCount,r={};return t.pageSize()<o&&this.mute(function(){t.pageSize(o)}),function(s,a){var l,c,d,u,h,p,f,m,g=this;if(t.inRange(a,o)){if(i!==a&&this.mute(function(){t.range(a,o),i=a}),"group"===n){if(!r[a])for(c=r[a]=[],d=t.view(),u=0,h=d.length;u<h;u++)for(p=d[u],f=0,m=p.items.length;f<m;f++)c.push({item:p.items[f],group:p.value});l=r[a][s-a]}else l=t.view()[s-a];return l}return e!==a&&(e=a,i=a,g._getterDeferred&&g._getterDeferred.reject(),g._getterDeferred=g.deferredRange(a),g._getterDeferred.then(function(){var e=g._indexConstraint(g.content[0].scrollTop);g._getterDeferred=null,a<=e&&e<=a+o&&(g._fetching=!0,t.range(a,o))})),null}},_fixedHeader:function(e,t){var i,n,o=this.currentVisibleGroup,r=this.options.itemHeight,s=Math.floor((e-t.top)/r),a=t.items[s];return a&&a.item&&(i=a.group,i!==o&&(n=i||"",this.header.html(this.templates.fixedGroupTemplate(n)),this.currentVisibleGroup=i)),t},_itemMapper:function(e,t,i){var n,r,s=this.options.type,a=this.options.itemHeight,l=this._focusedIndex,c=!1,d=!1,u=!1,h=null,p=!1,f=this._valueGetter;if("group"===s&&(e&&(u=0===t||this._currentGroup&&this._currentGroup!==e.group,this._currentGroup=e.group),h=e?e.group:null,e=e?e.item:null),"dataItem"===this.options.mapValueTo&&this._selectedDataItems.length&&e){for(n=0;n<this._selectedDataItems.length;n++)if(p=f(this._selectedDataItems[n])===f(e)){c=!0;break}}else if(!this.isFiltered()&&i.length&&e)for(r=0;r<i.length;r++)if(p=o(e)?i[r]===e:i[r]===f(e)){i.splice(r,1),c=!0;break}return l===t&&(d=!0),{item:e?e:null,group:h,newGroup:u,selected:c,current:d,index:t,top:t*a}},_range:function(e){var t,i,n,o=this.itemCount,r=this._values.slice(),s=[];for(this._view={},this._currentGroup=null,i=e,n=e+o;i<n;i++)t=this._itemMapper(this.getter(i,e),i,r),s[s.length-1]&&(s[s.length-1].isLastGroupedItem=t.newGroup),s.push(t),this._view[t.index]=t;return this._dataView=s,s},_getDataItemsCollection:function(e,t){var i=this._range(this._listIndex(e,t));return{index:i.length?i[0].index:0,top:i.length?i[0].top:0,items:i}},_listItems:function(){var t=this._screenHeight,i=this.options,n=c(i,t);return e.proxy(function(e,t){var i=this.result,o=this._lastScrollTop;return!t&&i&&n(i,e,o)||(i=this._getDataItemsCollection(e,o)),this._lastScrollTop=e,this.result=i,i},this)},_whenChanged:function(e,t){var i;return function(n){var o=e(n);o!==i&&(i=o,t(o,n))}},_reorderList:function(t,i){var n=this,o=t.length,r=-(1/0);return i=e.proxy(p(i,this.templates),this),function(e,s,a){var l,c,d=s-r;a||Math.abs(d)>=o?(l=t,c=e):(l=f(t,d),c=d>0?e.slice(-d):e.slice(0,-d)),i(l,c,n.bound()),r=s}},_bufferSizes:function(){var e=this.options;return l(this._screenHeight,e.listScreens,e.oppositeBuffer)},_indexConstraint:function(e){var t=this.itemCount,i=this.options.itemHeight,n=this.dataSource.total();return Math.min(Math.max(n-t,0),Math.max(0,Math.floor(e/i)))},_listIndex:function(e,t){var i,n=this._bufferSizes();return i=e-(e>t?n.down:n.up),this._indexConstraint(i)},_selectable:function(){this.options.selectable&&(this._selectProxy=e.proxy(this,"_clickHandler"),this.element.on(H+U,"."+I,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,i,n,o=[];if("function"==typeof e)for(t=this.dataSource.flatView(),i=0;i<t.length;i++)if(e(t[i])){o.push(i);break}return"number"==typeof e&&o.push(e),n=this.getElementIndex(e),isNaN(n)||o.push(n),e instanceof Array&&(o=e),o},_deselect:function(i){var n,r,s,a,l,c,d,u=[],h=this._selectedIndexes,p=this._selectedDataItems,f=0,m=this.options.selectable,g=0,v=this._valueGetter,_=null;if(i=i.slice(),m!==!0&&i.length){if("multiple"===m)for(c=0;c<i.length;c++){if(_=null,f=e.inArray(i[c],h),r=this.dataItemByIndex(i[c]),f===-1&&r)for(d=0;d<p.length;d++)a=o(r)?p[d]===r:v(p[d])===v(r),a&&(s=this._getElementByIndex(i[c]),_=this._deselectSingleItem(s,d,i[c],g));else n=h[f],n!==t&&(s=this._getElementByIndex(n),_=this._deselectSingleItem(s,f,n,g));_&&(i.splice(c,1),u.push(_),g++,c--)}}else{for(l=0;l<h.length;l++)h[l]!==t?this._getElementByIndex(h[l]).removeClass(P):p[l]&&this._getElementByDataItem(p[l]).removeClass(P),u.push({index:h[l],position:l,dataItem:p[l]});this._values=[],this._selectedDataItems=[],this._selectedIndexes=[]}return{indices:i,removed:u}},_deselectSingleItem:function(e,t,i,n){var o;if(e.hasClass("k-state-selected"))return e.removeClass(P),this._values.splice(t,1),this._selectedIndexes.splice(t,1),o=this._selectedDataItems.splice(t,1)[0],{index:i,position:t+n,dataItem:o}},_deselectCurrentValues:function(t){var i,n,o,r,s=this.element[0].children,a=this._values,l=[],c=0;if("multiple"!==this.options.selectable||!this.isFiltered())return[];if(t[0]===-1)return e(s).removeClass("k-state-selected"),l=e.map(this._selectedDataItems.slice(0),function(e,t){return{dataItem:e,position:t}}),this._selectedIndexes=[],this._selectedDataItems=[],this._values=[],l;for(;c<t.length;c++){for(o=-1,n=t[c],this.dataItemByIndex(n)&&(i=this._valueGetter(this.dataItemByIndex(n))),r=0;r<a.length;r++)if(i==a[r]){o=r;break}o>-1&&(l.push(this.removeAt(o)),e(s[n]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var i=e<t?1:Math.floor(e/t)+1;return(i-1)*t},_select:function(t){var i,n,r=this,s="multiple"!==this.options.selectable,a=this.dataSource,l=this.itemCount,c=this._valueGetter,d=[];return s&&(r._selectedIndexes=[],r._selectedDataItems=[],r._values=[]),n=a.skip(),e.each(t,function(e,t){var s=r._getSkip(t,l);r.mute(function(){a.range(s,l),i=r._findDataItem(a.view(),[t-s]),r._selectedIndexes.push(t),r._selectedDataItems.push(i),r._values.push(o(i)?i:c(i)),d.push({index:t,dataItem:i}),r._getElementByIndex(t).addClass(P),a.range(n,l)})}),r._values=r._checkValuesOrder(r._values),d},_clickHandler:function(t){var i=e(t.currentTarget);!t.isDefaultPrevented()&&i.attr("data-uid")&&this.trigger(H,{item:i})},_buildValueGetter:function(){this._valueGetter=b.getter(this.options.dataValueField)},_calculateGroupPadding:function(e){var t=this.items().first(),i=this.header,n=0;i[0]&&"none"!==i[0].style.display&&("auto"!==e&&(n=b.support.scrollbar()),n+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("right"),10),i.css("padding-right",n))},_calculateColumnsHeaderPadding:function(){var e,t,i,n;this.options.columns&&this.options.columns.length&&(e=b.support.isRtl(this.wrapper),t=b.support.scrollbar(),i=this.content.parent().parent().find(".k-grid-header"),n=this.dataSource.total(),i.css(e?"padding-left":"padding-right",n?t:0))}});b.ui.VirtualList=q,b.ui.plugin(q)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.autocomplete.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function i(e,t,i){return i?t.substring(0,e).split(i).length-1:0}function n(e,t,n){return t.split(n)[i(e,t,n)]}function o(e,t,n,o,r){var s=t.split(o);return s.splice(i(e,t,o),1,n),o&&""!==s[s.length-1]&&s.push(""),s.join(r)}var r=window.kendo,s=r.support,a=r.caret,l=r._activeElement,c=s.placeholder,d=r.ui,u=d.List,h=r.keys,p=r.data.DataSource,f="aria-disabled",m="aria-readonly",g="change",v="k-state-default",_="disabled",b="readonly",w="k-state-focused",y="k-state-selected",k="k-state-disabled",x="k-state-hover",C=".kendoAutoComplete",S="mouseenter"+C+" mouseleave"+C,T=e.proxy,D=u.extend({init:function(t,i){var n,o,s=this;s.ns=C,i=e.isArray(i)?{dataSource:i}:i,u.fn.init.call(s,t,i),t=s.element,i=s.options,i.placeholder=i.placeholder||t.attr("placeholder"),c&&t.attr("placeholder",i.placeholder),s._wrapper(),s._loader(),s._clearButton(),s._dataSource(),s._ignoreCase(),t[0].type="text",n=s.wrapper,s._popup(),t.addClass("k-input").on("keydown"+C,T(s._keydown,s)).on("keypress"+C,T(s._keypress,s)).on("input"+C,T(s._search,s)).on("paste"+C,T(s._search,s)).on("focus"+C,function(){s._prev=s._accessor(),s._oldText=s._prev,s._placeholder(!1),n.addClass(w)}).on("focusout"+C,function(){s._change(),s._placeholder(),s.close(),n.removeClass(w)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),s._clear.on("click"+C+" touchend"+C,T(s._clearValue,s)),s._enable(),s._old=s._accessor(),t[0].id&&t.attr("aria-owns",s.ul[0].id),s._aria(),s._placeholder(),s._initList(),o=e(s.element).parents("fieldset").is(":disabled"),o&&s.enable(!1),s.listView.bind("click",function(e){e.preventDefault()}),s._resetFocusItemHandler=e.proxy(s._resetFocusItem,s),r.notify(s),s._toggleCloseVisibility()},options:{name:"AutoComplete",enabled:!0,suggest:!1,template:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",dataTextField:"",minLength:1,enforceMinLength:!1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{},virtual:!1,value:null,clearButton:!0,autoWidth:!1},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=T(e._showBusy,e),e._errorHandler=T(e._hideBusy,e)),e.dataSource=p.create(e.options.dataSource).bind("progress",e._progressHandler).bind("error",e._errorHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.listView.setDataSource(this.dataSource)},events:["open","close",g,"select","filtering","dataBinding","dataBound"],setOptions:function(e){var t=this._listOptions(e);u.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._clearButton()},_listOptions:function(t){var i=u.fn._listOptions.call(this,e.extend(t,{skipUpdateOnBind:!0}));return i.dataValueField=i.dataTextField,i.selectedItemChange=null,i},_editable:function(e){var t=this,i=t.element,n=t.wrapper.off(C),o=e.readonly,r=e.disable;o||r?(n.addClass(r?k:v).removeClass(r?v:k),i.attr(_,r).attr(b,o).attr(f,r).attr(m,o)):(n.addClass(v).removeClass(k).on(S,t._toggleHover),i.removeAttr(_).removeAttr(b).attr(f,!1).attr(m,!1))},close:function(){var e=this,t=e.listView.focus();t&&t.removeClass(y),e.popup.close()},destroy:function(){var e=this;e.element.off(C),e._clear.off(C),e.wrapper.off(C),u.fn.destroy.call(e)},refresh:function(){this.listView.refresh()},select:function(e){this._select(e)},search:function(t){var i,o=this,r=o.options,s=r.ignoreCase,l=o._separator();t=t||o._accessor(),clearTimeout(o._typingTimeout),l&&(t=n(a(o.element)[0],t,l)),i=t.length,(!r.enforceMinLength&&!i||i>=r.minLength)&&(o._open=!0,o._mute(function(){this.listView.value([])}),o._filterSource({value:s?t.toLowerCase():t,operator:r.filter,field:r.dataTextField,ignoreCase:s}),o.one("close",e.proxy(o._unifySeparators,o))),o._toggleCloseVisibility()},suggest:function(e){var n,o=this,r=o._last,s=o._accessor(),c=o.element[0],d=a(c)[0],p=o._separator(),f=s.split(p),m=i(d,s,p),g=d;return r==h.BACKSPACE||r==h.DELETE?(o._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=o.dataSource.view()[u.inArray(e[0],o.ul[0])]),e=e?o._text(e):""),d<=0&&(d=s.toLowerCase().indexOf(e.toLowerCase())+1),n=s.substring(0,d).lastIndexOf(p),n=n>-1?d-(n+p.length):d,s=f[m].substring(0,n),e&&(e=""+e,n=e.toLowerCase().indexOf(s.toLowerCase()),n>-1&&(e=e.substring(n+s.length),g=d+e.length,s+=e),p&&""!==f[f.length-1]&&f.push("")),f[m]=s,o._accessor(f.join(p||"")),c===l()&&a(c,d,g),t)},value:function(e){return e===t?this._accessor():(this.listView.value(e),this._accessor(e),this._old=this._accessor(),this._oldText=this._accessor(),this._toggleCloseVisibility(),t)},_click:function(e){var i=e.item,n=this,o=n.element,r=n.listView.dataItemByIndex(n.listView.getElementIndex(i));return e.preventDefault(),n._active=!0,n.trigger("select",{dataItem:r,item:i})?(n.close(),t):(n._oldText=o.val(),n._select(i).done(function(){n._blur(),a(o,o.val().length)}),t)},_clearText:e.noop,_resetFocusItem:function(){var e=this.options.highlightFirst?0:-1;this.options.virtual&&this.listView.scrollTo(0),this.listView.focus(e)},_listBound:function(){var e,i=this,n=i.popup,o=i.options,r=i.dataSource.flatView(),s=r.length,a=i.dataSource._group.length,c=i.element[0]===l();i._renderFooter(),i._renderNoData(),i._toggleNoData(!s),i._toggleHeader(!!a&&!!s),i._resizePopup(),n.position(),s&&o.suggest&&c&&i.suggest(r[0]),i._open&&(i._open=!1,e=i._allowOpening()?"open":"close",i._typingTimeout&&!c&&(e="close"),s&&(i._resetFocusItem(),o.virtual&&i.popup.unbind("activate",i._resetFocusItemHandler).one("activate",i._resetFocusItemHandler)),n[e](),i._typingTimeout=t),i._touchScroller&&i._touchScroller.reset(),i._hideBusy(),i._makeUnselectable(),i.trigger("dataBound")},_mute:function(e){this._muted=!0,e.call(this),this._muted=!1},_listChange:function(){var e=this._active||this.element[0]===l();e&&!this._muted&&this._selectValue(this.listView.selectedDataItems()[0])},_selectValue:function(e){var t=this._separator(),i="";e&&(i=this._text(e)),null===i&&(i=""),t&&(i=o(a(this.element)[0],this._accessor(),i,t,this._defaultSeparator())),this._prev=i,this._accessor(i),this._placeholder()},_unifySeparators:function(){return this._accessor(this.value().split(this._separator()).join(this._defaultSeparator())),this},_preselect:function(e,t){this._inputValue(t),this._accessor(e),this._old=this.oldText=this._accessor(),this.listView.setValue(e),this._placeholder()},_change:function(){var e=this,t=e._unifySeparators().value(),i=t!==u.unifyType(e._old,typeof t),n=i&&!e._typing,o=e._oldText!==t;e._old=t,e._oldText=t,(n||o)&&e.element.trigger(g),i&&e.trigger(g),e.typing=!1,e._toggleCloseVisibility()},_accessor:function(e){var i=this,n=i.element[0];return e===t?(e=n.value,n.className.indexOf("k-readonly")>-1&&e===i.options.placeholder?"":e):(n.value=null===e?"":e,i._placeholder(),t)},_keydown:function(e){var t,i,n=this,o=e.keyCode,r=n.listView,s=n.popup.visible(),a=r.focus();if(n._last=o,o===h.DOWN)s?this._move(a?"focusNext":"focusFirst"):n.value()&&n._filterSource({value:n.ignoreCase?n.value().toLowerCase():n.value(),operator:n.options.filter,field:n.options.dataTextField,ignoreCase:n.ignoreCase}).done(function(){n._resetFocusItem(),n.popup.open()}),e.preventDefault();else if(o===h.UP)s&&this._move(a?"focusPrev":"focusLast"),e.preventDefault();else if(o===h.HOME)this._move("focusFirst");else if(o===h.END)this._move("focusLast");else if(o===h.ENTER||o===h.TAB){if(o===h.ENTER&&s&&e.preventDefault(),s&&a){if(t=r.dataItemByIndex(r.getElementIndex(a)),n.trigger("select",{dataItem:t,item:a
}))return;this._select(a)}this._blur()}else o===h.ESC?(s?e.preventDefault():n._clearValue(),n.close()):!n.popup.visible()||o!==h.PAGEDOWN&&o!==h.PAGEUP?(n.popup._hovered=!0,n._search()):(e.preventDefault(),i=o===h.PAGEDOWN?1:-1,r.scrollWith(i*r.screenHeight()))},_keypress:function(){this._oldText=this.element.val(),this._typing=!0},_move:function(e){this.listView[e](),this.options.suggest&&this.suggest(this.listView.focus())},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._loading.hide(),e.element.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(){var e=this;e._busy||(e._busy=setTimeout(function(){e.element.attr("aria-busy",!0),e._loading.show(),e._hideClear()},100))},_placeholder:function(e){if(!c){var i,n=this,o=n.element,r=n.options.placeholder;if(r){if(i=o.val(),e===t&&(e=!i),e||(r=i!==r?i:""),i===n._old&&!e)return;o.toggleClass("k-readonly",e).val(r),r||o[0]!==document.activeElement||a(o[0],0,0)}}},_separator:function(){var e=this.options.separator;return e instanceof Array?RegExp(e.join("|"),"gi"):e},_defaultSeparator:function(){var e=this.options.separator;return e instanceof Array?e[0]:e},_inputValue:function(){return this.element.val()},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())},e.options.delay)},_select:function(e){var t=this;return t._active=!0,t.listView.select(e).done(function(){t._active=!1})},_loader:function(){this._loading=e('<span class="k-icon k-i-loading" style="display:none"></span>').insertAfter(this.element)},_clearButton:function(){u.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.element),this.wrapper.addClass("k-autocomplete-clearable"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_toggleCloseVisibility:function(){this.value()?this._showClear():this._hideClear()},_wrapper:function(){var e,t=this,i=t.element,n=i[0];e=i.parent(),e.is("span.k-widget")||(e=i.wrap("<span />").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=n.style.cssText,i.css({width:"",height:n.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(n.className)}});d.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function i(e,t,i){for(var n,o=0,r=t.length-1;o<r;++o)n=t[o],n in e||(e[n]={}),e=e[n];e[t[r]]=i}function n(e,t){return e>=t&&(e-=t),e}function o(e,t){for(var i=0;i<e.length;i++)if(e.charAt(i)!==t)return!1;return!0}var r=window.kendo,s=r.ui,a=s.List,l=s.Select,c=r.support,d=r._activeElement,u=r.data.ObservableObject,h=r.keys,p=".kendoDropDownList",f=p+"FocusEvent",m="disabled",g="readonly",v="change",_="k-state-focused",b="k-state-default",w="k-state-disabled",y="aria-disabled",k="click"+p+" touchend"+p,x="mouseenter"+p+" mouseleave"+p,C="tabindex",S="filter",T="accept",D="The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",A=e.proxy,E=l.extend({init:function(i,n){var o,s,a,c=this,d=n&&n.index;c.ns=p,n=e.isArray(n)?{dataSource:n}:n,l.fn.init.call(c,i,n),n=c.options,i=c.element.on("focus"+p,A(c._focusHandler,c)),c._focusInputHandler=e.proxy(c._focusInput,c),c.optionLabel=e(),c._optionLabel(),c._inputTemplate(),c._reset(),c._prev="",c._word="",c._wrapper(),c._tabindex(),c.wrapper.data(C,c.wrapper.attr(C)),c._span(),c._popup(),c._mobile(),c._dataSource(),c._ignoreCase(),c._filterHeader(),c._aria(),c.wrapper.attr("aria-live","polite"),c._enable(),c._attachFocusHandlers(),c._oldIndex=c.selectedIndex=-1,d!==t&&(n.index=d),c._initialIndex=n.index,c.requireValueMapper(c.options),c._initList(),c._cascade(),c.one("set",function(e){!e.sender.listView.bound()&&c.hasOptionLabel()&&c._textAccessor(c._optionLabelText())}),n.autoBind?c.dataSource.fetch():c.selectedIndex===-1&&(s=n.text||"",s||(o=n.optionLabel,o&&0===n.index?s=o:c._isSelect&&(s=i.children(":selected").text())),c._textAccessor(s)),a=e(c.element).parents("fieldset").is(":disabled"),a&&c.enable(!1),c.listView.bind("click",function(e){e.preventDefault()}),r.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",autoWidth:!1},events:["open","close",v,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){l.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.hasOptionLabel()&&this.select(0)},destroy:function(){var e=this;l.fn.destroy.call(e),e.wrapper.off(p),e.wrapper.off(f),e.element.off(p),e._inputWrapper.off(p),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off(),e.filterInput&&e.filterInput.off(f)},open:function(){var e=this,t=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0;e.popup.visible()||(e.listView.bound()&&e._state!==T?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.popup.open(),e._resizeFilterInput(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e.filterInput&&1!==e.options.minLength&&!t?(e.refresh(),e.popup.one("activate",e._focusInputHandler),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e,t,i=this.filterInput,n=this._prevent;i&&(e=this.filterInput[0]===d(),t=r.caret(this.filterInput[0])[0],this._prevent=!0,i.css("display","none").css("width",this.popup.element.css("width")).css("display","inline-block"),e&&(i.focus(),r.caret(i[0],t)),this._prevent=n)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||l.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var i;return e===t?(i=this.listView.focus(),!i&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:i):(this._focus(e),t)},dataItem:function(i){var n=this,o=null;if(null===i)return i;if(i===t)o=n.listView.selectedDataItems()[0];else{if("number"!=typeof i){if(n.options.virtual)return n.dataSource.getByUid(e(i).data("uid"));i=i.hasClass("k-list-optionlabel")?-1:e(n.items()).index(i)}else n.hasOptionLabel()&&(i-=1);o=n.dataSource.flatView()[i]}return o||(o=n._optionLabelDataItem()),o},refresh:function(){this.listView.refresh()},text:function(e){var i,n=this,o=n.options.ignoreCase;return e=null===e?"":e,e===t?n._textAccessor():"string"!=typeof e?(n._textAccessor(e),t):(i=o?e.toLowerCase():e,n._select(function(e){return e=n._text(e),o&&(e=(e+"").toLowerCase()),e===i}).done(function(){n._textAccessor(n.dataItem()||e)}),t)},_clearFilter:function(){e(this.filterInput).val(""),l.fn._clearFilter.call(this)},value:function(e){var i=this,n=i.listView,o=i.dataSource;return e===t?(e=i._accessor()||i.listView.value()[0],e===t||null===e?"":e):(i.requireValueMapper(i.options,e),!e&&i.hasOptionLabel()||(i._initialIndex=null),this.trigger("set",{value:e}),i._request&&i.options.cascadeFrom&&i.listView.bound()?(i._valueSetter&&o.unbind(v,i._valueSetter),i._valueSetter=A(function(){i.value(e)},i),o.one(v,i._valueSetter),t):(i._isFilterEnabled()&&n.bound()&&n.isFiltered()?i._clearFilter():i._fetchData(),n.value(e).done(function(){i._old=i._accessor(),i._oldIndex=i.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var i=this,n=i.options,o=n.optionLabel,s=n.optionLabelTemplate;return o?(s||(s="#:",s+="string"==typeof o?"data":r.expr(n.dataTextField,"data"),s+="#"),"function"!=typeof s&&(s=r.template(s)),i.optionLabelTemplate=s,i.hasOptionLabel()||(i.optionLabel=e('<div class="k-list-optionlabel"></div>').prependTo(i.list)),i.optionLabel.html(s(o)).off().on(k,A(i._click,i)).on(x,i._toggleHover),i.angular("compile",function(){return{elements:i.optionLabel,data:[{dataItem:i._optionLabelDataItem()}]}}),t):(i.optionLabel.off().remove(),i.optionLabel=e(),t)},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_optionLabelDataItem:function(){var i=this,n=i.options.optionLabel;return i.hasOptionLabel()?e.isPlainObject(n)?new u(n):i._assignInstance(i._optionLabelText(),""):t},_buildOptions:function(e){var i,n,o,r=this;r._isSelect&&(i=r.listView.value()[0],n=r._optionLabelDataItem(),o=n&&r._value(n),i!==t&&null!==i||(i=""),n&&(o!==t&&null!==o||(o=""),n='<option value="'+o+'">'+r._text(n)+"</option>"),r._options(e,n,i),i!==a.unifyType(r._accessor(),typeof i)&&(r._customOption=null,r._custom(i)))},_listBound:function(){var e,t=this,i=t._initialIndex,n=t._state===S,o=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!o.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(o),t._makeUnselectable(),n||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(o.length?(!t.listView.value().length&&i>-1&&null!==i&&t.select(i),t._initialIndex=null,e=t.listView.selectedDataItems()[0],e&&t.text()!==t._text(e)&&t._selectValue(e)):t._textAccessor()!==t._optionLabelText()&&(t.listView.value(""),t._selectValue(null),t._oldIndex=t.selectedIndex))),t._hideBusy(),t.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_attachFocusHandlers:function(){var e=this,t=e.wrapper;t.on("focusin"+f,A(e._focusinHandler,e)).on("focusout"+f,A(e._focusoutHandler,e)),e.filterInput&&e.filterInput.on("focusin"+f,A(e._focusinHandler,e)).on("focusout"+f,A(e._focusoutHandler,e))},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(_),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),c.mobileOS.ios&&t?e._change():e._blur(),e._inputWrapper.removeClass(_),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._prevent=!1,this._toggle()},_editable:function(e){var t=this,i=t.element,n=e.disable,o=e.readonly,s=t.wrapper.add(t.filterInput).off(p),a=t._inputWrapper.off(x);o||n?n?(s.removeAttr(C),a.addClass(w).removeClass(b)):a.addClass(b).removeClass(w):(i.removeAttr(m).removeAttr(g),a.addClass(b).removeClass(w).on(x,t._toggleHover),s.attr(C,s.data(C)).attr(y,!1).on("keydown"+p,A(t._keydown,t)).on(r.support.mousedown+p,A(t._wrapperMousedown,t)).on("paste"+p,A(t._filterPaste,t)),t.wrapper.on("click"+p,A(t._wrapperClick,t)),t.filterInput?s.on("input"+p,A(t._search,t)):s.on("keypress"+p,A(t._keypress,t))),i.attr(m,n).attr(g,o),s.attr(y,n)},_keydown:function(e){var i,n,o,r=this,s=e.keyCode,a=e.altKey,l=r.popup.visible();if(r.filterInput&&(i=r.filterInput[0]===d()),s===h.LEFT?(s=h.UP,n=!0):s===h.RIGHT&&(s=h.DOWN,n=!0),!n||!i){if(e.keyCode=s,(a&&s===h.UP||s===h.ESC)&&r._focusElement(r.wrapper),r._state===S&&s===h.ESC&&(r._clearFilter(),r._open=!1,r._state=T),s===h.ENTER&&r._typingTimeout&&r.filterInput&&l)return e.preventDefault(),t;if(s!==h.SPACEBAR||i||(r.toggle(!l),e.preventDefault()),n=r._move(e),!n){if((!l||!r.filterInput)&&(o=r._focus(),s===h.HOME?(n=!0,r._firstItem()):s===h.END&&(n=!0,r._lastItem()),n)){if(r.trigger("select",{dataItem:r._getElementDataItem(r._focus()),item:r._focus()}))return r._focus(o),t;r._select(r._focus(),!0).done(function(){l||r._blur()}),e.preventDefault()}a||n||!r.filterInput||r._search()}}},_matchText:function(e,i){var n=this.options.ignoreCase;return e!==t&&null!==e&&(e+="",n&&(e=e.toLowerCase()),0===e.indexOf(i))},_shuffleData:function(e,t){var i=this._optionLabelDataItem();return i&&(e=[i].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e,t,i,r=this,s=r.dataSource.flatView(),a=s.length+(r.hasOptionLabel()?1:0),l=o(r._word,r._last),c=r.selectedIndex;for(c===-1?c=0:(c+=l?1:0,c=n(c,a)),s=s.toJSON?s.toJSON():s.slice(),s=r._shuffleData(s,c),i=0;i<a&&(t=r._text(s[i]),!l||!r._matchText(t,r._last))&&!r._matchText(t,r._word);i++);i!==a&&(e=r._focus(),r._select(n(c+i,a)).done(function(){var t=function(){r.popup.visible()||r._change()};r.trigger("select",{dataItem:r._getElementDataItem(r._focus()),item:r._focus()})?r._select(e).done(t):t()}))},_keypress:function(e){var t,i=this;0!==e.which&&e.keyCode!==r.keys.ENTER&&(t=String.fromCharCode(e.charCode||e.keyCode),i.options.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),i._word+=t,i._last=t,i._search())},_popupOpen:function(){var e=this.popup;e.wrapper=r.wrap(e.element),e.element.closest(".km-root")[0]&&(e.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){l.fn._popup.call(this),this.popup.one("open",A(this._popupOpen,this))},_getElementDataItem:function(e){return e&&e[0]?e[0]===this.optionLabel[0]?this._optionLabelDataItem():this.listView.dataItemByIndex(this.listView.getElementIndex(e)):null},_click:function(i){var n=this,o=i.item||e(i.currentTarget);return i.preventDefault(),n.trigger("select",{dataItem:n._getElementDataItem(o),item:o})?(n.close(),t):(n._userTriggered=!0,n._select(o).done(function(){n._focusElement(n.wrapper),n._blur()}),t)},_focusElement:function(e){var t=d(),i=this.wrapper,n=this.filterInput,o=e===n?i:n,r=c.mobileOS&&(c.touch||c.MSPointers||c.pointers);n&&n[0]===e[0]&&r||n&&(o[0]===t||this._focusFilter)&&(this._focusFilter=!1,this._prevent=!0,this._focused=e.focus())},_searchByWord:function(e){var t,i;e&&(t=this,i=t.options.ignoreCase,i&&(e=e.toLowerCase()),t._select(function(i){return t._matchText(t._text(i),e)}))},_inputValue:function(){return this.text()},_search:function(){var e=this,i=e.dataSource;if(clearTimeout(e._typingTimeout),e._isFilterEnabled())e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t),e._resizeFilterInput()),e._typingTimeout=null},e.options.delay);else{if(e._typingTimeout=setTimeout(function(){e._word=""},e.options.delay),!e.listView.bound())return i.fetch().done(function(){e._selectNext()}),t;e._selectNext()}},_get:function(t){var i,n,o,r="function"==typeof t,s=r?e():e(t);if(this.hasOptionLabel()&&("number"==typeof t?t>-1&&(t-=1):s.hasClass("k-list-optionlabel")&&(t=-1)),r){for(i=this.dataSource.flatView(),o=0;o<i.length;o++)if(t(i[o])){t=o,n=!0;break}n||(t=-1)}return t},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){this.optionLabel.hasClass("k-state-focused")?(this._resetOptionLabel(),this.listView.focusFirst()):this.listView.focusNext()},_prevItem:function(){this.optionLabel.hasClass("k-state-focused")||(this.listView.focusPrev(),this.listView.focus()||this._focus(this.optionLabel))},_focusItem:function(){var e=this.options,i=this.listView,n=i.focus(),o=i.select();o=o[o.length-1],o===t&&e.highlightFirst&&!n&&(o=0),o!==t?i.focus(o):!e.optionLabel||e.virtual&&"dataItem"===e.virtual.mapValueTo?i.scrollToIndex(0):(this._focus(this.optionLabel),this._select(this.optionLabel),this.listView.content.scrollTop(0))},_resetOptionLabel:function(e){this.optionLabel.removeClass("k-state-focused"+(e||"")).removeAttr("id")},_focus:function(e){var i=this.listView,n=this.optionLabel;return e===t?(e=i.focus(),!e&&n.hasClass("k-state-focused")&&(e=n),e):(this._resetOptionLabel(),e=this._get(e),i.focus(e),e===-1&&(n.addClass("k-state-focused").attr("id",i._optionID),this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant",i._optionID)),t)},_select:function(e,t){var i=this;return e=i._get(e),i.listView.select(e).done(function(){t||i._state!==S||(i._state=T),e===-1&&i._selectValue(null)})},_selectValue:function(e){var i=this,n=i.options.optionLabel,o=i.listView.select(),r="",s="";o=o[o.length-1],o===t&&(o=-1),this._resetOptionLabel(" k-state-selected"),e||0===e?(s=e,r=i._dataValue(e),n&&(o+=1)):n&&(i._focus(i.optionLabel.addClass("k-state-selected")),s=i._optionLabelText(),r="string"==typeof n?"":i._value(n),o=0),i.selectedIndex=o,null===r&&(r=""),i._textAccessor(s),i._accessor(r,o),i._triggerCascade()},_mobile:function(){var e=this,t=e.popup,i=c.mobileOS,n=t.element.parents(".km-root").eq(0);n.length&&i&&(t.options.animation.open.effects=i.android||i.meego?"fadeIn":i.ios||i.wp?"slideIn:up":t.options.animation.open.effects)},_filterHeader:function(){var t;this.filterInput&&(this.filterInput.off(p).parent().remove(),this.filterInput=null),this._isFilterEnabled()&&(t='<span class="k-icon k-i-zoom"></span>',this.filterInput=e('<input class="k-textbox"/>').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),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,i=this,n=i.wrapper,o="span.k-input";t=n.find(o),t[0]||(n.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(i.element),t=n.find(o)),i.span=t,i._inputWrapper=e(n[0].firstChild),i._arrow=n.find(".k-select"),i._arrowIcon=i._arrow.find(".k-icon")},_wrapper:function(){var e,t=this,i=t.element,n=i[0];e=i.parent(),e.is("span.k-widget")||(e=i.wrap("<span />").parent(),e[0].style.cssText=n.style.cssText,e[0].title=n.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(n.className).css("display","").attr({accesskey:i.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),i.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_inputTemplate:function(){var t=this,i=t.options.valueTemplate;if(i=i?r.template(i):e.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=i,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(n){throw Error(D)}},_textAccessor:function(i){var n,o=null,r=this.valueTemplate,s=this._optionLabelText(),a=this.span;if(i===t)return a.text();e.isPlainObject(i)||i instanceof u?o=i:s&&s===i&&(o=this.options.optionLabel),o||(o=this._assignInstance(i,this._accessor())),this.hasOptionLabel()&&(o!==s&&this._text(o)!==s||(r=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(o=s))),n=function(){return{elements:a.get(),data:[{dataItem:o}]}},this.angular("cleanup",n);try{a.html(r(o))}catch(l){a.html("")}this.angular("compile",n)},_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 n=this.options.dataTextField,o={};return n?(i(o,n.split("."),e),i(o,this.options.dataValueField.split("."),t),o=new u(o)):o=e,o}});s.plugin(E)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.treeview.draganddrop.min",["kendo.data.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui,o=e.proxy,r=e.extend,s="visibility",a="k-state-hover",l="input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right";n.HierarchicalDragAndDrop=i.Class.extend({init:function(t,s){this.element=t,this.hovered=t,this.options=r({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},s),this._draggable=new n.Draggable(t,{ignore:l,filter:s.filter,autoScroll:s.autoScroll,cursorOffset:{left:10,top:i.support.mobileOS?-40/i.support.zoomLevel():10},hint:o(this._hint,this),dragstart:o(this.dragstart,this),dragcancel:o(this.dragcancel,this),drag:o(this.drag,this),dragend:o(this.dragend,this),$angular:s.$angular})},_hint:function(e){return"<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />"+this.options.hintText(e)+"</div>"},_removeTouchHover:function(){i.support.touch&&this.hovered&&(this.hovered.find("."+a).removeClass(a),this.hovered=!1)},_hintStatus:function(i){var n=this._draggable.hint.find(".k-drag-status")[0];return i?(n.className="k-icon k-drag-status "+i,t):e.trim(n.className.replace(/(p|k)-(icon|drag-status)/g,""))},dragstart:function(t){this.source=t.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&t.preventDefault(),this.dropHint=this.options.reorderable?e("<div class='k-i-drag-and-drop' />").css(s,"hidden").appendTo(this.element):e()},drag:function(t){var n,o,r,l,c,d,u,h,p,f,m,g=this.options,v=this.source,_=this.dropTarget=e(i.eventTarget(t)),b=_.closest(g.allowedContainers);b.length?v[0]==_[0]||g.contains(v[0],_[0])?m="k-i-cancel":(m="k-i-insert-middle",p=g.itemFromTarget(_),n=p.item,n.length?(this._removeTouchHover(),o=i._outerHeight(n),l=p.content,g.reorderable?(c=o/(l.length>0?4:2),r=i.getOffset(n).top,d=t.y.location<r+c,u=r+o-c<t.y.location,h=l.length&&!d&&!u):(h=!0,d=!1,u=!1),this.hovered=!!h&&b,this.dropHint.css(s,h?"hidden":"visible"),this._lastHover&&this._lastHover[0]!=l[0]&&this._lastHover.removeClass(a),this._lastHover=l.toggleClass(a,h),h?m="k-i-plus":(f=n.position(),f.top+=d?0:o,this.dropHint.css(f)[d?"prependTo":"appendTo"](g.dropHintContainer(n)),d&&p.first&&(m="k-i-insert-up"),u&&p.last&&(m="k-i-insert-down"))):_[0]!=this.dropHint[0]&&(this._lastHover&&this._lastHover.removeClass(a),m=e.contains(this.element[0],b[0])?"k-i-cancel":"k-i-plus")):(m="k-i-cancel",this._removeTouchHover()),this.options.drag({originalEvent:t.originalEvent,source:v,target:_,pageY:t.y.location,pageX:t.x.location,status:m.substring(2),setStatus:function(e){m=e}}),0!==m.indexOf("k-i-insert")&&this.dropHint.css(s,"hidden"),this._hintStatus(m)},dragcancel:function(){this.dropHint.remove()},dragend:function(e){var i,n,o,r="over",l=this.source,c=this.dropHint,d=this.dropTarget;return"visible"==c.css(s)?(r=this.options.dropPositionFrom(c),i=c.closest(this.options.itemSelector)):d&&(i=d.closest(this.options.itemSelector),i.length||(i=d.closest(this.options.allowedContainers))),n={originalEvent:e.originalEvent,source:l[0],destination:i[0],valid:"k-i-cancel"!=this._hintStatus(),setValid:function(e){this.valid=e},dropTarget:d[0],position:r},o=this.options.drop(n),c.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(a),!n.valid||o?(this._draggable.dropped=n.valid,t):(this._draggable.dropped=!0,this.options.dragend({originalEvent:e.originalEvent,source:l,destination:i,position:r}),t)},destroy:function(){this._lastHover=this.hovered=null,this._draggable.destroy()}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.treeview.min",["kendo.data.min","kendo.treeview.draganddrop.min"],e)}(function(){return function(e,t){function i(e){return function(t){var i=t.children(".k-animation-container");return i.length||(i=t),i.children(e)}}function n(e){return p.template(e,{useWithBlock:!1})}function o(e){return e.find("> div .k-checkbox-wrapper [type=checkbox]")}function r(e){return function(t,i){i=i.closest(q);var n,o=i.parent();return o.parent().is("li")&&(n=o.parent()),this._dataSourceMove(t,o,n,function(t,n){var o=this.dataItem(i),r=o?o.parent().indexOf(o):i.index();return this._insert(t.data(),n,r+e)})}}function s(t,i){for(var n;t&&"ul"!=t.nodeName.toLowerCase();)n=t,t=t.nextSibling,3==n.nodeType&&(n.nodeValue=e.trim(n.nodeValue)),h.test(n.className)?i.insertBefore(n,i.firstChild):i.appendChild(n)}function a(t){var i=t.children("div"),n=t.children("ul"),o=i.children(".k-icon"),r=t.children(":checkbox"),a=i.children(".k-in");t.hasClass("k-treeview")||(i.length||(i=e("<div />").prependTo(t)),!o.length&&n.length?o=e("<span class='k-icon' />").prependTo(i):n.length&&n.children().length||(o.remove(),n.remove()),r.length&&e("<span class='k-checkbox-wrapper' />").appendTo(i).append(r),a.length||(a=t.children("a").eq(0).addClass("k-in k-link"),a.length||(a=e("<span class='k-in' />")),a.appendTo(i),i.length&&s(i[0].nextSibling,a[0])))}var l,c,d,u,h,p=window.kendo,f=p.ui,m=p.data,g=e.extend,v=p.template,_=e.isArray,b=f.Widget,w=m.HierarchicalDataSource,y=e.proxy,k=p.keys,x=".kendoTreeView",C=".kendoTreeViewTemp",S="select",T="check",D="navigate",A="expand",E="change",I="error",M="checked",R="indeterminate",F="collapse",P="dragstart",z="drag",B="drop",L="dragend",H="dataBound",N="click",O="undefined",V="k-state-hover",W="k-treeview",U=":visible",q=".k-item",j="string",G="aria-label",$="aria-selected",K="aria-disabled",Y="k-state-disabled",Q={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},X=function(e){return e instanceof p.jQuery||e instanceof window.jQuery},Z=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===j};c=i(".k-group"),d=i(".k-group,.k-content"),u=function(e){return e.children("div").children(".k-icon")},h=/k-sprite/,l=p.ui.DataBoundWidget.extend({init:function(e,t){var i,n=this,o=!1,r=t&&!!t.dataSource;_(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==O&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(n,e,t),e=n.element,t=n.options,i=e.is("ul")&&e||e.hasClass(W)&&e.children("ul"),o=!r&&i.length,o&&(t.dataSource.list=i),n._animation(),n._accessors(),n._templates(),e.hasClass(W)?(n.wrapper=e,n.root=e.children("ul").eq(0)):(n._wrapper(),i&&(n.root=e,n._group(n.wrapper))),n._tabindex(),n.root.attr("role","tree"),n._dataSource(o),n._attachEvents(),n._dragging(),o?n._syncHtmlAndDataSource():t.autoBind&&(n._progress(!0),n.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&n.updateIndeterminate(),n.element[0].id&&(n._ariaId=p.format("{0}_tv_active",n.element[0].id)),p.notify(n)},_attachEvents:function(){var t=this,i=".k-in:not(.k-state-selected,.k-state-disabled)",n="mouseenter";t.wrapper.on(n+x,".k-in.k-state-selected",function(e){e.preventDefault()}).on(n+x,i,function(){e(this).addClass(V)}).on("mouseleave"+x,i,function(){e(this).removeClass(V)}).on(N+x,i,y(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",y(t._toggleButtonClick,t)).on(N+x,".k-i-expand,.k-i-collapse",y(t._toggleButtonClick,t)).on("keydown"+x,y(t._keydown,t)).on("keypress"+x,y(t._keypress,t)).on("focus"+x,y(t._focus,t)).on("blur"+x,y(t._blur,t)).on("mousedown"+x,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",y(t._mousedown,t)).on("change"+x,".k-checkbox-wrapper :checkbox",y(t._checkboxChange,t)).on("click"+x,".checkbox-span",y(t._checkboxLabelClick,t)).on("click"+x,".k-request-retry",y(t._retryRequest,t)).on("click"+x,".k-link.k-state-disabled",function(e){e.preventDefault()}).on("click"+x,function(i){e(i.target).is(":kendoFocusable")||t.focus()})},_checkboxLabelClick:function(t){var i=e(t.target.previousSibling);i.is("[disabled]")||(i.prop("checked",!i.prop("checked")),i.trigger("change"))},_syncHtmlAndDataSource:function(e,t){e=e||this.root,t=t||this.dataSource;var i,n,r,s,a,l=t.view(),c=p.attr("uid"),d=p.attr("expanded"),u=this.options.checkboxes,h=e.children("li");for(i=0;i<h.length;i++)r=l[i],s=r.uid,n=h.eq(i),n.attr("role","treeitem").attr(c,s).attr($,n.hasClass("k-state-selected")),r.expanded="true"===n.attr(d),u&&(a=o(n),r.checked=a.prop(M),a.attr("id","_"+s),a.next(".k-checkbox-label").attr("for","_"+s)),this._syncHtmlAndDataSource(n.children("ul"),r.children)},_animation:function(){var e=this.options,t=e.animation,i=t.collapse&&"effects"in t.collapse,n=g({},t.expand,t.collapse);i||(n=g(n,{reverse:!0})),t===!1&&(t={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),t.collapse=g(n,{hide:!0}),e.animation=t},_dragging:function(){var t,i=this.options.dragAndDrop,n=this.dragging;i&&!n?(t=this,this.dragging=new f.HierarchicalDragAndDrop(this.element,{reorderable:!0,$angular:this.options.$angular,autoScroll:this.options.autoScroll,filter:"div:not(.k-state-disabled) .k-in",allowedContainers:".k-treeview",itemSelector:".k-treeview .k-item",hintText:y(this._hintText,this),contains:function(t,i){return e.contains(t,i)},dropHintContainer:function(e){return e},itemFromTarget:function(e){var t=e.closest(".k-top,.k-mid,.k-bot");return{item:t,content:e.closest(".k-in"),first:t.hasClass("k-top"),last:t.hasClass("k-bot")}},dropPositionFrom:function(e){return e.prevAll(".k-in").length>0?"after":"before"},dragstart:function(e){return t.trigger(P,{sourceNode:e[0]})},drag:function(e){t.trigger(z,{originalEvent:e.originalEvent,sourceNode:e.source[0],dropTarget:e.target[0],pageY:e.pageY,pageX:e.pageX,statusClass:e.status,setStatusClass:e.setStatus})},drop:function(i){var n=e(i.dropTarget),o=n.closest("a");return o&&o.attr("href")&&t._tempPreventNavigation(o),t.trigger(B,{originalEvent:i.originalEvent,sourceNode:i.source,destinationNode:i.destination,valid:i.valid,setValid:function(e){this.valid=e,i.setValid(e)},dropTarget:i.dropTarget,dropPosition:i.position})},dragend:function(e){function i(i){t.options.checkboxes&&t.options.checkboxes.checkChildren&&t.updateIndeterminate(),t.trigger(L,{originalEvent:e.originalEvent,sourceNode:i&&i[0],destinationNode:o[0],dropPosition:r})}var n=e.source,o=e.destination,r=e.position;"over"==r?t.append(n,o,i):("before"==r?n=t.insertBefore(n,o):"after"==r&&(n=t.insertAfter(n,o)),i(n))}})):!i&&n&&(n.destroy(),this.dragging=null)},_tempPreventNavigation:function(e){e.on(N+x+C,function(t){t.preventDefault(),e.off(N+x+C)})},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,i=y(e._fieldAccessor,e);t.template&&typeof t.template==j?t.template=v(t.template):t.template||(t.template=n("# var text = "+i("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e._checkboxes(),e.templates={wrapperCssClass:function(e,t){var i="k-item",n=t.index;return e.firstLevel&&0===n&&(i+=" k-first"),n==e.length-1&&(i+=" k-last"),i},cssClass:function(e,t){var i="",n=t.index,o=e.length-1;return e.firstLevel&&0===n&&(i+="k-top "),i+=0===n&&n!=o?"k-top":n==o?"k-bot":"k-mid"},textClass:function(e,t){var i="k-in";return t&&(i+=" k-link"),e.enabled===!1&&(i+=" k-state-disabled"),e.selected===!0&&(i+=" k-state-selected"),i},toggleButtonClass:function(e){var t="k-icon";return t+=e.expanded!==!0?" k-i-expand":" k-i-collapse"},groupAttributes:function(e){var t="";return e.firstLevel||(t="role='group'"),t+(e.expanded!==!0?" style='display:none'":"")},groupCssClass:function(e){var t="k-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:n("#= data.treeview.template(data) #"),group:n("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),itemContent:n("# var imageUrl = "+i("imageUrl")+"(data.item); ## var spriteCssClass = "+i("spriteCssClass")+"(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #' /># } ##= data.treeview.template(data) #"),
itemElement:n("# var item = data.item, r = data.r; ## var url = "+i("url")+"(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='#= r.toggleButtonClass(item) #'/># } ## if (data.treeview.checkboxes) { #<span class='k-checkbox-wrapper' role='presentation'>#= data.treeview.checkboxes.template(data) #</span># } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #</#=tag#></div>"),item:n("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #' "+p.attr("uid")+"='#= item.uid #' aria-selected='#= item.selected ? \"true\" : \"false\" #' #=item.enabled === false ? \"aria-disabled='true'\" : ''## if (item.expanded) { #data-expanded='true' aria-expanded='true'# } #>#= r.itemElement(data) #</li>"),loading:n("<div class='k-icon k-i-loading' /> #: data.messages.loading #"),retry:n("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(t){var i=this.options;i.dataSource=t,this._dataSource(),i.checkboxes&&i.checkboxes.checkChildren&&this.dataSource.one("change",e.proxy(this.updateIndeterminate,this,null)),this.options.autoBind&&this.dataSource.fetch()},_bindDataSource:function(){this._refreshHandler=y(this.refresh,this),this._errorHandler=y(this._error,this),this.dataSource.bind(E,this._refreshHandler),this.dataSource.bind(I,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(E,this._refreshHandler),e.unbind(I,this._errorHandler))},_dataSource:function(e){function t(e){for(var i=0;i<e.length;i++)e[i]._initChildren(),e[i].children.fetch(),t(e[i].children.view())}var i=this,n=i.options,o=n.dataSource;o=_(o)?{data:o}:o,i._unbindDataSource(),o.fields||(o.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),i.dataSource=o=w.create(o),e&&(o.fetch(),t(o.view())),i._bindDataSource()},events:[P,z,B,L,H,A,F,S,E,D,T],options:{name:"TreeView",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:100}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},dragAndDrop:!1,checkboxes:!1,autoBind:!0,autoScroll:!1,loadOnDemand:!0,template:"",dataTextField:null},_accessors:function(){var e,t,i,n=this,o=n.options,r=n.element;for(e in Q)t=o[Q[e]],i=r.attr(p.attr(e+"-field")),!t&&i&&(t=i),t||(t=e),_(t)||(t=[t]),o[Q[e]]=t},_fieldAccessor:function(t){var i=this.options[Q[t]],n=i.length,o="(function(item) {";return 0===n?o+="return item['"+t+"'];":(o+="var levels = ["+e.map(i,function(e){return"function(d){ return "+p.expr(e)+"}"}).join(",")+"];",o+="return levels[Math.min(item.level(), "+n+"-1)](item)"),o+="})"},setOptions:function(e){b.fn.setOptions.call(this,e),this._animation(),this._dragging(),this._templates()},_trigger:function(e,t){return this.trigger(e,{node:t.closest(q)[0]})},_setChecked:function(t,i){if(t&&e.isFunction(t.view))for(var n=0,o=t.view();n<o.length;n++)o[n].enabled!==!1&&this._setCheckedValue(o[n],i),o[n].children&&this._setChecked(o[n].children,i)},_setCheckedValue:function(e,t){e[M]=t},_setIndeterminate:function(e){var t,i,n,r=c(e),s=!0;if(r.length&&(t=o(r.children()),i=t.length)){if(i>1){for(n=1;n<i;n++)if(t[n].checked!=t[n-1].checked||t[n].indeterminate||t[n-1].indeterminate){s=!1;break}}else s=!t[0].indeterminate;return o(e).data(R,!s).prop(R,!s).prop(M,s&&t[0].checked)}},updateIndeterminate:function(e){var t,i,n,o;if(e=e||this.wrapper,t=c(e).children(),t.length){for(i=0;i<t.length;i++)this.updateIndeterminate(t.eq(i));n=this._setIndeterminate(e),o=this.dataItem(e),n&&n.prop(M)?o.checked=!0:o&&delete o.checked}},_bubbleIndeterminate:function(e,t){if(e.length){t||this.updateIndeterminate(e);var i,n=this.parent(e);n.length&&(this._setIndeterminate(n),i=n.children("div").find(".k-checkbox-wrapper :checkbox"),this._skip=!0,i.prop(R)===!1?this.dataItem(n).set(M,i.prop(M)):this.dataItem(n).set(M,!1),this._skip=!1,this._bubbleIndeterminate(n,!0))}},_checkboxChange:function(t){var i=e(t.target),n=i.prop(M),o=i.closest(q),r=this.dataItem(o);this._preventChange||r.checked!=n&&(r.set(M,n),this._trigger(T,o))},_toggleButtonClick:function(t){var i=e(t.currentTarget).closest(q);i.is("[aria-disabled='true']")||this.toggle(i)},_mousedown:function(t){var i=this,n=e(t.currentTarget),o=e(t.currentTarget).closest(q),r=p.support.browser;o.is("[aria-disabled='true']")||((r.msie||r.edge)&&n.is(":checkbox")&&(n.prop(R)?(i._preventChange=!1,n.prop(M,!n.prop(M)),n.trigger(E),n.on(N+x,function(e){e.preventDefault()}),i._preventChange=!0):(n.off(N+x),i._preventChange=!1)),i._clickTarget=o,i.current(o))},_focusable:function(e){return e&&e.length&&e.is(":visible")&&!e.find(".k-in:first").hasClass(Y)},_focus:function(){var t=this.select(),i=this._clickTarget;p.support.touch||(i&&i.length&&(t=i),this._focusable(t)||(t=this.current()),this._focusable(t)||(t=this._nextVisible(e())),this.current(t))},focus:function(){var e,t=this.wrapper,i=t[0],n=[],o=[],r=document.documentElement;do i=i.parentNode,i.scrollHeight>i.clientHeight&&(n.push(i),o.push(i.scrollTop));while(i!=r);for(t.focus(),e=0;e<n.length;e++)n[e].scrollTop=o[e]},_blur:function(){this.current().find(".k-in:first").removeClass("k-state-focused")},_enabled:function(e){return!e.children("div").children(".k-in").hasClass(Y)},parent:function(t){var i,n,o=/\bk-treeview\b/,r=/\bk-item\b/;typeof t==j&&(t=this.element.find(t)),Z(t)||(t=t[0]),n=r.test(t.className);do t=t.parentNode,r.test(t.className)&&(n?i=t:n=!0);while(!o.test(t.className)&&!i);return e(i)},_nextVisible:function(e){function t(e){for(;e.length&&!e.next().length;)e=n.parent(e);return e.next().length?e.next():e}var i,n=this,o=n._expanded(e);return e.length&&e.is(":visible")?o?(i=c(e).children().first(),i.length||(i=t(e))):i=t(e):i=n.root.children().eq(0),i},_previousVisible:function(e){var t,i,n=this;if(!e.length||e.prev().length)for(i=e.length?e.prev():n.root.children().last();n._expanded(i)&&(t=c(i).children().last(),t.length);)i=t;else i=n.parent(e)||e;return i},_keydown:function(i){var n,o=this,r=i.keyCode,s=o.current(),a=o._expanded(s),l=s.find(".k-checkbox-wrapper:first :checkbox"),c=p.support.isRtl(o.element);i.target==i.currentTarget&&(!c&&r==k.RIGHT||c&&r==k.LEFT?a?n=o._nextVisible(s):s.find(".k-in:first").hasClass(Y)||o.expand(s):!c&&r==k.LEFT||c&&r==k.RIGHT?a&&!s.find(".k-in:first").hasClass(Y)?o.collapse(s):(n=o.parent(s),o._enabled(n)||(n=t)):r==k.DOWN?n=o._nextVisible(s):r==k.UP?n=o._previousVisible(s):r==k.HOME?n=o._nextVisible(e()):r==k.END?n=o._previousVisible(e()):r!=k.ENTER||s.find(".k-in:first").hasClass(Y)?r==k.SPACEBAR&&l.length&&(s.find(".k-in:first").hasClass(Y)||(l.prop(M,!l.prop(M)).data(R,!1).prop(R,!1),o._checkboxChange({target:l})),n=s):s.find(".k-in:first").hasClass("k-state-selected")||o._trigger(S,s)||o.select(s),n&&(i.preventDefault(),s[0]!=n[0]&&(o._trigger(D,n),o.current(n))))},_keypress:function(e){var t,i=this,n=300,o=i._getSelectedNode();e.keyCode!==k.ENTER&&e.keyCode!==k.SPACEBAR&&(i._match||(i._match=""),i._match+=String.fromCharCode(e.keyCode),clearTimeout(i._matchTimer),i._matchTimer=setTimeout(function(){i._match=""},n),t=o&&i._matchNextByText(Array.prototype.indexOf.call(this.element.find(".k-item"),o[0]),i._match),t||(t=i._matchNextByText(-1,i._match)),i.select(t))},_matchNextByText:function(t,i){return e(this.element).find(".k-in").filter(function(n,o){return n>t&&e(o).is(":visible")&&!e(o).hasClass(Y)&&0===e(o).text().toLowerCase().indexOf(i)}).closest(q)[0]},_click:function(t){var i,n=this,o=e(t.currentTarget),r=d(o.closest(q)),s=o.attr("href");i=s?"#"==s||s.indexOf("#"+this.element.id+"-")>=0:r.length&&!r.children().length,i&&t.preventDefault(),o.hasClass(".k-state-selected")||n._trigger(S,o)||n.select(o)},_wrapper:function(){var e,t,i=this,n=i.element,o="k-widget k-treeview";n.is("ul")?(e=n.wrap("<div />").parent(),t=n):(e=n,t=e.children("ul").eq(0)),i.wrapper=e.addClass(o),i.root=t},_getSelectedNode:function(){return this.element.find(".k-state-selected").closest(q)},_group:function(e){var t=this,i=e.hasClass(W),n={firstLevel:i,expanded:i||t._expanded(e)},o=e.children("ul");o.addClass(t.templates.groupCssClass(n)).css("display",n.expanded?"":"none"),t._nodes(o,n)},_nodes:function(t,i){var n,o=this,r=t.children("li");i=g({length:r.length},i),r.each(function(t,r){r=e(r),n={index:t,expanded:o._expanded(r)},a(r),o._updateNodeClasses(r,i,n),o._group(r)})},_checkboxes:function(){var e,t=this.options,i=t.checkboxes;i&&(e="<input type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #",i.name&&(e+=" name='"+i.name+"'"),e+=" id='_#= item.uid #' class='k-checkbox' /><span class='k-checkbox-label checkbox-span'></span>",i=g({template:e},t.checkboxes),typeof i.template==j&&(i.template=v(i.template)),t.checkboxes=i)},_updateNodeClasses:function(e,t,i){var n,o,r=e.children("div"),s=e.children("ul"),a=this.templates;e.hasClass("k-treeview")||(i=i||{},i.expanded=typeof i.expanded!=O?i.expanded:this._expanded(e),i.index=typeof i.index!=O?i.index:e.index(),i.enabled=typeof i.enabled!=O?i.enabled:!r.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=O?t.firstLevel:e.parent().parent().hasClass(W),t.length=typeof t.length!=O?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(a.wrapperCssClass(t,i)),r.removeClass("k-top k-mid k-bot").addClass(a.cssClass(t,i)),n=r.children(".k-in"),o=n[0]&&"a"==n[0].nodeName.toLowerCase(),n.removeClass("k-in k-link k-state-default k-state-disabled").addClass(a.textClass(i,o)),(s.length||"true"==e.attr("data-hasChildren"))&&(r.children(".k-icon").removeClass("k-i-expand k-i-collapse").addClass(a.toggleButtonClass(i)),s.addClass("k-group")),this._checkboxAria(e))},_processNodes:function(t,i){var n=this;n.element.find(t).each(function(t,o){i.call(n,t,e(o).closest(q))})},dataItem:function(t){var i=e(t).closest(q).attr(p.attr("uid")),n=this.dataSource;return n&&n.getByUid(i)},_insertNode:function(t,i,n,o,r){var s,l,d,u,h=this,p=c(n),f=p.children().length+1,m={firstLevel:n.hasClass(W),expanded:!r,length:f},g="",v=function(e,t){e.appendTo(t)};for(d=0;d<t.length;d++)u=t[d],u.index=i+d,g+=h._renderItem({group:m,item:u});if(l=e(g),l.length){for(h.angular("compile",function(){return{elements:l.get(),data:t.map(function(e){return{dataItem:e}})}}),p.length||(p=e(h._renderGroup({group:m})).appendTo(n)),o(l,p),n.hasClass("k-item")&&(a(n),h._updateNodeClasses(n)),h._updateNodeClasses(l.prev().first()),h._updateNodeClasses(l.next().last()),h._checkboxAria(l),d=0;d<t.length;d++)u=t[d],u.hasChildren&&(s=u.children.data(),s.length&&h._insertNode(s,u.index,l.eq(d),v,!h._expanded(l.eq(d))));return l}},_checkboxAria:function(t){var i;t.each(function(t,n){n=e(n),i=n.find(".k-in:first").text(),e(n).find("> div .k-checkbox-wrapper [type=checkbox]").attr(G,i)})},_updateNodes:function(t,i){function n(e,t){e.find(".k-checkbox-wrapper :checkbox").not("[disabled]").prop(M,t).data(R,!1).prop(R,!1)}var o,r,s,a,l,c,u,h=this,p={treeview:h.options,item:a},m="expanded"!=i&&"checked"!=i;if("selected"==i)a=t[0],r=h.findByUid(a.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected",a[i]).end(),a[i]&&h.current(r),r.attr($,!!a[i]);else{for(u=e.map(t,function(e){return h.findByUid(e.uid).children("div")}),m&&h.angular("cleanup",function(){return{elements:u}}),o=0;o<t.length;o++)p.item=a=t[o],s=u[o],r=s.parent(),m&&s.children(".k-in").html(h.templates.itemContent(p)),i==M?(l=a[i],n(s,l),h.options.checkboxes.checkChildren&&(n(r.children(".k-group"),l),h._setChecked(a.children,l),h._bubbleIndeterminate(r))):"expanded"==i?h._toggle(r,a,a[i]):"enabled"==i&&(r.find(".k-checkbox-wrapper :checkbox").prop("disabled",!a[i]),c=!d(r).is(U),r.removeAttr(K),a[i]||(a.selected&&a.set("selected",!1),a.expanded&&a.set("expanded",!1),c=!0,r.attr($,!1).attr(K,!0)),h._updateNodeClasses(r,{},{enabled:a[i],expanded:!c})),s.length&&this.trigger("itemChange",{item:s,data:a,ns:f});m&&h.angular("compile",function(){return{elements:u,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_appendItems:function(e,t,i){var n,o,r,s=c(i),a=s.children(),l=!this._expanded(i);this.element===i?(n=this.dataSource.data(),o=this.dataSource.view(),r=o.length<n.length?o:n,e=r.indexOf(t[0])):t.length&&(e=t[0].parent().indexOf(t[0])),typeof e==O&&(e=a.length),this._insertNode(t,e,i,function(t,i){e>=a.length?t.appendTo(i):t.insertBefore(a.eq(e))},l),this._expanded(i)&&(this._updateNodeClasses(i),c(i).css("display","block"))},_refreshChildren:function(e,t,i){var n,o,r,s=this.options,l=s.loadOnDemand,d=s.checkboxes&&s.checkboxes.checkChildren;if(c(e).empty(),t.length)for(this._appendItems(i,t,e),o=c(e).children(),l&&d&&this._bubbleIndeterminate(o.last()),n=0;n<o.length;n++)r=o.eq(n),this.trigger("itemChange",{item:r.children("div"),data:this.dataItem(r),ns:f});else a(e)},_refreshRoot:function(t){var i,n,o,r=this._renderGroup({items:t,group:{firstLevel:!0,expanded:!0}});for(this.root.length?(this._angularItems("cleanup"),i=e(r),this.root.attr("class",i.attr("class")).html(i.html())):this.root=this.wrapper.html(r).children("ul"),this.root.attr("role","tree"),n=this.root.children(".k-item"),o=0;o<t.length;o++)this.trigger("itemChange",{item:n.eq(o),data:t[o],ns:f});this._angularItems("compile")},refresh:function(e){var i,n,o=e.node,r=e.action,s=e.items,a=this.wrapper,l=this.options,c=l.loadOnDemand,d=l.checkboxes&&l.checkboxes.checkChildren;if(!this._skip){if(e.field){if(!s[0]||!s[0].level)return;return this._updateNodes(s,e.field)}if(o&&(a=this.findByUid(o.uid),this._progress(a,!1)),d&&"remove"!=r){for(n=!1,i=0;i<s.length;i++)if("checked"in s[i]){n=!0;break}if(!n&&o&&o.checked)for(i=0;i<s.length;i++)s[i].checked=!0}if("add"==r?this._appendItems(e.index,s,a):"remove"==r?this._remove(this.findByUid(s[0].uid),!1):"itemchange"==r?this._updateNodes(s):"itemloaded"==r?this._refreshChildren(a,s,e.index):this._refreshRoot(s),"remove"!=r)for(i=0;i<s.length;i++)(!c||s[i].expanded||s[i]._loaded)&&s[i].load();this.trigger(H,{node:o?a:t}),this.options.checkboxes.checkChildren&&this.updateIndeterminate()}},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),i=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),u(t).addClass("k-i-reload"),e.node.loaded(!1)):(this._progress(!1),this.element.html(i))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},expand:function(e){this._processNodes(e,function(e,t){this.toggle(t,!0)})},collapse:function(e){this._processNodes(e,function(e,t){this.toggle(t,!1)})},enable:function(e,t){"boolean"==typeof e?(t=e,e=this.items()):t=2!=arguments.length||!!t,this._processNodes(e,function(e,i){this.dataItem(i).set("enabled",t)})},current:function(i){var n=this,o=n._current,r=n.element,s=n._ariaId;return arguments.length>0&&i&&i.length?(o&&(o[0].id===s&&o.removeAttr("id"),o.find(".k-in:first").removeClass("k-state-focused")),o=n._current=e(i,r).closest(q),o.find(".k-in:first").addClass("k-state-focused"),s=o[0].id||s,s&&(n.wrapper.removeAttr("aria-activedescendant"),o.attr("id",s),n.wrapper.attr("aria-activedescendant",s)),t):(o||(o=n._nextVisible(e())),o)},select:function(i){var n=this,o=n.element;return arguments.length?(i=e(i,o).closest(q),o.find(".k-state-selected").each(function(){var t=n.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-state-selected")}),i.length&&(n.dataItem(i).set("selected",!0),n._clickTarget=i),n.trigger(E),t):o.find(".k-state-selected").closest(q)},_toggle:function(e,t,i){var n,o=this.options,r=d(e),s=i?"expand":"collapse";r.data("animating")||(n=t&&t.loaded(),i&&!n?(o.loadOnDemand&&this._progress(e,!0),r.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:i}),i||r.css("height",r.height()).css("height"),r.kendoStop(!0,!0).kendoAnimate(g({reset:!0},o.animation[s],{complete:function(){i&&r.css("height","")}}))))},toggle:function(t,i){t=e(t),u(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(i=!this._expanded(t)),this._expanded(t,i))},destroy:function(){var e=this;b.fn.destroy.call(e),e.wrapper.off(x),e.wrapper.find(".k-checkbox-wrapper :checkbox").off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),p.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,i,n){var o=p.attr("expanded"),r=this.dataItem(e),s=i,a=s?"expand":"collapse";return 1==arguments.length?"true"===e.attr(o)||r&&r.expanded:(d(e).data("animating")||!n&&this._trigger(a,e)||(r&&(r.set("expanded",s),s=r.expanded),s?(e.attr(o,"true"),e.attr("aria-expanded","true")):(e.removeAttr(o),e.attr("aria-expanded","false"))),t)},_progress:function(e,t){var i=this.element,n=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?i.html(n):i.empty()):u(e).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(e,i){var n=this.dataItem(e),o=this.options[Q.text],r=n.level(),s=o.length,a=o[Math.min(r,s-1)];return i?(n.set(a,i),t):n[a]},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,i,n,o){var r,s=this._objectOrSelf(n||i),a=s.dataSource,l=e.Deferred().resolve().promise();return n&&n[0]!=s.element[0]&&(r=s.dataItem(n),r.loaded()||(s._progress(n,!0),l=r.load()),n!=this.root&&(a=r.children,a&&a instanceof w||(r._initChildren(),r.loaded(!0),a=r.children))),t=this._toObservableData(t),o.call(s,a,t,l)},_toObservableData:function(t){var i,n,o=t;return(X(t)||Z(t))&&(i=this._objectOrSelf(t).dataSource,n=e(t).attr(p.attr("uid")),o=i.getByUid(n),o&&(o=i.remove(o))),o},_insert:function(e,t,i){t instanceof p.data.ObservableArray?t=t.toJSON():_(t)||(t=[t]);var n=e.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),e.splice.apply(e,[i,0].concat(t)),this.findByUid(e[i].uid)},insertAfter:r(1),insertBefore:r(0),append:function(t,i,n){var o=this.root;if(!(i&&t instanceof jQuery&&i[0]===t[0]))return i=i&&i.length?i:null,i&&(o=c(i)),this._dataSourceMove(t,o,i,function(t,o,r){function s(){i&&l._expanded(i,!0,!0);var e=t.data(),n=Math.max(e.length,0);return l._insert(e,o,n)}var a,l=this;return r.done(function(){a=s(),(n=n||e.noop)(a)}),a||null})},_remove:function(t,i){var n,o,r,s=this;return t=e(t,s.element),this.angular("cleanup",function(){return{elements:t.get()}}),n=t.parent().parent(),o=t.prev(),r=t.next(),t[i?"detach":"remove"](),n.hasClass("k-item")&&(a(n),s._updateNodeClasses(n)),s._updateNodeClasses(o),s._updateNodeClasses(r),t},remove:function(e){var t=this.dataItem(e);t&&this.dataSource.remove(t)},detach:function(e){return this._remove(e,!0)},findByText:function(t){return e(this.element).find(".k-in").filter(function(i,n){return e(n).text()==t}).closest(q)},findByUid:function(t){var i,n,o=this.element.find(".k-item"),r=p.attr("uid");for(n=0;n<o.length;n++)if(o[n].getAttribute(r)==t){i=o[n];break}return e(i)},expandPath:function(t,i){function n(){s.shift(),s.length?o(s[0]).then(n):a.call(r)}function o(t){var i=e.Deferred(),n=r.dataSource.get(t);return n?n.loaded()?(n.set("expanded",!0),i.resolve()):(r._progress(r.findByUid(n.uid),!0),n.load().then(function(){n.set("expanded",!0),i.resolve()})):i.resolve(),i.promise()}var r=this,s=t.slice(0),a=i||e.noop;o(s[0]).then(n)},_parentIds:function(e){for(var t=e&&e.parentNode(),i=[];t&&t.parentNode;)i.unshift(t.id),t=t.parentNode();return i},expandTo:function(e){e instanceof p.data.Node||(e=this.dataSource.get(e));var t=this._parentIds(e);this.expandPath(t)},_renderItem:function(e){return e.group||(e.group={}),e.treeview=this.options,e.r=this.templates,this.templates.item(e)},_renderGroup:function(e){var t=this;return e.renderItems=function(e){var i="",n=0,o=e.items,r=o?o.length:0,s=e.group;for(s.length=r;n<r;n++)e.group=s,e.item=o[n],e.item.index=n,i+=t._renderItem(e);return i},e.r=t.templates,t.templates.group(e)}}),f.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dropdowntree/treeview.min",["kendo.treeview.min"],e)}(function(){return function(e,t){function i(e){return function(t){var i=t.children(".k-animation-container");return i.length||(i=t),i.children(e)}}var n=window.kendo,o=n.ui,r=n.keys,s="k-state-disabled",a="select",l="checked",c="dataBound",d="indeterminate",u="navigate",h=o.TreeView,p=i(".k-group"),f=h.extend({init:function(e,t,i){var n=this;n.dropdowntree=i,h.fn.init.call(n,e,t)},_checkOnSelect:function(e){if(!e.isDefaultPrevented()){var t=this.dataItem(e.node);t.set("checked",!t.checked)}},_setCheckedValue:function(e,t){e.set(l,t)},_click:function(e){var t=this;t.dropdowntree._isMultipleSelection()&&t.one("select",t._checkOnSelect),h.fn._click.call(t,e)},defaultrefresh:function(e){var i,n,o=e.node,r=e.action,s=e.items,a=this.wrapper,l=this.options,d=l.loadOnDemand,u=l.checkboxes&&l.checkboxes.checkChildren;if(!this._skip){if(e.field){if(!s[0]||!s[0].level)return;return this._updateNodes(s,e.field)}if(o&&(a=this.findByUid(o.uid),this._progress(a,!1)),u&&"remove"!=r){for(n=!1,i=0;i<s.length;i++)if("checked"in s[i]){n=!0;break}if(!n&&o&&o.checked)for(i=0;i<s.length;i++)s[i].checked=!0}if("add"==r?this._appendItems(e.index,s,a):"remove"==r?this._remove(this.findByUid(s[0].uid),!1):"itemchange"==r?this._updateNodes(s):"itemloaded"==r?this._refreshChildren(a,s,e.index):this._refreshRoot(s),"remove"!=r)for(i=0;i<s.length;i++)d&&!s[i].expanded||s[i].load();this.trigger(c,{node:o?a:t}),this.dropdowntree._treeViewDataBound({node:o?a:t,sender:this}),this.options.checkboxes.checkChildren&&this.updateIndeterminate()}},_previousVisible:function(e){var t,i,n=this;if(!e.length||e.prev().length)for(i=e.length?e.prev():n.root.children().last();n._expanded(i)&&(t=p(i).children().last(),t.length);)i=t;else i=n.parent(e)||e,i.length||(n.dropdowntree.checkAll&&n.dropdowntree.checkAll.is(":visible")?n.dropdowntree.checkAll.find(".k-checkbox").focus():n.dropdowntree.filterInput?n.dropdowntree.filterInput.focus():n.dropdowntree.wrapper.focus());return i},_keydown:function(i){var o,c=this,h=i.keyCode,p=c.current(),f=c._expanded(p),m=p.find(".k-checkbox-wrapper:first :checkbox"),g=n.support.isRtl(c.element);i.target==i.currentTarget&&(!g&&h==r.RIGHT||g&&h==r.LEFT?f?o=c._nextVisible(p):p.find(".k-in:first").hasClass(s)||c.expand(p):!g&&h==r.LEFT||g&&h==r.RIGHT?f&&!p.find(".k-in:first").hasClass(s)?c.collapse(p):(o=c.parent(p),c._enabled(o)||(o=t)):h==r.DOWN?o=c._nextVisible(p):h!=r.UP||i.altKey?h==r.HOME?o=c._nextVisible(e()):h==r.END?o=c._previousVisible(e()):h!=r.ENTER||p.find(".k-in:first").hasClass(s)?h==r.SPACEBAR&&m.length&&!p.find(".k-in:first").hasClass(s)?(m.prop(l,!m.prop(l)).data(d,!1).prop(d,!1),c._checkboxChange({target:m}),o=p):(i.altKey&&h===r.UP||h===r.ESC)&&c._closePopup():p.find(".k-in:first").hasClass("k-state-selected")||c._trigger(a,p)||c.select(p):o=c._previousVisible(p),o&&(i.preventDefault(),p[0]!=o[0]&&(c._trigger(u,o),c.current(o))))},_closePopup:function(){this.dropdowntree.close(),this.dropdowntree.wrapper.focus()},refresh:function(e){this.defaultrefresh(e),this.dropdowntree.options.skipUpdateOnBind||("itemchange"===e.action?this.dropdowntree._isMultipleSelection()?"checked"===e.field&&this.dropdowntree._checkValue(e.items[0]):"checked"!==e.field&&"expanded"!==e.field&&e.items[0].selected&&this.dropdowntree._selectValue(e.items[0]):this.dropdowntree.refresh(e))}});n.ui._dropdowntree=f}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dropdowntree.min",["dropdowntree/treeview.min","kendo.popup.min"],e)}(function(){return function(e,t){function i(e,t,i){for(var n,o=0,r=t.length-1;o<r;++o)n=t[o],n in e||(e[n]={}),e=e[n];e[t[r]]=i}var n,o,r=window.kendo,s=r.ui,a=s.Widget,l=s._dropdowntree,c=r.data.ObservableArray,d=r.data.ObservableObject,u=e.extend,h=r._activeElement,p=".kendoDropDownTree",f=r.keys,m=r.support,g="k-hidden",v="width",_=m.browser,b=r._outerWidth,w=".",y="disabled",k="readonly",x="k-state-disabled",C="aria-disabled",S="k-state-hover",T="k-state-focused",D="mouseenter"+p+" mouseleave"+p,A="tabindex",E="click",I="open",M="close",R="change",F=e.proxy,P=r.ui.Widget.extend({init:function(t,i){var n,o,s;this.ns=p,r.ui.Widget.fn.init.call(this,t,i),this._selection=this._getSelection(),this._focusInputHandler=e.proxy(this._focusInput,this),this._initial=this.element.val(),this._values=[],n=this.options.value,null!==n&&n.length||(this._noInitialValue=!0),n&&(this._valueMethodCalled=!0,this._values=e.isArray(n)?n.slice(0):[n]),this._inputTemplate(),this._accessors(),this._setTreeViewOptions(this.options),this._dataSource(),this._selection._initWrapper(),this._placeholder(!0),this._tabindex(),this.wrapper.data(A,this.wrapper.attr(A)),this.tree=e("<div/>").attr({tabIndex:-1,"aria-hidden":!0}),this.list=e("<div class='k-list-container'/>").append(this.tree),this._header(),this._noData(),this._footer(),this._reset(),this._popup(),this.popup.one("open",F(this._popupOpen,this)),this._clearButton(),this._filterHeader(),this._treeview(),this._renderFooter(),this._checkAll(),this._enable(),this._toggleCloseVisibility(),this.options.autoBind||(o=i.text||"",i.value?this._preselect(i.value):o?this._textAccessor(o):i.placeholder&&this._placeholder(!0)),s=e(this.element).parents("fieldset").is(":disabled"),s&&this.enable(!1),this._valueMethodCalled=!1,r.notify(this)},_preselect:function(e,t){this._selection._preselect(e,t)},_setTreeViewOptions:function(t){var i={autoBind:t.autoBind,checkboxes:t.checkboxes,dataImageUrlField:t.dataImageUrlField,dataSpriteCssClassField:t.dataSpriteCssClassField,dataTextField:t.dataTextField,dataUrlField:t.dataUrlField,loadOnDemand:t.loadOnDemand};this.options.treeview=e.extend({},i,this.options.treeview),t.template&&(this.options.treeview.template=t.template)},_dataSource:function(){var t=this.options.dataSource;this.dataSource=r.data.HierarchicalDataSource.create(t),t&&e.extend(this.options.treeview,{dataSource:this.dataSource})},_popupOpen:function(){var e=this.popup;e.wrapper=r.wrap(e.element)},_getSelection:function(){return this._isMultipleSelection()?new s.DropDownTree.MultipleSelection(this):new s.DropDownTree.SingleSelection(this)},setDataSource:function(e){this.dataSource=e,this.treeview.setDataSource(e)},_isMultipleSelection:function(){return this.options&&(this.options.treeview.checkboxes||this.options.checkboxes)},options:{name:"DropDownTree",animation:{},autoBind:!0,autoClose:!0,autoWidth:!1,clearButton:!0,dataTextField:"",dataValueField:"",dataImageUrlField:"",dataSpriteCssClassField:"",dataUrlField:"",delay:500,enabled:!0,enforceMinLength:!1,filter:"none",height:200,ignoreCase:!0,index:0,loadOnDemand:!1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete"},minLength:1,checkboxes:!1,noDataTemplate:"No data found.",placeholder:"",checkAll:!1,checkAllTemplate:"Check all",tagMode:"multiple",template:null,text:null,treeview:{},valuePrimitive:!1,footerTemplate:"",headerTemplate:"",value:null,valueTemplate:null},events:["open","close","dataBound",R,"select","filtering"],focus:function(){this.wrapper.focus()},dataItem:function(e){return this.treeview.dataItem(e)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._toggleCloseVisibility()},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._toggleCloseVisibility()},toggle:function(e){this._toggle(e)},open:function(){var e=this.popup;this.options.autoBind||this.dataSource.data().length||(this.treeview._progress(!0),this._isFilterEnabled()?this._search():this.dataSource.fetch()),!e.visible()&&this._allowOpening()&&(this._isMultipleSelection()&&e.element.addClass("k-multiple-selection"),e.element.addClass("k-popup-dropdowntree"),e.one("activate",this._focusInputHandler),e._hovered=!0,e.open())},close:function(){this.popup.close()},search:function(t){var i,n=this.options;if(clearTimeout(this._typingTimeout),!n.enforceMinLength&&!t.length||t.length>=n.minLength){if(i=this._getFilter(t),this.trigger("filtering",{filter:i})||e.isArray(this.options.dataTextField))return;this._filtering=!0,this.treeview.dataSource.filter(i)}},_getFilter:function(e){return{field:this.options.dataTextField,operator:this.options.filter,value:e,ignoreCase:this.options.ignoreCase}},refresh:function(){var t=this.treeview.dataSource.flatView();this._renderFooter(),this._renderNoData(),this.filterInput&&this.checkAll&&this.checkAll.toggle(!this.filterInput.val().length),this.tree.toggle(!!t.length),e(this.noData).toggle(!t.length)},setOptions:function(e){a.fn.setOptions.call(this,e),this._setTreeViewOptions(e),this._dataSource(),this.options.treeview&&this.treeview.setOptions(this.options.treeview),e.height&&this.tree&&this.tree.css("max-height",e.height),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),this.span&&(this._isMultipleSelection()||this.span.hasClass("k-readonly"))&&this._placeholder(!0),this._inputTemplate(),this._accessors(),this._filterHeader(),this._checkAll(),this._enable(),e&&(e.enable||e.enabled)&&this.enable(!0),this._clearButton()},destroy:function(){r.ui.Widget.fn.destroy.call(this),this.treeview&&this.treeview.destroy(),this.popup.destroy(),this.wrapper.off(p),this._clear.off(p),this._inputWrapper.off(p),this.filterInput&&this.filterInput.off(p),this.tagList&&this.tagList.off(p),r.unbind(this.tagList),this.options.checkAll&&this.checkAll&&this.checkAll.off(p),this._form&&this._form.off("reset",this._resetHandler)},setValue:function(t){t=e.isArray(t)||t instanceof c?t.slice(0):[t],this._values=t},items:function(){this.treeview.dataItems()},value:function(e){var i=this;if(e)if(i.filterInput&&i.dataSource._filter)i._filtering=!0,i.dataSource.filter({});else if(!i.dataSource.data().length)return i.dataSource.fetch(function(){i._selection._setValue(e)}),t;return i._selection._setValue(e)},text:function(e){var i,n=this.options.ignoreCase;return e=null===e?"":e,e===t||this._isMultipleSelection()?this._textAccessor():"string"!=typeof e?(this._textAccessor(e),t):(i=n?e:e.toLowerCase(),this._selectItemByText(i),this._textAccessor(i),t)},_header:function(){var i,n=this,o=e(n.header),s=n.options.headerTemplate;return this._angularElement(o,"cleanup"),r.destroy(o),o.remove(),s?(i="function"!=typeof s?r.template(s):s,o=e(i({})),n.header=o[0]?o:null,n.list.prepend(o),this._angularElement(n.header,"compile"),t):(n.header=null,t)},_noData:function(){var i=this,n=e(i.noData),o=i.options.noDataTemplate;return i.angular("cleanup",function(){return{elements:n}}),r.destroy(n),n.remove(),o?(i.noData=e('<div class="k-nodata" style="display:none"><div></div></div>').appendTo(i.list),i.noDataTemplate="function"!=typeof o?r.template(o):o,t):(i.noData=null,t)},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.children(":first").html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_footer:function(){var i=this,n=e(i.footer),o=i.options.footerTemplate;return this._angularElement(n,"cleanup"),r.destroy(n),n.remove(),o?(i.footer=e('<div class="k-footer"></div>').appendTo(i.list),i.footerTemplate="function"!=typeof o?r.template(o):o,t):(i.footer=null,t)},_renderFooter:function(){var e=this,t=e.footer;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_enable:function(){var e=this,i=e.options,n=e.element.is("[disabled]");i.enable!==t&&(i.enabled=i.enable),!i.enabled||n?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_adjustListWidth:function(){var e,t,i=this,n=i.list,o=n[0].style.width,r=i.wrapper;if(n.data(v)||!o)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||b(r),e&&_.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),
o="border-box"!==n.css("box-sizing")?t-(b(n)-n.width()):t,n.css({fontFamily:r.css("font-family"),width:i.options.autoWidth?"auto":o,minWidth:o,whiteSpace:i.options.autoWidth?"nowrap":"normal"}).data(v,o),!0},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=o.on("reset",t._resetHandler))},_popup:function(){var e=this;e.popup=new s.Popup(e.list,u({},e.options.popup,{anchor:e.wrapper,open:F(e._openHandler,e),close:F(e._closeHandler,e),animation:e.options.animation,isRtl:m.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_allowOpening:function(){return this.options.noDataTemplate||this.treeview.dataSource.flatView().length},_placeholder:function(e){this.span&&this.span.toggleClass("k-readonly",e).text(e?this.options.placeholder:"")},_currentValue:function(e){var t=this._value(e);return t||0===t||(t=e),t},_checkValue:function(i){var n,o,r,s,a="",l=-1,c=this.value(),u="multiple"===this.options.tagMode;if((i||0===i)&&(i.level&&(i._level=i.level()),a=this._currentValue(i),l=c.indexOf(a)),i.checked){if(n=e.grep(this._tags,function(e){return e.uid===i._tagUid}),n.length)return;o=new d(i.toJSON()),i._tagUid=o.uid,this._tags.push(o),1===this._tags.length&&(this.span.hide(),u||this._multipleTags.push(o)),l===-1&&(c.push(a),this.setValue(c))}else{if(r=this._tags.find(function(e){return e.uid===i._tagUid}),s=this._tags.indexOf(r),s===-1)return this._treeViewCheckAllCheck(i),t;this._tags.splice(s,1),0===this._tags.length&&(this.span.show(),u||this._multipleTags.splice(0,1)),l!==-1&&(c.splice(l,1),this.setValue(c))}this._treeViewCheckAllCheck(i),this._preventChangeTrigger||this._valueMethodCalled||this._noInitialValue||this.trigger(R),this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.focus()),this.popup.position(),this._toggleCloseVisibility()},_selectValue:function(e){var t="",i="";(e||0===e)&&(e.level&&(e._level=e.level()),i=this._text(e)||e,t=this._currentValue(e)),null===t&&(t=""),this.setValue(t),this._textAccessor(i,e),this._accessor(t),this._valueMethodCalled||this.trigger(R),this._valueMethodCalled=!1,this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.focus()),this.popup.position(),this._toggleCloseVisibility()},_clearClick:function(e){e.stopPropagation(),this._clearTextAndValue()},_clearTextAndValue:function(){this.setValue([]),this._clearInput(),this._clearText(),this._selection._clearValue(),this.popup.position(),this._toggleCloseVisibility()},_clearText:function(){this.options.placeholder?this._placeholder(!0):this.span&&this.span.html("")},_inputTemplate:function(){var t=this.options.valueTemplate;t=t?r.template(t):e.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),this),this.valueTemplate=t},_assignInstance:function(e,t){var n=this.options.dataTextField,o={};return n?(i(o,n.split(w),e),i(o,this.options.dataValueField.split(w),t),o=new d(o)):o=e,o},_textAccessor:function(i,n){var o,r=this.valueTemplate,s=this.span;if(i===t)return s.text();s.removeClass("k-readonly"),!n&&(e.isPlainObject(i)||i instanceof d)&&(n=i),n||(n=this._assignInstance(i,this._accessor())),o=function(){return{elements:s.get(),data:[{dataItem:n}]}},this.angular("cleanup",o);try{s.html(r(n))}catch(a){s&&s.html("")}this.angular("compile",o)},_accessors:function(){var t=this.element,i=this.options,n=r.getter,o=t.attr(r.attr("text-field")),s=t.attr(r.attr("value-field")),a=function(t){var i,o;return e.isArray(t)?(i=t.length,o=e.map(t,function(e){return function(t){return t[e]}}),function(e){var t=e._level;if(t||0===t)return o[Math.min(t,i-1)](e)}):n(t)};!i.dataTextField&&o&&(i.dataTextField=o),!i.dataValueField&&s&&(i.dataValueField=s),i.dataTextField=i.dataTextField||"text",i.dataValueField=i.dataValueField||"value",this._text=a(i.dataTextField),this._value=a(i.dataValueField)},_accessor:function(e,t){return this._accessorInput(e,t)},_accessorInput:function(e){var i=this.element[0];return e===t?i.value:(null===e&&(e=""),i.value=e,t)},_clearInput:function(){var e=this.element[0];e.value=""},_clearButton:function(){var t=this.options.messages&&this.options.messages.clear?this.options.messages.clear:"clear";this._clear||(this._clear=e('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="'+t+'"></span>').attr({role:"button",tabIndex:-1})),this.options.clearButton?(this._clear.insertAfter(this.span),this.wrapper.addClass("k-dropdowntree-clearable")):this.options.clearButton||this._clear.remove()},_toggleCloseVisibility:function(){var e=this.element.attr(k),t=this.value()&&!this._isMultipleSelection()||this.value().length,i=this.element.val()&&this.element.val()!==this.options.placeholder;e||!t&&!i?this._hideClear():this._showClear()},_showClear:function(){this._clear&&this._clear.removeClass(g)},_hideClear:function(){this._clear&&this._clear.addClass(g)},_openHandler:function(e){this._adjustListWidth(),this.trigger(I)?e.preventDefault():(this.wrapper.attr("aria-expanded",!0),this.tree.attr("aria-hidden",!1).attr("role","tree"))},_closeHandler:function(e){this.trigger(M)?e.preventDefault():(this.wrapper.attr("aria-expanded",!1),this.tree.attr("aria-hidden",!0))},_treeview:function(){var e=this;e.options.height&&e.tree.css("max-height",e.options.height),e.tree.attr("id",r.guid()),e.treeview=new l(e.tree,u({select:e.options.select},e.options.treeview),e),e.dataSource=e.treeview.dataSource},_treeViewDataBound:function(e){var i,n,o;return e.node&&this._prev&&this._prev.length&&e.sender.expand(e.node),this._filtering?(e.node||(this._filtering=!1),this._isMultipleSelection()||this._deselectItem(e),t):(this.treeview||(this.treeview=e.sender),e.node?(n=e.sender.dataItem(e.node),n&&(o=n.children.data(),this._checkLoadedItems(o))):(i=e.sender.dataSource.data(),this._checkLoadedItems(i),this._noInitialValue&&(this._noInitialValue=!1)),this.trigger("dataBound",e),t)},_deselectItem:function(e){var t,i,n=[];for(e.node?(t=e.sender.dataItem(e.node),t&&(n=t.children.data())):n=e.sender.dataSource.data(),i=0;i<n.length;i++)n[i].selected&&!this._valueComparer(n[i],this.value())&&n[i].set("selected",!1)},_checkLoadedItems:function(e){var t,i=this.value();if(e)for(t=0;t<e.length;t++)this._selection._checkLoadedItem(e[t],i)},_treeViewCheckAllCheck:function(e){this.options.checkAll&&this.checkAll&&(this._getAllChecked(),e.checked?this._checkCheckAll():this._uncheckCheckAll())},_checkCheckAll:function(){var e=this.checkAll.find(".k-checkbox");this._allItemsAreChecked?e.prop("checked",!0).prop("indeterminate",!1):e.prop("indeterminate",!0)},_uncheckCheckAll:function(){var e=this.checkAll.find(".k-checkbox");this._allItemsAreUnchecked?e.prop("checked",!1).prop("indeterminate",!1):e.prop("indeterminate",!0)},_filterHeader:function(){var t;this.filterInput&&(this.filterInput.off(p).parent().remove(),this.filterInput=null),this._isFilterEnabled()&&(this._disableCheckChildren(),t='<span class="k-icon k-i-zoom"></span>',this.filterInput=e('<input class="k-textbox"/>').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.filterInput.on("input",F(this._filterChange,this)),e('<span class="k-list-filter" />').insertBefore(this.tree).append(this.filterInput.add(t)))},_filterChange:function(){this.filterInput&&this._search()},_disableCheckChildren:function(){this._isMultipleSelection()&&this.options.treeview.checkboxes&&this.options.treeview.checkboxes.checkChildren&&(this.options.treeview.checkboxes.checkChildren=!1)},_checkAll:function(){this.checkAll&&(this.checkAll.find(".k-checkbox-label, .k-checkbox").off(p),this.checkAll.remove(),this.checkAll=null),this._isMultipleSelection()&&this.options.checkAll&&(this.checkAll=e('<div class="k-check-all"><input type="checkbox" class="k-checkbox"/><span class="k-checkbox-label">Check All</span></div>').insertBefore(this.tree),this.checkAll.find(".k-checkbox-label").html(r.template(this.options.checkAllTemplate)({instance:this})),this.checkAll.find(".k-checkbox-label").on(E+p,F(this._clickCheckAll,this)),this.checkAll.find(".k-checkbox").on("change"+p,F(this._changeCheckAll,this)).on("keydown"+p,F(this._keydownCheckAll,this)),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[],this._getAllChecked(),this._allItemsAreUnchecked||this._checkCheckAll())},_changeCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");_.msie||_.edge||this._updateCheckAll(t)},_updateCheckAll:function(e){var t=this.checkAll.find(".k-checkbox");this._toggleCheckAllItems(e),t.prop("checked",e),this._disabledCheckedItems.length&&this._disabledUnCheckedItems.length?t.prop("indeterminate",!0):this._disabledCheckedItems.length?t.prop("indeterminate",!e):this._disabledUnCheckedItems.length?t.prop("indeterminate",e):t.prop("indeterminate",!1),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[]},_keydownCheckAll:function(e){var i=e.keyCode,n=e.altKey;return n&&i===f.UP||i===f.ESC?(this.close(),this.wrapper.focus(),e.preventDefault(),t):(i===f.UP&&(this.filterInput?this.filterInput.focus():this.wrapper.focus(),e.preventDefault()),i===f.DOWN&&(this.tree&&this.tree.is(":visible")&&this.tree.focus(),e.preventDefault()),i===f.SPACEBAR&&(_.msie||_.edge)&&(this._clickCheckAll(),e.preventDefault()),t)},_clickCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");this._updateCheckAll(!t),e.focus()},_dfs:function(e,t,i){for(var n=0;n<e.length&&this[t](e[n],i);n++)this._traverceChildren(e[n],t,i)},_uncheckItemByUid:function(e){this._dfs(this.dataSource.data(),"_uncheckItemEqualsUid",e)},_uncheckItemEqualsUid:function(e,t){return e.enabled===!1||e._tagUid!=t||(e.set("checked",!1),!1)},_selectItemByText:function(e){this._dfs(this.dataSource.data(),"_itemEqualsText",e)},_itemEqualsText:function(e,t){return e.enabled===!1||this._text(e)!==t||(this.treeview.select(this.treeview.findByUid(e.uid)),this._selectValue(e),!1)},_selectItemByValue:function(e){this._dfs(this.dataSource.data(),"_itemEqualsValue",e)},_itemEqualsValue:function(e,t){return e.enabled===!1||!this._valueComparer(e,t)||(this.treeview.select(this.treeview.findByUid(e.uid)),!1)},_checkItemByValue:function(e){var t,i=this.treeview.dataItems();for(t=0;t<e.length;t++)this._dfs(i,"_checkItemEqualsValue",e[t])},_checkItemEqualsValue:function(e,t){return e.enabled===!1||!this._valueComparer(e,t)||(e.set("checked",!0),!1)},_valueComparer:function(e,t){var i,n,o=this._value(e);return o?!!t&&(n=this._value(t),n?o==n:o==t):(i=this._text(e),!!i&&(this._text(t)?i==this._text(t):i==t))},_getAllChecked:function(){return this._allCheckedItems=[],this._allItemsAreChecked=!0,this._allItemsAreUnchecked=!0,this._dfs(this.dataSource.data(),"_getAllCheckedItems"),this._allCheckedItems},_getAllCheckedItems:function(e){return this._allItemsAreChecked&&(this._allItemsAreChecked=e.checked),this._allItemsAreUnchecked&&(this._allItemsAreUnchecked=!e.checked),e.checked&&this._allCheckedItems.push(e),!0},_traverceChildren:function(e,t,i){var n=e._childrenOptions&&e._childrenOptions.schema?e._childrenOptions.schema.data:null,o=e[n]||e.items||e.children;o&&this._dfs(o,t,i)},_toggleCheckAllItems:function(e){this._dfs(this.dataSource.data(),"_checkAllCheckItem",e)},_checkAllCheckItem:function(e,t){return e.enabled===!1?e.checked?this._disabledCheckedItems.push(e):this._disabledUnCheckedItems.push(e):e.set("checked",t),!0},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_editable:function(t){var i=this,n=i.element,o=t.disable,r=t.readonly,s=i.wrapper.add(i.filterInput).off(p),a=i._inputWrapper.off(D);i._isMultipleSelection()&&i.tagList.off(E+p),r||o?o?(s.removeAttr(A),a.addClass(x)):(s.attr(A,s.data(A)),a.removeClass(x),s.on("focusin"+p,F(i._focusinHandler,i)).on("focusout"+p,F(i._focusoutHandler,i))):(n.removeAttr(y).removeAttr(k),a.removeClass(x).on(D,i._toggleHover),i._clear.on("click"+p,F(i._clearClick,i)),s.attr(A,s.data(A)).attr(C,!1).on("keydown"+p,F(i._keydown,i)).on("focusin"+p,F(i._focusinHandler,i)).on("focusout"+p,F(i._focusoutHandler,i)),i.wrapper.on(E+p,F(i._wrapperClick,i)),this._isMultipleSelection()&&(i.tagList.on(E+p,"li.k-button",function(t){e(t.currentTarget).addClass(T)}),i.tagList.on(E+p,".k-select",function(e){i._removeTagClick(e)}))),n.attr(y,o).attr(k,r),s.attr(C,o)},_focusinHandler:function(){this._inputWrapper.addClass(T)},_focusoutHandler:function(){this._inputWrapper.removeClass(T),this._isMultipleSelection()&&this.tagList.find(w+T).removeClass(T)},_toggle:function(e){e=e!==t?e:!this.popup.visible(),this[e?I:M]()},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_focusInput:function(){this.filterInput?this.filterInput.focus():this.checkAll?this.checkAll.find(".k-checkbox").focus():this.tree.is(":visible")&&this.tree.focus()},_keydown:function(e){var i,n,o,r,s=e.keyCode,a=e.altKey,l=this.popup.visible();if(this.filterInput&&(i=this.filterInput[0]===h()),this.wrapper&&(n=this.wrapper[0]===h()),n){if(s===f.ESC)return this._clearTextAndValue(),e.preventDefault(),t;if(this._isMultipleSelection()){if(s===f.LEFT)return this._focusPrevTag(),e.preventDefault(),t;if(s===f.RIGHT)return this._focusNextTag(),e.preventDefault(),t;if(s===f.HOME)return this._focusFirstTag(),e.preventDefault(),t;if(s===f.END)return this._focusLastTag(),e.preventDefault(),t;if(s===f.DELETE)return o=this.tagList.find(w+T).first(),o.length&&(r=this._tags[o.index()],this._removeTag(r)),e.preventDefault(),t;if(s===f.BACKSPACE)return o=this.tagList.find(w+T).first(),o.length?(r=this._tags[o.index()],this._removeTag(r)):(o=this._focusLastTag(),o.length&&(r=this._tags[o.index()],this._removeTag(r))),e.preventDefault(),t}}return i&&(s===f.ESC&&this._clearFilter(),s!==f.UP||a||(this.wrapper.focus(),e.preventDefault()),_.msie&&_.version<10&&(s!==f.BACKSPACE&&s!==f.DELETE||this._search())),a&&s===f.UP||s===f.ESC?(this.wrapper.focus(),this.close(),e.preventDefault(),t):s===f.ENTER&&this._typingTimeout&&this.filterInput&&l?(e.preventDefault(),t):(s!==f.SPACEBAR||i||(this._toggle(!l),e.preventDefault()),a&&s===f.DOWN&&!l&&(this.open(),e.preventDefault()),s===f.DOWN&&l&&(this.filterInput&&!i?this.filterInput.focus():this.checkAll&&this.checkAll.is(":visible")?this.checkAll.find("input").focus():this.tree.is(":visible")&&this.tree.focus(),e.preventDefault()),t)},_focusPrevTag:function(){var e,t=this.tagList.find(w+T);t.length?(e=this.wrapper.attr("aria-activedescendant"),t.first().removeClass(T).removeAttr("id").prev().addClass(T).attr("id",e),this.wrapper.attr("aria-activedescendant",e)):this._focusLastTag()},_focusNextTag:function(){var e,t=this.tagList.find(w+T);t.length?(e=this.wrapper.attr("aria-activedescendant"),t.first().removeClass(T).removeAttr("id").next().addClass(T).attr("id",e),this.wrapper.attr("aria-activedescendant",e)):this._focusFirstTag()},_focusFirstTag:function(){var e,t=this.wrapper.attr("aria-activedescendant");return this._clearDisabledTag(),e=this.tagList.children("li").first().addClass(T).attr("id",t),this.wrapper.attr("aria-activedescendant",t),e},_focusLastTag:function(){var e,t=this.wrapper.attr("aria-activedescendant");return this._clearDisabledTag(),e=this.tagList.children("li").last().addClass(T).attr("id",t),this.wrapper.attr("aria-activedescendant",t),e},_clearDisabledTag:function(){this.tagList.find(w+T).removeClass(T).removeAttr("id")},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t)),e._typingTimeout=null},e.options.delay)},_clearFilter:function(){this.filterInput.val().length&&(this.filterInput.val(""),this._prev="",this._filtering=!0,this.treeview.dataSource.filter({}))},_removeTagClick:function(t){t.stopPropagation();var i=this._tags[e(t.currentTarget.parentElement).index()];this._removeTag(i)},_removeTag:function(e){if(e){var t=e.uid;this._uncheckItemByUid(t)}}});s.plugin(P),n=r.Class.extend({init:function(e){this._dropdowntree=e},_initWrapper:function(){this._wrapper(),this._span()},_preselect:function(e){var t=this._dropdowntree;t._selectValue(e)},_wrapper:function(){var e,t=this._dropdowntree,i=t.element,n=i[0];e=i.parent(),e.is("span.k-widget")||(e=i.wrap("<span />").parent(),e[0].style.cssText=n.style.cssText,e[0].title=n.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdowntree").addClass(n.className).css("display","").attr({accesskey:i.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),i.hide().removeAttr("accesskey")},_span:function(){var t,i=this._dropdowntree,n=i.wrapper,o="span.k-input";t=n.find(o),t[0]||(n.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(i.element),t=n.find(o)),i.span=t,i._inputWrapper=e(n[0].firstChild),i._arrow=n.find(".k-select"),i._arrowIcon=i._arrow.find(".k-icon")},_setValue:function(e){var i,n=this._dropdowntree;return e===t||null===e?(i=n._values.slice()[0],e="object"==typeof i?i:n._accessor()||i,e===t||null===e?"":e):(n._valueMethodCalled=!0,0===e.length?(n._clearTextAndValue(),n._valueMethodCalled=!1,t):(n._selectItemByValue(e),n._toggleCloseVisibility(),t))},_clearValue:function(){var e=this._dropdowntree,t=e.treeview.select();e.treeview.dataItem(t)&&(e.treeview.dataItem(t).set("selected",!1),e._valueMethodCalled||e.trigger(R))},_checkLoadedItem:function(e,t){var i=this._dropdowntree;(t&&i._valueComparer(e,t)||!t&&e.selected)&&i.treeview.select(i.treeview.findByUid(e.uid))}}),o=r.Class.extend({init:function(e){this._dropdowntree=e},_initWrapper:function(){var t=this._dropdowntree;this._tagTemplate(),t.element.attr("multiple","multiple").hide(),this._wrapper(),t._tags=new c([]),t._multipleTags=new c([]),this._tagList(),t.span=e('<span unselectable="on" class="k-input">&nbsp;</span>').insertAfter(t.tagList),t._inputWrapper=e(t.wrapper[0].firstChild)},_preselect:function(t,i){var n=this._dropdowntree,o=i||n.options.value;e.isArray(t)||t instanceof r.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof r.data.ObservableObject||!n.options.dataValueField)&&(n.dataSource.data(t),n.value(o))},_tagTemplate:function(){var e=this._dropdowntree,t=e.options,i=t.valueTemplate,n="multiple"===t.tagMode,o=t.messages.singleTag;i=i?r.template(i):e.valueTemplate,e.valueTemplate=function(t){return n?'<li class="k-button '+(t.enabled===!1?"k-state-disabled":"")+'" unselectable="on" role="option" '+(t.enabled===!1?'aria-disabled="true"':"")+'><span unselectable="on">'+i(t)+'</span><span title="'+e.options.messages.deleteTag+'" aria-label="'+e.options.messages.deleteTag+'" class="k-select"><span class="k-icon k-i-close"></span></span></li>':'<li class="k-button" unselectable="on" role="option"><span unselectable="on" data-bind="text: tags.length"></span><span unselectable="on">&nbsp;'+o+"</span></li>"}},_wrapper:function(){var t=this._dropdowntree,i=t.element,n=i.parent("span.k-dropdowntree");n[0]||(n=i.wrap('<div class="k-widget k-dropdowntree" unselectable="on" />').parent(),n[0].style.cssText=i[0].style.cssText,n[0].title=i[0].title,e('<div class="k-multiselect-wrap k-floatwrap" unselectable="on" />').insertBefore(i)),t.wrapper=n.addClass(i[0].className).css("display","").attr({role:"listbox","aria-activedescendant":r.guid(),"aria-haspopup":!0,"aria-expanded":!1}),t._innerWrapper=e(n[0].firstChild)},_tagList:function(){var t,i,n,o=this._dropdowntree,s=o._innerWrapper.children("ul");s[0]||(t="multiple"===o.options.tagMode,i=t?"tags":"multipleTag",s=e('<ul role="listbox" unselectable="on" data-template="tagTemplate" data-bind="source: '+i+'" class="k-reset"/>').appendTo(o._innerWrapper)),o.tagList=s,o.tagList.attr("id",r.guid()+"_tagList"),o.wrapper.attr("aria-owns",o.tagList.attr("id")),n=r.observable({multipleTag:o._multipleTags,tags:o._tags,tagTemplate:o.valueTemplate}),r.bind(o.tagList,n),o.tagList.attr("data-stop",!0)},_setValue:function(e){var i=this._dropdowntree,n=i._values;return e===t||null===e?i._values.slice():(i.setValue(e),i._valueMethodCalled=!0,e.length?(this._removeValues(n,e),i._checkItemByValue(e)):i._clearTextAndValue(),i._valueMethodCalled=!1,i._toggleCloseVisibility(),t)},_removeValues:function(e,t){var i,n,o=this._dropdowntree,r=this._getNewValues(e,t);for(i=0;i<r.length;i++)for(n=0;n<o._tags.length;n++)o._valueComparer(o._tags[n],r[i])&&o._uncheckItemByUid(o._tags[n].uid)},_getNewValues:function(e,t){var i,n=[];for(i=0;i<e.length;i++)t.indexOf(e[i])===-1&&n.push(e[i]);return n},_clearValue:function(){var e,t,i=this._dropdowntree,n=i._tags.slice();for(e=0;e<n.length;e++)t=n[e].uid,i._preventChangeTrigger=!0,i._uncheckItemByUid(t);n.length&&(i._preventChangeTrigger=!1,i._valueMethodCalled||i.trigger(R))},_checkLoadedItem:function(e,i){var n=this._dropdowntree;return n._noInitialValue&&e.checked?(n._checkValue(e),t):(i.length&&(i.indexOf(n._currentValue(e))!==-1||i.indexOf(e))!==-1&&!this._findTag(n._currentValue(e))&&(e.checked?n._checkValue(e):e.set("checked",!0)),t)},_findTag:function(e){var t=this._dropdowntree;return t._tags.find(function(i){return t._valueComparer(i,e)})}}),r.ui.DropDownTree.SingleSelection=n,r.ui.DropDownTree.MultipleSelection=o}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui,o=n.List,r=n.Select,s=i.caret,a=i.support,l=a.placeholder,c=i._activeElement,d=i.keys,u=".kendoComboBox",h=u+"FocusEvent",p="click"+u,f="mousedown"+u,m="disabled",g="readonly",v="change",_="k-i-loading",b="k-state-default",w="k-state-focused",y="k-state-disabled",k="aria-disabled",x="filter",C="accept",S="rebind",T="mouseenter"+u+" mouseleave"+u,D=e.proxy,A=/(\r\n|\n|\r)/gm,E=r.extend({init:function(t,n){var o,s,a=this;a.ns=u,n=e.isArray(n)?{dataSource:n}:n,r.fn.init.call(a,t,n),n=a.options,t=a.element.on("focus"+u,D(a._focusHandler,a)),n.placeholder=n.placeholder||t.attr("placeholder"),a._reset(),a._wrapper(),a._input(),a._clearButton(),a._tabindex(a.input),a._popup(),a._dataSource(),a._ignoreCase(),a._enable(),a._attachFocusEvents(),a._oldIndex=a.selectedIndex=-1,a._aria(),a._initialIndex=n.index,a.requireValueMapper(a.options),a._initList(),a._cascade(),n.autoBind?a._filterSource():(o=n.text,!o&&a._isSelect&&(o=t.children(":selected").text()),o&&a._setText(o)),o||a._placeholder(),s=e(a.element).parents("fieldset").is(":disabled"),s&&a.enable(!1),i.notify(a),a._toggleCloseVisibility()},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:1,enforceMinLength:!1,height:200,highlightFirst:!0,filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0,autoWidth:!1},events:["open","close",v,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){var t=this._listOptions(e);r.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._clearButton()},destroy:function(){var e=this;e.input.off(u),e.input.off(h),e.element.off(u),e._inputWrapper.off(u),clearTimeout(e._pasteTimeout),e._arrow.off(p+" "+f),e._clear.off(p+" "+f),r.fn.destroy.call(e)},_change:function(){var e=this,i=e.text(),n=i&&i!==e._oldText&&i!==e.options.placeholder,o=e.selectedIndex,s=o===-1;return!e.options.syncValueAndText&&!e.value()&&s&&n?(e._old="",e._oldIndex=o,e._oldText=i,e._typing||e.element.trigger(v),e.trigger(v),e._typing=!1,t):(r.fn._change.call(e),e._toggleCloseVisibility(),t)},_attachFocusEvents:function(){var e=this;e.input.on("focus"+h,D(e._inputFocus,e)).on("focusout"+h,D(e._inputFocusout,e))},_focusHandler:function(){this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(w),this._placeholder(!1)},_inputFocusout:function(){var e,i,n=this,o=n.value();return n._userTriggered=!0,n._inputWrapper.removeClass(w),clearTimeout(n._typingTimeout),n._typingTimeout=null,n.text(n.text()),e=n._focus(),i=this.listView.dataItemByIndex(this.listView.getElementIndex(e)),o!==n.value()&&n.trigger("select",{dataItem:i,item:e})?(n.value(o),t):(n._placeholder(),n._blur(),n.element.blur(),t)},_inputPaste:function(){var e=this;clearTimeout(e._pasteTimeout),e._pasteTimeout=null,e._pasteTimeout=setTimeout(function(){e.search()})},_editable:function(e){var t=this,i=e.disable,n=e.readonly,o=t._inputWrapper.off(u),r=t.element.add(t.input.off(u)),s=t._arrow.off(p+" "+f),a=t._clear;n||i?(o.addClass(i?y:b).removeClass(i?b:y),r.attr(m,i).attr(g,n).attr(k,i)):(o.addClass(b).removeClass(y).on(T,t._toggleHover),r.removeAttr(m).removeAttr(g).attr(k,!1),s.on(p,D(t._arrowClick,t)).on(f,function(e){e.preventDefault()}),a.on(p+" touchend"+u,D(t._clearValue,t)).on(f,function(e){e.preventDefault()}),t.input.on("keydown"+u,D(t._keydown,t)).on("input"+u,D(t._search,t)).on("paste"+u,D(t._inputPaste,t))),t._toggleCloseVisibility()},open:function(){var e=this,t=e._state,i=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0,n=!e.ul.find(e.listView.focus()).length;e.popup.visible()||(!e.listView.bound()&&t!==x||t===C?(e._open=!0,e._state=S,1!==e.options.minLength&&!i||i&&e.value()&&e.selectedIndex===-1?(e.refresh(),e._openPopup(),this.options.virtual||e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual?e._focusItem():n&&e.options.highlightFirst&&e.listView.focus(0)))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",D(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var e=this,i=e.options.text,n=e.options.value;e.listView.isFiltered()||(e.selectedIndex===-1?(i!==t&&null!==i||(i=n),e._accessor(n),e.input.val(i||e.input.val()),e._placeholder()):e._oldIndex===-1&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var i,n=this;n._isSelect&&(i=n._customOption,n._state===S&&(n._state=""),n._customOption=t,n._options(e,"",n.value()),i&&i[0].selected&&!n.listView._emptySearch&&n._custom(i.val()))},_updateSelection:function(){var i,n=this,o=n.listView,r=n._initialIndex,s=null!==r&&r>-1,a=n._state===x;return a?(e(o.focus()).removeClass("k-state-selected"),t):(n._fetch||(o.value().length||(s?n.select(r):n._accessor()&&o.value(n._accessor())),n._initialIndex=null,i=o.selectedDataItems()[0],i&&(n._value(i)!==n.value()?n._custom(n._value(i)):n._value(i)!==n.element[0].value&&n._accessor(n._value(i)),n.text()&&n.text()!==n._text(i)&&n._selectValue(i))),t)},_updateItemFocus:function(){var e=this.listView;this.options.highlightFirst?e.focus()||e.focusIndex()||e.focus(0):e.focus(-1)},_listBound:function(){var e=this,i=e.input[0]===c(),n=e.dataSource.flatView(),o=e.listView.skip(),r=n.length,s=e.dataSource._group?e.dataSource._group.length:0,a=o===t||0===o;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!r),e._toggleHeader(!!s&&!!r),e._resizePopup(),e.popup.position(),e._buildOptions(n),e._makeUnselectable(),e._updateSelection(),n.length&&a&&(e._updateItemFocus(),e.options.suggest&&i&&e.input.val()&&e.suggest(n[0])),e._open&&(e._open=!1,e._typingTimeout&&!i?e.popup.close():e.toggle(e._allowOpening()),e._typingTimeout=null),e._hideBusy(),e.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(e){var t,i,n;if("function"==typeof e){for(t=this.dataSource.flatView(),n=0;n<t.length;n++)if(e(t[n])){e=n,i=!0;break}i||(e=-1)}return e},_select:function(e,t){var i=this;return e=i._get(e),e===-1&&(i.input[0].value="",i._accessor("")),i.listView.select(e).done(function(){t||i._state!==x||(i._state=C),i._toggleCloseVisibility()})},_selectValue:function(e){var i=this.listView.select(),n="",o="";i=i[i.length-1],i===t&&(i=-1),this.selectedIndex=i,this.listView.isFiltered()&&i!==-1&&(this._valueBeforeCascade=this._old),i!==-1||e?((e||0===e)&&(n=this._dataValue(e),o=this._text(e)),null===n&&(n="")):(this.options.syncValueAndText?(o=this.options.dataTextField===this.options.dataValueField?this._accessor():this.input[0].value,n=o):o=this.text(),this.listView.focus(-1)),this._setDomInputValue(o),this._accessor(n!==t?n:o,i),this._placeholder(),this._triggerCascade()},_setDomInputValue:function(e){var t,i,n=this,o=s(this.input);o&&o.length&&(t=o[0]),this._prev=this.input[0].value=e,t&&this.selectedIndex===-1&&(i=a.mobileOS,i.wp||i.android?setTimeout(function(){n.input[0].setSelectionRange(t,t)},0):this.input[0].setSelectionRange(t,t))},refresh:function(){this.listView.refresh()},_toggleCloseVisibility:function(){var e=this.element.is(":disabled")||this.element.is("[readonly]");this.text()&&!e?this._showClear():this._hideClear()},suggest:function(e){var i,n=this,r=n.input[0],a=n.text(),l=s(r)[0],u=n._last;return u==d.BACKSPACE||u==d.DELETE?(n._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=n.dataSource.view()[o.inArray(e[0],n.ul[0])]),e=e?n._text(e):""),l<=0&&(l=a.toLowerCase().indexOf(e.toLowerCase())+1),e?(e=""+e,i=e.toLowerCase().indexOf(a.toLowerCase()),i>-1&&(a+=e.substring(i+a.length))):a=a.substring(0,l),a.length===l&&e||(r.value=a,r===c()&&s(r,l,a.length)),t)},text:function(e){var i,n,r,s,a,l;return e=null===e?"":e,i=this,n=i.input[0],r=i.options.ignoreCase,s=e,e===t?n.value:i.options.autoBind!==!1||i.listView.bound()?(a=i.dataItem(),a&&i._text(a).replace&&i._text(a).replace(A,"")===e&&(l=i._value(a),l===o.unifyType(i._old,typeof l))?(i._triggerCascade(),t):(r&&(s=s.toLowerCase()),i._select(function(e){return e=i._text(e),r&&(e=(e+"").toLowerCase()),e===s}).done(function(){i.selectedIndex<0&&(n.value=e,i.options.syncValueAndText&&i._accessor(e),i._cascadeTriggered=!0,i._triggerCascade()),i._prev=n.value}),i._toggleCloseVisibility(),t)):(i._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var i=this,n=i.options,o=i.listView;return e===t?(e=i._accessor()||i.listView.value()[0],e===t||null===e?"":e):(i.requireValueMapper(i.options,e),i.trigger("set",{value:e}),e===n.value&&i.input.val()===n.text||(i._accessor(e),i._isFilterEnabled()&&o.bound()&&o.isFiltered()?i._clearFilter():i._fetchData(),o.value(e).done(function(){i.selectedIndex!==-1||o._selectedDataItems&&o._selectedDataItems.length||(i._accessor(e),i.input.val(e),i._placeholder(!0)),i._old=i._accessor(),i._oldIndex=i.selectedIndex,i._prev=i.input.val(),i._state===x&&(i._state=C),i._toggleCloseVisibility()})),t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(_),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var i=this,n=e.item,r=i.listView.dataItemByIndex(i.listView.getElementIndex(n)),s=!0;return e.preventDefault(),r&&(s=i._value(r)!==o.unifyType(i.value(),typeof i._value(r)),s||i.input.val(i._text(r))),s&&i.trigger("select",{dataItem:r,item:n})?(i.close(),t):(i._userTriggered=!0,i._select(n).done(function(){i._blur()}),t)},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var i,n=this,o=n.options,r=n.dataSource,s=o.ignoreCase,a=function(i){var o=n._text(i);if(o!==t)return o+="",(""===o||""!==e)&&(s&&(o=o.toLowerCase()),0===o.indexOf(e))};return s&&(e=e.toLowerCase()),n.ul[0].firstChild?(this.listView.focus(this._get(a)),
i=this.listView.focus(),i&&(o.suggest&&n.suggest(i),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(r.one(v,function(){r.view()[0]&&n.search(e)}).fetch(),t)},_input:function(){var t,i,n=this,o=n.element.removeClass("k-input")[0],r=o.accessKey,s=n.wrapper,a="input.k-input",c=o.name||"";c&&(c='name="'+c+'_input" '),t=s.find(a),t[0]||(s.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input '+c+'class="k-input" type="text" autocomplete="off"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(n.element),t=s.find(a)),t[0].style.cssText=o.style.cssText,t[0].title=o.title,i=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),i>-1&&(t[0].maxLength=i),t.addClass(o.className).css({width:"",height:o.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),l&&t.attr("placeholder",n.options.placeholder),r&&(o.accessKey="",t[0].accessKey=r),n._focused=n.input=t,n._inputWrapper=e(s[0].firstChild),n._arrow=s.find(".k-select").attr({role:"button",tabIndex:-1}),n._arrowIcon=n._arrow.find(".k-icon"),o.id&&n._arrow.attr("aria-controls",n.ul[0].id)},_clearButton:function(){o.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t,i,n,r=this,s=e.keyCode;if(r._last=s,clearTimeout(r._typingTimeout),r._typingTimeout=null,s===d.HOME)r._firstItem();else if(s===d.END)r._lastItem();else if(s===d.ENTER||s===d.TAB)if(t=r.listView.focus(),i=r.dataItem(),n=!0,r.popup.visible()||i&&r.text()===r._text(i)||(t=null),t){if(r.popup.visible()&&e.preventDefault(),i=r.listView.dataItemByIndex(r.listView.getElementIndex(t)),i&&(n=r._value(i)!==o.unifyType(r.value(),typeof r._value(i))),n&&r.trigger("select",{dataItem:i,item:t}))return;r._userTriggered=!0,r._select(t).done(function(){r._blur(),r._valueBeforeCascade=r._old=r.value()})}else(r._syncValueAndText()||r._isSelect)&&r._accessor(r.input.val()),r.listView.value(r.input.val()),r._blur();else s==d.TAB||r._move(e)?s===d.ESC&&!r.popup.visible()&&r.text()&&r._clearValue():r._search()},_placeholder:function(e){if(!l){var i,n=this,o=n.input,r=n.options.placeholder;if(r){if(i=n.value(),e===t&&(e=!i),o.toggleClass("k-readonly",e),!e){if(i)return;r=""}o.val(r),r||o[0]!==c()||s(o[0],0,0)}}},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e.text();e._prev!==t&&(e._prev=t,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(t),e._toggleCloseVisibility()),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,i=t.parent();i.is("span.k-widget")||(i=t.hide().wrap("<span />").parent(),i[0].style.cssText=t[0].style.cssText),e.wrapper=i.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")},_clearSelection:function(e,t){var i=this,n=e.value(),o=n&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!n||o)&&(i.options.value="",i.value(""),i._selectedValue=null)},_preselect:function(e,t){this.input.val(t),this._accessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._placeholder(),this._initialIndex=null,this._presetValue=!0,this._toggleCloseVisibility()}});n.plugin(E)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.multiselect.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function i(e,t){var i;if(null===e&&null!==t||null!==e&&null===t)return!1;if(i=e.length,i!==t.length)return!1;for(;i--;)if(e[i]!==t[i])return!1;return!0}var n=window.kendo,o=n.ui,r=o.List,s=e.extend({A:65},n.keys),a=n._activeElement,l=n.data.ObservableArray,c=e.proxy,d="id",u="li",h="accept",p="filter",f="rebind",m="open",g="close",v="change",_="progress",b="select",w="deselect",y="aria-disabled",k="k-state-focused",x="k-state-selected",C="k-hidden",S="k-state-hover",T="k-state-disabled",D="disabled",A="readonly",E=".kendoMultiSelect",I="click"+E,M="keydown"+E,R="mouseenter"+E,F="mouseleave"+E,P=R+" "+F,z=/"/g,B=e.isArray,L=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],H=r.extend({init:function(t,i){var o,s,a=this;a.ns=E,r.fn.init.call(a,t,i),a._optionsMap={},a._customOptions={},a._wrapper(),a._tagList(),a._input(),a._textContainer(),a._loader(),a._clearButton(),a._tabindex(a.input),t=a.element.attr("multiple","multiple").hide(),i=a.options,i.placeholder||(i.placeholder=t.data("placeholder")),o=t.attr(d),o&&(a._tagID=o+"_tag_active",o+="_taglist",a.tagList.attr(d,o),a.input.attr("aria-describedby",o)),a._initialOpen=!0,a._aria(o),a._dataSource(),a._ignoreCase(),a._popup(),a._tagTemplate(),a.requireValueMapper(a.options),a._initList(),a._reset(),a._enable(),a._placeholder(),i.autoBind?a.dataSource.fetch():i.value&&a._preselect(i.value),s=e(a.element).parents("fieldset").is(":disabled"),s&&a.enable(!1),n.notify(a),a._toggleCloseVisibility()},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,autoWidth:!1},events:[m,g,v,b,w,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),this.persistTagList=!1,this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(e){var t=this._listOptions(e);r.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(d)),this._tagTemplate(),this._placeholder(),this._clearButton()},currentTag:function(e){var i=this;return e===t?i._currentTag:(i._currentTag&&(i._currentTag.removeClass(k).removeAttr(d),i.input.removeAttr("aria-activedescendant")),e&&(e.addClass(k).attr(d,i._tagID),i.input.attr("aria-activedescendant",i._tagID)),i._currentTag=e,t)},dataItems:function(){return this.listView.selectedDataItems()},destroy:function(){var e=this,t=e.ns;clearTimeout(e._busy),clearTimeout(e._typingTimeout),e.wrapper.off(t),e.tagList.off(t),e.input.off(t),e._clear.off(t),r.fn.destroy.call(e)},_activateItem:function(){this.popup.visible()&&r.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var i=this,o=r.fn._listOptions.call(i,e.extend(t,{selectedItemChange:c(i._selectedItemChange,i),selectable:"multiple"})),s=this.options.itemTemplate||this.options.template,a=o.itemTemplate||s||o.template;return a||(a="#:"+n.expr(o.dataTextField,"data")+"#"),o.template=a,o},_setListValue:function(){r.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var i,n=this.dataSource.flatView(),o=this._optionsMap,r=this._value;for(this._state===f&&(this._state=""),i=0;i<e.added.length;i++)if(o[r(e.added[i].dataItem)]===t){this._render(n);break}this._selectValue(e.added,e.removed)},_selectedItemChange:function(e){var t,i,n=e.items;for(i=0;i<n.length;i++)t=n[i],this.tagList.children().eq(t.index).children("span:first").html(this.tagTextTemplate(t.item))},_wrapperMousedown:function(t){var i=this,o="input"!==t.target.nodeName.toLowerCase(),r=e(t.target),s=r.hasClass("k-select")||r.hasClass("k-icon");s&&(s=!r.closest(".k-select").children(".k-i-arrow-60-down").length),!o||s&&n.support.mobileOS||t.preventDefault(),s||(i.input[0]!==a()&&o&&i.input.focus(),1===i.options.minLength&&i.open())},_inputFocus:function(){this._placeholder(!1),this.wrapper.addClass(k)},_inputFocusout:function(){var e=this;clearTimeout(e._typingTimeout),e.wrapper.removeClass(k),e._placeholder(!e.listView.selectedDataItems()[0],!0),e.close(),e._state===p&&(e._state=h,e.listView.skipUpdate(!0)),e.listView.bound()&&e.listView.isFiltered()&&(e.persistTagList=!0,e._clearFilter()),e.element.blur()},_removeTag:function(e,i){var n,o,r=this,s=r._state,a=e.index(),l=r.listView,c=l.value()[a],d=r.listView.selectedDataItems()[a],u=r._customOptions[c];return r.trigger(w,{dataItem:d,item:e})?(r._close(),t):(u!==t||s!==h&&s!==p||(u=r._optionsMap[c]),o=function(){r.currentTag(null),i&&r._change(),r._close()},u===t?(r.persistTagList=!1,l.select(l.select()[a]).done(o)):(n=r.element[0].children[u],n.selected=!1,l.removeAt(a),e.remove(),o()),t)},_tagListClick:function(t){var i=e(t.currentTarget);i.children(".k-i-arrow-60-down").length||this._removeTag(i.closest(u),!0)},_clearClick:function(){var t=this;"single"===t.options.tagMode?t.value([]):t.tagList.children().each(function(i,n){t._removeTag(e(n),!1)}),t.input.val(""),t._search(),t._change(),t.focus(),t._hideClear(),t._state===p&&(t._state=h)},_editable:function(t){var i=this,n=t.disable,o=t.readonly,r=i.wrapper.off(E),s=i.tagList.off(E),a=i.element.add(i.input.off(E));o||n?(n?r.addClass(T):r.removeClass(T),a.attr(D,n).attr(A,o).attr(y,n)):(r.removeClass(T).on(P,i._toggleHover).on("mousedown"+E+" touchend"+E,c(i._wrapperMousedown,i)),i.input.on(M,c(i._keydown,i)).on("paste"+E,c(i._search,i)).on("input"+E,c(i._search,i)).on("focus"+E,c(i._inputFocus,i)).on("focusout"+E,c(i._inputFocusout,i)),i._clear.on(I+E+" touchend"+E,c(i._clearClick,i)),a.removeAttr(D).removeAttr(A).attr(y,!1),s.on(R,u,function(){e(this).addClass(S)}).on(F,u,function(){e(this).removeClass(S)}).on(I,"li.k-button .k-select",c(i._tagListClick,i)))},_close:function(){var e=this;e.options.autoClose?e.close():e.popup.position()},_filterSource:function(e,t){t||(t=this._retrieveData),this._retrieveData=!1,r.fn._filterSource.call(this,e,t)},close:function(){this._activeItem=null,this.input.removeAttr("aria-activedescendant"),this.popup.close()},open:function(){var t=this;t._request&&(t._retrieveData=!1),t._retrieveData||!t.listView.bound()||t._state===h?(t._open=!0,t._state=f,t.listView.skipUpdate(!0),t.persistTagList=!(t._initialOpen&&!t.listView.bound()),t._filterSource(),t._focusItem()):t._allowOpening()&&(!t._initialOpen||t.options.autoBind||t.options.virtual||!t.options.value||e.isPlainObject(t.options.value[0])||t.value(t._initialValues),t.popup._hovered=!0,t._initialOpen=!1,t.popup.open(),t._focusItem())},toggle:function(e){e=e!==t?e:!this.popup.visible(),this[e?m:g]()},refresh:function(){this.listView.refresh()},_listBound:function(){var e=this,i=e.dataSource.flatView(),n=e.listView.skip();e._render(i),e._renderFooter(),e._renderNoData(),e._toggleNoData(!i.length),e._resizePopup(),e._open&&(e._open=!1,e.toggle(e._allowOpening())),e.popup.position(),!e.options.highlightFirst||n!==t&&0!==n||e.listView.focusFirst(),e._touchScroller&&e._touchScroller.reset(),e._hideBusy(),e._makeUnselectable(),e.trigger("dataBound")},_inputValue:function(){var e=this,t=e.input.val();return e.options.placeholder===t&&(t=""),t},value:function(e){var i=this,n=i.listView,o=n.value().slice(),r=i.options.maxSelectedItems,s=n.bound()&&n.isFiltered();return e===t?o:(i.persistTagList=!1,i.requireValueMapper(i.options,e),e=i._normalizeValues(e),null!==r&&e.length>r&&(e=e.slice(0,r)),s&&i._clearFilter(),n.value(e),i._old=n.value(),s||i._fetchData(),i._toggleCloseVisibility(),t)},_preselect:function(t,i){var o=this;B(t)||t instanceof n.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof n.data.ObservableObject||!o.options.dataValueField)&&(o.dataSource.data(t),o.value(i||o._initialValues),o._retrieveData=!0)},_setOption:function(e,t){var i=this.element[0].children[this._optionsMap[e]];i&&(i.selected=t)},_fetchData:function(){var e=this,t=!!e.dataSource.view().length,i=0===e.listView.value().length;i||e._request||(e._retrieveData||!e._fetch&&!t)&&(e._fetch=!0,e._retrieveData=!1,e.dataSource.read().done(function(){e._fetch=!1}))},_isBound:function(){return this.listView.bound()&&!this._retrieveData},_dataSource:function(){var e=this,t=e.element,i=e.options,o=i.dataSource||{};o=B(o)?{data:o}:o,o.select=t,o.fields=[{field:i.dataTextField},{field:i.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=c(e._showBusy,e),e._errorHandler=c(e._hideBusy,e)),e.dataSource=n.data.DataSource.create(o).bind(_,e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initialValues),t._placeholder()})},t._form=o.on("reset",t._resetHandler))},_initValue:function(){var e=this.options.value||this.element.val();this._old=this._initialValues=this._normalizeValues(e)},_normalizeValues:function(t){var i=this;return null===t?t=[]:t&&e.isPlainObject(t)?t=[i._value(t)]:t&&e.isPlainObject(t[0])?t=e.map(t,function(e){return i._value(e)}):B(t)||t instanceof l?B(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();i(t,e._old)||(e._old=t.slice(),e.trigger(v),e.element.trigger(v)),e.popup.position(),e._toggleCloseVisibility()},_click:function(e){var t=this,i=e.item;e.preventDefault(),t._select(i).done(function(){t._activeItem=i,t._change(),t._close()})},_getActiveItem:function(){return this._activeItem||e(this.listView.items()[this._getSelectedIndices().length-1])||this.listView.focus()},_getSelectedIndices:function(){return this.listView._selectedIndices||this.listView._selectedIndexes},_keydown:function(i){var o,r,a,l,c=this,d=i.keyCode,u=c._currentTag,p=c.listView,f=c.input.val(),m=n.support.isRtl(c.wrapper),g=c.popup.visible(),v=0;if(d!==s.ENTER&&(this._multipleSelection=!1),d===s.DOWN){if(i.preventDefault(),!g)return c.open(),p.focus()||p.focusFirst(),t;p.focus()?(!c._activeItem&&i.shiftKey&&(c._activeItem=p.focus(),v=-1),o=p.getElementIndex(c._getActiveItem().first()),p.focusNext(),p.focus()?i.shiftKey&&(this._multipleSelection=!0,c._selectRange(o,p.getElementIndex(p.focus().first())+v)):p.focusLast()):p.focusFirst()}else if(d===s.UP)g&&(!c._activeItem&&i.shiftKey&&(c._activeItem=p.focus(),v=1),o=p.getElementIndex(c._getActiveItem().first()),p.focusPrev(),p.focus()?i.shiftKey&&(this._multipleSelection=!0,c._selectRange(o,p.getElementIndex(p.focus().first())+v)):c.close()),i.preventDefault();else if(d===s.LEFT&&!m||d===s.RIGHT&&m)f||(u=u?u.prev():e(c.tagList[0].lastChild),u[0]&&c.currentTag(u));else if(d===s.RIGHT&&!m||d===s.LEFT&&m)!f&&u&&(u=u.next(),c.currentTag(u[0]?u:null));else if(i.ctrlKey&&!i.altKey&&d===s.A&&g&&!c.options.virtual)this._multipleSelection=!0,this._getSelectedIndices().length===p.items().length&&(c._activeItem=null),p.items().length&&c._selectRange(0,p.items().length-1);else if(d===s.ENTER&&g){if(!p.focus())return;if(i.preventDefault(),this._multipleSelection&&(this._multipleSelection=!1,p.focus().hasClass(x)))return c._close(),t;c._select(p.focus()).done(function(){c._change(),c._close()})}else if(d===s.SPACEBAR&&i.ctrlKey&&g)c._activeItem&&p.focus()&&p.focus()[0]===c._activeItem[0]&&(c._activeItem=null),e(p.focus()).hasClass(x)||(c._activeItem=p.focus()),c._select(p.focus()).done(function(){c._change()}),i.preventDefault();else if(d===s.SPACEBAR&&i.shiftKey&&g)r=p.getElementIndex(c._getActiveItem()),a=p.getElementIndex(p.focus()),r!==t&&a!==t&&c._selectRange(r,a),i.preventDefault();else if(d===s.ESC)g?i.preventDefault():(c.tagList.children().each(function(t,i){c._removeTag(e(i),!1)}),c._change()),c.close();else if(d===s.HOME)g?p.focus()?(i.ctrlKey&&i.shiftKey&&!c.options.virtual&&c._selectRange(p.getElementIndex(p.focus()[0]),0),p.focusFirst()):c.close():f||(u=c.tagList[0].firstChild,u&&c.currentTag(e(u)));else if(d===s.END)g?p.focus()?(i.ctrlKey&&i.shiftKey&&!c.options.virtual&&c._selectRange(p.getElementIndex(p.focus()[0]),p.element.children().length-1),p.focusLast()):c.close():f||(u=c.tagList[0].lastChild,u&&c.currentTag(e(u)));else if(d!==s.DELETE&&d!==s.BACKSPACE||f)!c.popup.visible()||d!==s.PAGEDOWN&&d!==s.PAGEUP?(clearTimeout(c._typingTimeout),setTimeout(function(){c._scale()}),c._search()):(i.preventDefault(),l=d===s.PAGEDOWN?1:-1,p.scrollWith(l*p.screenHeight()));else{if(c._state=h,"single"===c.options.tagMode)return p.value([]),c._change(),c._close(),t;d!==s.BACKSPACE||u||(u=e(c.tagList[0].lastChild)),u&&u[0]&&c._removeTag(u,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr("aria-busy",!1),e._loading.addClass(C),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(C),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(c(e._showBusyHandler,e),100))},_placeholder:function(e,i){var o=this,r=o.input,s=a(),l=o.options.placeholder,c=r.val(),d=r[0]===s,u=c.length;d&&!o.options.autoClose&&c!==l||(u=0,c=""),e===t&&(e=!1,r[0]!==s&&(e=!o.listView.selectedDataItems()[0])),o._prev=c,r.toggleClass("k-readonly",e).val(e?l:c),d&&!i&&n.caret(r[0],u,u),o._scale()},_scale:function(){var e,t=this,i=t.wrapper.find(".k-multiselect-wrap"),n=i.width(),o=t._span.text(t.input.val());i.is(":visible")?e=o.width()+25:(o.appendTo(document.documentElement),n=e=o.width()+25,o.appendTo(i)),t.input.width(e>n?n:e)},_option:function(e,i,o){var r="<option";return e!==t&&(e+="",e.indexOf('"')!==-1&&(e=e.replace(z,"&quot;")),r+=' value="'+e+'"'),o&&(r+=" selected"),r+=">",i!==t&&(r+=n.htmlEncode(i)),r+="</option>"},_render:function(e){var t,i,n,o,r,s,a=this.listView.selectedDataItems(),l=this.listView.value(),c=e.length,d="";for(l.length!==a.length&&(a=this._buildSelectedItems(l)),r={},s={},o=0;o<c;o++)i=e[o],n=this._value(i),t=this._selectedItemIndex(n,a),t!==-1&&a.splice(t,1),s[n]=o,d+=this._option(n,this._text(i),t!==-1);if(a.length)for(o=0;o<a.length;o++)i=a[o],n=this._value(i),r[n]=c,s[n]=c,c+=1,d+=this._option(n,this._text(i),!0);this._customOptions=r,this._optionsMap=s,this.element.html(d)},_buildSelectedItems:function(e){var t,i,n=this.options.dataValueField,o=this.options.dataTextField,r=[];for(i=0;i<e.length;i++)t={},t[n]=e[i],t[o]=e[i],r.push(t);return r},_selectedItemIndex:function(e,t){for(var i=this._value,n=0;n<t.length;n++)if(e===i(t[n]))return n;return-1},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e._inputValue();e._prev!==t&&(e._prev=t,e.search(t),e._toggleCloseVisibility())},e.options.delay)},_toggleCloseVisibility:function(){this.value().length||this.input.val()&&this.input.val()!==this.options.placeholder?this._showClear():this._hideClear()},_allowOpening:function(){return this._allowSelection()&&r.fn._allowOpening.call(this)},_allowSelection:function(){var e=this.options.maxSelectedItems;return null===e||e>this.listView.value().length},_angularTagItems:function(t){var i=this;i.angular(t,function(){return{elements:i.tagList[0].children,data:e.map(i.dataItems(),function(e){return{dataItem:e}})}})},updatePersistTagList:function(e,t){this.persistTagList.added&&this.persistTagList.added.length===t.length&&this.persistTagList.removed&&this.persistTagList.removed.length===e.length?this.persistTagList=!1:(this.listView._removedAddedIndexes=this._old.slice(),this.persistTagList={added:e,removed:t})},_selectValue:function(e,i){var n,o,r,s=this,a=s.value(),l=s.dataSource.total(),c=s.tagList,d=s._value;if(this.persistTagList)return this.updatePersistTagList(e,i),t;if(s._angularTagItems("cleanup"),"multiple"===s.options.tagMode){for(r=i.length-1;r>-1;r--)n=i[r],c.children().length&&(c[0].removeChild(c[0].children[n.position]),s._setOption(d(n.dataItem),!1));for(r=0;r<e.length;r++)o=e[r],c.append(s.tagTemplate(o.dataItem)),s._setOption(d(o.dataItem),!0)}else{for((!s._maxTotal||s._maxTotal<l)&&(s._maxTotal=l),c.html(""),a.length&&c.append(s.tagTemplate({values:a,dataItems:s.dataItems(),maxTotal:s._maxTotal,currentTotal:l})),r=i.length-1;r>-1;r--)s._setOption(d(i[r].dataItem),!1);for(r=0;r<e.length;r++)s._setOption(d(e[r].dataItem),!0)}s._angularTagItems("compile"),s._placeholder()},_select:function(t){var i,n,o,r,s=e.Deferred().resolve();return t?(i=this,n=i.listView,o=n.dataItemByIndex(n.getElementIndex(t)),r=t.hasClass("k-state-selected"),i._state===f&&(i._state=""),i._allowSelection()||r?i.trigger(r?w:b,{dataItem:o,item:t})?(i._close(),s):(i.persistTagList=!1,n.select(t).done(function(){i._placeholder(),i._state===p&&(i._state=h,n.skipUpdate(!0))})):s):s},_selectRange:function(i,n){var o,r,s=this,a=this.listView,l=this.options.maxSelectedItems,c=this._getSelectedIndices().slice(),d=[],u=function(t){a.select(t).done(function(){t.forEach(function(t){var i=a.dataItemByIndex(t),n=a.element.children()[t],o=e(n).hasClass("k-state-selected");s.trigger(o?b:w,{dataItem:i,item:e(n)})}),s._change()})};if(c.length-1===n-i)return u(c);if(i<n)for(o=i;o<=n;o++)d.push(o);else for(o=i;o>=n;o--)d.push(o);for(null!==l&&d.length>l&&(d=d.slice(0,l)),o=0;o<d.length;o++)r=d[o],this._getSelectedIndices().indexOf(r)==-1?c.push(r):c.splice(c.indexOf(r),1);return c.length?(s.persistTagList=!1,u(c)):t},_input:function(){var t=this,i=t.element,n=i[0].accessKey,o=t._innerWrapper.children("input.k-input");o[0]||(o=e('<input class="k-input" style="width: 25px" />').appendTo(t._innerWrapper)),i.removeAttr("accesskey"),t._focused=t.input=o.attr({accesskey:n,autocomplete:"off",role:"listbox",title:i[0].title,"aria-expanded":!1})},_tagList:function(){var t=this,i=t._innerWrapper.children("ul");i[0]||(i=e('<ul role="listbox" unselectable="on" class="k-reset"/>').appendTo(t._innerWrapper)),t.tagList=i},_tagTemplate:function(){var e,t=this,i=t.options,o=i.tagTemplate,r=i.dataSource,s="multiple"===i.tagMode;t.element[0].length&&!r&&(i.dataTextField=i.dataTextField||"text",i.dataValueField=i.dataValueField||"value"),e=s?n.template("#:"+n.expr(i.dataTextField,"data")+"#",{useWithBlock:!1}):n.template("#:values.length# item(s) selected"),t.tagTextTemplate=o=o?n.template(o):e,t.tagTemplate=function(e){return'<li class="k-button" unselectable="on"><span unselectable="on">'+o(e)+'</span><span unselectable="on" aria-label="'+(s?"delete":"open")+'" class="k-select"><span class="k-icon '+(s?"k-i-close":"k-i-arrow-60-down")+'"></span></span></li>'}},_loader:function(){this._loading=e('<span class="k-icon k-i-loading '+C+'"></span>').insertAfter(this.input)},_clearButton:function(){r.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-multiselect-clearable"))},_textContainer:function(){var t=n.getComputedStyles(this.input[0],L);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=e("<span/>").css(t).appendTo(this.wrapper)},_wrapper:function(){var t=this,i=t.element,n=i.parent("span.k-multiselect");n[0]||(n=i.wrap('<div class="k-widget k-multiselect" unselectable="on" />').parent(),n[0].style.cssText=i[0].style.cssText,n[0].title=i[0].title,e('<div class="k-multiselect-wrap k-floatwrap" unselectable="on" />').insertBefore(i)),t.wrapper=n.addClass(i[0].className).css("display",""),t._innerWrapper=e(n[0].firstChild)}});o.plugin(H)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.multicolumncombobox.min",["kendo.combobox.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui,o=n.ComboBox,r=/^\d+(\.\d+)?%$/i,s="k-dropdowngrid",a="k-dropdowngrid-popup k-popup-flush",l=o.extend({init:function(e,t){o.fn.init.call(this,e,t),this.list.addClass(a),this._allColumnsWidthsAreSet(this.options)?this.list.width(this._calculateDropDownWidth(this.options)):this.options.dropDownWidth&&this.list.width(this.options.dropDownWidth)},options:{name:"MultiColumnComboBox",ns:".kendoMultiColumnComboBox",columns:[],dropDownWidth:null,filterFields:[]},setOptions:function(e){o.fn.setOptions.call(this,e),this._allColumnsWidthsAreSet(e)?this.list.width(this._calculateDropDownWidth(e)):this.options.dropDownWidth&&this.list.width(this.options.dropDownWidth)},_allColumnsWidthsAreSet:function(e){var t,i,n=e.columns;if(!n||!n.length)return!1;for(t=0;t<n.length;t++)if(i=n[t].width,!i||isNaN(parseInt(i,10))||r.test(i))return!1;return!0},_calculateDropDownWidth:function(e){var t,n,o=e.columns,r=i.support.scrollbar();for(t=0;t<o.length;t++)n=o[t].width,r+=parseInt(n,10);return r},_wrapper:function(){o.fn._wrapper.call(this),this.wrapper.addClass(s)}});n.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.slider.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function i(e,t,i){var n=i?" k-slider-horizontal":" k-slider-vertical",o=e.style?e.style:t.attr("style"),r=t.attr("class")?" "+t.attr("class"):"",s="";return"bottomRight"==e.tickPlacement?s=" k-slider-bottomright":"topLeft"==e.tickPlacement&&(s=" k-slider-topleft"),o=o?" style='"+o+"'":"","<div class='k-widget k-slider"+n+r+"'"+o+"><div class='k-slider-wrap"+(e.showButtons?" k-slider-buttons":"")+s+"'></div></div>"}function n(e,t,i,n){var o="";return o=i?!n&&"increase"==t||n&&"increase"!=t?"k-i-arrow-60-right":"k-i-arrow-60-left":"increase"==t?"k-i-arrow-60-up":"k-i-arrow-60-down","<a class='k-button k-button-"+t+"' title='"+e[t+"ButtonTitle"]+"' aria-label='"+e[t+"ButtonTitle"]+"'><span class='k-icon "+o+"'></span></a>"}function o(e,t){var i,n="<ul class='k-reset k-slider-items'>",o=S.floor(d(t/e.smallStep))+1;for(i=0;i<o;i++)n+="<li class='k-tick' role='presentation'>&nbsp;</li>";return n+="</ul>"}function r(e,t){var i=t.is("input")?1:2,n=2==i?e.leftDragHandleTitle:e.dragHandleTitle;return"<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='"+n+"' role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(i>1?e.selectionStart||e.min:e.value||e.min)+"'>Drag</a>"+(i>1?"<a href='#' class='k-draghandle' title='"+e.rightDragHandleTitle+"'role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(e.selectionEnd||e.max)+"'>Drag</a>":"")+"</div>"}function s(e){return function(t){return t+e}}function a(e){return function(){return e}}function l(e){return(e+"").replace(".",m.cultures.current.numberFormat["."])}function c(e){var t=""+e,i=0;return t=t.split("."),t[1]&&(i=t[1].length),i=i>10?10:i}function d(e){var t,i;return e=parseFloat(e,10),t=c(e),i=S.pow(10,t||0),S.round(e*i)/i}function u(e,i){var n=k(e.getAttribute(i));return null===n&&(n=t),n}function h(e){return typeof e!==Q}function p(e){return 1e4*e}var f,m=window.kendo,g=m.ui.Widget,v=m.ui.Draggable,_=m._outerWidth,b=m._outerHeight,w=e.extend,y=m.format,k=m.parseFloat,x=e.proxy,C=e.isArray,S=Math,T=m.support,D=T.pointers,A=T.msPointers,E="change",I="slide",M=".slider",R="touchstart"+M+" mousedown"+M,F=D?"pointerdown"+M:A?"MSPointerDown"+M:R,P="touchend"+M+" mouseup"+M,z=D?"pointerup":A?"MSPointerUp"+M:P,B="moveSelection",L="keydown"+M,H="click"+M,N="mouseover"+M,O="focus"+M,V="blur"+M,W=".k-draghandle",U=".k-slider-track",q=".k-tick",j="k-state-selected",G="k-state-focused",$="k-state-default",K="k-state-disabled",Y="disabled",Q="undefined",X="tabindex",Z=m.getTouches,J=g.extend({init:function(e,t){var i,n=this;if(g.fn.init.call(n,e,t),t=n.options,n._isHorizontal="horizontal"==t.orientation,n._isRtl=n._isHorizontal&&m.support.isRtl(e),n._position=n._isHorizontal?"left":"bottom",n._sizeFn=n._isHorizontal?"width":"height",n._outerSize=n._isHorizontal?_:b,t.tooltip.format=t.tooltip.enabled?t.tooltip.format||"{0}":"{0}",t.smallStep<=0)throw Error("Kendo UI Slider smallStep must be a positive number.");n._createHtml(),n.wrapper=n.element.closest(".k-slider"),n._trackDiv=n.wrapper.find(U),n._setTrackDivWidth(),n._maxSelection=n._trackDiv[n._sizeFn](),n._sliderItemsInit(),n._reset(),n._tabindex(n.wrapper.find(W)),n[t.enabled?"enable":"disable"](),i=m.support.isRtl(n.wrapper)?-1:1,n._keyMap={37:s(-1*i*t.smallStep),40:s(-t.smallStep),39:s(1*i*t.smallStep),38:s(+t.smallStep),35:a(t.max),36:a(t.min),33:s(+t.largeStep),34:s(-t.largeStep)},m.notify(n)},events:[E,I],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return d(this.options.max-this.options.min)},_resize:function(){this._setTrackDivWidth(),this.wrapper.find(".k-slider-items").remove(),this._maxSelection=this._trackDiv[this._sizeFn](),this._sliderItemsInit(),this._refresh(),this.options.enabled&&this.enable(!0)},_sliderItemsInit:function(){var t=this,i=t.options,n=t._maxSelection/((i.max-i.min)/i.smallStep),r=t._calculateItemsWidth(S.floor(t._distance()/i.smallStep));"none"!=i.tickPlacement&&n>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(o(i,t._distance())),t._setItemsWidth(r),t._setItemsTitle()),t._calculateSteps(r),"none"!=i.tickPlacement&&n>=2&&i.largeStep>=i.smallStep&&t._setItemsLargeTick()},getSize:function(){return m.dimensions(this.wrapper)},_setTrackDivWidth:function(){var e=this,t=2*parseFloat(e._trackDiv.css(e._isRtl?"right":e._position),10);e._trackDiv[e._sizeFn](e.wrapper[e._sizeFn]()-2-t)},_setItemsWidth:function(t){var i,n=this,o=n.options,r=0,s=t.length-1,a=n.wrapper.find(q),l=0,c=2,d=a.length,u=0;for(i=0;i<d-2;i++)e(a[i+1])[n._sizeFn](t[i]);if(n._isHorizontal?(e(a[r]).addClass("k-first")[n._sizeFn](t[s-1]),e(a[s]).addClass("k-last")[n._sizeFn](t[s])):(e(a[s]).addClass("k-first")[n._sizeFn](t[s]),e(a[r]).addClass("k-last")[n._sizeFn](t[s-1])),n._distance()%o.smallStep!==0&&!n._isHorizontal){for(i=0;i<t.length;i++)u+=t[i];l=n._maxSelection-u,l+=parseFloat(n._trackDiv.css(n._position),10)+c,n.wrapper.find(".k-slider-items").css("padding-top",l)}},_setItemsTitle:function(){for(var t=this,i=t.options,n=t.wrapper.find(q),o=i.min,r=n.length,s=t._isHorizontal&&!t._isRtl?0:r-1,a=t._isHorizontal&&!t._isRtl?r:-1,l=t._isHorizontal&&!t._isRtl?1:-1;s-a!==0;s+=l)e(n[s]).attr("title",y(i.tooltip.format,d(o))),o+=i.smallStep},_setItemsLargeTick:function(){var t,i,n,o=this,r=o.options,s=o.wrapper.find(q),a=0;if(p(r.largeStep)%p(r.smallStep)===0||o._distance()/r.largeStep>=3)for(o._isHorizontal||o._isRtl||(s=e.makeArray(s).reverse()),a=0;a<s.length;a++)t=e(s[a]),i=o._values[a],n=d(p(i-this.options.min)),n%p(r.smallStep)===0&&n%p(r.largeStep)===0&&(t.addClass("k-tick-large").html("<span class='k-label'>"+t.attr("title")+"</span>"),0!==a&&a!==s.length-1&&t.css("line-height",t[o._sizeFn]()+"px"))},_calculateItemsWidth:function(e){var t,i,n,o=this,r=o.options,s=parseFloat(o._trackDiv.css(o._sizeFn))+1,a=o._distance(),l=s/a;for(a/r.smallStep-S.floor(a/r.smallStep)>0&&(s-=a%r.smallStep*l),t=s/e,i=[],n=0;n<e-1;n++)i[n]=t;return i[e-1]=i[e]=t/2,o._roundWidths(i)},_roundWidths:function(e){var t,i=0,n=e.length;for(t=0;t<n;t++)i+=e[t]-S.floor(e[t]),e[t]=S.floor(e[t]);return i=S.round(i),this._addAdditionalSize(i,e)},_addAdditionalSize:function(e,t){if(0===e)return t;var i,n=parseFloat(t.length-1)/parseFloat(1==e?e:e-1);for(i=0;i<e;i++)t[parseInt(S.round(n*i),10)]+=1;return t},_calculateSteps:function(e){var t,i=this,n=i.options,o=n.min,r=0,s=i._distance(),a=S.ceil(s/n.smallStep),l=1;if(a+=s/n.smallStep%1===0?1:0,e.splice(0,0,2*e[a-2]),e.splice(a-1,1,2*e.pop()),i._pixelSteps=[r],i._values=[o],0!==a){for(;l<a;)r+=(e[l-1]+e[l])/2,i._pixelSteps[l]=r,o+=n.smallStep,i._values[l]=d(o),l++;t=s%n.smallStep===0?a-1:a,i._pixelSteps[t]=i._maxSelection,i._values[t]=n.max,i._isRtl&&(i._pixelSteps.reverse(),i._values.reverse())}},_getValueFromPosition:function(e,t){var i,n=this,o=n.options,r=S.max(o.smallStep*(n._maxSelection/n._distance()),0),s=0,a=r/2;if(n._isHorizontal?(s=e-t.startPoint,n._isRtl&&(s=n._maxSelection-s)):s=t.startPoint-e,n._maxSelection-(parseInt(n._maxSelection%r,10)-3)/2<s)return o.max;for(i=0;i<n._pixelSteps.length;i++)if(S.abs(n._pixelSteps[i]-s)-1<=a)return d(n._values[i])},_getFormattedValue:function(e,t){var i,n,o,r=this,s="",a=r.options.tooltip;return C(e)?(n=e[0],
o=e[1]):t&&t.type&&(n=t.selectionStart,o=t.selectionEnd),t&&(i=t.tooltipTemplate),!i&&a.template&&(i=m.template(a.template)),C(e)||t&&t.type?i?s=i({selectionStart:n,selectionEnd:o}):(n=y(a.format,n),o=y(a.format,o),s=n+" - "+o):(t&&(t.val=e),s=i?i({value:e}):y(a.format,e)),s},_getDraggableArea:function(){var e=this,t=m.getOffset(e._trackDiv);return{startPoint:e._isHorizontal?t.left:t.top+e._maxSelection,endPoint:e._isHorizontal?t.left+e._maxSelection:t.top}},_createHtml:function(){var e=this,t=e.element,o=e.options,s=t.find("input");2==s.length?(s.eq(0).prop("value",l(o.selectionStart)),s.eq(1).prop("value",l(o.selectionEnd))):t.prop("value",l(o.value)),t.wrap(i(o,t,e._isHorizontal)).hide(),o.showButtons&&t.before(n(o,"increase",e._isHorizontal,e._isRtl)).before(n(o,"decrease",e._isHorizontal,e._isRtl)),t.before(r(o,t))},_focus:function(t){var i=this,n=t.target,o=i.value(),r=i._drag;r||(n==i.wrapper.find(W).eq(0)[0]?(r=i._firstHandleDrag,i._activeHandle=0):(r=i._lastHandleDrag,i._activeHandle=1),o=o[i._activeHandle]),e(n).addClass(G+" "+j),r&&(i._activeHandleDrag=r,r.selectionStart=i.options.selectionStart,r.selectionEnd=i.options.selectionEnd,r._updateTooltip(o))},_focusWithMouse:function(t){t=e(t);var i=this,n=t.is(W)?t.index():0;window.setTimeout(function(){i.wrapper.find(W)[2==n?1:0].focus()},1),i._setTooltipTimeout()},_blur:function(t){var i=this,n=i._activeHandleDrag;e(t.target).removeClass(G+" "+j),n&&(n._removeTooltip(),delete i._activeHandleDrag,delete i._activeHandle)},_setTooltipTimeout:function(){var e=this;e._tooltipTimeout=window.setTimeout(function(){var t=e._drag||e._activeHandleDrag;t&&t._removeTooltip()},300)},_clearTooltipTimeout:function(){var e,t=this;window.clearTimeout(this._tooltipTimeout),e=t._drag||t._activeHandleDrag,e&&e.tooltipDiv&&e.tooltipDiv.stop(!0,!1).css("opacity",1)},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._form=o.on("reset",x(t._formResetHandler,t)))},min:function(e){return e?(this.setOptions({min:e}),t):this.options.min},max:function(e){return e?(this.setOptions({max:e}),t):this.options.max},setOptions:function(e){g.fn.setOptions.call(this,e),this._sliderItemsInit(),this._refresh()},destroy:function(){this._form&&this._form.off("reset",this._formResetHandler),g.fn.destroy.call(this)}}),ee=J.extend({init:function(i,n){var o,r=this;i.type="text",n=w({},{value:u(i,"value"),min:u(i,"min"),max:u(i,"max"),smallStep:u(i,"step")},n),i=e(i),n&&n.enabled===t&&(n.enabled=!i.is("[disabled]")),J.fn.init.call(r,i,n),n=r.options,h(n.value)&&null!==n.value||(n.value=n.min,i.prop("value",l(n.min))),n.value=S.max(S.min(n.value,n.max),n.min),o=r.wrapper.find(W),this._selection=new ee.Selection(o,r,n),r._drag=new ee.Drag(o,"",r,n)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(i){var n,o,r,s=this,a=s.options;s.disable(),i!==!1&&(s.wrapper.removeClass(K).addClass($),s.wrapper.find("input").removeAttr(Y),n=function(i){var n,o,r,a=Z(i)[0];if(a){if(n=s._isHorizontal?a.location.pageX:a.location.pageY,o=s._getDraggableArea(),r=e(i.target),r.hasClass("k-draghandle"))return r.addClass(G+" "+j),t;s._update(s._getValueFromPosition(n,o)),s._focusWithMouse(i.target),s._drag.dragstart(i),i.preventDefault()}},s.wrapper.find(q+", "+U).on(F,n).end().on(F,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(z,function(){s._drag._end()}),s.wrapper.find(W).attr(X,0).on(P,function(){s._setTooltipTimeout()}).on(H,function(e){s._focusWithMouse(e.target),e.preventDefault()}).on(O,x(s._focus,s)).on(V,x(s._blur,s)),o=x(function(e){var t=s._nextValueByIndex(s._valueIndex+1*e);s._setValueInRange(t),s._drag._updateTooltip(t)},s),a.showButtons&&(r=x(function(e,t){this._clearTooltipTimeout(),(1===e.which||T.touch&&0===e.which)&&(o(t),this.timeout=setTimeout(x(function(){this.timer=setInterval(function(){o(t)},60)},this),200))},s),s.wrapper.find(".k-button").on(P,x(function(e){this._clearTimer(),s._focusWithMouse(e.target)},s)).on(N,function(t){e(t.currentTarget).addClass("k-state-hover")}).on("mouseout"+M,x(function(t){e(t.currentTarget).removeClass("k-state-hover"),this._clearTimer()},s)).eq(0).on(R,x(function(e){r(e,1)},s)).click(!1).end().eq(1).on(R,x(function(e){r(e,-1)},s)).click(m.preventDefault)),s.wrapper.find(W).off(L,!1).on(L,x(this._keydown,s)),a.enabled=!0)},disable:function(){var t=this;t.wrapper.removeClass($).addClass(K),e(t.element).prop(Y,Y),t.wrapper.find(".k-button").off(R).on(R,function(t){t.preventDefault(),e(this).addClass("k-state-active")}).off(P).on(P,function(t){t.preventDefault(),e(this).removeClass("k-state-active")}).off("mouseleave"+M).on("mouseleave"+M,m.preventDefault).off(N).on(N,m.preventDefault),t.wrapper.find(q+", "+U).off(F).off(z),t.wrapper.find(W).attr(X,-1).off(P).off(L).off(H).off(O).off(V),t.options.enabled=!1},_update:function(e){var t=this,i=t.value()!=e;t.value(e),i&&t.trigger(E,{value:t.options.value})},value:function(e){var i=this,n=i.options;return e=d(e),isNaN(e)?n.value:(e>=n.min&&e<=n.max&&n.value!=e&&(i.element.prop("value",l(e)),n.value=e,i._refreshAriaAttr(e),i._refresh()),t)},_refresh:function(){this.trigger(B,{value:this.options.value})},_refreshAriaAttr:function(e){var t,i=this,n=i._drag;t=n&&n._tooltipDiv?n._tooltipDiv.text():i._getFormattedValue(e,null),this.wrapper.find(W).attr("aria-valuenow",e).attr("aria-valuetext",t)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer)},_keydown:function(e){var t=this;e.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[e.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),e.preventDefault())},_setValueInRange:function(e){var i=this,n=i.options;return e=d(e),isNaN(e)?(i._update(n.min),t):(e=S.max(S.min(e,n.max),n.min),i._update(e),t)},_nextValueByIndex:function(e){var t=this._values.length;return this._isRtl&&(e=t-1-e),this._values[S.max(0,S.min(e,t-1))]},_formResetHandler:function(){var e=this,t=e.options.min;setTimeout(function(){var i=e.element[0].value;e.value(""===i||isNaN(i)?t:i)})},destroy:function(){var e=this;J.fn.destroy.call(e),e.wrapper.off(M).find(".k-button").off(M).end().find(W).off(M).end().find(q+", "+U).off(M).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});ee.Selection=function(e,t,i){function n(n){var o=n-i.min,r=t._valueIndex=S.ceil(d(o/i.smallStep)),s=parseInt(t._pixelSteps[r],10),a=t._trackDiv.find(".k-slider-selection"),l=parseInt(t._outerSize(e)/2,10),c=t._isRtl?2:0;a[t._sizeFn](t._isRtl?t._maxSelection-s:s),e.css(t._position,s-l-c)}n(i.value),t.bind([I,B],function(e){n(parseFloat(e.value,10))}),t.bind(E,function(e){n(parseFloat(e.sender.value(),10))})},ee.Drag=function(e,t,i,n){var o=this;o.owner=i,o.options=n,o.element=e,o.type=t,o.draggable=new v(e,{distance:0,dragstart:x(o._dragstart,o),drag:x(o.drag,o),dragend:x(o.dragend,o),dragcancel:x(o.dragcancel,o)}),e.click(!1),e.on("dragstart",function(e){e.preventDefault()})},ee.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(i){var n=this,o=n.owner,r=n.options;return r.enabled?(this.owner._activeDragHandle=this,o.element.off(N),o.wrapper.find("."+G).removeClass(G+" "+j),n.element.addClass(G+" "+j),e(document.documentElement).css("cursor","pointer"),n.dragableArea=o._getDraggableArea(),n.step=S.max(r.smallStep*(o._maxSelection/o._distance()),0),n.type?(n.selectionStart=r.selectionStart,n.selectionEnd=r.selectionEnd,o._setZIndex(n.type)):n.oldVal=n.val=r.value,n._removeTooltip(!0),n._createTooltip(),t):(i.preventDefault(),t)},_createTooltip:function(){var t,i,n=this,o=n.owner,r=n.options.tooltip,s="",a=e(window);r.enabled&&(r.template&&(t=n.tooltipTemplate=m.template(r.template)),e(".k-slider-tooltip").remove(),n.tooltipDiv=e("<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body),s=o._getFormattedValue(n.val||o.value(),n),n.type||(i="k-callout-"+(o._isHorizontal?"s":"e"),n.tooltipInnerDiv="<div class='k-callout "+i+"'><!-- --></div>",s+=n.tooltipInnerDiv),n.tooltipDiv.html(s),n._scrollOffset={top:a.scrollTop(),left:a.scrollLeft()},n.moveTooltip())},drag:function(e){var t,i=this,n=i.owner,o=e.x.location,r=e.y.location,s=i.dragableArea.startPoint,a=i.dragableArea.endPoint;e.preventDefault(),i.val=n._isHorizontal?n._isRtl?i.constrainValue(o,s,a,o<a):i.constrainValue(o,s,a,o>=a):i.constrainValue(r,a,s,r<=a),i.oldVal!=i.val&&(i.oldVal=i.val,i.type?("firstHandle"==i.type?i.selectionStart=i.val<i.selectionEnd?i.val:i.selectionEnd=i.val:i.val>i.selectionStart?i.selectionEnd=i.val:i.selectionStart=i.selectionEnd=i.val,t={values:[i.selectionStart,i.selectionEnd],value:[i.selectionStart,i.selectionEnd]}):t={value:i.val},n.trigger(I,t)),i._updateTooltip(i.val)},_updateTooltip:function(e){var t=this,i=t.options,n=i.tooltip,o="";n.enabled&&(t.tooltipDiv||t._createTooltip(),o=t.owner._getFormattedValue(d(e),t),t.type||(o+=t.tooltipInnerDiv),t.tooltipDiv.html(o),t.moveTooltip())},dragcancel:function(){return this.owner._refresh(),e(document.documentElement).css("cursor",""),this._end()},dragend:function(){var t=this,i=t.owner;return e(document.documentElement).css("cursor",""),t.type?i._update(t.selectionStart,t.selectionEnd):(i._update(t.val),t.draggable.userEvents._disposeAll()),t.draggable.userEvents.cancel(),t._end()},_end:function(){var e=this,t=e.owner;return t._focusWithMouse(e.element),t.element.on(N),!1},_removeTooltip:function(t){var i=this,n=i.owner;i.tooltipDiv&&n.options.tooltip.enabled&&n.options.enabled&&(t?(i.tooltipDiv.remove(),i.tooltipDiv=null):i.tooltipDiv.fadeOut("slow",function(){e(this).remove(),i.tooltipDiv=null}))},moveTooltip:function(){var t,i,n,o,r=this,s=r.owner,a=0,l=0,c=r.element,d=m.getOffset(c),u=8,h=e(window),p=r.tooltipDiv.find(".k-callout"),f=_(r.tooltipDiv),g=b(r.tooltipDiv);r.type?(t=s.wrapper.find(W),d=m.getOffset(t.eq(0)),i=m.getOffset(t.eq(1)),s._isHorizontal?(a=i.top,l=d.left+(i.left-d.left)/2):(a=d.top+(i.top-d.top)/2,l=i.left),o=_(t.eq(0))+2*u):(a=d.top,l=d.left,o=_(c)+2*u),s._isHorizontal?(l-=parseInt((f-s._outerSize(c))/2,10),a-=g+u+(p.length?p.height():0)):(a-=parseInt((g-s._outerSize(c))/2,10),l-=f+u+(p.length?p.width():0)),s._isHorizontal?(n=r._flip(a,g,o,b(h)+r._scrollOffset.top),a+=n,l+=r._fit(l,f,_(h)+r._scrollOffset.left)):(n=r._flip(l,f,o,_(h)+r._scrollOffset.left),a+=r._fit(a,g,b(h)+r._scrollOffset.top),l+=n),n>0&&p&&(p.removeClass(),p.addClass("k-callout k-callout-"+(s._isHorizontal?"n":"w"))),r.tooltipDiv.css({top:a,left:l})},_fit:function(e,t,i){var n=0;return e+t>i&&(n=i-(e+t)),e<0&&(n=-e),n},_flip:function(e,t,i,n){var o=0;return e+t>n&&(o+=-(i+t)),e+o<0&&(o+=i+t),o},constrainValue:function(e,t,i,n){var o=this,r=0;return r=t<e&&e<i?o.owner._getValueFromPosition(e,o.dragableArea):n?o.options.max:o.options.min}},m.ui.plugin(ee),f=J.extend({init:function(i,n){var o,r=this,s=e(i).find("input"),a=s.eq(0)[0],c=s.eq(1)[0];a.type="text",c.type="text",n&&n.showButtons&&(window.console&&window.console.warn("showbuttons option is not supported for the range slider, ignoring"),n.showButtons=!1),n=w({},{selectionStart:u(a,"value"),min:u(a,"min"),max:u(a,"max"),smallStep:u(a,"step")},{selectionEnd:u(c,"value"),min:u(c,"min"),max:u(c,"max"),smallStep:u(c,"step")},n),n&&n.enabled===t&&(n.enabled=!s.is("[disabled]")),J.fn.init.call(r,i,n),n=r.options,h(n.selectionStart)&&null!==n.selectionStart||(n.selectionStart=n.min,s.eq(0).prop("value",l(n.min))),h(n.selectionEnd)&&null!==n.selectionEnd||(n.selectionEnd=n.max,s.eq(1).prop("value",l(n.max))),o=r.wrapper.find(W),this._selection=new f.Selection(o,r,n),r._firstHandleDrag=new ee.Drag(o.eq(0),"firstHandle",r,n),r._lastHandleDrag=new ee.Drag(o.eq(1),"lastHandle",r,n)},options:{name:"RangeSlider",leftDragHandleTitle:"drag",rightDragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},selectionStart:null,selectionEnd:null},enable:function(i){var n,o=this,r=o.options;o.disable(),i!==!1&&(o.wrapper.removeClass(K).addClass($),o.wrapper.find("input").removeAttr(Y),n=function(i){var n,s,a,l,c,d,u,h=Z(i)[0];if(h){if(n=o._isHorizontal?h.location.pageX:h.location.pageY,s=o._getDraggableArea(),a=o._getValueFromPosition(n,s),l=e(i.target),l.hasClass("k-draghandle"))return o.wrapper.find("."+G).removeClass(G+" "+j),l.addClass(G+" "+j),t;a<r.selectionStart?(c=a,d=r.selectionEnd,u=o._firstHandleDrag):a>o.selectionEnd?(c=r.selectionStart,d=a,u=o._lastHandleDrag):a-r.selectionStart<=r.selectionEnd-a?(c=a,d=r.selectionEnd,u=o._firstHandleDrag):(c=r.selectionStart,d=a,u=o._lastHandleDrag),u.dragstart(i),o._setValueInRange(c,d),o._focusWithMouse(u.element)}},o.wrapper.find(q+", "+U).on(F,n).end().on(F,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(z,function(){o._activeDragHandle&&o._activeDragHandle._end()}),o.wrapper.find(W).attr(X,0).on(P,function(){o._setTooltipTimeout()}).on(H,function(e){o._focusWithMouse(e.target),e.preventDefault()}).on(O,x(o._focus,o)).on(V,x(o._blur,o)),o.wrapper.find(W).off(L,m.preventDefault).eq(0).on(L,x(function(e){this._keydown(e,"firstHandle")},o)).end().eq(1).on(L,x(function(e){this._keydown(e,"lastHandle")},o)),o.options.enabled=!0)},disable:function(){var e=this;e.wrapper.removeClass($).addClass(K),e.wrapper.find("input").prop(Y,Y),e.wrapper.find(q+", "+U).off(F).off(z),e.wrapper.find(W).attr(X,-1).off(P).off(L).off(H).off(O).off(V),e.options.enabled=!1},_keydown:function(e,t){var i,n,o,r=this,s=r.options.selectionStart,a=r.options.selectionEnd;e.keyCode in r._keyMap&&(r._clearTooltipTimeout(),"firstHandle"==t?(o=r._activeHandleDrag=r._firstHandleDrag,s=r._keyMap[e.keyCode](s),s>a&&(a=s)):(o=r._activeHandleDrag=r._lastHandleDrag,a=r._keyMap[e.keyCode](a),s>a&&(s=a)),r._setValueInRange(d(s),d(a)),i=Math.max(s,r.options.selectionStart),n=Math.min(a,r.options.selectionEnd),o.selectionEnd=Math.max(n,r.options.selectionStart),o.selectionStart=Math.min(i,r.options.selectionEnd),o._updateTooltip(r.value()[r._activeHandle]),e.preventDefault())},_update:function(e,t){var i=this,n=i.value(),o=n[0]!=e||n[1]!=t;i.value([e,t]),o&&i.trigger(E,{values:[e,t],value:[e,t]})},value:function(e){return e&&e.length?this._value(e[0],e[1]):this._value()},_value:function(e,i){var n=this,o=n.options,r=o.selectionStart,s=o.selectionEnd;return isNaN(e)&&isNaN(i)?[r,s]:(e=d(e),i=d(i),e>=o.min&&e<=o.max&&i>=o.min&&i<=o.max&&e<=i&&(r==e&&s==i||(n.element.find("input").eq(0).prop("value",l(e)).end().eq(1).prop("value",l(i)),o.selectionStart=e,o.selectionEnd=i,n._refresh(),n._refreshAriaAttr(e,i))),t)},values:function(e,t){return C(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(B,{values:[t.selectionStart,t.selectionEnd],value:[t.selectionStart,t.selectionEnd]}),t.selectionStart==t.max&&t.selectionEnd==t.max&&e._setZIndex("firstHandle")},_refreshAriaAttr:function(e,t){var i,n=this,o=n.wrapper.find(W),r=n._activeHandleDrag;i=n._getFormattedValue([e,t],r),o.eq(0).attr("aria-valuenow",e),o.eq(1).attr("aria-valuenow",t),o.attr("aria-valuetext",i)},_setValueInRange:function(e,t){var i=this.options;e=S.max(S.min(e,i.max),i.min),t=S.max(S.min(t,i.max),i.min),e==i.max&&t==i.max&&this._setZIndex("firstHandle"),this._update(S.min(e,t),S.max(e,t))},_setZIndex:function(t){this.wrapper.find(W).each(function(i){e(this).css("z-index","firstHandle"==t?1-i:i)})},_formResetHandler:function(){var e=this,t=e.options;setTimeout(function(){var i=e.element.find("input"),n=i[0].value,o=i[1].value;e.values(""===n||isNaN(n)?t.min:n,""===o||isNaN(o)?t.max:o)})},destroy:function(){var e=this;J.fn.destroy.call(e),e.wrapper.off(M).find(q+", "+U).off(M).end().find(W).off(M),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),f.Selection=function(e,t,i){function n(n){n=n||[];var r=n[0]-i.min,s=n[1]-i.min,a=S.ceil(d(r/i.smallStep)),l=S.ceil(d(s/i.smallStep)),c=t._pixelSteps[a],u=t._pixelSteps[l],h=parseInt(t._outerSize(e.eq(0))/2,10),p=t._isRtl?2:0;e.eq(0).css(t._position,c-h-p).end().eq(1).css(t._position,u-h-p),o(c,u)}function o(e,i){var n,o,r=t._trackDiv.find(".k-slider-selection");n=S.abs(e-i),r[t._sizeFn](n),t._isRtl?(o=S.max(e,i),r.css("right",t._maxSelection-o-1)):(o=S.min(e,i),r.css(t._position,o-1))}n(t.value()),t.bind([E,I,B],function(e){n(e.values)})},m.ui.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.colorpicker.min",["kendo.core.min","kendo.color.min","kendo.popup.min","kendo.slider.min","kendo.userevents.min","kendo.button.min"],e)}(function(){return function(e,t,i){function n(e,t,i){i=d(i),i&&!i.equals(e.color())&&("change"==t&&(e._value=i),i=1!=i.a?i.toCssRgba():i.toCss(),e.trigger(t,{value:i}))}function o(e,t,i){var n,o;return e=Array.prototype.slice.call(e),n=e.length,o=e.indexOf(t),o<0?i<0?e[n-1]:e[0]:(o+=i,o<0?o+=n:o%=n,e[o])}function r(e){e.preventDefault()}function s(e,t){return function(){return e.apply(t,arguments)}}var a=window.kendo,l=a.ui,c=l.Widget,d=a.parseColor,u=a.Color,h=a.keys,p="background-color",f="k-state-selected",m="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",g="FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",v="#ffffff",_={apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:"Color Hexadecimal Code"},b=".kendoColorTools",w="click"+b,y="keydown"+b,k=a.support.browser,x=k.msie&&k.version<9,C=c.extend({init:function(e,t){var i,n=this;c.fn.init.call(n,e,t),e=n.element,t=n.options,n._value=t.value=d(t.value),n._tabIndex=e.attr("tabIndex")||0,i=n._ariaId=t.ariaId,i&&e.attr("aria-labelledby",i),t._standalone&&(n._triggerSelect=n._triggerChange)},options:{name:"ColorSelector",value:null,_standalone:!0},events:["change","select","cancel"],color:function(e){return e!==i&&(this._value=d(e),this._updateUI(this._value)),this._value},value:function(e){return e=this.color(e),e&&(e=this.options.opacity?e.toCssRgba():e.toCss()),e||null},enable:function(t){0===arguments.length&&(t=!0),e(".k-disabled-overlay",this.wrapper).remove(),t||this.wrapper.append("<div class='k-disabled-overlay'></div>"),this._onEnable(t)},_select:function(e,t){var i=this._value;e=this.color(e),t||(this.element.trigger("change"),e.equals(i)?this._standalone||this.trigger("cancel"):this.trigger("change",{value:this.value()}))},_triggerSelect:function(e){n(this,"select",e)},_triggerChange:function(e){n(this,"change",e)},destroy:function(){this.element&&this.element.off(b),this.wrapper&&this.wrapper.off(b).find("*").off(b),this.wrapper=null,c.fn.destroy.call(this)},_updateUI:e.noop,_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}}),S=C.extend({init:function(t,i){var n,o,r,l,c=this;if(C.fn.init.call(c,t,i),t=c.wrapper=c.element,i=c.options,n=i.palette,"websafe"==n?(n=g,i.columns=18):"basic"==n&&(n=m),"string"==typeof n&&(n=n.split(",")),e.isArray(n)&&(n=e.map(n,function(e){return d(e)})),c._selectedID=(i.ariaId||a.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(c._template({colors:n,columns:i.columns,tileSize:i.tileSize,value:c._value,id:i.ariaId}))).on(w,".k-item",function(t){c._select(e(t.currentTarget).css(p))}).attr("tabIndex",c._tabIndex).on(y,s(c._keydown,c)),o=i.tileSize){if(/number|string/.test(typeof o))r=l=parseFloat(o);else{if("object"!=typeof o)throw Error("Unsupported value for the 'tileSize' argument");r=parseFloat(o.width),l=parseFloat(o.height)}t.find(".k-item").css({width:r,height:l})}},focus:function(){this.wrapper&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.focus()},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_onEnable:function(e){e?this.wrapper.attr("tabIndex",this._tabIndex):this.wrapper.removeAttr("tabIndex")},_keydown:function(t){var i,n,s=this.wrapper,a=s.find(".k-item"),l=a.filter("."+f).get(0),c=t.keyCode;if(c==h.LEFT?i=o(a,l,-1):c==h.RIGHT?i=o(a,l,1):c==h.DOWN?i=o(a,l,this.options.columns):c==h.UP?i=o(a,l,-this.options.columns):c==h.ENTER?(r(t),l&&this._select(e(l).css(p))):c==h.ESC&&this._cancel(),i){r(t),this._current(i);try{n=d(i.css(p)),this._triggerSelect(n)}catch(u){}}},_current:function(t){this.wrapper.find("."+f).removeClass(f).attr("aria-selected",!1).removeAttr("id"),e(t).addClass(f).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var i=null;this.wrapper.find(".k-item").each(function(){var n=d(e(this).css(p));if(n&&n.equals(t))return i=this,!1}),this._current(i)},_template:a.template('<table class="k-palette k-reset" role="presentation"><tr role="row"># for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # </tr><tr role="row"> # } #<td role="gridcell" unselectable="on" style="background-color:#= colors[i].toCss() #"#= selected ? " aria-selected=true" : "" # #=(id && i === 0) ? "id=\\""+id+"\\" " : "" # class="k-item#= selected ? " '+f+'" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>')}),T=C.extend({init:function(t,i){var n=this;C.fn.init.call(n,t,i),i=n.options,i.messages=i.options?e.extend(n.options.messages,i.options.messages):n.options.messages,t=n.element,n.wrapper=t.addClass("k-widget k-flatcolorpicker").append(n._template(i)),n._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),n._selectedColor=e(".k-selected-color-display",t),n._colorAsText=e("input.k-color-value",t),n._sliders(),n._hsvArea(),n._updateUI(n._value||d("#f00")),t.find("input.k-color-value").on(y,function(t){var i,o,r=this;if(t.keyCode==h.ENTER)try{i=d(r.value),o=n.color(),n._select(i,i.equals(o))}catch(s){e(r).addClass("k-state-error")}else n.options.autoupdate&&setTimeout(function(){var e=d(r.value,!0);e&&n._updateUI(e,!0)},10)}).end().on(w,".k-controls button.apply",function(){n.options._clearedColor?n.trigger("change"):n._select(n._getHSV())}).on(w,".k-controls button.cancel",function(){n._updateUI(n.color()),n._cancel()}),x&&n._applyIEFilter()},destroy:function(){this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,C.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,autoupdate:!0,messages:_},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){i._updateUI(i._getHSV(e.value,null,null,null))}function t(e){i._updateUI(i._getHSV(null,null,null,e.value/100))}var i=this,n=i.element,o=n.find(".k-hue-slider"),r=n.find(".k-transparency-slider");o.attr("aria-label","hue saturation"),i._hueSlider=o.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),r.attr("aria-label","opacity"),i._opacitySlider=r.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,i){var n=this.offset,o=e-n.left,r=i-n.top,s=this.width,a=this.height;o=o<0?0:o>s?s:o,r=r<0?0:r>a?a:r,t._svChange(o/s,1-r/a)}var t=this,i=t.element,n=i.find(".k-hsv-rectangle"),o=n.find(".k-draghandle").attr("tabIndex",0).on(y,s(t._keydown,t));t._hsvEvents=new a.UserEvents(n,{global:!0,press:function(t){this.offset=a.getOffset(n),this.width=n.width(),this.height=n.height(),o.focus(),e.call(this,t.x.location,t.y.location)},start:function(){n.addClass("k-dragging"),o.focus()},move:function(t){t.preventDefault(),e.call(this,t.x.location,t.y.location)},end:function(){n.removeClass("k-dragging")}}),t._hsvRect=n,t._hsvHandle=o},_onEnable:function(e){this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),this.wrapper.find("input").attr("disabled",!e);var t=this._hsvRect.find(".k-draghandle");e?t.attr("tabIndex",this._tabIndex):t.removeAttr("tabIndex")},_keydown:function(e){function t(t,i){var o=n._getHSV();o[t]+=i*(e.shiftKey?.01:.05),o[t]<0&&(o[t]=0),o[t]>1&&(o[t]=1),n._updateUI(o),r(e)}function i(t){var i=n._getHSV();i.h+=t*(e.shiftKey?1:5),i.h<0&&(i.h=0),i.h>359&&(i.h=359),n._updateUI(i),r(e)}var n=this;switch(e.keyCode){case h.LEFT:e.ctrlKey?i(-1):t("s",-1);break;case h.RIGHT:e.ctrlKey?i(1):t("s",1);break;case h.UP:t(e.ctrlKey&&n._opacitySlider?"a":"v",1);break;case h.DOWN:t(e.ctrlKey&&n._opacitySlider?"a":"v",-1);break;case h.ENTER:n._select(n._getHSV());break;case h.F2:n.wrapper.find("input.k-color-value").focus().select();break;case h.ESC:n._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,i,n){var o=this._hsvRect,r=o.width(),s=o.height(),a=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=a.left/r),null==i&&(i=1-a.top/s),null==n&&(n=this._opacitySlider?this._opacitySlider.value()/100:1),u.fromHSV(e,t,i,n)},_svChange:function(e,t){var i=this._getHSV(null,e,t,null);this._updateUI(i)},_updateUI:function(e,t){var i=this,n=i._hsvRect;e&&(this._colorAsText.attr("title",i.options.messages.previewInput),this._colorAsText.removeClass("k-state-error"),i._selectedColor.css(p,e.toDisplay()),t||i._colorAsText.val(i._opacitySlider?e.toCssRgba():e.toCss()),i._triggerSelect(e),e=e.toHSV(),i._hsvHandle.css({left:e.s*n.width()+"px",top:(1-e.v)*n.height()+"px"}),i._hueElements.css(p,u.fromHSV(e.h,1,1,1).toCss()),i._hueSlider.value(e.h),i._opacitySlider&&i._opacitySlider.value(100*e.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:a.template('# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><div class="k-color-input"><input class="k-color-value" # if (clearButton && !_standalone) { #placeholder="#: messages.noColor #" # } ##= !data.input ? \'style="visibility: hidden;"\' : "" #># if (clearButton && !_standalone) { #<span class="k-clear-color k-button k-bare" title="#: messages.clearColor #"></span># } #</div></div></div># } ## if (clearButton && !_standalone && !preview) { #<div class="k-clear-color-container"><span class="k-clear-color k-button k-bare">#: messages.clearColor #</span></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><input class="k-hue-slider" /># if (opacity) { #<input class="k-transparency-slider" /># } ## if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button k-primary apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #')}),D=c.extend({init:function(t,i){var n,o,r,s,a,l=this;c.fn.init.call(l,t,i),i=l.options,t=l.element,n=t.attr("value")||t.val(),n=n?d(n,!0):d(i.value,!0),l._value=i.value=n,o=l.wrapper=e(l._template(i)),t.hide().after(o),t.is("input")&&(t.appendTo(o),r=t.closest("label"),s=t.attr("id"),s&&(r=r.add('label[for="'+s+'"]')),r.click(function(e){l.open(),e.preventDefault()})),l._tabIndex=t.attr("tabIndex")||0,l.enable(!t.attr("disabled")),a=t.attr("accesskey"),a&&(t.attr("accesskey",null),o.attr("accesskey",a)),l.bind("activate",function(e){e.isDefaultPrevented()||l.toggle()}),l._updateUI(n)},destroy:function(){this.wrapper.off(b).find("*").off(b),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,c.fn.destroy.call(this)},enable:function(e){var t=this,i=t.wrapper,n=i.children(".k-picker-wrap"),o=n.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),i.attr("aria-disabled",!e),o.off(b).on("mousedown"+b,r),i.addClass("k-state-disabled").removeAttr("tabIndex").add("*",i).off(b),e?i.removeClass("k-state-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+b,function(){n.addClass("k-state-hover")}).on("mouseleave"+b,function(){n.removeClass("k-state-hover")}).on("focus"+b,function(){n.addClass("k-state-focused")}).on("blur"+b,function(){n.removeClass("k-state-focused")}).on(y,s(t._keydown,t)).on(w,".k-select",s(t.toggle,t)).on(w,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")}):t.close()},_template:a.template('<span role="textbox" aria-haspopup="true" class="k-widget k-colorpicker k-header"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-icon k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"><span class="k-icon k-i-line" style="display: none;"></span></span># } #<span class="k-select" unselectable="on" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span></span>'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:_,opacity:!1,buttons:!0,preview:!0,clearButton:!1,ARIATemplate:'Current selected color is #=data || ""#'},events:["activate","change","select","open","close"],open:function(){this.element.prop("disabled")||this._getPopup().open()},close:function(){var e=this._selector&&this._selector.options||{};e._closing=!0,this._getPopup().close(),delete e._closing},toggle:function(){this.element.prop("disabled")||this._getPopup().toggle()},_noColorIcon:function(){return this.wrapper.find(".k-picker-wrap > .k-selected-color > .k-icon.k-i-line")},color:C.fn.color,value:C.fn.value,_select:C.fn._select,_triggerSelect:C.fn._triggerSelect,_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_updateUI:function(e){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=a.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(p,e?e.toDisplay():v),this._noColorIcon()[t?"hide":"show"]()},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==h.ESC?this._selector._cancel():this._selector._keydown(e),r(e)):t!=h.ENTER&&t!=h.DOWN||(this.open(),r(e))},_getPopup:function(){var t,n,o,r,s=this,l=s._popup;return l||(t=s.options,n=t.palette?S:T,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,o=a.guid(),r=s._selector=new n(e('<div id="'+o+'"/>').appendTo(document.body),t),
s.wrapper.attr("aria-owns",o),s._popup=l=r.wrapper.kendoPopup({anchor:s.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),r.element.find(".k-clear-color").kendoButton({icon:"reset-color",click:function(e){r.options._clearedColor=!0,s.value(null),s.element.val(null),s._updateUI(null),r._colorAsText.val(""),r._hsvHandle.css({top:"0px",left:"0px"}),r._selectedColor.css(p,v),s.trigger("change",{value:s.value()}),e.preventDefault()}}),r.bind({select:function(e){s._updateUI(d(e.value)),delete r.options._clearedColor},change:function(){r.options._clearedColor||s._select(r.color()),s.close()},cancel:function(){r.options._clearedColor&&!s.value()&&r.value()&&s._select(r.color(),!0),s.close()}}),l.bind({close:function(e){var t,n,o,a;return s.trigger("close")?(e.preventDefault(),i):(s.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=r._selectOnHide(),n=r.value(),o=s.value(),a=r.options,t?a._clearedColor&&!o||s._select(t):(setTimeout(function(){s.wrapper&&!s.wrapper.is("[unselectable='on']")&&s.wrapper.focus()}),!a._closing&&a._clearedColor&&!o&&n?s._select(n,!0):s._updateUI(s.color())),i)},open:function(e){s.trigger("open")?e.preventDefault():s.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){r._select(s.color(),!0),r.focus(),s.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),l}});l.plugin(S),l.plugin(T),l.plugin(D)}(jQuery,parseInt),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function i(e,t){var i="k-i-arrow-"+("increase"===e?"60-up":"60-down");return'<span unselectable="on" class="k-link k-link-'+e+'" aria-label="'+t+'" title="'+t+'"><span unselectable="on" class="'+A+" "+i+'"></span></span>'}function n(e,t){var i=(""+parseFloat(e,10)).split(D);return i[1]&&(i[1]=i[1].substring(0,t)),i.join(D)}var o=window.kendo,r=o.caret,s=o.keys,a=o.ui,l=a.Widget,c=o._activeElement,d=o._extractFormat,u=o.parseFloat,h=o.support.placeholder,p=o.getCulture,f="change",m="disabled",g="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",w="touchend",y="mouseleave"+b,k="mouseenter"+b+" "+y,x="k-state-default",C="k-state-focused",S="k-state-hover",T="focus",D=".",A="k-icon",E="k-state-selected",I="k-state-disabled",M="k-state-invalid",R="aria-disabled",F=/^(-)?(\d*)$/,P=null,z=e.proxy,B=e.extend,L=l.extend({init:function(i,n){var r,s,a,c,u,h,p=this,f=n&&n.step!==t;l.fn.init.call(p,i,n),n=p.options,i=p.element.on("focusout"+b,z(p._focusout,p)).attr("role","spinbutton"),n.placeholder=n.placeholder||i.attr("placeholder"),r=p.min(i.attr("min")),s=p.max(i.attr("max")),a=p._parse(i.attr("step")),n.min===P&&r!==P&&(n.min=r),n.max===P&&s!==P&&(n.max=s),f||a===P||(n.step=a),p._initialOptions=B({},n),h=i.attr("type"),p._reset(),p._wrapper(),p._arrows(),p._validation(),p._input(),o.support.mobileOS?p._text.on(w+b+" "+T+b,function(){o.support.browser.edge?p._text.one(T+b,function(){p._toggleText(!1),i.focus()}):(p._toggleText(!1),i.focus())}):p._text.on(T+b,z(p._click,p)),i.attr("aria-valuemin",n.min!==P?n.min*n.factor:n.min).attr("aria-valuemax",n.max!==P?n.max*n.factor:n.max),n.format=d(n.format),c=n.value,c==P&&(c="number"==h?parseFloat(i.val()):i.val()),p.value(c),u=i.is("[disabled]")||e(p.element).parents("fieldset").is(":disabled"),u?p.enable(!1):p.readonly(i.is("[readonly]")),o.notify(p)},options:{name:"NumericTextBox",decimals:P,restrictDecimals:!1,min:P,max:P,value:P,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value"},events:[f,_],_editable:function(e){var t=this,i=t.element,n=e.disable,o=e.readonly,r=t._text.add(i),s=t._inputWrapper.off(k);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),i.off("keydown"+b).off("keypress"+b).off("keyup"+b).off("paste"+b),o||n?(s.addClass(n?I:x).removeClass(n?x:I),r.attr(m,n).attr(g,o).attr(R,n)):(s.addClass(x).removeClass(I).on(k,t._toggleHover),r.removeAttr(m).removeAttr(g).attr(R,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(E)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(E)}),t.element.on("keydown"+b,z(t._keydown,t)).on("keypress"+b,z(t._keypress,t)).on("keyup"+b,z(t._keyup,t)).on("paste"+b,z(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},setOptions:function(e){var i=this;l.fn.setOptions.call(i,e),i._arrowsWrap.toggle(i.options.spinners),i._inputWrapper.toggleClass("k-expand-padding",!i.options.spinners),i._text.prop("placeholder",i.options.placeholder),i._placeholder(i.options.placeholder),i.element.attr({"aria-valuemin":i.options.min!==P?i.options.min*i.options.factor:i.options.min,"aria-valuemax":i.options.max!==P?i.options.max*i.options.factor:i.options.max}),i.options.format=d(i.options.format),e.value!==t&&i.value(e.value)},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),l.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 i,n=this;return e===t?n._value:(e=n._parse(e),i=n._adjust(e),e===i&&(n._update(e),n._old=n._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,i=t.options,n=i.min,o=i.max;return e===P?e:(n!==P&&e<n?e=n:o!==P&&e>o&&(e=o),e)},_arrows:function(){var t,n=this,r=function(){clearTimeout(n._spinning),t.removeClass(E)},s=n.options,a=s.spinners,l=n.element;t=l.siblings("."+A),t[0]||(t=e(i("increase",s.upArrowText)+i("decrease",s.downArrowText)).insertAfter(l),n._arrowsWrap=t.wrapAll('<span class="k-select"/>').parent()),a||(t.parent().toggle(a),n._inputWrapper.addClass("k-expand-padding")),n._upArrow=t.eq(0),n._upArrowEventHandler=new o.UserEvents(n._upArrow,{release:r}),n._downArrow=t.eq(1),n._downArrowEventHandler=new o.UserEvents(n._downArrow,{release:r})},_validation:function(){var t=this,i=t.element;t._validationIcon=e("<span class='"+A+" k-i-warning'></span>").hide().insertAfter(i)},_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 i,n,o,s=e.target,a=r(s)[0],l=s.value.substring(0,a),c=t._format(t.options.format),d=c[","],u=0;d&&(n=RegExp("\\"+d,"g"),o=RegExp("([\\d\\"+d+"]+)(\\"+c[D]+")?(\\d+)?")),o&&(i=o.exec(l)),i&&(u=i[0].replace(n,"").length,l.indexOf("(")!=-1&&t._value<0&&u++),t._focusin(),r(t.element[0],u)})},_change:function(e){var t=this,i=t.options.factor;i&&1!==i&&(e=o.parseFloat(e),null!==e&&(e/=i)),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(f),t.trigger(f)),t._typing=!1},_culture:function(e){return e||p(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(),e._removeInvalidState()},_format:function(e,t){var i=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?i=i.currency:e.indexOf("p")>-1&&(i=i.percent),i},_input:function(){var t,i=this,n=i.options,o="k-formatted-value",r=i.element.addClass(v).show()[0],s=r.accessKey,a=i.wrapper;t=a.find(D+o),t[0]||(t=e('<input type="text"/>').insertBefore(r).addClass(o));try{r.setAttribute("type","text")}catch(l){r.type="text"}i._initialTitle=r.title,t[0].title=r.title,t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",n.placeholder),s&&(t.attr("accesskey",s),r.accessKey=""),i._text=t.addClass(r.className).attr({role:"spinbutton","aria-valuemin":n.min!==P?n.min*n.factor:n.min,"aria-valuemax":n.max!==P?n.max*n.factor:n.max,autocomplete:"off"})},_keydown:function(e){var t=this,i=e.keyCode;t._key=i,i==s.DOWN?t._step(-1):i==s.UP?t._step(1):i==s.ENTER?t._change(t.element.val()):i!=s.TAB&&(t._typing=!0)},_keypress:function(e){var t,i,n,o,a,l,c,d,u,h,p;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===s.BACKSPACE||e.keyCode===s.ENTER||(t=this,i=t.options.min,n=t.element,o=r(n),a=o[0],l=o[1],c=String.fromCharCode(e.which),d=t._format(t.options.format),u=t._key===s.NUMPAD_DOT,h=n.val(),u&&(c=d[D]),h=h.substring(0,a)+c+h.substring(l),p=t._numericRegex(d).test(h),p&&u?(n.val(h),r(n,a+c.length),e.preventDefault()):(null!==i&&i>=0&&"-"===h.charAt(0)||!p)&&(t._addInvalidState(),e.preventDefault()),t._key=0)},_keyup:function(){this._removeInvalidState()},_addInvalidState:function(){var e=this;e._inputWrapper.addClass(M),e._validationIcon.show()},_removeInvalidState:function(){var e=this;e._inputWrapper.removeClass(M),e._validationIcon.hide()},_numericRegex:function(e){var t=this,i=e[D],n=t.options.decimals,o="*";return i===D&&(i="\\"+i),n===P&&(n=e.decimals),0===n&&t.options.restrictDecimals?F:(t.options.restrictDecimals&&(o="{0,"+n+"}"),t._separator!==i&&(t._separator=i,t._floatRegExp=RegExp("^(-)?(((\\d+("+i+"\\d"+o+")?)|("+i+"\\d"+o+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,i=e.target,n=i.value,o=t._format(t.options.format);setTimeout(function(){var e=t._parse(i.value);e===P?t._update(n):(i.value=(""+e).replace(D,o[D]),t._adjust(e)===e&&t._numericRegex(o).test(i.value)||t._update(n))})},_option:function(e,i){var n=this,o=n.element,r=n.options;return i===t?r[e]:(i=n._parse(i),(i||"step"!==e)&&(r[e]=i,o.add(n._text).attr("aria-value"+e,i),o.attr(e,i)),t)},_spin:function(e,t){var i=this;t=t||500,clearTimeout(i._spinning),i._spinning=setTimeout(function(){i._spin(e,50)},t),i._step(e)},_step:function(e){var t=this,i=t.element,n=t._value,o=t._parse(i.val())||0,r=t.options.decimals||2;c()!=i[0]&&t._focusin(),t.options.factor&&o&&(o/=t.options.factor),o=+(o+t.options.step*e).toFixed(r),o=t._adjust(o),t._update(o),t._typing=!1,n!==o&&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)},_round:function(e,t){var i=this.options.round?o._round:n;return i(e,t)},_update:function(e){var t,i=this,n=i.options,r=n.factor,s=n.format,a=n.decimals,l=i._culture(),c=i._format(s,l);a===P&&(a=c.decimals),e=i._parse(e,l),t=e!==P,t&&(e=parseFloat(i._round(e,a),10)),i._value=e=i._adjust(e),i._placeholder(o.toString(e,s,l)),t?(r&&(e=parseFloat(i._round(e*r,a),10)),e=""+e,e.indexOf("e")!==-1&&(e=i._round(+e,a)),e=e.replace(D,c[D])):e=null,i.element.val(e),i.element.add(i._text).attr("aria-valuenow",e)},_placeholder:function(e){var t=this._text;t.val(e),h||e||t.val(this.options.placeholder),t.attr("title",this._initialTitle||t.val())},_wrapper:function(){var t,i=this,n=i.element,o=n[0];t=n.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=n.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="",i.wrapper=t.addClass("k-widget k-numerictextbox").addClass(o.className).css("display",""),i._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(i[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=o.on("reset",t._resetHandler))}});a.plugin(L)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.filtermenu.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.dropdownlist.min","kendo.binder.min"],e)}(function(){return function(e,t){function i(t,n){t.filters&&(t.filters=e.grep(t.filters,function(e){return i(e,n),e.filters?e.filters.length:e.field!=n}))}function n(e){var t,i,n,o,r,s;if(e&&e.length)for(s=[],t=0,i=e.length;t<i;t++)n=e[t],r=""!==n.text?n.text||n.value||n:n.text,o=null==n.value?n.text||n:n.value,s[t]={text:r,value:o};return s}function o(t,i){return e.grep(t,function(t){return t.filters?(t.filters=e.grep(t.filters,function(e){return e.field!=i}),t.filters.length):t.field!=i})}function r(t,i){t.filters&&(t.filters=e.grep(t.filters,function(e){return r(e,i),e.filters?e.filters.length:e.field==i&&"eq"==e.operator}))}function s(i){return"and"==i.logic&&i.filters.length>1?[]:i.filters?e.map(i.filters,function(e){return s(e)}):i.value!==t?[i.value]:[]}function a(e,i){for(var n,o,r=c.getter(i,!0),s=[],a=0,l={};a<e.length;)n=e[a++],o=r(n),o===t||l.hasOwnProperty(o)||(s.push(n),l[o]=!0);return s}function l(e,t){return function(i){var n=e(i);return a(n,t)}}var c=window.kendo,d=c.ui,u=e.proxy,h="kendoPopup",p="init",f="open",m="refresh",g="change",v=".kendoFilterMenu",_="Is equal to",b="Is not equal to",w={number:"numerictextbox",date:"datepicker"},y={string:"text",number:"number",date:"date"},k=c.isFunction,x=d.Widget,C='<div><div class="k-filter-help-text">#=messages.info#</div><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label><div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',S='<div><div class="k-filter-help-text">#=messages.info#</div><label><input class="k-textbox" data-#=ns#bind="value: filters[0].value" name="filters[0].value"/></label><div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',T='<div><div class="k-filter-help-text">#=messages.info#</div><select title="#=messages.operator#" data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.value#" data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.value#" data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}##if(extra){#<select title="#=messages.logic#" class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select title="#=messages.additionalOperator#" data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.additionalValue#" data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.additionalValue#" data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>#}##}#<div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',D='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form title="#=messages.title#" class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label">#=messages.operator#<select data-#=ns#bind="value: filters[0].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.value##if(values){#<select data-#=ns#bind="value:filters[0].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#if(extra){#</ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="and" />#=messages.and#</label></li><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="or" />#=messages.or#</label></li></ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label">#=messages.additionalOperator#<select data-#=ns#bind="value: filters[1].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.additionalValue##if(values){#<select data-#=ns#bind="value:filters[1].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[1].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#}#</ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></div></form></div>',A='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form title="#=messages.title#" class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label></li><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label></li></ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',E=x.extend({init:function(t,i){var n,o,r,s,a=this,l="string";x.fn.init.call(a,t,i),n=a.operators=i.operators||{},t=a.element,i=a.options,i.appendToElement||(r=t.addClass("k-with-icon k-filterable").find(".k-grid-filter"),r[0]||(r=t.prepend('<a class="k-grid-filter" href="#" title="'+i.messages.filter+'" aria-label="'+i.messages.filter+'"><span class="k-icon k-i-filter"></span></a>').find(".k-grid-filter")),r.attr("tabindex",-1).on("click"+v,u(a._click,a))),a.link=r||e(),a.dataSource=M.create(i.dataSource),a.field=i.field||t.attr(c.attr("field")),a.model=a.dataSource.reader.model,a._parse=function(e){return null!=e?e+"":e},a.model&&a.model.fields&&(s=a.model.fields[a.field],s&&(l=s.type||"string",s.parse&&(a._parse=u(s.parse,s)))),i.values&&(l="enums"),a.type=l,n=n[l]||i.operators[l];for(o in n)break;a._defaultFilter=function(){return{field:a.field,operator:o||"eq",value:""}},a._refreshHandler=u(a.refresh,a),a.dataSource.bind(g,a._refreshHandler),i.appendToElement?a._init():a.refresh()},_init:function(){var t,i=this,n=i.options.ui,o=k(n);i.pane=i.options.pane,i.pane&&(i._isMobile=!0),o||(t=n||w[i.type]),i._isMobile?i._createMobileForm(t):i._createForm(t),i.form.on("submit"+v,u(i._submit,i)).on("reset"+v,u(i._reset,i)),o&&i.form.find(".k-textbox").removeClass("k-textbox").each(function(){n(e(this))}),i.form.find("["+c.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+c.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+c.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+c.attr("role")+"=datepicker]").removeClass("k-textbox"),i.refresh(),i.trigger(p,{field:i.field,container:i.form}),c.cycleForm(i.form)},_createForm:function(t){var i=this,o=i.options,r=i.operators||{},s=i.type,a=k(i.options.ui);r=r[s]||o.operators[s],i.form=e('<form title="'+i.options.messages.title+'" class="k-filter-menu"/>').html(c.template("boolean"===s?a?S:C:T)({field:i.field,format:o.format,ns:c.ns,messages:o.messages,extra:o.extra,operators:r,type:s,role:t,values:n(o.values)})),o.appendToElement?(i.element.append(i.form),i.popup=i.element.closest(".k-popup").data(h)):i.popup=i.form[h]({anchor:i.link,open:u(i._open,i),activate:u(i._activate,i),close:function(){i.options.closeCallback&&i.options.closeCallback(i.element)}}).data(h),i.form.on("keydown"+v,u(i._keydown,i))},_createMobileForm:function(t){var i=this,o=i.options,r=i.operators||{},s=i.type;r=r[s]||o.operators[s],i.form=e("<div />").html(c.template("boolean"===s?A:D)({field:i.field,title:o.title||i.field,format:o.format,ns:c.ns,messages:o.messages,extra:o.extra,operators:r,type:s,role:t,useRole:!c.support.input.date&&"date"===s||"number"===s,inputType:y[s],values:n(o.values)})),i.view=i.pane.append(i.form.html()),i.form=i.view.element.find("form"),i.view.element.on("click",".k-submit",function(e){i.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){i._closeForm(),e.preventDefault()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},i=[e._defaultFilter()],n=e._defaultFilter().operator;(e.options.extra||"isnull"!==n&&"isnullorempty"!==n&&"isnotnullorempty"!==n&&"isnotnull"!==n)&&i.push(e._defaultFilter()),e.filterModel=c.observable({logic:"and",filters:i}),e.form&&c.bind(e.form.children().first(),e.filterModel),e._bind(t)?e.link.addClass("k-state-active"):e.link.removeClass("k-state-active")},destroy:function(){var e=this;x.fn.destroy.call(e),e.form&&(c.unbind(e.form),c.destroy(e.form),e.form.unbind(v),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.unbind(v),e._refreshHandler&&(e.dataSource.unbind(g,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,i,n,o,r=this,s=e.filters,a=!1,l=0,c=r.filterModel;for(t=0,i=s.length;t<i;t++)o=s[t],o.field==r.field?(c.set("logic",e.logic),n=c.filters[l],n||(c.filters.push({field:r.field}),n=c.filters[l]),n.set("value",r._parse(o.value)),n.set("operator",o.operator),l++,a=!0):o.filters&&(a=a||r._bind(o));return a},_stripFilters:function(t){return e.grep(t,function(e){return""!==e.value&&null!=e.value||"isnull"===e.operator||"isnotnull"===e.operator||"isempty"===e.operator||"isnotempty"===e.operator||"isnullorempty"==e.operator||"isnotnullorempty"==e.operator})},_merge:function(e){var t,n,o,r=this,s=e.logic||"and",a=this._stripFilters(e.filters),l=r.dataSource.filter()||{filters:[],logic:"and"};for(i(l,r.field),n=0,o=a.length;n<o;n++)t=a[n],t.value=r._parse(t.value);return a.length&&(l.filters.length?(e.filters=a,"and"!==l.logic&&(l.filters=[{logic:l.logic,filters:l.filters}],l.logic="and"),l.filters.push(a.length>1?e:a[0])):(l.filters=a,l.logic=s)),l},filter:function(e){var t=this._stripFilters(e.filters);t.length&&this.trigger("change",{filter:{logic:e.logic,filters:t},field:this.field})||(e=this._merge(e),e.filters.length&&this.dataSource.filter(e))},clear:function(){var e=this,t=e.dataSource.filter()||{filters:[]};this.trigger("change",{filter:null,field:e.field})||e._removeFilter(t)},_removeFilter:function(t){var i=this;t.filters=e.grep(t.filters,function(e){return e.filters?(e.filters=o(e.filters,i.field),e.filters.length):e.field!=i.field}),t.filters.length||(t=null),i.dataSource.filter(t)},_submit:function(t){var i,n,o;t.preventDefault(),t.stopPropagation(),i=this.filterModel.toJSON(),n=e.grep(i.filters,function(e){return""!==e.value&&null!==e.value}),this._checkForNullOrEmptyFilter(i)||n&&n.length?this.filter(i):(o=this.dataSource.filter(),o&&(o.filters.push(i),i=o),this._removeFilter(i)),this._closeForm()},_checkForNullOrEmptyFilter:function(e){var t,i,n;return!!(e&&e.filters&&e.filters.length)&&(t=!1,i=!1,e.filters[0]&&(n=e.filters[0].operator,t="isnull"==n||"isnotnull"==n||"isnotempty"==n||"isempty"==n||"isnullorempty"==n||"isnotnullorempty"==n),e.filters[1]&&(n=e.filters[1].operator,i="isnull"==n||"isnotnull"==n||"isnotempty"==n||"isempty"==n||"isnullorempty"==n||"isnotnullorempty"==n),!this.options.extra&&t||this.options.extra&&(t||i))},_reset:function(){this.clear(),this.options.search&&this.container&&this.container.find("label").parent().show(),this._closeForm()},_closeForm:function(){this._isMobile?this.pane.navigate("",this.options.animations.right):this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(h),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(f,{field:this.field,container:this.form})},_keydown:function(e){e.keyCode==c.keys.ESC&&this.popup.close()},events:[p,"change",f],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:_,neq:b,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:_,neq:b,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than",isnull:"Is null",isnotnull:"Is not null"},date:{eq:_,neq:b,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before",isnull:"Is null",isnotnull:"Is not null"},enums:{eq:_,neq:b,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"Show items with value that:",title:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-",operator:"Operator",value:"Value",additionalValue:"Additional value",additionalOperator:"Additional operator",logic:"Filters logic",cancel:"Cancel"},animations:{left:"slide",right:"slide:right"}}}),I=".kendoFilterMultiCheck",M=c.data.DataSource,R='<div data-#=ns#role="view" data-#=ns#init-widgets="false" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form class="k-filter-menu k-mobile-list">#if(search){#<div class=\'k-textbox k-space-right\'><input placeholder=\'#=messages.search#\'/><span class=\'k-icon k-i-zoom\' /></div>#}#<ul class="k-multicheck-wrap"></ul></li><li class="k-button-container">#if(messages.selectedItemsFormat){#<div class=\'k-filter-selected-items\'></div>#}#<button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',F=x.extend({init:function(t,i){var n,o;x.fn.init.call(this,t,i),i=this.options,this.element=e(t),n=this.field=this.options.field||this.element.attr(c.attr("field")),o=i.checkSource,this._foreignKeyValues()?(this.checkSource=M.create(i.values),this.checkSource.fetch()):i.forceUnique?(o=e.extend(!0,{},i.dataSource.options),delete o.pageSize,this.checkSource=M.create(o),this.checkSource.reader.data=l(this.checkSource.reader.data,this.field)):this.checkSource=M.create(o),this.dataSource=i.dataSource,this.model=this.dataSource.reader.model,this._parse=function(e){return e+""},this.model&&this.model.fields&&(n=this.model.fields[this.field],n&&("number"==n.type?this._parse=function(e){return"string"==typeof e&&"null"===e.toLowerCase()?null:parseFloat(e)}:n.parse&&(this._parse=u(n.parse,n)),this.type=n.type||"string")),i.appendToElement?this._init():this._createLink(),this._refreshHandler=u(this.refresh,this),this.dataSource.bind(g,this._refreshHandler)},_createLink:function(){var e=this.element,t=e.addClass("k-with-icon k-filterable").find(".k-grid-filter");t[0]||(t=e.prepend('<a class="k-grid-filter" href="#" title="'+this.options.messages.filter+'" aria-label="'+this.options.messages.filter+'"><span class="k-icon k-i-filter"/></a>').find(".k-grid-filter")),this._link=t.attr("tabindex",-1).on("click"+v,u(this._click,this))},_init:function(){var e=this,t=this.options.forceUnique,i=this.options;this.pane=i.pane,this.pane&&(this._isMobile=!0),this._createForm(),this._foreignKeyValues()?this.refresh():t&&!this.checkSource.options.serverPaging&&this.dataSource.data().length?(this.checkSource.data(a(this.dataSource.data(),this.field)),this.refresh()):(this._attachProgress(),this.checkSource.fetch(function(){e.refresh.call(e)})),this.options.forceUnique||(this.checkChangeHandler=function(){e.container.empty(),e.refresh()},this.checkSource.bind(g,this.checkChangeHandler)),this.form.on("keydown"+I,u(this._keydown,this)).on("submit"+I,u(this._filter,this)).on("reset"+I,u(this._reset,this)),this.trigger(p,{field:this.field,container:this.form})},_attachProgress:function(){var e=this;this._progressHandler=function(){d.progress(e.container,!0)},this._progressHideHandler=function(){d.progress(e.container,!1)},this.checkSource.bind("progress",this._progressHandler).bind("change",this._progressHideHandler)},_input:function(){var e=this;e._clearTypingTimeout(),e._typingTimeout=setTimeout(function(){e.search()},100)},_clearTypingTimeout:function(){this._typingTimeout&&(clearTimeout(this._typingTimeout),this._typingTimeout=null)},search:function(){var e,t,i,n=this.options.ignoreCase,o=this.searchTextBox[0].value,r=this.container.find("label");for(n&&(o=o.toLowerCase()),e=0,this.options.checkAll&&r.length&&(r[0].parentNode.style.display=o?"none":"",e++);e<r.length;)t=r[e],i=t.textContent||t.innerText,n&&(i=i.toLowerCase()),t.parentNode.style.display=i.indexOf(o)>=0?"":"none",e++},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(f,{field:this.field,container:this.form})},_createForm:function(){var t,i=this.options,n="",o=this;this._isMobile||(i.search&&(n+="<div class='k-textbox k-space-right'><input placeholder='"+i.messages.search+"'/><span class='k-icon k-i-zoom' /></div>"),n+="<ul class='k-reset k-multicheck-wrap'></ul>",i.messages.selectedItemsFormat&&(n+="<div class='k-filter-selected-items'>"+c.format(i.messages.selectedItemsFormat,0)+"</div>"),n+="<button type='submit' class='k-button k-primary'>"+i.messages.filter+"</button>",n+="<button type='reset' class='k-button'>"+i.messages.clear+"</button>",this.form=e('<form class="k-filter-menu"/>').html(n),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(o.form=e("<div />").html(c.template(R)({field:o.field,title:i.title||o.field,ns:c.ns,messages:i.messages,search:i.search})),o.view=o.pane.append(o.form.html()),o.form=o.view.element.find("form"),t=this.view.element,this.container=t.find(".k-multicheck-wrap"),t.on("click",".k-submit",function(e){o.form.submit(),
e.preventDefault()}).on("click",".k-i-cancel",function(e){o._closeForm(),e.preventDefault()})):i.appendToElement?(this.popup=this.element.closest(".k-popup").data(h),this.element.append(this.form)):o.popup=o.form.kendoPopup({anchor:o._link,open:u(o._open,o),activate:u(o._activate,o),close:function(){o.options.closeCallback&&o.options.closeCallback(o.element)}}).data(h),i.search&&(this.searchTextBox=this.form.find(".k-textbox > input"),this.searchTextBox.on("input",u(this._input,this)))},createCheckAllItem:function(){var t=this.options,i=c.template(t.itemTemplate({field:"all",mobile:this._isMobile})),n=e(i({all:t.messages.checkAll}));this.container.prepend(n),this.checkBoxAll=n.find(":checkbox").eq(0).addClass("k-check-all"),this.checkAllHandler=u(this.checkAll,this),this.checkBoxAll.on(g+I,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(c.format(this.options.messages.selectedItemsFormat,this.container.find(":checked:not(.k-check-all)").length)),this.checkBoxAll){var e=this.container.find(":checkbox:not(.k-check-all)").length==this.container.find(":checked:not(.k-check-all)").length;this.checkBoxAll.prop("checked",e)}},refresh:function(e){var t=this.options.forceUnique,i=this.dataSource,n=this.getFilterArray();this._link&&this._link.toggleClass("k-state-active",0!==n.length),this.form&&(e&&t&&e.sender===i&&!i.options.serverPaging&&("itemchange"==e.action||"add"==e.action||"remove"==e.action||i.options.autoSync&&"sync"===e.action)&&!this._foreignKeyValues()&&(this.checkSource.data(a(this.dataSource.data(),this.field)),this.container.empty()),this.container.is(":empty")&&this.createCheckBoxes(),this.checkValues(n),this.trigger(m))},getFilterArray:function(){var t,i=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return r(i,this.field),t=s(i)},createCheckBoxes:function(){var e,t,i,n=this.options,o={field:this.field,format:n.format,mobile:this._isMobile,type:this.type};this.options.forceUnique?this._foreignKeyValues()?(e=this.checkSource.data(),o.valueField="value",o.field="text"):e=this.checkSource.data():e=this.checkSource.view(),t=c.template(n.itemTemplate(o)),i=c.render(t,e),n.checkAll&&this.createCheckAllItem(),this.container.on(g+I,":checkbox",u(this.updateCheckAllState,this)),this.container.append(i)},checkAll:function(){var e=this.checkBoxAll.is(":checked");this.container.find(":checkbox").prop("checked",e)},checkValues:function(t){var i=this;e(e.grep(this.container.find(":checkbox").prop("checked",!1),function(n){var o,r,s=!1;if(!e(n).is(".k-check-all"))for(o=i._parse(e(n).val()),r=0;r<t.length;r++)if(s="date"==i.type?t[r]&&o?t[r].getTime()==o.getTime():null===t[r]&&null===o:t[r]==o)return s})).prop("checked",!0),this.updateCheckAllState()},_filter:function(t){var i,n;t.preventDefault(),t.stopPropagation(),i={logic:"or"},n=this,i.filters=e.map(this.form.find(":checkbox:checked:not(.k-check-all)"),function(t){return{value:e(t).val(),operator:"eq",field:n.field}}),i.filters.length&&this.trigger("change",{filter:i,field:n.field})||(i=this._merge(i),i.filters.length?this.dataSource.filter(i):this.clear(),this._closeForm())},_stripFilters:function(t){return e.grep(t,function(e){return null!=e.value})},_foreignKeyValues:function(){var e=this.options;return e.values&&!e.checkSource},destroy:function(){var e=this;x.fn.destroy.call(e),e.form&&(c.unbind(e.form),c.destroy(e.form),e.form.unbind(I),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null,e.container&&(e.container.unbind(I),e.container=null),e.checkBoxAll&&e.checkBoxAll.unbind(I)),e.view&&(e.view.purge(),e.view=null),e._link&&e._link.unbind(v),e._refreshHandler&&(e.dataSource.unbind(g,e._refreshHandler),e.dataSource=null),e.checkChangeHandler&&e.checkSource.unbind(g,e.checkChangeHandler),e._progressHandler&&e.checkSource.unbind("progress",e._progressHandler),e._progressHideHandler&&e.checkSource.unbind("change",e._progressHideHandler),this._clearTypingTimeout(),this.searchTextBox=null,e.element=e.checkSource=e.container=e.checkBoxAll=e._link=e._refreshHandler=e.checkAllHandler=null},options:{name:"FilterMultiCheck",itemTemplate:function(e){var i=e.field,n=e.format,o=e.valueField,r=e.mobile,s="";return o===t&&(o=i),"date"==e.type&&(s=":yyyy-MM-ddTHH:mm:sszzz"),"<li class='k-item'><label class='k-label'><input type='checkbox' class='"+(r?"k-check":"")+"'  value='#:kendo.format('{0"+s+"}',"+o+")#'/>#:kendo.format('"+(n?n:"{0}")+"', "+i+")#</label></li>"},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected"},forceUnique:!0,animations:{left:"slide",right:"slide:right"}},events:[p,m,"change",f]});e.extend(F.fn,{_click:E.fn._click,_keydown:E.fn._keydown,_reset:E.fn._reset,_closeForm:E.fn._closeForm,_removeFilter:E.fn._removeFilter,clear:E.fn.clear,_merge:E.fn._merge}),d.plugin(E),d.plugin(F)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.menu.min",["kendo.popup.min"],e)}(function(){return function(e,t){function i(e,t){return e=e.split(" ")[!t+0]||e,e.replace("top","up").replace("bottom","down")}function n(e,t,i){e=e.split(" ")[!t+0]||e;var n={origin:["bottom",i?"right":"left"],position:["top",i?"right":"left"]},o=/left|right/.test(e);return o?(n.origin=["top",e],n.position[1]=T.directions[e].reverse):(n.origin[0]=e,n.position[0]=T.directions[e].reverse),n.origin=n.origin.join(" "),n.position=n.position.join(" "),n}function o(t,i){try{return e.contains(t,i)}catch(n){return!1}}function r(t){t=e(t),t.addClass("k-item").children(W).addClass(X),t.children("a").addClass(j).children(W).addClass(X),t.filter(":not([disabled])").addClass(be),t.filter(".k-separator").empty().append("&nbsp;"),t.filter("li[disabled]").addClass(ke).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children(G).length||t.contents().filter(function(){return!(this.nodeName.match(O)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll("<span class='"+j+"'/>"),s(t),l(t)}function s(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow-60]:not(.k-sprite)").remove(),t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))").each(function(){var t=e(this),i=a(t);t.append("<span class='k-icon"+i+" k-menu-expand-arrow'/>")})}function a(e){var t,i=e.parent().parent(),n=T.support.isRtl(i);return t=i.hasClass(q+"-horizontal")?" k-i-arrow-60-down":n?" k-i-arrow-60-left":" k-i-arrow-60-right"}function l(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(Q),t.filter(".k-last:not(:last-child)").removeClass($),t.filter(":first-child").addClass(Q),t.filter(":last-child").addClass($)}function c(e){var t,i;if(e&&e.length)for(t in e)i=e.eq(t),i.find("ul").length?i.attr("aria-haspopup",!0):i.removeAttr("aria-haspopup")}function d(e){if(!e.hasClass(q))return e.parentsUntil("."+q,"li")}function u(t,i){var n=p(i);n&&h(t,n),i.items&&e(t).children("ul").children("li").each(function(e){u(this,i.items[e])})}function h(t,i){e(t).children(".k-link").data({selectHandler:i})}function p(e){var t=e.select,i=T.isFunction;return t&&i(t)?t:null}function f(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function m(e){return e?"ul[data-group='"+e+"']":"ul[data-group]"}function g(t,i){var n=t.find(f()),o=[];return n.each(function(n,r){var s,a;for(r=e(r),s=r.data(ge),a=t;s;)a=i.find(m(s)+":visible"),a.length&&o.push(a),r=a.find(f()),s=r.data(ge)}),o}function v(t,i){var n=t.data(me);return n?i.find(f(n)):e([])}function _(t,i){var n=t.data(ge);return n?i.children(Te).children(m(n)):e([])}function b(t,i){var n,o,r=[],s=function(e){for(;e.parentNode&&!i.is(e.parentNode);)r.push(e.parentNode),e=e.parentNode},a=t[0]||t;for(s(a),n=r[r.length-1];e(n).is(Te)&&(o=e(n).children("ul"),a=v(o,i)[0]);)r.push(a),s(a),n=r[r.length-1];return r}function w(e){var t=0;return e.wheelDelta&&(t=-e.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}function y(e,t){for(var i=0,n=e.parentNode;n&&!isNaN(n[t]);)i+=n[t],n=n.parentNode;return i}function k(e){return re&&e.originalEvent&&e.originalEvent.pointerType in He}function x(e){var t=e.originalEvent;return E&&/touch/i.test(t.type||"")}function C(e){e.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var S,T=window.kendo,D=T.ui,A=T._activeElement,E=T.support.touch&&T.support.mobileOS,I="mousedown",M="click",R=30,F=50,P=e.extend,z=e.proxy,B=e.each,L=T.template,H=T.keys,N=D.Widget,O=/^(ul|a|div)$/i,V=".kendoMenu",W="img",U="open",q="k-menu",j="k-link k-menu-link",G=".k-link",$="k-last",K="close",Y="timer",Q="k-first",X="k-image",Z="select",J="zIndex",ee="activate",te="deactivate",ie="touchstart"+V+" MSPointerDown"+V+" pointerdown"+V,ne=T.support.pointers,oe=T.support.msPointers,re=oe||ne,se=T.support.touch?"touchstart":"",ae=ne?"pointerover":oe?"MSPointerOver":"mouseenter",le=ne?"pointerout":oe?"MSPointerOut":"mouseleave",ce="DOMMouseScroll"+V+" mousewheel"+V,de=T.support.resize+V,ue="scrollWidth",he="scrollHeight",pe="offsetWidth",fe="offsetHeight",me="group",ge="groupparent",ve=e(document.documentElement),_e="kendoPopup",be="k-state-default",we="k-state-hover",ye="k-state-focused",ke="k-state-disabled",xe="k-state-selected",Ce=".k-menu",Se=".k-menu-group",Te=".k-animation-container",De=Se+","+Te,Ae=":not(.k-list) > .k-item",Ee=".k-item.k-state-disabled",Ie=".k-item",Me=".k-item:not(.k-state-disabled)",Re=".k-item:not(.k-state-disabled) > .k-link",Fe=":not(.k-item.k-separator)",Pe=Ie+Fe+":eq(0)",ze=Ie+Fe+":last",Be="div:not(.k-animation-container,.k-list-container)",Le=".k-menu-scroll-button",He={2:1,touch:1},Ne={content:L("<div #= contentCssAttributes(item) # tabindex='-1'>#= content(item) #</div>"),group:L("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:L("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(data) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),item:L("<li class='#= wrapperCssClass(group, item) #' #= itemCssAttributes(item) # role='menuitem'  #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),scrollButton:L("<span class='k-button k-button-icon k-menu-scroll-button k-scroll-#= direction #' unselectable='on'><span class='k-icon k-i-arrow-60-#= direction #'></span></span>"),image:L("<img #= imageCssAttributes(item) # alt='' src='#= item.imageUrl #' />"),arrow:L("<span class='#= arrowClass(item, group) #'></span>"),sprite:L("<span class='k-sprite #= spriteCssClass #'></span>"),empty:L("")},Oe={wrapperCssClass:function(e,t){var i="k-item",n=t.index;return i+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===n&&(i+=" k-first"),n==e.length-1&&(i+=" k-last"),t.cssClass&&(i+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(i+=" "+t.attr["class"]),t.selected&&(i+=" "+xe),i},itemCssAttributes:function(e){var t,i="",n=e.attr||{};for(t in n)n.hasOwnProperty(t)&&"class"!==t&&(i+=t+'="'+n[t]+'" ');return i},imageCssAttributes:function(e){var t,i="",n=e.imageAttr||{};n["class"]?n["class"]+=" "+X:n["class"]=X;for(t in n)n.hasOwnProperty(t)&&(i+=t+'="'+n[t]+'" ');return i},contentCssAttributes:function(e){var t,i="",n=e.contentAttr||{},o="k-content k-group k-menu-group";n["class"]?n["class"]+=" "+o:n["class"]=o;for(t in n)n.hasOwnProperty(t)&&(i+=t+'="'+n[t]+'" ');return i},textClass:function(){return j},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var i="k-icon";return i+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},text:function(e){return e.encoded===!1?e.text:T.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-menu-group"},content:function(e){return e.content?e.content:"&nbsp;"}},Ve=N.extend({init:function(e,t){var i=this;N.fn.init.call(i,e,t),e=i.wrapper=i.element,t=i.options,i._initData(t),i._updateClasses(),i._animations(t),i.nextItemZIndex=100,i._tabindex(),i._initOverflow(t),i._attachMenuEventsHandlers(),t.openOnClick&&(i.clicked=!1),e.attr("role","menubar"),e[0].id&&(i._ariaId=T.format("{0}_mn_active",e[0].id)),T.notify(i)},events:[U,K,ee,te,Z],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(e){var t=this;e.dataSource&&(t.angular("cleanup",function(){return{elements:t.element.children()}}),t.element.empty(),t.append(e.dataSource,t.element),t.angular("compile",function(){return{elements:t.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,i=t.element,n=t.options,o=t._overflowWrapper();(o||i).on(ie,Ie,z(t._focusHandler,t)).on(M+V,Ee,!1).on(M+V,Ie,z(t._click,t)).on(ie+" "+I+V,".k-content",z(t._preventClose,t)).on(ae+V,Me,z(t._mouseenter,t)).on(le+V,Me,z(t._mouseleave,t)).on(I+V,Me,z(t._mousedown,t)).on(se+V+" "+ae+V+" "+le+V+" "+I+V+" "+M+V,Re,z(t._toggleHover,t)),i.on("keydown"+V,z(t._keydown,t)).on("focus"+V,z(t._focus,t)).on("focus"+V,".k-content",z(t._focus,t)).on("blur"+V,z(t._removeHoverItem,t)).on("blur"+V,"[tabindex]",z(t._checkActiveElement,t)),o&&o.on(le+V,De,z(t._mouseleavePopup,t)).on(ae+V,De,z(t._mouseenterPopup,t)),n.openOnClick&&(t._documentClickHandler=z(t._documentClick,t),e(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,i=t._overflowWrapper();i&&i.off(V),t.element.off(V),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var i,n,o,r,s=this,a="horizontal"==t.orientation;t.scrollable&&(s._openedPopups={},s._scrollWrapper=s.element.wrap("<div class='k-menu-scroll-wrapper "+t.orientation+"'></div>").parent(),a&&C(s.element),i=e(Ne.scrollButton({direction:a?"left":"up"})),n=e(Ne.scrollButton({direction:a?"right":"down"})),i.add(n).appendTo(s._scrollWrapper),s._initScrolling(s.element,i,n,a),o=s.element.outerWidth(),r=s.element[0].style.width,r="auto"===r?"":r,a&&e(window).on(de,T.throttle(function(){s._setOverflowWrapperWidth(o,r),s._toggleScrollButtons(s.element,i,n,a)},100)),s._setOverflowWrapperWidth(o,r),s._toggleScrollButtons(s.element,i,n,a))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var i,n,o,r,s=this,a=s._scrollWrapper.css("width");s._scrollWrapper.css({width:""}),i=s._scrollWrapper.outerWidth(),s._scrollWrapper.css({width:a}),n=s.element.outerWidth(),o=s.element[0].offsetWidth-s.element[0].clientWidth,n!=i&&i>0&&(r=t?Math.min(e,i):i,s.element.width(r-o),s._scrollWrapper.width(r))},_reinitOverflow:function(e){var t=this,i=e.scrollable&&!t.options.scrollable||!e.scrollable&&t.options.scrollable||e.scrollable&&t.options.scrollable&&e.scrollable.distance!=t.options.scrollable.distance||e.orientation!=t.options.orientation;i&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var i=this,n=i._overflowWrapper();n&&(n.off(V),n.find(Le).off(V).remove(),n.children(Te).each(function(t,i){var o,r=e(i).children(Se);r.off(ce),o=v(r,n),o.length&&o.append(i)}),n.find(f()).removeAttr("data-groupparent"),n.find(m()).removeAttr("data-group"),i.element.off(ce),e(window).off(de),n.contents().unwrap(),i._scrollWrapper=i._popupsWrapper=i._openedPopups=t)},_initScrolling:function(t,i,n,o){var r=this,s=r.options.scrollable,a=e.isNumeric(s.distance)?s.distance:F,l=a/2,c="-="+a,d="+="+a,u="-="+2*a,h="+="+2*a,p=!1,f=!1,m=function(e){var s=o?{scrollLeft:e}:{scrollTop:e};t.finish().animate(s,"fast","linear",function(){p&&m(e)}),r._toggleScrollButtons(t,i,n,o)},g=function(e){p||f||(m(e.data.direction),p=!0)},v=function(s){var a=o?{scrollLeft:s.data.direction}:{scrollTop:s.data.direction};f=x(s)||k(s),t.stop().animate(a,"fast","linear",function(){f?(r._toggleScrollButtons(t,i,n,o),p=!0):e(s.currentTarget).trigger(ae)}),p=!1,s.stopPropagation(),s.preventDefault()};i.on(ae+V,{direction:c},g).on(T.eventMap.down+V,{direction:u},v),n.on(ae+V,{direction:d},g).on(T.eventMap.down+V,{direction:h},v),i.add(n).on(le+V,function(){t.stop(),p=!1,r._toggleScrollButtons(t,i,n,o)}),t.on(ce,function(e){var s,a,c,d;e.ctrlKey||e.shiftKey||e.altKey||(s=w(e.originalEvent),a=Math.abs(s)*l,c=(s>0?"+=":"-=")+a,d=o?{scrollLeft:c}:{scrollTop:c},r._closeChildPopups(t),t.finish().animate(d,"fast","linear",function(){r._toggleScrollButtons(t,i,n,o)}),e.preventDefault())})},_toggleScrollButtons:function(e,t,i,n){var o=n?e.scrollLeft():e.scrollTop(),r=n?ue:he,s=n?pe:fe;t.toggle(0!==o),i.toggle(o<e[0][r]-e[0][s]-1)},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=P(!0,t,e.animation),"dataSource"in e&&this._initData(e),this._updateClasses(),this._reinitOverflow(e),N.fn.setOptions.call(this,e)},destroy:function(){var e=this;N.fn.destroy.call(e),e._detachMenuEventsHandlers(),e._destroyOverflow(),T.destroy(e.element)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.length?t.find("> .k-menu-group, > .k-animation-container > .k-menu-group"):null);return B(i.items,function(t){i.group.append(this),s(this),u(this,e[t]||e)}),s(t),l(i.group.find(".k-first, .k-last").add(i.items)),c(d(i.group)),this},insertBefore:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return B(i.items,function(i){t.before(this),s(this),l(this),u(this,e[i]||e)}),l(t),this},insertAfter:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return B(i.items,function(i){t.after(this),s(this),l(this),u(this,e[i]||e)}),l(t),this},_insert:function(t,i,n){var o,s,a,l,c=this;return i&&i.length||(n=c.element),a=e.isPlainObject(t),l={firstLevel:n.hasClass(q),horizontal:n.hasClass(q+"-horizontal"),expanded:!0,length:n.children().length},i&&!n.length&&(n=e(Ve.renderGroup({group:l})).appendTo(i)),a||e.isArray(t)?o=e(e.map(a?[t]:t,function(t,i){return"string"==typeof t?e(t).get():e(Ve.renderItem({group:l,item:P(t,{index:i})})).get()})):(o="string"==typeof t&&"<"!=t.charAt(0)?c.element.find(t):e(t),s=o.find("> ul").addClass("k-menu-group").attr("role","menu"),o=o.filter("li"),o.add(s.find("> li")).each(function(){r(this)})),{items:o,group:n}},remove:function(e){var t,i,n,o,r;return e=this.element.find(e),t=this,i=e.parentsUntil(t.element,Ae),n=e.parent("ul:not(.k-menu)"),e.remove(),n&&!n.children(Ae).length&&(o=d(n),r=n.parent(Te),r.length?r.remove():n.remove(),c(o)),i.length&&(i=i.eq(0),s(i),l(i)),t},open:function(o){var r,s,a=this,l=a.options,c="horizontal"==l.orientation,d=l.direction,u=T.support.isRtl(a.wrapper),h=a._overflowWrapper();return o=(h||a.element).find(o),/^(top|bottom|default)$/.test(d)&&(d=u?c?(d+" left").replace("default","bottom"):"left":c?(d+" right").replace("default","bottom"):"right"),r=">.k-popup:visible,>.k-animation-container>.k-popup:visible",s=function(){var t=e(this).data(_e);t&&a.close(e(this).closest("li.k-item"),!0)},o.siblings().find(r).each(s),h&&o.find(r).each(s),a.options.openOnClick&&(a.clicked=!0),o.each(function(){var o=e(this);clearTimeout(o.data(Y)),o.data(Y,setTimeout(function(){var r,s,p,m,g,v,_,b,w,y,k=o.find(".k-menu-group:first:hidden");!k[0]&&h&&(s=a._getPopup(o),k=s&&s.element),k.is(":visible")||k[0]&&a._triggerEvent({item:o[0],type:U})===!1&&(!k.find(".k-menu-group")[0]&&k.children(".k-item").length>1?(p=e(window).height(),m=function(){k.css({maxHeight:p-(T._outerHeight(k)-k.height())-T.getShadows(k).bottom,overflow:"auto"})},T.support.browser.msie&&T.support.browser.version<=7?setTimeout(m,0):m()):k.css({maxHeight:"",overflow:""}),o.data(J,o.css(J)),g=a.nextItemZIndex++,o.css(J,g),a.options.scrollable&&o.parent().siblings(Le).css({zIndex:++g}),r=k.data(_e),v=o.parent().hasClass(q),_=v&&c,b=n(d,v,u),w=l.animation.open.effects,y=w!==t?w:"slideIn:"+i(d,v),r?(r=k.data(_e),r.options.origin=b.origin,r.options.position=b.position,r.options.animation.open.effects=y):r=k.kendoPopup({activate:function(){a._triggerEvent({item:this.wrapper.parent(),type:ee})},deactivate:function(e){e.sender.element.removeData("targetTransform").css({opacity:""}),a._triggerEvent({item:this.wrapper.parent(),type:te})},origin:b.origin,position:b.position,collision:l.popupCollision!==t?l.popupCollision:_?"fit":"fit flip",anchor:o,appendTo:h||o,animation:{open:P(!0,{effects:y},l.animation.open),close:l.animation.close},open:z(a._popupOpen,a),close:function(e){var t,i=e.sender.wrapper.parent();h&&(t=e.sender.element.data(me),t&&(i=(h||a.element).find(f(t))),e.sender.wrapper.children(Le).hide()),a._triggerEvent({item:i[0],type:K})?e.preventDefault():(i.css(J,i.data(J)),i.removeData(J),a.options.scrollable&&i.parent().siblings(Le).css({zIndex:""}),(E||re||T.support.mouseAndTouchPresent)&&(i.removeClass(we),a._removeHoverItem()))}}).data(_e),k.removeAttr("aria-hidden"),a._configurePopupOverflow(r,o),r._hovered=!0,r.open(),a._initPopupScrolling(r))},a.options.hoverDelay))}),a},_configurePopupOverflow:function(e,t){var i,n=this;n.options.scrollable&&(n._wrapPopupElement(e),t.attr("data-groupparent")||(i=(new Date).getTime(),t.attr("data-groupparent",i),e.element.attr("data-group",i)))},_wrapPopupElement:function(e){e.element.parent().is(Te)||(e.wrapper=T.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,i){var n=this;n.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&n._initPopupScrollButtons(e,t,i)},_initPopupScrollButtons:function(t,i,n){var o=this,r=t.wrapper.children(Le),s=o.options.animation,a=(s&&s.open&&s.open.duration||0)+R;setTimeout(function(){var s,a;r.length||(s=e(Ne.scrollButton({direction:i?"left":"up"})),a=e(Ne.scrollButton({direction:i?"right":"down"})),r=s.add(a).appendTo(t.wrapper),o._initScrolling(t.element,s,a,i),n||r.on(ae+V,function(){var i=o._overflowWrapper();e(g(t.element,i)).each(function(e,t){var n=i.find(f(t.data(me)));o.close(n)})}).on(le+V,function(){setTimeout(function(){e.isEmptyObject(o._openedPopups)&&o._closeParentPopups(t.element)},R)})),o._toggleScrollButtons(t.element,r.first(),r.last(),i)},a)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children("."+ye).removeClass(ye),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,i){var n,o,r,s,a,l,c,d,u,h=t.element,p=h.add(h.parent(Te));p.height(h.hasClass(q)&&this._initialHeight||""),n=t._location(i),o=e(window).height(),r=n.height,s=i?0:Math.max(n.top,0),a=i?0:y(this._overflowWrapper()[0],"scrollTop"),l=window.innerHeight-o,c=o-T.getShadows(h).bottom+l,d=c+a>r+s,d||(u=Math.min(c,c-s+a),p.css({overflow:"hidden",height:u+"px"}))},close:function(t,i){var n,o,r=this,s=r._overflowWrapper(),a=s||r.element;return t=a.find(t),t.length||(t=a.find(">.k-item")),n=function(t){var i=!1;return e.isEmptyObject(r._openedPopups)?i:(e(g(t,s)).each(function(e,t){return i=!!r._openedPopups[""+t.data(me)],!i}),i)},o=function(e){var t=e.data(ge);return!s||!t||!r._openedPopups[""+t]},t.each(function(){var a=e(this);!i&&r._isRootItem(a)&&(r.clicked=!1),clearTimeout(a.data(Y)),a.data(Y,setTimeout(function(){var e=r._getPopup(a);if(e&&(o(a)||r._forceClose)){if(!r._forceClose&&n(e.element))return;e.close(),e.element.attr("aria-hidden",!0),s&&r._forceClose&&t.last().is(a[0])&&delete r._forceClose}},r.options.hoverDelay))}),r},_getPopup:function(e){var t,i,n=this,o=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(_e),r=n._overflowWrapper();return!o&&r&&(t=e.data(ge),t&&(i=r.find(m(t)),o=i.data(_e))),o},_toggleDisabled:function(t,i){this.element.find(t).each(function(){e(this).toggleClass(be,i).toggleClass(ke,!i).attr("aria-disabled",!i)})},_toggleHover:function(t){var i=e(T.eventTarget(t)||t.target).closest(Ae),n=t.type==ae||I.indexOf(t.type)!==-1;i.siblings().removeClass(we),i.parents("li."+ke).length||i.toggleClass(we,n||"mousedown"==t.type||"pointerover"==t.type||t.type==se),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var i=this,n=e(t?t.currentTarget:this._hoverItem()),r=i._findRootParent(n)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(o(r,T._activeElement())||!t||o(r,t.currentTarget))||i.close(r)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(ye)&&(e.removeClass(ye),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element,i=".k-menu-init div ul";t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-header k-menu-init "+q).addClass(q+"-"+this.options.orientation),t.find("li > ul").filter(function(){return!T.support.matchesSelector.call(this,i)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each(function(){r(this)})},_mouseenter:function(t){var i=this,n=e(t.currentTarget),r=i._itemHasChildren(n),s=n.data(ge)||n.parent().data(me),a=k(t);s&&(i._openedPopups[""+s]=!0),t.delegateTarget!=n.parents(Ce)[0]&&t.delegateTarget!=n.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(i._keyTriggered=!1,i.options.openOnClick.rootMenuItems&&i._isRootItem(n.closest(Ae))||i.options.openOnClick.subMenuItems&&!i._isRootItem(n.closest(Ae))||(!(i.options.openOnClick===!1||i.options.openOnClick.rootMenuItems===!1&&i._isRootItem(n.closest(Ae))||i.options.openOnClick.subMenuItems===!1&&!i._isRootItem(n.closest(Ae))||i.clicked)||E||a&&i._isRootItem(n.closest(Ae))||!o(t.currentTarget,t.relatedTarget)&&r&&i.open(n),(i.options.openOnClick===!0&&i.clicked||E)&&n.siblings().each(z(function(e,t){i.close(t,!0)},i))))},_mousedown:function(t){var i=this,n=e(t.currentTarget);(i.options.openOnClick.subMenuItems&&!i._isRootItem(n)||E)&&n.siblings().each(z(function(e,t){i.close(t,!0)},i))},_mouseleave:function(i){var n=this,r=e(i.currentTarget),s=r.data(ge),a=r.children(Te).length||r.children(Se).length||s,l=e(window);return s&&delete n._openedPopups[""+s],r.parentsUntil(Te,".k-list-container,.k-calendar-container")[0]?(i.stopImmediatePropagation(),t):n.options.openOnClick!==!1&&(n.options.openOnClick.rootMenuItems||!n._isRootItem(r))&&(n.options.openOnClick.subMenuItems||n._isRootItem(r))||E||k(i)||o(i.currentTarget,i.relatedTarget||i.target)||!a||o(i.currentTarget,T._activeElement())?((T.support.browser.msie&&!i.toElement&&!i.relatedTarget&&!k(i)||i.clientX<0||i.clientY<0||i.clientY>l.height()||i.clientX>l.width())&&n.close(r),t):(n.close(r,!0),t)},_mouseenterPopup:function(t){var i,n=this,o=e(t.currentTarget);o.parent().is(Te)||(o=o.children("ul"),i=o.data(me),i&&(n._openedPopups[""+i]=!0))},_mouseleavePopup:function(t){var i=this,n=e(t.currentTarget);!k(t)&&n.is(Te)&&i._closePopups(n.children("ul"))},_closePopups:function(t){var i,n=this,o=n._overflowWrapper(),r=t.data(me);r&&(delete n._openedPopups[""+r],i=o.find(f(r)),setTimeout(function(){if(n.options.openOnClick)n._closeChildPopups(t);else if(e.isEmptyObject(n._openedPopups)){var o=n._innerPopup(t);n._closeParentPopups(o)}else n.close(i,!0)},0))},_closeChildPopups:function(t){var i=this,n=i._overflowWrapper();e(g(t,n)).each(function(){var e=n.find(f(this.data(me)));i.close(e,!0)})},_innerPopup:function(e){var t=this._overflowWrapper(),i=g(e,t);return i[i.length-1]||e},_closeParentPopups:function(e){var t=this,i=t._overflowWrapper(),n=e.data(me),o=i.find(f(n));for(n=o.parent().data(me),t.close(o,!0);n&&!t._openedPopups[n]&&!o.parent().is(Ce);)o=i.find(f(n)),t.close(o,!0),n=o.parent().data(me)},_click:function(i){for(var n,o,r,s,a,l,c=this,d=c.options,u=e(T.eventTarget(i)),h=u[0],p=u[0]?u[0].nodeName.toUpperCase():"",f="INPUT"==p||"SELECT"==p||"BUTTON"==p||"LABEL"==p,g=u.closest(G),v=u.closest(Ae),_=v[0],b=g.attr("href"),w=u.attr("href"),y=e("<a href='#' />").attr("href"),x=!!b&&b!==y,C=x&&!!b.match(/^#/),S=!!w&&w!==y,D=c._overflowWrapper();h&&h.parentNode!=_;)h=h.parentNode;if(!e(h).is(Be)){if(v.hasClass(ke))return i.preventDefault(),t;if(i.handled||!c._triggerSelect(u,_)||f||i.preventDefault(),i.handled=!0,o=v.children(De),D&&(a=v.data(ge),a&&(o=D.find(m(a)))),r=o.is(":visible"),s=d.openOnClick&&r&&c._isRootItem(v),d.closeOnClick&&(!x||C)&&(!o.length||s))return v.removeClass(we).css("height"),c._oldHoverItem=c._findRootParent(v),l=c._parentsUntil(g,c.element,Ae),c._forceClose=!!D,c.close(l),c.clicked=!1,"MSPointerUp".indexOf(i.type)!=-1&&i.preventDefault(),t;x&&i.enterKey&&g[0].click(),(c._isRootItem(v)&&d.openOnClick!==!1||d.openOnClick.subMenuItems||T.support.touch||k(i)&&c._isRootItem(v.closest(Ae)))&&(x||f||S||i.preventDefault(),c.clicked=!0,n=o.is(":visible")?K:U,(d.closeOnClick||n!=K)&&c[n](v))}},_parentsUntil:function(i,n,o){var r,s,a=this._overflowWrapper();return a?(r=b(i,a),s=[],e(r).each(function(){var i=e(this);return!i.is(n)&&(i.is(o)&&s.push(this),t)}),e(s)):i.parentsUntil(n,o)},_triggerSelect:function(e,t){var i,n,o,r;return e=e.is(".k-link")?e:e.closest(".k-link"),i=e.data("selectHandler"),i&&(n=this._getEventData(e),i.call(this,n)),o=n&&n.isDefaultPrevented(),r=this._triggerEvent({item:t,type:Z}),o||r},_getEventData:function(e){var t={sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}};return t},_documentClick:function(e){var t=this;o((t._overflowWrapper()||t.element)[0],e.target)||(t.clicked=!1)},_focus:function(i){var n=this,o=i.target,r=n._hoverItem(),s=A();return o==n.wrapper[0]||e(o).is(":kendoFocusable")?(s===i.currentTarget&&(r.length?n._moveHover([],r):n._oldHoverItem||n._moveHover([],n.wrapper.children().first())),t):(i.stopPropagation(),e(o).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(ye),n.wrapper.focus(),t)},_keydown:function(e){var i,n,o,r=this,s=e.keyCode,a=r._oldHoverItem,l=T.support.isRtl(r.wrapper);if(e.target==e.currentTarget||s==H.ESC){if(a||(a=r._oldHoverItem=r._hoverItem()),n=r._itemBelongsToVertival(a),o=r._itemHasChildren(a),r._keyTriggered=!0,s==H.RIGHT)i=r[l?"_itemLeft":"_itemRight"](a,n,o);else if(s==H.LEFT)i=r[l?"_itemRight":"_itemLeft"](a,n,o);else if(s==H.DOWN)i=r._itemDown(a,n,o);else if(s==H.UP)i=r._itemUp(a,n,o);else if(s==H.HOME)r._moveHover(a,a.parent().children().first()),e.preventDefault();else if(s==H.END)r._moveHover(a,a.parent().children().last()),e.preventDefault();else if(s==H.ESC)i=r._itemEsc(a,n);else if(s==H.ENTER||s==H.SPACEBAR)i=a.children(".k-link"),i.length>0&&(r._click({target:i[0],preventDefault:function(){},enterKey:!0}),o&&!a.hasClass(ke)?(r.open(a),r._moveHover(a,r._childPopupElement(a).children().first())):r._moveHover(a,r._findRootParent(a)));else if(s==H.TAB)return i=r._findRootParent(a),r._moveHover(a,i),r._checkActiveElement(),t;i&&i[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length?e.parent().hasClass("k-menu-group")||t:t},_itemHasChildren:function(e){return!!(e&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, div.k-animation-container").length>0||!!e.data(ge)&&!!this._overflowWrapper().children(m(e.data(ge))));
},_moveHover:function(t,i){var n=this,o=n._ariaId;t.length&&i.length&&t.removeClass(ye),i.length&&(i[0].id&&(o=i[0].id),i.addClass(ye),n._oldHoverItem=i,o&&(n.element.removeAttr("aria-activedescendant"),e("#"+o).removeAttr("id"),i.attr("id",o),n.element.attr("aria-activedescendant",o)),n._scrollToItem(i))},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,Ce,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(q)},_itemRight:function(e,t,i){var n,o,r,s,a=this;return t?i&&!e.hasClass(ke)?(a.open(e),n=a._childPopupElement(e).children().first()):"horizontal"==a.options.orientation&&(o=a._findRootParent(e),r=a._overflowWrapper(),r&&(s=_(o,r),a._closeChildPopups(s)),a.close(o),n=o.nextAll(Pe)):(n=e.nextAll(Pe),n.length||(n=e.prevAll(ze)),a.close(e)),n&&!n.length?n=a.wrapper.children(".k-item").first():n||(n=[]),a._moveHover(e,n),n},_itemLeft:function(e,t){var i,n,o=this;return t?(i=e.parent().closest(".k-item"),n=o._overflowWrapper(),!i.length&&n&&(i=v(e.parent(),n)),o.close(i),o._isRootItem(i)&&"horizontal"==o.options.orientation&&(i=i.prevAll(Pe))):(i=e.prevAll(Pe),i.length||(i=e.nextAll(ze)),o.close(e)),i.length||(i=o.wrapper.children(".k-item").last()),o._moveHover(e,i),i},_itemDown:function(e,t,i){var n,o=this;if(t)n=e.nextAll(Pe);else{if(!i||e.hasClass(ke))return;o.open(e),n=o._childPopupElement(e).children().first()}return!n.length&&e.length?n=e.parent().children().first():e.length||(n=o.wrapper.children(".k-item").first()),o._moveHover(e,n),n},_itemUp:function(e,t){var i,n=this;if(t)return i=e.prevAll(Pe),!i.length&&e.length?i=e.parent().children().last():e.length||(i=n.wrapper.children(".k-item").last()),n._moveHover(e,i),i},_scrollToItem:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p=this;p.options.scrollable&&e&&e.length&&(t=e.parent(),i=!!t.hasClass(q)&&"horizontal"==p.options.orientation,n=i?"scrollLeft":"scrollTop",o=i?T._outerWidth:T._outerHeight,r=t[n](),s=o(e),a=e[0][i?"offsetLeft":"offsetTop"],l=o(t),c=t.siblings(Le),d=c.length?o(c.first()):0,r+l<a+s+d?u=a+s-l+d:r>a-d&&(u=a-d),isNaN(u)||(h={},h[n]=u,t.finish().animate(h,"fast","linear",function(){p._toggleScrollButtons(t,c.first(),c.last(),i)})))},_itemEsc:function(e,t){var i,n=this;return t?(i=e.parent().closest(".k-item"),n.close(i),n._moveHover(e,i),i):e},_childPopupElement:function(e){var t=e.find(".k-menu-group"),i=this._overflowWrapper();return!t.length&&i&&(t=_(e,i)),t},_triggerEvent:function(e){var t=this;return t.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var i=this,n=e(T.eventTarget(t)).closest(Ae);n.hasClass(ke)||setTimeout(function(){i._moveHover([],n),n.children(".k-content")[0]&&n.parent().closest(".k-item").removeClass(ye)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});P(Ve,{renderItem:function(e){e=P({menu:{},group:{}},e);var t=Ne.empty,i=e.item;return Ne.item(P(e,{image:i.imageUrl?Ne.image:t,sprite:i.spriteCssClass?Ne.sprite:t,itemWrapper:Ne.itemWrapper,renderContent:Ve.renderContent,arrow:i.items||i.content?Ne.arrow:t,subGroup:Ve.renderGroup},Oe))},renderGroup:function(e){return Ne.group(P({renderItems:function(e){for(var t="",i=0,n=e.items,o=n?n.length:0,r=P({length:o},e.group);i<o;i++)t+=Ve.renderItem(P(e,{group:r,item:P({index:i},n[i])}));return t}},e,Oe))},renderContent:function(e){return Ne.content(P(e,Oe))}}),S=Ve.extend({init:function(t,i){var n=this;Ve.fn.init.call(n,t,i),n._marker=T.guid().substring(0,8),n.target=e(n.options.target),n._popup(),n._wire()},_initOverflow:function(e){var t=this;e.scrollable&&!t._overflowWrapper()&&(t._openedPopups={},t._popupsWrapper=(t.element.parent().is(Te)?t.element.parent():t.element).wrap("<div class='k-popups-wrapper "+e.orientation+"'></div>").parent(),"horizontal"==t.options.orientation&&C(t.element),e.appendTo&&e.appendTo.append(t._popupsWrapper),t._initialHeight=t.element[0].style.height,t._initialWidth=t.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,target:"body"},events:[U,K,ee,te,Z],setOptions:function(t){var i=this;Ve.fn.setOptions.call(i,t),i.target.off(i.showOn+V+i._marker,i._showProxy),i.userEvents&&i.userEvents.destroy(),i.target=e(i.options.target),t.orientation&&i.popup.wrapper[0]&&i.popup.element.unwrap(),i._wire(),Ve.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+V+e._marker),ve.off(T.support.mousedown+V+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),Ve.fn.destroy.call(e)},open:function(i,n){var r,s,a=this;return i=e(i)[0],o(a.element[0],e(i)[0])||a._itemHasChildren(e(i))?Ve.fn.open.call(a,i):a._triggerEvent({item:a.element,type:U})===!1&&(a.popup.visible()&&a.options.filter&&(a.popup.close(!0),a.popup.element.kendoStop(!0)),n!==t?(r=a._overflowWrapper(),r&&(s=r.offset(),i-=s.left,n-=s.top),a.popup.wrapper.hide(),a._configurePopupScrolling(i,n),a.popup.open(i,n)):(a.popup.options.anchor=(i?i:a.popup.anchor)||a.target,a.popup.element.kendoStop(!0),a._configurePopupScrolling(),a.popup.open()),ve.off(a.popup.downEvent,a.popup._mousedownProxy),ve.on(T.support.mousedown+V+a._marker,a._closeProxy)),a},_configurePopupScrolling:function(e,i){var n=this,o=n.popup,r="horizontal"==n.options.orientation;n.options.scrollable&&(n._wrapPopupElement(o),o.element.parent().css({position:"",height:""}),o.element.css({visibility:"hidden",display:"",position:""}),r?n._setPopupWidth(o,isNaN(e)?t:{isFixed:!0,x:e,y:i}):n._setPopupHeight(o,isNaN(e)?t:{isFixed:!0,x:e,y:i}),o.element.css({visibility:"",display:"none",position:"absolute"}),n._initPopupScrollButtons(o,r,!0),o.element.siblings(Le).hide())},_setPopupWidth:function(t,i){var n,o,r,s,a,l,c,d,u=t.element,h=u.add(u.parent(Te));h.width(this._initialWidth||""),n=t._location(i),o=e(window).width(),r=n.width,s=Math.max(n.left,0),a=i?0:y(this._overflowWrapper()[0],"scrollLeft"),l=T.getShadows(u),c=o-l.left-l.right,d=c+a>r+s,d||h.css({overflow:"hidden",width:c-s+a+"px"})},close:function(){var t=this;o(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?Ve.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:K})===!1&&(t.popup.close(),ve.off(T.support.mousedown+V+t._marker,t._closeProxy),t.unbind(Z,t._closeTimeoutProxy))},_showHandler:function(e){var t,i=e,n=this,r=n.options;e.event&&(i=e.event,i.pageX=e.x.location,i.pageY=e.y.location),o(n.element[0],e.relatedTarget||e.target)||(n._eventOrigin=i,i.preventDefault(),i.stopImmediatePropagation(),n.element.find("."+ye).removeClass(ye),(r.filter&&T.support.matchesSelector.call(i.currentTarget,r.filter)||!r.filter)&&(r.alignToAnchor?(n.popup.options.anchor=i.currentTarget,n.open(i.currentTarget)):(n.popup.options.anchor=i.currentTarget,n._targetChild?(t=n.target.offset(),n.open(i.pageX-t.left,i.pageY-t.top)):n.open(i.pageX,i.pageY))))},_closeHandler:function(t){var i,n=this,r=e(t.relatedTarget||t.target),s=r.closest(n.target.selector)[0]==n.target[0],a=r.closest(Ie),l=n._itemHasChildren(a),c=n._overflowWrapper(),d=o(n.element[0],r[0])||c&&o(c[0],r[0]);n._eventOrigin=t,i=3!==t.which,n.popup.visible()&&(i&&s||!s)&&(n.options.closeOnClick&&!l&&d||!d)&&(d?(this.unbind(Z,this._closeTimeoutProxy),n.bind(Z,n._closeTimeoutProxy)):n.close())},_wire:function(){var e=this,t=e.options,i=e.target;e._showProxy=z(e._showHandler,e),e._closeProxy=z(e._closeHandler,e),e._closeTimeoutProxy=z(e.close,e),i[0]&&(T.support.mobileOS&&"contextmenu"==t.showOn?(e.userEvents=new T.UserEvents(i,{filter:t.filter,allowSelection:!1}),i.on(t.showOn+V+e._marker,!1),e.userEvents.bind("hold",e._showProxy)):t.filter?i.on(t.showOn+V+e._marker,t.filter,e._showProxy):i.on(t.showOn+V+e._marker,e._showProxy))},_triggerEvent:function(i){var n=this,o=e(n.popup.options.anchor)[0],r=n._eventOrigin;return n._eventOrigin=t,n.trigger(i.type,P({type:i.type,item:i.item||this.element[0],target:o},r?{event:r}:{}))},_popup:function(){var t=this,i=t._overflowWrapper();t._triggerProxy=z(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:i||t.options.appendTo,close:i?function(t){e(g(t.sender.element,i)).each(function(e,t){var i=t.data(_e);i&&i.close(!0)})}:e.noop}).data(_e),t._targetChild=o(t.target[0],t.popup.element[0])}}),D.plugin(Ve),D.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.columnmenu.min",["kendo.popup.min","kendo.filtermenu.min","kendo.menu.min"],e)}(function(){return function(e,t){function i(t){return e.trim(t).replace(/&nbsp;/gi,"")}function n(e,t){var i,n,o,r={};for(i=0,n=e.length;i<n;i++)o=e[i],r[o[t]]=o;return r}function o(e){var t,i=[];for(t=0;t<e.length;t++)e[t].columns?i=i.concat(o(e[t].columns)):i.push(e[t]);return i}function r(e,t){return"["+a.attr(e)+"='"+(t||"").replace(/'/g,'"')+"']"}function s(e,t,i){e>0?t.insertAfter(i.children().eq(e-1)):i.prepend(t)}var a=window.kendo,l=a.ui,c=e.proxy,d=e.extend,u=e.grep,h=e.map,p=e.inArray,f="k-state-selected",m="asc",g="desc",v="change",_="init",b="open",w="select",y="kendoPopup",k="kendoFilterMenu",x="kendoMenu",C=".kendoColumnMenu",S=l.Widget,T=S.extend({init:function(t,i){var n,o=this;S.fn.init.call(o,t,i),t=o.element,i=o.options,o.owner=i.owner,o.dataSource=i.dataSource,o.field=t.attr(a.attr("field")),o.title=t.attr(a.attr("title")),n=t.find(".k-header-column-menu"),n[0]||(n=t.addClass("k-with-icon").prepend('<a class="k-header-column-menu" href="#" title="'+i.messages.settings+'" aria-label="'+i.messages.settings+'"><span class="k-icon k-i-more-vertical"></span></a>').find(".k-header-column-menu")),o.link=n.attr("tabindex",-1).on("click"+C,c(o._click,o)),o.wrapper=e('<div class="k-column-menu"/>'),o._refreshHandler=c(o.refresh,o),o.dataSource.bind(v,o._refreshHandler)},_init:function(){var e=this;e.pane=e.options.pane,e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e.owner._muteAngularRebind(function(){e._angularItems("compile")}),e._sort(),e._columns(),e._filter(),e._lockColumns(),e.trigger(_,{field:e.field,container:e.wrapper})},events:[_,b,"sort","filtering"],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings",lock:"Lock",unlock:"Unlock"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var e=this,t=e.options;e.wrapper.html(a.template(D)({uid:a.guid(),ns:a.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns})),e.popup=e.wrapper[y]({anchor:e.link,open:c(e._open,e),activate:c(e._activate,e),close:function(){e.options.closeCallback&&e.options.closeCallback(e.element)}}).data(y),e.menu=e.wrapper.children()[x]({orientation:"vertical",closeOnClick:!1,open:function(){e._updateMenuItems()}}).data(x)},_createMobileMenu:function(){var e=this,t=e.options,i=a.template(A)({ns:a.ns,field:e.field,title:e.title||e.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns});e.view=e.pane.append(i),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new E(e.wrapper.children(),{pane:e.pane}),e.view.element.on("click",".k-done",function(t){e.close(),t.preventDefault()}),e.options.lockedColumns&&e.view.bind("show",function(){e._updateLockedColumns()})},_angularItems:function(t){var i=this;i.angular(t,function(){var t=i.wrapper.find(".k-columns-item input["+a.attr("field")+"]").map(function(){return e(this).closest("li")}),n=h(i._ownerColumns(),function(e){return{column:e._originalObject}});return{elements:t,data:n}})},destroy:function(){var e=this;e._angularItems("cleanup"),S.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(v,e._refreshHandler),e.options.columns&&e.owner&&(e._updateColumnsMenuHandler&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e._updateColumnsLockedStateHandler&&(e.owner.unbind("columnLock",e._updateColumnsLockedStateHandler),e.owner.unbind("columnUnlock",e._updateColumnsLockedStateHandler))),e.menu&&(e.menu.element.off(C),e.menu.destroy()),e.wrapper.off(C),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(C),e.owner=null,e.wrapper=null,e.element=null},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+C))},_click:function(e){var t,i=this;e.preventDefault(),e.stopPropagation(),t=this.options,t.filter&&this.element.is(!t.filter)||(this.popup||this.pane?i._updateMenuItems():this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_updateMenuItems:function(){var e=this;e._setMenuItemsVisibility(),e._reorderMenuItems()},_setMenuItemsVisibility:function(){var e=this;e._eachRenderedMenuItem(function(e,t,i){t.matchesMedia===!1?i.hide():i.show()})},_reorderMenuItems:function(){var e=this;e._eachRenderedMenuItem(function(e,t,i,n){i[0]&&i.index()!==e&&s(e,i,n)})},_eachRenderedMenuItem:function(t){var i,n,o=this,s=o._ownerColumns()||[],a=o._isMobile&&o.view?e(o.view.element).find(".k-columns-item").children("ul"):e(o.wrapper).find(".k-menu-group").first();for(n=0;n<s.length;n++)i=a.find(r("field",s[n].originalField)).closest("li"),t(n,s[n],i,a)},_open:function(){var t=this;e(".k-column-menu").not(t.wrapper).each(function(){e(this).data(y).close()}),t.popup.element.on("keydown"+C,function(e){e.keyCode==a.keys.ESC&&t.close()}),t.options.lockedColumns&&t._updateLockedColumns()},_activate:function(){this.menu.element.focus(),this.trigger(b,{field:this.field,container:this.wrapper})},_ownerColumns:function(){var e=o(this.owner.columns),t=u(e,function(e){var t=!0,n=i(e.title||"");return e.menu!==!1&&(e.field||n.length)||(t=!1),t});return h(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,matchesMedia:t.matchesMedia,index:p(t,e),locked:!!t.locked,_originalObject:t}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t.menu.bind(w,function(i){var n,o=e(i.item);o.hasClass("k-sort-asc")?n=m:o.hasClass("k-sort-desc")&&(n=g),n&&(o.parent().find(".k-sort-"+(n==m?g:m)).removeClass(f),t._sortDataSource(o,n),t.close())}))},_sortDataSource:function(e,i){var n,o,r=this,s=r.options.sortable,a=null===s.compare?t:s.compare,l=r.dataSource,c=l.sort()||[],d=e.hasClass(f)&&s&&s.allowUnsort!==!1;if(i=d?t:i,!r.trigger("sort",{sort:{field:r.field,dir:i,compare:a}})){if(d?e.removeClass(f):e.addClass(f),"multiple"===s.mode){for(n=0,o=c.length;n<o;n++)if(c[n].field===r.field){c.splice(n,1);break}c.push({field:r.field,dir:i,compare:a})}else c=[{field:r.field,dir:i,compare:a}];l.sort(c)}},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=c(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t._updateColumnsLockedStateHandler=c(t._updateColumnsLockedState,t),t.owner.bind(["columnUnlock","columnLock"],t._updateColumnsLockedStateHandler),t.menu.bind(w,function(i){var n,r,s,l=e(i.item),c=o(t.owner.columns);t._isMobile&&i.preventDefault(),l.parent().closest("li.k-columns-item")[0]&&(n=l.find(":checkbox"),n.attr("disabled")||(s=n.attr(a.attr("field")),r=u(c,function(e){return e.field==s||!e.field&&e.title==s})[0],r.hidden===!0?t.owner.showColumn(r):t.owner.hideColumn(r)))}))},_updateColumnsMenu:function(){var e,t,i,n,o,r,s=a.attr("field"),l=a.attr("locked"),c=u(this._ownerColumns(),function(e){return!e.hidden&&e.matchesMedia!==!1}),d=u(c,function(e){return e.originalField}),f=u(d,function(e){return e.locked===!0}).length,m=u(d,function(e){return e.locked!==!0}).length,g=u(this.owner.columns,function(e){return e.menu===!1}).length,v=h(c,function(e){return e.field});for(this.wrapper.find("[role='menuitemcheckbox']").attr("aria-checked",!1),r=this.wrapper.find(".k-columns-item input["+s+"]").prop("disabled",!1).prop("checked",!1),e=0,t=r.length;e<t;e++)i=r.eq(e),o="true"===i.attr(l),n=!1,p(i.attr(s),v)>-1&&(n=!0,i.prop("checked",n)),i.closest("[role='menuitemcheckbox']").attr("aria-checked",n),n&&(1==f&&o&&i.prop("disabled",!0),0!==g||1!=m||o||i.prop("disabled",!0))},_updateColumnsLockedState:function(){var e,t,i,o,r=a.attr("field"),s=a.attr("locked"),l=n(this._ownerColumns(),"field"),c=this.wrapper.find(".k-columns-item input[type=checkbox]");for(e=0,t=c.length;e<t;e++)i=c.eq(e),o=l[i.attr(r)],o&&i.attr(s,o.locked);this._updateColumnsMenu()},_filter:function(){var t=this,i=k,n=t.options;n.filterable!==!1&&(n.filterable.multi&&(i="kendoFilterMultiCheck",n.filterable.dataSource&&(n.filterable.checkSource=n.filterable.dataSource,delete n.filterable.dataSource)),t.filterMenu=t.wrapper.find(".k-filterable")[i](d(!0,{},{appendToElement:!0,dataSource:n.dataSource,values:n.values,field:t.field,title:t.title,change:function(e){t.trigger("filtering",{filter:e.filter,field:e.field})&&e.preventDefault()}},n.filterable)).data(i),t._isMobile&&t.menu.bind(w,function(i){var n=e(i.item);n.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},_lockColumns:function(){var t=this;t.menu.bind(w,function(i){var n=e(i.item);n.hasClass("k-lock")?(t.owner.lockColumn(t.field),t.close()):n.hasClass("k-unlock")&&(t.owner.unlockColumn(t.field),t.close())})},_updateLockedColumns:function(){var e,t,i,n,o=this.field,r=this.owner.columns,s=u(r,function(e){return e.field==o||e.title==o})[0];s&&(e=s.locked===!0,t=u(r,function(t){return!t.hidden&&(t.locked&&e||!t.locked&&!e)}).length,i=this.wrapper.find(".k-lock").removeClass("k-state-disabled"),n=this.wrapper.find(".k-unlock").removeClass("k-state-disabled"),(e||1==t)&&i.addClass("k-state-disabled"),e&&1!=t||n.addClass("k-state-disabled"),this._updateColumnsLockedState())},refresh:function(){var e,t,i,n=this,o=n.options.dataSource.sort()||[],r=n.field;for(n.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(f),t=0,i=o.length;t<i;t++)e=o[t],r==e.field&&n.wrapper.find(".k-sort-"+e.dir).addClass(f);n.link[n._filterExist(n.dataSource.filter())?"addClass":"removeClass"]("k-state-active")},_filterExist:function(e){var t,i,n,o=!1;if(e){for(e=e.filters,i=0,n=e.length;i<n;i++)t=e[i],t.field==this.field?o=!0:t.filters&&(o=o||this._filterExist(t));return o}}}),D='<ul id="#=uid#">#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator" role="presentation"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-columns"></span>${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li role="menuitemcheckbox" aria-checked="false" #=columns[idx].matchesMedia === false ? "style=\'display:none;\'" : ""#><input type="checkbox" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</li>#}#</ul></li>#if(filterable || lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(filterable){#<li class="k-item k-filter-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#if(lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}#</ul>',A='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-column-menu"><div data-#=ns#role="header" class="k-header">${messages.settings}<button class="k-button k-done">#=messages.done#</button></div><div class="k-column-menu k-mobile-list"><ul><li><span class="k-link">${title}</span><ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link k-filterable"><span class="k-icon k-i-filter"></span>${messages.filter}</span></li>#}#</ul></li>#if(showColumns){#<li class="k-columns-item"><span class="k-link">${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li class="k-item"><label class="k-label"><input type="checkbox" class="k-check" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</label></li>#}#</ul></li>#}#</ul></div></div>',E=S.extend({init:function(e,t){S.fn.init.call(this,e,t),this.element.on("click"+C,"li.k-item:not(.k-separator):not(.k-state-disabled)","_click")},events:[w],_click:function(t){e(t.target).is("[type=checkbox]")||t.preventDefault(),this.trigger(w,{item:t.currentTarget})},close:function(){this.options.pane.navigate("")},destroy:function(){S.fn.destroy.call(this),this.element.off(C)}});l.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.columnsorter.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(i){var o,r=i.find("tr:not(.k-filter-row)"),s=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return r.length>1&&(a=r.find("th:visible").filter(s).filter(function(){return this.rowSpan>1})),a=a.add(r.last().find("th:visible").filter(s)),o=n.attr("index"),a.sort(function(i,n){var r,s;return i=e(i),n=e(n),r=i.attr(o),s=n.attr(o),r===t&&(r=e(i).index()),s===t&&(s=e(n).index()),r=parseInt(r,10),s=parseInt(s,10),r>s?1:r<s?-1:0}),a}var n=window.kendo,o=n.ui,r=o.Widget,s="dir",a="asc",l="single",c="field",d="desc",u=".kendoColumnSorter",h=".k-link",p="aria-sort",f=e.proxy,m=r.extend({init:function(e,t){var i,n=this;r.fn.init.call(n,e,t),n._refreshHandler=f(n.refresh,n),n.dataSource=n.options.dataSource.bind("change",n._refreshHandler),n.directions=n.options.initialDirection===a?[a,d]:[d,a],i=n.element.find(h),i[0]||(i=n.element.wrapInner('<a class="k-link" href="#"/>').find(h)),n.link=i,n.element.on("click"+u,f(n._click,n))},options:{name:"ColumnSorter",mode:l,allowUnsort:!0,compare:null,filter:"",initialDirection:a,showIndexes:!1},events:["change"],destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(u),e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=e.element=e.link=e.dataSource=null},refresh:function(){var o,r,l,u,h,f,m,g,v=this,_=v.dataSource.sort()||[],b=v.element,w=b.attr(n.attr(c));for(b.removeAttr(n.attr(s)),b.removeAttr(p),o=0,r=_.length;o<r;o++)l=_[o],w==l.field&&(b.attr(n.attr(s),l.dir),f=o+1);u=b.attr(n.attr(s)),b.is("th")&&(g=b.closest("table"),g.parent().hasClass("k-grid-header-wrap")?g=g.closest(".k-grid").find(".k-grid-content > table"):g.parent().hasClass("k-grid-header-locked")?g=g.closest(".k-grid").find(".k-grid-content-locked > table"):g.parent().hasClass("k-grid")||(g=null),g&&(b.attr(n.attr("index"))?(m=i(b.closest("table")),h=m.index(b)):h=b.parent().children(":visible").index(b),b.toggleClass("k-sorted",u!==t),g.children("colgroup").children().eq(h).toggleClass("k-sorted",u!==t))),b.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order").remove(),u===a?(e('<span class="k-icon k-i-sort-asc-sm" />').appendTo(v.link),b.attr(p,"ascending")):u===d&&(e('<span class="k-icon k-i-sort-desc-sm" />').appendTo(v.link),b.attr(p,"descending")),v.options.showIndexes&&_.length>1&&f&&e('<span class="k-sort-order" />').html(f).appendTo(v.link)},_toggleSortDirection:function(e){var i=this.directions;return e===i[i.length-1]&&this.options.allowUnsort?t:i[0]===e?i[1]:i[0]},_click:function(e){var i,o,r=this,a=r.element,d=a.attr(n.attr(c)),u=a.attr(n.attr(s)),h=r.options,p=null===r.options.compare?t:r.options.compare,f=r.dataSource.sort()||[];if(e.preventDefault(),(!h.filter||a.is(h.filter))&&(u=this._toggleSortDirection(u),!this.trigger("change",{sort:{field:d,dir:u,compare:p}}))){if(h.mode===l)f=[{field:d,dir:u,compare:p}];else if("multiple"===h.mode){for(i=0,o=f.length;i<o;i++)if(f[i].field===d){f.splice(i,1);break}f.push({field:d,dir:u,compare:p})}this.dataSource.options.endless&&(this.dataSource.options.endless=null,a.closest(".k-grid").getKendoGrid()._endlessPageSize=r.dataSource.options.pageSize,this.dataSource.pageSize(r.dataSource.options.pageSize)),this.dataSource.sort(f)}}});o.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.editable.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.validator.min","kendo.binder.min"],e)}(function(){return function(e,t){function i(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function n(t){t.find(":input:not(:button, .k-combobox .k-input, ["+a.attr("role")+"=listbox], ["+a.attr("role")+"=upload], ["+a.attr("skip")+"], [type=file])").each(function(){var t=a.attr("bind"),i=this.getAttribute(t)||"",n="checkbox"===this.type||"radio"===this.type?"checked:":"value:",o=this.name;i.indexOf(n)===-1&&o&&(i+=(i.length?",":"")+n+o,e(this).attr(t,i))})}function o(e){var t,n,o,r,s,l=(e.model.fields||e.model)[e.field],c=i(l),d=l?l.validation:{},u=a.attr("type"),g=a.attr("bind"),v={name:e.field,title:e.title};for(t in d)n=d[t],f(t,w)>=0?v[u]=t:h(n)||(o=a.getCulture(),"number"==typeof n&&o.name.length?(r=o.numberFormat,s=(""+n).replace(m,r[m]),v[t]=s):v[t]=p(n)?n.value||t:n),v[a.attr(t+"-msg")]=n.message;return f(c,w)>=0&&(v[u]=c),v[g]=("boolean"===c?"checked:":"value:")+e.field,v}function r(e){var t,i,n,o,r,s;if(e&&e.length)for(s=[],t=0,i=e.length;t<i;t++)n=e[t],r=n.text||n.value||n,o=null==n.value?n.text||n:n.value,s[t]={text:r,value:o};return s}function s(e,t){var i,n,o=e?e.validation||{}:{};for(i in o)n=o[i],p(n)&&n.value&&(n=n.value),h(n)&&(t[i]=n)}var a=window.kendo,l=a.ui,c=l.Widget,d=e.extend,u=a.support.browser.msie&&a.support.browser.version<9,h=a.isFunction,p=e.isPlainObject,f=e.inArray,m=".",g=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,v='<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',_="change",b="equalSet",w=["url","email","number","date","boolean"],y={number:function(t,i){var n=o(i);e('<input type="text"/>').attr(n).appendTo(t).kendoNumericTextBox({format:i.format}),e("<span "+a.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},date:function(t,i){var n=o(i),r=i.format;r&&(r=a._extractFormat(r)),n[a.attr("format")]=r,e('<input type="text"/>').attr(n).appendTo(t).kendoDatePicker({format:i.format}),e("<span "+a.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},string:function(t,i){var n=o(i);e('<input type="text" class="k-input k-textbox"/>').attr(n).appendTo(t)},"boolean":function(t,i){var n=o(i);e('<input type="checkbox" />').attr(n).appendTo(t)},values:function(t,i){var n=o(i),s=a.stringify(r(i.values));e("<select "+a.attr("text-field")+'="text"'+a.attr("value-field")+'="value"'+a.attr("source")+"='"+(s?s.replace(/\'/g,"&apos;"):s)+"'"+a.attr("role")+'="dropdownlist"/>').attr(n).appendTo(t),e("<span "+a.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)}},k=c.extend({init:function(t,i){var n=this;i.target&&(i.$angular=i.target.options.$angular),c.fn.init.call(n,t,i),n._validateProxy=e.proxy(n._validate,n),n.refresh()},events:[_],options:{name:"Editable",editors:y,clearContainer:!0,errorTemplate:v,skipFocus:!1},editor:function(e,t){var n=this,o=n.options.editors,r=p(e),s=r?e.field:e,l=n.options.model||{},c=r&&e.values,u=c?"values":i(t),h=r&&e.editor,f=h?e.editor:o[u],m=n.element.find("["+a.attr("container-for")+"="+s.replace(g,"\\$1")+"]");f=f?f:o.string,h&&"string"==typeof e.editor&&(f=function(t){t.append(e.editor)}),m=m.length?m:n.element,f(m,d(!0,{},r?e:{field:s},{model:l}))},_validate:function(t){var i,n=this,o=t.value,r=n._validationEventInProgress,s={},l=a.attr("bind"),c=t.field.replace(g,"\\$1"),d=RegExp("(value|checked)\\s*:\\s*"+c+"\\s*(,|$)");s[t.field]=t.value,i=e(":input["+l+'*="'+c+'"]',n.element).filter("["+a.attr("validate")+"!='false']").filter(function(){return d.test(e(this).attr(l))}),i.length>1&&(i=i.filter(function(){var t=e(this);return!t.is(":radio")||t.val()==o}));try{n._validationEventInProgress=!0,(!n.validatable.validateInput(i)||!r&&n.trigger(_,{values:s}))&&t.preventDefault()}finally{n._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),e.options.model.unbind(b,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 i,o,r,l,c,d,h,f,m=this,g=m.options.fields||[],v=m.options.clearContainer?m.element.empty():m.element,_=m.options.model||{},w={};for(e.isArray(g)||(g=[g]),i=0,o=g.length;i<o;i++)r=g[i],l=p(r),c=l?r.field:r,d=(_.fields||_)[c],s(d,w),m.editor(r,d);if(m.options.target&&m.angular("compile",function(){return{elements:v,data:v.map(function(){return{dataItem:_}})}}),!o){h=_.fields||_;for(c in h)s(h[c],w)}n(v),m.validatable&&m.validatable.destroy(),a.bind(v,m.options.model),m.options.model.unbind("set",m._validateProxy),m.options.model.bind("set",m._validateProxy),m.options.model.unbind(b,m._validateProxy),m.options.model.bind(b,m._validateProxy),m.validatable=new a.ui.Validator(v,{validateOnBlur:!1,errorTemplate:m.options.errorTemplate||t,rules:w}),m.options.skipFocus||(f=v.find(":kendoFocusable").eq(0).focus(),u&&f.focus())}});l.plugin(k)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.window.min",["kendo.draganddrop.min","kendo.popup.min"],e)}(function(){return function(e,t){function i(e){return t!==e}function n(e,t){return parseInt(e.css(t),10)||0}function o(e,t,i){return Math.max(Math.min(parseInt(e,10),i===1/0?i:parseInt(i,10)),t===-(1/0)?t:parseInt(t,10))}function r(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function s(t){for(var i,n,o={top:t.offsetTop,left:t.offsetLeft},r=t.offsetParent;r;)o.top+=r.offsetTop,o.left+=r.offsetLeft,i=e(r).css("overflowX"),n=e(r).css("overflowY"),"auto"!==n&&"scroll"!==n||(o.top-=r.scrollTop),"auto"!==i&&"scroll"!==i||(o.left-=r.scrollLeft),r=r.offsetParent;return o}function a(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new h(e.wrapper,{filter:">"+E,group:e.wrapper.id+"-resizing",dragstart:v(t.dragstart,t),drag:v(t.drag,t),dragend:v(t.dragend,t)}),t._draggable.userEvents.bind("press",v(t.addOverlay,t)),
t._draggable.userEvents.bind("release",v(t.removeOverlay,t))}function l(e,t){var i=this;i.owner=e,i._preventDragging=!1,i._draggable=new h(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:v(i.dragstart,i),drag:v(i.drag,i),dragend:v(i.dragend,i),dragcancel:v(i.dragcancel,i)}),i._draggable.userEvents.stopPropagation=!1}var c=window.kendo,d=c.ui.Widget,u=c.ui.Popup.TabKeyTrap,h=c.ui.Draggable,p=e.isPlainObject,f=c._activeElement,m=c._outerWidth,g=c._outerHeight,v=e.proxy,_=e.extend,b=e.each,w=c.template,y="body",k=".kendoWindow",x=".kendoWindowModal",C=".k-window",S=".k-window-title",T=S+"bar",D=".k-window-content",A=".k-dialog-content",E=".k-resize-handle",I=".k-overlay",M="k-content-frame",R="k-i-loading",F="k-state-hover",P="k-state-focused",z="k-window-maximized",B=":visible",L="hidden",H="cursor",N="open",O="activate",V="deactivate",W="close",U="refresh",q="minimize",j="maximize",G="resizeStart",$="resize",K="resizeEnd",Y="dragstart",Q="dragend",X="error",Z="overflow",J="original-overflow-rule",ee="zIndex",te=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",ie=".k-i-pin",ne=".k-i-unpin",oe=ie+","+ne,re=".k-window-titlebar .k-window-action",se=".k-window-titlebar .k-i-refresh",ae="WindowEventsHandled",le=/^0[a-z]*$/i,ce=c.isLocalUrl,de=d.extend({init:function(n,o){var s,a,l,h,f,m,g,_,b,w=this,y={},x=!1,E=o&&o.actions&&!o.actions.length;d.fn.init.call(w,n,o),o=w.options,h=o.position,n=w.element,f=o.content,_=e(window),E&&(o.actions=[]),w.appendTo=e(o.appendTo),w.containment=o.draggable.containment?e(o.draggable.containment).first():null,f&&!p(f)&&(f=o.content={url:f}),n.find("script").filter(r).remove(),n.parent().is(w.appendTo)||w.containment||h.top!==t&&h.left!==t||(n.is(B)?(y=n.offset(),x=!0):(a=n.css("visibility"),l=n.css("display"),n.css({visibility:L,display:""}),y=n.offset(),n.css({visibility:a,display:l})),h.top===t&&(h.top=y.top),h.left===t&&(h.left=y.left)),i(o.visible)&&null!==o.visible||(o.visible=n.is(B)),s=w.wrapper=n.closest(C),n.is(".k-content")&&s[0]||(n.addClass("k-window-content k-content"),w._createWindow(n,o),s=w.wrapper=n.closest(C),w.title(w.options.title),w._dimensions()),w.minTop=w.minLeft=-(1/0),w.maxTop=w.maxLeft=1/0,w._position(),f&&w.refresh(f),o.visible&&w.toFront(),m=s.children(D),w._tabindex(m),o.visible&&o.modal&&w._overlay(s.is(B)).css({opacity:.5}),s.on("mouseenter"+k,re,v(w._buttonEnter,w)).on("mouseleave"+k,re,v(w._buttonLeave,w)).on("click"+k,"> "+re,v(w._windowActionHandler,w)).on("keydown"+k,v(w._keydown,w)).on("focus"+k,v(w._focus,w)).on("blur"+k,v(w._blur,w)),m.on("keydown"+k,v(w._keydown,w)).on("focus"+k,v(w._focus,w)).on("blur"+k,v(w._blur,w)),g=m.find("."+M)[0],g&&!_.data(ae)&&(_.on("blur"+k,function(){var t,i=e(document.activeElement).parent(D);i.length&&(t=c.widgetInstance(i),t._focus())}),_.on("focus"+k,function(){e(D).not(A).each(function(t,i){c.widgetInstance(e(i))._blur()})}),_.data(ae,!0)),this._resizable(),this._draggable(),o.pinned&&this.wrapper.is(":visible")&&w.pin(),b=n.attr("id"),b&&(b+="_wnd_title",s.children(T).children(S).attr("id",b),m.attr({role:"dialog","aria-labelledby":b})),s.add(s.children(".k-resize-handle,"+T)).on("mousedown"+k,v(w.toFront,w)),w.touchScroller=c.touchScroller(n),w._resizeHandler=v(w._onDocumentResize,w),w._marker=c.guid().substring(0,8),e(window).on("resize"+k+w._marker,w._resizeHandler),o.visible&&(w.trigger(N),w.trigger(O)),c.notify(w),this.options.modal&&(this._tabKeyTrap=new u(s),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return m.data("isFront")})},_buttonEnter:function(t){e(t.currentTarget).addClass(F)},_buttonLeave:function(t){e(t.currentTarget).removeClass(F)},_focus:function(){this.wrapper.addClass(P)},_blur:function(){this.wrapper.removeClass(P)},_dimensions:function(){var e,t,i=this.wrapper,r=this.options,s=r.width,a=r.height,l=r.maxHeight,c=["minWidth","minHeight","maxWidth","maxHeight"],d="content-box"==i.css("box-sizing"),u=d?n(i,"border-left-width")+n(i,"border-right-width"):0,h=d?n(i,"border-top-width")+n(i,"border-bottom-width"):0,p=d?n(i,"padding-top"):0;for(this.containment&&!this._isPinned&&(this._updateBoundaries(),r.maxHeight=Math.min(this.containment.height-(h+p),l),r.maxWidth=Math.min(this.containment.width-u,r.maxWidth)),e=0;e<c.length;e++)t=r[c[e]]||"",t!=1/0&&i.css(c[e],t);l!=1/0&&this.element.css("maxHeight",l),i.width(s?isNaN(s)&&(""+s).indexOf("px")<0?s:o(s,r.minWidth,r.maxWidth):""),i.height(a?isNaN(a)&&(""+a).indexOf("px")<0?a:o(a,r.minHeight,r.maxHeight):""),r.visible||i.hide()},_position:function(){var e=this.wrapper,t=this.options.position;this._updateBoundaries(),this.containment&&(t.top=Math.min(this.minTop+(t.top||0),this.maxTop),t.left=Math.min(this.minLeft+(t.left||0),this.maxLeft)),0===t.top&&(t.top=""+t.top),0===t.left&&(t.left=""+t.left),e.css({top:t.top||"",left:t.left||""})},_updateBoundaries:function(){var e=this.containment;return e?(e.width=e.innerWidth(),e.height=e.innerHeight(),parseInt(e.width,10)>e[0].clientWidth&&(e.width-=c.support.scrollbar()),parseInt(e.height,10)>e[0].clientHeight&&(e.height-=c.support.scrollbar()),e.position=s(e[0]),this._isPinned?(this.minTop=this.minLeft=-(1/0),this.maxTop=this.maxLeft=1/0):(this.minTop=e.scrollTop(),this.minLeft=e.scrollLeft(),this.maxLeft=this.minLeft+e.width-m(this.wrapper,!0),this.maxTop=this.minTop+e.height-g(this.wrapper,!0)),t):null},_animationOptions:function(e){var t=this.options.animation,i={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||i[e]},_resize:function(){c.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,i=this.wrapper;this.resizing&&(i.off("dblclick"+k).children(E).remove(),this.resizing.destroy(),this.resizing=null),t&&(i.on("dblclick"+k,T,v(function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),b("n e s w se sw ne nw".split(" "),function(e,t){i.append(ue.resizeHandle(t))}),this.resizing=new a(this)),i=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new l(this,e.dragHandle||T))},_actions:function(){var t=this.options,i=t.actions,n=t.pinned,o=this.wrapper.children(T),r=o.find(".k-window-actions"),s=["maximize","minimize"];i=e.map(i,function(e){return e=n&&"pin"===e.toLowerCase()?"unpin":e,{name:s.indexOf(e.toLowerCase())>-1?"window-"+e:e}}),r.html(c.render(ue.action,i))},setOptions:function(e){var i,n,o=JSON.parse(JSON.stringify(e));_(e.position,this.options.position),_(e.position,o.position),d.fn.setOptions.call(this,e),i=this.options.scrollable!==!1,this.restore(),t!==e.title&&this.title(e.title),this._dimensions(),this._position(),this._resizable(),this._draggable(),this._actions(),t!==e.modal&&(n=this.options.visible!==!1,this._overlay(e.modal&&n)),this.element.css(Z,i?"":"hidden")},events:[N,O,V,W,q,j,U,G,$,K,Y,Q,X],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",isMaximized:!1,isMinimized:!1},_closable:function(){return e.inArray("close",e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydown:function(e){var t,i,r,s,a,l,d=this,u=d.options,h=c.keys,p=e.keyCode,f=d.wrapper,m=10,g=u.isMaximized,v=u.isMinimized;p==h.ESC&&d._closable()&&(e.stopPropagation(),d._close(!1)),e.target!=e.currentTarget||d._closing||(e.altKey&&82==p&&d.refresh(),e.altKey&&80==p&&(d.options.pinned?d.unpin():d.pin()),e.altKey&&p==h.UP?v?(d.restore(),d.element.focus()):g||(d.maximize(),d.element.focus()):e.altKey&&p==h.DOWN&&(v||g?g&&(d.restore(),d.element.focus()):(d.minimize(),d.wrapper.focus())),t=c.getOffset(f),d.containment&&!d._isPinned&&(t=d.options.position),!u.draggable||e.ctrlKey||e.altKey||g||(d._updateBoundaries(),p==h.UP?(t.top=o(t.top-m,d.minTop,d.maxTop),i=f.css("top",t.top)):p==h.DOWN?(t.top=o(t.top+m,d.minTop,d.maxTop),i=f.css("top",t.top)):p==h.LEFT?(t.left=o(t.left-m,d.minLeft,d.maxLeft),i=f.css("left",t.left)):p==h.RIGHT&&(t.left=o(t.left+m,d.minLeft,d.maxLeft),i=f.css("left",t.left))),u.resizable&&e.ctrlKey&&!g&&!v&&(p==h.UP?(i=!0,s=f.height()-m):p==h.DOWN&&(i=!0,s=d.containment&&!d._isPinned?Math.min(f.height()+m,d.containment.height-t.top-n(f,"padding-top")-n(f,"borderBottomWidth")-n(f,"borderTopWidth")):f.height()+m),p==h.LEFT?(i=!0,r=f.width()-m):p==h.RIGHT&&(i=!0,r=d.containment&&!d._isPinned?Math.min(f.width()+m,d.containment.width-t.left-n(f,"borderLeftWidth")-n(f,"borderRightWidth")):f.width()+m),i&&(a=o(r,u.minWidth,u.maxWidth),l=o(s,u.minHeight,u.maxHeight),isNaN(a)||(f.width(a),d.options.width=a+"px"),isNaN(l)||(f.height(l),d.options.height=l+"px"),d.resize())),i&&e.preventDefault())},_overlay:function(t){var i=this.containment?this.containment.children(I):this.appendTo.children(I),n=this.wrapper;return i.length||(i=e("<div class='k-overlay' />")),i.insertBefore(n[0]).toggle(t).css(ee,parseInt(n.css(ee),10)-1),i},_actionForIcon:function(e){var t=/\bk-i(-\w+)+\b/.exec(e[0].className)[0];return{"k-i-close":"_close","k-i-window-maximize":"maximize","k-i-window-minimize":"minimize","k-i-window-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[t]},_windowActionHandler:function(i){var n,o;if(!this._closing)return n=e(i.target).closest(".k-window-action").find(".k-icon"),o=this._actionForIcon(n),o?(i.preventDefault(),this[o](),!1):t},_modals:function(){var t=this,i=e(C).filter(function(){var i=e(this),n=t._object(i),o=n&&n.options;return o&&o.modal&&o.visible&&o.appendTo===t.options.appendTo&&i.is(B)}).sort(function(t,i){return+e(t).css("zIndex")-+e(i).css("zIndex")});return t=null,i},_object:function(e){var i=e.children(D),n=c.widgetInstance(i);return n?n:t},center:function(){var t,i,o=this,r=o.options.position,s=o.wrapper,a=e(window),l=0,c=0;return o.options.isMaximized?o:(o.options.pinned&&!o._isPinned&&o.pin(),o.options.pinned||(l=a.scrollTop(),c=a.scrollLeft()),this.containment&&!o.options.pinned?(t=this.minTop+(this.maxTop-this.minTop)/2,i=this.minLeft+(this.maxLeft-this.minLeft)/2):(i=c+Math.max(0,(a.width()-s.width())/2),t=l+Math.max(0,(a.height()-s.height()-n(s,"paddingTop"))/2)),s.css({left:i,top:t}),r.top=t,r.left=i,o)},title:function(i){var n,o,r=this,s=!0,a=r.wrapper,l=a.children(T),d=l.children(S);return arguments.length?(e.isPlainObject(i)?(n=t!==i.text?i.text:"",s=i.encoded!==!1):n=i,n===!1?(a.addClass("k-window-titleless"),l.remove()):(l.length?d.html(s?c.htmlEncode(n):n):(a.prepend(ue.titlebar({title:s?c.htmlEncode(n):n})),r._actions(),l=a.children(T)),o=parseInt(g(l),10),a.css("padding-top",o),l.css("margin-top",-o)),r.options.title=n,r):d.html()},content:function(e,t){var n=this.wrapper.children(D),o=n.children(".km-scroll-container");return n=o[0]?o:n,i(e)?(this.angular("cleanup",function(){return{elements:n.children()}}),c.destroy(this.element.children()),n.empty().html(e),this.angular("compile",function(){var e,i=[];for(e=n.length;--e>=0;)i.push({dataItem:t});return{elements:n.children(),data:i}}),this):n.html()},open:function(){var t,i,n,o=this,r=o.wrapper,s=o.options,a=this._animationOptions("open"),l=r.children(D),d=this.containment&&!o._isPinned,u=d?this.containment:e(document);return o.trigger(N)||(o._closing&&r.kendoStop(!0,!0),o._closing=!1,o.toFront(),s.autoFocus&&o.element.focus(),s.visible=!0,s.modal&&(i=!!o._modals().length,t=o._overlay(i),t.kendoStop(!0,!0),a.duration&&c.effects.Fade&&!i?(n=c.fx(t).fadeIn(),n.duration(a.duration||0),n.endValue(.5),n.play()):t.css("opacity",.5),t.show(),e(window).on("focus"+x,function(){l.data("isFront")&&!e(document.activeElement).closest(l).length&&o.element.focus()})),r.is(B)||(l.css(Z,L),r.show().kendoStop().kendoAnimate({effects:a.effects,duration:a.duration,complete:v(this._activate,this)}))),s.isMaximized&&(o._containerScrollTop=u.scrollTop(),o._containerScrollLeft=u.scrollLeft(),o._stopDocumentScrolling()),s.pinned&&!o._isPinned&&o.pin(),o},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css(Z,e?"":"hidden"),c.resize(this.element.children()),this.trigger(O)},_removeOverlay:function(i){var n,o=this._modals(),r=this.options,s=r.modal&&!o.length,a=r.modal?this._overlay(!0):e(t),l=this._animationOptions("close");s?!i&&l.duration&&c.effects.Fade?(n=c.fx(a).fadeOut(),n.duration(l.duration||0),n.startValue(.5),n.play()):this._overlay(!1).remove():o.length&&this._object(o.last())._overlay(!0)},_close:function(t){var i,n=this,o=n.wrapper,r=n.options,s=this._animationOptions("open"),a=this._animationOptions("close"),l=this.containment&&!n._isPinned,c=l?this.containment:e(document);n._closing||(i=n.trigger(W,{userTriggered:!t}),n._closing=!i,o.is(B)&&!i&&(r.visible=!1,e(C).each(function(t,i){var n=e(i).children(D);i!=o&&n.find("> ."+M).length>0&&n.children(I).remove()}),this._removeOverlay(),o.kendoStop().kendoAnimate({effects:a.effects||s.effects,reverse:a.reverse===!0,duration:a.duration,complete:v(this._deactivate,this)}),e(window).off(x)),n.options.isMaximized&&(n._enableDocumentScrolling(),n._containerScrollTop&&n._containerScrollTop>0&&c.scrollTop(n._containerScrollTop),n._containerScrollLeft&&n._containerScrollLeft>0&&c.scrollLeft(n._containerScrollLeft)))},_deactivate:function(){var e,t=this;t.wrapper.hide().css("opacity",""),t.trigger(V),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(re+","+re+" .k-icon,:input,a")},_shouldFocus:function(t){var i=f(),n=this.element;return this.options.autoFocus&&!e(i).is(n)&&!this._actionable(t)&&(!n.find(i).length||!n.find(t).length)},toFront:function(t){var i,n,o=this,r=o.wrapper,s=r[0],a=o.containment&&!o._isPinned,l=+r.css(ee),c=l,d=t&&t.target||null;return e(C).each(function(t,i){var n=e(i),o=n.css(ee),r=n.children(D);isNaN(o)||(l=Math.max(+o,l)),r.data("isFront",i==s),i!=s&&r.find("> ."+M).length>0&&r.append(ue.overlay)}),(!r[0].style.zIndex||c<l)&&r.css(ee,l+2),o.element.find("> .k-overlay").remove(),o._shouldFocus(d)&&(o.isMinimized()?o.wrapper.focus():e(d).is(I)?setTimeout(function(){o.element.focus()}):o.element.focus(),i=a?o.containment.scrollTop():e(window).scrollTop(),n=parseInt(r.position().top,10),!o.options.pinned&&n>0&&n<i&&(i>0?e(window).scrollTop(n):r.css("top",i))),r=null,o},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t,i=this,n=i.options,r=n.minHeight,s=i.restoreOptions,a=i.containment&&!i._isPinned?i.containment:e(document);return n.isMaximized||n.isMinimized?(r&&r!=1/0&&i.wrapper.css("min-height",r),s&&!n.isMaximized&&(s.height=o(s.height,i.options.minHeight,i.options.maxHeight),t=n.position.top+parseInt(s.height,10)>i.maxTop,t&&(n.position.top=o(n.position.top,i.minTop,i.maxTop-parseInt(s.height,10)),_(s,{left:n.position.left,top:n.position.top}))),i.wrapper.css({position:n.pinned?"fixed":"absolute",left:s.left,top:s.top,width:s.width,height:s.height}).removeClass(z).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(te).parent().show().end().end().find(oe).parent().show(),n.isMaximized?i.wrapper.find(".k-i-window-maximize").parent().focus():n.isMinimized&&i.wrapper.find(".k-i-window-minimize").parent().focus(),i.options.width=s.width,i.options.height=s.height,i._enableDocumentScrolling(),this._containerScrollTop&&this._containerScrollTop>0&&a.scrollTop(this._containerScrollTop),this._containerScrollLeft&&this._containerScrollLeft>0&&a.scrollLeft(this._containerScrollLeft),n.isMaximized=n.isMinimized=!1,this.wrapper.removeAttr("tabindex"),this.wrapper.removeAttr("aria-labelled-by"),i.resize(),i):i},_sizingAction:function(e,t){var i=this,n=i.wrapper,o=n[0].style,r=i.options;return r.isMaximized||r.isMinimized?i:(i.restoreOptions={width:o.width,height:o.height},n.children(E).hide().end().children(T).find(te).parent().hide().eq(0).before(ue.action({name:"window-restore"})),t.call(i),i.wrapper.children(T).find(oe).parent().toggle("maximize"!==e),i.trigger(e),n.find(".k-i-window-restore").parent().focus(),i)},maximize:function(){return this._sizingAction("maximize",function(){var t=this,i=t.wrapper,n=this.containment&&!t._isPinned,o=i.position(),r=e(document);_(t.restoreOptions,{left:o.left+(n?this.containment.scrollLeft():0),top:o.top+(n?this.containment.scrollTop():0)}),this._containerScrollTop=n?this.containment.scrollTop():r.scrollTop(),this._containerScrollLeft=n?this.containment.scrollLeft():r.scrollLeft(),t._stopDocumentScrolling(),i.css({top:n?this.containment.scrollTop():0,left:n?this.containment.scrollLeft():0,position:n?"absolute":"fixed"}).addClass(z),t.options.isMaximized=!0,t._onDocumentResize()}),this},_stopDocumentScrolling:function(){var i,n,o=this,r=o.containment;return r&&!o._isPinned?(o._storeOverflowRule(r),r.css(Z,L),o.wrapper.css({maxWidth:r.innerWidth(),maxHeight:r.innerHeight()}),t):(i=e("body"),o._storeOverflowRule(i),i.css(Z,L),n=e("html"),o._storeOverflowRule(n),n.css(Z,L),t)},_enableDocumentScrolling:function(){var i=this,n=i.containment;return n&&!i._isPinned?(i._restoreOverflowRule(n),i.wrapper.css({maxWidth:n.width,maxHeight:n.height}),t):(i._restoreOverflowRule(e(document.body)),i._restoreOverflowRule(e("html")),t)},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;"string"==typeof t&&e.data(J,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(J)},_restoreOverflowRule:function(e){var i=e.data(J);null!==i&&i!==t?(e.css(Z,i),e.removeData(J)):e.css(Z,"")},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction("minimize",function(){var e=this;e.wrapper.css({height:"",minHeight:""}),e.element.hide(),e.options.isMinimized=!0}),this.wrapper.attr("tabindex",0),this.wrapper.attr("aria-labelled-by",this.element.attr("aria-labelled-by")),this._updateBoundaries(),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,i=e(window),o=t.wrapper,r=t.options,a=r.position,l=this.containment?s(o[0]).top+n(this.containment,"borderTopWidth"):n(o,"top"),c=this.containment?s(o[0]).left+n(this.containment,"borderLeftWidth"):n(o,"left");t.options.isMaximized||(a.top=l,a.left=c,this.containment&&"fixed"===this.containment.css("position")||(a.top-=i.scrollTop(),a.left-=i.scrollLeft()),o.css(_(a,{position:"fixed"})),o.children(T).find(ie).addClass("k-i-unpin").removeClass("k-i-pin"),t._isPinned=!0,t.options.pinned=!0,this.containment&&(r.maxWidth=r.maxHeight=1/0,o.css({maxWidth:"",maxHeight:""})))},unpin:function(){var t=this,i=e(window),r=t.wrapper,s=t.options,a=t.options.position,l=t.containment,c=parseInt(r.css("top"),10)+i.scrollTop(),d=parseInt(r.css("left"),10)+i.scrollLeft();t.options.isMaximized||(t._isPinned=!1,t.options.pinned=!1,l&&(t._updateBoundaries(),s.maxWidth=Math.min(l.width,s.maxWidth),s.maxHeight=Math.min(l.height-n(r,"padding-top"),s.maxHeight),r.css({maxWidth:s.maxWidth,maxHeight:s.maxHeight}),c=c<l.position.top?t.minTop:c>l.position.top+l.height?t.maxTop:c+l.scrollTop()-(l.position.top+n(l,"border-top-width")),d=d<l.position.left?t.minLeft:d>l.position.left+l.width?t.maxLeft:d+l.scrollLeft()-(l.position.left+n(l,"border-left-width"))),a.top=o(c,t.minTop,t.maxTop),a.left=o(d,t.minLeft,t.maxLeft),r.css(_(a,{position:""})),r.children(T).find(ne).addClass("k-i-pin").removeClass("k-i-unpin"))},_onDocumentResize:function(){var t,i,o,r,s,a=this,l=a.wrapper,d=e(window),u=c.support.zoomLevel(),h="content-box"==l.css("box-sizing");a.options.isMaximized&&(o=h?n(l,"border-left-width")+n(l,"border-right-width"):0,r=h?n(l,"border-top-width")+n(l,"border-bottom-width"):0,s=h?n(l,"padding-top"):0,a.containment&&!a._isPinned?(t=a.containment.innerWidth()-o,i=a.containment.innerHeight()-(r+s)):(t=d.width()/u-o,i=d.height()/u-(r+s)),l.css({width:t,height:i}),a.options.width=t,a.options.height=i,a.resize())},refresh:function(t){var n,o,r,s=this,a=s.options,l=e(s.element);return p(t)||(t={url:t}),t=_({},a.content,t),o=i(a.iframe)?a.iframe:t.iframe,r=t.url,r?(i(o)||(o=!ce(r)),o?(n=l.find("."+M)[0],n?n.src=r||n.src:l.html(ue.contentFrame(_({},a,{content:t}))),l.find("."+M).unbind("load"+k).on("load"+k,v(this._triggerRefresh,this))):s._ajaxRequest(t)):(t.template&&s.content(w(t.template)({})),s.trigger(U)),l.toggleClass("k-window-iframecontent",!!o),s},_triggerRefresh:function(){this.trigger(U)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(se).removeClass(R)},_ajaxError:function(e,t){this.trigger(X,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var i=t;e&&(i=w(e)(t||{})),this.content(i,t),this.element.prop("scrollTop",0),this.trigger(U)}},_showLoading:function(){this.wrapper.find(se).addClass(R)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(v(this._showLoading,this),100),e.ajax(_({type:"GET",dataType:"html",cache:!1,error:v(this._ajaxError,this),complete:v(this._ajaxComplete,this),success:v(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(k).children(D).off(k).end().find(".k-resize-handle,.k-window-titlebar").off(k),e(window).off("resize"+k+this._marker),e(window).off(x),e(window).off(k),clearTimeout(this._loadingIconTimeout),d.fn.destroy.call(this),this.unbind(t),c.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,i,n=this.element,o=this.options,r=c.support.isRtl(n);o.scrollable===!1&&n.css("overflow","hidden"),i=e(ue.wrapper(o)),t=n.find("iframe:not(.k-content)").map(function(){var e=this.getAttribute("src");return this.src="",e}),i.toggleClass("k-rtl",r).append(n).find("iframe:not(.k-content)").each(function(e){this.src=t[e]}),this.containment?this.containment.prepend(i):this.appendTo&&i.appendTo(this.appendTo),i.find(".k-window-title").css(r?"left":"right",m(i.find(".k-window-actions"))+10),n.css("visibility","").show(),n.find("[data-role=editor]").each(function(){var t=e(this).data("kendoEditor");t&&t.refresh()}),i=n=null}}),ue={wrapper:w("<div class='k-widget k-window' />"),action:w("<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action' aria-label='#= name #'><span class='k-icon k-i-#= name.toLowerCase() #'></span></a>"),titlebar:w("<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:w("<iframe frameborder='0' title='#= title #' class='"+M+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:w("<div class='k-resize-handle k-resize-#= data #'></div>")};a.prototype={addOverlay:function(){this.owner.wrapper.append(ue.overlay)},removeOverlay:function(){this.owner.wrapper.find(I).remove()},dragstart:function(t){var i,n,o,r,a,l,d,u=this,h=u.owner,p=h.wrapper;u._preventDragging=h.trigger(G),u._preventDragging||(u.elementPadding=parseInt(p.css("padding-top"),10),u.initialPosition=c.getOffset(p,"position"),u.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),u.initialSize={width:p.width(),height:p.height()},h._updateBoundaries(),u.containerOffset=h.containment?h.containment.position:c.getOffset(h.appendTo,"position"),i=p.offsetParent(),i.is("html")?u.containerOffset.top=u.containerOffset.left=0:(n=i.css("margin-top"),o=i.css("margin-left"),r=!le.test(n)||!le.test(o),r&&(a=s(p[0]),l=a.left-u.containerOffset.left-u.initialPosition.left,d=a.top-u.containerOffset.top-u.initialPosition.top,u._relativeElMarginLeft=l>1?l:0,u._relativeElMarginTop=d>1?d:0,u.initialPosition.left+=u._relativeElMarginLeft,u.initialPosition.top+=u._relativeElMarginTop)),p.children(E).not(t.currentTarget).hide(),e(y).css(H,t.currentTarget.css(H)))},drag:function(t){var i,n,r,s,a,l,d,u,h,p,f,m,g,v,_,b,w,y,k,x;this._preventDragging||(i=this,n=i.owner,r=n.wrapper,s=n.options,a=s.position,l=i.resizeDirection,d=i.containerOffset,u=i.initialPosition,h=i.initialSize,p=n.containment&&!n._isPinned,f=c.support.isRtl(n.containment),m=p&&f&&n.containment.innerWidth()>n.containment.width?c.support.scrollbar():0,g=p?{top:n.containment.scrollTop(),left:n.containment.scrollLeft()}:{top:0,left:0},y=Math.max(t.x.location,0),k=Math.max(t.y.location,0),l.indexOf("e")>=0?(v=n.containment&&y-h.width>=n.maxLeft-g.left+d.left+m?n.maxLeft+m-u.left+h.width-g.left:y-u.left-d.left,r.width(o(v,s.minWidth,s.maxWidth))):l.indexOf("w")>=0&&(w=u.left+h.width+d.left,v=o(w-y,s.minWidth,s.maxWidth),a.left=w-v-d.left-m-(i._relativeElMarginLeft||0)+g.left,n.containment&&a.left<=n.minLeft&&(a.left=n.minLeft,v=o(w-m-a.left-d.left+g.left,s.minWidth,s.maxWidth)),r.css({left:a.left,width:v})),x=k,n.options.pinned&&(x-=e(window).scrollTop()),l.indexOf("s")>=0?(_=x-u.top-i.elementPadding-d.top,x-h.height-i.elementPadding>=n.maxTop+d.top-g.top&&(_=n.maxTop-u.top+h.height-g.top),r.height(o(_,s.minHeight,s.maxHeight))):l.indexOf("n")>=0&&(b=u.top+h.height+d.top,_=o(b-x,s.minHeight,s.maxHeight),a.top=b-_-d.top-(i._relativeElMarginTop||0)+g.top,a.top<=n.minTop&&n.containment&&(a.top=n.minTop,_=o(b-a.top-d.top+g.top,s.minHeight,s.maxHeight)),r.css({top:a.top,height:_})),v&&(n.options.width=v+"px"),_&&(n.options.height=_+"px"),n.resize())},dragend:function(t){if(!this._preventDragging){var i=this,n=i.owner,o=n.wrapper;return o.children(E).not(t.currentTarget).show(),e(y).css(H,""),n.touchScroller&&n.touchScroller.reset(),27==t.keyCode&&o.css(i.initialPosition).css(i.initialSize),n.trigger(K),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},l.prototype={dragstart:function(t){var i=this.owner,n=i.options.draggable,o=i.element,r=o.find(".k-window-actions"),s=c.getOffset(i.appendTo);this._preventDragging=i.trigger(Y)||!n,this._preventDragging||i.isMaximized()||(i.initialWindowPosition=c.getOffset(i.wrapper,"position"),i.initialPointerPosition={left:i.options.position.left,top:i.options.position.top},i.startPosition={left:t.x.client-i.initialWindowPosition.left,top:t.y.client-i.initialWindowPosition.top},i._updateBoundaries(),i.containment||(i.minLeft=r.length>0?m(r)+parseInt(r.css("right"),10)-m(o):20-m(o),i.minLeft-=s.left,i.minTop=-s.top),i.wrapper.append(ue.overlay).children(E).hide(),e(y).css(H,t.currentTarget.css(H)))},drag:function(t){var i,n,r=this.owner,s=r.options.position,a=r.options.draggable.axis;this._preventDragging||r.isMaximized()||(a&&"x"!==a.toLowerCase()||(i=t.x.client-r.startPosition.left,r.containment&&!r._isPinned&&(i+=r.containment.scrollLeft()),s.left=o(i,r.minLeft,r.maxLeft)),a&&"y"!==a.toLowerCase()||(n=t.y.client-r.startPosition.top,r.containment&&!r._isPinned&&(n+=r.containment.scrollTop()),s.top=o(n,r.minTop,r.maxTop)),c.support.transforms?e(r.wrapper).css("transform","translate("+(s.left-r.initialPointerPosition.left)+"px, "+(s.top-r.initialPointerPosition.top)+"px)"):e(r.wrapper).css(s))},_finishDrag:function(){var t=this.owner;t.wrapper.children(E).toggle(!t.options.isMinimized).end().find(I).remove(),e(y).css(H,"")},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(C).css(this.owner.initialWindowPosition))},dragend:function(){var t=this.owner;if(!this._preventDragging&&!t.isMaximized())return e(t.wrapper).css(t.options.position).css("transform",""),this._finishDrag(),t.trigger(Q),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},c.ui.plugin(de)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.view.min",["kendo.core.min","kendo.fx.min","kendo.mobile.scroller.min","kendo.view.min"],e)}(function(){return function(e,t){function i(e){var t,i,n=e.find(k("popover")),o=a.roles;for(t=0,i=n.length;t<i;t++)r.initWidget(n[t],{},o)}function n(e){r.triggeredByInput(e)||e.preventDefault()}function o(t){t.each(function(){r.initWidget(e(this),{},a.roles)})}var r=window.kendo,s=r.mobile,a=s.ui,l=r.attr,c=a.Widget,d=r.ViewClone,u="init",h='<div style="height: 100%; width: 100%; position: absolute; top: 0; left: 0; z-index: 20000; display: none" />',p="beforeShow",f="show",m="afterShow",g="beforeHide",v="transitionEnd",_="transitionStart",b="hide",w="destroy",y=r.attrValue,k=r.roleSelector,x=r.directiveSelector,C=r.compileMobileDirective,S=c.extend({init:function(t,i){c.fn.init.call(this,t,i),this.params={},e.extend(this,i),this.transition=this.transition||this.defaultTransition,this._id(),this.options.$angular?this._overlay():(this._layout(),this._overlay(),this._scroller(),this._model())},events:[u,p,f,m,g,b,w,_,v],options:{name:"View",title:"",layout:null,getLayout:e.noop,reload:!1,transition:"",defaultTransition:"",useNativeScrolling:!1,stretch:!1,zoom:!1,model:null,modelScope:window,scroller:{},initWidgets:!0},enable:function(e){t===e&&(e=!0),e?this.overlay.hide():this.overlay.show()},destroy:function(){this.layout&&this.layout.detach(this),this.trigger(w),c.fn.destroy.call(this),this.scroller&&this.scroller.destroy(),this.options.$angular&&this.element.scope().$destroy(),r.destroy(this.element)},purge:function(){this.destroy(),this.element.remove()},triggerBeforeShow:function(){return!this.trigger(p,{view:this})},triggerBeforeHide:function(){return!this.trigger(g,{view:this})},showStart:function(){var e=this.element;e.css("display",""),this.inited?this._invokeNgController():(this.inited=!0,this.trigger(u,{view:this})),this.layout&&this.layout.attach(this),this._padIfNativeScrolling(),this.trigger(f,{view:this}),r.resize(e)},showEnd:function(){this.trigger(m,{view:this}),this._padIfNativeScrolling()},hideEnd:function(){var e=this;e.element.hide(),e.trigger(b,{view:e}),e.layout&&e.layout.trigger(b,{view:e,layout:e.layout})},beforeTransition:function(e){this.trigger(_,{type:e})},afterTransition:function(e){this.trigger(v,{type:e})},_padIfNativeScrolling:function(){if(s.appLevelNativeScrolling()){var e=r.support.mobileOS&&r.support.mobileOS.android,t=s.application.skin()||"",i=s.application.os.android||t.indexOf("android")>-1,n="flat"===t||t.indexOf("material")>-1,o=!e&&!i||n?"header":"footer",a=!e&&!i||n?"footer":"header";this.content.css({paddingTop:this[o].height(),paddingBottom:this[a].height()})}},contentElement:function(){var e=this;return e.options.stretch?e.content:e.scrollerContent},clone:function(){return new d(this)},_scroller:function(){var t=this;s.appLevelNativeScrolling()||(t.options.stretch?t.content.addClass("km-stretched-view"):(t.content.kendoMobileScroller(e.extend(t.options.scroller,{zoom:t.options.zoom,useNative:t.options.useNativeScrolling})),t.scroller=t.content.data("kendoMobileScroller"),t.scrollerContent=t.scroller.scrollElement),r.support.kineticScrollNeeded&&(e(t.element).on("touchmove",".km-header",n),t.options.useNativeScrolling||t.options.stretch||e(t.element).on("touchmove",".km-content",n)))},_model:function(){var e=this,t=e.element,n=e.options.model;"string"==typeof n&&(n=r.getter(n)(e.options.modelScope)),e.model=n,i(t),e.element.css("display",""),e.options.initWidgets&&(n?r.bind(t,n,a,r.ui,r.dataviz.ui):s.init(t.children())),e.element.css("display","none")},_id:function(){var e=this.element,t=e.attr("id")||"";this.id=y(e,"url")||"#"+t,"#"==this.id&&(this.id=r.guid(),e.attr("id",this.id))},_layout:function(){var e=k("content"),t=this.element;t.addClass("km-view"),this.header=t.children(k("header")).addClass("km-header"),this.footer=t.children(k("footer")).addClass("km-footer"),t.children(e)[0]||t.wrapInner("<div "+l("role")+'="content"></div>'),
this.content=t.children(k("content")).addClass("km-content"),this.element.prepend(this.header).append(this.footer),this.layout=this.options.getLayout(this.layout),this.layout&&this.layout.setup(this)},_overlay:function(){this.overlay=e(h).appendTo(this.element)},_invokeNgController:function(){var t,i,n;this.options.$angular&&(t=this.element.controller(),i=this.options.$angular[0],t&&(n=e.proxy(this,"_callController",t,i),/^\$(digest|apply)$/.test(i.$$phase)?n():i.$apply(n)))},_callController:function(e,t){this.element.injector().invoke(e.constructor,e,{$scope:t})}}),T=c.extend({init:function(e,t){c.fn.init.call(this,e,t),e=this.element,this.header=e.children(this._locate("header")).addClass("km-header"),this.footer=e.children(this._locate("footer")).addClass("km-footer"),this.elements=this.header.add(this.footer),i(e),this.options.$angular||r.mobile.init(this.element.children()),this.element.detach(),this.trigger(u,{layout:this})},_locate:function(e){return this.options.$angular?x(e):k(e)},options:{name:"Layout",id:null,platform:null},events:[u,f,b],setup:function(e){e.header[0]||(e.header=this.header),e.footer[0]||(e.footer=this.footer)},detach:function(e){var t=this;e.header===t.header&&t.header[0]&&e.element.prepend(t.header.detach()[0].cloneNode(!0)),e.footer===t.footer&&t.footer.length&&e.element.append(t.footer.detach()[0].cloneNode(!0))},attach:function(e){var t=this,i=t.currentView;i&&t.detach(i),e.header===t.header&&(t.header.detach(),e.element.children(k("header")).remove(),e.element.prepend(t.header)),e.footer===t.footer&&(t.footer.detach(),e.element.children(k("footer")).remove(),e.element.append(t.footer)),t.trigger(f,{layout:t,view:e}),t.currentView=e}}),D=r.Observable,A=/<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,E="loadStart",I="loadComplete",M="showStart",R="sameViewRequested",F="viewShow",P="viewTypeDetermined",z="after",B=D.extend({init:function(t){var i,n,s,a,l=this;if(D.fn.init.call(l),e.extend(l,t),l.sandbox=e("<div />"),s=l.container,i=l._hideViews(s),l.rootView=i.first(),!l.rootView[0]&&t.rootNeeded)throw n=s[0]==r.mobile.application.element[0]?'Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.':'Your pane element does not contain any direct child elements with data-role="view" attribute set.',Error(n);l.layouts={},l.viewContainer=new r.ViewContainer(l.container),l.viewContainer.bind("accepted",function(e){e.view.params=l.params}),l.viewContainer.bind("complete",function(e){l.trigger(F,{view:e.view})}),l.viewContainer.bind(z,function(){l.trigger(z)}),this.getLayoutProxy=e.proxy(this,"_getLayout"),l._setupLayouts(s),a=s.children(l._locate("modalview drawer")),l.$angular?(l.$angular[0].viewOptions={defaultTransition:l.transition,loader:l.loader,container:l.container,getLayout:l.getLayoutProxy},a.each(function(i,n){C(e(n),t.$angular[0])})):o(a),this.bind(this.events,t)},events:[M,z,F,E,I,R,P],destroy:function(){r.destroy(this.container);for(var e in this.layouts)this.layouts[e].destroy()},view:function(){return this.viewContainer.view},showView:function(e,t,i){if(e=e.replace(RegExp("^"+this.remoteViewURLPrefix),""),""===e&&this.remoteViewURLPrefix&&(e="/"),e.replace(/^#/,"")===this.url)return this.trigger(R),!1;this.trigger(M);var n=this,o=function(i){return n.viewContainer.show(i,t,e)},s=n._findViewElement(e),a=r.widgetInstance(s);return n.url=e.replace(/^#/,""),n.params=i,a&&a.reload&&(a.purge(),s=[]),this.trigger(P,{remote:0===s.length,url:e}),s[0]?(a||(a=n._createView(s)),o(a)):(this.serverNavigation?location.href=e:n._loadView(e,o),!0)},append:function(e,t){var i,n,r,s=this.sandbox,a=(t||"").split("?")[0],c=this.container;return A.test(e)&&(e=RegExp.$1),s[0].innerHTML=e,c.append(s.children("script, style")),i=this._hideViews(s),r=i.first(),r.length||(i=r=s.wrapInner("<div data-role=view />").children()),a&&r.hide().attr(l("url"),a),this._setupLayouts(s),n=s.children(this._locate("modalview drawer")),c.append(s.children(this._locate("layout modalview drawer")).add(i)),o(n),this._createView(r)},_locate:function(e){return this.$angular?x(e):k(e)},_findViewElement:function(e){var t,i=e.split("?")[0];return i?(t=this.container.children("["+l("url")+"='"+i+"']"),t[0]||i.indexOf("/")!==-1||(t=this.container.children("#"===i.charAt(0)?i:"#"+i)),t):this.rootView},_createView:function(e){return this.$angular?C(e,this.$angular[0]):r.initWidget(e,{defaultTransition:this.transition,loader:this.loader,container:this.container,getLayout:this.getLayoutProxy,modelScope:this.modelScope,reload:y(e,"reload")},a.roles)},_getLayout:function(e){return""===e?null:e?this.layouts[e]:this.layouts[this.layout]},_loadView:function(t,i){this._xhr&&this._xhr.abort(),this.trigger(E),this._xhr=e.get(r.absoluteURL(t,this.remoteViewURLPrefix),"html").always(e.proxy(this,"_xhrComplete",i,t))},_xhrComplete:function(e,t,i){var n=!0;if("object"==typeof i&&0===i.status){if(!(i.responseText&&i.responseText.length>0))return;n=!0,i=i.responseText}this.trigger(I),n&&e(this.append(i,t))},_hideViews:function(e){return e.children(this._locate("view splitview")).hide()},_setupLayouts:function(t){var i,n=this;t.children(n._locate("layout")).each(function(){i=n.$angular?C(e(this),n.$angular[0]):r.initWidget(e(this),{},a.roles);var t=i.options.platform;t&&t!==s.application.os.name?i.destroy():n.layouts[i.options.id]=i})}});r.mobile.ViewEngine=B,a.plugin(S),a.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.loader.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile.ui,o=n.Widget,r=e.map(i.eventMap,function(e){return e}).join(" ").split(" "),s=o.extend({init:function(t,i){var n=this,r=e('<div class="km-loader"><span class="km-loading km-spin"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>');o.fn.init.call(n,r,i),n.container=t,n.captureEvents=!1,n._attachCapture(),r.append(n.options.loading).hide().appendTo(t)},options:{name:"Loader",loading:"<h1>Loading...</h1>",timeout:100},show:function(){var e=this;clearTimeout(e._loading),e.options.loading!==!1&&(e.captureEvents=!0,e._loading=setTimeout(function(){e.element.show()},e.options.timeout))},hide:function(){this.captureEvents=!1,clearTimeout(this._loading),this.element.hide()},changeMessage:function(e){this.options.loading=e,this.element.find(">h1").html(e)},transition:function(){this.captureEvents=!0,this.container.css("pointer-events","none")},transitionDone:function(){this.captureEvents=!1,this.container.css("pointer-events","")},_attachCapture:function(){function e(e){i.captureEvents&&e.preventDefault()}var t,i=this;for(i.captureEvents=!1,t=0;t<r.length;t++)i.container[0].addEventListener(r[t],e,!0)}});n.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.pane.min",["kendo.mobile.view.min","kendo.mobile.loader.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile,o=i.roleSelector,r=n.ui,s=r.Widget,a=n.ViewEngine,l=r.View,c=n.ui.Loader,d="external",u="href",h="#!",p="navigate",f="viewShow",m="sameViewRequested",g=i.support.mobileOS,v=g.ios&&!g.appMode&&g.flatVersion>=700,_=/popover|actionsheet|modalview|drawer/,b="#:back",w=i.attrValue,y=s.extend({init:function(e,t){var n=this;s.fn.init.call(n,e,t),t=n.options,e=n.element,e.addClass("km-pane"),n.options.collapsible&&e.addClass("km-collapsible-pane"),this.history=[],this.historyCallback=function(e,t,i){var o=n.transition;return n.transition=null,v&&i&&(o="none"),n.viewEngine.showView(e,o,t)},this._historyNavigate=function(e){if(e===b){if(1===n.history.length)return;n.history.pop(),e=n.history[n.history.length-1]}else n.history.push(e);n.historyCallback(e,i.parseQueryStringParams(e))},this._historyReplace=function(e){var t=i.parseQueryStringParams(e);n.history[n.history.length-1]=e,n.historyCallback(e,t)},n.loader=new c(e,{loading:n.options.loading}),n.viewEngine=new a({container:e,transition:t.transition,modelScope:t.modelScope,rootNeeded:!t.initial,serverNavigation:t.serverNavigation,remoteViewURLPrefix:t.root||"",layout:t.layout,$angular:t.$angular,loader:n.loader,showStart:function(){n.loader.transition(),n.closeActiveDialogs()},after:function(){n.loader.transitionDone()},viewShow:function(e){n.trigger(f,e)},loadStart:function(){n.loader.show()},loadComplete:function(){n.loader.hide()},sameViewRequested:function(){n.trigger(m)},viewTypeDetermined:function(e){e.remote&&n.options.serverNavigation||n.trigger(p,{url:e.url})}}),this._setPortraitWidth(),i.onResize(function(){n._setPortraitWidth()}),n._setupAppLinks()},closeActiveDialogs:function(){var t=this.element.find(o("actionsheet popover modalview")).filter(":visible");t.each(function(){i.widgetInstance(e(this),r).close()})},navigateToInitial:function(){var e=this.options.initial;return e&&this.navigate(e),e},options:{name:"Pane",portraitWidth:"",transition:"",layout:"",collapsible:!1,initial:null,modelScope:window,loading:"<h1>Loading...</h1>"},events:[p,f,m],append:function(e){return this.viewEngine.append(e)},destroy:function(){s.fn.destroy.call(this),this.viewEngine.destroy(),this.userEvents.destroy()},navigate:function(e,t){e instanceof l&&(e=e.id),this.transition=t,this._historyNavigate(e)},replace:function(e,t){e instanceof l&&(e=e.id),this.transition=t,this._historyReplace(e)},bindToRouter:function(e){var t=this,n=this.history,o=this.viewEngine;e.bind("init",function(t){var r,s=t.url,a=e.pushState?s:"/";o.rootView.attr(i.attr("url"),a),r=n.length,"/"===s&&r&&(e.navigate(n[r-1],!0),t.preventDefault())}),e.bind("routeMissing",function(e){t.historyCallback(e.url,e.params,e.backButtonPressed)||e.preventDefault()}),e.bind("same",function(){t.trigger(m)}),t._historyNavigate=function(t){e.navigate(t)},t._historyReplace=function(t){e.replace(t)}},hideLoading:function(){this.loader.hide()},showLoading:function(){this.loader.show()},changeLoadingMessage:function(e){this.loader.changeMessage(e)},view:function(){return this.viewEngine.view()},_setPortraitWidth:function(){var e,t=this.options.portraitWidth;t&&(e=i.mobile.application.element.is(".km-vertical")?t:"auto",this.element.css("width",e))},_setupAppLinks:function(){var t=this,n="tab",r="[data-"+i.ns+"navigate-on-press]",s=e.map(["button","backbutton","detailbutton","listview-link"],function(e){return o(e)+":not("+r+")"}).join(",");this.element.handler(this).on("down",o(n)+","+r,"_mouseup").on("click",o(n)+","+s+","+r,"_appLinkClick"),this.userEvents=new i.UserEvents(this.element,{fastTap:!0,filter:s,tap:function(e){e.event.currentTarget=e.touch.currentTarget,t._mouseup(e.event)}}),this.element.css("-ms-touch-action","")},_appLinkClick:function(t){var i=e(t.currentTarget).attr("href"),n=i&&"#"!==i[0]&&this.options.serverNavigation;n||w(e(t.currentTarget),"rel")==d||t.preventDefault()},_mouseup:function(o){if(!(o.which>1||o.isDefaultPrevented())){var s=this,a=e(o.currentTarget),l=w(a,"transition"),c=w(a,"rel")||"",p=w(a,"target"),f=a.attr(u),m=v&&0===a[0].offsetHeight,g=f&&"#"!==f[0]&&this.options.serverNavigation;m||g||c===d||t===f||f===h||(a.attr(u,h),setTimeout(function(){a.attr(u,f)}),c.match(_)?(i.widgetInstance(e(f),r).openFor(a),"actionsheet"!==c&&"drawer"!==c||o.stopPropagation()):("_top"===p?s=n.application.pane:p&&(s=e("#"+p).data("kendoMobilePane")),s.navigate(f,l)),o.preventDefault())}}});y.wrap=function(e){e.is(o("view"))||(e=e.wrap("<div data-"+i.ns+'role="view" data-stretch="true"></div>').parent());var t=e.wrap('<div class="km-pane-wrapper"><div></div></div>').parent(),n=new y(t);return n.navigate(""),n},r.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.popover.min",["kendo.popup.min","kendo.mobile.pane.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile,o=n.ui,r="hide",s="open",a="close",l='<div class="km-popup-wrapper" />',c='<div class="km-popup-arrow" />',d='<div class="km-popup-overlay" />',u="km-up km-down km-left km-right",h=o.Widget,p={down:{origin:"bottom center",position:"top center"},up:{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"}},f={animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:400}}},m={horizontal:{offset:"top",size:"height"},vertical:{offset:"left",size:"width"}},g={up:"down",down:"up",left:"right",right:"left"},v=h.extend({init:function(t,n){var o,s,a=this,u=t.closest(".km-modalview-wrapper"),g=t.closest(".km-root").children(".km-pane").first(),v=u[0]?u:g;n.viewport?g=n.viewport:g[0]||(g=window),n.container?v=n.container:v[0]||(v=document.body),o={viewport:g,copyAnchorStyles:!1,autosize:!0,open:function(){a.overlay.show()},activate:e.proxy(a._activate,a),deactivate:function(){a.overlay.hide(),a._apiCall||a.trigger(r),a._apiCall=!1}},h.fn.init.call(a,t,n),t=a.element,n=a.options,t.wrap(l).addClass("km-popup").show(),s=a.options.direction.match(/left|right/)?"horizontal":"vertical",a.dimensions=m[s],a.wrapper=t.parent().css({width:n.width,height:n.height}).addClass("km-popup-wrapper km-"+n.direction).hide(),a.arrow=e(c).prependTo(a.wrapper).hide(),a.overlay=e(d).appendTo(v).hide(),o.appendTo=a.overlay,n.className&&a.overlay.addClass(n.className),a.popup=new i.ui.Popup(a.wrapper,e.extend(!0,o,f,p[n.direction]))},options:{name:"Popup",width:240,height:"",direction:"down",container:null,viewport:null},events:[r],show:function(t){this.popup.options.anchor=e(t),this.popup.open()},hide:function(){this._apiCall=!0,this.popup.close()},destroy:function(){h.fn.destroy.call(this),this.popup.destroy(),this.overlay.remove()},target:function(){return this.popup.options.anchor},_activate:function(){var t=this,i=t.options.direction,n=t.dimensions,o=n.offset,r=t.popup,s=r.options.anchor,a=e(s).offset(),l=e(r.element).offset(),c=r.flipped?g[i]:i,d=2*t.arrow[n.size](),h=t.element[n.size]()-t.arrow[n.size](),p=e(s)[n.size](),f=a[o]-l[o]+p/2;f<d&&(f=d),f>h&&(f=h),t.wrapper.removeClass(u).addClass("km-"+c),t.arrow.css(o,f).show()}}),_=h.extend({init:function(t,n){var r,s=this;s.initialOpen=!1,h.fn.init.call(s,t,n),r=e.extend({className:"km-popover-root",hide:function(){s.trigger(a)}},this.options.popup),s.popup=new v(s.element,r),s.popup.overlay.on("move",function(e){e.target==s.popup.overlay[0]&&e.preventDefault()}),s.pane=new o.Pane(s.element,e.extend(this.options.pane,{$angular:this.options.$angular})),i.notify(s,o)},options:{name:"PopOver",popup:{},pane:{}},events:[s,a],open:function(e){this.popup.show(e),this.initialOpen?this.pane.view()._invokeNgController():(this.pane.navigateToInitial()||this.pane.navigate(""),this.popup.popup._position(),this.initialOpen=!0)},openFor:function(e){this.open(e),this.trigger(s,{target:this.popup.target()})},close:function(){this.popup.hide()},destroy:function(){h.fn.destroy.call(this),this.pane.destroy(),this.popup.destroy(),i.destroy(this.element)}});o.plugin(v),o.plugin(_)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.shim.min",["kendo.popup.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile.ui,o=i.ui.Popup,r='<div class="km-shim"/>',s="hide",a=n.Widget,l=a.extend({init:function(t,n){var l=this,c=i.mobile.application,d=i.support.mobileOS,u=c?c.os.name:d?d.name:"ios",h="ios"===u||"wp"===u||!!c&&c.os.skin,p="blackberry"===u,f=n.align||(h?"bottom center":p?"center right":"center center"),m=n.position||(h?"bottom center":p?"center right":"center center"),g=n.effect||(h?"slideIn:up":p?"slideIn:left":"fade:in"),v=e(r).handler(l).hide();a.fn.init.call(l,t,n),l.shim=v,t=l.element,n=l.options,n.className&&l.shim.addClass(n.className),n.modal||l.shim.on("down","_hide"),(c?c.element:e(document.body)).append(v),l.popup=new o(l.element,{anchor:v,modal:!0,appendTo:v,origin:f,position:m,animation:{open:{effects:g,duration:n.duration},close:{duration:n.duration}},close:function(e){var t=!1;l._apiCall||(t=l.trigger(s)),t&&e.preventDefault(),l._apiCall=!1},deactivate:function(){v.hide()},open:function(){v.show()}}),i.notify(l)},events:[s],options:{name:"Shim",modal:!1,align:t,position:t,effect:t,duration:200},show:function(){this.popup.open()},hide:function(){this._apiCall=!0,this.popup.close()},destroy:function(){a.fn.destroy.call(this),this.shim.kendoDestroy(),this.popup.destroy(),this.shim.remove()},_hide:function(t){t&&e.contains(this.shim.children().children(".k-popup")[0],t.target)||this.popup.close()}});n.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.actionsheet.min",["kendo.mobile.popover.min","kendo.mobile.shim.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.support,o=i.mobile.ui,r=o.Shim,s=o.Popup,a=o.Widget,l="open",c="close",d="command",u="li>a",h="actionsheetContext",p='<div class="km-actionsheet-wrapper" />',f=i.template('<li class="km-actionsheet-cancel"><a href="\\#">#:cancel#</a></li>'),m=a.extend({init:function(t,l){var c,d,h,m=this,g=n.mobileOS;a.fn.init.call(m,t,l),l=m.options,h=l.type,t=m.element,d="auto"===h?g&&g.tablet:"tablet"===h,c=d?s:r,l.cancelTemplate&&(f=i.template(l.cancelTemplate)),t.addClass("km-actionsheet").append(f({cancel:m.options.cancel})).wrap(p).on("up",u,"_click").on("click",u,i.preventDefault),m.view().bind("destroy",function(){m.destroy()}),m.wrapper=t.parent().addClass(h?" km-actionsheet-"+h:""),m.shim=new c(m.wrapper,e.extend({modal:g.ios&&g.majorVersion<7,className:"km-actionsheet-root"},m.options.popup)),m._closeProxy=e.proxy(m,"_close"),m._shimHideProxy=e.proxy(m,"_shimHide"),m.shim.bind("hide",m._shimHideProxy),d&&i.onResize(m._closeProxy),i.notify(m,o)},events:[l,c,d],options:{name:"ActionSheet",cancel:"Cancel",type:"auto",popup:{height:"auto"}},open:function(t,i){var n=this;n.target=e(t),n.context=i,n.shim.show(t)},close:function(){this.context=this.target=null,this.shim.hide()},openFor:function(e){var t=this,i=e.data(h);t.open(e,i),t.trigger(l,{target:e,context:i})},destroy:function(){a.fn.destroy.call(this),i.unbindResize(this._closeProxy),this.shim.destroy()},_click:function(t){var n,o,r,s;t.isDefaultPrevented()||(n=e(t.currentTarget),o=n.data("action"),o&&(r={target:this.target,context:this.context},s=this.options.$angular,s?this.element.injector().get("$parse")(o)(s[0])(r):i.getter(o)(window)(r)),this.trigger(d,{target:this.target,context:this.context,currentTarget:n}),t.preventDefault(),this._close())},_shimHide:function(e){this.trigger(c)?e.preventDefault():this.context=this.target=null},_close:function(e){this.trigger(c)?e.preventDefault():this.close()}});o.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.progressbar.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui,o=n.Widget,r="horizontal",s="vertical",a=0,l=100,c=0,d=5,u="k-progressbar",h="k-progressbar-reverse",p="k-progressbar-indeterminate",f="k-complete",m="k-state-selected",g="k-progress-status",v="k-state-selected",_="k-state-default",b="k-state-disabled",w={VALUE:"value",PERCENT:"percent",CHUNK:"chunk"},y="change",k="complete",x="boolean",C=Math,S=e.extend,T=e.proxy,D=100,A=400,E=3,I={progressStatus:"<span class='k-progress-status-wrap'><span class='k-progress-status'></span></span>"},M=o.extend({init:function(e,t){var i=this;o.fn.init.call(this,e,t),t=i.options,i._progressProperty=t.orientation===r?"width":"height",i._fields(),t.value=i._validateValue(t.value),i._validateType(t.type),i._wrapper(),i._progressAnimation(),t.value!==t.min&&t.value!==!1&&i._updateProgress()},setOptions:function(e){var t=this;o.fn.setOptions.call(t,e),e.hasOwnProperty("reverse")&&t.wrapper.toggleClass("k-progressbar-reverse",e.reverse),e.hasOwnProperty("enable")&&t.enable(e.enable),t._progressAnimation(),t._validateValue(),t._updateProgress()},events:[y,k],options:{name:"ProgressBar",orientation:r,reverse:!1,min:a,max:l,value:c,enable:!0,type:w.VALUE,chunkCount:d,showStatus:!0,animation:{}},_fields:function(){var t=this;t._isStarted=!1,t.progressWrapper=t.progressStatus=e()},_validateType:function(t){var n=!1;if(e.each(w,function(e,i){if(i===t)return n=!0,!1}),!n)throw Error(i.format("Invalid ProgressBar type '{0}'",t))},_wrapper:function(){var e,t=this,i=t.wrapper=t.element,n=t.options,o=n.orientation;i.addClass("k-widget "+u),i.addClass(u+"-"+(o===r?r:s)),n.enable===!1&&i.addClass(b),n.reverse&&i.addClass(h),n.value===!1&&i.addClass(p),n.type===w.CHUNK?t._addChunkProgressWrapper():n.showStatus&&(t.progressStatus=t.wrapper.prepend(I.progressStatus).find("."+g),e=n.value!==!1?n.value:n.min,t.progressStatus.text(n.type===w.VALUE?e:t._calculatePercentage(e).toFixed()+"%"))},value:function(e){return this._value(e)},_value:function(e){var i,n=this,o=n.options;return e===t?o.value:(typeof e!==x?(e=n._roundValue(e),isNaN(e)||(i=n._validateValue(e),i!==o.value&&(n.wrapper.removeClass(p),o.value=i,n._isStarted=!0,n._updateProgress()))):e||(n.wrapper.addClass(p),o.value=!1),t)},_roundValue:function(e){e=parseFloat(e);var t=C.pow(10,E);return C.floor(e*t)/t},_validateValue:function(e){var t=this,i=t.options;if(e!==!1){if(e<=i.min||e===!0)return i.min;if(e>=i.max)return i.max}else if(e===!1)return!1;return isNaN(t._roundValue(e))?i.min:e},_updateProgress:function(){var e=this,t=e.options,i=e._calculatePercentage();t.type===w.CHUNK?(e._updateChunks(i),e._onProgressUpdateAlways(t.value)):e._updateProgressWrapper(i)},_updateChunks:function(e){var t,i=this,n=i.options,o=n.chunkCount,a=parseInt(D/o*100,10)/100,l=parseInt(100*e,10)/100,c=C.floor(l/a);t=i.wrapper.find(n.orientation===r&&!n.reverse||n.orientation===s&&n.reverse?"li.k-item:lt("+c+")":"li.k-item:gt(-"+(c+1)+")"),i.wrapper.find("."+v).removeClass(v).addClass(_),t.removeClass(_).addClass(v)},_updateProgressWrapper:function(e){var t=this,i=t.options,n=t.wrapper.find("."+m),o=t._isStarted?t._animation.duration:0,r={};0===n.length&&t._addRegularProgressWrapper(),r[t._progressProperty]=e+"%",t.progressWrapper.animate(r,{duration:o,start:T(t._onProgressAnimateStart,t),progress:T(t._onProgressAnimate,t),complete:T(t._onProgressAnimateComplete,t,i.value),always:T(t._onProgressUpdateAlways,t,i.value)})},_onProgressAnimateStart:function(){this.progressWrapper.show()},_onProgressAnimate:function(e){var t,i=this,n=i.options,o=parseFloat(e.elem.style[i._progressProperty],10);n.showStatus&&(t=1e4/parseFloat(i.progressWrapper[0].style[i._progressProperty]),i.progressWrapper.find(".k-progress-status-wrap").css(i._progressProperty,t+"%")),n.type!==w.CHUNK&&o<=98&&i.progressWrapper.removeClass(f)},_onProgressAnimateComplete:function(e){var t,i=this,n=i.options,o=parseFloat(i.progressWrapper[0].style[i._progressProperty]);n.type!==w.CHUNK&&o>98&&i.progressWrapper.addClass(f),n.showStatus&&(t=n.type===w.VALUE?e:n.type==w.PERCENT?i._calculatePercentage(e).toFixed()+"%":C.floor(i._calculatePercentage(e))+"%",i.progressStatus.text(t)),e===n.min&&i.progressWrapper.hide()},_onProgressUpdateAlways:function(e){var t=this,i=t.options;t._isStarted&&t.trigger(y,{value:e}),e===i.max&&t._isStarted&&t.trigger(k,{value:i.max})},enable:function(e){var i=this,n=i.options;n.enable=t===e||e,i.wrapper.toggleClass(b,!n.enable)},destroy:function(){var e=this;o.fn.destroy.call(e)},_addChunkProgressWrapper:function(){var e,t=this,i=t.options,n=t.wrapper,o=D/i.chunkCount,r="";for(i.chunkCount<=1&&(i.chunkCount=1),r+="<ul class='k-reset'>",e=i.chunkCount-1;e>=0;e--)r+="<li class='k-item k-state-default'></li>";r+="</ul>",n.append(r).find(".k-item").css(t._progressProperty,o+"%").first().addClass("k-first").end().last().addClass("k-last"),t._normalizeChunkSize()},_normalizeChunkSize:function(){var e=this,t=e.options,i=e.wrapper.find(".k-item:last"),n=parseFloat(i[0].style[e._progressProperty]),o=D-t.chunkCount*n;o>0&&i.css(e._progressProperty,n+o+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=e("<div class='"+m+"'></div>").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(I.progressStatus),t.progressStatus=t.wrapper.find("."+g))},_calculateChunkSize:function(){var e=this,t=e.options.chunkCount,i=e.wrapper.find("ul.k-reset");return(parseInt(i.css(e._progressProperty),10)-(t-1))/t},_calculatePercentage:function(e){var i=this,n=i.options,o=e!==t?e:n.value,r=n.min,s=n.max;return i._onePercent=C.abs((s-r)/100),C.abs((o-r)/i._onePercent)},_progressAnimation:function(){var e=this,t=e.options,i=t.animation;e._animation=i===!1?{duration:0}:S({duration:A},t.animation)}});i.ui.plugin(M)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("pdf/pako.min",["kendo.core.min"],e)}(function(){return function(){kendo.pdf=kendo.pdf||{},kendo.pdf.supportsDeflate=function(){return window.pako&&"function"==typeof window.pako.deflate},kendo.pdf.deflate=function(e){return window.pako.deflate(e)}}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("pdf/core.min",["pdf/pako.min","kendo.core.min","kendo.color.min","kendo.drawing.min"],e)}(function(){return function(e){function t(e){function t(){return S>=T}function i(){return S<T?e[S++]:0}function n(t){w(S),e[S++]=255&t,S>T&&(T=S)}function o(){return i()<<8|i()}function r(e){n(e>>8),n(e)}function s(){var e=o();return e>=32768?e-65536:e}function a(e){r(e<0?e+65536:e)}function l(){return 65536*o()+o()}function c(e){r(e>>>16&65535),r(65535&e)}function d(){var e=l();return e>=2147483648?e-4294967296:e}function u(e){c(e<0?e+4294967296:e)}function h(){return l()/65536}function p(e){c(Math.round(65536*e))}function f(){return d()/65536}function m(e){u(Math.round(65536*e))}function g(e){return b(e,i)}function v(e){return String.fromCharCode.apply(String,g(e))}function _(e){for(var t=0;t<e.length;++t)n(e.charCodeAt(t))}function b(e,t){for(var i=Array(e),n=0;n<e;++n)i[n]=t();return i}var w,y,k,x,C,S=0,T=0;return null==e?e=Ee?new Uint8Array(256):[]:T=e.length,w=Ee?function(t){if(t>=e.length){var i=new Uint8Array(Math.max(t+256,2*e.length));i.set(e,0),e=i}}:function(){},y=Ee?function(){return new Uint8Array(e.buffer,0,T)}:function(){return e},k=Ee?function(t){if("string"==typeof t)return _(t);var i=t.length;w(S+i),e.set(t,S),S+=i,S>T&&(T=S)}:function(e){if("string"==typeof e)return _(e);for(var t=0;t<e.length;++t)n(e[t])},x=Ee?function(t,i){if(e.buffer.slice)return new Uint8Array(e.buffer.slice(t,t+i));var n=new Uint8Array(i);return n.set(new Uint8Array(e.buffer,t,i)),n}:function(t,i){return e.slice(t,t+i)},C={eof:t,readByte:i,writeByte:n,readShort:o,writeShort:r,readLong:l,writeLong:c,readFixed:h,writeFixed:p,readShort_:s,writeShort_:a,readLong_:d,writeLong_:u,readFixed_:f,writeFixed_:m,read:g,write:k,readString:v,writeString:_,times:b,get:y,slice:x,offset:function(e){return null!=e?(S=e,C):S},skip:function(e){S+=e},toString:function(){throw Error("FIX CALLER.  BinaryStream is no longer convertible to string!")},length:function(){return T},saveExcursion:function(e){var t=S;try{return e()}finally{S=t}},writeBase64:function(e){window.atob?_(window.atob(e)):k(Ie.decode(e))},base64:function(){return Ie.encode(y())}}}function i(e){for(var t,i,n=[],o=0,r=e.length;o<r;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<r?(i=e.charCodeAt(o++),56320==(64512&i)?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),o--)):n.push(t);return n}function n(e){return e.map(function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}).join("")}function o(e){var t,i=window.atob(e),n=new Uint8Array(i.length);for(t=0;t<i.length;t++)n[t]=i.charCodeAt(t);return n}function r(e){var t,i=new Uint8Array(e.length);for(t=0;t<e.length;t++)i[t]=e[t];return i}function s(e){return window.atob?o(e):r(Ie.decode(e))}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return Object.keys(e).sort(function(e,t){return e-t}).map(parseFloat)}function c(e){var t,i,n;for(this.raw=e,this.scalerType=e.readLong(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),t=this.tables={},i=0;i<this.tableCount;++i)n={tag:e.readString(4),checksum:e.readLong(),offset:e.readLong(),length:e.readLong()},t[n.tag]=n}function d(e){function t(e,t){this.definition=t,this.length=t.length,this.offset=t.offset,this.file=e,this.rawData=e.raw,this.parse(e.raw)}t.prototype.raw=function(){return this.rawData.slice(this.offset,this.length)};for(var i in e)a(e,i)&&(t[i]=t.prototype[i]=e[i]);return t}function u(){var e,t="",i=Ve+"";for(e=0;e<i.length;++e)t+=String.fromCharCode(i.charCodeAt(e)-48+65);return++Ve,t}function h(e){this.font=e,this.subset={},this.unicodes={},this.ogid2ngid={0:0},this.ngid2ogid={0:0},this.ncid2ogid={},this.next=this.firstChar=1,this.nextGid=1,this.psName=u()+"+"+this.font.psName}function p(e,i){var n,o,r,s,a=this,l=a.contents=t(e);if("ttcf"==l.readString(4)){if(o=function(){l.offset(n),a.parse()},!i)throw Error("Must specify a name for TTC files");for(l.readLong(),r=l.readLong(),s=0;s<r;++s)if(n=l.readLong(),l.saveExcursion(o),a.psName==i)return;throw Error("Font "+i+" not found in collection")}l.offset(0),a.parse()}function f(){function e(){var t,i,o,r=arguments;for(t=0;t<arguments.length;++t){if(i=r[t],void 0===i)throw Error("Cannot output undefined to PDF");if(i instanceof F)i.beforeRender(e),i.render(e);else if(Qe(i))D(i,e);else if(T(i))A(i,e);else if("number"==typeof i){if(isNaN(i))throw Error("Cannot output NaN to PDF");o=i.toFixed(7),o.indexOf(".")>=0&&(o=o.replace(/\.?0+$/,"")),"-0"==o&&(o="0"),n.writeString(o)}else/string|boolean/.test(typeof i)?n.writeString(i+""):"function"==typeof i.get?n.write(i.get()):"object"==typeof i&&(i?e(new tt(i)):n.writeString("null"))}}var i=0,n=t();return e.writeData=function(e){n.write(e)},e.withIndent=function(t){++i,t(e),--i},e.indent=function(){e(Ue,x("",2*i,"  ")),e.apply(null,arguments)},e.offset=function(){return n.offset()},e.toString=function(){throw Error("FIX CALLER")},e.get=function(){return n.get()},e.stream=function(){return n},e}function m(e,t){var i=e.beforeRender,n=e.render;e.beforeRender=function(){},e.render=function(e){e(t," 0 R")},e.renderFull=function(o){e._offset=o.offset(),o(t," 0 obj "),i.call(e,o),n.call(e,o),o(" endobj")}}function g(e){var t,i,n;if("function"!=typeof e&&(t=e,e=function(e,i){return e in t?t[e]:i}),i=e("paperSize",je.a4),!i)return{};if("string"==typeof i&&(i=je[i.toLowerCase()],null==i))throw Error("Unknown paper size");return i[0]=R(i[0]),i[1]=R(i[1]),e("landscape",!1)&&(i=[Math.max(i[0],i[1]),Math.min(i[0],i[1])]),n=e("margin"),n&&("string"==typeof n||"number"==typeof n?(n=R(n,0),n={left:n,top:n,right:n,bottom:n}):n={left:R(n.left,0),top:R(n.top,0),right:R(n.right,0),bottom:R(n.bottom,0)},e("addMargin")&&(i[0]+=n.left+n.right,i[1]+=n.top+n.bottom)),{paperSize:i,margin:n}}function v(e){function t(t,i){return e&&null!=e[t]?e[t]:i}var i,n,o,r,s=this,a=f(),l=0,c=[];s.getOption=t,s.attach=function(e){return c.indexOf(e)<0&&(m(e,++l),c.push(e)),e},s.pages=[],s.FONTS={},s.IMAGES={},s.GRAD_COL_FUNCTIONS={},s.GRAD_OPC_FUNCTIONS={},s.GRAD_COL={},s.GRAD_OPC={},i=s.attach(new nt),n=s.attach(new ot),t("autoPrint")&&(o={},o.JavaScript=new tt({Names:[new Xe("JS"),s.attach(new tt({S:z("JavaScript"),JS:new Xe("print(true);")}))]}),i.props.Names=new tt(o)),i.setPages(n),r=s.attach(new tt({Producer:new Xe(t("producer","Kendo UI PDF Generator")),Title:new Xe(t("title","")),Author:new Xe(t("author","")),Subject:new Xe(t("subject","")),Keywords:new Xe(t("keywords","")),Creator:new Xe(t("creator","Kendo UI PDF Generator")),CreationDate:t("date",new Date)
})),s.addPage=function(e){var t,i,o,r=g(function(t,i){return e&&null!=e[t]?e[t]:i}),a=r.paperSize,l=r.margin,c=a[0],d=a[1];return l&&(c-=l.left+l.right,d-=l.top+l.bottom),t=new it(f(),null,(!0)),i={Contents:s.attach(t),Parent:n,MediaBox:[0,0,a[0],a[1]]},o=new ct(s,i),o._content=t,n.addPage(s.attach(o)),o.transform(1,0,0,-1,0,a[1]),l&&(o.translate(l.left,l.top),o.rect(0,0,c,d),o.clip()),s.pages.push(o),o},s.render=function(){var e,t;for(a("%PDF-1.4",Ue,"%ÂÁÚÏÎ",Ue,Ue),e=0;e<c.length;++e)c[e].renderFull(a),a(Ue,Ue);for(t=a.offset(),a("xref",Ue,0," ",c.length+1,Ue),a("0000000000 65535 f ",Ue),e=0;e<c.length;++e)a(C(c[e]._offset,10)," 00000 n ",Ue);return a(Ue),a("trailer",Ue),a(new tt({Size:c.length+1,Root:i,Info:r}),Ue,Ue),a("startxref",Ue,t,Ue),a("%%EOF",Ue),a.stream().offset(0)}}function _(e,t){function i(){window.console&&(window.console.error?window.console.error("Cannot load URL: %s",e):window.console.log("Cannot load URL: %s",e)),t(null)}var n,o;return We.msie&&(n=/^data:.*?;base64,/i.exec(e))?void t(s(e.substr(n[0].length))):(o=new XMLHttpRequest,o.open("GET",e,!0),Ee&&(o.responseType="arraybuffer"),o.onload=function(){200==o.status||304==o.status?t(Ee?new Uint8Array(o.response):new window.VBArray(o.responseBody).toArray()):i()},o.onerror=i,void o.send(null))}function b(e,t){var i=Ge[e];i?t(i):_(e,function(i){if(null==i)throw Error("Cannot load font from "+e);var n=new p(i);Ge[e]=n,t(n)})}function w(){$e={}}function y(e,i,n){function o(e){u.src=e,u.complete&&!We.msie?a():(u.onload=a,u.onerror=s)}function r(){var o,r,a,c,d,h,p,f,m,g,v;i||(i={width:u.width,height:u.height}),o=document.createElement("canvas"),o.width=i.width,o.height=i.height,r=o.getContext("2d"),r.drawImage(u,0,0,i.width,i.height);try{a=r.getImageData(0,0,i.width,i.height)}catch(_){return void s()}finally{l&&URL.revokeObjectURL(l)}for(c=!1,d=t(),h=t(),p=a.data,f=0;f<p.length;)d.writeByte(p[f++]),d.writeByte(p[f++]),d.writeByte(p[f++]),m=p[f++],m<255&&(c=!0),h.writeByte(m);c?u=new L(i.width,i.height,d,h):(g=o.toDataURL("image/jpeg"),g=g.substr(g.indexOf(";base64,")+8),v=t(),v.writeBase64(g),u=new B(v)),n($e[e]=u)}function s(){n($e[e]="ERROR")}function a(){if(i&&(i.width>=u.width||i.height>=u.height)&&(i=null),!i&&c&&/^image\/jpe?g$/i.test(c.type)){var o=new FileReader;o.onload=function(){try{var i=new B(t(new Uint8Array(this.result)));URL.revokeObjectURL(l),n($e[e]=i)}catch(o){r()}},o.readAsArrayBuffer(c)}else r()}var l,c,d,u=$e[e];u?n(u):(u=new Image,/^data:/i.test(e)||(u.crossOrigin="Anonymous"),Ee&&!/^data:/i.test(e)?(d=new XMLHttpRequest,d.onload=function(){c=d.response,l=URL.createObjectURL(c),o(l)},d.onerror=s,d.open("GET",e,!0),d.responseType="blob",d.send()):o(e))}function k(e){return function(t,i){function n(){0===--o&&i()}var o=t.length,r=o;if(0===o)return i();for(;r-- >0;)e(t[r],n)}}function x(e,t,i){for(;e.length<t;)e=i+e;return e}function C(e,t){return x(e+"",t,"0")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function T(e){return e instanceof Date}function D(e,t){t("["),e.length>0&&t.withIndent(function(){for(var i=0;i<e.length;++i)i>0&&i%8===0?t.indent(e[i]):t(" ",e[i])}),t(" ]")}function A(e,t){t("(D:",C(e.getUTCFullYear(),4),C(e.getUTCMonth()+1,2),C(e.getUTCDate(),2),C(e.getUTCHours(),2),C(e.getUTCMinutes(),2),C(e.getUTCSeconds(),2),"Z)")}function E(e){return e*(72/25.4)}function I(e){return E(10*e)}function M(e){return 72*e}function R(e,t){var i,n;if("number"==typeof e)return e;if("string"==typeof e&&(i=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(e),i&&(n=parseFloat(i[1]),!isNaN(n))))return"pt"==i[2]?n:{mm:E,cm:I,"in":M}[i[2]](n);if(null!=t)return t;throw Error("Can't parse unit: "+e)}function F(){}function P(e,t,i){i||(i=F),e.prototype=new i;for(var n in t)S(t,n)&&(e.prototype[n]=t[n]);return e}function z(e){return S(et,e)?et[e]:et[e]=new Je(e)}function B(e){var t,i,n,o,r,s,a,l,c;if(e.offset(0),r=e.readShort(),65496!=r)throw Error("Invalid JPEG image");for(;!e.eof();){if(s=e.readByte(),255!=s)throw Error("Invalid JPEG image");if(a=e.readByte(),l=e.readShort(),rt.indexOf(a)>=0){o=e.readByte(),i=e.readShort(),t=e.readShort(),n=e.readByte();break}e.skip(l-2)}if(null==n)throw Error("Invalid JPEG image");switch(c={Type:z("XObject"),Subtype:z("Image"),Width:t,Height:i,BitsPerComponent:o,Filter:z("DCTDecode")},n){case 1:c.ColorSpace=z("DeviceGray");break;case 3:c.ColorSpace=z("DeviceRGB");break;case 4:c.ColorSpace=z("DeviceCMYK"),c.Decode=[1,0,1,0,1,0,1,0]}this.asStream=function(){e.offset(0);var t=new it(e,c);return t._resourceName=z("I"+ ++qe),t}}function L(e,t,i,n){this.asStream=function(o){var r=new it(n,{Type:z("XObject"),Subtype:z("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:z("DeviceGray")},(!0)),s=new it(i,{Type:z("XObject"),Subtype:z("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:z("DeviceRGB"),SMask:o.attach(r)},(!0));return s._resourceName=z("I"+ ++qe),s}}function H(e){return e.map(function(e){return Qe(e)?H(e):"number"==typeof e?(Math.round(1e3*e)/1e3).toFixed(3):e}).join(" ")}function N(e,t,i,n,o,r,s){var a=H([t,i,n,o,r,s]),l=e.GRAD_COL_FUNCTIONS[a];return l||(l=e.GRAD_COL_FUNCTIONS[a]=e.attach(new tt({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,i,n],C1:[o,r,s]}))),l}function O(e,t,i){var n=H([t,i]),o=e.GRAD_OPC_FUNCTIONS[n];return o||(o=e.GRAD_OPC_FUNCTIONS[n]=e.attach(new tt({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[i]}))),o}function V(e,t){function i(e){return 1==e.length?e[0]:{FunctionType:3,Functions:e,Domain:[0,1],Bounds:u,Encode:h}}var n,o,r,s,a,l=!1,c=[],d=[],u=[],h=[];for(n=1;n<t.length;++n)o=t[n-1],r=t[n],s=o.color,a=r.color,d.push(N(e,s.r,s.g,s.b,a.r,a.g,a.b)),(s.a<1||a.a<1)&&(l=!0),u.push(r.offset),h.push(0,1);if(l)for(n=1;n<t.length;++n)o=t[n-1],r=t[n],s=o.color,a=r.color,c.push(O(e,s.a,a.a));return u.pop(),{hasAlpha:l,colors:i(d),opacities:l?i(c):null}}function W(e,t,i,n,o,r){var s,a,l;return r||(l=[t].concat(n),i.forEach(function(e){l.push(e.offset,e.color.r,e.color.g,e.color.b)}),a=H(l),s=e.GRAD_COL[a]),s||(s=new tt({Type:z("Shading"),ShadingType:t?3:2,ColorSpace:z("DeviceRGB"),Coords:n,Domain:[0,1],Function:o,Extend:[!0,!0]}),e.attach(s),s._resourceName="S"+ ++qe,a&&(e.GRAD_COL[a]=s)),s}function U(e,t,i,n,o,r){var s,a,l;return r||(l=[t].concat(n),i.forEach(function(e){l.push(e.offset,e.color.a)}),a=H(l),s=e.GRAD_OPC[a]),s||(s=new tt({Type:z("ExtGState"),AIS:!1,CA:1,ca:1,SMask:{Type:z("Mask"),S:z("Luminosity"),G:e.attach(new it("/a0 gs /s0 sh",{Type:z("XObject"),Subtype:z("Form"),FormType:1,BBox:r?[r.left,r.top+r.height,r.left+r.width,r.top]:[0,1,1,0],Group:{Type:z("Group"),S:z("Transparency"),CS:z("DeviceGray"),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:z("DeviceGray"),Coords:n,Domain:[0,1],ShadingType:t?3:2,Function:o,Extend:[!0,!0]}}}}))}}),e.attach(s),s._resourceName="O"+ ++qe,a&&(e.GRAD_OPC[a]=s)),s}function q(e,t,i){var n="radial"==t.type,o=V(e,t.stops),r=n?[t.start.x,t.start.y,t.start.r,t.end.x,t.end.y,t.end.r]:[t.start.x,t.start.y,t.end.x,t.end.y],s=W(e,n,t.stops,r,o.colors,t.userSpace&&i),a=o.hasAlpha?U(e,n,t.stops,r,o.opacities,t.userSpace&&i):null;return{hasAlpha:o.hasAlpha,shading:s,opacity:a}}function j(e){return e.replace(/^\s*(['"])(.*)\1\s*$/,"$2")}function G(e){var t,i=/^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,n=i.exec(e);return n?(t=n[8]?parseInt(n[8],10):12,{italic:n[2]&&"italic"==n[2].toLowerCase(),variant:n[4],bold:n[6]&&/bold|700/i.test(n[6]),fontSize:t,lineHeight:n[12]?"normal"==n[12]?t:parseInt(n[12],10):null,fontFamily:n[14].split(/\s*,\s*/g).map(j)}):{fontSize:12,fontFamily:"sans-serif"}}function $(e){function t(t){return e.bold&&(t+="|bold"),e.italic&&(t+="|italic"),t.toLowerCase()}var i,n,o,r=e.fontFamily;if(r instanceof Array)for(o=0;o<r.length&&(i=t(r[o]),!(n=dt[i]));++o);else n=dt[r.toLowerCase()];for(;"function"==typeof n;)n=n();return n||(n="Times-Roman"),n}function K(e,t){e=e.toLowerCase(),dt[e]=function(){return dt[t]},dt[e+"|bold"]=function(){return dt[t+"|bold"]},dt[e+"|italic"]=function(){return dt[t+"|italic"]},dt[e+"|bold|italic"]=function(){return dt[t+"|bold|italic"]}}function Y(e,t){if(1==arguments.length)for(var i in e)S(e,i)&&Y(i,e[i]);else switch(e=e.toLowerCase(),dt[e]=t,e){case"dejavu sans":dt["sans-serif"]=t;break;case"dejavu sans|bold":dt["sans-serif|bold"]=t;break;case"dejavu sans|italic":dt["sans-serif|italic"]=t;break;case"dejavu sans|bold|italic":dt["sans-serif|bold|italic"]=t;break;case"dejavu serif":dt.serif=t;break;case"dejavu serif|bold":dt["serif|bold"]=t;break;case"dejavu serif|italic":dt["serif|italic"]=t;break;case"dejavu serif|bold|italic":dt["serif|bold|italic"]=t;break;case"dejavu mono":dt.monospace=t;break;case"dejavu mono|bold":dt["monospace|bold"]=t;break;case"dejavu mono|italic":dt["monospace|italic"]=t;break;case"dejavu mono|bold|italic":dt["monospace|bold|italic"]=t}}function Q(e,t){var i=e[0],n=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=t[0],c=t[1],d=t[2],u=t[3],h=t[4],p=t[5];return[i*l+n*d,i*c+n*u,o*l+r*d,o*c+r*u,s*l+a*d+h,s*c+a*u+p]}function X(e){return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}function Z(e,t){function i(e,t,i){return i||(i=a),i.pdf&&null!=i.pdf[e]?i.pdf[e]:t}function n(){function n(e){var t,n,o,s,a,l=e.options,c=ye(e),d=c.bbox;e=c.root,t=i("paperSize",i("paperSize","auto"),l),n=!1,"auto"==t&&(d?(o=d.getSize(),t=[o.width,o.height],n=!0,s=d.getOrigin(),c=new Te.Group,c.transform(new Ae.Matrix(1,0,0,1,(-s.x),(-s.y))),c.append(e),e=c):t="A4"),a=r.addPage({paperSize:t,margin:i("margin",i("margin"),l),addMargin:n,landscape:i("landscape",i("landscape",!1),l)}),ne(e,a,r)}if(!(--o>0)){var r=new v({producer:i("producer"),title:i("title"),author:i("author"),subject:i("subject"),keywords:i("keywords"),creator:i("creator"),date:i("date"),autoPrint:i("autoPrint")});l?e.children.forEach(n):n(e),t(r.render(),r)}}var o,r=[],s={},a=e.options,l=i("multiPage"),c=i("imgDPI");c&&w(),e.traverse(function(e){ie({Image:function(e){var t,i,n=e.src();c?(t=e.bbox().size,i=s[n],t={width:Math.ceil(t.width*c/72),height:Math.ceil(t.height*c/72)},i&&(t.width=Math.max(i.width,t.width),t.height=Math.max(i.height,t.height)),s[n]=t):s[n]=null},Text:function(e){var t=G(e.options.font),i=$(t);r.indexOf(i)<0&&r.push(i)}},e)}),o=2,Ke(r,n),Ye(s,n)}function J(e,t){Z(e,function(e){t("data:application/pdf;base64,"+e.base64())})}function ee(e,t){Z(e,function(e){t(new window.Blob([e.get()],{type:"application/pdf"}))})}function te(t,i,n,o){window.Blob&&!Ce.safari?ee(t,function(t){e.saveAs({dataURI:t,fileName:i}),o&&o(t)}):J(t,function(t){e.saveAs({dataURI:t,fileName:i,proxyURL:n}),o&&o(t)})}function ie(e,t){var i=e[t.nodeType];return i?i.call.apply(i,arguments):t}function ne(e,t,i){var n,o,r;e.options._pdfDebug&&t.comment("BEGIN: "+e.options._pdfDebug),n=e.transform(),o=e.opacity(),t.save(),null!=o&&o<1&&t.setOpacity(o),oe(e,t,i),re(e,t,i),n&&(r=n.matrix(),t.transform(r.a,r.b,r.c,r.d,r.e,r.f)),se(e,t,i),ie({Path:he,MultiPath:pe,Circle:fe,Arc:me,Text:ge,Image:_e,Group:ve,Rect:be},e,t,i),t.restore(),e.options._pdfDebug&&t.comment("END: "+e.options._pdfDebug)}function oe(e,t){var i,n,o,r,s,a,l=e.stroke&&e.stroke();if(l){if(i=l.color){if(i=we(i),null==i)return;t.setStrokeColor(i.r,i.g,i.b),1!=i.a&&t.setStrokeOpacity(i.a)}if(n=l.width,null!=n){if(0===n)return;t.setLineWidth(n)}o=l.dashType,o&&t.setDashPattern(pt[o],0),r=l.lineCap,r&&t.setLineCap(ft[r]),s=l.lineJoin,s&&t.setLineJoin(mt[s]),a=l.opacity,null!=a&&t.setStrokeOpacity(a)}}function re(e,t){var i,n,o=e.fill&&e.fill();if(o&&!(o instanceof Te.Gradient)){if(i=o.color){if(i=we(i),null==i)return;t.setFillColor(i.r,i.g,i.b),1!=i.a&&t.setFillOpacity(i.a)}n=o.opacity,null!=n&&t.setFillOpacity(n)}}function se(e,t,i){var n=e.clip();n&&(ue(n,t,i),t.clip())}function ae(e){return e&&(e instanceof Te.Gradient||e.color&&!/^(none|transparent)$/i.test(e.color)&&(null==e.width||e.width>0)&&(null==e.opacity||e.opacity>0))}function le(e,t,i,n){var o,r,s,a,l,c,d,u,h=e.fill();if(h instanceof Te.Gradient)return n?t.clipStroke():t.clip(),o=h instanceof Te.RadialGradient,o?(r={x:h.center().x,y:h.center().y,r:0},s={x:h.center().x,y:h.center().y,r:h.radius()}):(r={x:h.start().x,y:h.start().y},s={x:h.end().x,y:h.end().y}),a=h.stops.elements().map(function(e){var t,i=e.offset();return i=/%$/.test(i)?parseFloat(i)/100:parseFloat(i),t=we(e.color()),t.a*=e.opacity(),{offset:i,color:t}}),a.unshift(a[0]),a.push(a[a.length-1]),l={userSpace:h.userSpace(),type:o?"radial":"linear",start:r,end:s,stops:a},c=e.rawBBox(),d=c.topLeft(),u=c.getSize(),c={left:d.x,top:d.y,width:u.width,height:u.height},t.gradient(l,c),!0}function ce(e,t,i){ae(e.fill())&&ae(e.stroke())?le(e,t,i,!0)||t.fillStroke():ae(e.fill())?le(e,t,i,!1)||t.fill():ae(e.stroke())?t.stroke():t.nop()}function de(e,t){var i,n,o,r=e.segments;if(4==r.length&&e.options.closed){for(i=[],n=0;n<r.length;++n){if(r[n].controlIn())return!1;i[n]=r[n].anchor()}if(o=i[0].y==i[1].y&&i[1].x==i[2].x&&i[2].y==i[3].y&&i[3].x==i[0].x||i[0].x==i[1].x&&i[1].y==i[2].y&&i[2].x==i[3].x&&i[3].y==i[0].y)return t.rect(i[0].x,i[0].y,i[2].x-i[0].x,i[2].y-i[0].y),!0}}function ue(e,t,i){var n,o,r,s,a,l,c=e.segments;if(0!==c.length&&!de(e,t,i)){for(o=0;o<c.length;++o)r=c[o],s=r.anchor(),n?(a=n.controlOut(),l=r.controlIn(),a&&l?t.bezier(a.x,a.y,l.x,l.y,s.x,s.y):t.lineTo(s.x,s.y)):t.moveTo(s.x,s.y),n=r;e.options.closed&&t.close()}}function he(e,t,i){ue(e,t,i),ce(e,t,i)}function pe(e,t,i){var n,o=e.paths;for(n=0;n<o.length;++n)ue(o[n],t,i);ce(e,t,i)}function fe(e,t,i){var n=e.geometry();t.circle(n.center.x,n.center.y,n.radius),ce(e,t,i)}function me(e,t,i){var n,o=e.geometry().curvePoints();for(t.moveTo(o[0].x,o[0].y),n=1;n<o.length;)t.bezier(o[n].x,o[n++].y,o[n].x,o[n++].y,o[n].x,o[n++].y);ce(e,t,i)}function ge(e,t){var i,n=G(e.options.font),o=e._position;e.fill()&&e.stroke()?i=ht.fillAndStroke:e.fill()?i=ht.fill:e.stroke()&&(i=ht.stroke),t.transform(1,0,0,-1,o.x,o.y+n.fontSize),t.beginText(),t.setFont($(n),n.fontSize),t.setTextRenderingMode(i),t.showText(e.content(),e._pdfRect?e._pdfRect.width():null),t.endText()}function ve(e,t,i){var n,o;for(e._pdfLink&&t.addLink(e._pdfLink.url,e._pdfLink),n=e.children,o=0;o<n.length;++o)ne(n[o],t,i)}function _e(e,t){var i,n,o,r=e.src();r&&(i=e.rect(),n=i.getOrigin(),o=i.getSize(),t.transform(o.width,0,0,-o.height,n.x,n.y+o.height),t.drawImage(r))}function be(e,t,i){var n=e.geometry();t.rect(n.origin.x,n.origin.y,n.size.width,n.size.height),ce(e,t,i)}function we(t){var i=e.parseColor(t,!0);return i?i.toRGB():null}function ye(e){function t(e){return a=!0,e}function i(e){return e.visible()&&e.opacity()>0&&(ae(e.fill())||ae(e.stroke()))}function n(e){var t,i,n=[];for(t=0;t<e.length;++t)i=s(e[t]),null!=i&&n.push(i);return n}function o(e,t){var i,n=l,o=c;e.transform()&&(c=c.multiplyCopy(e.transform().matrix())),i=e.clip(),i&&(i=i.bbox(),i&&(i=i.bbox(c),l=l?Ae.Rect.intersect(l,i):i));try{return t()}finally{l=n,c=o}}function r(e){if(null==l)return!1;var t=e.rawBBox().bbox(c);return l&&t&&(t=Ae.Rect.intersect(t,l)),t}function s(s){return o(s,function(){if(!(s instanceof Te.Group||s instanceof Te.MultiPath)){var o=r(s);if(!o)return t(null);d=d?Ae.Rect.union(d,o):o}return ie({Path:function(e){return 0!==e.segments.length&&i(e)?e:t(null)},MultiPath:function(e){if(!i(e))return t(null);var o=new Te.MultiPath(e.options);return o.paths=n(e.paths),0===o.paths.length?t(null):o},Circle:function(e){return i(e)?e:t(null)},Arc:function(e){return i(e)?e:t(null)},Text:function(e){return/\S/.test(e.content())&&i(e)?e:t(null)},Image:function(e){return e.visible()&&e.opacity()>0?e:t(null)},Group:function(i){var o=new Te.Group(i.options);return o.children=n(i.children),o._pdfLink=i._pdfLink,i===e||0!==o.children.length||i._pdfLink?o:t(null)},Rect:function(e){return i(e)?e:t(null)}},s)})}var a,l=!1,c=Ae.Matrix.unit(),d=null;do a=!1,e=s(e);while(e&&a);return{root:e,bbox:d}}function ke(e,t){var i,n=De.createPromise();for(i in t)"margin"==i&&e.options.pdf&&e.options.pdf._ignoreMargin||e.options.set("pdf."+i,t[i]);return J(e,n.resolve),n}var xe,Ce,Se,Te,De,Ae,Ee,Ie,Me,Re,Fe,Pe,ze,Be,Le,He,Ne,Oe,Ve,We,Ue,qe,je,Ge,$e,Ke,Ye,Qe,Xe,Ze,Je,et,tt,it,nt,ot,rt,st,at,lt,ct,dt,ut,ht,pt,ft,mt;window.kendo.pdf=window.kendo.pdf||{},xe=e.support,Ce=xe.browser,Se=e.pdf,Te=e.drawing,De=Te.util,Ae=e.geometry,Ee="undefined"!=typeof Uint8Array&&e.support.browser&&(!e.support.browser.msie||e.support.browser.version>9),Ie=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var i,n,o,r,s,a,l,c=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),d=0,u=c.length,h=[];d<u;)i=e.indexOf(c.charAt(d++)),n=e.indexOf(c.charAt(d++)),o=e.indexOf(c.charAt(d++)),r=e.indexOf(c.charAt(d++)),s=i<<2|n>>>4,a=(15&n)<<4|o>>>2,l=(3&o)<<6|r,h.push(s),64!=o&&h.push(a),64!=r&&h.push(l);return h},encode:function(t){for(var i,n,o,r,s,a,l,c=0,d=t.length,u="";c<d;)i=t[c++],n=t[c++],o=t[c++],r=i>>>2,s=(3&i)<<4|n>>>4,a=(15&n)<<2|o>>>6,l=63&o,c-d==2?a=l=64:c-d==1&&(l=64),u+=e.charAt(r)+e.charAt(s)+e.charAt(a)+e.charAt(l);return u}}}(),c.prototype={readTable:function(e,t){var i=this.tables[e];if(!i)throw Error("Table "+e+" not found in directory");return this[e]=i.table=new t(this,i)},render:function(e){var i,n,o,r,s,l,c,d,u=this,h=Object.keys(e).length,p=Math.pow(2,Math.floor(Math.log(h)/Math.LN2)),f=16*p,m=Math.floor(Math.log(p)/Math.LN2),g=16*h-f,v=t();v.writeLong(this.scalerType),v.writeShort(h),v.writeShort(f),v.writeShort(m),v.writeShort(g),i=16*h,n=v.offset()+i,o=null,r=t();for(s in e)if(a(e,s))for(l=e[s],v.writeString(s),v.writeLong(u.checksum(l)),v.writeLong(n),v.writeLong(l.length),r.write(l),"head"==s&&(o=n),n+=l.length;n%4;)r.writeByte(0),n++;return v.write(r.get()),c=this.checksum(v.get()),d=2981146554-c,v.offset(o+8),v.writeLong(d),v.get()},checksum:function(e){e=t(e);for(var i=0;!e.eof();)i+=e.readLong();return 4294967295&i}},Me=d({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.revision=e.readLong(),this.checkSumAdjustment=e.readLong(),this.magicNumber=e.readLong(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.read(8),this.modified=e.read(8),this.xMin=e.readShort_(),this.yMin=e.readShort_(),this.xMax=e.readShort_(),this.yMax=e.readShort_(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort_(),this.indexToLocFormat=e.readShort_(),this.glyphDataFormat=e.readShort_()},render:function(e){var i=t();return i.writeLong(this.version),i.writeLong(this.revision),i.writeLong(0),i.writeLong(this.magicNumber),i.writeShort(this.flags),i.writeShort(this.unitsPerEm),i.write(this.created),i.write(this.modified),i.writeShort_(this.xMin),i.writeShort_(this.yMin),i.writeShort_(this.xMax),i.writeShort_(this.yMax),i.writeShort(this.macStyle),i.writeShort(this.lowestRecPPEM),i.writeShort_(this.fontDirectionHint),i.writeShort_(e),i.writeShort_(this.glyphDataFormat),i.get()}}),Re=d({parse:function(e){e.offset(this.offset);var t=this.file.head.indexToLocFormat;this.offsets=0===t?e.times(this.length/2,function(){return 2*e.readShort()}):e.times(this.length/4,e.readLong)},offsetOf:function(e){return this.offsets[e]},lengthOf:function(e){return this.offsets[e+1]-this.offsets[e]},render:function(e){var i,n=t(),o=e[e.length-1]>65535;for(i=0;i<e.length;++i)o?n.writeLong(e[i]):n.writeShort(e[i]/2);return{format:o?1:0,table:n.get()}}}),Fe=d({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort_(),this.minRightSideBearing=e.readShort_(),this.xMaxExtent=e.readShort_(),this.caretSlopeRise=e.readShort_(),this.caretSlopeRun=e.readShort_(),this.caretOffset=e.readShort_(),e.skip(8),this.metricDataFormat=e.readShort_(),this.numOfLongHorMetrics=e.readShort()},render:function(e){var i=t();return i.writeLong(this.version),i.writeShort_(this.ascent),i.writeShort_(this.descent),i.writeShort_(this.lineGap),i.writeShort(this.advanceWidthMax),i.writeShort_(this.minLeftSideBearing),i.writeShort_(this.minRightSideBearing),i.writeShort_(this.xMaxExtent),i.writeShort_(this.caretSlopeRise),i.writeShort_(this.caretSlopeRun),i.writeShort_(this.caretOffset),i.write([0,0,0,0,0,0,0,0]),i.writeShort_(this.metricDataFormat),i.writeShort(e.length),i.get()}}),Pe=d({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.numGlyphs=e.readShort(),this.maxPoints=e.readShort(),this.maxContours=e.readShort(),this.maxComponentPoints=e.readShort(),this.maxComponentContours=e.readShort(),this.maxZones=e.readShort(),this.maxTwilightPoints=e.readShort(),this.maxStorage=e.readShort(),this.maxFunctionDefs=e.readShort(),this.maxInstructionDefs=e.readShort(),this.maxStackElements=e.readShort(),this.maxSizeOfInstructions=e.readShort(),this.maxComponentElements=e.readShort(),this.maxComponentDepth=e.readShort()},render:function(e){var i=t();return i.writeLong(this.version),i.writeShort(e.length),i.writeShort(this.maxPoints),i.writeShort(this.maxContours),i.writeShort(this.maxComponentPoints),i.writeShort(this.maxComponentContours),i.writeShort(this.maxZones),i.writeShort(this.maxTwilightPoints),i.writeShort(this.maxStorage),i.writeShort(this.maxFunctionDefs),i.writeShort(this.maxInstructionDefs),i.writeShort(this.maxStackElements),i.writeShort(this.maxSizeOfInstructions),i.writeShort(this.maxComponentElements),i.writeShort(this.maxComponentDepth),i.get()}}),ze=d({parse:function(e){var t,i,n;e.offset(this.offset),t=this.file,i=t.hhea,this.metrics=e.times(i.numOfLongHorMetrics,function(){return{advance:e.readShort(),lsb:e.readShort_()}}),n=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics,this.leftSideBearings=e.times(n,e.readShort_)},forGlyph:function(e){var t=this.metrics,i=t.length;return e<i?t[e]:{advance:t[i-1].advance,lsb:this.leftSideBearings[e-i]}},render:function(e){var i,n,o=this,r=t();for(i=0;i<e.length;++i)n=o.forGlyph(e[i]),r.writeShort(n.advance),r.writeShort_(n.lsb);return r.get()}}),Be=function(){function e(e){this.raw=e}function i(e){var t,i,a;for(this.raw=e,t=this.glyphIds=[],i=this.idOffsets=[];;){if(a=e.readShort(),i.push(e.offset()),t.push(e.readShort()),!(a&r))break;e.skip(a&n?4:2),a&l?e.skip(8):a&s?e.skip(4):a&o&&e.skip(2)}}var n,o,r,s,l;return e.prototype={compound:!1,render:function(){return this.raw.get()}},n=1,o=8,r=32,s=64,l=128,i.prototype={compound:!0,render:function(e){var i,n,o=this,r=t(this.raw.get());for(i=0;i<this.glyphIds.length;++i)n=o.glyphIds[i],r.offset(o.idOffsets[i]),r.writeShort(e[n]);return r.get()}},d({parse:function(){this.cache={}},glyphFor:function(n){var o,r,s,l,c,d,u,h,p,f,m,g=this.cache;return a(g,n)?g[n]:(o=this.file.loca,r=o.lengthOf(n),0===r?g[n]=null:(s=this.rawData,l=this.offset+o.offsetOf(n),c=t(s.slice(l,r)),d=c.readShort_(),u=c.readShort_(),h=c.readShort_(),p=c.readShort_(),f=c.readShort_(),m=g[n]=d==-1?new i(c):new e(c),m.numberOfContours=d,m.xMin=u,m.yMin=h,m.xMax=p,m.yMax=f,m))},render:function(e,i,n){var o,r,s,a=t(),l=[];for(o=0;o<i.length;++o)r=i[o],s=e[r],l.push(a.offset()),s&&a.write(s.render(n));return l.push(a.offset()),{table:a.get(),offsets:l}}})}(),Le=function(){function e(e,t){this.text=e,this.length=e.length,this.platformID=t.platformID,this.platformSpecificID=t.platformSpecificID,this.languageID=t.languageID,this.nameID=t.nameID}return d({parse:function(t){var i,n,o,r,s,a,l;for(t.offset(this.offset),t.readShort(),i=t.readShort(),n=this.offset+t.readShort(),o=t.times(i,function(){return{platformID:t.readShort(),platformSpecificID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:t.readShort()+n}}),r=this.strings={},s=0;s<o.length;++s)a=o[s],t.offset(a.offset),l=t.readString(a.length),r[a.nameID]||(r[a.nameID]=[]),r[a.nameID].push(new e(l,a));this.postscriptEntry=r[6][0],this.postscriptName=this.postscriptEntry.text.replace(/[^\x20-\x7F]/g,"")},render:function(i){var n,o,r,s,l,c,d=this,u=this.strings,h=0;for(n in u)a(u,n)&&(h+=u[n].length);o=t(),r=t(),o.writeShort(0),o.writeShort(h),o.writeShort(6+12*h);for(n in u)if(a(u,n))for(s=6==n?[new e(i,d.postscriptEntry)]:u[n],l=0;l<s.length;++l)c=s[l],o.writeShort(c.platformID),o.writeShort(c.platformSpecificID),o.writeShort(c.languageID),o.writeShort(c.nameID),o.writeShort(c.length),o.writeShort(r.offset()),r.writeString(c.text);return o.write(r.get()),o.get()}})}(),He=function(){var e=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g);return d({parse:function(e){var t,i,n=this;switch(e.offset(this.offset),this.format=e.readLong(),this.italicAngle=e.readFixed_(),this.underlinePosition=e.readShort_(),this.underlineThickness=e.readShort_(),this.isFixedPitch=e.readLong(),this.minMemType42=e.readLong(),this.maxMemType42=e.readLong(),this.minMemType1=e.readLong(),this.maxMemType1=e.readLong(),this.format){case 65536:case 196608:break;case 131072:for(t=e.readShort(),this.glyphNameIndex=e.times(t,e.readShort),this.names=[],i=this.offset+this.length;e.offset()<i;)n.names.push(e.readString(e.readByte()));break;case 151552:t=e.readShort(),this.offsets=e.read(t);break;case 262144:this.map=e.times(this.file.maxp.numGlyphs,e.readShort)}},glyphFor:function(t){switch(this.format){case 65536:return e[t]||".notdef";case 131072:var i=this.glyphNameIndex[t];return i<e.length?e[i]:this.names[i-e.length]||".notdef";case 151552:case 196608:return".notdef";case 262144:return this.map[t]||65535}},render:function(i){var n,o,r,s,a,l,c,d=this;if(196608==this.format)return this.raw();for(n=t(this.rawData.slice(this.offset,32)),n.writeLong(131072),n.offset(32),o=[],r=[],s=0;s<i.length;++s)a=i[s],l=d.glyphFor(a),c=e.indexOf(l),c>=0?o.push(c):(o.push(e.length+r.length),r.push(l));for(n.writeShort(i.length),s=0;s<o.length;++s)n.writeShort(o[s]);for(s=0;s<r.length;++s)n.writeByte(r[s].length),n.writeString(r[s]);return n.get()}})}(),Ne=function(){function e(e,t,i){var n=this;n.platformID=e.readShort(),n.platformSpecificID=e.readShort(),n.offset=t+e.readLong(),e.saveExcursion(function(){var t,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b;switch(e.offset(n.offset),n.format=e.readShort()){case 0:for(n.length=e.readShort(),n.language=e.readShort(),o=0;o<256;++o)i[o]=e.readByte();break;case 4:for(n.length=e.readShort(),n.language=e.readShort(),r=e.readShort()/2,e.skip(6),s=e.times(r,e.readShort),e.skip(2),a=e.times(r,e.readShort),l=e.times(r,e.readShort_),c=e.times(r,e.readShort),d=(n.length+n.offset-e.offset())/2,u=e.times(d,e.readShort),o=0;o<r;++o)for(h=a[o],p=s[o],t=h;t<=p;++t)0===c[o]?f=t+l[o]:(m=c[o]/2-(r-o)+(t-h),f=u[m]||0,0!==f&&(f+=l[o])),i[t]=65535&f;break;case 6:for(n.length=e.readShort(),n.language=e.readShort(),t=e.readShort(),g=e.readShort();g-- >0;)i[t++]=e.readShort();break;case 12:for(e.readShort(),n.length=e.readLong(),n.language=e.readLong(),v=e.readLong();v-- >0;)for(t=e.readLong(),_=e.readLong(),b=e.readLong();t<=_;)i[t++]=b++;break;default:window.console&&window.console.error("Unhandled CMAP format: "+n.format)}})}function i(e,i){function n(t){return i[e[t]]}var o,r,s,a,c,d,u,h,p,f,m,g,v,_,b,w,y,k=l(e),x=[],C=[],S=null,T=null;for(o=0;o<k.length;++o)r=k[o],s=n(r),a=s-r,null!=S&&a===T||(S&&C.push(S),x.push(r),T=a),S=r;for(S&&C.push(S),C.push(65535),x.push(65535),c=x.length,d=2*c,u=2*Math.pow(2,Math.floor(Math.log(c)/Math.LN2)),h=Math.log(u/2)/Math.LN2,p=d-u,f=[],m=[],g=[],o=0;o<c;++o){if(v=x[o],_=C[o],65535==v){f.push(0),m.push(0);break}if(b=n(v),v-b>=32768)for(f.push(0),m.push(2*(g.length+c-o)),w=v;w<=_;++w)g.push(n(w));else f.push(b-v),m.push(0)}return y=t(),y.writeShort(3),y.writeShort(1),y.writeLong(12),y.writeShort(4),y.writeShort(16+8*c+2*g.length),y.writeShort(0),y.writeShort(d),y.writeShort(u),y.writeShort(h),y.writeShort(p),C.forEach(y.writeShort),y.writeShort(0),x.forEach(y.writeShort),f.forEach(y.writeShort_),m.forEach(y.writeShort),g.forEach(y.writeShort),y.get()}return d({parse:function(t){var i,n=this,o=n.offset;t.offset(o),n.codeMap={},n.version=t.readShort(),i=t.readShort(),n.tables=t.times(i,function(){return new e(t,o,n.codeMap)})},render:function(e,n){var o=t();return o.writeShort(0),o.writeShort(1),o.write(i(e,n)),o.get()}})}(),Oe=d({parse:function(e){e.offset(this.offset),this.version=e.readShort(),this.averageCharWidth=e.readShort_(),this.weightClass=e.readShort(),this.widthClass=e.readShort(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort_(),this.ySubscriptYSize=e.readShort_(),this.ySubscriptXOffset=e.readShort_(),this.ySubscriptYOffset=e.readShort_(),this.ySuperscriptXSize=e.readShort_(),this.ySuperscriptYSize=e.readShort_(),this.ySuperscriptXOffset=e.readShort_(),this.ySuperscriptYOffset=e.readShort_(),this.yStrikeoutSize=e.readShort_(),this.yStrikeoutPosition=e.readShort_(),this.familyClass=e.readShort_(),this.panose=e.times(10,e.readByte),this.charRange=e.times(4,e.readLong),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=e.times(2,e.readLong),this.version>1&&(this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()))},render:function(){return this.raw()}}),Ve=1e5,h.prototype={use:function(e){var t,n,o,r=this;return"string"==typeof e?i(e).reduce(function(e,t){return e+String.fromCharCode(r.use(t))},""):(t=r.unicodes[e],t||(t=r.next++,r.subset[t]=e,r.unicodes[e]=t,n=r.font.cmap.codeMap[e],n&&(r.ncid2ogid[t]=n,null==r.ogid2ngid[n]&&(o=r.nextGid++,r.ogid2ngid[n]=o,r.ngid2ogid[o]=n))),t)},encodeText:function(e){return this.use(e)},glyphIds:function(){return l(this.ogid2ngid)},glyphsFor:function(e,t){var i,n,o,r=this;for(t||(t={}),i=0;i<e.length;++i)n=e[i],t[n]||(o=t[n]=r.font.glyf.glyphFor(n),o&&o.compound&&r.glyphsFor(o.glyphIds,t));return t},render:function(){var e,t,i,n,o,r,s,c,d=this,u=this.glyphsFor(this.glyphIds());for(e in u)a(u,e)&&(e=parseInt(e,10),null==d.ogid2ngid[e]&&(t=d.nextGid++,d.ogid2ngid[e]=t,d.ngid2ogid[t]=e));return i=l(this.ngid2ogid),n=i.map(function(e){return this.ngid2ogid[e]},this),o=this.font,r=o.glyf.render(u,n,this.ogid2ngid),
s=o.loca.render(r.offsets),this.lastChar=this.next-1,c={cmap:Ne.render(this.ncid2ogid,this.ogid2ngid),glyf:r.table,loca:s.table,hmtx:o.hmtx.render(n),hhea:o.hhea.render(n),maxp:o.maxp.render(n),post:o.post.render(n),name:o.name.render(this.psName),head:o.head.render(s.format),"OS/2":o.os2.render()},this.font.directory.render(c)},cidToGidMap:function(){var e,i,n,o=this,r=t(),s=0;for(e=this.firstChar;e<this.next;++e){for(;s<e;)r.writeShort(0),s++;i=o.ncid2ogid[e],i?(n=o.ogid2ngid[i],r.writeShort(n)):r.writeShort(0),s++}return r.get()}},p.prototype={parse:function(){var e=this.directory=new c(this.contents);this.head=e.readTable("head",Me),this.loca=e.readTable("loca",Re),this.hhea=e.readTable("hhea",Fe),this.maxp=e.readTable("maxp",Pe),this.hmtx=e.readTable("hmtx",ze),this.glyf=e.readTable("glyf",Be),this.name=e.readTable("name",Le),this.post=e.readTable("post",He),this.cmap=e.readTable("cmap",Ne),this.os2=e.readTable("OS/2",Oe),this.psName=this.name.postscriptName,this.ascent=this.os2.ascent||this.hhea.ascent,this.descent=this.os2.descent||this.hhea.descent,this.lineGap=this.os2.lineGap||this.hhea.lineGap,this.scale=1e3/this.head.unitsPerEm},widthOfGlyph:function(e){return this.hmtx.forGlyph(e).advance*this.scale},makeSubset:function(){return new h(this)}},We=e.support.browser,Ue="\n",qe=0,je={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],executive:[521.86,756],folio:[612,936],legal:[612,1008],letter:[612,792],tabloid:[792,1224]},Ge={"Times-Roman":!0,"Times-Bold":!0,"Times-Italic":!0,"Times-BoldItalic":!0,Helvetica:!0,"Helvetica-Bold":!0,"Helvetica-Oblique":!0,"Helvetica-BoldOblique":!0,Courier:!0,"Courier-Bold":!0,"Courier-Oblique":!0,"Courier-BoldOblique":!0,Symbol:!0,ZapfDingbats:!0},$e={},Ke=k(b),Ye=function(e,t){function i(){0===--o&&t()}var n=Object.keys(e),o=n.length;return 0===o?t():void n.forEach(function(t){y(t,e[t],i)})},v.prototype={loadFonts:Ke,loadImages:Ye,getFont:function(e){var t=this.FONTS[e];if(!t){if(t=Ge[e],!t)throw Error("Font "+e+" has not been loaded");t=this.attach(t===!0?new st(e):new at(this,t)),this.FONTS[e]=t}return t},getImage:function(e){var t=this.IMAGES[e];if(!t){if(t=$e[e],!t)throw Error("Image "+e+" has not been loaded");if("ERROR"===t)return null;t=this.IMAGES[e]=this.attach(t.asStream(this))}return t},getOpacityGS:function(e,t){var i,n,o,r=parseFloat(e).toFixed(3);return e=parseFloat(r),r+=t?"S":"F",i=this._opacityGSCache||(this._opacityGSCache={}),n=i[r],n||(o={Type:z("ExtGState")},t?o.CA=e:o.ca=e,n=this.attach(new tt(o)),n._resourceName=z("GS"+ ++qe),i[r]=n),n},dict:function(e){return new tt(e)},name:function(e){return z(e)},stream:function(e,t){return new it(t,e)}},Qe=Array.isArray||function(e){return e instanceof Array},F.prototype.beforeRender=function(){},Xe=P(function(e){this.value=e},{render:function(e){var t,i="",n=this.value;for(t=0;t<n.length;++t)i+=String.fromCharCode(255&n.charCodeAt(t));e("(",i.replace(/([\(\)\\])/g,"\\$1"),")")},toString:function(){return this.value}}),Ze=P(function(e){this.value=e},{render:function(e){var t,i=this;for(e("<"),t=0;t<this.value.length;++t)e(C(i.value.charCodeAt(t).toString(16),4));e(">")}},Xe),Je=P(function(e){this.name=e},{render:function(e){e("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return"#"+C(e.charCodeAt(0).toString(16),2)})},toString:function(){return this.name}}),et={},Je.get=z,tt=P(function(e){this.props=e},{render:function(e){var t=this.props,i=!0;e("<<"),e.withIndent(function(){for(var n in t)S(t,n)&&!/^_/.test(n)&&(i=!1,e.indent(z(n)," ",t[n]))}),i||e.indent(),e(">>")}}),it=P(function(e,i,n){if("string"==typeof e){var o=t();o.write(e),e=o}this.data=e,this.props=i||{},this.compress=n},{render:function(e){var t=this.data.get(),i=this.props;this.compress&&Se.supportsDeflate()&&(i.Filter?i.Filter instanceof Array||(i.Filter=[i.Filter]):i.Filter=[],i.Filter.unshift(z("FlateDecode")),t=Se.deflate(t)),i.Length=t.length,e(new tt(i)," stream",Ue),e.writeData(t),e(Ue,"endstream")}}),nt=P(function(){this.props={Type:z("Catalog")}},{setPages:function(e){this.props.Pages=e}},tt),ot=P(function(){this.props={Type:z("Pages"),Kids:[],Count:0}},{addPage:function(e){this.props.Kids.push(e),this.props.Count++}},tt),rt=[192,193,194,195,197,198,199,201,202,203,205,206,207],st=P(function(e){this.props={Type:z("Font"),Subtype:z("Type1"),BaseFont:z(e)},this._resourceName=z("F"+ ++qe)},{encodeText:function(e){return new Xe(e+"")}},tt),at=P(function(e,t,i){var n,o;i=this.props=i||{},i.Type=z("Font"),i.Subtype=z("Type0"),i.Encoding=z("Identity-H"),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=z("F"+ ++qe),n=t.head,this.name=t.psName,o=this.scale=t.scale,this.bbox=[n.xMin*o,n.yMin*o,n.xMax*o,n.yMax*o],this.italicAngle=t.post.italicAngle,this.ascent=t.ascent*o,this.descent=t.descent*o,this.lineGap=t.lineGap*o,this.capHeight=t.os2.capHeight||this.ascent,this.xHeight=t.os2.xHeight||0,this.stemV=0,this.familyClass=(t.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&this.familyClass<=7,this.isScript=10==this.familyClass,this.flags=(t.post.isFixedPitch?1:0)|(this.isSerif?2:0)|(this.isScript?8:0)|(0!==this.italicAngle?64:0)|32},{encodeText:function(e){return new Ze(this._sub.encodeText(e+""))},getTextWidth:function(e,t){var i,n,o=this,r=0,s=this._font.cmap.codeMap;for(i=0;i<t.length;++i)n=s[t.charCodeAt(i)],r+=o._font.widthOfGlyph(n||0);return r*e/1e3},beforeRender:function(){var e,i,n,o,r=this,s=r._sub,a=s.render(),l=new it(t(a),{Length1:a.length},(!0)),c=r._pdf.attach(new tt({Type:z("FontDescriptor"),FontName:z(r._sub.psName),FontBBox:r.bbox,Flags:r.flags,StemV:r.stemV,ItalicAngle:r.italicAngle,Ascent:r.ascent,Descent:r.descent,CapHeight:r.capHeight,XHeight:r.xHeight,FontFile2:r._pdf.attach(l)})),d=s.ncid2ogid,u=s.firstChar,h=s.lastChar,p=[];!function m(e,t){if(e<=h){var i=d[e];null==i?m(e+1):(t||p.push(e,t=[]),t.push(r._font.widthOfGlyph(i)),m(e+1,t))}}(u),e=new tt({Type:z("Font"),Subtype:z("CIDFontType2"),BaseFont:z(r._sub.psName),CIDSystemInfo:new tt({Registry:new Xe("Adobe"),Ordering:new Xe("Identity"),Supplement:0}),FontDescriptor:c,FirstChar:u,LastChar:h,DW:Math.round(r._font.widthOfGlyph(0)),W:p,CIDToGIDMap:r._pdf.attach(r._makeCidToGidMap())}),i=r.props,i.BaseFont=z(r._sub.psName),i.DescendantFonts=[r._pdf.attach(e)],n=new lt(u,h,s.subset),o=new it(f(),null,(!0)),o.data(n),i.ToUnicode=r._pdf.attach(o)},_makeCidToGidMap:function(){return new it(t(this._sub.cidToGidMap()),null,(!0))}},tt),lt=P(function(e,t,i){this.firstChar=e,this.lastChar=t,this.map=i},{render:function(e){e.indent("/CIDInit /ProcSet findresource begin"),e.indent("12 dict begin"),e.indent("begincmap"),e.indent("/CIDSystemInfo <<"),e.indent("  /Registry (Adobe)"),e.indent("  /Ordering (UCS)"),e.indent("  /Supplement 0"),e.indent(">> def"),e.indent("/CMapName /Adobe-Identity-UCS def"),e.indent("/CMapType 2 def"),e.indent("1 begincodespacerange"),e.indent("  <0000><ffff>"),e.indent("endcodespacerange");var t=this;e.indent(t.lastChar-t.firstChar+1," beginbfchar"),e.withIndent(function(){var i,o,r,s;for(i=t.firstChar;i<=t.lastChar;++i){for(o=t.map[i],r=n([o]),e.indent("<",C(i.toString(16),4),">","<"),s=0;s<r.length;++s)e(C(r.charCodeAt(s).toString(16),4));e(">")}}),e.indent("endbfchar"),e.indent("endcmap"),e.indent("CMapName currentdict /CMap defineresource pop"),e.indent("end"),e.indent("end")}}),ct=P(function(e,t){this._pdf=e,this._rcount=0,this._textMode=!1,this._fontResources={},this._gsResources={},this._xResources={},this._patResources={},this._shResources={},this._opacity=1,this._matrix=[1,0,0,1,0,0],this._annotations=[],this._font=null,this._fontSize=null,this._contextStack=[],t=this.props=t||{},t.Type=z("Page"),t.ProcSet=[z("PDF"),z("Text"),z("ImageB"),z("ImageC"),z("ImageI")],t.Resources=new tt({Font:new tt(this._fontResources),ExtGState:new tt(this._gsResources),XObject:new tt(this._xResources),Pattern:new tt(this._patResources),Shading:new tt(this._shResources)}),t.Annots=this._annotations},{_out:function(){this._content.data.apply(null,arguments)},transform:function(e,t,i,n,o,r){X(arguments)||(this._matrix=Q(arguments,this._matrix),this._out(e," ",t," ",i," ",n," ",o," ",r," cm"),this._out(Ue))},translate:function(e,t){this.transform(1,0,0,1,e,t)},scale:function(e,t){this.transform(e,0,0,t,0,0)},rotate:function(e){var t=Math.cos(e),i=Math.sin(e);this.transform(t,i,-i,t,0,0)},beginText:function(){this._textMode=!0,this._out("BT",Ue)},endText:function(){this._textMode=!1,this._out("ET",Ue)},_requireTextMode:function(){if(!this._textMode)throw Error("Text mode required; call page.beginText() first")},_requireFont:function(){if(!this._font)throw Error("No font selected; call page.setFont() first")},setFont:function(e,t){this._requireTextMode(),null==e?e=this._font:e instanceof at||(e=this._pdf.getFont(e)),null==t&&(t=this._fontSize),this._fontResources[e._resourceName]=e,this._font=e,this._fontSize=t,this._out(e._resourceName," ",t," Tf",Ue)},setTextLeading:function(e){this._requireTextMode(),this._out(e," TL",Ue)},setTextRenderingMode:function(e){this._requireTextMode(),this._out(e," Tr",Ue)},showText:function(e,t){var i,n;this._requireFont(),e.length>1&&t&&this._font instanceof at&&(i=this._font.getTextWidth(this._fontSize,e),n=t/i*100,this._out(n," Tz ")),this._out(this._font.encodeText(e)," Tj",Ue)},showTextNL:function(e){this._requireFont(),this._out(this._font.encodeText(e)," '",Ue)},addLink:function(e,t){var i=this._toPage({x:t.left,y:t.bottom}),n=this._toPage({x:t.right,y:t.top});this._annotations.push(new tt({Type:z("Annot"),Subtype:z("Link"),Rect:[i.x,i.y,n.x,n.y],Border:[0,0,0],A:new tt({Type:z("Action"),S:z("URI"),URI:new Xe(e)})}))},setStrokeColor:function(e,t,i){this._out(e," ",t," ",i," RG",Ue)},setOpacity:function(e){this.setFillOpacity(e),this.setStrokeOpacity(e),this._opacity*=e},setStrokeOpacity:function(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!0);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",Ue)}},setFillColor:function(e,t,i){this._out(e," ",t," ",i," rg",Ue)},setFillOpacity:function(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!1);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",Ue)}},gradient:function(e,t){var i,n,o;this.save(),this.rect(t.left,t.top,t.width,t.height),this.clip(),e.userSpace||this.transform(t.width,0,0,t.height,t.left,t.top),i=q(this._pdf,e,t),n=i.shading._resourceName,this._shResources[n]=i.shading,i.hasAlpha&&(o=i.opacity._resourceName,this._gsResources[o]=i.opacity,this._out("/"+o+" gs ")),this._out("/"+n+" sh",Ue),this.restore()},setDashPattern:function(e,t){this._out(e," ",t," d",Ue)},setLineWidth:function(e){this._out(e," w",Ue)},setLineCap:function(e){this._out(e," J",Ue)},setLineJoin:function(e){this._out(e," j",Ue)},setMitterLimit:function(e){this._out(e," M",Ue)},save:function(){this._contextStack.push(this._context()),this._out("q",Ue)},restore:function(){this._out("Q",Ue),this._context(this._contextStack.pop())},moveTo:function(e,t){this._out(e," ",t," m",Ue)},lineTo:function(e,t){this._out(e," ",t," l",Ue)},bezier:function(e,t,i,n,o,r){this._out(e," ",t," ",i," ",n," ",o," ",r," c",Ue)},bezier1:function(e,t,i,n){this._out(e," ",t," ",i," ",n," y",Ue)},bezier2:function(e,t,i,n){this._out(e," ",t," ",i," ",n," v",Ue)},close:function(){this._out("h",Ue)},rect:function(e,t,i,n){this._out(e," ",t," ",i," ",n," re",Ue)},ellipse:function(e,t,i,n){function o(t){return e+t}function r(e){return t+e}var s=.5522847498307936;this.moveTo(o(0),r(n)),this.bezier(o(i*s),r(n),o(i),r(n*s),o(i),r(0)),this.bezier(o(i),r(-n*s),o(i*s),r(-n),o(0),r(-n)),this.bezier(o(-i*s),r(-n),o(-i),r(-n*s),o(-i),r(0)),this.bezier(o(-i),r(n*s),o(-i*s),r(n),o(0),r(n))},circle:function(e,t,i){this.ellipse(e,t,i,i)},stroke:function(){this._out("S",Ue)},nop:function(){this._out("n",Ue)},clip:function(){this._out("W n",Ue)},clipStroke:function(){this._out("W S",Ue)},closeStroke:function(){this._out("s",Ue)},fill:function(){this._out("f",Ue)},fillStroke:function(){this._out("B",Ue)},drawImage:function(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",Ue))},comment:function(e){var t=this;e.split(/\r?\n/g).forEach(function(e){t._out("% ",e,Ue)})},_context:function(e){return null==e?{opacity:this._opacity,matrix:this._matrix}:(this._opacity=e.opacity,void(this._matrix=e.matrix))},_toPage:function(e){var t=this._matrix,i=t[0],n=t[1],o=t[2],r=t[3],s=t[4],a=t[5];return{x:i*e.x+o*e.y+s,y:n*e.x+r*e.y+a}}},tt),dt={serif:"Times-Roman","serif|bold":"Times-Bold","serif|italic":"Times-Italic","serif|bold|italic":"Times-BoldItalic","sans-serif":"Helvetica","sans-serif|bold":"Helvetica-Bold","sans-serif|italic":"Helvetica-Oblique","sans-serif|bold|italic":"Helvetica-BoldOblique",monospace:"Courier","monospace|bold":"Courier-Bold","monospace|italic":"Courier-Oblique","monospace|bold|italic":"Courier-BoldOblique",zapfdingbats:"ZapfDingbats","zapfdingbats|bold":"ZapfDingbats","zapfdingbats|italic":"ZapfDingbats","zapfdingbats|bold|italic":"ZapfDingbats"},K("Times New Roman","serif"),K("Courier New","monospace"),K("Arial","sans-serif"),K("Helvetica","sans-serif"),K("Verdana","sans-serif"),K("Tahoma","sans-serif"),K("Georgia","sans-serif"),K("Monaco","monospace"),K("Andale Mono","monospace"),ut={fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7},ht=ut,pt={dash:[4],dashDot:[4,2,1,2],dot:[1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2],solid:[]},ft={butt:0,round:1,square:2},mt={miter:0,round:1,bevel:2},e.deepExtend(e.pdf,{Document:v,BinaryStream:t,defineFont:Y,parseFontDef:G,getFontURL:$,loadFonts:Ke,loadImages:Ye,getPaperOptions:g,clearImageCache:w,TEXT_RENDERING_MODE:ut,exportPDF:ke,saveAs:te,toDataURL:J,toBlob:ee,render:Z}),e.drawing.exportPDF=e.pdf.exportPDF,e.drawing.pdf=e.pdf}(kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("pdf/mixins.min",["pdf/core.min"],e)}(function(){return function(e,t){kendo.PDFMixin={extend:function(e){e.events.push("pdfExport"),e.options.pdf=this.options,e.saveAsPDF=this.saveAsPDF,e._drawPDF=this._drawPDF,e._drawPDFShadow=this._drawPDFShadow},options:{fileName:"Export.pdf",proxyURL:"",paperSize:"auto",allPages:!1,landscape:!1,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+kendo.version,date:null},saveAsPDF:function(){var t,i=new e.Deferred,n=i.promise(),o={promise:n};if(!this.trigger("pdfExport",o))return t=this.options.pdf,t.multiPage=t.multiPage||t.allPages,this._drawPDF(i).then(function(e){return kendo.drawing.exportPDF(e,t)}).done(function(e){kendo.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy,proxyTarget:t.proxyTarget}),i.resolve()}).fail(function(e){i.reject(e)}),n},_drawPDF:function(t){var i=new e.Deferred;return kendo.drawing.drawDOM(this.wrapper).done(function(e){var n={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(n),i.resolve(n.page)}).fail(function(e){i.reject(e)}),i},_drawPDFShadow:function(t,i){var n,o,r;return t=t||{},n=this.wrapper,o=e("<div class='k-pdf-export-shadow'>"),t.width&&o.css({width:t.width,overflow:"visible"}),n.before(o),o.append(t.content||n.clone(!0,!0)),r=e.Deferred(),setTimeout(function(){var e=kendo.drawing.drawDOM(o,i);e.always(function(){o.remove()}).then(function(){r.resolve.apply(r,arguments)}).fail(function(){r.reject.apply(r,arguments)}).progress(function(){r.progress.apply(r,arguments)})},15),r.promise()}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.pdf.min",["kendo.core.min","kendo.drawing.min","pdf/core.min","pdf/mixins.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.grid.min",["kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.columnmenu.min","kendo.groupable.min","kendo.pager.min","kendo.selectable.min","kendo.sortable.min","kendo.reorderable.min","kendo.resizable.min","kendo.mobile.actionsheet.min","kendo.mobile.pane.min","kendo.ooxml.min","kendo.excel.min","kendo.progressbar.min","kendo.pdf.min"],e)}(function(){return function(e,t){function i(e,t){return"["+Te.attr(e)+"="+t+"]"}function n(e){return Array(e+1).join('<td class="k-group-cell">&nbsp;</td>')}function o(e){var t,i=" ";if(e){if(typeof e===$t)return e;for(t in e)""!==e[t]&&(i+=t+'="'+e[t]+'"')}return i}function r(t,i){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",i)}function s(t,i,n,o,r){var s,a=i;for(i=e(),r=r||1,s=0;s<r;s++)i=i.add(t.eq(a+s));"number"==typeof n?i[o?"insertBefore":"insertAfter"](t.eq(n)):i.appendTo(n)}function a(t,i,n){return e(t).add(i).find(n)}function l(e,t,i){var n,o,r,s;for(i=Oe(i)?i:[i],n=0,o=i.length;n<o;n++)r=i[n],Be(r)&&r.click&&(s=r.name||r.text,t.on(Wt+rt,"a.k-grid-"+(s||"").replace(/\s/g,""),{commandName:s},Ue(r.click,e)))}function c(e,t,i){return He(e,function(e){var n,o;return e=typeof e===$t?{field:e}:e,b(e)&&!i||(e.attributes=Z(e.attributes),e.footerAttributes=Z(e.footerAttributes),e.headerAttributes=Z(e.headerAttributes),n=!0),e.columns&&(e.columns=c(e.columns,t,n)),o=Te.guid(),e.headerAttributes=Le({id:o},e.headerAttributes),Le({encoded:t,hidden:n},e)})}function d(e,t){var i=[];return u(e,t,i),i[i.length-1]}function u(e,t,i){var n,o;for(i=i||[],n=0;n<t.length;n++){if(e===t[n])return!0;if(t[n].columns){if(o=i.length,i.push(t[n]),u(e,t[n].columns,i))return!0;i.splice(o,i.length-o)}}return!1}function h(e,t){p(e,t,t)}function p(e,t,i){var n=i?J:Z;e.hidden=!t,e.attributes=n(e.attributes),e.footerAttributes=n(e.footerAttributes),e.headerAttributes=n(e.headerAttributes)}function f(e,t){m(e);var i=e._hideByMedia;p(e,t,i?e.matchesMedia:t)}function m(e){e.matchesMedia=g(e)}function g(e){return e&&(k(e.media)||!k(e.media)&&Te.matchesMedia(e.media))}function v(){return"none"!==this.style.display}function _(t){return"none"!==e(t)[0].style.display}function b(e){return w([e]).length>0}function w(e){return Ne(e,function(e){var t=!e.hidden&&e.matchesMedia!==!1;return t&&e.columns&&(t=w(e.columns).length>0),t})}function y(e){var t,i,n=[];for(i=0;i<e.length;i++){if(t=e[i],!k(t.media)){if(!k(t.minScreenWidth))throw Error("Using 'media' and 'minScreenWidth' options at the same time is not supported.");n.push(t)}t.columns&&(n=n.concat(y(t.columns)))}return n}function k(e){return t===e}function x(t){return e(t).map(function(){return this.toArray()})}function C(e,t,i){var n=D(W(t)),o=D(U(t)),r=e.rowSpan;e.rowSpan=i?n>o?r-(n-o)||1:r+(o-n):n>o?r+(n-o):r-(o-n)||1}function S(t,i,n,o,r,s,a){var l,c,d=D(t),u=D([i]);d>u&&(l=Array(a+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>'),c=s.children(":not(.k-filter-row)"),e(Array(d-u+1).join("<tr>"+l+"</tr>")).insertAfter(c.last())),N(s,d-u),A(n,o,r,s)}function T(t,i,n){var o,r,s,a,l,c,d,u;for(n=n||0,s=i,i=$(i),a={},l=t.find(">tr:not(.k-filter-row)"),c=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},d=0,u=i.length;d<u;d++)o=E(i[d],s),a[o.row]||(a[o.row]=l.eq(o.row).find(".k-header").filter(c)),r=a[o.row].eq(o.cell),r.attr(Te.attr("index"),n+d);return i.length}function D(e){var t,i,n=1,o=0;for(t=0;t<e.length;t++)e[t].columns&&(i=D(e[t].columns),i>o&&(o=i));return n+o}function A(t,i,n,o){var r,s,a=R(t[0],i),l=n.find(">tr:not(.k-filter-row):eq("+a.row+")>th.k-header"),c=e(),d=a.cell;for(r=0;r<t.length;r++)c=c.add(l.eq(d+r));for(o.find(">tr:not(.k-filter-row)").eq(a.row).append(c),s=[],r=0;r<t.length;r++)t[r].columns&&(s=s.concat(t[r].columns));s.length&&A(s,i,n,o)}function E(e,t,i,n){var o,r;for(i=i||0,n=n||{},n[i]=n[i]||0,r=0;r<t.length;r++){if(t[r]==e){o={cell:n[i],row:i};break}if(t[r].columns&&(o=E(e,t[r].columns,i+1,n)))break;n[i]++}return o}function I(e,t,i,n){var o,r,s=!!i.locked;do o=e[t],t+=n?1:-1,r=!!o.locked;while(o&&t>-1&&t<e.length&&o!=i&&!o.columns&&r===s);return o}function M(e,t,i,n,o){var r,s,a,l,c;return t.columns?(t=t.columns,t[n?0:t.length-1]):(r=d(t,e),s=r?r.columns:e,a=Ve(t,s),0===a&&n?a++:a!=s.length-1||n?(a>0||0===a&&!n)&&(a+=n?-1:1):a--,l=Ve(i,s),t=I(s,a,i,l>a),c=Ve(t,o),(!t.columns||c&&c!==s.length-1)&&t&&t!=i&&t.columns?M(e,t,i,n,o):null)}function R(e,t,i,n){var o,r;for(i=i||0,n=n||{},n[i]=n[i]||0,r=0;r<t.length;r++){if(t[r]==e){o={cell:n[i],row:i};break}if(t[r].columns&&(o=R(e,t[r].columns,i+1,n)))break;t[r].hidden||n[i]++}return o}function F(e){var t=z(W(e));return t.concat(z(U(e)))}function P(e,t,i,n){var o=e[i],r=e[n],s=d(o,t);return t=s?s.columns:t,Ve(r,t)}function z(e){var t,i=[],n=[];for(t=0;t<e.length;t++)i.push(e[t]),e[t].columns&&(n=n.concat(e[t].columns));return n.length&&(i=i.concat(z(n))),i}function B(e){var t,i,n=0;for(i=0;i<e.length;i++)t=e[i],t.columns?n+=B(t.columns):t.hidden&&n++;return n}function L(e){var t,i,n,o=0;for(i=0,n=e.length;i<n;i++)t=e[i].style.width,t&&t.indexOf("%")==-1&&(o+=parseInt(t,10));return o}function H(e,t){var i,n,o=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n<o.length;n++)i=o[n].rowSpan,i>1&&(o[n].rowSpan=i-t||1)}function N(e,t){var i,n=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(i=0;i<n.length;i++)n[i].rowSpan+=t}function O(t){var i,n=t.find("tr:not(.k-filter-row)"),o=n.filter(function(){return!e(this).children().length}).remove().length,r=n.find("th:not(.k-group-cell,.k-hierarchy-cell)");for(i=0;i<r.length;i++)r[i].rowSpan>1&&(r[i].rowSpan-=o);return n.length-o}function V(e,t,i,n,o){var r,s,a,l=[];for(r=0,a=e.length;r<a;r++)s=i[n]||[],s.push(t.eq(o+r)),i[n]=s,e[r].columns&&(l=l.concat(e[r].columns));l.length&&V(l,t,i,n+1,o+e.length)}function W(e){return Ne(e,function(e){return e.locked})}function U(e){return Ne(e,function(e){return!e.locked})}function q(e){return Ne(e,function(e){return!e.locked&&b(e)})}function j(e){return Ne(e,function(e){return e.locked&&b(e)})}function G(e){var t,i=[];for(t=0;t<e.length;t++)e[t].hidden||(e[t].columns?i=i.concat(G(e[t].columns)):i.push(e[t]));return i}function $(e){var t,i=[];for(t=0;t<e.length;t++)e[t].columns?i=i.concat($(e[t].columns)):i.push(e[t]);return i}function K(i){var n,o=i.find(">tr:not(.k-filter-row)"),r=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},s=e();return o.length>1&&(s=o.find("th").filter(r).filter(function(){return this.rowSpan>1})),s=s.add(o.last().find("th").filter(r)),n=Te.attr("index"),s.sort(function(i,o){var r,s;return i=e(i),o=e(o),r=i.attr(n),s=o.attr(n),r===t&&(r=e(i).index()),s===t&&(s=e(o).index()),r=parseInt(r,10),s=parseInt(s,10),r>s?1:r<s?-1:0}),s}function Y(t){var i,n,o,r,s,a,l,c=t.closest("table"),d=e().add(t),u=t.closest("tr"),h=c.find("tr:not(.k-filter-row)"),p=h.index(u);if(p>0){for(i=h.eq(p-1),n=i.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!e(this).attr("rowspan")}),o=0,r=u.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t),s=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),a=0;a<s.length;a++)o+=s[a].colSpan||1;for(r+=Math.max(o-1,0),o=0,a=0;a<n.length;a++)if(l=n.eq(a),o+=l.attr("data-colspan")?l[0].getAttribute("data-colspan"):1,r>=a&&r<o){d=Y(l).add(d);break}}return d}function Q(t){var i,n,o,r,s,a,l,c=t.closest("thead"),d=e().add(t),u=t.closest("tr"),h=c.find("tr:not(.k-filter-row)"),p=h.index(u)+t[0].rowSpan,f=Te.attr("colspan");if(p<=h.length-1){for(i=u.next(),n=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),n=n.filter(function(){return!this.rowSpan||1===this.rowSpan}),r=0,o=0;o<n.length;o++)r+=parseInt(n.eq(o).attr(f),10)||1;for(s=i.find("th:not(.k-group-cell,.k-hierarchy-cell)"),a=parseInt(t.attr(f),10)||1,o=0;o<a;)i=s.eq(o+r),d=d.add(Q(i)),l=parseInt(i.attr(f),10),l>1&&(a-=l-1),o++}return d}function X(t,i,n,o){var r,s=t;return o&&t.empty(),Ie?t[0].innerHTML=n:(r=document.createElement("div"),r.innerHTML="<table><tbody>"+n+"</tbody></table>",t=r.firstChild.firstChild,i[0].replaceChild(t,s[0]),t=e(t)),t}function Z(e){e=e||{};var t=e.style;return t?(t=t.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),t===e.style&&(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",Le({},e,{style:t})}function J(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function ee(t,i,n,o){var r,s=t.find(">colgroup"),a=He(i,function(e){return r=e.width,r&&0!==parseInt(r,10)?Te.format('<col style="width:{0}"/>',typeof r===$t?r:r+"px"):"<col />"});(n||s.find(".k-hierarchy-col").length)&&a.splice(0,0,'<col class="k-hierarchy-col" />'),s.length&&s.remove(),s=e(Array(o+1).join('<col class="k-group-col">')+a.join("")),s.is("colgroup")||(s=e("<colgroup/>").append(s)),t.prepend(s),_i.msie&&8==_i.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function te(e,t){var i,n,o=0,r=e.find("th:not(.k-group-cell)");for(i=0,n=t.length;i<n;i++)t[i].locked&&(r.eq(i).insertBefore(r.eq(o)),r=e.find("th:not(.k-group-cell)"),o++)}function ie(e){var t,i,n,o={};for(i=0,n=e.length;i<n;i++)t=e[i],o[t.value]=t.text;return o}function ne(e,t,i,n){var o=i&&i.length&&Be(i[0])&&"value"in i[0],r=o?ie(i)[e]:e;return r=null!=r?r:"",t?Te.format(t,r):n===!1?r:Te.htmlEncode(r)}function oe(e,t,i){for(var n,o=0,r=e[o];r;){if(n=!!i||"none"!==r.style.display,n&&!hi.test(r.className)&&--t<0){r.style.display=i?"":"none";break}r=e[++o]}}function re(t,i){for(var n,o,r=0,s=t.length;r<s;r+=1)o=t.eq(r),o.is(".k-grouping-row,.k-detail-row")?(n=o.children(":not(.k-group-cell):first,.k-detail-cell").last(),n.attr("colspan",parseInt(n.attr("colspan"),10)-1)):(o.hasClass("k-grid-edit-row")&&(n=o.children(".k-edit-container")[0])&&(n=e(n),n.attr("colspan",parseInt(n.attr("colspan"),10)-1),n.find("col").eq(i).remove(),o=n.find("tr:first")),oe(o[0].cells,i,!1))}function se(e){var t,i,n=[];for(i=0;i<e.length&&(t=e[i],"field"in t&&"value"in t&&"items"in t);i++)n.push(t),t.hasSubgroups&&(n=n.concat(se(t.items)));return n}function ae(e){var t,i,n=[];for(i=0;i<e.length&&(t=e[i],"field"in t&&"value"in t&&"items"in t);i++)t.hasSubgroups&&(n=n.concat(ae(t.items))),n.push(t.aggregates);return n}function le(t,i){for(var n,o,r,s=0,a=t.length;s<a;s+=1)o=t.eq(s),o.is(".k-grouping-row,.k-detail-row")?(n=o.children(":not(.k-group-cell):first,.k-detail-cell").last(),n.attr("colspan",parseInt(n.attr("colspan"),10)+1)):(o.hasClass("k-grid-edit-row")&&(n=o.children(".k-edit-container")[0])&&(n=e(n),n.attr("colspan",parseInt(n.attr("colspan"),10)+1),ee(n.find(">form>table"),w(r),!1,0),o=n.find("tr:first")),oe(o[0].cells,i,!0))}function ce(e,t,i){i=i||1;var n,o,r;for(o=0,r=e.length;o<r;o++)n=e.eq(o).children().last(),n.attr("colspan",parseInt(n.attr("colspan"),10)+i),n=t.eq(o).children().last(),n.attr("colspan",parseInt(n.attr("colspan"),10)-i)}function de(e){var t,i,n=0,o=e.find(">colgroup>col");for(t=0,i=o.length;t<i;t+=1)n+=parseInt(o[t].style.width,10);return n}function ue(e,t){var i,n,o,r;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(i=e.offsetHeight,n=t.offsetHeight,i>n?(o=t.rows[t.rows.length-1],pi.test(o.className)&&(o=t.rows[t.rows.length-2]),r=i-n):(o=e.rows[e.rows.length-1],pi.test(o.className)&&(o=e.rows[e.rows.length-2]),r=n-i),o.style.height=o.offsetHeight+r+"px")}function he(e,t){var i,n=e.offsetHeight,o=t.offsetHeight;n>o?i=n+"px":n<o&&(i=o+"px"),i&&(e.style.height=t.style.height=i)}function pe(e,t){var i,n,o;if(typeof e===$t&&e===t)return e;if(Be(e)&&e.name===t)return e;if(Oe(e))for(i=0,n=e.length;i<n;i++)if(o=e[i],typeof o===$t&&o===t||o.name===t)return o;return null}function fe(t,i){if(i===!0){t=e(t);var n=t.parent().scrollLeft();Te.focusElement(t),t.parent().scrollLeft(n)}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function me(e,i){return e.options.groupable&&(i.groupable||i.groupable===t)}function ge(t,i){return!!e.grep(t,function(e){return e.field===i}).length}function ve(e,t){return!(!e.field||e.selectable)&&(!(t.editable&&!t.editable(e.field))&&!(e.editable&&!e.editable(t)))}function _e(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function be(i){var n=e(i.currentTarget),o=n.is("th"),r=this.table.add(this.lockedTable),s=this.thead.parent().add(e(">table",this.lockedHeader)),a=_e(i.target),l=e(i.target),c=n.closest("table")[0];return a&&n.find(Te.roleSelector("filtercell")).length?(this._setCurrent(n),t):(c!==r[0]&&c!==r[1]&&c!==s[0]&&c!==s[1]||l.is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(n),!o&&a||setTimeout(function(){wi&&e(Te._activeElement()).hasClass("k-widget")||_e(Te._activeElement())&&e.contains(c,Te._activeElement())||fe(c,!0)}),o&&!Te.support.touch&&i.preventDefault()),t)}function we(e,t){if(!t)return 0;var i=0;return Te.support.browser.webkit&&(i=e.width()),i}function ye(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function ke(e){return'<td colspan="#=data.colspan +'+e+'#"><p class="k-reset"><a class="k-icon k-i-collapse" href="\\#" tabindex="-1" '+li+'="'+si+'"></a>#=data.text#</p></td>'}function xe(e){return'<td colspan="'+e+'"><p class="k-reset">&nbsp;</p></td>'}function Ce(e,t,i){return'<tr role="row" class="k-grouping-row">'+n(t)+'<td colspan="'+e+'" aria-expanded="true"><p class="k-reset"><a class="k-icon k-i-collapse" href="#" tabindex="-1" '+li+'="'+si+'"></a>'+i+"</p></td></tr>"}function Se(e){return'<tr role="row" class="k-grouping-row"><td colspan="'+e+'" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'}var Te=window.kendo,De=Te.ui,Ae=Te.data.DataSource,Ee=Te.data.ObservableObject,Ie=Te.support.tbodyInnerHtml,Me=Te._activeElement,Re=De.Widget,Fe=Te._outerWidth,Pe=Te._outerHeight,ze=Te.keys,Be=e.isPlainObject,Le=e.extend,He=e.map,Ne=e.grep,Oe=e.isArray,Ve=e.inArray,We=Array.prototype.push,Ue=e.proxy,qe=Te.isFunction,je=e.isEmptyObject,Ge=e.contains,$e=Math,Ke="progress",Ye="error",Qe=":not(.k-group-cell):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",Xe="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",Ze="tr:not(.k-footer-template):visible",Je=":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",et="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",tt=et+":first",it=et+":last",nt=Ze+":first>"+Je+":first",ot="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",rt=".kendoGrid",st="k-grid-content-locked",at="k-group-cell",lt="edit",ct="beforeEdit",dt="save",ut="remove",ht="detailInit",pt="filterMenuInit",ft="columnMenuInit",mt="filterMenuOpen",gt="columnMenuOpen",vt="cellClose",_t="change",bt="columnHide",wt="columnShow",yt="saveChanges",kt="dataBound",xt="detailExpand",Ct="detailCollapse",St="itemchange",Tt="page",Dt="paging",At="scroll",Et="sync",It="k-state-focused",Mt=":kendoFocusable",Rt="k-state-selected",Ft="k-checkbox",Pt="input[data-role='checkbox']."+Ft,zt="k-grid-norecords",Bt="resize",Lt="columnResize",Ht="columnReorder",Nt="columnLock",Ot="columnUnlock",Vt="navigate",Wt="click",Ut="mousedown",qt="height",jt="tabIndex",Gt="function",$t="string",Kt="bottom",Yt="container-for",Qt="field",Xt="input",Zt="incell",Jt="inline",ei="uid",ti=1,ii="Are you sure you want to delete this record?",ni="No records available.",oi="Delete",ri="Cancel",si="Collapse",ai="Expand",li="aria-label",ci=/(\}|\#)/gi,di=/#/gi,ui="[\\x20\\t\\r\\n\\f]",hi=RegExp("(^|"+ui+")(k-group-cell|k-hierarchy-cell)("+ui+"|$)"),pi=RegExp("(^|"+ui+")(k-filter-row)("+ui+"|$)"),fi='# if (iconClass) {#<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass#"></span>#=text#</a># } else { #<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#">#=text#</a># } #',mi='# var checkboxGuid = kendo.guid(); #<input class="'+Ft+'" data-role="checkbox" id="#= checkboxGuid #" aria-label="Select row" aria-checked="false" type="checkbox"><label for="#= checkboxGuid #" class="k-checkbox-label k-no-text">&\\#8203;</label>',gi='# var checkboxGuid = kendo.guid(); #<input class="'+Ft+'" data-role="checkbox" aria-label="Select all rows" aria-checked="false" type="checkbox" id="#= checkboxGuid #"><label for="#= checkboxGuid #" class="k-checkbox-label k-no-text">##&\\#8203;##</label>',vi=!1,_i=Te.support.browser,bi=_i.msie&&7==_i.version,wi=_i.msie&&8==_i.version,yi=_i.msie&&11===_i.version,ki=/Mac OS/.test(navigator.userAgent),xi=Re.extend({
init:function(e,t){var i=this;Re.fn.init.call(i,e,t),i._refreshHandler=Ue(i.refresh,i),i.setDataSource(t.dataSource),i.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(_t,t._refreshHandler),t.dataSource=e,t.dataSource.bind(_t,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[Dt,Tt,At],destroy:function(){var e=this;Re.fn.destroy.call(e),e.dataSource.unbind(_t,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(rt),clearTimeout(e._timeout),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,i=this,n=Te.support.scrollbar()+1,o=i.element;o.css({width:"auto",overflow:"hidden"}).css(vi?"padding-left":"padding-right",n),i.content=o.children().first(),t=i.wrapper=i.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll"+rt+" mousewheel"+rt,Ue(i._wheelScroll,i)),i._wrapper(),Te.support.kineticScrollNeeded&&(i.drag=new Te.UserEvents(i.wrapper,{global:!0,allowSelection:!0,start:function(e){e.sender.capture()},move:function(e){i.verticalScrollbar.scrollTop(i.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),i.verticalScrollbar=e('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:n}).appendTo(o).bind("scroll"+rt,Ue(i._scroll,i))},_wrapper:function(){var e=this;yi&&(e.wrapper.css({"overflow-y":At}),e.element.css(vi?"padding-left":"padding-right",0))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,i=t.scrollTop(),n=Te.wheelDeltaY(e);!n||n>0&&0===i||n<0&&i+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(i+-n))}},_scroll:function(e){var i=this,n=!i.options.prefetch,o=e.currentTarget.scrollTop,r=i.dataSource,s=i.itemHeight,a=r.skip()||0,l=i._rangeStart||a,c=i.element.innerHeight(),d=!!(i._scrollbarTop&&i._scrollbarTop>o),u=$e.max($e.floor(o/s),0),h=d?$e.ceil(c/s):$e.floor(c/s),p=$e.max(u+h,0);return i._preventScroll?(i._preventScroll=!1,t):(i._scrollTop=o-l*s,i._scrollbarTop=o,i._scrolling=n,i._fetch(u,p,d)||(i.wrapper[0].scrollTop=i._scrollTop),i.trigger(At),n&&(i._scrollingTimeout&&clearTimeout(i._scrollingTimeout),i._scrollingTimeout=setTimeout(function(){i._scrolling=!1,i._page(i._rangeStart,i.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,i=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?e._wrapperScrolled&&!e._isScrolledToBottom()||(t.scrollTop(i+Te.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(i-Te.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,i=t.verticalScrollbar;i.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),i.scrollTop(e),t._scrollbarTop=i.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},_isElementVisible:function(e){return this._isElementVisibleInWrapper(e)},_isElementVisibleInWrapper:function(t){var i,n,o=this,r=o.wrapper;return t=e(t),!!(t[0]&&Ge(r[0],t[0])&&(i=t.offset().top-r.offset().top,n=t.outerHeight()/2,(i>=0||$e.abs(i)<=n)&&$e.floor(i+n)<=r.height()))},position:function(e){var t,i=this._rangeStart||this.dataSource.skip()||0,n=this.dataSource.pageSize();return t=e>i?e-i+1:i-e-1,t>n?n:t},scrollIntoView:function(e){var t=this.wrapper[0],i=t.clientHeight,n=this._isScrolledToBottom()?t.scrollTop:this._scrollTop||t.scrollTop,o=e[0].offsetTop,r=e[0].offsetHeight;n>o?this.verticalScrollbar[0].scrollTop-=i/2:o+r>=n+i&&(this.verticalScrollbar[0].scrollTop+=i/2)},_fetch:function(t,i,n){var o=this,r=o.dataSource,s=o.itemHeight,a=r.take(),l=o._rangeStart||r.skip()||0,c=$e.floor(t/a)*a,d=!1,u=.33,h=o.verticalScrollbar,p=_i.webkit?1:0;return t<l?(d=!0,l=$e.max(0,i-a),o._scrollTop=h.scrollTop()-l*s,o._page(l,a)):i>=l+a&&!n?(d=!0,l=$e.min(t,r.total()-a),o._scrollTop=h.scrollTop()>=h[0].scrollHeight-h.height()-p?o.wrapper[0].scrollHeight-o.wrapper.height():s,o._page(l,a)):!o._fetching&&o.options.prefetch&&(t<c+a-a*u&&t>a&&r.prefetch(c-a,a,e.noop),i>c+a*u&&r.prefetch(c+a,a,e.noop)),d},fetching:function(){return this._fetching},_page:function(t,i,n){var o=this,r=!o.options.prefetch,s=o.dataSource;n=qe(n)?n:e.noop,o.trigger(Dt,{skip:t,take:i})||(clearTimeout(o._timeout),o._fetching=!0,o._rangeStart=t,s.inRange(t,i)?(Te.ui.progress(e(o.wrapper).parent(),!0),s.range(t,i,function(){Te.ui.progress(e(o.wrapper).parent(),!1),n(),o.trigger(Tt)})):(r||Te.ui.progress(o.wrapper.parent(),!0),o._timeout=setTimeout(function(){o._scrolling||(r&&Te.ui.progress(o.wrapper.parent(),!0),s.range(t,i,function(){Te.ui.progress(o.wrapper.parent(),!1),n(),o.trigger(Tt)}))},100)))},repaintScrollbar:function(e){var i,n=this,o="",r=n.options.maxScrollHeight,s=n.dataSource,a=Te.support.kineticScrollNeeded?0:Te.support.scrollbar(),l=n.wrapper[0],c=n._isScrolledToBottom(),d=n.itemHeight=n.options.itemHeight()||0,u=l.scrollWidth>l.offsetWidth?a:0,h=s.total()*d+u;for(i=0;i<$e.floor(h/r);i++)o+='<div style="width:1px;height:'+r+'px"></div>';h%r&&(o+='<div style="width:1px;height:'+h%r+'px"></div>'),n.verticalScrollbar.html(o),c&&!n._isScrolledToBottom()&&n.scrollToBottom(),t!==n._scrollTop&&e&&(l.scrollTop=n._scrollTop,n._scrollWrapperOnColumnResize())},refresh:function(e){var i=this,n=i.dataSource,o=i._rangeStart,r=(e||{}).action,s=i._isScrolledToBottom()||!r||r!==St&&r!==ut&&r!==Et;Te.ui.progress(i.wrapper.parent(),!1),clearTimeout(i._timeout),i.repaintScrollbar(s),i.drag&&i.drag.cancel(),t===o||i._fetching||((!r||r!==Et&&r!==St)&&(i._rangeStart=n.skip()),1!==n.page()||r&&(r===Et||r===St)||(i.verticalScrollbar[0].scrollTop=0)),i._fetching=!1}}),Ci={create:{text:"Add new record",className:"k-grid-add",iconClass:"k-icon k-i-plus"},cancel:{text:"Cancel changes",className:"k-grid-cancel-changes",iconClass:"k-icon k-i-cancel"},save:{text:"Save changes",className:"k-grid-save-changes",iconClass:"k-icon k-i-check"},destroy:{text:"Delete",className:"k-grid-delete",iconClass:"k-icon k-i-close"},edit:{text:"Edit",className:"k-grid-edit",iconClass:"k-icon k-i-edit"},update:{text:"Update",className:"k-primary k-grid-update",iconClass:"k-icon k-i-check"},canceledit:{text:"Cancel",className:"k-grid-cancel",iconClass:"k-icon k-i-cancel"},excel:{text:"Export to Excel",className:"k-grid-excel",iconClass:"k-icon k-i-file-excel"},pdf:{text:"Export to PDF",className:"k-grid-pdf",iconClass:"k-icon k-i-file-pdf"}},Si=Te.ui.DataBoundWidget.extend({init:function(t,i,n){var o=this;i=Oe(i)?{dataSource:i}:i,Re.fn.init.call(o,t,i),n&&(o._events=n),vi=Te.support.isRtl(t),o._element(),o._aria(),o._columns(e.extend(!0,[],o.options.columns)),o._dataSource(),o._tbody(),o._pageable(),o._thead(),o._groupable(),o._toolbar(),o._setContentHeight(),o._templates(),o._navigatable(),o._selectable(),o._clipboard(),o._details(),o._editable(),o._attachCustomCommandsEvent(),o._adaptiveColumns(),o._minScreenSupport(),o.options.autoBind?o.dataSource.fetch():(o._group=o._groups()>0,o._footer()),o.lockedContent&&(o.wrapper.addClass("k-grid-lockedcolumns"),o._resizeHandler=function(){o.resize()},e(window).on("resize"+rt,o._resizeHandler)),Te.notify(o)},events:[_t,"dataBinding","cancel",kt,xt,Ct,ht,pt,mt,ft,gt,lt,ct,dt,ut,yt,vt,Lt,Ht,wt,bt,Nt,Ot,Vt,"page","sort","filter","group","groupExpand","groupCollapse"],setDataSource:function(e){var t,i=this,n=i.options.scrollable;i.options.dataSource=e,i._dataSource(),i._pageable(),i._thead(),n&&(n.virtual?(t=i.content.find(">.k-virtual-scrollable-wrap"),t.scrollLeft(we(t,vi))):(t=i.tbody,i.content.scrollLeft(we(t,vi)))),i.options.groupable&&i._groupable(),i.virtualScrollable&&i.virtualScrollable.setDataSource(i.options.dataSource),i.options.navigatable&&i._navigatable(),i.options.selectable&&i._selectable(),i.options.autoBind&&i.dataSource.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:ri,confirmation:ii,confirmDelete:oi},commands:{create:Ci.create.text,cancel:Ci.cancel.text,save:Ci.save.text,destroy:Ci.destroy.text,edit:Ci.edit.text,update:Ci.update.text,canceledit:Ci.canceledit.text,excel:Ci.excel.text,pdf:Ci.pdf.text},noRecords:ni,expandCollapseColumnHeader:"",groupHeader:"Press ctrl + space to group",ungroupHeader:"Press ctrl + space to ungroup"}},destroy:function(){var t,i=this;i._angularItems("cleanup"),i._destroyColumnAttachments(),Re.fn.destroy.call(i),this._navigatableTables=null,i._resizeHandler&&e(window).off("resize"+rt,i._resizeHandler),i.pager&&i.pager.element&&i.pager.destroy(),i.pager=null,i.groupable&&i.groupable.element&&i.groupable.element.kendoGroupable("destroy"),i.groupable=null,i.options.reorderable&&i.wrapper.data("kendoReorderable").destroy(),i.selectable&&i.selectable.element&&(i.selectable.destroy(),i.clearArea(),i._selectedIds=null,i.copyHandler&&(i.wrapper.off("keydown",i.copyHandler),i.unbind(i.copyHandler)),i.updateClipBoardState&&(i.unbind(i.updateClipBoardState),i.updateClipBoardState=null),i.clearAreaHandler&&i.wrapper.off("keyup",i.clearAreaHandler)),i.selectable=null,i.resizable&&(i.resizable.destroy(),i._resizeUserEvents&&(i._resizeHandleDocumentClickHandler&&e(document).off("click",i._resizeHandleDocumentClickHandler),i._resizeUserEvents.destroy(),i._resizeUserEvents=null),i.resizable=null),i._destroyVirtualScrollable(),i._destroyEditable(),i.dataSource&&(i.dataSource.unbind(_t,i._refreshHandler).unbind(Ke,i._progressHandler).unbind(Ye,i._errorHandler),i._refreshHandler=i._progressHandler=i._errorHandler=null),t=i.element.add(i.wrapper).add(i.table).add(i.thead).add(i.wrapper.find(">.k-grid-toolbar")),i.content&&(t=t.add(i.content).add(i.content.find(">.k-virtual-scrollable-wrap"))),i.lockedHeader&&i._removeLockedContainers(),i.pane&&i.pane.destroy(),i.minScreenResizeHandler&&e(window).off("resize",i.minScreenResizeHandler),i._detachColumnMediaResizeHandler(),i._draggableInstance&&i._draggableInstance.element&&i._draggableInstance.destroy(),i._draggableInstance=null,t.off(rt),Te.destroy(i.wrapper),i.rowTemplate=i.altRowTemplate=i.lockedRowTemplate=i.lockedAltRowTemplate=i.detailTemplate=i.footerTemplate=i.groupFooterTemplate=i.lockedGroupFooterTemplate=i.noRecordsTemplate=null,i.scrollables=i.thead=i.tbody=i.element=i.table=i.content=i.footer=i.wrapper=i.lockedTable=i.lockedContent=i.lockedHeader=i.lockedFooter=i._groupableClickHandler=i._groupRows=i._setContentWidthHandler=null},getOptions:function(){var i,n,o,r=this.options;return r.dataSource=null,i=Le(!0,{},this.options),i.columns=Te.deepExtend([],this.columns),n=this.dataSource,o=n.options.data&&n._data,n.options.data=null,i.dataSource=e.extend(!0,{},n.options),n.options.data=o,i.dataSource.data=o,i.dataSource.page=n.page(),i.dataSource.filter=n.filter(),i.dataSource.pageSize=n.pageSize(),i.dataSource.sort=n.sort(),i.dataSource.group=n.group(),i.dataSource.aggregate=n.aggregate(),i.dataSource.transport&&(i.dataSource.transport.dataSource=null),i.pageable&&i.pageable.pageSize&&(i.pageable.pageSize=n.pageSize()),i.$angular=t,i},setOptions:function(e){var t,i,n,o,r=this.getOptions();Te.deepExtend(r,e),e.dataSource||(r.dataSource=this.dataSource),t=this.wrapper,i=this._events,n=this.element,this.destroy(),this.options=null,this._isMobile&&(o=t.closest(Te.roleSelector("pane")).parent(),o.after(t),o.remove(),t.removeClass("k-grid-mobile")),t[0]!==n[0]&&(t.before(n),t.remove()),n.empty(),this.init(n,r,i),this._setEvents(r)},items:function(){return this.lockedContent?this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))):this._items(this.tbody)},_items:function(t){return t.children().filter(function(){var t=e(this);return!t.hasClass("k-grouping-row")&&!t.hasClass("k-detail-row")&&!t.hasClass("k-group-footer")})},dataItems:function(){var e,t,i,n=Te.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(e=n.length,t=Array(2*e),i=e;--i>=0;)t[i]=t[i+e]=n[i];n=t}return n},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead&&(this.angular("cleanup",function(){return{elements:t.thead.get()}}),t.thead.add(t.lockedHeader).find("th").each(function(){var t=e(this),i=t.data("kendoFilterMenu"),n=t.data("kendoColumnSorter"),o=t.data("kendoColumnMenu");i&&i.destroy(),n&&n.destroy(),o&&o.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,i,n=this,o=$(n.columns||[]);for(t=0,i=o.length;t<i;t++)e=o[t].command,e&&l(n,n.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,i=t.element;i.is("table")||(i=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),i.length||(i=e("<table />").appendTo(t.element))),bi&&i.attr("cellspacing",0),t.table=i.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,i){var n,o,r,s,a,l,c,d=this,u=d.options.columnResizeHandleWidth,h=d.options.scrollable,p=d.resizeHandle,f=this._groups();if(p&&d.lockedContent&&p.data("th")[0]!==i[0]&&(p.off(rt).remove(),p=null),p||(p=d.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'),t.append(p)),vi)n=i.position().left,h&&(s=i.closest(".k-grid-header-wrap, .k-grid-header-locked"),a=_i.msie?s.scrollLeft():0,l=_i.webkit?s[0].scrollWidth-s[0].offsetWidth-s.scrollLeft():0,c=_i.mozilla?s[0].scrollWidth-s[0].offsetWidth-(s[0].scrollWidth-s[0].offsetWidth-s.scrollLeft()):0,n-=l-c+a);else{for(n=i[0].offsetWidth,o=K(i.closest("thead")).filter(":visible"),r=0;r<o.length&&o[r]!=i[0];r++)n+=o[r].offsetWidth;f>0&&(n+=Fe(t.find(".k-group-cell:first"))*f),d._hasDetails()&&(n+=Fe(t.find(".k-hierarchy-cell:first")))}p.css({top:i.position().top,left:n-u,height:Pe(i),width:3*u}).data("th",i).show(),p.off("dblclick"+rt).on("dblclick"+rt,function(){d._autoFitLeafColumn(i.data("index"))})},_positionColumnResizeHandle:function(){var i=this,n=i.lockedHeader?i.lockedHeader.find("thead:first"):e();i.thead.add(n).on("mousemove"+rt,"th",function(n){var o=t!==n.buttons?n.buttons:n.which||n.button,r=e(this);r.hasClass("k-group-cell")||r.hasClass("k-hierarchy-cell")||t!==o&&0!==o||i._createResizeHandle(r.closest("div"),r)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off(rt).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,i=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new Te.UserEvents(i.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,hold:function(i){var n=e(i.target);i.preventDefault(),n.addClass("k-column-active"),t._createResizeHandle(n.closest("div"),n),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=Ue(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},resizeColumn:function(i,n){var o,r,s,a,l=this,c=!!i.locked,d=!!i.hidden,u=this.options,h=Te.support.mobileOS?0:Te.support.scrollbar(),p=c?Ve(i,j(l.columns)):Ve(i,q(l.columns)),f=c?l.lockedTable:l.table,m=l.footer||e(),g=c?l.lockedHeader.find("table"):l.thead.closest("table"),v=i.minResizableWidth||10,_=Fe(c?f.find("tbody"):l.tbody);return d?(i.width=n>v?n:v,t):(l.footer&&l.lockedContent&&(m=l.footer.children(c?".k-grid-footer-locked":".k-grid-footer-wrap")),o=u.scrollable?g.find("col:not(.k-group-col,.k-hierarchy-col):eq("+p+")").add(f.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")).add(m.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")):f.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")"),u.scrollable?(r=!1,s=l.wrapper.width()-h,a=n=n>v?n:v,c&&_-n+a>s&&(a=n+(s-_-2*h),a<0&&(a=n),r=!0),a>10&&a>=v&&(o.css("width",a),_&&(a=r?s-2*h:_+(n-i.width),f.add(g).add(m).css("width",a),c||(l._footerWidth=a))),l._scrollVirtualWrapperOnColumnResize()):n>10&&n>=v&&o.css("width",n),i.width=n,l._applyLockedContainersWidth(),l._syncLockedContentHeight(),l._syncLockedHeaderHeight(),t)},_resizable:function(){var t,i,n,o,s,a,l,c,d=this,u=d.options,h=this._isMobile,p=Te.support.mobileOS?0:Te.support.scrollbar();u.resizable&&(t=u.scrollable?d.wrapper.find(".k-grid-header-wrap:first"):d.wrapper,h?d._positionColumnResizeHandleTouch(t):d._positionColumnResizeHandle(t),d.resizable&&d.resizable.destroy(),d.resizable=new De.Resizable(t.add(d.lockedHeader),{handle:(u.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('<div class="k-grid-resize-indicator" />').css({height:Pe(t.data("th"))+d.tbody.attr("clientHeight")})},start:function(t){var p,f,m,g,v;c=e(t.currentTarget).data("th"),h&&d._hideResizeHandle(),p=c.closest("table"),f=e.inArray(c[0],K(c.closest("thead")).filter(":visible")),a=p.parent().hasClass("k-grid-header-locked"),m=a?d.lockedTable:d.table,g=d.footer||e(),d.footer&&d.lockedContent&&(g=d.footer.children(a?".k-grid-footer-locked":".k-grid-footer-wrap")),r(d.wrapper,"col-resize"),l=u.scrollable?p.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")").add(m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")):m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")"),v=e.map(d.columns,function(e){return!e.hidden&&(a&&e.locked||!a&&!e.locked)?e:null}),i=t.x.location,n=Fe(c),o=$(v)[f].minResizableWidth||10,s=Fe(a?m.children("tbody"):d.tbody),_i.webkit&&d.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var r,h,f,m,g,v,_=vi?-1:1,b=n+t.x.location*_-i*_;u.scrollable?(a&&d.lockedFooter?r=d.lockedFooter.children("table"):d.footer&&(r=d.footer.find(">.k-grid-footer-wrap>table")),r&&r[0]||(r=e()),h=c.closest("table"),f=a?d.lockedTable:d.table,m=!1,g=d.wrapper.width()-p,v=b,a&&s-n+v>g&&(v=n+(g-s-2*p),v<0&&(v=b),m=!0),v>10&&v>=o&&(l.css("width",v),s&&(v=m?g-2*p:s+t.x.location*_-i*_,f.add(h).add(r).css("width",v),a||(d._footerWidth=v))),d._scrollVirtualWrapperOnColumnResize()):b>10&&b>=o&&l.css("width",b)},resizeend:function(){var e,t,i,o=Fe(c);r(d.wrapper,""),_i.webkit&&d.wrapper.removeClass("k-grid-column-resizing"),n!=o&&(t=d.lockedHeader?d.lockedHeader.find("thead:first tr:first").add(d.thead.find("tr:first")):c.parent(),i=c.attr(Te.attr("index")),i||(i=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(c)),e=$(d.columns)[i],e.width=o,d.trigger(Lt,{column:e,oldWidth:n,newWidth:o}),d._applyLockedContainersWidth(),d._syncLockedContentHeight(),d._syncLockedHeaderHeight()),d._hideResizeHandle(),c=null}}))},_draggable:function(){var t,i=this;i.options.reorderable&&(i._draggableInstance&&i._draggableInstance.destroy(),t=i.wrapper.children(".k-grid-header"),i._draggableInstance=i.wrapper.kendoDraggable({group:Te.guid(),autoScroll:!0,filter:i.content?".k-grid-header:first "+ot:"table:first>.k-grid-header "+ot,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+rt+"scrolling").bind("scroll"+rt+"scrolling",function(e){i.virtualScrollable?i.content.find(">.k-virtual-scrollable-wrap").scrollLeft(this.scrollLeft):i.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)})},dragend:function(){t.children(".k-grid-header-wrap").unbind("scroll"+rt+"scrolling")},drag:function(){i._hideResizeHandle()},hint:function(t){var i=t.attr(Te.attr("title"));return i&&(i=Te.htmlEncode(i)),e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(i||t.attr(Te.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}).data("kendoDraggable"))},_reorderable:function(){var t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(e,i){var n=F(t.columns);return n[e].lockable!==!1&&P(n,t.columns,e,i)>-1},inSameContainer:function(i){return e(i.source).parent()[0]===e(i.target).parent()[0]&&P(F(t.columns),t.columns,i.sourceIndex,i.targetIndex)>-1},change:function(e){var i=F(t.columns),n=i[e.oldIndex],o=P(i,t.columns,e.oldIndex,e.newIndex);t.trigger(Ht,{newIndex:o,oldIndex:Ve(n,i),column:n}),t.reorderColumn(o,n,"before"===e.position)}}))},_reorderHeader:function(e,t,i){var n,o,r,l,c=this,d=E(e[0],c.columns),u=E(t,c.columns),h=[];for(n=0;n<e.length;n++)e[n].columns&&(h=h.concat(e[n].columns));o=a(c.lockedHeader,c.thead,"tr:eq("+d.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),r=W(e).length,l=W([t]).length,h.length?(r>0&&0===l?S(e,t,h,c.columns,c.lockedHeader.find("thead"),c.thead,this._groups()):0===r&&l>0&&S(e,t,h,U(c.columns),c.thead,c.lockedHeader.find("thead"),this._groups()),(t.columns||d.cell-u.cell>1||u.cell-d.cell>1)&&(t=M(c.columns,t,e[0],i,c.columns),t&&c._reorderHeader(h,t,i))):r!==l&&C(o[d.cell],c.columns,r),s(o,d.cell,u.cell,i,e.length)},_reorderContent:function(t,i,n){var o,r,l,c,d,u,h=this,p=e(),f=t[0],m=w(t),g=Ve(f,$(h.columns)),v=Ve(i,$(h.columns)),_=Ve(m[0],G(h.columns)),b=Ve(i,G(h.columns)),y=W(h.columns).length,k=!!i.locked,x=h.footer||h.wrapper.find(".k-grid-footer"),C=o=b;for(i.hidden&&(l=k?W(h.columns):U(h.columns),w(l).length>0?(C=o=b=this._findClosestVisibleColumnIndex(l,v),r=w(l.slice(v)).length>0):k?(b=h.lockedTable.find("colgroup"),C=h.lockedHeader.find("colgroup"),o=e(h.lockedFooter).find(">table>colgroup")):(b=h.tbody.prev(),C=h.thead.prev(),o=x.find(".k-grid-footer-wrap").find(">table>colgroup"))),h._hasFilterRow()&&s(h.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),g,v,n,t.length),_>=0&&s(a(h.lockedHeader,h.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,C,r?r:n,m.length),h.options.scrollable&&_>=0&&s(a(h.lockedTable,h.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,b,r?r:n,m.length),x&&x.length&&(_>=0&&s(a(h.lockedFooter,x.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),_,o,r?r:n,m.length),s(x.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),g,v,n,t.length)),c=h.tbody.children(":not(.k-grouping-row,.k-detail-row)"),h.lockedTable&&(y>v?y<=g&&ce(h.lockedTable.find(">tbody>tr.k-grouping-row"),h.table.find(">tbody>tr.k-grouping-row"),t.length):y>g&&ce(h.table.find(">tbody>tr.k-grouping-row"),h.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),p=h.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),d=0,u=c.length;d<u;d+=1)s(a(p[d],c[d],">td:not(.k-group-cell,.k-hierarchy-cell)"),g,v,n,t.length)},_findClosestVisibleColumnIndex:function(e,t){var i=w(e.slice(t)).length>0?e.slice(t):e.slice(0,t+1).reverse(),n=w(i)[0];return Ve(n,w(this.columns))},_autoFitLeafColumn:function(e){this.autoFitColumn($(this.columns)[e])},autoFitColumn:function(t){var i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,_,w,y,k,x,C=this,S=C.options,T=C.columns,D=C.lockedHeader?K(C.lockedHeader.find(">table>thead")).filter(v).length:0,A="col:not(.k-group-col):not(.k-hierarchy-col)",E="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?T[t]:Be(t)?Ne(z(T),function(e){return e===t})[0]:Ne(z(T),function(e){return e.field===t})[0],t&&b(t)){for(a=t.minResizableWidth,i=Ve(t,$(T)),r=t.locked,o=r?C.lockedHeader.children("table"):C.thead.parent(),n=o.find("[data-index='"+i+"']"),d=r?C.lockedTable:C.table,u=C.footer||e(),C.footer&&C.lockedContent&&(u=C.footer.children(r?".k-grid-footer-locked":".k-grid-footer-wrap")),h=u.find("table").first(),C.lockedHeader&&!r&&(i-=D),p=0;p<T.length&&T[p]!==t;p++)T[p].hidden&&i--;if(S.scrollable?(s=o.find(A).eq(i).add(d.children("colgroup").find(A).eq(i)).add(h.find("colgroup").find(A).eq(i)),r||(l=d.parent(),c=l.scrollLeft())):s=d.children("colgroup").find(A).eq(i),f=o.add(d).add(h),m=Fe(n),s.width(""),f.css("table-layout","fixed"),s.width("auto"),f.addClass("k-autofitting"),f.css("table-layout",""),g=Math.ceil(Math.max(Fe(n),Fe(d.find("tr:not(.k-grouping-row)").eq(0).children(E).eq(i)),Fe(h.find("tr").eq(0).children(E).eq(i))))+1,a&&a>g&&(g=a),s.width(g),t.width=g,S.scrollable){for(_=o.find("col"),y=0,k=0,x=_.length;k<x;k+=1)if(w=_[k].style.width,w&&w.indexOf("%")==-1)y+=parseInt(w,10);else{if(!_.eq(k).hasClass("k-group-col")){y=0;break}y+=parseInt(_.eq(k).width(),10)}y&&f.each(function(){this.style.width=y+"px"})}_i.msie&&8==_i.version&&(f.css("display","inline-table"),setTimeout(function(){f.css("display","table")},1)),f.removeClass("k-autofitting"),c&&l.scrollLeft(c),C.trigger(Lt,{column:t,oldWidth:m,newWidth:g}),C._applyLockedContainersWidth(),C._syncLockedContentHeight(),C._syncLockedHeaderHeight()}},reorderColumn:function(e,i,n){var o,r,s=this,a=d(i,s.columns),l=a?a.columns:s.columns,c=Ve(i,l),u=l[e],h=!!u.locked,p=W(s.columns).length,f=Ne($(s.columns),function(e){return e.groupHeaderColumnTemplate});c!==e&&(!i.locked&&h&&1==U(s.columns).length||i.locked&&!h&&1==p||(s._hideResizeHandle(),n===t&&(n=e<c),r=[i],s._reorderHeader(r,u,n),s.lockedHeader&&(O(s.thead),O(s.lockedHeader)),u.columns&&(u=$(u.columns),u=u[n?0:u.length-1]),i.columns&&(r=$(i.columns)),s._reorderContent(r,u,n),o=!!i.locked,o=o!=h,i.locked=h,l.splice(n?e:e+1,0,i),l.splice(c<e?c:c+1,1),s._updateLockedCols(),s._updateCols(),s._templates(),s._updateColumnCellIndex(),f.length>0&&s._renderGroupRows(),s._updateTablesWidth(),s._applyLockedContainersWidth(),s._syncLockedHeaderHeight(),s._syncLockedContentHeight(),s._updateFirstColumnClass(),o&&(h?s.trigger(Nt,{column:i}):s.trigger(Ot,{column:i}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=T(e,W(this.columns))),T(this.thead,U(this.columns),t)},lockColumn:function(e){var t,i=this.columns;e="number"==typeof e?i[e]:Ne(i,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(t=W(i).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,i=this.columns;e="number"==typeof e?i[e]:Ne(i,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=W(i).length,this.reorderColumn(t,e,!0))},cellIndex:function(t){var i=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(i=$(W(this.columns)).length),e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)+i},_modelForContainer:function(t){t=e(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var i=t.attr(Te.attr("uid"));return this.dataSource.getByUid(i)},_editable:function(){var t,i=this,n=i.selectable&&i.selectable.options.multiple,o=i.options.editable,r=function(){var t=Me(),n=i._editContainer;n&&n[0]&&!e.contains(n[0],t)&&n[0]!==t&&!e(t).closest(".k-animation-container").length&&(i.editable.end()?i.closeCell():i._scrollVirtualWrapper())};o&&(this.wrapper.addClass("k-editable"),t=i._editMode(),"incell"===t?(i.table.add(i.lockedTable).on("mousedown"+rt,Ze+">"+Je,function(t){var n=e(t.target);"incell"===i._editMode()&&n.hasClass("k-checkbox-label")&&n.prev().attr(Te.attr("bind"))&&t.preventDefault()}),o.update!==!1&&(ki&&i.wrapper.on(Wt+rt,".k-edit-cell > input[type='checkbox']",function(t){e(t.target).focus()}).on(Wt+rt,".k-edit-cell",function(t){e(t.target).is("input")||e(t.currentTarget).find("input[type='checkbox']").focus()}).on(Ut+rt,"tr:not(.k-grouping-row) > td",function(t){var n=i._editContainer;i._mousedownOnEditCell=!!(n&&n[0]&&e.contains(n[0],t.target)||n[0]===t.target)}),i.wrapper.on(Wt+rt,"tr:not(.k-grouping-row) > td",function(t){var o=e(this),r=i.lockedTable&&o.closest("table")[0]===i.lockedTable[0];i._mousedownOnEditCell=!1,o.hasClass("k-hierarchy-cell")||o.hasClass("k-detail-cell")||o.hasClass("k-group-cell")||o.hasClass("k-edit-cell")||o.has("a.k-grid-delete").length||o.has("button.k-grid-delete").length||o.closest("tbody")[0]!==i.tbody[0]&&!r||e(t.target).is(":input")||(i.editable?i.editable.end()?(n&&e(Me()).blur(),i.closeCell(),i.editCell(o)):i._scrollVirtualWrapper():i.editCell(o))}).on("focusin"+rt,function(){e.contains(this,Me())||(clearTimeout(i.timer),i.timer=null)}).on("focusout"+rt,function(e){var t=!0;ki&&i._mousedownOnEditCell&&(t=!1),i._mousedownOnEditCell=!1,t&&(i.timer=setTimeout(function(){r(e)},1))}))):o.update!==!1&&(i.wrapper.on(Wt+rt,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),i.editRow(e(this).closest("tr"))}),i._isVirtualInlineEditable()&&i.wrapper.on("focusout"+rt,"tr:not(.k-grouping-row) > td",function(){i.editable&&!i.editable.end()&&i._scrollVirtualWrapper()})),o.destroy!==!1?i.wrapper.on(Wt+rt,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(t){t.preventDefault(),t.stopPropagation(),i.removeRow(e(this).closest("tr"))}):i.wrapper.on(Wt+rt,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){e.stopPropagation(),i._confirmation()||e.preventDefault()}))},editCell:function(t){var i,n,o,r;if(t=e(t),i=this,n=$(i.columns)[i.cellIndex(t)],o=i._modelForContainer(t),i.closeCell(),o&&ve(n,o)&&!n.command){if(i.trigger(ct,{model:o}))return;i._attachModelChange(o),i._editContainer=t,i._shouldClearEditableState&&i._clearEditableState(),i.editable=t.addClass("k-edit-cell").kendoEditable({fields:{field:n.field,format:n.format,editor:n.editor,values:n.values},model:o,target:i,change:function(e){i.trigger(dt,{values:e.values,container:t,model:o})&&e.preventDefault()},skipFocus:!(!i._isVirtualIncellEditable()||!i._editableState)}).data("kendoEditable"),r=t.parent().addClass("k-grid-edit-row"),i.lockedContent&&he(r[0],i._relatedRow(r).addClass("k-grid-edit-row")[0]),i.trigger(lt,{container:t,model:o})}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),i=e[0].offsetWidth>t[0].clientWidth?Te.support.scrollbar():0;this.lockedContent.height(t.height()-i)},_syncLockedContentHeight:function(){this.lockedTable&&(this.touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var e,t;this.lockedHeader&&(e=this.lockedHeader.children("table"),t=this.thead.parent(),this._adjustRowsHeight(e,t),ue(e,t))},_syncLockedFooterHeight:function(){this.lockedFooter&&this.footer&&this.footer.length&&this._adjustRowsHeight(this.lockedFooter.children("table"),this.footer.find(".k-grid-footer-wrap > table"))},_destroyEditable:function(){var e=this,t=function(){if(e.editable){var t=e.editView?e.editView.element:e._editContainer;t&&(t.off(Wt+rt,"a.k-grid-cancel",e._editCancelClickHandler),t.off(Wt+rt,"a.k-grid-update",e._editUpdateClickHandler)),e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView(),e._editableIsClosing=null}};e.editable&&("popup"!==e._editMode()||e._isMobile?t():(e._editableIsClosing=!0,
e._editContainer.data("kendoWindow").bind("deactivate",t).close())),e._actionSheet&&(e._actionSheet.destroy(),e._actionSheet=null)},_destroyEditView:function(){this.editView&&(this.editView.purge(),this.editView=null,this.pane.navigate(""))},_attachModelChange:function(e){var t=this;t._modelChangeHandler=function(e){t._modelChange({field:e.field,model:this})},e.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var e=this,t=e._editContainer,i=e._modelForContainer(t);i&&i.unbind(_t,e._modelChangeHandler)},closeCell:function(e){var t,i,n,o=this,r=o._editContainer;r&&(n=o._modelForContainer(r),e&&o.trigger("cancel",{container:r,model:n})||(o.trigger(vt,{type:e?"cancel":"save",model:n,container:r}),r.removeClass("k-edit-cell"),t=$(o.columns)[o.cellIndex(r)],i=r.parent().removeClass("k-grid-edit-row"),o.lockedContent&&o._relatedRow(i).removeClass("k-grid-edit-row"),o._destroyEditable(),o._displayCell(r,t,n),o._shouldClearEditableState&&o._clearEditableState(),o.trigger("itemChange",{item:i,data:n,ns:De}),o.lockedContent&&he(i.css("height","")[0],o._relatedRow(i).css("height","")[0])))},_displayCell:function(e,t,i){var n=this,o={storage:{},count:0},r=Le({},Te.Template,n.options.templateSettings),s=Te.template(n._cellTmpl(t,o),r);o.count>0&&(s=Ue(s,o.storage)),e.empty().html(s(i)),n.angular("compile",function(){return{elements:e,data:[{dataItem:i}]}})},removeRow:function(e){this._confirmation(e)&&this._removeRow(e)},_removeRow:function(t){var i,n,o,r,s=this,a=s._editMode();"incell"!==a&&s.cancelRow(),t=e(t),s.lockedContent&&(t=t.add(s._relatedRow(t))),t=t.hide(),i=s._modelForContainer(t),i&&!s.trigger(ut,{row:t,model:i})?(r=s.dataSource.options.schema,s._selectedIds&&r&&r.model&&(n=qe(s.dataSource.options.schema.model)?s.dataSource.options.schema.model.fn.idField:s.dataSource.options.schema.model.id,o=i[n],delete s._selectedIds[o]),s.dataSource.remove(i),"inline"!==a&&"popup"!==a||s.dataSource.sync()):"incell"===a&&s._destroyEditable()},_editMode:function(){var e="incell",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e},editRow:function(t){var i,n,o,r=this;t instanceof Ee?i=t:(t=e(t),i=r._modelForContainer(t)),n=r._editMode(),r.cancelRow(),i&&(t=r.tbody.children("["+Te.attr("uid")+"="+i.uid+"]"),r._attachModelChange(i),"popup"===n?r._createPopupEditor(i):"inline"===n?r._createInlineEditor(t,i):"incell"===n&&e(t).children(Qe).each(function(){var t=e(this),n=$(r.columns)[r.cellIndex(t)];if(i=r._modelForContainer(t),i&&(!i.editable||i.editable(n.field))&&n.field&&!n.selectable)return r.editCell(t),!1}),o=r.editView?r.editView.element:r._editContainer,o&&(this._editCancelClickHandler||(this._editCancelClickHandler=Ue(this._editCancelClick,this)),o.on(Wt+rt,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=Ue(this._editUpdateClick,this)),o.on(Wt+rt,"a.k-grid-update",this._editUpdateClickHandler)))},_editUpdateClick:function(e){e.preventDefault(),e.stopPropagation(),this.saveRow()},_editCancelClick:function(t){var i,n=this,o=n.options.navigatable,r=n.editable.options.model,s=n.editView?n.editView.element:n._editContainer;t.preventDefault(),t.stopPropagation(),n.trigger("cancel",{container:s,model:r})||(i=n.items().index(e(n.current()).parent()),n.cancelRow(),o&&(n._setCurrent(n.items().eq(i).children().filter(Je).first()),fe(n.table,!0)))},_createPopupEditor:function(i){var n,o,r,s,a,l,c,d,u,h,p,f,m,g=this,v="<div "+Te.attr("uid")+'="'+i.uid+'" class="k-popup-edit-form'+(g._isMobile?" k-mobile-list":"")+'"><div class="k-edit-form-container">',_=[],b=$(g.columns),w=g.options.editable,y=w.template,k=Be(w)?w.window:{},x=Le({},Te.Template,g.options.templateSettings);if(!g.trigger(ct,{model:i})){if(k=k||{},y)for(typeof y===$t&&(y=window.unescape(y)),v+=Te.template(y,x)(i),r=0,s=b.length;r<s;r++)n=b[r],n.command&&(h=pe(n.command,"edit"),h&&(o=h));else for(r=0,s=b.length;r<s;r++)n=b[r],n.selectable||(n.command?n.command&&(h=pe(n.command,"edit"),h&&(o=h)):(v+='<div class="k-edit-label"><label for="'+n.field+'">'+(n.title||n.field||"")+"</label></div>",ve(n,i)?(_.push({field:n.field,format:n.format,editor:n.editor,values:n.values}),v+="<div "+Te.attr("container-for")+'="'+n.field+'" class="k-edit-field"></div>'):(f={storage:{},count:0},a=Te.template(g._cellTmpl(n,f),x),f.count>0&&(a=Ue(a,f.storage)),v+='<div class="k-edit-field">'+a(i)+"</div>")));o&&Be(o)&&(Be(o.text)&&(l=o.text.update,c=o.text.cancel),Be(o.iconClass)&&(d=o.iconClass.update,u=o.iconClass.cancel),o.attr&&(p=o.attr)),g._isMobile?(v+="</div></div>",g.editView=g.pane.append("<div data-"+Te.ns+'role="view" data-'+Te.ns+'use-native-scrolling="true" data-'+Te.ns+'init-widgets="false" class="k-grid-edit-form"><div data-'+Te.ns+'role="header" class="k-header">'+g._createButton({name:"update",text:l,attr:p})+(k.title||"Edit")+g._createButton({name:"canceledit",text:c,attr:p})+"</div>"+v+"</div>"),m=g._editContainer=g.editView.element.find(".k-popup-edit-form")):(v+='<div class="k-edit-buttons k-state-default">',v+=g._createButton({name:"update",text:l,attr:p,iconClass:d})+g._createButton({name:"canceledit",text:c,attr:p,iconClass:u}),v+="</div></div></div>",m=g._editContainer=e(v).appendTo(g.wrapper).eq(0).kendoWindow(Le({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(n){if(n.userTriggered){if(n.sender.element.focus(),g.trigger("cancel",{container:m,model:i}))return n.preventDefault(),t;var o=g.items().index(e(g.current()).parent());g.cancelRow(),g.options.navigatable&&(g._setCurrent(g.items().eq(o).children().filter(Je).first()),fe(g.table,!0))}}},k))),g.editable=g._editContainer.kendoEditable({fields:_,model:i,clearContainer:!1,target:g}).data("kendoEditable"),g._isMobile&&m.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),g._openPopUpEditor(),g.trigger(lt,{container:m,model:i})}},_openPopUpEditor:function(){var e=this,t=e._editContainer?e._editContainer.data("kendoWindow"):null,i=(e.options.editable||{}).window||{};this._isMobile?this.pane.navigate(this.editView,this._editAnimation):t&&(i.position||t.center(),t.open())},_createInlineEditor:function(t,i){var n,o,r,s=this,a=[];s.trigger(ct,{model:i})||(s.lockedContent&&(t=t.add(s._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(o=e(this),n=$(s.columns)[s.cellIndex(o)],!n.command&&ve(n,i))a.push({field:n.field,format:n.format,editor:n.editor,values:n.values}),o.attr(Te.attr("container-for"),n.field),o.empty();else if(n.command&&(r=pe(n.command,"edit"))){o.empty();var t,l,c,d,u;Be(r)&&(Be(r.text)&&(t=r.text.update,l=r.text.cancel),Be(r.iconClass)&&(c=r.iconClass.update,d=r.iconClass.cancel),r.attr&&(u=r.attr)),e(s._createButton({name:"update",text:t,attr:u,iconClass:c})+s._createButton({name:"canceledit",text:l,attr:u,iconClass:d})).appendTo(o)}}),s._editContainer=t,s._editContainer.addClass("k-grid-edit-row"),s._shouldClearEditableState&&s._clearEditableState(),s.editable=new Te.ui.Editable(s._editContainer,{target:s,fields:a,model:i,skipFocus:!!(s._isVirtualInlineEditable()&&s._editableState&&s._editableState.field),clearContainer:!1}),t.length>1&&(he(t[0],t[1]),s._applyLockedContainersWidth()),s.trigger(lt,{container:t,model:i}))},cancelRow:function(e){var t,i=this,n=i._editContainer;if(n){if(t=i._modelForContainer(n),!t||e&&i.trigger("cancel",{container:n,model:t}))return;i._destroyEditable(),i.dataSource.cancelChanges(t),i._clearEditableState(),i._displayRow("popup"!==i._editMode()?n:i.tbody.find("["+Te.attr("uid")+"="+t.uid+"]"))}},saveRow:function(){var t,i=this,n=this._editContainer,o=this._modelForContainer(n),r=e.Deferred();return n&&this.editable?(t=i.editable&&i.editable.end(),!t||this.trigger(dt,{container:n,model:o})?(t||i._scrollVirtualWrapper(),r.reject().promise()):(i._clearEditableState(),this.dataSource.sync())):r.resolve().promise()},_displayRow:function(t){var i,n,o,r,s,a=this,l=a._modelForContainer(t),c=t.hasClass("k-state-selected"),d=t.hasClass("k-alt");l&&(a.lockedContent&&(i=e((d?a.lockedAltRowTemplate:a.lockedRowTemplate)(l)),a._relatedRow(t.last()).replaceWith(i)),a.angular("cleanup",function(){return{elements:t.get()}}),n=e((d?a.altRowTemplate:a.rowTemplate)(l)),t.is(":visible")||n.hide(),t.replaceWith(n),a.trigger("itemChange",{item:n,data:l,ns:De}),i&&i.length&&a.trigger("itemChange",{item:i,data:l,ns:De}),r=n,s=[{dataItem:l}],i&&i.length&&(r=n.add(i),s.push({dataItem:l})),a.angular("compile",function(){return{elements:r.get(),data:s}}),c&&(a.options.selectable||a._checkBoxSelection)&&a.select(n.add(i)),i&&he(n[0],i[0]),o=n.next(),o.hasClass("k-detail-row")&&o.is(":visible")&&n.find(".k-hierarchy-cell .k-icon").removeClass("k-i-expand").addClass("k-i-collapse"))},_showMessage:function(t,i){var n,o,r,s=this;return s._isMobile?(n=Te.template('<ul><li class="km-actionsheet-title">#:title#</li><li><a href="\\#" class="k-button k-grid-delete">#:confirmDelete#</a></li></ul>'),o=e(n(t)).appendTo(s.view.element),r=s._actionSheet=new Te.mobile.ui.ActionSheet(o,{cancel:t.cancelDelete,cancelTemplate:'<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',close:function(){this.destroy()},command:function(t){var n=e(t.currentTarget).parent();n.hasClass("km-actionsheet-cancel")||s._removeRow(i)},popup:s._actionSheetPopupOptions}),r.open(i),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,i=t.options.editable,n=i===!0||typeof i===$t?t.options.messages.editable.confirmation:i.confirmation;return Be(i)&&typeof i.mode===$t&&typeof n!==Gt&&typeof n!==$t&&n!==!1&&(n=t.options.messages.editable.confirmation),n===!1||null==n||(typeof n===Gt&&(n=n(t._modelForContainer(e))),t._showMessage({confirmDelete:i.confirmDelete||t.options.messages.editable.confirmDelete,cancelDelete:i.cancelDelete||t.options.messages.editable.cancelDelete,title:n===!0?t.options.messages.editable.confirmation:n},e))},cancelChanges:function(){var e=this;e.dataSource.cancelChanges(),e._isVirtualEditable()&&e._virtualPageToTop(function(){e.virtualScrollable.scrollToTop()})},saveChanges:function(){var e=this,t=e.editable&&e.editable.end();!t&&e.editable||e.trigger(yt)?t||e._scrollVirtualWrapper():e.dataSource.sync()},addRow:function(){var e,t,i=this,n=i.dataSource,o=i._editMode(),r=i.options.editable.createAt||"",s=n.pageSize(),a=n.view()||[],l=r.toLowerCase()===Kt,c=i._isVirtualEditable();i.editable&&i.editable.end()||!i.editable?("incell"!=o&&i.cancelRow(),e=n.indexOf(a[0]),l&&(e+=a.length,s&&!n.options.serverPaging&&s<=a.length&&(e-=1)),e<0&&(e=n.page()>n.totalPages()?(n.page()-1)*s:0),i.options.navigatable&&"incell"==o&&i._removeCurrent(),c?i._virtualAddRow():(t=n.insert(e,{}),i._editModel(t))):i._scrollVirtualWrapper()},_editModel:function(e){var t,i,n,o,r=this,s=r.options.editable.createAt||"",a=r._editMode();e&&(t=e.uid,i=r.lockedContent?r.lockedTable:r.table,n=i.find("tr["+Te.attr("uid")+"="+t+"]"),o=n.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(r._firstEditableColumnIndex(n)),"inline"===a&&n.length?r.editRow(n):"popup"===a?r.editRow(e):o.length&&r.editCell(o),"bottom"==s.toLowerCase()&&r.lockedContent&&(r.lockedContent[0].scrollTop=r.content[0].scrollTop=r.table[0].offsetHeight))},_virtualAddRow:function(){var e=this,t=(e.options.editable.createAt||"").toLowerCase()===Kt;e._clearEditableState(),t?e._virtualAddRowAtBottom():e._virtualAddRowAtTop()},_virtualAddRowAtTop:function(){var e,t=this,i=t.dataSource,n=t.virtualScrollable;1===i.page()?(e=i.insert(0,{}),t._editModel(e),n.scrollToTop()):t._virtualPageToTop(function(){e=i.insert(0,{}),t._editModel(e),n.scrollToTop()})},_virtualAddRowAtBottom:function(){var e,t=this,i=t.dataSource,n=t.virtualScrollable,o=i.total();i.at(o-1)instanceof Ee?(e=i.insert(o,{}),t._virtualPageToBottom(function(){t._editModel(e),n.scrollToBottom()})):t._virtualPageToBottom(function(){e=i.insert(o,{}),t._editModel(e),n.scrollToBottom()})},_virtualPageToTop:function(e){var t=this;t._virtualPage(0,t.dataSource.take(),function(){e()})},_virtualPageToBottom:function(e){var t=this,i=t.dataSource,n=i.take(),o=i.total(),r=o>n?o-n:0;t._virtualPage(r,n,function(){e()})},_virtualPage:function(e,t,i){var n=this;n._isVirtualEditable()&&(n.virtualScrollable._preventScroll=!0,n.virtualScrollable._page(e,t,i))},_firstEditableColumnIndex:function(e){var t,i,n,o=this,r=$(o.columns),s=o._modelForContainer(e);for(i=0,n=r.length;i<n;i++)if(t=r[i],s&&(!s.editable||s.editable(t.field))&&!t.command&&t.field&&t.hidden!==!0)return i;return-1},_toolbar:function(){var t,i=this,n=i.wrapper,o=i.options.toolbar,r=i.options.editable;o&&(t=i.wrapper.find(".k-grid-toolbar"),t.length||(qe(o)||(o=typeof o===$t?o:i._toolbarTmpl(o).replace(di,"\\#"),o=Ue(Te.template(o),i)),t=e('<div class="k-header k-grid-toolbar" />').html(o({})).prependTo(n),i.angular("compile",function(){return{elements:t.get()}})),r&&r.create!==!1&&t.on(Wt+rt,".k-grid-add",function(e){e.preventDefault(),i.addRow()}).on(Wt+rt,".k-grid-cancel-changes",function(e){e.preventDefault(),i.cancelChanges()}).on(Wt+rt,".k-grid-save-changes",function(e){e.preventDefault(),i.saveChanges()}),t.on(Wt+rt,".k-grid-excel",function(e){e.preventDefault(),i.saveAsExcel()}),t.on(Wt+rt,".k-grid-pdf",function(e){e.preventDefault(),i.saveAsPDF()}))},_toolbarTmpl:function(e){var t,i,n=this,o="";if(Oe(e))for(t=0,i=e.length;t<i;t++)o+=n._createButton(e[t]);return o},_createButton:function(e){var i,n=e.template||fi,r=typeof e===$t?e:e.name||e.text,s=Ci[r]?Ci[r].className:"k-grid-"+(r||"").replace(/\s/g,""),a={className:s,text:r,attr:"",iconClass:""},l=this.options.messages.commands;if(!(r||Be(e)&&e.template))throw Error("Custom commands should have name specified");return Be(e)?(e=Le(!0,{},e),e.className&&Ve(a.className,e.className.split(" "))<0?e.className+=" "+a.className:e.className===t&&(e.className=a.className),"edit"===r&&(e=Le(!0,{},e),e.text=Be(e.text)?e.text.edit:e.text,e.iconClass=Be(e.iconClass)?e.iconClass.edit:e.iconClass),e.attr&&(Be(e.attr)&&(e.attr=o(e.attr)),typeof e.attr===$t&&(i=e.attr.match(/class="(.+?)"/),i&&Ve(i[1],e.className.split(" "))<0&&(e.className+=" "+i[1]))),a=Le(!0,a,Ci[r],{text:l[r]},e)):a=Le(!0,a,Ci[r],{text:l[r]}),Te.template(n)(a)},_hasFooters:function(){return!!this.footerTemplate||!!this.groupFooterTemplate||this.footer&&this.footer.length>0||this.wrapper.find(".k-grid-footer").length>0},_groupable:function(){var t=this;t._groupableClickHandler?t.table.add(t.lockedTable).off(Wt+rt,t._groupableClickHandler):t._groupableClickHandler=function(i){var n=e(this),o=n.closest("tr"),r=t._groupRows?t._groupRows[t.wrapper.find(".k-grouping-row").index(o)]:{};n.hasClass("k-i-collapse")?t.trigger("groupCollapse",{group:r,element:o})||t.collapseGroup(o):t.trigger("groupExpand",{group:r,element:o})||t.expandGroup(o),i.preventDefault(),i.stopPropagation()},t._isLocked()?t.lockedTable.on(Wt+rt,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(Wt+rt,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,i=t.wrapper,n=t.options.groupable,o=ot+"["+Te.attr("field")+"]",r=t.content?".k-grid-header:first "+o:"table:first>.k-grid-header "+o;n&&n.enabled!==!1&&(i.has("div.k-grouping-header")[0]||e("<div>&nbsp;</div>").addClass("k-grouping-header").prependTo(i),t.groupable&&t.groupable.destroy(),t.groupable=new De.Groupable(i,Le({},n,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:r,filter:r,allowDrag:t.options.reorderable,change:function(e){t.trigger("group",{groups:e.groups})?e.preventDefault():(t._clearEditableState(),t.dataSource.options.endless&&(t.dataSource.options.endless=null,t._endlessPageSize=t.dataSource.options.pageSize,t.dataSource._skip=0,t.dataSource._pageSize=t.dataSource._take=t._endlessPageSize,t.dataSource._page=1))}})))},_continuousItems:function(t,i){var n,o,r,s,a,l,c,d;if(this.lockedContent){for(n=this,o=n.table.add(n.lockedTable),r=e(t,o[0]),s=e(t,o[1]),a=i?W(n.columns).length:1,l=i?n.columns.length-a:1,c=[],d=0;d<r.length;d+=a)We.apply(c,r.slice(d,d+a)),We.apply(c,s.splice(0,l));return c}},_selectable:function(){var i,n,o,r,s=this,a=[],l=s._isLocked(),c=s.options.selectable;c&&(s.selectable&&s.selectable.destroy(),s._selectedIds={},c=Te.ui.Selectable.parseOptions(c),i=c.multiple,n=c.cell,s._hasDetails()&&(a[a.length]=".k-detail-row"),(s.options.groupable||s._hasFooters()||s._groups())&&(a[a.length]=".k-grouping-row,.k-group-footer"),a=a.join(","),""!==a&&(a=":not("+a+")"),o=s.table,l&&(o=o.add(s.lockedTable)),r=">"+(n?Xe:"tbody>tr"+a),s.selectable=new Te.ui.Selectable(o,{filter:r,aria:!0,multiple:i,change:function(){n||s._persistSelectedRows(),s.trigger(_t)},useAllItems:l&&i&&n,relatedTarget:function(t){var i,o,r,a;if(!n&&l){for(o=e(),r=0,a=t.length;r<a;r++)i=s._relatedRow(t[r]),Ve(i[0],t)<0&&(o=o.add(i));return o}},continuousItems:function(){return s._continuousItems(r,n)}}),s.options.navigatable&&o.on("keydown"+rt,function(r){var a=s.current(),c=r.target;if(r.keyCode===ze.SPACEBAR&&!r.shiftKey&&e.inArray(c,o)>-1&&!a.is(".k-edit-cell,.k-header")&&a.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(r.preventDefault(),r.stopPropagation(),a=n?a:a.parent(),l&&!n&&(a=a.add(s._relatedRow(a))),i)if(r.ctrlKey){if(a.hasClass(Rt))return a.removeClass(Rt),s.trigger(_t),t}else s.selectable.clear();else s.selectable.clear();n||(s.selectable._lastActive=a),s.selectable.value(a)}else!n&&(e(c).is("td")||e(c).is("table")&&Ve(c,this._navigatableTables))&&(r.shiftKey&&r.keyCode==ze.LEFT||r.shiftKey&&r.keyCode==ze.RIGHT||r.shiftKey&&r.keyCode==ze.UP||r.shiftKey&&r.keyCode==ze.DOWN||r.keyCode===ze.SPACEBAR&&r.shiftKey)&&(r.preventDefault(),r.stopPropagation(),a=a.parent(),l&&(a=a.add(s._relatedRow(a))),i?(s.selectable._lastActive||(s.selectable._lastActive=a),s.selectable.selectRange(s.selectable._firstSelectee(),a)):(s.selectable.clear(),s.selectable.value(a)))}))},_clipboard:function(){var e,t=this.options,i=t.selectable;i&&t.allowCopy&&(e=this,t.navigatable||e.table.add(e.lockedTable).attr("tabindex",0).on("mousedown"+rt+" keydown"+rt,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}).on("mousedown"+rt,Ze+">"+Je,Ue(be,e)),e.copyHandler=Ue(e.copySelection,e),e.updateClipBoardState=function(){e.areaClipBoard&&e.areaClipBoard.val(e.getTSV()).focus().select()},e.bind("change",e.updateClipBoardState),e.wrapper.on("keydown",e.copyHandler),e.clearAreaHandler=Ue(e.clearArea,e),e.wrapper.on("keyup",e.clearAreaHandler))},copySelection:function(t){t instanceof jQuery.Event&&!t.ctrlKey&&!t.metaKey||e(t.target).is("input:visible,textarea:visible")||window.getSelection&&""+window.getSelection()||document.selection&&document.selection.createRange().text||(this.areaClipBoard||(this.areaClipBoard=e("<textarea />").css({position:"fixed",top:"50%",left:"50%",opacity:0,width:0,height:0}).appendTo(this.wrapper)),this.areaClipBoard.val(this.getTSV()).focus().select())},getTSV:function(){var t,i,n,o,r,s,a=this,l=a.select(),c="\t",d=a.options.allowCopy,u=!0;return e.isPlainObject(d)&&d.delimeter&&(c=d.delimeter),t="",l.length&&(l.eq(0).is("tr")&&(l=l.find("td:not(.k-group-cell)")),u&&l.filter(":visible"),i=[],n=this.columns.length,o=a._isLocked()&&W(a.columns).length,r=!0,e.each(l,function(t,s){var l,c,d,h;s=e(s),l=s.closest("tr"),c=l.index(),d=s.index(),u&&(d-=s.prevAll(":hidden").length),o&&r&&(r=e.contains(a.lockedTable[0],s[0])),a._groups()&&r&&(d-=a._groups()),d=r?d:d+o,n>d&&(n=d),h=s.text(),i[c]||(i[c]=[]),i[c][d]=h}),s=i.length,i=e.each(i,function(e,t){t&&(i[e]=t.slice(n),s>e&&(s=e))}),e.each(i.slice(s),function(e,i){t+=i?i.join(c)+"\r\n":"\r\n"})),t},clearArea:function(t){var i;this.areaClipBoard&&t&&t.target===this.areaClipBoard[0]&&(i=this.options.navigatable?e(this.current()).closest("table"):this.table,fe(i,!0)),this.areaClipBoard&&(this.areaClipBoard.remove(),this.areaClipBoard=null)},_adaptiveColumns:function(){var e=this;e._anyColumnHasMediaQuery()&&(e._setColumnsMediaVisibility(e.columns),e._attachColumnMediaResizeHandler())},_anyColumnHasMediaQuery:function(){return this._columnsWithMediaQuery().length},_columnsWithMediaQuery:function(){return y(this.columns)},_attachColumnMediaResizeHandler:function(){var t=this;t._detachColumnMediaResizeHandler(),t._columnMediaResizeHandler=Ue(t._onColumnMediaResize,t),e(window).on(Bt+rt,t._columnMediaResizeHandler)},_detachColumnMediaResizeHandler:function(){var t=this;t._columnMediaResizeHandler&&e(window).off(Bt+rt,t._columnMediaResizeHandler)},_onColumnMediaResize:function(){var e=this;e._setColumnsMediaVisibility(e.columns),e._setContentMediaWidth()},_setColumnsMediaVisibility:function(e){var t,i=e||[];for(t=0;t<i.length;t++)this._setColumnMediaVisibility(i[t])},_setColumnMediaVisibility:function(e){var t=this;k(e.media)||(g(e)?(t._showColumnByMedia(e),e.hidden||t._setColumnsMediaVisibility(e.columns)):t._hideColumnByMedia(e))},_showColumnByMedia:function(e){e.hidden||this.showColumn(e),m(e)},_hideColumnByMedia:function(e){var t=e.hidden;t||(e._hideByMedia=!0,this.hideColumn(e),e._hideByMedia=!1,e.hidden=t),m(e)},_setContentMediaWidth:function(){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g=this,b=g.options,w=g._isLocked();if(b.scrollable&&b.resizable&&(w&&g.lockedFooter?t=g.lockedFooter.children("table"):g.footer&&(t=g.footer.find(">.k-grid-footer-wrap>table")),t&&t[0]||(t=e()),i=w?g.wrapper.find(".k-grid-header-locked").find("table"):g.wrapper.find(".k-grid-header").find("table"),n=w?g.lockedTable:g.table,o=i.find("th"),r=i.find("colgroup"),s=o.length,a=o.filter(v).length,l=o.length-a,c=0,""!==i[0].style.width&&parseFloat(i[0].style.width)!==c)){for(d=i.css("width"),u=0;u<s;u++)_(o[u])&&(p=Math.max(u,u-l),f=r.children()[p],m=f?f.style.width:"",""!==m?h=parseFloat(m):(i.css("width","auto"),h=Fe(o.eq(u)),i.css("width",d)),c+=h);n.css("width",c-1),i.css("width",c),t.css("width",c)}},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=Ue(this.hideMinScreenCols,this),e(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){var e=this.columns,t=window.innerWidth>0?window.innerWidth:screen.width;return this._iterateMinScreenCols(e,t)},_iterateMinScreenCols:function(e,i){var n,o,r,s=!1;for(n=0;n<e.length;n++)o=e[n],r=o.minScreenWidth,r!==t&&null!==r&&(s=!0,r>i?this.hideColumn(o):this.showColumn(o)),!o.hidden&&o.columns&&(s=this._iterateMinScreenCols(o.columns,i)||s);return s},_relatedRow:function(t){var i,n,o=this.lockedTable;return t=e(t),o?(i=t.closest(this.table.add(this.lockedTable)),n=i.find(">tbody>tr").index(t),i=i[0]===this.table[0]?o:this.table,i.find(">tbody>tr").eq(n)):t},_relatedCell:function(t){var i,n,o=this.lockedTable;return t=e(t),o?(i=t.closest(this.table.add(this.lockedTable)),n=i.find(">tbody>tr>td").index(t),i=i[0]===this.table[0]?o:this.table,i.find(">tbody>tr>td").index(n)):t},clearSelection:function(){var e=this;return e.selectable&&e.selectable.clear(),e._checkBoxSelection?(e._deselectCheckRows(e.select()),t):(e.options.persistSelection?e._persistSelectedRows():e._selectedIds={},e.trigger(_t),t)},select:function(i){var n=this,o=n.selectable,r=Te.ui.Selectable.parseOptions(this.options.selectable),s=r.cell;return i=n.table.add(n.lockedTable).find(i),i.length?(o&&!o.options.multiple&&(o.clear(),i=i.first()),n._isLocked()&&(i=i.add(i.map(function(){return s?n._relatedCell(this):n._relatedRow(this)}))),o?o.value(i):(i.each(function(){e(this).addClass(Rt).find(Pt).prop("checked",!0).attr("aria-label","Deselect row").attr("aria-checked",!0)}),n.select().length===n.items().length&&n._toggleHeaderCheckState(!0),s||n._persistSelectedRows(),n.trigger(_t)),t):o?o.value():n.items().filter("."+Rt)},_toggleHeaderCheckState:function(e){var t=this;e?t.thead.add(t.lockedHeader).find("tr "+Pt).prop("checked",!0).attr("aria-checked",!0).attr("aria-label","Deselect all rows"):t.thead.add(t.lockedHeader).find("tr "+Pt).prop("checked",!1).attr("aria-checked",!1).attr("aria-label","Select all rows")},_deselectCheckRows:function(t){var i=this;t=i.table.add(i.lockedTable).find(t),i._isLocked()&&(t=t.add(t.map(function(){return i._relatedRow(this)}))),t.each(function(){e(this).removeClass(Rt).find(Pt).attr("aria-checked",!1).prop("checked",!1).attr("aria-label","Select row")}),i._toggleHeaderCheckState(!1),i._persistSelectedRows(),i.trigger(_t)},_persistSelectedRows:function(){var e,t,i,n,o=this,r=o.items(),s=o.dataSource.options,a=s.schema,l={};if(a&&a.model&&o._data&&(i=qe(a.model)?a.model.fn.idField:a.model.id))for(o.select().each(function(){t=o.dataItem(this),l[t[i]]=!0}),n=0;n<r.length;n++)t=o.dataItem(r[n]),e=t[i],l[e]?o._selectedIds[e]=!0:delete o._selectedIds[e]},selectedKeyNames:function(){var e,t=this,i=[];for(e in t._selectedIds)i.push(e);return i.sort(),i},_updateCurrentAttr:function(t,i){var n=e(t).data("headerId");e(t).removeClass(It).closest("table").removeAttr("aria-activedescendant"),n?(n=n.replace(this._cellId,""),e(t).attr("id",n)):e(t).removeAttr("id"),i.data("headerId",i.attr("id")).attr("id",this._cellId).addClass(It).closest("table").attr("aria-activedescendant",this._cellId),this._current=i},_scrollCurrent:function(){var t,i,n,o,r,s,a=this._current,l=this.options.scrollable;a&&l&&(t=a.parent(),i=t.closest("table").parent(),n=i.is(".k-grid-content-locked,.k-grid-header-locked"),o=i.is(".k-grid-content-locked,.k-grid-content,.k-virtual-scrollable-wrap"),r=e(this.content).find(">.k-virtual-scrollable-wrap").addBack().last()[0],o&&(l.virtual?(s=Math.max(Ve(t[0],this._items(t.parent())),0),this._rowVirtualIndex=this.virtualScrollable.itemIndex(s),this.virtualScrollable.scrollIntoView(t)):this._scrollTo(this._relatedRow(t)[0],r)),this.lockedContent&&(this.lockedContent[0].scrollTop=r.scrollTop),n||this._scrollTo(a[0],r))},current:function(e){return this._setCurrent(e,!0)},_setCurrent:function(t,i){var n=this._current;return t=e(t),t.length&&(n&&n[0]===t[0]||(this._updateCurrentAttr(n,t),this._scrollCurrent(),i||this.trigger(Vt,{element:t}))),t&&t.length&&(this._lastCellIndex=t.parent().children(Qe).index(t)),this._current},_removeCurrent:function(){this._current&&(this._current.removeClass(It),this._current=null)},_scrollTo:function(t,i){var n,o=t.tagName.toLowerCase(),r="td"===o||"th"===o,s=t[r?"offsetLeft":"offsetTop"],a=t[r?"offsetWidth":"offsetHeight"],l=i[r?"scrollLeft":"scrollTop"],c=i[r?"clientWidth":"clientHeight"],d=s+a,u=0,h=0,p=0;vi&&r&&(n=e(t).closest("table")[0],_i.msie?h=n.offsetLeft:_i.mozilla&&(p=n.offsetLeft-Te.support.scrollbar())),l=Math.abs(l+h-p),u=l>s?s:d>l+c?a<=c?d-c:s:l,u=Math.abs(u+h)+p,i[r?"scrollLeft":"scrollTop"]=u},_navigatable:function(){var t,i,n,o=this;o.options.navigatable&&(t=o.table.add(o.lockedTable),i=o.thead.parent().add(e(">table",o.lockedHeader)),n=t,o.options.scrollable&&(n=n.add(i),i.attr(jt,-1)),this._navigatableTables=n,n.off("mousedown"+rt+" focus"+rt+" focusout"+rt+" keydown"+rt),i.on("keydown"+rt,Ue(o._openHeaderMenu,o)).find("a.k-link").attr("tabIndex",-1),t.attr(jt,$e.max(t.attr(jt)||0,0)).on("keydown"+rt,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),n.on(Te.support.touch?"touchstart"+rt:"mousedown"+rt,Ze+">"+Je,Ue(be,o)).on("focus"+rt,Ue(o._tableFocus,o)).on("focusout"+rt,Ue(o._tableBlur,o)).on("keydown"+rt,Ue(o._tableKeyDown,o)))},_openHeaderMenu:function(e){e.altKey&&e.keyCode==ze.DOWN&&(this.current().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())},_setTabIndex:function(e){this._navigatableTables.attr(jt,-1),e.attr(jt,0)},_tableFocus:function(t){var i=this.current(),n=e(t.currentTarget);i&&i.is(":visible")?i.addClass(It):this._setCurrent(n.find(nt)),this._setTabIndex(n)},_tableBlur:function(){var e=this.current();e&&e.removeClass(It)},_tableKeyDown:function(i){var n,o=this.current(),r=this.virtualScrollable&&this.virtualScrollable.fetching(),s=e(i.target),a=!i.isDefaultPrevented()&&!s.is(":button,a,:input,a>.k-icon");return r?(i.preventDefault(),t):(o=o?o:e(this.lockedTable).add(this.options.scrollable?this.table:this.tbody).find(nt),o.length&&(n=!1,a&&i.keyCode==ze.UP&&(n=this._moveUp(o,i.shiftKey)),a&&i.keyCode==ze.DOWN&&(n=this._moveDown(o,i.shiftKey)),a&&i.keyCode==(vi?ze.LEFT:ze.RIGHT)&&(n=this._moveRight(o,i.altKey,i.shiftKey,i.ctrlKey,i.currentTarget)),a&&i.keyCode==(vi?ze.RIGHT:ze.LEFT)&&(n=this._moveLeft(o,i.altKey,i.shiftKey,i.ctrlKey,i.currentTarget)),a&&i.keyCode==ze.PAGEDOWN&&(n=this._handlePageDown()),a&&i.keyCode==ze.PAGEUP&&(n=this._handlePageUp()),a&&i.keyCode==ze.HOME&&(n=this._handleHome(o,i.ctrlKey)),a&&i.keyCode==ze.END&&(n=this._handleEnd(o,i.ctrlKey)),a&&i.keyCode==ze.SPACEBAR&&(n=this._handleSpaceKey(o,i.ctrlKey)),i.keyCode!=ze.ENTER&&i.keyCode!=ze.F2||(n=this._handleEnterKey(o,i.currentTarget,s)),i.keyCode==ze.ESC&&(n=this._handleEscKey(o,i.currentTarget)),i.keyCode==ze.TAB&&(n=this._handleTabKey(o,i.currentTarget,i.shiftKey)),n&&(i.preventDefault(),i.stopPropagation())),t)},_moveLeft:function(t,i,n,o,r){var s,a,l=t.parent(),c=l.parent();return i?this.collapseRow(l):o&&t.is(".k-header")&&this.options.reorderable?this._moveColumn(t,!0):(a=c.find(Ze).index(l),s=this._prevHorizontalCell(c,t,a),s[0]||(n?this.lockedTable?(s=this._relatedRow(l),e.contains(this.lockedTable[0],l[0])&&(s=s.prevAll(et+":first")),s=s.children(Qe+":last")):s=this._tabNext(t,r,!0):(c=this._horizontalContainer(c),s=this._prevHorizontalCell(c,t,a),s[0]!==t[0]&&fe(c.parent(),!0))),this._setCurrent(s)),!0},_moveRight:function(t,i,n,o,r){var s,a,l=t.parent(),c=l.parent();return i?this.expandRow(l):o&&t.is(".k-header")&&this.options.reorderable?this._moveColumn(t,!1):(a=c.find(Ze).index(l),s=this._nextHorizontalCell(c,t,a),s[0]||(n?this.lockedTable?(s=this._relatedRow(l),e.contains(this.table[0],l[0])&&(s=s.nextAll(et+":first")),s=s.children(Qe+":first")):s=this._tabNext(t,r,!1):(c=this._horizontalContainer(c,!0),s=this._nextHorizontalCell(c,t,a),s[0]!==t[0]&&fe(c.parent(),!0))),this._setCurrent(s)),!0},_moveUp:function(e,t){var i,n,o=e.parent().parent();return t?(i=e.parent(),i=i.prevAll(et+":first"),i=e.parent().is(et)?i.children().eq(e.index()):i.children(Qe+":last")):(i=this._prevVerticalCell(o,e),i[0]||(this._lastCellIndex=0,o=this._verticalContainer(o,!0),i=this._prevVerticalCell(o,e),i[0]&&fe(o.parent(),!0))),n=this._lastCellIndex||0,this._setCurrent(i),this._lastCellIndex=n,!0},_moveDown:function(e,t){var i,n,o=e.parent().parent();return t?(i=e.parent(),i=i.nextAll(et+":first"),i=e.parent().is(et)?i.children().eq(e.index()):i.children(Qe+":first")):(i=this._nextVerticalCell(o,e),i[0]||(this._lastCellIndex=0,o=this._verticalContainer(o),i=this._nextVerticalCell(o,e),i[0]&&fe(o.parent(),!0))),n=this._lastCellIndex||0,this._setCurrent(i),this._lastCellIndex=n,!0},_moveColumn:function(t,i){var n=this.wrapper.data().kendoReorderable.element.find(this._draggableInstance.options.filter+":visible"),o=w(F(this.columns)),r=n.index(e(t)),s=i?-1:1,a=o[r],l=P(o,this.columns,r,r+s);l>=0&&this.reorderColumn(l,a,i)},_handleHome:function(e,t){var i,n=e.parent(),o=n.parent(),r=this.lockedTable&&this.lockedTable.children("tbody")[0]===o[0],s=o[0]===this.tbody[0];if(t?i=this.lockedTable?this.lockedTable.find(tt+">"+Je+":first"):this.table.find(tt+">"+Je+":first"):(s||r)&&(s&&this.lockedTable&&(n=this._relatedRow(n)),i=n.children(Qe+":first")),i&&i.length)return this._setCurrent(i),!0},_handleEnd:function(e,t){var i,n=e.parent(),o=n.parent(),r=this.lockedTable&&this.lockedTable.children("tbody")[0]===o[0],s=o[0]===this.tbody[0];if(t?i=this.table.find(it+">"+Je+":last"):(s||r)&&(!s&&this.lockedTable&&(n=this._relatedRow(n)),i=n.children(Qe+":last")),i&&i.length)return this._setCurrent(i),!0},_handlePageDown:function(){return!!this.options.pageable&&(this.dataSource.page(this.dataSource.page()+1),!0)},_handlePageUp:function(){return!!this.options.pageable&&(this.dataSource.page(this.dataSource.page()-1),
!0)},_handleTabKey:function(t,i,n){var o,r=this.options.editable&&"incell"==this._editMode();return!(!r||t.is("th"))&&(o=e(Me()).closest(".k-edit-cell"),o[0]&&o[0]!==t[0]&&(t=o),o=this._tabNext(t,i,n),!!o.length&&(this._handleEditing(t,o,o.closest("table")),!0))},_handleEscKey:function(t,i){var n,o=Me(),r="incell"==this._editMode();return ye(t)?(r?this.closeCell(!0):(n=e(t).parent().index(),o&&o.blur(),this.cancelRow(!0),n>=0&&this._setCurrent(this.items().eq(n).children(Je).first())),_i.msie&&_i.version<9&&document.body.focus(),fe(i,!0),!0):!!t.has(o).length&&(fe(i,!0),!0)},_toggleCurrent:function(e,t){var i=e.parent();return i.is(".k-grouping-row")?(i.find(".k-icon:first").click(),!0):!(t||!i.is(".k-master-row"))&&(i.find(".k-icon:first").click(),!0)},_handleSpaceKey:function(t,i){var n,o,r,s,a=this;if(i&&a.groupable&&t.hasClass("k-header"))return n=a.groupable.descriptors(),o=t.attr(Te.attr("field")),r=a.groupable.aggregates(),s=t.attr(Te.attr("title"))||o,a.groupable._canDrag(t)?(n.push({field:o,dir:"asc",aggregates:r||[]}),s+=" "+a.options.messages.ungroupHeader):(n=e.grep(n,function(e){return e.field!==o}),s+=" "+a.options.messages.groupHeader),t.attr("aria-label",s),a.dataSource.group(n),!0},_handleEnterKey:function(t,i,n){var o,r,s=this.options.editable&&this.options.editable.update!==!1,a=n.closest("[role=gridcell]");return n.is("table")||e.contains(t[0],n[0])||(t=a),t.is("th")?(o=t.find(".k-link"),o.length?o.click():t.find(Pt).focus(),!0):!!this._toggleCurrent(t,s)||(r=t.find(":kendoFocusable:first"),r[0]&&!t.hasClass("k-edit-cell")&&t.hasClass("k-state-focused")?(r.focus(),!0):!(!s||n.is(":button,.k-button,textarea"))&&(a[0]||(a=t),this._handleEditing(a,!1,i),!0))},_nextHorizontalCell:function(e,t,i){var n,o,r,s=t.nextAll(Qe);return s.length||(n=e.find(Ze),o=n.index(t.parent()),o!=-1)?s.first():t.hasClass("k-header")?(r=[],V([W(this.columns)[0]],Q(n.eq(0).children(":visible").first()),r,0,0),r[i]?r[i][0]:t):t.parent().hasClass("k-filter-row")?n.last().children(Qe).first():n.eq(i).children(Qe).first()},_prevHorizontalCell:function(e,t,i){var n,o,r,s,a=t.prevAll(Qe);return a.length||(n=e.find(Ze),o=n.index(t.parent()),o!=-1)?a.first():t.hasClass("k-header")?(r=[],s=W(this.columns),V([s[s.length-1]],Q(n.eq(0).children().last()),r,0,0),r[i]?r[i][0]:t):t.parent().hasClass("k-filter-row")?n.last().children(Qe).last():n.eq(i).children(Qe).last()},_currentDataIndex:function(e,i){var n,o=i.attr("data-index");return o?(n=W(this.columns).length,n&&!e.closest("div").hasClass("k-grid-content-locked")[0]?o-n:o):t},_prevVerticalCell:function(t,i){var n,o=i.parent(),r=t.children(Ze),s=r.index(o),a=this._currentDataIndex(t,i);if(a||i.hasClass("k-header"))return n=Y(i),n.eq(n.length-2);if(a=Math.max(o.children(Qe).index(i),this._lastCellIndex||0),o.hasClass("k-filter-row"))return K(t).filter(v).eq(a);if(s==-1){if(o=t.find("tr.k-filter-row:visible"),!o[0])return(this._hasDetails()||i.parent().find(".k-hierarchy-cell").length)&&a&&a--,K(t).filter(v).eq(a)}else o=0===s?e():r.eq(s-1);return n=o.children(Qe),n.eq(n.length>a?a:0)},_nextVerticalCell:function(e,i){var n,o,r,s,a,l,c=i.parent(),d=e.children(Ze),u=d.index(c),h=this._currentDataIndex(e,i);if(u!=-1&&h===t&&i.hasClass("k-header"))return Q(i).eq(1);if(h=h?parseInt(h,10):c.children(Qe).index(i),h=Math.max(h,this._lastCellIndex||0),u==-1?(c=d.eq(0),(this._hasDetails()||c.find(".k-hierarchy-cell").length)&&h++):c=d.eq(u+i[0].rowSpan),o=h,this._currentDataIndex(e,i)!==t)for(r=c.children(":not(.k-group-cell):not(.k-hierarchy-cell)"),s=r.filter(":hidden"),a=0,l=s.length;a<l;a++)r.index(s[a])<h&&o--;return h=o,n=c.children(Qe),n.eq(n.length>h?h:0)},_verticalContainer:function(e,t){var i=e.parent(),n=this._navigatableTables.length,o=Math.floor(n/2),r=Ve(i[0],this._navigatableTables);return t&&(o*=-1),r+=o,(r>=0||r<n)&&(i=this._navigatableTables.eq(r)),i.find(t?">thead":">tbody")},_horizontalContainer:function(e,t){var i,n,o=this._navigatableTables.length;return o<=2?e:(i=e.parent(),n=Ve(i[0],this._navigatableTables),n+=t?1:-1,!t||2!=n&&n!=o?!t&&(1==n||n<0)?e:this._navigatableTables.eq(n).find("thead, tbody"):e)},_tabNext:function(e,t,i){var n=!0,o=i?e.prevAll(Qe+":first"):e.nextAll(":visible:first");return o.length||(o=e.parent(),this.lockedTable&&(n=i&&t==this.lockedTable[0]||!i&&t==this.table[0],o=this._relatedRow(o)),n&&(o=o[i?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")),o=o.children(Qe+(i?":last":":first"))),o},_handleEditing:function(i,n,o){var r,s,a=this,l=e(Me()),c=a._editMode(),d=_i.msie,u=d&&_i.version<9,h=a._editContainer,p=a.options.editable&&a.options.editable.update!==!1;if(o=e(o),s="incell"==c?i.hasClass("k-edit-cell"):i.parent().hasClass("k-grid-edit-row"),a.editable){if(e.contains(h[0],l[0])&&(_i.opera||u?l.blur().change().triggerHandler("blur"):(l.blur(),d&&l.blur())),!a.editable)return fe(o),t;if(!a.editable.end())return a._setCurrent("incell"==c?h:h.children().filter(Qe).first()),r=h.find(":kendoFocusable:first")[0],r&&r.focus(),t;"incell"==c?a.closeCell():(a.saveRow(),s=!0)}n&&a._setCurrent(n),u&&document.body.focus(),fe(o,!0),p&&(!s&&!n||n)&&("incell"==c?a.editCell(a.current()):a.editRow(a.current().parent()))},_wrapper:function(){var e=this,t=e.table,i=e.options.height,n=e.element;n.is("div")||(n=n.wrap("<div/>").parent()),e.wrapper=n.addClass("k-grid k-widget k-display-block"),i&&(e.wrapper.css(qt,i),t.css(qt,"auto")),e._initMobile()},_initMobile:function(){var t,i=this.options,n=this;this._isMobile=i.mobile===!0&&Te.support.mobileOS||"phone"===i.mobile||"tablet"===i.mobile,this._isMobile&&(t=this.wrapper.addClass("k-grid-mobile").wrap("<div data-"+Te.ns+'stretch="true" data-'+Te.ns+'role="view" data-'+Te.ns+'init-widgets="false"></div>').parent(),this.pane=Te.mobile.ui.Pane.wrap(t),this.view=this.pane.view(),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"},i.height&&this.pane.element.parent().css(qt,i.height),this._editAnimation="slide",this.view.bind("show",function(){n._isLocked()&&(n._updateTablesWidth(),n._applyLockedContainersWidth(),n._syncLockedContentHeight(),n._syncLockedHeaderHeight(),n._syncLockedFooterHeight())}))},_tbody:function(){var t,i=this,n=i.table;t=n.find(">tbody"),t.length||(t=e("<tbody/>").appendTo(n)),i.tbody=t.attr("role","rowgroup")},_scrollable:function(){var t,i,n,o,r,s,a,l=this,c=l.options,d=c.scrollable,u=d!==!0&&d.virtual&&!l.virtualScrollable,h=!Te.support.kineticScrollNeeded||u?Te.support.scrollbar():0;d&&(t=l.wrapper.children(".k-grid-header"),t[0]||(t=e('<div class="k-grid-header" />').insertBefore(l.table)),t.css(vi?"padding-left":"padding-right",d.virtual?h+1:h),i=e('<table role="grid" />'),bi&&i.attr("cellspacing",0),i.width(l.table[0].style.width),i.append(l.thead),t.empty().append(e('<div class="k-grid-header-wrap k-auto-scrollable" />').append(i)),l.content=l.table.parent(),l.content.is(".k-virtual-scrollable-wrap, .km-scroll-container")&&(l.content=l.content.parent()),l.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(l.content=l.table.wrap('<div class="k-grid-content k-auto-scrollable" />').parent()),u&&l._createVirtualScrollable(),n=t.children(".k-grid-header-wrap"),l.scrollables=n.add(l.content),o=l.wrapper.find(".k-grid-footer"),o.length&&(l.scrollables=l.scrollables.add(o.children(".k-grid-footer-wrap"))),n.unbind("scroll"+rt).bind("scroll"+rt,function(e){l._scrollLeft!==this.scrollLeft&&l.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)}),d.virtual?l.content.find(">.k-virtual-scrollable-wrap").unbind("scroll"+rt).bind("scroll"+rt,function(){l.scrollables.scrollLeft(this.scrollLeft),l.lockedContent&&(l.lockedContent[0].scrollTop=this.scrollTop)}):(r=d.endless,s=l.dataSource.options.pageSize,r&&(l._endlessPageSize=s),l.content.unbind("scroll"+rt).bind("scroll"+rt,function(e){l._scrollLeft=this.scrollLeft,l.scrollables.not(e.currentTarget).scrollLeft(l._scrollLeft),l.lockedContent&&e.currentTarget==l.content[0]&&(l.lockedContent[0].scrollTop=this.scrollTop),r&&this.scrollTop+this.clientHeight-this.scrollHeight>=-10&&!l._endlessFetchInProgress&&l._endlessPageSize<l.dataSource.total()&&(l._skipRerenderItemsCount=l._endlessPageSize,l._endlessPageSize=l._endlessPageSize+s,l.dataSource.options.endless=!0,l._endlessFetchInProgress=!0,l.dataSource.pageSize(l._endlessPageSize))}),a=l.content.data("kendoTouchScroller"),a&&a.destroy(),a=Te.touchScroller(l.content),a&&a.movable&&(l.touchScroller=a,a.movable.bind("change",function(e){l.scrollables.scrollLeft(-e.sender.x),l.lockedContent&&l.lockedContent.scrollTop(-e.sender.y)}),l.one(kt,function(e){e.sender.wrapper.addClass("k-grid-backface")}))))},_createVirtualScrollable:function(){var e=this;e.virtualScrollable&&e.virtualScrollable.destroy(),e.virtualScrollable=new xi(e.content,{dataSource:e.dataSource,itemHeight:function(){return e._averageRowHeight()},page:function(){e._restoreEditableState()},scroll:function(){e._focusEditable()}}),e.virtualScrollable.bind(Dt,Ue(e._onVirtualPaging,e))},_onVirtualPaging:function(){var e=this;e._cacheEditableState(),e._isVirtualIncellEditable()&&(e._shouldClearEditableState=!1,e.closeCell(),e._shouldClearEditableState=!0)},_isVirtualEditable:function(){return this._isVirtualIncellEditable()||this._isVirtualInlineEditable()||this._isVirtualPopupEditable()},_isVirtualInlineEditable:function(){return this.virtualScrollable&&this._editMode()===Jt},_isVirtualIncellEditable:function(){return this.virtualScrollable&&this._editMode()===Zt},_isVirtualPopupEditable:function(){return this.virtualScrollable&&"popup"===this._editMode()},_scrollVirtualWrapper:function(){var e=this,t=e.virtualScrollable;(e._isVirtualInlineEditable()||e._isVirtualIncellEditable())&&(t._isScrolledToBottom()?t._scrollWrapperToBottom():t._isScrolledToTop()&&t._scrollWrapperToTop())},_scrollVirtualWrapperOnColumnResize:function(){var e=this.virtualScrollable;e&&e._scrollWrapperOnColumnResize()},_restoreEditableState:function(){var t,n,o=this,r=o._editableState||{},s=r.model,a=o.dataSource,l=o._isVirtualInlineEditable(),c=o._isVirtualIncellEditable();(l||c)&&s&&a._getByUid(s.uid,a.view())&&(l?(o._shouldClearEditableState=!1,o.editRow(s),o._focusEditable()):c&&(t=o.tbody.children(i(ei,s.uid)),n=e(t).children(i(Qt,r.field)),n[0]&&(o._shouldClearEditableState=!1,o.editCell(n),o._focusEditable()))),o._shouldClearEditableState=!0},_focusEditable:function(){var e=this,t=(e._editableState||{}).field,n=e._editContainer;n&&!Ge(n[0],Me())&&e._canFocusEditable()&&(e._isVirtualInlineEditable()?n.find(i(Yt,t)).find(Mt).eq(0).focus():e._isVirtualIncellEditable()&&n.find(Mt).eq(0).focus())},_canFocusEditable:function(){var e=this;return(e._isVirtualIncellEditable()||e._isVirtualInlineEditable())&&e.virtualScrollable._isElementVisible(e._editContainer)},_cacheEditableState:function(){var t,i,n=this,o=n._editContainer,r=o?n._modelForContainer(o):null,s=n._isVirtualInlineEditable(),a=n._isVirtualIncellEditable();(s||a)&&r&&(n._clearEditableState(),t=e(Me()),o&&t[0]&&Ge(o[0],t[0])&&(t.change(),i=Te.widgetInstance(t,Te.ui),i&&qe(i.value)&&t.is(Xt)&&(i.value(t.val()),i.trigger(_t))),s?n._editableState={model:r,field:t.closest("["+Te.attr(Yt)+"]").attr(Te.attr(Yt))}:a&&(n._editableState={model:r,field:o.attr(Te.attr(Qt))}))},_clearEditableState:function(){var e=this;e.virtualScrollable&&(e._editableState=null)},_destroyVirtualScrollable:function(){var e=this;e._clearEditableState(),e.virtualScrollable&&e.virtualScrollable.element&&e.virtualScrollable.destroy(),e.virtualScrollable=null},_renderNoRecordsContent:function(){var t,i=this;i.options.noRecords&&(t=i.table.parent().children("."+zt),t.length&&(i.angular("cleanup",function(){return{elements:t.get()}}),t.remove()),i.dataSource&&i.dataSource.view().length||(t=e(i.noRecordsTemplate({})).insertAfter(i.table),i.angular("compile",function(){return{elements:t.get(),data:[{}]}})))},_setContentWidth:function(t){var i,n=this,o="k-grid-content-expander",r='<div class="'+o+'"></div>',s=n.resizable;n.options.scrollable&&n.wrapper.is(":visible")&&(i=n.table.parent().children("."+o),n._setContentWidthHandler=Ue(n._setContentWidth,n),n.dataSource&&n.dataSource.view().length?i[0]&&(i.remove(),s&&s.unbind("resize",n._setContentWidthHandler)):(i[0]||(i=e(r).appendTo(n.table.parent()),s&&s.bind("resize",n._setContentWidthHandler)),n.thead&&(i.width(n.thead.width()),isNaN(parseFloat(t,10))||n.content.scrollLeft(t))),n._applyLockedContainersWidth(),n._syncLockedContentHeight(),n.lockedHeader&&0===n.table[0].clientWidth&&(n.table[0].style.width="1px"))},_applyLockedContainersWidth:function(){if(this.options.scrollable&&this.lockedHeader){var e,t=this.thead.parent(),i=t.parent(),n=this.wrapper[0].clientWidth,o=this._groups(),r=Te.support.scrollbar(),s=this.lockedHeader.find(">table>colgroup>col:not(.k-group-col, .k-hierarchy-col)"),a=t.find(">colgroup>col:not(.k-group-col, .k-hierarchy-col)"),l=L(s),c=L(a);o>0&&(l+=Fe(this.lockedHeader.find(".k-group-cell:first"))*o),l>=n&&(l=n-3*r),this.lockedHeader.add(this.lockedContent).width(l),i[0].style.width=i.parent().width()-l-2+"px",t.add(this.table).width(c),this.virtualScrollable&&!yi&&(n-=r),this.content[0].style.width=n-l-2+"px",this.lockedFooter&&this.lockedFooter.length&&(this.lockedFooter.width(l),e=this.footer.find(".k-grid-footer-wrap"),e[0].style.width=i[0].clientWidth+"px",e.children().first().width(c))}},_setContentHeight:function(){var e,i=this,n=i.options,o=i.wrapper.innerHeight(),r=i.wrapper.children(".k-grid-header"),s=Te.support.scrollbar(),a=(n.scrollable||{}).height;if(n.scrollable&&i.wrapper.is(":visible")){if(o-=Pe(r),i.pager&&i.pager.element.is(":visible")&&(o-=Pe(i.pager.element)),n.groupable&&(o-=Pe(i.wrapper.children(".k-grouping-header"))),n.toolbar&&(o-=Pe(i.wrapper.children(".k-grid-toolbar"))),i.footerTemplate&&(o-=Pe(i.wrapper.children(".k-grid-footer"))),""===i.wrapper[0].style.height&&a)return i.content[0].style.height=a,t;e=function(e){var t,i;return!!e[0].style.height||(t=e.height(),e.height("auto"),i=e.height(),t!=i?(e.height(""),!0):(e.height(""),!1))},e(i.wrapper)&&(o>2*s?(i.lockedContent&&(s=i.table[0].offsetWidth>i.table.parent()[0].clientWidth?s:0,i.lockedContent.height(o-s)),i.content.height(o)):i.content.height(2*s+1))}},_averageRowHeight:function(){var e,t=this,i=t._items(t.tbody).length,n=t._rowHeight;return 0===i?n:(t._rowHeight||(t._rowHeight=n=Pe(t.table)/i,t._sum=n,t._measures=1),e=Pe(t.table)/i,n!==e&&(t._measures++,t._sum+=e,t._rowHeight=t._sum/t._measures),n)},_dataSource:function(){var e,i=this,n=i.options,o=n.dataSource;o=Oe(o)?{data:o}:o,Be(o)&&(Le(o,{table:i.table,fields:i.columns}),e=n.pageable,Be(e)&&e.pageSize!==t&&(o.pageSize=e.pageSize)),i.dataSource&&i._refreshHandler?i.dataSource.unbind(_t,i._refreshHandler).unbind(Ke,i._progressHandler).unbind(Ye,i._errorHandler):(i._refreshHandler=Ue(i.refresh,i),i._progressHandler=Ue(i._requestStart,i),i._errorHandler=Ue(i._error,i)),i.dataSource=Ae.create(o).bind(_t,i._refreshHandler).bind(Ke,i._progressHandler).bind(Ye,i._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var i,n,o,r,s,a,l,c,d,u,h=this,p=h.tbody,f=t.model,m=h.tbody.find("tr["+Te.attr("uid")+"="+f.uid+"]"),g=m.hasClass("k-alt"),v=h._items(p).index(m),_=h.lockedContent;if(_&&(i=h._relatedRow(m)),m.add(i).children(".k-edit-cell").length&&!h.options.rowTemplate)m.add(i).children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){n=e(this),o=$(h.columns)[h.cellIndex(n)],o.field===t.field&&(n.hasClass("k-edit-cell")?n.addClass("k-dirty-cell"):h._displayCell(n,o,f))});else if(!m.hasClass("k-grid-edit-row")){for(a=e().add(m),_&&(r=(g?h.lockedAltRowTemplate:h.lockedRowTemplate)(f),a=a.add(i),i.replaceWith(r)),h.angular("cleanup",function(){return{elements:a.get()}}),r=(g?h.altRowTemplate:h.rowTemplate)(f),m.replaceWith(r),r=h._items(p).eq(v),u=[{dataItem:f}],_&&(m=m.add(i),i=h._relatedRow(r)[0],he(r[0],i),r=r.add(i),u.push({dataItem:f})),h.angular("compile",function(){return{elements:r.get(),data:u}}),s=h.options.selectable,(s||h._checkBoxSelection)&&m.hasClass("k-state-selected")&&h.select(r),c=a.children(":not(.k-group-cell,.k-hierarchy-cell)"),l=r.children(":not(.k-group-cell,.k-hierarchy-cell)"),v=0,d=h.columns.length;v<d;v++)o=h.columns[v],n=l.eq(v),s&&c.eq(v).hasClass("k-state-selected")&&n.addClass("k-state-selected");h.trigger("itemChange",{item:r,data:f,ns:De})}},_pageable:function(){var t,i=this,n=i.options.pageable;n&&(t=i.wrapper.children("div.k-grid-pager"),t.length||(t=e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(i.wrapper)),i.pager&&i.pager.destroy(),i.pager="object"==typeof n&&n instanceof Te.ui.Pager?n:new Te.ui.Pager(t,Le({},n,{dataSource:i.dataSource})),i.pager.bind("pageChange",function(e){i.trigger("page",{page:e.index})&&e.preventDefault()}))},_footer:function(){var t,i,n,o=this,r=o.dataSource.aggregates(),s="",a=o.footerTemplate,l=o.options,c=o.footer||o.wrapper.find(".k-grid-footer");a?(s=e(o._wrapFooter(a(r))),c.length?(i=s,o.angular("cleanup",function(){return{elements:c.get()}}),c.replaceWith(i),c=o.footer=i):c=o.footer=l.scrollable?l.pageable?s.insertBefore(o.wrapper.children("div.k-grid-pager")):s.appendTo(o.wrapper):s.insertBefore(o.tbody),o.angular("compile",function(){return{elements:c.find("td:not(.k-group-cell, .k-hierarchy-cell)").get(),data:He(o.columns,function(e){return{column:e,aggregate:r[e.field]}})}})):c&&!o.footer&&(o.footer=c),c.length&&(l.scrollable&&(t=c.attr("tabindex",-1).children(".k-grid-footer-wrap"),o.scrollables=e(o.scrollables.filter(function(){return!e(this).is(".k-grid-footer-wrap")}).toArray()).add(t)),o._footerWidth&&c.find("table").css("width",o._footerWidth),t&&(n=o.content.scrollLeft(),l.scrollable!==!0&&l.scrollable.virtual&&(n=o.wrapper.find(".k-virtual-scrollable-wrap").scrollLeft()),t.scrollLeft(n))),o.lockedContent&&(o._appendLockedColumnFooter(),o._applyLockedContainersWidth(),o._syncLockedFooterHeight())},_wrapFooter:function(t){var i=this,n="",o=Te.support.mobileOS?0:Te.support.scrollbar();return i.options.scrollable?(n=e('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table'+(bi?' cellspacing="0"':"")+"><tbody>"+t+"</tbody></table></div></div>"),i._appendCols(n.find("table")),n.css(vi?"padding-left":"padding-right",o),n):'<tfoot class="k-grid-footer">'+t+"</tfoot>"},_columnMenu:function(){var e,i,n,o,r,s,a,l,c,d=this,u=$(d.columns),h=d.options,p=h.columnMenu,f=Ne(d.columns,function(e){return e.columns!==t}).length>0,m=this._isMobile,g=function(e){d.trigger(ft,{field:e.field,container:e.container})},v=function(e){d.trigger(gt,{field:e.field,container:e.container})},_=function(e){fe(e.closest("table"),!0)},b=function(e){d.trigger("sort",{sort:e.sort})?e.preventDefault():(d._clearEditableState(),d.dataSource.options.endless&&(d.dataSource.options.endless=null,d._endlessPageSize=d.dataSource.options.pageSize,d.dataSource.pageSize(d.dataSource.options.pageSize)))},w=function(e){d.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(d._clearEditableState(),d.dataSource.options.endless&&(d.dataSource.options.endless=null,d._endlessPageSize=d.dataSource.options.pageSize,d.dataSource.pageSize(d.dataSource.options.pageSize)))},y=h.$angular;if(p)for("boolean"==typeof p&&(p={}),d._setColumnsMediaVisibility(u),s=K(d.thead),a=0,l=s.length;a<l;a++)i=u[a],c=s.eq(a),i.command||!i.field&&!c.attr("data-"+Te.ns+"field")||(e=c.data("kendoColumnMenu"),e&&e.destroy(),o=i.sortable!==!1&&p.sortable!==!1&&h.sortable!==!1&&Le({},h.sortable,{compare:(i.sortable||{}).compare}),r=!(!h.filterable||i.filterable===!1||p.filterable===!1)&&Le({pane:d.pane},h.filterable,i.filterable),i.filterable&&i.filterable.dataSource&&(r.forceUnique=!1,r.checkSource=i.filterable.dataSource),r&&(r.format=i.format),n={dataSource:d.dataSource,values:i.values,columns:p.columns,sortable:o,filterable:r,messages:p.messages,owner:d,closeCallback:_,init:g,open:v,pane:d.pane,sort:b,filtering:w,filter:m?":not(.k-column-active)":"",lockedColumns:!f&&i.lockable!==!1&&W(u).length>0},y&&(n.$angular=y),c.kendoColumnMenu(n))},_headerCells:function(){return this.thead.find("th").filter(function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")})},_filterable:function(){var e,t,i,n,o,r,s,a=this,l=$(a.columns),c=function(e){a.trigger(pt,{field:e.field,container:e.container})},d=function(e){fe(e.closest("table"),!0)},u=function(e){a.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(a._clearEditableState(),a.dataSource.options.endless&&(a.dataSource.options.endless=null,a._endlessPageSize=a.dataSource.options.pageSize,a.dataSource.pageSize(a.dataSource.options.pageSize)))},h=function(e){a.trigger(mt,{field:e.field,container:e.container})},p=a.options.filterable;if(p&&typeof p.mode==$t&&p.mode.indexOf("menu")==-1&&(p=!1),p&&!a.options.columnMenu)for(t=K(a.thead),n=0,o=t.length;n<o;n++)i=t.eq(n),l[n].filterable===!1||l[n].command||!l[n].field&&!i.attr("data-"+Te.ns+"field")||(e=i.data("kendoFilterMenu"),e&&e.destroy(),e=i.data("kendoFilterMultiCheck"),e&&e.destroy(),r=l[n].filterable,s=Le({},p,r,{dataSource:a.dataSource,values:l[n].values,format:l[n].format,closeCallback:d,title:l[n].title||l[n].field,init:c,open:h,pane:a.pane,change:u}),r&&r.messages&&(s.messages=Le(!0,{},p.messages,r.messages)),r&&r.dataSource&&(s.forceUnique=!1,s.checkSource=r.dataSource),r&&r.multi?i.kendoFilterMultiCheck(s):i.kendoFilterMenu(s))},_filterRow:function(){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g=this;if(g._hasFilterRow())for(i=g.options.$angular,n=$(g.columns),o=g.options.filterable,r=g.thead.find(".k-filter-row"),s=function(e){g.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(g._clearEditableState(),g.dataSource.options.endless&&(g.dataSource.options.endless=null,g._endlessPageSize=g.dataSource.options.pageSize,g.dataSource.pageSize(g.dataSource.options.pageSize)))},this._updateHeader(this.dataSource.group().length),a=0;a<n.length;a++)if(c=n[a],d=g.options.filterable.operators,u=!1,h=e("<th/>"),p=c.field,c.hidden&&h.hide(),r.append(h),p&&c.filterable!==!1){if(f=c.filterable&&c.filterable.cell||{},l=g.options.dataSource,l instanceof Ae&&(l=g.options.dataSource.options),m=Le(!0,{},o.messages),c.filterable&&Le(!0,m,c.filterable.messages),f.enabled===!1){h.html("&nbsp;");continue}f.dataSource&&(l=f.dataSource,u=!0),c.filterable&&c.filterable.operators&&(d=c.filterable.operators),t={column:c,dataSource:g.dataSource,suggestDataSource:l,customDataSource:u,field:p,messages:m,values:c.values,template:f.template,delay:f.delay,inputWidth:f.inputWidth,suggestionOperator:f.suggestionOperator,minLength:f.minLength,dataTextField:f.dataTextField,operator:f.operator,operators:d,showOperators:f.showOperators,change:s},i&&(t.$angular=i),e("<span/>").attr(Te.attr("field"),p).appendTo(h).kendoFilterCell(t)}else h.html("&nbsp;")},_sortable:function(){var e,t,i,n,o,r,s=this,a=$(s.columns),l=s.options.sortable,c=function(e){s.trigger("sort",{sort:e.sort})?e.preventDefault():s._clearEditableState()};if(l){for(n=K(s.thead),o=0,r=n.length;o<r;o++)e=a[o],e.sortable!==!1&&!e.command&&e.field&&(i=n.eq(o),t=i.data("kendoColumnSorter"),t&&t.destroy(),i.attr("data-"+Te.ns+"field",e.field).kendoColumnSorter(Le({},l,e.sortable,{dataSource:s.dataSource,aria:!0,filter:":not(.k-column-active)",change:c})));n=null}},_columns:function(t){var i,n,o,r,s=this,a=s.table,l=a.find("col"),d=s.element.find("thead:first th[data-index]"),u=s.options.dataSource;if(t=t.length?t:He(a.find("th"),function(t,i){t=e(t);var n=t.attr(Te.attr("sortable")),o=t.attr(Te.attr("filterable")),r=t.attr(Te.attr("type")),s=t.attr(Te.attr("groupable")),a=t.attr(Te.attr("field")),c=t.attr(Te.attr("title")),d=t.attr(Te.attr("menu"));return a||(a=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:a,type:r,title:c,sortable:"false"!==n,filterable:"false"!==o,groupable:"false"!==s,menu:d,template:t.attr(Te.attr("template")),width:l.eq(i).css("width")}}),i=!(s.table.find("tbody tr").length>0&&(!u||!u.transport)),s.options.scrollable){if(r=t,n=W(t),t=U(t),n.length>0&&0===t.length)throw Error("There should be at least one non locked column");te(s.element.find("tr:has(th):first"),r),t=n.concat(t)}s.columns=c(t,i),d.length&&s.columns.length&&(o=$(s.columns),He(d,function(t){var i,n;t=e(t),i=t.attr("id"),n=Te.parseInt(t.attr("data-index")),i&&(o[n].headerAttributes=Le(o[n].headerAttributes,{id:i}))})),e.grep($(s.columns),function(e){return e.selectable}).length&&(s._selectedIds={},s._checkBoxSelection=!0,s.wrapper.on(Wt+rt,"tbody > tr "+Pt,Ue(s._checkboxClick,s)),s.wrapper.on(Wt+rt,"thead > tr "+Pt,Ue(s._headerCheckboxClick,s)))},_headerCheckboxClick:function(t){var i=this,n=e(t.target),o=n.prop("checked"),r=n.closest(".k-grid.k-widget").getKendoGrid();i===r&&(o?i.select(r.items()):i.clearSelection())},_checkboxClick:function(t){var i=this,n=e(t.target).closest("tr"),o=!n.hasClass(Rt);i===n.closest(".k-grid.k-widget").getKendoGrid()&&(o?i.select(n):i._deselectCheckRows(n))},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,i,r,s){var a,l,c,d,u,h=this,p=Le({},Te.Template,h.options.templateSettings),f=p.paramName,m=i.length,g={storage:{},count:0},v=h._hasDetails(),_=[],b=h._groups(),w=h.options.navigatable,y=Te.attr("field"),k="";if(!e){for(e="<tr",r&&_.push("k-alt"),v&&_.push("k-master-row"),_.length&&(e+=' class="'+_.join(" ")+'"'),m&&(e+=" "+Te.attr("uid")+'="#='+Te.expr("uid",p.paramName)+'#"'),e+=" role='row'>",b>0&&!s&&(e+=n(b)),v&&(e+='<td class="k-hierarchy-cell" aria-expanded="false"><a class="k-icon k-i-expand" href="\\#" '+li+'="'+ai+'" tabindex="-1"></a></td>'),a=0;a<m;a++)c=i[a],l=c.template,d=typeof l,u=c.field,h._editMode()===Zt&&u&&(c.attributes=c.attributes||{},h.virtualScrollable&&(c.attributes[y]=u),k=h._dirtyCellTemplate(u,f),c.attributes["class"]=c.attributes["class"]||"",c.attributes["class"].indexOf(k)<0&&(c.attributes["class"]+=k)),c.command&&(c.attributes=c.attributes||{},t!==c.attributes["class"]?c.attributes["class"]+=" k-command-cell":c.attributes["class"]="k-command-cell"),e+="<td"+o(c.attributes),w&&(e+=" aria-describedby='"+c.headerAttributes.id+"'"),e+=" role='gridcell'>",e+=h._cellTmpl(c,g),e+="</td>";e+="</tr>"}return e=Te.template(e,p),g.count>0?Ue(e,g.storage):e},_dirtyCellTemplate:function(e,t){var i;return e&&t?(i="["===e.charAt(0)?Te.expr(e,t+".dirtyFields"):t+".dirtyFields['"+e+"']","#= "+t+" && "+t+".dirty && "+t+".dirtyFields && "+i+" ? ' k-dirty-cell' : '' #"):""},_headerCellText:function(e){var t=this,i=Le({},Te.Template,t.options.templateSettings),n=e.headerTemplate,o=typeof n,r=e.title||e.field||"";return o===Gt?r=Te.template(n,i)({}):o===$t&&(r=n),r},_cellTmpl:function(e,t){var i,n,o=this,r=Le({},Te.Template,o.options.templateSettings),s=e.template,a=r.paramName,l=e.field,c="",d=e.format,u=typeof s,h=e.values;if(e.command){if(Oe(e.command)){for(i=0,n=e.command.length;i<n;i++)c+=e.command[i].visible?Te.format("#= {0}(data)? '{1}':'' #",e.command[i].visible,o._createButton(e.command[i]).replace(di,"\\#").replace(/'/gi,"\\'")):o._createButton(e.command[i]).replace(di,"\\#");return c}return o._createButton(e.command).replace(di,"\\#")}return e.selectable?mi:(c+=o._dirtyIndicatorTemplate(l,a),u===Gt?(t.storage["tmpl"+t.count]=s,c+="#=this.tmpl"+t.count+"("+a+")#",t.count++):u===$t?c+=s:h&&h.length&&Be(h[0])&&"value"in h[0]&&l?(c+="#var v ="+Te.stringify(ie(h)).replace(di,"\\#")+"#",c+="#var f = v[",r.useWithBlock||(c+=a+"."),c+=l+"]#",c+="${f != null ? f : ''}"):(c+=e.encoded?"#:":"#=",d&&(c+='kendo.format("'+d.replace(ci,"\\$1")+'",'),l?(l=Te.expr(l,a),c+=l+"==null?'':"+l):c+="''",d&&(c+=")"),c+="#"),c)},_dirtyIndicatorTemplate:function(e,t){var i;return e&&t?(i="["===e.charAt(0)?Te.expr(e,t+".dirtyFields"):t+".dirtyFields['"+e+"']","#= "+t+" && "+t+".dirty && "+t+".dirtyFields && "+i+" ? '<span class=\"k-dirty\"></span>' : '' #"):""},_templates:function(){var t=this,i=t.options,n=t.dataSource,o=n.group(),r=t.footer||t.wrapper.find(".k-grid-footer"),s=n.aggregate(),a=$(t.columns),l=$(W(t.columns)),c=i.scrollable?$(U(t.columns)):a,d=Ne(w(l),function(e,t){return e.groupHeaderColumnTemplate&&0!==t}),u=Ne(w(c),function(e){return e.groupHeaderColumnTemplate});if(i.scrollable&&l.length){if(i.rowTemplate||i.altRowTemplate)throw Error("Having both row template and locked columns is not supported");t.rowTemplate=t._tmpl(i.rowTemplate,c,!1,!0),t.altRowTemplate=t._tmpl(i.altRowTemplate||i.rowTemplate,c,!0,!0),t.lockedRowTemplate=t._tmpl(i.rowTemplate,l),t.lockedAltRowTemplate=t._tmpl(i.altRowTemplate||i.rowTemplate,l,!0)}else t.rowTemplate=t._tmpl(i.rowTemplate,c),t.altRowTemplate=t._tmpl(i.altRowTemplate||i.rowTemplate,c,!0);t._hasDetails()&&(t.detailTemplate=t._detailTmpl(i.detailTemplate||"")),(t._group&&!je(s)||!je(s)&&!r.length||Ne(a,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(a,s,"footerTemplate","k-footer-template")),o&&Ne(a,function(e){return e.groupFooterTemplate}).length&&(s=e.map(o,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(c,s,"groupFooterTemplate","k-group-footer",l.length),i.scrollable&&l.length&&(t.lockedGroupFooterTemplate=t._footerTmpl(l,s,"groupFooterTemplate","k-group-footer"))),o&&(d.length||u.length)?(s=e.map(o,function(e){return e.aggregates}),t.groupHeaderColumnTemplate=t._groupHeaderTmpl(w(c),s,"groupHeaderColumnTemplate","k-grouping-row",l.length,u),i.scrollable&&l.length&&(t.lockedGroupHeaderColumnTemplate=t._groupHeaderTmpl(w(l),s,"groupHeaderColumnTemplate","k-grouping-row",0,d))):(t.groupHeaderColumnTemplate=null,t.lockedGroupHeaderColumnTemplate=null),t.options.noRecords&&(t.noRecordsTemplate=t._noRecordsTmpl())},_noRecordsTmpl:function(){var t,i,n,o='<div class="{0}">{1}</div>',r='<div class="k-grid-norecords-template"{1}>{0}</div>',s=this.options.scrollable&&!this.wrapper[0].style.height?' style="margin:0 auto;position:static;"':"",a={storage:{},count:0},l=e.extend({},Te.Template,this.options.templateSettings),c=l.paramName,d="";return t=this.options.noRecords.template?this.options.noRecords.template:Te.format(r,this.options.messages.noRecords,s),i=typeof t,"function"===i?(a.storage["tmpl"+a.count]=t,d+="#=this.tmpl"+a.count+"("+c+")#",a.count++):"string"===i&&(d+=t),n=Te.template(Te.format(o,zt,d),l),a.count>0&&(n=e.proxy(n,a.storage)),n},_footerTmpl:function(e,t,i,r,s){var a,l,c,d,u,h=this,p=Le({},Te.Template,h.options.templateSettings),f=p.paramName,m="",g={},v=0,_={},b=h._groups(),w=h.dataSource._emptyAggregates(t);for(m+='<tr class="'+r+'">',b>0&&!s&&(m+=n(b)),h._hasDetails()&&(m+='<td class="k-hierarchy-cell">&nbsp;</td>'),a=0,l=e.length;a<l;a++)u=e[a],c=u[i],d=typeof c,m+="<td"+o(u.footerAttributes)+">",c?(d!==Gt&&(_=w[u.field]?Le({},p,{paramName:f+"['"+u.field+"']"}):{},c=Te.template(c,_)),g["tmpl"+v]=c,m+="#=this.tmpl"+v+"("+f+")#",v++):m+="&nbsp;",m+="</td>";return m+="</tr>",m=Te.template(m,p),v>0?Ue(m,g):m},_groupHeaderTmpl:function(e,i,n,o,r,s){var a,l,c,d,u,h=this,p=Le({},Te.Template,h.options.templateSettings),f=p.paramName,m="",g={},v=0,_={},b=h.dataSource._emptyAggregates(i),w=s.length?Ve(s[0],e):-1;if(m+='<tr role="row" class="'+o+'">',r||(m+='# for (var i = 0; i < data.groupCells; i++) { #<td class="k-group-cell">&nbsp;</td># } #'),h._hasDetails()&&(m+='<td class="k-hierarchy-cell">&nbsp;</td>'),w<0)return m+=r?"":ke(e.length),t;if(w<ti&&s.length<=1&&!r)return m+=r?"":ke(e.length),Te.template(m,p);for(w<ti?(w=r?0:1,m+=r?"":ke(w)):m+=r?xe(w):ke(w),a=w,l=e.length;a<l;a++)u=e[a],c=u[n],d=typeof c,m+="<td>",c?(d!==Gt&&(_=b[u.field]?Le({},p,{paramName:f+"['"+u.field+"']"}):{},c=Te.template(c,_)),g["tmpl"+v]=c,m+="#=this.tmpl"+v+"("+f+")#",v++):m+="&nbsp;",m+="</td>";return m+="</tr>",m=Te.template(m,p),v>0?Ue(m,g):m},_detailTmpl:function(e){var t=this,i="",o=Le({},Te.Template,t.options.templateSettings),r=o.paramName,s={},a=0,l=t._groups(),c=w($(t.columns)).length,d=typeof e;return i+='<tr class="k-detail-row">',
l>0&&(i+=n(l)),i+='<td class="k-hierarchy-cell"></td><td class="k-detail-cell"'+(c?' colspan="'+c+'"':"")+">",d===Gt?(s["tmpl"+a]=e,i+="#=this.tmpl"+a+"("+r+")#",a++):i+=e,i+="</td></tr>",i=Te.template(i,o),a>0?Ue(i,s):i},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[ht]||[]).length},_hasFilterRow:function(){var t=this.options.filterable,i=t&&typeof t.mode==$t&&t.mode.indexOf("row")!=-1,n=this.columns,o=e.grep(n,function(e){return e.filterable===!1});return n.length&&o.length==n.length&&(i=!1),i},_details:function(){var t=this;if(t.options.scrollable&&t._hasDetails()&&W(t.columns).length)throw Error("Having both detail template and locked columns is not supported");t.table.on(Wt+rt,".k-hierarchy-cell .k-i-expand, .k-hierarchy-cell .k-i-collapse",function(i){var n,o,r=e(this),s=r.closest("td.k-hierarchy-cell"),a=r.hasClass("k-i-expand"),l=r.closest("tr.k-master-row"),c=t.detailTemplate,d=t._hasDetails(),u=a?si:ai,h=!!a;return r.toggleClass("k-i-expand",!a).toggleClass("k-i-collapse",a).attr(li,u),s.attr("aria-expanded",h),n=l.next(),d&&!n.hasClass("k-detail-row")&&(o=t.dataItem(l),n=e(c(o)).addClass(l.hasClass("k-alt")?"k-alt":"").insertAfter(l),t.angular("compile",function(){return{elements:n.get(),data:[{dataItem:o}]}}),t.trigger(ht,{masterRow:l,detailRow:n,data:o,detailCell:n.find(".k-detail-cell")})),t.trigger(a?xt:Ct,{masterRow:l,detailRow:n}),n.toggle(a),i.preventDefault(),!1})},dataItem:function(t){if(t=e(t)[0],!t)return null;var i,n,o=this.tbody.children(),r=/k-grouping-row|k-detail-row|k-group-footer/,s=t.sectionRowIndex;for(n=s,i=0;i<s;i++)r.test(o[i].className)&&n--;return this._data[n]},expandRow:function(t){e(t).find("> td .k-i-expand").click()},collapseRow:function(t){e(t).find("> td .k-i-collapse").click()},_createHeaderCells:function(e,i){var n,r,s,a,l,c,d,u=this,h="",p=u.options.messages,f=$(u.columns),m=u.dataSource.group();for(n=0,a=e.length;n<a;n++)r=e[n].column||e[n],s=u._headerCellText(r),c="",d=Ve(r,f),r.selectable?(h+="<th scope='col'"+o(r.headerAttributes),i&&!e[n].colSpan&&(h+=" rowspan='"+i+"'"),d>-1&&(h+=Te.attr("index")+"='"+d+"'"),s=r.headerTemplate?s:Te.template(gi)({}),h+=">"+s+"</th>"):r.command?(h+="<th scope='col'"+o(r.headerAttributes),i&&!e[n].colSpan&&(h+=" rowspan='"+i+"'"),d>-1&&(h+=Te.attr("index")+"='"+d+"'"),h+=">"+s+"</th>"):(r.field&&(c=Te.attr("field")+"='"+r.field+"' "),h+="<th scope='col' role='columnheader' "+c,h+=" aria-haspopup='true'",i&&!e[n].colSpan&&(h+=" rowspan='"+i+"'"),e[n].colSpan>1&&(h+='colspan="'+(e[n].colSpan-B(r.columns))+'" ',h+=Te.attr("colspan")+"='"+e[n].colSpan+"'"),r.title&&(l=r.title.replace('"',"&quot;").replace(/'/g,"'"),h+=Te.attr("title")+'="'+l+'" '),r.groupable!==t&&(h+=Te.attr("groupable")+"='"+r.groupable+"' "),me(u,r)&&(h+="aria-label='"+(l||r.field)+" ",h+=ge(m,r.field)?p.ungroupHeader:p.groupHeader,h+="' "),r.aggregates&&r.aggregates.length&&(h+=Te.attr("aggregates")+"='"+r.aggregates+"'"),d>-1&&(h+=Te.attr("index")+"='"+d+"'"),h+=o(r.headerAttributes),h+=">"+s+"</th>");return h},_appendLockedColumnContent:function(){var t,i,n,o,r,s=this.columns,a=this.table.find("colgroup"),l=a.find("col:not(.k-group-col,.k-hierarchy-col)"),c=e(),d=0,u=0;for(t=0,i=s.length;t<i;t++)if(s[t].locked)if(b(s[t])){for(o=1,s[t].columns&&(o=$(s[t].columns).length-B(s[t].columns)),o=o||1,r=0;r<o;r++)c=c.add(l.eq(t+u+r-d));u+=o-1}else d++;n=e('<div class="k-grid-content-locked"><table'+(bi?' cellspacing="0"':"")+"><colgroup/><tbody></tbody></table></div>"),a.detach(),n.find("colgroup").append(c),a.insertBefore(this.table.find("tbody")),this.lockedContent=n.insertBefore(this.content),this.lockedTable=n.children("table")},_appendLockedColumnFooter:function(){var t,i,n=this,o=n.footer,r=o.find(".k-footer-template>td"),s=o.find(".k-grid-footer-wrap>table>colgroup>col"),a=e('<div class="k-grid-footer-locked"><table><colgroup /><tbody><tr class="k-footer-template"></tr></tbody></table></div>'),l=n._groups(),c=e(),d=e();for(c=c.add(r.filter(".k-group-cell")),t=0,i=$(W(n.columns)).length;t<i;t++)c=c.add(r.eq(t+l));for(d=d.add(s.filter(".k-group-col")),t=0,i=w($(j(n.columns))).length;t<i;t++)d=d.add(s.eq(t+l));c.appendTo(a.find("tr")),d.appendTo(a.find("colgroup")),n.lockedFooter=a.prependTo(o)},_appendLockedColumnHeader:function(t){var i,n,o,r,s,a,l,c,d,u,h,p=this,f=this.columns,m=[],g=0,v=e(),_=p._hasFilterRow(),w=0,y=e(),k=0,C=e(),S=p.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),T=p.thead.find("tr:first .k-header:not(.k-group-cell,.k-hierarchy-cell)"),D=p.thead.find(".k-filter-row").find("th:not(.k-group-cell,.k-hierarchy-cell)"),A=0;for(i=0,o=f.length;i<o;i++){if(f[i].locked){if(l=T.eq(i),k=$(f[i].columns||[]).length,b(f[i])){for(c=null,f[i].columns&&(c=k-B(f[i].columns)),c=c||1,d=0;d<c;d++)v=v.add(S.eq(i+A+d-g));A+=c-1}for(V([f[i]],Q(l),m,0,0),k=k||1,u=0;u<k;u++)y=y.add(D.eq(w+u));w+=k}f[i].columns&&(g+=B(f[i].columns)),b(f[i])||g++}if(m.length){for(n='<div class="k-grid-header-locked" style="width:1px"><table'+(bi?' cellspacing="0"':"")+"><colgroup/><thead>",n+=Array(m.length+1).join("<tr></tr>"),n+=(_?'<tr class="k-filter-row" />':"")+"</thead></table></div>",a=e(n),S=a.find("colgroup"),S.append(p.thead.prev().find("col.k-group-col").add(v)),r=a.find("thead tr:not(.k-filter-row)"),i=0,o=m.length;i<o;i++)C=x(m[i]),r.eq(i).append(p.thead.find("tr:eq("+i+") .k-group-cell").add(C));return h=O(this.thead),m.length<h&&H(a,h-m.length),s=a.find(".k-filter-row"),s.append(p.thead.find(".k-filter-row .k-group-cell").add(y)),this.lockedHeader=a.prependTo(t),this.thead.find(".k-group-cell").remove(),!0}return!1},_removeLockedContainers:function(){var e=this.lockedHeader.add(this.lockedContent).add(this.lockedFooter);Te.destroy(e),e.off(rt).remove(),this.lockedHeader=this.lockedContent=this.lockedFooter=null,this.selectable=null},_thead:function(){var t,i,n,o,r,s,a,l,c,d=this,u=d.columns,h=d._hasDetails()&&u.length,p=d._hasFilterRow(),f="",m=d.table.find(">thead"),g=d.element.find("thead:first").length>0;if(m.length||(m=e("<thead/>").insertBefore(d.tbody)),d.lockedHeader&&d.thead?(i=d.thead.find("tr:has(th):not(.k-filter-row)").html(""),i.remove(),i=e(),d._removeLockedContainers()):i=d.element.find(g?"thead:first tr:has(th):not(.k-filter-row)":"tr:has(th):first"),i.length)for(t=0;t<u.length;t++)o=Ve(u[t],$(u)),r=K(i.parent()).filter("th:not(.k-group-cell):not(.k-hierarchy-cell)").eq(o),u[t].hidden&&(r[0].style.display="none");else if(i=m.children().first(),!i.length){for(n=[{rowSpan:1,cells:[],index:0}],d._prepareColumns(n,u),t=0;t<n.length;t++)f+="<tr>",h&&(f+='<th class="k-hierarchy-cell" scope="col">'+d.options.messages.expandCollapseColumnHeader+"</th>"),f+=d._createHeaderCells(n[t].cells,n[t].rowSpan),f+="</tr>";i=e(f)}p&&(s=e("<tr/>"),s.addClass("k-filter-row"),(h||i.find(".k-hierarchy-cell").length)&&s.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),a=(d.thead||m).find(".k-filter-row"),a.length&&(Te.destroy(a),a.remove()),m.append(s)),i.children().length?h&&!i.find(".k-hierarchy-cell")[0]&&i.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'):(f="",h&&(f+='<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),f+=d._createHeaderCells(u),i.html(f)),i.attr("role","row").find("th").addClass("k-header"),d.options.scrollable||m.addClass("k-grid-header"),i.find("script").remove().end().prependTo(m),d.thead&&d._destroyColumnAttachments(),this.angular("cleanup",function(){return{elements:m.find("th"+Je).get()}}),this.angular("compile",function(){return{elements:m.find("th"+Je).get(),data:He(u,function(e){return{column:e}})}}),d.thead=m.attr("role","rowgroup"),d._sortable(),d._filterable(),d._filterRow(),d._scrollable(),d._columnMenu(),c=this.options.scrollable&&W(this.columns).length,c&&(l=d._appendLockedColumnHeader(d.thead.closest(".k-grid-header")),d._appendLockedColumnContent(),d.lockedContent.bind("DOMMouseScroll"+rt+" mousewheel"+rt,Ue(d._wheelScroll,d)),d._updateLockedCols()),d._updateCols(),d._updateColumnCellIndex(),d._updateFirstColumnClass(),d._resizable(),d._draggable(),d._reorderable(),d._updateHeader(d._groups()),c&&(l&&d._syncLockedHeaderHeight(),d._applyLockedContainersWidth()),d.groupable&&d._attachGroupable()},_retrieveFirstColumn:function(t,i){var n,o=e();if(i.length&&t[0]){for(n=t[0];n.columns&&n.columns.length;)n=n.columns[0],i=i.filter(":not(:first())");o=o.add(i)}return o},_updateFirstColumnClass:function(){var t,i,n=this,o=n.columns||[],r=n._hasDetails()&&o.length;r||n._groups()||(t=n.thead.find(">tr:not(.k-filter-row):not(:first)"),o=U(o),i=n._retrieveFirstColumn(o,t),n._isLocked()&&(t=n.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),o=W(n.columns),i=i.add(n._retrieveFirstColumn(o,t))),i.each(function(){var t=e(this).find("th");t.removeClass("k-first"),t.eq(0).addClass("k-first")}))},_prepareColumns:function(e,t,i,n){var o,r,s=n||e[e.length-1],a=e[s.index+1],l=0;for(o=0;o<t.length;o++)r={column:t[o],colSpan:0},s.cells.push(r),t[o].columns&&t[o].columns.length&&(a||(a={rowSpan:0,cells:[],index:e.length},e.push(a)),r.colSpan=t[o].columns.length,this._prepareColumns(e,t[o].columns,r,a),l+=r.colSpan-1,s.rowSpan=e.length-s.index);i&&(i.colSpan+=l)},_wheelScroll:function(e){var t,i,n;e.ctrlKey||(t=this.content,this.options.scrollable.virtual&&(t=this.virtualScrollable.verticalScrollbar),i=t.scrollTop(),n=Te.wheelDeltaY(e),n&&(t[0].scrollHeight>t[0].clientHeight&&(t[0].scrollTop<t[0].scrollHeight-t[0].clientHeight&&n<0||t[0].scrollTop>0&&n>0)&&e.preventDefault(),t.scrollTop(i+-n)))},_isLocked:function(){return null!=this.lockedHeader},_updateHeaderCols:function(){var e=this.thead.parent().add(this.table);this._isLocked()?ee(e,G(q(this.columns)),this._hasDetails(),0):ee(e,G(w(this.columns)),this._hasDetails(),0)},_updateCols:function(e){e=e||this.thead.parent().add(this.table),this._appendCols(e,this._isLocked())},_updateLockedCols:function(e){this._isLocked()&&(e=e||this.lockedHeader.find("table").add(this.lockedTable),ee(e,G(j(this.columns)),this._hasDetails(),this._groups()))},_appendCols:function(e,t){t?ee(e,G(q(this.columns)),this._hasDetails(),0):ee(e,G(w(this.columns)),this._hasDetails(),this._groups())},_autoColumns:function(e){if(e&&e.toJSON){var t,i,n=this;e=e.toJSON(),i=!(n.table.find("tbody tr").length>0&&(!n.dataSource||!n.dataSource.transport));for(t in e)n.columns.push({field:t,encoded:i,headerAttributes:{id:Te.guid()}});n._thead(),n._templates()}},_rowsHtml:function(e,t){var i,n,o=this,r="",s=t.rowTemplate,a=t.altRowTemplate;for(i=0,n=e.length;i<n;i++)o._skipRerenderItemsCount>0?o._skipRerenderItemsCount--:r+=i%2?a(e[i]):s(e[i]),o._data.push(e[i]);return r},_groupData:function(e,t,i){var n,o=this,r=o._groupAggregatesDefaultObject||{},s=e.items,a=Le({},r,e.aggregates),l=Le({},{field:e.field,value:e.value,items:s,aggregates:a},e.aggregates[i?i.field:e.field]),c={};if(!t)for(n in a)c[n]=Le({},a[n],{group:{field:e.field,value:e.value,items:s}});return Le({},c,l)},_groupRowHtml:function(e,t,i,n,o,r,s){var a,l,c,d=this,u="",h=e.field,p=Ne($(d.columns),function(e){return e.field==h})[0]||{},f=p.groupHeaderTemplate?p.groupHeaderTemplate:w(d.columns)[0].groupHeaderColumnTemplate,m=(p.title||h)+": "+ne(e.value,p.format,p.values,p.encoded),g=e.items,v=d._groups(),_=o.groupFooterTemplate,b=o.groupHeaderColumnTemplate;if((o.groupFooterTemplate||o.groupHeaderColumnTemplate||p.groupHeaderTemplate)&&(c=d._groupData(e,!1,!(p.groupHeaderTemplate||!w(d.columns)[0].groupHeaderColumnTemplate)&&w(d.columns)[0])),f&&!r&&(m=typeof f===Gt?f(c):Te.template(f)(c)),d._skipRerenderItemsCount?n(t,i,m):u+=b?b(Le({},c,{groupCells:i,colspan:v-i,text:m})):n(t,i,m),e.hasSubgroups)for(a=0,l=g.length;a<l;a++)u+=d._groupRowHtml(g[a],r?t:t-1,i+1,n,o,r,s&&a===g.length-1);else u+=d._rowsHtml(g,o);return _&&(s?Ve(e.value,d._skippedGroups)||d._skippedGroups.push(e.value):(d._skippedGroups.length&&d._skippedGroups[0]===e.value&&d._skippedGroups.shift(),d._skipRerenderItemsCount||(u+=_(c)))),u},collapseGroup:function(t){var i,n,o,r,s,a,l=this,c=t,d=this.options.groupable,u=d.showFooter,h=u?0:1,p=e();for(t=e(t),this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?p=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(p=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),i=t.find(".k-group-cell").length,t.find(".k-i-collapse").addClass("k-i-expand").removeClass("k-i-collapse"),t.find("td[aria-expanded='true']:first").attr("aria-expanded",!1).find("a").attr(li,ai),t=t.nextAll("tr"),a=[],o=0,r=t.length;o<r&&(s=t.eq(o),n=s.find(".k-group-cell").length,s.hasClass("k-grouping-row")?h++:s.hasClass("k-group-footer")&&h--,!(n<=i||s.hasClass("k-group-footer")&&h<0));o++)p.length&&a.push(p[o]),a.push(s[0]);e(a).hide(),this.options.scrollable.endless&&this.content&&setTimeout(function(){l.content.scroll(),l._groupToCollapse=c})},expandGroup:function(t){t=e(t);var i,n,o,r,s,a=this,l=a.options.groupable.showFooter,c=e(),d=[],u=1;for(this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?c=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(c=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),i=t.find(".k-group-cell").length,t.find(".k-i-expand").addClass("k-i-collapse").removeClass("k-i-expand"),t.find("td[aria-expanded='false']:first").attr("aria-expanded",!0).find("a").attr(li,si),t=t.nextAll("tr"),r=0,s=t.length;r<s&&(n=t.eq(r),o=n.find(".k-group-cell").length,!(o<=i));r++)o!=i+1||n.hasClass("k-detail-row")||(n.show(),c.eq(r).show(),n.hasClass("k-grouping-row")&&n.find(".k-icon").hasClass("k-i-collapse")&&a.expandGroup(n),n.hasClass("k-master-row")&&n.find(".k-icon").hasClass("k-i-collapse")&&(n.next().show(),c.eq(r+1).show())),n.hasClass("k-grouping-row")&&(l&&d.push(n.is(":visible")),u++),n.hasClass("k-group-footer")&&(l&&n.toggle(d.pop()),1==u?(n.show(),c.eq(r).show()):u--);0===i&&a.options.scrollable.endless&&this._isLocked()&&a._syncLockedContentHeight()},_updateHeader:function(t){var i=this,n=i._isLocked()?i.lockedHeader.find("thead"):i.thead,o=n.find("tr.k-filter-row").find("th.k-group-cell").length,r=n.find("tr:first").find("th.k-group-cell").length,s=n.children("tr:not(:first)").filter(function(){return!e(this).children(":visible").length});t>r?(e(Array(t-r+1).join('<th class="k-group-cell k-header" scope="col">'+i.options.messages.expandCollapseColumnHeader+"</th>")).prependTo(n.children("tr:not(.k-filter-row)")),i.element.is(":visible")&&s.find("th.k-group-cell").hide()):t<r&&n.find("tr").each(function(){e(this).find("th.k-group-cell").filter(":eq("+t+"),:gt("+t+")").remove()}),t>o&&e(Array(t-o+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>')).prependTo(n.find(".k-filter-row"))},_firstDataItem:function(e,t){return e&&t&&(e=e.hasSubgroups?this._firstDataItem(e.items[0],t):e.items[0]),e},_updateTablesWidth:function(){var t,i=this;i._isLocked()&&(t=e(">.k-grid-footer>.k-grid-footer-wrap>table",i.wrapper).add(i.thead.parent()).add(i.table),i._footerWidth=de(t.eq(0)),t.width(i._footerWidth),t=e(">.k-grid-footer>.k-grid-footer-locked>table",i.wrapper).add(i.lockedHeader.find(">table")).add(i.lockedTable),t.width(de(t.eq(0))))},hideColumn:function(i){var n,o,r,s,l,c,d,u,h,p,f,m=this,g=0,_=m.footer||m.wrapper.find(".k-grid-footer"),y=m.columns,k=m.lockedHeader?K(m.lockedHeader.find(">table>thead")).filter(v).length:0,x=Ne($(m.columns),function(e){return e.groupHeaderColumnTemplate});if(i="number"==typeof i?y[i]:Be(i)?Ne(z(y),function(e){return e===i})[0]:Ne(z(y),function(e){return e.field===i})[0],i&&b(i)){if(p=m._columnVisibilitySetter(i),i.columns&&i.columns.length){for(c=R(i,y),p(i,!1),oe(a(e(">table>thead",m.lockedHeader),m.thead,">tr:eq("+c.row+")>th"),c.cell,!1),r=0;r<i.columns.length;r++)this.hideColumn(i.columns[r]);return m.trigger(bt,{column:i}),t}if(h=Ve(i,w($(y))),p(i,!1),m._setParentsVisibility(i,!1),m._templates(),m._updateCols(),m._updateLockedCols(),f=m.thead,d=h,m.lockedHeader&&k>h?f=m.lockedHeader.find(">table>thead"):d-=k,n=K(f).filter(v).eq(d),n[0].style.display="none",oe(a(e(">table>thead",m.lockedHeader),m.thead,">tr.k-filter-row>th"),h,!1),_[0]&&(m._updateCols(_.find(">.k-grid-footer-wrap>table")),m._updateLockedCols(_.find(">.k-grid-footer-locked>table")),oe(_.find(".k-footer-template>td"),h,!1)),m.lockedTable&&k>h?re(m.lockedTable.find(">tbody>tr"),h):re(m.tbody.children(),h-k),m.lockedTable)m._updateTablesWidth(),m._applyLockedContainersWidth(),m._syncLockedContentHeight(),m._syncLockedHeaderHeight(),m._syncLockedFooterHeight();else{for(s=m.thead.prev().find("col"),r=0,u=s.length;r<u;r+=1){if(l=s[r].style.width,!l||l.indexOf("%")!=-1){g=0;break}g+=parseInt(l,10)}o=e(">.k-grid-header table:first,>.k-grid-footer table:first",m.wrapper).add(m.table),m._footerWidth=null,g&&(o.each(function(){this.style.width=g+"px"}),m._footerWidth=g),_i.msie&&8==_i.version&&(o.css("display","inline-table"),setTimeout(function(){o.css("display","table")},1))}m._updateFirstColumnClass(),x.length>0&&m._renderGroupRows(),m.trigger(bt,{column:i})}},_setParentsVisibility:function(t,i){var n,o,r,s,l,c=this,d=c.columns,h=[],p=c._columnVisibilitySetter(t),f=i?function(e){return w(e.columns).length&&e.hidden}:function(e){return!w(e.columns).length&&!e.hidden};if(u(t,d,h)&&h.length)for(n=h.length-1;n>=0;n--)o=h[n],r=E(o,d),s=a(e(">table>thead",this.lockedHeader),this.thead,">tr:eq("+r.row+")>th:not(.k-group-cell):not(.k-hierarchy-cell)").eq(r.cell),f(o)&&(p(o,i),s[0].style.display=i?"":"none"),s.filter("["+Te.attr("colspan")+"]").length&&(l=parseInt(s.attr(Te.attr("colspan")),10),s[0].colSpan=l-B(o.columns)||1)},showColumn:function(i){var n,o,r,s,l,c,d,u,h,p,f,m,g,v,_=this,w=_.columns,y=_.footer||_.wrapper.find(".k-grid-footer"),k=_.lockedHeader?K(_.lockedHeader.find(">table>thead")).length:0,x=Ne($(_.columns),function(e){return e.groupHeaderColumnTemplate});if("number"==typeof i?(p=i,i=w[i]):Be(i)?e.each(z(w),function(e,t){if(t===i)return i=t,p=e,!1}):e.each(z(w),function(e,t){if(t.field===i)return i=t,p=e,!1}),i&&!b(i)){if(g=_._columnVisibilitySetter(i),i.columns&&i.columns.length){for(d=E(i,w),f=z(_.options.columns)[p],g(i,!0),oe(a(e(">table>thead",_.lockedHeader),_.thead,">tr:eq("+d.row+")>th"),d.cell,!0),n=0;n<i.columns.length;n++)f.columns[n].hidden||this.showColumn(i.columns[n]);return _.trigger(wt,{column:i}),t}if(m=Ve(i,$(w)),g(i,!0),_._setParentsVisibility(i,!0),_._templates(),_._updateCols(),_._updateLockedCols(),v=_.thead,c=m,_.lockedHeader&&k>m?v=_.lockedHeader.find(">table>thead"):c-=k,r=K(v).eq(c),r[0].style.display="",oe(a(e(">table>thead",_.lockedHeader),_.thead,">tr.k-filter-row>th"),m,!0),y[0]&&(_._updateCols(y.find(">.k-grid-footer-wrap>table")),_._updateLockedCols(y.find(">.k-grid-footer-locked>table")),oe(y.find(".k-footer-template>td"),m,!0)),_.lockedTable&&k>m?le(_.lockedTable.find(">tbody>tr"),m):le(_.tbody.children(),m-k),_.lockedTable)_._updateTablesWidth(),_._applyLockedContainersWidth(),_._syncLockedContentHeight(),_._syncLockedHeaderHeight();else if(s=e(">.k-grid-header table:first,>.k-grid-footer table:first",_.wrapper).add(_.table),i.width){for(l=0,h=_.thead.prev().find("col"),n=0,o=h.length;n<o;n+=1){if(u=h[n].style.width,u.indexOf("%")>-1){l=0;break}l+=parseInt(u,10)}_._footerWidth=null,l&&(s.each(function(){this.style.width=l+"px"}),_._footerWidth=l)}else s.width("");_._updateFirstColumnClass(),x.length>0&&_._renderGroupRows(),_.trigger(wt,{column:i})}},_columnVisibilitySetter:function(e){var t=e||{};return k(t.media)?h:f},_progress:function(e){var t=this.element,i=this.options.scrollable&&this.options.scrollable.endless;this._editContainer&&"popup"===this._editMode()?t=this._editContainer:this.lockedContent||i?t=this.wrapper:this.element.is("table")?t=this.element.parent():this.content&&this.content.length&&(t=this.content),i&&e?Te.ui.progress(t,e,{height:this.content.height(),top:this.content[0].offsetTop,opacity:!0}):Te.ui.progress(t,e)},_resize:function(e,t){this._syncLockedContentHeight(),this._syncLockedHeaderHeight(),this.content&&(this._setContentWidth(),this._setContentHeight()),this.lockedTable&&(this.lockedContent[0].scrollTop=this.content[0].scrollTop),this.virtualScrollable&&(t||this._rowHeight)&&(t&&(this._rowHeight=null),this.virtualScrollable.repaintScrollbar())},_isActiveInTable:function(){var t=Me();return!!t&&(this.table[0]===t||e.contains(this.table[0],t)||this._isLocked()&&(this.lockedTable[0]===t||e.contains(this.lockedTable[0],t)))},refresh:function(t){var i,n,o,r=this,s=r.dataSource.view(),a=r.options.navigatable,l=e(r.current()),c=!1,d=(r.dataSource.group()||[]).length,u=d+G(w(r.columns)).length;t&&"itemchange"===t.action&&(r.editable||r.options.scrollable.endless)&&("popup"!=this._editMode()||"popup"===this._editMode()&&!r._editableIsClosing)||(t&&"remove"===t.action&&r.editable&&r.editable.options.model&&Ve(r.editable.options.model,t.items)>-1&&r.editable.options.model.unbind(_t,r._modelChangeHandler),t=t||{},r.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})||(t.action===Et&&r._isVirtualEditable()&&(r._destroyEditable(),r._clearEditableState()),r._angularItems("cleanup"),r._endlessFetchInProgress||(a&&(r._isActiveInTable()||r._editContainer&&r._editContainer.data("kendoWindow"))&&(c=l.is("th"),i=c?l.parent().children(":not(.k-group-cell)").index(l[0]):Math.max(r.cellIndex(l),0)),r._destroyEditable()),r.options.scrollable&&r.options.scrollable.endless?(clearTimeout(r._progressTimeOut),r._progressTimeOut=setTimeout(function(){r._endlessFetchInProgress||r._progress(!1)},100)):r._progress(!1),r._hideResizeHandle(),r._data=[],r.columns.length||(r._autoColumns(r._firstDataItem(s[0],d)),u=d+r.columns.length),r._group=d>0||r._group,r._group&&(r._templates(),r._updateCols(),r._updateLockedCols(),r._updateHeader(d),r._group=d>0,r._groupRows=se(s)),r.content&&(n=r.content.scrollLeft()),o=r._skipRerenderItemsCount,r._renderContent(s,u,d),r.options.scrollable&&r.options.scrollable.endless&&this.lockedContent&&(r._skipRerenderItemsCount=o),r._renderLockedContent(s,u,d),r._footer(),r._renderNoRecordsContent(),r._togglePagerVisibility(),r._setContentHeight(),r._setContentWidth(r.content&&n),r.lockedTable&&(r.options.scrollable.virtual?r.content.find(">.k-virtual-scrollable-wrap").trigger("scroll"):r.touchScroller?r.touchScroller.movable.trigger("change"):(r.wrapper.one("scroll",function(e){e.stopPropagation()}),r.content.trigger("scroll"))),r._endlessFetchInProgress||r._restoreCurrent(i,c),r.touchScroller&&r.touchScroller.contentResized(),r.selectable&&r.selectable.resetTouchEvents(),r._muteAngularRebind(function(){r._angularItems("compile")}),r._checkBoxSelection&&r._toggleHeaderCheckState(!1),r.options.persistSelection&&(r.selectable&&!Te.ui.Selectable.parseOptions(r.options.selectable).cell||r._checkBoxSelection)?r._restoreSelection():r._selectedIds={},r.trigger(kt)))},_restoreCurrent:function(i,n){var o,r,s;i===t||i<0||(this._removeCurrent(),n?this._setCurrent(this.thead.find("th:not(.k-group-cell)").eq(i)):(o=0,this._rowVirtualIndex?o=this.virtualScrollable.position(this._rowVirtualIndex):i=0,r=e(),this.lockedTable&&(r=this.lockedTable.find(">tbody>tr").eq(o)),r=r.add(this.tbody.children().eq(o)),s=r.find(">td:not(.k-group-cell):not(.k-hierarchy-cell)").eq(i),this._setCurrent(s)),this._current&&fe(this._current.closest("table")[0],!0))},_restoreSelection:function(){var e,t=this,i=t.items(),n=qe(t.dataSource.options.schema.model)?t.dataSource.options.schema.model.fn.idField:t.dataSource.options.schema.model.id;e=Ne(i,function(e){var i=t.dataItem(e)[n];if(t._selectedIds[i])return e}),t.select(e)},_angularItems:function(e){Te.ui.DataBoundWidget.fn._angularItems.call(this,e),"cleanup"!==e||this.dataSource&&this.dataSource.options.endless||this._cleanupDetailItems(),this._angularGroupItems(e),this._angularGroupFooterItems(e)},_cleanupDetailItems:function(){var e=this;e._hasDetails()&&(e.angular("cleanup",function(){return{elements:e.tbody.children(".k-detail-row")}}),e.tbody.find(".k-detail-cell").empty())},_angularGroupItems:function(t){var i=this,n=i.tbody;i.lockedContent&&(n=i.lockedTable.find("tbody")),i._group&&i.angular(t,function(){return{elements:n.children(".k-grouping-row"),data:e.map(se(i.dataSource.view()),function(e){return{dataItem:e}})}})},_angularGroupFooterItems:function(t){var i=this,n=i.tbody;i.lockedContent&&(n=i.element),i._group&&i.groupFooterTemplate&&i.angular(t,function(){return{elements:n.find(".k-group-footer"),data:e.map(ae(i.dataSource.view()),function(e){return{dataItem:e}})}})},_renderContent:function(e,t,i){var n,o,r,s,a=this,l="",c=null!=a.lockedContent,d=null,u=a.options.scrollable,h={rowTemplate:a.rowTemplate,altRowTemplate:a.altRowTemplate,groupFooterTemplate:a.groupFooterTemplate,groupHeaderColumnTemplate:a.groupHeaderColumnTemplate};if(u&&u.endless&&!a.dataSource.options.endless&&(a._skipRerenderItemsCount=0,a.content&&(a.content[0].scrollTop=0)),d=a._skipRerenderItemsCount>0,t=c?t-G(j(a.columns)).length:t,i>0)for(t=c?t-i:t,a.detailTemplate&&t++,a.groupFooterTemplate&&(a._groupAggregatesDefaultObject=a.dataSource.aggregates()),a.options.scrollable.endless&&(s=a.dataSource.flatView().length),n=0,o=e.length;n<o;n++)a._skippedGroups||(a._skippedGroups=[]),r=s&&n===e.length-1&&s!==a.dataSource.total(),l+=a._groupRowHtml(e[n],t,0,c?Se:Ce,h,c,r);else l+=a._rowsHtml(e,h);d?(a.tbody.append(l),setTimeout(function(){a._groupToCollapse&&(a.collapseGroup(a._groupToCollapse),a._groupToCollapse=null)}),a._endlessFetchInProgress=null):a.tbody=X(a.tbody,a.table,l,this.options.$angular)},_renderGroupRows:function(){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_=this,b=_._groupRows,y=_.wrapper.find(".k-grouping-row"),k=_._groups(),x=null!=_.lockedContent;y.each(function(y,C){f=e(C),d=f.closest("table").parent(),u=d.is("."+st),i=G(u?w(W(_.columns)):w(U(_.columns))),m=f.find("."+at).length,x?(t=u?Ce:Se,n=u?i.length+k-m:i.length):(t=Ce,n=i.length+k-m),o=y>=b.length?b[y-b.length]:b[y],r=o.field,s=Ne($(_.columns),function(e){return e.field==r})[0]||{},v=!(s.groupHeaderTemplate||!w(_.columns)[0].groupHeaderColumnTemplate)&&w(_.columns)[0],a=s.groupHeaderTemplate?s.groupHeaderTemplate:w(_.columns)[0].groupHeaderColumnTemplate,l=(s.title||r)+": "+ne(o.value,s.format,s.values,s.encoded),k=k,c=_._groupData(o,!1,v),g=u?_.lockedGroupHeaderColumnTemplate:_.groupHeaderColumnTemplate,a&&(l=typeof a===Gt?a(c):Te.template(a)(c)),h=f.prev().length?f.prev():f.parent(),p=e(g?g(Le({},c,{groupCells:m,colspan:k-m,text:l})):t(n,m,l)),h.is("tbody")?h.prepend(p):h.after(p),f.remove()})},_renderLockedContent:function(e,t,i){var n,o,r,s="",a=null,l={rowTemplate:this.lockedRowTemplate,altRowTemplate:this.lockedAltRowTemplate,groupFooterTemplate:this.lockedGroupFooterTemplate,groupHeaderColumnTemplate:this.lockedGroupHeaderColumnTemplate};if(this.lockedContent){if(r=this.lockedTable,a=this._skipRerenderItemsCount>0,i>0)for(t-=w($(U(this.columns))).length,n=0,o=e.length;n<o;n++)s+=this._groupRowHtml(e[n],t,0,Ce,l,!1,this.options.scrollable.endless&&n===e.length-1);else s=this._rowsHtml(e,l);a?r.children("tbody").append(s):X(r.children("tbody"),r,s,this.options.$angular),this._syncLockedContentHeight()}},_togglePagerVisibility:function(){this.options.pageable.alwaysVisible===!1&&this.wrapper.find(".k-grid-pager").toggle(this.dataSource.total()>=this.dataSource.pageSize())},_adjustRowsHeight:function(e,t){var i,n,o,r,s=e[0].rows,a=s.length,l=t[0].rows,c=e.add(t),d=c.length,u=[];for(i=0;i<a&&l[i];i++)s[i].style.height&&(s[i].style.height=l[i].style.height="");for(i=0;i<a&&l[i];i++)n=s[i].offsetHeight,o=l[i].offsetHeight,r=0,n>o?r=n:n<o&&(r=o),u.push(r);for(i=0;i<d;i++)c[i].style.display="none";for(i=0;i<a;i++)u[i]&&(s[i].style.height=l[i].style.height=u[i]+1+"px");for(i=0;i<d;i++)c[i].style.display=""}});Te.ExcelMixin&&Te.ExcelMixin.extend(Si.prototype),Te.PDFMixin&&(Te.PDFMixin.extend(Si.prototype),Si.prototype._drawPDF_autoPageBreak=function(i){function n(){u&&a!==t?(d.one("change",o),d.page(a)):(l.refresh(),o())}function o(){p.appendTo(document.body);var t=e.extend({},l.options.pdf,{_destructive:!0,progress:function(e){i.notify({page:e.page,pageNumber:e.pageNum,progress:.5+e.pageNum/e.totalPages/2,totalPages:e.totalPages})}});Te.drawing.drawDOM(f,t).always(function(){p.remove()}).then(function(e){c.resolve(e)}).fail(function(e){c.reject(e)})}function r(){var e=d.page(),t=u?d.totalPages():1;s.append(h.find("tr")),e<t?d.page(e+1):(d.unbind("change",r),n())}var s,a,l=this,c=new e.Deferred,d=l.dataSource,u=l.options.pdf.allPages,h=l.wrapper.find('table[role="grid"] > tbody'),p=e("<div>").css({position:"absolute",left:-1e4,top:-1e4}),f=l.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(p);return f.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),f.find('table[role="grid"], .k-grid-footer table').css({height:"auto",width:"100%",overflow:"visible"}),f.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),f.find(".k-grid-header, .k-grid-footer").css({paddingRight:0}),this._initPDFProgress(i),s=f.find('table[role="grid"] > tbody').empty(),a=d.page(),u?(d.bind("change",r),d.page(1)):r(),c.promise()},Si.prototype._drawPDF=function(i){function n(){a&&c!==t?(s.unbind("change",o),s.one("change",function(){r.resolve(l)}),s.page(c)):r.resolve(l)}function o(){d._drawPDFShadow({width:d.wrapper.width()},{avoidLinks:d.options.pdf.avoidLinks}).done(function(e){var t=s.page(),o=a?s.totalPages():1,r={page:e,pageNumber:t,progress:t/o,totalPages:o};i.notify(r),l.append(r.page),t<o?s.page(t+1):n()}).fail(function(e){r.reject(e)})}var r,s,a,l,c,d=this;return d.options.pdf.paperSize&&"auto"!=d.options.pdf.paperSize?d._drawPDF_autoPageBreak(i):(r=new e.Deferred,s=d.dataSource,a=d.options.pdf.allPages,this._initPDFProgress(i),l=new Te.drawing.Group,c=s.page(),a?(s.bind("change",o),s.page(1)):o(),r.promise())},Si.prototype._initPDFProgress=function(t){var i,n=e("<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>");n.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(n),i=e("<div class='k-loading-pdf-progress'>").appendTo(n).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar"),t.progress(function(e){i.value(e.progress)}).always(function(){Te.destroy(n),n.remove()})}),De.plugin(Si),De.plugin(xi)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.listview.min",["kendo.data.min","kendo.editable.min","kendo.selectable.min"],e)}(function(){return function(e,t){var i=window.kendo,n="change",o="cancel",r="dataBound",s="dataBinding",a=i.ui.Widget,l=i.keys,c=">*:not(.k-loading-mask)",d="progress",u="error",h="k-state-focused",p="k-state-selected",f="k-edit-item",m="edit",g="remove",v="save",_="click",b=".kendoListView",w=e.proxy,y=i._activeElement,k=i.ui.progress,x=i.data.DataSource,C=i.ui.DataBoundWidget.extend({init:function(t,n){var o=this;n=e.isArray(n)?{dataSource:n}:n,a.fn.init.call(o,t,n),n=o.options,o.wrapper=t=o.element,t[0].id&&(o._itemId=t[0].id+"_lv_active"),o._element(),o._dataSource(),o._templates(),o._navigatable(),o._selectable(),o._pageable(),o._crudHandlers(),o.options.autoBind&&o.dataSource.fetch(),i.notify(o)},events:[n,o,s,r,m,g,v],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},setOptions:function(e){a.fn.setOptions.call(this,e),this._templates(),this.selectable&&(this.selectable.destroy(),this.selectable=null),this._selectable()},_templates:function(){var e=this.options;this.template=i.template(e.template||""),this.altTemplate=i.template(e.altTemplate||e.template),this.editTemplate=i.template(e.editTemplate||"")},_item:function(e){return this.element.children()[e]()},items:function(){return this.element.children()},dataItem:function(t){var n=i.attr("uid"),o=e(t).closest("["+n+"]").attr(n);return this.dataSource.getByUid(o)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},_unbindDataSource:function(){
var e=this;e.dataSource.unbind(n,e._refreshHandler).unbind(d,e._progressHandler).unbind(u,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=w(e.refresh,e),e._progressHandler=w(e._progress,e),e._errorHandler=w(e._error,e)),e.dataSource=x.create(e.options.dataSource).bind(n,e._refreshHandler).bind(d,e._progressHandler).bind(u,e._errorHandler)},_progress:function(){k(this.element,!0)},_error:function(){k(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(e){var n,o,a,l,c,d=this,u=d.dataSource.view(),h="",p=d.template,f=d.altTemplate,m=y();if(e=e||{},"itemchange"===e.action)return d._hasBindingTarget()||d.editable||(n=e.items[0],a=d.items().filter("["+i.attr("uid")+"="+n.uid+"]"),a.length>0&&(l=a.index(),d.angular("cleanup",function(){return{elements:[a]}}),a.replaceWith(p(n)),a=d.items().eq(l),a.attr(i.attr("uid"),n.uid),d.angular("compile",function(){return{elements:[a],data:[{dataItem:n}]}}),d.trigger("itemChange",{item:a,data:n}))),t;if(!d.trigger(s,{action:e.action||"rebind",items:e.items,index:e.index})){for(d._angularItems("cleanup"),d._destroyEditable(),l=0,c=u.length;l<c;l++)h+=l%2?f(u[l]):p(u[l]);for(d.element.html(h),o=d.items(),l=0,c=u.length;l<c;l++)o.eq(l).attr(i.attr("uid"),u[l].uid).attr("role","option").attr("aria-selected","false");d.element[0]===m&&d.options.navigatable&&d.current(o.eq(0)),d._angularItems("compile"),d.trigger(r,{action:e.action||"rebind",items:e.items,index:e.index})}},_pageable:function(){var t,n,o=this,r=o.options.pageable;e.isPlainObject(r)&&(n=r.pagerId,t=e.extend({},r,{dataSource:o.dataSource,pagerId:null}),o.pager=new i.ui.Pager(e("#"+n),t))},_selectable:function(){var e,o,r=this,s=r.options.selectable,a=r.options.navigatable;s&&(e=i.ui.Selectable.parseOptions(s).multiple,r.selectable=new i.ui.Selectable(r.element,{aria:!0,multiple:e,filter:c,change:function(){r.trigger(n)}}),a&&r.element.on("keydown"+b,function(i){if(i.keyCode===l.SPACEBAR){if(o=r.current(),i.target==i.currentTarget&&i.preventDefault(),e)if(i.ctrlKey){if(o&&o.hasClass(p))return o.removeClass(p),t}else r.selectable.clear();else r.selectable.clear();r.selectable.value(o)}}))},current:function(e){var i=this,n=i.element,o=i._current,r=i._itemId;return e===t?o:(o&&o[0]&&(o[0].id===r&&o.removeAttr("id"),o.removeClass(h),n.removeAttr("aria-activedescendant")),e&&e[0]&&(r=e[0].id||r,i._scrollTo(e[0]),n.attr("aria-activedescendant",r),e.addClass(h).attr("id",r)),i._current=e,t)},_scrollTo:function(t){var i,n,o=this,r=!1,s="scroll";"auto"==o.wrapper.css("overflow")||o.wrapper.css("overflow")==s?i=o.wrapper[0]:(i=window,r=!0),n=function(n,o){var a=r?e(t).offset()[n.toLowerCase()]:t["offset"+n],l=t["client"+o],c=e(i)[s+n](),d=e(i)[o.toLowerCase()]();a+l>c+d?e(i)[s+n](a+l-d):a<c&&e(i)[s+n](a)},n("Top","Height"),n("Left","Width")},_navigatable:function(){var t=this,n=t.options.navigatable,o=t.element,r=function(n){t.current(e(n.currentTarget)),e(n.target).is(":button,a,:input,a>.k-icon,textarea")||i.focusElement(o)};n&&(t._tabindex(),o.on("focus"+b,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+b,function(){t._current&&t._current.removeClass(h)}).on("keydown"+b,function(n){var r,s,a=n.keyCode,c=t.current(),d=e(n.target),u=!d.is(":button,textarea,a,a>.t-icon,input"),h=d.is(":text,:password"),p=i.preventDefault,m=o.find("."+f),g=y();if(!(!u&&!h&&l.ESC!=a||h&&l.ESC!=a&&l.ENTER!=a))if(l.UP===a||l.LEFT===a)c&&(c=c.prev()),t.current(c&&c[0]?c:t._item("last")),p(n);else if(l.DOWN===a||l.RIGHT===a)c&&(c=c.next()),t.current(c&&c[0]?c:t._item("first")),p(n);else if(l.PAGEUP===a)t.current(null),t.dataSource.page(t.dataSource.page()-1),p(n);else if(l.PAGEDOWN===a)t.current(null),t.dataSource.page(t.dataSource.page()+1),p(n);else if(l.HOME===a)t.current(t._item("first")),p(n);else if(l.END===a)t.current(t._item("last")),p(n);else if(l.ENTER===a)0!==m.length&&(u||h)?(r=t.items().index(m),g&&g.blur(),t.save(),s=function(){t.element.trigger("focus"),t.current(t.items().eq(r))},t.one("dataBound",s)):""!==t.options.editTemplate&&t.edit(c);else if(l.ESC===a){if(m=o.find("."+f),0===m.length)return;r=t.items().index(m),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(r))}}),o.on("mousedown"+b+" touchstart"+b,c,w(r,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(n)},select:function(i){var n=this,o=n.selectable;return i=e(i),i.length?(o.options.multiple||(o.clear(),i=i.first()),o.value(i),t):o.value()},_destroyEditable:function(){var e=this;e.editable&&(e.editable.destroy(),delete e.editable)},_modelFromElement:function(e){var t=e.attr(i.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(){var e,t,n,o=this,r=o.editable,s=o.template;return r&&(r.element.index()%2&&(s=o.altTemplate),o.angular("cleanup",function(){return{elements:[r.element]}}),e=o._modelFromElement(r.element),o._destroyEditable(),n=r.element.index(),r.element.replaceWith(s(e)),t=o.items().eq(n),t.attr(i.attr("uid"),e.uid),o._hasBindingTarget()&&i.bind(t,e),o.angular("compile",function(){return{elements:[t],data:[{dataItem:e}]}})),!0},edit:function(e){var t,n,o=this,r=o._modelFromElement(e),s=r.uid;o.cancel(),e=o.items().filter("["+i.attr("uid")+"="+s+"]"),n=e.index(),e.replaceWith(o.editTemplate(r)),t=o.items().eq(n).addClass(f).attr(i.attr("uid"),r.uid),o.editable=t.kendoEditable({model:r,clearContainer:!1,errorTemplate:!1,target:o}).data("kendoEditable"),o.trigger(m,{model:r,item:t})},save:function(){var e,t,i=this,n=i.editable;n&&(t=n.element,e=i._modelFromElement(t),n.end()&&!i.trigger(v,{model:e,item:t})&&(i._closeEditable(),i.dataSource.sync()))},remove:function(e){var t=this,i=t.dataSource,n=t._modelFromElement(e);t.editable&&(i.cancelChanges(t._modelFromElement(t.editable.element)),t._closeEditable()),t.trigger(g,{model:n,item:e})||(e.hide(),i.remove(n),i.sync())},add:function(){var e,t=this,i=t.dataSource,n=i.indexOf((i.view()||[])[0]);n<0&&(n=0),t.cancel(),e=i.insert(n,{}),t.edit(t.element.find("[data-uid='"+e.uid+"']"))},cancel:function(){var e,t,i=this,n=i.dataSource;i.editable&&(e=i.editable.element,t=i._modelFromElement(e),i.trigger(o,{model:t,container:e})||(n.cancelChanges(t),i._closeEditable()))},_crudHandlers:function(){var t=this,n=_+b;t.element.on(n,".k-edit-button",function(n){var o=e(this).closest("["+i.attr("uid")+"]");t.edit(o),n.preventDefault()}),t.element.on(n,".k-delete-button",function(n){var o=e(this).closest("["+i.attr("uid")+"]");t.remove(o),n.preventDefault()}),t.element.on(n,".k-update-button",function(e){t.save(),e.preventDefault()}),t.element.on(n,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;a.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(b),e.pager&&e.pager.destroy(),i.destroy(e.element)}});i.ui.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.listbox.min",["kendo.draganddrop.min","kendo.data.min","kendo.selectable.min"],e)}(function(){return function(e,t){function i(t){var i=e.map(t,function(t){return e(t).index()});return i}function n(e){return t===e}function o(e){return e.clone().removeClass(ue).removeClass(U).addClass(_.format("{0} {1} {2}",H,K,q)).width(e.width())}function r(){return e("<li>").addClass(j)}var s,a,l,c,d,u,h,p,f,m,g,v,_=window.kendo,b=_.attr,w=_.data,y=_.keys,k=_.template,x=_.ui.Widget,C=w.DataSource,S=_.ui.Selectable,T=_.ui.DataBoundWidget,D=_.Class,A=e.extend,E=e.noop,I=e.proxy,M="-",R=".",F=" ",P="#",z="kendoListBox",B=R+z,L="k-state-disabled",H="k-state-selected",N=".k-item:not(.k-state-disabled)",O=".k-list:not(.k-state-disabled) >"+N,V="k-listbox-toolbar",W="li > a.k-button:not(.k-state-disabled)",U="k-state-focused",q="k-drag-clue",j="k-drop-hint",G="k-reset k-list",$=".k-reset.k-list",K="k-reset",Y="click"+B,Q="keydown"+B,X="blur"+B,Z=_._outerWidth,J=_._outerHeight,ee="change",te="dataBound",ie="add",ne="remove",oe="reorder",re="moveUp",se="moveDown",ae="transferTo",le="transferFrom",ce="transferAllTo",de="transferAllFrom",ue="k-ghost",he="uid",pe="tabindex",fe="command",me=-1,ge=1,ve="dragstart",_e="drag",be="drop",we="dragend",ye="ul.k-reset.k-list>li.k-item",ke="right",xe="bottom",Ce=[V+M+"left",V+M+ke,V+M+"top",V+M+xe],Se=T.extend({init:function(e,t){var i=this;x.fn.init.call(i,e,t),i._wrapper(),i._list(),e=i.element.attr("multiple","multiple").hide(),e[0]&&!i.options.dataSource&&(i.options.dataTextField=i.options.dataTextField||"text",i.options.dataValueField=i.options.dataValueField||"value"),i._templates(),i._selectable(),i._dataSource(),i._createToolbar(),i._createDraggable(),i._createNavigatable()},destroy:function(){var e=this;T.fn.destroy.call(e),isNaN(e._listTabIndex)||(e._getList().off(),e._listTabIndex=null),e._unbindDataSource(),e._destroySelectable(),e._destroyToolbar(),e.wrapper.off(B),e._target&&(e._target=null),e._draggable&&(e._draggable.destroy(),e.placeholder=null),_.destroy(e.element)},setOptions:function(e){x.fn.setOptions.call(this,e),this._templates(),this._dataSource()},events:[ee,te,ie,ne,oe,ve,_e,be,we],options:{name:"ListBox",autoBind:!0,template:"",dataTextField:"",dataValueField:"",selectable:"single",draggable:null,dropSources:[],connectWith:"",navigatable:!0,toolbar:{position:ke,tools:[]},messages:{tools:{remove:"Delete",moveUp:"Move Up",moveDown:"Move Down",transferTo:"Transfer To",transferFrom:"Transfer From",transferAllTo:"Transfer All To",transferAllFrom:"Transfer All From"}}},add:function(e){var t,i=this,n=e&&e.length?e:[e],o=n.length;for(i._unbindDataSource(),t=0;t<o;t++)i._addItem(n[t]);i._bindDataSource(),i._syncElement()},_addItem:function(t){var i=this,n=i.templates.itemTemplate({item:t,r:i.templates.itemContent});e(n).attr(b(he),t.uid).appendTo(i._getList()),"string"==typeof t?i.dataSource._data.push(t):i.dataSource.add(t)},_addItemAt:function(t,i){var n=this,o=n.templates.itemTemplate({item:t,r:n.templates.itemContent});n._unbindDataSource(),"string"==typeof t?(n._insertElementAt(o,i),n.dataSource._data.push(t)):(n._insertElementAt(e(o).attr(b(he),t.uid),i),n.dataSource.add(t)),n._bindDataSource(),n._syncElement()},_insertElementAt:function(t,i){var n=this,o=n._getList();i>0?e(t).insertAfter(o.children().eq(i-1)):e(o).prepend(t)},_createNavigatable:function(){var e=this,t=e.options;t.navigatable&&e._getList().on(Y,N,I(e._click,e)).on(Q,I(e._keyDown,e)).on(X,I(e._blur,e))},_getTabIndex:function(){var e,t=this;return isNaN(t._listTabIndex)?(e=t.element.attr(pe),t._listTabIndex=isNaN(e)?0:e,t.element.removeAttr(pe),t._listTabIndex):t._listTabIndex},_blur:function(){this._target&&(this._target.removeClass(U),this._getList().removeAttr("aria-activedescendant")),this._target=null},_click:function(t){var i=this,n=e(t.currentTarget),o=i._target;o&&o.removeClass(U),i._target=n,n.addClass(U),i._getList().attr("aria-activedescendant",n.attr("id")),i._getList()[0]!==_._activeElement()&&i.focus()},_getNavigatableItem:function(e){var t,i=this;return t=i._target?i._target:i.items().filter(N).first(),e===y.UP&&i._target&&(t=i._target.prevAll(N).first()),e===y.DOWN&&i._target&&(t=i._target.nextAll(N).first()),t.length?t:null},_scrollIntoView:function(e){var t,i,n,o,r;e&&(e[0]&&(e=e[0]),t=this._getList().parent()[0],i=e.offsetTop,n=t.scrollTop,o=t.clientHeight,r=i+e.offsetHeight,n>i?n=i:r>n+o&&(n=r-o),t.scrollTop=n)},_keyDown:function(e){var i,n=this,o=e.keyCode,r=n._getNavigatableItem(o);if(n._target&&n._target.removeClass(U),(!e.shiftKey||e.ctrlKey||o!==y.DOWN&&o!==y.UP)&&(n._shiftSelecting=!1),o==y.DELETE)n._executeCommand(ne),n._target&&(n._target.removeClass(U),n._getList().removeAttr("aria-activedescendant"),n._target=null),i=!0;else if(o===y.DOWN||o===y.UP){if(!r)return e.preventDefault(),t;if(e.shiftKey&&!e.ctrlKey)n._shiftSelecting||(n.clearSelection(),n._shiftSelecting=!0),n._target&&r.hasClass("k-state-selected")?(n._target.removeClass(H),n.trigger(ee)):n.select("single"==n.options.selectable?r:r.add(n._target));else{if(e.shiftKey&&e.ctrlKey)return n._executeCommand(o===y.DOWN?se:re),n._scrollIntoView(n._target),e.preventDefault(),t;e.shiftKey||e.ctrlKey||("multiple"===n.options.selectable&&n.clearSelection(),n.select(r))}n._target=r,n._target?(n._target.addClass(U),n._scrollIntoView(n._target),n._getList().attr("aria-activedescendant",n._target.attr("id"))):n._getList().removeAttr("aria-activedescendant"),i=!0}else o==y.SPACEBAR?(e.ctrlKey&&n._target?n._target.hasClass(H)?(n._target.removeClass(H),n.trigger(ee)):n.select(n._target):(n.clearSelection(),n.select(n._target)),i=!0):e.ctrlKey&&o==y.RIGHT?(n._executeCommand(e.shiftKey?ce:ae),n._target=n.select().length?n.select():null,i=!0):e.ctrlKey&&o==y.LEFT&&(n._executeCommand(e.shiftKey?de:le),i=!0);i&&e.preventDefault()},focus:function(){_.focusElement(this._getList())},_createDraggable:function(){var t,i=this,n=i.options.draggable;if(n){if(t=n.hint,!i.options.selectable)throw Error("Dragging requires selection to be enabled");t||(t=o),i._draggable=new _.ui.Draggable(i.wrapper,{filter:n.filter?n.filter:ye,hint:_.isFunction(t)?t:e(t),dragstart:I(i._dragstart,i),dragcancel:I(i._clear,i),drag:I(i._drag,i),dragend:I(i._dragend,i)})}},_dragstart:function(i){var n=this,o=n.draggedElement=i.currentTarget,s=n.options.draggable.placeholder,a=n.dataItem(o),l={dataItems:a,items:e(o),draggableEvent:i};return n.options.draggable.enabled===!1?(i.preventDefault(),t):(s||(s=r),n.placeholder=e(_.isFunction(s)?s.call(n,o):s),o.is(R+L)?i.preventDefault():n.trigger(ve,l)?i.preventDefault():(n.clearSelection(),n.select(o),o.addClass(ue)),t)},_clear:function(){this.draggedElement.removeClass(ue),this.placeholder.remove()},_findElementUnderCursor:function(t){var i=_.elementUnderCursor(t),n=t.sender;return(e.contains(n.hint[0],i)||n.hint[0]===i)&&(n.hint.hide(),i=_.elementUnderCursor(t),n.hint.show()),i},_findTarget:function(t){var i,n,o=this,r=o._findElementUnderCursor(t),s=e(r),a=o._getList();return e.contains(a[0],r)?(i=o.items(),r=s.is("li")?r:s.closest("li")[0],n=i.filter(r)[0]||i.has(r)[0],n?(n=e(n),n.hasClass(L)?null:{element:n,listBox:o}):null):a[0]==r||a.parent()[0]==r?{element:e(a),appendToBottom:!0,listBox:o}:o._searchConnectedListBox(s)},_getElementCenter:function(e){var t=e.length?_.getOffset(e):null;return t&&(t.top+=J(e)/2,t.left+=Z(e)/2),t},_searchConnectedListBox:function(t){var i,n,o,r,s=t;return r=t.hasClass("k-list-scroller k-selectable")?t:t.closest(".k-list-scroller.k-selectable"),r.length?(i=r.parent().find("[data-role='listbox']").getKendoListBox(),i&&e.inArray(this.element[0].id,i.options.dropSources)!==-1?(n=i.items(),t=t.is("li")?t[0]:t.closest("li")[0],o=n.filter(t)[0]||n.has(t)[0],o?(o=e(o),o.hasClass(L)?null:{element:o,listBox:i}):!n.length||s.hasClass("k-list-scroller k-selectable")||s.hasClass("k-reset k-list")?{element:i._getList(),listBox:i,appendToBottom:!0}:null):null):null},_drag:function(i){var n,o,r,s=this,a=s.draggedElement,l=s._findTarget(i),c={left:i.x.location,top:i.y.location},d=s.dataItem(a),u={dataItems:[d],items:e(a),draggableEvent:i};if(s.trigger(_e,u))return i.preventDefault(),t;if(l){if(n=this._getElementCenter(l.element),o={left:Math.round(c.left-n.left),top:Math.round(c.top-n.top)},l.appendToBottom)return s._movePlaceholder(l,null,a),t;o.top<0?r="prev":o.top>0&&(r="next"),r&&l.element[0]!=s.placeholder[0]&&s._movePlaceholder(l,r,a)}else s.placeholder.parent().length&&s.placeholder.remove()},_movePlaceholder:function(t,i,n){var o=this,s=o.placeholder,a=t.listBox.options.draggable;s.parent().length&&(o.placeholder.remove(),o.placeholder=e(a&&a.placeholder?_.isFunction(a.placeholder)?a.placeholder.call(o,n):a.placeholder:r.call(o,n))),i?"prev"===i?t.element.before(o.placeholder):"next"===i&&t.element.after(o.placeholder):t.element.append(o.placeholder)},_dragend:function(i){var n=this,o=n.draggedElement,r=n.items(),s=r.not(n.draggedElement).index(n.placeholder),a=r.not(n.placeholder).index(n.draggedElement),l=n.dataItem(o),c={dataItems:[l],items:e(o)},d=n.placeholder.closest(".k-widget.k-listbox").find("[data-role='listbox']").getKendoListBox();return n.trigger(be,A({},c,{draggableEvent:i}))?(i.preventDefault(),this._clear(),t):(s>=0?s===a||n.trigger(oe,A({},c,{offset:s-a}))||(o.removeClass(ue),n.reorder(o,s)):d&&(n.trigger(ne,c)||n.remove(e(o)),d.trigger(ie,c)||d._addItemAt(l,d.items().index(n.placeholder))),n._clear(),n._draggable.dropped=!0,n.trigger(we,A({},c,{draggableEvent:i})),n._updateToolbar(),n._updateAllToolbars(),t)},reorder:function(t,i){var n=this,o=n.dataSource,r=n.dataItem(t),s=o.at(i),a=n.items()[i],l=e(t);r&&a&&s&&(n._removeElement(l),n._insertElementAt(l,i),n._updateToolbar())},remove:function(t){var i,n=this,o=n._getItems(t),r=o.length;for(n._unbindDataSource(),i=0;i<r;i++)n._removeItem(e(o[i]));n._bindDataSource(),n._syncElement(),n._updateToolbar(),n._updateAllToolbars()},_removeItem:function(e){var t,i,n=this,o=n.dataSource,r=n.dataItem(e);if(r&&o){if("string"==typeof r){for(t=o._data,i=0;i<t.length;i++)if(r===t[i]){t[i]=t[t.length-1],t.pop();break}}else o.remove(r);n._removeElement(e)}},_removeElement:function(t){_.destroy(t),e(t).off().remove()},dataItem:function(t){var i=b(he),n=e(t).attr(i)||e(t).closest("["+i+"]").attr(i);return n?this.dataSource.getByUid(n):e(t).html()},_dataItems:function(t){var i,n=[],o=e(t),r=o.length;for(i=0;i<r;i++)n.push(this.dataItem(o.eq(i)));return n},items:function(){var e=this._getList();return e.children()},select:function(e){var t,i=this,o=i.selectable;return n(e)?o.value():(t=i.items().filter(e).filter(O),o.options.multiple||(o.clear(),t=t.first()),o.value(t))},clearSelection:function(){var e=this,t=e.selectable;t&&t.clear()},enable:function(t,i){var o,r=this,s=!!n(i)||!!i,a=r._getItems(t),l=a.length;for(o=0;o<l;o++)r._enableItem(e(a[o]),s);r._updateAllToolbars()},_enableItem:function(t,i){var n=this,o=n.dataItem(t);o&&(i?e(t).removeClass(L):e(t).addClass(L).removeClass(H))},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource()},_dataSource:function(){var t=this,i=t.options,n=i.dataSource||{};n=e.isArray(n)?{data:n}:n,n.select=t.element,n.fields=[{field:i.dataTextField},{field:i.dataValueField}],t._unbindDataSource(),t.dataSource=C.create(n),t._bindDataSource(),t.options.autoBind&&t.dataSource.fetch()},_bindDataSource:function(){var e=this,t=e.dataSource;e._dataChangeHandler=I(e.refresh,e),t&&t.bind(ee,e._dataChangeHandler)},_unbindDataSource:function(){var e=this,t=e.dataSource;t&&t.unbind(ee,e._dataChangeHandler)},_wrapper:function(){var t=this,i=t.element,n=i.parent("div.k-listbox");n[0]||(n=i.wrap('<div class="k-widget k-listbox" unselectable="on" />').parent(),n[0].style.cssText=i[0].style.cssText,n[0].title=i[0].title,e('<div class="k-list-scroller" />').insertBefore(i)),t.wrapper=n.addClass(i[0].className).css("display",""),t._innerWrapper=e(n[0].firstChild)},_list:function(){var t=this;e("<ul class='"+G+"' role='listbox'></ul>").appendTo(t._innerWrapper),t.options.navigatable&&t._getList().attr(pe,t._getTabIndex())},_templates:function(){var e,t=this,i=this.options;e=i.template&&"string"==typeof i.template?_.template(i.template):i.template?i.template:_.template("${"+_.expr(i.dataTextField,"data")+"}",{useWithBlock:!1}),t.templates={itemTemplate:_.template("# var item = data.item, r = data.r; # <li class='k-item' role='option' aria-selected='false'>#=r(item)#</li>",{useWithBlock:!1}),itemContent:e,toolbar:"<div class='"+V+"'></div>"}},refresh:function(){var e,t=this,i=t.dataSource.view(),n=t.templates.itemTemplate,o="";for(e=0;e<i.length;e++)o+=n({item:i[e],r:t.templates.itemContent});t._getList().html(o),t._setItemIds(),t._createToolbar(),t._syncElement(),t._updateToolbar(),t._updateAllToolbars(),t.trigger(te)},_syncElement:function(){var e,t="",i=this.dataSource.view();for(e=0;e<i.length;e++)t+=this._option(i[e][this.options.dataValueField]||i[e],i[e][this.options.dataTextField]||i[e],!0);this.element.html(t)},_option:function(e,i){var n="<option";return e!==t&&(e+="",e.indexOf('"')!==-1&&(e=e.replace(/"/g,"&quot;")),n+=' value="'+e+'"'),n+=" selected>",i!==t&&(n+=_.htmlEncode(i)),n+="</option>"},_setItemIds:function(){var e,t=this,i=t.items(),n=t.dataSource.view(),o=n.length;for(e=0;e<o;e++)i.eq(e).attr(b(he),n[e].uid).attr("id",n[e].uid)},_selectable:function(){var e=this,t=e.options.selectable,i=S.parseOptions(t);i.multiple&&e.element.attr("aria-multiselectable","true"),e.selectable=new S(e._innerWrapper,{aria:!0,multiple:i.multiple,filter:N,change:I(e._onSelect,e)})},_onSelect:function(){var e=this;e._updateToolbar(),e._updateAllToolbars(),e.trigger(ee)},_destroySelectable:function(){var e=this;e.selectable&&e.selectable.element&&(e.selectable.destroy(),e.selectable=null)},_getList:function(){return this.wrapper.find($)},_getItems:function(e){return this.items().filter(e)},_createToolbar:function(){var t,i=this,n=i.options.toolbar,o=n.position||ke,r=o===xe?"insertAfter":"insertBefore",s=n.tools||[],a=i.options.messages;i._destroyToolbar(),i.wrapper.removeClass(Ce.join(F)),s.length&&s.length>0&&(t=e(i.templates.toolbar)[r](i._innerWrapper),i.toolbar=new v(t,A({},n,{listBox:i,messages:a})),i.wrapper.addClass(V+M+o))},_destroyToolbar:function(){var e=this;e.toolbar&&(e.toolbar.destroy(),e.toolbar=null)},_executeCommand:function(e){var t=this,i=s.current.create(e,{listBox:t});i&&(i.execute(),t._updateToolbar(),t._updateAllToolbars())},_updateToolbar:function(){var e=this.toolbar;e&&e._updateToolStates()},_updateAllToolbars:function(){var t,i,n=e("select[data-role='listbox']"),o=n.length;for(i=0;i<o;i++)t=e(n[i]).data(z),t&&t._updateToolbar()}});_.ui.plugin(Se),s=D.extend({init:function(){this._commands=[]},register:function(e,t){this._commands.push({commandName:e,commandType:t})},create:function(e,t){var i,n,o,r=this._commands,s=r.length,a=e?e.toLowerCase():"";for(o=0;o<s;o++)if(n=r[o],n.commandName.toLowerCase()===a){i=n;break}if(i)return new i.commandType(t)}}),s.current=new s,a=D.extend({init:function(e){var t=this;t.options=A({},t.options,e),t.listBox=t.options.listBox},options:{listBox:null},getItems:function(){return e(this.listBox.select())},execute:E,canExecute:E}),l=a.extend({execute:function(){var e=this,t=e.listBox,i=e.getItems();t.trigger(ne,{dataItems:t._dataItems(i),items:i})||t.remove(i)},canExecute:function(){return this.listBox.select().length>0}}),s.current.register(ne,l),c=a.extend({execute:function(){var e=this;e.canExecute()&&e.moveItems()},canExecute:E,moveItems:function(){var t,n=this,o=n.listBox,r=n.options,s=n.getItems(),a=r.offset,l=i(s),c=e.makeArray(s.sort(n.itemComparer)),d=r.moveAction;if(!o.trigger(oe,{dataItems:o._dataItems(c),items:e(c),offset:a}))for(;c.length>0&&l.length>0;)t=c[d](),o.reorder(t,l[d]()+a)},options:{offset:0,moveAction:"pop"},itemComparer:function(t,i){var n=e(t).index(),o=e(i).index();return n===o?0:n>o?1:-1}}),d=c.extend({options:{offset:me,moveAction:"shift"},canExecute:function(){var e=this.getItems(),t=i(e);return t.length>0&&t[0]>0}}),s.current.register(re,d),u=c.extend({options:{offset:ge,moveAction:"pop"},canExecute:function(){var t=this,n=t.getItems(),o=i(n);return o.length>0&&e(o).last()[0]<t.listBox.items().length-1}}),s.current.register(se,u),h=a.extend({options:{filter:N},execute:function(){var e=this,t=e.getSourceListBox(),i=e.getItems().filter(e.options.filter),n=t?t._dataItems(i):[],o=e.getDestinationListBox(),r=e.getUpdatedSelection(i);o&&i.length>0&&(o.trigger(ie,{dataItems:n,items:i})||o.add(n),t.trigger(ne,{dataItems:n,items:i})||(t.remove(i),e.updateSelection(r)))},getUpdatedSelection:function(t){var i=this,n=i.options.filter,o=i.getSourceListBox(),r=o?o.items().filter(n).last():null,s=e(t).filter(r).length>0,a=s?e(t).prevAll(n)[0]:e(t).nextAll(n)[0];return 1===e(t).length&&a?a:null},updateSelection:function(t){var i=this.getSourceListBox();i&&t&&(e(i.select(e(t))),i._scrollIntoView(t))},getSourceListBox:E,getDestinationListBox:E}),p=h.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.select().length>0},getSourceListBox:function(){return this.listBox},getDestinationListBox:function(){var t=this.getSourceListBox();return t&&t.options.connectWith?e(P+t.options.connectWith).data(z):null},getItems:function(){var t=this.getSourceListBox();return t?e(t.select()):e()}}),s.current.register(ae,p),f=h.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.select().length>0},getSourceListBox:function(){var t=this.getDestinationListBox();return t&&t.options.connectWith?e(P+t.options.connectWith).data(z):null},getDestinationListBox:function(){return this.listBox},getItems:function(){var t=this.getSourceListBox();return t?e(t.select()):e()}}),s.current.register(le,f),m=p.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.items().filter(N).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():e()},getUpdatedSelection:E,updateSelection:E}),s.current.register(ce,m),g=f.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.items().filter(N).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():e()},getUpdatedSelection:E,updateSelection:E}),s.current.register(de,g),v=D.extend({init:function(t,i){var n=this;n.element=e(t).addClass(V),n.options=A({},n.options,i),n.listBox=n.options.listBox,n._initTemplates(),n._createTools(),n._updateToolStates(),n._attachEventHandlers()},destroy:function(){var e=this;e._detachEventHandlers(),_.destroy(e.element),e.element.remove(),e.element=null},options:{position:ke,tools:[]},_initTemplates:function(){this.templates={tool:k("<li><a href='\\\\#' class='k-button k-button-icon' data-command='#= command #' title='#= text #' aria-label='#= text #' role='button'><span class='k-icon #= iconClass #'></span></a></li>")}},_createTools:function(){var t,i,n=this,o=n.options.tools,r=o.length,s=n.options.messages.tools,a=n._createToolList();for(i=0;i<r;i++)t=A({},v.defaultTools[o[i]],{text:s[o[i]]}),t&&a.append(e(n.templates.tool(t)));n.element.append(a)},_createToolList:function(){return e("<ul class='k-reset' />")},_attachEventHandlers:function(){var e=this;e.element.on(Y,W,I(e._onToolClick,e))},_detachEventHandlers:function(){this.element.off(B).find("*").off(B)},_onToolClick:function(t){t.preventDefault(),this._executeToolCommand(e(t.currentTarget).data(fe))},_executeToolCommand:function(e){var t=this,i=t.listBox;i&&i._executeCommand(e)},_updateToolStates:function(){var e,t=this,i=t.options.tools,n=i.length;for(e=0;e<n;e++)t._updateToolState(i[e])},_updateToolState:function(t){var i=this,n=s.current.create(t,{listBox:i.listBox}),o=i.element.find("[data-command='"+t+"']")[0];o&&n&&n.canExecute&&(n.canExecute()?e(o).removeClass(L).removeAttr(pe):e(o).addClass(L).attr(pe,"-1"))}}),v.defaultTools={remove:{command:ne,iconClass:"k-i-x"},moveUp:{command:re,iconClass:"k-i-arrow-60-up"},moveDown:{command:se,iconClass:"k-i-arrow-60-down"},transferTo:{command:ae,iconClass:"k-i-arrow-60-right"},transferFrom:{command:le,iconClass:"k-i-arrow-60-left"},transferAllTo:{command:ce,iconClass:"k-i-arrow-double-60-right"},transferAllFrom:{command:de,iconClass:"k-i-arrow-double-60-left"}},A(Se,{ToolBar:v})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.upload.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(t){return e.map(n(t),function(e){return e.name}).join(", ")}function n(e){var t=e[0];return t.files?o(t.files):[{name:a(t.value),extension:s(t.value),size:null}]}function o(t){return e.map(t,function(e){return r(e)})}function r(e){var t=e.name||e.fileName;return{name:C.htmlEncode(t),extension:s(t),size:"number"==typeof e.size?e.size:e.fileSize,rawFile:e}}function s(e){var t=e.match(A);return t?t[0]:""}function a(e){var t=e.lastIndexOf("\\");return t!=-1?e.substr(t+1):e}function l(t,i){var n=C.guid();return e.map(t,function(e){return e.uid=i?C.guid():n,e})}function c(e,t){var i,n=d(t.allowedExtensions),o=t.maxFileSize,r=t.minFileSize;for(i=0;i<e.length;i++)u(e[i],n),h(e[i],r,o)}function d(t){var i=e.map(t,function(e){var t="."===e.substring(0,1)?e:"."+e;return t.toLowerCase()});return i}function u(t,i){i.length>0&&i.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],e.inArray(q,t.validationErrors)===-1&&t.validationErrors.push(q))}function h(t,i,n){0!==i&&t.size<i&&(t.validationErrors=t.validationErrors||[],e.inArray(U,t.validationErrors)===-1&&t.validationErrors.push(U)),0!==n&&t.size>n&&(t.validationErrors=t.validationErrors||[],e.inArray(W,t.validationErrors)===-1&&t.validationErrors.push(W))}function p(e){var t,i=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(i+=e[t].size);return i/=1024,i<1024?i.toFixed(2)+" KB":(i/1024).toFixed(2)+" MB"}function f(t){return!t.multiple&&e(".k-file",t.wrapper).length>1}function m(i,n,o,r){var s,a;return n._supportsRemove()?(s=i.data("fileNames"),a=e.map(s,function(e){return e.name}),r===!1?(n._removeFileEntry(i),t):(n._submitRemove(a,o,function(e,t,o){var r=n.trigger(R,{operation:"remove",files:s,response:e,XMLHttpRequest:o});r||n._removeFileEntry(i)},function(e){f(n)&&n._removeFileEntry(i),n.trigger(F,{operation:"remove",files:s,XMLHttpRequest:e}),D("Server response: "+e.responseText)}),t)):(!f(n)&&r||n._removeFileEntry(i),t)}function g(t,i,n){var o=!1,r="";try{r=e.parseJSON(v(t)),o=!0}catch(s){n()}o&&i(r)}function v(e){return t!==e&&""!==e||(e="{}"),e}function _(e){e.stopPropagation(),e.preventDefault()}function b(e,t,i,n){var o,r;e.on("dragenter"+t,function(e){i(e),r=new Date,o||(o=setInterval(function(){var e=new Date-r;e>100&&(n(),clearInterval(o),o=null)},100))}).on("dragover"+t,function(){r=new Date})}function w(e){return e.is(".k-file-progress, .k-file-success, .k-file-error")}function y(t){return e(t.target).closest(".k-file")}var k,x,C=window.kendo,S=C.ui.Widget,T=C.antiForgeryTokens,D=C.logToConsole,A=/\.([^\.]+)$/,E=".kendoUpload",I="select",M="upload",R="success",F="error",P="complete",z="cancel",B="clear",L="pause",H="resume",N="progress",O="remove",V="validationErrors",W="invalidMaxFileSize",U="invalidMinFileSize",q="invalidFileExtension",j=1e3,G=2e3,$={loading:"k-i-loading",warning:"k-i-warning",success:"k-i-check"},K=S.extend({init:function(t,i){var n,o,r,s=this;S.fn.init.call(s,t,i),s.name=t.name,s.multiple=s.options.multiple,s.directory=s.options.directory,s.localization=s.options.localization,n=s.element,s.wrapper=n.closest(".k-upload"),0===s.wrapper.length&&(s.wrapper=s._wrapInput(n)),s._activeInput(n),s.toggle(s.options.enabled),o=s._ns=E+"-"+C.guid(),n.closest("form").on("submit"+o,e.proxy(s._onParentFormSubmit,s)).on("reset"+o,e.proxy(s._onParentFormReset,s)),s.options.async.saveUrl?(s._module=s._supportsFormData()?new x(s):new k(s),s._async=!0,r=s.options.files,r.length>0&&s._renderInitialFiles(r)):s._module=new Y(s),s._supportsDrop()&&(""!==s.options.dropZone?s._setupCustomDropZone():s._setupDropZone()),s.wrapper.on("click",".k-upload-action",e.proxy(s._onFileAction,s)).on("click",".k-clear-selected",e.proxy(s._onClearSelected,s)).on("click",".k-upload-selected",e.proxy(s._onUploadSelected,s)),s.element.val()&&s._onInputChange({target:s.element})},events:[I,M,R,F,P,z,B,N,O,L,H],options:{name:"Upload",enabled:!0,multiple:!0,directory:!1,showFileList:!0,template:"",files:[],async:{autoRetryAfter:0,bufferChunkSize:1e7,maxAutoRetries:1,removeVerb:"POST",autoUpload:!0,withCredentials:!0,accept:"*/*; q=0.5, application/json",useArrayBuffer:!1},localization:{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",pause:"Pause",resume:"Resume",clearSelectedFiles:"Clear",uploadSelectedFiles:"Upload",dropFilesHere:"Drop files here to upload",invalidFiles:"Invalid file(s). Please check file upload requirements.",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",
headerStatusPaused:"Paused",headerStatusUploaded:"Done",invalidMaxFileSize:"File size too large.",invalidMinFileSize:"File size too small.",invalidFileExtension:"File type not allowed."},validation:{allowedExtensions:[],maxFileSize:0,minFileSize:0},dropZone:""},setOptions:function(e){var t=this,i=t.element;S.fn.setOptions.call(t,e),t.multiple=t.options.multiple,t.directory=t.options.directory,i.attr("multiple",!!t._supportsMultiple()&&t.multiple),t.directory&&(i.attr("webkitdirectory",t.directory),i.attr("directory",t.directory)),t.toggle(t.options.enabled)},enable:function(e){e=t===e||e,this.toggle(e)},disable:function(){this.toggle(!1)},toggle:function(e){e=t===e?e:!e,this.wrapper.toggleClass("k-state-disabled",e),this.element.prop("disabled",e)},focus:function(){this.element.focus()},destroy:function(){var t=this,i=e(t.options.dropZone);e(document).add(e(".k-dropzone",t.wrapper)).add(t.wrapper.closest("form")).off(t._ns),i.length>0&&i.off(t._ns),e(t.element).off(E),S.fn.destroy.call(t)},pause:function(t){this._module.onPause({target:e(t,this.wrapper)});var i=t.find(".k-i-pause-sm");i.removeClass("k-i-pause-sm").addClass("k-i-play-sm").attr("title",this.localization.resume),e(i).parent().attr("aria-label",this.localization.resume)},resume:function(t){this._module.onResume({target:e(t,this.wrapper)});var i=t.find(".k-i-play-sm");i.removeClass("k-i-play-sm").addClass("k-i-pause-sm").attr("title",this.localization.pause),e(i).parent().attr("aria-label",this.localization.pause)},upload:function(){var e=this;e._module.onSaveSelected()},getFiles:function(){var t,i,n,o=this,r=[],s=o.wrapper.find(".k-file");for(i=0;i<s.length;i++)if(t=e(s[i]).data("fileNames"))for(n=0;n<t.length;n++)r.push(t[n]);return r},clearAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,i){e._removeFileByDomElement(i,!1)})},removeAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,i){e._removeFileByDomElement(i,!0)})},removeFileByUid:function(e){this._removeFileByUid(e,!0)},clearFileByUid:function(e){this._removeFileByUid(e,!1)},_removeFileByUid:function(t,i){var n,o=this;"string"==typeof t&&(n=e(".k-file["+C.attr("uid")+'="'+t+'"]',o.wrapper),n.length>0&&o._removeFileByDomElement(n,i))},clearFile:function(e){this._removeFile(e,!1)},removeFile:function(e){this._removeFile(e,!0)},_removeFile:function(t,i){var n,o=this,r=o.wrapper.find(".k-file");"function"==typeof t&&r.each(function(r,s){n=e(s).data("fileNames"),t(n)&&o._removeFileByDomElement(s,i)})},_removeFileByDomElement:function(t,i){var n,o=this,r={target:e(t,o.wrapper)};o.options.async.saveUrl?(e(t).hasClass("k-file-progress")?o._module.onCancel(r):o._module.onRemove(r,{},i),n=e(".k-file",o.wrapper),0===n.length?o._hideHeaderUploadstatus():o._updateHeaderUploadStatus()):o._module.onRemove(r,{},i)},_addInput:function(t){if(t[0].nodeType){var i=this,n=t.clone().val("");n.insertAfter(i.element).data("kendo"+i.options.prefix+i.options.name,i),e(i.element).hide().attr("tabindex","-1").removeAttr("id").off(E),i._activeInput(n),i.element.focus()}},_activeInput:function(t){var i=this,n=i.wrapper;i.element=t,i.directory&&(t.attr("webkitdirectory",i.directory),t.attr("directory",i.directory)),t.attr("multiple",!!i._supportsMultiple()&&i.multiple).attr("autocomplete","off").on("click"+E,function(e){n.hasClass("k-state-disabled")&&e.preventDefault()}).on("focus"+E,function(){e(this).parent().addClass("k-state-focused")}).on("blur"+E,function(){e(this).parent().removeClass("k-state-focused")}).on("change"+E,e.proxy(i._onInputChange,i)).on("keydown"+E,e.proxy(i._onInputKeyDown,i))},_onInputKeyDown:function(e){var t=this,i=t.wrapper.find(".k-upload-action:visible:first");e.keyCode===C.keys.TAB&&i.length>0&&!e.shiftKey&&(e.preventDefault(),i.focus())},_onInputChange:function(t){var i,n=this,o=e(t.target),r=l(n._inputFiles(o),n._isAsyncNonBatch());c(r,n.options.validation),i=n.trigger(I,{files:r}),i?(n._addInput(o),o.remove()):n._module.onSelect({target:o},r)},_readDirectory:function(t){var i=new e.Deferred,n=t.createReader(),o=[],r=function(){n.readEntries(function(e){e.length?(o=o.concat(e),r()):i.resolve(o)},i.reject)};return r(),i.promise()},_readFile:function(e){var t=this,i=e.fullPath;e.file(function(e){e.relativePath=i.slice(1),t.droppedFolderFiles.push(e),t.droppedFolderCounter--,0===t.droppedFolderCounter&&setTimeout(function(){0===t.droppedFolderCounter&&t.droppedFolderFiles.length&&(t._proceedDroppedItems(t.droppedFolderFiles),t.droppedFolderFiles=[])},0)},function(){D("File error.")})},_traverseFileTree:function(e,t){var i=this;t||i.droppedFolderCounter--,this._readDirectory(e).then(function(e){i.droppedFolderCounter+=e.length;for(var t=0;t<e.length;t++)e[t].isFile?i._readFile(e[t]):e[t].isDirectory&&i._traverseFileTree(e[t])})},_onDrop:function(e){var t,i,n,o=e.originalEvent.dataTransfer,r=this,s=o.files;if(_(e),r.options.directoryDrop&&o.items)for(t=o.items.length,r.droppedFolderCounter=0,r.droppedFolderFiles=[],i=0;i<t;i++)o.items[i].webkitGetAsEntry?(n=o.items[i].webkitGetAsEntry(),n.isDirectory?r._traverseFileTree(n,!0):n.isFile&&r.droppedFolderFiles.push(o.files[i])):r._proceedDroppedItems(s);else r._proceedDroppedItems(s)},_proceedDroppedItems:function(t){var i,n=this,r=l(o(t),n._isAsyncNonBatch());t.length>0&&!n.wrapper.hasClass("k-state-disabled")&&(!n.multiple&&r.length>1&&r.splice(1,r.length-1),c(r,n.options.validation),i=n.trigger(I,{files:r}),i||n._module.onSelect({target:e(".k-dropzone",n.wrapper)},r))},_filesContainValidationErrors:function(t){var i=!1;return e(t).each(function(e,t){if(t[V]&&t[V].length>0)return i=!0,!1}),i},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(e){var t,i,n=this,o=0;for(e=l(e,!0),o=0;o<e.length;o++)t=e[o],i=n._enqueueFile(t.name,{fileNames:[t]}),i.addClass("k-file-success").data("files",[e[o]]),n._supportsRemove()&&n._fileAction(i,O)},_prepareTemplateData:function(e,t){var i=t.fileNames,n={},o=0,r=0;for(r=0;r<i.length;r++)o+=i[r].size;return n.name=e,n.size=o,n.files=t.fileNames,n},_prepareDefaultSingleFileEntryTemplate:function(t){var i=this,n=t.fileNames[0],o=p(t.fileNames),r=n[V],s="";return s+=r&&r.length>0?"<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-file-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name k-file-name-invalid' title='"+n.name+"'>"+n.name+"</span><span class='k-file-validation-message'>"+i.localization[r[0]]+"</span></span>":"<li class='k-file'><span class='k-progress'></span><span class='k-file-extension-wrapper'><span class='k-file-extension'>"+n.extension.substring(1)+"</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name' title='"+n.name+"'>"+n.name+"</span><span class='k-file-size'>"+o+"</span></span>",s+="<strong class='k-upload-status'></strong>",e(s)},_prepareDefaultMultipleFileEntriesTemplate:function(t){var i,n,o=this,r=t.fileNames,s=o._filesContainValidationErrors(r),a=p(r),l="";for(l+=s?"<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-multiple-files-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span>":"<li class='k-file'><span class='k-progress'></span><span class='k-multiple-files-extension-wrapper'>",l+="<span class='k-file-state'></span></span>",r.sort(function(e,t){return e[V]?-1:t[V]?1:0}),l+="<span class='k-file-name-size-wrapper'>",i=0;i<r.length;i++)n=r[i],l+=n[V]&&n[V].length>0?"<span class='k-file-name k-file-name-invalid' title='"+n.name+"'>"+n.name+"</span>":"<span class='k-file-name' title='"+n.name+"'>"+n.name+"</span>";return l+=s?"<span class='k-file-validation-message'>"+o.localization.invalidFiles+"</span>":"<span class='k-file-information'>Total: "+r.length+" files, "+a+"</span>",l+="</span><strong class='k-upload-status'></strong>",e(l)},_enqueueFile:function(t,i){var n,o,r,s,a=this,l=i.fileNames[0].uid,c=e(".k-upload-files",a.wrapper),d=a.options,u=d.template;return 0===c.length&&(c=e("<ul class='k-upload-files k-reset'></ul>").appendTo(a.wrapper),a.options.showFileList||c.hide(),a.wrapper.removeClass("k-upload-empty")),n=e(".k-file",c),u?(r=a._prepareTemplateData(t,i),u=C.template(u),o=e("<li class='k-file'>"+u(r)+"</li>"),o.find(".k-upload-action").addClass("k-button"),a.angular("compile",function(){return{elements:o,data:[r]}})):o=1===i.fileNames.length?a._prepareDefaultSingleFileEntryTemplate(i):a._prepareDefaultMultipleFileEntriesTemplate(i),o.attr(C.attr("uid"),l).appendTo(c).data(i),a._async||e(".k-progress",o).width("100%"),!a.multiple&&n.length>0&&(s={files:n.data("fileNames"),headers:{}},a.trigger(O,s)||a._module.onRemove({target:e(n,a.wrapper)},s)),o},_removeFileEntry:function(t){var i,n,o,r=this,s=t.closest(".k-upload-files");t.remove(),i=e(".k-file",s),n=e(".k-file-success, .k-file-error",s),o=e(".k-file-invalid",s),n.length!==i.length&&o.length!==i.length||this._hideUploadButton(),0===i.length?(s.remove(),r.wrapper.addClass("k-upload-empty"),r._hideHeaderUploadstatus()):r._updateHeaderUploadStatus()},_fileAction:function(e,t,i){var n,o={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry",pause:"k-i-pause-sm"},r={remove:"k-i-close",cancel:"k-i-close",retry:"k-i-reload-sm",pause:"k-i-pause-sm"};o.hasOwnProperty(t)&&(i||this._clearFileAction(e),this.options.template?(n=e.find(".k-upload-action").first(),n.find(".k-icon").length?n.next(".k-upload-action").length&&n.next(".k-upload-action").addClass("k-button").append("<span class='k-icon "+r[t]+" "+o[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show():n.addClass("k-button").append("<span class='k-icon "+r[t]+" "+o[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show()):(i||e.find(".k-upload-status .k-upload-action").remove(),e.find(".k-upload-status").append(this._renderAction(o[t],this.localization[t],r[t]))))},_fileState:function(t,i){var n=this.localization,o={uploading:{text:n.statusUploading},uploaded:{text:n.statusUploaded},failed:{text:n.statusFailed}},r=o[i];r&&e("span.k-file-state",t).text(r.text)},_renderAction:function(t,i,n){return""!==t?e("<button type='button' class='k-button k-upload-action' aria-label='"+i+"'><span class='k-icon "+n+" "+t+"' title='"+i+"'></span></button>").on("focus",function(){e(this).addClass("k-state-focused")}).on("blur",function(){e(this).removeClass("k-state-focused")}):e("<button type='button' class='k-button'>"+i+"</button>")},_clearFileAction:function(t){e(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var i,n,o,r,s,a,l=this;return l.wrapper.hasClass("k-state-disabled")||(i=e(t.target).closest(".k-upload-action"),n=i.find(".k-icon"),o=i.closest(".k-file"),r=o.data("fileNames"),s=l._filesContainValidationErrors(r),a={files:r,headers:{}},l._retryClicked=!1,n.hasClass("k-i-x")?l.trigger(O,a)||l._module.onRemove({target:e(o,l.wrapper)},a,!s):n.hasClass("k-i-cancel")?(l.trigger(z,a),l._module.onCancel({target:e(o,l.wrapper)}),l._checkAllComplete(),l._updateHeaderUploadStatus()):n.hasClass("k-i-pause-sm")?(l.trigger(L,a),l.pause(o),l._updateHeaderUploadStatus()):n.hasClass("k-i-play-sm")?(l.trigger(H,a),l.resume(o)):n.hasClass("k-i-retry")&&(e(".k-i-warning",o).remove(),e(".k-progress",o).finish().show(),l._module.onRetry({target:e(o,l.wrapper)}),l._retryClicked=!0)),!1},_onUploadSelected:function(){var e=this,t=e.wrapper;return t.hasClass("k-state-disabled")||this._module.onSaveSelected(),!1},_onClearSelected:function(){var e=this,t=e.wrapper,i={};return t.hasClass("k-state-disabled")||e.trigger(B,i)||e.clearAllFiles(),!1},_onFileProgress:function(t,i){var n,o;i>100&&(i=100),this.options.template?e(".k-progress",t.target).width(i+"%"):(n=e(".k-upload-pct",t.target),o=e(".k-i-warning",t.target),o.length?o.removeClass("k-i-warning").removeClass("k-icon").addClass("k-upload-pct"):0===n.length&&e(".k-upload-status",t.target).prepend("<span class='k-upload-pct'></span>"),100!==i?e(".k-upload-pct",t.target).text(i+"%"):e(".k-upload-pct",t.target).remove(),e(".k-progress",t.target).width(i+"%")),this.trigger(N,{files:y(t).data("fileNames"),percentComplete:i})},_onUploadSuccess:function(e,t,i){var n=this,o=y(e),r=n.trigger(R,{files:o.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:i});r?n._setUploadErrorState(o):(n._fileState(o,"uploaded"),o.removeClass("k-file-progress").addClass("k-file-success"),n._updateHeaderUploadStatus(),n._supportsRemove()?n._fileAction(o,O):n._clearFileAction(o)),n._hideUploadProgress(o),n._checkAllComplete()},_onUploadError:function(e,t){var i=this,n=i._module,o=y(e),r=o.data("uid");i._setUploadErrorState(o),i.trigger(F,{operation:"upload",files:o.data("fileNames"),XMLHttpRequest:t}),D("Server response: "+t.responseText),i.options.async.chunkSize?n._decreasePosition&&n._decreasePosition(r):i._hideUploadProgress(o),i._checkAllComplete(),this.options.async.autoRetryAfter&&this._autoRetryAfter(o)},_autoRetryAfter:function(e){var t=this,i=this._module.retries;i&&(i[e.data("uid")]||(i[e.data("uid")]=1),i[e.data("uid")]<=this.options.async.maxAutoRetries&&(i[e.data("uid")]++,setTimeout(function(){t._module.performUpload(e)},this.options.async.autoRetryAfter)))},_setUploadErrorState:function(t){var i,n=this;n._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),n._updateUploadProgress(t),i=e(".k-upload-pct",t),i.length>0?(i.parent().find(".k-i-warning").length||i.removeClass("k-upload-pct").addClass("k-icon k-i-warning"),i.empty()):e(".k-upload-status",t).prepend("<span class='k-icon k-i-warning'></span>"),this._updateHeaderUploadStatus(),this._fileAction(t,"retry"),this._fileAction(t,O,!0),n._retryClicked&&t.find(".k-i-retry").parent().focus()},_updateUploadProgress:function(t){var i,n,o,r=this;r.options.async.chunkSize?(i=t.data("uid"),r._module.metaData&&(n=r._module.metaData[i],n&&(o=n.totalChunks?Math.round(n.chunkIndex/n.totalChunks*100):100,r._onFileProgress({target:e(t,r.wrapper)},o)))):e(".k-progress",t).width("100%")},_hideUploadProgress:function(t){e(".k-progress",t).delay(j).fadeOut(G,function(){e(this).css("width","0%")})},_showUploadButton:function(){var t=this,i=e(".k-upload-selected",t.wrapper),n=e(".k-clear-selected",t.wrapper);0===i.length&&(i=t._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected"),n=t._renderAction("",this.localization.clearSelectedFiles).addClass("k-clear-selected")),this.wrapper.append(n,i)},_hideUploadButton:function(){e(".k-upload-selected, .k-clear-selected",this.wrapper).remove()},_showHeaderUploadStatus:function(t){var i=this,n=i.localization,o=e(".k-dropzone",i.wrapper),r=e(".k-upload-status-total",i.wrapper);0!==r.length&&r.remove(),r='<strong class="k-upload-status k-upload-status-total"><span class="k-icon"></span></strong>',t?(r=e(r).append(n.headerStatusUploading),r.find(".k-icon").addClass($.loading)):(r=e(r).append(n.headerStatusUploaded),r.find(".k-icon").addClass($.warning)),o.length>0?o.append(r):e(".k-upload-button",i.wrapper).after(r)},_updateHeaderUploadStatus:function(){var t,i,n=this,o=e(".k-upload-status-total",this.wrapper),r=e(".k-file",n.wrapper).not(".k-file-success, .k-file-error, .k-file-invalid"),s=e(".k-file-invalid",n.wrapper),a=e(".k-file-error",n.wrapper),l=e(".k-file",n.wrapper).find(".k-i-play-sm");!l.length||l.length!==r.length&&n.options.async.concurrent?(0===r.length||s.length>0||a.length>0)&&(t=e(".k-file.k-file-error, .k-file.k-file-invalid",n.wrapper),o=e(".k-upload-status-total",n.wrapper),i=e(".k-icon",o).removeClass().addClass("k-icon").addClass(0!==t.length?$.warning:$.success),o.html(i).append(n.localization.headerStatusUploaded)):(i=e(".k-icon",o).removeClass().addClass("k-icon").addClass("k-i-pause-sm"),o.html(i).append(n.localization.headerStatusPaused))},_hideHeaderUploadstatus:function(){e(".k-upload-status-total",this.wrapper).remove()},_onParentFormSubmit:function(){var i,n=this,o=n.element;t!==this._module.onAbort&&this._module.onAbort(),o.value||(i=e(o),i.attr("disabled","disabled"),window.setTimeout(function(){i.removeAttr("disabled")},0))},_onParentFormReset:function(){e(".k-upload-files",this.wrapper).remove()},_supportsFormData:function(){return"undefined"!=typeof FormData},_supportsMultiple:function(){var e=this._userAgent().indexOf("Windows")>-1;return!(C.support.browser.opera||C.support.browser.safari&&e)},_supportsDrop:function(){var e=this._userAgent().toLowerCase(),t=/chrome/.test(e),i=!t&&/safari/.test(e),n=i&&/windows/.test(e);return!n&&this._supportsFormData()&&this.options.async.saveUrl},_userAgent:function(){return navigator.userAgent},_setupDropZone:function(){var t,i,n=this;e(".k-upload-button",n.wrapper).wrap("<div class='k-dropzone'></div>"),t=n._ns,i=e(".k-dropzone",n.wrapper).append(e("<em>"+n.localization.dropFilesHere+"</em>")).on("dragenter"+t,_).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(n._onDrop,n)),b(i,t,function(){i.closest(".k-upload").hasClass("k-state-disabled")||i.addClass("k-dropzone-hovered")},function(){i.removeClass("k-dropzone-hovered")}),n._bindDocumentDragEventWrappers(i)},_setupCustomDropZone:function(){var t,i=this,n=e(i.options.dropZone);e(".k-upload-button",i.wrapper).wrap("<div class='k-dropzone'></div>").after(e("<em>"+i.localization.dropFilesHere+"</em>")),t=i._ns,n.on("dragenter"+t,_).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(i._onDrop,i)),b(n,t,function(t){i.wrapper.hasClass("k-state-disabled")||(n.removeClass("k-dropzone-hovered"),e(t.target).addClass("k-dropzone-hovered"))},function(){n.removeClass("k-dropzone-hovered"),n.find(".k-dropzone-hovered").removeClass("k-dropzone-hovered")}),i._bindDocumentDragEventWrappers(n)},_bindDocumentDragEventWrappers:function(t){var i=this,n=i._ns;b(e(document),n,function(){i.wrapper.hasClass("k-state-disabled")||(t.addClass("k-dropzone-active"),t.closest(".k-upload").removeClass("k-upload-empty"))},function(){t.removeClass("k-dropzone-active"),0===e("li.k-file",t.closest(".k-upload")).length&&t.closest(".k-upload").addClass("k-upload-empty")})},_supportsRemove:function(){return!!this.options.async.removeUrl},_submitRemove:function(t,i,n,o){var r=this,s=r.options.async.removeField||"fileNames",a=e.extend(i.data,T());a[s]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:v,url:this.options.async.removeUrl,traditional:!0,data:a,headers:i.headers,success:n,error:o,xhrFields:{withCredentials:this.options.async.withCredentials}})},_wrapInput:function(e){var t=this,i=t.options;return e.wrap("<div class='k-widget k-upload k-header'><div class='k-button k-upload-button' aria-label='"+this.localization.select+"'></div></div>"),i.async.saveUrl||e.closest(".k-upload").addClass("k-upload-sync"),e.closest(".k-upload").addClass("k-upload-empty"),e.closest(".k-button").append("<span>"+this.localization.select+"</span>"),e.closest(".k-upload")},_checkAllComplete:function(){0===e(".k-file.k-file-progress",this.wrapper).length&&this.trigger(P)},_inputFiles:function(e){return n(e)}}),Y=function(e){this.name="syncUploadModule",this.element=e.wrapper,this.upload=e,this.element.closest("form").attr("enctype","multipart/form-data").attr("encoding","multipart/form-data")};Y.prototype={onSelect:function(t,n){var o,r,s=this.upload,a=e(t.target),l=s._filesContainValidationErrors(n);s._addInput(a),o={fileNames:n},l?a.remove():o.relatedInput=a,r=s._enqueueFile(i(a),o),l&&s._hideUploadProgress(r),s._fileAction(r,O)},onRemove:function(e){var t=y(e),i=t.data("relatedInput");i&&i.remove(),this.upload._removeFileEntry(t)}},k=function(e){this.name="iframeUploadModule",this.element=e.wrapper,this.upload=e,this.iframes=[]},K._frameId=0,k.prototype={onSelect:function(t,i){var n=this.upload,o=e(t.target),r=n._filesContainValidationErrors(i),s=this.prepareUpload(o,i,r);n.options.async.autoUpload?r?(n._fileAction(s,O),n._showHeaderUploadStatus(!1)):this.performUpload(s):(n._fileAction(s,O),r?n._updateHeaderUploadStatus():n._showUploadButton()),r&&n._hideUploadProgress(s)},prepareUpload:function(t,n,o){var r,s,a,l,c=this.upload,d=e(c.element),u=c.options.async.saveField||t.attr("name");return c._addInput(t),t.attr("name",u),o?(t.remove(),s={fileNames:n}):(a=this.createFrame(c.name+"_"+K._frameId++),this.registerFrame(a),l=this.createForm(c.options.async.saveUrl,a.attr("name")).append(d),s={frame:a,relatedInput:d,fileNames:n}),r=c._enqueueFile(i(t),s),a&&a.data({form:l,file:r}),r},performUpload:function(t){var i,n,o,r={files:t.data("fileNames")},s=t.data("frame"),a=this.upload;if(a.trigger(M,r))a._removeFileEntry(s.data("file")),this.cleanupFrame(s),this.unregisterFrame(s);else{a._hideUploadButton(),a._showHeaderUploadStatus(!0),s.appendTo(document.body),i=s.data("form").attr("action",a.options.async.saveUrl).appendTo(document.body),r.data=e.extend({},r.data,T());for(n in r.data)o=i.find("input[name='"+n+"']"),0===o.length&&(o=e("<input>",{type:"hidden",name:n}).prependTo(i)),o.val(r.data[n]);a._fileAction(t,z),a._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),s.one("load",e.proxy(this.onIframeLoad,this)),i[0].submit()}},onSaveSelected:function(){var t=this,i=t.upload;e(".k-file",this.element).each(function(){var n=e(this),o=w(n),r=i._filesContainValidationErrors(n.data("fileNames"));o||r||t.performUpload(n)})},onIframeLoad:function(t){var i,n=e(t.target);try{i=n.contents().text()}catch(o){i="Error trying to get server response: "+o}this.processResponse(n,i)},processResponse:function(t,i){var n=t.data("file"),o=this,r={responseText:i};g(i,function(i){e.extend(r,{statusText:"OK",status:"200"}),o.upload._onFileProgress({target:e(n,o.upload.wrapper)},100),o.upload._onUploadSuccess({target:e(n,o.upload.wrapper)},i,r),o.cleanupFrame(t),o.unregisterFrame(t)},function(){e.extend(r,{statusText:"error",status:"500"}),o.upload._onUploadError({target:e(n,o.upload.wrapper)},r)})},onCancel:function(t){var i=e(t.target).data("frame");this.stopFrameSubmit(i),this.cleanupFrame(i),this.unregisterFrame(i),this.upload._removeFileEntry(i.data("file"))},onRetry:function(e){var t=y(e);this.performUpload(t)},onRemove:function(e,t,i){var n=this,o=n.upload,r=y(e),s=r.data("frame");s?(n.unregisterFrame(s),o._removeFileEntry(r),n.cleanupFrame(s)):r.hasClass("k-file-success")?m(r,o,t,i):o._removeFileEntry(r)},onAbort:function(){var t=this.element,i=this;e.each(this.iframes,function(){e("input",this.data("form")).appendTo(t),i.stopFrameSubmit(this[0]),this.data("form").remove(),this.remove()}),this.iframes=[]},createFrame:function(t){return e("<iframe name='"+t+"' id='"+t+"' style='display:none;' />")},createForm:function(t,i){return e("<form enctype='multipart/form-data' method='POST' action='"+t+"' target='"+i+"'/>")},stopFrameSubmit:function(e){t!==e.stop?e.stop():e.document&&e.document.execCommand("Stop")},registerFrame:function(e){this.iframes.push(e)},unregisterFrame:function(t){this.iframes=e.grep(this.iframes,function(e){return e.attr("name")!=t.attr("name")})},cleanupFrame:function(e){var t=e.data("form");e.data("file").data("frame",null),setTimeout(function(){t.remove(),e.remove()},1)}},x=function(e){this.name="formDataUploadModule",this.element=e.wrapper,this.upload=e,this.position={},this.metaData={},this.cancelled={},this.resume={},this.paused={},this.retries={}},x.prototype={onSelect:function(t,i){var n,o,r=this.upload,s=this,a=e(t.target),l=this.prepareUpload(a,i);e.each(l,function(t){n=r._filesContainValidationErrors(e(this.data("fileNames"))),r.options.async.autoUpload?n?(r._fileAction(this,O),r._showHeaderUploadStatus(!1)):r.options.async.chunkSize?(s.prepareChunk(this),o=this.prev(),(r.options.async.concurrent||0===t&&!o.length||0===t&&o.hasClass("k-file-success"))&&s.performUpload(this)):s.performUpload(this):(r._fileAction(this,O),n?r._updateHeaderUploadStatus():(r._showUploadButton(),this.addClass("k-toupload"))),n&&r._hideUploadProgress(this)})},prepareUpload:function(t,i){var n=this.enqueueFiles(i);return t.is("input")&&(e.each(n,function(){e(this).data("relatedInput",t)}),t.data("relatedFileEntries",n),this.upload._addInput(t)),n},enqueueFiles:function(t){var i,n,o,r,s=this.upload,a=t.length,l=[];if(s.options.async.batch===!0)i=e.map(t,function(e){return e.name}).join(", "),(s.directory||s.options.directoryDrop)&&e(t).each(function(){(this.rawFile.webkitRelativePath||this.rawFile.relativePath)&&(this.name=this.rawFile.webkitRelativePath||this.rawFile.relativePath)}),r=s._enqueueFile(i,{fileNames:t}),r.data("files",t),l.push(r);else for(n=0;n<a;n++)o=t[n],i=o.name,(s.directory||s.options.directoryDrop)&&(o.rawFile.webkitRelativePath||o.rawFile.relativePath)&&(o.name=o.rawFile.webkitRelativePath||o.rawFile.relativePath),r=s._enqueueFile(i,{fileNames:[o]}),r.data("files",[o]),l.push(r);return l},performUpload:function(t){var i,n,o=this.upload,r=this.createFormData(),s=this.createXHR(),a={files:t.data("fileNames"),XMLHttpRequest:s};if(o.trigger(M,a))this.removeFileEntry(t);else{if(0===t.find(".k-i-cancel").length&&(o.options.async.chunkSize&&o._fileAction(t,L),o._fileAction(t,z,o.options.async.chunkSize)),o.wrapper.find(".k-toupload").length||o._hideUploadButton(),o._showHeaderUploadStatus(!0),a.formData)r=a.formData;else{a.data=e.extend({},a.data,T());for(n in a.data)r.append(n,a.data[n]);i=t.data("files"),i&&this.populateFormData(r,i)}o._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),o.options.async.useArrayBuffer&&window.FileReader?this._readFile(o.options.async.saveUrl,r,t,s):this.postFormData(o.options.async.saveUrl,r,t,s)}},_readFile:function(i,n,o,r){var s=this,a=s.upload,l=o.data("files")[0],c=new FileReader;c.onload=function(c){try{s.fileArrayBuffer=s.fileArrayBuffer?s._appendBuffer(s.fileArrayBuffer,c.target.result):c.target.result}catch(d){return a._onUploadError({target:e(o,a.wrapper)},r),t}s.position[l.uid]>l.size?(s.postFormData(a.options.async.saveUrl,s.fileArrayBuffer,o,r),s.fileArrayBuffer=null):s._readFile(i,n,o,r)},c.onerror=function(){a._onUploadError({target:e(o,a.wrapper)},r)},c.readAsArrayBuffer(s._getCurrentChunk(l.rawFile,l.uid))},_appendBuffer:function(e,t){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},onSaveSelected:function(){var t=this,i=t.upload;e(".k-toupload",this.element).filter(function(){var t=e(this),n=w(t),o=i._filesContainValidationErrors(t.data("fileNames"));return!n&&!o}).each(function(n){var o=e(this),r=o.prev();o.removeClass("k-toupload"),i.options.async.chunkSize?(t.prepareChunk(o),(i.options.async.concurrent||0===n&&!r.length||0===n&&r.hasClass("k-file-success")||r.hasClass("k-file-error"))&&t.performUpload(o)):t.performUpload(o)})},onCancel:function(e){var t=y(e);this.upload.options.async.chunkSize&&(this.cancelled[t.data("uid")]=!0),this.stopUploadRequest(t),this.removeFileEntry(t)},onPause:function(e){var t=y(e),i=t.data("uid"),n=this.upload.options.async;n.chunkSize&&(this.retries[i]=n.maxAutoRetries+1,this.paused[i]=!0,this.resume[i]=!1)},onResume:function(e){var t=y(e),i=t.data("uid");this.upload.options.async.chunkSize&&(delete this.paused[i],this.resume[i]=!0,this.retries[t.data("uid")]=1,this._increaseChunkIndex(i),this.performUpload(t))},onRetry:function(e){var t=y(e),i=this.upload.options.async;i.chunkSize&&(this.retries[t.data("uid")]=i.maxAutoRetries+1,delete this.paused[t.data("uid")]),this.performUpload(t)},onRemove:function(e,t,i){var n=this,o=n.upload,r=y(e),s=this.upload.options.async;s.chunkSize&&(this.retries[r.data("uid")]=s.maxAutoRetries+1),r.hasClass("k-file-success")?m(r,o,t,i):n.removeFileEntry(r)},createXHR:function(){return new XMLHttpRequest},postFormData:function(e,t,i,n){var o,r=this;i.data("request",n),n.addEventListener("load",function(e){r.onRequestSuccess.call(r,e,i)},!1),n.addEventListener(F,function(e){r.onRequestError.call(r,e,i)},!1),n.upload.addEventListener("progress",function(e){r.onRequestProgress.call(r,e,i)},!1),n.open("POST",e,!0),n.withCredentials=this.upload.options.async.withCredentials,o=this.upload.options.async.accept,o&&n.setRequestHeader("Accept",o),n.send(t)},createFormData:function(){return new FormData},populateFormData:function(e,t){var i,n,o,r,s=t.length,a=this.upload;if(a.options.async.chunkSize)o=t[0].uid,i=this._getCurrentChunk(t[0].rawFile,o),e.append(a.options.async.saveField||a.name,i),r=JSON.stringify(this.metaData[o]),e.append("metadata",r);else for(n=0;n<s;n++)e.append(a.options.async.saveField||a.name,t[n].rawFile);return e},onRequestSuccess:function(t,i){function n(){s.upload._onUploadError({target:e(i,s.upload.wrapper)},r)}function o(t){var n=s.upload.options.async.batch,o=s.upload.options.async.chunkSize,a=s.upload.options.async.concurrent,l=t.fileUid;s.paused[l]||s.cancelled[l]||(delete s.retries[l],!o||n||t.uploaded?!o||n||a||!i.next().length||i.next().hasClass("k-toupload")?(s.upload._onFileProgress({target:e(i,s.upload.wrapper)},100),s.upload._onUploadSuccess({target:e(i,s.upload.wrapper)},t,r),s.cleanupFileEntry(i)):(s.upload._onFileProgress({target:e(i,s.upload.wrapper)},100),s._resetChunkIndex(l),s.upload._onUploadSuccess({target:e(i,s.upload.wrapper)},t,r),s.performUpload(i.next())):(s._increaseChunkIndex(l),s.performUpload(i)))}var r=t.target,s=this;r.status>=200&&r.status<=299?g(r.responseText,o,n):n()},onRequestError:function(t,i){var n=t.target;this.upload._onUploadError({target:e(i,this.upload.wrapper)},n)},cleanupFileEntry:function(t){var i=t.data("relatedInput"),n=!0;i&&(e.each(i.data("relatedFileEntries")||[],function(){this.parent().length>0&&this[0]!=t[0]&&(n=n&&this.hasClass("k-file-success"))}),n&&i.remove())},removeFileEntry:function(e){var t=this.upload.options.async.chunkSize,i=this.upload.options.async.concurrent,n=this.upload.wrapper.find(".k-upload-selected").length>0;this.cleanupFileEntry(e),!t||i||n||e.next().length&&this.performUpload(e.next()),this.upload._removeFileEntry(e)},onRequestProgress:function(t,i){var n,o=Math.round(100*t.loaded/t.total),r=i.data("uid");this.upload.options.async.chunkSize&&(n=this.metaData[r],o=n&&n.totalChunks?Math.round(n.chunkIndex/n.totalChunks*100):100),this.upload._onFileProgress({target:e(i,this.upload.wrapper)},o)},stopUploadRequest:function(e){e.data("request").abort()},prepareChunk:function(e){var t=e.data("files")[0],i=t.rawFile,n=t.uid,o=this.upload.options.async.chunkSize;this.position[n]=0,this.metaData[n]={chunkIndex:0,contentType:i.type,fileName:i.name,relativePath:t.name,totalFileSize:i.size,totalChunks:Math.ceil(i.size/o),uploadUid:n}},_decreaseChunkIndex:function(e){this.metaData[e].chunkIndex--},_increaseChunkIndex:function(e){this.metaData[e].chunkIndex++},_resetChunkIndex:function(e){this.metaData[e].chunkIndex=0},_decreasePosition:function(e){this.position[e]-=this.upload.options.async.chunkSize},_getCurrentChunk:function(e,t){var i,n=this.position[t],o=this.upload.options.async,r=o.chunkSize||o.bufferChunkSize;return this.position[t]||(this.position[t]=0),this.position[t]+=r,(i=this._getChunker(e))?e[i](n,this.position[t]):e},_getChunker:function(e){return e.slice?"slice":e.mozSlice?"mozSlice":e.webkitSlice?"webkitSlice":null}},C.ui.plugin(K)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.filebrowser.min",["kendo.listview.min","kendo.dropdownlist.min","kendo.upload.min"],e)}(function(){return function(e,t){function i(e,t,i){var n,o;e.on("dragenter"+x,function(){t(),o=new Date,n||(n=setInterval(function(){var e=new Date-o;e>100&&(i(),clearInterval(n),n=null)},100))}).on("dragover"+x,function(){o=new Date})}function n(e,i){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+i}function o(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}function r(e,t){var i=e[t];return h(i)?i.from||i.field||t:i;
}var s,a,l,c,d=window.kendo,u=d.ui.Widget,h=e.isPlainObject,p=e.proxy,f=e.extend,m=d.support.placeholder,g=d.support.browser,v=d.isFunction,_=/(^\/|\/$)/g,b="change",w="apply",y="error",k="click",x=".kendoFileBrowser",C=".kendoBreadcrumbs",S=".kendoSearchBox",T="name",D="size",A="type",E={field:A,dir:"asc"},I=d.template('<li class="k-tile-empty"><strong>${text}</strong></li>'),M='<div class="k-widget k-filebrowser-toolbar k-header k-floatwrap"><div class="k-toolbar-wrap"># if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-upload-button"><span class="k-icon k-i-plus"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div># } ## if (showCreate) { #<button type="button" class="k-button k-button-icon"><span class="k-icon k-i-folder-add" /></button># } ## if (showDelete) { #<button type="button" class="k-button k-button-icon k-state-disabled"><span class="k-icon k-i-close" /></button>&nbsp;# } #</div><div class="k-tiles-arrange"><label>#=messages.orderBy#: <select /></label></div></div>';f(!0,d.data,{schemas:{filebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),f(!0,d.data,{transports:{filebrowser:d.data.RemoteTransport.extend({init:function(t){d.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,i){i.data=e.extend({},i.data,{path:this.options.path()}),v(this.options[t])?this.options[t].call(this,i):d.data.RemoteTransport.fn[t].call(this,i)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),s=g.msie&&g.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},a=u.extend({init:function(e,t){var i=this;t=t||{},u.fn.init.call(i,e,t),i.element.addClass("k-filebrowser"),i.element.on(k+x,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",p(i._deleteClick,i)).on(k+x,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",p(i._addClick,i)).on("keydown"+x,"li.k-state-selected input",p(i._directoryKeyDown,i)).on("blur"+x,"li.k-state-selected input",p(i._directoryBlur,i)),i._dataSource(),i.refresh(),i.path(i.options.path)},options:{name:"FileBrowser",messages:{uploadFile:"Upload",orderBy:"Arrange by",orderByName:"Name",orderBySize:"Size",directoryNotFound:"A directory with this name was not found.",emptyFolder:"Empty Folder",deleteFile:'Are you sure you want to delete "{0}"?',invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',dropFilesHere:"drop file here to upload",search:"Search"},transport:{},path:"/",fileTypes:"*.*"},events:[y,b,w],destroy:function(){var e=this;u.fn.destroy.call(e),e.dataSource.unbind(y,e._errorHandler),e.element.add(e.list).add(e.toolbar).off(x),d.destroy(e.element)},value:function(){var e,t=this,i=t._selectedItem(),o=t.options.transport.fileUrl;if(i&&"f"===i.get(A))return e=n(t.path(),i.get(T)).replace(_,""),o&&(e=v(o)?o(e):d.format(o,encodeURIComponent(e))),e},_selectedItem:function(){var e=this.listView,t=e.select();if(t.length)return this.dataSource.getByUid(t.attr(d.attr("uid")))},_toolbar:function(){var t=this,i=d.template(M),n=t.options.messages,o=[{text:n.orderByName,value:"name"},{text:n.orderBySize,value:"size"}];t.toolbar=e(i({messages:n,showUpload:t.options.transport.uploadUrl,showCreate:t.options.transport.create,showDelete:t.options.transport.destroy})).appendTo(t.element).find(".k-upload input").kendoUpload({multiple:!1,localization:{dropFilesHere:n.dropFilesHere},async:{saveUrl:t.options.transport.uploadUrl,autoUpload:!0},upload:p(t._fileUpload,t),error:function(e){t._error({xhr:e.XMLHttpRequest,status:"error"})}}).end(),t.upload=t.toolbar.find(".k-upload input").data("kendoUpload"),t.arrangeBy=t.toolbar.find(".k-tiles-arrange select").kendoDropDownList({dataSource:o,dataTextField:"text",dataValueField:"value",change:function(){t.orderBy(this.value())}}).data("kendoDropDownList"),t._attachDropzoneEvents()},_attachDropzoneEvents:function(){var t=this;t.options.transport.uploadUrl&&(i(e(document.documentElement),e.proxy(t._dropEnter,t),e.proxy(t._dropLeave,t)),t._scrollHandler=p(t._positionDropzone,t))},_dropEnter:function(){this._positionDropzone(),e(document).on("scroll"+x,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),e(document).off("scroll"+x,this._scrollHandler)},_positionDropzone:function(){var e=this,t=e.element,i=t.offset();e.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(i).css({width:t[0].clientWidth,height:t[0].clientHeight,lineHeight:t[0].clientHeight+"px"})},_removeDropzone:function(){this.toolbar.find(".k-dropzone").removeClass("k-filebrowser-dropzone").css({width:"",height:"",lineHeight:"",top:"",left:""})},_deleteClick:function(){var e=this,t=e.listView.select(),i=d.format(e.options.messages.deleteFile,t.find("strong").text());t.length&&e._showMessage(i,"confirm")&&e.listView.remove(t)},_addClick:function(){this.createDirectory()},_getFieldName:function(e){return r(this.dataSource.reader.model.fields,e)},_fileUpload:function(e){var t,i=this,n=i.options,o=n.fileTypes,r=RegExp(("("+o.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),s=e.files[0].name,a=T,l=D;r.test(s)?(e.data={path:i.path()},t=i._createFile(s),t?i.upload.one("success",function(e){var n=i._insertFileToList(t);n.set(a,e.response[i._getFieldName(a)]),n.set(l,e.response[i._getFieldName(l)]),i._tiles=i.listView.items().filter("["+d.attr("type")+"=f]")}):e.preventDefault()):(e.preventDefault(),i._showMessage(d.format(n.messages.invalidFileType,s,o)))},_findFile:function(e){var t,i,n,o=this.dataSource.data(),r=A,s=T;for(e=e.toLowerCase(),t=0,n=o.length;t<n;t++)if("f"===o[t].get(r)&&o[t].get(s).toLowerCase()===e){i=o[t];break}return i},_createFile:function(e){var t=this,i={},n=A,o=t._findFile(e);return o?t._showMessage(d.format(t.options.messages.overwriteFile,e),"confirm")?(o._override=!0,o):null:(i[n]="f",i[T]=e,i[D]=0,i)},_insertFileToList:function(e){var t,i,n,o,r;if(e._override)return e;for(i=this.dataSource,n=i.view(),o=0,r=n.length;o<r;o++)if("f"===n[o].get(A)){t=o;break}return i.insert(++t,e)},createDirectory:function(){var e,t,i=this,n=0,o=A,r=T,s=i.dataSource.data(),a=i._nameDirectory(),l=new i.dataSource.reader.model;for(e=0,t=s.length;e<t;e++)"d"===s[e].get(o)&&(n=e);l.set(o,"d"),l.set(r,a),i.listView.one("dataBound",function(){var e=i.listView.items().filter("["+d.attr("uid")+"="+l.uid+"]"),t=e.find("input");e.length&&this.edit(e),this.element.scrollTop(e.attr("offsetTop")-this.element[0].offsetHeight),setTimeout(function(){t.select()})}).one("save",function(e){var t=e.model.get(r);t?e.model.set(r,i._nameExists(t,l.uid)?i._nameDirectory():t):e.model.set(r,a)}),i.dataSource.insert(++n,l)},_directoryKeyDown:function(e){13==e.keyCode&&e.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(e,t){var i,n,o=this.dataSource.data(),r=A,s=T;for(i=0,n=o.length;i<n;i++)if("d"===o[i].get(r)&&o[i].get(s).toLowerCase()===e.toLowerCase()&&o[i].uid!==t)return!0;return!1},_nameDirectory:function(){var t,i,n,o="New folder",r=this.dataSource.data(),s=[],a=A,l=T;for(i=0,n=r.length;i<n;i++)"d"===r[i].get(a)&&r[i].get(l).toLowerCase().indexOf(o.toLowerCase())>-1&&s.push(r[i].get(l));if(e.inArray(o,s)>-1){i=2;do t=o+" ("+i+")",i++;while(e.inArray(t,s)>-1);o=t}return o},orderBy:function(e){this.dataSource.sort([{field:A,dir:"asc"},{field:e,dir:"asc"}])},search:function(e){this.dataSource.filter({field:T,operator:"contains",value:e})},_content:function(){var t=this;t.list=e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("dblclick"+x,"li",p(t._dblClick,t)),t.listView=new d.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),d.ui.progress(t.listView.element,!1))},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+d.attr("type")+"=f]"):this.wrapper.append(I({text:t.options.messages.emptyFolder}))},change:p(t._listViewChange,t)})},_dblClick:function(t){var i,o=this,r=e(t.currentTarget);r.hasClass("k-edit-item")&&o._directoryBlur(),r.filter("["+d.attr("type")+"=d]").length?(i=o.dataSource.getByUid(r.attr(d.attr("uid"))),i&&(o.path(n(o.path(),i.get(T))),o.breadcrumbs.value(o.path()))):r.filter("["+d.attr("type")+"=f]").length&&o.trigger(w)},_listViewChange:function(){var e=this._selectedItem();e&&(this.toolbar.find(".k-i-close").parent().removeClass("k-state-disabled"),this.trigger(b,{selected:e}))},_dataSource:function(){var e,t=this,i=t.options,n=i.transport,o=f({},E),r={field:T,dir:"asc"},s={type:n.type||"filebrowser",sort:[o,r]};h(n)&&(n.path=p(t.path,t),s.transport=n),h(i.schema)?s.schema=i.schema:n.type&&h(d.data.schemas[n.type])&&(e=d.data.schemas[n.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(y,t._errorHandler):t._errorHandler=p(t._error,t),t.dataSource=d.data.DataSource.create(s).bind(y,t._errorHandler)},_navigation:function(){var t=this,i=e('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element);t.breadcrumbs=i.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=i.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,i,n=this;n.trigger(y,e)||(t=e.xhr.status,"error"==e.status?"404"==t?n._showMessage(n.options.messages.directoryNotFound):"0"!=t&&n._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&n._showMessage("Error! Server timeout."),i=n.dataSource,i.hasChanges()&&i.cancelChanges())},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_editTmpl:function(){var e='<li class="k-tile k-state-selected" '+d.attr("uid")+'="#=uid#" ';return e+=d.attr("type")+'="${'+A+'}">',e+="#if("+A+' == "d") { #',e+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>',e+="#}#",e+="#if("+A+' == "d") { #',e+='<input class="k-input" '+d.attr("bind")+'="value:'+T+'"/>',e+="#}#",e+="</li>",p(d.template(e),{sizeFormatter:o})},_itemTmpl:function(){var e='<li class="k-tile" '+d.attr("uid")+'="#=uid#" ';return e+=d.attr("type")+'="${'+A+'}">',e+="#if("+A+' == "d") { #',e+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-thumb"><span class="k-icon k-i-file"></span></div>',e+="#}#",e+="<strong>${"+T+"}</strong>",e+="#if("+A+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+D+")}</span> #}#",e+="</li>",p(d.template(e),{sizeFormatter:o})},path:function(e){var i=this,n=i._path||"";return e!==t?(i._path=e.replace(_,"")+"/",i.dataSource.read({path:i._path}),t):(n&&(n=n.replace(_,"")),"/"===n||""===n?"":n+"/")}}),l=u.extend({init:function(e,t){var i=this;t=t||{},u.fn.init.call(i,e,t),m&&i.element.attr("placeholder",i.options.label),i._wrapper(),i.element.on("keydown"+S,p(i._keydown,i)).on("change"+S,p(i._updateValue,i)),i.wrapper.on(k+S,"a",p(i._click,i)),m||i.element.on("focus"+S,p(i._focus,i)).on("blur"+S,p(i._blur,i))},options:{name:"SearchBox",label:"Search",value:""},events:[b],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(S),u.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(b))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){m||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,i=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),i.length||(i=t.wrap(e('<div class="k-widget k-search-wrap k-textbox"/>')).parent(),m||e('<label style="display:block">'+this.options.label+"</label>").insertBefore(t),e('<a href="#" class="k-icon k-i-zoom k-search"/>').appendTo(i)),this.wrapper=i,this.label=i.find(">label")},value:function(e){var i=this;return e!==t?(i.options.value=e,i.element.val(e),i._toggleLabel(),t):i.options.value}}),c=u.extend({init:function(e,t){var i=this;t=t||{},u.fn.init.call(i,e,t),i._wrapper(),i.wrapper.on("focus"+C,"input",p(i._focus,i)).on("blur"+C,"input",p(i._blur,i)).on("keydown"+C,"input",p(i._keydown,i)).on(k+C,"a.k-i-arrow-60-up:first",p(i._rootClick,i)).on(k+C,"a:not(.k-i-arrow-60-up)",p(i._click,i)),i.value(i.options.value)},options:{name:"Breadcrumbs",gap:50},events:[b],destroy:function(){var e=this;u.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(b))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-60-up)").addBack()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,i=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(i)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,i=this.element,n=i.parents(".k-breadcrumbs");i[0].style.width="",i.addClass("k-input"),n.length||(n=i.wrap(e('<div class="k-widget k-breadcrumbs k-textbox"/>')).parent()),t=n.find(".k-breadcrumbs-wrap"),t.length||(t=e('<div class="k-breadcrumbs-wrap"/>').appendTo(n)),this.wrapper=n,this.overlay=t},refresh:function(){var i,n,o,r,s="",a=this.value();for(a!==t&&a.match(/^\//)||(a="/"+(a||"")),i=a.split("/"),o=0,r=i.length;o<r;o++)n=i[o],n&&(s||(s+='<a href="#" class="k-icon k-i-arrow-60-up" title="Go to parent folder"></a>'),s+='<a class="k-link" href="#">'+i[o]+"</a>",s+='<span class="k-icon k-i-arrow-60-right" title="Go to child folder"></span>');this.overlay.empty().append(e(s)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,i=this,n=i.wrapper,o=n.width()-i.options.gap,r=i.overlay.find("a");r.each(function(i){t=e(this),t.parent().width()>o&&(i==r.length-1?t.width(o):t.prev().addBack().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}}),d.ui.plugin(a),d.ui.plugin(c),d.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.imagebrowser.min",["kendo.filebrowser.min"],e)}(function(){return function(e,t){function i(e,i){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+i}function n(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}var o,r,s=window.kendo,a=s.ui.FileBrowser,l=e.isPlainObject,c=e.proxy,d=e.extend,u=s.support.browser,h=s.isFunction,p=/(^\/|\/$)/g,f="error",m=".kendoImageBrowser",g="name",v="size",_="type",b={field:_,dir:"asc"},w=s.template('<li class="k-tile-empty"><strong>${text}</strong></li>');d(!0,s.data,{schemas:{imagebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),d(!0,s.data,{transports:{imagebrowser:s.data.RemoteTransport.extend({init:function(t){s.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,i){i.data=e.extend({},i.data,{path:this.options.path()}),h(this.options[t])?this.options[t].call(this,i):s.data.RemoteTransport.fn[t].call(this,i)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),o=u.msie&&u.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},r=a.extend({init:function(e,t){var i=this;t=t||{},a.fn.init.call(i,e,t),i.element.addClass("k-imagebrowser")},options:{name:"ImageBrowser",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},value:function(){var e,t=this,n=t._selectedItem(),o=t.options.transport.imageUrl;if(n&&"f"===n.get(_))return e=i(t.path(),n.get(g)).replace(p,""),o&&(e=h(o)?o(e):s.format(o,encodeURIComponent(e))),e},_fileUpload:function(e){var t,i=this,n=i.options,o=n.fileTypes,r=RegExp(("("+o.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),a=e.files[0].name,l=g,c=v;r.test(a)?(e.data={path:i.path()},t=i._createFile(a),t?(t._uploading=!0,i.upload.one("success",function(e){delete t._uploading;var n=i._insertFileToList(t);n.set(l,e.response[i._getFieldName(l)]),n.set(c,e.response[i._getFieldName(c)]),i._tiles=i.listView.items().filter("["+s.attr("type")+"=f]"),i._scroll()})):e.preventDefault()):(e.preventDefault(),i._showMessage(s.format(n.messages.invalidFileType,a,o)))},_content:function(){var t=this;t.list=e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("scroll"+m,c(t._scroll,t)).on("dblclick"+m,"li",c(t._dblClick,t)),t.listView=new s.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),s.ui.progress(t.listView.element,!1))},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+s.attr("type")+"=f]"),t._scroll()):this.wrapper.append(w({text:t.options.messages.emptyFolder}))},change:c(t._listViewChange,t)})},_dataSource:function(){var e,t=this,i=t.options,n=i.transport,o=d({},b),r={field:g,dir:"asc"},a={type:n.type||"imagebrowser",sort:[o,r]};l(n)&&(n.path=c(t.path,t),a.transport=n),l(i.schema)?a.schema=i.schema:n.type&&l(s.data.schemas[n.type])&&(e=s.data.schemas[n.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(f,t._errorHandler):t._errorHandler=c(t._error,t),t.dataSource=s.data.DataSource.create(a).bind(f,t._errorHandler)},_loadImage:function(t){var i=this,n=e(t),o=i.dataSource.getByUid(n.attr(s.attr("uid"))),r=o.get(g),a=i.options.transport.thumbnailUrl,l=e("<img />",{alt:r}),c="?";o._uploading||(l.hide().on("load"+m,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),n.find(".k-i-loading").after(l),h(a)?a=a(i.path(),encodeURIComponent(r)):(a.indexOf("?")>=0&&(c="&"),a=a+c+"path="+encodeURIComponent(i.path()+r),o._override&&(a+="&_="+(new Date).getTime(),delete o._override)),l.attr("src",a),t.loaded=!0)},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var t=s._outerHeight(e.list),i=e.list.scrollTop(),n=i+t;e._tiles.each(function(){var t=o(this),r=t+this.offsetHeight;if((t>=i&&t<n||r>=i&&r<n)&&e._loadImage(this),t>n)return!1}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_itemTmpl:function(){var e=this,t='<li class="k-tile" '+s.attr("uid")+'="#=uid#" ';return t+=s.attr("type")+'="${'+_+'}">',t+="#if("+_+' == "d") { #',t+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>':'<div class="k-thumb"><span class="k-icon k-i-file"></span></div>',t+="#}#",t+="<strong>${"+g+"}</strong>",t+="#if("+_+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+v+")}</span> #}#",t+="</li>",c(s.template(t),{sizeFormatter:n})}}),s.ui.plugin(r)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.tabstrip.min",["kendo.data.min"],e)}(function(){return function(e,t){function i(t){t.children(b).addClass(E),t.children("a").addClass(C).children(b).addClass(E),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(N),t.filter("li[disabled]").addClass(H).attr("aria-disabled","true").removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(O+" "+U),t.attr("role","tab"),t.filter("."+O).attr("aria-selected",!0),t.each(function(){var t=e(this);t.children("."+C).length||t.contents().filter(function(){return!(this.nodeName.match(v)||3==this.nodeType&&!d(this.nodeValue))}).wrapAll("<span UNSELECTABLE='on' class='"+C+"'/>")})}function n(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(I),t.filter(".k-last:not(:last-child)").removeClass(S),t.filter(":first-child").addClass(I),t.filter(":last-child").addClass(S)}function o(e,t){return"<span class='k-button k-button-icon k-bare k-tabstrip-"+e+"' unselectable='on'><span class='k-icon "+t+"'></span></span>"}var r=window.kendo,s=r.ui,a=r.keys,l=e.map,c=e.each,d=e.trim,u=e.extend,h=r.isFunction,p=r.template,f=r._outerWidth,m=r._outerHeight,g=s.Widget,v=/^(a|div)$/i,_=".kendoTabStrip",b="img",w="href",y="prev",k="next",x="show",C="k-link",S="k-last",T="click",D="error",A=":empty",E="k-image",I="k-first",M="select",R="activate",F="k-content",P="contentUrl",z="mouseenter",B="mouseleave",L="contentLoad",H="k-state-disabled",N="k-state-default",O="k-state-active",V="k-state-focused",W="k-state-hover",U="k-tab-on-top",q=".k-item:not(."+H+")",j=".k-item",G=".k-tabstrip-items > "+q+":not(."+O+")",$=200,K={content:p("<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= content(item) #</div>"),itemWrapper:p("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),item:p("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),image:p("<img class='k-image' alt='' src='#= imageUrl #' />"),sprite:p("<span class='k-sprite #= spriteCssClass #'></span>"),empty:p("")},Y={wrapperCssClass:function(e,t){var i="k-item",n=t.index;return i+=t.enabled===!1?" k-state-disabled":" k-state-default",0===n&&(i+=" k-first"),n==e.length-1&&(i+=" k-last"),i},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return e.encoded===!1?e.text:r.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return e.active!==!0?" style='display:none' aria-hidden='true' aria-expanded='false'":""},content:function(e){return e.content?e.content:e.contentUrl?"":"&nbsp;"},contentUrl:function(e){return e.contentUrl?r.attr("content-url")+'="'+e.contentUrl+'"':""}},Q=g.extend({init:function(t,i){var n,o,s,a=this;g.fn.init.call(a,t,i),a._animations(a.options),i=a.options,a._contentUrls=i.contentUrls||[],a._wrapper(),a._isRtl=r.support.isRtl(a.wrapper),a._tabindex(),a._updateClasses(),a._dataSource(),i.dataSource&&a.dataSource.fetch(),a._tabPosition(),a._scrollable(),a._contentUrls.length?a.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,i){var n=a._contentUrls[t];"string"==typeof n&&e(i).find(">."+C).data(P,n)}):a._contentUrls.length=a.tabGroup.find("li.k-item").length,a.wrapper.on(z+_+" "+B+_,G,a._toggleHover).on("focus"+_,e.proxy(a._active,a)).on("blur"+_,function(){a._current(null)}),a._keyDownProxy=e.proxy(a._keydown,a),i.navigatable&&a.wrapper.on("keydown"+_,a._keyDownProxy),a.options.value&&(n=a.options.value),a.wrapper.children(".k-tabstrip-items").on(T+_,".k-state-disabled .k-link",!1).on(T+_," > "+q,function(t){var i,n=a.wrapper[0];if(n!==document.activeElement)if(i=r.support.browser.msie)try{n.setActive()}catch(o){n.focus()}else n.focus();a._click(e(t.currentTarget))&&t.preventDefault()}),o=a.tabGroup.children("li."+O),s=a.contentHolder(o.index()),o[0]&&s.length>0&&0===s[0].childNodes.length&&a.activateTab(o.eq(0)),a.element.attr("role","tablist"),a.element[0].id&&(a._ariaId=a.element[0].id+"_ts_active"),a.value(n),r.notify(a)},_active:function(){var e=this.tabGroup.children().filter("."+O);e=e[0]?e:this._endItem("first"),e[0]&&this._current(e)},_endItem:function(e){return this.tabGroup.children(q)[e]()},_getItem:function(e){return this.tabGroup.children(j)[e]()},_item:function(e,t){var i;return i=t===y?"last":"first",e?(e=e[t](),e[0]||(e=this.tabGroup.children(j)[i]()),e.hasClass(H)&&e.addClass(V),(e.hasClass(H)||e.hasClass(O))&&(this._focused=e),e):this._endItem(i)},_current:function(e){var i=this,n=i._focused,o=i._ariaId;return e===t?n:(n&&(i.tabGroup.children("#"+o).removeAttr("id"),n.removeClass(V)),e&&(e.hasClass(O)||e.addClass(V),i.element.removeAttr("aria-activedescendant"),o=e[0].id||o,o&&(e.attr("id",o),i.element.attr("aria-activedescendant",o))),i._focused=e,t)},_keydown:function(e){var i,n=this,o=e.keyCode,r=n._current(),s=n._isRtl,l=/top|bottom/.test(n.options.tabPosition);if(e.target==e.currentTarget){if(o!==a.DOWN||l)if(o!==a.UP||l)if(o===a.RIGHT&&l)i=s?y:k;else if(o===a.LEFT&&l)i=s?k:y;else if(o==a.ENTER||o==a.SPACEBAR)n._click(r),e.preventDefault();else{if(o==a.HOME)return n._click(n._getItem("first")),e.preventDefault(),t;if(o==a.END)return n._click(n._getItem("last")),e.preventDefault(),t}else i=y;else i=k;i&&(n._click(n._item(r,i)),e.preventDefault())}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler):t._refreshHandler=e.proxy(t.refresh,t),t.dataSource=r.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t.dataSource.fetch()},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{effects:{}}})},refresh:function(e){var t,i,n,o,s=this,a=s.options,l=r.getter(a.dataEncodedField),c=r.getter(a.dataTextField),d=r.getter(a.dataContentField),u=r.getter(a.dataContentUrlField),h=r.getter(a.dataImageUrlField),p=r.getter(a.dataUrlField),f=r.getter(a.dataSpriteCssClass),m=[],g=s.dataSource.view();for(e=e||{},n=e.action,n&&(g=e.items),t=0,o=g.length;t<o;t++)i={text:c(g[t])},a.dataEncodedField&&(i.encoded=l(g[t])),a.dataContentField&&(i.content=d(g[t])),a.dataContentUrlField&&(i.contentUrl=u(g[t])),a.dataUrlField&&(i.url=p(g[t])),a.dataImageUrlField&&(i.imageUrl=h(g[t])),a.dataSpriteCssClass&&(i.spriteCssClass=f(g[t])),m[t]=i;if("add"==e.action)e.index<s.tabGroup.children().length?s.insertBefore(m,s.tabGroup.children().eq(e.index)):s.append(m);else if("remove"==e.action)for(t=0;t<g.length;t++)s.remove(e.index);else"itemchange"==e.action?(t=s.dataSource.view().indexOf(g[0]),e.field===a.dataTextField&&s.tabGroup.children().eq(t).find(".k-link").text(g[0].get(e.field)),e.field===a.dataUrlField&&(s._contentUrls[t]=g[0].get(e.field))):(s.trigger("dataBinding"),s.remove("li"),s._contentUrls=[],s.append(m),s.trigger("dataBound"))},value:function(i){var n=this;return i===t?n.select().text():(i!=n.value()&&n.tabGroup.children().each(function(){e.trim(e(this).text())==i&&n.select(this)}),t)},items:function(){return this.tabGroup[0].children},setOptions:function(e){var t=this,i=t.options.animation;t._animations(e),e.contentUrls&&(t._contentUrls=e.contentUrls),e.animation=u(!0,i,e.animation),e.navigatable?t.wrapper.on("keydown"+_,t._keyDownProxy):t.wrapper.off("keydown"+_,t._keyDownProxy),g.fn.setOptions.call(t,e)},events:[M,R,x,D,L,"change","dataBinding","dataBound"],options:{name:"TabStrip",dataEncodedField:"",dataTextField:"",dataContentField:"",dataImageUrlField:"",dataUrlField:"",dataSpriteCssClass:"",dataContentUrlField:"",tabPosition:"top",animation:{open:{effects:"expand:vertical fadeIn",duration:200},close:{duration:200}},collapsible:!1,navigatable:!0,contentUrls:!1,scrollable:{distance:$}},destroy:function(){var e=this,t=e.scrollWrap;g.fn.destroy.call(e),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler),e.wrapper.off(_),e.wrapper.children(".k-tabstrip-items").off(_),e._scrollableModeActive&&(e._scrollPrevButton.off().remove(),e._scrollNextButton.off().remove()),r.destroy(e.wrapper),t.children(".k-tabstrip").unwrap()},select:function(t){var i=this;return 0===arguments.length?i.tabGroup.children("li."+O):(isNaN(t)||(t=i.tabGroup.children().get(t)),t=i.tabGroup.find(t),e(t).each(function(t,n){n=e(n),n.hasClass(O)||i.trigger(M,{item:n[0],contentElement:i.contentHolder(n.index())[0]})||i.activateTab(n)}),i)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},reload:function(t){var i,n;return t=this.tabGroup.find(t),i=this,n=i._contentUrls,t.each(function(){var t=e(this),o=t.find("."+C).data(P)||n[t.index()],r=i.contentHolder(t.index());o&&i.ajaxRequest(t,r,null,o)}),i},append:function(e){var t=this,i=t._create(e);return c(i.tabs,function(e){var n=i.contents[e];t.tabGroup.append(this),"bottom"==t.options.tabPosition?t.tabGroup.before(n):t._scrollableModeActive?t._scrollPrevButton.before(n):t.wrapper.append(n),t.angular("compile",function(){return{elements:[n]}})}),n(t.tabGroup),t._updateContentElements(),t.resize(!0),t},_appendUrlItem:function(e){this._contentUrls.push(e)},_moveUrlItem:function(e,t){this._contentUrls.splice(t,0,this._contentUrls.splice(e,1)[0])},_removeUrlItem:function(e){this._contentUrls.splice(e,1)},insertBefore:function(t,i){i=e(t).is(e(i))?this.tabGroup.find(i).next():this.tabGroup.find(i);var o=this,r=o._create(t),s=o.element.find("[id='"+i.attr("aria-controls")+"']");return c(r.tabs,function(t){var n=r.contents[t],a=r.newTabsCreated?o._contentUrls.length-(r.tabs.length-t):e(n).index()-1;i.before(this),s.before(n),o._moveUrlItem(a,e(this).index()),o.angular("compile",function(){return{elements:[n]}})}),n(o.tabGroup),o._updateContentElements(r.newTabsCreated),o.resize(!0),o},insertAfter:function(t,i){i=e(t).is(e(i))?this.tabGroup.find(i).prev():this.tabGroup.find(i);var o=this,r=o._create(t),s=o.element.find("[id='"+i.attr("aria-controls")+"']");return c(r.tabs,function(t){var n=r.contents[t],a=r.newTabsCreated?o._contentUrls.length-(r.tabs.length-t):e(n).index()-1;i.after(this),s.after(n),o._moveUrlItem(a,e(this).index()),o.angular("compile",function(){return{elements:[n]}})}),n(o.tabGroup),o._updateContentElements(r.newTabsCreated),o.resize(!0),o},remove:function(t){var i,n=this,o=typeof t;return"string"===o?t=n.tabGroup.find(t):"number"===o&&(t=n.tabGroup.children().eq(t)),i=t.map(function(){var t=e(this).index(),i=n.contentElement(t);return r.destroy(i),n._removeUrlItem(t),i}),t.remove(),i.empty(),i.remove(),n._updateContentElements(),n.resize(!0),n},_create:function(t){var n,o,s,a=this,c=!1;return t=t instanceof r.data.ObservableArray?t.toJSON():t,e.isPlainObject(t)||e.isArray(t)?(t=e.isArray(t)?t:[t],c=!0,n=l(t,function(i,n){return a._appendUrlItem(t[n].contentUrl||null),e(Q.renderItem({group:a.tabGroup,item:u(i,{index:n})}))}),o=l(t,function(t,i){if("string"==typeof t.content||t.contentUrl)return e(Q.renderContent({item:u(t,{index:i})}))})):(n="string"==typeof t&&"<"!=t[0]?a.element.find(t):e(t),o=e(),n.each(function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=a.element.find("[id='"+this.getAttribute("aria-controls")+"']");s=t}else s=e("<div class='"+F+"'/>");o=o.add(s)}),i(n)),{tabs:n,contents:o,newTabsCreated:c}},_toggleDisabled:function(t,i){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(N,i).toggleClass(H,!i).attr("aria-disabled",!i)})},_updateClasses:function(){var o,r,s,a=this;
a.wrapper.addClass("k-widget k-header k-tabstrip"),a.tabGroup=a.wrapper.children("ul").addClass("k-tabstrip-items k-reset"),a.tabGroup[0]||(a.tabGroup=e("<ul class='k-tabstrip-items k-reset'/>").appendTo(a.wrapper)),o=a.tabGroup.find("li").addClass("k-item"),o.length&&(r=o.filter("."+O).index(),s=r>=0?r:t,a.tabGroup.contents().filter(function(){return 3==this.nodeType&&!d(this.nodeValue)}).remove()),r>=0&&o.eq(r).addClass(U),a.contentElements=a.wrapper.children("div"),a.contentElements.addClass(F).eq(s).addClass(O).css({display:"block"}),o.length&&(i(o),n(a.tabGroup),a._updateContentElements(!0))},_elementId:function(e,t){var i,n=e.attr("id"),o=this.element.attr("id");return!n||n.indexOf(o+"-")>-1?(i=(o||r.guid())+"-",i+(t+1)):n},_updateContentElements:function(t){var i=this,n=i._contentUrls,o=i.tabGroup.children(".k-item"),s=i.wrapper.children("div"),a=i._elementId.bind(i);s.length&&o.length>s.length?s.each(function(i){var n=a(e(this),i),r=o.filter("[aria-controls="+(this.id||0)+"]")[0];!r&&t&&(r=o[i]),r&&r.setAttribute("aria-controls",n),this.setAttribute("id",n)}):o.each(function(t){var o=s.eq(t),r=a(o,t);this.setAttribute("aria-controls",r),!o.length&&n[t]?e("<div class='"+F+"'/>").appendTo(i.wrapper).attr("id",r):(o.attr("id",r),e(this).children(".k-loading")[0]||n[t]||e("<span class='k-loading k-complete'/>").prependTo(this)),o.attr("role","tabpanel"),o.filter(":not(."+O+")").attr("aria-hidden",!0).attr("aria-expanded",!1),o.filter("."+O).attr("aria-expanded",!0)}),i.contentElements=i.contentAnimators=i.wrapper.children("div"),i.tabsHeight=m(i.tabGroup)+parseInt(i.wrapper.css("border-top-width"),10)+parseInt(i.wrapper.css("border-bottom-width"),10),r.kineticScrollNeeded&&r.mobile.ui.Scroller&&(r.touchScroller(i.contentElements),i.contentElements=i.contentElements.children(".km-scroll-container"))},_wrapper:function(){var e=this;e.wrapper=e.element.is("ul")?e.element.wrapAll("<div />").parent():e.element,e.scrollWrap=e.wrapper.parent(".k-tabstrip-wrapper"),e.scrollWrap[0]||(e.scrollWrap=e.wrapper.wrapAll("<div class='k-tabstrip-wrapper' />").parent())},_tabPosition:function(){var e=this,t=e.options.tabPosition;e.wrapper.addClass("k-floatwrap k-tabstrip-"+t),"bottom"==t&&e.tabGroup.appendTo(e.wrapper),e.resize(!0)},_setContentElementsDimensions:function(){var e,t,i,n,o,r,s=this,a=s.options.tabPosition;"left"!=a&&"right"!=a||(e=s.wrapper.children(".k-content"),t=e.filter(":visible"),i="margin-"+a,n=s.tabGroup,o=f(n),r=Math.ceil(n.height())-parseInt(t.css("padding-top"),10)-parseInt(t.css("padding-bottom"),10)-parseInt(t.css("border-top-width"),10)-parseInt(t.css("border-bottom-width"),10),setTimeout(function(){e.css(i,o).css("min-height",r)}))},_resize:function(){this._setContentElementsDimensions(),this._scrollable()},_sizeScrollWrap:function(e){var t,i;e.is(":visible")&&(t=this.options.tabPosition,i=Math.floor(m(e,!0))+("left"===t||"right"===t?2:this.tabsHeight),this.scrollWrap.css("height",i).css("height"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(W,t.type==z)},_click:function(e){var t,i,n=this,o=e.find("."+C),r=o.attr(w),s=n.options.collapsible,a=e.index(),l=n.contentHolder(a),c=e.parent().children(),d=c.filter("."+V);if(e.closest(".k-widget")[0]==n.wrapper[0]){if(e.is("."+H+(s?"":",."+O)))return d.removeClass(V),n._focused=e,e.addClass(V),n._current(e),n._scrollableModeActive&&n._scrollTabsToItem(e),!0;if(i=o.data(P)||n._contentUrls[a]||r&&("#"==r.charAt(r.length-1)||r.indexOf("#"+n.element[0].id+"-")!=-1),t=!r||i,n.tabGroup.children("[data-animating]").length)return t;if(n.trigger(M,{item:e[0],contentElement:l[0]}))return!0;if(t!==!1)return s&&e.is("."+O)?(n.deactivateTab(e),!0):(n.activateTab(e)&&(t=!0),t)}},_scrollable:function(){var e,t,i,n,s,a,l=this,c=l.options;l._scrollableAllowed()&&(l.wrapper.addClass("k-tabstrip-scrollable"),e=l.wrapper[0].offsetWidth,t=l.tabGroup[0].scrollWidth,t>e&&!l._scrollableModeActive?(l._nowScrollingTabs=!1,l._isRtl=r.support.isRtl(l.element),s=r.support.mobileOS?"touchstart":"mousedown",a=r.support.mobileOS?"touchend":"mouseup",l.wrapper.append(o("prev","k-i-arrow-60-left")+o("next","k-i-arrow-60-right")),i=l._scrollPrevButton=l.wrapper.children(".k-tabstrip-prev"),n=l._scrollNextButton=l.wrapper.children(".k-tabstrip-next"),l.tabGroup.css({marginLeft:f(i)+9,marginRight:f(n)+12}),i.on(s+_,function(){l._nowScrollingTabs=!0,l._scrollTabsByDelta(c.scrollable.distance*(l._isRtl?1:-1))}),n.on(s+_,function(){l._nowScrollingTabs=!0,l._scrollTabsByDelta(c.scrollable.distance*(l._isRtl?-1:1))}),i.add(n).on(a+_,function(){l._nowScrollingTabs=!1}),l._scrollableModeActive=!0,l._toggleScrollButtons()):l._scrollableModeActive&&t<=e?(l._scrollableModeActive=!1,l.wrapper.removeClass("k-tabstrip-scrollable"),l._scrollPrevButton.off().remove(),l._scrollNextButton.off().remove(),l.tabGroup.css({marginLeft:"",marginRight:""})):l._scrollableModeActive?l._toggleScrollButtons():l.wrapper.removeClass("k-tabstrip-scrollable"))},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!e.scrollable.distance&&(e.scrollable={distance:$}),e.scrollable&&!isNaN(e.scrollable.distance)&&("top"==e.tabPosition||"bottom"==e.tabPosition)},_scrollTabsToItem:function(e){var t,i=this,n=i.tabGroup,o=n.scrollLeft(),r=f(e),s=i._isRtl?e.position().left:e.position().left-n.children().first().position().left,a=n[0].offsetWidth,l=Math.ceil(parseFloat(n.css("padding-left")));i._isRtl?s<0?t=o+s-(a-o)-l:s+r>a&&(t=o+s-r+2*l):o+a<s+r?t=s+r-a+2*l:o>s&&(t=s-l),n.finish().animate({scrollLeft:t},"fast","linear",function(){i._toggleScrollButtons()})},_scrollTabsByDelta:function(e){var t=this,i=t.tabGroup,n=i.scrollLeft();i.finish().animate({scrollLeft:n+e},"fast","linear",function(){t._nowScrollingTabs&&!jQuery.fx.off?t._scrollTabsByDelta(e):t._toggleScrollButtons()})},_toggleScrollButtons:function(){var e=this,t=e.tabGroup,i=t.scrollLeft();e._scrollPrevButton.toggle(e._isRtl?i<t[0].scrollWidth-t[0].offsetWidth-1:0!==i),e._scrollNextButton.toggle(e._isRtl?0!==i:i<t[0].scrollWidth-t[0].offsetWidth-1)},deactivateTab:function(e){var t=this,i=t.options.animation,n=i.open,o=u({},i.close),s=o&&"effects"in o;e=t.tabGroup.find(e),o=u(s?o:u({reverse:!0},n),{hide:!0}),r.size(n.effects)?(e.kendoAddClass(N,{duration:n.duration}),e.kendoRemoveClass(O,{duration:n.duration})):(e.addClass(N),e.removeClass(O)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+O).kendoStop(!0,!0).kendoAnimate(o).removeClass(O).attr("aria-hidden",!0)},activateTab:function(e){var t,i,n,o,s,a,l,c,d,h,p,f,g,v,_,b;if(!this.tabGroup.children("[data-animating]").length)return e=this.tabGroup.find(e),t=this,i=t.options.animation,n=i.open,o=u({},i.close),s=o&&"effects"in o,a=e.parent().children(),l=a.filter("."+O),c=a.index(e),d=n&&"duration"in n&&"effects"in n,o=u(s?o:u({reverse:!0},n),{hide:!0}),r.size(n.effects)?(l.kendoRemoveClass(O,{duration:o.duration}),e.kendoRemoveClass(W,{duration:o.duration})):(l.removeClass(O),e.removeClass(W)),h=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===h.length?(t.tabGroup.find("."+U).removeClass(U),e.addClass(U).css("z-index"),e.addClass(O),t._current(e),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(e),!1):(p=h.filter("."+O),f=t.contentHolder(c),g=f.closest(".k-content"),t.tabsHeight=m(t.tabGroup)+parseInt(t.wrapper.css("border-top-width"),10)+parseInt(t.wrapper.css("border-bottom-width"),10),t._sizeScrollWrap(p),0===f.length?(p.removeClass(O).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(o),!1):(e.attr("data-animating",!0),v=(e.children("."+C).data(P)||t._contentUrls[c]||!1)&&f.is(A),_=function(){l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),t._sizeScrollWrap(g),g.addClass(O).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(u({init:function(){t.trigger(x,{item:e[0],contentElement:f[0]}),r.resize(f)}},n,{complete:function(){e.removeAttr("data-animating"),t.trigger(R,{item:e[0],contentElement:f[0]}),r.resize(f),t.scrollWrap.css("height","").css("height"),d&&(r.support.browser.msie||r.support.browser.edge)&&f.finish().animate({opacity:.9},"fast","linear",function(){f.finish().animate({opacity:1},"fast","linear")})}}))},b=function(){v?(e.removeAttr("data-animating"),t.ajaxRequest(e,f,function(){e.attr("data-animating",!0),_(),t.trigger("change")})):(_(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(e)},p.removeClass(O),t.tabGroup.find("."+U).removeClass(U),e.addClass(U).css("z-index"),r.size(n.effects)?(l.kendoAddClass(N,{duration:n.duration}),e.kendoAddClass(O,{duration:n.duration})):(l.addClass(N),e.addClass(O)),p.attr("aria-hidden",!0),p.attr("aria-expanded",!1),p.length?p.kendoStop(!0,!0).kendoAnimate(u({complete:b},o)):b(),!0))},contentElement:function(i){var n,o,s,a;if(isNaN(i-0))return t;if(n=this.contentElements&&this.contentElements[0]&&!r.kineticScrollNeeded?this.contentElements:this.contentAnimators,o=e(this.tabGroup.children()[i]).attr("aria-controls"),n)for(s=0,a=n.length;s<a;s++)if(n.eq(s).closest(".k-content")[0].id==o)return n[s];return t},contentHolder:function(t){var i=e(this.contentElement(t)),n=i.children(".km-scroll-container");return r.support.touch&&n[0]?n:i},ajaxRequest:function(t,i,n,o){var s,a,l,c,d,u,p,f,m,g;t=this.tabGroup.find(t),s=this,a=e.ajaxSettings.xhr,l=t.find("."+C),c={},d=t.width()/2,u=!1,p=t.find(".k-loading").removeClass("k-complete"),p[0]||(p=e("<span class='k-loading'/>").prependTo(t)),f=2*d-p.width(),m=function(){p.animate({marginLeft:(parseInt(p.css("marginLeft"),10)||0)<d?f:0},500,m)},r.support.browser.msie&&r.support.browser.version<10&&setTimeout(m,40),o=o||l.data(P)||s._contentUrls[t.index()]||l.attr(w),s.inRequest=!0,g={type:"GET",cache:!1,url:o,dataType:"html",data:c,xhr:function(){var t=this,i=a(),n=t.progressUpload?"progressUpload":!!t.progress&&"progress";return i&&e.each([i,i.upload],function(){this.addEventListener&&this.addEventListener("progress",function(e){n&&t[n](e)},!1)}),t.noProgress=!(window.XMLHttpRequest&&"upload"in new XMLHttpRequest),i},progress:function(e){if(e.lengthComputable){var t=parseInt(e.loaded/e.total*100,10)+"%";p.stop(!0).addClass("k-progress").css({width:t,marginLeft:0})}},error:function(e,t){s.trigger("error",{xhr:e,status:t})&&this.complete()},stopProgress:function(){clearInterval(u),p.stop(!0).addClass("k-progress")[0].style.cssText=""},complete:function(e){s.inRequest=!1,this.noProgress?setTimeout(this.stopProgress,500):this.stopProgress(),"abort"==e.statusText&&p.remove()},success:function(e){var a,l,c;p.addClass("k-complete");try{a=this,l=10,a.noProgress&&(p.width(l+"%"),u=setInterval(function(){a.progress({lengthComputable:!0,loaded:Math.min(l,100),total:100}),l+=10},40)),s.angular("cleanup",function(){return{elements:i.get()}}),r.destroy(i),i.html(e)}catch(d){c=window.console,c&&c.error&&c.error(d.name+": "+d.message+" in "+o),this.error(this.xhr,"error")}n&&n.call(s,i),s.angular("compile",function(){return{elements:i.get()}}),s.trigger(L,{item:t[0],contentElement:i[0]})}},"object"==typeof o&&(g=e.extend(!0,{},g,o),h(g.url)&&(g.url=g.url())),s.xhr=e.ajax(g)}});u(Q,{renderItem:function(e){e=u({tabStrip:{},group:{}},e);var t=K.empty,i=e.item;return K.item(u(e,{image:i.imageUrl?K.image:t,sprite:i.spriteCssClass?K.sprite:t,itemWrapper:K.itemWrapper},Y))},renderContent:function(e){return K.content(u(e,Y))}}),r.ui.plugin(Q)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("util/undoredostack.min",["kendo.core.min"],e)}(function(){!function(e){var t=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.clear()},events:["undo","redo"],push:function(e){this.stack=this.stack.slice(0,this.currentCommandIndex+1),this.currentCommandIndex=this.stack.push(e)-1},undo:function(){if(this.canUndo()){var e=this.stack[this.currentCommandIndex--];e.undo(),this.trigger("undo",{command:e})}},redo:function(){if(this.canRedo()){var e=this.stack[++this.currentCommandIndex];e.redo(),this.trigger("redo",{command:e})}},clear:function(){this.stack=[],this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});e.deepExtend(e,{util:{UndoRedoStack:t}})}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/main.min",["util/undoredostack.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.window.min","kendo.colorpicker.min"],e)}(function(){!function(e,t){var i,n,o,r,s=window.kendo,a=s.Class,l=s.ui.Widget,c=s.support.mobileOS,d=s.support.browser,u=e.extend,h=e.proxy,p=s.deepExtend,f=s.keys,m="select",g="select.k-select-overlay",v=a.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return s.template(e.template,{useWithBlock:!1})(e)}}),_={editorWrapperTemplate:'<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar" /></td></tr><tr><td class="k-editable-area" /></tr></tbody></table>',buttonTemplate:'# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));#<a tabindex="0" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #"><span unselectable="on" class="k-tool-icon #= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></a>',colorPickerTemplate:'<div class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',comboBoxTemplate:'<select title="#= data.title #" class="#= data.cssClass #" />',dropDownListTemplate:'<span class="k-editor-dropdown"><select title="#= data.title #" class="#= data.cssClass #" /></span>',separatorTemplate:'<span class="k-separator" />',overflowAnchorTemplate:'<a tabindex="0" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on" title="#= data.title #" aria-haspopup="true" aria-expanded="false"><span unselectable="on" class="k-icon k-i-more-vertical"></span><span class="k-tool-text">#= data.title #</span></a>',formatByName:function(t,i){for(var n=0;n<i.length;n++)if(e.inArray(t,i[n].tags)>=0)return i[n]},getToolCssClass:function(e){var t={superscript:"sup-script",subscript:"sub-script",justifyLeft:"align-left",justifyCenter:"align-center",justifyRight:"align-right",justifyFull:"align-justify",insertUnorderedList:"list-unordered",insertOrderedList:"list-ordered","import":"login",indent:"indent-increase",outdent:"indent-decrease",createLink:"link-horizontal",unlink:"unlink-horizontal",insertImage:"image",insertFile:"file-add",viewHtml:"html",foreColor:"foreground-color",backColor:"paint",createTable:"table-insert",addColumnLeft:"table-column-insert-left",addColumnRight:"table-column-insert-right",addRowAbove:"table-row-insert-above",addRowBelow:"table-row-insert-below",deleteRow:"table-row-delete",deleteColumn:"table-column-delete",tableWizard:"table-properties",tableWizardInsert:"table-wizard",cleanFormatting:"clear-css"},i=t[e];return i?i:e},registerTool:function(e,t){var i=t.options;i&&i.template&&(i.template.options.cssClass="k-"+_.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),k.defaultTools[e]=t},registerFormat:function(e,t){k.fn.options.formats[e]=t},cacheComments:function(e,t){for(var i in t)e=e.replace(t[i],"{"+i+"}");return e},retrieveComments:function(e,t){for(var i in t)e=e.replace("{"+i+"}",t[i]);return e}},b={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",overflowAnchor:"More tools",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",fileText:"Text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogOk:"Ok",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create a table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",units:"Units",cellSpacing:"Cell Spacing",cellPadding:"Cell Padding",cellMargin:"Cell Margin",alignment:"Alignment",background:"Background",cssClass:"CSS Class",id:"ID",border:"Border",borderStyle:"Border Style",collapseBorders:"Collapse borders",wrapText:"Wrap text",associateCellsWithHeaders:"Associate cells with headers",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignLeftTop:"Align Left Top",alignCenterTop:"Align Center Top",alignRightTop:"Align Right Top",alignLeftMiddle:"Align Left Middle",alignCenterMiddle:"Align Center Middle",alignRightMiddle:"Align Right Middle",alignLeftBottom:"Align Left Bottom",alignCenterBottom:"Align Center Bottom",alignRightBottom:"Align Right Bottom",alignRemove:"Remove Alignment",columns:"Columns",rows:"Rows",selectAllCells:"Select All Cells",exportAs:"Export As","import":"Import"},w=!c||c.ios&&c.flatVersion>=500||!c.ios&&t!==document.documentElement.contentEditable,y={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},k=l.extend({init:function(i,n){var o,r,a,c,d,f,m=this,g=s.ui.editor,v=g.Dom;w&&(l.fn.init.call(m,i,n),m.options=p({},m.options,n),m.options.tools=m.options.tools.slice(),i=m.element,f=i[0],c=v.name(f),this._registerHandler(i.closest("form"),"submit",h(m.update,m,t)),a=u({},m.options),a.editor=m,"textarea"==c?(m._wrapTextarea(),r=m.wrapper.find(".k-editor-toolbar"),f.id&&r.attr("aria-controls",f.id)):(m.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),a.popup=!0,r=e('<ul class="k-editor-toolbar" role="toolbar" />').insertBefore(i)),m.toolbar=new g.Toolbar(r[0],a),m.toolbar.bindTo(m),"textarea"==c&&setTimeout(function(){var e=m.wrapper[0].style.height,t=parseInt(e,10),i=m.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&i>t&&m.wrapper.height(t-(i-t))}),m._resizable(),m._initializeContentElement(m),m.keyboard=new g.Keyboard([new g.BackspaceHandler(m),new g.TypingHandler(m),new g.SystemHandler(m),new g.SelectAllHandler(m)]),m.clipboard=new g.Clipboard(this),m.undoRedoStack=new s.util.UndoRedoStack,n&&n.value?o=n.value:m.textarea?(o=f.value,m.options.encoded&&e.trim(f.defaultValue).length&&(o=f.defaultValue),d=v.getAllComments(e("<div></div>").html(o)[0]),o=_.cacheComments(o,d),o=o.replace(/[\r\n\v\f\t ]+/gi," "),o=_.retrieveComments(o,d)):o=f.innerHTML,m.value(o||"\ufeff"),this._registerHandler(document,{mousedown:function(){m._endTyping()},mouseup:function(e){m._mouseup(e)}}),m._initializeImmutables(),m.toolbar.resize(),s.notify(m))},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.tools&&t.toolbar.bindTo(t)},_endTyping:function(){var e=this.keyboard;try{e.isTypingInProgress()&&(e.endTyping(!0),this.saveSelection())}catch(t){}},_selectionChange:function(){this._selectionStarted=!1,this.saveSelection(),this.trigger("select",{})},_resizable:function(){var i,n,o=this.options.resizable,r=e.isPlainObject(o)?o.content===t||o.content===!0:o;r&&this.textarea&&(i=e("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right' /></div>").insertAfter(this.textarea),this.wrapper.addClass("k-resizable"),this.wrapper.kendoResizable(u({},this.options.resizable,{draggableElement:i,start:function(t){var i=this.editor=e(t.currentTarget).closest(".k-editor");this.initialSize=i.height(),i.find("td:last").append("<div class='k-overlay' />")},resize:function(e){var t=e.y.initialDelta,i=this.initialSize+t,n=this.options.min||0,o=this.options.max||1/0;i=Math.min(o,Math.max(n,i)),this.editor.height(i)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),s.support.mobileOS.ios&&(n=this.wrapper.getKendoResizable(),n.draggable.options.ignore=g))},_initializeTableResizing:function(){var e=this;s.ui.editor.TableResizing.create(e),e._showTableResizeHandlesProxy=h(e._showTableResizeHandles,e),e.bind(m,e._showTableResizeHandlesProxy)},_destroyTableResizing:function(){var e=this,t=e.tableResizing;t&&(t.destroy(),e.tableResizing=null),e._showTableResizeHandlesProxy&&e.unbind(m,e._showTableResizeHandlesProxy)},_showTableResizeHandles:function(){var e=this,t=e.tableResizing;t&&t.showResizeHandles()},_initializeColumnResizing:function(){s.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var e=this;e.columnResizing&&(e.columnResizing.destroy(),e.columnResizing=null)},_initializeRowResizing:function(){s.ui.editor.RowResizing.create(this)},_destroyRowResizing:function(){var e=this;e.rowResizing&&(e.rowResizing.destroy(),e.rowResizing=null)},_wrapTextarea:function(){var t=this,i=t.element,n=i[0].style.width,o=i[0].style.height,r=_.editorWrapperTemplate,s=e(r).insertBefore(i).width(n).height(o),a=s.find(".k-editable-area");i.attr("autocomplete","off").appendTo(a).addClass("k-content k-raw-content").css("display","none"),t.textarea=i,t.wrapper=s},_createContentElement:function(t){var i,n,o,r=this,a=r.textarea,l=r.options.domain,u=l||document.domain,h="",p='javascript:""';return a.hide(),i=e("<iframe />",{title:r.options.messages.editAreaTitle,frameBorder:"0"})[0],e(i).css("display","").addClass("k-content").attr("tabindex",a[0].tabIndex).insertBefore(a),(l||u!=location.hostname)&&(h='<script>document.domain="'+u+'"</script>',p="javascript:document.write('"+h+"')",i.src=p),n=i.contentWindow||i,o=n.document||i.contentDocument,e(i).one("load",function(){r.toolbar.decorateFrom(o.body)}),o.open(),o.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;height:100%;min-height:100%;}body{box-sizing:border-box;font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:5px .4em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+(s.support.isRtl(a)?"direction:rtl;":"")+(d.msie||d.edge||d.chrome?"height:auto;":"")+(c.ios?"word-break:break-all;":"")+"}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table p{margin:0;padding:0;}.k-column-resize-handle-wrapper {position: absolute; height: 10px; width:10px; cursor: col-resize; z-index: 2;}.k-column-resize-handle {width: 100%; height: 100%;}.k-column-resize-handle > .k-column-resize-marker {width:2px; height:100%; margin:0 auto; background-color:#00b0ff; display:none; opacity:0.8;}.k-row-resize-handle-wrapper {position: absolute; cursor: row-resize; z-index:2; width: 10px; height: 10px;}.k-row-resize-handle {display: table; width: 100%; height: 100%;}.k-row-resize-marker-wrapper{display: table-cell; height:100%; width:100%; margin:0; padding:0; vertical-align: middle;}.k-row-resize-marker{margin: 0; padding:0; width:100%; height:2px; background-color: #00b0ff; opacity:0.8; display:none;}.k-table-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-table-resize-handle {width: 100%; height: 100%;}.k-table-resize-handle.k-resize-east{cursor:e-resize;}.k-table-resize-handle.k-resize-north{cursor:n-resize;}.k-table-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-table-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-table-resize-handle.k-resize-south{cursor:s-resize;}.k-table-resize-handle.k-resize-southeast{cursor:se-resize;}.k-table-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-table-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-table-resizing{opacity:0.6;}k\\:script{display:none;}</style>"+h+e.map(t,function(e){return"<link rel='stylesheet' href='"+e+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),o.close(),n},_blur:function(){var e=this.textarea,t=e?e.val():this._oldValue,i=this.options.encoded?this.encodedValue():this.value();this.update(),e&&e.trigger("blur"),i!=t&&(this.trigger("change"),e&&e.trigger("change"))},_spellCorrect:function(e){var i,n=!1;this._registerHandler(e.body,{contextmenu:function(){e.one("select",function(){i=null}),e._spellCorrectTimeout=setTimeout(function(){i=new s.ui.editor.RestorePoint(e.getRange(),e.body),n=!1},10)},input:function(){if(i)return s.support.browser.mozilla&&!n?(n=!0,t):(s.ui.editor._finishUpdate(e,i),t)}})},_registerHandler:function(t,i,n){var o,r,a,l=this,c=".kendoEditor";if(t=e(t),this._handlers||(this._handlers=[]),t.length)if(e.isPlainObject(i))for(a in i)i.hasOwnProperty(a)&&this._registerHandler(t,a,i[a]);else for(o=s.applyEventMap(i).split(" "),r=0;r<o.length;r++)l._handlers.push({element:t,type:o[r]+c,handler:n}),t.on(o[r]+c,n)},_deregisterHandlers:function(){var e,t,i=this._handlers;for(e=0;e<i.length;e++)t=i[e],t.element.off(t.type,t.handler);this._handlers=[]},_initializeContentElement:function(){var i,n,o,r,a,l=this;l.textarea?(l.window=l._createContentElement(l.options.stylesheets),i=l.document=l.window.contentDocument||l.window.document,i.body||(r=i.createElement("body"),r.setAttribute("contenteditable","true"),r.setAttribute("autocorrect","off"),i.getElementsByTagName("html")[0].appendChild(r),a=setInterval(function(){e(l.document).find("body").length>1&&(e(l.document).find("body:last").remove(),window.clearInterval(a))},10)),l.body=i.body,n=l.window,o=i,this._registerHandler(i,"mouseup",h(this._mouseup,this))):(l.window=window,i=l.document=document,l.body=l.element[0],n=l.body,o=l.body,l.toolbar.decorateFrom(l.body)),this._registerHandler(n,"blur",h(this._blur,this)),l._registerHandler(o,"down",h(l._mousedown,l));try{i.execCommand("enableInlineTableEditing",null,!1)}catch(c){}s.support.touch&&this._registerHandler(i,{keydown:function(){s._activeElement()!=i.body&&l.window.focus()}}),this._spellCorrect(l),this._registerHandler(l.body,{keydown:function(e){var i,n,o,r,s,a,c,d,u,p;return(e.keyCode!==f.BACKSPACE&&e.keyCode!==f.DELETE||"true"===l.body.getAttribute("contenteditable"))&&(e.keyCode===f.F10?(setTimeout(h(l.toolbar.focus,l.toolbar),100),l.toolbar.preventPopupHide=!0,e.preventDefault(),t):(e.keyCode!=f.LEFT&&e.keyCode!=f.RIGHT||(i=l.getRange(),n=e.keyCode==f.LEFT,o=i[n?"startContainer":"endContainer"],r=i[n?"startOffset":"endOffset"],s=n?-1:1,a=r+s,c=n?a:r,3==o.nodeType&&"\ufeff"==o.nodeValue[c]&&(i.setStart(o,a),i.collapse(!0),l.selectRange(i))),d=l.toolbar.tools,u=l.keyboard.toolFromShortcut(d,e),p=u?d[u].options:{},u&&!p.keyPressCommand?(e.preventDefault(),/^(undo|redo)$/.test(u)||l.keyboard.endTyping(!0),l.trigger("keydown",e),l.exec(u),l._runPostContentKeyCommands(e),!1):(l.keyboard.clearTimeout(),l.keyboard.keydown(e),t)))},keypress:function(e){setTimeout(function(){l._runPostContentKeyCommands(e),l._showTableResizeHandles()},0)},keyup:function(t){var i=[f.BACKSPACE,f.TAB,f.PAGEUP,f.PAGEDOWN,f.END,f.HOME,f.LEFT,f.UP,f.RIGHT,f.DOWN,f.INSERT,f.DELETE];(e.inArray(t.keyCode,i)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&l._selectionChange(),l.keyboard.keyup(t)},click:function(e){var t,i=s.ui.editor.Dom;"img"===i.name(e.target)&&(t=l.createRange(),t.selectNode(e.target),l.selectRange(t))},"cut copy paste drop dragover":function(e){l.clipboard["on"+e.type](e)},focusin:function(){l.body.hasAttribute("contenteditable")&&(e(this).addClass("k-state-active"),l.toolbar.show())},focusout:function(){setTimeout(function(){var t,i=s._activeElement(),n=l.body,o=l.toolbar;o.options.popup&&(t=o.window.element.get(0),t&&!e.contains(t,i)&&t!=i&&(o.preventPopupHide=!1)),i==n||e.contains(n,i)||e(i).is(".k-editortoolbar-dragHandle")||o.focused()||(e(n).removeClass("k-state-active"),o.hide())},10)}}),l._initializeColumnResizing(),l._initializeRowResizing(),l._initializeTableResizing()},_initializeImmutables:function(){var e=this,t=s.ui.editor;e.options.immutables&&(e.immutables=new t.Immutables(e))},_mousedown:function(t){var i,n=this;n._selectionStarted=!0,e(n.body).parents(".k-window").length&&t.stopPropagation(),d.gecko||(i=e(t.target),(2==t.which||1==t.which&&t.ctrlKey)&&i.is("a[href]")&&window.open(i.attr("href"),"_new"))},_mouseup:function(t){var i=this;s.support.mobileOS.ios&&t&&e(t.target).is(g)||i._selectionStarted&&setTimeout(function(){i._selectionChange()},1)},_runPostContentKeyCommands:function(e){var t,i,n,o,r=this.getRange(),s=this.keyboard.toolsFromShortcut(this.toolbar.tools,e);for(t=0;t<s.length;t++)i=s[t],n=i.options,n.keyPressCommand&&(o=new n.command({range:r}),o.changesContent()&&(this.keyboard.endTyping(!0),this.exec(i.name)))},refresh:function(){var e,t=this;t.textarea&&(t._destroyResizings(),e=t.value(),t.textarea.val(e),t.wrapper.find("iframe").remove(),t._initializeContentElement(t),t.value(e))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:b,formats:{},encoded:!0,domain:null,resizable:!1,deserialization:{custom:null},serialization:{entities:!0,semantic:!0,scripts:!1},pasteCleanup:{all:!1,css:!1,custom:null,keepNewLines:!1,msAllFormatting:!1,msConvertLists:!0,msTags:!0,none:!1,span:!1},stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},imageBrowser:null,fileBrowser:null,fontName:[{text:"Arial",value:"Arial, Helvetica, sans-serif"},{text:"Courier New",value:'"Courier New", Courier, monospace'},{text:"Georgia",value:"Georgia, serif"},{text:"Impact",value:"Impact, Charcoal, sans-serif"},{text:"Lucida Console",value:'"Lucida Console", Monaco, monospace'},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif"},{text:"Times New Roman",value:'"Times New Roman", Times,serif'},{text:"Trebuchet MS",value:'"Trebuchet MS", Helvetica, sans-serif'},{text:"Verdana",value:"Verdana, Geneva, sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"
},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:[].concat.call(["formatting"],y.basic,y.alignment,y.lists,y.indenting,y.links,["insertImage"],y.tables)},destroy:function(){var e=this;l.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),e._destroyUploadWidget(),e._destroyResizings(),s.destroy(this.wrapper)},_destroyResizings:function(){var e=this;e._destroyTableResizing(),s.ui.editor.TableResizing.dispose(e),e._destroyRowResizing(),s.ui.editor.RowResizing.dispose(e),e._destroyColumnResizing(),s.ui.editor.ColumnResizing.dispose(e)},_focusOutside:function(){if(s.support.browser.msie&&this.textarea){var t=e("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).focus();t.blur().remove()}},_destroyUploadWidget:function(){var e=this;e._uploadWidget&&(e._uploadWidget.destroy(),e._uploadWidget=null)},state:function(e){var t,i,n=k.defaultTools[e],o=n&&(n.options.finder||n.finder),r=s.ui.editor.RangeUtils;return!!o&&(t=this.getRange(),i=r.textNodes(t),!i.length&&t.collapsed&&(i=[t.startContainer]),o.getFormat?o.getFormat(i):o.isFormatted(i))},value:function(e){var i=this.body,n=s.ui.editor,o=this.options,r=n.Serializer.domToXhtml(i,o.serialization);return e===t?r:(e!=r&&(n.Serializer.htmlToDom(e,i,o.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools()),t)},saveSelection:function(t){t=t||this.getRange();var i=t.commonAncestorContainer,n=this.body;(i==n||e.contains(n,i))&&(this.selectionRestorePoint=new s.ui.editor.RestorePoint(t,n))},_focusBody:function(){var e,t=this.body,i=this.wrapper&&this.wrapper.find("iframe")[0],n=this.document.documentElement,o=s._activeElement();i?o!=t&&o!=i&&(e=n.scrollTop,t.focus(),n.scrollTop=e):(e=t.scrollTop,t.focus(),t.scrollTop=e)},restoreSelection:function(){this._focusBody(),this.selectionRestorePoint&&this.selectRange(this.selectionRestorePoint.toRange())},focus:function(){this.restoreSelection()},update:function(e){e=e||this.options.encoded?this.encodedValue():this.value(),this.textarea?this.textarea.val(e):this._oldValue=e},encodedValue:function(){return s.ui.editor.Dom.encode(this.value())},createRange:function(e){return s.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return s.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(e){this._focusBody();var t=this.getSelection();t.removeAllRanges(),t.addRange(e),this.saveSelection(e)},getRange:function(){var e=this.getSelection(),t=e&&e.rangeCount>0?e.getRangeAt(0):this.createRange(),i=this.document;return t.startContainer!=i||t.endContainer!=i||t.startOffset||t.endOffset||(t.setStart(this.body,0),t.collapse(!0)),t},_containsRange:function(e){var t=s.ui.editor.Dom,i=this.body;return e&&t.isAncestorOrSelf(i,e.startContainer)&&t.isAncestorOrSelf(i,e.endContainer)},_deleteSavedRange:function(){"_range"in this&&delete this._range},selectedHtml:function(){return s.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,i){this.focus();var n=new s.ui.editor.InsertHtmlCommand(e.extend({range:this.getRange(),html:t},i));n.editor=this,n.exec()},exec:function(e,i){var n,o,r,s,a=this,l=null;if(!e)throw Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==a.body.getAttribute("contenteditable")&&"print"!==e&&"pdf"!==e&&"exportAs"!==e)return!1;if(e=e.toLowerCase(),a.keyboard.isTypingInProgress()||(a._focusBody(),a.selectRange(a._range||a.getRange())),o=a.toolbar.toolById(e),!o)for(s in k.defaultTools)if(s.toLowerCase()==e){o=k.defaultTools[s];break}if(o){if(n=a.getRange(),o.command&&(l=o.command(u({range:n,body:a.body,immutables:!!a.immutables},i))),r=a.trigger("execute",{name:e,command:l}))return;if(/^(undo|redo)$/i.test(e))a.undoRedoStack[e]();else if(l&&(a.execCommand(l),l.async))return l.change=h(a._selectionChange,a),t;a._selectionChange()}},execCommand:function(e){e.managesUndoRedo||this.undoRedoStack.push(e),e.editor=this,e.exec()}});k.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},s.ui.plugin(k),i=a.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title}),e.children(".k-tool-text").html(t.title)},command:function(e){return new this.options.command(e)},update:e.noop}),i.exec=function(e,t,i){e.exec(t,{value:i})},_.registerTool("separator",new i({template:new v({template:_.separatorTemplate})})),n=d.msie&&d.version<9?"\ufeff":"",o="\ufeff",r=o,(d.msie||d.edge)&&(r=o="&nbsp;"),u(s.ui,{editor:{ToolTemplate:v,EditorUtils:_,Tool:i,_bomFill:n,emptyElementContent:o,emptyTableCellContent:r}}),s.PDFMixin&&(s.PDFMixin.extend(k.prototype),k.prototype._drawPDF=function(){return s.drawing.drawDOM(this.body,this.options.pdf)},k.prototype.saveAsPDF=function(){var t,i=new e.Deferred,n=i.promise(),o={promise:n};if(!this.trigger("pdfExport",o))return t=this.options.pdf,this._drawPDF(i).then(function(e){return s.drawing.exportPDF(e,t)}).done(function(e){s.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,proxyTarget:t.proxyTarget,forceProxy:t.forceProxy}),i.resolve()}).fail(function(e){i.reject(e)}),n})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/dom.min",["editor/main.min"],e)}(function(){!function(e){function t(e){var t,i,n={};for(t=0,i=e.length;t<i;t++)n[e[t]]=!0;return n}var i,n,o,r,s,a,l,c,d,u,h,p=window.kendo,f=e.map,m=e.extend,g=p.support.browser,v="style",_="float",b="cssFloat",w="styleFloat",y="class",k="k-marker",x=t("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),C="p,div,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(","),S=C.concat(["ul","ol","li"]),T=t(S),D=t("area,base,br,col,command,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr".split(",")),A="span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(","),E=t(A),I=t("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),M=function(e){1==e.nodeType&&e.normalize()};g.msie&&g.version>=8&&(M=function(e){if(1==e.nodeType&&e.firstChild)for(var t=e.firstChild,i=t;;){if(i=i.nextSibling,!i)break;3==i.nodeType&&3==t.nodeType&&(i.nodeValue=t.nodeValue+i.nodeValue,h.remove(t)),t=i}}),i=/^\s+$/,n=/^[\n\r\t]+$/,o=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,r=/\ufeff/g,s=/^(\s+|\ufeff)$/,l="color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","),c=/[<>\&]/g,d=/[\u00A0-\u2666<>\&]/g,u={34:"quot",38:"amp",39:"apos",60:"lt",62:"gt",160:"nbsp",161:"iexcl",162:"cent",163:"pound",164:"curren",165:"yen",166:"brvbar",167:"sect",168:"uml",169:"copy",170:"ordf",171:"laquo",172:"not",173:"shy",174:"reg",175:"macr",176:"deg",177:"plusmn",178:"sup2",179:"sup3",180:"acute",181:"micro",182:"para",183:"middot",184:"cedil",185:"sup1",186:"ordm",187:"raquo",188:"frac14",189:"frac12",190:"frac34",191:"iquest",192:"Agrave",193:"Aacute",194:"Acirc",195:"Atilde",196:"Auml",197:"Aring",198:"AElig",199:"Ccedil",200:"Egrave",201:"Eacute",202:"Ecirc",203:"Euml",204:"Igrave",205:"Iacute",206:"Icirc",207:"Iuml",208:"ETH",209:"Ntilde",210:"Ograve",211:"Oacute",212:"Ocirc",213:"Otilde",214:"Ouml",215:"times",216:"Oslash",217:"Ugrave",218:"Uacute",219:"Ucirc",220:"Uuml",221:"Yacute",222:"THORN",223:"szlig",224:"agrave",225:"aacute",226:"acirc",227:"atilde",228:"auml",229:"aring",230:"aelig",231:"ccedil",232:"egrave",233:"eacute",234:"ecirc",235:"euml",236:"igrave",237:"iacute",238:"icirc",239:"iuml",240:"eth",241:"ntilde",242:"ograve",243:"oacute",244:"ocirc",245:"otilde",246:"ouml",247:"divide",248:"oslash",249:"ugrave",250:"uacute",251:"ucirc",252:"uuml",253:"yacute",254:"thorn",255:"yuml",402:"fnof",913:"Alpha",914:"Beta",915:"Gamma",916:"Delta",917:"Epsilon",918:"Zeta",919:"Eta",920:"Theta",921:"Iota",922:"Kappa",923:"Lambda",924:"Mu",925:"Nu",926:"Xi",927:"Omicron",928:"Pi",929:"Rho",931:"Sigma",932:"Tau",933:"Upsilon",934:"Phi",935:"Chi",936:"Psi",937:"Omega",945:"alpha",946:"beta",947:"gamma",948:"delta",949:"epsilon",950:"zeta",951:"eta",952:"theta",953:"iota",954:"kappa",955:"lambda",956:"mu",957:"nu",958:"xi",959:"omicron",960:"pi",961:"rho",962:"sigmaf",963:"sigma",964:"tau",965:"upsilon",966:"phi",967:"chi",968:"psi",969:"omega",977:"thetasym",978:"upsih",982:"piv",8226:"bull",8230:"hellip",8242:"prime",8243:"Prime",8254:"oline",8260:"frasl",8472:"weierp",8465:"image",8476:"real",8482:"trade",8501:"alefsym",8592:"larr",8593:"uarr",8594:"rarr",8595:"darr",8596:"harr",8629:"crarr",8656:"lArr",8657:"uArr",8658:"rArr",8659:"dArr",8660:"hArr",8704:"forall",8706:"part",8707:"exist",8709:"empty",8711:"nabla",8712:"isin",8713:"notin",8715:"ni",8719:"prod",8721:"sum",8722:"minus",8727:"lowast",8730:"radic",8733:"prop",8734:"infin",8736:"ang",8743:"and",8744:"or",8745:"cap",8746:"cup",8747:"int",8756:"there4",8764:"sim",8773:"cong",8776:"asymp",8800:"ne",8801:"equiv",8804:"le",8805:"ge",8834:"sub",8835:"sup",8836:"nsub",8838:"sube",8839:"supe",8853:"oplus",8855:"otimes",8869:"perp",8901:"sdot",8968:"lceil",8969:"rceil",8970:"lfloor",8971:"rfloor",9001:"lang",9002:"rang",9674:"loz",9824:"spades",9827:"clubs",9829:"hearts",9830:"diams",338:"OElig",339:"oelig",352:"Scaron",353:"scaron",376:"Yuml",710:"circ",732:"tilde",8194:"ensp",8195:"emsp",8201:"thinsp",8204:"zwnj",8205:"zwj",8206:"lrm",8207:"rlm",8211:"ndash",8212:"mdash",8216:"lsquo",8217:"rsquo",8218:"sbquo",8220:"ldquo",8221:"rdquo",8222:"bdquo",8224:"dagger",8225:"Dagger",8240:"permil",8249:"lsaquo",8250:"rsaquo",8364:"euro"},h={block:T,inline:E,findNodeIndex:function(e,t){var i=0;if(!e)return-1;for(;;){if(e=e.previousSibling,!e)break;t&&3==e.nodeType||i++}return i},isDataNode:function(e){return e&&null!==e.nodeValue&&null!==e.data},isAncestorOf:function(t,i){try{return!h.isDataNode(t)&&(e.contains(t,h.isDataNode(i)?i.parentNode:i)||i.parentNode==t)}catch(n){return!1}},isAncestorOrSelf:function(e,t){return h.isAncestorOf(e,t)||e==t},findClosestAncestor:function(e,t){if(h.isAncestorOf(e,t))for(;t&&t.parentNode!=e;)t=t.parentNode;return t},getAllComments:function(e){for(var t=[],i=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,function(){return NodeFilter.FILTER_ACCEPT},!1),n=i.nextNode();n;)t.push(n.nodeValue),n=i.nextNode();return t},getNodeLength:function(e){return h.isDataNode(e)?e.length:e.childNodes.length},splitDataNode:function(e,t){for(var i,n=e.cloneNode(!1),o="",r=e.nextSibling;r&&3==r.nodeType&&r.nodeValue;)o+=r.nodeValue,i=r,r=r.nextSibling,h.remove(i);e.deleteData(t,e.length),n.deleteData(0,t),n.nodeValue+=o,h.insertAfter(n,e)},attrEquals:function(e,t){var i,n;for(i in t)if(n=e[i],i==_&&(n=e[p.support.cssFloat?b:w]),"object"==typeof n){if(!h.attrEquals(n,t[i]))return!1}else if(n!=t[i])return!1;return!0},blockParentOrBody:function(e){return h.parentOfType(e,S)||e.ownerDocument.body},blockParents:function(t){var i,n,o,r=[];for(i=0,n=t.length;i<n;i++)o=h.parentOfType(t[i],h.blockElements),o&&e.inArray(o,r)<0&&r.push(o);return r},windowFromDocument:function(e){return e.defaultView||e.parentWindow},normalize:M,blockElements:S,nonListBlockElements:C,inlineElements:A,empty:x,fillAttrs:I,nodeTypes:{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},toHex:function(e){var t=o.exec(e);return t?"#"+f(t.slice(1),function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}).join(""):e},encode:function(e,t){var i=!t||t.entities?d:c;return e.replace(i,function(e){var t=e.charCodeAt(0),i=u[t];return i?"&"+i+";":e})},isBom:function(e){return e&&3===e.nodeType&&/^[\ufeff]+$/.test(e.nodeValue)},stripBom:function(e){return(e||"").replace(r,"")},stripBomNode:function(e){h.isBom(e)&&e.parentNode.removeChild(e)},insignificant:function(e){var t=e.attributes;return"k-marker"==e.className||h.is(e,"br")&&("k-br"==e.className||t._moz_dirty||t._moz_editor_bogus_node)},tableCell:function(e){return h.is(e,"td")||h.is(e,"th")},significantNodes:function(t){return e.grep(t,function(e){var t=h.name(e);return"br"!=t&&(!h.insignificant(e)&&(!h.emptyTextNode(e)&&!(1==e.nodeType&&!x[t]&&h.emptyNode(e))))})},emptyTextNode:function(e){return e&&3==e.nodeType&&s.test(e.nodeValue)},emptyNode:function(e){return 1==e.nodeType&&!h.significantNodes(e.childNodes).length},name:function(e){return e.nodeName.toLowerCase()},significantChildNodes:function(t){return e.grep(t.childNodes,function(e){return 3!=e.nodeType||!h.isWhitespace(e)})},lastTextNode:function(e){var t,i=null;if(3==e.nodeType)return e;for(t=e.lastChild;t;t=t.previousSibling)if(i=h.lastTextNode(t))return i;return i},is:function(e,t){return e&&h.name(e)==t},isMarker:function(e){return e.className==k},isWhitespace:function(e){return i.test(e.nodeValue)},allWhitespaceContent:function(e){for(var t=e.firstChild;t&&h.isWhitespace(t);)t=t.nextSibling;return!t},isEmptyspace:function(e){return n.test(e.nodeValue)},htmlIndentSpace:function(t){var i,o,s,a,l,c;return!(!h.isDataNode(t)||!h.isWhitespace(t))&&(!!n.test(t.nodeValue)||(i=function(e,t){for(;e[t];)if(e=e[t],h.significantNodes([e]).length>0)return e},o=t.parentNode,s=i(t,"previousSibling"),a=i(t,"nextSibling"),r.test(t.nodeValue)?!(!s&&!a):!!e(o).is("tr,tbody,thead,tfoot,table,ol,ul")||!!((h.isBlock(o)||h.is(o,"body"))&&(l=s&&h.isBlock(s),c=a&&h.isBlock(a),!a&&l||!s&&c||l&&c))))},isBlock:function(e){return T[h.name(e)]},isSelfClosing:function(e){return D[h.name(e)]},isEmpty:function(e){return x[h.name(e)]},isInline:function(e){return E[h.name(e)]},isBr:function(e){return"br"==h.name(e)},list:function(e){var t=e?h.name(e):"";return"ul"==t||"ol"==t||"dl"==t},scrollContainer:function(e){var t=h.windowFromDocument(e),i=(t.contentWindow||t).document||t.ownerDocument||t;return i="BackCompat"==i.compatMode?i.body:i.scrollingElement||i.documentElement},scrollTo:function(t,i){var n,o,r,s,a=t.ownerDocument,l=h.windowFromDocument(a),c=l.innerHeight,d=h.scrollContainer(a);h.isDataNode(t)?i?(s=h.create(a,"span",{innerHTML:"&#xfeff;"}),h.insertBefore(s,t),n=e(s)):n=e(t.parentNode):n=e(t),o=n.offset().top,r=n[0].offsetHeight,!i&&r||(r=parseInt(n.css("line-height"),10)||Math.ceil(1.2*parseInt(n.css("font-size"),10))||15),s&&h.remove(s),r+o>d.scrollTop+c&&(d.scrollTop=r+o-c)},persistScrollTop:function(e){a=h.scrollContainer(e).scrollTop},offset:function(e,t){for(var i={top:e.offsetTop,left:e.offsetLeft},n=e.offsetParent;n&&(!t||h.isAncestorOf(t,n));)i.top+=n.offsetTop,i.left+=n.offsetLeft,n=n.offsetParent;return i},restoreScrollTop:function(e){"number"==typeof a&&(h.scrollContainer(e).scrollTop=a)},insertAt:function(e,t,i){e.insertBefore(t,e.childNodes[i]||null)},insertBefore:function(e,t){return t.parentNode?t.parentNode.insertBefore(e,t):t},insertAfter:function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},remove:function(e){e.parentNode&&e.parentNode.removeChild(e)},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},removeTextSiblings:function(e){for(var t=e.parentNode;e.nextSibling&&3==e.nextSibling.nodeType;)t.removeChild(e.nextSibling);for(;e.previousSibling&&3==e.previousSibling.nodeType;)t.removeChild(e.previousSibling)},trim:function(e){var t,i;for(t=e.childNodes.length-1;t>=0;t--)i=e.childNodes[t],h.isDataNode(i)?h.stripBom(i.nodeValue).length||h.remove(i):i.className!=k&&(h.trim(i),(!h.isEmpty(i)&&0===i.childNodes.length||h.isBlock(i)&&h.allWhitespaceContent(i))&&h.remove(i));return e},closest:function(e,t){for(;e&&h.name(e)!=t;)e=e.parentNode;return e},closestBy:function(e,t,i){for(;e&&!t(e);){if(i&&i(e))return null;e=e.parentNode}return e},sibling:function(e,t){do e=e[t];while(e&&1!=e.nodeType);return e},next:function(e){return h.sibling(e,"nextSibling")},prev:function(e){return h.sibling(e,"previousSibling")},parentOfType:function(e,t){do e=e.parentNode;while(e&&!h.ofType(e,t));return e},ofType:function(t,i){return e.inArray(h.name(t),i)>=0},changeTag:function(e,t,i){var n,o,r,s,a,l=h.create(e.ownerDocument,t),c=e.attributes;if(!i)for(n=0,o=c.length;n<o;n++)a=c[n],a.specified&&(r=a.nodeName,s=a.nodeValue,r==y?l.className=s:r==v?l.style.cssText=e.style.cssText:l.setAttribute(r,s));for(;e.firstChild;)l.appendChild(e.firstChild);return h.insertBefore(l,e),h.remove(e),l},editableParent:function(e){for(;e&&(3==e.nodeType||"true"!==e.contentEditable);)e=e.parentNode;return e},wrap:function(e,t){return h.insertBefore(t,e),t.appendChild(e),t},unwrap:function(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)},wrapper:function(t){var i=h.closestBy(t,function(e){return e.parentNode&&h.significantNodes(e.parentNode.childNodes).length>1});return e(i).is("body,.k-editor")?void 0:i},create:function(e,t,i){return h.attr(e.createElement(t),i)},createEmptyNode:function(e,t,i){var n=h.attr(e.createElement(t),i);return n.innerHTML="\ufeff",n},attr:function(e,t){t=m({},t),t&&v in t&&(h.style(e,t.style),delete t.style);for(var i in t)null===t[i]?(e.removeAttribute(i),delete t[i]):"className"==i&&(e[i]=t[i]);return m(e,t)},style:function(t,i){e(t).css(i||{})},unstyle:function(e,t){for(var i in t)i==_&&(i=p.support.cssFloat?b:w),e.style[i]="";""===e.style.cssText&&e.removeAttribute(v)},inlineStyle:function(t,i,n){var o,r=e(h.create(t.ownerDocument,i,n));return t.appendChild(r[0]),o=f(l,function(e){return g.msie&&"line-height"==e&&"1px"==r.css(e)?"line-height:1.5":e+":"+r.css(e)}).join(";"),r.remove(),o},getEffectiveBackground:function(e){var t=e.css("background-color")||"";return t.indexOf("rgba(0, 0, 0, 0")<0&&"transparent"!==t?t:"html"===e[0].tagName.toLowerCase()?"Window":h.getEffectiveBackground(e.parent())},innerText:function(e){var t=e.innerHTML;return t=t.replace(/<!--(.|\s)*?-->/gi,""),t=t.replace(/<\/?[^>]+?\/?>/gm,"")},removeClass:function(t,i){var n,o,r=" "+t.className+" ",s=i.split(" ");for(n=0,o=s.length;n<o;n++)r=r.replace(" "+s[n]+" "," ");r=e.trim(r),r.length?t.className=r:t.removeAttribute(y)},commonAncestor:function(){var e,t,i,n,o,r=arguments.length,s=[],a=1/0,l=null;if(!r)return null;if(1==r)return arguments[0];for(e=0;e<r;e++){for(t=[],i=arguments[e];i;)t.push(i),i=i.parentNode;s.push(t.reverse()),a=Math.min(a,t.length)}if(1==r)return s[0][0];for(e=0;e<a;e++){for(n=s[0][e],o=1;o<r;o++)if(n!=s[o][e])return l;l=n}return l},closestSplittableParent:function(t){var i,n,o;return i=1==t.length?h.parentOfType(t[0],["ul","ol"]):h.commonAncestor.apply(null,t),i||(i=h.parentOfType(t[0],["p","td"])||t[0].ownerDocument.body),h.isInline(i)&&(i=h.blockParentOrBody(i)),n=f(t,h.editableParent),o=h.commonAncestor(n)[0],e.contains(i,o)&&(i=o),i},closestEditable:function(t,i){var n,o=h.editableParent(t);return n=h.ofType(t,i)?t:h.parentOfType(t,i),n&&o&&e.contains(n,o)?n=o:!n&&o&&(n=o),n},closestEditableOfType:function(t,i){var n=h.closestEditable(t,i);if(n&&h.ofType(n,i)&&!e(n).is(".k-editor"))return n},filter:function(e,t,i){var n=function(t){return h.name(t)==e};return h.filterBy(t,n,i)},filterBy:function(e,t,i){for(var n,o=0,r=e.length,s=[];o<r;o++)n=t(e[o]),(n&&!i||!n&&i)&&s.push(e[o]);return s},ensureTrailingBreaks:function(t){var i=e(t).find("p,td,th"),n=i.length,o=0;if(n)for(;o<n;o++)h.ensureTrailingBreak(i[o]);else h.ensureTrailingBreak(t)},removeTrailingBreak:function(t){e(t).find("br[type=_moz],.k-br").remove()},ensureTrailingBreak:function(e){var t,i,n;h.removeTrailingBreak(e),t=e.lastChild,i=t&&h.name(t),(!i||"br"!=i&&"img"!=i||"br"==i&&"k-br"!=t.className)&&(n=e.ownerDocument.createElement("br"),n.className="k-br",e.appendChild(n))}},p.ui.editor.Dom=h}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/serializer.min",["editor/dom.min"],e)}(function(){!function(e,t){var i,n,o,r,s=window.kendo,a=s.ui.editor,l=a.Dom,c=e.extend,d="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),u=/"/g,h=/<br[^>]*>/i,p=/^\d+(\.\d*)?(px)?$/i,f=/<p>(?:&nbsp;)?<\/p>/i,m=/(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,g=/^sizzle-\d+/i,v=/^k-script-/i,_=/\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,b='<br class="k-br">',w=document.createElement("div");w.innerHTML=" <hr>",i=3===w.firstChild.nodeType,w=null,n=e.isFunction,o="td",r={toEditableHtml:function(e){return(e||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"<!--[CDATA[$1]]-->").replace(/<(\/?)script([^>]*)>/gi,"<$1k:script$2>").replace(/<img([^>]*)>/gi,function(e){return e.replace(_,"")}).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1").replace(/^<(table|blockquote)/i,b+"<$1").replace(/^[\s]*(&nbsp;|\u00a0)/i,"$1").replace(/<\/(table|blockquote)>$/i,"</$1>"+b)},_toEditableImmutables:function(t){for(var i=a.Immutables.immutable,n=l.emptyTextNode,o=t.firstChild,r=t.lastChild;n(o);)o=o.nextSibling;for(;n(r);)r=r.previousSibling;o&&i(o)&&e(b).prependTo(t),r&&i(r)&&e(b).appendTo(t)},_fillEmptyElements:function(t){e(t).find("p,td").each(function(){var t,i=e(this);if(/^\s*$/g.test(i.text())&&!i.find("img,input").length){for(t=this;t.firstChild&&3!=t.firstChild.nodeType;)t=t.firstChild;1!=t.nodeType||l.empty[l.name(t)]||(t.innerHTML=l.is(t,"td")?s.ui.editor.emptyTableCellContent:s.ui.editor.emptyElementContent)}})},_removeSystemElements:function(t){e(".k-paste-container",t).remove()},_resetOrderedLists:function(e){var t,i,n,o=e.getElementsByTagName("ol");for(t=0;t<o.length;t++)i=o[t],n=i.getAttribute("start"),i.setAttribute("start",1),n?i.setAttribute("start",n):i.removeAttribute(n)},_preventScriptExecution:function(t){e(t).find("*").each(function(){var e,t,i,n,o=this.attributes,r=[];for(t=0,i=o.length;t<i;t++)e=o[t],n=e.nodeName,e.specified&&/^on/i.test(n)&&(this.setAttribute("k-script-"+n,e.value),r.push(n));for(t=0,i=r.length;t<i;t++)this.removeAttribute(r[t])})},htmlToDom:function(t,i,o){var a=s.support.browser,c=a.msie,d=c&&a.version<9,u="originalsrc",h="originalhref",p=o||{},f=p.immutables;return t=r.toEditableHtml(t),d&&(t="<br/>"+t,t=t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,h+'="$1"'),t=t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,u+'="$1"')),n(p.custom)&&(t=p.custom(t)||t),i.innerHTML=t,f&&f.deserialize(i),d?(l.remove(i.firstChild),e(i).find("k\\:script,script,link,img,a").each(function(){var e=this;e[h]&&(e.setAttribute("href",e[h]),e.removeAttribute(h)),e[u]&&(e.setAttribute("src",e[u]),e.removeAttribute(u))})):c&&(l.normalize(i),r._resetOrderedLists(i)),r._preventScriptExecution(i),r._fillEmptyElements(i),r._removeSystemElements(i),r._toEditableImmutables(i),e("table",i).addClass("k-table"),i},domToXhtml:function(n,r){function c(t){return e.grep(t,function(e){return"style"!=e.name})}function _(e,t){E.push("<"+t),k(e),E.push(">")}function b(t){var i,n,o,r=e.trim,s=r(t),a=[];for(m.lastIndex=0;;){if(i=m.exec(s),!i)break;n=r(i[1].toLowerCase()),o=r(i[2]),"font-size-adjust"!=n&&"font-stretch"!=n&&(n.indexOf("color")>=0?o=l.toHex(o):n.indexOf("font")>=0?o=o.replace(u,"'"):/\burl\(/g.test(o)&&(o=o.replace(u,"")),a.push({property:n,value:o}))}return a}function w(e){var t,i=b(e);for(t=0;t<i.length;t++)E.push(i[t].property),E.push(":"),E.push(i[t].value),E.push(";")}function y(e){var t,i,n,o,s,a,c=[],d=e.attributes;for(i=0,n=d.length;i<n;i++)t=d[i],o=t.nodeName,s=t.value,a=t.specified,"value"==o&&"value"in e&&e.value?a=!0:"type"==o&&"text"==s?a=!0:"class"!=o||s?g.test(o)?a=!1:"complete"==o?a=!1:"altHtml"==o?a=!1:"start"==o&&l.is(e,"ul")?a=!1:"start"==o&&l.is(e,"ol")&&"1"==s?a=!1:o.indexOf("_moz")>=0?a=!1:v.test(o)?a=!!r.scripts:"data-role"==o&&"resizable"==s&&(l.is(e,"tr")||l.is(e,"td"))&&(a=!1):a=!1,a&&c.push(t);return c}function k(i,n){var o,r,a,c,d,u,h,f;if(n=n||y(i),l.is(i,"img")&&(u=i.style.width,h=i.style.height,f=e(i),u&&p.test(u)&&(f.attr("width",parseInt(u,10)),l.unstyle(i,{width:t})),h&&p.test(h)&&(f.attr("height",parseInt(h,10)),l.unstyle(i,{height:t}))),n.length)for(o=0,r=n.length;o<r;o++)a=n[o],c=a.nodeName,d=a.value,"class"==c&&"k-table"==d||(c=c.replace(v,""),E.push(" "),E.push(c),E.push('="'),"style"==c?w(d||i.style.cssText):E.push("src"==c||"href"==c?s.htmlEncode(i.getAttribute(c,2)):l.fillAttrs[c]?c:d),E.push('"'))}function x(e,t,i){for(var n=e.firstChild;n;n=n.nextSibling)T(n,t,i)}function C(e){return e.nodeValue.replace(/\ufeff/g,"")}function S(e){if(l.isBom(e)){do{if(e=e.parentNode,l.is(e,o)&&1===e.childNodes.length)return!0;if(1!==e.childNodes.length)return!1}while(!l.isBlock(e));return!0}return!1}function T(n,o,s){var c,d,u,h,p,f,m=n.nodeType;if(I&&a.Immutables.immutable(n))E.push(I.serialize(n));else if(1==m){if(c=l.name(n),f=e(n),f.hasClass("k-table-resize-handle-wrapper")||f.hasClass("k-column-resize-handle-wrapper")||f.hasClass("k-row-resize-handle-wrapper"))return;if(!c||l.insignificant(n))return;if(!r.scripts&&("script"==c||"k:script"==c))return;if(d=M[c],d&&(t===d.semantic||r.semantic^d.semantic))return d.start(n),x(n,!1,d.skipEncoding),d.end(n),t;E.push("<"),E.push(c),k(n),l.empty[c]?E.push(" />"):(E.push(">"),x(n,o||l.is(n,"pre")),E.push("</"),E.push(c),E.push(">"))}else if(3==m){if(S(n))return E.push("&nbsp;"),t;h=C(n),!o&&i&&(u=n.parentNode,p=n.previousSibling,p||(p=(l.isInline(u)?u:n).previousSibling),p&&""!==p.innerHTML&&!l.isBlock(p)||(h=h.replace(/^[\r\n\v\f\t ]+/,"")),h=h.replace(/ +/," ")),E.push(s?h:l.encode(h,r))}else 4==m?(E.push("<![CDATA["),E.push(n.data),E.push("]]>")):8==m&&(n.data.indexOf("[CDATA[")<0?(E.push("<!--"),E.push(n.data),E.push("-->")):(E.push("<!"),E.push(n.data),E.push(">")))}function D(e){var t=e.childNodes.length,i=t&&3==e.firstChild.nodeType;return i&&(1==t||2==t&&l.insignificant(e.lastChild))}function A(){e.isFunction(r.custom)&&(E=r.custom(E)||E)}var E=[],I=r&&r.immutables,M={iframe:{start:function(e){_(e,"iframe")},end:function(){E.push("</iframe>")}},"k:script":{start:function(e){_(e,"script")},end:function(){E.push("</script>")},skipEncoding:!0},span:{semantic:!0,start:function(t){var i,n,o=t.style,r=y(t),s=c(r);s.length&&(E.push("<span"),k(t,s),E.push(">")),"underline"==o.textDecoration&&E.push("<u>"),i=[],o.color&&i.push('color="'+l.toHex(o.color)+'"'),o.fontFamily&&i.push('face="'+o.fontFamily+'"'),o.fontSize&&(n=e.inArray(o.fontSize,d),i.push('size="'+n+'"')),i.length&&E.push("<font "+i.join(" ")+">")},end:function(e){var t=e.style;(t.color||t.fontFamily||t.fontSize)&&E.push("</font>"),"underline"==t.textDecoration&&E.push("</u>"),c(y(e)).length&&E.push("</span>")}},strong:{semantic:!0,start:function(e){_(e,"b")},end:function(){E.push("</b>")}},em:{semantic:!0,start:function(e){_(e,"i")},end:function(){E.push("</i>")}},b:{semantic:!1,start:function(e){_(e,"strong")},end:function(){E.push("</strong>")}},i:{semantic:!1,start:function(e){_(e,"em")},end:function(){E.push("</em>")}},u:{semantic:!1,start:function(t){var i,n,o;E.push("<span"),i=y(t),n=e(i).filter(function(e,t){return"style"==t.name})[0],o={nodeName:"style",value:"text-decoration:underline;"},n&&(o.value=n.value,/text-decoration/i.test(o.value)||(o.value="text-decoration:underline;"+o.value),i.splice(e.inArray(n,i),1)),i.push(o),k(t,i),E.push(">")},end:function(){E.push("</span>")}},font:{semantic:!1,start:function(e){var t,i,n;E.push('<span style="'),t=e.getAttribute("color"),i=d[e.getAttribute("size")],n=e.getAttribute("face"),t&&(E.push("color:"),E.push(l.toHex(t)),E.push(";")),n&&(E.push("font-family:"),E.push(n),E.push(";")),i&&(E.push("font-size:"),E.push(i),E.push(";")),E.push('">')},end:function(){E.push("</span>")}}};return M.script=M["k:script"],r=r||{},t===r.semantic&&(r.semantic=!0),D(n)?(E=l.encode(C(n.firstChild).replace(/[\r\n\v\f\t ]+/," "),r),A(),E):(x(n),E=E.join(""),A(),""===E.replace(h,"").replace(f,"")?"":E)}},c(a,{Serializer:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/components.min",["editor/serializer.min"],e)}(function(){!function(e,t){var i=window.kendo,n=i.ui.DropDownList,o=i.ui.editor.Dom,r=n.extend({init:function(t,o){var r=this;n.fn.init.call(r,t,o),i.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",e.proxy(this._initSelectOverlay,this))),r.text(r.options.title),r.element.attr("title",r.options.title),r.wrapper.attr("title",r.options.title),r.bind("open",function(){if(r.options.autoSize){var e,t=r.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e>0?e+=20:e=r._listWidth,t.css("width",e+i.support.scrollbar()),r._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,n,o,r,s=this,a=s.value(),l=this.dataSource.view(),c="",d=i.htmlEncode;for(n=0;n<l.length;n++)t=l[n],c+="<option value='"+d(t.value)+"'",t.value==a&&(c+=" selected"),c+=">"+d(t.text)+"</option>";o=e("<select class='k-select-overlay'>"+c+"</select>"),r=e(this.element).closest(".k-widget"),r.next(".k-select-overlay").remove(),o.insertAfter(r),o.on("change",function(){s.value(this.value),s.trigger("change")})},value:function(e){var i=this,o=n.fn.value.call(i,e);return e===t?o:(n.fn.value.call(i)||i.text(i.options.title),t)},decorate:function(t){var i,n,r,s,a=this,l=a.dataSource,c=l.data();for(t&&a.list.css("background-color",o.getEffectiveBackground(e(t))),i=0;i<c.length;i++)n=c[i].tag||"span",r=c[i].className,s=o.inlineStyle(t,n,{className:r}),s=s.replace(/"/g,"'"),c[i].style=s+";display:inline-block";l.trigger("change")}});i.ui.plugin(r),i.ui.editor.SelectBox=r}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/range.min",["editor/components.min"],e)}(function(){!function(e){function t(e,t,i,n){var o,r,s,a;if(e==t)return n-i;for(o=t;o&&o.parentNode!=e;)o=o.parentNode;if(o)return k(o)-i;for(o=e;o&&o.parentNode!=t;)o=o.parentNode;if(o)return n-k(o)-1;for(r=y.commonAncestor(e,t),s=e;s&&s.parentNode!=r;)s=s.parentNode;for(s||(s=r),a=t;a&&a.parentNode!=r;)a=a.parentNode;return a||(a=r),s==a?0:k(a)-k(s)}function i(e,i){function n(e){try{return t(e.startContainer,e.endContainer,e.startOffset,e.endOffset)<0}catch(i){return!0}}n(e)&&(i?(e.commonAncestorContainer=e.endContainer=e.startContainer,e.endOffset=e.startOffset):(e.commonAncestorContainer=e.startContainer=e.endContainer,e.startOffset=e.endOffset),e.collapsed=!0)}function n(e){e.collapsed=e.startContainer==e.endContainer&&e.startOffset==e.endOffset;for(var t=e.startContainer;t&&t!=e.endContainer&&!y.isAncestorOf(t,e.endContainer);)t=t.parentNode;e.commonAncestorContainer=t}function o(e){var t=e.duplicate(),i=e.duplicate();return t.collapse(!0),i.collapse(!1),y.commonAncestor(e.parentElement(),t.parentElement(),i.parentElement())}function r(e,t,i){var n,o=t[i?"startContainer":"endContainer"],r=t[i?"startOffset":"endOffset"],s=0,a=x(o),l=a?o:o.childNodes[r]||null,c=a?o.parentNode:o,d=t.ownerDocument,u=d.body.createTextRange();3!=o.nodeType&&4!=o.nodeType||(s=r),c||(c=d.body),"img"==c.nodeName.toLowerCase()?(u.moveToElementText(c),u.collapse(!1),e.setEndPoint(i?"StartToStart":"EndToStart",u)):(n=c.insertBefore(y.create(d,"a"),l),u.moveToElementText(n),y.remove(n),u[i?"moveStart":"moveEnd"]("character",s),
u.collapse(!1),e.setEndPoint(i?"StartToStart":"EndToStart",u))}function s(e,t,i,n){var o,r,s,a,l,c,d,u=y.create(t.ownerDocument,"a"),h=e.duplicate(),p=n?"StartToStart":"StartToEnd",f=!1;u.innerHTML="\ufeff",h.collapse(n),r=h.parentElement(),y.isAncestorOrSelf(i,r)||(r=i);do f?r.insertBefore(u,u.previousSibling):(r.appendChild(u),f=!0),h.moveToElementText(u);while((o=h.compareEndPoints(p,e))>0&&u.previousSibling);s=u.nextSibling,o==-1&&x(s)?(h.setEndPoint(n?"EndToStart":"EndToEnd",e),y.remove(u),c=[s,h.text.length]):(a=!n&&u.previousSibling,l=n&&u.nextSibling,x(l)?c=[l,0]:x(a)?c=[a,a.length]:(d=k(u),c=r.nextSibling&&d==r.childNodes.length-1?[r.nextSibling,0]:[r,d]),y.remove(u)),t[n?"setStart":"setEnd"].apply(t,c)}var a,l,c,d,u,h,p,f,m,g=window.kendo,v=g.Class,_=e.extend,b=g.ui.editor,w=g.support.browser,y=b.Dom,k=y.findNodeIndex,x=y.isDataNode,C=y.findClosestAncestor,S=y.getNodeLength,T=y.normalize,D={selectionFromWindow:function(e){return"getSelection"in e?e.getSelection():new l(e.document)},selectionFromRange:function(e){var t=m.documentFromRange(e);return D.selectionFromDocument(t)},selectionFromDocument:function(e){return D.selectionFromWindow(y.windowFromDocument(e))}},A=v.extend({init:function(t){e.extend(this,{ownerDocument:t,startContainer:t,endContainer:t,commonAncestorContainer:t,startOffset:0,endOffset:0,collapsed:!0})},setStart:function(e,t){this.startContainer=e,this.startOffset=t,n(this),i(this,!0)},setEnd:function(e,t){this.endContainer=e,this.endOffset=t,n(this),i(this,!1)},setStartBefore:function(e){this.setStart(e.parentNode,k(e))},setStartAfter:function(e){this.setStart(e.parentNode,k(e)+1)},setEndBefore:function(e){this.setEnd(e.parentNode,k(e))},setEndAfter:function(e){this.setEnd(e.parentNode,k(e)+1)},selectNode:function(e){this.setStartBefore(e),this.setEndAfter(e)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e[1===e.nodeType?"childNodes":"nodeValue"].length)},collapse:function(e){var t=this;e?t.setEnd(t.startContainer,t.startOffset):t.setStart(t.endContainer,t.endOffset)},deleteContents:function(){var e=this,t=e.cloneRange();e.startContainer!=e.commonAncestorContainer&&e.setStartAfter(C(e.commonAncestorContainer,e.startContainer)),e.collapse(!0),function i(e){for(;e.next();)e.hasPartialSubtree()?i(e.getSubtreeIterator()):e.remove()}(new a(t))},cloneContents:function(){var e=m.documentFromRange(this);return function t(i){for(var n,o=e.createDocumentFragment();n=i.next();)n=n.cloneNode(!i.hasPartialSubtree()),i.hasPartialSubtree()&&n.appendChild(t(i.getSubtreeIterator())),o.appendChild(n);return o}(new a(this))},extractContents:function(){var e,t=this,i=t.cloneRange();return t.startContainer!=t.commonAncestorContainer&&t.setStartAfter(C(t.commonAncestorContainer,t.startContainer)),t.collapse(!0),e=m.documentFromRange(t),function n(i){for(var o,r=e.createDocumentFragment();o=i.next();)i.hasPartialSubtree()?(o=o.cloneNode(!1),o.appendChild(n(i.getSubtreeIterator()))):i.remove(t.originalRange),r.appendChild(o);return r}(new a(i))},insertNode:function(e){var t=this;x(t.startContainer)?(t.startOffset!=t.startContainer.nodeValue.length&&y.splitDataNode(t.startContainer,t.startOffset),y.insertAfter(e,t.startContainer)):y.insertAt(t.startContainer,e,t.startOffset),t.setStart(t.startContainer,t.startOffset)},cloneRange:function(){return e.extend(new A(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var e=this.startContainer.nodeName,t=this.endContainer.nodeName;return("#text"==e?this.startContainer.nodeValue:e)+"("+this.startOffset+") : "+("#text"==t?this.endContainer.nodeValue:t)+"("+this.endOffset+")"}});A.fromNode=function(e){return new A(e.ownerDocument)},a=v.extend({init:function(t){if(e.extend(this,{range:t,_current:null,_next:null,_end:null}),!t.collapsed){var i=t.commonAncestorContainer;this._next=t.startContainer!=i||x(t.startContainer)?C(i,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=i||x(t.endContainer)?C(i,t.endContainer).nextSibling:t.endContainer.childNodes[t.endOffset]}},hasNext:function(){return!!this._next},next:function(){var e=this,t=e._current=e._next;return e._next=e._current&&e._current.nextSibling!=e._end?e._current.nextSibling:null,x(e._current)&&(e.range.endContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(e.range.endOffset,t.length-e.range.endOffset)),e.range.startContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(0,e.range.startOffset))),t},traverse:function(e){function t(){return n._current=n._next,n._next=n._current&&n._current.nextSibling!=n._end?n._current.nextSibling:null,n._current}for(var i,n=this;i=t();)n.hasPartialSubtree()?n.getSubtreeIterator().traverse(e):e(i);return i},remove:function(e){var t,i,n,o,r,s=this,a=s.range.startContainer==s._current,l=s.range.endContainer==s._current;x(s._current)&&(a||l)?(t=a?s.range.startOffset:0,i=l?s.range.endOffset:s._current.length,n=i-t,e&&(a||l)&&(s._current==e.startContainer&&t<=e.startOffset&&(e.startOffset-=n),s._current==e.endContainer&&i<=e.endOffset&&(e.endOffset-=n)),s._current.deleteData(t,n)):(o=s._current.parentNode,!e||s.range.startContainer!=o&&s.range.endContainer!=o||(r=k(s._current),o==e.startContainer&&r<=e.startOffset&&(e.startOffset-=1),o==e.endContainer&&r<e.endOffset&&(e.endOffset-=1)),y.remove(s._current))},hasPartialSubtree:function(){return!x(this._current)&&(y.isAncestorOrSelf(this._current,this.range.startContainer)||y.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){return new a(this.getSubRange())},getSubRange:function(){var e=this,t=e.range.cloneRange();return t.selectNodeContents(e._current),y.isAncestorOrSelf(e._current,e.range.startContainer)&&t.setStart(e.range.startContainer,e.range.startOffset),y.isAncestorOrSelf(e._current,e.range.endContainer)&&t.setEnd(e.range.endContainer,e.range.endOffset),t}}),l=v.extend({init:function(e){this.ownerDocument=e,this.rangeCount=1},addRange:function(e){var t=this.ownerDocument.body.createTextRange();r(t,e,!1),r(t,e,!0),t.select()},removeAllRanges:function(){var e=this.ownerDocument.selection;"None"!=e.type&&e.empty()},getRangeAt:function(){var e,t,i,n,r,a,l,c,d=new A(this.ownerDocument),u=this.ownerDocument.selection;try{if(e=u.createRange(),t=e.item?e.item(0):e.parentElement(),t.ownerDocument!=this.ownerDocument)return d}catch(h){return d}if("Control"==u.type)d.selectNode(e.item(0));else if(i=o(e),s(e,d,i,!0),s(e,d,i,!1),9==d.startContainer.nodeType&&d.setStart(d.endContainer,d.startOffset),9==d.endContainer.nodeType&&d.setEnd(d.startContainer,d.endOffset),0===e.compareEndPoints("StartToEnd",e)&&d.collapse(!1),n=d.startContainer,r=d.endContainer,a=this.ownerDocument.body,!(d.collapsed||0!==d.startOffset||d.endOffset!=S(d.endContainer)||n==r&&x(n)&&n.parentNode==a)){for(l=!1,c=!1;0===k(n)&&n==n.parentNode.firstChild&&n!=a;)n=n.parentNode,l=!0;for(;k(r)==S(r.parentNode)-1&&r==r.parentNode.lastChild&&r!=a;)r=r.parentNode,c=!0;n==a&&r==a&&l&&c&&(d.setStart(n,0),d.setEnd(r,S(a)))}return d}}),c=v.extend({init:function(e){this.enumerate=function(){function t(e){if(y.is(e,"img")||3==e.nodeType&&(!y.isEmptyspace(e)||"\ufeff"==e.nodeValue))i.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var i=[];return new a(e).traverse(t),i}}}),d=a.extend({hasPartialSubtree:function(){var e=b.Immutables&&b.Immutables.immutable;return e&&!e(this._current)&&a.fn.hasPartialSubtree.call(this)},getSubtreeIterator:function(){return new d(this.getSubRange())}}),u=v.extend({init:function(e){this.enumerate=function(){function t(e){if(n&&!n(e))if(y.is(e,"img")||3==e.nodeType&&(!y.isEmptyspace(e)||"\ufeff"==e.nodeValue))i.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var i=[],n=b.Immutables&&b.Immutables.immutable;return new d(e).traverse(t),i}}}),h=v.extend({init:function(e,t,i){var n=this;n.range=e,n.rootNode=m.documentFromRange(e),n.body=t||n.getEditable(e),"body"!=y.name(n.body)&&(n.rootNode=n.body),n.startContainer=n.nodeToPath(e.startContainer),n.endContainer=n.nodeToPath(e.endContainer),n.startOffset=n.offset(e.startContainer,e.startOffset),n.endOffset=n.offset(e.endContainer,e.endOffset),n.immutables=i&&i.immutables,n.immutables&&(n.serializedImmutables=b.Immutables.removeImmutables(n.body)),n.html=n.body.innerHTML,n.immutables&&!n.serializedImmutables.empty&&b.Immutables.restoreImmutables(n.body,n.serializedImmutables)},index:function(e){for(var t,i=0,n=e.nodeType;e=e.previousSibling;)t=e.nodeType,3==t&&n==t||i++,n=t;return i},getEditable:function(e){for(var t=e.commonAncestorContainer;t&&(3==t.nodeType||t.attributes&&(!t.attributes.contentEditable||"false"==t.attributes.contentEditable.nodeValue.toLowerCase()));)t=t.parentNode;return t},restoreHtml:function(){var e=this;y.removeChildren(e.body),e.body.innerHTML=e.html,e.immutables&&!e.serializedImmutables.empty&&b.Immutables.restoreImmutables(e.body,e.serializedImmutables)},offset:function(e,t){if(3==e.nodeType)for(;(e=e.previousSibling)&&3==e.nodeType;)t+=e.nodeValue.length;return t},nodeToPath:function(e){for(var t=[];e!=this.rootNode;)t.push(this.index(e)),e=e.parentNode;return t},toRangePoint:function(e,t,i,n){for(var o=this.rootNode,r=i.length,s=n;r--;)o=o.childNodes[i[r]];for(;o&&3==o.nodeType&&o.nodeValue.length<s;)s-=o.nodeValue.length,o=o.nextSibling;o&&s>=0&&e[t?"setStart":"setEnd"](o,s)},toRange:function(){var e=this,t=e.range.cloneRange();return e.toRangePoint(t,!0,e.startContainer,e.startOffset),e.toRangePoint(t,!1,e.endContainer,e.endOffset),t}}),p=v.extend({init:function(){this.caret=null},addCaret:function(e){var t=this,i=t.caret=y.create(m.documentFromRange(e),"span",{className:"k-marker"});return e.insertNode(i),y.stripBomNode(i.previousSibling),y.stripBomNode(i.nextSibling),e.selectNode(i),i},removeCaret:function(e){var t,i,n,o,r=this,s=r.caret.previousSibling,a=0;s&&(a=x(s)?s.nodeValue.length:k(s)),t=r.caret.parentNode,i=s?k(s):0,y.remove(r.caret),T(t),n=t.childNodes[i],x(n)?e.setStart(n,a):n?(o=y.lastTextNode(n),o?e.setStart(o,o.nodeValue.length):e[s?"setStartAfter":"setStartBefore"](n)):(w.msie||t.innerHTML||(t.innerHTML='<br _moz_dirty="" />'),e.selectNodeContents(t)),e.collapse(!0)},add:function(e,t){var i,n,o=this,r=e.collapsed&&!m.isExpandable(e),s=m.documentFromRange(e);return t&&e.collapsed&&(o.addCaret(e),e=m.expand(e)),i=e.cloneRange(),i.collapse(!1),o.end=y.create(s,"span",{className:"k-marker"}),i.insertNode(o.end),i=e.cloneRange(),i.collapse(!0),o.start=o.end.cloneNode(!0),i.insertNode(o.start),o._removeDeadMarkers(o.start,o.end),r&&(n=s.createTextNode("\ufeff"),y.insertAfter(n.cloneNode(),o.start),y.insertBefore(n,o.end)),T(e.commonAncestorContainer),e.setStartBefore(o.start),e.setEndAfter(o.end),e},_removeDeadMarkers:function(e,t){e.previousSibling&&"\ufeff"==e.previousSibling.nodeValue&&y.remove(e.previousSibling),t.nextSibling&&"\ufeff"==t.nextSibling.nodeValue&&y.remove(t.nextSibling)},_normalizedIndex:function(e){for(var t=k(e),i=e;i.previousSibling;)3==i.nodeType&&3==i.previousSibling.nodeType&&t--,i=i.previousSibling;return t},remove:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p=this,f=p.start,m=p.end;for(T(e.commonAncestorContainer);!f.nextSibling&&f.parentNode;)f=f.parentNode;for(;!m.previousSibling&&m.parentNode;)m=m.parentNode;if(t=f.previousSibling&&3==f.previousSibling.nodeType&&f.nextSibling&&3==f.nextSibling.nodeType,i=m.previousSibling&&3==m.previousSibling.nodeType&&m.nextSibling&&3==m.nextSibling.nodeType,n=t&&i,f=f.nextSibling,m=m.previousSibling,o=f===m&&y.isBom(f),o&&f.length>1&&(f.nodeValue=f.nodeValue.charAt(0)),r=o,s=!1,f==p.end&&(s=!!p.start.previousSibling,f=m=p.start.previousSibling||p.end.nextSibling,r=!0),y.remove(p.start),y.remove(p.end),!f||!m)return e.selectNodeContents(e.commonAncestorContainer),void e.collapse(!0);if(a=r?x(f)?f.nodeValue.length:f.childNodes.length:0,l=x(m)?m.nodeValue.length:m.childNodes.length,3==f.nodeType)for(;f.previousSibling&&3==f.previousSibling.nodeType;)f=f.previousSibling,a+=f.nodeValue.length;if(3==m.nodeType)for(;m.previousSibling&&3==m.previousSibling.nodeType;)m=m.previousSibling,l+=m.nodeValue.length;c=f.parentNode,d=m.parentNode,u=this._normalizedIndex(f),h=this._normalizedIndex(m),T(c),3==f.nodeType&&(f=c.childNodes[u]),T(d),3==m.nodeType&&(m=d.childNodes[h]),r?(3==f.nodeType?e.setStart(f,a):e[s?"setStartAfter":"setStartBefore"](f),e.collapse(!0)):(3==f.nodeType?e.setStart(f,a):e.setStartBefore(f),3==m.nodeType?e.setEnd(m,l):e.setEndAfter(m)),p.caret&&p.removeCaret(e)}}),f=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,m={nodes:function(e){var t=m.textNodes(e);return t.length||(e.selectNodeContents(e.commonAncestorContainer),t=m.textNodes(e),t.length||(t=y.significantChildNodes(e.commonAncestorContainer))),t},textNodes:function(e){return new c(e).enumerate()},editableTextNodes:function(e){var t=[],i=b.Immutables&&b.Immutables.immutableParent;return i&&!i(e.commonAncestorContainer)&&(t=new u(e).enumerate()),t},documentFromRange:function(e){var t=e.startContainer;return 9==t.nodeType?t:t.ownerDocument},createRange:function(e){return w.msie&&w.version<9?new A(e):e.createRange()},selectRange:function(e){var t,i=m.image(e);i&&(e.setStartAfter(i),e.setEndAfter(i)),t=D.selectionFromRange(e),t.removeAllRanges(),t.addRange(e)},stringify:function(e){return g.format("{0}:{1} - {2}:{3}",y.name(e.startContainer),e.startOffset,y.name(e.endContainer),e.endOffset)},split:function(e,t,i){function n(n){var o,r=e.cloneRange();r.collapse(n),r[n?"setStartBefore":"setEndAfter"](t),o=r.extractContents(),i&&(o=y.trim(o)),y[n?"insertBefore":"insertAfter"](o,t)}n(!0),n(!1)},mapAll:function(t,i){var n=[];return new a(t).traverse(function(t){var o=i(t);o&&e.inArray(o,n)<0&&n.push(o)}),n},getAll:function(e,t){var i=t;return"string"==typeof t&&(t=function(e){return y.is(e,i)}),m.mapAll(e,function(e){if(t(e))return e})},getMarkers:function(e){return m.getAll(e,function(e){return"k-marker"==e.className})},image:function(e){var t=m.getAll(e,"img");if(1==t.length)return t[0]},isStartOf:function(e,t){var i,n,o;if(0!==e.startOffset)return!1;for(i=e.cloneRange();0===i.startOffset&&i.startContainer!=t;){for(n=y.findNodeIndex(i.startContainer),o=i.startContainer.parentNode;n>0&&o[n-1]&&y.insignificant(o[n-1]);)n--;i.setStart(o,n)}return 0===i.startOffset&&i.startContainer==t},isEndOf:function(e,t){function i(e){y.insignificant(e)||y.isDataNode(e)&&/^[\ufeff]*$/.test(e.nodeValue)||o.push(e)}var n,o,r=e.cloneRange();return r.collapse(!1),n=r.startContainer,y.isDataNode(n)&&r.startOffset==y.getNodeLength(n)&&(r.setStart(n.parentNode,y.findNodeIndex(n)+1),r.collapse(!0)),r.setEnd(t,y.getNodeLength(t)),o=[],new a(r).traverse(i),!o.length},wrapSelectedElements:function(e){function t(e,t){var i,n=y.getNodeLength(t);if(e==n)return!0;for(i=e;i<n;i++)if(!y.insignificant(t.childNodes[i]))return!1;return!0}for(var i=y.editableParent(e.startContainer),n=y.editableParent(e.endContainer);0===e.startOffset&&e.startContainer!=i;)e.setStart(e.startContainer.parentNode,y.findNodeIndex(e.startContainer));for(;t(e.endOffset,e.endContainer)&&e.endContainer!=n;)e.setEnd(e.endContainer.parentNode,y.findNodeIndex(e.endContainer)+1);return e},expand:function(e){var t,i,n,o,r=e.cloneRange(),s=r.startContainer.childNodes[0===r.startOffset?0:r.startOffset-1],a=r.endContainer.childNodes[r.endOffset];return x(s)&&x(a)?(t=s.nodeValue,i=a.nodeValue,t&&i?(n=t.split("").reverse().join("").search(f),o=i.search(f),n&&o?(o=o==-1?i.length:o,n=n==-1?0:t.length-n,r.setStart(s,n),r.setEnd(a,o),r):r):r):r},isExpandable:function(e){var t,i,n,o,r,s,a=e.startContainer,l=m.documentFromRange(e);return a!=l&&a!=l.body&&(t=e.cloneRange(),!!(i=a.nodeValue)&&(n=i.substring(0,t.startOffset),o=i.substring(t.startOffset),r=0,s=0,n&&(r=n.split("").reverse().join("").search(f)),o&&(s=o.search(f)),r&&s))}},_(b,{SelectionUtils:D,W3CRange:A,RangeIterator:a,W3CSelection:l,RangeEnumerator:c,RestorePoint:h,Marker:p,RangeUtils:m})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/immutables.min",["editor/range.min"],e)}(function(){!function(e,t){var i=window.kendo,n=i.Class,o=i.ui.editor,r=o.Dom,s=i.template,a=o.RangeUtils,l=["ul","ol","tbody","thead","table"],c=["bold","italic","underline","strikethrough","superscript","subscript","forecolor","backcolor","fontname","fontsize","createlink","unlink","autolink","addcolumnleft","addcolumnright","addrowabove","addrowbelow","deleterow","deletecolumn","mergecells","formatting","cleanformatting"],d="k-immutable",u="["+d+"]",h="[contenteditable='false']",p=function(t){return e(t).is("body,.k-editor")},f=function(e){return e.getAttribute&&"false"==e.getAttribute("contenteditable")},m=function(e){return r.closestBy(e,f,p)},g=function(e){var t=m(e.startContainer),i=m(e.endContainer);(t||i)&&(t&&e.setStartBefore(t),i&&e.setEndAfter(i))},v=function(e){if(m(e.commonAncestorContainer))return!0;if(m(e.startContainer)||m(e.endContainer)){var t=a.editableTextNodes(e);if(0===t.length)return!0}return!1},_=function(e){var t,i="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(t=e||10;t>0;--t)i+=n.charAt(Math.round(Math.random()*(n.length-1)));return i},b=function(t){var i,n,o,s={empty:!0};return e(t).find(h).each(function(t,a){i=r.name(a),n=_(),o="<"+i+" "+d+"='"+n+"'></"+i+">",s[n]={node:a,style:e(a).attr("style")},s.empty=!1,e(a).replaceWith(o)}),s},w=function(t,i){var n,o;e(t).find(u).each(function(t,r){n=r.getAttribute(d),o=i[n],e(r).replaceWith(o.node),o.style!=e(o.node).attr("style")&&e(o.node).removeAttr("style").attr("style",o.style)})},y=function(e){var t=i.keys;return e===t.BACKSPACE||e==t.DELETE},k=function(e){var i=e?e.options:t;i&&i.finder&&i.finder._initOptions({immutables:!0})},x=n.extend({init:function(t){this.editor=t,this.serializedImmutables={},this.options=e.extend({},t&&t.options&&t.options.immutables);var i=t.toolbar.tools;k(i.justifyLeft),k(i.justifyCenter),k(i.justifyRight),k(i.justifyFull)},serialize:function(e){var t,i=this._toHtml(e);return i.indexOf(d)===-1?(t=this.randomId(),i=i.replace(/>/," "+d+'="'+t+'">')):t=i.match(/k-immutable\s*=\s*['"](.*)['"]/)[1],this.serializedImmutables[t]=e,i},_toHtml:function(e){var t,i=this.options.serialization,n=typeof i;switch(n){case"string":return s(i)(e);case"function":return i(e);default:return t=r.name(e),"<"+t+"></"+t+">"}},deserialize:function(t){var n=this,o=this.options.deserialization;e(u,t).each(function(){var t=this.getAttribute(d),r=n.serializedImmutables[t];i.isFunction(o)&&o(this,r),e(this).replaceWith(r)}),n.serializedImmutables={}},randomId:function(e){return _(e)},keydown:function(e,t){var i=y(e.keyCode),n=i&&this._cancelDeleting(e,t)||!i&&this._cancelTyping(e,t);if(n)return e.preventDefault(),!0},_cancelTyping:function(e,t){var i=this.editor,n=i.keyboard;return t.collapsed&&!n.typingInProgress&&n.isTypingKey(e)&&v(t)},_cancelDeleting:function(e,t){var n,o,s,a,c=i.keys,d=e.keyCode===c.BACKSPACE,u=e.keyCode==c.DELETE;if(!d&&!u)return!1;if(n=!1,t.collapsed){if(v(t))return!0;if(o=this.nextImmutable(t,u),o&&d&&(s=r.closest(t.commonAncestorContainer,"li"),s&&(a=r.closest(o,"li"),a&&a!==s)))return n;if(o&&!r.tableCell(o)){if(r.parentOfType(o,l)===r.parentOfType(t.commonAncestorContainer,l)){for(;o&&1==o.parentNode.childNodes.length;)o=o.parentNode;if(r.tableCell(o))return n;this._removeImmutable(o,t)}n=!0}}return n},nextImmutable:function(e,t){var i,n=e.commonAncestorContainer;if(r.isBom(n)||t&&a.isEndOf(e,n)||!t&&a.isStartOf(e,n)){if(i=this._nextNode(n,t),i&&r.isBlock(i)&&!m(i))for(;i&&i.children&&i.children[t?0:i.children.length-1];)i=i.children[t?0:i.children.length-1];return m(i)}},_removeImmutable:function(e,t){var i=this.editor,n=new o.RestorePoint(t,i.body);r.remove(e),o._finishUpdate(i,n)},_nextNode:function(e,t){for(var i,n=t?"nextSibling":"previousSibling",o=e;o&&!i;)i=o[n],i&&r.isDataNode(i)&&/^\s|[\ufeff]$/.test(i.nodeValue)&&(o=i,i=o[n]),i||(o=o.parentNode);return i}});x.immutable=f,x.immutableParent=m,x.expandImmutablesIn=g,x.immutablesContext=v,x.toolsToBeUpdated=c,x.removeImmutables=b,x.restoreImmutables=w,o.Immutables=x}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/command.min",["editor/immutables.min"],e)}(function(){!function(e){function t(e,t){var i=e.selectionRestorePoint=new s(e.getRange(),e.body),n=new d(t,i);return n.editor=e,e.undoRedoStack.push(n),i}var i=window.kendo,n=i.Class,o=i.ui.editor,r=o.Dom,s=o.RestorePoint,a=o.Marker,l=e.extend,c=n.extend({init:function(e){this.options=e,this.restorePoint=new s(e.range,e.body,{immutables:e.immutables}),this.marker=new a,this.formatter=e.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(e){return this.marker.add(this.getRange(),e)},releaseRange:function(e){this.marker.remove(e),this.editor.selectRange(e)},undo:function(){var e=this.restorePoint;e.restoreHtml(),this.editor.selectRange(e.toRange())},redo:function(){this.exec()},createDialog:function(t,n){var o=this.editor;return e(t).appendTo(document.body).kendoWindow(l({},o.options.dialogOptions,n)).closest(".k-window").toggleClass("k-rtl",i.support.isRtl(o.wrapper)).end()},exec:function(){var e=this.lockRange(!0);this.formatter.editor=this.editor,this.formatter.toggle(e),this.releaseRange(e)},immutables:function(){return this.editor&&this.editor.options.immutables},expandImmutablesIn:function(e){this.immutables()&&(i.ui.editor.Immutables.expandImmutablesIn(e),this.restorePoint=new s(e,this.editor.body))}}),d=n.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){r.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){r.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}});l(o,{_finishUpdate:t,Command:c,GenericCommand:d})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/toolbar.min",["editor/range.min"],e)}(function(){!function(e,t){var i,n=window.kendo,o=n.ui,r=o.editor,s=o.Widget,a=e.extend,l=e.proxy,c=n.keys,d=".kendoEditor",u=r.EditorUtils,h=r.ToolTemplate,p=r.Tool,f=n._outerWidth,m=n._outerHeight,g="overflowAnchor",v=".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor:visible,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",_={"k-i-sup-script":"superscript","k-i-sub-script":"subscript","k-i-align-left":"justifyLeft","k-i-align-center":"justifyCenter","k-i-align-right":"justifyRight","k-i-align-justify":"justifyFull","k-i-list-unordered":"insertUnorderedList","k-i-list-ordered":"insertOrderedList","k-i-login":"import","k-i-indent-increase":"indent","k-i-indent-decrease":"outdent","k-i-link-horizontal":"createLink","k-i-unlink-horizontal":"unlink","k-i-image":"insertImage","k-i-file-add":"insertFile","k-i-html":"viewHtml","k-i-foreground-color":"foreColor","k-i-paint":"backColor","k-i-table-insert":"createTable","k-i-table-column-insert-left":"addColumnLeft","k-i-table-column-insert-right":"addColumnRight","k-i-table-row-insert-above":"addRowAbove","k-i-table-row-insert-below":"addRowBelow","k-i-table-row-delete":"deleteRow","k-i-table-column-delete":"deleteColumn","k-i-table-properties":"tableWizard","k-i-table-wizard":"tableWizardInsert","k-i-clear-css":"cleanFormatting"},b=p.extend({initialize:function(t,i){t.attr({unselectable:"on"});var n=i.editor.toolbar;t.attr("aria-controls",i.editor.element.attr("id")).on("click",e.proxy(function(){this.overflowPopup.toggle()},n))},options:{name:g},command:e.noop,update:e.noop,destroy:e.noop});u.registerTool(g,new b({key:"",ctrl:!0,template:new h({template:u.overflowAnchorTemplate})})),i=s.extend({init:function(e,t){var i=this;t=a({},t,{name:"EditorToolbar"}),s.fn.init.call(i,e,t),t.popup&&i._initPopup(),t.resizable&&t.resizable.toolbar&&(i._resizeHandler=n.onResize(function(){i.resize(!0)}),i.element.addClass("k-toolbar-resizable"))},events:["execute"],groups:{basic:["bold","italic","underline","strikethrough"],scripts:["subscript","superscript"],alignment:["justifyLeft","justifyCenter","justifyRight","justifyFull"],links:["insertImage","insertFile","createLink","unlink"],lists:["insertUnorderedList","insertOrderedList","indent","outdent"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"],advanced:["viewHtml","cleanFormatting","print","pdf","exportAs","import"],fonts:["fontName","fontSize"],colors:["foreColor","backColor"]},overflowFlaseTools:["formatting","fontName","fontSize","foreColor","backColor","insertHtml"],_initPopup:function(){var t=this;this.window=e(this.element).wrap("<div class='editorToolbarWindow k-header' />").parent().prepend("<button class='k-button k-bare k-editortoolbar-dragHandle'><span class='k-icon k-i-handler-drag' /></button>").kendoWindow({title:!1,resizable:!1,draggable:{dragHandle:".k-editortoolbar-dragHandle"},animation:{open:{effects:"fade:in"},close:{effects:"fade:out"}},minHeight:42,visible:!1,autoFocus:!1,actions:[],dragend:function(){this._moved=!0}}).on("mousedown",function(i){e(i.target).is(".k-icon")||(t.preventPopupHide=!0)}).on("focusout",function(){t.options.editor.element.focusout()}).data("kendoWindow")},_toggleOverflowStyles:function(e,t){e.find("> li").toggleClass("k-item k-state-default",t).find(".k-tool:not(.k-state-disabled),.k-overflow-button").toggleClass("k-overflow-button k-button",t)},_initOverflowPopup:function(t){var i=this,n="<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>";i.overflowPopup=e(n).appendTo("body").kendoPopup({anchor:t,origin:"bottom right",position:"top right",copyAnchorStyles:!1,open:function(e){this.element.is(":empty")&&e.preventDefault(),i._toggleOverflowStyles(this.element,!0),t.attr("aria-expanded",!0)},close:function(){t.attr("aria-expanded",!1)},activate:l(i.focusOverflowPopup,i)}).data("kendoPopup")},items:function(){var e,t,i=this.options.resizable&&this.options.resizable.toolbar;return t=this.element.children().find("> *, select"),i&&(e=this.overflowPopup,t=t.add(e.element.children().find("> *"))),t},focused:function(){return this.element.find(".k-state-focused").length>0||this.preventPopupHide||this.overflowPopup&&this.overflowPopup.visible()},toolById:function(e){var t,i=this.tools;for(t in i)if(t.toLowerCase()==e)return i[t]},toolGroupFor:function(t){var i,n=this.groups;if(this.isCustomTool(t))return"custom";for(i in n)if(e.inArray(t,n[i])>=0)return i},bindTo:function(t){var i=this,n=i.window;i._editor&&i._editor.unbind("select",l(i.resize,i)),i._editor=t,i.options.resizable&&i.options.resizable.toolbar&&t.options.tools.push(g),i.tools=i.expandTools(t.options.tools),i.render(),i.element.find(".k-combobox .k-input").keydown(function(t){var i=e(this).closest(".k-combobox").data("kendoComboBox"),n=t.keyCode;n==c.RIGHT||n==c.LEFT?i.close():n==c.DOWN&&(i.dropDown.isOpened()||(t.stopImmediatePropagation(),i.open()))}),i._attachEvents(),i.items().each(function(){var n,o=i._toolName(this),r="moreVertical"!==o?i.tools[o]:i.tools.overflowAnchor,s=r&&r.options,a=t.options.messages,l=s&&s.tooltip||a[o],c=e(this);r&&r.initialize&&("fontSize"!=o&&"fontName"!=o||(n=a[o+"Inherit"],c.find("input").val(n).end().find("span.k-input").text(n).end()),r.initialize(c,{title:i._appendShortcutSequence(l,r),editor:i._editor}),c.closest(".k-widget",i.element).addClass("k-editor-widget"),c.closest(".k-colorpicker",i.element).next(".k-colorpicker").addClass("k-editor-widget"))}),t.bind("select",l(i.resize,i)),i.update(),n&&n.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,i,o=this,r=o.window,s=o.options.editor,a=n.support.browser;r&&(e=r.wrapper,t=s.element,e.is(":visible")&&o.window.options.visible||(e[0].style.width||e.width(this._getWindowWidth()),r._moved||(i=t.offset(),e.css({top:Math.max(0,parseInt(i.top,10)-m(e)-parseInt(o.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(i.left,10))})),(a.msie||a.edge)&&o._overlaps(t)?setTimeout(function(){r.open()},0):r.open()))},_getWindowWidth:function(){var e=this,t=e.window.wrapper,i=e.options.editor.element;return f(i)-parseInt(t.css("border-left-width"),10)-parseInt(t.css("border-right-width"),10)},_overlaps:function(e){var t=this.window.wrapper,i=t.offset(),n=i.left,o=i.top,r=e.offset(),s=r.left,a=r.top;return!(s+e.width()<n||s>n+t.width()||a+e.height()<o||a>o+t.height())},hide:function(){this.window&&this.window.close()},focus:function(){var e="tabIndex",t=this.element,i=this._editor.element.attr(e);t.attr(e,i||0).focus().find(v).first().focus(),i||0===i||t.removeAttr(e)},focusOverflowPopup:function(){var e="tabIndex",t=this.overflowPopup.element,i=this._editor.element.attr(e);t.closest(".k-animation-container").addClass("k-overflow-wrapper"),t.attr(e,i||0).find(v).first().focus(),i||0===i||t.removeAttr(e)},_appendShortcutSequence:function(e,t){if(!t.key)return e;var i=e+" (";return t.ctrl&&(i+="Ctrl + "),t.shift&&(i+="Shift + "),t.alt&&(i+="Alt + "),i+=t.key+")"},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","autoLink"],tools:{},isCustomTool:function(e){return!(e in n.ui.Editor.defaultTools)},expandTools:function(t){var i,o,s,l,c=this._nativeTools,d=n.deepExtend({},n.ui.Editor.defaultTools),u={};for(o=0;o<t.length;o++)i=t[o],l=i.name,e.isPlainObject(i)?l&&d[l]?(u[l]=a({},d[l]),a(u[l].options,i)):(s=a({cssClass:"k-i-gear",type:"button",title:""},i),s.name||(s.name="custom"),s.cssClass="k-"+s.name,s.template||"button"!=s.type||(s.template=r.EditorUtils.buttonTemplate,s.title=s.title||s.tooltip),u[l]={options:s}):d[i]&&(u[i]=d[i]);for(o=0;o<c.length;o++)u[c[o]]||(u[c[o]]=d[c[o]]);return u},render:function(){function t(t){var i;return t.getHtml?i=t.getHtml():(e.isFunction(t)||(t=n.template(t)),i=t(r)),e.trim(i)}function i(){h.children().length&&(k&&(h.data("position",y),y++),h.appendTo(_))}function o(t){t!==g?(h=e("<li class='k-tool-group' role='presentation' />"),h.data("overflow",e.inArray(t,x)===-1)):h=e("<li class='k-overflow-tools' />")}var r,s,a,c,d,u,h,p,f=this,m=f.tools,v=f._editor.element,_=f.element.empty(),b=f._editor.options.tools,w=n.support.browser,y=0,k=f.options.resizable&&f.options.resizable.toolbar,x=this.overflowFlaseTools;for(_.empty(),b.length&&(c=b[0].name||b[0]),o(c,x),p=0;p<b.length;p++)c=b[p].name||b[p],r=m[c]&&m[c].options,!r&&e.isPlainObject(c)&&(r=c),s=r&&r.template,"break"==c&&(i(),e("<li class='k-row-break' />").appendTo(f.element),o(c,x)),s&&(u=f.toolGroupFor(c),d==u&&c!=g||(i(),o(c,x),d=u),c==g&&(s.options.title=f.options.messages.overflowAnchor),s=t(s),a=e(s).appendTo(h),"custom"==u&&(i(),o(c,x)),r.exec&&a.hasClass("k-tool")&&a.click(l(r.exec,v[0])));i(),e(f.element).children(":has(> .k-tool)").addClass("k-button-group"),f.options.popup&&w.msie&&w.version<9&&f.window.wrapper.find("*").attr("unselectable","on"),f.updateGroups(),k&&f._initOverflowPopup(f.element.find(".k-overflow-anchor")),f.angular("compile",function(){return{elements:f.element}})},updateGroups:function(){e(this.element).children().each(function(){e(this).addClass("k-state-disabled"),e(this).children().filter(function(){return!e(this).hasClass("k-state-disabled")}).removeClass("k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end().parent().removeClass("k-state-disabled").css("display","")})},decorateFrom:function(t){this.items().filter(".k-decorated").each(function(){var i=e(this).data("kendoSelectBox");i&&i.decorate(t)})},destroy:function(){s.fn.destroy.call(this);var e,t=this.tools;for(e in t)t[e].destroy&&t[e].destroy();this.window&&this.window.destroy(),this._resizeHandler&&n.unbindResize(this._resizeHandler),
this.overflowPopup&&this.overflowPopup.destroy()},_attachEvents:function(){var t=this,i=t.overflowPopup?t.overflowPopup.element:e([]);t.attachToolsEvents(t.element.add(i))},attachToolsEvents:function(t){var i=this,o="[role=button].k-tool",r=o+":not(.k-state-disabled)",s=o+".k-state-disabled",a=".k-dropdown",l=".k-colorpicker",u=[o,a,l].join(",");t.off(d).on("mouseenter"+d,r,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+d,r,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+d,u,function(e){e.preventDefault()}).on("keydown"+d,v,function(t){function o(e,t,i){var n=t.find(v),o=n.index(l)+e;return i&&(o=Math.max(0,Math.min(n.length-1,o))),n[o]}var r,s,a,l=this,d=i.options.resizable&&i.options.resizable.toolbar,u=n.support.isRtl(i.element)?-1:1,h=t.keyCode;h==c.RIGHT||h==c.LEFT?s=e(l).is(".k-dropdown")?e(l):o(h==c.RIGHT?1*u:-1*u,i.element,!0):!d||h!=c.UP&&h!=c.DOWN?h==c.HOME?(s=i.element.find(v)[0],t.preventDefault()):h==c.END?(r=i.element.find(v).filter(function(){return"hidden"!==e(this).css("visibility")}),s=r[r.length-1],t.preventDefault()):h==c.ESC?(i.overflowPopup&&i.overflowPopup.visible()&&i.overflowPopup.close(),s=i._editor):h!=c.TAB||t.ctrlKey||t.altKey||(a=d&&e(l.parentElement).hasClass("k-overflow-tool-group")?i.overflowPopup.element:i.element,t.shiftKey?s=o(-1,a):(s=o(1,a),s&&"hidden"!==e(s).closest(".k-overflow-tools").css("visibility")||(s=i._editor))):s=o(h==c.DOWN?1:-1,i.overflowPopup.element,!0),s&&(t.preventDefault(),s.focus()),h!==c.ENTER&&h!==c.SPACEBAR||!e(l).is("a")||e(l).attr("href")||i._executeToolCommand(l,t)}).on("click"+d,r,function(e){i._executeToolCommand(this,e)}).on("click"+d,s,function(e){e.preventDefault()})},_executeToolCommand:function(t,i){var n=this,o=e(t);i.preventDefault(),i.stopPropagation(),o.removeClass("k-state-hover"),o.is("[data-popup]")||n._editor.exec(n._toolName(t))},_toolName:function(t){var i,o,r;if(t)return i=t.className,/k-tool\b/i.test(i)&&(i=t.firstChild.className),o=e.grep(i.split(" "),function(e){return!/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)}),o[0]?(r=o[0],_[r]&&(r=_[r]),r.indexOf("k-i-")>=0?n.toCamelCase(r.substring(r.indexOf("k-i-")+4)):r.substring(r.lastIndexOf("-")+1)):"custom"},refreshTools:function(){var t=this,i=t._editor,n=i.getRange(),o=r.RangeUtils.textNodes(n),s=i.options.immutables,a=t._immutablesContext(n);o=r.Dom.filterBy(o,r.Dom.htmlIndentSpace,!0),o.length||(o=[n.startContainer]),t.items().each(function(){var i,n=t.tools[t._toolName(this)];n&&(i=e(this),n.update&&n.update(i,o),s&&t._updateImmutablesState(n,i,a))}),this.update()},_immutablesContext:function(e){if(this._editor.options.immutables)return e.collapsed?r.Immutables.immutablesContext(e):0===r.RangeUtils.editableTextNodes(e).length},_updateImmutablesState:function(i,n,o){var s,a,l,c,d,u=i.name,h=n,p=i.options.trackImmutables;if(p===t&&(p=e.inArray(u,r.Immutables.toolsToBeUpdated)>-1),p){if(s=o?"none":"",!n.is(".k-tool")){a=n.data();for(l in a)if(l.match(/^kendo[A-Z][a-zA-Z]*/)){c=a[l],h=c.wrapper;break}}h.css("display",s),d=h.closest("li"),0===d.children(":visible").length&&d.css("display",s)}},update:function(){this.updateGroups()},_resize:function(e){var t=e.width,i=this.options.resizable&&this.options.resizable.toolbar,n=this.overflowPopup,o=this.options.editor.element,r=this.window;this.refreshTools(),i&&(r&&(r.wrapper.width(this._getWindowWidth()),r._moved||r.wrapper.css({left:Math.max(0,parseInt(o.offset().left,10))})),n.visible()&&n.close(!0),this._refreshWidths(),this._shrink(t),this._stretch(t),this._toggleOverflowStyles(this.element,!1),this._toggleOverflowStyles(this.overflowPopup.element,!0),this.element.children("li.k-overflow-tools").css("visibility",n.element.is(":empty")?"hidden":"visible"))},_refreshWidths:function(){this.element.children("li").each(function(t,i){var n=e(i);n.data("outerWidth",f(n,!0))})},_shrink:function(e){var t,i,n;if(e<this._groupsWidth())for(i=this._visibleGroups().filter(":not(.k-overflow-tools)"),n=i.length-1;n>=0&&(t=i.eq(n),!(e>this._groupsWidth()));n--)this._hideGroup(t)},_stretch:function(e){var t,i,n;if(e>this._groupsWidth())for(i=this._hiddenGroups(),n=0;n<i.length&&(t=i.eq(n),!(e<this._groupsWidth())&&this._showGroup(t,e));n++);},_hiddenGroups:function(){var t=this.overflowPopup,i=this.element.children("li.k-tool-group").filter(":hidden");return i=i.add(t.element.children("li")),i.sort(function(t,i){return e(t).data("position")>e(i).data("position")?1:-1}),i},_visibleGroups:function(){return this.element.children("li.k-tool-group, li.k-overflow-tools").filter(":visible")},_groupsWidth:function(){var t=0;return this._visibleGroups().each(function(){t+=e(this).data("outerWidth")}),Math.ceil(t)},_hideGroup:function(e){if(e.data("overflow")){var t=this.overflowPopup;e.detach().prependTo(t.element).addClass("k-overflow-tool-group")}else e.hide()},_showGroup:function(t,i){var n,o;return!!(t.length&&i>this._groupsWidth()+t.data("outerWidth"))&&(t.hasClass("k-overflow-tool-group")?(n=t.data("position"),0===n?t.detach().prependTo(this.element):(o=this.element.children().filter(function(t,i){return e(i).data("position")===n-1}),t.detach().insertAfter(o)),t.removeClass("k-overflow-tool-group")):t.show(),!0)}}),e.extend(r,{Toolbar:i})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/viewhtml.min",["editor/command.min"],e)}(function(){!function(e,t){var i=window.kendo,n=e.extend,o=i.ui.editor,r=o.EditorUtils,s=o.Command,a=o.Tool,l=o.ToolTemplate,c=o.Dom,d=s.extend({init:function(e){var t=this;t.options=e,s.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function n(e){h.deserialization.immutables=u.immutables,u.value(f.find(m).val()),h.deserialization.immutables=t,o(e),l.change&&l.change(),u.trigger("change")}function o(e){e.preventDefault(),f.data("kendoWindow").destroy(),u.immutables&&(u.immutables.serializedImmutables={}),u.focus()}var s,a,l=this,u=l.editor,h=u.options,p=u.options.messages,f=e(i.template(d.template)(p)).appendTo(document.body),m=".k-editor-textarea";h.serialization.immutables=u.immutables,a=c.getAllComments(u.body),s=r.cacheComments(u.value(),a),s=d.indent(s),s=r.retrieveComments(s,a),h.serialization.immutables=t,this.createDialog(f,{title:p.viewHtml,close:o,visible:!1}).find(m).val(s).end().find(".k-dialog-update").click(n).end().find(".k-dialog-close").click(o).end().data("kendoWindow").center().open(),f.find(m).focus()}});n(d,{template:"<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><div class='k-edit-form-container'></div><textarea class='k-editor-textarea k-input'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div></div>",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")}}),i.ui.editor.ViewHtmlCommand=d,o.EditorUtils.registerTool("viewHtml",new a({command:d,template:new l({template:r.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/format.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,i=e.extend,n=t.ui.editor,o=n.Tool,r=n.Command,s=n.EditorUtils,a=r.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&s.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),r.fn.init.call(this,e)}}),l=o.extend({init:function(e){o.fn.init.call(this,e)},command:function(e){var t=this;return new a(i(e,{formatter:t.options.formatter}))},update:function(e,t){var i=this.options.finder.isFormatted(t);e.toggleClass("k-state-selected",i),e.attr("aria-pressed",i)}});e.extend(n,{FormatCommand:a,FormatTool:l})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/inlineformat.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t=window.kendo,i=t.Class,n=t.ui.editor,o=t.ui.Editor.fn.options.formats,r=n.EditorUtils,s=n.Tool,a=n.ToolTemplate,l=n.FormatTool,c=n.Dom,d=n.RangeUtils,u=e.extend,h=n.EditorUtils.registerTool,p=n.EditorUtils.registerFormat,f="mousedown.kendoEditor",m="keydown.kendoEditor",g="k-marker",v=i.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,i=0,n=0,o=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==g?o++:3==t.nodeType?i++:n++);return o>1&&r.firstChild.className==g&&r.lastChild.className==g?0:n+i},findSuitable:function(e,t){var i,n;if(!t&&this.numberOfSiblings(e)>0)return null;for(i=e.parentNode,n=this.format[0].tags;!c.ofType(i,n);){if(this.numberOfSiblings(i)>0)return null;i=i.parentNode}return i},findFormat:function(e){var t,i,n,o,r,s=this.format,a=c.attrEquals;for(t=0,i=s.length;t<i;t++){if(n=e,o=s[t].tags,r=s[t].attr,n&&c.ofType(n,o)&&a(n,r))return n;for(;n;)if(n=c.parentOfType(n,o),n&&a(n,r))return n}return null},isFormatted:function(e){var t,i;for(t=0,i=e.length;t<i;t++)if(this.findFormat(e[t]))return!0;return!1}}),_=i.extend({init:function(e,t){this.finder=new v(e),this.attributes=u({},e[0].attr,t),this.tag=e[0].tags[0]},wrap:function(e){return c.wrap(e,c.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){this.finder.isFormatted(t)?(this.split(e),this.remove(t)):this.apply(t)},toggle:function(e){var t=this.immutables()?d.editableTextNodes:d.textNodes,i=t(e);i.length>0&&this.activate(e,i)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,i,n,o,r=[];if(e.length>1)for(t=0,i=e.length;t<i;t++)n=e[t],o=this.format(n,!0),r.push(o);else n=e[0],o=this.format(n,!1);this.consolidate(r)},format:function(e,t){var i=this.finder.findSuitable(e),n=this.attributes,o=n?n.style||{}:{};if(i)c.is(i,"font")&&(o.color&&i.removeAttribute("color"),o.fontName&&i.removeAttribute("face"),o.fontSize&&i.removeAttribute("size")),c.attr(i,n);else{for(;!c.isBlock(e.parentNode)&&1==e.parentNode.childNodes.length&&"true"!==e.parentNode.contentEditable&&t;)e=e.parentNode;i=this.wrap(e)}return i},remove:function(e){var t,i,n;for(t=0,i=e.length;t<i;t++)n=this.finder.findFormat(e[t]),n&&(this.attributes&&this.attributes.style?(c.unstyle(n,this.attributes.style),n.style.cssText||n.attributes["class"]||c.unwrap(n)):c.unwrap(n))},split:function(e){var t,i,n=d.textNodes(e),o=n.length;if(o>0)for(t=0;t<o;t++)i=this.finder.findFormat(n[t]),i&&d.split(e,i,!0)},consolidate:function(e){for(var t,i;e.length>1;)if(t=e.pop(),i=e[e.length-1],t.previousSibling&&t.previousSibling.className==g&&i.appendChild(t.previousSibling),t.tagName==i.tagName&&t.previousSibling==i&&t.style.cssText==i.style.cssText&&t.className===i.className){for(;t.firstChild;)i.appendChild(t.firstChild);c.remove(t)}}}),b=v.extend({init:function(e,t){this.format=e,this.greedyProperty=t,v.fn.init.call(this,e)},getInlineCssValue:function(t){var i,n,o,r,s,a,l,d,u,h,p,f,m=t.attributes,g=e.trim;if(m)for(i=0,n=m.length;i<n;i++)if(o=m[i],r=o.nodeName,s=o.nodeValue,o.specified&&"style"==r)for(a=g(s||t.style.cssText).split(";"),d=0,u=a.length;d<u;d++)if(l=a[d],l.length){if(h=l.split(":"),p=g(h[0].toLowerCase()),f=g(h[1]),p!=this.greedyProperty)continue;return p.indexOf("color")>=0?c.toHex(f):f}},getFormatInner:function(t){var i,n,o,r=e(c.isDataNode(t)?t.parentNode:t),s=r.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(i=0,n=s.length;i<n;i++)if(o="className"==this.greedyProperty?s[i].className:this.getInlineCssValue(s[i]))return o;return"inherit"},getFormat:function(e){var t,i,n=this.getFormatInner(e[0]);for(t=1,i=e.length;t<i;t++)if(n!=this.getFormatInner(e[t]))return"";return n},isFormatted:function(e){return""!==this.getFormat(e)}}),w=_.extend({init:function(e,i,n){_.fn.init.call(this,e,i),this.values=i,this.finder=new b(e,n),n&&(this.greedyProperty=t.toCamelCase(n))},activate:function(e,t){var i=this.greedyProperty,n="apply";this.split(e),i&&"inherit"==this.values.style[i]&&(n="remove"),this[n](t)}}),y=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new v(e.format),formatter:function(){return new _(e.format)}}))}}),k=s.extend({update:function(e,t){var i=e.data(this.type);i.close(),i.value(this.finder.getFormat(t))}}),x=k.extend({init:function(e){s.fn.init.call(this,e),this.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span","font"]}],this.finder=new b(this.format,e.cssAttr)},command:function(e){var t=this.options,i=this.format,o={};return new n.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new w(i,{style:o},t.cssAttr)}}))},initialize:function(e,i){var n,o,r,a=i.editor,l=this.options,c=l.name,d=[];l.defaultValue&&(d=[{text:a.options.messages[l.defaultValue[0].text],value:l.defaultValue[0].value}]),n=d.concat(l.items?l.items:a.options[c]||[]),e.attr({title:i.title}),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){a._range=o,s.exec(a,c,this.value())},close:function(){setTimeout(function(){a._deleteSavedRange()},0)},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+c).find("*").addBack().attr("unselectable","on"),r=e.data(this.type),r.value("inherit"),r.wrapper.on(f,".k-select,.k-input",function(){var e=a.getRange();o=a._containsRange(e)?e:o}).on(m,function(e){e.keyCode===t.keys.ENTER&&(a._deleteSavedRange(),e.preventDefault())})}}),C=s.extend({init:function(e){s.fn.init.call(this,e),this.format=[{tags:["span","font"]}],this.finder=new b(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,i=this.format,o={};return new n.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new w(i,{style:o},t.cssAttr)}}))},initialize:function(i,n){var o=this,a=n.editor,l=this.name,c=u({},C.fn.options,this.options),d=c.palette,h=c.columns;i=this._widget=new t.ui.ColorPicker(i,{toolIcon:"k-icon k-i-"+r.getToolCssClass(c.name),palette:d,columns:h,change:function(){var e=i.value();o.storedRange&&a.selectRange(o.storedRange),e&&s.exec(a,l,e),a.focus()},open:function(t){var i=t.sender;o.storedRange=a.getRange(),i.value(null),i._popup.element.on(f,function(t){e(t.target).is("input.k-color-value")||t.preventDefault()}),i._popup.element.is("[unselectable='on']")||i._popup.element.attr({unselectable:"on"}).find("*:not(input)").attr("unselectable","on")},close:function(e){e.sender._popup.element.off(f),o.storedRange&&a.selectRange(o.storedRange)},activate:function(e){e.preventDefault(),i.trigger("change")}}),i.wrapper.attr({title:n.title,unselectable:"on"}).find("*:not(input)").attr("unselectable","on")}});u(n,{InlineFormatFinder:v,InlineFormatter:_,DelayedExecutionTool:k,GreedyInlineFormatFinder:b,GreedyInlineFormatter:w,InlineFormatTool:y,FontTool:x,ColorTool:C}),p("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),h("bold",new y({key:"B",ctrl:!0,format:o.bold,template:new a({template:r.buttonTemplate,title:"Bold"})})),p("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),h("italic",new y({key:"I",ctrl:!0,format:o.italic,template:new a({template:r.buttonTemplate,title:"Italic"})})),p("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),h("underline",new y({key:"U",ctrl:!0,format:o.underline,template:new a({template:r.buttonTemplate,title:"Underline"})})),p("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),h("strikethrough",new y({format:o.strikethrough,template:new a({template:r.buttonTemplate,title:"Strikethrough"})})),p("superscript",[{tags:["sup"]}]),h("superscript",new y({format:o.superscript,template:new a({template:r.buttonTemplate,title:"Superscript"})})),p("subscript",[{tags:["sub"]}]),h("subscript",new y({format:o.subscript,template:new a({template:r.buttonTemplate,title:"Subscript"})})),h("foreColor",new C({cssAttr:"color",domAttr:"color",name:"foreColor",template:new a({template:r.colorPickerTemplate,title:"Color"})})),h("backColor",new C({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new a({template:r.colorPickerTemplate,title:"Background Color"})})),h("fontName",new x({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new a({template:r.comboBoxTemplate,title:"Font Name"})})),h("fontSize",new x({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new a({template:r.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/link.min",["editor/plugins/inlineformat.min"],e)}(function(){!function(e,t){function i(e,t){for(var i=e.length;i--&&!t.test(e[i]););return i}function n(e,t){var i=t.exec(e);return i?i.index:-1}var o=window.kendo,r=o.Class,s=e.extend,a=e.proxy,l=o.ui.editor,c=l.Dom,d=l.RangeUtils,u=l.EditorUtils,h=l.Command,p=l.Tool,f=l.ToolTemplate,m=l.InlineFormatter,g=l.InlineFormatFinder,v=d.textNodes,_=d.editableTextNodes,b=l.EditorUtils.registerTool,w=o.keys,y="http://",k=/^\w*:\/\//,x=/[\w\/\$\-_\*\?]/i,C=r.extend({findSuitable:function(e){return c.parentOfType(e,["a"])}}),S=r.extend({init:function(){this.finder=new C},apply:function(e,t){var i,n,o,r,s,a,l,u=this.immutables?_(e):v(e);if(t.innerText){for(n=d.documentFromRange(e),i=d.getMarkers(e),e.deleteContents(),r=c.create(n,"a",t),e.insertNode(r),s=r.parentNode,"a"==c.name(s)&&c.insertAfter(r,s),c.emptyNode(s)&&c.remove(s),a=r,l=0;l<i.length;l++)c.insertAfter(i[l],a),a=i[l];i.length&&(c.insertBefore(n.createTextNode("\ufeff"),i[1]||i[0]),c.insertAfter(n.createTextNode("\ufeff"),i[1]||i[0]),e.setStartBefore(i[0]),e.setEndAfter(i[i.length-1]))}else o=new m([{tags:["a"]}],t),o.finder=this.finder,o.apply(u)}}),T=h.extend({init:function(e){var t=this;e.formatter={toggle:function(e){var i=t.immutables()?_(e):v(e);new m([{tags:["a"]}]).remove(i)}},this.options=e,h.fn.init.call(this,e)}}),D=h.extend({init:function(e){var t;this.options=e,h.fn.init.call(this,e),this.formatter=new S,e.url?this.exec=function(){this.formatter.immutables=t&&t.immutables(),this.formatter.apply(e.range,{href:e.url,innerText:e.text||e.url,target:e.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return o.template("<div class=\"k-editor-dialog k-popup-edit-form\"><div class=\"k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-url'></div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label></div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-input k-textbox' id='k-editor-link-text'></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-title'></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #</button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #</button></div></div></div>")({messages:this.editor.options.messages})},exec:function(){var t,i,n,o,r=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables(),t=v(this._range),i=t.length?this.formatter.finder.findSuitable(t[0]):null,n=t.length&&"img"==c.name(t[0]),o=this.createDialog(this._dialogTemplate(),{title:r.createLink,close:a(this._close,this),visible:!1}),i&&(this._range.selectNodeContents(i),t=v(this._range)),this._initialText=this.linkText(t),o.find(".k-dialog-insert").click(a(this._apply,this)).end().find(".k-dialog-close").click(a(this._close,this)).end().find(".k-edit-field input").keydown(a(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(i)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(i?i.title:"").end().find("#k-editor-link-target").attr("checked",!!i&&"_blank"==i.target).end().find(".k-editor-link-text-row").toggle(!n),this._dialog=o.data("kendoWindow").center().open(),e("#k-editor-link-url",o).focus().select()},_keydown:function(e){var t=o.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var i,n,o,r=this._dialog.element,s=e("#k-editor-link-url",r).val(),a=e("#k-editor-link-text",r);s&&s!=y&&(s.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(s)&&(s="mailto:"+s),this.attributes={href:s},i=e("#k-editor-link-title",r).val(),i&&(this.attributes.title=i),a.is(":visible")&&(n=a.val(),n||this._initialText?n&&n!==this._initialText&&(this.attributes.innerText=c.stripBom(n)):this.attributes.innerText=s),o=e("#k-editor-link-target",r).is(":checked"),this.attributes.target=o?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),c.windowFromDocument(d.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):y},linkText:function(e){var t,i="";for(t=0;t<e.length;t++)i+=e[t].nodeValue;return c.stripBom(i||"")},redo:function(){var e=this.lockRange(!0);this.formatter.apply(e,this.attributes),this.releaseRange(e)}}),A=h.extend({init:function(e){h.fn.init.call(this,e),this.formatter=new S},exec:function(){var e,t,i,n=this.detectLink();n&&(e=this.getRange(),t=new o.ui.editor.Marker,i=e.cloneRange(),i.setStart(n.start.node,n.start.offset),i.setEnd(n.end.node,n.end.offset),e=this.lockRange(),t.add(i),this.formatter.apply(i,{href:this._ensureWebProtocol(n.text)}),t.remove(i),this.releaseRange(e))},detectLink:function(){var e,t,i=this.getRange(),n=i.startContainer,o=i.startOffset,r=n.previousSibling;return!r&&(c.isBom(n)&&!n.nextSibling||!o&&c.isDataNode(n))&&(n=n.parentNode,o=0),e=new F({node:n,offset:o,cancelAtNode:function(e){return e&&"a"===c.name(e)}}),t=new I(e),t.detectLink()},changesContent:function(){return!!this.detectLink()},_ensureWebProtocol:function(e){var t=this._hasProtocolPrefix(e);return t?e:this._prefixWithWebProtocol(e)},_hasProtocolPrefix:function(e){return k.test(e)},_prefixWithWebProtocol:function(e){return y+e}}),E=p.extend({init:function(t){this.options=t,this.finder=new g([{tags:["a"]}]),p.fn.init.call(this,e.extend(t,{command:T}))},initialize:function(e,t){p.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}}),I=r.extend({init:function(e){this.traverser=e,this.start=M(),this.end=M(),this.text=""},detectLink:function(){var t,i,n,o,r=this.traverser.node,s=this.traverser.offset;if(c.isDataNode(r)){if(t=r.data.substring(0,s),/\s{2}$/.test(c.stripBom(t)))return}else 0===s&&(i=c.closestEditableOfType(r,c.blockElements),i&&i.previousSibling&&this.traverser.init({node:i.previousSibling}));return this.traverser.traverse(e.proxy(this._detectEnd,this)),this.end.blank()||(this.traverser=this.traverser.clone(this.end),this.traverser.traverse(e.proxy(this._detectStart,this)),this._isLinkDetected()||(n=this.traverser.extendOptions(this.start),o=new P(n),o.traverse(e.proxy(this._skipStartPuntuation,this)),this._isLinkDetected()||(this.start=M()))),this.start.blank()?null:{start:this.start,end:this.end,text:this.text}},_isLinkDetected:function(){return k.test(this.text)||/^w{3}\./i.test(this.text)},_detectEnd:function(e,t){var n=i(e,x);if(n>-1)return this.end.node=t,this.end.offset=n+1,!1},_detectStart:function(e,t){var n=i(e,/\s/),o=n+1;if(this.text=e.substring(o)+this.text,this.start.node=t,this.start.offset=o,n>-1)return!1},_skipStartPuntuation:function(e,t,i){var o=n(e,/\w/),r=o;if(o===-1&&(r=e.length),this.text=this.text.substring(r),this.start.node=t,this.start.offset=r+(0|i),o>-1)return!1}}),M=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},R=r.extend({init:function(i){this.node=i.node,this.offset=i.offset===t?c.isDataNode(this.node)&&this.node.length||0:i.offset,this.cancelAtNode=i.cancelAtNode||this.cancelAtNode||e.noop},traverse:function(e){e&&(this.cancel=!1,this._traverse(e,this.node,this.offset))},_traverse:function(e,i,n){var o,r,s,a;if(i&&!this.cancel){if(3!==i.nodeType)return r=this.edgeNode(i),this.cancel=this.cancel||this.cancelAtNode(r),this._traverse(e,r);if(o=i.data,n!==t&&(o=this.subText(o,n)),this.cancel=e(o,i,n)===!1,s=this.next(i),!s)for(a=i.parentNode;!s&&c.isInline(a);)s=this.next(a),a=a.parentNode;this.cancel=this.cancel||this.cancelAtNode(s),this._traverse(e,s)}},extendOptions:function(t){return e.extend({node:this.node,offset:this.offset,cancelAtNode:this.cancelAtNode},t||{})},edgeNode:function(e){},next:function(e){},subText:function(e,t){}}),F=R.extend({subText:function(e,t){return e.substring(0,t)},next:function(e){return e.previousSibling},edgeNode:function(e){return e.lastChild},clone:function(e){var t=this.extendOptions(e);return new F(t)}}),P=R.extend({subText:function(e,t){return e.substring(t)},next:function(e){return e.nextSibling},edgeNode:function(e){return e.firstChild},clone:function(e){var t=this.extendOptions(e);return new P(t)}});s(o.ui.editor,{LinkFormatFinder:C,LinkFormatter:S,UnlinkCommand:T,LinkCommand:D,AutoLinkCommand:A,UnlinkTool:E,DomTextLinkDetection:I,LeftDomTextTraverser:F,RightDomTextTraverser:P}),b("createLink",new p({key:"K",ctrl:!0,command:D,template:new f({template:u.buttonTemplate,title:"Create Link"})})),b("unlink",new E({key:"K",ctrl:!0,shift:!0,template:new f({template:u.buttonTemplate,title:"Remove Link"})})),b("autoLink",new p({key:[w.ENTER,w.SPACEBAR],keyPressCommand:!0,command:A}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/formatblock.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t,i=window.kendo,n=i.Class,o=e.extend,r=i.ui.editor,s=i.ui.Editor.fn.options.formats,a=r.Dom,l=r.ToolTemplate,c=r.FormatTool,d=r.EditorUtils,u=d.registerTool,h=d.registerFormat,p=r.RangeUtils,f=n.extend({init:function(e){this.format=e},contains:function(e,t){var i,n,o;for(i=0,n=t.length;i<n;i++)if(o=t[i],!o||!a.isAncestorOrSelf(e,o))return!1;return!0},findSuitable:function(t){var i,n,o,r,s=this.format,l=[];for(i=0,n=t.length;i<n;i++){for(r=s.length-1;r>=0&&!(o=a.ofType(t[i],s[r].tags)?t[i]:a.closestEditableOfType(t[i],s[r].tags));r--);if(!o||"true"===o.contentEditable)return[];e.inArray(o,l)<0&&l.push(o)}for(this._resolveListsItems(l),i=0,n=l.length;i<n;i++)if(this.contains(l[i],l))return[l[i]];return l},_resolveListsItems:function(e){var t,i,n;for(t=0;t<e.length;t++)i=e[t],n=a.is(i,"li")?i:a.wrapper(i),n=n&&a.list(n)?n.children[0]:n,a.is(n,"li")&&(i=e[t]=n)},findFormat:function(e){var t,i,n,o,s,l,c=this.format,d=a.editableParent(e),u=this.options&&this.options.immutables,h=r.Immutables;for(t=0,i=c.length;t<i;t++){if(n=e,o=c[t].tags,s=c[t].attr,u&&o&&"immutable"==o[0]&&(l=h.immutableParent(n),l&&a.attrEquals(l,s)))return n;for(;n&&a.isAncestorOf(d,n);){if(a.ofType(n,o)&&a.attrEquals(n,s))return n;n=n.parentNode}}return null},getFormat:function(e){var t,i,n=this,o=function(e){return n.findFormat(a.isDataNode(e)?e.parentNode:e)},r=o(e[0]);if(!r)return"";for(t=1,i=e.length;t<i;t++)if(r!=o(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,i=e.length;t<i;t++)if(!this.findFormat(e[t]))return!1;return!0}}),m=n.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new f(e)},wrap:function(e,t,i){var n,o,r,s,l,c=1==i.length?a.blockParentOrBody(i[0]):a.commonAncestor.apply(null,i);for(a.isInline(c)&&(c=a.blockParentOrBody(c)),n=a.significantChildNodes(c),o=a.findNodeIndex(n[0]),r=a.create(c.ownerDocument,e,t),s=0;s<n.length;s++)l=n[s],a.isBlock(l)?(a.attr(l,t),r.childNodes.length&&(a.insertBefore(r,l),r=r.cloneNode(!1)),o=a.findNodeIndex(l)+1):r.appendChild(l);r.firstChild&&a.insertAt(c,r,o)},apply:function(t){function i(e){return o({},e&&e.attr,f)}var n,r,s,l,c,u,h,p,f=this.values;if(this._handleImmutables(t,!0),r=a.filter("img",t),s=d.formatByName("img",this.format),l=i(s),e.each(r,function(){a.attr(this,l)}),r.length!=t.length)if(c=a.filter("img",t,!0),u=this.finder.findSuitable(c),u.length)for(h=0,p=u.length;h<p;h++)n=d.formatByName(a.name(u[h]),this.format),a.attr(u[h],i(n));else n=this.format[0],this.wrap(n.tags[0],i(n),c)},_handleImmutables:function(e,t){var i,n,o,s,l;if(this.immutables()&&(i=d.formatByName("immutable",this.format)))for(n=r.Immutables,o=e.length-1,s=o;s>=0;s--)l=n.immutableParent(e[s]),l&&(l!==e[s+1]&&(t?a.attr(l,i.attr):a.unstyle(l,i.attr.style)),e.splice(s,1))},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,i,n,o,r;for(this._handleImmutables(e,!1),t=0,i=e.length;t<i;t++)n=this.finder.findFormat(e[t]),n&&(r=a.name(n),"div"!=r||n.getAttribute("class")?(o=d.formatByName(r,this.format),o.attr.style&&a.unstyle(n,o.attr.style),o.attr.className&&a.removeClass(n,o.attr.className)):a.unwrap(n))},toggle:function(e){var t=this,i=a.filterBy(p.nodes(e),a.htmlIndentSpace,!0);t.finder.isFormatted(i)?t.remove(i):t.apply(i)}}),g=n.extend({init:function(e,t){var i=this;i.format=e,i.values=t,i.finder=new f(e)},apply:function(e){var t,i,n,o,s,l,c,d,u,h,p=this.format,f=a.blockParents(e),g=p[0].tags[0];if(f.length)for(t=0,i=f.length;t<i;t++)d=f[t],u=this.immutables()&&r.Immutables.immutableParent(d),u||(c=a.name(d),"li"==c?(n=d.parentNode,o=new r.ListFormatter(n.nodeName.toLowerCase(),g),s=this.editor.createRange(),s.selectNode(f[t]),o.toggle(s)):g&&("td"==c||d.attributes.contentEditable)?new m(p,this.values).apply(d.childNodes):(l=a.changeTag(d,g),a.attr(l,p[0].attr)));else h=new m(p,this.values),h.editor=this.editor,h.apply(e)},toggle:function(e){var t=p.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=p.textNodes(e),t.length||(t=a.significantChildNodes(e.commonAncestorContainer))),this.apply(t)},immutables:function(){return this.editor&&this.editor.options.immutables}}),v=c.extend({init:function(e){c.fn.init.call(this,o(e,{finder:new f(e.format),formatter:function(){return new m(e.format)}}))}});o(r,{BlockFormatFinder:f,BlockFormatter:m,GreedyBlockFormatter:g,BlockFormatTool:v}),t=["ul","ol","li"],h("justifyLeft",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"left",listStylePosition:""}}}]),u("justifyLeft",new v({format:s.justifyLeft,template:new l({template:d.buttonTemplate,title:"Justify Left"})})),h("justifyCenter",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),u("justifyCenter",new v({format:s.justifyCenter,template:new l({template:d.buttonTemplate,title:"Justify Center"})})),h("justifyRight",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"right"
}}},{tags:["img"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),u("justifyRight",new v({format:s.justifyRight,template:new l({template:d.buttonTemplate,title:"Justify Right"})})),h("justifyFull",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"justify"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),u("justifyFull",new v({format:s.justifyFull,template:new l({template:d.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/lists.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,i=t.Class,n=e.extend,o=t.ui.editor,r=o.Dom,s=o.RangeUtils,a=o.EditorUtils,l=o.Command,c=o.ToolTemplate,d=o.FormatTool,u=o.BlockFormatFinder,h=s.textNodes,p=o.EditorUtils.registerTool,f=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,i,n=[];for(i=0;i<e.length;i++)t=this.findFormat(e[i]),t&&r.name(t)==this.tag&&n.push(t);if(n.length<1)return!1;if(n.length!=e.length)return!1;for(i=0;i<n.length&&n[i].parentNode==t.parentNode;i++)if(n[i]!=t)return!1;return!0},findSuitable:function(e){var t=this.findFormat(e[0]);return t&&r.name(t)==this.tag?t:null}}),m=i.extend({init:function(e,t){var i=this;i.finder=new f(e),i.tag=e,i.unwrapTag=t},isList:function(e){return r.list(e)},immutables:function(){return this.editor&&!!this.editor.options.immutables},wrap:function(t,i){var n,s,a=r.create(t.ownerDocument,"li"),l=this.immutables()?o.Immutables.immutable:e.noop;for(n=0;n<i.length;n++)if(s=i[n],r.is(s,"li"))t.appendChild(s);else if(this.isList(s))for(;s.firstChild;)t.appendChild(s.firstChild);else if(r.is(s,"td")){for(;s.firstChild;)a.appendChild(s.firstChild);t.appendChild(a),s.appendChild(t),t=t.cloneNode(!1),a=a.cloneNode(!1)}else a.appendChild(s),r.isBlock(s)&&(t.appendChild(a),l(s)||r.unwrap(s),a=a.cloneNode(!1));a.firstChild&&t.appendChild(a)},containsAny:function(e,t){for(var i=0;i<t.length;i++)if(r.isAncestorOrSelf(e,t[i]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var i=e.nextSibling;if(i&&r.isBlock(i))return!1;if(i=e.previousSibling,i&&r.isBlock(i))return!1}return this.containsAny(e,t)||r.isInline(e)||3==e.nodeType},_parentLists:function(t){var i=r.closestEditable(t);return e(t).parentsUntil(i,"ul,ol")},split:function(e){var t,i,n,o,a,l,c=h(e);if(c.length)for(t=r.parentOfType(c[0],["li"]),i=r.parentOfType(c[c.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(i),o=0,a=c.length;o<a;o++)l=this.finder.findFormat(c[o]),l&&(n=this._parentLists(l),n.length?s.split(e,n.last()[0],!0):s.split(e,l,!0))},merge:function(e,t){for(var i,n=t.previousSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.previousSibling;if(n&&r.name(n)==e){for(;t.firstChild;)n.appendChild(t.firstChild);r.remove(t),t=n}for(i=t.nextSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.nextSibling;if(i&&r.name(i)==e){for(;t.lastChild;)i.insertBefore(t.lastChild,i.firstChild);r.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|tr|td/.test(r.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,i){function n(){u.push(this)}var o,s,a,l,c=this.tag,d=r.closestSplittableParent(i),u=[],h=this.finder.findSuitable(i);for(h||(h=new f("ul"==c?"ol":"ul").findSuitable(i)),/table|tbody/.test(r.name(d))?o=e.map(i,function(e){return r.parentOfType(e,["td"])}):(o=r.significantChildNodes(d),e.grep(o,r.isBlock).length&&(o=e.grep(o,e.proxy(function(e){return this.containsAny(e,i)},this))),o.length||(o=i)),s=0;s<o.length;s++)a=o[s],l=(!h||!r.isAncestorOrSelf(h,a))&&this.suitable(a,i),l&&(h&&this.isList(a)?(e.each(a.children,n),r.remove(a)):u.push(a));for(u.length==o.length&&this.breakable(d)&&(u=[d]),h||(h=r.create(d.ownerDocument,c),r.insertBefore(h,u[0])),this.wrap(h,u);r.isBom(h.nextSibling);)r.remove(h.nextSibling);r.is(h,c)||r.changeTag(h,c),this.merge(c,h)},apply:function(t){function i(){n&&d.push({section:n,nodes:s})}var n,s,a,l,c=0,d=[],u=t.length,h=this.immutables()?o.Immutables.immutableParent:e.noop;for(c=0;c<u;c++)l=h(t[c])||t[c],a=r.closestEditable(l,["td","body"]),n&&a==n?s.push(l):(i(),s=[l],n=a);for(i(),c=0;c<d.length;c++)this.applyOnSection(d[c].section,d[c].nodes)},unwrap:function(e){var t,i,n,o,s=e.ownerDocument.createDocumentFragment(),a=this.unwrapTag;for(i=e.firstChild;i;i=i.nextSibling){for(n=r.create(e.ownerDocument,a||"p");i.firstChild;)o=i.firstChild,r.isBlock(o)?(n.firstChild&&(s.appendChild(n),n=r.create(e.ownerDocument,a||"p")),s.appendChild(o)):n.appendChild(o);n.firstChild&&s.appendChild(n)}t=this._parentLists(e),t[0]?(r.insertAfter(s,t.last()[0]),t.last().remove()):r.insertAfter(s,e),r.remove(e)},remove:function(e){var t,i,n;for(i=0,n=e.length;i<n;i++)t=this.finder.findFormat(e[i]),t&&this.unwrap(t)},toggle:function(e){var t,i=this,n=h(e),o=e.commonAncestorContainer;n.length||(e.selectNodeContents(o),n=h(e),n.length||(t=o.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),n=[t],e.selectNode(t.parentNode))),n=r.filterBy(n,r.htmlIndentSpace,!0),i.finder.isFormatted(n)?(i.split(e),i.remove(n)):i.apply(n)}}),g=l.extend({init:function(e){e.formatter=new m(e.tag),l.fn.init.call(this,e)}}),v=d.extend({init:function(e){this.options=e,d.fn.init.call(this,n(e,{finder:new f(e.tag)}))},command:function(e){return new g(n(e,{tag:this.options.tag}))}});n(o,{ListFormatFinder:f,ListFormatter:m,ListCommand:g,ListTool:v}),p("insertUnorderedList",new v({tag:"ul",template:new c({template:a.buttonTemplate,title:"Insert unordered list"})})),p("insertOrderedList",new v({tag:"ol",template:new c({template:a.buttonTemplate,title:"Insert ordered list"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/formatting.min",["editor/plugins/inlineformat.min"],e)}(function(){!function(e){function t(e){var t,o,r=l.closestEditableOfType(e,["li"]);r&&(t=new n.ListFormatter(l.name(r.parentNode)),o=i.ui.editor.W3CRange.fromNode(e),o.selectNode(r),t.toggle(o))}var i=window.kendo,n=i.ui.editor,o=n.Tool,r=n.ToolTemplate,s=n.DelayedExecutionTool,a=n.Command,l=n.Dom,c=n.EditorUtils,d=n.RangeUtils,u=c.registerTool,h=s.extend({init:function(e){var t=this;o.fn.init.call(t,i.deepExtend({},t.options,e)),t.type="kendoSelectBox",t.finder={getFormat:function(){return""}}},options:{items:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],width:110},toFormattingItem:function(e){var t,i=e.value;return i?e.tag||e.className?e:(t=i.indexOf("."),0===t?e.className=i.substring(1):t==-1?e.tag=i:(e.tag=i.substring(0,t),e.className=i.substring(t+1)),e):e},command:function(t){var i=this,o=t.value;return o=this.toFormattingItem(o),new n.FormatCommand({range:t.range,formatter:function(){var t,r=(o.tag||o.context||"span").split(","),s=[{tags:r,attr:{className:o.className||""}}];return t=e.inArray(r[0],l.inlineElements)>=0?new n.GreedyInlineFormatter(s):new n.GreedyBlockFormatter(s),t.editor=i.editor,t}})},initialize:function(e,t){var n=t.editor,r=this.options,s=r.name,a=this;a.editor=n,e.width(r.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:r.items||n.options[s],title:n.options.messages[s],autoSize:!0,change:function(){var e=this.dataItem();e&&o.exec(n,s,e.toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e<t.length;e++)t[e]=a.toFormattingItem(t[e])},highlightFirst:!1,template:i.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+s).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,i){var n,o,r,s,a,l,c;for(n=0;n<t.length;n++)if(o=t[n],r=o.tag||o.context||"",s=o.className?"."+o.className:"",a=r+s,l=e(i[0]).closest(a)[0]){if(1==i.length)return o.value;for(c=1;c<i.length&&e(i[c]).closest(a)[0];c++)if(c==i.length-1)return o.value}return""},update:function(t,i){var n,o,r,a,c,d=e(t).data(this.type);if(d&&(n=d.dataSource,o=n.data(),c=l.commonAncestor.apply(null,i),c==l.closestEditable(c)||this._ancestor!=c)){for(this._ancestor=c,r=0;r<o.length;r++)a=o[r].context,o[r].visible=!a||!!e(c).closest(a).length;n.filter([{field:"visible",operator:"eq",value:!0}]),s.fn.update.call(this,t,i),d.value(this.getFormattingValue(n.view(),i)),d.wrapper.toggleClass("k-state-disabled",!n.view().length)}},destroy:function(){this._ancestor=null}}),p=a.extend({exec:function(){var e,t,i,n=this.lockRange(!0);for(this.tagsToClean=this.options.remove||"strong,em,span,sup,sub,del,b,i,u,font".split(","),d.wrapSelectedElements(n),e=d.mapAll(n,function(e){return e}),t=e.length-1;t>=0;t--)i=e[t],this.immutableParent(i)||this.clean(i);this.releaseRange(n)},clean:function(i){var o,r,s,a,c;if(i&&!l.isMarker(i)){if(o=l.name(i),"ul"==o||"ol"==o)for(r=new n.ListFormatter(o),s=i.previousSibling,a=i.nextSibling,r.unwrap(i);s&&s!=a;s=s.nextSibling)this.clean(s);else if("blockquote"==o)l.changeTag(i,"p");else if(1!=i.nodeType||l.insignificant(i))t(i);else{for(c=i.childNodes.length-1;c>=0;c--)this.clean(i.childNodes[c]);i.removeAttribute("style"),i.removeAttribute("class")}e.inArray(o,this.tagsToClean)>-1&&l.unwrap(i)}},immutableParent:function(e){return this.immutables()&&n.Immutables.immutableParent(e)}});e.extend(n,{FormattingTool:h,CleanFormatCommand:p}),u("formatting",new h({template:new r({template:c.dropDownListTemplate,title:"Format"})})),u("cleanFormatting",new o({command:p,template:new r({template:c.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/image.min",["kendo.imagebrowser.min","editor/command.min"],e)}(function(){!function(e,t){var i=window.kendo,n=e.extend,o=i.ui.editor,r=o.EditorUtils,s=o.Dom,a=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,d=o.Command,u=i.keys,h="#k-editor-image-url",p="#k-editor-image-title",f="#k-editor-image-width",m="#k-editor-image-height",g=d.extend({init:function(e){var t=this;d.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var i,n=this.attributes,o=c.documentFromRange(t);if(n.src&&"http://"!=n.src){if(i=function(){setTimeout(function(){n.width||e.removeAttribute("width"),n.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=s.create(o,"img",n),e.onload=e.onerror=i,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(o.createTextNode("\ufeff"),e),i(),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;e.onload=e.onerror=i,s.attr(e,n),i()}return!1},_dialogTemplate:function(e){return i.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-url"></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-title"></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-width"></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-height"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(c.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=a.element,i=parseInt(t.find(f).val(),10),n=parseInt(t.find(m).val(),10);g.attributes={src:t.find(h).val().replace(/ /g,"%20"),alt:t.find(p).val()},g.attributes.width=null,g.attributes.height=null,!isNaN(i)&&i>0&&(g.attributes.width=i),!isNaN(n)&&n>0&&(g.attributes.height=n),_=g.insertImage(b,v),o(e),g.change&&g.change()}function o(e){e.preventDefault(),a.destroy(),s.windowFromDocument(c.documentFromRange(v)).focus(),_||g.releaseRange(v)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&o(t)}var a,l,d,g=this,v=g.lockRange(),_=!1,b=c.image(v),w=b&&b.getAttribute("width")||"",y=b&&b.getAttribute("height")||"",k=i.support.browser.msie,x=g.editor.options,C=x.messages,S=x.imageBrowser,T=!!(i.ui.ImageBrowser&&S&&S.transport&&S.transport.read!==t),D={title:C.insertImage,visible:!1,resizable:T};this.expandImmutablesIn(v),D.close=o,T&&(D.width=750),a=this.createDialog(g._dialogTemplate(T),D).toggleClass("k-filebrowser-dialog",T).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(h).val(b?b.getAttribute("src",2):"http://").end().find(p).val(b?b.alt:"").end().find(f).val(w).end().find(m).val(y).end().data("kendoWindow"),l=a.element,T&&(this._imageBrowser=new i.ui.ImageBrowser(l.find(".k-imagebrowser"),n({},S)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(h).val(this.value())}),this._imageBrowser.bind("apply",e)),k&&(d=l.closest(".k-window").height(),l.css("max-height",d)),a.center().open(),l.find(h).focus().select()}});i.ui.editor.ImageCommand=g,a("insertImage",new o.Tool({command:g,template:new l({template:r.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/import.min",["editor/main.min"],e)}(function(){!function(e,t){var i=window.kendo,n=e.extend,o=e.proxy,r=i.ui.editor,s=r.EditorUtils,a=r.Command,l=r.Tool,c=s.registerTool,d=r.ToolTemplate,u='<div contenteditable="false" class="k-loading-mask" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;"><div class="k-loading-image"></div><div class="k-loading-color"></div></div>',h=a.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,i=t.editor,n=i.options["import"],r=e('<input id="editorImport" name="files" type="file" />').kendoUpload({success:o(t._onUploadSuccess,t),progress:o(t._onUploadProgress,t),select:o(t._onUploadSelect,t),error:o(t._onUploadError,t),complete:o(t._onUploadComplete,t),showFileList:!1,multiple:!1,async:{saveUrl:n.proxyUrl,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:n.allowedExtensions,maxFileSize:n.maxFileSize}}).getKendoUpload();return i._uploadWidget=r,r},_onUploadComplete:function(e){this._trigger("complete",e),e.sender.clearAllFiles(),this._removeLoadingOverlay()},_onUploadSuccess:function(e){this.editor.value(e.response.html.replace(/<\/?body>/gi,"")),this._trigger("success",e)},_onUploadProgress:function(e){this._trigger("progress",e)},_onUploadSelect:function(e){this._trigger("select",e),e.files[0].validationErrors||this._initLoadingOverlay()},_onUploadError:function(e){this._trigger("error",e)},_trigger:function(e,t){var i=this.editor,n=i.options["import"];"function"==typeof n[e]&&n[e].call(i,t)},_initLoadingOverlay:function(){var t=this.editor.body;r.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(u):this._container=e(t).append(u),i.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){i.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});n(r,{ImportCommand:h}),c("import",new l({command:h,template:new d({template:s.buttonTemplate,title:"Import"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/insert.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,i=t.ui.editor,n=i.Command,o=i.GenericCommand,r=i.EditorUtils,s=r.registerTool,a=i.Tool,l=i.ToolTemplate,c=i.RestorePoint,d=e.extend,u=n.extend({init:function(e){n.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e,t=this.editor,i=this.options,n=i.range,r=t.body,s=new c(n,r),a=i.html||i.value||"";t.selectRange(n),t.clipboard.paste(a,i),i.postProcess&&i.postProcess(t,t.getRange()),e=new o(s,new c(t.getRange(),r)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),h=a.extend({initialize:function(e,t){var n=t.editor,o=this.options,r=o.items?o.items:n.options.insertHtml;this._selectBox=new i.SelectBox(e,{dataSource:r,dataTextField:"text",dataValueField:"value",change:function(){a.exec(n,"insertHtml",this.value())},title:n.options.messages.insertHtml,highlightFirst:!1})},command:function(e){return new u(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});d(i,{InsertHtmlCommand:u,InsertHtmlTool:h}),s("insertHtml",new h({template:new l({template:r.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/export.min",["editor/main.min"],e)}(function(){!function(e,t){var i=window.kendo,n=e.extend,o=e.proxy,r=i.ui.editor,s=r.EditorUtils,a=r.Command,l=r.Tool,c=s.registerTool,d=r.ToolTemplate,u=[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}],h=a.extend({init:function(e){var t=this;t.options=e,a.fn.init.call(t,e),t.attributes=null,t.exportType=e.exportType},exec:function(){var e=this,t=this.lockRange(!0);e.postToProxy(),e.releaseRange(t)},postToProxy:function(){this.generateForm().appendTo("body").submit().remove()},generateForm:function(){var t=this,i=t.editor.options.exportAs,n=e("<form>").attr({action:i&&i.proxyURL||"",method:"POST"});return n.append([t.valueInput(),t.exportTypeInput(),t.fileNameInput()]),n},valueInput:function(){var t=this.editor;return e("<input>").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){var t=this;return e("<input>").attr({value:t.exportType,name:"exportType",type:"hidden"})},fileNameInput:function(){var t=this.editor,i=t.options.exportAs,n=i&&i.fileName||t.element.attr("id")||"editor";return e("<input>").attr({value:n,name:"fileName",type:"hidden"})}}),p=l.extend({init:function(e){var t=this;l.fn.init.call(t,i.deepExtend({},t.options,e)),t.type="kendoSelectBox"},options:{items:u,width:115},command:function(e){var t=e.value;return new r.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var n=this,r=t.editor,s=n.options,a=s.name,l=o(n.changeHandler,n),c=s.items||r.options[a];c.unshift({text:r.options.messages[a],value:""}),n.editor=r,e.width(s.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:c,autoSize:!0,change:l,open:function(e){var t=e.sender;t.items()[0].style.display="none",t.unbind("open")},highlightFirst:!1,template:i.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+a).find("*").addBack().attr("unselectable","on")},changeHandler:function(e){var t=e.sender,i=t.dataItem(),n=i&&i.value;this._exec(n),t.value("")},_exec:function(e){e&&l.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});n(r,{ExportAsTool:p,ExportAsCommand:h}),c("exportAs",new p({template:new d({template:s.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/indent.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){function i(i,n){var o="rtl"==e(i).css("direction"),r=o?"Right":"Left",s="td"!=a.name(i)?"margin"+r:"padding"+r;return n===t?i.style[s]||0:(n>0?i.style[s]=n+"px":(i.style[s]="",i.style.cssText||i.removeAttribute("style")),t)}var n=window.kendo,o=n.Class,r=e.extend,s=n.ui.editor,a=s.Dom,l=s.EditorUtils,c=l.registerTool,d=s.Command,u=s.Tool,h=s.ToolTemplate,p=s.RangeUtils,f=a.blockElements,m=s.BlockFormatFinder,g=s.BlockFormatter,v=o.extend({init:function(){this.finder=new m([{tags:a.blockElements}])},apply:function(t){var n,o,r,s,l,c,d,u,h,p,f,m;if(t=a.filterBy(t,a.htmlIndentSpace,!0),n=this.finder.findSuitable(t),o=[],n=this.mapImmutables(n),n.length){for(r=0,s=n.length;r<s;r++)a.is(n[r],"li")?e(n[r]).index()?e.inArray(n[r].parentNode,o)<0&&o.push(n[r]):o.push(n[r].parentNode):o.push(n[r]);for(;o.length;)if(l=o.shift(),a.is(l,"li"))if(c=l.parentNode,d=e(l).prev("li"),u=d.find("ul,ol").last(),h=e(l).children("ul,ol")[0],h&&d[0])u[0]?(u.append(l),u.append(e(h).children()),a.remove(h)):(d.append(h),h.insertBefore(l,h.firstChild));else for(h=d.children("ul,ol")[0],h||(h=a.create(l.ownerDocument,a.name(c)),d.append(h));l&&l.parentNode==c;)h.appendChild(l),l=o.shift();else for(p=parseInt(i(l),10)+30,i(l,p),f=0;f<o.length;f++)e.contains(l,o[f])&&o.splice(f,1)}else m=new g([{tags:["p"]}],{style:{marginLeft:30}}),m.apply(t)},mapImmutables:function(t){if(this.immutables){var i=[];return e.map(t,function(t){var n=s.Immutables.immutableParent(t);if(n){if(e.inArray(n,i)!==-1)return null;i.push(n)}return n||t})}return t},remove:function(t){t=a.filterBy(t,a.htmlIndentSpace,!0);var n,o,r,s,l,c,d,u,h=this.finder.findSuitable(t);for(h=this.mapImmutables(h),o=0,r=h.length;o<r;o++){if(d=e(h[o]),d.is("li")){if(s=d.parent(),l=s.parent(),l.is("li,ul,ol")&&!i(s[0])){if(n&&e.contains(n,l[0]))continue;c=d.nextAll("li"),c.length&&e(s[0].cloneNode(!1)).appendTo(d).append(c),l.is("li")?d.insertAfter(l):d.appendTo(l),s.children("li").length||s.remove();continue}if(n==s[0])continue;n=s[0]}else n=h[o];u=parseInt(i(n),10)-30,i(n,u)}}}),_=d.extend({init:function(t){var i=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.apply(p.nodes(e))},i)},d.fn.init.call(this,t)}}),b=d.extend({init:function(t){var i=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.remove(p.nodes(e))},i)},d.fn.init.call(this,t)}}),w=u.extend({init:function(e){u.fn.init.call(this,e),this.finder=new m([{tags:f}])},initialize:function(t,i){u.fn.initialize.call(this,t,i),e.extend(this.options,{immutables:i.editor&&i.editor.options.immutables}),t.addClass("k-state-disabled")},update:function(n,o){var r,l,c,d,u,h,p=this.finder.findSuitable(o);for(c=0,d=p.length;c<d;c++)if(u=p[c],this.options.immutables&&(h=s.Immutables.immutableParent(u),h&&(u=h)),r=i(u),r||(l=e(u).parents("ul,ol").length,r=a.is(u,"li")&&(l>1||i(u.parentNode))||a.ofType(u,["ul","ol"])&&l>0),r)return n.removeClass("k-state-disabled"),t;n.addClass("k-state-disabled").removeClass("k-state-hover")}});r(s,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:w}),c("indent",new u({command:_,template:new h({template:l.buttonTemplate,title:"Indent"})})),c("outdent",new w({command:b,template:new h({template:l.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/linebreak.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,i=e.extend,n=t.ui.editor,o=n.Dom,r=n.Command,s=n.Tool,a=n.BlockFormatter,l=o.normalize,c=n.RangeUtils,d=n.EditorUtils.registerTool,u=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},_insertMarker:function(e,t){var i,n=o.create(e,"a");return n.className="k-marker",t.insertNode(n),n.parentNode||(i=t.commonAncestorContainer,i.innerHTML="",i.appendChild(n)),l(n.parentNode),n},_moveFocus:function(e,t){var i,n;if(o.isEmpty(t))e.setStartBefore(t);else{if(e.selectNodeContents(t),i=c.textNodes(e)[0],!i){for(;t.childNodes.length&&!o.is(t.firstChild,"br");)t=t.firstChild;i=t}o.isEmpty(i)?e.setStartBefore(i):(o.emptyNode(i)&&(i.innerHTML="\ufeff"),n=i.firstChild||i,o.isDataNode(n)?e.setStart(n,0):e.setStartBefore(n))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),i=o.parentOfType(e.startContainer,t),n=o.parentOfType(e.endContainer,t);return i&&!n||!i&&n},_blankAfter:function(e){for(;e&&(o.isMarker(e)||""===o.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,i,r,s,d,u,h,p,f,m,g,v,_,b,w=this.getRange(),y=c.documentFromRange(w),k=n.emptyElementContent;this.expandImmutablesIn(w),m=this.shouldTrim(w),w.deleteContents(),d=this._insertMarker(y,w),o.stripBomNode(d.previousSibling),o.stripBomNode(d.nextSibling),u=o.closestEditableOfType(d,["li"]),h=o.closestEditableOfType(d,"h1,h2,h3,h4,h5,h6".split(",")),p=o.is(d.parentNode,"table")&&d.parentNode,u?o.emptyNode(u)&&(s=o.create(y,"p"),o.next(u)&&(f=w.cloneRange(),f.selectNode(u),c.split(f,u.parentNode)),g=e("br",u),1==g.length&&g.remove(),v=u.parentNode,_=u.parentNode.children.length,b=_>1&&1==u.childNodes.length&&u.children[0],o.insertAfter(s,v),o.remove(1==_?u.parentNode:u),b&&b!==d?(s.appendChild(b),s.appendChild(d)):s.innerHTML=k,r=s):h&&this._blankAfter(d)?(s=this._insertParagraphAfter(h),o.remove(d),r=s):p&&(s=this._insertParagraphAfter(p),o.remove(d),r=s),r||(u||h||new a([{tags:["p"]}]).apply([d]),w.selectNode(d),t=o.parentOfType(d,[u?"li":h?o.name(h):"p"]),c.split(w,t,m),i=t.previousSibling,o.is(i,"li")&&i.firstChild&&!o.is(i.firstChild,"br")&&(i=i.firstChild),r=t.nextSibling,this.clean(i,{links:!0}),this.clean(r,{links:!0}),o.is(r,"li")&&r.firstChild&&!o.is(r.firstChild,"br")&&(r=r.firstChild),o.remove(t),l(i)),l(r),this._moveFocus(w,r),w.collapse(!0),o.scrollTo(r,!0),c.selectRange(w)},_insertParagraphAfter:function(e){var t=this.getRange(),i=c.documentFromRange(t),r=n.emptyElementContent,s=o.create(i,"p");return o.insertAfter(s,e),s.innerHTML=r,s},clean:function(t,i){var r,s=t;if(t.firstChild&&o.is(t.firstChild,"br")&&o.remove(t.firstChild),o.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(r=!1;t.firstChild&&1==t.firstChild.nodeType;)r=r||o.significantNodes(t.childNodes).length>1,t=t.firstChild;if(o.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||r||(e(s).find(".k-br").remove(),t.innerHTML=n.emptyElementContent),i&&i.links)for(;t!=s;){if(o.is(t,"a")&&o.emptyNode(t)){o.unwrap(t);break}t=t.parentNode}}}}),h=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var e,i,n,r,s,a,d=this.getRange();this.expandImmutablesIn(d),e=o.create(c.documentFromRange(d),"br"),i=d.startContainer,r=t.support.browser,s=r.msie&&r.version<11,a=o.is(i,"table")&&i,d.deleteContents(),a?o.insertAfter(e,a):d.insertNode(e),l(e.parentNode),s||e.nextSibling&&!o.isWhitespace(e.nextSibling)||(n=e.cloneNode(!0),n.className="k-br",o.insertAfter(n,e)),d.setStartAfter(e),d.collapse(!0),o.scrollTo(e.nextSibling||e,!0),c.selectRange(d)}});i(n,{ParagraphCommand:u,NewLineCommand:h}),d("insertLineBreak",new s({key:13,shift:!0,command:h})),d("insertParagraph",new s({key:13,command:u}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/file.min",["kendo.filebrowser.min","editor/plugins/link.min"],e)}(function(){!function(e,t){var i=window.kendo,n=e.extend,o=i.ui.editor,r=o.EditorUtils,s=o.Dom,a=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,d=o.Command,u=o.LinkFormatter,h=c.textNodes,p=i.keys,f="#k-editor-file-url",m="#k-editor-file-text",g="#k-editor-file-title",v=d.extend({init:function(e){var t=this;d.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var i=this.attributes,n=c.documentFromRange(t);if(i.href&&"http://"!=i.href){if(!e)return e=s.create(n,"a",{href:i.href}),e.innerHTML=i.innerHTML,e.title=i.title,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(n.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;s.attr(e,i)}return!1},_dialogTemplate:function(e){return i.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-url"></div><div class=\'k-edit-label\'><label for="k-editor-file-text">#: messages.fileText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-text"></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-title"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();this.formatter.apply(t,this.attributes),e.releaseRange(t)},exec:function(){function e(e){var t=a.element,i=t.find(f).val().replace(/ /g,"%20"),n=t.find(m).val(),r=t.find(g).val();u.attributes={href:i,innerHTML:""!==n?n:i,title:r},b=u.insertFile(w,v),o(e),u.change&&u.change()}function o(e){e.preventDefault(),a.destroy(),s.windowFromDocument(c.documentFromRange(v)).focus(),b||u.releaseRange(v)}function r(t){t.keyCode==p.ENTER?e(t):t.keyCode==p.ESC&&o(t)}var a,l,d,u=this,v=u.lockRange(),_=h(v),b=!1,w=_.length?this.formatter.finder.findSuitable(_[0]):null,y=i.support.browser.msie,k=u.editor.options,x=k.messages,C=k.fileBrowser,S=!!(i.ui.FileBrowser&&C&&C.transport&&C.transport.read!==t),T={title:x.insertFile,visible:!1,resizable:S};this.expandImmutablesIn(v),T.close=o,S&&(T.width=750),a=this.createDialog(u._dialogTemplate(S),T).toggleClass("k-filebrowser-dialog",S).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(f).val(w?w.getAttribute("href",2):"http://").end().find(m).val(w?w.innerText:"").end().find(g).val(w?w.title:"").end().data("kendoWindow"),l=a.element,S&&(u._fileBrowser=new i.ui.FileBrowser(l.find(".k-filebrowser"),n({},C)),u._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(f).val(this.value())}),u._fileBrowser.bind("apply",e)),y&&(d=l.closest(".k-window").height(),l.css("max-height",d)),a.center().open(),l.find(f).focus().select()}});i.ui.editor.FileCommand=v,a("insertFile",new o.Tool({command:v,template:new l({template:r.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/tables.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){var i=window.kendo,n=e.extend,o=e.proxy,r=i.ui.editor,s=r.Dom,a=r.EditorUtils,l=r.RangeUtils,c=r.Command,d="kendoEditor",u="k-state-active",h="k-state-selected",p=r.Tool,f=r.ToolTemplate,m=r.InsertHtmlCommand,g=r.BlockFormatFinder,v=r.EditorUtils.registerTool,_=i.getTouches,b=i.template,w="<td style='width:#=width#%;'>#=content#</td>",y=new g([{
tags:["table"]}]),k=m.extend({init:function(t){var i=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});m.fn.init.call(this,i)},_tableHtml:function(e,t){var i,n;return e=e||1,t=t||1,i=b(w)({width:100/t,content:r.emptyTableCellContent}),n=100/e,"<table class='k-table' data-last>"+Array(e+1).join("<tr style='height:"+n+"%;'>"+Array(t+1).join(i)+"</tr>")+"</table>"},postProcess:function(t,i){var n=e("table[data-last]",t.document).removeAttr("data-last");i.setStart(n.find("td")[0],0),i.collapse(!0),t.selectRange(i)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),m.fn.exec.call(this)}}),x=p.extend({initialize:function(t,i){var n,s,l,c;p.fn.initialize.call(this,t,i),n=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:o(this._open,this),activate:o(this._activate,this),close:o(this._close,this)}).data("kendoPopup"),t.click(o(this._toggle,this)).keydown(o(this._keydown,this)),s=this._editor=i.editor,this._popup=n,l=new r.TableWizardTool({template:new f({template:a.buttonTemplate,title:s.options.messages.tableWizard}),command:r.TableWizardCommand,insertNewTable:!0}),v("tableWizardInsert",l),c=e("<div class='k-editor-toolbar'>"+l.options.template.getHtml()+"</div>"),c.appendTo(n.element),s.toolbar&&s.toolbar.attachToolsEvents(c)},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(u)},_close:function(){this._popup.options.anchor.removeClass(u)},_keydown:function(e){var t=i.keys,n=e.keyCode;n==t.DOWN&&e.altKey?this._popup.open():n==t.ESC&&this._popup.close()},_toggle:function(t){var i=e(t.target).closest(".k-tool");i.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),e.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),C=x.extend({init:function(t){this.cols=8,this.rows=6,x.fn.init.call(this,e.extend(t,{command:k,popupTemplate:"<div class='k-ct-popup'>"+Array(this.cols*this.rows+1).join("<span class='k-ct-cell k-state-disabled' />")+"<div class='k-status'></div></div>"}))},_activate:function(){function t(t){var i=e(window);return{row:Math.floor((t.clientY+i.scrollTop()-u.top)/o)+1,col:Math.floor((t.clientX+i.scrollLeft()-u.left)/n)+1}}var n,o,r=this,s=r._popup.element,a=s.find(".k-ct-cell"),l=a.eq(0),c=a.eq(a.length-1),u=i.getOffset(l),h=i.getOffset(c),p=r.cols,f=r.rows;s.find("*").addBack().attr("unselectable","on"),h.left+=c[0].offsetWidth,h.top+=c[0].offsetHeight,n=(h.left-u.left)/p,o=(h.top-u.top)/f,s.autoApplyNS(d).on("mousemove",".k-ct-cell",function(e){r._setTableSize(t(e))}).on("mouseleave",".k-ct-cell",function(){r._setTableSize()}).on("down",".k-ct-cell",function(e){e.preventDefault();var i=_(e)[0];r._exec(t(i.location))})},_valid:function(e){return e&&e.row>0&&e.col>0&&e.row<=this.rows&&e.col<=this.cols},_exec:function(e){this._valid(e)&&(this._editor.exec("createTable",{rows:e.row,columns:e.col}),this._popup.close())},_setTableSize:function(t){var n=this._popup.element,o=n.find(".k-status"),r=n.find(".k-ct-cell"),s=this.cols,a=this._editor.options.messages;this._valid(t)?(o.text(i.format(a.createTableHint,t.row,t.col)),r.each(function(i){e(this).toggleClass(h,i%s<t.col&&i/s<t.row)})):(o.text(a.createTable),r.removeClass(h))},_keydown:function(e){var t,n,o,r,s,a,l,c;x.fn._keydown.call(this,e),this._popup.visible()&&(t=i.keys,n=e.keyCode,o=this._popup.element.find(".k-ct-cell"),r=Math.max(o.filter(".k-state-selected").last().index(),0),s=Math.floor(r/this.cols),a=r%this.cols,l=!1,n!=t.DOWN||e.altKey?n==t.UP?(l=!0,s--):n==t.RIGHT?(l=!0,a++):n==t.LEFT&&(l=!0,a--):(l=!0,s++),c={row:Math.max(1,Math.min(this.rows,s+1)),col:Math.max(1,Math.min(this.cols,a+1))},n==t.ENTER?this._exec(c):this._setTableSize(c),l&&(e.preventDefault(),e.stopImmediatePropagation()))},_open:function(){var e=this._editor.options.messages;x.fn._open.call(this),this.popup().element.find(".k-status").text(e.createTable).end().find(".k-ct-cell").removeClass(h)},_close:function(){x.fn._close.call(this),this.popup().element.off("."+d)}}),S=c.extend({exec:function(){for(var e,t,i,n,o=this.lockRange(!0),a=o.endContainer;"td"!=s.name(a);)a=a.parentNode;if(!this.immutables()||!r.Immutables.immutableParent(a)){for(t=a.parentNode,e=t.children.length,i=t.cloneNode(!0),n=0;n<t.cells.length;n++)i.cells[n].innerHTML=r.emptyTableCellContent;"before"==this.options.position?s.insertBefore(i,t):s.insertAfter(i,t),this.releaseRange(o)}}}),T=c.extend({exec:function(){var e,t,i,n,o=this.lockRange(!0),a=s.closest(o.endContainer,"td"),l=s.closest(a,"table"),c=l.rows,d=this.options.position;if(!this.immutables()||!r.Immutables.immutableParent(a)){for(e=s.findNodeIndex(a,!0),t=0;t<c.length;t++)i=c[t].cells[e],n=i.cloneNode(),n.innerHTML=r.emptyTableCellContent,"before"==d?s.insertBefore(n,i):s.insertAfter(n,i);this.releaseRange(o)}}}),D=c.extend({exec:function(){var t,i,n,o=this.lockRange(),a=l.mapAll(o,function(t){return e(t).closest("tr")[0]}),c=a[0];if(!this.immutables()||!r.Immutables.immutableParent(c)){if(t=s.closest(c,"table"),t.rows.length<=a.length)i=s.next(t),i&&!s.insignificant(i)||(i=s.prev(t)),s.remove(t);else for(n=0;n<a.length;n++)c=a[n],s.removeTextSiblings(c),i=s.next(c)||s.prev(c),i=i.cells[0],s.remove(c);i&&(o.setStart(i,0),o.collapse(!0),this.editor.selectRange(o))}}}),A=c.extend({exec:function(){var e,t,i=this.lockRange(),n=s.closest(i.endContainer,"td"),o=s.closest(n,"table"),a=o.rows,l=s.findNodeIndex(n,!0),c=a[0].cells.length;if(!this.immutables()||!r.Immutables.immutableParent(n)){if(1==c)e=s.next(o),e&&!s.insignificant(e)||(e=s.prev(o)),s.remove(o);else for(s.removeTextSiblings(n),e=s.next(n)||s.prev(n),t=0;t<a.length;t++)s.remove(a[t].cells[l]);e&&(i.setStart(e,0),i.collapse(!0),this.editor.selectRange(i))}}}),E=p.extend({command:function(e){return e=n(e,this.options),"delete"==e.action?"row"==e.type?new D(e):new A(e):"row"==e.type?new S(e):new T(e)},initialize:function(e,t){p.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){var i=!y.isFormatted(t);e.toggleClass("k-state-disabled",i)}});n(i.ui.editor,{PopupTool:x,TableCommand:k,InsertTableTool:C,TableModificationTool:E,InsertRowCommand:S,InsertColumnCommand:T,DeleteRowCommand:D,DeleteColumnCommand:A}),v("createTable",new C({template:new f({template:a.buttonTemplate,popup:!0,title:"Create table"})})),v("addColumnLeft",new E({type:"column",position:"before",template:new f({template:a.buttonTemplate,title:"Add column on the left"})})),v("addColumnRight",new E({type:"column",template:new f({template:a.buttonTemplate,title:"Add column on the right"})})),v("addRowAbove",new E({type:"row",position:"before",template:new f({template:a.buttonTemplate,title:"Add row above"})})),v("addRowBelow",new E({type:"row",template:new f({template:a.buttonTemplate,title:"Add row below"})})),v("deleteRow",new E({type:"row",action:"delete",template:new f({template:a.buttonTemplate,title:"Delete row"})})),v("deleteColumn",new E({type:"column",action:"delete",template:new f({template:a.buttonTemplate,title:"Delete column"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/clipboard.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,i=t.Class,n=t.ui.editor,o=n.RangeUtils,r=n.Dom,s=n.RestorePoint,a=n.Marker,l=t.support.browser,c=e.extend,d=i.extend({init:function(e){this.editor=e;var t=e.options.pasteCleanup;this.cleaners=[new h(t),new p(t),new f(t),new m(t),new v(t),new _(t),new k(t),new x(t)]},htmlToFragment:function(e){var t=this.editor,i=t.document,n=r.create(i,"div"),o=i.createDocumentFragment();for(n.innerHTML=e;n.firstChild;)o.appendChild(n.firstChild);return o},isBlock:function(e){return/<(div|p|ul|ol|table|h[1-6])/i.test(e)},_startModification:function(){var e,t,i=this.editor;if(!this._inProgress)return this._inProgress=!0,e=i.getRange(),t=new s(e,i.body),r.persistScrollTop(i.document),{range:e,restorePoint:t}},_endModification:function(e){n._finishUpdate(this.editor,e.restorePoint),this.editor._selectionChange(),this._inProgress=!1},_contentModification:function(e,t){var i=this,n=i.editor,o=i._startModification();o&&(e.call(i,n,o.range),setTimeout(function(){t.call(i,n,o.range),i._endModification(o)}))},_removeBomNodes:function(e){var t,i=o.textNodes(e);for(t=0;t<i.length;t++)i[t].nodeValue=r.stripBom(i[t].nodeValue)||i[t].nodeValue},_onBeforeCopy:function(e){var t=new a;t.add(e),this._removeBomNodes(e),t.remove(e),this.editor.selectRange(e)},oncopy:function(){this._onBeforeCopy(this.editor.getRange())},oncut:function(){this._onBeforeCopy(this.editor.getRange()),this._contentModification(e.noop,e.noop)},_fileToDataURL:function(t){var i=e.Deferred(),n=new FileReader;return t instanceof window.File||!t.getAsFile||(t=t.getAsFile()),n.onload=e.proxy(i.resolve,i),n.readAsDataURL(t),i.promise()},_triggerPaste:function(e,t){var i={html:e||""};i.html=i.html.replace(/\ufeff/g,""),this.editor.trigger("paste",i),this.paste(i.html,t||{})},_handleImagePaste:function(e){var t,i;if("FileReader"in window&&!(l.msie&&l.version>10))return t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},i=t.items||t.files,this._insertImages(i)},_insertImages:function(t){var i,n,o;if(t&&(i=e.grep(t,function(e){return/^image\//i.test(e.type)}),n=e.grep(t,function(e){return/^text\/html/i.test(e.type)}),!n.length&&i.length&&(o=this._startModification())))return e.when.apply(e,e.map(i,this._fileToDataURL)).done(e.proxy(function(){var t=Array.prototype.slice.call(arguments),i=e.map(t,function(e){return'<img src="'+e.target.result+'" />'}).join("");this._triggerPaste(i),this._endModification(o)},this)),!0},onpaste:function(i){if("false"!==this.editor.body.contentEditable){if(this._handleImagePaste(i))return void i.preventDefault();this.expandImmutablesIn(),this._contentModification(function(n,o){var s,a,l,c=r.create(n.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),d=t.support.browser,u=n.body;this._decoreateClipboardNode(c,u),u.appendChild(c),d.webkit&&this._moveToCaretPosition(c,o),d.msie&&d.version<11?(i.preventDefault(),s=n.createRange(),s.selectNodeContents(c),n.selectRange(s),a=n.document.body.createTextRange(),a.moveToElementText(c),e(u).unbind("paste"),a.execCommand("Paste"),e(u).bind("paste",e.proxy(this.onpaste,this))):(l=n.createRange(),l.selectNodeContents(c),n.selectRange(l)),o.deleteContents()},function(t,i){var n,o="";t.selectRange(i),n=e(t.body).children(".k-paste-container"),n.each(function(){var e=this.lastChild;e&&r.is(e,"br")&&r.remove(e),o+=this.innerHTML}),n.remove(),this._triggerPaste(o,{clean:!0})})}},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){var t,i;"FileReader"in window&&(t=(e.originalEvent||e).dataTransfer||{},i=t.items||t.files,this._insertImages(i)&&e.preventDefault())},_decoreateClipboardNode:function(t,i){var n,o,r,s;(l.msie||l.webkit)&&(t=e(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.msie&&(n=e(i.ownerDocument.documentElement),t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"}),o=n.css("color"),o&&t.css("color",o),r=n.css("fontFamily"),r&&t.css("fontFamily",r),s=n.css("fontSize"),s&&t.css("fontSize",s)))},_moveToCaretPosition:function(t,i){var n=this,o=n.editor.body,s=r.offset(t,o),a=n._caretOffset(i,o),l=a.left-s.left,c=a.top-s.top,d="translate("+l+"px,"+c+"px)";e(t).css({"-webkit-transform":d,transform:d})},_caretOffset:function(e,t){var i,n,o,s,a,l,c=this.editor,d=r.create(c.document,"span",{innerHTML:"\ufeff"}),u=e.startContainer;return e.collapsed?(n=r.isDataNode(u),n&&(r.isBom(u)||0===e.startOffset)?r.insertBefore(d,u):n&&e.startOffset===u.length?r.insertAfter(d,u):(e.insertNode(d),i=!0)):(u=u===t?u.childNodes[e.startOffset]:u,r.insertBefore(d,u)),o=r.offset(d,t),s=d.previousSibling,a=d.nextSibling,r.remove(d),i&&r.isDataNode(s)&&r.isDataNode(a)&&!r.isBom(s)&&!r.isBom(a)&&(l=s.length,a.data=s.data+a.data,e.setStart(a,l),r.remove(s),e.collapse(!0),c.selectRange(e)),o},expandImmutablesIn:function(e){var i,n,o,r=this.editor;r&&r.options.immutables&&(i=r.body,e=e||r.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===i&&0===e.startOffset&&(n=i.ownerDocument,o=n.createTextNode("\ufeff"),i.insertBefore(o,i.childNodes[0]),e.setStartBefore(o)),r.selectRange(e))},splittableParent:function(e,t){var i,n;if(e)return r.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(i=t.parentNode,n=t.ownerDocument.body,r.isInline(i))for(;i.parentNode!=n&&!r.isBlock(i.parentNode);)i=i.parentNode;return i},paste:function(t,i){var n,s,l,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C=this.editor;if(this.expandImmutablesIn(),i=c({clean:!1,split:!0},i),!i.skipCleaners)for(n=0,s=this.cleaners.length;n<s;n++)this.cleaners[n].applicable(t)&&(t=this.cleaners[n].clean(t));if(i.clean&&(t=t.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi,"$3"),t=t.replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=t.replace(/<(a|span|font)([^>]*)> <\/\1>/gi,"<$1$2>&nbsp;</$1>"),t=t.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>"),d=this.isBlock(t),C.focus(),u=C.getRange(),u.deleteContents(),u.startContainer==C.document&&u.selectNodeContents(C.body),h=new a,p=h.addCaret(u),f=this.splittableParent(d,p),m=!1,g=f!=C.body&&!r.is(f,"td"),i.split&&g&&(d||r.isInline(f))&&(u.selectNode(p),o.split(u,f,!0),m=!0),v=this.htmlToFragment(t),v.firstChild&&"k-paste-container"===v.firstChild.className){for(_=[],n=0,s=v.childNodes.length;n<s;n++)_.push(v.childNodes[n].innerHTML);v=this.htmlToFragment(_.join("<br />"))}if(l=v.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each(function(e,t){r.isBlock(t)&&!r.isSelfClosing(t)&&""===t.innerHTML&&t.appendChild(C.document.createTextNode("\ufeff"))}),u.insertNode(v),f=this.splittableParent(d,p),m){for(;p.parentNode!=f;)r.unwrap(p.parentNode);r.unwrap(p.parentNode)}if(r.normalize(u.commonAncestorContainer),p.style.display="inline",r.restoreScrollTop(C.document),r.scrollTo(p),h.removeCaret(u),b=u.commonAncestorContainer.parentNode,u.collapsed&&"tbody"==r.name(b)&&(u.setStartAfter(e(b).closest("table")[0]),u.collapse(!0)),w=e(u.commonAncestorContainer.parentNode).closest("table"),w.get(0)){for(y=w.parent().contents(),k=y.length-1,x=y.get(k);null!==x.nodeValue&&(" "===x.nodeValue||""===x.nodeValue);)k-=1,x=y.get(k);x===w.get(0)&&r.insertAfter(r.createEmptyNode(C.document,"p"),w[0])}C.selectRange(u)}}),u=i.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var i,n,o=this,r=t||o.replacements;for(i=0,n=r.length;i<n;i+=2)e=e.replace(r[i],r[i+1]);return e}}),h=u.extend({init:function(e){u.fn.init.call(this,e),this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/<script[^>]*>/i.test(e)}}),p=u.extend({init:function(e){u.fn.init.call(this,e);var t=" ";this.replacements=[/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi,t,/\t/gi,t,/&nbsp;&nbsp; &nbsp;/gi,t]},applicable:function(e){return/&nbsp;&nbsp; &nbsp;|class="?Apple-tab-span/i.test(e)}}),f=u.extend({init:function(e){u.fn.init.call(this,e),this.junkReplacements=[/<\?xml[^>]*>/gi,"",/<!--(.|\n)*?-->/g,"",/&quot;/g,"'",/<o:p>&nbsp;<\/o:p>/gi,"&nbsp;",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,""],this.replacements=this.junkReplacements.concat([/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1",/<br><br>/g,"<BR><BR>",/<br>(?!\n)/g," ",/<table([^>]*)>(\s|&nbsp;)+<t/gi,"<table$1><t",/<tr[^>]*>(\s|&nbsp;)*<\/tr>/gi,"",/<tbody[^>]*>(\s|&nbsp;)*<\/tbody>/gi,"",/<table[^>]*>(\s|&nbsp;)*<\/table>/gi,"",/<BR><BR>/g,"<br>",/^\s*(&nbsp;)+/gi,"",/(&nbsp;|<br[^>]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/style=(["|'])\s*\1/g,"",/(<br[^>]*>)?\n/g,function(e,t){return t?e:" "}])},convertFontMatch:function(e,t,i){var n=/face=['"]([^'"]+)['"]/i,o=n.exec(i),r=i&&o&&o[1];return t?"</span>":r?'<span style="font-family:'+r+'">':"<span>"},applicable:function(e){return/class="?Mso/i.test(e)||/style="[^"]*mso-/i.test(e)||/urn:schemas-microsoft-com:office/.test(e)},stripEmptyAnchors:function(e){return e.replace(/<a([^>]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e,t){var i,n=e.innerHTML,o=r.innerText(e),s=n.match(/^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),a=s&&s[1],l=/^[a-z\d]/i.test(a),c=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return s&&(i=!0),n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),!i&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(n)||i&&/^.\u00a0+/.test(n)||a&&!l&&t?{tag:"ul",style:this._guessUnorderedListStyle(c(o))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:this._guessOrderedListStyle(c(o))}:void 0},_convertToLi:function(e){var t,i=r.name(e);return 1==e.childNodes.length?t=e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(r.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&r.remove(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&r.remove(e.firstChild),t="p"!=i?"<"+i+">"+e.innerHTML+"</"+i+">":e.innerHTML),r.remove(e),r.create(document,"li",{innerHTML:t})},_guessUnorderedListStyle:function(e){return/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(e)?null:/^o/.test(e)?"circle":"square"},_guessOrderedListStyle:function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},extractListLevels:function(e){var i=/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;return e=e.replace(i,function(e,i,n){return t.format('data-list="{0}" data-level="{1}" {2}',i,n,e)})},_createList:function(e,t){return r.create(document,e,{style:{listStyleType:t}})},lists:function(t){var i,n,o,s,a,c,d,u,h,p,f,m,g,v,_,b,w=e(t).find(r.blockElements.join(",")),y=-1,k={},x=["p","h1","h2","h3","h4","h5","h6"];for(u=0;u<w.length;u++)h=w[u],g=e(h).data(),v=g.list,i=r.name(h),"td"!=i&&(_=this.listType(h,g),p=_&&_.tag,!p||x.indexOf(i)<0?h.innerHTML?n&&!c&&n.appendChild(h):r.remove(h):l.msie||(f=g.level||parseFloat(h.style.marginLeft||0),b=p+v,k[f]||(k[f]={}),(!o||o<0)&&(o=f,s=v,a=e(t).find("[data-list='"+s+"']:last")[0],d=this._createList(p,_.style),r.insertBefore(d,h),y=f,k[f][b]=d),c=a===h,m=k[f][b],(f>y||!m)&&(m=this._createList(p,_.style),k[f][b]=m,n.appendChild(m)),n=this._convertToLi(h),m.appendChild(n),c?o=y=-1:y=f))},removeAttributes:function(e){for(var t=e.attributes,i=t.length;i--;)"colspan"!=r.name(t[i])&&e.removeAttributeNode(t[i])},createColGroup:function(i){var n=i.cells,o=e(i).closest("table"),r=o.children("colgroup");n.length<2||(r.length&&(n=r.children(),r[0].parentNode.removeChild(r[0])),r=e(e.map(n,function(e){var i=e.width;return i&&0!==parseInt(i,10)?t.format('<col style="width:{0}px;"/>',i):"<col />"}).join("")),r.is("colgroup")||(r=e("<colgroup/>").append(r)),r.prependTo(o))},convertHeaders:function(t){var i,n=t.cells,o=e.map(n,function(t){var i=e(t).children("p").children("strong")[0];if(i&&"strong"==r.name(i))return i});if(o.length==n.length){for(i=0;i<o.length;i++)r.unwrap(o[i]);for(e(t).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(t),i=0;i<n.length;i++)r.changeTag(n[i],"th")}},removeParagraphs:function(t){var i,n,o,s,a;for(i=0;i<t.length;i++)for(this.removeAttributes(t[i]),s=e(t[i]),a=s.children("p"),n=0,o=a.length;n<o;n++)n<o-1&&r.insertAfter(r.create(document,"br"),a[n]),r.unwrap(a[n])},removeDefaultColors:function(e){for(var t=0;t<e.length;t++)/^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText)&&r.unwrap(e[t])},tables:function(t){var i,n,o,r,s,a=e(t).find("table"),l=this;for(r=0;r<a.length;r++){for(i=a[r].rows,o=n=i[0],s=1;s<i.length;s++)i[s].cells.length>o.cells.length&&(o=i[s]);l.createColGroup(o),l.convertHeaders(n),l.removeAttributes(a[r]),l.removeParagraphs(a.eq(r).find("td,th")),l.removeDefaultColors(a.eq(r).find("span"))}},headers:function(t){var i,n=e(t).find("p.MsoTitle");for(i=0;i<n.length;i++)r.changeTag(n[i],"h1")},removeFormatting:function(t){e(t).find("*").each(function(){e(this).css({fontSize:"",fontFamily:""}),this.getAttribute("style")||this.style.cssText||this.removeAttribute("style")})},clean:function(e){var t,i=this,n=this.options;return n.none?(e=u.fn.clean.call(i,e,this.junkReplacements),e=i.stripEmptyAnchors(e)):(e=this.extractListLevels(e),e=u.fn.clean.call(i,e),e=i.stripEmptyAnchors(e),t=r.create(document,"div",{innerHTML:e}),i.headers(t),n.msConvertLists&&i.lists(t),i.tables(t),n.msAllFormatting&&i.removeFormatting(t),e=t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),m=u.extend({init:function(e){u.fn.init.call(this,e),this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^<div>(.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),g=u.extend({clean:function(e){var t=r.create(document,"div",{innerHTML:e});return t=this.cleanDom(t),t.innerHTML},cleanDom:function(e){return e}}),v=g.extend({cleanDom:function(t){var i=this.collectTags();return e(t).find(i).each(function(){r.unwrap(this)}),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=g.extend({cleanDom:function(t){var i=this.collectAttr(),n=e(t).find("["+i.join("],[")+"]");return n.removeAttr(i.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),b=function(){this.text="",this.add=function(e){this.text+=e}},w=i.extend({init:function(e){this.separators=e||{text:" ",line:"<br/>"},this.lines=[],this.inlineBlockText=[],this.resetLine()},appendText:function(e){3===e.nodeType&&(e=e.nodeValue),this.textContainer.add(e)},appendInlineBlockText:function(e){this.inlineBlockText.push(e)},flashInlineBlockText:function(){this.inlineBlockText.length&&(this.appendText(this.inlineBlockText.join(" ")),this.inlineBlockText=[])},endLine:function(){this.flashInlineBlockText(),this.resetLine()},html:function(){var e,t,i,n,o,r,s,a,l=this.separators,c="",d=this.lines;for(this.flashInlineBlockText(),e=0,t=d.length,i=t-1;e<t;e++){for(n=d[e],o=0,r=n.length,s=r-1;o<r;o++)a=n[o].text,c+=a,o!==s&&(c+=l.text);e!==i&&(c+=l.line)}return c},resetLine:function(){this.textContainer=new b,this.line=[],this.line.push(this.textContainer),this.lines.push(this.line)}}),y=i.extend({init:function(e){this.callback=e},enumerate:function(e){var t,i;e&&(t=this.callback(e),i=e.firstChild,!t&&i&&this.enumerate(i),this.enumerate(e.nextSibling))}}),k=u.extend({init:function(t){u.fn.init.call(this,t),this.hasText=!1,this.enumerator=new y(e.proxy(this.buildText,this))},clean:function(e){var t=r.create(document,"div",{innerHTML:e});return this.cleanDom(t)},cleanDom:function(e){return this.separators=this.getDefaultSeparators(),this.htmlLines=new w(this.separators),this.enumerator.enumerate(e.firstChild),this.hasText=!1,this.htmlLines.html()},buildText:function(e){if(r.isDataNode(e)){if(r.isEmptyspace(e))return;this.htmlLines.appendText(e.nodeValue.replace("\n",this.separators.line)),this.hasText=!0}else{if(r.isBlock(e)&&this.hasText){var t=this.actions[r.name(e)]||this.actions.block;return t(this,e)}r.isBr(e)&&this.htmlLines.appendText(this.separators.line)}},applicable:function(){var e=this.options;return e.all||e.keepNewLines},getDefaultSeparators:function(){return this.options.all?{text:" ",line:" "}:{text:" ",line:"<br/>"}},actions:{ul:e.noop,ol:e.noop,table:e.noop,thead:e.noop,tbody:e.noop,td:function(e,t){var i=new k({all:!0}),n=i.cleanDom(t);return e.htmlLines.appendInlineBlockText(n),!0},block:function(e){e.htmlLines.endLine()}}}),x=u.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}});c(n,{Clipboard:d,Cleaner:u,ScriptCleaner:h,TabCleaner:p,MSWordFormatCleaner:f,WebkitFormatCleaner:m,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:k,HtmlTextLines:w,CustomCleaner:x})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/keyboard.min",["editor/command.min"],e)}(function(){!function(e){function t(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}function i(e,t,i){for(var n=e?e[t]:null;n&&!i(n);)n=n[t];return n}var n=window.kendo,o=n.Class,r=n.ui.editor,s=r.RangeUtils,a=r.Dom,l=r.RestorePoint,c=r.Marker,d=n.support.browser,u='<br class="k-br">',h=e.extend,p=a.nodeTypes,f="previousSibling",m="td,th,caption",g="table,tbody,thead,tfoot,tr",v=g+","+m,_=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(g)},b=o.extend({remove:function(t){var i,n,o,r,l,d,u,h=this,p=new c;p.add(t,!1),i=s.getAll(t,function(t){return e(t).is(v)}),n=s.documentFromRange(t),o=p.start,r=p.end,l=m.split(","),d=a.parentOfType(o,l),u=a.parentOfType(r,l),h._removeContent(o,d,!0),h._removeContent(r,u,!1),e(i).each(function(t,i){i=e(i),(i.is(m)?i:i.find(m)).each(function(e,t){t.innerHTML="&#65279;"})}),d&&!o.previousSibling&&a.insertBefore(n.createTextNode("\ufeff"),o),u&&!r.nextSibling&&a.insertAfter(n.createTextNode("\ufeff"),r),d?t.setStartBefore(o):i[0]&&(d=e(i[0]),d=d.is(m)?d:d.find(m).first(),d.length&&t.setStart(d.get(0),0)),t.collapse(!0),a.remove(o),a.remove(r)},_removeContent:function(t,i,n){if(i){var o,r=n?"nextSibling":"previousSibling",s=function(t){for(;t&&!t[r];)t=t.parentNode;return t&&e.contains(i,t)?t[r]:null};for(t=s(t);t;)o=s(t),a.remove(t),t=o}}}),w=o.extend({init:function(e){this.editor=e},keydown:function(i){var n,o,s,a,c=this,u=c.editor,p=u.keyboard,f=p.isTypingKey(i),m=h(e.Event(),i);return c.editor.trigger("keydown",m),m.isDefaultPrevented()?(i.preventDefault(),!0):!(m.isDefaultPrevented()||!f||p.isTypingInProgress())&&(n=u.getRange(),o=u.body,c.startRestorePoint=new l(n,o),_(n)&&(s=new b(u),s.remove(n),u.selectRange(n)),d.webkit&&!n.collapsed&&t(o,n)&&(o.innerHTML=""),u.immutables&&r.Immutables.immutablesContext(n)&&(a=new r.BackspaceHandler(u),a.deleteSelection(n)),p.startTyping(function(){c.endRestorePoint=r._finishUpdate(u,c.startRestorePoint)}),!0)},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),y=o.extend({init:function(e){this.editor=e},_addCaret:function(e){var t=a.create(this.editor.document,"a");return!n.support.browser.chrome&&e.firstChild&&e.firstChild.nodeType===p.ELEMENT_NODE&&(e=e.firstChild),a.insertAt(e,t,0),a.stripBomNode(t.previousSibling),a.stripBomNode(t.nextSibling),t},_restoreCaret:function(e){var t=this.editor.createRange();!e.nextSibling&&a.isDataNode(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.length):t.setStartAfter(e),t.collapse(!0),this.editor.selectRange(t),a.remove(e)},_handleDelete:function(e){var t,i,n=e.endContainer,o=a.closestEditableOfType(n,a.blockElements);return!(!o||!r.RangeUtils.isEndOf(e,o))&&(t=a.next(o),!(!t||"p"!=a.name(t))&&(i=this._addCaret(t),this._merge(o,t),this._restoreCaret(i),!0))},_cleanBomBefore:function(e){for(var t=e.startOffset,i=e.startContainer,n=i.nodeValue,o=0;t-o>=0&&"\ufeff"==n[t-o-1];)o++;o>0&&(i.deleteData(t-o,o),e.setStart(i,Math.max(0,t-o)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var n,o,s,l,c,d,u,h,p,m,g,v,_,b=t.startContainer,w=a.closestEditableOfType(b,["li"]),y=a.closestEditableOfType(b,"p,h1,h2,h3,h4,h5,h6".split(",")),k=this.editor;if(a.isDataNode(b)){if(t.collapsed&&/^\s[\ufeff]+$/.test(b.nodeValue))return t.setStart(b,0),t.setEnd(b,b.length),k.selectRange(t),!1;this._cleanBomBefore(t)}return n=i(y,f,function(e){return!a.htmlIndentSpace(e)}),t.collapsed&&t.startOffset!==t.endOffset&&t.startOffset<0&&(t.startOffset=0,t.endOffset=0,k.selectRange(t)),o=w&&r.RangeUtils.isStartOf(t,w),s=w&&e(w).index(),l=o&&s>0,l&&(y=w,n=a.prev(w)),y&&n&&a.is(n,"table")&&r.RangeUtils.isStartOf(t,y)?(""===y.innerText&&(y.innerHTML="\ufeff"),!0):y&&n&&r.RangeUtils.isStartOf(t,y)||l?(c=this._addCaret(y),this._merge(n,y),this._restoreCaret(c),!0):o&&0===s?(d=w.firstChild,d||(w.innerHTML=r.emptyElementContent,d=w.firstChild),u=new r.ListFormatter(a.name(w.parentNode),"p"),t.selectNodeContents(w),u.toggle(t),a.insignificant(d)?t.setStartBefore(d):t.setStart(d,0),k.selectRange(t),!0):(h=b.childNodes[t.startOffset-1],p=t,m=h&&a.closestEditableOfType(h,["a"]),g=i(h||b,f,function(e){return!a.isDataNode(e)||!a.isBom(e)&&e.length>0}),(m||(0===t.startOffset||h)&&a.is(g,"a"))&&(m=m||g,p=k.createRange(),p.setStart(m,m.childNodes.length),p.collapse(!0)),m=m||a.closestEditableOfType(h||p.startContainer,["a"]),v=m&&r.RangeUtils.isEndOf(p,m),v&&(_=new r.UnlinkCommand({range:p,body:k.body,immutables:!!k.immutables}),k.execCommand(_),k._selectionChange()),!1)},_handleSelection:function(t){var i,n,o,s,l=t.commonAncestorContainer,d=a.closest(l,"table"),u=r.emptyElementContent,h=this.editor;return _(t)?(i=new b(h),i.remove(t),h.selectRange(t),!0):(n=new c,n.add(t,!1),t.commonAncestorContainer===h.body&&this._surroundFullyContent(n,t),h.immutables&&this._handleImmutables(n),this._surroundFullySelectedAnchor(n,t),t.setStartAfter(n.start),t.setEndBefore(n.end),o=t.startContainer,s=t.endContainer,t.deleteContents(),d&&""===e(d).text()&&(t.selectNode(d),t.deleteContents()),l=t.commonAncestorContainer,"p"===a.name(l)&&""===l.innerHTML&&(l.innerHTML=u,t.setStart(l,0)),this._join(o,s),a.insertAfter(h.document.createTextNode("\ufeff"),n.start),n.remove(t),o=t.startContainer,"tr"==a.name(o)&&(o=o.childNodes[Math.max(0,t.startOffset-1)],t.setStart(o,a.getNodeLength(o))),t.collapse(!0),h.selectRange(t),!0)},_handleImmutables:function(e){var t=r.Immutables.immutableParent,i=t(e.start),n=t(e.start);i&&a.insertBefore(e.start,i),n&&a.insertAfter(e.end,n),i&&a.remove(i),n&&n.parentNode&&a.remove(n)},_surroundFullyContent:function(e,t){var i=t.commonAncestorContainer.children,n=i[0],o=i[i.length-1];this._moveMarker(e,t,n,o)},_surroundFullySelectedAnchor:function(t,i){var n=t.start,o=e(n).closest("a").get(0),r=t.end,s=e(r).closest("a").get(0);this._moveMarker(t,i,o,s)},_moveMarker:function(e,t,i,n){var o=e.start,r=e.end;i&&s.isStartOf(t,i)&&a.insertBefore(o,i),n&&s.isEndOf(t,n)&&a.insertAfter(r,n)},_root:function(e){for(;e&&"body"!=a.name(e)&&e.parentNode&&"body"!=a.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){e=this._root(e),t=this._root(t),e!=t&&a.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(a.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=a.list(e)?e.children[e.children.length-1]:e,e&&e.appendChild(t.firstChild)):e.nodeType===p.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);a.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===p.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?a.insertAfter(t,e.nextSibling):a.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var t,i,o=this.editor,s=o.getRange(),a=e.keyCode,c=n.keys,d=a===c.BACKSPACE,u=a==c.DELETE;o.immutables&&o.immutables.keydown(e,s)||(!d&&!u||s.collapsed?d?t="_handleBackspace":u&&(t="_handleDelete"):t="_handleSelection",t&&(i=new l(s,o.body),this[t](s)&&(e.preventDefault(),r._finishUpdate(o,i))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),k=o.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=r._finishUpdate(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML;
},keydown:function(e){var t=this,i=t.editor,n=i.keyboard;return n.isModifierKey(e)?(n.isTypingInProgress()&&n.endTyping(!0),t.startRestorePoint=new l(i.getRange(),i.body),!0):!!n.isSystem(e)&&(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0)},keyup:function(){var e=this;return!(!e.systemCommandIsInProgress||!e.changed())&&(e.systemCommandIsInProgress=!1,e.createUndoCommand(),!0)}}),x=o.extend({init:function(e){this.editor=e},keydown:function(e){!d.webkit||e.isDefaultPrevented()||!e.ctrlKey||65!=e.keyCode||e.altKey||e.shiftKey||(this.editor.options.immutables&&this._toSelectableImmutables(),this._selectEditorBody())},_selectEditorBody:function(){var e=this.editor,t=e.getRange();t.selectNodeContents(e.body),e.selectRange(t)},_toSelectableImmutables:function(){for(var t=this.editor,i=t.body,n=r.Immutables.immutable,o=a.emptyTextNode,s=i.firstChild,l=i.lastChild;o(s);)s=s.nextSibling;for(;o(l);)l=l.previousSibling;s&&n(s)&&e(u).prependTo(i),l&&n(l)&&e(u).appendTo(i)},keyup:e.noop}),C=o.extend({init:function(e){this.handlers=e,this.typingInProgress=!1},isCharacter:function(e){return e>=48&&e<=90||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||229==e},toolFromShortcut:function(t,i){var n,o,r=String.fromCharCode(i.keyCode),s=this._getShortcutModifier(i,navigator.platform);for(n in t)if(o=e.extend({ctrl:!1,alt:!1,shift:!1},t[n].options),(o.key==r||o.key==i.keyCode)&&o.ctrl==s&&o.alt==i.altKey&&o.shift==i.shiftKey)return n},_getShortcutModifier:function(e,t){var i=t.toUpperCase().indexOf("MAC")>=0;return i?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,i){var n,o,r,s=String.fromCharCode(i.keyCode),a=[],l=function(e){return e==s||e==i.keyCode||e==i.charCode};for(n in t)o=e.extend({ctrl:!1,alt:!1,shift:!1},t[n].options),r=e.isArray(o.key)?e.grep(o.key,l).length>0:l(o.key),r&&o.ctrl==i.ctrlKey&&o.alt==i.altKey&&o.shift==i.shiftKey&&a.push(t[n]);return a},isTypingKey:function(e){var t=e.keyCode;return this.isCharacter(t)&&!e.ctrlKey&&!e.altKey||32==t||13==t||8==t||46==t&&!e.shiftKey&&!e.ctrlKey&&!e.altKey},isModifierKey:function(e){var t=e.keyCode;return 17==t&&!e.shiftKey&&!e.altKey||16==t&&!e.ctrlKey&&!e.altKey||18==t&&!e.ctrlKey&&!e.shiftKey},isSystem:function(e){return 46==e.keyCode&&e.ctrlKey&&!e.altKey&&!e.shiftKey},startTyping:function(e){this.onEndTyping=e,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress&&this.onEndTyping&&this.onEndTyping(),this.typingInProgress=!1},endTyping:function(t){var i=this;i.clearTimeout(),t?i.stopTyping():i.timeout=window.setTimeout(e.proxy(i.stopTyping,i),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var i,n=this.handlers;for(i=0;i<n.length&&!n[i][t](e);i++);},keydown:function(e){this.notify(e,"keydown")},keyup:function(e){this.notify(e,"keyup")}});h(r,{TypingHandler:w,SystemHandler:k,BackspaceHandler:y,SelectAllHandler:x,Keyboard:C})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/exportpdf.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,i=t.ui.editor,n=i.Command,o=i.EditorUtils,r=o.registerTool,s=i.Tool,a=i.ToolTemplate,l=e.extend,c=n.extend({init:function(e){this.async=!0,n.fn.init.call(this,e)},exec:function(){var e=this,t=e.lockRange(!0),i=e.editor;i._destroyResizings(),i.saveAsPDF().then(function(){e.releaseRange(t),i._initializeColumnResizing(),i._initializeRowResizing(),i._initializeTableResizing()})}});l(i,{ExportPdfCommand:c}),r("pdf",new s({command:c,template:new a({template:o.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/plugins/print.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,i=t.ui.editor,n=i.Command,o=i.EditorUtils,r=o.registerTool,s=i.Tool,a=i.ToolTemplate,l=e.extend,c=n.extend({init:function(e){n.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor;t.support.browser.msie?e.document.execCommand("print",!1,null):e.window.print&&e.window.print()}});l(i,{PrintCommand:c}),r("print",new s({command:c,template:new a({template:o.buttonTemplate,title:"Print"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/resizing/resizing-utils.min",["editor/main.min"],e)}(function(){!function(e,t){function i(e){var t=e.value,i=e.min,n=e.max;return h(u(p(t),p(n)),p(i))}function n(t){return t&&!f(t).is("body")&&t.scrollHeight>t.clientHeight?e.support.scrollbar():0}function o(e,t){return r(e)?p(e):p(e)/t*100}function r(e){return typeof e===y&&b.test(e)}function s(e){return typeof e===y&&w.test(e)}function a(e){return p(e)+v}function l(e){return p(e)+_}var c=window,d=c.Math,u=d.min,h=d.max,p=c.parseFloat,f=e.jQuery,m=f.extend,g=e.ui.editor,v="%",_="px",b=/(\d+)(\.?)(\d*)%/,w=/(\d+)(\.?)(\d*)px/,y="string",k={constrain:i,getScrollBarWidth:n,calculatePercentageRatio:o,inPercentages:r,inPixels:s,toPercentages:a,toPixels:l};m(g,{ResizingUtils:k})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/resizing/table-element-resizing.min",["editor/main.min","kendo.resizable.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var i=e.jQuery,n=i.extend,o=i.noop,r=i.proxy,s=e.ui.editor,a=e.Class,l="keydown",c="mousedown",d="mouseenter",u="mouseleave",h="mousemove",p="mouseup",f=",",m=".",g=":last-child",v="table",_=a.extend({init:function(e,t){var o=this;o.options=n({},o.options,t),o.options.tags=i.isArray(o.options.tags)?o.options.tags:[o.options.tags],i(e).is(v)&&(o.element=e,o._attachEventHandlers())},destroy:function(){var e=this,t=e.options.eventNamespace;e.element&&(i(e.element).off(t),e.element=null),i(e.options.rootElement).off(l+t),e._destroyResizeHandle()},options:{tags:[],min:0,rootElement:null,eventNamespace:"",rtl:!1,handle:{dataAttribute:"",height:0,width:0,classNames:{},template:""}},_attachEventHandlers:function(){var e=this,t=e.options;i(e.element).on(h+t.eventNamespace,t.tags.join(f),r(e.detectElementBorderHovering,e))},resizingInProgress:function(){var e=this,t=e._resizable;return!!t&&!!t.resizing},resize:o,detectElementBorderHovering:function(e){var t=this,n=t.options,o=n.handle,r=i(e.currentTarget),s=t.resizeHandle,a=o.dataAttribute;t.resizingInProgress()||(!r.is(g)&&t.elementBorderHovered(r,e)?s?s.data(a)&&s.data(a)!==r[0]&&t.showResizeHandle(r,e):t.showResizeHandle(r,e):s&&t._destroyResizeHandle())},elementBorderHovered:o,showResizeHandle:function(e,t){var i=this;0===t.buttons&&(i._initResizeHandle(),i.setResizeHandlePosition(e),i.setResizeHandleDimensions(),i.setResizeHandleDataAttributes(e[0]),i._attachResizeHandleEventHandlers(),i._initResizable(e),i._hideResizeMarker(),i.resizeHandle.show())},_initResizeHandle:function(){var e=this,t=e.options;e._destroyResizeHandle(),e.resizeHandle=i(t.handle.template).appendTo(t.rootElement)},setResizeHandlePosition:o,setResizeHandleDimensions:o,setResizeHandleDataAttributes:function(e){var t=this;t.resizeHandle.data(t.options.handle.dataAttribute,e)},_attachResizeHandleEventHandlers:function(){var e=this,t=e.options,i=t.eventNamespace,n=t.handle.classNames.marker,o=e.resizeHandle;e.resizeHandle.on(c+i,function(){o.find(m+n).show()}).on(p+i,function(){o.find(m+n).hide()})},_hideResizeMarker:function(){var e=this;e.resizeHandle.find(m+e.options.handle.classNames.marker).hide()},_destroyResizeHandle:function(){var e=this;e.resizeHandle&&(e._destroyResizable(),e.resizeHandle.off(e.options.eventNamespace).remove(),e.resizeHandle=null)},_initResizable:function(t){var i=this;i.resizeHandle&&(i._destroyResizable(),i._resizable=new e.ui.Resizable(t,{draggableElement:i.resizeHandle[0],start:r(i.onResizeStart,i),resize:r(i.onResize,i),resizeend:r(i.onResizeEnd,i)}))},_destroyResizable:function(){var e=this;e._resizable&&(e._resizable.destroy(),e._resizable=null)},onResizeStart:function(){this._disableKeyboard()},onResize:function(e){this.setResizeHandleDragPosition(e)},setResizeHandleDragPosition:o,onResizeEnd:function(e){var t=this;t.resize(e),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var e=this.options;i(e.rootElement).off(l+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;i(e.rootElement).on(l+e.eventNamespace,function(e){e.preventDefault()})},_forceResizing:function(e){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(e)}}),b=a.extend({create:function(e,t){var n=this,o=t.name,r=t.eventNamespace;i(e.body).on(d+r,v,function(i){var r=i.currentTarget,s=e[o];i.stopPropagation(),s?s.element===r||s.resizingInProgress()||(n._destroyResizing(e,t),n._initResizing(e,r,t)):n._initResizing(e,r,t)}).on(u+r,v,function(r){var s,a=e[o];r.stopPropagation(),!a||a.resizingInProgress()||a.resizeHandle||(s=i(a.element).parents(v)[0],s&&(n._destroyResizing(e,t),n._initResizing(e,s,t)))}).on(u+r,function(){var i=e[o];i&&!i.resizingInProgress()&&n._destroyResizing(e,t)}).on(p+r,function(r){var s,a=e[o];a&&a.resizingInProgress()&&(s=i(r.target).parents(v)[0],s&&(a._forceResizing(r),n._destroyResizing(e,t),n._initResizing(e,s,t)))})},dispose:function(e,t){i(e.body).off(t.eventNamespace)},_initResizing:function(t,i,n){var o=n.name,r=n.type;t[o]=new r(i,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var i=t.name;e[i]&&(e[i].destroy(),e[i]=null)}});b.current=new b,_.create=function(e,t){b.current.create(e,t)},_.dispose=function(e,t){b.current.dispose(e,t)},n(s,{TableElementResizing:_})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/resizing/column-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],e)}(function(){!function(e,t){var i=window,n=i.Math,o=n.abs,r=e.jQuery,s=r.extend,a=e.ui.editor,l=a.TableElementResizing,c=a.ResizingUtils,d=c.constrain,u=c.calculatePercentageRatio,h=c.getScrollBarWidth,p=c.inPercentages,f=c.toPercentages,m=c.toPixels,g=e._outerWidth,v=".kendoEditorColumnResizing",_="k-column-resize-handle",b="k-column-resize-marker",w="body",y="tbody",k="td",x="th",C="tr",S=",",T="width",D=l.extend({options:{tags:[k,x],min:20,rootElement:null,eventNamespace:v,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:_,marker:b},template:'<div class="k-column-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+_+'"><div class="'+b+'"></div></div></div>'}},elementBorderHovered:function(e,t){var i=this,n=i.options,o=n.handle.width,s=e.offset().left+(n.rtl?0:g(e)),a=t.clientX+r(e[0].ownerDocument).scrollLeft();return a>s-o&&a<s+o},setResizeHandlePosition:function(e){var t=this,i=r(t.element).children(y),n=t.options,o=n.rtl,s=n.handle.width,a=r(n.rootElement),l=a.is(w)?0:a.scrollTop(),c=a.is(w)?0:a.scrollLeft(),d=o?0:g(e),u=o?h(a[0]):0,p=e.offset().left-(a.offset().left+parseFloat(a.css("borderLeftWidth")))-parseFloat(e.css("marginLeft")),f=i.offset().top-(a.offset().top+parseFloat(a.css("borderTopWidth")))-parseFloat(i.css("marginTop"));t.resizeHandle.css({top:f+l,left:p+d+(c-u)-s/2,position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=r(e.element).children(y);e.resizeHandle.css({width:e.options.handle.width,height:t.height()})},setResizeHandleDragPosition:function(e){var t=this,i=r(r(e.currentTarget).data(t.options.handle.dataAttribute)),n=t.options,o=r(n.rootElement),s=n.handle?n.handle.width:0,a=n.min,l=n.rtl,c=g(i),u=i.offset().left-(o.offset().left+parseFloat(o.css("borderLeftWidth")))-parseFloat(i.css("marginLeft")),p=g(i.next()),f=r(t.resizeHandle),m=o.is(w)?0:o.scrollLeft(),v=l?h(o[0]):0,_=f.offset().left-(o.offset().left+parseFloat(o.css("borderLeftWidth")))-parseFloat(f.css("marginLeft")),b=d({value:_+(m-v)+e.x.delta,min:u+(m-v)-(l?p:0)+a,max:u+c+(m-v)+(l?0:p)-s-a});f.css({left:b})},resize:function(e){var t,i,n,o=this,s=r(r(e.currentTarget).data(o.options.handle.dataAttribute)),a=o.options,l=a.rtl?-1:1,c=a.min,u=l*e.x.initialDelta;o._setTableComputedWidth(),o._setColumnsComputedWidth(),n=g(s),i=g(s.next()),t=d({value:n+u,min:c,max:n+i-c}),o._resizeColumn(s[0],t),o._resizeTopAndBottomColumns(s[0],t),o._resizeAdjacentColumns(s.index(),i,n,n-t)},_setTableComputedWidth:function(){var e=this.element;""===e.style[T]&&(e.style[T]=m(g(r(e))))},_setColumnsComputedWidth:function(){var e,t=this,i=r(t.element).children(y),n=g(i),o=i.children(C).children(k),s=o.length,a=o.map(function(){return g(r(this))});for(e=0;e<s;e++)o[e].style[T]=p(o[e].style[T])?f(u(a[e],n)):m(a[e])},_resizeTopAndBottomColumns:function(e,t){var i,n=this,o=r(e).index(),s=r(n.element).children(y).children(C).children(n.options.tags.join(S)).filter(function(){var t=this;return r(t).index()===o&&t!==e}),a=s.length;for(i=0;i<a;i++)n._resizeColumn(s[i],t)},_resizeColumn:function(e,t){e.style[T]=p(e.style[T])?f(u(t,g(r(this.element).children(y)))):m(t)},_resizeAdjacentColumns:function(e,t,i,n){var o,s=this,a=r(s.element).children(y).children(C).children(s.options.tags.join(S)).filter(function(){return r(this).index()===e+1}),l=a.length;for(o=0;o<l;o++)s._resizeAdjacentColumn(a[o],t,i,n)},_resizeAdjacentColumn:function(e,t,i,n){var r=this,s=r.options.min,a=d({value:t+n,min:s,max:o(i+t-s)});r._resizeColumn(e,a)}});D.create=function(e){l.create(e,{name:"columnResizing",type:D,eventNamespace:v})},D.dispose=function(e){l.dispose(e,{eventNamespace:v})},s(a,{ColumnResizing:D})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/resizing/row-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],e)}(function(){!function(e,t){var i=window.Math,n=i.abs,o=e.jQuery,r=o.extend,s=e.ui.editor,a=s.TableElementResizing,l=s.ResizingUtils,c=l.getScrollBarWidth,d=l.constrain,u=l.calculatePercentageRatio,h=l.inPercentages,p=l.toPercentages,f=l.toPixels,m=e._outerHeight,g=".kendoEditorRowResizing",v="k-row-resize-handle",_="k-row-resize-marker-wrapper",b="k-row-resize-marker",w="body",y="tr",k="tbody",x="height",C=a.extend({options:{tags:[y],min:20,rootElement:null,eventNamespace:g,rtl:!1,handle:{dataAttribute:"row",width:0,height:10,classNames:{handle:v,marker:b},template:'<div class="k-row-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+v+'"><div class="'+_+'"><div class="'+b+'"></div></div></div></div>'}},elementBorderHovered:function(e,t){var i=this,n=i.options.handle[x],r=e.offset().top+m(e),s=t.clientY+o(e[0].ownerDocument).scrollTop();return s>r-n&&s<r+n},setResizeHandlePosition:function(e){var t=this,i=t.options,n=i.handle[x],r=o(i.rootElement),s=r.is(w)?0:r.scrollTop(),a=r.is(w)?0:r.scrollLeft(),l=i.rtl?c(r[0]):0,d=e.offset().left-(r.offset().left+parseFloat(r.css("borderLeftWidth")))-parseFloat(e.css("marginLeft")),u=e.offset().top-(r.offset().top+parseFloat(r.css("borderTopWidth")))-parseFloat(e.css("marginTop"));t.resizeHandle.css({top:u+m(e)+s-n/2,left:d+(a-l),position:"absolute"})},setResizeHandleDimensions:function(){var e=this;e.resizeHandle.css({width:o(e.element).children(k).width(),height:e.options.handle[x]})},setResizeHandleDragPosition:function(e){var t=this,i=t.options,n=i.min,r=o(t.element).children(k),s=o(t.resizeHandle),a=o(e.currentTarget).data(i.handle.dataAttribute),l=o(a),c=o(i.rootElement),u=c.is(w)?0:c.scrollTop(),h=r.offset().top-(c.offset().top+parseFloat(c.css("borderTopWidth")))-parseFloat(r.css("marginTop")),p=l.offset().top-(c.offset().top+parseFloat(c.css("borderTopWidth")))-parseFloat(l.css("marginTop")),f=s.offset().top-(c.offset().top+parseFloat(c.css("borderTopWidth")))-parseFloat(s.css("marginTop")),g=d({value:f+u+e.y.delta,min:p+u+n,max:h+m(r)+u-i.handle[x]-n});s.css({top:g})},resize:function(e){var t=this,i=t.options,r=o(e.currentTarget).data(i.handle.dataAttribute),s=m(o(r)),a=o(t.element),l=m(a),c=a.children(k),u=c.height(),p=r.style[x],g=d({value:s+e.y.initialDelta,min:i.min,max:n(u-i.min)});t._setRowsHeightInPixels(),r.style[x]=f(g),t._setTableHeight(l+(g-s)),h(p)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){var e,t=this,i=o(t.element).children(k).children(y),n=i.length,r=i.map(function(){return m(o(this))});for(e=0;e<n;e++)i[e].style[x]=f(r[e])},_setRowsHeightInPercentages:function(){var e,t=this,i=o(t.element).children(k),n=i.height(),r=i.children(y),s=r.length,a=r.map(function(){return m(o(this))});for(e=0;e<s;e++)r[e].style[x]=p(u(a[e],n))},_setTableHeight:function(e){var t=this.element;t.style[x]=h(t.style[x])?p(u(e,o(t).parent().height())):f(e)}});C.create=function(e){a.create(e,{name:"rowResizing",type:C,eventNamespace:g})},C.dispose=function(e){a.dispose(e,{eventNamespace:g})},r(s,{RowResizing:C})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/resizing/table-resize-handle.min",["editor/main.min","kendo.draganddrop.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C=e.jQuery,S=C.extend,T=C.noop,D=C.proxy,A=e.ui.editor,E=e.Class,I=e.ui.Draggable,M=e.Observable,R=A.ResizingUtils.getScrollBarWidth,F=e._outerWidth,P=e._outerHeight,z=".kendoEditorTableResizeHandle",B="k-table-resize-handle",L="dragStart",H="drag",N="dragEnd",O="halfInside",V="mouseover",W="mouseout",U="body",q="table",j="east",G="north",$="northeast",K="northwest",Y="south",Q="southeast",X="southwest",Z="west",J=".",ee=M.extend({init:function(e){var t=this;M.fn.init.call(t),t.options=S({},t.options,e),t.element=C(t.options.template).appendTo(t.options.appendTo)[0],t._attachEventHandlers(),t._addStyles(),t._initDraggable(),t._initPositioningStrategy(),t._initDraggingStrategy(),C(t.element).data(q,t.options.resizableElement)},destroy:function(){var e=this;C(e.element).off(z).remove(),e.element=null,e._destroyDraggable(),e.unbind()},options:{appendTo:null,direction:Q,resizableElement:null,rtl:!1,template:"<div class='k-table-resize-handle-wrapper' unselectable='on' contenteditable='false'><div class='"+B+"'></div></div>"},events:[L,H,N,V,W],show:function(){this._setPosition()},_setPosition:function(){var e=this,t=e._positioningStrategy.getPosition();C(e.element).css({top:t.top,left:t.left,position:"absolute"})},_attachEventHandlers:function(){var e=this;C(e.element).on(V+z,D(e._onMouseOver,e)).on(W+z,D(e._onMouseOut,e))},_onMouseOver:function(){this.trigger(V)},_onMouseOut:function(){this.trigger(W)},_addStyles:function(){var e=this;C(e.element).children(J+B).addClass("k-resize-"+e.options.direction)},_initPositioningStrategy:function(){var e=this,t=e.options;e._positioningStrategy=i.create({name:t.direction,handle:e.element,resizableElement:t.resizableElement,rootElement:t.rootElement,rtl:t.rtl})},_initDraggable:function(){var e=this,t=e.element;!e._draggable&&t&&(e._draggable=new I(t,{dragstart:D(e._onDragStart,e),drag:D(e._onDrag,e),dragend:D(e._onDragEnd,e)}))},_onDragStart:function(){this.trigger(L)},_onDrag:function(e){var t=this;t.trigger(H,t._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(N)},_destroyDraggable:function(){var e=this;e._draggable&&(e._draggable.destroy(),e._draggable=null)},_initDraggingStrategy:function(){var e=this;e._draggingStrategy=h.create({name:e.options.direction})}}),te=E.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e){var t,i,n,o=this._items,r=o.length,s=e.name?e.name.toLowerCase():"";for(n=0;n<r;n++)if(i=o[n],i.name.toLowerCase()===s){t=i;break}if(t)return new t.type(e)}}),ie=te.extend({});ie.current=new ie,i=E.extend({init:function(e){var t=this;t.options=S({},t.options,e)},options:{handle:null,offset:O,resizableElement:null,rootElement:null,rtl:!1},getPosition:function(){var e=this,t=e.calculatePosition(),i=e.applyHandleOffset(t),n=e.applyScrollOffset(i);return n},calculatePosition:T,applyHandleOffset:function(e){var t=this.options,i=C(t.handle);return t.offset===O?{top:e.top-P(i)/2,left:e.left-F(i)/2}:e},applyScrollOffset:function(e){var t=this.options,i=C(t.rootElement),n=t.rtl?R(i[0]):0;return i.is(U)?e:{top:e.top+(i.scrollTop()||0),left:e.left+(i.scrollLeft()||0)-n}}}),i.create=function(e){return ie.current.create(e)},n=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e)/2,left:t.left+F(e)}}}),ie.current.register(j,n),o=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+F(e)/2}}}),ie.current.register(G,o),r=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+F(e)}}}),ie.current.register($,r),s=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left}}}),ie.current.register(K,s),a=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e),left:t.left+F(e)/2}}}),ie.current.register(Y,a),l=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e),left:t.left+F(e)}}}),ie.current.register(Q,l),c=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e),left:t.left}}}),ie.current.register(X,c),d=i.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e)/2,left:t.left}}}),ie.current.register(Z,d),u=te.extend({}),u.current=new u,h=E.extend({init:function(e){var t=this;t.options=S({},t.options,e)},options:{deltaX:{adjustment:null,modifier:null},deltaY:{adjustment:null,modifier:null}},adjustDragDelta:function(e){var t=this.options,i=t.deltaX.adjustment*t.deltaX.modifier,n=t.deltaY.adjustment*t.deltaY.modifier;return{deltaX:e.deltaX*i,deltaY:e.deltaY*n,initialDeltaX:e.initialDeltaX*i,initialDeltaY:e.initialDeltaY*n}}}),h.create=function(e){return u.current.create(e)},p=h.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),f=p.extend({options:{deltaX:{modifier:1}}}),u.current.register(j,f),m=p.extend({options:{deltaX:{modifier:-1}}}),u.current.register(Z,m),g=h.extend({options:{deltaX:{adjustment:0,modifier:0},deltaY:{adjustment:1,modifier:1}}}),v=g.extend({options:{deltaY:{modifier:-1}}}),u.current.register(G,v),_=g.extend({options:{deltaY:{modifier:1}}}),u.current.register(Y,_),b=h.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:1,modifier:1}}}),w=b.extend({options:{deltaX:{modifier:1},deltaY:{modifier:-1}}}),u.current.register($,w),y=b.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:-1}}}),u.current.register(K,y),k=b.extend({options:{deltaX:{modifier:1},deltaY:{modifier:1}}}),u.current.register(Q,k),x=b.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:1}}}),u.current.register(X,x),S(A,{TableResizeHandle:ee})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/resizing/table-resizing.min",["editor/main.min","editor/resizing/table-resize-handle.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){function i(e){return t===e}var n=window,o=n.Math,r=o.min,s=o.max,a=e.jQuery,l=a.contains,c=a.extend,d=a.proxy,u=e.support.browser,h=e.ui.editor,p=e.Class,f=h.TableResizeHandle,m=h.ResizingUtils,g=m.calculatePercentageRatio,v=m.constrain,_=m.inPercentages,b=m.inPixels,w=m.toPercentages,y=m.toPixels,k=e._outerWidth,x=e._outerHeight,C=".kendoEditorTableResizing",S="k-table-resize-handle-wrapper",T="k-table",D="k-table-resizing",A="dragStart",E="drag",I="dragEnd",M="keydown",R="mousedown",F="mouseover",P="mouseout",z="td",B="tr",L="tbody",H="table",N="width",O="height",V="east",W="north",U="northeast",q="northwest",j="south",G="southeast",$="southwest",K="west",Y=".",Q=p.extend({init:function(e,t){var i=this;i.options=c({},i.options,t),i.handles=[],a(e).is(H)&&(i.element=e)},destroy:function(){var e=this;a(e.element).off(C),e.element=null,a(e.options.rootElement).off(M+C),e._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:q},{direction:W},{direction:U},{direction:V},{direction:G},{direction:j},{direction:$},{direction:K}]},resize:function(e){var t=this,i=c({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},e);t._resizeWidth(i.deltaX,i.initialDeltaX),t._resizeHeight(i.deltaY,i.initialDeltaY),t.showResizeHandles()},_resizeWidth:function(e,t){var n,o,l,c,d=this,u=a(d.element),h=u[0].style[N],p=k(u),f=u.parent().width(),m=d._getMaxDimensionValue(N);0!==e&&(i(d._initialElementWidth)&&(d._initialElementWidth=p),c=v({value:d._initialElementWidth+t,min:d.options.minWidth,max:m}),_(h)?(p+e>f?(o=s(c,f),l=r(c,f)):(o=r(c,f),l=s(c,f)),n=w(g(o,l))):n=y(c),d._setColumnsWidth(),u[0].style[N]=n)},_resizeHeight:function(e,t){var n,o,l,c,d=this,u=a(d.element),h=u[0].style[O],p=x(u),f=u.parent(),m=f.height(),b=d._getMaxDimensionValue(O),k=d.options.minHeight,C=d._hasRowsInPixels();0!==e&&(i(d._initialElementHeight)&&(d._initialElementHeight=p),c=v({value:d._initialElementHeight+t,min:k,max:b}),C&&e<0&&d._setRowsHeightInPercentages(),_(h)?(p+e>m?(o=s(c,m),l=r(c,m)):(o=r(c,m),l=s(c,m)),n=w(g(o,l))):n=y(c),u[0].style[O]=n,C&&e<0&&d._setRowsHeightInPixels())},_getMaxDimensionValue:function(e){var t=this,i=a(t.element),n=e.toLowerCase(),o=t.options.rtl?-1:1,r=a(t.element).parent(),s=r[0],l=r[n](),c=o*(e===N?r.scrollLeft():r.scrollTop());return s===i.closest(z)[0]?""!==s.style[n]||_(t.element.style[n])?l+c:1/0:l+c},_setColumnsWidth:function(){function e(e){var t=e.style.width;return""!==t?!!_(t):!!a(e).hasClass(T)}var t,i=this,n=a(i.element),o=n.parent()[0],r=n.closest(z),s=r.closest(B).children(),l=s.length;if(e(n[0])&&o===r[0]&&""===o.style[N])for(t=0;t<l;t++)s[t].style[N]=y(a(s[t]).width())},_hasRowsInPixels:function(){var e,t=this,i=a(t.element).children(L).children(B);for(e=0;e<i.length;e++)if(""===i[e].style.height||b(i[e].style.height))return!0;return!1},_setRowsHeightInPercentages:function(){var e,t=this,i=a(t.element).children(L),n=i.height(),o=i.children(B),r=o.length,s=o.map(function(){return x(a(this))});for(e=0;e<r;e++)o[e].style[O]=w(g(s[e],n))},_setRowsHeightInPixels:function(){var e,t=this,i=a(t.element).children(L).children(B),n=i.length,o=i.map(function(){return x(a(this))});for(e=0;e<n;e++)i[e].style[O]=y(o[e])},showResizeHandles:function(){var e=this;e._initResizeHandles(),e._showResizeHandles()},_initResizeHandles:function(){var e,t=this,i=t.handles,n=t.options,o=t.options.handles,r=o.length;if(!(i&&i.length>0)){for(e=0;e<r;e++)t.handles.push(new f(c({appendTo:n.appendHandlesTo,resizableElement:t.element,rootElement:n.rootElement,rtl:n.rtl},o[e])));t._bindToResizeHandlesEvents()}},_destroyResizeHandles:function(){var e,t=this,i=t.handles?t.handles.length:0;for(e=0;e<i;e++)t.handles[e].destroy()},_showResizeHandles:function(){var e,t=this,i=t.handles||[],n=i.length;for(e=0;e<n;e++)t.handles[e].show()},_bindToResizeHandlesEvents:function(){var e,t,i=this,n=i.handles||[],o=n.length;for(e=0;e<o;e++)t=n[e],t.bind(A,d(i._onResizeHandleDragStart,i)),t.bind(E,d(i._onResizeHandleDrag,i)),t.bind(I,d(i._onResizeHandleDragEnd,i)),t.bind(F,d(i._onResizeHandleMouseOver,i)),t.bind(P,d(i._onResizeHandleMouseOut,i))},_onResizeHandleDragStart:function(){var e=this,t=a(e.element);t.addClass(D),e._initialElementHeight=x(t),e._initialElementWidth=k(t),e._disableKeyboard()},_onResizeHandleDrag:function(e){this.resize(e)},_onResizeHandleDragEnd:function(){var e=this;a(e.element).removeClass(D),e._enableKeyboard()},_enableKeyboard:function(){a(this.options.rootElement).off(M+C)},_disableKeyboard:function(){a(this.options.rootElement).on(M+C,function(e){e.preventDefault()})}}),X=p.extend({create:function(e){var t=this;a(e.body).on(R+C,H,function(i){var n=i.target,o=i.currentTarget,r=e.tableResizing,s=r?r.element:null;if(r){if(s&&o!==s){if(l(o,s)&&s!==n&&l(s,n))return;s!==n&&(e._destroyTableResizing(),t._initResizing(e,o))}}else t._initResizing(e,o);e._showTableResizeHandles()}).on(R+C,function(t){var i=e.tableResizing,n=i?i.element:null,o=t.target,r=a(o).hasClass(S)||a(o).parents(Y+S).length>0;!i||n===o||l(n,o)||r||e._destroyTableResizing()})},dispose:function(e){a(e.body).off(C)},_initResizing:function(t,i){u.msie||u.mozilla||(t.tableResizing=new Q(i,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body}))}});X.current=new X,Q.create=function(e){X.current.create(e)},Q.dispose=function(e){X.current.dispose(e)},c(h,{TableResizing:Q})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/table-wizard/table-wizard-command.min",["editor/plugins/tables.min"],e)}(function(){!function(e,t){var i=window.kendo,n=i.ui.editor,o=n.EditorUtils,r=n.RangeUtils,s=n.Dom,a=o.registerTool,l=n.ToolTemplate,c=n.Command,d=new n.BlockFormatFinder([{tags:["table"]}]),u=new n.BlockFormatFinder([{tags:["td","th"]}]),h=/([a-z]+|%)$/i,p=c.extend({exec:function(){var o=this,r=o.editor,s=o.range=o.lockRange(),a=o._sourceTable=o.options.insertNewTable?t:o._selectedTable(s),l=o._selectedTableCells=a?o._selectedCells(s):t,c={visible:!1,messages:r.options.messages,closeCallback:e.proxy(o.onDialogClose,o),table:o.parseTable(a,l),dialogOptions:r.options.dialogOptions,isRtl:i.support.isRtl(r.wrapper)},d=new n.TableWizardDialog(c);d.open()},onDialogClose:function(e){var t=this;t.releaseRange(t.range),e&&(t.options.insertNewTable?t.insertTable(t.createNewTable(e)):t.updateTable(e,t._sourceTable,t._selectedTableCells))},releaseRange:function(e){var t=this,i=t.editor.document;s.windowFromDocument(i).focus(),c.fn.releaseRange.call(t,e)},insertTable:function(e){var t=this.range;t.insertNode(e),t.collapse(!0),this.editor.selectRange(t),this._ensureFocusableAfterTable(e)},_ensureFocusableAfterTable:function(t){for(var i=e(t).parent().contents(),n=i.length-1,o=i.get(n);null!==o.nodeValue&&(" "===o.nodeValue||""===o.nodeValue);)n-=1,o=i.get(n);o===t&&s.insertAfter(s.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,i,n){for(var o,r,a,l,c,d,u,h,p=this,f=e(i.rows).toArray(),m=t.tableProperties,g=m.rows,v=m.columns,_=function(e){return e[e.length-1]};n.length>1;)n.pop();if(o=n.length?_(n).parentNode:_(f),p._deleteTableRows(f,f.length-g),f.length<g)for(l=e(o).index(),c=o.cells.length,d=g-f.length,a=o.parentNode;d;)r=a.insertRow(l+1),p._insertCells(c-r.cells.length,r),d--;f[0].cells.length>v&&e(f).each(function(e,t){for(;t.cells.length>v;)t.deleteCell(-1)}),f[0].cells.length<v&&(u=e(_(n)||_(o.cells)).index(),e(f).each(function(e,t){p._insertCells(v-t.cells.length,t,u+1)})),p._updateTableProperties(i,m),h=t.cellProperties,n[0]&&s.attr(n[0],{id:h.id||null}),(h.selectAllCells?e(f).children():e(n)).each(function(e,t){p._updateCellProperties(t,h)}),p._updateCaption(i,m),m.cellsWithHeaders=m.cellsWithHeaders||!1,p.cellsWithHeadersAssociated(i)!=m.cellsWithHeaders&&p.associateCellsWithHeader(i,m.cellsWithHeaders)},_isHeadingRow:function(e){return s.is(e.parentNode,"thead")||s.is(e.cells[0],"th")},associateCellsWithHeader:function(t,i){var n,o,r,s=(new Date).getTime(),a=[],l=t.rows[0].cells.length,c=function(){for(var e=0;e<l;e++)a[e]="table"+ ++s},d=function(t,n){e(n)[i?"attr":"removeAttr"]("id",a[t])},u=function(t,n){e(n)[i?"attr":"removeAttr"]("headers",a[t])},h=this._isHeadingRow;e(t.rows).each(function(i,s){if(h(s))for(n=i,o=t.rows[++n],r=o&&!h(o),r&&(c(),e(s.cells).each(d));r;)e(o.cells).each(u),o=t.rows[++n],r=o&&!h(o)})},cellsWithHeadersAssociated:function(t){var i,n=e(t.rows).children(),o=this._isHeadingRow,r=[];return n.each(function(e,t){t.id&&o(t.parentNode)&&r.push(t.id)}),i=n.filter(function(t,i){
var n=i.getAttribute("headers");return n&&!o(i.parentNode)&&e.inArray(n,r)>-1}),!!i.length},_insertCells:function(e,t,i){i=isNaN(i)?-1:i;for(var n,o=0;o<e;o++)n=t.insertCell(i),n.innerHTML="&nbsp;"},_deleteTableRows:function(e,t){for(var i,n,o=0;o<t;o++)i=e.pop(),n=i.parentNode,n.removeChild(i),n.rows.length||s.remove(n)},createNewTable:function(e){var t,i,n,o,r,a=this,l=a.editor.document,c=e.tableProperties,d=e.cellProperties,u=d.selectAllCells,h=s.create(l,"table");for(a._updateTableProperties(h,c),a._updateCaption(h,c),t=h.createTBody(),i=0;i<c.rows;i++)for(n=t.insertRow(),o=0;o<c.columns;o++)r=n.insertCell(),r.innerHTML="&nbsp;",0===i&&0===o&&d.id&&(r.id=d.id),a._updateCellProperties(r,u||0===i&&0===o?d:{});return c.cellsWithHeaders&&a.associateCellsWithHeader(h,c.cellsWithHeaders),h},_updateTableProperties:function(t,i){var n=this._getStylesData(i);s.attr(t,{cellSpacing:i.cellSpacing||null,cellPadding:i.cellPadding||null,className:i.className||null,id:i.id||null,summary:i.summary||null,style:n||null}),e(t).addClass("k-table")},_updateCellProperties:function(e,t){var i=this._getStylesData(t);i.padding=t.cellPadding||null,i.margin=t.cellMargin||null,s.attr(e,{style:i||null,className:t.className||null})},_updateCaption:function(e,t){var i,n;e.caption&&!t.captionContent?e.deleteCaption():t.captionContent&&(i=e.createCaption(),i.innerHTML=t.captionContent,n=this._getAlignmentData(t.captionAlignment),s.attr(i,{style:{textAlign:n.textAlign,verticalAlign:n.verticalAlign}}))},_getStylesData:function(e){var t=this._getAlignmentData(e.alignment),i="wrapText"in e?e.wrapText?"":"nowrap":null;return{width:e.width?e.width+e.widthUnit:null,height:e.height?e.height+e.heightUnit:null,textAlign:t.textAlign,verticalAlign:t.verticalAlign,backgroundColor:e.bgColor||"",borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderColor:e.borderColor||"",borderCollapse:e.collapseBorders?"collapse":null,whiteSpace:i}},_getAlignmentData:function(e){var t,i="",n=i;return e&&(e.indexOf(" ")!=-1?(t=e.split(" "),i=t[0],n=t[1]):i=e),{textAlign:i,verticalAlign:n}},parseTable:function(i,n){var o,r,s,a,l,c,d,u,h,p;return i?(o=this,r=i.style,s=i.rows,a=i.caption,l=e(a?a.cloneNode(!0):t),l.find(".k-marker").remove(),c=i.className,c=c.replace(/^k-table\s|\sk-table$/,""),c=c.replace(/\sk-table\s/," "),c=c.replace(/^k-table$/,""),d=o._getAlignment(i,!0),u=a?o._getAlignment(a):t,h=o.cellsWithHeadersAssociated(i),p={tableProperties:{width:r.width||i.width?parseFloat(r.width||i.width):null,height:r.height||i.height?parseFloat(r.height||i.height):null,columns:s[0]?s[0].children.length:0,rows:s.length,widthUnit:o._getUnit(r.width),heightUnit:o._getUnit(r.height),cellSpacing:i.cellSpacing,cellPadding:i.cellPadding,alignment:d.textAlign,bgColor:r.backgroundColor||i.bgColor,className:c,id:i.id,borderWidth:r.borderWidth||i.border,borderColor:r.borderColor,borderStyle:r.borderStyle||"",collapseBorders:!!r.borderCollapse,summary:i.summary,captionContent:a?l.html():"",captionAlignment:a&&u.textAlign?u.textAlign+" "+u.verticalAlign:"",cellsWithHeaders:h},selectedCells:[]},p.rows=o.parseTableRows(s,n,p),p):{tableProperties:{},selectedCells:[]}},parseTableRows:function(t,i,n){var o,r,s,a,l,c,d,u=this,h=[];for(c=0;c<t.length;c++)for(o=t[c],r={cells:[]},s=o.cells,h.push(r),d=0;d<s.length;d++)a=s[d],l=u.parseCell(a),e.inArray(a,i)!=-1&&n.selectedCells.push(l),r.cells.push(l);return h},parseCell:function(e){var t,i=this,n=e.style,o=i._getAlignment(e);return o=o.textAlign?o.textAlign+" "+o.verticalAlign:"",t={width:n.width||e.width?parseFloat(n.width||e.width):null,height:n.height||e.height?parseFloat(n.height||e.height):null,widthUnit:i._getUnit(n.width),heightUnit:i._getUnit(n.height),cellMargin:n.margin,cellPadding:n.padding,alignment:o,bgColor:n.backgroundColor||e.bgColor,className:e.className,id:e.id,borderWidth:n.borderWidth||e.border,borderColor:n.borderColor,borderStyle:n.borderStyle,wrapText:"nowrap"!=n.whiteSpace}},_getAlignment:function(e,t){var i,n=e.style,o=n.textAlign||e.align||"";return t?{textAlign:o}:(i=n.verticalAlign||e.vAlign||"",o&&i?{textAlign:o,verticalAlign:i}:!o&&i?{textAlign:"left",verticalAlign:i}:o&&!i?{textAlign:o,verticalAlign:"top"}:{textAlign:"",verticalAlign:""})},_getUnit:function(e){var t=(e||"").match(h);return t?t[0]:"px"},_selectedTable:function(e){var t=s.filterBy(r.nodes(e),s.htmlIndentSpace,!0);return d.findSuitable(t)[0]},_selectedCells:function(e){var t=s.filterBy(r.nodes(e),s.htmlIndentSpace,!0);return u.findSuitable(t)}}),f=n.Tool.extend({command:function(e){return e.insertNewTable=this.options.insertNewTable,new p(e)}}),m=f.extend({update:function(e,t){var i=!d.isFormatted(t);e.toggleClass("k-state-disabled",i)}});i.ui.editor.TableWizardTool=f,i.ui.editor.TableWizardCommand=p,a("tableWizard",new m({command:p,insertNewTable:!1,template:new l({template:o.buttonTemplate,title:"Table Wizard"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("editor/table-wizard/table-wizard-dialog.min",["editor/table-wizard/table-wizard-command.min"],e)}(function(){!function(e,t){var i=window.kendo,n={format:"0",min:0},o=["px","em"],r=["solid","dotted","dashed","double","groove","ridge","inset","outset","initial","inherit","none","hidden"],s={dataSource:[{className:"k-icon k-i-table-align-middle-left",value:"left"},{className:"k-icon k-i-table-align-middle-center",value:"center"},{className:"k-icon k-i-table-align-middle-right",value:"right"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},a={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-middle-left",value:"left middle"},{className:"k-icon k-i-table-align-middle-center",value:"center middle"},{className:"k-icon k-i-table-align-middle-right",value:"right middle"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},l={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},c='<div class="k-editor-dialog k-editor-table-wizard-dialog k-action-window k-popup-edit-form"><div class="k-edit-form-container"><div id="k-table-wizard-tabs" class="k-root-tabs"><ul><li class="k-state-active">#= messages.tableTab #</li><li>#= messages.cellTab #</li><li>#= messages.accessibilityTab #</li></ul><div id="k-table-properties"><div class="k-edit-label"><label for="k-editor-table-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-width" /><input id="k-editor-table-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-height" /><input id="k-editor-table-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-columns">#= messages.columns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-columns" /></div><div class="k-edit-label"><label for="k-editor-table-rows">#= messages.rows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-rows" /></div><div class="k-edit-label"><label for="k-editor-table-cell-spacing">#= messages.cellSpacing #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-spacing" /></div><div class="k-edit-label"><label for="k-editor-table-cell-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-padding" /></div><div class="k-edit-label"><label for="k-editor-table-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-table-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-table-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-table-bg" /></div><div class="k-edit-label"><label for="k-editor-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-css-class" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-id" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-border-width" /><input id="k-editor-border-color" /></div><div class="k-edit-label"><label for="k-editor-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-collapse-borders" type="checkbox" class="k-checkbox" /><label for="k-editor-collapse-borders" class="k-checkbox-label">#= messages.collapseBorders #</label></div></div><div id="k-cell-properties"><div class="k-edit-field"><input id="k-editor-selectAllCells" type="checkbox" class="k-checkbox" /><label for="k-editor-selectAllCells" class="k-checkbox-label">#= messages.selectAllCells #</label></div><div class="k-edit-label"><label for="k-editor-cell-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-width" /><input id="k-editor-cell-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-cell-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-height" /><input id="k-editor-cell-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-cell-margin">#= messages.cellMargin #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-margin" /></div><div class="k-edit-label"><label for="k-editor-table-cells-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cells-padding" /></div><div class="k-edit-label"><label for="k-editor-cell-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-cell-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-cell-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-cell-bg" /></div><div class="k-edit-label"><label for="k-editor-cell-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-cell-css-class" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-cell-id" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-border-width" /><input id="k-editor-cell-border-color" /></div><div class="k-edit-label"><label for="k-editor-cell-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-cell-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-wrap-text" type="checkbox" class="k-checkbox" /><label for="k-editor-wrap-text" class="k-checkbox-label">#= messages.wrapText #</label></div></div><div id="k-accessibility-properties"><div class="k-edit-label"><label for="k-editor-table-caption">#= messages.caption #</label></div><div class="k-edit-field"><input id="k-editor-table-caption" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-accessibility-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-accessibility-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-accessibility-summary">#= messages.summary #</label></div><div class="k-edit-field"><textarea id="k-editor-accessibility-summary" class="k-input k-textbox"></textarea></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-cells-headers" type="checkbox" class="k-checkbox" /><label for="k-editor-cells-headers" class="k-checkbox-label">#= messages.associateCellsWithHeaders #</label></div></div></div><div class="k-edit-buttons k-state-default"><button class="k-button k-primary k-dialog-ok">#= messages.dialogOk #</button><button class="k-button k-dialog-close">#= messages.dialogCancel #</button></div></div></div>',d=i.Class.extend({init:function(e){this.options=e},open:function(){function t(e){e.preventDefault(),l.destroy(),r.destroy()}function n(e){l.collectDialogValues(u),t(e),l.change&&l.change(),c.closeCallback(u)}function o(e){t(e),c.closeCallback()}var r,s,a,l=this,c=l.options,d=c.dialogOptions,u=c.table,h=c.messages,p=i.support.browser.msie;d.close=o,d.title=h.tableWizard,d.visible=c.visible,r=e(l._dialogTemplate(h)).appendTo(document.body).kendoWindow(d).closest(".k-window").toggleClass("k-rtl",c.isRtl).end().find(".k-dialog-ok").click(n).end().find(".k-dialog-close").click(o).end().data("kendoWindow"),s=r.element,l._initTabStripComponent(s),l._initTableViewComponents(s,u),l._initCellViewComponents(s,u),l._initAccessibilityViewComponents(s,u),r.center(),r.open(),p&&(a=s.closest(".k-window").height(),s.css("max-height",a))},_initTabStripComponent:function(e){var t=this.components={};t.tabStrip=e.find("#k-table-wizard-tabs").kendoTabStrip({animation:!1}).data("kendoTabStrip")},collectDialogValues:function(){var e=this,t=e.options.table;e._collectTableViewValues(t),e._collectCellViewValues(t),e._collectAccessibilityViewValues(t)},_collectTableViewValues:function(e){var t=this.components.tableView,i=e.tableProperties;i.width=t.width.value(),i.widthUnit=t.widthUnit.value(),i.height=t.height.value(),i.columns=t.columns.value(),i.rows=t.rows.value(),i.heightUnit=t.heightUnit.value(),i.cellSpacing=t.cellSpacing.value(),i.cellPadding=t.cellPadding.value(),i.alignment=t.alignment.value(),i.bgColor=t.bgColor.value(),i.className=t.className.value,i.id=t.id.value,i.borderWidth=t.borderWidth.value(),i.borderColor=t.borderColor.value(),i.borderStyle=t.borderStyle.value(),i.collapseBorders=t.collapseBorders.checked},_collectCellViewValues:function(e){var t=e.cellProperties={},i=this.components.cellView;t.selectAllCells=i.selectAllCells.checked,t.width=i.width.value(),t.widthUnit=i.widthUnit.value(),t.height=i.height.value(),t.heightUnit=i.heightUnit.value(),t.cellMargin=i.cellMargin.value(),t.cellPadding=i.cellPadding.value(),t.alignment=i.alignment.value(),t.bgColor=i.bgColor.value(),t.className=i.className.value,t.id=i.id.value,t.borderWidth=i.borderWidth.value(),t.borderColor=i.borderColor.value(),t.borderStyle=i.borderStyle.value(),t.wrapText=i.wrapText.checked,t.width||(t.selectAllCells=!0,t.width=100/e.tableProperties.columns,t.widthUnit="%")},_collectAccessibilityViewValues:function(e){var t=e.tableProperties,i=this.components.accessibilityView;t.captionContent=i.captionContent.value,t.captionAlignment=i.captionAlignment.value(),t.summary=i.summary.value,t.cellsWithHeaders=i.cellsWithHeaders.checked},_addUnit:function(t,i){i&&e.inArray(i,t)==-1&&t.push(i)},_initTableViewComponents:function(e,t){var i=this.components,n=i.tableView={},s=t.tableProperties=t.tableProperties||{};s.borderStyle=s.borderStyle||"",this._addUnit(o,s.widthUnit),this._addUnit(o,s.heightUnit),this._initNumericTextbox(e.find("#k-editor-table-width"),"width",s,n),this._initNumericTextbox(e.find("#k-editor-table-height"),"height",s,n),this._initNumericTextbox(e.find("#k-editor-table-columns"),"columns",s,n,{min:1,value:4}),this._initNumericTextbox(e.find("#k-editor-table-rows"),"rows",s,n,{min:1,value:4}),this._initDropDownList(e.find("#k-editor-table-width-type"),"widthUnit",s,n,o),this._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",s,n,o),this._initNumericTextbox(e.find("#k-editor-table-cell-spacing"),"cellSpacing",s,n),this._initNumericTextbox(e.find("#k-editor-table-cell-padding"),"cellPadding",s,n),this._initTableAlignmentDropDown(e.find("#k-editor-table-alignment"),s),this._initColorPicker(e.find("#k-editor-table-bg"),"bgColor",s,n),this._initInput(e.find("#k-editor-css-class"),"className",s,n),this._initInput(e.find("#k-editor-id"),"id",s,n),this._initNumericTextbox(e.find("#k-editor-border-width"),"borderWidth",s,n),this._initColorPicker(e.find("#k-editor-border-color"),"borderColor",s,n),this._initDropDownList(e.find("#k-editor-border-style"),"borderStyle",s,n,r),this._initCheckbox(e.find("#k-editor-collapse-borders"),"collapseBorders",s,n)},_initCellViewComponents:function(e,t){var i,n=this.components,s=n.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[],i=t.selectedCells[0]||{borderStyle:"",wrapText:!0},this._addUnit(o,i.widthUnit),this._addUnit(o,i.heightUnit),this._initCheckbox(e.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,s),this._initNumericTextbox(e.find("#k-editor-cell-width"),"width",i,s),this._initNumericTextbox(e.find("#k-editor-cell-height"),"height",i,s),this._initDropDownList(e.find("#k-editor-cell-width-type"),"widthUnit",i,s,o),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",i,s,o),this._initNumericTextbox(e.find("#k-editor-table-cell-margin"),"cellMargin",i,s),this._initNumericTextbox(e.find("#k-editor-table-cells-padding"),"cellPadding",i,s),this._initCellAlignmentDropDown(e.find("#k-editor-cell-alignment"),i),this._initColorPicker(e.find("#k-editor-cell-bg"),"bgColor",i,s),this._initInput(e.find("#k-editor-cell-css-class"),"className",i,s),this._initInput(e.find("#k-editor-cell-id"),"id",i,s),this._initNumericTextbox(e.find("#k-editor-cell-border-width"),"borderWidth",i,s),this._initColorPicker(e.find("#k-editor-cell-border-color"),"borderColor",i,s),this._initDropDownList(e.find("#k-editor-cell-border-style"),"borderStyle",i,s,r),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",i,s)},_initAccessibilityViewComponents:function(e,t){var i=this.components,n=i.accessibilityView={},o=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",o,n),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),o),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",o,n),this._initCheckbox(e.find("#k-editor-cells-headers"),"cellsWithHeaders",o,n)},_initNumericTextbox:function(t,i,o,r,s){var a=r[i]=t.kendoNumericTextBox(s?e.extend({},n,s):n).data("kendoNumericTextBox");i in o&&a.value(parseInt(o[i],10))},_initDropDownList:function(e,t,i,n,o){var r=n[t]=e.kendoDropDownList({dataSource:o}).data("kendoDropDownList");this._setComponentValue(r,i,t)},_initTableAlignmentDropDown:function(e,t){var i=this.options.messages,n=this.components.tableView,o=s.dataSource;o[0].tooltip=i.alignLeft,o[1].tooltip=i.alignCenter,o[2].tooltip=i.alignRight,o[3].tooltip=i.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,n)},_initCellAlignmentDropDown:function(e,t){var i=this.options.messages,n=this.components.cellView,o=a.dataSource;o[0].tooltip=i.alignLeftTop,o[1].tooltip=i.alignCenterTop,o[2].tooltip=i.alignRightTop,o[3].tooltip=i.alignLeftMiddle,o[4].tooltip=i.alignCenterMiddle,o[5].tooltip=i.alignRightMiddle,o[6].tooltip=i.alignLeftBottom,o[7].tooltip=i.alignCenterBottom,o[8].tooltip=i.alignRightBottom,o[9].tooltip=i.alignRemove,this._initAlignmentDropDown(e,a,"alignment",t,n)},_initAccessibilityAlignmentDropDown:function(e,t){var i=this.options.messages,n=this.components.accessibilityView,o=l.dataSource;o[0].tooltip=i.alignLeftTop,o[1].tooltip=i.alignCenterTop,o[2].tooltip=i.alignRightTop,o[3].tooltip=i.alignLeftBottom,o[4].tooltip=i.alignCenterBottom,o[5].tooltip=i.alignRightBottom,o[6].tooltip=i.alignRemove,this._initAlignmentDropDown(e,l,"captionAlignment",t,n)},_initAlignmentDropDown:function(e,t,i,n,o){var r=o[i]=e.kendoDropDownList(t).data("kendoDropDownList");r.list.addClass("k-align").css("width","110px"),this._setComponentValue(r,n,i)},_setComponentValue:function(e,t,i){i in t&&e.value(t[i])},_initColorPicker:function(e,t,i,n){var o=n[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");i[t]&&o.value(i[t])},_initInput:function(e,t,i,n){var o=n[t]=e.get(0);t in i&&(o.value=i[t])},_initCheckbox:function(e,t,i,n){var o=n[t]=e.get(0);t in i&&(o.checked=i[t])},destroy:function(){this._destroyComponents(this.components.tableView),this._destroyComponents(this.components.cellView),this._destroyComponents(this.components.accessibilityView),this._destroyComponents(this.components),delete this.components},_destroyComponents:function(e){for(var t in e)e[t].destroy&&e[t].destroy(),delete e[t]},_dialogTemplate:function(e){return i.template(c)({messages:e})}});i.ui.editor.TableWizardDialog=d}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.editor.min",["kendo.combobox.min","kendo.dropdownlist.min","kendo.resizable.min","kendo.window.min","kendo.colorpicker.min","kendo.imagebrowser.min","kendo.tabstrip.min","kendo.numerictextbox.min","util/undoredostack.min","editor/main.min","editor/dom.min","editor/serializer.min","editor/range.min","editor/command.min","editor/components.min","editor/toolbar.min","editor/immutables.min","editor/plugins/viewhtml.min","editor/plugins/link.min","editor/plugins/lists.min","editor/plugins/formatting.min","editor/plugins/image.min","editor/plugins/import.min","editor/plugins/insert.min","editor/plugins/export.min","editor/plugins/indent.min","editor/plugins/linebreak.min","editor/plugins/format.min","editor/plugins/inlineformat.min","editor/plugins/formatblock.min","editor/plugins/file.min","editor/plugins/tables.min","editor/plugins/clipboard.min","editor/plugins/keyboard.min","editor/plugins/exportpdf.min","editor/plugins/print.min","editor/resizing/column-resizing.min","editor/resizing/row-resizing.min","editor/resizing/table-resizing.min","editor/resizing/table-resize-handle.min","editor/table-wizard/table-wizard-command.min","editor/table-wizard/table-wizard-dialog.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.maskedtextbox.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(e){return e+h}function n(e,t){for(var i=0;i<t.length&&e[i]===t[i];)i++;return i}function o(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var r=window,s=r.Math.min,a=r.kendo,l=a.caret,c=a.keys,d=a.ui,u=d.Widget,h=".kendoMaskedTextBox",p=e.proxy,f=window.setTimeout,m="k-state-disabled",g="k-state-invalid",v="disabled",_="readonly",b="change",w="mouseup",y="drop",k="keydown",x="paste",C="input",S=i(a.support.propertyChangeEvent?"propertychange":C),T=u.extend({init:function(t,i){var n,o,r=this;u.fn.init.call(r,t,i),r._rules=e.extend({},r.rules,r.options.rules),t=r.element,n=t[0],r._wrapper(),r._tokenize(),r._form(),r.element.addClass("k-textbox").attr("autocomplete","off").on("focus"+h,function(){var e=n.value;e?r._togglePrompt(!0):n.value=r._old=r._emptyMask,r._oldValue=e,r._timeoutId=f(function(){l(t,0,e?r._maskLength:0)})}).on("focusout"+h,function(){var e=t.val();clearTimeout(r._timeoutId),n.value=r._old="",e!==r._emptyMask&&(n.value=r._old=e),r._change(),r._togglePrompt()}),o=t.is("[disabled]")||e(r.element).parents("fieldset").is(":disabled"),o?r.enable(!1):r.readonly(t.is("[readonly]")),r.value(r.options.value||t.val()),r._validationIcon=e("<span class='k-icon k-i-warning'></span>").insertAfter(t),a.notify(r)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:""},events:[b],rules:{0:/\d/,9:/\d|\s/,"#":/\d|\s|\+|\-/,L:/[a-zA-Z]/,"?":/[a-zA-Z]|\s/,"&":/\S/,C:/./,A:/[a-zA-Z0-9]/,a:/[a-zA-Z0-9]|\s/},setOptions:function(t){var i=this;u.fn.setOptions.call(i,t),i._rules=e.extend({},i.rules,i.options.rules),i._tokenize(),this._unbindInput(),this._bindInput(),i.value(i.element.val())},destroy:function(){var e=this;e.element.off(h),e._formElement&&(e._formElement.off("reset",e._resetHandler),e._formElement.off("submit",e._submitHandler)),u.fn.destroy.call(e)},raw:function(){var e=this._unmask(this.element.val(),0);return e.replace(RegExp(o(this.options.promptChar),"g"),"")},value:function(e){var i=this.element,n=this._emptyMask;return e===t?this.element.val():(null===e&&(e=""),n?(e=this._unmask(e+""),i.val(e?n:""),this._mask(0,this._maskLength,e),this._unmaskedValue=null,e=i.val(),this._oldValue=e,a._activeElement()!==i&&(e===n?i.val(""):this._togglePrompt()),t):(this._oldValue=e,i.val(e),t))},_togglePrompt:function(e){var t=this.element[0],i=t.value;this.options.clearPromptChar&&(i=e?this._oldValue:i.replace(RegExp(o(this.options.promptChar),"g")," "),t.value=this._old=i)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e,t,n=this;n._maskLength&&(n.options.$angular&&n.element.off(C),n.element.on(i(k),p(n._keydown,n)).on(i(y),p(n._drop,n)).on(i(b),p(n._trackChange,n)).on(S,p(n._inputHandler,n)),a.support.browser.msie&&(e=a.support.browser.version,e>8&&e<11&&(t=[i(w),i(y),i(k),i(x)].join(" "),n.element.on(t,p(n._legacyIEInputHandler,n)))))},_unbindInput:function(){var e=[S,i(k),i(w),i(y),i(x)].join(" ");this.element.off(e)},_editable:function(e){var t=this,i=t.element,n=t.wrapper,o=e.disable,r=e.readonly;t._unbindInput(),r||o?(i.attr(v,o).attr(_,r),n.toggleClass(m,o)):(i.removeAttr(v).removeAttr(_),n.removeClass(m),t._bindInput())},_change:function(){var e=this,t=e.value();t!==e._oldValue?(e._oldValue=t,e.trigger(b),e.element.trigger(b)):""===t&&e.__changing&&e.element.trigger(b)},inputChange:function(e){var t,i,o,r,c,d=this,u=d._old,h=d.element[0],p=h.value,f=l(h),m=f[1],g=p.length-u.length,v=a.support.mobileOS;d.__dropping&&g<0||(g===-1&&v.android&&"chrome"===v.browser&&(e=!0),t=s(m,n(p,u)),i=p.substring(t,m),h.value=p.substring(0,t)+d._emptyMask.substring(t),o=d._mask(t,m,i),r=d._trimStartPromptChars(p.substring(m),s(g,o-t)),c=d._unmask(r,u.length-r.length),d._mask(o,o,c),e&&(o=d._findCaretPosBackwards(t)),l(h,o),d.__dropping=!1)},_trimStartPromptChars:function(e,t){for(var i=this.options.promptChar;t-- >0&&0===e.indexOf(i);)e=e.substring(1);return e},_findCaretPosBackwards:function(e){var t=this._find(e,!0);return t<e&&(t+=1),t},_inputHandler:function(){a._activeElement()===this.element[0]&&this.inputChange(this.__backward)},_legacyIEInputHandler:function(e){var t=this,i=t.element[0],n=i.value,o=e.type;t.__pasting="paste"===o,f(function(){"mouseup"===o&&t.__pasting||i.value&&i.value!==n&&t.inputChange(t.__backward)})},_trackChange:function(){var e=this;e.__changing=!0,f(function(){e.__changing=!1})},_form:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){f(function(){t.value(i[0].value)})},t._submitHandler=function(){t.element[0].value=t._old=t.raw()},t.options.unmaskOnPost&&o.on("submit",t._submitHandler),t._formElement=o.on("reset",t._resetHandler))},_keydown:function(e){var t=e.keyCode;this.__backward=t===c.BACKSPACE,t===c.ENTER&&this._change()},_drop:function(){this.__dropping=!0},_find:function(e,t){var i=this.element.val()||this._emptyMask,n=1;for(t===!0&&(n=-1);e>-1||e<=this._maskLength;){if(i.charAt(e)!==this.tokens[e])return e;e+=n}return-1},_mask:function(e,i,n,o){var r,s,c,d,u=this.element[0],h=u.value||this._emptyMask,p=this.options.promptChar,f=0;for(e=this._find(e,o),e>i&&(i=e),s=this._unmask(h.substring(i),i),n=this._unmask(n,e),r=n.length,n&&(s=s.replace(RegExp("^_{0,"+r+"}"),"")),n+=s,h=h.split(""),c=n.charAt(f);e<this._maskLength;)h[e]=c||p,c=n.charAt(++f),d===t&&f>r&&(d=e),e=this._find(e+1);return u.value=this._old=h.join(""),a._activeElement()===u&&(d===t&&(d=this._maskLength),l(u,d)),d},_unmask:function(t,i){var n,o,r,s,a,l,c,d;if(!t)return"";if(this._unmaskedValue===t)return this._unmaskedValue;for(t=(t+"").split(""),r=0,s=i||0,a=this.options.promptChar,l=t.length,c=this.tokens.length,d="";s<c&&(n=t[r],o=this.tokens[s],n===o||n===a?(d+=n===a?a:"",r+=1,s+=1):"string"!=typeof o?(o&&o.test&&o.test(n)||e.isFunction(o)&&o(n)?(d+=n,s+=1):1===l&&this._blinkInvalidState(),r+=1):s+=1,!(r>=l)););return this._unmaskedValue=d,d},_wrapper:function(){var e=this,t=e.element,i=t[0],n=t.wrap("<span class='k-widget k-maskedtextbox'></span>").parent();n[0].style.cssText=i.style.cssText,i.style.width="100%",e.wrapper=n.addClass(i.className)},_blinkInvalidState:function(){var e=this;e.wrapper.addClass(g),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=f(p(e._removeInvalidState,e),100)},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(g),e._invalidStateTimeout=null},_tokenize:function(){for(var e,t,i,n,o=[],r=0,s=this.options.mask||"",l=s.split(""),c=l.length,d=0,u="",h=this.options.promptChar,p=a.getCulture(this.options.culture).numberFormat,f=this._rules;d<c;d++)if(e=l[d],t=f[e])o[r]=t,u+=h,r+=1;else for("."===e||","===e?e=p[e]:"$"===e?e=p.currency.symbol:"\\"===e&&(d+=1,e=l[d]),e=e.split(""),i=0,n=e.length;i<n;i++)o[r]=e[i],u+=e[i],r+=1;this.tokens=o,this._emptyMask=u,this._maskLength=u.length}});d.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],e)}(function(){return function(e,t){function i(e){e.target.is(".k-toggle-button")||e.target.toggleClass(H,"press"==e.type)}function n(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 o(t){e(t.target).closest("a.k-button").length&&t.preventDefault()}function r(t,i){var n="next"===i?e.fn.next:e.fn.prev,o="next"===i?e.fn.first:e.fn.last,s=n.call(t);return s.is(":kendoFocusable")||!s.length?s:s.find(":kendoFocusable").length?o.call(s.find(":kendoFocusable")):r(s,i)}var s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k=window.kendo,x=k.Class,C=k.ui.Widget,S=e.proxy,T=k.isFunction,D=k.keys,A=k._outerWidth,E="k-toolbar",I="k-button",M="k-overflow-button",R="k-toggle-button",F="k-button-group",P="k-split-button",z="k-separator",B="k-popup",L="k-toolbar-resizable",H="k-state-active",N="k-state-disabled",O="k-state-hidden",V="k-group-start",W="k-group-end",U="k-primary",q="k-icon",j="k-i-",G="k-button-icon",$="k-button-icontext",K="k-list-container k-split-container",Y="k-split-button-arrow",Q="k-overflow-anchor",X="k-overflow-container",Z="k-toolbar-first-visible",J="k-toolbar-last-visible",ee="click",te="toggle",ie="open",ne="close",oe="overflowOpen",re="overflowClose",se="never",ae="auto",le="always",ce="k-overflow-hidden",de="_optionlist",ue=k.attr("uid");
k.toolbar={},s={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,i){s[e]={toolbar:t,overflow:i}},a=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(O).show(),this.options.hidden=!1},hide:function(){this.element.addClass(O).hide(),this.overflow&&this.overflowHidden&&this.overflowHidden(),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 i=this.element.attr(ue);return this.overflow&&this.options.splitContainerId?e("#"+this.options.splitContainerId).find("["+ue+"='"+i+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+ue+"='"+i+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ue+"='"+i+"']").data(this.options.type):t}}),k.toolbar.Item=a,l=a.extend({init:function(i,n){var o=e(i.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=o,this.options=i,this.toolbar=n,this.attributes(),i.primary&&o.addClass(U),i.togglable&&(o.addClass(R),this.toggle(i.selected)),i.url===t||i.useButtonTag||(o.attr("href",i.url),i.mobile&&o.attr(k.attr("role"),"button")),i.group&&(o.attr(k.attr("group"),i.group),this.group=this.toolbar.addToGroup(this,i.group)),!i.togglable&&i.click&&T(i.click)&&(this.clickHandler=i.click),i.togglable&&i.toggle&&T(i.toggle)&&(this.toggleHandler=i.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(){if(this.options.isChild)return this.element.closest("."+F).data("buttonGroup")},_addGraphics:function(){var t,i,n,o=this.element,r=this.options.icon,s=this.options.spriteCssClass,a=this.options.imageUrl;(s||a||r)&&(t=!0,o.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass(q)&&!e(this).hasClass("k-image")}).each(function(i,n){(1==n.nodeType||3==n.nodeType&&e.trim(n.nodeValue).length>0)&&(t=!1)}),o.addClass(t?G:$)),r?(i=o.children("span."+q).first(),i[0]||(i=e('<span class="'+q+'"></span>').prependTo(o)),i.addClass(j+r)):s?(i=o.children("span.k-sprite").first(),i[0]||(i=e('<span class="k-sprite '+q+'"></span>').prependTo(o)),i.addClass(s)):a&&(n=o.children("img.k-image").first(),n[0]||(n=e('<img alt="icon" class="k-image" />').prependTo(o)),n.attr("src",a))}}),k.toolbar.Button=l,c=l.extend({init:function(e,t){l.fn.init.call(this,e,t);var i=this.element;i.addClass(I),this.addIdAttr(),e.align&&i.addClass("k-align-"+e.align),"overflow"!=e.showText&&e.text&&i.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(H,e),this.options.selected=e}}),k.toolbar.ToolBarButton=c,d=l.extend({init:function(t,i){this.overflow=!0,l.fn.init.call(this,e.extend({},t),i);var n=this.element;"toolbar"!=t.showText&&t.text&&n.html(t.mobile?'<span class="km-text">'+t.text+"</span>":'<span class="k-text">'+t.text+"</span>"),t.hasIcon="toolbar"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),t.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),n.addClass(M+" "+I),t.hidden&&this.hide(),t.togglable&&this.toggle(t.selected),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(H,e):this.element.find(".k-button").toggleClass(H,e),this.options.selected=e}}),k.toolbar.OverflowButton=d,k.toolbar.registerComponent("button",c,d),u=a.extend({createButtons:function(t){var i,n,o=this.options,r=o.buttons||[];for(n=0;n<r.length;n++)r[n].uid||(r[n].uid=k.guid()),i=new t(e.extend({mobile:o.mobile,isChild:!0,type:"button"},r[n]),this.toolbar),i.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+O+"'):first").addClass(V),this.element.children().filter(":not('."+O+"'):last").addClass(W)}}),k.toolbar.ButtonGroup=u,h=u.extend({init:function(t,i){var n=this.element=e("<div></div>");this.options=t,this.toolbar=i,this.addIdAttr(),t.align&&n.addClass("k-align-"+t.align),this.createButtons(c),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),n.addClass(F),this.element.data({type:"buttonGroup",buttonGroup:this})}}),k.toolbar.ToolBarButtonGroup=h,p=u.extend({init:function(t,i){var n=this.element=e("<li></li>");this.options=t,this.toolbar=i,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),n.addClass((t.mobile?"":F)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.OverflowButtonGroup=p,k.toolbar.registerComponent("buttonGroup",h,p),f=a.extend({init:function(t,i){var n=this.element=e('<div class="'+P+'" tabindex="0"></div>');this.options=t,this.toolbar=i,this.mainButton=new c(e.extend({},t,{hidden:!1}),i),this.arrowButton=e('<a class="'+I+" "+Y+'"><span class="'+(t.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-60-down")+'"></span></a>'),this.popupElement=e('<ul class="'+K+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(n),this.arrowButton.appendTo(n),this.popupElement.appendTo(n),t.align&&n.addClass("k-align-"+t.align),t.id||(t.id=t.uid),n.attr("id",t.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(t.enable),t.hidden&&this.hide(),n.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var t=this;t.popupElement.on("keydown","."+I,function(i){var n=e(i.target).parent();i.preventDefault(),i.keyCode===D.ESC||i.keyCode===D.TAB||i.altKey&&i.keyCode===D.UP?(t.toggle(),t.focus()):i.keyCode===D.DOWN?r(n,"next").focus():i.keyCode===D.UP?r(n,"prev").focus():i.keyCode===D.SPACEBAR||i.keyCode===D.ENTER?t.toolbar.userEvents.trigger("tap",{target:e(i.target)}):i.keyCode===D.HOME?n.parent().find(":kendoFocusable").first().focus():i.keyCode===D.END&&n.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var t,i,n=this.options,o=n.menuButtons;for(i=0;i<o.length;i++)t=new c(e.extend({mobile:n.mobile,type:"button",click:n.click},o[i]),this.toolbar),t.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var i=this,r=this.options,s=this.element;this.popupElement.attr("id",r.id+de).attr(ue,r.rootUid),r.mobile&&(this.popupElement=n(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:r.mobile?e(r.mobile).children(".km-pane"):null,anchor:s,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:r.animation,open:function(e){var n=i.toolbar.trigger(ie,{target:s});return n?(e.preventDefault(),t):(i.adjustPopupWidth(e.sender),t)},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){var t=i.toolbar.trigger(ne,{target:s});t&&e.preventDefault(),s.focus()}}).data("kendoPopup"),this.popup.element.on(ee,"a.k-button",o)},adjustPopupWidth:function(e){var t,i=e.options.anchor,n=A(i);k.wrap(e.element).addClass("k-split-wrapper"),t="border-box"!==e.element.css("box-sizing")?n-(A(e.element)-e.element.width()):n,e.element.css({fontFamily:i.css("font-family"),"min-width":t})},remove:function(){this.popup.element.off(ee,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){(this.options.enable||this.popup.visible())&&this.popup.toggle()},enable:function(e){e===t&&(e=!0),this.mainButton.enable(e),this.element.toggleClass(N,!e),this.options.enable=e},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(O).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(O).hide(),this.options.hidden=!1}}),k.toolbar.ToolBarSplitButton=f,m=a.extend({init:function(t,i){var n,o,r,s=this.element=e('<li class="'+P+'"></li>'),a=t.menuButtons;for(this.options=t,this.toolbar=i,this.overflow=!0,o=(t.id||t.uid)+de,this.mainButton=new d(e.extend({},t)),this.mainButton.element.appendTo(s),r=0;r<a.length;r++)n=new d(e.extend({mobile:t.mobile,type:"button",splitContainerId:o},a[r]),this.toolbar),n.element.appendTo(s);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,s.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.OverflowSplitButton=m,k.toolbar.registerComponent("splitButton",f,m),g=a.extend({init:function(t,i){var n=this.element=e("<div>&nbsp;</div>");this.element=n,this.options=t,this.toolbar=i,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),n.addClass(z),n.data({type:"separator",separator:this})}}),v=a.extend({init:function(t,i){var n=this.element=e("<li>&nbsp;</li>");this.element=n,this.options=t,this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),n.addClass(z),n.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(ce)}}),k.toolbar.registerComponent("separator",g,v),_=a.extend({init:function(t,i,n){var o=T(t)?t(i):t;o=o instanceof jQuery?o.wrap("<div></div>").parent():e("<div></div>").html(o),this.element=o,this.options=i,this.options.type="template",this.toolbar=n,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})}}),k.toolbar.TemplateItem=_,b=a.extend({init:function(t,i,n){var o=e(T(t)?t(i):t);o=o instanceof jQuery?o.wrap("<li></li>").parent():e("<li></li>").html(o),this.element=o,this.options=i,this.options.type="template",this.toolbar=n,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=b,w=x.extend({init:function(e){this.name=e,this.buttons=[]},add:function(e){this.buttons[this.buttons.length]=e},remove:function(t){var i=e.inArray(t,this.buttons);this.buttons.splice(i,1)},select:function(e){var t,i;for(i=0;i<this.buttons.length;i++)t=this.buttons[i],t.select(!1);e.select(!0),e.twin()&&e.twin().select(!0)}}),y=C.extend({init:function(t,n){var r,s=this;if(C.fn.init.call(s,t,n),n=s.options,t=s.wrapper=s.element,t.addClass(E+" 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"),q="km-icon",j="km-",I="km-button",F="km-buttongroup km-widget",H="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:"."+Q,tap:S(s._toggleOverflow,s)}),s._resizeHandler=k.onResize(function(){s.resize()})):s.popup={element:e([])},n.items&&n.items.length){for(r=0;r<n.items.length;r++)s.add(n.items[r]);n.resizable&&s._shrink(s.element.innerWidth())}s.userEvents=new k.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+ue+"="+this.uid+"] a."+I+", ["+ue+"="+this.uid+"] ."+M,tap:S(s._buttonClick,s),press:i,release:i}),s.element.on(ee,"a.k-button",o),s._navigatable(),n.resizable&&s.popup.element.on(ee,NaN,o),n.resizable&&this._toggleOverflowAnchor(),k.notify(s)},events:[ee,te,ie,ne,oe,re],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(e,t){var i;return i=this._groups[t]?this._groups[t]:this._groups[t]=new w,i.add(e),i},destroy:function(){var t=this;t.element.find("."+P).each(function(t,i){e(i).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()),C.fn.destroy.call(t)},add:function(t){var i,n,o,r=s[t.type],a=t.template,l=this,c=l.isMobile?"":"k-item k-state-default",d=t.overflowTemplate;if(e.extend(t,{uid:k.guid(),animation:l.animation,mobile:l.isMobile,rootUid:l.uid}),t.menuButtons)for(o=0;o<t.menuButtons.length;o++)e.extend(t.menuButtons[o],{uid:k.guid()});a&&!d?t.overflow=se:t.overflow||(t.overflow=ae),t.overflow!==se&&l.options.resizable&&(d?n=new b(d,t,l):r&&(n=new r.overflow(t,l),n.element.addClass(c)),n&&(t.overflow===ae&&n.overflowHidden(),n.element.appendTo(l.popup.container),l.angular("compile",function(){return{elements:n.element.get()}}))),t.overflow!==le&&(a?i=new _(a,t,l):r&&(i=new r.toolbar(t,l)),i&&(i.element.appendTo(l.element),l.angular("compile",function(){return{elements:i.element.get()}})))},_getItem:function(t){var i,n,o,r,s=this.options.resizable;return i=this.element.find(t),i.length||(i=e(".k-split-container[data-uid="+this.uid+"]").find(t)),r=i.length?i.data("type"):"",n=i.data(r),n?(n.main&&(i=i.parent("."+P),r="splitButton",n=i.data(r)),s&&(o=n.twin())):s&&(i=this.popup.element.find(t),r=i.length?i.data("type"):"",o=i.data(r),o&&o.main&&(i=i.parent("."+P),r="splitButton",o=i.data(r))),{type:r,toolbar:n,overflow:o}},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&&("button"===t.toolbar.options.type&&t.toolbar.options.isChild?(t.toolbar.hide(),t.toolbar.getParentGroup().refresh()):t.toolbar.options.hidden||t.toolbar.hide()),t.overflow&&("button"===t.overflow.options.type&&t.overflow.options.isChild?(t.overflow.hide(),t.overflow.getParentGroup().refresh()):t.overflow.options.hidden||t.overflow.hide()),this.resize(!0)},show:function(e){var t=this._getItem(e);t.toolbar&&("button"===t.toolbar.options.type&&t.toolbar.options.isChild?(t.toolbar.show(),t.toolbar.getParentGroup().refresh()):t.toolbar.options.hidden&&t.toolbar.show()),t.overflow&&("button"===t.overflow.options.type&&t.overflow.options.isChild?(t.toolbar.show(),t.overflow.getParentGroup().refresh()):t.overflow.options.hidden&&t.overflow.show()),this.resize(!0)},enable:function(e,i){var n=this._getItem(e);t===i&&(i=!0),n.toolbar&&n.toolbar.enable(i),n.overflow&&n.overflow.enable(i)},getSelectedFromGroup:function(e){return this.element.find("."+R+"[data-group='"+e+"']").filter("."+H)},toggle:function(i,n){var o=e(i),r=o.data("button");r.options.togglable&&(n===t&&(n=!0),r.toggle(n,!0))},_renderOverflow:function(){var t=this,i=s.overflowContainer,o=t._isRtl,a=o?"left":"right";t.overflowAnchor=e(s.overflowAnchor).addClass(I),t.element.append(t.overflowAnchor),t.isMobile?(t.overflowAnchor.append('<span class="km-icon km-more"></span>'),i=n(i)):t.overflowAnchor.append('<span class="k-icon k-i-more-vertical"></span>'),t.popup=new k.ui.Popup(i,{origin:"bottom "+a,position:"top "+a,anchor:t.overflowAnchor,isRtl:o,animation:t.animation,appendTo:t.isMobile?e(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(i){var n=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"):n.css("margin-left",(o?-1:1)*((A(n)-n.width())/2+1)),t.trigger(oe)&&i.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","."+I,function(i){var n,o=e(i.target),s=o.parent(),a=s.is("."+F)||s.is("."+P);i.preventDefault(),i.keyCode===D.ESC||i.keyCode===D.TAB||i.altKey&&i.keyCode===D.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):i.keyCode===D.DOWN?(n=!a||a&&o.is(":last-child")?s:o,r(n,"next").focus()):i.keyCode===D.UP?(n=!a||a&&o.is(":first-child")?s:o,r(n,"prev").focus()):i.keyCode===D.SPACEBAR||i.keyCode===D.ENTER?(t.userEvents.trigger("tap",{target:e(i.target)}),t.overflowAnchor.focus()):i.keyCode===D.HOME?s.parent().find(":kendoFocusable").first().focus():i.keyCode===D.END&&s.parent().find(":kendoFocusable").last().focus()}),t.popup.container=t.isMobile?t.popup.element.find("."+X):t.popup.element,t.popup.container.attr(ue,this.uid)},_toggleOverflowAnchor:function(){var e=!1;e=this.options.mobile?this.popup.element.find("."+X).children(":not(."+ce+", ."+B+")").length>0:this.popup.element.children(":not(."+ce+", ."+B+")").length>0,this.overflowAnchor.css(e?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(i){var n,o,r,s,a,l,c,d=this,u=i.target.closest("."+Y).length;return i.preventDefault(),u?(d._toggle(i),t):(o=e(i.target).closest("."+I,d.element),o.hasClass(Q)||(r=o.data("button"),!r&&d.popup&&(o=e(i.target).closest("."+M,d.popup.container),r=o.parent("li").data("button")),r&&r.options.enable&&(r.options.togglable?(a=T(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,item:r},a&&a.call(d,l),d.trigger(te,l)):(a=T(r.clickHandler)?r.clickHandler:null,l={sender:d,target:o,id:r.options.id,item:r},a&&a.call(d,l),d.trigger(ee,l)),r.options.url&&(r.options.attributes&&r.options.attributes.target&&(c=r.options.attributes.target),window.open(r.options.url,c||"_self")),o.hasClass(M)&&d.popup.close(),s=o.closest(".k-split-container"),s[0]&&(n=s.data("kendoPopup"),(n?n:s.parents(".km-popup-wrapper").data("kendoPopup")).close()))),t)},_navigatable:function(){var t=this;t.element.attr("tabindex",0).on("focusin",function(t){var i=e(t.target),n=e(this).find(":kendoFocusable:first");i.is("."+E)&&0!==n.length&&(n.is("."+Q)&&(n=r(n,"next")),n[0].focus())}).on("keydown",S(t._keydown,t))},_keydown:function(i){var n,o,r,s,a,l,c,d=e(i.target),u=i.keyCode,h=this.element.children(":not(.k-separator):visible"),p=this._isRtl?-1:1;if(u===D.TAB&&(n=d.parentsUntil(this.element).last(),o=!1,r=!1,n.length||(n=d),n.is("."+Q)&&(i.shiftKey&&i.preventDefault(),h.last().is(":kendoFocusable")?h.last().focus():h.last().find(":kendoFocusable").last().focus()),i.shiftKey||h.index(n)!==h.length-1||(o=!n.is("."+F)||d.is(":last-child")),s=h.index(n)===h.not(".k-overflow-anchor").first().index(),i.shiftKey&&s&&(r=!n.is("."+F)||d.is(":first-child")),o&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(i.preventDefault(),this.overflowAnchor.focus()),r&&(i.preventDefault(),a=this._getPrevFocusable(this.wrapper),a&&a.focus()),this._preventNextFocus=!1),i.altKey&&u===D.DOWN)return l=e(document.activeElement).data("splitButton"),c=e(document.activeElement).is("."+Q),l?l.toggle():c&&this._toggleOverflow(),t;if((u===D.SPACEBAR||u===D.ENTER)&&!d.is("input, checkbox"))return u===D.SPACEBAR&&i.preventDefault(),d.is("."+P)?(d=d.children().first(),this.userEvents.trigger("tap",{target:d})):u===D.SPACEBAR&&this.userEvents.trigger("tap",{target:d}),t;if(u===D.HOME){if(d.is(".k-dropdown")||d.is("input"))return;this.overflowAnchor?h.eq(1).focus():h.first().focus(),i.preventDefault()}else if(u===D.END){if(d.is(".k-dropdown")||d.is("input"))return;this.overflowAnchor&&"hidden"!=e(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():h.last().focus(),i.preventDefault()}else u!==D.RIGHT||this._preventNextFocus||d.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(i.target,1*p)?u!==D.LEFT||this._preventNextFocus||d.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(i.target,-1*p)||(this._getNextElement(i.target,-1*p).focus(),i.preventDefault()):(this._getNextElement(i.target,1*p).focus(),i.preventDefault())},_getNextElement:function(t,i){var n=this.element.children(":not(.k-separator):visible"),o=n.index(n.index(t)===-1?t.parentElement:t),r=this.overflowAnchor?1:0,s=i,a=1===i?n.length-1:r,l=1===i?r:n.length-1,c=n[o+i];if(this._preventNextFocus=!1,e(t).closest("."+F).length&&!e(t).is(1===i?":last-child":":first-child"))return e(t).closest("."+F).children()[e(t).closest("."+F).children().index(t)+i];for(this.overflowAnchor&&t===this.overflowAnchor[0]&&i===-1&&(c=n[n.length-1]),o===a&&(c=!this.overflowAnchor||this.overflowAnchor&&"hidden"===e(this.overflowAnchor).css("visibility")?n[l]:this.overflowAnchor);!e(c).is(":kendoFocusable");){if(c=i===-1&&e(c).closest("."+F).length?e(c).children(":not(label, div)").last():e(c).children(":not(label, div)").first(),!c.length&&(s+=i,c=n[o+s],!c))return this.overflowAnchor;this._preventNextFocus=!e(c).closest("."+F).length}return c},_getPrevFocusable:function(i){if(i.is("html"))return i;var n,o,r=i.prevAll();return r.each(function(){return o=e(this),o.is(":kendoFocusable")?(n=o,!1):o.find(":kendoFocusable").length>0?(n=o.find(":kendoFocusable").last(),!1):t}),n?n:this._getPrevFocusable(i.parent())},_toggle:function(t){var i=e(t.target).closest("."+P).data("splitButton");t.preventDefault(),i.options.enable&&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('."+O+"')").each(function(){t+=A(e(this),!0)}),Math.ceil(t)},_shrink:function(e){var t,i,n;if(e<this._childrenWidth())for(i=this.element.children(":visible:not([data-overflow='never'], ."+Q+")"),n=i.length-1;n>=0&&(t=i.eq(n),!(e>this._childrenWidth()));n--)this._hideItem(t)},_stretch:function(e){var t,i,n;if(e>this._childrenWidth())for(i=this.element.children(":hidden:not('."+O+"')"),n=0;n<i.length&&(t=i.eq(n),!(e<this._childrenWidth())&&this._showItem(t,e));n++);},_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()+A(e,!0))&&(e.show(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(ce),!0)},_markVisibles:function(){var e=this.popup.container.children(),t=this.element.children(":not(.k-overflow-anchor)"),i=e.filter(":not(.k-overflow-hidden)"),n=t.filter(":visible");e.add(t).removeClass(Z+" "+J),i.first().add(n.first()).addClass(Z),i.last().add(n.last()).addClass(J)}}),k.ui.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mediaplayer.min",["kendo.slider.min","kendo.toolbar.min","kendo.dropdownlist.min","kendo.tooltip.min"],e)}(function(){return function(e,t){var i=window.kendo,n="end",o="pause",r="play",s="ready",a="timeChange",l="volumeChange",c="k-i-full-screen",d="k-i-full-screen-exit",u="k-i-volume-off",h="k-i-volume-down",p="k-i-volume-up",f="k-mediaplayer-quality",m="k-i-play",g="k-i-pause",v="k-mediaplayer-titlebar",_="k-title",b="k-mediaplayer-toolbar-wrap",w="k-mediaplayer-toolbar",y="k-mediaplayer-seekbar",k="k-mediaplayer-volume",x="k-mediaplayer-media",C="k-mediaplayer-overlay",S="k-mediaplayer-yt",T=".",D=i.ui,A=".kendoMediaPlayer",E=new Date(1970,0,1),I=60*E.getTimezoneOffset(),M=i.ui.Widget,R=e.isArray,F={shortTime:"mm:ss",longTime:"HH:mm:ss"},P=i.template,z=e.proxy,B=i.keys,L={htmlPlayer:"<video class='"+x+"'> </video>",titleBar:P("<div class='"+v+"' role='heading'><span class='"+_+"'>Video Title</span></div>"),toolBar:"<div class='"+b+"'><div class='"+w+"'></div></div>",youtubePlayer:"<div class='"+S+"'> </div>",toolBarTime:"<span class='k-mediaplayer-currenttime'>00:00:00</span> / <span class='k-mediaplayer-duration'>00:00:00</span>",slider:"<input class='"+y+"' value='0' title='seekbar' />",volumeSlider:"<input class='"+k+"' title='volume'/>",qualityDropDown:"<input class='"+f+"' title='video quality' />",toolTip:"#= kendo.toString(new Date(value), 'HH:mm:ss') #"},H=M.extend({init:function(t,n){this.wrapper=e(t),M.fn.init.call(this,t,n),this.wrapper.addClass("k-mediaplayer k-widget"),n=this.options,this._currentIndex=0,this._createTitlebar(),this._createToolbar(),this._createDropDown(),this._createSlider(),this._createVolumeSlider(),this._timers={},this._aria(),this._navigatable(),n.fullScreen&&this.fullScreen(!0),n.media&&this.media(this.options.media),i.notify(this)},events:[n,o,r,s,a,l],options:{name:"MediaPlayer",autoPlay:!1,autoRepeat:!1,volume:100,fullScreen:!1,mute:!1,navigatable:!1,forwardSeek:!0,media:null,messages:{pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",quality:"Quality",fullscreen:"Full Screen"}},_msToTime:function(e){var t=new Date(E.getTime());return t.setSeconds(e),t},_timeToSec:function(e){var t=new Date(e).getTime();return t/1e3},_createTitlebar:function(){this._titleBar=this.wrapper.find(T+v),0===this._titleBar.length&&(this.wrapper.append(L.titleBar),this._titleBar=this.wrapper.find(T+v))},_createSlider:function(){var e=this.wrapper.find(T+y);this._slider||(this._sliderDragChangeHandler=z(this._sliderDragChange,this),this._sliderDraggingHandler=z(this._sliderDragging,this),e=this.wrapper.find(T+y),this._slider=new D.Slider(e[0],{smallStep:1e3,tickPlacement:"none",showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:L.toolTip},dragHandleTitle:""}))},_createVolumeSlider:function(){var e=this.wrapper.find(T+k);this._volumeSlider||(this._volumeDraggingHandler=z(this._volumeDragging,this),this._volumeChangeHandler=z(this._volumeChange,this),e.width(87),this._volumeSlider=new D.Slider(e[0],{smallStep:1,min:0,max:100,value:this.options.volume,slide:this._volumeDraggingHandler,change:this._volumeChangeHandler,tickPlacement:"none",showButtons:!1,tooltip:{enabled:!1},dragHandleTitle:""}))},_resetTime:function(){this._youTubeVideo?this._ytmedia.seekTo(0,!0):this._media.currentTime=0,this._mediaTimeUpdate(),e.grep(this._toolBar.options.items,function(e){return!!e.template}).template=L.toolBarTime},_currentUrl:function(){var e=this.media();return R(e.source)?e.source[this._currentIndex].url:e.source},_isYouTubeUrl:function(){return!!this._currentUrl().match("youtube.com/|youtu.be/")},_setPlayerUrl:function(){var e,t=this._youTubeVideo;this.stop(),this._youTubeVideo=this._isYouTubeUrl(),t!==this._youTubeVideo&&(this.wrapper.find(T+S).toggle(),this.wrapper.find(T+x).toggle()),e=this._media||this._ytmedia,this._initializePlayer(),e&&(this.mute(this.mute()),this.volume(this.volume())),this._youTubeVideo?this._ytmedia&&(this._videoOverlay&&this._videoOverlay.hide(),this.options.autoPlay?(this._ytmedia.loadVideoById(this._getMediaId()),this._playStateToggle(!0)):(this._ytmedia.cueVideoById(this._getMediaId()),this._playStateToggle(!0))):(this._videoOverlay.show(),this.wrapper.find(T+x+" > source").remove(),this.wrapper.find(T+x).attr("src",this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(T+w);0===t.length&&(this._toolbarClickHandler=z(this._toolbarClick,this),this.wrapper.append(L.toolBar),t=this.wrapper.find(T+w),t.width(this.wrapper.find(T+x).width()),this._toolBar=new D.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:"button",attributes:{"class":"k-play-button"},icon:"play"},{template:L.toolBarTime,attributes:{"class":"k-mediaplayer-currenttime-wrap"}},{type:"separator",attributes:{"class":"k-toolbar-spacer"}},{type:"button",attributes:{"class":"k-volume-button"},icon:"volume-up"},{template:L.volumeSlider,attributes:{"class":"k-mediaplayer-volume-wrap"}},{template:L.qualityDropDown,attributes:{"class":"k-mediaplayer-quality-wrap"}},{type:"button",attributes:{"class":"k-fullscreen-button"},icon:"full-screen"}]}),this._toolBar.wrapper.off("keydown"),t.before(L.slider),this._volumeButton=t.find(".k-volume-button"),this._fullscreenButton=t.find(".k-fullscreen-button"),this._volumeButton.attr("title",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._volumeButton.attr("aria-label",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._fullscreenButton.attr("title",this.options.messages.fullscreen),this._fullscreenButton.attr("aria-label",this.options.messages.fullscreen),t.width("auto"),this._currentTimeElement=t.find(".k-mediaplayer-currenttime"),this._durationElement=t.find(".k-mediaplayer-duration"),this._playButton=t.find(".k-play-button"),this._playButtonSpan=this._playButton.find(".k-i-play"),this.options.autoPlay&&this._playStateToggle(!0),e([this._volumeButton[0],t.find(".k-mediaplayer-volume-wrap")[0],t.find(".k-mediaplayer-quality-wrap")[0],this._fullscreenButton[0]]).wrapAll("<div class='k-align-right' />"),t.find(".k-button").addClass("k-bare"))},_createDropDown:function(){var e=this.wrapper.find(T+f),i=this.media();t===e.data("kendoDropDownList")&&(this._dropDownSelectHandler=z(this._dropDownSelect,this),this._dropDown=new D.DropDownList(e,{dataTextField:"quality",dataValueField:"url",popup:{position:"bottom",origin:"top",appendTo:this.wrapper},animation:{open:{effects:"slideIn:up",duration:1}},select:this._dropDownSelectHandler}),i&&R(i.source)&&(this._dropDown.setDataSource(i.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass("k-button k-bare"),this._dropDown.wrapper.attr("title",this.options.messages.quality).hide(),this._dropDown.wrapper.find("span.k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-icon k-i-hd"),this._dropDown.list.addClass("k-quality-list"))},_dropDownSelect:function(e){this._currentIndex!==e.item.index()&&(this._currentIndex=e.item.index(),this._setPlayerUrl())},_toolbarClick:function(t){var i,n=e(t.target).children().first(),o=n.hasClass(m);this.media()&&((n.hasClass(m)||n.hasClass(g))&&(o?this.play():this.pause()),(n.hasClass(c)||n.hasClass(d))&&(this._isInFullScreen?(n.removeClass(d).addClass(c),this.fullScreen(!1)):(n.removeClass(c).addClass(d),this.fullScreen(!0))),(n.hasClass(u)||n.hasClass(h)||n.hasClass(p))&&(i=this.mute(),this.mute(!i)))},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(e){var t=this,i=e.sender,n=1e3*I;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&i.value()>this._seekBarLastPosition?setTimeout(function(){i.value(t._seekBarLastPosition)},1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(e.value-n)):t._media.currentTime=t._timeToSec(e.value-n),t.trigger(a),t._preventPlay=!0)},_changeVolumeButtonImage:function(e){var t=this._volumeButton,i=t.find("span"),n=i.attr("class");n=n.substring(0,n.lastIndexOf(" ")),0===e?(i.attr("class",n+" "+u),t.attr("title",this.options.messages.unmute),t.attr("aria-label",this.options.messages.unmute)):e>0&&e<51?(i.attr("class",n+" "+h),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute)):(i.attr("class",n+" "+p),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute))},_volumeDragging:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_volumeChange:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_mediaTimeUpdate:function(){var e,t=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime;return t=t?t:0,e=this._msToTime(t),this._currentTimeElement.text(i.toString(e,this._timeFormat)),
this._isDragging||(this._seekBarLastPosition=1e3*(t+I),this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(e){t===e&&(e=this._playButtonSpan.is(T+m)),e?(this._playButtonSpan.removeClass(m).addClass(g),this._playButton.attr("title",this.options.messages.pause),this._playButton.attr("aria-label",this.options.messages.pause)):(this._playButtonSpan.removeClass(g).addClass(m),this._playButton.attr("title",this.options.messages.play),this._playButton.attr("aria-label",this.options.messages.play))},_mediaEnded:function(){this._playStateToggle(!1),this._currentTimeElement.text(i.toString(this._msToTime(0),this._timeFormat)),this._slider.value(1e3*(0+I)),this.trigger(n)},_mediaPlay:function(){this.trigger(r)},_mediaReady:function(){this.trigger(s)},_mediaDurationChange:function(){var e=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=0===e.getHours()?F.shortTime:F.longTime,this._durationElement.text(i.toString(e,this._timeFormat)),this._slider.setOptions({min:E.getTime(),max:e.getTime()}),this._isFirstRun||(this._resetTime(),this._isFirstRun=!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=z(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=z(this._mediaDurationChange,this),this.wrapper.prepend(L.youtubePlayer),this._ytPlayer=this.wrapper.find(T+S)[0],e(this._ytPlayer).css({width:this.wrapper.width(),height:this.wrapper.height()}),window.YT&&window.YT.Player?this._configurePlayer():(window.onYouTubeIframeAPIReadyRegister||(window.onYouTubeIframeAPIReadyRegister=[],e.getScript("https://www.youtube.com/iframe_api"),window.onYouTubeIframeAPIReady=function(){if(window.onYouTubeIframeAPIReadyRegister)for(var e=0;e<window.onYouTubeIframeAPIReadyRegister.length;e++)window.onYouTubeIframeAPIReadyRegister[e]._youtubeApiReady();window.onYouTubeIframeAPIReadyRegister.length=0,window.onYouTubeIframeAPIReadyRegister=t}),window.onYouTubeIframeAPIReadyRegister[window.onYouTubeIframeAPIReadyRegister.length]=this)},_poll:function(e,t,i,n){var o=this;return null!==o._timers[e]&&clearTimeout(o._timers[e]),o._timers[e]=setTimeout(function(n){return function r(){t.call(n)&&(o._timers[e]=setTimeout(r,i))}}(n),i)},_youtubeApiReady:function(){this._configurePlayer()},_configurePlayer:function(){var e,t={autoplay:+this.options.autoPlay,wmode:"transparent",controls:0,rel:0,showinfo:0};this._onYouTubePlayerReady=z(this._onYouTubePlayerReady,this),window.onYouTubePlayerReady=this._onYouTubePlayerReady,this._onPlayerStateChangeHandler=z(this._onPlayerStateChange,this),window.onPlayerStateChange=this._onPlayerStateChange,e=new window.YT.Player(this.wrapper.find(T+S)[0],{height:this.wrapper.height(),width:this.wrapper.width(),videoId:this._getMediaId(),playerVars:t,events:{onReady:this._onYouTubePlayerReady,onStateChange:this._onPlayerStateChangeHandler}})},_onYouTubePlayerReady:function(e){this._ytmedia=e.target,this._ytmedia.getIframe().style.width="100%",this._ytmedia.getIframe().style.height="100%",this._youTubeVideo=!0,this._mediaDurationChangeHandler(),this.options.autoPlay?(this._playStateToggle(!0),this._ytmedia.loadVideoById(this._getMediaId())):this._ytmedia.cueVideoById(this._getMediaId()),this.options.mute&&this.mute(!0),this.trigger(s)},_updateTitle:function(){this.titlebar().text(this.media().title||this.media().source)},_onPlayerStateChange:function(e){0===e.data?(this._slider.value(0),this._paused=!1,this._playStateToggle(!0),this.trigger(n),this.options.autoRepeat&&this.play()):1===e.data?(this._mediaDurationChange(),this._ytmedia.setVolume(this.volume()),this._sliderChangeFired?this._sliderChangeFired=!1:this._uiDisplay(!1),this.trigger(r),this._playStateToggle(!0),this._poll("progress",this._mediaTimeUpdate,500,this),this._paused=!1):2===e.data&&(this._paused||(this._uiDisplay(!0),this._playStateToggle(!1),this.trigger(o),this._paused=!0))},_getMediaId:function(){var e=this._currentUrl(),t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,i=e.match(t);return i&&11===i[7].length&&(e=i[7]),e},_mouseClick:function(){this.isPaused()?this.play():this.pause()},_initializePlayer:function(){this._mouseMoveHandler||(this._mouseMoveHandler=z(this._mouseMove,this),this._mouseInHandler=z(this._mouseIn,this),this._mouseOutHandler=z(this._mouseOut,this),e(this.wrapper).on("mouseenter"+A,this._mouseInHandler).on("mouseleave"+A,this._mouseOutHandler).on("mousemove"+A,this._mouseMoveHandler)),!this._ytmedia&&this._youTubeVideo?this._createYoutubePlayer():this._media||this._youTubeVideo||this._createHtmlPlayer()},_createHtmlPlayer:function(){this._videoOverlay||(this._mouseClickHanlder=z(this._mouseClick,this),this.wrapper.append("<div class='"+C+"'></div>"),this._videoOverlay=this.wrapper.find(".k-mediaplayer-overlay").on("click"+A,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=z(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=z(this._mediaDurationChange,this),this._mediaEndedHandler=z(this._mediaEnded,this),this._mediaCanPlayHandler=z(this._mediaReady,this),this._mediaPlayHandler=z(this._mediaPlay,this),this._videoOverlay.after(L.htmlPlayer),this._media=this.wrapper.find(T+x)[0],e(this._media).css({width:"100%",height:"100%"}),this.options.mute&&this.mute(!0),this._media.ontimeupdate=this._mediaTimeUpdateHandler,this._media.ondurationchange=this._mediaDurationChangeHandler,this._media.oncanplay=this._mediaCanPlayHandler,this._media.onplay=this._mediaPlayHandler,this._media.onended=this._mediaEndedHandler,this._media.loop=this.options.autoRepeat},_mouseIn:function(){this._uiDisplay(!0)},_mouseOut:function(){this._poll("mouseIdle",this._mouseIdle,3e3,this)},_mouseIdle:function(){return this._uiDisplay(!1),!1},_mouseMove:function(){this._titleBar.is(":animated")||this._toolBar.element.is(":animated")||this._slider.wrapper.is(":animated")||this._uiDisplay(!0),this._poll("mouseIdle",this._mouseIdle,3e3,this)},_uiDisplay:function(e){var t="slow",i=this._titleBar.add(this._toolBar.element.parent());e?i.fadeIn(t):(i.fadeOut(t),this.options.navigatable&&this.wrapper.focus())},setOptions:function(e){M.fn.setOptions.call(this,e)},destroy:function(){M.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(A),this.element.find(T+C).off(A),this._timers=null,this._mouseMoveHandler=null,this._mouseOutHandler=null,this._mouseInHandler=null,this._mouseClickHanlder=null,this._keyDownHandler=null,this._fullscreenHandler=null,this._toolbarClickHandler=null,this._sliderDragChangeHandler=null,this._sliderDraggingHandler=null,this._volumeDraggingHandler=null,this._volumeChangeHandler=null,this._youtubeApiReadyHandler=null,this._onYouTubePlayerReady=null,this._onPlayerStateChangeHandler=null,this._dropDownSelectHandler=null,this._youTubeVideo?this._ytmedia.destroy():(this._media.ontimeupdate=this._mediaTimeUpdateHandler=null,this._media.ondurationchange=this._mediaDurationChangeHandler=null,this._media.oncanplay=this._mediaCanPlayHandler=null,this._media.onplay=this._mediaPlayHandler=null,this._media.onended=this._mediaEndedHandler=null,this._media.src="",this._media.remove()),this._mouseMoveTimer=null,clearTimeout(this._mouseMoveTimer),i.destroy(this.element)},seek:function(e){if(t===e)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var i=e/1e3;return this._youTubeVideo?i+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(i,!0):this._media.currentTime=i,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(i.support.mobileOS&&this._uiDisplay(!1),this._media.play()),this._paused=!1,this._playStateToggle(!0),this},stop:function(){return this._youTubeVideo&&this._ytmedia?this._ytmedia.stopVideo():this._media&&!this._youTubeVideo&&(i.support.mobileOS&&this._uiDisplay(!0),this._media.pause(),this._media.currentTime=0),this._paused=!0,this._playStateToggle(!1),this},pause:function(){return this._youTubeVideo?this._ytmedia.pauseVideo():(i.support.mobileOS&&this._uiDisplay(!0),this._media.pause()),this._paused=!0,this._playStateToggle(!1),this.trigger(o),this},toolbar:function(){return this._toolBar},dropdown:function(){return this._dropDown},titlebar:function(){return this._titleBar},fullScreen:function(e){if(t===e)return this._isInFullScreen||!1;var i=this.element.get(0);e?(this.element.addClass("k-mediaplayer-fullscreen"),i.requestFullscreen?i.requestFullscreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.msRequestFullscreen&&i.msRequestFullscreen(),this._isInFullScreen=!0):(document.cancelFullscreen?document.cancelFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msCancelFullscreen?document.msCancelFullscreen():document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),this.element.removeClass("k-mediaplayer-fullscreen"),this._isInFullScreen=!1),this._slider.resize()},volume:function(e){return t===e?t!==this._volume?this._volume:this._volume=this.options.volume:(this._volume=e,this.mute(e<=0),this._youTubeVideo?this._ytmedia.setVolume(this._volume):this._media.volume=this._volume/100,this._volumeSlider.value(e),t)},mute:function(e){var i=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;return t===e||e===i?i:(this._youTubeVideo?e?this._ytmedia.mute():this._ytmedia.unMute():this._media.muted=e,this._volumeSlider.value(e?0:this._media&&100*this._media.volume||this._ytmedia&&this._ytmedia.getVolume()),this.trigger(l),this._changeVolumeButtonImage(this._volumeSlider.value()),t)},isEnded:function(){return this._youTubeVideo?0===this._ytmedia.getPlayerState():this._media.ended},media:function(e){var i=this.dropdown();return t===e?t!==this._mediaData?this._mediaData:this._mediaData=this.options.media:(R(e.source)?(i.setDataSource(e.source),i.wrapper.show()):i.wrapper.hide(),this._mediaData=e,this._updateTitle(),this._setPlayerUrl(),t)},isPaused:function(){return this._paused},isPlaying:function(){return!this.isEnded()&&!this._paused},_aria:function(){this.wrapper.attr("role","region")},_navigatable:function(){this._fullscreenHandler=z(this._fullscreen,this),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+A,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=z(this._keyDown,this),this.wrapper.on("keydown"+A,this._keyDownHandler))},_fullscreen:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;this._uiDisplay(!0),this._slider.resize(),e||(this.wrapper.find('span[class*="k-i-fullscreen"]').removeClass(d).addClass(c),this.fullScreen(!1))},_keyDown:function(e){var t,i;e.preventDefault(),t=this.wrapper.find('span[class*="k-i-fullscreen"]'),e.keyCode===B.SPACEBAR?this.isPlaying()?this.pause():this.play():e.keyCode!==B.ENTER||this._isInFullScreen?77===e.keyCode?(i=this.mute(),this.mute(!i)):e.keyCode===B.ESC&&this._isInFullScreen&&(t.removeClass(d).addClass(c),this.fullScreen(!1)):(t.removeClass(c).addClass(d),this.fullScreen(!0))},_error:function(){},_progress:function(){}});D.plugin(H)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.pivotgrid.min",["kendo.dom.min","kendo.data.min"],e)}(function(){return function(e,t){function i(e){var i="string"==typeof e?[{name:e}]:e,n="[object Array]"===we.call(i)?i:i!==t?[i]:[];return ke(n,function(e){return"string"==typeof e?{name:e}:{name:e.name,type:e.type}})}function n(e){var i="string"==typeof e?[{name:[e],expand:!1}]:e,n="[object Array]"===we.call(i)?i:i!==t?[i]:[];return ke(n,function(e){return"string"==typeof e?{name:[e],expand:!1}:{name:"[object Array]"===we.call(e.name)?e.name.slice():[e.name],expand:e.expand}})}function o(e){return e.indexOf(" ")!==-1&&(e='["'+e+'"]'),e}function r(e,t,i,n){var o,s,a,l;if(i||(i=t),n||(n=0),l=i.members[n],l&&!l.measure){if(a=l.children,s=a.length,i===t?e[pe.stringify([l.name])]=!!s:s&&(e[pe.stringify(ae(i,n))]=!0),s)for(o=0;o<s;o++)r(e,t,a[o],n);r(e,t,i,n+1)}}function s(t){var i,n,o={};t.length&&r(o,t[0]),i=[];for(n in o)i.push({name:e.parseJSON(n),expand:o[n]});return i}function a(e,t){var i,n,o,r,s=t.tuples||[],a=s[0];if(a&&e.length<a.members.length)for(i=a.members,n=0;n<i.length;n++)if(!i[n].measure){for(o=!1,r=0;r<e.length;r++)if(0===H(e[r]).indexOf(i[n].hierarchy)){o=!0;break}o||e.push({name:[i[n].name],expand:!1})}}function l(e){var t,i=[],n=e.members;for(t=0;t<n.length;t++)n[t].measure||i.push({name:[n[t].name],expand:n[t].children.length>0});return i}function c(e,t,i){var o,r;return e=e||{},a(t,e),i.length>1&&t.push({name:De,measure:!0,children:n(i)}),o={members:t},e.tuples&&(r=x(e.tuples,o),r.tuple&&(t=l(r.tuple))),t}function d(e){var t=pe.getter(e.field,!0);return function(i,n){return e.aggregate(t(i.dataItem),n,i)}}function u(e){return"number"==typeof e&&!isNaN(e)}function h(e){return e&&e.getTime}function p(e){return e[e.length]={value:"",fmtValue:"",ordinal:e.length},e}function f(e,t,i){if(e.tuples.length<_(t.tuples,i))return t}function m(e,t,i,n,o){var r,s,a,l=e.length,c=_(t,n),d=n.length||1;for(s=0;s<i;s++)for(r=0;r<l;r++)a=v(e[r],t)*d,a+=r%d,o[s*l+r].ordinal=s*c+a}function g(e,t,i,n,o){var r,s,a,l=e.length,c=n.length||1;for(s=0;s<l;s++)for(a=v(e[s],t),a*=c,a+=s%c,r=0;r<i;r++)o[s*i+r].ordinal=a*i+r}function v(e,t){return x(t,e).index}function _(e,t){var i,n,o;if(!e.length)return 0;for(i=e.slice(),n=i.shift(),o=1;n;)n.members?[].push.apply(i,n.members):n.children&&(n.measure||(o+=n.children.length),[].push.apply(i,n.children)),n=i.shift();return t.length&&(o*=t.length),o}function b(e){return e||(e={tuples:[]}),e.tuples||(e.tuples=[]),e}function w(e,t,i){var n,o,r,s;if(!e)return 0;for(n=Math.max(i.length,1),o=e.members.slice(0,t),r=o.shift(),s=n;r;)r.name===De?s+=n-1:r.children?[].push.apply(o,r.children):(s++,[].push.apply(o,r.members)),r=o.shift();return s}function y(e,t,i){var n,o,r,s,a,l;if(!t[0])return{parsedRoot:null,tuples:e,memberIndex:0,index:0};if(n=x(e,t[0]),!n.tuple)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};if(o=n.tuple.members,r=t[0].members,s=-1,o.length!==r.length)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};for(a=0,l=o.length;a<l;a++)!o[a].measure&&r[a].children[0]&&(s==-1&&r[a].children.length&&(s=a),o[a].children=r[a].children);return i=Math.max(i.length,1),{parsedRoot:n.tuple,index:n.index*i,memberIndex:s,tuples:e}}function k(e,t){var i,n,o=!0;for(e=e.members,t=t.members,i=0,n=e.length;i<n;i++)e[i].measure||t[i].measure||(o=o&&H(e[i])===H(t[i]));return o}function x(e,t){var i,n,o,r,s,a,l,c=0;for(i=0,n=e.length;i<n;i++){if(o=e[i],k(o,t))return{tuple:o,index:c};for(c++,s=0,a=o.members.length;s<a;s++)if(l=o.members[s],!l.measure&&(r=x(l.children,t),c+=r.index,r.tuple))return{tuple:r.tuple,index:c}}return{index:c}}function C(e,t){var i,n,o,r="";for(n=0,o=e.length;n<o;n++)i=e[n],r+=i.name,t[r]||(t[r]=i)}function S(e,t){var i,n,o,r,s=e.members,a="",l="";for(i=0,n=s.length;i<n;i++){if(o=s[i],r){if(t[a+o.name]){a+=o.name,r=t[a];continue}return t[a+o.parentName]?t[a+o.parentName]:t[l+o.parentName]?t[l+o.parentName]:t[l]}if(a+=o.name,r=t[o.parentName],!r&&(r=t[a],!r))return null;r&&(l+=r.name)}return r}function T(e,t){var i,n,o,r;if(0===t.length)return-1;for(i=t[0],n=e.members,o=0,r=n.length;o<r;o++)if(n[o].name==i.name)return o}function D(i,n){if(!(n<0)){var o={name:De,measure:!0,children:[e.extend({members:[],dataIndex:i.dataIndex},i.members[n])]};i.members.splice(n,1,o),i.dataIndex=t}}function A(e,t){var i,n,o,r,s,a;if(e.length<1)return[];for(i=[],n={},o=T(e[0],t),r=0;r<e.length;r++)s=e[r],s.dataIndex=r,D(s,o),a=S(s,n),a?a.children.push(o<0||!a.measure?s:s.members[o].children[0]):i.push(s),C(s.members,n);return i}function E(e,t){var i,n,o,r,s,a,l,c,d;if(!e||!e.length)return t;for(i=[],n=M(e),o=n.length,r=Math.max(t.length/o,1),s=0;s<o;s++)for(l=r*s,c=r*n[s],a=0;a<r;a++)d=parseInt(c+a,10),i[parseInt(l+a,10)]=t[d]||{value:"",fmtValue:"",ordinal:d};return i}function I(e,t){var i,n,o,r,s,a,l,c;if(!e||!e.length)return t;for(i=[],n=M(e),o=n.length,r=Math.max(t.length/o,1),a=0;a<r;a++)for(l=o*a,s=0;s<o;s++)c=n[s]+l,i[l+s]=t[c]||{value:"",fmtValue:"",ordinal:c};return i}function M(e){var i,n,o,r,s,a,l;for(e=e.slice(),i=[],n=e.shift();n;){for(n.dataIndex!==t&&i.push(n.dataIndex),s=0,o=0,r=n.members.length;o<r;o++)l=n.members[o],a=l.children,l.measure?[].splice.apply(e,[0,0].concat(a)):[].splice.apply(e,[s,0].concat(a)),s+=a.length;n=e.shift()}return i}function R(e){var t=e.split(".");return t.length>2?t[0]+"."+t[1]:e}function F(e,t){var i=e.length-1,n=e[i],o=P(t,n);return o&&o.dir?n="ORDER("+n+".Children,"+o.field+".CurrentMember.MEMBER_CAPTION,"+o.dir+")":n+=".Children",e[i]=n,e}function P(e,t){for(var i=0,n=e.length;i<n;i++)if(0===t.indexOf(e[i].field))return e[i];return null}function z(e){var t,i="CROSSJOIN({";return e.length>2?(t=e.pop(),i+=z(e)):(i+=e.shift(),t=e.pop()),i+="},{",i+=t,i+="})"}function B(e,t){var i=e.slice(0);return t.length>1&&i.push("{"+L(t).join(",")+"}"),z(i)}function L(e){for(var i,n=0,o=e.length,r=[];n<o;n++)i=e[n],r.push(i.name!==t?i.name:i);return r}function H(e){return e=e.name||e,"[object Array]"===we.call(e)&&(e=e[e.length-1]),e}function N(e){for(var t=e.length,i=[],n=0;n<t;n++)i.push(e[n].name[0]);return i}function O(e,t){var i,n,o,r=0,s=e.length,a=t.length;for(t=t.slice(0);r<s;r++)for(i=e[r],o=0;o<a;o++)if(n=R(t[o]),i.indexOf(n)!==-1){t[o]=i;break}return{names:t,expandedIdx:o,uniquePath:t.slice(0,o+1).join("")}}function V(e){for(var t,i,n,o,r,s,a=[],l=[],c=[],d=0,u=e.length;d<u;d++)if(t=e[d],o=t.name,s=!1,"[object Array]"!==we.call(o)&&(t.name=o=[o]),o.length>1)l.push(t);else{for(r=R(o[0]),i=0,n=c.length;i<n;i++)if(0===c[i].name[0].indexOf(r)){s=!0;break}s||c.push(t),t.expand&&a.push(t)}return a=a.concat(l),{root:c,expanded:a}}function W(e,t,i){var n,o,r,s,a,l,c,d,u="";if(e=e||[],n=V(e),o=n.root,r=N(o),s=[],n=n.expanded,a=n.length,l=0,d=[],r.length>1||t.length>1){for(s.push(B(r,t));l<a;l++)c=F(n[l].name,i),d=O(c,r).names,s.push(B(d,t));u+=s.join(",")}else{for(;l<a;l++)c=F(n[l].name,i),d.push(c[0]);u+=r.concat(d).join(",")}return u}function U(e){var t="",i=e.value,n=e.field,o=e.operator;return"in"==o?(t+="{",t+=i,t+="}"):(t+="neq"==o||"doesnotcontain"==o?"-":"",t+="Filter(",t+=n+".MEMBERS",t+=pe.format(K[o],n,i),t+=")"),t}function q(e,t){var i,n,o="",r=e.filters,s=r.length;for(n=s-1;n>=0;n--)i="SELECT (",i+=U(r[n]),i+=") ON 0",n==s-1?(i+=" FROM ["+t+"]",o=i):o=i+" FROM ( "+o+" )";return o}function j(e,t,i){var n,o,r="";if(t){r+="<"+e+">";for(o in t)n=t[o],i&&(o=o.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),r+="<"+o+">"+n+"</"+o+">";r+="</"+e+">"}else r+="<"+e+"/>";return r}function G(e){if(null==e)return[];var t=we.call(e);return"[object Array]"!==t?[e]:e}function $(e){var t,i,n,o,r={tuples:[]},s=G(pe.getter("Tuples.Tuple",!0)(e)),a=pe.getter("Caption['#text']"),l=pe.getter("UName['#text']"),c=pe.getter("LName['#text']"),d=pe.getter("LNum['#text']"),u=pe.getter("CHILDREN_CARDINALITY['#text']",!0),h=pe.getter("['@Hierarchy']"),p=pe.getter("PARENT_UNIQUE_NAME['#text']",!0);for(t=0;t<s.length;t++){for(i=[],n=G(s[t].Member),o=0;o<n.length;o++)i.push({children:[],caption:a(n[o]),name:l(n[o]),levelName:c(n[o]),levelNum:d(n[o]),hasChildren:parseInt(u(n[o]),10)>0,parentName:p(n[o]),hierarchy:h(n[o])});r.tuples.push({members:i})}return r}var K,Y,Q,X,Z,J,ee,te,ie,ne,oe,re,se,ae,le,ce,de,ue,he,pe=window.kendo,fe=pe.ui,me=pe.Class,ge=fe.Widget,ve=pe.data.DataSource,_e=pe._outerWidth,be=pe._outerHeight,we={}.toString,ye=function(e){return e},ke=e.map,xe=e.extend,Ce=pe.isFunction,Se="change",Te="error",De="Measures",Ae="progress",Ee="stateReset",Ie="auto",Me="<div/>",Re=".kendoPivotGrid",Fe="__row_total__",Pe="dataBinding",ze="dataBound",Be="expandMember",Le="collapseMember",He="k-i-collapse",Ne="k-i-expand",Oe="<span>#: data.member.caption || data.member.name #</span>",Ve='<span class="k-icon k-i-kpi-status-#=data.dataItem.value > 0 ? "open" : data.dataItem.value < 0 ? "deny" : "hold"#" title="#:data.dataItem.value#"></span>',We='<span class="k-icon k-i-kpi-trend-#=data.dataItem.value > 0 ? "increase" : data.dataItem.value < 0 ? "decrease" : "equal"#" title="#:data.dataItem.value#"></span>',Ue='#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || "&nbsp;" : "&nbsp;" #',qe='<table class="k-pivot-layout"><tr><td><div class="k-pivot-rowheaders"></div></td><td><div class="k-pivot-table k-state-default"></div></td></tr></table>',je="rows",Ge="columns",$e={sum:function(e,t){var i=t.accumulator;return u(i)?u(e)&&(i+=e):i=e,i},count:function(e,t){return(t.accumulator||0)+1},average:{aggregate:function(e,i){var n=i.accumulator;return i.count===t&&(i.count=0),u(n)?u(e)&&(n+=e):n=e,u(e)&&i.count++,n},result:function(e){var t=e.accumulator;return u(t)&&(t/=e.count),t}},max:function(e,t){var i=t.accumulator;return u(i)||h(i)||(i=e),i<e&&(u(e)||h(e))&&(i=e),i},min:function(e,t){var i=t.accumulator;return u(i)||h(i)||(i=e),i>e&&(u(e)||h(e))&&(i=e),i}},Ke=me.extend({init:function(e){this.options=xe({},this.options,e),this.dimensions=this._normalizeDescriptors("field",this.options.dimensions),this.measures=this._normalizeDescriptors("name",this.options.measures)},_normalizeDescriptors:function(e,t){var i,n,o,r;if(t=t||{},i={},"[object Array]"===we.call(t)){for(o=0,r=t.length;o<r;o++)n=t[o],"string"==typeof n?i[n]={}:n[e]&&(i[n[e]]=n);t=i}return t},_rootTuples:function(e,i){var n,o,r,s,a=i.length||1,l=this.dimensions||[],c=0,d=e.length,u=[],h=[];if(d||i.length){for(c=0;c<a;c++){for(n={members:[]},s=0;s<d;s++)o=e[s],r=o.split("&"),n.members[n.members.length]={children:[],caption:(l[o]||{}).caption||"All",name:o,levelName:o,levelNum:"0",hasChildren:!0,parentName:r.length>1?r[0]:t,hierarchy:o};a>1&&(n.members[n.members.length]={children:[],caption:i[c].caption,name:i[c].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),u[u.length]=n}h.push(Fe)}return{keys:h,tuples:u}},_expandedTuples:function(e,i,n){var o,r,s,a,l,c,d,u,h,p,f,m=n.length||1,g=this.dimensions||[],v=[],_=[];for(s in e){for(a=e[s],d=this._findExpandedMember(i,a.uniquePath),l=v[d.index]||[],c=_[d.index]||[],u=d.member.names,o=0;o<m;o++){for(r={members:[]},f=0;f<u.length;f++)f===d.member.expandedIdx?(r.members[r.members.length]={children:[],caption:a.value,name:a.name,hasChildren:!1,levelNum:1,levelName:a.parentName+a.name,parentName:a.parentName,hierarchy:a.parentName+a.name},0===o&&c.push(ae(r,f).join(""))):(p=u[f],h=p.split("&"),r.members[r.members.length]={children:[],caption:(g[p]||{}).caption||"All",name:p,levelName:p,levelNum:"0",hasChildren:!0,parentName:h.length>1?h[0]:t,hierarchy:p});m>1&&(r.members[r.members.length]={children:[],caption:n[o].caption,name:n[o].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!0,parentName:t,hierarchy:"MEASURES"}),l[l.length]=r}v[d.index]=l,_[d.index]=c}return{keys:_,tuples:v}},_findExpandedMember:function(e,t){for(var i=0;i<e.length;i++)if(e[i].uniquePath===t)return{member:e[i],index:i}},_asTuples:function(e,t,i){var n,o;return i=i||[],n=this._rootTuples(t.root,i),o=this._expandedTuples(e,t.expanded,i),{keys:[].concat.apply(n.keys,o.keys),tuples:[].concat.apply(n.tuples,o.tuples)}},_measuresInfo:function(e,t){for(var i,n,o=0,r=e&&e.length,s=[],a={},l={},c=this.measures||{};o<r;o++)n=e[o].descriptor.name,i=c[n]||{},s.push(n),i.result&&(a[n]=i.result),i.format&&(l[n]=i.format);return{names:s,formats:l,resultFuncs:a,rowAxis:t}},_toDataArray:function(e,t,i,n){var o,r,s,a,l,c,d,u,h,p,f=[],m=1,g=[],v=i.length||1,_=n.length||1;for(t.rowAxis?(g=t.names,m=g.length):p=t.names,s=0;s<v;s++)for(d=e[i[s]||Fe],c=0;c<m;c++)for(t.rowAxis&&(p=[g[c]]),a=0;a<_;a++)for(h=n[a]||Fe,u=d.items[h],o=h===Fe?d.aggregates:u?u.aggregates:{},l=0;l<p.length;l++)r=p[l],this._addData(f,o[r],t.formats[r],t.resultFuncs[r]);return f},_addData:function(e,t,i,n){var o,r="";t&&(t=n?n(t):t.accumulator,r=i?pe.format(i,t):t),o=e.length,e[o]={ordinal:o,value:t||"",fmtValue:r}},_matchDescriptors:function(e,i,n){for(var o,r,s,a,l=i.names,c=i.expandedIdx;c>0;)if(o=l[--c].split("&"),o.length>1&&(r=o[0],s=o[1],a=n[r](e),a=a!==t&&null!==a?""+a:a,a!=s))return!1;return!0},_calculateAggregate:function(e,t,i){var n,o,r,s={};for(r=0;r<e.length;r++)o=e[r].descriptor.name,n=i.aggregates[o]||{},n.accumulator=e[r].aggregator(t,n),s[o]=n;return s},_processColumns:function(e,i,n,o,r,s,a,l){for(var c,d,u,h,p,f,m,g,v=r.dataItem,_=0;_<i.length;_++)d=i[_],this._matchDescriptors(v,d,n)&&(g=d.names.slice(0,d.expandedIdx).join(""),f=d.names[d.expandedIdx],c=n[f](v),c=c!==t&&null!==c?""+c:c,m=f,f=f+"&"+c,p=g+f,u=o[p]||{index:a.columnIndex,parentName:m,name:f,uniquePath:g+m,value:c},h=s.items[p]||{aggregates:{}},s.items[p]={index:u.index,aggregates:this._calculateAggregate(e,r,h)},l&&(o[p]||a.columnIndex++,o[p]=u))},_measureAggregators:function(e){var t,i,n,o,r,s,a=e.measures||[],l=this.measures||{},c=[];if(a.length){for(n=0,o=a.length;n<o;n++)if(t=a[n],i=l[t.name],r=null,i){if(s=i.aggregate,"string"==typeof s){if(r=$e[s.toLowerCase()],!r)throw Error("There is no such aggregate function");i.aggregate=r.aggregate||r,i.result=r.result}c.push({descriptor:t,caption:i.caption,result:i.result,aggregator:d(i)})}}else c.push({descriptor:{name:"default"},caption:"default",aggregator:function(){return 1}});return c},_buildGetters:function(e){var t,i,n,r={};for(n=0;n<e.length;n++)i=e[n],t=i.split("&"),t.length>1?r[t[0]]=pe.getter(t[0],!0):r[i]=pe.getter(o(i),!0);return r},_parseDescriptors:function(e){var t,i=V(e),n=N(i.root),o=i.expanded,r=[];for(t=0;t<o.length;t++)r.push(O(o[t].name,n));return{root:n,expanded:r}},_filter:function(e,t){var i,n,o;if(!t)return e;for(n=0,o=t.filters;n<o.length;n++)i=o[n],"in"===i.operator&&(o[n]=this._normalizeFilter(i));return new pe.data.Query(e).filter(t).data},_normalizeFilter:function(e){var t,i=e.value.split(","),n=[];if(!i.length)return i;for(t=0;t<i.length;t++)n.push({field:e.field,operator:"eq",value:i[t]});return{logic:"or",filters:n}},process:function(e,i){var o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F;if(e=e||[],i=i||{},e=this._filter(e,i.filter),o=i.measures||[],r="rows"===i.measuresAxis,s=i.columns||[],a=i.rows||[],!s.length&&a.length&&(!o.length||o.length&&r)&&(s=a,a=[],r=!1),s.length||a.length||(r=!1),!s.length&&o.length&&(s=n(i.measures)),s=this._parseDescriptors(s),a=this._parseDescriptors(a),l={},c={},d={},h={columnIndex:0},p=this._measureAggregators(i),f=this._buildGetters(s.root),m=this._buildGetters(a.root),g=!1,v=s.expanded,_=a.expanded,y=0!==_.length,R=e.length,F=0,s.root.length||a.root.length)for(g=!0,F=0;F<R;F++)for(b=e[F],w={dataItem:b,index:F},S=l[Fe]||{items:{},aggregates:{}},this._processColumns(p,v,f,c,w,S,h,!y),S.aggregates=this._calculateAggregate(p,w,S),l[Fe]=S,k=0;k<_.length;k++)x=_[k],this._matchDescriptors(b,x,m)?(D=x.names.slice(0,x.expandedIdx).join(""),C=x.names[x.expandedIdx],A=C,u=m[C](b),u=u!==t?""+u:u,C=C+"&"+u,T=D+C,d[T]={uniquePath:D+A,parentName:A,name:C,value:u},E=l[T]||{items:{},aggregates:{}},this._processColumns(p,v,f,c,w,E,h,!0),E.aggregates=this._calculateAggregate(p,w,E),l[T]=E):this._processColumns(p,v,f,c,w,{items:{},aggregates:{}},h,!0);return g&&R?(!(p.length>1)||i.columns&&i.columns.length||(s={root:[],expanded:[]}),I=this._asTuples(c,s,r?[]:p),M=this._asTuples(d,a,r?p:[]),c=I.tuples,d=M.tuples,l=this._toDataArray(l,this._measuresInfo(p,r),M.keys,I.keys)):l=c=d=[],{axes:{columns:{tuples:c},rows:{tuples:d}},data:l}}}),Ye=me.extend({init:function(e,t){this.transport=t,this.options=t.options||{},this.transport.discover||Ce(e.discover)&&(this.discover=e.discover)},read:function(e){return this.transport.read(e)},update:function(e){return this.transport.update(e)},create:function(e){return this.transport.create(e)},destroy:function(e){return this.transport.destroy(e)},discover:function(e){return this.transport.discover?this.transport.discover(e):(e.success({}),t)},catalog:function(i){var n,o=this.options||{};return i===t?(o.connection||{}).catalog:(n=o.connection||{},n.catalog=i,this.options.connection=n,e.extend(this.transport.options,{connection:n}),t)},cube:function(e){var i,n=this.options||{};return e===t?(n.connection||{}).cube:(i=n.connection||{},i.cube=e,this.options.connection=i,xe(!0,this.transport.options,{connection:i}),t)}}),Qe=ve.extend({init:function(t){var o,r=((t||{}).schema||{}).cube,s="columns",a={axes:ye,cubes:ye,catalogs:ye,measures:ye,dimensions:ye,hierarchies:ye,levels:ye,members:ye};r&&(a=e.extend(a,this._cubeSchema(r)),this.cubeBuilder=new Ke(r)),ve.fn.init.call(this,xe(!0,{},{schema:a},t)),this.transport=new Ye(this.options.transport||{},this.transport),this._columns=n(this.options.columns),this._rows=n(this.options.rows),o=this.options.measures||[],"[object Object]"===we.call(o)&&(s=o.axis||"columns",o=o.values||[]),this._measures=i(o),this._measuresAxis=s,this._skipNormalize=0,this._axes={}},_cubeSchema:function(t){return{dimensions:function(){var e,i=[],n=t.dimensions;for(e in n)i.push({name:e,caption:n[e].caption||e,uniqueName:e,defaultHierarchy:e,type:1});return t.measures&&i.push({name:De,caption:De,uniqueName:De,type:2}),i},hierarchies:function(){return[]},measures:function(){var e,i=[],n=t.measures;for(e in n)i.push({name:e,caption:e,uniqueName:e,aggregator:e});return i},members:e.proxy(function(e,i){var n,r,s=i.levelUniqueName||i.memberUniqueName,a=this.options.schema.data,l=Ce(a)?a:pe.getter(a,!0),c=this.options.data&&l(this.options.data)||this._rawData||[],d=[],u=0,h={};if(s&&(s=s.split(".")[0]),!i.treeOp)return d.push({caption:t.dimensions[s].caption||s,childrenCardinality:"1",dimensionUniqueName:s,hierarchyUniqueName:s,levelUniqueName:s,name:s,uniqueName:s}),d;for(n=pe.getter(o(s),!0);u<c.length;u++)r=n(c[u]),!r&&0!==r||h[r]||(h[r]=!0,d.push({caption:r,childrenCardinality:"0",dimensionUniqueName:s,hierarchyUniqueName:s,levelUniqueName:s,name:r,uniqueName:r}));return d},this)}},options:{serverSorting:!0,serverPaging:!0,serverFiltering:!0,serverGrouping:!0,serverAggregates:!0},catalog:function(e){return e===t?this.transport.catalog():(this.transport.catalog(e),this._mergeState({}),this._axes={},this.data([]),t)},cube:function(e){return e===t?this.transport.cube():(this.transport.cube(e),this._axes={},this._mergeState({}),this.data([]),t)},axes:function(){return this._axes},columns:function(e){return e===t?this._columns:(this._skipNormalize+=1,this._clearAxesData=!0,this._columns=n(e),this.query({columns:e,rows:this.rowsAxisDescriptors(),measures:this.measures(),sort:this.sort(),filter:this.filter()}),t)},rows:function(e){return e===t?this._rows:(this._skipNormalize+=1,this._clearAxesData=!0,this._rows=n(e),this.query({columns:this.columnsAxisDescriptors(),rows:e,measures:this.measures(),sort:this.sort(),filter:this.filter()}),t)},measures:function(e){return e===t?this._measures:(this._skipNormalize+=1,this._clearAxesData=!0,this.query({columns:this.columnsAxisDescriptors(),rows:this.rowsAxisDescriptors(),measures:i(e),sort:this.sort(),filter:this.filter()}),t)},measuresAxis:function(){return this._measuresAxis||"columns"},_expandPath:function(e,t){var i,o,r,s="columns"===t?"columns":"rows",a="columns"===t?"rows":"columns",l=n(e),d=H(l[l.length-1]);for(this._lastExpanded=s,l=c(this.axes()[s],l,this.measures()),i=0;i<l.length;i++)if(o=H(l[i]),o===d){if(l[i].expand)return;l[i].expand=!0}else l[i].expand=!1;r={},r[s]=l,r[a]=this._descriptorsForAxis(a),this._query(r)},_descriptorsForAxis:function(e){var t=this.axes(),i=this[e]()||[];return t&&t[e]&&t[e].tuples&&t[e].tuples[0]&&(i=s(t[e].tuples||[])),i},columnsAxisDescriptors:function(){return this._descriptorsForAxis("columns")},rowsAxisDescriptors:function(){return this._descriptorsForAxis("rows")},_process:function(e,t){this._view=e,t=t||{},t.items=t.items||this._view,
this.trigger(Se,t)},_query:function(e){var t=this;return e||(this._skipNormalize+=1,this._clearAxesData=!0),t.query(xe({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate(),columns:this.columnsAxisDescriptors(),rows:this.rowsAxisDescriptors(),measures:this.measures()},e))},query:function(t){var i=this._mergeState(t);return this._data.length&&this.cubeBuilder?(this._params(i),this._updateLocalData(this._pristineData),e.Deferred().resolve().promise()):this.read(i)},_mergeState:function(e){return e=ve.fn._mergeState.call(this,e),e!==t&&(this._measures=i(e.measures),e.columns?e.columns=n(e.columns):e.columns||(this._columns=[]),e.rows?e.rows=n(e.rows):e.rows||(this._rows=[])),e},filter:function(e){return e===t?this._filter:(this._skipNormalize+=1,this._clearAxesData=!0,this._query({filter:e,page:1}),t)},expandColumn:function(e){this._expandPath(e,"columns")},expandRow:function(e){this._expandPath(e,"rows")},success:function(e){var t;this.cubeBuilder&&(t=(this.reader.data(e)||[]).slice(0)),ve.fn.success.call(this,e),t&&(this._pristineData=t)},_processResult:function(e,t){var i,n,o,r,s,a,l,c,d,u,h;return this.cubeBuilder&&(i=this.cubeBuilder.process(e,this._requestData),e=i.data,t=i.axes),c=this.columns(),d=this.rows(),u=t.columns&&t.columns.tuples,c.length||!d.length||!u||!this._rowMeasures().length&&this.measures().length||(t={columns:{},rows:t.columns}),c.length||d.length||"rows"!==this.measuresAxis()||!u||(t={columns:{},rows:t.columns}),this._axes={columns:b(this._axes.columns),rows:b(this._axes.rows)},t={columns:b(t.columns),rows:b(t.rows)},n=this._normalizeTuples(t.columns.tuples,this._axes.columns.tuples,c,this._columnMeasures()),o=this._normalizeTuples(t.rows.tuples,this._axes.rows.tuples,d,this._rowMeasures()),this._skipNormalize>0&&(this._skipNormalize-=1),this.cubeBuilder||(e=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:n,rowIndexes:o,data:e})),"rows"==this._lastExpanded?(r=t.columns.tuples,a=this._columnMeasures(),s=f(t.columns,this._axes.columns,a),s&&(l="columns",t.columns=s,m(r,s.tuples,t.rows.tuples.length,a,e),this.cubeBuilder||(e=this._normalizeData({columnsLength:_(t.columns.tuples,a),rowsLength:t.rows.tuples.length,data:e})))):"columns"==this._lastExpanded&&(r=t.rows.tuples,a=this._rowMeasures(),s=f(t.rows,this._axes.rows,a),s&&(l="rows",t.rows=s,g(r,s.tuples,t.columns.tuples.length,a,e),this.cubeBuilder||(e=this._normalizeData({columnsLength:_(t.rows.tuples,a),rowsLength:t.columns.tuples.length,data:e})))),this._lastExpanded=null,h=this._mergeAxes(t,e,l),this._axes=h.axes,h.data},_readData:function(e){var t=this.reader.axes(e),i=this.reader.data(e);return this.cubeBuilder&&(this._rawData=i),this._processResult(i,t)},_createTuple:function(e,t,i){var n,o,r,s,a,l,c,d,u=e.members,h=u.length,p={members:[]},f=0;for(t&&(h-=1);f<h;f++)d=u[f],o=+d.levelNum,r=d.name,s=d.parentName,c=d.caption||r,a=d.hasChildren,l=d.hierarchy,n=d.levelName,i&&(c="All",0===o?s=d.name:o-=1,a=!0,r=l=n=s),p.members.push({name:r,children:[],caption:c,levelName:n,levelNum:""+o,hasChildren:a,hierarchy:l,parentName:i?"":s});return t&&p.members.push({name:t.name,children:[]}),p},_hasRoot:function(e,t,i){var n,o,r,s,a,l,c;if(t.length)return x(t,e).tuple;for(n=e.members,s=!0,l=0,c=n.length;l<c;l++)if(o=n[l],a=+o.levelNum||0,r=i[l],!(0===a||r&&o.name===H(r))){s=!1;break}return s},_mergeAxes:function(e,t,i){var n,o,r,s,a,l=this._columnMeasures(),c=this._rowMeasures(),d=this.axes(),u=_(d.rows.tuples,c),h=e.rows.tuples.length,p=_(d.columns.tuples,l),f=e.columns.tuples.length;return"columns"==i?(f=p,o=e.columns.tuples):(o=A(e.columns.tuples,l),t=I(o,t)),r=y(d.columns.tuples,o,l),"rows"==i?(h=_(e.rows.tuples,c),o=e.rows.tuples):(o=A(e.rows.tuples,c),t=E(o,t)),s=y(d.rows.tuples,o,c),d.columns.tuples=r.tuples,d.rows.tuples=s.tuples,p!==_(d.columns.tuples,l)?(n=r.index+w(r.parsedRoot,r.memberIndex,l),a=p+f,t=this._mergeColumnData(t,n,h,f,a)):u!==_(d.rows.tuples,c)&&(n=s.index+w(s.parsedRoot,s.memberIndex,c),t=this._mergeRowData(t,n,h,f)),0===d.columns.tuples.length&&0===d.rows.tuples.length&&(t=[]),{axes:d,data:t}},_mergeColumnData:function(e,t,i,n,o){var r,s,a,l=this.data().toJSON(),c=0,d=Math.max(this._columnMeasures().length,1);for(i=Math.max(i,1),l.length>0&&(c=d,o-=d),r=0;r<i;r++)s=t+r*o,a=e.splice(0,n),a.splice(0,c),[].splice.apply(l,[s,0].concat(a));return l},_mergeRowData:function(e,t,i,n){var o,r,s,a=this.data().toJSON(),l=Math.max(this._rowMeasures().length,1);for(n=Math.max(n,1),a.length>0&&(i-=l,e.splice(0,n*l)),o=0;o<i;o++)s=e.splice(0,n),r=t*n+o*n,[].splice.apply(a,[r,0].concat(s));return a},_columnMeasures:function(){var e=this.measures(),t=[];return"columns"===this.measuresAxis()&&(0===this.columns().length?t=e:e.length>1&&(t=e)),t},_rowMeasures:function(){var e=this.measures(),t=[];return"rows"===this.measuresAxis()&&(0===this.rows().length?t=e:e.length>1&&(t=e)),t},_updateLocalData:function(e,t){this.cubeBuilder&&(t&&(this._requestData=t),e=this._processResult(e)),this._data=this._observe(e),this._ranges=[],this._addRange(this._data),this._total=this._data.length,this._pristineTotal=this._total,this._process(this._data)},data:function(e){var i=this;return e===t?i._data:(this._pristineData=e.slice(0),this._updateLocalData(e,{columns:this.columns(),rows:this.rows(),measures:this.measures()}),t)},_normalizeTuples:function(e,t,i,n){var o,r,s,a=n.length||1,l=0,c=[],d={},u=0;if(e.length){if(this._skipNormalize<=0&&!this._hasRoot(e[0],t,i)){for(this._skipNormalize=0;l<a;l++)c.push(this._createTuple(e[0],n[l],!0)),d[l]=l;e.splice.apply(e,[0,e.length].concat(c).concat(e)),l=a}if(n.length)for(s=o=e[l],r=o.members.length-1;o;){if(u>=a&&(u=0),o.members[r].name!==n[u].name&&(e.splice(l,0,this._createTuple(o,n[u])),d[l]=l),l+=1,u+=1,o=e[l],a>u&&(!o||le(s,r-1)!==le(o,r-1))){for(;u<a;u++)e.splice(l,0,this._createTuple(s,n[u])),d[l]=l,l+=1;o=e[l]}s=o}return d}},_addMissingDataItems:function(e,i){for(;i.rowIndexes[parseInt(e.length/i.columnsLength,10)]!==t;)for(var n=0;n<i.columnsLength;n++)e=p(e);for(;i.columnIndexes[e.length%i.columnsLength]!==t;)e=p(e);return e},_normalizeOrdinals:function(e,t,i){var n=i.lastOrdinal;if(!t)return p(e);if(t.ordinal-n>1)for(n+=1;n<t.ordinal&&e.length<i.length;)e=this._addMissingDataItems(p(e),i),n+=1;return t.ordinal=e.length,e[e.length]=t,e},_normalizeData:function(e){var t,i,n,o=e.data,r=0,s=[];if(e.lastOrdinal=0,e.columnIndexes=e.columnIndexes||{},e.rowIndexes=e.rowIndexes||{},e.columnsLength=e.columnsLength||1,e.rowsLength=e.rowsLength||1,e.length=e.columnsLength*e.rowsLength,n=e.length,o.length===n)return o;for(;s.length<n;)t=o[r++],t&&(i=t.ordinal),s=this._normalizeOrdinals(this._addMissingDataItems(s,e),t,e),e.lastOrdinal=i;return s},discover:function(t,i){var n=this,o=n.transport;return e.Deferred(function(e){o.discover(xe({success:function(t){t=n.reader.parse(t),n._handleCustomErrors(t)||(i&&(t=i(t)),e.resolve(t))},error:function(t,i,o){e.reject(t),n.error(t,i,o)}},t))}).promise().done(function(){n.trigger("schemaChange")})},schemaMeasures:function(){var e=this;return e.discover({data:{command:"schemaMeasures",restrictions:{catalogName:e.transport.catalog(),cubeName:e.transport.cube()}}},function(t){return e.reader.measures(t)})},schemaKPIs:function(){var e=this;return e.discover({data:{command:"schemaKPIs",restrictions:{catalogName:e.transport.catalog(),cubeName:e.transport.cube()}}},function(t){return e.reader.kpis(t)})},schemaDimensions:function(){var e=this;return e.discover({data:{command:"schemaDimensions",restrictions:{catalogName:e.transport.catalog(),cubeName:e.transport.cube()}}},function(t){return e.reader.dimensions(t)})},schemaHierarchies:function(e){var t=this;return t.discover({data:{command:"schemaHierarchies",restrictions:{catalogName:t.transport.catalog(),cubeName:t.transport.cube(),dimensionUniqueName:e}}},function(e){return t.reader.hierarchies(e)})},schemaLevels:function(e){var t=this;return t.discover({data:{command:"schemaLevels",restrictions:{catalogName:t.transport.catalog(),cubeName:t.transport.cube(),hierarchyUniqueName:e}}},function(e){return t.reader.levels(e)})},schemaCubes:function(){var e=this;return e.discover({data:{command:"schemaCubes",restrictions:{catalogName:e.transport.catalog()}}},function(t){return e.reader.cubes(t)})},schemaCatalogs:function(){var e=this;return e.discover({data:{command:"schemaCatalogs"}},function(t){return e.reader.catalogs(t)})},schemaMembers:function(e){var t=this,i=function(e){return function(i){return t.reader.members(i,e)}}(e);return t.discover({data:{command:"schemaMembers",restrictions:xe({catalogName:t.transport.catalog(),cubeName:t.transport.cube()},e)}},i)},_params:function(e){this._clearAxesData&&(this._axes={},this._data=this._observe([]),this._clearAxesData=!1,this.trigger(Ee));var t=ve.fn._params.call(this,e);return t=xe({measures:this.measures(),measuresAxis:this.measuresAxis(),columns:this.columns(),rows:this.rows()},t),this.cubeBuilder&&(this._requestData=t),t}});Qe.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},i=t.data;if(t.data=i,!(t instanceof Qe)&&t instanceof pe.data.DataSource)throw Error("Incorrect DataSource type. Only PivotDataSource instances are supported");return t instanceof Qe?t:new Qe(t)},K={contains:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") > 0',doesnotcontain:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}")',startswith:', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',endswith:', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',eq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',neq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"'},Y={schemaCubes:"MDSCHEMA_CUBES",schemaCatalogs:"DBSCHEMA_CATALOGS",schemaMeasures:"MDSCHEMA_MEASURES",schemaDimensions:"MDSCHEMA_DIMENSIONS",schemaHierarchies:"MDSCHEMA_HIERARCHIES",schemaLevels:"MDSCHEMA_LEVELS",schemaMembers:"MDSCHEMA_MEMBERS",schemaKPIs:"MDSCHEMA_KPIS"},Q={read:function(e){var t,i,n,o,r,s='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>';return s+="SELECT NON EMPTY {",t=e.columns||[],i=e.rows||[],n=e.measures||[],o="rows"===e.measuresAxis,r=e.sort||[],!t.length&&i.length&&(!n.length||n.length&&o)&&(t=i,i=[],o=!1),t.length||i.length||(o=!1),t.length?s+=W(t,o?[]:n,r):n.length&&!o&&(s+=L(n).join(",")),s+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(i.length||o&&n.length>1)&&(s+=", NON EMPTY {",s+=i.length?W(i,o?n:[],r):L(n).join(","),s+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),e.filter?(s+=" FROM ",s+="(",s+=q(e.filter,e.connection.cube),s+=")"):s+=" FROM ["+e.connection.cube+"]",1==n.length&&t.length&&(s+=" WHERE ("+L(n).join(",")+")"),s+="</Statement></Command><Properties><PropertyList><Catalog>"+e.connection.catalog+"</Catalog><Format>Multidimensional</Format></PropertyList></Properties></Execute></Body></Envelope>",s.replace(/\&/g,"&amp;")},discover:function(t){t=t||{};var i='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis">';return i+="<RequestType>"+(Y[t.command]||t.command)+"</RequestType>",i+="<Restrictions>"+j("RestrictionList",t.restrictions,!0)+"</Restrictions>",t.connection&&t.connection.catalog&&(t.properties=e.extend({},{Catalog:t.connection.catalog},t.properties)),i+="<Properties>"+j("PropertyList",t.properties)+"</Properties>",i+="</Discover></Body></Envelope>"}},X=pe.data.RemoteTransport.extend({init:function(e){var t=e;e=this.options=xe(!0,{},this.options,e),pe.data.RemoteTransport.call(this,e),Ce(t.discover)?this.discover=t.discover:"string"==typeof t.discover?this.options.discover={url:t.discover}:t.discover||(this.options.discover=this.options.read)},setup:function(t,i){return t.data=t.data||{},e.extend(!0,t.data,{connection:this.options.connection}),pe.data.RemoteTransport.fn.setup.call(this,t,i)},options:{read:{dataType:"text",contentType:"text/xml",type:"POST"},discover:{dataType:"text",contentType:"text/xml",type:"POST"},parameterMap:function(e,t){return Q[t](e,t)}},discover:function(t){return e.ajax(this.setup(t,"discover"))}}),Z={cubes:{name:pe.getter("CUBE_NAME['#text']",!0),caption:pe.getter("CUBE_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),type:pe.getter("CUBE_TYPE['#text']",!0)},catalogs:{name:pe.getter("CATALOG_NAME['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0)},measures:{name:pe.getter("MEASURE_NAME['#text']",!0),caption:pe.getter("MEASURE_CAPTION['#text']",!0),uniqueName:pe.getter("MEASURE_UNIQUE_NAME['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),aggregator:pe.getter("MEASURE_AGGREGATOR['#text']",!0),groupName:pe.getter("MEASUREGROUP_NAME['#text']",!0),displayFolder:pe.getter("MEASURE_DISPLAY_FOLDER['#text']",!0),defaultFormat:pe.getter("DEFAULT_FORMAT_STRING['#text']",!0)},kpis:{name:pe.getter("KPI_NAME['#text']",!0),caption:pe.getter("KPI_CAPTION['#text']",!0),value:pe.getter("KPI_VALUE['#text']",!0),goal:pe.getter("KPI_GOAL['#text']",!0),status:pe.getter("KPI_STATUS['#text']",!0),trend:pe.getter("KPI_TREND['#text']",!0),statusGraphic:pe.getter("KPI_STATUS_GRAPHIC['#text']",!0),trendGraphic:pe.getter("KPI_TREND_GRAPHIC['#text']",!0),description:pe.getter("KPI_DESCRIPTION['#text']",!0),groupName:pe.getter("MEASUREGROUP_NAME['#text']",!0)},dimensions:{name:pe.getter("DIMENSION_NAME['#text']",!0),caption:pe.getter("DIMENSION_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),defaultHierarchy:pe.getter("DEFAULT_HIERARCHY['#text']",!0),type:pe.getter("DIMENSION_TYPE['#text']",!0)},hierarchies:{name:pe.getter("HIERARCHY_NAME['#text']",!0),caption:pe.getter("HIERARCHY_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:pe.getter("HIERARCHY_DISPLAY_FOLDER['#text']",!0),origin:pe.getter("HIERARCHY_ORIGIN['#text']",!0),defaultMember:pe.getter("DEFAULT_MEMBER['#text']",!0)},levels:{name:pe.getter("LEVEL_NAME['#text']",!0),caption:pe.getter("LEVEL_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("LEVEL_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:pe.getter("LEVEL_DISPLAY_FOLDER['#text']",!0),orderingProperty:pe.getter("LEVEL_ORDERING_PROPERTY['#text']",!0),origin:pe.getter("LEVEL_ORIGIN['#text']",!0),hierarchyUniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0)},members:{name:pe.getter("MEMBER_NAME['#text']",!0),caption:pe.getter("MEMBER_CAPTION['#text']",!0),uniqueName:pe.getter("MEMBER_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),hierarchyUniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),levelUniqueName:pe.getter("LEVEL_UNIQUE_NAME['#text']",!0),childrenCardinality:pe.getter("CHILDREN_CARDINALITY['#text']",!0)}},J=["axes","catalogs","cubes","dimensions","hierarchies","levels","measures"],ee=pe.data.XmlDataReader.extend({init:function(e){pe.data.XmlDataReader.call(this,e),this._extend(e)},_extend:function(e){for(var t,i,n=0,o=J.length;n<o;n++)t=J[n],i=e[t],i&&i!==ye&&(this[t]=i)},parse:function(e){var t=pe.data.XmlDataReader.fn.parse(e.replace(/<(\/?)(\w|-)+:/g,"<$1"));return pe.getter("['Envelope']['Body']",!0)(t)},errors:function(e){var t=pe.getter("['Fault']",!0)(e);return t?[{faultstring:pe.getter("faultstring['#text']",!0)(t),faultcode:pe.getter("faultcode['#text']",!0)(t)}]:null},axes:function(e){var t,i,n,o;for(e=pe.getter('ExecuteResponse["return"].root',!0)(e),t=G(pe.getter("Axes.Axis",!0)(e)),n={columns:{},rows:{}},o=0;o<t.length;o++)i=t[o],"sliceraxis"!==i["@name"].toLowerCase()&&(n.columns.tuples?n.rows=$(i):n.columns=$(i));return n},data:function(e){var t,i,n,o,r,s;for(e=pe.getter('ExecuteResponse["return"].root',!0)(e),t=G(pe.getter("CellData.Cell",!0)(e)),i=[],n=pe.getter("['@CellOrdinal']"),o=pe.getter("Value['#text']"),r=pe.getter("FmtValue['#text']"),s=0;s<t.length;s++)i.push({value:o(t[s]),fmtValue:r(t[s]),ordinal:parseInt(n(t[s]),10)});return i},_mapSchema:function(e,t){var i,n,o,r,s;for(e=pe.getter('DiscoverResponse["return"].root',!0)(e),i=G(pe.getter("row",!0)(e)),n=[],o=0;o<i.length;o++){r={};for(s in t)r[s]=t[s](i[o]);n.push(r)}return n},measures:function(e){return this._mapSchema(e,Z.measures)},kpis:function(e){return this._mapSchema(e,Z.kpis)},hierarchies:function(e){return this._mapSchema(e,Z.hierarchies)},levels:function(e){return this._mapSchema(e,Z.levels)},dimensions:function(e){return this._mapSchema(e,Z.dimensions)},cubes:function(e){return this._mapSchema(e,Z.cubes)},catalogs:function(e){return this._mapSchema(e,Z.catalogs)},members:function(e){return this._mapSchema(e,Z.members)}}),xe(!0,pe.data,{PivotDataSource:Qe,XmlaTransport:X,XmlaDataReader:ee,PivotCubeBuilder:Ke,transports:{xmla:X},readers:{xmla:ee}}),te=function(e,t){if(!e)return null;for(var i=0,n=e.length;i<n;i++)if(e[i].field===t)return e[i];return null},ie=function(e,t){var i,n,o=[];for(i=0,n=e.length;i<n;i++)e[i].field!==t&&o.push(e[i]);return o},pe.ui.PivotSettingTarget=ge.extend({init:function(t,i){var n=this;ge.fn.init.call(n,t,i),n.element.addClass("k-pivot-setting"),n.dataSource=pe.data.PivotDataSource.create(i.dataSource),n._refreshHandler=e.proxy(n.refresh,n),n.dataSource.first(Se,n._refreshHandler),i.template||(n.options.template="<div data-"+pe.ns+'name="${data.name || data}">${data.name || data}'+(n.options.enabled?'<a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close k-setting-delete"></span></a>':"")+"</div>"),n.template=pe.template(n.options.template),n.emptyTemplate=pe.template(n.options.emptyTemplate),n._sortable(),n.element.on("click"+Re,".k-button,.k-item",function(t){var i=e(t.target),o=i.closest("["+pe.attr("name")+"]").attr(pe.attr("name"));o&&(i.hasClass("k-i-close")?n.remove(o):n.options.sortable&&i[0]===t.currentTarget&&n.sort({field:o,dir:i.find(".k-i-sort-asc-sm")[0]?"desc":"asc"}))}),(i.filterable||i.sortable)&&(n.fieldMenu=new fe.PivotFieldMenu(n.element,{messages:n.options.messages.fieldMenu,filter:".k-setting-fieldmenu",filterable:i.filterable,sortable:i.sortable,dataSource:n.dataSource})),n.refresh()},options:{name:"PivotSettingTarget",template:null,filterable:!1,sortable:!1,emptyTemplate:"<div class='k-empty'>${data}</div>",setting:"columns",enabled:!0,messages:{empty:"Drop Fields Here"}},setDataSource:function(e){this.dataSource.unbind(Se,this._refreshHandler),this.dataSource=this.options.dataSource=e,this.fieldMenu&&this.fieldMenu.setDataSource(e),e.first(Se,this._refreshHandler),this.refresh()},_sortable:function(){var e=this;e.options.enabled&&(this.sortable=this.element.kendoSortable({connectWith:this.options.connectWith,hint:e.options.hint,cursor:"move",start:function(e){e.item.focus().blur()},change:function(t){var i=t.item.attr(pe.attr("name"));"receive"==t.action?e.add(i):"remove"==t.action?e.remove(i):"sort"==t.action&&e.move(i,t.newIndex)}}).data("kendoSortable"))},_indexOf:function(e,t){var i,n,o=-1;for(i=0,n=t.length;i<n;i++)if(H(t[i])===e){o=i;break}return o},_isKPI:function(e){return"kpi"===e.type||e.measure},validate:function(e){var t,i,n=2==e.type||"aggregator"in e||this._isKPI(e);return n?"measures"===this.options.setting:"measures"===this.options.setting?n:(t=this.dataSource[this.options.setting](),i=e.defaultHierarchy||e.uniqueName,!(this._indexOf(i,t)>-1)&&(t=this.dataSource["columns"===this.options.setting?"rows":"columns"](),!(this._indexOf(i,t)>-1)))},add:function(t){var i,n,o=this.dataSource[this.options.setting]();for(t=e.isArray(t)?t.slice(0):[t],i=0,n=t.length;i<n;i++)this._indexOf(t[i],o)!==-1&&(t.splice(i,1),i-=1,n-=1);t.length&&(o=o.concat(t),this.dataSource[this.options.setting](o))},move:function(e,t){var i=this.dataSource[this.options.setting](),n=this._indexOf(e,i);n>-1&&(e=i.splice(n,1)[0],i.splice(t,0,e),this.dataSource[this.options.setting](i))},remove:function(e){var t=this.dataSource[this.options.setting](),i=this._indexOf(e,t),n=this.dataSource.sort(),o=this.dataSource.filter();i>-1&&(o&&(o.filters=ie(o.filters,e),this.dataSource._filter.filters=o.filters,o.filters.length||(this.dataSource._filter=null)),n&&(n=ie(n,e),this.dataSource._sort=n),t.splice(i,1),this.dataSource[this.options.setting](t))},sort:function(e){var t=this.options.sortable,i=t===!0||t.allowUnsort,n=i&&"asc"===e.dir,o=this.dataSource.sort()||[],r=ie(o,e.field);n&&o.length!==r.length&&(e=null),e&&r.push(e),this.dataSource.sort(r)},refresh:function(){var e,i="",n=this.dataSource[this.options.setting](),o=n.length,r=0;if(o)for(;r<o;r++)e=n[r],e=e.name===t?{name:e}:e,i+=this.template(xe({sortIcon:this._sortIcon(e.name)},e));else i=this.emptyTemplate(this.options.messages.empty);this.element.html(i)},destroy:function(){ge.fn.destroy.call(this),this.dataSource.unbind(Se,this._refreshHandler),this.element.off(Re),this.sortable&&this.sortable.destroy(),this.fieldMenu&&this.fieldMenu.destroy(),this.element=null,this._refreshHandler=null},_sortIcon:function(e){var t=this.dataSource.sort(),i=te(t,H(e)),n="";return i&&(n="k-i-sort-"+i.dir),n}}),ne=ge.extend({init:function(i,n){var o,r,s=this;ge.fn.init.call(s,i,n),s._dataSource(),s._bindConfigurator(),s._wrapper(),s._createLayout(),s._columnBuilder=o=new ce,s._rowBuilder=r=new de,s._contentBuilder=new ue,s._templates(),s.columnsHeader.add(s.rowsHeader).on("click","span.k-icon",function(){var i,n,a,l,c=e(this),d=o,u="expandColumn",h=c.attr(pe.attr("path")),p={axis:"columns",path:e.parseJSON(h)};c.parent().is("td")&&(d=r,u="expandRow",p.axis="rows"),n=c.hasClass(He),a=d.metadata[h],l=a.expanded===t,i=n?Le:Be,p.childrenLoaded=a.maxChildren>a.children,s.trigger(i,p)||(d.metadata[h].expanded=!n,c.toggleClass(He,!n).toggleClass(Ne,n),!n&&l?s.dataSource[u](p.path):s.refresh())}),s._scrollable(),s.options.autoBind&&s.dataSource.fetch(),pe.notify(s)},events:[Pe,ze,Be,Le],options:{name:"PivotGrid",autoBind:!0,reorderable:!0,filterable:!1,sortable:!1,height:null,columnWidth:100,configurator:"",columnHeaderTemplate:null,rowHeaderTemplate:null,dataCellTemplate:null,kpiStatusTemplate:null,kpiTrendTemplate:null,messages:{measureFields:"Drop Data Fields Here",columnFields:"Drop Column Fields Here",rowFields:"Drop Rows Fields Here"}},_templates:function(){var e=this.options.columnHeaderTemplate,t=this.options.rowHeaderTemplate,i=this.options.dataCellTemplate,n=this.options.kpiStatusTemplate,o=this.options.kpiTrendTemplate;this._columnBuilder.template=pe.template(e||Oe,{useWithBlock:!!e}),this._contentBuilder.dataTemplate=pe.template(i||Ue,{useWithBlock:!!i}),this._contentBuilder.kpiStatusTemplate=pe.template(n||Ve,{useWithBlock:!!n}),this._contentBuilder.kpiTrendTemplate=pe.template(o||We,{useWithBlock:!!o}),this._rowBuilder.template=pe.template(t||Oe,{useWithBlock:!!t})},_bindConfigurator:function(){var t=this.options.configurator;t&&e(t).kendoPivotConfigurator("setDataSource",this.dataSource)},cellInfoByElement:function(t){return t=e(t),this.cellInfo(t.index(),t.parent("tr").index())},cellInfo:function(e,t){var i,n=this._contentBuilder,o=n.columnIndexes[e||0],r=n.rowIndexes[t||0];return o&&r?(i=r.index*n.rowLength+o.index,{columnTuple:o.tuple,rowTuple:r.tuple,measure:o.measure||r.measure,dataItem:this.dataSource.view()[i]}):null},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.measuresTarget&&this.measuresTarget.setDataSource(e),this.rowsTarget&&this.rowsTarget.setDataSource(e),this.columnsTarget&&this.columnsTarget.setDataSource(e),this._bindConfigurator(),this.options.autoBind&&e.fetch()},setOptions:function(e){ge.fn.setOptions.call(this,e),this._templates()},destroy:function(){ge.fn.destroy.call(this),clearTimeout(this._headerReflowTimeout)},_dataSource:function(){var t=this,i=t.options.dataSource;i=e.isArray(i)?{data:i}:i,t.dataSource&&this._refreshHandler?t.dataSource.unbind(Se,t._refreshHandler).unbind(Ee,t._stateResetHandler).unbind(Ae,t._progressHandler).unbind(Te,t._errorHandler):(t._refreshHandler=e.proxy(t.refresh,t),t._progressHandler=e.proxy(t._requestStart,t),t._stateResetHandler=e.proxy(t._stateReset,t),t._errorHandler=e.proxy(t._error,t)),t.dataSource=pe.data.PivotDataSource.create(i).bind(Se,t._refreshHandler).bind(Ae,t._progressHandler).bind(Ee,t._stateResetHandler).bind(Te,t._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_stateReset:function(){this._columnBuilder.reset(),this._rowBuilder.reset()},_wrapper:function(){var e=this.options.height;this.wrapper=this.element.addClass("k-widget k-pivot"),e&&this.wrapper.css("height",e)},_measureFields:function(){this.measureFields=e(Me).addClass("k-pivot-toolbar k-header k-settings-measures"),this.measuresTarget=this._createSettingTarget(this.measureFields,{setting:"measures",messages:{empty:this.options.messages.measureFields}})},_createSettingTarget:function(t,i){var n='<span tabindex="0" class="k-button" data-'+pe.ns+'name="${data.name}">${data.name}',o=i.sortable,r="";return o&&(r+="#if (data.sortIcon) {#",r+='<span class="k-icon ${data.sortIcon}-sm"></span>',r+="#}#"),(i.filterable||o)&&(r+='<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),this.options.reorderable&&(r+='<span class="k-icon k-i-close k-setting-delete"></span>'),r&&(n+='<span class="k-field-actions">'+r+"</span>"),n+="</span>",new pe.ui.PivotSettingTarget(t,e.extend({template:n,emptyTemplate:'<span class="k-empty">${data}</span>',enabled:this.options.reorderable,dataSource:this.dataSource},i))},_initSettingTargets:function(){this.columnsTarget=this._createSettingTarget(this.columnFields,{connectWith:this.rowFields,setting:"columns",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.columnFields,fieldMenu:this.options.messages.fieldMenu}}),this.rowsTarget=this._createSettingTarget(this.rowFields,{connectWith:this.columnFields,setting:"rows",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.rowFields,fieldMenu:this.options.messages.fieldMenu}})},_createLayout:function(){var t=this,i=e(qe),n=i.find(".k-pivot-rowheaders"),o=i.find(".k-pivot-table"),r=e(Me).addClass("k-grid k-widget");t._measureFields(),t.columnFields=e(Me).addClass("k-pivot-toolbar k-header k-settings-columns"),t.rowFields=e(Me).addClass("k-pivot-toolbar k-header k-settings-rows"),t.columnsHeader=e('<div class="k-grid-header-wrap" />').wrap('<div class="k-grid-header" />'),t.columnsHeader.parent().css("padding-right",pe.support.scrollbar()),t.rowsHeader=e('<div class="k-grid k-widget k-alt"/>'),t.content=e('<div class="k-grid-content" />'),n.append(t.measureFields),n.append(t.rowFields),n.append(t.rowsHeader),r.append(t.columnsHeader.parent()),r.append(t.content),o.append(t.columnFields),o.append(r),t.wrapper.append(i),t.columnsHeaderTree=new pe.dom.Tree(t.columnsHeader[0]),t.rowsHeaderTree=new pe.dom.Tree(t.rowsHeader[0]),t.contentTree=new pe.dom.Tree(t.content[0]),t._initSettingTargets()},_progress:function(e){pe.ui.progress(this.wrapper,e)},_resize:function(){this.content[0].firstChild&&(this._setSectionsWidth(),this._setSectionsHeight(),this._setContentWidth(),this._setContentHeight(),this._columnHeaderReflow())},_columnHeaderReflow:function(){var e=this.columnsHeader.children("table");pe.support.browser.mozilla&&(clearTimeout(this._headerReflowTimeout),e.css("table-layout","auto"),this._headerReflowTimeout=setTimeout(function(){e.css("table-layout","")}))},_setSectionsWidth:function(){var e=this.rowsHeader,t=e.parent(".k-pivot-rowheaders").width(Ie),i=Math.max(_e(this.measureFields),_e(this.rowFields));i=Math.max(e.children("table").width(),i),t.width(i)},_setSectionsHeight:function(){var e=this.measureFields.height(Ie).height(),t=this.columnFields.height(Ie).height(),i=this.rowFields.height(Ie).innerHeight(),n=this.columnsHeader.height(Ie).innerHeight(),o=i-this.rowFields.height(),r=t>e?t:e,s=n>i?n:i;this.measureFields.height(r),this.columnFields.height(r),this.rowFields.height(s-o),this.columnsHeader.height(s)},_setContentWidth:function(){var e=this.content.find("table"),t=this.columnsHeader.children("table"),i=e.children("colgroup").children().length,n=i*this.options.columnWidth,o=Math.ceil(n/this.content.width()*100);o<100&&(o=100),e.add(t).css("width",o+"%"),this._resetColspan(t)},_setContentHeight:function(){var e=this,i=e.content,n=e.rowsHeader,o=e.wrapper.innerHeight(),r=pe.support.scrollbar(),s=i[0].offsetHeight===i[0].clientHeight,a=e.options.height;if(e.wrapper.is(":visible")){if(!o||!a)return s&&(r=0),i.height("auto"),n.height(i.height()-r),t;o-=be(e.columnFields),o-=be(e.columnsHeader),o<=2*r&&(o=2*r+1,s||(o+=r)),i.height(o),s&&(r=0),n.height(o-r)}},_resetColspan:function(e){var i=this,n=e.children("tbody").children(":first").children(":first");i._colspan===t&&(i._colspan=n.attr("colspan")),n.attr("colspan",1),clearTimeout(i._layoutTimeout),i._layoutTimeout=setTimeout(function(){n.attr("colspan",i._colspan),i._colspan=t})},_axisMeasures:function(e){var t=[],i=this.dataSource,n=i.measures(),o=n.length>1||n[0]&&n[0].type;return i.measuresAxis()===e&&(0===i[e]().length||o)&&(t=n),t},items:function(){return[]},refresh:function(){var e,t=this,i=t.dataSource,n=i.axes(),o=(n.columns||{}).tuples||[],r=(n.rows||{}).tuples||[],s=t._columnBuilder,a=t._rowBuilder,l={},c={};t.trigger(Pe,{action:"rebind"})||(s.measures=t._axisMeasures(Ge),a.measures=t._axisMeasures(je),t.columnsHeaderTree.render(s.build(o)),t.rowsHeaderTree.render(a.build(r)),l={indexes:s._indexes,measures:s.measures,metadata:s.metadata},c={indexes:a._indexes,measures:a.measures,metadata:a.metadata},t.contentTree.render(t._contentBuilder.build(i.view(),l,c)),t._resize(),t.touchScroller?t.touchScroller.contentResized():(e=pe.touchScroller(t.content),e&&e.movable&&(t.touchScroller=e,e.movable.bind("change",function(e){t.columnsHeader.scrollLeft(-e.sender.x),t.rowsHeader.scrollTop(-e.sender.y)}))),t._progress(!1),t.trigger(ze))},_scrollable:function(){var t=this,i=t.columnsHeader,n=t.rowsHeader;t.content.scroll(function(){i.scrollLeft(this.scrollLeft),n.scrollTop(this.scrollTop)}),n.bind("DOMMouseScroll"+Re+" mousewheel"+Re,e.proxy(t._wheelScroll,t))},_wheelScroll:function(t){var i,n;t.ctrlKey||(i=pe.wheelDeltaY(t),n=this.content.scrollTop(),i&&(t.preventDefault(),e(t.currentTarget).one("wheel"+Re,!1),this.rowsHeader.scrollTop(n+-i),this.content.scrollTop(n+-i)))}}),oe=pe.dom.element,re=pe.dom.html,se=function(e,t){return{maxChildren:0,children:0,maxMembers:0,members:0,measures:1,levelNum:e,parentMember:0!==t}},ae=function(e,t){for(var i=[],n=0;n<=t;n++)i.push(e.members[n].name);return i},le=function(e,t){for(var i="",n=0;n<=t;n++)i+=e.members[n].name;return i},ce=me.extend({init:function(){this.measures=1,this.metadata={}},build:function(e){var t=this._tbody(e),i=this._colGroup();return[oe("table",null,[i,t])]},reset:function(){this.metadata={}},_colGroup:function(){for(var e=this._rowLength(),t=[],i=0;i<e;i++)t.push(oe("col",null));return oe("colgroup",null,t)},_tbody:function(e){var t=e[0];return this.map={},this.rows=[],this.rootTuple=t,this._indexes=[],t?(this._buildRows(t,0),this._normalize()):this.rows.push(oe("tr",null,[oe("th",null,[re("&nbsp;")])])),oe("tbody",null,this.rows)},_normalize:function(){for(var e,t,i,n,o,r=this.rows,s=r.length,a=0;a<s;a++)if(e=r[a],1!==e.rowSpan)for(n=e.children,i=0,t=n.length;i<t;i++)o=n[i],o.tupleAll&&(o.attr.rowSpan=e.rowSpan)},_rowIndex:function(e){for(var t=this.rows,i=t.length,n=0;n<i&&t[n]!==e;n++);return n},_rowLength:function(){var e=this.rows[0]?this.rows[0].children:[],t=e.length,i=0,n=0;if(t)for(;n<t;n++)i+=e[n].attr.colSpan||1;return i||(i=this.measures),i},_row:function(e,t,i){var n,o,r=this.rootTuple.members[t].name,s=e.members[t].levelNum,a=r+s,l=this.map,c=l[a];return c?(c.notFirst=!1,
c.parentMember&&c.parentMember===i||(c.parentMember=i,c.collapsed=0,c.colSpan=0)):(c=oe("tr",null,[]),c.parentMember=i,c.collapsed=0,c.colSpan=0,c.rowSpan=1,l[a]=c,n=l[r+(+s-1)],n&&(o=n.children,c.notFirst=!(!o[1]||o[1].attr.className.indexOf("k-alt")!==-1)||n.notFirst),this.rows.splice(this._rowIndex(n)+1,0,c)),c},_measures:function(e,t,i){var n,o,r,s=this.map,a=s.measureRow;for(a||(a=oe("tr",null,[]),s.measureRow=a,this.rows.push(a)),o=0,r=e.length;o<r;o++)n=e[o],a.children.push(this._cell(i||"",[this._content(n,t)],n));return r},_content:function(e,t){return re(this.template({member:e,tuple:t}))},_cell:function(e,t,i){var n=oe("th",{className:"k-header"+e},t);return n.value=i.caption||i.name,n},_buildRows:function(e,i,n){var o,r,s,a,l,c,d,u,h,p,f=e.members,m=f[i],g=f[i+1],v=[],_=0,b=0,w=0;if(m.measure)return this._measures(m.children,e),t;if(u=pe.stringify(ae(e,i)),o=this._row(e,i,n),s=m.children,a=s.length,h=this.metadata[u],h||(this.metadata[u]=h=se(+m.levelNum,i),h.rootLevelNum=+this.rootTuple.members[i].levelNum),this._indexes.push({path:u,tuple:e}),m.hasChildren&&(h.expanded===!1&&(b=h.maxChildren,o.collapsed+=b,h.children=0,a=0),d={className:"k-icon "+(a?He:Ne)},d[pe.attr("path")]=u,v.push(oe("span",d))),v.push(this._content(m,e)),l=this._cell(o.notFirst?" k-first":"",v,m),o.children.push(l),o.colSpan+=1,a){for(c=this._cell(" k-alt",[this._content(m,e)],m),o.children.push(c);_<a;_++)r=this._buildRows(s[_],i,m);p=r.colSpan,b=r.collapsed,l.attr.colSpan=p,h.children=p,h.members=1,o.colSpan+=p,o.collapsed+=b,o.rowSpan=r.rowSpan+1,g&&(g.measure?p=this._measures(g.children,e," k-alt"):(r=this._buildRows(e,i+1),p=r.colSpan,o.collapsed+=r.collapsed,w=r.collapsed),c.attr.colSpan=p,p-=1,h.members+=p,o.colSpan+=p)}else g&&(g.measure?p=this._measures(g.children,e):(r=this._buildRows(e,i+1),p=r.colSpan,o.collapsed+=r.collapsed,w=r.collapsed),h.members=p,p>1&&(l.attr.colSpan=p,o.colSpan+=p-1));return h.maxMembers<h.members+w&&(h.maxMembers=h.members+w),s=h.children+b,h.maxChildren<s&&(h.maxChildren=s),(c||l).tupleAll=!0,o}}),de=me.extend({init:function(){this.metadata={}},build:function(e){var t=this._tbody(e),i=this._colGroup();return[oe("table",null,[i,t])]},reset:function(){this.metadata={}},_rowLength:function(){for(var e=this.rows[0].children,t=0,i=0,n=e[i];n;)t+=n.attr.colSpan||1,n=e[++i];return t},_colGroup:function(){for(var e=this._rowLength(),t=[],i=0;i<e;i++)t.push(oe("col",null));return oe("colgroup",null,t)},_tbody:function(e){var t=e[0];return this.rootTuple=t,this.rows=[],this.map={},this._indexes=[],t?(this._buildRows(t,0),this._normalize()):this.rows.push(oe("tr",null,[oe("td",null,[re("&nbsp;")])])),oe("tbody",null,this.rows)},_normalize:function(){for(var e,t,i,n,o=this.rows,r=o.length,s=0,a=this.rootTuple.members,l=a[0].name,c=a.length,d=0,u=this.map;s<r;s++)for(e=o[s],d=0;d<c;d++)i=this[a[d].name],t=e.colSpan["dim"+d],t&&t.colSpan<i&&(t.attr.colSpan=i-t.colSpan+1);e=u[l],n=u[l+"all"],e&&(e.children[0].attr.className="k-first"),n&&(n.children[0].attr.className+=" k-first")},_row:function(e){var t=oe("tr",null,e);return t.rowSpan=1,t.colSpan={},this.rows.push(t),t},_content:function(e,t){return re(this.template({member:e,tuple:t}))},_cell:function(e,t,i){var n=oe("td",{className:e},t);return n.value=i.caption||i.name,n},_buildRows:function(e,t){var i,n,o,r,s,a,l,c,d,u=this.map,h=e.members,p=h[t],f=h[t+1],m=p.children,g=m.length,v=+p.levelNum,_=this.rootTuple.members[t].name,b=ae(e,t-1).join(""),w=+this.rootTuple.members[t].levelNum,y=b+(w===v?"":p.parentName||""),k=u[y+"all"]||u[y],x=v+1,C=[];if(!k||k.hasChild?k=this._row():k.hasChild=!0,p.measure){for(l=k.allCell?"k-grid-footer":"",k.children.push(this._cell(l,[this._content(m[0],e)],m[0])),k.rowSpan=g,d=1;d<g;d++)this._row([this._cell(l,[this._content(m[d],e)],m[d])]);return k}if(u[b+p.name]=k,i=pe.stringify(ae(e,t)),a=this.metadata[i],a||(this.metadata[i]=a=se(v,t),a.rootLevelNum=w),this._indexes.push({path:i,tuple:e}),p.hasChildren&&(a.expanded===!1&&(g=0,a.children=0),c={className:"k-icon "+(g?He:Ne)},c[pe.attr("path")]=i,C.push(oe("span",c))),C.push(this._content(p,e)),l=k.allCell&&!g?"k-grid-footer":"",n=this._cell(l,C,p),n.colSpan=x,k.children.push(n),k.colSpan["dim"+t]=n,(!this[_]||this[_]<x)&&(this[_]=x),g){for(k.allCell=!1,k.hasChild=!1,d=0;d<g;d++)r=this._buildRows(m[d],t),k!==r&&(k.rowSpan+=r.rowSpan);k.rowSpan>1&&(n.attr.rowSpan=k.rowSpan),a.children=k.rowSpan,o=this._cell("k-grid-footer",[this._content(p,e)],p),o.colSpan=x,s=this._row([o]),s.colSpan["dim"+t]=o,s.allCell=!0,u[b+p.name+"all"]=s,f&&(r=this._buildRows(e,t+1),o.attr.rowSpan=r.rowSpan),k.rowSpan+=s.rowSpan,a.members=s.rowSpan}else f&&(k.hasChild=!1,this._buildRows(e,t+1),(o||n).attr.rowSpan=k.rowSpan,a.members=k.rowSpan);return a.maxChildren<a.children&&(a.maxChildren=a.children),a.maxMembers<a.members&&(a.maxMembers=a.members),k}}),ue=me.extend({init:function(){this.columnAxis={},this.rowAxis={}},build:function(e,i,n){var o,r,s=i.indexes[0],a=i.metadata[s?s.path:t];return this.columnAxis=i,this.rowAxis=n,this.data=e,this.rowLength=a?a.maxChildren+a.maxMembers:i.measures.length||1,this.rowLength||(this.rowLength=1),o=this._tbody(),r=this._colGroup(),[oe("table",null,[r,o])]},_colGroup:function(){var e=this.columnAxis.measures.length||1,t=[],i=0;for(this.rows[0]&&(e=this.rows[0].children.length);i<e;i++)t.push(oe("col",null));return oe("colgroup",null,t)},_tbody:function(){return this.rows=[],this.data[0]?(this.columnIndexes=this._indexes(this.columnAxis,this.rowLength),this.rowIndexes=this._indexes(this.rowAxis,Math.ceil(this.data.length/this.rowLength)),this._buildRows()):this.rows.push(oe("tr",null,[oe("td",null,[re("&nbsp;")])])),oe("tbody",null,this.rows)},_indexes:function(e,i){var n,o,r,s,a,l,c=[],d=e.indexes,u=e.metadata,h=e.measures,p=h.length||1,f=0,m=0,g=0,v=d.length;if(!v){for(r=0;r<p;r++)c[r]={index:r,measure:h[r],tuple:null};return c}for(;g<v;g++){if(n=d[g],o=u[n.path],a=o.children+o.members,l=0,a&&(a-=p),o.expanded===!1&&o.children!==o.maxChildren&&(l=o.maxChildren),o.parentMember&&o.levelNum===o.rootLevelNum&&(a=-1),a>-1){for(r=0;r<p;r++)s=a+r,o.children||(s+=m),c[a+m+r]={children:a,index:f,measure:h[r],tuple:n.tuple},f+=1;for(;c[m]!==t;)m+=1}if(m===i)break;f+=l}return c},_buildRows:function(){for(var e,t=this.rowIndexes,i=t.length,n=0;n<i;n++)e=t[n],e&&this.rows.push(this._buildRow(e))},_buildRow:function(e){for(var i,n,o,r,s,a,l,c=e.index*this.rowLength,d=this.columnIndexes,u=d.length,h=[],p=0;p<u;p++)i=d[p],i!==t&&(s={},i.children&&(s.className="k-alt"),r="",a=this.data[c+i.index],l=i.measure||e.measure,n={columnTuple:i.tuple,rowTuple:e.tuple,measure:l,dataItem:a},""!==a.value&&l&&l.type&&("status"===l.type?r=this.kpiStatusTemplate(n):"trend"===l.type&&(r=this.kpiTrendTemplate(n))),r||(r=this.dataTemplate(n)),o=oe("td",s,[re(r)]),o.value=a.value,h.push(o));return s={},e.children&&(s.className="k-grid-footer"),oe("tr",s,h)}}),fe.plugin(ne),pe.PivotExcelExporter=pe.Class.extend({init:function(e){this.options=e,this.widget=e.widget,this.dataSource=this.widget.dataSource},_columns:function(){var e,t=this.widget.columnsHeaderTree.children[0],i=this.widget.rowsHeaderTree.children[0],n=t.children[0].children.length,o=i.children[0].children.length,r=this.widget.options.columnWidth,s=[];if(o&&this.dataSource.data()[0])for(e=0;e<o;e++)s.push({autoWidth:!0});for(e=0;e<n;e++)s.push({autoWidth:!1,width:r});return s},_cells:function(e,t,i){for(var n,o,r,s,a,l=[],c=0,d=e.length;c<d;c++){for(o=[],r=e[c].children,n=r.length,s=0;s<n;s++)a=r[s],o.push({background:"#7a7a7a",color:"#fff",value:a.value,colSpan:a.attr.colSpan||1,rowSpan:a.attr.rowSpan||1});i&&i(o,c),l.push({cells:o,type:t})}return l},_rows:function(){var e,t,i=this.widget.columnsHeaderTree.children[0],n=this.widget.rowsHeaderTree.children[0],o=i.children[0].children.length,r=n.children[0].children.length,s=i.children[1].children,a=n.children[1].children,l=this.widget.contentTree.children[0].children[1].children,c=this._cells(s,"header");return r&&c[0].cells.splice(0,0,{background:"#7a7a7a",color:"#fff",value:"",colSpan:r,rowSpan:s.length}),e=function(e,t){for(var i,n,r=0,s=l[t].children;r<o;r++)i=s[r],n=+i.value,isNaN(n)&&(n=i.value),e.push({background:"#dfdfdf",color:"#333",value:n,colSpan:1,rowSpan:1})},t=this._cells(a,"data",e),c.concat(t)},_freezePane:function(){var e=this.widget.columnsHeaderTree.children[0],t=this.widget.rowsHeaderTree.children[0],i=t.children[0].children.length,n=e.children[1].children;return{colSplit:i,rowSplit:n.length}},workbook:function(){var t;return this.dataSource.view()[0]?(t=e.Deferred(),t.resolve()):t=this.dataSource.fetch(),t.then(e.proxy(function(){return{sheets:[{columns:this._columns(),rows:this._rows(),freezePane:this._freezePane(),filter:null}]}},this))}}),he={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var t=this.options.excel||{},i=new pe.PivotExcelExporter({widget:this});i.workbook().then(e.proxy(function(e){if(!this.trigger("excelExport",{workbook:e})){var i=new pe.ooxml.Workbook(e);i.toDataURLAsync().then(function(i){pe.saveAs({dataURI:i,fileName:e.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy})})}},this))}},pe.PivotExcelMixin=he,pe.ooxml&&pe.ooxml.Workbook&&he.extend(ne.prototype),pe.PDFMixin&&(pe.PDFMixin.extend(ne.prototype),ne.fn._drawPDF=function(){return this._drawPDFShadow({width:this.wrapper.width()},{avoidLinks:this.options.pdf.avoidLinks})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.pivot.fieldmenu.min",["kendo.pivotgrid.min","kendo.menu.min","kendo.window.min","kendo.treeview.min","kendo.dropdownlist.min"],e)}(function(){return function(e,t){function i(e,t){var i,n,o=[];for(i=0,n=e.length;i<n;i++)e[i].field!==t&&o.push(e[i]);return o}function n(e,t,i){var n,o,r,s;if(!e)return[];for(e=e.filters,n=0,o=[],r=e.length;n<r;n++)s=e[n].operator,(i||"in"===s)&&s!==i||e[n].field!==t||o.push(e[n]);return o}function o(t,i,o){var r,s=0,a=o.length;if(t=n(t,i,"in")[0])for(r=t.value.split(",");s<a;s++)o[s].checked=e.inArray(o[s].uniqueName,r)>=0;else for(;s<a;s++)o[s].checked=!0}function r(e,t){var i,n=e.length;for(i=0;i<n;i++)e[i].checked&&0!==e[i].level()&&t.push(e[i].uniqueName),e[i].hasChildren&&r(e[i].children.view(),t)}var s=window.kendo,a=s.ui,l="kendoContextMenu",c=e.proxy,d=".kendoPivotFieldMenu",u=a.Widget,h="k-filter-item",p="aria-label",f=u.extend({init:function(e,t){u.fn.init.call(this,e,t),this._dataSource(),this._layout(),s.notify(this)},events:[],options:{name:"PivotFieldMenu",filter:null,filterable:!0,sortable:!0,messages:{info:"Show items with value that:",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filterFields:"Fields Filter",filter:"Filter",include:"Include Fields...",title:"Fields to include",clear:"Clear",ok:"OK",cancel:"Cancel",operators:{contains:"Contains",doesnotcontain:"Does not contain",startswith:"Starts with",endswith:"Ends with",eq:"Is equal to",neq:"Is not equal to"}}},_layout:function(){var t=this.options;this.wrapper=e(s.template(g)({ns:s.ns,filterable:t.filterable,sortable:t.sortable,messages:t.messages})),this.menu=this.wrapper[l]({filter:t.filter,target:this.element,orientation:"vertical",showOn:"click",closeOnClick:!1,open:c(this._menuOpen,this),select:c(this._select,this),copyAnchorStyles:!1}).data(l),this._createWindow(),t.filterable&&this._initFilterForm()},_initFilterForm:function(){var e=this.menu.element.find("."+h),t=c(this._filter,this);this._filterOperator=new s.ui.DropDownList(e.find("select")),this._filterValue=e.find(".k-textbox"),this._updateFilterAriaLabel(),e.on("submit"+d,t).on("click"+d,".k-button-filter",t).on("click"+d,".k-button-clear",c(this._reset,this))},_setFilterForm:function(e){var t=this._filterOperator,i="",n="";e&&(i=e.operator,n=e.value),t.value(i),t.value()||t.select(0),this._filterValue.val(n)},_clearFilters:function(e){var t,i,o=this.dataSource.filter()||{},r=0;for(o.filters=o.filters||[],t=n(o,e),i=t.length;r<i;r++)o.filters.splice(o.filters.indexOf(t[r]),1);return o},_convert:function(t){var i=this.dataSource.options.schema,n=((i.model||{}).fields||{})[this.currentMember];return n&&("number"===n.type?t=parseFloat(t):"boolean"===n.type&&(t=!!e.parseJSON(t))),t},_filter:function(e){var i,n,o=this,r=o._convert(o._filterValue.val());return e.preventDefault(),""===r?(o.menu.close(),t):(i={field:o.currentMember,operator:o._filterOperator.value(),value:r},n=o._clearFilters(o.currentMember),n.filters.push(i),o.dataSource.filter(n),o.menu.close(),t)},_updateFilterAriaLabel:function(){var e=this.menu.element.find("."+h),t=this._filterOperator.value(),i=this.options.messages.operators[t];e.find("select").attr(p,i)},_reset:function(e){var t=this,i=t._clearFilters(t.currentMember);e.preventDefault(),i.filters[0]||(i={}),t.dataSource.filter(i),t._setFilterForm(null),t.menu.close()},_sort:function(e){var t=this.currentMember,n=this.dataSource.sort()||[];n=i(n,t),n.push({field:t,dir:e}),this.dataSource.sort(n),this.menu.close()},setDataSource:function(e){this.options.dataSource=e,this._dataSource()},_dataSource:function(){this.dataSource=s.data.PivotDataSource.create(this.options.dataSource)},_createWindow:function(){var t=this.options.messages;this.includeWindow=e(s.template(v)({messages:t})).on("click"+d,".k-button-ok",c(this._applyIncludes,this)).on("click"+d,".k-button-cancel",c(this._closeWindow,this)),this.includeWindow=new a.Window(this.includeWindow,{title:t.title,visible:!1,resizable:!1,open:c(this._windowOpen,this)})},_applyIncludes:function(e){var t,i=[],o=this.treeView.dataSource.view(),s=o[0].checked,a=this.dataSource.filter(),l=n(a,this.currentMember,"in")[0];r(o,i),l&&(s?(a.filters.splice(a.filters.indexOf(l),1),a.filters.length||(a={})):l.value=i.join(","),t=a),i.length&&(t||s||(t={field:this.currentMember,operator:"in",value:i.join(",")},a&&(a.filters.push(t),t=a))),t&&this.dataSource.filter(t),this._closeWindow(e)},_closeWindow:function(e){e.preventDefault(),this.includeWindow.close()},_treeViewDataSource:function(){var e=this;return s.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(e){return parseInt(e.childrenCardinality,10)>0}}},transport:{read:function(t){var i={},n=e.treeView.dataSource.get(t.data.uniqueName),r=t.data.uniqueName;r?(i.memberUniqueName=n.uniqueName.replace(/\&/g,"&amp;"),i.treeOp=1):i.levelUniqueName=e.currentMember+".[(ALL)]",e.dataSource.schemaMembers(i).done(function(i){o(e.dataSource.filter(),e.currentMember,i),t.success(i)}).fail(t.error)}}})},_createTreeView:function(e){var t=this;t.treeView=new a.TreeView(e,{autoBind:!1,dataSource:t._treeViewDataSource(),dataTextField:"caption",template:"#: data.item.caption || data.item.name #",checkboxes:{checkChildren:!0},dataBound:function(){a.progress(t.includeWindow.element,!1)}})},_menuOpen:function(t){if(t.event){var i=s.attr("name");this.currentMember=e(t.event.target).closest("["+i+"]").attr(i),this.options.filterable&&this._setFilterForm(n(this.dataSource.filter(),this.currentMember)[0])}},_select:function(t){var i=e(t.item);e(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"),i.hasClass("k-include-item")?this.includeWindow.center().open():i.hasClass("k-sort-asc")?this._sort("asc"):i.hasClass("k-sort-desc")?this._sort("desc"):i.hasClass(h)&&this._updateFilterAriaLabel()},_windowOpen:function(){this.treeView||this._createTreeView(this.includeWindow.element.find(".k-treeview")),a.progress(this.includeWindow.element,!0),this.treeView.dataSource.read()},destroy:function(){u.fn.destroy.call(this),this.menu&&(this.menu.destroy(),this.menu=null),this.treeView&&(this.treeView.destroy(),this.treeView=null),this.includeWindow&&(this.includeWindow.destroy(),this.includeWindow=null),this.wrapper=null,this.element=null}}),m='<div class="k-filterable k-content" tabindex="-1" data-role="fieldmenu"><form class="k-filter-menu"><div><div class="k-filter-help-text">#=messages.info#</div><select>#for(var op in messages.operators){#<option value="#=op#">#=messages.operators[op]#</option>#}#</select><input class="k-textbox" type="text" '+p+'="#=messages.filter#" /><div><a class="k-button k-primary k-button-filter" href="\\#">#=messages.filter#</a><a class="k-button k-button-clear" href="\\#">#=messages.clear#</a></div></div></form></div>',g='<ul class="k-pivot-fieldmenu"># if (sortable) {#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li># if (filterable) {#<li class="k-separator"></li># } ## } ## if (filterable) {#<li class="k-item k-include-item"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.include}</span></li><li class="k-separator"></li><li class="k-item '+h+'"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filterFields}</span><ul><li>'+m+"</li></ul></li># } #</ul>",v='<div class="k-popup-edit-form k-pivot-filter-window"><div class="k-edit-form-container"><div class="k-treeview"></div><div class="k-edit-buttons k-state-default"><a class="k-button k-primary k-button-ok" href="\\#">${messages.ok}</a><a class="k-button k-button-cancel" href="\\#">${messages.cancel}</a></div></div>';a.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.filtercell.min",["kendo.autocomplete.min","kendo.datepicker.min","kendo.numerictextbox.min","kendo.combobox.min","kendo.dropdownlist.min"],e)}(function(){return function(e,t){function i(t){var i="string"==typeof t?t:t.operator;return e.inArray(i,v)>-1}function n(t,i){var o,r,s=[];if(e.isPlainObject(t))if(t.hasOwnProperty("filters"))s=t.filters;else if(t.field==i)return t;for(e.isArray(t)&&(s=t),o=0;o<s.length;o++)if(r=n(s[o],i))return r}function o(t,i){t.filters&&(t.filters=e.grep(t.filters,function(e){return o(e,i),e.filters?e.filters.length:e.field!=i}))}function r(e,t){var i=s.getter(t,!0);return function(t){for(var n,o,r=e(t),s=[],a=0,l={};a<r.length;)n=r[a++],o=i(n),l.hasOwnProperty(o)||(s.push(n),l[o]=!0);return s}}var s=window.kendo,a=s.ui,l=s.data.DataSource,c=a.Widget,d="change",u="boolean",h="enums",p="string",f="Is equal to",m="Is not equal to",g=e.proxy,v=["isnull","isnotnull","isempty","isnotempty","isnullorempty","isnotnullorempty"],_=c.extend({init:function(n,o){var r,a,l,f,m,v,_,b,w,y,k,x,C;if(n=e(n).addClass("k-filtercell"),r=this.wrapper=e("<span/>").appendTo(n),a=this,m=o,b=a.operators=o.operators||{},w=a.input=e("<input/>").attr(s.attr("bind"),"value: value").appendTo(r),y=o?o.suggestDataSource:null,y&&(o=e.extend({},o,{suggestDataSource:{}})),c.fn.init.call(a,n[0],o),y&&(a.options.suggestDataSource=y),o=a.options,l=a.dataSource=o.dataSource,a.model=l.reader.model,_=o.type=p,k=s.getter("reader.model.fields",!0)(l)||{},x=k[o.field],x&&x.type&&(_=o.type=x.type),o.values&&(o.type=_=h),b=b[_]||o.operators[_],!m.operator)for(v in b){o.operator=v;break}a._parse=function(e){return null!=e?e+"":e},a.model&&a.model.fields&&(C=a.model.fields[o.field],C&&C.parse&&(a._parse=g(C.parse,C))),a.defaultOperator=o.operator,a.viewModel=f=s.observable({operator:o.operator,value:null,operatorVisible:function(){var e=this.get("value");return null!==e&&e!==t&&"undefined"!=e||i(this.get("operator"))&&!a._clearInProgress}}),f.bind(d,g(a.updateDsFilter,a)),_==p&&a.initSuggestDataSource(o),null!==o.inputWidth&&(w.addClass("k-sized-input"),w.width(o.inputWidth)),w.attr("aria-label",a._getColumnTitle()),a._setInputType(o,_),_!=u&&o.showOperators!==!1?a._createOperatorDropDown(b):(e('<div unselectable="on" />').css("display","none").text("eq").appendTo(r),r.addClass("k-operator-hidden")),a._createClearIcon(),s.bind(this.wrapper,f),_==p&&(o.template||a.setAutoCompleteSource()),_==h&&a.setComboBoxSource(a.options.values),a._refreshUI(),a._refreshHandler=g(a._refreshUI,a),a.dataSource.bind(d,a._refreshHandler)},_setInputType:function(t,i){var n,o,r,a,l,c=this,d=c.input;"function"==typeof t.template?(t.template.call(c.viewModel,{element:c.input,dataSource:c.suggestDataSource}),c._angularItems("compile")):i==p?d.attr(s.attr("role"),"autocomplete").attr(s.attr("text-field"),t.dataTextField||t.field).attr(s.attr("filter"),t.suggestionOperator).attr(s.attr("delay"),t.delay).attr(s.attr("min-length"),t.minLength).attr(s.attr("value-primitive"),!0):"date"==i?d.attr(s.attr("role"),"datepicker"):i==u?(d.remove(),n=e("<input type='radio'/>"),o=c.wrapper,r=s.guid(),a=e("<label/>").text(t.messages.isTrue).append(n),n.attr(s.attr("bind"),"checked:value").attr("name",r).val("true"),l=a.clone().text(t.messages.isFalse),n.clone().val("false").appendTo(l),o.append([a,l])):"number"==i?d.attr(s.attr("role"),"numerictextbox").attr("title",c._getColumnTitle()):i==h&&d.attr(s.attr("role"),"combobox").attr(s.attr("text-field"),"text").attr(s.attr("suggest"),!0).attr(s.attr("filter"),"contains").attr(s.attr("value-field"),"value").attr(s.attr("value-primitive"),!0)},_getColumnTitle:function(){var e=this.options.column;return e?e.title||e.field:""},_createOperatorDropDown:function(t){var i,n,o=[],r=this.viewModel;for(i in t)o.push({text:t[i],value:i});n=e('<input class="k-dropdown-operator" '+s.attr("bind")+'="value: operator"/>').appendTo(this.wrapper),this.operatorDropDown=n.kendoDropDownList({dataSource:o,dataTextField:"text",dataValueField:"value",open:function(){this.popup.element.width(150)},valuePrimitive:!0}).data("kendoDropDownList"),r.bind("change",function(){var e=t[r.operator];n.attr("aria-label",e)}),this.operatorDropDown.wrapper.find(".k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-i-filter")},initSuggestDataSource:function(e){var i=e.suggestDataSource;i instanceof l||(!e.customDataSource&&i&&(i.group=t),i=this.suggestDataSource=l.create(i)),e.customDataSource||(i._pageSize=t,i.reader.data=r(i.reader.data,this.options.field)),this.suggestDataSource=i},setAutoCompleteSource:function(){var e=this.input.data("kendoAutoComplete");e&&e.setDataSource(this.suggestDataSource)},setComboBoxSource:function(e){var t=l.create({data:e}),i=this.input.data("kendoComboBox");i&&i.setDataSource(t)},_refreshUI:function(){var t=this,i=n(t.dataSource.filter(),this.options.field)||{},o=t.viewModel;t.manuallyUpdatingVM=!0,i=e.extend(!0,{},i),t.options.type==u&&o.value!==i.value&&t.wrapper.find(":radio").prop("checked",!1),i.operator&&o.set("operator",i.operator),o.set("value",i.value),t.manuallyUpdatingVM=!1},updateDsFilter:function(n){var o,r,s,a,l=this,c=l.viewModel;l.manuallyUpdatingVM||"operator"==n.field&&c.value===t&&!i(c)||"operator"==n.field&&l._clearInProgress&&null!==c.value||(o=e.extend({},l.viewModel.toJSON(),{field:l.options.field}),r={logic:"and",filters:[]},s=!1,(o.value!==t&&null!==o.value||i(o)&&!this._clearInProgress)&&(r.filters.push(o),s=l.trigger(d,{filter:r,field:l.options.field})),(l._clearInProgress||null===o.value)&&(s=l.trigger(d,{filter:null,field:l.options.field})),s||(a=l._merge(r),l.dataSource.filter(a.filters.length?a:{})))},_merge:function(t){var n,r,s,a=this,l=t.logic||"and",c=t.filters,d=a.dataSource.filter()||{filters:[],logic:"and"};for(o(d,a.options.field),r=0,s=c.length;r<s;r++)n=c[r],n.value=a._parse(n.value);return c=e.grep(c,function(e){return""!==e.value&&null!==e.value||i(e)}),c.length&&(d.filters.length?(t.filters=c,"and"!==d.logic&&(d.filters=[{logic:d.logic,filters:d.filters}],d.logic="and"),d.filters.push(c.length>1?t:c[0])):(d.filters=c,d.logic=l)),d},_createClearIcon:function(){var t=this;e("<button type='button' class='k-button k-button-icon' title = "+t.options.messages.clear+"/>").attr("aria-label",t.options.messages.clear).attr(s.attr("bind"),"visible:operatorVisible").html("<span class='k-icon k-i-filter-clear'/>").click(g(t.clearFilter,t)).appendTo(t.wrapper)},clearFilter:function(){this._clearInProgress=!0,i(this.viewModel.operator)&&this.viewModel.set("operator",this.defaultOperator),this.viewModel.set("value",null),this._clearInProgress=!1},_angularItems:function(e){var t=this.wrapper.closest("th").get(),i=this.options.column;this.angular(e,function(){return{elements:t,data:[{column:i}]}})},destroy:function(){var e=this;e.filterModel=null,e.operatorDropDown=null,e._angularItems("cleanup"),e._refreshHandler&&(e.dataSource.bind(d,e._refreshHandler),e._refreshHandler=null),s.unbind(e.element),c.fn.destroy.call(e),s.destroy(e.element)},events:[d],options:{name:"FilterCell",delay:200,minLength:1,inputWidth:null,values:t,customDataSource:!1,field:"",dataTextField:"",type:"string",suggestDataSource:null,suggestionOperator:"startswith",operator:"eq",showOperators:!0,template:null,messages:{isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",operator:"Operator"},operators:{string:{eq:f,neq:m,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:f,neq:m,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than",isnull:"Is null",isnotnull:"Is not null"},date:{eq:f,neq:m,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before",isnull:"Is null",isnotnull:"Is not null"},enums:{eq:f,neq:m,isnull:"Is null",isnotnull:"Is not null"}}}});a.plugin(_)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.panelbar.min",["kendo.data.min"],e)}(function(){return function(e,t){function i(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(T),t.filter(".k-last:not(:last-child)").removeClass(_),t.filter(":first-child").addClass(T),t.filter(":last-child").addClass(_)}function n(t){var i=t,n=t.children("ul"),o=i.children(".k-link").children(".k-icon");t.hasClass("k-panelbar")||(!o.length&&n.length?o=e("<span class='k-icon' />").appendTo(i):n.length&&n.children().length||(o.remove(),n.remove()))}var o=window.kendo,r=o.ui,s=o.keys,a=e.extend,l=e.proxy,c=e.each,d=e.isArray,u=o.template,h=r.Widget,p=o.data.HierarchicalDataSource,f=/^(ul|a|div)$/i,m=".kendoPanelBar",g="img",v="href",_="k-last",b="k-link",w="."+b,y="error",k=".k-item",x=".k-group",C=x+":visible",S="k-image",T="k-first",D="change",A="expand",E="select",I="k-content",M="activate",R="collapse",F="dataBound",P="mouseenter",z="mouseleave",B="contentLoad",L="undefined",H="k-state-active",N="> .k-panel",O="> .k-content",V="string",W="k-state-focused",U="k-state-disabled",q="k-state-selected",j="."+q,G="k-state-highlight",$=k+":not(.k-state-disabled)",K="> "+$+" > "+w+", .k-panel > "+$+" > "+w,Y=k+".k-state-disabled > .k-link",Q="> li > "+j+", .k-panel > li > "+j,X="k-state-default",Z="aria-disabled",J="aria-expanded",ee="aria-hidden",te="aria-selected",ie=":visible",ne=":empty",oe="single",re={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},se={aria:function(e){var t="";return(e.items||e.content||e.contentUrl||e.expanded)&&(t+=J+"='"+(e.expanded?"true":"false")+"' "),e.enabled===!1&&(t+=Z+"='true'"),t},wrapperCssClass:function(e,t){var i="k-item",n=t.index;return i+=t.enabled===!1?" "+U:t.expanded===!0?" "+H:" k-state-default",0===n&&(i+=" k-first"),n==e.length-1&&(i+=" k-last"),t.cssClass&&(i+=" "+t.cssClass),i},textClass:function(e,t){var i=b;return t.firstLevel&&(i+=" k-header"),e.selected&&(i+=" "+q),i},textAttributes:function(e){return e?" href='"+e+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-panelbar-collapse k-i-arrow-60-up":" k-panelbar-expand k-i-arrow-60-down"},text:function(e){return e.encoded===!1?e.text:o.htmlEncode(e.text)},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},ariaHidden:function(e){return e.expanded!==!0},groupCssClass:function(){return"k-group k-panel"},contentAttributes:function(e){return e.item.expanded!==!0?" style='display:none'":""},content:function(e){return e.content?e.content:e.contentUrl?"":"&nbsp;"},contentUrl:function(e){return e.contentUrl?'href="'+e.contentUrl+'"':""}},ae=function(e){return e.children("span").children(".k-icon")},le=o.ui.DataBoundWidget.extend({init:function(t,i){var n,r,s=this;d(i)&&(i={dataSource:i}),r=i&&!!i.dataSource,h.fn.init.call(s,t,i),t=s.wrapper=s.element.addClass("k-widget k-reset k-header k-panelbar"),i=s.options,t[0].id&&(s._itemId=t[0].id+"_pb_active"),s._tabindex(),s._accessors(),s._dataSource(),s._templates(),s._initData(r),s._updateClasses(),s._animations(i),t.on("click"+m,K,function(t){s._click(e(t.currentTarget))&&t.preventDefault()}).on(P+m+" "+z+m,K,s._toggleHover).on("click"+m,Y,!1).on("click"+m,".k-request-retry",l(s._retryRequest,s)).on("keydown"+m,e.proxy(s._keydown,s)).on("focus"+m,function(){var e=s.select();s._current(e[0]?e:s._first())}).on("blur"+m,function(){s._current(null)}).attr("role","menu"),n=t.find("li."+H+" > ."+I),n[0]&&s.expand(n.parent(),!1),i.dataSource||s._angularCompile(),o.notify(s)},events:[A,R,E,M,D,y,F,B],options:{name:"PanelBar",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},autoBind:!0,loadOnDemand:!0,expandMode:"multiple",template:"",dataTextField:null},_angularCompile:function(){var e=this;e.angular("compile",function(){return{elements:e.element.children("li"),data:[{dataItem:e.options.$angular}]}})},_angularCompileElements:function(t,i){var n=this;n.angular("compile",function(){return{elements:t,data:e.map(i,function(e){return[{dataItem:e}]})}})},_angularCleanup:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element.children("li")}})},destroy:function(){h.fn.destroy.call(this),this.element.off(m),this._angularCleanup(),o.destroy(this.element)},_initData:function(e){var t=this;e&&(t.element.empty(),t.options.autoBind&&(t._progress(!0),t.dataSource.fetch()))},_templates:function(){var e=this,t=e.options,i=l(e._fieldAccessor,e);t.template&&typeof t.template==V?t.template=u(t.template):t.template||(t.template=u("# var text = "+i("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e.templates={content:u("<div role='region' class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"),group:u("<ul role='group' aria-hidden='#= ariaHidden(group) #' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:u("# var url = "+i("url")+"(item); ## var imageUrl = "+i("imageUrl")+"(item); ## var spriteCssClass = "+i("spriteCssClass")+"(item); ## var contentUrl = contentUrl(item); ## var tag = url||contentUrl ? 'a' : 'span'; #<#= tag # class='#= textClass(item, group) #' #= contentUrl ##= textAttributes(url) #># if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #' /># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.panelBar.options.template(data) ##= arrow(data) #</#= tag #>"),item:u("<li role='menuitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'"+o.attr("uid")+"='#= item.uid #'>#= itemWrapper(data) ## if (item.items && item.items.length > 0) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),loading:u("<div class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</div>"),retry:u("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>"),arrow:u("<span class='#= arrowClass(item) #'></span>"),empty:u("")}},
setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=a(!0,t,e.animation),"dataSource"in e&&this.setDataSource(e.dataSource),h.fn.setOptions.call(this,e)},expand:function(i,n){var o=this,r={};return i=this.element.find(i),o._animating&&i.find("ul").is(":visible")?(o.one("complete",function(){setTimeout(function(){o.expand(i)})}),t):(o._animating=!0,n=n!==!1,i.each(function(t,s){var a,l;if(s=e(s),a=i.children(".k-group,.k-content"),a.length||(a=o._addGroupElement(i)),l=a.add(s.find(O)),!s.hasClass(U)&&l.length>0){if(o.options.expandMode==oe&&o._collapseAllExpanded(s))return o;i.find("."+G).removeClass(G),s.addClass(G),n||(r=o.options.animation,o.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),o._triggerEvent(A,s)||o._toggleItem(s,!1,!1),n||(o.options.animation=r)}}),o)},collapse:function(t,i){var n=this,o={};return n._animating=!0,i=i!==!1,t=n.element.find(t),t.each(function(t,r){r=e(r);var s=r.find(N).add(r.find(O));!r.hasClass(U)&&s.is(ie)&&(r.removeClass(G),i||(o=n.options.animation,n.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),n._triggerEvent(R,r)||n._toggleItem(r,!0),i||(n.options.animation=o))}),n},updateArrow:function(t){var i=this;t=e(t),t.children(w).children(".k-panelbar-collapse, .k-panelbar-expand").remove(),t.filter(function(){var t=i.dataItem(this);return t?t.hasChildren||t.content||t.contentUrl:e(this).find(".k-panel").length>0||e(this).find(".k-content").length>0}).children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),i=t.parent();t.append("<span class='k-icon "+(i.hasClass(H)?" k-panelbar-collapse k-i-arrow-60-up":" k-panelbar-expand k-i-arrow-60-down")+"'/>")})},_accessors:function(){var e,t,i,n=this,r=n.options,s=n.element;for(e in re)t=r[re[e]],i=s.attr(o.attr(e+"-field")),!t&&i&&(t=i),t||(t=e),d(t)||(t=[t]),r[re[e]]=t},_progress:function(e,t){var i=this.element,n=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?i.html(n):i.empty()):ae(e).toggleClass("k-i-loading",t).removeClass("k-i-refresh")},_refreshRoot:function(t){var i,n=this,o=n.element,r={firstLevel:!0,expanded:!0,length:o.children().length};this.element.empty(),i=e.map(t,function(t,i){return"string"==typeof t?e(t):(t.items=[],e(n.renderItem({group:r,item:a(t,{index:i})})))}),this.element.append(i),this._angularCompileElements(i,t)},_refreshChildren:function(e,t){var i,o,s,a;if(t.children(".k-group").empty(),a=e.children.data(),a.length)for(this.append(e.children,t),this.options.loadOnDemand&&this._toggleGroup(t.children(".k-group"),!1),o=t.children(".k-group").children("li"),i=0;i<o.length;i++)s=o.eq(i),this.trigger("itemChange",{item:s,data:this.dataItem(s),ns:r});else n(t),o=t.children(".k-group").children("li"),this._angularCompileElements(o,a)},findByUid:function(t){var i,n,r=this.element.find(".k-item"),s=o.attr("uid");for(n=0;n<r.length;n++)if(r[n].getAttribute(s)==t){i=r[n];break}return e(i)},refresh:function(e){var i,n,o=this.options,r=e.node,s=e.action,a=e.items,l=this.wrapper,c=o.loadOnDemand;if(e.field){if(!a[0]||!a[0].level)return;return this._updateItems(a,e.field)}if(r&&(l=this.findByUid(r.uid),this._progress(l,!1)),"add"==s?this._appendItems(e.index,a,l):"remove"==s?this.remove(this.findByUid(a[0].uid)):"itemchange"==s?this._updateItems(a):"itemloaded"==s?this._refreshChildren(r,l):this._refreshRoot(a),"remove"!=s)for(i=0;i<a.length;i++)c&&!a[i].expanded||(n=a[i],this._hasChildItems(n)&&n.load());this.trigger(F,{node:r?l:t})},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),i=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),ae(t).addClass("k-i-refresh"),e.node.loaded(!1)):(this._progress(!1),this.element.html(i))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},items:function(){return this.element.find(".k-item > span:first-child")},setDataSource:function(e){var t=this.options;t.dataSource=e,this._dataSource(),this.options.autoBind&&(this._progress(!0),this.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=l(this.refresh,this),this._errorHandler=l(this._error,this),this.dataSource.bind(D,this._refreshHandler),this.dataSource.bind(y,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(D,this._refreshHandler),e.unbind(y,this._errorHandler))},_fieldAccessor:function(t){var i=this.options[re[t]]||[],n=i.length,r="(function(item) {";return 0===n?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(i,function(e){return"function(d){ return "+o.expr(e)+"}"}).join(",")+"];",r+="if(item.level){return levels[Math.min(item.level(), "+n+"-1)](item);}else",r+="{return levels["+n+"-1](item)}"),r+="})"},_dataSource:function(){var e=this,t=e.options,i=t.dataSource;i&&(i=d(i)?{data:i}:i,e._unbindDataSource(),i.fields||(i.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource=p.create(i),e._bindDataSource())},_appendItems:function(t,i,n){var o,r,s,l,c,d=this;for(n.hasClass("k-panelbar")?(o=n.children("li"),r=n):(r=n.children(".k-group"),r.length||(r=d._addGroupElement(n)),o=r.children("li")),s={firstLevel:n.hasClass("k-panelbar"),expanded:!0,length:o.length},l=e.map(i,function(t,i){return e("string"==typeof t?t:d.renderItem({group:s,item:a(t,{index:i})}))}),typeof t==L&&(t=o.length),c=0;c<l.length;c++)0===o.length||0===t?r.append(l[c]):l[c].insertAfter(o[t-1]);d._angularCompileElements(l,i),d.dataItem(n)&&(d.dataItem(n).hasChildren=!0,d.updateArrow(n))},_updateItems:function(t,i){var n,o,s,l,c,d,u=this,h={panelBar:u.options,item:l,group:{}},p="expanded"!=i;if("selected"==i)t[0][i]?(c=u.findByUid(t[0].uid),c.hasClass(U)||u.select(c,!0)):u.clearSelection();else{for(d=e.map(t,function(e){return u.findByUid(e.uid)}),p&&u.angular("cleanup",function(){return{elements:d}}),n=0;n<t.length;n++)h.item=l=t[n],h.panelBar=u,s=d[n],o=s.parent(),p&&(h.group={firstLevel:o.hasClass("k-panelbar"),expanded:s.parent().hasClass(H),length:s.children().length},s.children(".k-link").remove(),s.prepend(u.templates.itemWrapper(a(h,{arrow:l.hasChildren||l.content||l.contentUrl?u.templates.arrow:u.templates.empty},se)))),"expanded"==i?u._toggleItem(s,!l[i],!l[i]||"true"):"enabled"==i&&(u.enable(s,l[i]),l[i]||l.selected&&l.set("selected",!1)),s.length&&this.trigger("itemChange",{item:s,data:l,ns:r});p&&u.angular("compile",function(){return{elements:d,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_toggleDisabled:function(e,t){e=this.element.find(e),e.toggleClass(X,t).toggleClass(U,!t).attr(Z,!t)},dataItem:function(t){var i=e(t).closest(k).attr(o.attr("uid")),n=this.dataSource;return n&&n.getByUid(i)},select:function(i,n){var o=this;return i===t?o.element.find(Q).parent():(i=o.element.find(i),i.length?i.each(function(){var i=e(this),r=i.children(w);return i.hasClass(U)?o:(o._updateSelected(r,n),t)}):this._updateSelected(i),o)},clearSelection:function(){this.select(e())},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.length?t.find(N):null);return c(n.items,function(){n.group.append(this),i(this)}),this.updateArrow(t),i(n.group.find(".k-first, .k-last")),n.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return c(n.items,function(){t.before(this),i(this)}),i(t),n.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return c(n.items,function(){t.after(this),i(this)}),i(t),n.group.height("auto"),this},remove:function(e){e=this.element.find(e);var t=this,n=e.parentsUntil(t.element,k),o=e.parent("ul");return e.remove(),!o||o.hasClass("k-panelbar")||o.children(k).length||o.remove(),n.length&&(n=n.eq(0),t.updateArrow(n),i(n)),t},reload:function(t){var i=this;t=i.element.find(t),t.each(function(){var t=e(this);i._ajaxRequest(t,t.children("."+I),!t.is(ie))})},_first:function(){return this.element.children($).first()},_last:function(){var e=this.element.children($).last(),t=e.children(C);return t[0]?t.children($).last():e},_current:function(i){var n=this,o=n._focused,r=n._itemId;return i===t?o:(n.element.removeAttr("aria-activedescendant"),o&&o.length&&(o[0].id===r&&o.removeAttr("id"),o.children(w).removeClass(W)),e(i).length&&(r=i[0].id||r,i.attr("id",r).children(w).addClass(W),n.element.attr("aria-activedescendant",r)),n._focused=i,t)},_keydown:function(e){var t=this,i=e.keyCode,n=t._current();e.target==e.currentTarget&&(i==s.DOWN||i==s.RIGHT?(t._current(t._nextItem(n)),e.preventDefault()):i==s.UP||i==s.LEFT?(t._current(t._prevItem(n)),e.preventDefault()):i==s.ENTER||i==s.SPACEBAR?(t._click(n.children(w)),e.preventDefault()):i==s.HOME?(t._current(t._first()),e.preventDefault()):i==s.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(C),i=e.nextAll(":visible").first();return t[0]&&(i=t.children("."+T)),i[0]||(i=e.parent(C).parent(k).next()),i[0]||(i=this._first()),i.hasClass(U)&&(i=this._nextItem(i)),i},_prevItem:function(e){if(!e)return this._last();var t,i=e.prevAll(":visible").first();if(i[0])for(t=i;t[0];)t=t.children(C).children("."+_),t[0]&&(i=t);else i=e.parent(C).parent(k),i[0]||(i=this._last());return i.hasClass(U)&&(i=this._prevItem(i)),i},_insert:function(t,i,n){var o,r,s,l=this,c=e.isPlainObject(t),d=i&&i[0];return d||(n=l.element),r={firstLevel:n.hasClass("k-panelbar"),expanded:e(i).hasClass(H),length:n.children().length},d&&!n.length&&(n=e(l.renderGroup({group:r,options:l.options})).appendTo(i)),c||e.isArray(t)||t instanceof p?(t instanceof p&&(t=t.data()),o=e.map(c?[t]:t,function(t,i){return e("string"==typeof t?t:l.renderItem({group:r,item:a(t,{index:i})}))}),d&&(s=l.dataItem(i),s?(s.hasChildren=!0,i.attr(J,s.expanded).not("."+H).children("ul").attr(ee,!s.expanded)):i.attr(J,!1))):(o="string"==typeof t&&"<"!=t.charAt(0)?l.element.find(t):e(t),l._updateItemsClasses(o)),t.length||(t=[t]),l._angularCompileElements(o,t),{items:o,group:n}},_toggleHover:function(t){var i=e(t.currentTarget);i.parents("li."+U).length||i.toggleClass("k-state-hover",t.type==P)},_updateClasses:function(){var t,n,o,r,s,a=this;t=a.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),r=t.parent(),s=a.dataItem(r),o=s&&s.expanded||!1,t.parent().attr(J,o).not("."+H).children("ul").attr(ee,!o).hide(),n=a.element.add(t).children(),a._updateItemsClasses(n),a.updateArrow(n),i(n)},_updateItemsClasses:function(e){for(var t=e.length,i=0;i<t;i++)this._updateItemClasses(e[i],i)},_updateItemClasses:function(t,i){var n,r,s=this._selected,a=this.options.contentUrls,l=a&&a[i],c=this.element[0];t=e(t).addClass("k-item").attr("role","menuitem"),o.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(g).addClass(S),r=t.children("a").addClass(b),r[0]&&(r.attr("href",l),r.children(g).addClass(S)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(Z,!0).removeAttr("disabled"),t.children("div").addClass(I).attr("role","region").attr(ee,!0).hide().parent().attr(J,!1),r=t.children(j),r[0]&&(s&&s.removeAttr(te).children(j).removeClass(q),r.addClass(q),this._selected=t.attr(te,!0)),t.children(w)[0]||(n="<span class='"+b+"'/>",a&&a[i]&&t[0].parentNode==c&&(n='<a class="k-link k-header" href="'+a[i]+'"/>'),t.contents().filter(function(){return!(this.nodeName.match(f)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(n)),t.parent(".k-panelbar")[0]&&t.children(w).addClass("k-header")},_click:function(e){var t,i,n,o,r,s,a,l,c,d=this,u=d.element;if(!e.parents("li."+U).length&&e.closest(".k-widget")[0]==u[0]){if(r=e.closest(w),s=r.closest(k),d._updateSelected(r),a=s.children(".k-group,.k-content"),l=this.dataItem(s),!a.length&&(d.options.loadOnDemand&&l&&l.hasChildren||this._hasChildItems(s)||s.content||s.contentUrl)&&(a=d._addGroupElement(s)),i=s.find(N).add(s.find(O)),n=r.attr(v),o=n&&("#"==n.charAt(n.length-1)||n.indexOf("#"+d.element[0].id+"-")!=-1),t=!(!o&&!i.length),i.data("animating"))return t;if(d._triggerEvent(E,s)&&(t=!0),t!==!1)return d.options.expandMode==oe&&d._collapseAllExpanded(s)?t:(i.length&&(c=i.is(ie),d._triggerEvent(c?R:A,s)||(t=d._toggleItem(s,c))),t)}},_hasChildItems:function(e){return e.items&&e.items.length>0||e.hasChildren},_toggleItem:function(e,i,n){var o,r,s=this,a=e.find(N),l=e.find(w),c=l.attr(v),d=s.dataItem(e),u=!i,h=d&&d.loaded();return d&&!n&&d.expanded!==u?(d.set("expanded",u),o=d.hasChildren||!!d.content||!!d.contentUrl):(!d||n&&"true"!==n||h||d.content||d.contentUrl?a.length?(this._toggleGroup(a,i),o=!0):(r=e.children("."+I),r.length&&(o=!0,r.is(ne)&&c!==t?s._ajaxRequest(e,r,i):s._toggleGroup(r,i))):(s.options.loadOnDemand&&this._progress(e,!0),e.children(".k-group,.k-content").remove(),o=d.hasChildren,d.load()),o)},_toggleGroup:function(e,i){var n=this,o=n.options.animation,r=o.expand,s=o.collapse&&"effects"in o.collapse,l=a({},o.expand,o.collapse);return s||(l=a(l,{reverse:!0})),e.is(ie)!=i?(n._animating=!1,t):(e.attr(ee,!!i),e.parent().attr(J,!i).toggleClass(H,!i).find("> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand").toggleClass("k-i-arrow-60-up",!i).toggleClass("k-panelbar-collapse",!i).toggleClass("k-i-arrow-60-down",i).toggleClass("k-panelbar-expand",i),i?(r=a(l,{hide:!0}),r.complete=function(){n._animationCallback()}):r=a({complete:function(e){n._triggerEvent(M,e.closest(k)),n._animationCallback()}},r),e.kendoStop(!0,!0).kendoAnimate(r),t)},_animationCallback:function(){var e=this;e.trigger("complete"),e._animating=!1},_addGroupElement:function(t){var i=e('<ul role="group" aria-hidden="true" class="k-group k-panel" style="display:none"></ul>');return t.append(i),i},_collapseAllExpanded:function(t){var i,n=this,o=!1,r=t.find(N).add(t.find(O));return r.is(ie)&&(o=!0),r.is(ie)||0===r.length||(i=t.siblings(),i.find(N).add(i.find(O)).filter(function(){return e(this).is(ie)}).each(function(t,i){i=e(i),o=n._triggerEvent(R,i.closest(k)),o||n._toggleGroup(i,!0)}),n.one("complete",function(){setTimeout(function(){i.each(function(e,t){var i=n.dataItem(t);i&&i.set("expanded",!1)})})})),o},_ajaxRequest:function(t,i,n){var o=this,r=t.find(".k-panelbar-collapse, .k-panelbar-expand"),s=t.find(w),a=setTimeout(function(){r.addClass("k-i-loading")},100),l={},c=s.attr(v);e.ajax({type:"GET",cache:!1,url:c,dataType:"html",data:l,error:function(e,t){r.removeClass("k-i-loading"),o.trigger(y,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(a),r.removeClass("k-i-loading")},success:function(e){function r(){return{elements:i.get()}}try{o.angular("cleanup",r),i.html(e),o.angular("compile",r)}catch(s){var a=window.console;a&&a.error&&a.error(s.name+": "+s.message+" in "+c),this.error(this.xhr,"error")}o._toggleGroup(i,n),o.trigger(B,{item:t[0],contentElement:i[0]})}})},_triggerEvent:function(e,t){var i=this;return i.trigger(e,{item:t[0]})},_updateSelected:function(e,t){var i=this,n=i.element,o=e.parent(k),r=i._selected,s=i.dataItem(o);r&&r.removeAttr(te),i._selected=o.attr(te,!0),n.find(Q).removeClass(q),n.find("> ."+G+", .k-panel > ."+G).removeClass(G),e.addClass(q),e.parentsUntil(n,k).filter(":has(.k-header)").addClass(G),i._current(o[0]?o:null),s&&s.set("selected",!0),t||i.trigger(D)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(e){var t,i,n=this;return e=a({panelBar:n,group:{}},e),t=n.templates.empty,i=e.item,n.templates.item(a(e,{itemWrapper:n.templates.itemWrapper,renderContent:n.renderContent,arrow:n._hasChildItems(i)||i.content||i.contentUrl?n.templates.arrow:t,subGroup:!e.loadOnDemand||i.expanded?n.renderGroup:t},se))},renderGroup:function(e){var t=this,i=t.templates||e.panelBar.templates;return i.group(a({renderItems:function(e){for(var t="",i=0,n=e.items,o=n?n.length:0,r=a({length:o},e.group);i<o;i++)t+=e.panelBar.renderItem(a(e,{group:r,item:a({index:i},n[i])}));return t}},e,se))},renderContent:function(e){return e.panelBar.templates.content(a(e,se))}});o.ui.plugin(le)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.responsivepanel.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=e.proxy,n=".kendoResponsivePanel",o="open",r="close",s="click"+n+" touchstart"+n,a=kendo.ui.Widget,l=a.extend({init:function(t,o){a.fn.init.call(this,t,o),this._guid="_"+kendo.guid(),this._toggleHandler=i(this._toggleButtonClick,this),this._closeHandler=i(this._close,this),e(document.documentElement).on(s,this.options.toggleButton,this._toggleHandler),this._registerBreakpoint(),this.element.addClass("k-rpanel k-rpanel-"+this.options.orientation+" "+this._guid),this._resizeHandler=i(this.resize,this,!0),e(window).on("resize"+n,this._resizeHandler)},_mediaQuery:"@media (max-width: #= breakpoint-1 #px) {.#= guid #.k-rpanel-animate.k-rpanel-left,.#= guid #.k-rpanel-animate.k-rpanel-right {-webkit-transition: -webkit-transform .2s ease-out;-ms-transition: -ms-transform .2s ease-out;transition: transform .2s ease-out;} .#= guid #.k-rpanel-top {overflow: hidden;}.#= guid #.k-rpanel-animate.k-rpanel-top {-webkit-transition: max-height .2s linear;-ms-transition: max-height .2s linear;transition: max-height .2s linear;}} @media (min-width: #= breakpoint #px) {#= toggleButton # { display: none; } .#= guid #.k-rpanel-left { float: left; } .#= guid #.k-rpanel-right { float: right; } .#= guid #.k-rpanel-left, .#= guid #.k-rpanel-right {position: relative;-webkit-transform: translateX(0);-ms-transform: translateX(0);transform: translateX(0);-webkit-transform: translateX(0) translateZ(0);-ms-transform: translateX(0) translateZ(0);transform: translateX(0) translateZ(0);} .k-ie9 .#= guid #.k-rpanel-left { left: 0; } .#= guid #.k-rpanel-top { max-height: none; }}",_registerBreakpoint:function(){var e=this.options;this._registerStyle(kendo.template(this._mediaQuery)({breakpoint:e.breakpoint,toggleButton:e.toggleButton,guid:this._guid}))},_registerStyle:function(t){var i=e("head,body")[0],n=document.createElement("style");i.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))},options:{name:"ResponsivePanel",orientation:"left",toggleButton:".k-rpanel-toggle",breakpoint:640,autoClose:!0},events:[o,r],_resize:function(){this.element.removeClass("k-rpanel-animate k-rpanel-expanded"),e(document.documentElement).off(s,this._closeHandler)},_toggleButtonClick:function(e){e.preventDefault(),this.element.hasClass("k-rpanel-expanded")?this.close():this.open()},open:function(){this.trigger(o)||(this.element.addClass("k-rpanel-animate k-rpanel-expanded"),this.options.autoClose&&e(document.documentElement).on(s,this._closeHandler))},close:function(){this.trigger(r)||(this.element.addClass("k-rpanel-animate").removeClass("k-rpanel-expanded"),e(document.documentElement).off(s,this._closeHandler))},_close:function(t){var i=t.isDefaultPrevented(),n=e(t.target).closest(this.options.toggleButton+",.k-rpanel");n.length||i||this.close()},destroy:function(){a.fn.destroy.call(this),e(window).off("resize"+n,this._resizeHandler),e(document.documentElement).off(s,this._closeHandler)}});kendo.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.timepicker.min",["kendo.popup.min","kendo.dateinput.min"],e)}(function(){return function(e,t){function i(e,t,i){var n,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),i||(n=e.getTimezoneOffset()-o,e.setTime(e.getTime()+n*P))}function n(){var e=new $,t=new $(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),i=new $(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-i.getTimezoneOffset())}function o(e){return 60*e.getHours()*P+e.getMinutes()*P+1e3*e.getSeconds()+e.getMilliseconds()}function r(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function s(e,t,i){var n,r=o(t),s=o(i);return!e||r==s||(n=o(e),r>n&&(n+=z),s<r&&(s+=z),n>=r&&n<=s)}function a(e){var t=e.parseFormats;e.format=m(e.format||u.getCulture(e.culture).calendars.standard.patterns.t),t=q(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function l(e){e.preventDefault()}var c,d,u=window.kendo,h=u.keys,p=u.parseDate,f=u._activeElement,m=u._extractFormat,g=u.support,v=g.browser,_=u.ui,b=_.Widget,w="open",y="close",k="change",x=".kendoTimePicker",C="click"+x,S="k-state-default",T="disabled",D="readonly",A="li",E="<span/>",I="k-state-focused",M="k-state-hover",R="mouseenter"+x+" mouseleave"+x,F="mousedown"+x,P=6e4,z=864e5,B="k-state-selected",L="k-state-disabled",H="aria-selected",N="aria-expanded",O="aria-hidden",V="aria-disabled",W="aria-activedescendant",U="id",q=e.isArray,j=e.extend,G=e.proxy,$=Date,K=new $;K=new $(K.getFullYear(),K.getMonth(),K.getDate(),0,0,0),c=function(t){var i=this,n=t.id;i.options=t,i._dates=[],i.ul=e('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({overflow:g.kineticScrollNeeded?"":"auto"}).on(C,A,G(i._click,i)).on("mouseenter"+x,A,function(){e(this).addClass(M)}).on("mouseleave"+x,A,function(){e(this).removeClass(M)}),i.list=e("<div class='k-list-container k-list-scroller' unselectable='on'/>").append(i.ul).on(F,l),n&&(i._timeViewID=n+"_timeview",i._optionID=n+"_option_selected",i.ul.attr(U,i._timeViewID)),i._popup(),i._heightHandler=G(i._height,i),i.template=u.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>',{useWithBlock:!1})},c.prototype={current:function(i){var n=this,o=n.options.active;return i===t?n._current:(n._current&&n._current.removeClass(B).removeAttr(H).removeAttr(U),i&&(i=e(i).addClass(B).attr(U,n._optionID).attr(H,!0),n.scroll(i[0])),n._current=i,o&&o(i),t)},close:function(){this.popup.close()},destroy:function(){var e=this;e.ul.off(x),e.list.off(x),e.popup.destroy()},open:function(){var e,t=this;t.ul[0].firstChild||t.bind(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout(function(){t.popup._hovered=e},1),t._current&&t.scroll(t._current[0])},dataBind:function(e){for(var t,i=this,n=i.options,o=n.format,r=u.toString,a=i.template,l=e.length,c=0,d="";c<l;c++)t=e[c],s(t,n.min,n.max)&&(d+=a(r(t,o,n.culture)));i._html(d)},refresh:function(){var e,t,s,a=this,l=a.options,c=l.format,d=n(),h=d<0,p=l.min,f=l.max,m=o(p),g=o(f),v=o(r(l.interval)),_=l.interval*P,b=u.toString,w=a.template,y=new $((+p)),k=new $(y),x=0,C="";for(s=h?(z+d*P)/_:z/_,m==g&&v!==g||(m>g&&(g+=z),s=(g-m)/_+1),t=parseInt(s,10);x<s;x++)x&&i(y,_,h),g&&t==x&&(e=o(y),k<y&&(e+=z),e>g&&(y=new $((+f)))),a._dates.push(o(y)),C+=w(b(y,c,l.culture));a._html(C)},bind:function(){var e=this,t=e.options.dates;t&&t[0]?e.dataBind(t):e.refresh()},_html:function(e){var t=this;t.ul[0].innerHTML=e,t.popup.unbind(w,t._heightHandler),t.popup.one(w,t._heightHandler),t.current(null),t.select(t._value)},scroll:function(e){if(e){var t=this.list[0],i=e.offsetTop,n=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=i+n;o>i?o=i:s>o+r&&(o=s-r),t.scrollTop=o}},select:function(t){var i,n=this,o=n.options,r=n._current;t instanceof Date&&(t=u.toString(t,o.format,o.culture)),"string"==typeof t&&(r&&r.text()===t?t=r:(t=e.grep(n.ul[0].childNodes,function(e){return(e.textContent||e.innerText)==t}),t=t[0]?t:null)),i=n._distinctSelection(t),n.current(i)},_distinctSelection:function(t){var i,n,r=this;return t&&t.length>1&&(i=o(r._value),n=e.inArray(i,r._dates),t=r.ul.children()[n]),t},setOptions:function(e){var t=this.options;e.min=p(e.min),e.max=p(e.max),this.options=j(t,e,{active:t.active,change:t.change,close:t.close,open:t.open}),this.bind()},toggle:function(){var e=this;e.popup.visible()?e.close():e.open()},value:function(e){var t=this;t._value=e,t.ul[0].firstChild&&t.select(e)},_click:function(t){var i=this,n=e(t.currentTarget),o=n.text(),r=i.options.dates;r&&r.length>0&&(o=r[n.index()]),t.isDefaultPrevented()||(i.select(n),i.options.change(o,!0),i.close())},_height:function(){var e=this,t=e.list,i=t.parent(".k-animation-container"),n=e.options.height;e.ul[0].children.length&&t.add(i).show().height(e.ul[0].scrollHeight>n?n:"auto").hide()},_parse:function(e){var t=this,i=t.options,n=o(i.min)!=o(K)?i.min:null,r=o(i.max)!=o(K)?i.max:null,s=t._value||n||r||K;return e instanceof $?e:(e=p(e,i.parseFormats,i.culture),e&&(e=new $(s.getFullYear(),s.getMonth(),s.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),e)},_adjustListWidth:function(){var e,t,i=this.list,n=i[0].style.width,o=this.options.anchor,r=u._outerWidth;!i.data("width")&&n||(e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=e?parseFloat(e.width):r(o),e&&(v.mozilla||v.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),n=t-(r(i)-i.width()),i.css({fontFamily:o.css("font-family"),width:n}).data("width",n))},_popup:function(){var e=this,t=e.list,i=e.options,n=i.anchor;e.popup=new _.Popup(t,j(i.popup,{anchor:n,open:i.open,close:i.close,animation:i.animation,isRtl:g.isRtl(i.anchor)}))},move:function(e){var i=this,n=e.keyCode,o=i.ul[0],r=i._current,s=n===h.DOWN;if(n===h.UP||s){if(e.altKey)return i.toggle(s),t;r=s?r?r[0].nextSibling:o.firstChild:r?r[0].previousSibling:o.lastChild,r&&i.select(r),i.options.change(i._current.text()),e.preventDefault()}else n!==h.ENTER&&n!==h.TAB&&n!==h.ESC||(e.preventDefault(),r&&i.options.change(r.text(),!0),i.close())}},c.getMilliseconds=o,u.TimeView=c,d=b.extend({init:function(t,i){var n,r,s,l,d,h,f=this;b.fn.init.call(f,t,i),t=f.element,i=f.options,i.min=p(t.attr("min"))||p(i.min),i.max=p(t.attr("max"))||p(i.max),a(i),f._initialOptions=j({},i),f._wrapper(),f.timeView=r=new c(j({},i,{id:t.attr(U),anchor:f.wrapper,format:i.format,change:function(e,i){i?f._change(e):t.val(e)},open:function(e){f.timeView._adjustListWidth(),f.trigger(w)?e.preventDefault():(t.attr(N,!0),n.attr(O,!1))},close:function(e){f.trigger(y)?e.preventDefault():(t.attr(N,!1),n.attr(O,!0))},active:function(e){t.removeAttr(W),e&&t.attr(W,r._optionID)}})),n=r.ul,f._icon(),f._reset();try{t[0].setAttribute("type","text")}catch(m){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":r._timeViewID,autocomplete:"off"}),s=t.is("[disabled]")||e(f.element).parents("fieldset").is(":disabled"),s?f.enable(!1):f.readonly(t.is("[readonly]")),i.dateInput&&(l=i.min,d=i.max,h=new $,o(l)==o(d)&&(l=new $(h.getFullYear(),h.getMonth(),h.getDate(),0,0,0),d=new $(h.getFullYear(),h.getMonth(),h.getDate(),24,0,0)),f._dateInput=new _.DateInput(t,{culture:i.culture,format:i.format,min:l,max:d,value:i.value})),f._old=f._update(i.value||f.element.val()),f._oldText=t.val(),u.notify(f)},options:{name:"TimePicker",min:K,max:K,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{},dateInput:!1},events:[w,y,k],setOptions:function(e){var t=this,i=t._value;b.fn.setOptions.call(t,e),e=t.options,a(e),t.timeView.setOptions(e),i&&t.element.val(u.toString(i,e.format,e.culture))},dataBind:function(e){q(e)&&this.timeView.dataBind(e)},_editable:function(e){var t=this,i=e.disable,n=e.readonly,o=t._arrow.off(x),r=t.element.off(x),s=t._inputWrapper.off(x);n||i?(s.addClass(i?L:S).removeClass(i?S:L),r.attr(T,i).attr(D,n).attr(V,i)):(s.addClass(S).removeClass(L).on(R,t._toggleHover),r.removeAttr(T).removeAttr(D).attr(V,!1).on("keydown"+x,G(t._keydown,t)).on("focusout"+x,G(t._blur,t)).on("focus"+x,function(){t._inputWrapper.addClass(I)}),o.on(C,G(t._click,t)).on(F,l))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;b.fn.destroy.call(e),e.timeView.destroy(),e.element.off(x),e._arrow.off(x),e._inputWrapper.off(x),e._form&&e._form.off("reset",e._resetHandler)},close:function(){this.timeView.close()},open:function(){this.timeView.open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},value:function(e){var i=this;return e===t?i._value:(i._old=i._update(e),null===i._old&&i.element.val(""),i._oldText=i.element.val(),t)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(I)},_click:function(){var e=this,t=e.element;e.timeView.toggle(),g.touch||t[0]===f()||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(k),t.trigger(k)),t._typing=!1},_icon:function(){var t,i=this,n=i.element;t=n.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-clock"></span></span>').insertAfter(n)),i._arrow=t.attr({role:"button","aria-controls":i.timeView._timeViewID})},_keydown:function(e){var t=this,i=e.keyCode,n=t.timeView,o=t.element.val();n.popup.visible()||e.altKey?(n.move(e),t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation()):i===h.ENTER&&o!==t._oldText?t._change(o):t._typing=!0},_option:function(e,i){var n=this,o=n.options;return i===t?o[e]:(i=n.timeView._parse(i),i&&(i=new $((+i)),o[e]=i,n.timeView.options[e]=i,n.timeView.bind()),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(M,"mouseenter"===t.type)},_update:function(e){var t=this,i=t.options,n=t.timeView,o=n._parse(e);return s(o,i.min,i.max)||(o=null),t._value=o,t._dateInput&&o?t._dateInput.value(o||e):t.element.val(u.toString(o||e,i.format,i.culture)),n.value(o),o},_wrapper:function(){var t,i=this,n=i.element;t=n.parents(".k-timepicker"),t[0]||(t=n.wrap(E).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(E).parent()),t[0].style.cssText=n[0].style.cssText,i.wrapper=t.addClass("k-widget k-timepicker k-header").addClass(n[0].className),n.css({width:"100%",height:n[0].style.height}),i._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){t.value(i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))}}),_.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.datetimepicker.min",["kendo.datepicker.min","kendo.timepicker.min"],e)}(function(){return function(e,t){function i(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function n(e){e.preventDefault()}function o(t){var i,n=r.getCulture(t.culture).calendars.standard.patterns,o=!t.parseFormats.length;t.format=d(t.format||n.g),t.timeFormat=i=d(t.timeFormat||n.t),r.DateView.normalize(t),o&&t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"),e.inArray(i,t.parseFormats)===-1&&t.parseFormats.push(i)}var r=window.kendo,s=r.TimeView,a=r.parseDate,l=r.support,c=r._activeElement,d=r._extractFormat,u=r.calendar,h=u.isInRange,p=u.restrictValue,f=u.isEqualDatePart,m=s.getMilliseconds,g=r.ui,v=g.Widget,_="open",b="close",w="change",y=".kendoDateTimePicker",k="click"+y,x=l.mouseAndTouchPresent?r.applyEventMap("up",y.slice(1)):k,C="disabled",S="readonly",T="k-state-default",D="k-state-focused",A="k-state-hover",E="k-state-disabled",I="mouseenter"+y+" mouseleave"+y,M="mousedown"+y,R="month",F="<span/>",P="aria-activedescendant",z="aria-expanded",B="aria-hidden",L="aria-owns",H="aria-disabled",N=Date,O=new N(1800,0,1),V=new N(2099,11,31),W={view:"date"},U={view:"time"},q=e.extend,j=v.extend({init:function(t,i){var n,s=this;v.fn.init.call(s,t,i),t=s.element,i=s.options,i.disableDates=r.calendar.disabled(i.disableDates),i.min=a(t.attr("min"))||a(i.min),i.max=a(t.attr("max"))||a(i.max),o(i),s._initialOptions=q({},i),s._wrapper(),s._views(),s._icons(),s._reset(),s._template();try{t[0].setAttribute("type","text")}catch(l){t[0].type="text";
}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,autocomplete:"off"}),s._midnight=s._calculateMidnight(i.min,i.max),n=t.is("[disabled]")||e(s.element).parents("fieldset").is(":disabled"),n?s.enable(!1):s.readonly(t.is("[readonly]")),s._createDateInput(i),s._old=s._update(i.value||s.element.val()),s._oldText=t.val(),r.notify(s)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],disableDates:null,min:new N(O),max:new N(V),interval:30,height:200,footer:"",start:R,depth:R,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "d")#',dateButtonText:"Open the date view",timeButtonText:"Open the time view",dateInput:!1,weekNumber:!1},events:[_,b,w],setOptions:function(e){var t,i,n,s=this,l=s._value;v.fn.setOptions.call(s,e),e=s.options,e.min=t=a(e.min),e.max=i=a(e.max),o(e),s._midnight=s._calculateMidnight(e.min,e.max),n=e.value||s._value||s.dateView._current,t&&!f(t,n)&&(t=new N(O)),i&&!f(i,n)&&(i=new N(V)),s.dateView.setOptions(e),s.timeView.setOptions(q({},e,{format:e.timeFormat,min:t,max:i})),s._createDateInput(e),s._dateInput||s.element.val(r.toString(l,e.format,e.culture)),l&&s._updateARIA(l)},_editable:function(t){var i=this,o=i.element.off(y),r=i._dateIcon.off(y),s=i._timeIcon.off(y),a=i._inputWrapper.off(y),l=t.readonly,c=t.disable;l||c?(a.addClass(c?E:T).removeClass(c?T:E),o.attr(C,c).attr(S,l).attr(H,c)):(a.addClass(T).removeClass(E).on(I,i._toggleHover),o.removeAttr(C).removeAttr(S).attr(H,!1).on("keydown"+y,e.proxy(i._keydown,i)).on("focus"+y,function(){i._inputWrapper.addClass(D)}).on("focusout"+y,function(){i._inputWrapper.removeClass(D),o.val()!==i._oldText&&i._change(o.val()),i.close("date"),i.close("time")}),r.on(M,n).on(x,function(e){i.toggle("date"),i._focusElement(e.type)}),s.on(M,n).on(x,function(e){i.toggle("time"),i._focusElement(e.type)}))},_focusElement:function(e){var t=this.element;l.touch&&(!l.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===c()||t.focus()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;v.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.element.off(y),e._dateIcon.off(y),e._timeIcon.off(y),e._inputWrapper.off(y),e._form&&e._form.off("reset",e._resetHandler)},close:function(e){"time"!==e&&(e="date"),this[e+"View"].close()},open:function(e){"time"!==e&&(e="date"),this[e+"View"].open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},toggle:function(e){var t="timeView";"time"!==e?e="date":t="dateView",this[e+"View"].toggle(),this[t].close()},value:function(e){var i=this;return e===t?i._value:(i._old=i._update(e),null===i._old&&i.element.val(""),i._oldText=i.element.val(),t)},_change:function(e){var t,i,n,o=this,r=o.element.val();e=o._update(e),t=+o._old!=+e,i=t&&!o._typing,n=r!==o.element.val(),(i||n)&&o.element.trigger(w),t&&(o._old=e,o._oldText=o.element.val(),o.trigger(w)),o._typing=!1},_option:function(e,n){var o,r,s=this,l=s.options,c=s.timeView,d=c.options,u=s._value||s._old;if(n===t)return l[e];if(n=a(n,l.parseFormats,l.culture)){if(l.min.getTime()===l.max.getTime()&&(d.dates=[]),l[e]=new N(n.getTime()),s.dateView[e](n),s._midnight=s._calculateMidnight(l.min,l.max),u&&(o=f(l.min,u),r=f(l.max,u)),o||r){if(d[e]=n,o&&!r&&(d.max=i(l.interval)),r){if(s._midnight)return c.dataBind([V]),t;o||(d.min=O)}}else d.max=V,d.min=O;c.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(A,"mouseenter"===t.type)},_update:function(t){var n,o,s,l,c,d=this,u=d.options,m=u.min,g=u.max,v=u.dates,_=d.timeView,b=d._value,y=a(t,u.parseFormats,u.culture),k=null===y&&null===b||y instanceof Date&&b instanceof Date;return u.disableDates&&u.disableDates(y)&&(y=null,d._old||d.element.val()||(t=null)),+y===+b&&k?(c=r.toString(y,u.format,u.culture),c!==t&&(d.element.val(null===y?t:c),t instanceof String&&d.element.trigger(w)),y):(null!==y&&f(y,m)?y=p(y,m,g):h(y,m,g)||(y=null),d._value=y,_.value(y),d.dateView.value(y),y&&(s=d._old,o=_.options,v[0]&&(v=e.grep(v,function(e){return f(y,e)}),v[0]&&(_.dataBind(v),l=!0)),l||(f(y,m)&&(o.min=m,o.max=i(u.interval),n=!0),f(y,g)&&(d._midnight?(_.dataBind([V]),l=!0):(o.max=g,n||(o.min=O),n=!0))),!l&&(!s&&n||s&&!f(s,y))&&(n||(o.max=V,o.min=O),_.bind())),d._dateInput&&y?d._dateInput.value(y||t):d.element.val(r.toString(y||t,u.format,u.culture)),d._updateARIA(y),y)},_keydown:function(e){var t=this,i=t.dateView,n=t.timeView,o=t.element.val(),s=i.popup.visible(),a=t._dateInput&&e.stopImmediatePropagation;e.altKey&&e.keyCode===r.keys.DOWN?t.toggle(s?"time":"date"):s?(i.move(e),t._updateARIA(i._current)):n.popup.visible()?n.move(e):e.keyCode===r.keys.ENTER&&o!==t._oldText?t._change(o):(t._typing=!0,a=!1),a&&e.stopImmediatePropagation()},_views:function(){var e,t,i,n,o,l,c=this,d=c.element,u=c.options,p=d.attr("id");c.dateView=e=new r.DateView(q({},u,{id:p,anchor:c.wrapper,change:function(){var t,i,n=e.calendar.value(),o=+n,s=+u.min,a=+u.max;o!==s&&o!==a||(t=o===s?s:a,t=new N(c._value||t),t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),h(t,s,a)&&(n=t)),c._value&&(i=r.date.setHours(new Date(n),c._value),h(i,s,a)&&(n=i)),c._change(n),c.close("date")},close:function(e){c.trigger(b,W)?e.preventDefault():(d.attr(z,!1),i.attr(B,!0),t.popup.visible()||d.removeAttr(L))},open:function(t){c.trigger(_,W)?t.preventDefault():(d.val()!==c._oldText&&(l=a(d.val(),u.parseFormats,u.culture),c.dateView[l?"current":"value"](l)),i.attr(B,!1),d.attr(z,!0).attr(L,e._dateViewID),c._updateARIA(l))}})),i=e.div,o=u.min.getTime(),c.timeView=t=new s({id:p,value:u.value,anchor:c.wrapper,animation:u.animation,format:u.timeFormat,culture:u.culture,height:u.height,interval:u.interval,min:new N(O),max:new N(V),dates:o===u.max.getTime()?[new Date(o)]:[],parseFormats:u.parseFormats,change:function(i,n){i=t._parse(i),i<u.min?(i=new N((+u.min)),t.options.min=i):i>u.max&&(i=new N((+u.max)),t.options.max=i),n?(c._timeSelected=!0,c._change(i)):(d.val(r.toString(i,u.format,u.culture)),e.value(i),c._updateARIA(i))},close:function(t){c.trigger(b,U)?t.preventDefault():(n.attr(B,!0),d.attr(z,!1),e.popup.visible()||d.removeAttr(L))},open:function(e){t._adjustListWidth(),c.trigger(_,U)?e.preventDefault():(d.val()!==c._oldText&&(l=a(d.val(),u.parseFormats,u.culture),c.timeView.value(l)),n.attr(B,!1),d.attr(z,!0).attr(L,t._timeViewID),t.options.active(t.current()))},active:function(e){d.removeAttr(P),e&&d.attr(P,t._optionID)}}),n=t.ul},_icons:function(){var t=this,i=t.element,n=t.options,o=i.next("span.k-select");o[0]||(o=e('<span unselectable="on" class="k-select"><span class="k-link k-link-date" aria-label="'+n.dateButtonText+'"><span unselectable="on" class="k-icon k-i-calendar"></span></span><span class="k-link k-link-time" aria-label="'+n.timeButtonText+'"><span unselectable="on" class="k-icon k-i-clock"></span></span></span>').insertAfter(i)),o=o.children(),o=o.children(),t._dateIcon=o.eq(0).attr("aria-controls",t.dateView._dateViewID),t._timeIcon=o.eq(1).attr("aria-controls",t.timeView._timeViewID)},_wrapper:function(){var t,i=this,n=i.element;t=n.parents(".k-datetimepicker"),t[0]||(t=n.wrap(F).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(F).parent()),t[0].style.cssText=n[0].style.cssText,n.css({width:"100%",height:n[0].style.height}),i.wrapper=t.addClass("k-widget k-datetimepicker k-header").addClass(n[0].className),i._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,i=t.element,n=i.attr("form"),o=n?e("#"+n):i.closest("form");o[0]&&(t._resetHandler=function(){t.value(i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=r.template(this.options.ARIATemplate)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new g.DateInput(this.element,{culture:e.culture,format:e.format,min:e.min,max:e.max}))},_calculateMidnight:function(e,t){return m(e)+m(t)===0},_updateARIA:function(e){var t,i=this,n=i.dateView.calendar;i.element.removeAttr(P),n&&(t=n._cell,t.attr("aria-label",i._ariaTemplate({current:e||n.current()})),i.element.attr(P,t.attr("id")))}});g.plugin(j)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.splitter.min",["kendo.resizable.min"],e)}(function(){return function(e,t){function i(e){return v.test(e)}function n(e){return g.test(e)||/^\d+$/.test(e)}function o(e){return!i(e)&&!n(e)}function r(e,t){var n=parseInt(e,10);return i(e)&&(n=Math.floor(n*t/100)),n}function s(e,i){return function(n,o){var r,s=this.element.find(n).data(E);return 1==arguments.length?s[e]:(s[e]=o,i&&(r=this.element.data("kendo"+this.options.name),r.resize(!0)),t)}}function a(e){var t=this,i=e.orientation;t.owner=e,t._element=e.element,t.orientation=i,p(t,i===S?c:l),t._resizable=new d.ui.Resizable(e.element,{orientation:i,handle:".k-splitbar-draggable-"+i+"[data-marker="+e._marker+"]",hint:f(t._createHint,t),start:f(t._start,t),max:f(t._max,t),min:f(t._min,t),invalidClass:"k-restricted-size-"+i,resizeend:f(t._stop,t)})}var l,c,d=window.kendo,u=d.ui,h=d.keys,p=e.extend,f=e.proxy,m=u.Widget,g=/^\d+(\.\d+)?px$/i,v=/^\d+(\.\d+)?%$/i,_=".kendoSplitter",b="expand",w="collapse",y="contentLoad",k="error",x="resize",C="layoutChange",S="horizontal",T="vertical",D="mouseenter",A="click",E="pane",I="mouseleave",M="k-state-focused",R="k-"+E,F="."+R,P=m.extend({init:function(e,t){var i,n=this;m.fn.init.call(n,e,t),n.wrapper=n.element,n.options.orientation&&(i=n.options.orientation.toLowerCase()!=T),n.orientation=i?S:T,n._dimension=i?"width":"height",n._keys={decrease:i?h.LEFT:h.UP,increase:i?h.RIGHT:h.DOWN},n._resizeStep=10,n._marker=d.guid().substring(0,8),n._initPanes(),n.resizing=new a(n),n.element.triggerHandler("init"+_)},events:[b,w,y,k,x,C],_addOverlays:function(){this._panes().append("<div class='k-splitter-overlay k-overlay' />")},_removeOverlays:function(){this._panes().children(".k-splitter-overlay").remove()},_attachEvents:function(){var t=this,i=t.options.orientation;t.element.children(".k-splitbar-draggable-"+i).on("keydown"+_,f(t._keydown,t)).on("mousedown"+_,function(e){e.currentTarget.focus()}).on("focus"+_,function(t){e(t.currentTarget).addClass(M)}).on("blur"+_,function(i){e(i.currentTarget).removeClass(M),t.resizing&&t.resizing.end()}).on(D+_,function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")}).on(I+_,function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")}).on("mousedown"+_,f(t._addOverlays,t)).end().children(".k-splitbar").on("dblclick"+_,f(t._togglePane,t)).children(".k-collapse-next, .k-collapse-prev").on(A+_,t._arrowClick(w)).end().children(".k-expand-next, .k-expand-prev").on(A+_,t._arrowClick(b)).end().end(),e(window).on("resize"+_+t._marker,f(t.resize,t,!1)),e(document).on("mouseup"+_+t._marker,f(t._removeOverlays,t))},_detachEvents:function(){var t=this;t.element.children(".k-splitbar-draggable-"+t.orientation).off(_).end().children(".k-splitbar").off("dblclick"+_).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(_),e(window).off(_+t._marker),e(document).off(_+t._marker)},options:{name:"Splitter",orientation:S,panes:[]},destroy:function(){m.fn.destroy.call(this),this._detachEvents(),this.resizing&&this.resizing.destroy(),d.destroy(this.element),this.wrapper=this.element=null},_keydown:function(t){var i,n=this,o=t.keyCode,r=n.resizing,s=e(t.currentTarget),a=n._keys,l=o===a.increase,c=o===a.decrease;l||c?(t.ctrlKey?(i=s[c?"next":"prev"](),r&&r.isResizing()&&r.end(),i[n._dimension]()?n._triggerAction(w,s[c?"prev":"next"]()):n._triggerAction(b,i)):r&&r.move((c?-1:1)*n._resizeStep,s),t.preventDefault()):o===h.HOME?(r.move(-r._maxPosition,s),t.preventDefault()):o===h.END?(r.move(r._maxPosition,s),t.preventDefault()):o===h.ENTER&&r&&(r.end(),t.preventDefault())},_initPanes:function(){var e=this.options.panes||[],t=this;this.element.addClass("k-widget").addClass("k-splitter").children().each(function(i,n){"script"!=n.nodeName.toLowerCase()&&t._initPane(n,e[i])}),this.resize()},_initPane:function(t,i){t=e(t).attr("role","group").addClass(R),t.data(E,i?i:{}).toggleClass("k-scrollable",!i||i.scrollable!==!1),this.ajaxRequest(t)},ajaxRequest:function(e,t,i){var n,o=this;e=o.element.find(e),n=e.data(E),t=t||n.contentUrl,t&&(e.append("<span class='k-icon k-i-loading k-pane-loading' />"),d.isLocalUrl(t)?jQuery.ajax({url:t,data:i||{},type:"GET",dataType:"html",success:function(t){o.angular("cleanup",function(){return{elements:e.get()}}),e.html(t),o.angular("compile",function(){return{elements:e.get()}}),o.trigger(y,{pane:e[0]})},error:function(t,i){o.trigger(k,{pane:e[0],status:i,xhr:t})}}):e.removeClass("k-scrollable").html("<iframe src='"+t+"' frameborder='0' class='k-content-frame'>This page requires frames in order to show content</iframe>"))},_triggerAction:function(e,t){this.trigger(e,{pane:t[0]})||this[e](t[0])},_togglePane:function(t){var i,n=this,o=e(t.target);o.closest(".k-splitter")[0]==n.element[0]&&(i=o.children(".k-icon:not(.k-resize-handle)"),1===i.length&&(i.is(".k-collapse-prev")?n._triggerAction(w,o.prev()):i.is(".k-collapse-next")?n._triggerAction(w,o.next()):i.is(".k-expand-prev")?n._triggerAction(b,o.prev()):i.is(".k-expand-next")&&n._triggerAction(b,o.next())))},_arrowClick:function(t){var i=this;return function(n){var o,r=e(n.target);r.closest(".k-splitter")[0]==i.element[0]&&(o=r.is(".k-"+t+"-prev")?r.parent().prev():r.parent().next(),i._triggerAction(t,o))}},_updateSplitBar:function(e,t,i){var n=function(e,t){return t?"<div class='k-icon "+e+"' />":""},o=this.orientation,r=t.resizable!==!1&&i.resizable!==!1,s=t.collapsible,a=t.collapsed,l=i.collapsible,c=i.collapsed;e.addClass("k-splitbar k-state-default k-splitbar-"+o).attr("role","separator").attr("aria-expanded",!(a||c)).removeClass("k-splitbar-"+o+"-hover").toggleClass("k-splitbar-draggable-"+o,r&&!a&&!c).toggleClass("k-splitbar-static-"+o,!r&&!s&&!l).html(n("k-collapse-prev k-i-arrow-60-up",s&&!a&&!c&&o==T)+n("k-collapse-prev k-i-arrow-60-left",s&&!a&&!c&&o==S)+n("k-expand-prev k-i-arrow-60-down",s&&a&&!c&&o==T)+n("k-expand-prev k-i-arrow-60-right",s&&a&&!c&&o==S)+n("k-resize-handle k-i-hbar",r&&o==T)+n("k-resize-handle k-i-vbar",r&&o==S)+n("k-collapse-next k-i-arrow-60-down",l&&!c&&!a&&o==T)+n("k-collapse-next k-i-arrow-60-right",l&&!c&&!a&&o==S)+n("k-expand-next k-i-arrow-60-up",l&&c&&!a&&o==T)+n("k-expand-next k-i-arrow-60-left",l&&c&&!a&&o==S)),r||s||l||e.removeAttr("tabindex")},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each(function(){var i=e(this),n=i.prevAll(F).first().data(E),o=i.nextAll(F).first().data(E);o&&t._updateSplitBar(i,n,o)})},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(F):e()},_resize:function(){var i,n,s,a,l,c,u,h,p,f,m=this,g=m.element,v=g.children(F),_=m.orientation==S,b=g.children(".k-splitbar"),w=b.length,y=_?"width":"height",k=g[y]();m.wrapper.addClass("k-splitter-resizing"),0===w?(w=v.length-1,v.slice(0,w).after("<div tabindex='0' class='k-splitbar' data-marker='"+m._marker+"' />"),m._updateSplitBars(),b=g.children(".k-splitbar")):m._updateSplitBars(),b.each(function(){k-=this[_?"offsetWidth":"offsetHeight"]}),i=0,n=0,s=e(),v.css({position:"absolute",top:0})[y](function(){var a,l=e(this),c=l.data(E)||{};if(l.removeClass("k-state-collapsed"),c.collapsed)a=c.collapsedSize?r(c.collapsedSize,k):0,l.css("overflow","hidden").addClass("k-state-collapsed");else{if(o(c.size))return s=s.add(this),t;a=r(c.size,k)}return n++,i+=a,a}),k-=i,a=s.length,l=Math.floor(k/a),s.slice(0,a-1).css(y,l).end().eq(a-1).css(y,k-(a-1)*l),c=0,u=_?"height":"width",h=_?"left":"top",p=_?"offsetWidth":"offsetHeight",0===a&&(f=v.filter(function(){return!(e(this).data(E)||{}).collapsed}).last(),f[y](k+f[0][p])),g.children().css(u,g[u]()).each(function(e,t){"script"!=t.tagName.toLowerCase()&&(t.style[h]=Math.floor(c)+"px",c+=t[p])}),m._detachEvents(),m._attachEvents(),m.wrapper.removeClass("k-splitter-resizing"),d.resize(v),m.trigger(C)},toggle:function(e,i){var n,o=this;e=o.element.find(e),n=e.data(E),(i||n.collapsible)&&(1==arguments.length&&(i=n.collapsed!==t&&n.collapsed),n.collapsed=!i,n.collapsed?e.css("overflow","hidden"):e.css("overflow",""),o.resize(!0))},collapse:function(e){this.toggle(e,!1)},expand:function(e){this.toggle(e,!0)},_addPane:function(e,t,i){var n=this;return i.length&&(n.options.panes.splice(t,0,e),n._initPane(i,e),n._removeSplitBars(),n.resize(!0)),i},append:function(t){t=t||{};var i=this,n=e("<div />").appendTo(i.element);return i._addPane(t,i.options.panes.length,n)},insertBefore:function(t,i){i=e(i),t=t||{};var n=this,o=n.wrapper.children(".k-pane").index(i),r=e("<div />").insertBefore(e(i));return n._addPane(t,o,r)},insertAfter:function(t,i){i=e(i),t=t||{};var n=this,o=n.wrapper.children(".k-pane").index(i),r=e("<div />").insertAfter(e(i));return n._addPane(t,o+1,r)},remove:function(t){var i=this;return t=i.wrapper.find(t),t.length&&(d.destroy(t),t.each(function(t,n){i.options.panes.splice(i.wrapper.children(".k-pane").index(n),1),e(n).remove()}),i._removeSplitBars(),i.options.panes.length&&i.resize(!0)),i},size:s("size",!0),min:s("min"),max:s("max")});u.plugin(P),l={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},c={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"},a.prototype={press:function(e){this._resizable.press(e)},move:function(e,t){this.pressed||(this.press(t),this.pressed=!0),this._resizable.target||this._resizable.press(t),this._resizable.move(e)},end:function(){this._resizable.end(),this.pressed=!1},destroy:function(){this._resizable.destroy(),this._resizable=this._element=this.owner=null},isResizing:function(){return this._resizable.resizing},_createHint:function(t){var i=this;return e("<div class='k-ghost-splitbar k-ghost-splitbar-"+i.orientation+" k-state-default' />").css(i.alternateSizingProperty,t[i.alternateSizingProperty]())},_start:function(t){var i=this,o=e(t.currentTarget),r=o.prev(),s=o.next(),a=r.data(E),l=s.data(E),c=parseInt(r[0].style[i.positioningProperty],10),d=parseInt(s[0].style[i.positioningProperty],10)+s[0][i.sizingDomProperty]-o[0][i.sizingDomProperty],u=parseInt(i._element.css(i.sizingProperty),10),h=function(e){var t=parseInt(e,10);return(n(e)?t:u*t/100)||0},p=h(a.min),f=h(a.max)||d-c,m=h(l.min),g=h(l.max)||d-c;i.previousPane=r,i.nextPane=s,i._maxPosition=Math.min(d-m,c+f),i._minPosition=Math.max(c+p,d-g)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var i,n,r,s,a,l,c,u,h=this,p=e(t.currentTarget),f=h.owner;return f._panes().children(".k-splitter-overlay").remove(),t.keyCode!==d.keys.ESC&&(i=t.position,n=p.prev(),r=p.next(),s=n.data(E),a=r.data(E),l=i-parseInt(n[0].style[h.positioningProperty],10),c=parseInt(r[0].style[h.positioningProperty],10)+r[0][h.sizingDomProperty]-i-p[0][h.sizingDomProperty],u=h._element.children(F).filter(function(){return o(e(this).data(E).size)}).length,(!o(s.size)||u>1)&&(o(s.size)&&u--,s.size=l+"px"),(!o(a.size)||u>1)&&(a.size=c+"px"),f.resize(!0)),!1}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dialog.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function i(e){return t!==e}function n(e,t,i){return Math.max(Math.min(parseInt(e,10),i===1/0?i:parseInt(i,10)),parseInt(t,10))}function o(e){return e.keyCode==_.ENTER||e.keyCode==_.SPACEBAR}var r,s,a,l,c,d,u,h,p=window.kendo,f=p.ui.Widget,m=p.ui.Popup.TabKeyTrap,g=e.proxy,v=p.template,_=p.keys,b=e.isFunction,w="kendoWindow",y=".k-dialog",k=".k-window",x=".k-dialog-close",C="k-content k-window-content k-dialog-content",S=".k-content",T="k-scroll",D="k-dialog-titleless",A=".k-dialog-title",E=A+"bar",I=".k-dialog-buttongroup",M=".k-button",R="k-alert",F="k-confirm",P="k-prompt",z=".k-textbox",B=".k-overlay",L=":visible",H="zIndex",N="body",O="initOpen",V="open",W="close",U="show",q="hide",j="width",G=100,$={okText:"OK",cancel:"Cancel",promptInput:"Input"},K=Math.ceil,Y=":not(link,meta,script,style)",Q=f.extend({init:function(e,t){var i=this;f.fn.init.call(i,e,t),i._init(i.element,i.options),p.notify(i)},_init:function(n,o){var s,a=this;a._centerCallback=g(a._center,a),a.appendTo=e(N),i(o.visible)&&null!==o.visible||(o.visible=n.is(L)),a.wrapperTemplate===t&&(a.wrapperTemplate=r.wrapper),a._createDialog(),s=a.wrapper=n.closest(y),o._defaultFocus===t&&(a._defaultFocus=n[0]),a._tabindex(n),a._dimensions(),this._tabKeyTrap=new m(s),a.options.visible?a._triggerOpen():a.wrapper.hide()},setOptions:function(i){var n=this;i=e.extend(n.options,i),f.fn.setOptions.call(n,i),i.title!==t&&n.title(i.title),i.content&&(p.destroy(n.element.children()),n.element.html(i.content)),i.actions&&(n.wrapper.children(I).remove(),n._createActionbar(n.wrapper)),n.wrapper.show(),n._closable(n.wrapper),n._dimensions(),i.visible?n._triggerOpen():n.wrapper.hide()},_dimensions:function(){var e,t,i=this,o=i.wrapper,r=i.options,s=r.width,a=r.height,l=["minWidth","minHeight","maxWidth","maxHeight"];for(e=0;e<l.length;e++)t=r[l[e]],t&&t!=1/0&&o.css(l[e],t);this._setElementMaxHeight(),s&&((""+s).indexOf("%")>0?o.width(s):o.outerWidth(n(s,r.minWidth,r.maxWidth))),a&&((""+a).indexOf("%")>0?o.height(a):o.outerHeight(n(a,r.minHeight,r.maxHeight)),this._setElementHeight())},_setElementMaxHeight:function(){var e,t,i=this,n=i.element,o=i.options.maxHeight;o!=1/0&&(e=i._paddingBox(n),t=parseFloat(o,10)-i._uiHeight()-e.vertical,t>0&&n.css({maxHeight:K(t)+"px"}))},_paddingBox:function(e){var t=parseFloat(e.css("padding-top"),10),i=parseFloat(e.css("padding-left"),10),n=parseFloat(e.css("padding-bottom"),10),o=parseFloat(e.css("padding-right"),10);return{vertical:t+n,horizontal:i+o}},_setElementHeight:function(){var e=this,t=e.element,i=e.options.height,n=e._paddingBox(t),o=parseFloat(i,10)-e._uiHeight()-n.vertical;o<0&&(o=0),t.css({height:K(o)+"px"}),this._applyScrollClassName(t)},_applyScrollClassName:function(e){var t=e.get(0).scrollHeight>e.outerHeight();t?e.addClass(T):e.removeClass(T)},_uiHeight:function(){var e=this,t=e.wrapper,i=t.children(I),n=i[0]&&i[0].offsetHeight||0,o=t.children(E),r=o[0]&&o[0].offsetHeight||0;return n+r},_overlay:function(t){var i=this.appendTo.children(B),n=this.wrapper;return i.length||(i=e(r.overlay)),i.insertBefore(n[0]).toggle(t).css(H,parseInt(n.css(H),10)-1),t?this._waiAriaOverlay():this._removeWaiAriaOverlay(),i},_waiAriaOverlay:function(){var t=this.wrapper;this._overlayedNodes=t.prevAll(Y).add(t.nextAll(Y)).each(function(){var t=e(this);t.data("ariaHidden",t.attr("aria-hidden")),t.attr("aria-hidden","true")})},_removeWaiAriaOverlay:function(){return this._overlayedNodes&&this._overlayedNodes.each(function(){var t=e(this),i=t.data("ariaHidden");i?t.attr("aria-hidden",i):t.removeAttr("aria-hidden")})},_closeClick:function(e){e.preventDefault(),this.close()},_closeKeyHandler:function(e){(o(e)||e.keyCode==_.ESC)&&this.close()},_keydown:function(e){var t=this,i=t.options,n=e.keyCode;n==_.ESC&&!t._closing&&i.closable&&t.close()},_createDialog:function(){var t=this,i=t.element,n=t.options,o=p.support.isRtl(i),s=e(r.titlebar(n)),a=(i.id||p.guid())+"_title",l=e(t.wrapperTemplate(n));l.toggleClass("k-rtl",o),i.addClass(C),t.appendTo.append(l),n.title!==!1?(l.append(s),s.attr("id",a),l.attr("aria-labelledby",a)):l.addClass(D),t._closable(l),l.append(i),n.content&&(p.destroy(i.children()),i.html(n.content)),n.actions.length&&t._createActionbar(l)},_closable:function(e){var t=this,i=t.options,n=e.children(E),o=n.find(".k-window-actions"),s=o.length?o.find(".k-dialog-close"):e.find(".k-dialog-close");s.remove(),i.closable!==!1&&(i.title!==!1&&o.length?o.append(r.close(i)):e.prepend(r.close(i)),e.autoApplyNS(w),t.element.autoApplyNS(w),e.find(x).on("click",g(t._closeClick,t)).on("keydown",g(t._closeKeyHandler,t)),t.element.on("keydown",g(t._keydown,t)))},_createActionbar:function(t){var i="stretched"===this.options.buttonLayout,n=i?"stretched":"normal",o=e(r.actionbar({buttonLayout:n}));this._addButtons(o),i&&this._normalizeButtonSize(o),t.append(o)},_addButtons:function(t){var i,n,o,s,a=this,l=a.options,c=g(a._actionClick,a),d=g(a._actionKeyHandler,a),u=a.options.actions,h=u.length,p=Math.round(G/h);for(o=0;o<h;o++)i=u[o],n=a._mergeTextWithOptions(i),s=e(r.action(i)).autoApplyNS(w).html(n).appendTo(t).data("action",i.action).on("click",c).on("keydown",d),"stretched"===l.buttonLayout&&(o==h-1&&(p=G-o*p),s.css(j,p+"%"))},_mergeTextWithOptions:function(e){var t=e.text;return t?v(t)(this.options):""},_normalizeButtonSize:function(e){var t=this,i=t.options,n=e.children(M+":last"),o=parseFloat(n[0]?n[0].style[j]:0),r=G-i.actions.length*o;r>0&&n.css(j,o+r+"%")},_tabindex:function(e){var t,i=this,n=i.wrapper,o=n.find(x),r=n.find(I+" "+M);f.fn._tabindex.call(this,e),t=e.attr("tabindex"),o.attr("tabIndex",t),r.attr("tabIndex",t)},_actionClick:function(e){this.wrapper.is(L)&&this._runActionBtn(e.currentTarget)},_actionKeyHandler:function(e){o(e)?this._runActionBtn(e.currentTarget):e.keyCode==_.ESC&&this.close()},_runActionBtn:function(t){var i,n,o=this;o._closing||(i=e(t).data("action"),n=b(i)&&i({sender:o})===!1,n||o.close())},_triggerOpen:function(){var e=this,t=e.options,i=e.wrapper;e.toFront(),e._triggerInitOpen(),e.trigger(V),t.modal&&(e._overlay(i.is(L)).css({opacity:.5}),e._focusDialog())},open:function(){var e,t,i,n=this,o=n.wrapper,r=this._animationOptions(V),s=n.options;return this._triggerInitOpen(),n.trigger(V)||(n._closing&&o.kendoStop(!0,!0),n._closing=!1,n.toFront(),s.visible=!0,s.modal&&(t=!!n._modals().length,e=n._overlay(t),e.kendoStop(!0,!0),r.duration&&p.effects.Fade&&!t?(i=p.fx(e).fadeIn(),i.duration(r.duration||0),i.endValue(.5),i.play()):e.css("opacity",.5),e.show()),o.show().kendoStop().kendoAnimate({effects:r.effects,duration:r.duration,complete:g(n._openAnimationEnd,n)}),o.show()),n},_animationOptions:function(e){var t=this.options.animation,i={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||i[e]},_openAnimationEnd:function(){this.options.modal&&this._focusDialog(),this.trigger(U)},_triggerInitOpen:function(){i(this._initOpenTriggered)||(this._initOpenTriggered=!0,this.trigger(O))},toFront:function(){var t=this,i=t.wrapper,n=+i.css(H),o=n;return t.center(),e(k).each(function(t,i){var o=e(i),r=o.css(H);isNaN(r)||(n=Math.max(+r,n))}),(!i[0].style.zIndex||o<n)&&i.css(H,n+2),t.element.find("> .k-overlay").remove(),i=null,t},close:function(){return this._close(!0),this._stopCenterOnResize(),this},_close:function(e){var t=this,i=t.wrapper,n=t.options,o=this._animationOptions("open"),r=this._animationOptions("close");if(i.is(L)&&!t.trigger(W,{userTriggered:!e})){if(t._closing)return;t._closing=!0,n.visible=!1,this._removeOverlay(),i.kendoStop().kendoAnimate({effects:r.effects||o.effects,reverse:r.reverse===!0,duration:r.duration,complete:g(this._closeAnimationEnd,this)})}return t},center:function(){this._center(),this._centerOnResize()},_center:function(){var t=this,i=t.wrapper,n=e(window),o=0,r=0,s=r+Math.max(0,(n.width()-i.width())/2),a=o+Math.max(0,(n.height()-i.height()-parseInt(i.css("paddingTop"),10))/2);return i.css({left:s,top:a}),t},_centerOnResize:function(){this._trackResize||(p.onResize(this._centerCallback),this._trackResize=!0)},_stopCenterOnResize:function(){p.unbindResize(this._centerCallback),this._trackResize=!1},_removeOverlay:function(){var e=this._modals(),t=this.options,i=t.modal&&!e.length;i?this._overlay(!1).remove():e.length&&this._object(e.last())._overlay(!0)},_closeAnimationEnd:function(){var e,t=this;t._closing=!1,t.wrapper.hide().css("opacity",""),t.trigger(q),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},_modals:function(){var t=this,i=e(k).filter(function(){var i=e(this),n=t._object(i),o=n&&n.options;return o&&o.modal&&t.options.appendTo==o.appendTo&&o.visible&&i.is(L)}).sort(function(t,i){return+e(t).css("zIndex")-+e(i).css("zIndex")});return t=null,i},_object:function(e){var i=e.children(S),n=p.widgetInstance(i);return n?n:t},destroy:function(){var t=this;t._destroy(),f.fn.destroy.call(t),t.wrapper.remove(),t.wrapper=t.element=e()},_destroy:function(){var e=this,t="."+w;e.wrapper.off(t),e.element.off(t),e.wrapper.find(x+","+I+" > "+M).off(t),e._stopCenterOnResize()},title:function(t){var i=this,n=i.wrapper,o=i.options,s=n.children(E),a=s.children(A),l=p.htmlEncode(t);return arguments.length?(t===!1?(s.remove(),n.addClass(D)):(s.length||(s=e(r.titlebar(o)).prependTo(n),a=s.children(A),n.removeClass(D)),a.html(l)),i.options.title=l,i):a.html()},content:function(e,t){var n=this,o=n.wrapper.children(S);return i(e)?(this.angular("cleanup",function(){return{elements:o.children()}}),p.destroy(o.children()),o.html(e),this.angular("compile",function(){var e,i=[];for(e=o.length;--e>=0;)i.push({dataItem:t});return{elements:o.children(),data:i}}),n.options.content=e,n):o.html()},_focusDialog:function(){this._defaultFocus&&this._focus(this._defaultFocus),this._tabKeyTrap.trap()},_focus:function(e){e&&e.focus()},events:[O,V,W,U,q],options:{title:"",buttonLayout:"stretched",actions:[],modal:!0,width:null,height:null,minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,content:null,visible:null,appendTo:N,closable:!0}}),X=Q.extend({options:{name:"Dialog",messages:{close:"Close"}}});p.ui.plugin(X),s=Q.extend({_init:function(e,t){var i=this;i.wrapperTemplate=r.alertWrapper,t._defaultFocus=null,i._ensureContentId(e),Q.fn._init.call(i,e,t),i.bind(q,g(i.destroy,i)),i._ariaDescribedBy(),i._initFocus()},_ensureContentId:function(t){var i=e(t);i.attr("id")||i.attr("id",p.guid()+"_k-popup")},_ariaDescribedBy:function(){this.wrapper.attr("aria-describedby",this.element.attr("id"))},_initFocus:function(){var e=this.options;this._defaultFocus=this._chooseEntryFocus(),this._defaultFocus&&e.visible&&e.modal&&this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(I+" > "+M)[0]},options:{title:window.location.host,closable:!1,messages:$}}),a=s.extend({_init:function(e,t){var i=this;s.fn._init.call(i,e,t),i.wrapper.addClass(R)},options:{name:"Alert",modal:!0,actions:[{text:"#: messages.okText #"}]}}),p.ui.plugin(a),l=function(t){return e(r.alert).kendoAlert({content:t}).data("kendoAlert").open()},c=s.extend({_init:function(t,i){var n=this;s.fn._init.call(n,t,i),n.wrapper.addClass(F),n.result=e.Deferred()},options:{name:"Confirm",modal:!0,actions:[{text:"#: messages.okText #",primary:!0,action:function(e){e.sender.result.resolve()}},{text:"#: messages.cancel #",action:function(e){e.sender.result.reject()}}]}}),p.ui.plugin(c),d=function(t){var i=e(r.confirm).kendoConfirm({content:t}).data("kendoConfirm").open();return i.result},u=s.extend({_init:function(t,i){var n=this;s.fn._init.call(n,t,i),n.wrapper.addClass(P),n._createPrompt(),n.result=e.Deferred()},_createPrompt:function(){var t=this.options.value,i=e(r.promptInputContainer(this.options)).insertAfter(this.element);t&&i.children(z).val(t),this._defaultFocus=this._chooseEntryFocus(),this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(z)[0]},options:{name:"Prompt",modal:!0,value:"",actions:[{text:"#: messages.okText #",primary:!0,action:function(e){var t=e.sender,i=t.wrapper.find(z).val();t.result.resolve(i)}},{text:"#: messages.cancel #",action:function(e){var t=e.sender,i=t.wrapper.find(z).val();e.sender.result.reject(i)}}]}}),p.ui.plugin(u),h=function(t,i){var n=e(r.prompt).kendoPrompt({content:t,value:i}).data("kendoPrompt").open();return n.result},r={wrapper:v("<div class='k-widget k-window k-dialog' role='dialog' />"),action:v("<button type='button' class='k-button# if (data.primary) { # k-primary# } role='button' #'></button>"),
titlebar:v("<div class='k-window-titlebar k-dialog-titlebar k-header'><span class='k-window-title k-dialog-title'>#: title #</span><div class='k-window-actions k-dialog-actions' /></div>"),close:v("<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action k-dialog-action k-dialog-close' title='#: messages.close #' aria-label='#: messages.close #' tabindex='-1'><span class='k-icon k-i-close'></span></a>"),actionbar:v("<div class='k-button-group k-dialog-buttongroup k-dialog-button-layout-#: buttonLayout #' role='toolbar' />"),overlay:"<div class='k-overlay' />",alertWrapper:v("<div class='k-widget k-window k-dialog' role='alertdialog' />"),alert:"<div />",confirm:"<div />",prompt:"<div />",promptInputContainer:v("<div class='k-prompt-container'><input type='text' class='k-textbox' title='#: messages.promptInput #' aria-label='#: messages.promptInput #' /></div>")},p.alert=l,p.confirm=d,p.prompt=h}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.view.min",["kendo.core.min"],e)}(function(){return kendo.ui.scheduler={},function(e){function t(e,t){function i(e,o){var r,s;if(o=o[t])for(r=n[e]=n[e]||[],s=0;s<o.length;s++)r.push(o[s]),i(e+1,o[s])}var n=[];return i(0,e),n}function i(){return x.support.cssBorderSpacing?"":'cellspacing="0"'}function n(t,n){return t.length?"<table "+i()+' class="'+e.trim("k-scheduler-table "+(n||""))+'"><tr>'+t.join("</tr><tr>")+"</tr></table>":""}function o(e,t){return e.length?"<div style='position:relative'>"+n(e,t)+"</div>":""}function r(t,i,o){var r,s=[];if(o>0)for(r=0;r<t;r++)s.push("<th>&#8203;</th>");return i&&s.push('<th class="k-scheduler-times-all-day">'+i.text+"</th>"),o<1?e():e('<div class="k-scheduler-times">'+n(s)+"</div>")}function s(t,i,r){var s,a,l,c,d,u,h,p,f,m,g=[];for(a=0;a<t.length;a++){for(l=t[a],c=[],d=i/l.length,s=0;s<l.length;s++)u=l[s],c.push('<th colspan="'+(u.colspan||d)+'" class="'+(u.className||"")+'">'+u.text+"</th>");g.push(c.join(""))}if(h=[],r){for(p=t[t.length-1],f=[],m=r.cellContent,s=0;s<p.length;s++)f.push('<td class="'+(p[s].className||"")+'">'+(m?m(s):"&nbsp;")+"</td>");h.push(f.join(""))}return e('<div class="k-scheduler-header k-state-default"><div class="k-scheduler-header-wrap">'+n(g)+o(h,"k-scheduler-header-all-day")+"</div></div>")}function a(t,i){var o,r,s,a,l,c=Array(i).join().split(","),d=[];for(r=0;r<t.length;r++)for(s=t[r],a=i/s.length,o=0;o<s.length;o++)l=s[o].className||"",s[o].allDay&&(l="k-scheduler-times-all-day"),c[a*o]+='<th class="'+l+'" rowspan="'+a+'">'+s[o].text+"</th>";for(o=0;o<i;o++)d.push(c[o]);return i<1?e():e('<div class="k-scheduler-times">'+n(d)+"</div>")}function l(){return e('<div class="k-scheduler-content"><table '+i()+' class="k-scheduler-table"/></div>')}function c(){return w=w?w:x.support.scrollbar()}function d(e,t,i){var n,o,r,s,a;for(n=e.length-1;n>=0;n--)o=u(e[n]),r=o.start,a=o.end,s=r<=t&&a>=t,(s||r>=t&&a<=i||t<=r&&i>=r)&&(r<t&&(t=r),a>i&&(i=a));return h(e,t,i)}function u(e){return{start:e.start,end:e.end}}function h(e,t,i){var n,o,r=[];for(n=0;n<e.length;n++)o=u(e[n]),(o.start<t&&o.end>t||o.start>=t&&o.end<=i)&&r.push(e[n]);return r}function p(e){return m(e)}function f(e){return m(e)}function m(e){var t,i,n,o,r,s,a,l=[];for(t=0;t<e.length;t++){for(i=e[t],n=u(i),o=null,r=0,s=l.length;r<s;r++)if(a=n.start>l[r].end,n.start<l[r].start||a){o=l[r],o.end<n.end&&(o.end=n.end);break}o||(o={start:n.start,end:n.end,events:[]},l.push(o)),o.events.push(i)}return l}function g(t,i,n,o){var r=[];return e.each(i,function(e,i){var s=i.className?"k-slot-cell "+i.className:"k-slot-cell",a={text:i.text,className:s};a[t]=o&&!i.minorTicks?g(t,i.columns,n,o):n,r.push(a)}),r}function v(t,i,n,o,r,s){var a,l,c,d=i[0],u=[];if(d){if(r&&n)e.each(r,function(e,n){n[t]=s&&!n.minorTicks?v(t,i,n.columns,o,n.columns,s):v(t,i,null,o)}),u=r;else for(a=d.dataSource.view(),l=0;l<a.length;l++)c={text:o({text:x.htmlEncode(x.getter(d.dataTextField)(a[l])),color:x.getter(d.dataColorField)(a[l]),field:d.field,title:d.title,name:d.name,value:x.getter(d.dataValueField)(a[l])}),className:"k-slot-cell"},c[t]=v(t,i.slice(1),n,o),u.push(c);return u}return n}function _(t){return function(i){if(e.isArray(i)||i instanceof x.data.ObservableArray){for(var n=0;n<i.length;n++)if(i[n]==t)return!0;return!1}return i==t}}function b(e){e.className=e.className.replace(k,"")+" k-state-selected"}var w,y,k,x=window.kendo,C=x.ui,S=x.date.getDate,T=C.Widget,D=x._outerHeight,A=x.keys,E=".kendoSchedulerView",I=Math,M='<div class="k-marquee k-scheduler-marquee"><div class="k-marquee-color"></div><div class="k-marquee-text"><div class="k-label-top"></div><div class="k-label-bottom"></div></div></div>',R=x.Class.extend({init:function(e,t){this._index=e,this._timeSlotCollections=[],this._daySlotCollections=[],this._isRtl=t},addTimeSlotCollection:function(e,t){return this._addCollection(e,t,this._timeSlotCollections)},addDaySlotCollection:function(e,t){return this._addCollection(e,t,this._daySlotCollections)},_addCollection:function(e,t,i){var n=new B(e,t,this._index,i.length);return i.push(n),n},timeSlotCollectionCount:function(){return this._timeSlotCollections.length},daySlotCollectionCount:function(){return this._daySlotCollections.length},daySlotByPosition:function(e,t,i){return this._slotByPosition(e,t,this._daySlotCollections,i)},timeSlotByPosition:function(e,t,i){return this._slotByPosition(e,t,this._timeSlotCollections,i)},_slotByPosition:function(e,t,i,n){var o,r,s,a,l,c,d,u,h;for(o=0;o<i.length;o++)for(r=i[o],s=0;s<r.count();s++)if(a=r.at(s),l=a.offsetWidth,c=a.offsetHeight,u=a.offsetLeft+l,h=a.offsetTop+c,n||(d=r.at(s+1)),d&&(d.offsetLeft!=a.offsetLeft?u=this._isRtl?a.offsetLeft+(a.offsetLeft-d.offsetLeft):d.offsetLeft:h=d.offsetTop),e>=a.offsetLeft&&e<u&&t>=a.offsetTop&&t<h)return a},refresh:function(){var e;for(e=0;e<this._daySlotCollections.length;e++)this._daySlotCollections[e].refresh();for(e=0;e<this._timeSlotCollections.length;e++)this._timeSlotCollections[e].refresh()},timeSlotRanges:function(e,t){var i,n=this._timeSlotCollections,o=this._startSlot(e,n);if(!o.inRange&&e>=o.slot.end&&(o=null),i=o,e<t&&(i=this._endSlot(t,n)),i&&!i.inRange&&t<=i.slot.start&&(i=null),null===o&&null===i)return[];if(null===o){if(i.slot.end<=e)return[];o={inRange:!0,slot:n[i.slot.collectionIndex].first()}}if(null===i){if(o.slot.start>=t)return[];i={inRange:!0,slot:n[o.slot.collectionIndex].last()}}return this._continuousRange(P,n,o,i)},daySlotRanges:function(e,t,i){var n,o=this._daySlotCollections,r=this._startSlot(e,o,i);if(!r.inRange&&e>=r.slot.end&&(r=null),n=r,e<t&&(n=this._endSlot(t,o,i)),n&&!n.inRange&&t<=n.slot.start&&(n=null),null===r&&null===n)return[];if(null===r){if(n.slot.end<=e)return[];do e+=x.date.MS_PER_DAY,r=this._startSlot(e,o,i);while(!r.inRange&&e>=r.slot.end)}if(null===n){if(r.slot.start>=t)return[];do t-=x.date.MS_PER_DAY,n=this._endSlot(t,o,i);while(!n.inRange&&t<=n.slot.start)}return this._continuousRange(z,o,r,n)},_continuousRange:function(e,t,i,n){var o,r,s,a,l,c,d=i.slot,u=n.slot,h=d.collectionIndex,p=u.collectionIndex,f=[];for(o=h;o<=p;o++)r=t[o],s=r.first(),a=r.last(),l=!1,c=!1,o==h&&(c=!i.inRange),o==p&&(l=!n.inRange),s.start<d.start&&(s=d),a.start>u.start&&(a=u),h<p&&(o==h?l=!0:o==p?c=!0:l=c=!0),f.push(new e({start:s,end:a,collection:r,head:l,tail:c}));return f},slotRanges:function(e,t){var i=e._startTime||x.date.toUtcTime(e.start),n=e._endTime||x.date.toUtcTime(e.end);return void 0===t&&(t=e.isMultiDay()),t?this.daySlotRanges(i,n,e.isAllDay):this.timeSlotRanges(i,n)},ranges:function(e,t,i,n){return"number"!=typeof e&&(e=x.date.toUtcTime(e)),"number"!=typeof t&&(t=x.date.toUtcTime(t)),i?this.daySlotRanges(e,t,n):this.timeSlotRanges(e,t)},_startCollection:function(e,t){var i,n;for(i=0;i<t.length;i++)if(n=t[i],n.startInRange(e))return n;return null},_endCollection:function(e,t,i){var n,o;for(n=0;n<t.length;n++)if(o=t[n],o.endInRange(e,i))return o;return null},_getCollections:function(e){return e?this._daySlotCollections:this._timeSlotCollections},continuousSlot:function(e,t){var i=t?-1:1,n=this._getCollections(e.isDaySlot),o=n[e.collectionIndex+i];return o?o[t?"last":"first"]():void 0},firstSlot:function(){var e=this._getCollections(this.daySlotCollectionCount());return e[0].first()},lastSlot:function(){var e=this._getCollections(this.daySlotCollectionCount());return e[e.length-1].last()},upSlot:function(e,t,i){var n=this,o=function(e,i,o){var r=0===o;if(!t&&!e&&r&&n.daySlotCollectionCount())return n._daySlotCollections[0].at(i)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,-1,o,i)},downSlot:function(e,t,i){var n=this,o=function(e,i,o){if(!t&&e&&n.timeSlotCollectionCount())return n._timeSlotCollections[o].at(0)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,1,o,i)},leftSlot:function(e,t){return this._horizontalSlot(e,-1,t)},rightSlot:function(e,t){return this._horizontalSlot(e,1,t)},_horizontalSlot:function(e,t,i){var n,o=e.index,r=e.isDaySlot,s=e.collectionIndex,a=this._getCollections(r);return r=!i&&r,r?o+=t:s+=t,n=a[s],n?n.at(o):void 0},_verticalSlot:function(e,t,i,n){var o,r=e.index,s=e.isDaySlot,a=e.collectionIndex,l=this._getCollections(s);return(e=i(s,a,r))?e:(s=!n&&s,s?a+=t:r+=t,o=l[a],o?o.at(r):void 0)},_collection:function(e,t){var i=t?this._daySlotCollections:this._timeSlotCollections;return i[e]},_startSlot:function(e,t,i){var n,o=this._startCollection(e,t),r=!0;return o||(o=t[0],r=!1),n=o.slotByStartDate(e,i),n||(n=o.first(),r=!1),{slot:n,inRange:r}},_endSlot:function(e,t,i){var n,o=this._endCollection(e,t,i),r=!0;return o||(o=t[t.length-1],r=!1),n=o.slotByEndDate(e,i),n||(n=o.last(),r=!1),{slot:n,inRange:r}},getSlotCollection:function(e,t){return this[t?"getDaySlotCollection":"getTimeSlotCollection"](e)},getTimeSlotCollection:function(e){return this._timeSlotCollections[e]},getDaySlotCollection:function(e){return this._daySlotCollections[e]}}),F=x.Class.extend({init:function(t){e.extend(this,t)},innerHeight:function(){var e,t=this.collection,i=this.start.index,n=this.end.index,o=0;for(e=i;e<=n;e++)o+=t.at(e).offsetHeight;return o},events:function(){return this.collection.events()},addEvent:function(e){this.events().push(e)},startSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.end:this.start},endSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.start:this.end}}),P=F.extend({innerHeight:function(){var e,t=this.collection,i=this.start.index,n=this.end.index,o=0;for(e=i;e<=n;e++)o+=t.at(e).offsetHeight;return o},outerRect:function(e,t,i){return this._rect("offset",e,t,i)},_rect:function(e,t,i,n){var o,r,s,a,l,c,d,u,h=this.start,p=this.end,f=x.support.isRtl(h.element);return"number"!=typeof t&&(t=x.date.toUtcTime(t)),"number"!=typeof i&&(i=x.date.toUtcTime(i)),n?(o=h.offsetTop,r=p.offsetTop+p[e+"Height"],f?(s=p.offsetLeft,a=h.offsetLeft+h[e+"Width"]):(s=h.offsetLeft,a=p.offsetLeft+p[e+"Width"])):(l=t-h.start,l<0&&(l=0),c=h.end-h.start,o=h.offsetTop+h[e+"Height"]*l/c,d=p.end-i,d<0&&(d=0),u=p.end-p.start,r=p.offsetTop+p[e+"Height"]-p[e+"Height"]*d/u,f?(s=Math.round(p.offsetLeft+p[e+"Width"]*d/u),a=Math.round(h.offsetLeft+h[e+"Width"]-h[e+"Width"]*l/c)):(s=Math.round(h.offsetLeft+h[e+"Width"]*l/c),a=Math.round(p.offsetLeft+p[e+"Width"]-p[e+"Width"]*d/u))),{top:o,bottom:r,left:0===s?s:s+1,right:a}},innerRect:function(e,t,i){return this._rect("client",e,t,i)}}),z=F.extend({innerWidth:function(){var e,t=this.collection,i=this.start.index,n=this.end.index,o=0,r=i!==n?"offsetWidth":"clientWidth";for(e=i;e<=n;e++)o+=t.at(e)[r];return o}}),B=x.Class.extend({init:function(e,t,i,n){this._slots=[],this._events=[],this._start=x.date.toUtcTime(e),this._end=x.date.toUtcTime(t),this._groupIndex=i,this._collectionIndex=n},refresh:function(){for(var e=0;e<this._slots.length;e++)this._slots[e].refresh()},startInRange:function(e){return this._start<=e&&e<this._end},endInRange:function(e,t){var i=t?e<this._end:e<=this._end;return this._start<=e&&i},slotByStartDate:function(e){var t,i,n=e;for("number"!=typeof n&&(n=x.date.toUtcTime(e)),t=0;t<this._slots.length;t++)if(i=this._slots[t],i.startInRange(n))return i;return null},slotByEndDate:function(e,t){var i,n,o=e;if("number"!=typeof o&&(o=x.date.toUtcTime(e)),t)return this.slotByStartDate(e,!1);for(i=0;i<this._slots.length;i++)if(n=this._slots[i],n.endInRange(o))return n;return null},count:function(){return this._slots.length},events:function(){return this._events},addTimeSlot:function(e,t,i,n){var o=new H(e,t,i,this._groupIndex,this._collectionIndex,this._slots.length,n);this._slots.push(o)},addDaySlot:function(e,t,i,n){var o=new N(e,t,i,this._groupIndex,this._collectionIndex,this._slots.length,n);this._slots.push(o)},first:function(){return this._slots[0]},last:function(){return this._slots[this._slots.length-1]},at:function(e){return this._slots[e]}}),L=x.Class.extend({init:function(e,t,i,n,o,r){this.element=e,this.clientWidth=e.clientWidth,this.clientHeight=e.clientHeight,this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.offsetTop=e.offsetTop,this.offsetLeft=e.offsetLeft,this.start=t,this.end=i,this.element=e,this.groupIndex=n,this.collectionIndex=o,this.index=r,this.isDaySlot=!1},refresh:function(){var e=this.element;this.clientWidth=e.clientWidth,this.clientHeight=e.clientHeight,this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.offsetTop=e.offsetTop,this.offsetLeft=e.offsetLeft},startDate:function(){return x.timezone.toLocalDate(this.start)},endDate:function(){return x.timezone.toLocalDate(this.end)},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end},startOffset:function(){return this.start},endOffset:function(){return this.end}}),H=L.extend({init:function(e,t,i,n,o,r,s){L.fn.init.apply(this,arguments),this.isHorizontal=!!s},offsetX:function(e,t){return e?this.offsetLeft+t:this.offsetLeft+t},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end},startOffset:function(t,i,n){var o,r,s,a,l;if(n)return this.start;if(o=e(this.element).offset(),r=this.end-this.start,this.isHorizontal){if(l=x.support.isRtl(this.element),s=t-o.left,a=Math.floor(r*(s/this.offsetWidth)),l)return this.start+r-a}else s=i-o.top,a=Math.floor(r*(s/this.offsetHeight));return this.start+a},endOffset:function(t,i,n){var o,r,s,a,l;if(n)return this.end;if(o=e(this.element).offset(),r=this.end-this.start,this.isHorizontal){if(l=x.support.isRtl(this.element),s=t-o.left,a=Math.floor(r*(s/this.offsetWidth)),l)return this.start+r-a}else s=i-o.top,a=Math.floor(r*(s/this.offsetHeight));return this.start+a}}),N=L.extend({init:function(e,t,i,n,o,r,s){if(L.fn.init.apply(this,arguments),this.eventCount=s,this.isDaySlot=!0,this.element.children.length){var a=this.element.children[0];this.firstChildHeight=a.offsetHeight,this.firstChildTop=a.offsetTop}else this.firstChildHeight=3,this.firstChildTop=0},startDate:function(){var e=new Date(this.start);return x.timezone.apply(e,"Etc/UTC")},endDate:function(){var e=new Date(this.end);return x.timezone.apply(e,"Etc/UTC")},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end}});x.ui.SchedulerView=T.extend({init:function(t,i){T.fn.init.call(this,t,i),this._normalizeOptions(),this._scrollbar=c(),this._isRtl=x.support.isRtl(t),this._resizeHint=e(),this._moveHint=e(),this._cellId=x.guid(),this._resourcesForGroups(),this._selectedSlots=[]},visibleEndDate:function(){return this.endDate()},_normalizeOptions:function(){var e=this.options;e.startTime&&e.startTime.setMilliseconds(0),e.endTime&&e.endTime.setMilliseconds(0),e.workDayStart&&e.workDayStart.setMilliseconds(0),e.workDayEnd&&e.workDayEnd.setMilliseconds(0)},_isMobile:function(){var e=this.options;return e.mobile===!0&&x.support.mobileOS||"phone"===e.mobile||"tablet"===e.mobile},_isMobilePhoneView:function(){var e=this.options;return e.mobile===!0&&x.support.mobileOS&&!x.support.mobileOS.tablet||"phone"===e.mobile},_addResourceView:function(){var e=new R(this.groups.length,this._isRtl);return this.groups.push(e),e},dateForTitle:function(){return x.format(this.options.selectedDateFormat,this.startDate(),this.endDate())},shortDateForTitle:function(){return x.format(this.options.selectedShortDateFormat,this.startDate(),this.endDate())},_changeGroup:function(e,t){var i=t?"prevGroupSlot":"nextGroupSlot",n=this[i](e.start,e.groupIndex,e.isAllDay);return n&&(e.groupIndex+=t?-1:1),this._isGroupedByDate()&&!n&&(e.groupIndex=t?this.groups.length-1:0),n},_changeDate:function(e,t,i){var n,o,r,s=this.groups[e.groupIndex];if(i){if(n=s._getCollections(!1),o=s.daySlotCollectionCount()?t.index-1:t.collectionIndex-1,o>=0)return n[o]._slots[n[o]._slots.length-1]}else if(n=s._getCollections(s.daySlotCollectionCount()),o=s.daySlotCollectionCount()?0:t.collectionIndex+1,r=s.daySlotCollectionCount()?t.collectionIndex+1:0,n[o]&&n[o]._slots[r])return n[o]._slots[r]},_changeGroupContinuously:function(){return null},_changeViewPeriod:function(){return!1},_isInRange:function(e,t){return!!(e&&t&&this.options.min&&this.options.max)&&(S(e)<=S(this.options.min)||S(t)>=S(this.options.max))},_horizontalSlots:function(e,t,i,n){var o,r,s,a=n?"leftSlot":"rightSlot",l={startSlot:t[0].start,endSlot:t[t.length-1].end},c=this.groups[e.groupIndex],d=this._isVerticallyGrouped();return i||(o=this._normalizeHorizontalSelection(e,t,n),o&&(l.startSlot=l.endSlot=o)),this._isGroupedByDate()&&!i?(r=this._changeGroup(e,n),r?l.startSlot=l.endSlot=r:l=this._getNextHorizontalRange(c,a,l)):(l.startSlot=c[a](l.startSlot),l.endSlot=c[a](l.endSlot),i||d||l.startSlot&&l.endSlot||(l.startSlot=l.endSlot=this._changeGroup(e,n))),l.startSlot&&l.endSlot||this._isGroupedByDate()||(s=this._continuousSlot(e,t,n),s=this._changeGroupContinuously(e,s,i,n),s&&(l.startSlot=l.endSlot=s)),l},_getNextHorizontalRange:function(e,t,i){return this._isVerticallyGrouped()||(i.startSlot=e[t](i.startSlot),i.endSlot=e[t](i.endSlot)),i},_verticalSlots:function(e,t,i,n){var o,r,s=this.groups[e.groupIndex],a={startSlot:t[0].start,endSlot:t[t.length-1].end};return i||(o=this._normalizeVerticalSelection(e,t,n),o&&(a.startSlot=a.endSlot=o)),r=n?"upSlot":"downSlot",a=this._getNextVerticalRange(s,r,a,i),i||!this._isVerticallyGrouped()||a.startSlot&&a.endSlot||(a.startSlot=a.endSlot=this._isGroupedByDate()?this._changeDate(e,o,n):this._changeGroup(e,n)),a},_getNextVerticalRange:function(e,t,i,n){return i.startSlot=e[t](i.startSlot,n),i.endSlot=e[t](i.endSlot,n),i},_normalizeHorizontalSelection:function(){return null},_normalizeVerticalSelection:function(e,t,i){var n;return n=i?t[0].start:t[t.length-1].end},_continuousSlot:function(){return null},constrainSelection:function(e){var t,i=this.groups[0];this.inRange(e)?i.daySlotCollectionCount()?i.timeSlotCollectionCount()||(e.isAllDay=!0):e.isAllDay=!1:(t=i.firstSlot(),e.isAllDay=t.isDaySlot,e.start=t.startDate(),e.end=t.endDate()),this.groups[e.groupIndex]||(e.groupIndex=0)},move:function(e,t,i){var n,o,r,s,a,l,c=!1,d=this.groups[e.groupIndex],u=this._isGroupedByDate()&&this._isVerticallyGrouped();if(d.timeSlotCollectionCount()||(e.isAllDay=!0),n=d.ranges(e.start,e.end,e.isAllDay,!1),t===A.DOWN||t===A.UP){if(c=!0,s=t===A.UP,this._updateDirection(e,n,i,s,!0),a=this._verticalSlots(e,n,i,s),!a.startSlot&&!i&&this._changeViewPeriod(e,s,!u))return c}else if((t===A.LEFT||t===A.RIGHT)&&(c=!0,s=t===A.LEFT,this._updateDirection(e,n,i,s,!1),a=this._horizontalSlots(e,n,i,s),!a.startSlot&&!i&&this._changeViewPeriod(e,s,u)))return c;return c&&(o=a.startSlot,r=a.endSlot,i?(l=e.backward,l&&o?e.start=o.startDate():!l&&r&&(e.end=r.endDate())):o&&r&&(e.isAllDay=o.isDaySlot,e.start=o.startDate(),e.end=r.endDate()),e.events=[]),c},moveToEventInGroup:function(t,i,n,o){var r,s,a,l,c=t._continuousEvents||[],d=o?-1:1,u=c.length,h=o?u-1:0;if(n.length)for(a=n[n.length-1],l=0;l<c.length;l++)c[l].uid===a&&(h=l+d);for(;h<u&&h>-1;){if(s=c[h],(!o&&s.start.startDate()>=i.startDate()||o&&s.start.startDate()<=i.startDate())&&s&&e.inArray(s.uid,n)===-1){r=!!s;break}h+=d}return s},moveToEvent:function(e,t){var i,n,o,r,s,a,l=e.groupIndex,c=this.groups[l],d=c.ranges(e.start,e.end,e.isAllDay,!1)[0].start,u=this.groups.length,h=t?-1:1,p=e.events;if(this._isGroupedByDate())if(n=this._getAllEvents(),o=this._getUniqueEvents(n),r=this._getSortedEvents(o),0===p.length)s=this._getNextEventIndexBySlot(d,r,l),t&&s--,i=r[s];else for(a=this._getStartIdx(p,r);a<r.length&&a>-1&&(p.length>0&&(d=this._getSelectedSlot(d,r,i,a,h,t)),d);){if((!t&&r[a].start.startDate()>=d.startDate()||t&&r[a].start.startDate()<=d.startDate())&&p[0]!=r[a].uid){i=r[a];break}a+=h}else for(;l<u&&l>-1&&(i=this.moveToEventInGroup(c,d,p,t),l+=h,c=this.groups[l],c&&!i);)p=[],d=t?c.lastSlot():c.firstSlot(!0);return i&&(e.events=[i.uid],e.start=i.start.startDate(),e.end=i.end.endDate(),e.isAllDay=i.start.isDaySlot,e.groupIndex=i.start.groupIndex),!!i},current:function(e){return void 0===e?this._current:(this._current=e,void(this.content.has(e)&&this._scrollTo(e,this.content[0])))},select:function(e){this.clearSelection(),this._selectEvents(e)||this._selectSlots(e)},_getNextEventIndexBySlot:function(e,t,i){var n,o,r=0,s=x.date.getDate(e.startDate());for(n=0;n<t.length;n++)if(o=x.date.getDate(t[n].start.startDate()),s>o)r++;else if(s.getTime()===o.getTime()&&i>t[n].start.groupIndex)r++;else{if(!(s.getTime()===o.getTime()&&i>=t[n].start.groupIndex&&e.startDate()>t[n].start.startDate()))break;r++}return r},_getSelectedSlot:function(e,t,i,n,o,r){var s,a;return t[n+o]&&t[n].start.groupIndex!==t[n+o].start.groupIndex&&(s=t[n+o].start.groupIndex,a=this.groups[s],a&&!i||(e=null),e=r?a.lastSlot():a.firstSlot(!0)),e},_getStartIdx:function(t,i){var n=0;return e.each(i,function(){return this.uid!==t[0]&&void n++}),n},_getAllEvents:function(){var e,t=[],i=this.groups;for(e=0;e<i.length;e++)i[e]._continuousEvents&&(t=t.concat(i[e]._continuousEvents));return t},_getUniqueEvents:function(e){var t,i,n,o=[];for(t=0;t<e.length;t++){for(i=!1,n=0;n<o.length;n++)if(e[t].uid===o[n].uid){i=!0;break}i||o.push(e[t])}return o},_getSortedEvents:function(t){return t.sort(function(t,i){var n=t.start.startDate(),o=i.start.startDate(),r=x.date.getDate(n)-x.date.getDate(o);return 0===r&&(r=t.start.groupIndex-i.start.groupIndex),0===r&&(r=n.getTime()-o.getTime()),0===r&&(t.start.isDaySlot&&!i.start.isDaySlot&&(r=-1),!t.start.isDaySlot&&i.start.isDaySlot&&(r=1)),0===r&&(r=e(t.element).index()-e(i.element).index()),r})},_selectSlots:function(e){var t,i,n,o,r,s,a,l=e.isAllDay,c=this.groups[e.groupIndex];for(c.timeSlotCollectionCount()||(l=!0),this._selectedSlots=[],t=c.ranges(e.start,e.end,l,!1),o=0;o<t.length;o++)for(r=t[o],s=r.collection,a=r.start.index;a<=r.end.index;a++)n=s.at(a),i=n.element,i.setAttribute("aria-selected",!0),b(i),this._selectedSlots.push({start:n.startDate(),end:n.endDate(),element:i});e.backward&&(i=t[0].start.element),this.current(i)},_selectEvents:function(t){var i,n,o,r=!1,s=t.events,a=this._getAllEvents(),l=a.length;if(!s[0]||!a[0])return r;for(o=e(),t.events=[],i=0;i<l;i++)e.inArray(a[i].uid,s)>-1&&(n=a[i],o=o.add(n.element),t.events.indexOf(n.uid)===-1&&t.events.push(n.uid));return o[0]&&(o.addClass("k-state-selected").attr("aria-selected",!0),this.current(o.last()[0]),this._selectedSlots=[],r=!0),r},inRange:function(e){var t=this.startDate(),i=x.date.addDays(this.endDate(),1),n=e.start,o=e.end;return t<=n&&n<i&&t<o&&o<=i},_resourceValue:function(e,t){return e.valuePrimitive&&(t=x.getter(e.dataValueField)(t)),t},_resourceBySlot:function(e){var t,i,n,o,r,s=this.groupedResources,a={};if(s.length)for(t=e.groupIndex,i=s.length-1;i>=0;i--)n=s[i],o=this._resourceValue(n,n.dataSource.view()[t%n.dataSource.total()]),n.multiple&&(o=[o]),r=x.setter(n.field),r(a,o),t=Math.floor(t/n.dataSource.total());return a},_createResizeHint:function(t,i,n,o){return e(M).css({left:t,top:i,width:n,height:o})},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=e()},_removeMoveHint:function(t){t?(this._moveHint.filter("[data-uid='"+t+"']").remove(),this._moveHint=this._moveHint.filter("[data-uid!='"+t+"']")):(this._moveHint.remove(),this._moveHint=e())},_scrollTo:function(e,t){var i=e.offsetTop,n=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=i+n,a=0;a=o>i?i:s>o+r?n<=r?s-r:i:o,t.scrollTop=a},_shouldInverseResourceColor:function(e){var t=new y(e.color).isDark(),i=this.element.css("color"),n=new y(i).isDark();return t==n},_eventTmpl:function(t,i){var n,o=this.options,r=e.extend({},x.Template,o.templateSettings),s=r.paramName,a="",l=typeof t,c={storage:{},count:0};return"function"===l?(c.storage["tmpl"+c.count]=t,a+="#=this.tmpl"+c.count+"("+s+")#",c.count++):"string"===l&&(a+=t),n=x.template(x.format(i,a),r),c.count>0&&(n=e.proxy(n,c.storage)),n},eventResources:function(e){var t,i,n,o,r,s,a,l,c,d,u=[],h=this.options;if(!h.resources)return u;for(t=0;t<h.resources.length;t++)if(i=h.resources[t],n=i.field,o=x.getter(n)(e),null!=o)for(i.multiple||(o=[o]),r=i.dataSource.view(),s=0;s<o.length;s++){for(a=null,l=o[s],i.valuePrimitive||(l=x.getter(i.dataValueField)(l)),c=0;c<r.length;c++)if(r[c].get(i.dataValueField)==l){a=r[c];break}null!==a&&(d=x.getter(i.dataColorField)(a),u.push({field:i.field,title:i.title,name:i.name,text:x.getter(i.dataTextField)(a),value:l,color:d}))}return u},createLayout:function(n){var o,r,s,a,l,c=-1;for(n.rows||(n.rows=[]),o=0;o<n.rows.length;o++)if(n.rows[o].allDay){c=o;break}r=n.rows[c],c>=0&&n.rows.splice(c,1),s=this.columnLevels=t(n,"columns"),a=this.rowLevels=t(n,"rows"),this.table=e("<table "+i()+' class="k-scheduler-layout k-scheduler-'+this.name+'view"><tbody></tbody></table>'),l=a[a.length-1].length,this.table.find("tbody:first").append(this._topSection(s,r,l)),this.table.find("tbody:first").append(this._bottomSection(s,a,l)),this.element.append(this.table),this._scroller()},refreshLayout:function(){var t,i,n,o,r,s,a=this,l=a.element.find(">.k-scheduler-toolbar"),c=a.element.innerHeight(),d=this._scrollbar,u=0,h=this._isRtl?"left":"right";for(t=0;t<l.length;t++)c-=D(l.eq(t));a.datesHeader&&(u=D(a.datesHeader)),a.timesHeader&&D(a.timesHeader)>u&&(u=D(a.timesHeader)),a.datesHeader&&a.timesHeader&&(i=a.datesHeader.find("table:first tr"),a.timesHeader.find("tr").height(function(t){e(this).height(i.eq(t).height())})),u&&(c-=u),a.footer&&(c-=D(a.footer)),n=function(e){var t,i;return!!e[0].style.height||(t=e.height(),e.height("auto"),i=e.height(),t!=i?(e.height(""),!0):(e.height(""),!1))},o=a.content[0],r=x.support.kineticScrollNeeded?0:d,n(a.element)&&(a.content.height(c>2*d?c:2*d+1),a.times.height(o.clientHeight),s=a.times.find("table"),s.length&&s.height(a.content.find("table")[0].clientHeight)),o.offsetWidth-o.clientWidth>0?(a.table.addClass("k-scrollbar-v"),a.datesHeader.css("padding-"+h,r-parseInt(a.datesHeader.children().css("border-"+h+"-width"),10))):a.datesHeader.css("padding-"+h,""),o.offsetHeight-o.clientHeight>0||o.clientHeight>a.content.children(".k-scheduler-table").height()?a.table.addClass("k-scrollbar-h"):a.table.removeClass("k-scrollbar-h")},_topSection:function(t,i,n){this.timesHeader=r(t.length,i,n);var o=t[t.length-1].length;return this.datesHeader=s(t,o,i),e("<tr>").append(this.timesHeader.add(this.datesHeader).wrap("<td>").parent())},_bottomSection:function(t,i,n){return this.times=a(i,n),this.content=l(t[t.length-1],i[i.length-1]),e("<tr>").append(this.times.add(this.content).wrap("<td>").parent())},_scroller:function(){var t,i=this;this.content.bind("scroll"+E,function(){i.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(this.scrollLeft),i.times.scrollTop(this.scrollTop)}),t=x.touchScroller(this.content,{avoidScrolling:function(t){return e(t.event.target).closest(".k-event.k-event-active").length>0}}),t&&t.movable&&(this._touchScroller=t,this.content=t.scrollElement,t.movable.bind("change",function(e){i.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(-e.sender.x),i.times.scrollTop(-e.sender.y)}))},_resourcesForGroups:function(){var e,t,i,n,o=[],r=this.options.group,s=this.options.resources;if(r=r&&r.resources?r.resources:[],s&&r.length)for(e=0,t=s.length;e<t;e++)for(i=0,n=r.length;i<n;i++)s[e].name===r[i]&&o.push(s[e]);this.groupedResources=o},_createDateLayout:function(e,t,i){return g("rows",e,t,i)},_createColumnsLayout:function(e,t,i,n,o){return v("columns",e,t,i,n,o)},_groupOrientation:function(){var e=this.options.group;return e&&e.resources?e.orientation:"horizontal"},_isGroupedByDate:function(){return this.options.group&&this.options.group.date},_isVerticallyGrouped:function(){return this.groupedResources.length&&"vertical"===this._groupOrientation()},_createRowsLayout:function(e,t,i,n){return v("rows",e,t,i,n)},selectionByElement:function(){return null},clearSelection:function(){this.content.find(".k-state-selected").removeAttr("id").attr("aria-selected",!1).removeClass("k-state-selected")},destroy:function(){var e=this;T.fn.destroy.call(this),e.table&&(x.destroy(e.table),e.table.remove()),e.groups=null,e.table=null,e.content=null,e.times=null,e.datesHeader=null,e.timesHeader=null,e.footer=null,e._resizeHint=null,e._moveHint=null},calendarInfo:function(){return x.getCulture().calendars.standard},prevGroupSlot:function(e,t,i){var n,o=this.groups[t],r=o.ranges(e,e,i,!1)[0].start;if(!(t<=0))return this._isGroupedByDate()?r:this._isVerticallyGrouped()?o.timeSlotCollectionCount()?(n=o._collection(i?r.index:r.collectionIndex,!1),n.last()):(n=o._collection(o.daySlotCollectionCount()-1,!0),n.at(r.index)):o.timeSlotCollectionCount()?(n=o._collection(i?0:o.timeSlotCollectionCount()-1,i),i?n.last():n.at(r.index)):(n=o._collection(r.collectionIndex,!0),n.last())},nextGroupSlot:function(e,t,i){var n,o,r=this.groups[t],s=r.ranges(e,e,i,!1)[0].start;if(!(t>=this.groups.length-1))return this._isGroupedByDate()?s:this._isVerticallyGrouped()?r.timeSlotCollectionCount()?(o=r.daySlotCollectionCount(),n=r._collection(o?0:s.collectionIndex,o),i?n.first():n.at(s.collectionIndex)):(n=r._collection(0,!0),n.at(s.index)):r.timeSlotCollectionCount()?(n=r._collection(0,i),i?n.first():n.at(s.index)):(n=r._collection(s.collectionIndex,!0),n.first())},_eventOptionsForMove:function(){return{}},_updateEventForResize:function(){},_updateEventForSelection:function(e){return e}}),y=function(e){var t,i,n,o,r,s=this,a=y.formats;if(1===arguments.length)for(e=s.resolveColor(e),o=0;o<a.length;o++)t=a[o].re,i=a[o].process,n=t.exec(e),n&&(r=i(n),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)},y.prototype={resolveColor:function(e){return e=e||"#000","#"==e.charAt(0)&&(e=e.substr(1,6)),e=e.replace(/ /g,""),e=e.toLowerCase(),e=y.namedColors[e]||e},normalizeByte:function(e){return e<0||isNaN(e)?0:e>255?255:e},percBrightness:function(){var e=this;return I.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)},isDark:function(){var e=this,t=e.percBrightness();return t<180}},y.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],y.namedColors={aqua:"00ffff",azure:"f0ffff",beige:"f5f5dc",black:"000000",blue:"0000ff",brown:"a52a2a",coral:"ff7f50",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgray:"a9a9a9",darkgreen:"006400",darkorange:"ff8c00",darkred:"8b0000",dimgray:"696969",fuchsia:"ff00ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lightblue:"add8e6",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumblue:"0000cd",
navy:"000080",olive:"808000",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",pink:"ffc0cb",plum:"dda0dd",purple:"800080",red:"ff0000",royalblue:"4169e1",salmon:"fa8072",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",steelblue:"4682b4",tan:"d2b48c",teal:"008080",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},k=/\s*k-state-selected/,e.extend(C.SchedulerView,{createColumns:p,createRows:f,rangeIndex:u,collidingEvents:d,groupEqFilter:_})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.dayview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e,t){function i(e){var t=new Date(1980,1,1,0,0,0);return d(t,k(e)),t}function n(e,t,i){return e>=t&&e<=i}function o(e,t,i,n){return n=n?e<=i:e<i,e>t&&n}function r(e,t,i,n){var o,r=e._continuousEvents,s=r[r.length-1],l=g(t.start.startDate()).getTime();if(n&&s&&g(s.start.startDate()).getTime()==l){for(o=r.length-1;o>-1&&!(r[o].isAllDay||g(r[o].start.startDate()).getTime()<l);o--);r.splice(o+1,0,{element:i,isAllDay:!0,uid:i.attr(a.attr("uid")),start:t.start,end:t.end})}else r.push({element:i,isAllDay:n,uid:i.attr(a.attr("uid")),start:t.start,end:t.end})}function s(e){var t=[],i=e.workWeekStart%7,n=Math.abs(e.workWeekEnd%7);for(t.push(i);n!=i;)i>6?i-=7:i++,t.push(i);return t}var a=window.kendo,l=a.ui,c=a.support.browser,d=a.date.setTime,u=l.SchedulerView,h=a._outerWidth,p=a._outerHeight,f=e.extend,m=e.proxy,g=a.date.getDate,v=a.date.MS_PER_MINUTE,_=a.date.MS_PER_DAY,b="k-current-time",w="k-current-time-arrow",y=.8666,k=a.date.getMilliseconds,x=".kendoMultiDayView",C=a.template('<div title="(#=kendo.format("{0:t} - {1:t}", start, end)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),S=a.template('<div title="(#=kendo.format("{0:t}", start)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">${title}</div></div>'),T=a.template("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd M/dd')#</span>"),D='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !singleDay && !data.tail && !data.middle){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !singleDay && !data.head && !data.middle){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',A='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#" #if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</span><span class="k-event-top-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-up"></span># } #</span><span class="k-event-bottom-actions"># if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-down"></span># } #</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-n"></span># } ## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-s"></span># } #</div>',E=u.extend({init:function(e,t){var i=this;u.fn.init.call(i,e,t),i.title=i.options.title||i.options.name,i._workDays=s(i.options),i._templates(),i._editable(),i.calculateDateRange(),i._groups(),i._currentTime(!0)},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var i,n,o,r,s,l,d,u,f,m,g,v,_,k,x,C,S=this.options;for(S.currentTimeMarker.useLocalTimezone===!1&&(i=S.dataSource.options.schema.timezone,S.dataSource&&i&&(n=a.timezone.offset(t,i),t=a.timezone.convert(t,t.getTimezoneOffset(),n))),this.times.find("."+b).remove(),this.content.find("."+b).remove(),o=S.group&&"horizontal"!=S.group.orientation?this.groups.length:1,r=this.times.find("tr:first th:first"),s=this.times.find("tr:first th:last"),l=0;l<o;l++){if(d=this.groups[l],!d)return;if(u=a.date.toUtcTime(t),f=d.timeSlotRanges(u,u+1),0===f.length)return;m=f[0].collection,g=m.slotByStartDate(t),g&&(v="<div class='"+b+"'></div>",_=e(v).prependTo(this.times),k=Math.round(f[0].innerRect(t,new Date(t.getTime()+1),!1).top),x={},C=this.content[0].scrollWidth,(c.msie||c.edge)&&(C-=1),this._isRtl?(x.right=r.position().left+p(r)-p(s),_.addClass(w+"-left")):(x.left=s.position().left,_.addClass(w+"-right")),x.top=k-h(_)*y/2,_.css(x),e(v).prependTo(this.content).css({top:k,height:"1px",right:0,width:C,left:0}))}},_currentTime:function(e){var i=this,n=i.options.currentTimeMarker;n!==!1&&n.updateInterval!==t&&(i._currentTimeMarkerUpdater(),e&&(i._currentTimeUpdateTimer=setInterval(m(this._currentTimeMarkerUpdater,i),n.updateInterval)))},_updateResizeHint:function(e,t,i,n){var o,r,s,l,c,d,h,p,f,m,g,v,_=e.isMultiDay(),b=this.groups[t],w=b.ranges(i,n,_,e.isAllDay);for(this._removeResizeHint(),c=0;c<w.length;c++)if(d=w[c],h=d.startSlot(),this._isGroupedByDate()&&_)for(p=h.index;p<=d.end.index;p++)f=d.collection._slots[p],o=f.offsetWidth,r=f.clientHeight,s=f.offsetTop,l=u.fn._createResizeHint.call(this,f.offsetLeft,s,o,r),this._resizeHint=this._resizeHint.add(l);else o=h.offsetWidth,r=h.clientHeight,s=h.offsetTop,_?o=d.innerWidth():(m=d.outerRect(i,n,this.options.snap),s=m.top,r=m.bottom-m.top),l=u.fn._createResizeHint.call(this,h.offsetLeft,s,o,r),this._resizeHint=this._resizeHint.add(l);g="t",v=this.content,_&&(g="M/dd",v=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),v.length||(v=this.content)),this._resizeHint.appendTo(v),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(a.toString(a.timezone.toLocalDate(i),g)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(a.toString(a.timezone.toLocalDate(n),g))},_updateMoveHint:function(t,i,n){var o,r,s,l,c,d,u,h,p,f,m=t.isMultiDay(),g=this.groups[i],v=a.date.toUtcTime(t.start)+n,_=v+t.duration(),b=g.ranges(v,_,m,t.isAllDay);for(v=a.timezone.toLocalDate(v),_=a.timezone.toLocalDate(_),this._removeMoveHint(t.uid),!m&&(0===k(_)||k(_)<k(this.startTime()))&&b.length>1&&b.pop(),o=e(),r=0;r<b.length;r++)if(s=b[r],l=s.start,d={left:l.offsetLeft+2,top:l.offsetTop},this._isGroupedByDate()&&m)for(u=l.index;u<=s.end.index;u++)h=s.collection._slots[u],d.left=this._isRtl?.1*h.clientWidth+h.offsetLeft+2:h.offsetLeft+2,d.height=h.offsetHeight,d.width=.9*h.clientWidth-4,c=this._createEventElement(t.clone({start:v,end:_}),!m),this._appendMoveHint(c,d),o=o.add(c);else this._isRtl&&(d.left=.1*l.clientWidth+l.offsetLeft+2),m?d.width=s.innerWidth()-4:(p=s.outerRect(v,_,this.options.snap),d.top=p.top,d.height=p.bottom-p.top,d.width=.9*l.clientWidth-4),c=this._createEventElement(t.clone({start:v,end:_}),!m),this._appendMoveHint(c,d),o=o.add(c);f=this.content,m&&(f=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),f.length||(f=this.content)),o.appendTo(f)},_appendMoveHint:function(e,t){e.addClass("k-event-drag-hint"),e.css(t),this._moveHint=this._moveHint.add(e)},_slotByPosition:function(e,t){var i,n,o,r;for(this._isVerticallyGrouped()?(n=this.content.offset(),t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft):n=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)").find(">div").offset(),n&&(e-=n.left,t-=n.top),e=Math.ceil(e),t=Math.ceil(t),r=0;r<this.groups.length;r++)if(o=this.groups[r],i=o.daySlotByPosition(e,t,this._isGroupedByDate()))return i;for(n&&(e+=n.left,t+=n.top),n=this.content.offset(),e-=n.left,t-=n.top,this._isVerticallyGrouped()||(t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft),e=Math.ceil(e),t=Math.ceil(t),r=0;r<this.groups.length;r++)if(o=this.groups[r],i=o.timeSlotByPosition(e,t))return i;return null},_groupCount:function(){var e=this.groupedResources,t=this._isGroupedByDate();return e.length?"vertical"===this._groupOrientation()?t?this._columnCountForLevel(e.length-1):this._rowCountForLevel(e.length-1):t?this._columnCountForLevel(e.length)/this._columnCountForLevel(0):this._columnCountForLevel(e.length)/this._columnOffsetForResource(e.length):1},_columnCountInResourceView:function(){var e=this.groupedResources,t=this._isGroupedByDate();return!e.length||this._isVerticallyGrouped()?t?this._rowCountForLevel(0):this._columnCountForLevel(0):t?this._columnCountForLevel(0):this._columnOffsetForResource(e.length)},_timeSlotGroups:function(e,t){var i,n,o,r,s,a,l,c,d,u,h=this._timeSlotInterval(),p=e,f=this._isGroupedByDate(),m=this.content.find("tr:not(.k-scheduler-header-all-day)");for(m.attr("role","row"),s=m.length,this._isVerticallyGrouped()&&(f&&(p=t),s=Math.floor(s/p)),a=0;a<p;a++)for(l=0,c=0,this._isVerticallyGrouped()?l=a:c=a,o=l*s;o<(l+1)*s;){if(d=m[o].children,o%s===0&&(n=k(new Date((+this.startTime())))),u=0,f)if(this._isVerticallyGrouped())for(r=0;r<e;r++)i=this.groups[r],this._addTimeSlotGroup(i,d,r,n,h,a);else for(i=this.groups[a],r=c;r<e*t;r+=e)this._addTimeSlotGroup(i,d,r,n,h,u),u++;else for(i=this.groups[a],r=c*t;r<(c+1)*t;r++)this._addTimeSlotGroup(i,d,r,n,h,u),u++;n+=h,o++}},_addTimeSlotGroup:function(e,t,i,n,o,r){var s,a,l,c=t[i],d=e.getTimeSlotCollection(r),u=this._dates[r];u&&(s=Date.UTC(u.getFullYear(),u.getMonth(),u.getDate()),a=s+n,l=a+o,c.setAttribute("role","gridcell"),c.setAttribute("aria-selected",!1),d.addTimeSlot(c,a,l))},_addDaySlotGroup:function(e,t,i,n,o){var r,s=t[i],l=this._dates[o];l&&(r=Date.UTC(l.getFullYear(),l.getMonth(),l.getDate()),s.setAttribute("role","gridcell"),s.setAttribute("aria-selected",!1),e.addDaySlot(s,r,r+a.date.MS_PER_DAY))},_daySlotGroups:function(e,t){var i,n,o,r,s,a,l,c,d,u=e,h=this._isGroupedByDate();for(this._isVerticallyGrouped()?(h&&(u=t),i=this.element.find(".k-scheduler-header-all-day")):i=this.element.find(".k-scheduler-header-all-day tr"),i.attr("role","row"),o=0;o<u;o++)if(r=0,this._isVerticallyGrouped()&&(r=o),l=i[r].children,c=0,this._isVerticallyGrouped()||(c=o),d=0,h)if(this._isVerticallyGrouped())for(n=0;n<e;n++)s=this.groups[n],a=s.getDaySlotCollection(0),this._addDaySlotGroup(a,l,n,t,o);else for(s=this.groups[o],a=s.getDaySlotCollection(0),n=c;n<e*t;n+=e)this._addDaySlotGroup(a,l,n,t,d),d++;else for(s=this.groups[o],a=s.getDaySlotCollection(0),n=c*t;n<(c+1)*t;n++)this._addDaySlotGroup(a,l,n,t,d),d++},_groups:function(){var e,t,i,n=this._groupCount(),o=this._columnCountInResourceView();for(this.groups=[],e=0;e<n;e++){for(t=this._addResourceView(e),i=0;i<o;i++)this._dates[i]&&t.addTimeSlotCollection(this._dates[i],a.date.addDays(this._dates[i],1));this.options.allDaySlot&&t.addDaySlotCollection(this._dates[0],a.date.addDays(this._dates[this._dates.length-1],1))}this._timeSlotGroups(n,o),this.options.allDaySlot&&this._daySlotGroups(n,o)},options:{name:"MultiDayView",selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}",allDaySlot:!0,showWorkHours:!1,title:"",startTime:a.date.today(),endTime:a.date.today(),minorTickCount:2,majorTick:60,majorTimeHeaderTemplate:"#=kendo.toString(date, 't')#",minorTimeHeaderTemplate:"&\\#8203;",groupHeaderTemplate:"#=text#",slotTemplate:"&nbsp;",allDaySlotTemplate:"&nbsp;",eventTemplate:C,allDayEventTemplate:S,dateHeaderTemplate:T,editable:!0,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,footer:{command:"workDay"},messages:{allDay:"all day",showFullDay:"Show full day",showWorkDay:"Show business hours"},currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0}},events:["remove","add","edit"],_templates:function(){var e=this.options,t=f({},a.Template,e.templateSettings);this.eventTemplate=this._eventTmpl(e.eventTemplate,A),this.allDayEventTemplate=this._eventTmpl(e.allDayEventTemplate,D),this.majorTimeHeaderTemplate=a.template(e.majorTimeHeaderTemplate,t),this.minorTimeHeaderTemplate=a.template(e.minorTimeHeaderTemplate,t),this.dateHeaderTemplate=a.template(e.dateHeaderTemplate,t),this.slotTemplate=a.template(e.slotTemplate,t),this.allDaySlotTemplate=a.template(e.allDaySlotTemplate,t),this.groupHeaderTemplate=a.template(e.groupHeaderTemplate,t)},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+x,".k-event a:has(.k-i-close)",function(i){t.trigger("remove",{uid:e(this).closest(".k-event").attr(a.attr("uid"))}),i.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+x,".k-scheduler-content td",function(i){var n,o;e(this).parent().hasClass("k-scheduler-header-all-day")||(n=t._slotByPosition(i.pageX,i.pageY),n&&(o=t._resourceBySlot(n),t.trigger("add",{eventInfo:f({start:n.startDate(),end:n.endDate()},o)})),i.preventDefault())}).on("dblclick"+x,".k-scheduler-header-all-day td",function(e){var i,n=t._slotByPosition(e.pageX,e.pageY);n&&(i=t._resourceBySlot(n),t.trigger("add",{eventInfo:f({},{isAllDay:!0,start:a.date.getDate(n.startDate()),end:a.date.getDate(n.startDate())},i)})),e.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+x,".k-event",function(i){t.trigger("edit",{uid:e(this).closest(".k-event").attr(a.attr("uid"))}),i.preventDefault()})},_touchEditable:function(){var i=this,n=0;a.support.mobileOS.android&&(n=5),i.options.editable.create!==!1&&(i._addUserEvents=new a.UserEvents(i.element,{threshold:n,filter:".k-scheduler-content td",useClickAsTap:!a.support.browser.edge,tap:function(n){var o,r,s,a;i._scrolling||e(n.target).parent().hasClass("k-scheduler-header-all-day")||(o=n.x.location!==t?n.x.location:n.x,r=n.y.location!==t?n.y.location:n.y,s=i._slotByPosition(o,r),s&&(a=i._resourceBySlot(s),i.trigger("add",{eventInfo:f({start:s.startDate(),end:s.endDate()},a)})),n.preventDefault())}}),i._allDayUserEvents=new a.UserEvents(i.element,{threshold:n,useClickAsTap:!a.support.browser.edge,filter:".k-scheduler-header-all-day td",tap:function(e){var n,o,r,s;i._scrolling||(n=e.x.location!==t?e.x.location:e.x,o=e.y.location!==t?e.y.location:e.y,r=i._slotByPosition(n,o),r&&(s=i._resourceBySlot(r),i.trigger("add",{eventInfo:f({},{isAllDay:!0,start:a.date.getDate(r.startDate()),end:a.date.getDate(r.startDate())},s)})),e.preventDefault())}})),i.options.editable.update!==!1&&(i._editUserEvents=new a.UserEvents(i.element,{threshold:n,useClickAsTap:!a.support.browser.edge,filter:".k-event",tap:function(t){if(!i._scrolling){var n=e(t.target).closest(".k-event");n.hasClass("k-event-active")||i.trigger("edit",{uid:n.attr(a.attr("uid"))}),t.preventDefault()}}}))},_layout:function(e){var t,i,n,o=[],r=[],s=this.options,l=this,c=l._isGroupedByDate();for(t=0;t<e.length;t++)i={},i.text=l.dateHeaderTemplate({date:e[t]}),a.date.isToday(e[t])&&(i.className="k-today"),o.push(i);return n=this.groupedResources,s.allDaySlot&&r.push({text:s.messages.allDay,allDay:!0,cellContent:function(t){var i=t;return t=n.length&&"vertical"!==l._groupOrientation()?t%e.length:t,l.allDaySlotTemplate({date:e[t],resources:function(){return l._resourceBySlot({groupIndex:i})}})}}),this._forTimeRange(this.startTime(),this.endTime(),function(e,t,i,n){var o=t?l.majorTimeHeaderTemplate:l.minorTimeHeaderTemplate,s={text:o({date:e}),className:n?"k-slot-cell":""};r.push(s)}),n.length&&("vertical"===this._groupOrientation()?c?(r=this._createDateLayout(o,r),o=this._createColumnsLayout(n,null,this.groupHeaderTemplate)):r=this._createRowsLayout(n,r,this.groupHeaderTemplate):o=c?this._createColumnsLayout(n,o,this.groupHeaderTemplate,o):this._createColumnsLayout(n,o,this.groupHeaderTemplate)),{columns:o,rows:r}},_footer:function(){var t,i,n,o=this.options;o.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',i=o.footer.command,i&&"workDay"===i?(t+='<ul class="k-reset k-header">',t+='<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>',t+=(o.showWorkHours?o.messages.showFullDay:o.messages.showWorkDay)+"</a></li>",t+="</ul>"):t+="&nbsp;",t+="</div>",this.footer=e(t).appendTo(this.element),n=this,this.footer.on("click"+x,".k-scheduler-fullday",function(e){e.preventDefault(),n.trigger("navigate",{view:n.name||o.name,date:o.date,isWorkDay:!o.showWorkHours})}))},_forTimeRange:function(e,t,n,o){var r,s,a,l,c,u,h,p,f,m,g,b,w,y,x,C;for(e=i(e),t=i(t),r=this,s=k(e),a=k(t),l=r.options.minorTickCount,c=r.options.majorTick*v,u=c/l||1,h=new Date((+e)),p=h.getDate(),m=0,b="",g=_/u,s!=a&&(s>a&&(a+=_),g=(a-s)/u),g=Math.round(g);m<g;m++)w=m%(c/u),y=0===w,x=w<l-1,C=w===l-1,b+=n(h,y,x,C),d(h,u,!1);return a&&(f=k(h),p<h.getDate()&&(f+=_),f>a&&(h=new Date((+t)))),o&&(b+=o(h)),b},_content:function(e){var t,i,n,o=this,r=o.options,s=o.startTime(),a=this.endTime(),l=1,c=1,d=e.length,u="",h=this.groupedResources,p=this.allDaySlotTemplate,f=!1,m=o._isGroupedByDate(),g=0;for(h.length&&(f="vertical"===o._groupOrientation(),f?(c=this._rowCountForLevel(this.rowLevels.length-2),m&&(l=this._columnCountForLevel(this.columnLevels.length-1)),r.allDaySlot&&(t=function(t){var i,n='<tr class="k-scheduler-header-all-day">',r=m?0:t,s=function(){return o._resourceBySlot({groupIndex:r})};if(m)for(;r<l;r++)n+="<td>"+p({date:e[g],resources:s})+"</td>";else for(i=0;i<e.length;i++)n+="<td>"+p({date:e[i],resources:s})+"</td>";return n+"</tr>"})):l=m?this._columnCountForLevel(this.columnLevels.length-1)/this._columnCountForLevel(0):this._columnCountForLevel(this.columnLevels.length-2)),u+="<tbody>",i=function(t,i,r){var s,a,c,u="",h=0;if(u="<tr"+(r?' class="k-middle-row"':"")+">",m)for(s=0,a=d;s<a;s++){for(h=0;h<l;h++)c=s,f&&(c=g),u=o._addCellsToContent(u,e,t,c,h,n);if(f)break}else for(;h<l;h++)for(s=0,a=d;s<a;s++)u=o._addCellsToContent(u,e,t,s,h,n);return u+="</tr>"},n=0;n<c;n++)u+=t?t(n):"",u+=this._forTimeRange(s,a,i),f&&g++;u+="</tbody>",this.content.find("table").append(u)},_addCellsToContent:function(e,t,i,n,o,r){var s,l=this,c="",d=this.slotTemplate,u="vertical"===this._groupOrientation(),h=function(e){return function(){return l._resourceBySlot({groupIndex:e})}};return a.date.isToday(t[n])&&(c+="k-today"),(a.date.getMilliseconds(i)<a.date.getMilliseconds(this.options.workDayStart)||a.date.getMilliseconds(i)>=a.date.getMilliseconds(this.options.workDayEnd)||!this._isWorkDay(t[n]))&&(c+=" k-nonwork-hour"),e+="<td"+(""!==c?' class="'+c+'"':"")+">",s=a.date.getDate(t[n]),a.date.setTime(s,a.date.getMilliseconds(i)),e+=d({date:s,resources:h(u&&!l._isGroupedByDate()?r:o)}),e+="</td>"},_isWorkDay:function(e){var t,i=e.getDay(),n=this._workDays;for(t=0;t<n.length;t++)if(n[t]===i)return!0;return!1},_render:function(t){var i,n=this;t=t||[],this._dates=t,this._startDate=t[0],this._endDate=t[t.length-1||0],this.createLayout(this._layout(t)),this._content(t),this._footer(),this.refreshLayout(),i=this.element.find(".k-scheduler-header-all-day td"),i.length&&(this._allDayHeaderHeight=i.first()[0].clientHeight),n.element.on("click"+x,".k-nav-day",function(t){var i,o=e(t.currentTarget).closest("th"),r=o.offset(),s=0,a=p(o);n._isGroupedByDate()&&(n._isVerticallyGrouped()?(s=h(n.times),a=0):a=p(n.datesHeader)),i=n._slotByPosition(r.left+s,r.top+a),n.trigger("navigate",{view:"day",date:i.startDate()})})},startTime:function(){var e=this.options;return e.showWorkHours?e.workDayStart:e.startTime},endTime:function(){var e=this.options;return e.showWorkHours?e.workDayEnd:e.endTime},startDate:function(){return this._startDate},endDate:function(){return this._endDate},_end:function(e){var t=k(this.endTime())||_;return e&&(t=0),new Date(this._endDate.getTime()+t)},nextDate:function(){return a.date.nextDay(this.endDate())},previousDate:function(){return a.date.previousDay(this.startDate())},calculateDateRange:function(){this._render([this.options.date])},destroy:function(){var e=this;e._currentTimeUpdateTimer&&clearInterval(e._currentTimeUpdateTimer),e.datesHeader&&e.datesHeader.off(x),e.element&&e.element.off(x),e.footer&&e.footer.remove(),u.fn.destroy.call(this),this._isMobile()&&e.options.editable&&(e.options.editable.create!==!1&&(e._addUserEvents.destroy(),e._allDayUserEvents.destroy()),e.options.editable.update!==!1&&e._editUserEvents.destroy())},inRange:function(e){var t,i,n,o,r=u.fn.inRange.call(this,e);return e.isAllDay?r:(t=k(this.startTime()),i=k(this.endTime())||a.date.MS_PER_DAY,n=k(e.start),o=k(e.end)||a.date.MS_PER_DAY,r&&t<=n&&o<=i)},selectionByElement:function(e){var t=e.offset();return this._slotByPosition(t.left,t.top)},_timeSlotInterval:function(){var e=this.options;return e.majorTick/e.minorTickCount*v},_timeSlotIndex:function(e){var t=this.options,i=k(e),n=k(this.startTime()),o=t.majorTick/t.minorTickCount*v;return(i-n)/o},_slotIndex:function(e,t){return t?this._dateSlotIndex(e):this._timeSlotIndex(e)},_dateSlotIndex:function(e,t){var i,o,r,s,l=this._dates||[],c=1;for(i=0,o=l.length;i<o;i++)if(r=a.date.getDate(l[i]),s=new Date(a.date.getDate(l[i]).getTime()+_-(t?0:1)),n(e,r,s))return i*c;return-1},_positionAllDayEvent:function(t,i){var n,o,r,s,a,l,c,d=i.innerWidth(),h=i.start.index,p=i.end.index,f=u.collidingEvents(i.events(),h,p),m=this._headerColumnCount||0,g=2,v=h!==p?5:4,_=this._allDayHeaderHeight,b=i.startSlot();for(t.css({left:b.offsetLeft+g,width:d-v}),i.addEvent({slotIndex:h,start:h,end:p,element:t}),f.push({slotIndex:h,start:h,end:p,element:t}),n=u.createRows(f),n.length&&n.length>m&&(this._headerColumnCount=n.length),o=i.start.offsetTop,r=0,s=n.length;r<s;r++)for(a=n[r].events,l=0,c=a.length;l<c;l++)e(a[l].element).css({top:o+r*_})},_arrangeColumns:function(e,t,i,n){var o,r,s,a,l,c,d,h,p,f,m,g=n.start;for(e={element:e,slotIndex:g.index,start:t,end:t+i},r=g.clientWidth,s=.1*r,l=n.events(),c=u.collidingEvents(l,e.start,e.end),n.addEvent(e),c.push(e),o=u.createColumns(c),d=(r-s)/o.length,h=0,p=o.length;h<p;h++)for(a=o[h].events,f=0,m=a.length;f<m;f++)a[f].element[0].style.width=d-4+"px",a[f].element[0].style.left=(this._isRtl?s:0)+g.offsetLeft+h*d+2+"px"},_positionEvent:function(e,t,i){var n=e._startTime||e.start,o=e._endTime||e.end,r=i.innerRect(n,o,!1),s=r.bottom-r.top-2;s<0&&(s=0),t.css({top:r.top,height:s}),this._arrangeColumns(t,r.top,t[0].clientHeight,i)},_createEventElement:function(t,i,o,r){var s,l,c,d,u,h,p=i?this.eventTemplate:this.allDayEventTemplate,m=this.options,v=m.editable,b=this._isMobile(),w=v&&v.destroy!==!1&&!b,y=v&&v.resize!==!1,x=g(this.startDate()),C=g(this.endDate()),S=k(this.startTime()),T=k(this.endTime()),D=t._time("start"),A=t._time("end");return S>=T&&(T=k(new Date(this.endTime().getTime()+_-1))),i||t.isAllDay||(C=new Date(C.getTime()+_)),l=t.start,c=t.end,t.isAllDay&&(c=g(t.end)),!n(g(l),x,C)&&!n(c,x,C)||i&&D<S&&A>T?s=!0:g(l)<x||i&&D<S?r=!0:(c>C&&!i||i&&A>T)&&(o=!0),d=this.eventResources(t),t._startTime&&D!==a.date.getMilliseconds(t.start)&&(l=new Date(D),l=a.timezone.apply(l,"Etc/UTC")),t._endTime&&A!==a.date.getMilliseconds(t.end)&&(c=new Date(A),c=a.timezone.apply(c,"Etc/UTC")),u=f({},{ns:a.ns,resizable:y,showDelete:w,middle:s,head:o,tail:r,singleDay:1==this._dates.length,resources:d,inverseColor:!(!d||!d[0])&&this._shouldInverseResourceColor(d[0]),messages:m.messages},t,{start:l,end:c}),h=e(p(u)),this.angular("compile",function(){return{elements:h,data:[{dataItem:u}]}}),h},_isInTimeSlot:function(e){var t,i=this.startTime(),n=this.endTime(),r=e._startTime||e.start,s=e._endTime||e.end;return k(n)===k(a.date.getDate(n))&&(n=a.date.getDate(n),d(n,_-1)),e._date("end")>e._date("start")&&(s=+e._date("end")+(_-1)),s=e._endTime?s-e._date("end"):k(new Date(s)),r=e._startTime?r-e._date("start"):k(new Date(r)),n=k(n),i=k(i),i===r&&r===s||(t=r!==n,o(r,i,n,t)||o(s,i,n,t)||o(i,r,s)||o(n,r,s))},_isInDateSlot:function(e){var t=this.groups[0],i=t.firstSlot().start,o=t.lastSlot().end-1,r=a.date.toUtcTime(e.start),s=a.date.toUtcTime(e.end);return(n(r,i,o)||n(s,i,o)||n(i,r,s)||n(o,r,s))&&(!n(s,i,i)||n(s,r,r)||e.isAllDay)},_updateAllDayHeaderHeight:function(e){var t,i;if(this._height!==e&&(this._height=e,t=this.element.find(".k-scheduler-header-all-day td"),t.length))for(t.parent().add(this.element.find(".k-scheduler-times-all-day").parent()).height(e),i=0;i<this.groups.length;i++)this.groups[i].refresh()},_renderEvents:function(e,t){var i,n,o,s,a,l,c,d,u,h,p,f,m,g,v,b,w,y,k,x,C,S=this.datesHeader.find(".k-scheduler-header-wrap > div"),T=this._isGroupedByDate();for(n=0,o=e.length;n<o;n++)if(i=e[n],this._isInDateSlot(i))if(s=i.isAllDay||i.duration()>=_,a=s&&!this._isVerticallyGrouped()?S:this.content,s){if(this.options.allDaySlot&&(p=this.groups[t],p._continuousEvents||(p._continuousEvents=[]),c=p.slotRanges(i),c.length))if(d=c[0],b=d.start.index,w=d.end.index,T&&b!==w)for(u=d.start.start,h=d.end.end,y=new Date(u),k=new Date(u),x=d.start.index;x<=d.end.index;x++)l=this._createEventElement(i,!s,x!==w,x!==b),C=p.daySlotRanges(y,k,!0)[0],k.setDate(k.getDate()+1),y.setDate(y.getDate()+1),this._positionAllDayEvent(l,C),r(p,C,l,!0),l.appendTo(a);else l=this._createEventElement(i,!s),this._positionAllDayEvent(l,c[0]),r(p,c[0],l,!0),l.appendTo(a)}else if(this._isInTimeSlot(i))for(p=this.groups[t],p._continuousEvents||(p._continuousEvents=[]),c=p.slotRanges(i),f=c.length,m=0;m<f;m++)d=c[m],u=i.start,h=i.end,f>1&&(0===m?h=d.end.endDate():m==f-1?u=d.start.startDate():(u=d.start.startDate(),h=d.end.endDate())),g=i.clone({start:u,end:h,_startTime:i._startTime,_endTime:i.endTime}),this._isInTimeSlot(g)&&(v=d.head,l=this._createEventElement(i,!s,v,d.tail),l.appendTo(a),this._positionEvent(g,l,d),r(p,d,l,!1))},render:function(t){var i,o,r,s;for(this._headerColumnCount=0,this._groups(),this.element.find(".k-event").remove(),t=new a.data.Query(t).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray(),i=[],this._eventsByResource(t,this.groupedResources,i),o=e.map(this._dates,function(t){return Math.max.apply(null,e.map(i,function(i){return e.grep(i,function(e){return e.isMultiDay()&&n(t,g(e.start),g(e.end))}).length}))}),r=Math.max.apply(null,o),this._updateAllDayHeaderHeight((r+1)*this._allDayHeaderHeight),s=0;s<i.length;s++)this._renderEvents(i[s],s);this.refreshLayout(),this._currentTime(!1),this.trigger("activate")},_eventsByResource:function(e,t,i){var n,o,r,s,l=t[0];if(l)for(n=l.dataSource.view(),o=0;o<n.length;o++)r=this._resourceValue(l,n[o]),s=new a.data.Query(e).filter({field:l.field,operator:u.groupEqFilter(r)}).toArray(),t.length>1?this._eventsByResource(s,t.slice(1),i):i.push(s);else i.push(e)},_columnOffsetForResource:function(e){return this._columnCountForLevel(e)/this._columnCountForLevel(e-1)},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},clearSelection:function(){this.content.add(this.datesHeader).find(".k-state-selected").removeAttr("id").attr("aria-selected",!1).removeClass("k-state-selected")},_updateDirection:function(e,t,i,n,o){var r=e.isAllDay,s=t[0].start,a=t[t.length-1].end;i&&(o?r||s.index!==a.index||s.collectionIndex!==a.collectionIndex||(e.backward=n):(r&&s.index===a.index||!r&&s.collectionIndex===a.collectionIndex)&&(e.backward=n))},_changeViewPeriod:function(e,t,i){var n,o,r,s,a,l,c,u,h,p,f,m,g;if(!i)return n=t?this.previousDate():this.nextDate(),o=e.start,r=e.end,s=this._isGroupedByDate()&&this._isVerticallyGrouped(),a=this.groups[e.groupIndex],l=t?a._timeSlotCollections:a._getCollections(a.daySlotCollectionCount()),c=l[l.length-1]._slots,u=t||a.daySlotCollectionCount()?c.length-1:0,p=new Date(n),f=new Date(n),!this._isInRange(p,f)&&(e.start=p,e.end=f,s?(m=new Date(c[u].startDate()),g=new Date(c[u].endDate()),h=k(g)?k(g):_,d(e.start,k(m)),d(e.end,h),a.daySlotCollectionCount()&&(e.isAllDay=!e.isAllDay)):(h=e.isAllDay||!k(r)?_:k(r),d(e.start,k(o)),d(e.end,h)),this._isVerticallyGrouped()||(e.groupIndex=t?this.groups.length-1:0),e.events=[],!0)}});f(!0,l,{MultiDayView:E,DayView:E.extend({options:{name:"DayView",title:"Day"},name:"day"}),WeekView:E.extend({options:{name:"WeekView",title:"Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"week",calculateDateRange:function(){var e,t,i=this.options.date,n=a.date.dayOfWeek(i,this.calendarInfo().firstDay,-1),o=[];for(e=0,t=7;e<t;e++)o.push(n),n=a.date.nextDay(n);this._render(o)}}),WorkWeekView:E.extend({options:{name:"WorkWeekView",title:"Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"workWeek",nextDate:function(){var e=a.date.dayOfWeek(a.date.nextDay(this.startDate()),this.calendarInfo().firstDay,1);return a.date.addDays(e,this._workDays[0])},previousDate:function(){var e=a.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),t=this._workDays;return a.date.addDays(e,t[t.length-1]-7)},calculateDateRange:function(){for(var e=this.options.date,t=a.date.dayOfWeek,i=t(e,this.calendarInfo().firstDay,-1),n=t(i,this.options.workWeekStart,1),o=t(n,this.options.workWeekEnd,1),r=[];n<=o;)r.push(n),n=a.date.nextDay(n);this._render(r)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.agendaview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e){function t(e){var t,i,n=0;for(t=0,i=e.length;t<i;t++)n+=e[t].items.length;return n}function i(e,t){return e.valuePrimitive&&(t=r.getter(e.dataValueField)(t)),t}function n(e){for(var t,i=0,n=e.length,r=[];i<n;i++)t=e[i],t.groups?(t=o(t.groups),r=r.concat(t)):r=r.concat(o(t.items));return r}function o(e){for(var t=[].concat(e),i=t.shift(),n=[],o=[].push;i;)i.groups?o.apply(t,i.groups):i.items?o.apply(t,i.items):o.call(n,i),i=t.shift();return n}var r=window.kendo,s=r.ui,a=".kendoAgendaView",l='<div class="k-task" title="#:(data.title || "").replace(/"/g,"\'")#" data-#=kendo.ns#uid="#=uid#"># if (resources[0]) {#<span class="k-scheduler-mark" style="background-color:#=resources[0].color#"></span># } ## if (data.isException()) { #<span class="k-icon k-i-non-recurrence"></span># } else if (data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #{0}#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</div>',c=r.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){return e.concat(t)},_getGroupsInDay:function(){return[]},_getSumOfItemsForDate:function(){return 0},_renderTaskGroupsCells:function(e,t,i,n){var o=this._view;0===i&&0===n&&t.length&&o._renderTaskGroupsCells(e,t)},_renderDateCell:function(e,t,i,n,o,s){var a=this._view;e.push(r.format('<td class="k-scheduler-datecolumn{3}{2}" rowspan="{0}">{1}</td>',i.length,a._dateTemplate({date:n}),o!=s.length-1||t.length?"":" k-last",t.length?"":" k-first"))},_renderDates:function(){},_getParents:function(e){return e.splice(0)},_getGroupsByDate:function(){},_renderTaskGroups:function(e,t,i){
var n=this._view;e.append(n._renderTaskGroups(t,i))}}),d=r.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){var i,n,o=this._view;return o._isMobilePhoneView()?e.concat(t):(i=t.slice(0,1),n=t.slice(1),i.concat(e).concat(n))},_compareDateGroups:function(e,t,i){return e[i].text==t[i].text&&(0===i||this._compareDateGroups(e,t,i-1))},_getGroupsInDay:function(e,t){var i,n,o,r,s,a=[],l=null;for(i=0;i<e.length;i++)for(n=0;n<e[i].items.length;n++){if(o=0,0===a.length)for(o;o<t[i].length;o++)a.push([1]);else for(o;o<t[i].length;o++)if(this._compareDateGroups(t[i],l,o))a[o][a[o].length-1]++;else{for(r=a[o][a[o].length-1]-1,s=0;s<r;s++)a[o].push(0);a[o].push(1)}l=t[i]}return a},_getSumOfItemsForDate:function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].items.length;return i},_renderTaskGroupsCells:function(e,t,i,n,o,s,a,l){var c,d=this._view,u=d._isMobilePhoneView();if(u)0===i&&0===n&&t.length&&d._renderTaskGroupsCells(e,t);else for(0===i&&0===n&&e.push(r.format('<td class="k-scheduler-datecolumn k-first" rowspan="{0}">{1}</td>',s,d._dateTemplate({date:a}))),c=0;c<t[i].length;c++)o[c][l]&&e.push(r.format('<td class="k-scheduler-groupcolumn" rowspan="{0}">{1}</td>',o[c][l],d._groupTemplate({value:t[i][c].text}),t[i][c].className))},_renderDateCell:function(){},_renderDates:function(e){var t,i=this._view,n=i._groupsByDate.sort(function(e,t){return e.array[0].value.getTime()-t.array[0].value.getTime()});for(t=0;t<n.length;t++)e.append(i._renderTaskGroups(n[t].array,n[t].groups))},_getParents:function(e){return e.slice(0)},_getGroupsByDate:function(e,t,i){var n,o,r,s,a=this._view;if(e[t].items)for(n=0;n<e[t].items.length;n++){for(o=e[t].items[n].value,r=!1,s=0;s<a._groupsByDate.length;s++)a._groupsByDate[s].array[0].value.getTime()===o.getTime()&&(r=!0,a._groupsByDate[s].array.push(e[t].items[n]),a._groupsByDate[s].groups.push(i));r||a._groupsByDate.push({array:[e[t].items[n]],groups:[i]})}},_renderTaskGroups:function(){}});r.ui.scheduler.AgendaGroupedView=c,r.ui.scheduler.AgendaGroupedByDateView=d,s.AgendaView=s.SchedulerView.extend({init:function(t,i){s.SchedulerView.fn.init.call(this,t,i),this._groupedView=this._getGroupedView(),i=this.options,i.editable&&(i.editable=e.extend({"delete":!0},i.editable,{create:!1,update:!1},{messages:i.messages})),this.title=i.title,this._eventTemplate=this._eventTmpl(i.eventTemplate,l),this._dateTemplate=r.template(i.eventDateTemplate),this._groupTemplate=r.template(i.eventGroupTemplate),this._timeTemplate=r.template(i.eventTimeTemplate),this.element.on("mouseenter"+a,".k-scheduler-agenda .k-scheduler-content tr","_mouseenter").on("mouseleave"+a,".k-scheduler-agenda .k-scheduler-content tr","_mouseleave").on("click"+a,".k-scheduler-agenda .k-scheduler-content .k-link:has(.k-i-close)","_remove"),this._renderLayout(i.date)},name:"agenda",_getGroupedView:function(){return this._isGroupedByDate()?new r.ui.scheduler.AgendaGroupedByDateView(this):new r.ui.scheduler.AgendaGroupedView(this)},_mouseenter:function(t){e(t.currentTarget).addClass("k-state-hover")},_mouseleave:function(t){e(t.currentTarget).removeClass("k-state-hover")},_remove:function(t){t.preventDefault(),this.trigger("remove",{uid:e(t.currentTarget).closest(".k-task").attr(r.attr("uid"))})},nextDate:function(){return r.date.nextDay(this.startDate())},startDate:function(){return this._startDate},endDate:function(){return this._endDate},previousDate:function(){return r.date.previousDay(this.startDate())},_renderLayout:function(e){this._startDate=e,this._endDate=r.date.addDays(e,7),this.createLayout(this._layout()),this.table.addClass("k-scheduler-agenda")},_layout:function(){var e,t,i,n=[{text:this.options.messages.time,className:"k-scheduler-timecolumn"},{text:this.options.messages.event}];if(this._isMobilePhoneView()||n.splice(0,0,{text:this.options.messages.date,className:"k-scheduler-datecolumn"}),e=this.groupedResources,e.length){for(t=[],i=0;i<e.length;i++)t.push({text:"",className:"k-scheduler-groupcolumn"});n=this._groupedView._getColumns(t,n)}return{columns:n}},_tasks:function(e){var t,i,n,o,s,a,l,c=[];for(t=0;t<e.length;t++)if(i=e[t],n=i.start,o=i.isAllDay?r.date.getDate(i.end):i.end,s=Math.ceil((o-r.date.getDate(n))/r.date.MS_PER_DAY),i.isAllDay&&(s+=1),a=i.clone(),a.startDate=r.date.getDate(n),a.startDate>=this.startDate()&&c.push(a),s>1)for(a.end=r.date.nextDay(n),a.head=!0,l=1;l<s;l++)n=a.end,a=i.clone(),a.start=a.startDate=r.date.getDate(n),a.end=r.date.nextDay(n),l==s-1?(a.end=new Date(a.start.getFullYear(),a.start.getMonth(),a.start.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),a.tail=!0):(a.isAllDay=!0,a.middle=!0),(r.date.getDate(a.end)<=this.endDate()&&a.start>=this.startDate()||r.date.getDate(a.start).getTime()==this.endDate().getTime())&&c.push(a);return new r.data.Query(c).sort([{field:"start",dir:"asc"},{field:"end",dir:"asc"}]).groupBy({field:"startDate"}).toArray()},_renderTaskGroups:function(e,t){var i,n,o,s,a,l,c,d,u=[],h=this.options.editable,p=h&&h.destroy!==!1&&!this._isMobile(),f=this._isMobilePhoneView(),m=this._groupedView._getSumOfItemsForDate(e),g=this._groupedView._getGroupsInDay(e,t),v=0;for(i=0;i<e.length;i++)for(n=e[i].value,o=e[i].items,s=r.date.isToday(n),a=0;a<o.length;a++)l=o[a],c=[],d=f?[]:c,this._groupedView._renderTaskGroupsCells(d,t,i,a,g,m,n,v),v++,0===a&&(f?(d.push(r.format('<td class="k-scheduler-datecolumn" colspan="2">{0}</td>',this._dateTemplate({date:n}))),u.push('<tr role="row" aria-selected="false"'+(s?' class="k-today">':">")+d.join("")+"</tr>")):this._groupedView._renderDateCell(c,t,o,n,i,e)),l.format=l.head?"{0:t}":l.tail?"{1:t}":"{0:t}-{1:t}",l.resources=this.eventResources(l),c.push(r.format('<td class="k-scheduler-timecolumn"><div>{0}{1}{2}</div></td><td>{3}</td>',l.tail||l.middle?'<span class="k-icon k-i-arrow-60-left"></span>':"",this._timeTemplate(l.clone({start:l._startTime||l.start,end:l.endTime||l.end})),l.head||l.middle?'<span class="k-icon k-i-arrow-60-right"></span>':"",this._eventTemplate(l.clone({showDelete:p,messages:this.options.messages})))),u.push('<tr role="row" aria-selected="false"'+(s?' class="k-today">':">")+c.join("")+"</tr>");return u.join("")},_renderTaskGroupsCells:function(e,t){for(var i=0;i<t.length;i++)e.push(r.format('<td class="k-scheduler-groupcolumn{2}" rowspan="{0}">{1}</td>',t[i].rowSpan,this._groupTemplate({value:t[i].text}),t[i].className))},render:function(e){var t,i,o=this.content.find("table").empty(),r=[];e.length>0&&(t=this.groupedResources,t.length?(r=this._createGroupConfiguration(e,t,null),this._groupsByDate=[],this._renderGroups(r,o,[]),this._groupedView._renderDates(o)):(r=this._tasks(e),o.append(this._renderTaskGroups(r,[])))),i=this._eventsList=n(r),this._angularItems(o,i),this.refreshLayout(),this.trigger("activate")},_angularItems:function(e,t){this.angular("compile",function(){var i=[],n=t.map(function(t){return i.push({dataItem:t}),e.find(".k-task["+r.attr("uid")+"="+t.uid+"]")});return{elements:n,data:i}})},_renderGroups:function(e,t,i){var n,o,r;for(n=0,o=e.length;n<o;n++)r=this._groupedView._getParents(i),r.push(e[n]),this._groupedView._getGroupsByDate(e,n,r),e[n].groups?this._renderGroups(e[n].groups,t,r):this._groupedView._renderTaskGroups(t,e[n].items,r)},_createGroupConfiguration:function(e,n,o){var a,l,c,d,u,h,p,f=n[0],m=[],g=f.dataSource.view(),v=this._isMobilePhoneView();for(a=0;a<g.length;a++)l=i(f,g[a]),c=new r.data.Query(e).filter({field:f.field,operator:s.SchedulerView.groupEqFilter(l)}).toArray(),c.length&&(d=this._tasks(c),u=o?"":" k-first",a===g.length-1&&(!o||o.className.indexOf("k-last")>-1)&&(u+=" k-last"),h={text:r.getter(f.dataTextField)(g[a]),value:l,rowSpan:0,className:u},n.length>1?(h.groups=this._createGroupConfiguration(c,n.slice(1),h),o&&(o.rowSpan+=h.rowSpan)):(h.items=d,p=t(h.items),v&&(p+=h.items.length),h.rowSpan=p,o&&(o.rowSpan+=p)),m.push(h));return m},selectionByElement:function(t){var i,n,o;if(t=e(t),!t.hasClass("k-scheduler-datecolumn")&&this._eventsList.length)return t.is(".k-task")&&(t=t.closest("td")),this._isMobile()?(o=t.parent(),i=o.parent().children().filter(function(){return e(this).children(":not(.k-scheduler-datecolumn)").length}).index(o)):i=t.parent().index(),n=this._eventsList[i],{index:i,start:n.start,end:n.end,isAllDay:n.isAllDay,uid:n.uid}},select:function(e){this.clearSelection();var t=this.table.find(".k-task").eq(e.index).closest("tr").addClass("k-state-selected").attr("aria-selected",!0)[0];this.current(t)},move:function(e,t){var i,n=!1,o=e.index;return t==r.keys.UP?(o--,n=!0):t==r.keys.DOWN&&(o++,n=!0),n&&(i=this._eventsList[o],i&&(e.start=i.start,e.end=i.end,e.isAllDay=i.isAllDay,e.events=[i.uid],e.index=o)),n},moveToEvent:function(){return!1},constrainSelection:function(e){var t=this._eventsList[0];t&&(e.start=t.start,e.end=t.end,e.isAllDay=t.isAllDay,e.events=[t.uid],e.index=0)},isInRange:function(){return!0},destroy:function(){this.element&&this.element.off(a),s.SchedulerView.fn.destroy.call(this)},options:{title:"Agenda",name:"agenda",editable:!0,selectedDateFormat:"{0:D}-{1:D}",selectedShortDateFormat:"{0:d} - {1:d}",eventTemplate:"#:title#",eventTimeTemplate:"#if(data.isAllDay) {##=this.options.messages.allDay##} else { ##=kendo.format(format, start, end)## } #",eventDateTemplate:'<strong class="k-scheduler-agendaday">#=kendo.toString(date, "dd")#</strong><em class="k-scheduler-agendaweek">#=kendo.toString(date,"dddd")#</em><span class="k-scheduler-agendadate">#=kendo.toString(date, "y")#</span>',eventGroupTemplate:'<strong class="k-scheduler-adgendagroup">#=value#</strong>',messages:{event:"Event",date:"Date",time:"Time",allDay:"all day"}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.monthview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e){function t(e,t){return e.slice(t).concat(e.slice(0,t))}function i(e,t){for(var i=t.firstDay,n=new Date(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());n.getDay()!=i;)o.date.setTime(n,-1*d);return n}function n(e,t,i){var n,o=t,r=i;return n=e,n>=o&&n<=r}var o=window.kendo,r=o.ui,s=r.SchedulerView,a=".kendoMonthView",l=e.extend,c=o.date.getDate,d=o.date.MS_PER_DAY,u=6,h=7,p=o.template('<span class="k-link k-nav-day">#:kendo.toString(date, "dd")#</span>'),f='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span>#}#</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-w"></span>#}## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-e"></span>#}#</div>',m=o.template('<div title="#=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">#:title#</div></div>'),g=o.template('<div style="width:#=width#px;left:#=left#px;top:#=top#px" class="k-more-events k-button"><span>...</span></div>'),v=o.Class.extend({init:function(e){this._view=e},_verticalRowCountForLevel:function(e){var t=this._view;return t._rowCountForLevel(e)},_horizontalGroupCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_getCalendarRowsLength:function(e,t){return t/e},_createRows:function(e,t,i,n){var o,r=this._view,s=h,a=r._isVerticallyGrouped(),l="";for(o=0;o<i;o++)l+=r._createRow(e,t,s,a?n:o);return l},_adjustStartDate:function(e){return o.date.addDays(e,h)},_getContent:function(e,t,i){return e({date:t,resources:i})},_getTimeSlotByPosition:function(e,t,i){var n=this._view.groups[i];return n.daySlotByPosition(e,t)},_nextSlotStartDate:function(e){return o.date.nextDay(e)},_createRowsLayout:function(e,t,i){var n=this._view;return n._createRowsLayout(e,t,i)},_createVerticalColumnsLayout:function(e,t,i,n){return n},_createColumnsLayout:function(e,t,i){var n=this._view;return n._createColumnsLayout(e,t,i)},_verticalGroupCount:function(e){var t=this._view;return t._rowCountForLevel(e)},_horizontalGroupCount:function(e){var t=this._view;return t._columnCountForLevel(e)/t._columnOffsetForResource(e)},_positionEvent:function(e,t,i,n,o,r,s){var a,l=this._view,c=l._isMobilePhoneView();n>1&&(0===s?r=i.end.endDate():s==n-1?o=i.start.startDate():(o=i.start.startDate(),r=i.end.endDate())),a=e.clone({start:o,end:r,head:i.head,tail:i.tail}),c?l._positionMobileEvent(i,l._createEventElement(a),t):l._positionEvent(i,l._createEventElement(a),t)},_addDaySlotCollections:function(e,t,i){var n,r,s,a,l,c,d,p,f,m,g,v=this._view,_=h,b=u;for(n=0;n<e;n++)for(r=0,s=0,v._isVerticallyGrouped()&&(s=n),a=s*b;a<(s+1)*b;a++)for(l=v.groups[n],c=l.addDaySlotCollection(o.date.addDays(i,r),o.date.addDays(i,r+_)),d=t[a],p=d.children,f=0,d.setAttribute("role","row"),v._isVerticallyGrouped()||(f=n),m=f*_;m<(f+1)*_;m++)g=p[m],v.addDaySlot(c,g,i,r),r++},_changePeriodGroupIndex:function(e){var t=this._view;return e?t.groups.length-1:0},_createResizeHint:function(e){var t=this._view,i=e.startSlot().offsetLeft,n=e.start.offsetTop,o=e.innerWidth(),r=e.start.clientHeight-2,a=s.fn._createResizeHint.call(t,i,n,o,r);t._appendResizeHint(a)},_createMoveHint:function(e,t){var i=this._view,n=e.startSlot(),o=e.endSlot(),r=i._createEventElement(t.clone({head:e.head,tail:e.tail}));r.css({left:n.offsetLeft+2,top:n.offsetTop+n.firstChildHeight,height:i.options.eventHeight,width:e.innerWidth()-(n.index!==o.index?5:4)}),r.addClass("k-event-drag-hint"),i._appendMoveHint(r)}}),_=o.Class.extend({init:function(e){this._view=e},_verticalRowCountForLevel:function(){return 1},_horizontalGroupCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e+1)/h},_createRows:function(e,t,i){var n,r,s=this._view,a=h,l=s._isVerticallyGrouped(),c="",d=0;if(l){for(n=new Date(e),r=s._groupCount(),d;d<u;d++)c+=s._createRow(n,t,r,d),n=o.date.addDays(n,a);e=o.date.nextDay(e)}else{for(d;d<a;d++)c+=s._createRow(e,t,i,d),e=o.date.nextDay(e);e=o.date.addDays(e,a)}return c},_adjustStartDate:function(e,t){var i=this._view,n=i._isVerticallyGrouped();return n?t?o.date.addDays(e,h*(u-1)+1):o.date.nextDay(e):o.date.addDays(e,h)},_getContent:function(e,t,i,n){return 0===n?e({date:t,resources:i}):""},_getTimeSlotByPosition:function(e,t,i){var n=this._view.groups[i];return n.daySlotByPosition(e,t,!0)},_nextSlotStartDate:function(e){return e},_getCalendarRowsLength:function(){var e=this._view,t=e._isVerticallyGrouped();return t?h:u},_createRowsLayout:function(e,t,i,n){var o=this._view;return o._createDateLayout(n,null,!1)},_createVerticalColumnsLayout:function(e,t,i){var n,r,s=this._view,a=e[0],l=[],c=a.dataSource.view();for(n=0;n<c.length*u;n++)r={text:i({text:o.htmlEncode(o.getter(a.dataTextField)(c[n%c.length])),color:o.getter(a.dataColorField)(c[n%c.length]),field:a.field,title:a.title,name:a.name,value:o.getter(a.dataValueField)(c[n%c.length])}),className:"k-slot-cell"},r.columns=s._createColumnsLayout(e.slice(1),null,i),l.push(r);return l},_createColumnsLayout:function(e,t,i,n){var o=this._view;return o._createColumnsLayout(e,t,i,n,!0)},_verticalGroupCount:function(e){var t=this._view;return t._columnCountForLevel(e)/u},_horizontalGroupCount:function(e){var t=this._view;return t._columnCountForLevel(e)/h},_positionEvent:function(e,t,i,n,o,r){var s,a,l,c,d=this._view,u=i.start.index,h=i.end.index,p=d._isMobilePhoneView();for(s=i.start.index;s<=i.end.index;s++)a=i.collection._slots[s],l=t.daySlotRanges(a.start,a.start,!0)[0],c=e.clone({start:s===u?o:a.startDate(),end:s===h?r:a.endDate(),head:s!==h||i.head,tail:s!==u||i.tail}),p?d._positionMobileEvent(l,d._createEventElement(c),t):d._positionEvent(l,d._createEventElement(c),t)},_addDaySlotCollections:function(e,t,i){var n,r,s,a,l,c,d,p,f,m,g,v,_,b,w=this._view,y=h,k=u,x=w._isVerticallyGrouped();for(n=0;n<y;n++)for(r=0;r<k;r++)for(s=0,a=x?n:r,l=t[a],c=l.children,d=0,l.setAttribute("role","row"),w._isVerticallyGrouped()||(d=n),p=d*e;p<(d+1)*e;p++)f=r*y+n,m=x?p+r*e:p,g=c[m],v=x?p:s,_=w.groups[v],b=0===n?_.addDaySlotCollection(o.date.addDays(i,f),o.date.addDays(i,f+y)):_._daySlotCollections[r],w.addDaySlot(b,g,i,f),s++},_changePeriodGroupIndex:function(e,t,i){var n=this._view;return t&&n._isVerticallyGrouped()?e?n.groups.length-1:0:i},_createResizeHint:function(e){var t,i,n,o,r,a,l,c=this._view;if(c._isVerticallyGrouped())t=e.startSlot().offsetLeft,i=e.start.offsetTop,n=e.startSlot().offsetWidth,o=e.endSlot().offsetTop+e.startSlot().offsetHeight-e.startSlot().offsetTop-2,r=s.fn._createResizeHint.call(c,t,i,n,o),c._appendResizeHint(r);else for(a=e.startSlot().index;a<=e.endSlot().index;a++)l=e.collection._slots[a],t=l.offsetLeft,i=l.offsetTop,n=l.offsetWidth,o=l.offsetHeight-2,r=s.fn._createResizeHint.call(c,t,i,n,o),c._appendResizeHint(r)},_createMoveHint:function(e,t){var i,n,o,r=this._view,s=e.startSlot(),a=e.endSlot();for(i=s.index;i<=a.index;i++)n=e.collection._slots[i],o=r._createEventElement(t.clone({head:e.head,tail:e.tail})),o.css({left:n.offsetLeft,top:n.offsetTop+n.firstChildHeight,height:r.options.eventHeight,width:n.offsetWidth-2}),o.addClass("k-event-drag-hint"),r._appendMoveHint(o)}});o.ui.scheduler.MonthGroupedView=v,o.ui.scheduler.MonthGroupedByDateView=_,r.MonthView=s.extend({init:function(e,t){var i=this;s.fn.init.call(i,e,t),i._groupedView=i._getGroupedView(),i.title=i.options.title,i._templates(),i._editable(),i._renderLayout(i.options.date),i._groups()},name:"month",_getGroupedView:function(){return this._isGroupedByDate()?new o.ui.scheduler.MonthGroupedByDateView(this):new o.ui.scheduler.MonthGroupedView(this)},_updateDirection:function(e,t,i,n,o){var r,s,a,l,c;i&&(r=t[0].start,s=t[t.length-1].end,a=r.index===s.index,l=r.collectionIndex===s.collectionIndex,c=o?a&&l||l:a&&l,c&&(e.backward=n))},_changeDate:function(e,t,i){var n,o,r,s=this.groups[e.groupIndex];if(i){if(n=s._getCollections(s.daySlotCollectionCount()),o=t.collectionIndex-1,o>=0)return n[o]._slots[n[o]._slots.length-1]}else if(n=s._getCollections(s.daySlotCollectionCount()),o=t.collectionIndex+1,r=0,n[o]&&n[o]._slots[r])return n[o]._slots[r]},_getNextHorizontalRange:function(e,t,i){var n=this._isVerticallyGrouped();return i.startSlot=e[t](i.startSlot,n),i.endSlot=e[t](i.endSlot,n),i},_getNextVerticalRange:function(e,t,i,n){var o=this._isVerticallyGrouped()&&this._isGroupedByDate();return i.startSlot=e[t](i.startSlot,n,o),i.endSlot=e[t](i.endSlot,n,o),i},_changeViewPeriod:function(e,t,i){var n,r,s=i?7:1;return t&&(s*=-1),n=o.date.addDays(e.start,s),r=o.date.addDays(e.end,s),!this._isInRange(n,r)&&(e.start=n,e.end=r,(!i||i&&this._isVerticallyGrouped())&&(e.groupIndex=this._groupedView._changePeriodGroupIndex(t,i,e.groupIndex)),e.events=[],!0)},_continuousSlot:function(e,t,i){var n=e.backward?0:t.length-1,o=this.groups[e.groupIndex];return o.continuousSlot(t[n].start,i)},_changeGroupContinuously:function(e,t,i,n){var o,r,s,a;return i||(o=e.groupIndex,r=this.groups.length-1,s=this._isVerticallyGrouped(),a=this.groups[o],!t&&s?(t=a[n?"lastSlot":"firstSlot"](),o+=n?-1:1):t&&!s&&(o=n?r:0),(o<0||o>r)&&(o=n?r:0,t=null),e.groupIndex=o),t},_normalizeHorizontalSelection:function(e,t,i){var n;return n=i?t[0].start:t[t.length-1].end},_normalizeVerticalSelection:function(e,t){var i;return i=e.backward?t[0].start:t[t.length-1].end},_templates:function(){var e=this.options,t=l({},o.Template,e.templateSettings);this.eventTemplate=this._eventTmpl(e.eventTemplate,f),this.dayTemplate=o.template(e.dayTemplate,t),this.groupHeaderTemplate=o.template(e.groupHeaderTemplate,t)},dateForTitle:function(){return o.format(this.options.selectedDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},shortDateForTitle:function(){return o.format(this.options.selectedShortDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},nextDate:function(){return o.date.nextDay(this._lastDayOfMonth)},previousDate:function(){return o.date.previousDay(this._firstDayOfMonth)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},_renderLayout:function(t){var n=this;this._firstDayOfMonth=o.date.firstDayOfMonth(t),this._lastDayOfMonth=o.date.lastDayOfMonth(t),this._startDate=i(t,this.calendarInfo()),this.createLayout(this._layout()),this._content(),this.refreshLayout(),this.content.on("click"+a,".k-nav-day,.k-more-events",function(t){var i=e(t.currentTarget).offset(),o=n._slotByPosition(i.left,i.top);t.preventDefault(),n.trigger("navigate",{view:"day",date:o.startDate()})})},_editable:function(){this.options.editable&&!this._isMobilePhoneView()&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+a,".k-scheduler-monthview .k-event a:has(.k-i-close)",function(i){t.trigger("remove",{uid:e(this).closest(".k-event").attr(o.attr("uid"))}),i.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+a,".k-scheduler-monthview .k-scheduler-content td",function(i){var n,o=e(i.currentTarget).offset(),r=t._slotByPosition(o.left,o.top);r&&(n=t._resourceBySlot(r),t.trigger("add",{eventInfo:l({isAllDay:!0,start:r.startDate(),end:r.startDate()},n)})),i.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+a,".k-scheduler-monthview .k-event",function(i){t.trigger("edit",{uid:e(this).closest(".k-event").attr(o.attr("uid"))}),i.preventDefault()})},_touchEditable:function(){var t=this,i=0;o.support.mobileOS.android&&(i=5),t.options.editable.create!==!1&&(t._addUserEvents=new o.UserEvents(t.element,{threshold:i,useClickAsTap:!o.support.browser.edge,filter:".k-scheduler-monthview .k-scheduler-content td",tap:function(i){var n,o,r;t._scrolling||(n=e(i.target).offset(),o=t._slotByPosition(n.left,n.top),o&&(r=t._resourceBySlot(o),t.trigger("add",{eventInfo:l({isAllDay:!0,start:o.startDate(),end:o.startDate()},r)})),i.preventDefault())}})),t.options.editable.update!==!1&&(t._editUserEvents=new o.UserEvents(t.element,{threshold:i,filter:".k-scheduler-monthview .k-event",useClickAsTap:!o.support.browser.edge,tap:function(i){t._scrolling||0===e(i.event.target).closest("a:has(.k-i-close)").length&&(t.trigger("edit",{uid:e(i.target).closest(".k-event").attr(o.attr("uid"))}),i.preventDefault())}}))},selectionByElement:function(t){var i=e(t).offset();return this._slotByPosition(i.left,i.top)},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},_content:function(){var e,t="<tbody>",i=1,n=this._groupedView,o=this.groupedResources;for(o.length&&this._isVerticallyGrouped()&&(i=n._verticalRowCountForLevel(o.length-1)),e=0;e<i;e++)t+=this._createCalendar(e);t+="</tbody>",this.content.find("table").html(t)},_createCalendar:function(e){var t,i,n,r=this.startDate(),s=h*u,a=h,l=[r],c="",d=1,p=this._isVerticallyGrouped(),f=this._groupedView,m=this.groupedResources;for(m.length&&(p||(d=f._horizontalGroupCountForLevel(m.length-1))),this._slotIndices={},t=f._getCalendarRowsLength(a,s),i=0;i<t;i++)c+="<tr>",l.push(r),n=i*a,c+=f._createRows(r,n,d,e),r=f._adjustStartDate(r,i===t-1),c+="</tr>";return this._weekStartDates=l,this._endDate=o.date.previousDay(r),c},_createRow:function(e,t,i,n){var r,s=this,a=s._firstDayOfMonth,l=s._lastDayOfMonth,d=s.dayTemplate,u="",h="",p=this._groupedView,f=function(){return s._resourceBySlot({groupIndex:n})};for(r=0;r<i;r++)u="",o.date.isToday(e)&&(u+="k-today"),o.date.isInDateRange(e,a,l)||(u+=" k-other-month"),h+="<td ",""!==u&&(h+='class="'+u+'"'),h+=">",h+=p._getContent(d,e,f,r),h+="</td>",s._slotIndices[c(e).getTime()]=t+r,e=p._nextSlotStartDate(e);return h},_layout:function(){var i,n,o,r=this.calendarInfo(),s=this._isMobile()?r.days.namesShort:r.days.names,a=t(s,r.firstDay),l=e.map(a,function(e){return{text:e}}),c=this.groupedResources,d=this._groupedView;if(c.length)if(this._isVerticallyGrouped()){for(n=[],o=0;o<6;o++)n.push({text:"<div>&nbsp;</div>",className:"k-hidden k-slot-cell"});i=d._createRowsLayout(c,n,this.groupHeaderTemplate,l),l=d._createVerticalColumnsLayout(c,n,this.groupHeaderTemplate,l)}else l=d._createColumnsLayout(c,l,this.groupHeaderTemplate,l);return{columns:l,rows:i}},_createEventElement:function(t){var i,n=this.options,r=n.editable,s=this._isMobile();return t.showDelete=r&&r.destroy!==!1&&!s,t.resizable=r&&r.resize!==!1&&!s,t.ns=o.ns,t.resources=this.eventResources(t),t.inverseColor=!(!t.resources||!t.resources[0])&&this._shouldInverseResourceColor(t.resources[0]),t.messages=n.messages||{destroy:"Delete"},i=e(this.eventTemplate(t)),this.angular("compile",function(){return{elements:i,data:[{dataItem:t}]}}),i},_isInDateSlot:function(e){var t=this.groups[0],i=t.firstSlot().start,r=t.lastSlot().end-1,s=o.date.toUtcTime(e.start),a=o.date.toUtcTime(e.end);return(n(s,i,r)||n(a,i,r)||n(i,s,a)||n(r,s,a))&&(!n(a,i,i)||n(a,s,s)||e.isAllDay)},_slotIndex:function(e){return this._slotIndices[c(e).getTime()]},_positionMobileEvent:function(t,i,n){var r,a,l,c,d,u,h,p=t.start;t.start.offsetLeft>t.end.offsetLeft&&(p=t.end),r=t.start.index,a=r,l=3,c=s.collidingEvents(t.events(),r,a),c.push({element:i,start:r,end:a}),d=s.createRows(c),u=t.collection.at(r),h=u.container,h||(h=e(o.format('<div class="k-events-container" style="top:{0};left:{1};width:{2}"/>',p.offsetTop+p.firstChildTop+p.firstChildHeight+"px",p.offsetLeft+"px",p.offsetWidth+"px")),u.container=h,this.content[0].appendChild(h[0])),d.length<=l&&(t.addEvent({element:i,start:r,end:a,groupIndex:p.groupIndex}),n._continuousEvents.push({element:i,uid:i.attr(o.attr("uid")),start:t.start,end:t.end}),h[0].appendChild(i[0]))},_positionEvent:function(t,i,n){var r,a,l,c,d,u,h,p,f,m,v,_,b,w,y,k=this.options.eventHeight,x=t.start;for(t.start.offsetLeft>t.end.offsetLeft&&(x=t.end),r=t.start.index,a=t.end.index,l=x.eventCount,c=s.collidingEvents(t.events(),r,a),d=r!==a?5:4,c.push({element:i,start:r,end:a}),u=s.createRows(c),h=0,p=Math.min(u.length,l);h<p;h++)for(f=u[h].events,m=x.offsetTop+x.firstChildTop+x.firstChildHeight+h*k+3*h+"px",v=0,_=f.length;v<_;v++)f[v].element[0].style.top=m;if(u.length>l)for(b=r;b<=a;b++)w=t.collection,y=w.at(b),y.more||(y.more=e(g({ns:o.ns,start:b,end:b,width:y.clientWidth-2,left:y.offsetLeft+2,top:y.offsetTop+y.firstChildTop+y.firstChildHeight+l*k+3*l})),this.content[0].appendChild(y.more[0]));else t.addEvent({element:i,start:r,end:a,groupIndex:x.groupIndex}),i[0].style.width=t.innerWidth()-d+"px",i[0].style.left=x.offsetLeft+2+"px",i[0].style.height=k+"px",n._continuousEvents.push({element:i,uid:i.attr(o.attr("uid")),start:t.start,end:t.end}),i.appendTo(this.content)},_slotByPosition:function(e,t){var i,n,o=this.content.offset();for(e-=o.left,t-=o.top,t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft,e=Math.ceil(e),t=Math.ceil(t),i=0;i<this.groups.length;i++)if(n=this._groupedView._getTimeSlotByPosition(e,t,i))return n;return null},_appendResizeHint:function(e){e.appendTo(this.content),this._resizeHint=this._resizeHint.add(e)},_updateResizeHint:function(e,t,i,n){var r,s,a;for(this._removeResizeHint(),r=this.groups[t],s=r.ranges(i,n,!0,e.isAllDay),a=0;a<s.length;a++)this._groupedView._createResizeHint(s[a]);this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(o.toString(o.timezone.toLocalDate(i),"M/dd")),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(o.toString(o.timezone.toLocalDate(n),"M/dd"))},_updateMoveHint:function(e,t,i){var n,r=o.date.toUtcTime(e.start)+i,s=r+e.duration(),a=this.groups[t],l=a.ranges(r,s,!0,e.isAllDay);for(this._removeMoveHint(e.uid),n=0;n<l.length;n++)this._groupedView._createMoveHint(l[n],e)},_appendMoveHint:function(e){e.appendTo(this.content),this._moveHint=this._moveHint.add(e)},_groups:function(){var e,t=this._groupCount(),i=this.content[0].getElementsByTagName("tr"),n=this.startDate();for(this.groups=[],e=0;e<t;e++)this._addResourceView(e);this._groupedView._addDaySlotCollections(t,i,n)},addDaySlot:function(e,t,i,n){var r,s=t.clientHeight,a=t.children.length?t.children[0].offsetHeight+3:0,l=o.date.addDays(i,n),c=o.date.MS_PER_DAY;i.getHours()!==l.getHours()&&(c+=(i.getHours()-l.getHours())*o.date.MS_PER_HOUR),l=o.date.toUtcTime(l),c+=l,r=Math.floor((s-a-this.options.moreButtonHeight)/(this.options.eventHeight+3)),t.setAttribute("role","gridcell"),t.setAttribute("aria-selected",!1),e.addDaySlot(t,l,c,r)},render:function(e){this.content.children(".k-event,.k-more-events,.k-events-container").remove(),this._groups(),e=new o.data.Query(e).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray();var t=this.groupedResources;t.length?this._renderGroups(e,t,0,1):this._renderEvents(e,0),this.refreshLayout(),this.trigger("activate")},_renderEvents:function(e,t){var i,n,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b;for(n=0,r=e.length;n<r;n++)if(i=e[n],this._isInDateSlot(i))if(c=this.groups[t],d=this._groupedView._view,u=d._isMobilePhoneView(),c._continuousEvents||(c._continuousEvents=[]),h=c.slotRanges(i,!0),p=h.length,u)for(s=h[0],a=s.start.start,l=s.end.end,f=new Date(s.start.start),m=h[h.length-1].end.end,g=new Date(f),v=new Date(l);f.getTime()<=m&&i.end>=o.timezone.toLocalDate(f)&&i.start<=o.timezone.toLocalDate(m);)_=c.daySlotRanges(g.getTime(),v.getTime(),!0)[0],v.setDate(v.getDate()+1),g.setDate(g.getDate()+1),_&&(_.head=null,_.middle=null,_.tail=null,this._groupedView._positionEvent(i,c,_,1,a,l,0)),f=o.date.addDays(f,1);else for(b=0;b<p;b++)s=h[b],a=i.start,l=i.end,this._groupedView._positionEvent(i,c,s,p,a,l,b)},_renderGroups:function(e,t,i,n){var r,a,l,c,d=t[0];if(d)for(r=d.dataSource.view(),a=0;a<r.length;a++)l=this._resourceValue(d,r[a]),c=new o.data.Query(e).filter({field:d.field,operator:s.groupEqFilter(l)}).toArray(),t.length>1?i=this._renderGroups(c,t.slice(1),i++,n+1):this._renderEvents(c,i++);return i},_groupCount:function(){var e=this.groupedResources,t=this._groupedView;return e.length?this._isVerticallyGrouped()?t._verticalGroupCount(e.length-1):t._horizontalGroupCount(e.length):1},_columnOffsetForResource:function(e){return this._columnCountForLevel(e)/this._columnCountForLevel(e-1)},destroy:function(){this.table&&this.table.removeClass("k-scheduler-monthview"),this.content&&this.content.off(a),this.element&&this.element.off(a),s.fn.destroy.call(this),this._isMobile()&&!this._isMobilePhoneView()&&this.options.editable&&(this.options.editable.create!==!1&&this._addUserEvents.destroy(),this.options.editable.update!==!1&&this._editUserEvents.destroy())},events:["remove","add","edit","navigate"],options:{title:"Month",name:"month",eventHeight:25,moreButtonHeight:13,editable:!0,selectedDateFormat:"{0:y}",selectedShortDateFormat:"{0:y}",groupHeaderTemplate:"#=text#",dayTemplate:p,eventTemplate:m}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.recurrence.min",["kendo.dropdownlist.min","kendo.datepicker.min","kendo.numerictextbox.min"],e)}(function(){return function(e,t){function i(e,t){var i;return 0!==e&&e<t?i=t-e:(i=e%t,i&&(i=t-i)),i}function n(e){var t=e.getMonth(),i=g(e)?ne[t]:oe[t];return i+e.getDate()}function o(e,i){var n,o;return e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),ee(e,0),n=e.getFullYear(),i!==t?(J(e,i,-1),e.setDate(e.getDate()+4)):e.setDate(e.getDate()+(4-(e.getDay()||7))),ee(e,0),o=Math.floor((e.getTime()-new Date(n,0,1,(-6)))/864e5),1+Math.floor(o/7)}function r(e,t){var i=te(e).getDay(),n=7-(i+7-(t||7))||7;return n<0&&(n+=7),
Math.ceil((e.getDate()-n)/7)+1}function s(e,t){return e+(e<t?7:0)}function a(e,t,i){var n,o,a,l,c,d=t.offset;return d?(n=new Date(e.getFullYear(),e.getMonth()+1,0),o=r(n,i),a=s(t.day,i),l=a<s(new Date(e.getFullYear(),e.getMonth(),1).getDay(),i),c=a>s(n.getDay(),i),d<0?d=o+(d+1-(c?1:0)):l&&(d+=1),o-=c?1:0,d<(l?1:0)||d>o?null:d):r(e,i)}function l(e,t){return r(new Date(e.getFullYear(),e.getMonth()+1,0),t)}function c(e,t,i){return r(e,i)===a(e,t,i)}function d(e,t,i){for(var n,o,l,c,d=s(t.getDay(),i),u=e.length,h=[],p=0;p<u;p++)if(o=e[p],c=r(t,i),n=a(t,o,i),null!==n)if(c<n)h.push(o);else if(c===n)if(l=s(o.day,i),d<l)h.push(o);else if(d===l)return null;return h}function u(e,t,i){for(var n,o=0,r=e.length,s=[];o<r;o++){if(n=e[o],i&&(n=i(n)),t===n)return null;t<n&&s.push(n)}return s}function h(e,t){for(var i,n=0,o=e.length;n<o;n++){if(i=parseInt(e[n],10),isNaN(i)||i<t.start||i>t.end||0===i&&t.start<0)return null;e[n]=i}return e.sort(v)}function p(e){for(var i,n,o,r=0,s=e.length;r<s;r++){if(i=e[r],n=i.length,o=i.substring(n-2).toUpperCase(),o=ae[o],o===t)return null;e[r]={offset:parseInt(i.substring(0,n-2),10)||0,day:o}}return e}function f(e){for(var t,i,n=0,o=e.length,r=[];n<o;n++)t=e[n],"string"==typeof t?i=t:(i=""+se[t.day],t.offset&&(i=t.offset+i)),r.push(i);return""+r}function m(e){var t=e.getMonth();return 1===t?1===new Date(e.getFullYear(),1,29).getMonth()?29:28:re[t]}function g(e){return e=e.getFullYear(),e%4===0&&e%100!==0||e%400===0}function v(e,t){return e-t}function _(e,t){var i,n,o=0,r=[];if(e)for(e=e.split(e.indexOf(";")!==-1?";":","),i=e.length;o<i;o++)n=A(e[o],t),n&&r.push(n);return r}function b(t,i,n){for(var o=e.isArray(t)?t:_(t,n),r=i.getTime()-i.getMilliseconds(),s=0,a=o.length;s<a;s++)if(o[s].getTime()===r)return!0;return!1}function w(e,t){var i,n,o=0,r=[].concat(e);for(i=r.length;o<i;o++)n=r[o],n=j.timezone.convert(n,t||n.getTimezoneOffset(),"Etc/UTC"),r[o]=j.toString(n,ue);return r.join(",")}function y(e,t){var i=new Date(e);switch(t.freq){case"yearly":i.setFullYear(i.getFullYear(),0,1);break;case"monthly":i.setFullYear(i.getFullYear(),i.getMonth(),1);break;case"weekly":J(i,t.weekStart,-1)}return t.hours&&i.setHours(0),t.minutes&&i.setMinutes(0),t.seconds&&i.setSeconds(0),i}function k(e,t){var i=new Date(e);switch(t.freq){case"yearly":i.setFullYear(i.getFullYear(),11,31);break;case"monthly":i.setFullYear(i.getFullYear(),i.getMonth()+1,0);break;case"weekly":J(i,t.weekStart,-1),i.setDate(i.getDate()+6)}return t.hours&&i.setHours(23),t.minutes&&i.setMinutes(59),t.seconds&&i.setSeconds(59),i}function x(e,t,i){var n,o,r,s,a=e.length,l=[];for(r=0,s=i.length;r<s;r++)n=i[r],n<0?n=a+n:n-=1,o=e[n],o&&o.start>=t&&l.push(o);return l}function C(e,t,i){var n,o,r=[];for(o=0;o<e.length;o++)n=e[o],b(t,n.start,i)||r.push(n);return r}function S(e,i,n,o){var r,s,a,l,c,d,u,h,p,f,m,g,v,S,A,E,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G,$,K,Y,Q,J=I(e.recurrenceRule,o),ee=[];if(!J)return[e];for(P=J.positions,z=P?0:1,f=J.start,m=J.end,(f||m)&&(e=e.clone({start:f?new Date(f.value[0]):t,end:m?new Date(m.value[0]):t})),M=e.start,E=M.getTime(),A=ie(M),S=_(e.recurrenceException,o),!S[0]&&J.exdates&&(S=J.exdates.value,e.set("recurrenceException",w(S,o))),h=i=new Date(i),n=new Date(n),v=J.freq,F=be[v],R=J.count,J.until&&J.until<n&&(n=new Date(J.until)),g="yearly"===v||"monthly"===v||"weekly"===v,i<E||R||J.interval>1||g||("daily"===v||"hourly"===v)&&!J.seconds?i=new Date(E):(l=i.getHours(),c=i.getMinutes(),d=i.getSeconds(),J.hours||(l=M.getHours()),J.minutes||(c=M.getMinutes()),J.seconds||(d=M.getSeconds()),i.setHours(l,c,d,M.getMilliseconds())),J._startPeriod=new Date(i),P&&(i=y(i,J),n=k(n,J),V=ie(n)-ie(i),V<0&&(l=i.getHours(),n.setHours(l,i.getMinutes(),i.getSeconds(),i.getMilliseconds()),X.adjustDST(n,l)),J._startPeriod=new Date(i),J._endPeriod=k(i,J)),u=e.duration(),J._startTime=r=X.toInvariantTime(i),F.setup&&F.setup(J,M,i),F.limit(i,n,J);i<=n;)if(a=new Date(i),Z(a,u),p=i>=h||a>h,(p&&!b(S,i,o)||P)&&(r=X.toUtcTime(X.getDate(i))+ie(J._startTime),s=r+u,E!==i.getTime()||A!==ie(J._startTime)?(e.isAllDay||(W=e.startTimezone||e.endTimezone,U=e.endTimezone||e.startTimezone,(o&&W||!o&&!W)&&(q=D(i,o)-D(e.start,o),j=D(a,o)-D(e.end,o),G=D(i,W)-D(e.start,W),$=D(a,U)-D(e.end,U),q!==G&&(K=6e4*(q-G),L=new Date(i.getTime()-K),N=r-K),j!==$&&(Y=6e4*(j-$),H=new Date(a.getTime()-Y),O=s-Y))),ee.push(e.toOccurrence({start:L||new Date(i),end:H||a,_startTime:N||r,_endTime:O||s})),L=H=N=O=null):(e._startTime=r,e._endTime=s,ee.push(e))),P){if(F.next(i,J),F.limit(i,n,J),i>J._endPeriod&&(B=x(ee.slice(z),M,P),B=C(B,S,o),ee=ee.slice(0,z).concat(B),J._endPeriod=k(i,J),z=ee.length),R&&R===z)break}else{if(R&&R===z)break;z+=1,Q=T(i),F.next(i,J),Q&&"hourly"!==J.freq&&X.toInvariantTime(e.start).getTime()!==X.toInvariantTime(i).getTime()&&(J._startTime=r=new Date(i.getTime()-36e5)),F.limit(i,n,J)}return ee}function T(e){var t=e.getTimezoneOffset(),i=new Date(e.getTime()-36e5),n=i.getTimezoneOffset();return t<n}function D(e,t){return t?j.timezone.offset(e,t):e.getTimezoneOffset()}function A(e,t){return e=j.parseDate(e,le),e&&t&&(e=G.apply(e,t)),e}function E(e,t){var i,n,o,r,s,a,l,c,d=e.split(";");for(l=0,c=d.length;l<c;l++)if(i=d[l].split(":"),n=i[0],o=i[1],n.indexOf("TZID")!==-1&&(r=n.substring(n.indexOf("TZID")).split("=")[1]),o)for(o=o.split(","),s=0,a=o.length;s<a;s++)o[s]=A(o[s],r||t);if(o)return{value:o,tzid:r}}function I(i,n){var o,r,s,a,l,c,d,u,f,m={},g=0,v=!1,_=function(e,t){var i=e.day,n=t.day;return i<u&&(i+=7),n<u&&(n+=7),i-n};if(!i)return null;for(c=i.split("\n"),c[1]||i.indexOf("DTSTART")===-1&&i.indexOf("DTEND")===-1&&i.indexOf("EXDATE")===-1||(c=i.split(" ")),g=0,s=c.length;g<s;g++)l=e.trim(c[g]),l.indexOf("DTSTART")!==-1?m.start=E(l,n):l.indexOf("DTEND")!==-1?m.end=E(l,n):l.indexOf("EXDATE")!==-1?m.exdates=E(l,n):l.indexOf("RRULE")!==-1?a=l.substring(6):e.trim(l)&&(a=l);for(a=a.split(";"),g=0,s=a.length;g<s;g++)switch(d=a[g],o=d.split("="),r=e.trim(o[1]).split(","),e.trim(o[0]).toUpperCase()){case"FREQ":m.freq=r[0].toLowerCase();break;case"UNTIL":m.until=A(r[0],n);break;case"COUNT":m.count=parseInt(r[0],10);break;case"INTERVAL":m.interval=parseInt(r[0],10);break;case"BYSECOND":m.seconds=h(r,{start:0,end:60}),v=!0;break;case"BYMINUTE":m.minutes=h(r,{start:0,end:59}),v=!0;break;case"BYHOUR":m.hours=h(r,{start:0,end:23}),v=!0;break;case"BYMONTHDAY":m.monthDays=h(r,{start:-31,end:31}),v=!0;break;case"BYYEARDAY":m.yearDays=h(r,{start:-366,end:366}),v=!0;break;case"BYMONTH":m.months=h(r,{start:1,end:12}),v=!0;break;case"BYDAY":m.weekDays=f=p(r),v=!0;break;case"BYWEEKNO":m.weeks=h(r,{start:-53,end:53}),v=!0;break;case"BYSETPOS":m.positions=h(r,{start:-366,end:366});break;case"WKST":m.weekStart=u=ae[r[0]]}return m.freq===t||m.count!==t&&m.until?null:(m.interval||(m.interval=1),u===t&&(m.weekStart=u=j.culture().calendar.firstDay),f&&(m.weekDays=f.sort(_)),m.positions&&!v&&(m.positions=null),m._hasRuleValue=v,m)}function M(e,t){for(var i,n=e.value,o=e.tzid||"",r=n.length,s=0;s<r;s++)i=n[s],i=G.convert(i,o||t||i.getTimezoneOffset(),"Etc/UTC"),n[s]=j.toString(i,"yyyyMMddTHHmmssZ");return o&&(o=";TZID="+o),o+":"+n.join(",")+" "}function R(e,i){var n=e.weekStart,o="FREQ="+e.freq.toUpperCase(),r=e.exdates||"",s=e.start||"",a=e.end||"",l=e.until;return e.interval>1&&(o+=";INTERVAL="+e.interval),e.count&&(o+=";COUNT="+e.count),l&&(l=G.convert(l,i||l.getTimezoneOffset(),"Etc/UTC"),o+=";UNTIL="+j.toString(l,"yyyyMMddTHHmmssZ")),e.months&&(o+=";BYMONTH="+e.months),e.weeks&&(o+=";BYWEEKNO="+e.weeks),e.yearDays&&(o+=";BYYEARDAY="+e.yearDays),e.monthDays&&(o+=";BYMONTHDAY="+e.monthDays),e.weekDays&&(o+=";BYDAY="+f(e.weekDays)),e.hours&&(o+=";BYHOUR="+e.hours),e.minutes&&(o+=";BYMINUTE="+e.minutes),e.seconds&&(o+=";BYSECOND="+e.seconds),e.positions&&(o+=";BYSETPOS="+e.positions),n!==t&&(o+=";WKST="+se[n]),s&&(s="DTSTART"+M(s,i)),a&&(a="DTEND"+M(a,i)),r&&(r="EXDATE"+M(r,i)),(s||a||r)&&(o=s+a+r+"RRULE:"+o),o}var F,P,z,B,L,H,N,O,V,W,U,q,j=window.kendo,G=j.timezone,$=j.Class,K=j.ui,Y=K.Widget,Q=K.DropDownList,X=j.date,Z=X.setTime,J=X.setDayOfWeek,ee=X.adjustDST,te=X.firstDayOfMonth,ie=X.getMilliseconds,ne=[0,31,60,91,121,152,182,213,244,274,305,335,366],oe=[0,31,59,90,120,151,181,212,243,273,304,334,365],re=[31,28,31,30,31,30,31,31,30,31,30,31],se={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},ae={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},le=["yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-ddTHH","yyyy-MM-dd","yyyyMMddTHHmmssfffzzz","yyyyMMddTHHmmsszzz","yyyyMMddTHHmmss","yyyyMMddTHHmm","yyyyMMddTHH","yyyyMMdd"],ce=["months","weeks","yearDays","monthDays","weekDays","hours","minutes","seconds"],de=ce.length,ue="yyyyMMddTHHmmssZ",he={months:function(e,t,i){var n=i.months,o=u(n,e.getMonth()+1),r=!1;return null!==o&&(o.length?e.setMonth(o[0]-1,1):e.setFullYear(e.getFullYear()+1,n[0]-1,1),r=!0),r},monthDays:function(e,t,i){for(var n,o,r,s=!1,a=e.getHours(),l=function(e){return e<0&&(e=n+e+1),e};e<=t;){if(o=e.getMonth(),n=m(e),r=u(i.monthDays,e.getDate(),l),null===r)return s;if(s=!0,r.length){if(e.setMonth(o,r.sort(v)[0]),ee(e,a),o===e.getMonth())break}else e.setMonth(o+1,1)}return s},yearDays:function(e,t,i){for(var o,r,s=!1,a=e.getHours(),l=function(e){return e<0&&(e=o+e),e};e<t;){if(o=g(e)?366:365,r=u(i.yearDays,n(e),l),null===r)return s;if(s=!0,o=e.getFullYear(),r.length){e.setFullYear(o,0,r.sort(v)[0]),ee(e,a);break}e.setFullYear(o+1,0,1)}return s},weeks:function(e,t,i){for(var n,r,s,a=i.weekStart,l=!1,c=e.getHours(),d=function(e){return e<0&&(e=53+e),e};e<t;){if(r=u(i.weeks,o(e,a),d),null===r)return l;if(l=!0,n=e.getFullYear(),r.length){s=7*r.sort(v)[0]-1,e.setFullYear(n,0,s),J(e,a,-1),ee(e,c);break}e.setFullYear(n+1,0,1)}return l},weekDays:function(e,t,i){var n,o,s=i.weekDays,a=i.weekStart,u=d(s,e,a),h=e.getHours();if(null===u)return!1;if(n=u[0],n||(n=s[0],J(e,a)),o=n.day,n.offset)for(;e<=t&&!c(e,n,a);)r(e,a)===l(e,a)?(e.setMonth(e.getMonth()+1,1),ee(e,h)):(e.setDate(e.getDate()+7),ee(e,h),J(e,a,-1));return e.getDay()!==o&&J(e,o),!0},hours:function(e,t,i){var n=i.hours,o=i._startTime,r=o.getHours(),s=u(n,r),a=!1;return null!==s&&(a=!0,e.setHours(r),ee(e,r),s.length?(s=s[0],e.setHours(s)):(s=e.getHours(),e.setDate(e.getDate()+1),ee(e,s),s=n[0],e.setHours(s),ee(e,s)),i.minutes&&e.setMinutes(0),o.setHours(s,e.getMinutes())),a},minutes:function(e,t,i){var n=i.minutes,o=e.getMinutes(),r=u(n,o),s=i._startTime.getHours(),a=!1;return null!==r&&(a=!0,r.length?r=r[0]:(s+=1,r=n[0]),i.seconds&&e.setSeconds(0),e.setHours(s,r),s%=24,ee(e,s),i._startTime.setHours(s,r,e.getSeconds())),a},seconds:function(e,t,i){var n=i.seconds,o=i._startTime.getHours(),r=u(n,e.getSeconds()),s=e.getMinutes(),a=!1;return null!==r&&(a=!0,r.length?e.setSeconds(r[0]):(s+=1,e.setMinutes(s,n[0]),s>59&&(s%=60,o=(o+1)%24)),i._startTime.setHours(o,s,e.getSeconds())),a}},pe=$.extend({next:function(e,t){var i,n,o=t._startTime,r=o.getDate();if(t.seconds)n=e.getSeconds()+1,e.setSeconds(n),o.setSeconds(n),o.setDate(r);else{if(!t.minutes)return!1;i=e.getMinutes()+1,e.setMinutes(i),o.setMinutes(i),o.setDate(r)}return!0},normalize:function(e){var t=e.rule;4===e.idx&&t.hours&&(t._startTime.setHours(0),this._hour(e.date,t))},limit:function(e,i,n){for(var o,r,s,a,l,c=n.interval;e<=i;){for(s=r=t,l=e.getDate(),a=0;a<de;a++){if(o=ce[a],n[o]){if(s=he[o](e,i,n),r!==t&&s)break;r=s}s&&this.normalize({date:e,rule:n,day:l,idx:a})}if((1===c||!this.interval(n,e))&&a===de)break}},interval:function(e,t){var n,o,r,a,l=new Date(e._startPeriod),c=new Date(t),d=t.getHours(),u=e.weekStart,h=e.interval,p=e.freq,f=!1,m=0,g=0,v=1;return"hourly"===p?(n=c.getTimezoneOffset()-l.getTimezoneOffset(),o=e._startTime.getHours(),c=c.getTime(),d!==o&&(c+=(o-d)*X.MS_PER_HOUR),c-=l,n&&(c-=n*X.MS_PER_MINUTE),n=Math.floor(c/X.MS_PER_HOUR),m=i(n,h),0!==m&&(this._hour(t,e,m),f=!0)):"daily"===p?(X.setTime(c,-l,!0),n=Math.round(c/X.MS_PER_DAY),m=i(n,h),0!==m&&(this._date(t,e,m),f=!0)):"weekly"===p?(m=this._getNumberOfWeeksBetweenDates(l,t),r=s(t.getDay(),u),a=s(l.getDay(),u),r<a&&(m+=1),m=i(m,h),0!==m&&(X.setDayOfWeek(t,e.weekStart,-1),t.setDate(t.getDate()+7*m),ee(t,d),f=!0)):"monthly"===p?(n=t.getFullYear()-l.getFullYear(),n=t.getMonth()-l.getMonth()+12*n,m=i(n,h),0!==m&&(v=e._hasRuleValue?1:t.getDate(),t.setFullYear(t.getFullYear(),t.getMonth()+m,v),ee(t,d),f=!0)):"yearly"===p&&(n=t.getFullYear()-l.getFullYear(),m=i(n,h),e.months||(g=t.getMonth()),e.yearDays||e.monthDays||e.weekDays||(v=t.getDate()),0!==m&&(t.setFullYear(t.getFullYear()+m,g,v),ee(t,d),f=!0)),f},_getNumberOfWeeksBetweenDates:function(e,t){var i=(t-e)/6048e5,n=Math.floor(i);return i-n>.99&&(n=Math.round(i)),n},_hour:function(e,t,i){var n=t._startTime,o=n.getHours();i&&(o+=i),e.setHours(o),o%=24,n.setHours(o),ee(e,o)},_date:function(e,t,i){var n=e.getHours();e.setDate(e.getDate()+i),ee(e,n)||this._hour(e,t)}}),fe=pe.extend({next:function(e,t){pe.fn.next(e,t)||this._hour(e,t,1)},normalize:function(e){var t=e.rule;4===e.idx&&(t._startTime.setHours(0),this._hour(e.date,t))}}),me=pe.extend({next:function(e,t){pe.fn.next(e,t)||this[t.hours?"_hour":"_date"](e,t,1)}}),ge=me.extend({setup:function(e,t){e.weekDays||(e.weekDays=[{day:t.getDay(),offset:0}])}}),ve=pe.extend({next:function(e,t){var i,n;if(!pe.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else{for(i=e.getDate(),n=e.getHours(),e.setMonth(e.getMonth()+1),ee(e,n);e.getDate()!==i;)e.setDate(i),ee(e,n);this._hour(e,t)}},normalize:function(e){var t=e.rule,i=e.date,n=i.getHours();0!==e.idx||t.monthDays||t.weekDays?pe.fn.normalize(e):(i.setDate(e.day),ee(i,n))},setup:function(e,t,i){e.monthDays||e.weekDays||i.setDate(t.getDate())}}),_e=ve.extend({next:function(e,t){var i,n=e.getHours();if(!pe.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else if(t.months){for(i=e.getDate(),e.setMonth(e.getMonth()+1),ee(e,n);e.getDate()!==i;)e.setDate(i),ee(e,n);this._hour(e,t)}else e.setFullYear(e.getFullYear()+1),ee(e,n),this._hour(e,t)},setup:function(){}}),be={hourly:new fe,daily:new me,weekly:new ge,monthly:new ve,yearly:new _e},we="click";j.recurrence={rule:{parse:I,serialize:R},expand:S,dayInYear:n,weekInYear:o,weekInMonth:r,numberOfWeeks:l,isException:b,toExceptionString:w},F=function(e){for(var t=j.culture().calendar.days.namesShort,i=t.length,n="",o=0,r=[];o<i;o++)r.push(o);for(t=t.slice(e).concat(t.slice(0,e)),r=r.slice(e).concat(r.slice(0,e)),o=0;o<i;o++)n+='<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="'+r[o]+'" /> '+t[o]+"</label>";return n},P=j.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" title="#:messages.interval#"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-month-radio" type="radio" name="month" value="monthday" title="#:messages.day#" />#:messages.day#</label><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#" /></li></ul></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><input class="k-recur-year-radio" type="radio" name="year" value="monthday" title="#:messages.repeatOn#" /><input class="k-recur-month" title="#:messages.repeatOn#" /><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#"  />#:messages.of#<input class="k-recur-month" title="#:messages.of#"/></li></ul></div># } ## if (frequency !== "never") { #<div class="k-edit-label"><label>#:end.label#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-end-never" type="radio" name="end" value="never" />#:end.never#</label></li><li><label><input class="k-recur-end-count" type="radio" name="end" value="count" />#:end.after#</label><input class="k-recur-count" title="#:end.occurrence#" />#:end.occurrence#</li><li><label><input class="k-recur-end-until" type="radio" name="end" value="until" />#:end.on#</label><input class="k-recur-until" title="#:end.on#" /></li></ul></div># } #'),z=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],B=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],L=[{day:0,offset:0},{day:6,offset:0}],H=Y.extend({init:function(e,t){var i,n=this,o=t&&t.frequencies;Y.fn.init.call(n,e,t),n.wrapper=n.element,t=n.options,t.start=i=t.start||X.today(),o&&(t.frequencies=o),"string"==typeof i&&(t.start=j.parseDate(i,"yyyyMMddTHHmmss")),null===t.firstWeekDay&&(t.firstWeekDay=j.culture().calendar.firstDay),n._namespace="."+t.name},options:{value:"",start:"",timezone:"",spinners:!0,firstWeekDay:null,frequencies:["never","daily","weekly","monthly","yearly"],mobile:!1,messages:{recurrenceEditorTitle:"Recurrence editor",frequencies:{never:"Never",hourly:"Hourly",daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},hourly:{repeatEvery:"Repeat every: ",interval:" hour(s)"},daily:{repeatEvery:"Repeat every: ",interval:" day(s)"},weekly:{interval:" week(s)",repeatEvery:"Repeat every: ",repeatOn:"Repeat on: "},monthly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" month(s)",day:"Day "},yearly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" year(s)",of:" of "},end:{label:"End:",mobileLabel:"Ends",never:"Never",after:"After ",occurrence:" occurrence(s)",on:"On "},offsetPositions:{first:"first",second:"second",third:"third",fourth:"fourth",last:"last"},weekdays:{day:"day",weekday:"weekday",weekend:"weekend day"}}},events:["change"],_initInterval:function(){var e=this,t=e._value;e._container.find(".k-recur-interval").kendoNumericTextBox({spinners:e.options.spinners,value:t.interval||1,decimals:0,format:"#",min:1,change:function(){t.interval=this.value(),e._trigger()}})},_weekDayRule:function(e){var t=this,i=(t._weekDay.element||t._weekDay).val(),n=+(t._weekDayOffset.element||t._weekDayOffset).val(),o=null,r=null;e||("day"===i?(o=z,r=n):"weekday"===i?(o=B,r=n):"weekend"===i?(o=L,r=n):o=[{offset:n,day:+i}]),t._value.weekDays=o,t._value.positions=r},_weekDayView:function(){var e,t,i,n,o=this,r=o._value.weekDays,s=o._value.positions,a=o._weekDayOffset;r&&(i=r.length,s&&(7===i?(t="day",e=s):5===i?(t="weekday",e=s):2===i&&(t="weekend",e=s)),t||(r=r[0],t=r.day,e=r.offset||""),n=a.value?"value":"val",a[n](e),o._weekDay[n](t))},_initWeekDay:function(){var t,i=this,n=i.options.messages.weekdays,o=i.options.messages.offsetPositions,r=i._container.find(".k-recur-weekday"),s=function(){i._weekDayRule(),i._trigger()};r[0]&&(i._weekDayOffset=new Q(i._container.find(".k-recur-weekday-offset"),{change:s,dataTextField:"text",dataValueField:"value",dataSource:[{text:o.first,value:"1"},{text:o.second,value:"2"},{text:o.third,value:"3"},{text:o.fourth,value:"4"},{text:o.last,value:"-1"}]}),t=[{text:n.day,value:"day"},{text:n.weekday,value:"weekday"},{text:n.weekend,value:"weekend"}],i._weekDay=new Q(r,{value:i.options.start.getDay(),change:s,dataTextField:"text",dataValueField:"value",dataSource:t.concat(e.map(j.culture().calendar.days.names,function(e,t){return{text:e,value:t}}))}),i._weekDayView())},_initWeekDays:function(){var t,i,n,o,r,s=this,a=s._value,l=s._container.find(".k-recur-weekday-checkbox");if(l[0]&&(l.on(we+s._namespace,function(){a.weekDays=e.map(l.filter(":checked"),function(e){return{day:+e.value,offset:0}}),s.options.mobile||s._trigger()}),a.weekDays))for(n=0,o=l.length,r=a.weekDays.length;n<o;n++)for(i=l[n],t=0;t<r;t++)i.value==a.weekDays[t].day&&(i.checked=!0)},_initMonthDay:function(){var e=this,t=e._value,i=e._container.find(".k-recur-monthday");i[0]&&(e._monthDay=new j.ui.NumericTextBox(i,{spinners:e.options.spinners,min:1,max:31,decimals:0,format:"#",value:t.monthDays?t.monthDays[0]:e.options.start.getDate(),change:function(){var i=this.value();t.monthDays=i?[i]:i,e._trigger()}}))},_initCount:function(){var e=this,t=e._container.find(".k-recur-count"),i=e._value;e._count=t.kendoNumericTextBox({spinners:e.options.spinners,value:i.count||1,decimals:0,format:"#",min:1,change:function(){i.count=this.value(),e._trigger()}}).data("kendoNumericTextBox")},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),i=e.options.start,n=e._value,o=n.until;e._until=t.kendoDatePicker({min:o&&o<i?o:i,value:o||new Date(i.getFullYear(),i.getMonth(),i.getDate(),23,59,59),change:function(){var t=this.value();n.until=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59),e._trigger()}}).data("kendoDatePicker")},_trigger:function(){this.options.mobile||this.trigger("change")}}),N=H.extend({init:function(e,t){var i=this;H.fn.init.call(i,e,t),i._initFrequency(),i._initContainer(),i.value(i.options.value)},options:{name:"RecurrenceEditor"},events:["change"],destroy:function(){var e=this;e._frequency.destroy(),e._container.find("input[type=radio],input[type=checkbox]").off(we+e._namespace),j.destroy(e._container),H.fn.destroy.call(e)},value:function(e){var i,n=this,o=n.options.timezone;return e===t?n._value.freq?R(n._value,o):"":(n._value=I(e,o)||{},i=n._value.freq,i?n._frequency.value(i):n._frequency.select(0),n._initView(n._frequency.value()),t)},_initContainer:function(){var t=this.element,i=e('<div class="k-recur-view" />'),n=t.parent(".k-edit-field");n[0]?i.insertAfter(n):t.append(i),this._container=i},_initFrequency:function(){var t,i=this,n=i.options,o=n.frequencies,r=n.messages.frequencies,s=e("<input />").attr({title:n.messages.recurrenceEditorTitle});o=e.map(o,function(e){return{text:r[e],value:e}}),t=o[0],t&&"never"===t.value&&(t.value=""),i.element.append(s),i._frequency=new Q(s,{dataTextField:"text",dataValueField:"value",dataSource:o,change:function(){i._value={},i._initView(i._frequency.value()),i.trigger("change")}})},_initView:function(e){var i=this,n=i._value,o=i.options,r={frequency:e||"never",weekDayCheckBoxes:F,firstWeekDay:o.firstWeekDay,messages:o.messages[e],end:o.messages.end};return j.destroy(i._container),i._container.html(P(r)),e?(n.freq=e,"weekly"!==e||n.weekDays||(n.weekDays=[{day:o.start.getDay(),offset:0}]),i._initInterval(),i._initWeekDays(),i._initMonthDay(),i._initWeekDay(),i._initMonth(),i._initCount(),i._initUntil(),i._period(),i._end(),t):(i._value={},t)},_initMonth:function(){var t,i=this,n=i._value,o=n.months||[i.options.start.getMonth()+1],r=i._container.find(".k-recur-month");r[0]&&(t={change:function(){n.months=[+this.value()],i.trigger("change")},dataTextField:"text",dataValueField:"value",dataSource:e.map(j.culture().calendar.months.names,function(e,t){return{text:e,value:t+1}})},i._month1=new Q(r[0],t),i._month2=new Q(r[1],t),o&&(o=o[0],i._month1.value(o),i._month2.value(o)))},_end:function(){var e,t=this,i=t._value,n=t._container,o=t._namespace,r=function(e){t._toggleEnd(e.currentTarget.value),t.trigger("change")};t._buttonNever=n.find(".k-recur-end-never").on(we+o,r),t._buttonCount=n.find(".k-recur-end-count").on(we+o,r),t._buttonUntil=n.find(".k-recur-end-until").on(we+o,r),i.count?e="count":i.until&&(e="until"),t._toggleEnd(e)},_period:function(){var e=this,t=e._value,i="monthly"===t.freq,n=i?e._toggleMonthDay:e._toggleYear,o=".k-recur-"+(i?"month":"year")+"-radio",r=e._container.find(o);(i||"yearly"===t.freq)&&(r.on(we+e._namespace,function(t){n.call(e,t.currentTarget.value),e.trigger("change")}),e._buttonMonthDay=r.eq(0),e._buttonWeekDay=r.eq(1),n.call(e,t.weekDays?"weekday":"monthday"))},_toggleEnd:function(e){var t,i,n,o,r=this;"count"===e?(r._buttonCount.prop("checked",!0),n=!0,o=!1,t=r._count.value(),i=null):"until"===e?(r._buttonUntil.prop("checked",!0),n=!1,o=!0,t=null,i=r._until.value()):(r._buttonNever.prop("checked",!0),n=o=!1,t=i=null),r._count&&r._count.enable(n),r._until&&r._until.enable(o),r._value.count=t,r._value.until=i},_toggleMonthDay:function(e){var t,i=this,n=!1,o=!0,r=!1;"monthday"===e?(i._buttonMonthDay.prop("checked",!0),t=[i._monthDay.value()],n=!0,o=!1,r=!0):(i._buttonWeekDay.prop("checked",!0),t=null),i._weekDay.enable(o),i._weekDayOffset.enable(o),i._monthDay.enable(n),i._value.monthDays=t,i._weekDayRule(r)},_toggleYear:function(e){var t,i=this,n=!1,o=!0;"monthday"===e?(n=!0,o=!1,t=i._month1.value()):t=i._month2.value(),i._month1.enable(n),i._month2.enable(o),i._value.months=[t],i._toggleMonthDay(e)}}),K.plugin(N),O=j.template('<div class="k-edit-label"><label>#:headerTitle#</label></div><div class="k-edit-field k-recur-pattern k-scheduler-toolbar"></div><div class="k-recur-view"></div>'),V=j.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" pattern="\\\\d*"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" title="#:messages.day#" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset" title="#:messages.every#"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday" title="#:messages.day#"></select></div></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" title="#:messages.day#" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset" title="#:messages.every#"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday" title="#:messages.day#"></select></div></div><div class="k-edit-label"><label>#:messages.month#</label></div><div class="k-edit-field"><select class="k-recur-month" title="#:messages.month#"></select></div># } #'),W=j.template('# if (endPattern === "count") { #<div class="k-edit-label"><label>#:messages.after#</label></div><div class="k-edit-field"><input class="k-recur-count" pattern="\\\\d*" /></div># } else if (endPattern === "until") { #<div class="k-edit-label"><label>#:messages.on#</label></div><div class="k-edit-field"><input type="date" class="k-recur-until" /></div># } #'),U=j.template('<ul class="k-reset k-header k-scheduler-navigation">#for (var i = 0, length = dataSource.length; i < length; i++) {#<li class="k-state-default #= value === dataSource[i].value ? "k-state-selected" : "" #"><a role="button" href="\\#" class="k-link" data-#=ns#value="#=dataSource[i].value#">#:dataSource[i].text#</a></li>#}#</ul>'),q=H.extend({init:function(e,t){var i=this;H.fn.init.call(i,e,t),t=i.options,i._optionTemplate=j.template('<option value="#:value#">#:text#</option>'),i.value(t.value),i._pane=t.pane,i._initRepeatButton(),i._initRepeatEnd(),i._defaultValue=i._value},options:{name:"MobileRecurrenceEditor",animations:{left:"slide",right:"slide:right"},mobile:!0,messages:{cancel:"Cancel",update:"Save",endTitle:"Repeat ends",repeatTitle:"Repeat pattern",headerTitle:"Repeat event",end:{patterns:{never:"Never",after:"After...",on:"On..."},never:"Never",after:"End repeat after",on:"End repeat on"},daily:{interval:""},hourly:{interval:""},weekly:{interval:""},monthly:{interval:"",repeatBy:"Repeat by: ",dayOfMonth:"Day of the month",dayOfWeek:"Day of the week",repeatEvery:"Repeat every",every:"Every",day:"Day "},yearly:{interval:"",repeatBy:"Repeat by: ",dayOfMonth:"Day of the month",dayOfWeek:"Day of the week",repeatEvery:"Repeat every: ",every:"Every",month:"Month",day:"Day"}}},events:["change"],value:function(e){var i=this,n=i.options.timezone;return e===t?i._value.freq?R(i._value,n):"":(i._value=I(e,n)||{},t)},destroy:function(){this._destroyView(),j.destroy(this._endFields),this._repeatButton.off(we+this._namespace),H.fn.destroy.call(this)},_initRepeatButton:function(){var t=this,i=t.options.messages.frequencies[this._value.freq||"never"];t._repeatButton=e('<a href="#" class="k-button k-scheduler-recur">'+i+"</a>").on(we+t._namespace,function(e){e.preventDefault(),t._createView("repeat"),t._pane.navigate("recurrence",t.options.animations.left)}),t.element.append(t._repeatButton)},_initRepeatEnd:function(){var t=this,i=e('<div class="k-edit-label"><label>'+t.options.messages.end.mobileLabel+"</label></div>").insertAfter(t.element.parent(".k-edit-field")),n=e('<div class="k-edit-field"><a href="#" class="k-button k-scheduler-recur-end"></a></div>').on(we+t._namespace,function(e){e.preventDefault(),t._value.freq&&(t._createView("end"),t._pane.navigate("recurrence",t.options.animations.left))}).insertAfter(i);t._endFields=i.add(n).toggleClass("k-state-disabled",!t._value.freq),t._endButton=n.find(".k-scheduler-recur-end").text(t._endText())},_endText:function(){var e=this._value,t=this.options.messages.end,i=t.never;return e.count?i=j.format("{0} {1}",t.after,e.count):e.until&&(i=j.format("{0} {1:d}",t.on,e.until)),i},_initFrequency:function(){var t=this,i=t.options.messages.frequencies,n=U({dataSource:e.map(this.options.frequencies,function(e){return{text:i[e],value:"never"!==e?e:""}}),value:t._value.freq||"",ns:j.ns});t._view.element.find(".k-recur-pattern").append(n).on(we+t._namespace,".k-scheduler-navigation li",function(i){var n=e(this);i.preventDefault(),n.addClass("k-state-selected").siblings().removeClass("k-state-selected"),t._value={freq:n.children("a").attr(j.attr("value"))},t._initRepeatView()})},_initEndNavigation:function(){var t,i=this,n=i.options.messages.end.patterns,o=i._value,r="";o.count?r="count":o.until&&(r="until"),t=U({dataSource:[{text:n.never,value:""},{text:n.after,value:"count"},{text:n.on,value:"until"}],value:r,ns:j.ns}),i._view.element.find(".k-recur-pattern").append(t).on(we+i._namespace,".k-scheduler-navigation li",function(t){var n=e(this),r=null,s=null;t.preventDefault(),n.addClass("k-state-selected").siblings().removeClass("k-state-selected"),i._initEndView(n.children("a").attr(j.attr("value"))),i._count?(r=i._count.value(),s=null):i._until&&(r=null,s=i._until.val?j.parseDate(i._until.val(),"yyyy-MM-dd"):i._until.value()),o.count=r,o.until=s})},_createView:function(t){var i=this,n=i.options,o=n.messages,r=o["repeat"===t?"repeatTitle":"endTitle"],s='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="recurrence"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+o.cancel+"</a>"+o.headerTitle+'<a href="#" class="k-button k-scheduler-update">'+o.update+"</a></div>",a=i._pane.view().id;
i._view=i._pane.append(s+O({headerTitle:r})),i._view.element.on(we+i._namespace,"a.k-scheduler-cancel, a.k-scheduler-update",function(t){t.preventDefault(),t.stopPropagation(),e(this).hasClass("k-scheduler-update")?(i.trigger("change"),i._defaultValue=e.extend({},i._value)):i._value=i._defaultValue;var n=i._value.freq;i._endButton.text(i._endText()),i._endFields.toggleClass("k-state-disabled",!n),i._repeatButton.text(o.frequencies[n||"never"]),i._pane.one("viewShow",function(){i._destroyView()}),i._pane.navigate(a,i.options.animations.right)}),i._container=i._view.element.find(".k-recur-view"),"repeat"===t?(i._initFrequency(),i._initRepeatView()):(i._initEndNavigation(),i._initEndView())},_destroyView:function(){this._view&&(this._view.destroy(),this._view.element.remove()),this._view=null},_initRepeatView:function(){var e=this,i=e._value.freq||"never",n={frequency:i,weekDayCheckBoxes:F,firstWeekDay:e.options.firstWeekDay,messages:e.options.messages[i]},o=V(n),r=e._container,s=e._value;return j.destroy(r),r.html(o),o?("weekly"!==i||s.weekDays||(s.weekDays=[{day:e.options.start.getDay(),offset:0}]),e._initInterval(),e._initMonthDay(),e._initWeekDays(),e._initWeekDay(),e._initMonth(),e._period(),t):(e._value={},t)},_initEndView:function(e){var i,n=this,o=n._value;e===t&&(o.count?e="count":o.until&&(e="until")),i={endPattern:e,messages:n.options.messages.end},j.destroy(n._container),n._container.html(W(i)),n._initCount(),n._initUntil()},_initWeekDay:function(){var t,i=this,n=i.options.messages.weekdays,o=i.options.messages.offsetPositions,r=i._container.find(".k-recur-weekday"),s=function(){i._weekDayRule(),i.trigger("change")};r[0]&&(i._weekDayOffset=i._container.find(".k-recur-weekday-offset").html(i._options([{text:o.first,value:"1"},{text:o.second,value:"2"},{text:o.third,value:"3"},{text:o.fourth,value:"4"},{text:o.last,value:"-1"}])).change(s),t=[{text:n.day,value:"day"},{text:n.weekday,value:"weekday"},{text:n.weekend,value:"weekend"}],t=t.concat(e.map(j.culture().calendar.days.names,function(e,t){return{text:e,value:t}})),i._weekDay=r.html(i._options(t)).change(s).val(i.options.start.getDay()),i._weekDayView())},_initMonth:function(){var t,i=this,n=i._value,o=i.options.start,r=n.months||[o.getMonth()+1],s=i._container.find(".k-recur-month"),a=j.culture().calendar.months.names;s[0]&&(t=e.map(a,function(e,t){return{text:e,value:t+1}}),s.html(i._options(t)).change(function(){n.months=[+this.value]}),i._monthSelect=s,r&&s.val(r[0]))},_period:function(){var t,i,n,o=this,r=o._value,s=o._container,a=o.options.messages[r.freq],l=s.find(".k-repeat-rule"),c=s.find(".k-weekday-view"),d=s.find(".k-monthday-view");l[0]&&(t=r.weekDays?"weekday":"monthday",i=U({value:t,dataSource:[{text:a.dayOfMonth,value:"monthday"},{text:a.dayOfWeek,value:"weekday"}],ns:j.ns}),n=function(e){var t=o._weekDay.val(),i=o._weekDayOffset.val(),n=o._monthDay.value(),s=o._monthSelect?o._monthSelect.val():null;"monthday"===e?(r.weekDays=null,r.monthDays=n?[n]:n,r.months=s?[+s]:s,c.hide(),d.show()):(r.monthDays=null,r.months=s?[+s]:s,r.weekDays=[{offset:+i,day:+t}],c.show(),d.hide())},l.append(i).on(we+o._namespace,".k-scheduler-navigation li",function(t){var i,o=e(this).addClass("k-state-selected");t.preventDefault(),o.siblings().removeClass("k-state-selected"),i=o.children("a").attr(j.attr("value")),n(i)}),n(t))},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),i=e.options.start,n=e._value,o=n.until,r=o&&o<i?o:i;e._until=j.support.input.date?t.attr("min",j.toString(r,"yyyy-MM-dd")).val(j.toString(o||i,"yyyy-MM-dd")).on("change",function(){n.until=j.parseDate(this.value,"yyyy-MM-dd")}):t.kendoDatePicker({min:r,value:o||i,change:function(){n.until=this.value()}}).data("kendoDatePicker")},_options:function(e,t){var i=0,n="",o=e.length,r=this._optionTemplate;for(t&&(n+=r({value:"",text:t}));i<o;i++)n+=r(e[i]);return n}}),K.plugin(q)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.timelineview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e,t){function i(e){var t=new Date(1980,1,1,0,0,0);return d(t,v(e)),t}function n(e){var t=[],i=e.workWeekStart%7,n=Math.abs(e.workWeekEnd%7);for(t.push(i);n!=i;)i>6?i-=7:i++,t.push(i);return t}function o(e){var t,i=0;if(e.columns){for(t=0;t<e.columns.length;t++)i+=o(e.columns[t]);return e.colspan=i,i}return e.colspan=1,1}function r(e,t,i){var n,o,r,a;for(n=e.length-1;n>=0;n--)o=e[n].rectLeft,a=e[n].rectRight,r=o<=t&&a>=t,(r||o>=t&&a<=i||t<=o&&i>=o)&&(o<t&&(t=o),a>i&&(i=a));return s(e,t,i)}function s(e,t,i){var n,o,r=[];for(n=0;n<e.length;n++)o={rectLeft:e[n].rectLeft,rectRight:e[n].rectRight},(o.rectLeft<t&&o.rectRight>t||o.rectLeft>=t&&o.rectRight<=i)&&r.push(e[n]);return r}var a,l=window.kendo,c=l.ui,d=l.date.setTime,u=c.SchedulerView,h=l._outerWidth,p=l._outerHeight,f=e.extend,m=e.proxy,g=l.date.getDate,v=l.date.getMilliseconds,_=l.date.MS_PER_DAY,b=l.date.MS_PER_MINUTE,w="k-current-time",y="k-current-time-arrow",k="k-scheduler-header-wrap",x=.8666,C=".kendoTimelineView",S=l.template('<div><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),T=l.template("<span class='k-link k-nav-day'>#=kendo.format('{0:m}', date)#</span>"),D='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !data.tail){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !data.head){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',A=l.Class.extend({init:function(e){this._view=e},_getTimeSlotByPosition:function(e,t,i){var n=this._view.groups[i];return n.timeSlotByPosition(e,t)},_hideHeaders:function(){var e=this._view;e.timesHeader.find("table tr:last").hide(),e.datesHeader.find("table tr:last").hide()},_setColspan:function(e){o(e)},_createRowsLayout:function(e,t,i){var n=this._view;return n._createRowsLayout(e,t,i)},_createVerticalColumnsLayout:function(e,t,i,n){return n},_createColumnsLayout:function(e,t,i){var n=this._view;return n._createColumnsLayout(e,t,i)},_getRowCount:function(){var e=this._view;return e._groupCount()},_getGroupsCount:function(){return 1},_addContent:function(e,t,i,n,o,r,s,a){var c,d,u,h,p=this._view,f="",m=p.options,g=function(t){var i,n="",o="",r=function(e){return function(){return p._resourceBySlot({groupIndex:e})}};return l.date.isToday(e[u])&&(o+="k-today"),(l.date.getMilliseconds(t)<l.date.getMilliseconds(m.workDayStart)||l.date.getMilliseconds(t)>=l.date.getMilliseconds(m.workDayEnd)||!p._isWorkDay(e[u]))&&(o+=" k-nonwork-hour"),n+="<td"+(""!==o?' class="'+o+'"':"")+">",i=l.date.getDate(e[u]),l.date.setTime(i,l.date.getMilliseconds(t)),n+=s({date:i,resources:r(a?c:d)}),n+="</td>"};for(c=0;c<n;c++){for(f+="<tr>",d=0;d<i;d++)for(u=0,h=t;u<h;u++)f+=p._forTimeRange(o,r,g);f+="</tr>"}return f},_addTimeSlotsCollections:function(e,t,i,n,o){var r,s,a,l,c,d,u,h,p,f,m,g,_=this._view,b=i.length;for(o&&(b=Math.floor(b/e)),r=0;r<e;r++)for(s=0,a=_.groups[r],o&&(s=r),c=s*b,d=0,o||(d=r),u=i[c].children,h=u.length/(o?1:e),p=h/t,f=0;f<t;f++)for(m=f*p+h*d,l=v(new Date((+_.startTime()))),g=0;g<p;g++)_._addTimeSlotToCollection(a,u,g,m,f,l,n),l+=n},_getVerticalGroupCount:function(e){return e},_getVerticalRowCount:function(e,t,i){var n=this._view;return n._isVerticallyGrouped()?e[t].maxRowCount:i},_renderEvent:function(e,t,i,n,o,r){var s,a=this._view,l=a._createEventElement(i.occurrence,t,o.head||i.head,o.tail||i.tail);l.appendTo(r).css({top:0,height:a.options.eventHeight}),s={start:i.occurrence._startTime||i.occurrence.start,end:i.occurrence._endTime||i.occurrence.end,element:l,uid:t.uid,slotRange:o,rowIndex:0,offsetTop:0},e.events[t.uid]=s,a.addContinuousEvent(n,o,l,t.isAllDay),a._arrangeRows(s,o,e)},_verticalCountForLevel:function(e){var t=this._view;return t._rowCountForLevel(e)},_horizontalCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_updateCurrentVerticalTimeMarker:function(t,i){var n=this._view,o="<div class='"+w+"'></div>",r=n.datesHeader.find("."+k),s=Math.round(t[0].innerRect(i,new Date(i.getTime()+1),!1).left),a=e(o).prependTo(r).addClass(y+"-down");a.css({left:n._adjustLeftPosition(s-h(a)*x/2),top:r.find("tr:last").prev().position().top}),e(o).prependTo(n.content).css({left:n._adjustLeftPosition(s),width:"1px",height:n.content[0].scrollHeight-1,top:0})},_changeGroup:function(){return t},_prevGroupSlot:function(e,t,i){var n,o=this._view;return o._isVerticallyGrouped()?e:(n=t._collection(0,i),n.last())},_nextGroupSlot:function(e,t,i){var n,o=this._view;return o._isVerticallyGrouped()?e:(n=t._collection(0,i),n.first())},_verticalSlots:function(e,t){var i=this._view;return i._changeGroup(e,t)},_verticalMethod:function(e){return e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(){return t},_horizontalSlots:function(e,t,i,n,o,r,s){var a=this._view,l={};return l.startSlot=t[i](n),l.endSlot=t[i](o),r||!a._isHorizontallyGrouped()||l.startSlot&&l.endSlot||(l.startSlot=l.endSlot=a._changeGroup(e,s)),l},_changeVerticalViewPeriod:function(){return!1},_changeHorizontalViewPeriod:function(e,t,i,n){var o=this._view;return!(e.startSlot&&e.endSlot||t||!o._changeViewPeriod(i,n,!1))},_updateDirection:function(e,t,i,n){var o=this._view;o._updateDirection(e,t,i,n,!0)},_createMoveHint:function(e,t){var i,n,o,r,s=this._view,a=e.start,l=s._createEventElement(t.occurrence,t.occurrence,!1,!1);l.addClass("k-event-drag-hint"),i=e.innerRect(t.occurrence.start,t.occurrence.end,s.options.snap),n=i.right-i.left-2,n<0&&(n=0),o=s._adjustLeftPosition(i.left),r={left:o,top:a.offsetTop,height:a.offsetHeight-2,width:n},l.css(r),s._appendMoveHint(l)},_adjustLeftPosition:function(e){var t=this._view;return t._isRtl&&(e-=t.content[0].scrollWidth-t.content[0].offsetWidth),e}}),E=l.Class.extend({init:function(e){this._view=e},_getTimeSlotByPosition:function(e,t,i){var n=this._view.groups[i];return n.timeSlotByPosition(e,t,!0)},_hideHeaders:function(){var e=this._view;e._isVerticallyGrouped()?e.times.find(".k-last").hide():(e.timesHeader.find("table tr").eq(2).hide(),e.datesHeader.find("table tr").eq(2).hide())},_setColspan:function(){},_createRowsLayout:function(e,t,i,n){var o=this._view;return o._createDateLayout(n,null,!0)},_createVerticalColumnsLayout:function(e,t,i){var n=this._view;return n._createColumnsLayout(e,null,i)},_createColumnsLayout:function(e,t,i,n){var o=this._view;return o._createColumnsLayout(e,t,i,n,!0)},_getRowCount:function(e){var t=this._view;return t._rowCountForLevel(e)},_getGroupsCount:function(){var e=this._view;return e._groupCount()},_addContent:function(e,t,i,n,o,r,s,a){var c,u,h,p,f=this._view,m="",g=f.options,v=function(t,i,n,o,r,a){var d,u="",p="",m=f._isVerticallyGrouped()?c:h,v=function(e){return function(){return f._resourceBySlot({groupIndex:e})}};return l.date.isToday(e[h])&&(p+="k-today"),(l.date.getMilliseconds(t)<l.date.getMilliseconds(g.workDayStart)||l.date.getMilliseconds(t)>=l.date.getMilliseconds(g.workDayEnd)||!f._isWorkDay(e[m]))&&(p+=" k-nonwork-hour"),u+="<td"+(""!==p?' class="'+p+'"':"")+">",d=l.date.getDate(e[h]),l.date.setTime(d,l.date.getMilliseconds(t)),u+=s({date:d,resources:v(a)}),u+="</td>"},_=new Date(o),w=f.options.minorTickCount,y=f.options.majorTick*b,k=y/w||1;for(u=0;u<n;u++){for(m+="<tr>",u%(n/f._dates.length)===0&&(c=u/(n/f._dates.length),_=new Date(f._dates[c]),l.date.setTime(_,l.date.getMilliseconds(o))),h=0,p=t;h<p;h++)if(m+=f._forTimeRange(_,r,v,a,i),a){d(_,k,!1);break}m+="</tr>"}return m},_addTimeSlotsCollections:function(e,t,i,n,o){var r,s,a,l,c,d,u,h,p,f,m,g,_=this._view,b=i.length;for(o&&(b/=t),r=0;r<t;r++)for(s=0,o&&(s=r),l=s*b,c=0,d=i[l].children,u=o?b:d.length/(t*e),h=d.length/t,a=v(new Date((+_.startTime()))),f=0;f<u;f++){for(o?(p=0,d=i[f+u*r].children):(p=r*h+e*f,c++),m=0;m<e;m++)g=_.groups[m],_._addTimeSlotToCollection(g,d,m,p,r,a,n);a+=n}},_getVerticalGroupCount:function(){var e=this._view;return e.content.find("tr").length},_getVerticalRowCount:function(e,t,i){return i},_renderEvent:function(e,t,i,n,o,r,s,a){var l,c,d,u,h,p=this._view,f=[];for(c=o.start.index;c<=o.end.index;c++)l=p._createEventElement(i.occurrence,t,c!==a,c!==s),l.appendTo(r).css({top:0,height:p.options.eventHeight}),d=n._timeSlotCollections[0]._slots[c],u=n.timeSlotRanges(d.start,d.end,!1)[0],h={start:c===s?i.occurrence._startTime||i.occurrence.start:d.start,end:c===a?i.occurrence._endTime||i.occurrence.end:d.end,element:l,uid:t.uid,slotRange:u,rowIndex:0,offsetTop:0},e.events[t.uid]=h,f.push(h),p.addContinuousEvent(n,u,l,t.isAllDay),p._arrangeRows(h,u,e);e.events[t.uid]=f},_verticalCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_horizontalCountForLevel:function(e,t){var i=this._view;return i._columnCountForLevel(t)/i._columnCountForLevel(2)},_updateCurrentVerticalTimeMarker:function(t,i){var n=this._view,o=n.times.find("tr:first th:first"),r=n.times.find("tr:first th:last"),s="<div class='"+w+"'></div>",a=e(s).prependTo(n.times),l=Math.round(t[0].innerRect(i,new Date(i.getTime()+1),!1).top),c={};this._isRtl?(c.right=o.position().left+p(o)-p(r),a.addClass(y+"-left")):(c.left=r.position().left,a.addClass(y+"-right")),c.top=l-h(a)*x/2,a.css(c),e(s).prependTo(n.content).css({top:l,height:"1px",right:"1px",width:n.content[0].scrollWidth,left:0})},_changeGroup:function(e,t,i){var n=this._view;i||(e.groupIndex=t?n.groups.length-1:0)},_prevGroupSlot:function(e){return e},_nextGroupSlot:function(e){return e},_changeDate:function(e,t,i){var n,o,r=this._view,s=r.groups[e.groupIndex];if(t){if(n=s._getCollections(!1),o=i.index-1,o>=0)return n[0]._slots[o]}else if(n=s._getCollections(!1),o=i.index+1,n[0]&&n[0]._slots[o])return n[0]._slots[o]},_verticalSlots:function(e,t,i){return this._changeDate(e,t,i)},_verticalMethod:function(e,t){return t?e?"upSlot":"downSlot":e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(e,i,n,o){var r=this._view;return o?t:r._normalizeVerticalSelection(e,i,n)},_horizontalSlots:function(e,t,i,n,o,r,s){var a=this._view,l=a._changeGroup(e,s),c={};return l?c.startSlot=c.endSlot=l:a._isVerticallyGrouped()||(c.startSlot=t[i](n),c.endSlot=t[i](o)),c},_changeVerticalViewPeriod:function(e,t,i,n){var o=this._view;return!(e.startSlot&&e.endSlot||t||!o._changeViewPeriod(i,n,o._isVerticallyGrouped()))},_changeHorizontalViewPeriod:function(e,t,i,n){var o=this._view;return!o._isVerticallyGrouped()&&!(e.startSlot&&e.endSlot||t||!o._changeViewPeriod(i,n,!1))},_updateDirection:function(e,t,i,n){var o=this._view;o._updateDirection(e,t,i,n,!o._isVerticallyGrouped())},_createMoveHint:function(e,t){var i,n,o,r,s=this._view,a=e.start,l=e.end;for(i=a.index;i<=l.index;i++)n=e.collection._slots[i],o=s._createEventElement(t.occurrence,t.occurrence,!1,!1),o.addClass("k-event-drag-hint"),r={left:n.offsetLeft+2,top:n.offsetTop,height:s.options.eventHeight,width:n.offsetWidth},o.css(r),s._appendMoveHint(o)},_adjustLeftPosition:function(e){var t=this._view;return t._isRtl&&!t._isVerticallyGrouped()&&(e-=t.content[0].scrollWidth-t.content[0].offsetWidth),e}});l.ui.scheduler.TimelineGroupedView=A,l.ui.scheduler.TimelineGroupedByDateView=E,a=u.extend({init:function(e,t){var i=this;u.fn.init.call(i,e,t),i._groupedView=i._getGroupedView(),i.title=i.options.title||i.options.name,i._workDays=n(i.options),i._templates(),i._editable(),i.calculateDateRange(),i._groups(),i._currentTime(!0)},name:"timeline",_getGroupedView:function(){return this._isGroupedByDate()?new l.ui.scheduler.TimelineGroupedByDateView(this):new l.ui.scheduler.TimelineGroupedView(this)},_getNextEventIndexBySlot:function(e,t,i){var n,o;if(this._isVerticallyGrouped())return l.ui.SchedulerView.fn._getNextEventIndexBySlot.call(this,e,t,i);for(n=0,o=0;o<t.length;o++)if(e.startDate()>t[o].start.startDate())n++;else{if(!(e.startDate().getTime()===t[o].start.startDate().getTime()&&i>t[o].start.groupIndex))break;n++}return n},_getSelectedSlot:function(e,t,i,n,o,r){return this._isVerticallyGrouped()?l.ui.SchedulerView.fn._getSelectedSlot.call(this,e,t,i,n,o,r):e},_getSortedEvents:function(t){return this._isVerticallyGrouped()?l.ui.SchedulerView.fn._getSortedEvents.call(this,t):t.sort(function(t,i){var n=t.start.startDate().getTime()-i.start.startDate().getTime();return 0===n&&(t.start.isDaySlot&&!i.start.isDaySlot&&(n=-1),!t.start.isDaySlot&&i.start.isDaySlot&&(n=1)),0===n&&(n=t.start.groupIndex-i.start.groupIndex),0===n&&(n=e(t.element).index()-e(i.element).index()),n})},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var i,n,o,r,s,a,c,d,u,p,f,m,g,v=this.options;if(this.datesHeader.find("."+w).remove(),this.times.find("."+w).remove(),this.content.find("."+w).remove(),this._isInDateSlot({start:t,end:t}))for(v.currentTimeMarker.useLocalTimezone===!1&&(i=v.dataSource.options.schema.timezone,v.dataSource&&i&&(n=l.timezone.offset(t,i),t=l.timezone.convert(t,t.getTimezoneOffset(),n))),o=v.group&&"vertical"!=v.group.orientation?this.groups.length:1,r=0;r<o;r++){if(s=this.groups[r],!s)return;if(a=l.date.toUtcTime(t),c=s.timeSlotRanges(a,a+1),0===c.length)return;d=c[0].collection,u=d.slotByStartDate(t),u&&(this._isVerticallyGrouped()?this._groupedView._updateCurrentVerticalTimeMarker(c,t):(p="<div class='"+w+"'></div>",f=this.datesHeader.find("."+k),m=Math.round(c[0].innerRect(t,new Date(t.getTime()+1),!1).left),g=e(p).prependTo(f).addClass(y+"-down"),g.css({left:this._adjustLeftPosition(m-h(g)*x/2),top:f.find("tr:last").prev().position().top}),e(p).prependTo(this.content).css({left:this._adjustLeftPosition(m),width:"1px",height:this.content[0].scrollHeight-1,top:0})))}},_adjustLeftPosition:function(e){return this._groupedView._adjustLeftPosition(e)},_currentTime:function(e){var i=this,n=i.options.currentTimeMarker;n!==!1&&n.updateInterval!==t&&(i._currentTimeMarkerUpdater(),e&&(i._currentTimeUpdateTimer=setInterval(m(this._currentTimeMarkerUpdater,i),n.updateInterval)))},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+C,".k-event a:has(.k-i-close)",function(i){t.trigger("remove",{uid:e(this).closest(".k-event").attr(l.attr("uid"))}),i.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+C,".k-scheduler-content td",function(e){var i,n=t._slotByPosition(e.pageX,e.pageY);n&&(i=t._resourceBySlot(n),t.trigger("add",{eventInfo:f({start:n.startDate(),end:n.endDate()},i)})),e.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+C,".k-event",function(i){t.trigger("edit",{uid:e(this).closest(".k-event").attr(l.attr("uid"))}),i.preventDefault()})},_touchEditable:function(){var i=this,n=0;l.support.mobileOS.android&&(n=5),i.options.editable.create!==!1&&(i._addUserEvents=new l.UserEvents(i.element,{threshold:n,useClickAsTap:!l.support.browser.edge,filter:".k-scheduler-content td",tap:function(e){var n,o,r,s;i._scrolling||(n=e.x.location!==t?e.x.location:e.x,o=e.y.location!==t?e.y.location:e.y,r=i._slotByPosition(n,o),r&&(s=i._resourceBySlot(r),i.trigger("add",{eventInfo:f({start:r.startDate(),end:r.endDate()},s)})),e.preventDefault())}})),i.options.editable.update!==!1&&(i._editUserEvents=new l.UserEvents(i.element,{threshold:n,useClickAsTap:!l.support.browser.edge,filter:".k-event",tap:function(t){if(!i._scrolling){var n=e(t.target).closest(".k-event");n.hasClass("k-event-active")||i.trigger("edit",{uid:n.attr(l.attr("uid"))}),t.preventDefault()}}}))},_slotByPosition:function(e,t){var i,n,o,r=this.content,s=r.offset();for(e-=s.left,t-=s.top,this._isRtl?(o=l.support.browser,o.mozilla?(e+=r[0].scrollWidth-r[0].offsetWidth,e+=r[0].scrollLeft):o.msie?(e-=r.scrollLeft(),e+=r[0].scrollWidth-r[0].offsetWidth):o.webkit&&(e+=r[0].scrollLeft)):e+=r[0].scrollLeft,t+=r[0].scrollTop,e=Math.ceil(e),t=Math.ceil(t),n=0;n<this.groups.length;n++)if(i=this._groupedView._getTimeSlotByPosition(e,t,n))return i;return null},options:{name:"TimelineView",title:"Timeline",selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}",date:l.date.today(),startTime:l.date.today(),endTime:l.date.today(),showWorkHours:!1,minorTickCount:2,editable:!0,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,majorTick:60,eventHeight:25,eventMinWidth:0,columnWidth:100,groupHeaderTemplate:"#=text#",majorTimeHeaderTemplate:"#=kendo.toString(date, 't')#",slotTemplate:"&nbsp;",eventTemplate:S,dateHeaderTemplate:T,footer:{command:"workDay"},currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0},messages:{defaultRowText:"All events",showFullDay:"Show full day",showWorkDay:"Show business hours"}},events:["remove","add","edit"],_templates:function(){var e=this.options,t=f({},l.Template,e.templateSettings);this.eventTemplate=this._eventTmpl(e.eventTemplate,D),this.majorTimeHeaderTemplate=l.template(e.majorTimeHeaderTemplate,t),this.dateHeaderTemplate=l.template(e.dateHeaderTemplate,t),this.slotTemplate=l.template(e.slotTemplate,t),this.groupHeaderTemplate=l.template(e.groupHeaderTemplate,t)},_render:function(t){var i=this;t=t||[],i._dates=t,i._startDate=t[0],i._endDate=t[t.length-1||0],i._calculateSlotRanges(),i.createLayout(i._layout(t)),i._content(t),i._footer(),i._setContentWidth(),i.refreshLayout(),i.datesHeader.on("click"+C,".k-nav-day",function(t){var n=e(t.currentTarget).closest("th"),o=i._slotByPosition(n.offset().left,i.content.offset().top);i.trigger("navigate",{view:"timeline",date:o.startDate()})}),i._groupedView._hideHeaders()},_setContentWidth:function(){var e=this.content,t=e.width(),i=this.content.find("table"),n=i.find("tr:first").children().length,o=100,r=n*this.options.columnWidth;t<r&&(o=Math.ceil(r/t*100)),i.add(this.datesHeader.find("table")).css("width",o+"%")},_calculateSlotRanges:function(){var e,t,i,n,o=this._dates,r=this.startTime(),s=this.endTime();for(s=v(s),r=v(r),s===r?s+=_-1:s<r&&(s+=_),e=[],t=0;t<o.length;t++)i=g(o[t]),d(i,r),n=g(o[t]),d(n,s),e.push({start:l.date.toUtcTime(i),end:l.date.toUtcTime(n)});this._slotRanges=e},_forTimeRange:function(e,t,n,o,r){var s,a,l,c,u,h,p,f,m,g,w,y,k,x,C,S;for(e=i(e),t=i(t),s=this,a=v(e),l=v(t),c=s.options.minorTickCount,u=s.options.majorTick*b,h=u/c||1,p=new Date((+e)),f=0,g="",m=_/h,a!=l&&(a>l&&(l+=_),m=(l-a)/h),m=o?1:Math.round(m),r&&(m*=r);f<m;f++)w=f%(u/h),y=0===w,k=w<c-1,x=w===c-1,C=c,m%c!==0&&(S=m-(f+1)<c,y&&S&&(C=m%c)),g+=n(p,y,k,x,C,f%r),o||(r?f%r===r-1&&d(p,h,!1):d(p,h,!1));return g},_layout:function(e){var t,i,n,o=[],r=[],s=this,a=[{text:s.options.messages.defaultRowText}],l=s._groupedView,c=[];for(t=0;t<s.options.minorTickCount;t++)c.push({text:"&#8203;",className:"k-last",minorTicks:!0});for(this._forTimeRange(s.startTime(),s.endTime(),function(e,t,i,n,r){var a,d=s.majorTimeHeaderTemplate;t&&(a={text:d({date:e}),className:n?"k-slot-cell":"",columns:c.slice(0,r)},l._setColspan(a),o.push(a))}),i=0;i<e.length;i++)r.push({text:s.dateHeaderTemplate({date:e[i]}),className:"k-slot-cell",columns:o.slice(0)});return n=this.groupedResources,n.length&&("vertical"===this._groupOrientation()?(a=l._createRowsLayout(n,null,this.groupHeaderTemplate,r),r=l._createVerticalColumnsLayout(n,null,this.groupHeaderTemplate,r)):r=l._createColumnsLayout(n,r,this.groupHeaderTemplate,r)),{columns:r,rows:a}},_footer:function(){var t,i,n,o=this.options;o.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',i=o.footer.command,i&&"workDay"===i?(t+='<ul class="k-reset k-header">',t+='<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>',t+=(o.showWorkHours?o.messages.showFullDay:o.messages.showWorkDay)+"</a></li>",t+="</ul>"):t+="&nbsp;",t+="</div>",this.footer=e(t).appendTo(this.element),n=this,this.footer.on("click"+C,".k-scheduler-fullday",function(e){e.preventDefault(),n.trigger("navigate",{view:n.name||o.name,date:n.startDate(),isWorkDay:!o.showWorkHours})}))},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},_isWorkDay:function(e){var t,i=e.getDay(),n=this._workDays;for(t=0;t<n.length;t++)if(n[t]===i)return!0;return!1},_content:function(e){var t=this,i=t.startTime(),n=this.endTime(),o=1,r=1,s=e.length,a="",l=this.groupedResources,c=this.slotTemplate,d=!1;l.length&&(d="vertical"===t._groupOrientation(),d?(r=t._groupedView._getRowCount(this.rowLevels.length-1),o=t._groupedView._getGroupsCount()):o=t._groupCount()),a+="<tbody>",a+=t._groupedView._addContent(e,s,o,r,i,n,c,d),a+="</tbody>",this.content.find("table").append(a)},_groups:function(){var e,t,i,n,o,r,s=this._groupCount(),a=this._dates,c=a.length;for(this.groups=[],e=0;e<s;e++)t=this._addResourceView(e),i=a[0],n=a[a.length-1||0],o=v(this.startTime()),r=v(this.endTime()),0!==o&&r<=o&&(i=g(i),d(i,o),n=g(n),d(n,r)),t.addTimeSlotCollection(i,l.date.addDays(n,1));this._timeSlotGroups(s,c)},_isHorizontallyGrouped:function(){return this.groupedResources.length&&"horizontal"===this._groupOrientation()},_timeSlotGroups:function(e,t){var i=this._timeSlotInterval(),n=this._isVerticallyGrouped(),o=this.content.find("tr");o.attr("role","row"),this._groupedView._addTimeSlotsCollections(e,t,o,i,n)},_addTimeSlotToCollection:function(e,t,i,n,o,r,s){var a=t[i+n],l=e.getTimeSlotCollection(0),c=this._dates[o],d=Date.UTC(c.getFullYear(),c.getMonth(),c.getDate()),u=d+r,h=u+s;a.setAttribute("role","gridcell"),a.setAttribute("aria-selected",!1),l.addTimeSlot(a,u,h,!0)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},visibleEndDate:function(){var e=v(this.startTime()),t=v(this.endTime()),i=this.endDate();return 0!==e&&t<=e&&(i=l.date.addDays(i,1)),i},startTime:function(){var e=this.options;return e.showWorkHours?e.workDayStart:e.startTime},endTime:function(){var e=this.options;return e.showWorkHours?e.workDayEnd:e.endTime},_timeSlotInterval:function(){var e=this.options;return e.majorTick/e.minorTickCount*b},nextDate:function(){return l.date.nextDay(this.endDate())},previousDate:function(){return l.date.previousDay(this.startDate())},calculateDateRange:function(){this._render([this.options.date])},render:function(e){var t,i,n,o,r;for(this._headerColumnCount=0,this._groups(),this.element.find(".k-event").remove(),e=new l.data.Query(e).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray(),t=[],this._eventsByResource(e,this.groupedResources,t),i=[],n=0,o=0;o<t.length;o++)r={groupIndex:o,maxRowCount:0,events:{}},i.push(r),this._renderEvents(t[o],o,r),n<r.maxRowCount&&(n=r.maxRowCount);this._setRowsHeight(i,t.length,n),this._positionEvents(i,t.length),this._currentTime(!1),this.trigger("activate")},_positionEvents:function(t,i){var n,o,r,s,a;for(n=0;n<i;n++){o=t[n].events;for(r in o)if(s=o[r],e.isArray(s))for(a=0;a<s.length;a++)this._positionEvent(s[a]);else this._positionEvent(s)}},_setRowsHeight:function(t,i,n){var o,r,s,a,l,c=this.options.eventHeight+2,d=this._getBottomRowOffset(),u=this._groupedView,h=u._getVerticalGroupCount(i);for(i=this._isVerticallyGrouped()?h:1,o=0;o<i;o++)r=u._getVerticalRowCount(t,o,n),r=r?r:1,s=(c+2)*r+d,a=e(this.times.find("tr")[o]),l=e(this.content.find("tr")[o]),a.height(s),l.height(s);this._setContentWidth(),this.refreshLayout(),this._refreshSlots()},_getBottomRowOffset:function(){var e,t,i=.5*this.options.eventHeight,n=this._isMobile();return n?(e=30,t=60):(e=15,t=30),i>t?i=t:i<e&&(i=e),i},_positionEvent:function(e){var t,i,n,o=this.options.eventHeight+2,r=e.slotRange.innerRect(e.start,e.end,!1),s=this._adjustLeftPosition(r.left),a=r.right-r.left-2;a<0&&(a=0),a<this.options.eventMinWidth&&(t=e.slotRange.collection,i=t._slots[t._slots.length-1],n=i.offsetLeft+i.offsetWidth,a=this.options.eventMinWidth,n<s+a&&(a=n-r.left-2)),e.element.css({top:e.slotRange.start.offsetTop+e.rowIndex*(o+2)+"px",left:s,width:a})},_refreshSlots:function(){for(var e=0;e<this.groups.length;e++)this.groups[e].refresh()},_eventsByResource:function(e,t,i){var n,o,r,s,a=t[0];if(a)for(n=a.dataSource.view(),o=0;o<n.length;o++)r=this._resourceValue(a,n[o]),s=new l.data.Query(e).filter({field:a.field,operator:u.groupEqFilter(r)}).toArray(),t.length>1?this._eventsByResource(s,t.slice(1),i):i.push(s);else i.push(e)},_isInDateSlot:function(e){var t=e.start,i=e.end,n=g(this._startDate),o=l.date.addDays(g(this.visibleEndDate()),1);return t<o&&n<=i},_isInTimeSlot:function(e){var t,i=e._startTime||l.date.toUtcTime(e.start),n=e._endTime||l.date.toUtcTime(e.end),o=this._slotRanges;for(i===n&&(n+=1),t=0;t<o.length;t++)if(i<o[t].end&&o[t].start<n)return!0;return!1},_adjustEvent:function(e){var t,i=e.start,n=e.end,o=e._time("start"),r=e._time("end"),s=v(this.startTime()),a=v(this.endTime()),c=null,u=null,h=!1,p=!1;return e.isAllDay&&(i=g(i),o=0,n=g(n),r=_,u=l.date.addDays(n,1)),0===a&&(a=_),a<=s?(o<s&&o>=a&&(c=g(i),d(c,s),p=!0),r>a&&r<=s&&(u=g(n),d(u,a),h=!0)):(s>o?(c=g(i),d(c,s),p=!0):a<=o&&(c=g(i),c=l.date.addDays(c,1),d(c,s),p=!0),a<r?(u=g(n),d(u,a),h=!0):s>r&&(u=g(n),u=l.date.addDays(u,-1),d(u,a),h=!0)),t=e.clone({start:c?c:i,end:u?u:n,_startTime:c?l.date.toUtcTime(c):e._startTime,_endTime:u?l.date.toUtcTime(u):e._endTime,isAllDay:!1}),{occurrence:t,head:h,tail:p}},_renderEvents:function(e,t,i){var n,o,r,s,a,l,c,d,u,h,p;for(o=0,r=e.length;o<r;o++)n=e[o],this._isInDateSlot(n)&&(s=n.isAllDay||n.duration()>=_,a=this.content,(s||this._isInTimeSlot(n))&&(l=this._adjustEvent(n),c=this.groups[t],c._continuousEvents||(c._continuousEvents=[]),this._isInTimeSlot(l.occurrence)&&(d=c.slotRanges(l.occurrence,!1),u=d[0],h=u.start.index,p=u.end.index,this._groupedView._renderEvent(i,n,l,c,u,a,h,p))))},addContinuousEvent:function(e,t,i,n){var o=e._continuousEvents;o.push({element:i,isAllDay:n,uid:i.attr(l.attr("uid")),start:t.start,end:t.end})},_createEventElement:function(t,i,n,o){var r,s,a=this.eventTemplate,c=this.options.editable,d=this._isMobile(),u=c&&c.destroy!==!1&&!d,h=c&&c.resize!==!1,p=i._time("start"),m=i._time("end"),g=i.start,v=i.end,_=this.eventResources(i);return i._startTime&&p!==l.date.getMilliseconds(i.start)&&(g=new Date(p),g=l.timezone.apply(g,"Etc/UTC")),i._endTime&&m!==l.date.getMilliseconds(i.end)&&(v=new Date(m),v=l.timezone.apply(v,"Etc/UTC")),r=f({},{ns:l.ns,resizable:h,showDelete:u,head:n,tail:o,singleDay:1==this._dates.length,resources:_,inverseColor:!(!_||!_[0])&&this._shouldInverseResourceColor(_[0]),messages:this.options.messages},i,{start:g,end:v}),s=e(a(r)),this.angular("compile",function(){return{elements:s,data:[{dataItem:r}]}}),s},_arrangeRows:function(e,t,i){var n,o,s,a,l,c,d=t.start.index,h=t.end.index,p=e.slotRange.innerRect(e.start,e.end,!1),f=p.right+this.options.eventMinWidth,m=r(t.events(),p.left,f);for(t.addEvent({slotIndex:d,start:d,end:h,rectLeft:p.left,rectRight:f,element:e.element,uid:e.uid}),m.push({start:d,end:h,uid:e.uid}),n=u.createRows(m),i.maxRowCount<n.length&&(i.maxRowCount=n.length),o=0,s=n.length;o<s;o++)for(a=n[o].events,l=0,c=a.length;l<c;l++)i.events[a[l].uid].rowIndex=o},_groupCount:function(){var e=this.groupedResources,t=this._groupedView;return e.length?"vertical"===this._groupOrientation()?t._verticalCountForLevel(e.length-1):t._horizontalCountForLevel(e.length-1,this.columnLevels.length-1):1},_updateEventForSelection:function(e){
var t=this._adjustEvent(e.clone());return t.occurrence},_eventOptionsForMove:function(e){return e.isAllDay?{isAllDay:!1}:{}},_updateEventForResize:function(e){e.isAllDay&&e.set("isAllDay",!1)},_updateMoveHint:function(e,t,i){var n,o,r,s=this.groups[t],a=e.clone({start:e.start,end:e.end}),l=a.duration();if(a.start=new Date(a.start.getTime()+i),a.end=new Date(+a.start+l),this._removeMoveHint(e.uid),this._isInDateSlot(a)&&(a.isAllDay||a.duration()>=_||this._isInTimeSlot(a)))for(n=this._adjustEvent(a),o=s.slotRanges(n.occurrence,!1),r=0;r<o.length;r++)this._groupedView._createMoveHint(o[r],n)},_appendMoveHint:function(e){e.appendTo(this.content),this._moveHint=this._moveHint.add(e)},_updateResizeHint:function(e,t,i,n){var o,r,s,a,c,d,h,p,f,m,g,v=this.groups[t],_=v.ranges(i,n,!1,!1);for(this._removeResizeHint(),o=0;o<_.length;o++){if(r=_[o],s=r.startSlot(),a=r.innerRect(i,n,!1),a.top=s.offsetTop,c=a.right-a.left,c<0)for(d=0;d<r.events().length;d++)if(r.events()[d].uid===e.uid){c=r.events()[d].rectRight-a.left;break}h=r.endSlot().offsetTop+s.offsetHeight-a.top,p=this._adjustLeftPosition(a.left),f=u.fn._createResizeHint.call(this,p,a.top,c,h),this._resizeHint=this._resizeHint.add(f)}m="t",g=this.content,this._resizeHint.appendTo(g),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(l.toString(l.timezone.toLocalDate(i),m)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(l.toString(l.timezone.toLocalDate(n),m))},selectionByElement:function(e){var t=e.offset();return this._slotByPosition(t.left,t.top)},_updateDirection:function(e,t,i,n,o){var r=t[0].start,s=t[t.length-1].end;i&&!o&&r.index===s.index&&r.collectionIndex===s.collectionIndex&&(e.backward=n)},_changeGroup:function(e,t){var i=t?"prevGroupSlot":"nextGroupSlot",n=this[i](e.start,e.groupIndex,!1);return n&&(e.groupIndex+=t?-1:1),this._groupedView._changeGroup(e,t,n),n},prevGroupSlot:function(e,t,i){var n=this.groups[t],o=n.ranges(e,e,i,!1)[0].start;if(!(t<=0))return this._groupedView._prevGroupSlot(o,n,i)},nextGroupSlot:function(e,t,i){var n=this.groups[t],o=n.ranges(e,e,i,!1)[0].start;if(!(t>=this.groups.length-1))return this._groupedView._nextGroupSlot(o,n,i)},_verticalSlots:function(e,t,i,n){var o=this._groupedView,r=o._verticalMethod(n,i),s=t[0].start,a=t[t.length-1].end,l=this.groups[e.groupIndex],c=o._normalizeVerticalSelection(e,t,n,i);return c&&(s=a=c),s=l[r](s),a=l[r](a),i||!this._isVerticallyGrouped()||s&&a||(s=a=o._verticalSlots(e,n,c)),{startSlot:s,endSlot:a}},_horizontalSlots:function(e,t,i,n){var o=n?"upSlot":"downSlot",r=t[0].start,s=t[t.length-1].end,a=this.groups[e.groupIndex],l={};return i?(l.startSlot=a[o](r),l.endSlot=a[o](s),i||!this._isHorizontallyGrouped()||r&&s||(l.startSlot=l.endSlot=this._changeGroup(e,n))):l=this._groupedView._horizontalSlots(e,a,o,r,s,i,n),l},_changeViewPeriod:function(e,t){var i,n=t?this.previousDate():this.nextDate(),o=e.start,r=e.end,s=new Date(n),a=new Date(n);return!this._isInRange(s,a)&&(e.start=s,e.end=a,this._isHorizontallyGrouped()&&(e.groupIndex=t?this.groups.length-1:0),i=r-o,t?(r=v(this.endTime()),r=0===r?_:r,d(e.start,r-i),d(e.end,r)):(o=v(this.startTime()),d(e.start,o),d(e.end,o+i)),e.events=[],!0)},move:function(e,t,i){var n,o,r,s,a,c=!1,d=this.groups[e.groupIndex],u=l.keys,h=this._groupedView,p=d.ranges(e.start,e.end,!1,!1);if(t===u.DOWN||t===u.UP){if(c=!0,r=t===u.UP,h._updateDirection(e,p,i,r),s=this._verticalSlots(e,p,i,r),h._changeVerticalViewPeriod(s,i,e,r))return c}else if((t===u.LEFT||t===u.RIGHT)&&(c=!0,r=t===u.LEFT,this._updateDirection(e,p,i,r,!1),s=this._horizontalSlots(e,p,i,r),h._changeHorizontalViewPeriod(s,i,e,r)))return c;return c&&(n=s.startSlot,o=s.endSlot,i?(a=e.backward,a&&n?e.start=n.startDate():!a&&o&&(e.end=o.endDate())):n&&o&&(e.start=n.startDate(),e.end=o.endDate()),e.events=[]),c},destroy:function(){var e=this;e.element&&e.element.off(C),e.footer&&e.footer.remove(),e._currentTimeUpdateTimer&&clearInterval(e._currentTimeUpdateTimer),u.fn.destroy.call(this),this._isMobile()&&e.options.editable&&(e.options.editable.create!==!1&&e._addUserEvents.destroy(),e.options.editable.update!==!1&&e._editUserEvents.destroy())}}),f(!0,c,{TimelineView:a,TimelineWeekView:a.extend({options:{name:"TimelineWeekView",title:"Timeline Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",majorTick:120},name:"timelineWeek",calculateDateRange:function(){var e,t,i=this.options.date,n=l.date.dayOfWeek(i,this.calendarInfo().firstDay,-1),o=[];for(e=0,t=7;e<t;e++)o.push(n),n=l.date.nextDay(n);this._render(o)}}),TimelineWorkWeekView:a.extend({options:{name:"TimelineWorkWeekView",title:"Timeline Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",majorTick:120},name:"timelineWorkWeek",nextDate:function(){var e=l.date.dayOfWeek(l.date.nextDay(this.endDate()),this.calendarInfo().firstDay,1);return l.date.addDays(e,this._workDays[0])},previousDate:function(){var e=l.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),t=this._workDays;return l.date.addDays(e,t[t.length-1]-7)},calculateDateRange:function(){for(var e=this.options.date,t=l.date.dayOfWeek(e,this.options.workWeekStart,-1),i=l.date.dayOfWeek(t,this.options.workWeekEnd,1),n=[];t<=i;)n.push(t),t=l.date.nextDay(t);this._render(n)}}),TimelineMonthView:a.extend({options:{name:"TimelineMonthView",title:"Timeline Month",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",workDayStart:new Date(1980,1,1,0,0,0),workDayEnd:new Date(1980,1,1,23,59,59),footer:!1,majorTick:1440,minorTickCount:1},name:"timelineMonth",calculateDateRange:function(){var e,t,i=this.options.date,n=l.date.firstDayOfMonth(i),o=l.date.lastDayOfMonth(i),r=[];for(e=0,t=o.getDate();e<t;e++)r.push(n),n=l.date.nextDay(n);this._render(r)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.min",["kendo.dropdownlist.min","kendo.editable.min","kendo.multiselect.min","kendo.window.min","kendo.datetimepicker.min","kendo.scheduler.recurrence.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.timelineview.min","kendo.mobile.actionsheet.min","kendo.mobile.pane.min","kendo.pdf.min"],e)}(function(){return function(e,t){function i(e,t){return t=t||"",e.startTimezone&&(t=e.startTimezone,e.endTimezone&&(t+=" | "+e.endTimezone)),t}function n(e,t){var i=t.timezone;i&&(e[M.attr("timezone")]=i)}function o(e,t){var i,n=t.model.fields[t.field].validation;n&&(i=n.dateCompare,i&&G(i)&&i.message&&(e[M.attr("dateCompare-msg")]=i.message))}function r(e,t){return function(i){return i=e(i),a(i,"apply",t),i||[]}}function s(e,t){return function(i){return i&&("[object Array]"===Y.call(i)||i instanceof M.data.ObservableArray||(i=[i])),a(i,"remove",t,!0),i=e(i),i||[]}}function a(e,t,i,n){var o,r,s;for(e=e||[],r=0,s=e.length;r<s;r++)o=e[r],n?o.startTimezone||o.endTimezone?i?(o.start=M.timezone.convert(o.start,o.startTimezone||o.endTimezone,i),o.end=M.timezone.convert(o.end,o.endTimezone||o.startTimezone,i),o.start=M.timezone[t](o.start,i),o.end=M.timezone[t](o.end,i)):(o.start=M.timezone[t](o.start,o.startTimezone||o.endTimezone),o.end=M.timezone[t](o.end,o.endTimezone||o.startTimezone)):i&&(o.start=M.timezone[t](o.start,i),o.end=M.timezone[t](o.end,i)):o.startTimezone||o.endTimezone?(o.start=M.timezone[t](o.start,o.startTimezone||o.endTimezone),o.end=M.timezone[t](o.end,o.endTimezone||o.startTimezone),i&&(o.start=M.timezone.convert(o.start,o.startTimezone||o.endTimezone,i),o.end=M.timezone.convert(o.end,o.endTimezone||o.startTimezone,i))):i&&(o.start=M.timezone[t](o.start,i),o.end=M.timezone[t](o.end,i)),n&&delete o.uid;return e}function l(e,t){for(var i,n=e.length,o=0;o<n;o++)if(i=e[o],i.uid===t)return i}function c(e,t,i){return e=i?M.timezone.convert(e,t,i):M.timezone.remove(e,t)}function d(e){var t,i,n,o,r,s,a,l,d,u,h,p;return!(e.filter("[name=end]").length&&(t=e.closest(".k-scheduler-edit-form"),i=t.find("[name=start]:visible"),n=t.find("[name=end]:visible"),n[0]&&i[0]&&(s=M.widgetInstance(i,M.ui),a=M.widgetInstance(n,M.ui),l=t.data("kendoEditable"),d=l?l.options.model:null,s&&a?(o=s.value(),r=a.value()):(o=M.parseDate(i.val()),r=M.parseDate(n.val())),o&&r)))||(d&&(u=i.attr(M.attr("timezone")),h=d.startTimezone,p=d.endTimezone,h=h||p,p=p||h,h&&(o=c(o,h,u),r=c(r,p,u))),o<=r)}function u(e,t,i,n){for(var o=e.length,r=[],s=0;s<o;s++)r=r.concat(e[s].expand(t,i,n));return r}function h(e){return delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate,e}function p(t,i){var n,o,r=(t.fields||t)[i],s=["url","email","number","date","boolean"],a=r?r.validation:{},l=M.attr("type"),c=e.inArray,d={};for(n in a)o=a[n],c(n,s)>=0?d[l]=n:M.isFunction(o)||(d[n]=G(o)?o.value||n:o),d[M.attr(n+"-msg")]=o.message;return d}function f(t,i){var n=p(i,t.field);return function(o){e(M.format('<select data-{0}bind="value:{1}" title="'+i.title+'">',M.ns,t.field)).appendTo(o).attr(n).kendoDropDownList({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,optionLabel:"None",template:M.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function m(t){var i=p(t.model,t.field);return function(t,n){e('<textarea name="description" class="k-textbox" title="'+n.title+'"/>').attr(i).appendTo(t)}}function g(t,i){var n=p(i,t.field);return function(i){e(M.format('<select data-{0}bind="value:{1}">',M.ns,t.field)).appendTo(i).attr(n).kendoMultiSelect({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,itemTemplate:M.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField),tagTemplate:M.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function v(t,i){var n=p(i,t.field);return function(i){var o,r,s="",a=t.dataSource.view();for(o=0,r=a.length;o<r;o++)s+=M.format('<option value="{0}">{1}</option>',M.getter(t.dataValueField)(a[o]),M.getter(t.dataTextField)(a[o]));e(M.format('<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>',M.ns,t.field,s,t.valuePrimitive)).appendTo(i).attr(n)}}function _(e,t){var i,n=e.end.getTime()-e.start.getTime(),o=new Date(e.start.getTime());return M.date.setTime(o,t),i=new Date(o.getTime()),M.date.setTime(i,n,!0),{start:o,end:i}}var b,w,y,k,x,C,S,T,D,A,E,I,M=window.kendo,R=M.date,F=M.support.input,P=R.MS_PER_DAY,z=R.getDate,B=M.date.getMilliseconds,L=M.recurrence,H=e.extend({F10:121},M.keys),N=M.ui,O=N.Widget,V=N.DataBoundWidget,W="string",U=N.Popup,q=N.Calendar,j=M.data.DataSource,G=e.isPlainObject,$=e.extend,K=e.proxy,Y=Object.prototype.toString,Q=e.isArray,X=".kendoScheduler",Z="click",J="mousedown",ee=M.support.pointers?"pointerdown":"touchstart",te=M.support.pointers?"pointermove":"touchmove",ie=M.support.pointers?"pointerup":"touchend",ne=M.support.mousemove,oe="change",re="cancel",se="remove",ae="save",le="add",ce="edit",de="k-state-focused",ue="k-state-expanded",he=".k-scheduler-views",pe=/(?:value:start|value:end)(?:,|$)/,fe=z(new Date),me=",",ge=/\;/g,ve="recurrenceException",_e="Are you sure you want to delete this event?",be="Do you want to delete only this event occurrence or the whole series?",we="Do you want to edit only this event occurrence or the whole series?",ye="Are you sure you want to delete this event occurrence?",ke="Are you sure you want to delete the whole series?",xe='<a class="k-button #=className#" #=attr# href="\\#">#=text#</a>',Ce=M.template('<li class="k-current-view" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>'),Se=M.template('<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-scheduler-navigation"><li class="k-state-default k-header k-nav-today"><a role="button" href="\\#" class="k-link" title="${messages.today}">${messages.today}</a></li><li class="k-state-default k-header k-nav-prev"><a role="button" href="\\#" class="k-link" title="${messages.previous}" aria-label="${messages.previous}"><span class="k-icon k-i-arrow-60-left" style="pointer-events: none"></span></a></li><li class="k-state-default k-header k-nav-next"><a role="button" href="\\#" class="k-link" title="${messages.next}" aria-label="${messages.next}"><span class="k-icon k-i-arrow-60-right" style="pointer-events: none"></span></a></li><li class="k-state-default k-nav-current"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-calendar"></span><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div>'),Te=M.template('<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-today"><a role="button" href="\\#" class="k-link">${messages.today}</a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div><div class="k-floatwrap k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-prev"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-left"></span></a></li><li class="k-state-default k-nav-current"><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></li><li class="k-state-default k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-right"></span></a></li></ul></div>'),De=function(t,i){var r={name:i.field,title:i.title},s=F.date?"":M.attr("role")+'="datepicker" ',a=M.attr("role")+'="datetimepicker" ',l=i.model.isAllDay,c=M.attr("validate")+"='"+!l+"'",d=M.attr("validate")+"='"+l+"'";n(r,i),o(r,i),e('<input type="datetime-local" required '+M.attr("type")+'="date" '+a+M.attr("bind")+'="value:'+i.field+',invisible:isAllDay" '+c+"/>").attr(r).appendTo(t),e('<input type="date" required '+M.attr("type")+'="date" '+s+M.attr("bind")+'="value:'+i.field+',visible:isAllDay" '+d+"/>").attr(r).appendTo(t),e("<span "+M.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},Ae=function(t,i){var r={name:i.field,title:i.title},s=i.model.isAllDay,a=M.attr("validate")+"='"+!s+"' ",l=M.attr("validate")+"='"+s+"' ";n(r,i),o(r,i),e('<input type="text" required '+M.attr("type")+'="date" '+M.attr("role")+'="datetimepicker" '+M.attr("bind")+'="value:'+i.field+',invisible:isAllDay" '+a+"/>").attr(r).appendTo(t),e('<input type="text" required '+M.attr("type")+'="date" '+M.attr("role")+'="datepicker" '+M.attr("bind")+'="value:'+i.field+',visible:isAllDay" '+l+"/>").attr(r).appendTo(t),e("<span "+M.attr("bind")+'="text: '+i.field+'Timezone"></span>').appendTo(t),"end"===i.field&&e("<span "+M.attr("bind")+'="text: startTimezone, invisible: endTimezone"></span>').appendTo(t),e("<span "+M.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},Ee=function(t,i){e("<div "+M.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).appendTo(t).kendoRecurrenceEditor({start:i.model.start,timezone:i.timezone,messages:i.messages})},Ie=function(t,i){e("<div "+M.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).appendTo(t).kendoMobileRecurrenceEditor({start:i.model.start,timezone:i.timezone,messages:i.messages,pane:i.pane,value:i.model[i.field]})},Me=function(t,n){var o=i(n.model,n.messages.noTimezone);e('<a href="#" class="k-button k-timezone-button" data-bind="invisible:isAllDay">'+o+"</a>").click(n.click).appendTo(t)},Re=function(t,i){e('<a href="#" class="k-button" data-bind="invisible:isAllDay">'+i.messages.timezoneEditorButton+"</a>").click(i.click).appendTo(t)},Fe=function(t,i){e("<div "+M.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).toggle(i.visible).appendTo(t).kendoMobileTimezoneEditor({optionLabel:i.noTimezone})},Pe=function(i,n){var o=n.visible||n.visible===t;e("<div "+M.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).toggle(o).appendTo(i).kendoTimezoneEditor({optionLabel:n.noTimezone,title:n.title})},ze=M.Class.extend({init:function(t,i){var n=t.timezone;this.reader=i,i.model&&(this.model=i.model),this.timezone=n,this.data=r(e.proxy(this.data,this),n),this.serialize=s(e.proxy(this.serialize,this),n)},errors:function(e){return this.reader.errors(e)},parse:function(e){return this.reader.parse(e)},data:function(e){return this.reader.data(e)},total:function(e){return this.reader.total(e)},groups:function(e){return this.reader.groups(e)},aggregates:function(e){return this.reader.aggregates(e)},serialize:function(e){return this.reader.serialize(e)}}),Be=M.data.Model.define({init:function(e){var t=this;M.data.Model.fn.init.call(t,e),t._defaultId=t.defaults[t.idField]},_time:function(e){var t=this[e],i="_"+e+"Time";return this[i]?this[i]-M.date.toUtcTime(M.date.getDate(t)):B(t)},_date:function(e){var t="_"+e+"Time";return this[t]?this[t]-this._time(e):M.date.getDate(this[e])},clone:function(t,i){var n=this.uid,o=new this.constructor(e.extend({},this.toJSON(),t));return i||(o.uid=n),o},duration:function(){var e=this.end,t=this.start,i=(e.getTimezoneOffset()-t.getTimezoneOffset())*M.date.MS_PER_MINUTE;return e-t-i},expand:function(e,t,i){return L?L.expand(this,e,t,i):[this]},update:function(e){for(var t in e)this.set(t,e[t]);this._startTime&&this.set("_startTime",M.date.toUtcTime(this.start)),this._endTime&&this.set("_endTime",M.date.toUtcTime(this.end))},isMultiDay:function(){return this.isAllDay||this.duration()>=M.date.MS_PER_DAY},isException:function(){return!this.isNew()&&this.recurrenceId},isOccurrence:function(){return this.isNew()&&this.recurrenceId},isRecurring:function(){return!(!this.recurrenceRule&&!this.recurrenceId)},isRecurrenceHead:function(){return!(!this.id||!this.recurrenceRule)},toOccurrence:function(t){return t=e.extend(t,{recurrenceException:null,recurrenceRule:null,recurrenceId:this.id||this.recurrenceId}),t[this.idField]=this.defaults[this.idField],this.clone(t,!0)},toJSON:function(){var e=M.data.Model.fn.toJSON.call(this);return e.uid=this.uid,delete e._startTime,delete e._endTime,e},shouldSerialize:function(e){return M.data.Model.fn.shouldSerialize.call(this,e)&&"_defaultId"!==e},set:function(e,t){var i,n,o,r=this.isAllDay||!1;M.data.Model.fn.set.call(this,e,t),"isAllDay"==e&&t!=r&&(i=M.date.getDate(this.start),n=new Date(this.end),o=M.date.getMilliseconds(n),0===o&&t&&(o=P),this.set("start",i),t===!0?(M.date.setTime(n,-o),n<i&&(n=i)):M.date.setTime(n,P-o),this.set("end",n))},id:"id",fields:{id:{type:"number"},title:{defaultValue:"",type:"string"},start:{type:"date",validation:{required:!0}},startTimezone:{type:"string"},end:{type:"date",validation:{required:!0,dateCompare:{value:d}}},endTimezone:{type:"string"},recurrenceRule:{defaultValue:"",type:"string"},recurrenceException:{defaultValue:"",type:"string"},isAllDay:{type:"boolean",defaultValue:!1},description:{type:"string"}}}),Le=j.extend({init:function(e){j.fn.init.call(this,$(!0,{},{schema:{modelBase:Be,model:Be}},e)),this.reader=new ze(this.options.schema,this.reader)},expand:function(e,t){var i,n=this.view(),o={};return e&&t&&(i=t.getTimezoneOffset(),t=new Date(t.getTime()+P-1),t.getTimezoneOffset()!==i&&(t=M.timezone.apply(t,i)),o={logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lte",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:new Date(e.getTime()+P-1)},{field:"end",operator:"gte",value:e}]}]},n=new M.data.Query(u(n,e,t,this.reader.timezone)).filter(o).toArray()),n},cancelChanges:function(e){e&&e.isOccurrence()&&this._removeExceptionDate(e),j.fn.cancelChanges.call(this,e)},insert:function(e,t){if(t){if(!(t instanceof Be)){var i=t;t=this._createNewModel(),t.accept(i)}return(!this._pushCreated&&t.isRecurrenceHead()||t.recurrenceId)&&(t=t.recurrenceId?t:t.toOccurrence(),this._addExceptionDate(t)),j.fn.insert.call(this,e,t)}},pushCreate:function(e){this._pushCreated=!0,j.fn.pushCreate.call(this,e),this._pushCreated=!1},remove:function(e){return e.isRecurrenceHead()?this._removeExceptions(e):e.isRecurring()&&this._addExceptionDate(e),j.fn.remove.call(this,e)},_removeExceptions:function(e){for(var t=this.data().slice(0),i=t.shift(),n=e.id;i;)i.recurrenceId===n&&j.fn.remove.call(this,i),i=t.shift();e.set(ve,"")},_removeExceptionDate:function(e){var t,i,n,o;e.recurrenceId&&(t=this.get(e.recurrenceId),t&&(i=e.defaults.start,n=RegExp("(\\"+me+"?)"+L.toExceptionString(i,this.reader.timezone)),o=(t.recurrenceException||"").replace(ge,me).replace(/\,$/,""),n.test(o)?t.set(ve,o.replace(n,"")):(i=e.start,n=RegExp("(\\"+me+"?)"+L.toExceptionString(i,this.reader.timezone)),t.set(ve,o.replace(n,"")))))},_addExceptionDate:function(e){var t,i=e.start,n=this.reader.timezone,o=this.get(e.recurrenceId),r=(o.recurrenceException||"").replace(ge,me).replace(/\,$/,"");L.isException(r,i,n)||(t=L.toExceptionString(i,n),e.defaults.start=i,o.set(ve,r+(r&&t?me:"")+t))}});Le.create=function(e){(Q(e)||e instanceof M.data.ObservableArray)&&(e={data:e});var t=e||{},i=t.data;if(t.data=i,!(t instanceof Le)&&t instanceof M.data.DataSource)throw Error("Incorrect DataSource type. Only SchedulerDataSource instances are supported");return t instanceof Le?t:new Le(t)},$(!0,M.data,{SchedulerDataSource:Le,SchedulerDataReader:ze,SchedulerEvent:Be}),b={update:{text:"Save",className:"k-primary k-scheduler-update"},canceledit:{text:"Cancel",className:"k-scheduler-cancel"},destroy:{text:"Delete",imageClass:"k-i-close",className:"k-primary k-scheduler-delete",iconClass:"k-icon"}},w={mobile:{dateRange:De,timezonePopUp:Me,timezone:Fe,recurrence:Ie,description:m,multipleResources:v,resources:f},desktop:{dateRange:Ae,timezonePopUp:Re,timezone:Pe,recurrence:Ee,description:m,multipleResources:g,resources:f}},y=M.Observable.extend({init:function(e,t){M.Observable.fn.init.call(this),this.element=e,this.options=$(!0,{},this.options,t),this.createButton=this.options.createButton,this.toggleDateValidationHandler=K(this._toggleDateValidation,this)},_toggleDateValidation:function(t){if("isAllDay"==t.field){var i,n,o,r=this.container,s=this.editable.options.model.isAllDay,a=M.attr("bind");r.find("["+a+"*=end],["+a+"*=start]").each(function(){i=e(this),pe.test(i.attr(a))&&(n=i.is("["+M.attr("role")+"=datetimepicker],[type*=datetime]"),o=s!==n,i.attr(M.attr("validate"),o))})}},fields:function(e,t){var i,n,o=this,r=o.options.messages,s=o.options.timezone,a=function(e){e.preventDefault(),o._initTimezoneEditor(t,this)},l=[{field:"title",title:r.editor.title},{field:"start",title:r.editor.start,editor:e.dateRange,timezone:s},{field:"end",title:r.editor.end,editor:e.dateRange,timezone:s},{field:"isAllDay",title:r.editor.allDayEvent}];M.timezone.windows_zones&&(l.push({field:"timezone",title:r.editor.timezone,editor:e.timezonePopUp,click:a,messages:r.editor,model:t}),l.push({field:"startTimezone",title:r.editor.startTimezone,editor:e.timezone,noTimezone:r.editor.noTimezone}),l.push({field:"endTimezone",title:r.editor.endTimezone,editor:e.timezone,noTimezone:r.editor.noTimezone})),t.recurrenceId||l.push({field:"recurrenceRule",title:r.editor.repeat,editor:e.recurrence,timezone:s,messages:r.recurrenceEditor,pane:this.pane}),"description"in t&&l.push({field:"description",title:r.editor.description,editor:e.description({model:t,field:"description"})});for(i=0;i<this.options.resources.length;i++)n=this.options.resources[i],l.push({field:n.field,title:n.title,editor:n.multiple?e.multipleResources(n,t):e.resources(n,t)});return l},end:function(){return this.editable.end()},_buildEditTemplate:function(e,t,i){var n,o,r,s,a=this.options.messages,l=$({},M.Template,this.options.templateSettings),c=l.paramName,d=this.options.editable.template,u="";if(d)typeof d===W&&(d=window.unescape(d)),u+=M.template(d,l)(e);else for(n=0,o=t.length;n<o;n++)r=t[n],"startTimezone"===r.field&&(u+='<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">',u+='<div class="k-edit-form-container">',u+='<div class="k-edit-label"></div>',u+='<div class="k-edit-field"><label class="k-check"><input class="k-timezone-toggle" type="checkbox" />'+a.editor.separateTimezones+"</label></div>"),u+='<div class="k-edit-label"><label for="'+r.field+'">'+(r.title||r.field||"")+"</label></div>",!e.editable||e.editable(r.field)?(i.push(r),u+="<div "+M.attr("container-for")+'="'+r.field+'" class="k-edit-field"></div>'):(s="#:",r.field?(r=M.expr(r.field,c),s+=r+"==null?'':"+r):s+="''",s+="#",s=M.template(s,l),u+='<div class="k-edit-field">'+s(e)+"</div>"),"endTimezone"===r.field&&(u+=this._createEndTimezoneButton());return u},_createEndTimezoneButton:function(){return"</div></div>"},_revertTimezones:function(e){e.set("startTimezone",this._startTimezone),e.set("endTimezone",this._endTimezone),delete this._startTimezone,delete this._endTimezone}}),k=y.extend({init:function(){y.fn.init.apply(this,arguments),this.pane=M.mobile.ui.Pane.wrap(this.element),this.pane.element.parent().css("height",this.options.height),this.view=this.pane.view(),this._actionSheetButtonTemplate=M.template('<li><a #=attr# class="k-button #=className#" href="\\#">#:text#</a></li>'),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"}},options:{animations:{left:"slide",right:"slide:right"}},destroy:function(){this.close(),this.unbind(),this.pane.destroy()},_initTimezoneEditor:function(t){var n,o=this,r=o.pane,s=o.options.messages,a=o.timezoneView,l=o.container.find(".k-scheduler-timezones"),c=l.find(".k-timezone-toggle"),d=l.find(".k-edit-label:last").add(l.find(".k-edit-field:last")),u=function(e){if("startTimezone"===e.field){var i=t.startTimezone;c.prop("disabled",!i),i||(d.hide(),t.set("endTimezone",""),c.prop("checked",!1))}};o._startTimezone=t.startTimezone||"",o._endTimezone=t.endTimezone||"",a||(n='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+s.cancel+"</a>"+s.editor.timezoneTitle+'<a href="#" class="k-button k-scheduler-update">'+s.save+"</a></div></div>",this.timezoneView=a=r.append(n),a.contentElement().append(l.show()),a.element.on(Z+X,".k-scheduler-cancel, .k-scheduler-update",function(n){var a,l;n.preventDefault(),n.stopPropagation(),e(this).hasClass("k-scheduler-cancel")&&o._revertTimezones(t),t.unbind("change",u),a=r.element.find("#edit").data("kendoMobileView"),l=i(t,s.editor.noTimezone),a.contentElement().find(".k-timezone-button").text(l),r.navigate(a,o.options.animations.right)}),c.click(function(){d.toggle(c.prop("checked")),t.set("endTimezone","")}),t.bind("change",u)),c.prop("checked",t.endTimezone).prop("disabled",!t.startTimezone),t.endTimezone?d.show():d.hide(),r.navigate(a,o.options.animations.left)},_createActionSheetButton:function(e){return e.template=this._actionSheetButtonTemplate,this.createButton(e)},showDialog:function(t){var i,n,o="",r='<ul><li class="km-actionsheet-title">'+t.title+"</li>",s=this.element.find(".k-event["+M.attr("uid")+"='"+t.model.uid+"']");for(this.container&&(s=this.container.find(".k-scheduler-delete"),s[0]&&(o="phone")),i=0;i<t.buttons.length;i++)r+=this._createActionSheetButton(t.buttons[i]);r+="</ul>",n=e(r).appendTo(this.pane.view().element).kendoMobileActionSheet({type:o,cancel:this.options.messages.cancel,cancelTemplate:'<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',close:function(){this.destroy()},command:function(i){var o=n.element.find("li:not(.km-actionsheet-cancel) > .k-button").index(e(i.currentTarget));o>-1&&(n.close(),t.buttons[o].click())},popup:this._actionSheetPopupOptions}).data("kendoMobileActionSheet"),n.open(s)},editEvent:function(t){var i,n,o,r,s,a=this.pane,l="",c=this.options.messages,d=c.save,u=c.destroy,h=c.cancel,p=c.editor.editorTitle;return l+='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="edit" '+M.attr("uid")+'="'+t.uid+'"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+h+"</a>"+p+'<a href="#" class="k-button k-scheduler-update">'+d+"</a></div>",i=this.fields(w.mobile,t),n=this,o=[],l+=this._buildEditTemplate(t,i,o),!t.isNew()&&this.options.editable&&this.options.editable.destroy!==!1&&(l+='<div class="k-edit-buttons"><a href="#" class="k-scheduler-delete k-button">'+u+"</a></div>"),l+="</div>",r=a.append(l),s=this.container=r.element,this.editable=s.kendoEditable({fields:o,model:t,clearContainer:!1,target:n.options.target,validateOnBlur:!0}).data("kendoEditable"),s.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),this.trigger("edit",{container:s,model:t})?this.trigger("cancel",{container:s,model:t}):(s.on(Z+X,"a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, a.k-scheduler-delete",function(i){var o,r;i.preventDefault(),i.stopPropagation(),o=e(this),o.hasClass("k-scheduler-edit")?a.navigate("#edit",n.options.animations.right):(r="cancel",o.hasClass("k-scheduler-update")?r="save":o.hasClass("k-scheduler-delete")&&(r="remove"),n.trigger(r,{container:s,model:t}))}),a.navigate(r,n.options.animations.left),t.bind("change",n.toggleDateValidationHandler)),this.editable},_views:function(){return this.pane.element.find(M.roleSelector("view")).not(this.view.element)},close:function(){var e,t,i,n;if(this.container){for(this.pane.navigate("",this.options.animations.right),e=this._views(),i=0,n=e.length;i<n;i++)t=e.eq(i).data("kendoMobileView"),t&&t.purge();e.remove(),this.container=null,this.editable&&(this.editable.options.model.unbind("change",this.toggleDateValidationHandler),this.editable.destroy(),this.editable=null),this.timezoneView=null}}}),x=y.extend({destroy:function(){this.close(),this.unbind()},editEvent:function(t){var i,n,o,r=this,s=r.options.editable,a="<div "+M.attr("uid")+'="'+t.uid+'" class="k-popup-edit-form k-scheduler-edit-form"><div class="k-edit-form-container">',l=r.options.messages,c=l.save,d=l.cancel,u=l.destroy,h=this.fields(w.desktop,t),p=[];return a+=this._buildEditTemplate(t,h,p),n=G(s)?s.window:{},a+='<div class="k-edit-buttons k-state-default">',a+=this.createButton({name:"update",text:c,attr:i})+this.createButton({name:"canceledit",text:d,attr:i}),t.isNew()||s.destroy===!1||(a+=this.createButton({
name:"delete",text:u,attr:i})),a+="</div></div></div>",o=this.container=e(a).appendTo(r.element).eq(0).kendoWindow($({modal:!0,resizable:!1,draggable:!0,title:l.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&r.trigger(re,{container:o,model:t})&&e.preventDefault()}},n)),r.editable=o.kendoEditable({fields:p,model:t,clearContainer:!1,validateOnBlur:!0,target:r.options.target}).data("kendoEditable"),r.trigger(ce,{container:o,model:t})?r.trigger(re,{container:o,model:t}):(o.data("kendoWindow").center().open(),o.on(Z+X,"a.k-scheduler-cancel",function(e){e.preventDefault(),e.stopPropagation(),r.trigger(re,{container:o,model:t})}),o.on(Z+X,"a.k-scheduler-update",function(e){e.preventDefault(),e.stopPropagation(),r.trigger("save",{container:o,model:t})}),o.on(Z+X,"a.k-scheduler-delete",function(e){e.preventDefault(),e.stopPropagation(),r.trigger(se,{container:o,model:t})}),M.cycleForm(o),t.bind("change",r.toggleDateValidationHandler)),r.editable},close:function(){var e=this,t=function(){e.editable&&(e.editable.options.model.unbind("change",e.toggleDateValidationHandler),e.editable.destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};e.editable?(e._timezonePopup&&e._timezonePopup.data("kendoWindow")&&(e._timezonePopup.data("kendoWindow").destroy(),e._timezonePopup=null),e.container.is(":visible")?e.container.data("kendoWindow").bind("deactivate",t).close():t()):t()},_createEndTimezoneButton:function(){var e=this.options.messages,t="";return t+='<div class="k-edit-buttons k-state-default">',t+=this.createButton({name:"savetimezone",text:e.save})+this.createButton({name:"canceltimezone",text:e.cancel}),t+="</div></div></div>"},showDialog:function(t){var i,n,o,r=M.format("<div class='k-popup-edit-form'><div class='k-edit-form-container'><p class='k-popup-message'>{0}</p>",t.text);for(r+='<div class="k-edit-buttons k-state-default">',i=0;i<t.buttons.length;i++)r+=this.createButton(t.buttons[i]);r+="</div></div></div>",n=this.element,this.popup&&this.popup.destroy(),o=this.popup=e(r).appendTo(n).eq(0).on(Z,".k-button",function(i){i.preventDefault(),o.close();var n=e(i.currentTarget).index();t.buttons[n].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,close:function(){this.destroy(),n.focus()}}).getKendoWindow(),o.center().open()},_initTimezoneEditor:function(e,t){var i,n=this,o=n.container.find(".k-scheduler-timezones"),r=o.find(".k-timezone-toggle"),s=o.find(".k-edit-label:last").add(o.find(".k-edit-field:last")),a=o.find(".k-scheduler-savetimezone"),l=o.find(".k-scheduler-canceltimezone"),c=n._timezonePopup,d=function(t){if("startTimezone"===t.field){var i=e.startTimezone;r.prop("disabled",!i),i||(s.hide(),e.set("endTimezone",""),r.prop("checked",!1))}};n._startTimezone=e.startTimezone,n._endTimezone=e.endTimezone,c||(n._timezonePopup=c=o.kendoWindow({modal:!0,resizable:!1,draggable:!0,title:n.options.messages.editor.timezoneEditorTitle,visible:!1,close:function(i){e.unbind("change",d),i.userTriggered&&n._revertTimezones(e),t&&t.focus()}}),r.click(function(){s.toggle(r.prop("checked")),e.set("endTimezone","")}),a.click(function(e){e.preventDefault(),i.close()}),l.click(function(t){t.preventDefault(),n._revertTimezones(e),i.close()}),e.bind("change",d)),r.prop("checked",e.endTimezone).prop("disabled",!e.startTimezone),e.endTimezone?s.show():s.hide(),i=c.data("kendoWindow"),i.center().open()}}),C=V.extend({init:function(t,i){var n=this;O.fn.init.call(n,t,i),n.options.views&&n.options.views.length||(n.options.views=["day","week"]),n.resources=[],n._initModel(),n._wrapper(),n._views(),n._toolbar(),n._dataSource(),n._resources(),n._resizeHandler=function(){n.resize()},n.wrapper.on(J+X+" selectstart"+X,function(t){e(t.target).is(":kendoFocusable")||t.preventDefault()}),n.options.editable&&n.options.editable.resize!==!1&&n._resizable(),n._movable(),n._bindResize(),n.options.messages&&n.options.messages.recurrence&&(L.options=n.options.messages.recurrence),n._selectable(),n._touchHandlers(),n._ariaId=M.guid(),n._createEditor()},_bindResize:function(){e(window).on("resize"+X,this._resizeHandler)},_unbindResize:function(){e(window).off("resize"+X,this._resizeHandler)},dataItems:function(){var i,n,o,r,s,a=this,l=a.items(),c=a._data,d=e.map(l,function(t){return e(t).attr("data-uid")}),u={},h=d.length;for(i=0;i<h;i++)u[d[i]]=null;for(o=c.length,i=0;i<o;i++)r=c[i],u[r.uid]!==t&&(u[r.uid]=r);s=[];for(n in u)s.push(u[n]);return s},_isMobile:function(){var e=this.options;return e.mobile===!0&&M.support.mobileOS||"phone"===e.mobile||"tablet"===e.mobile},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_isMobilePhoneView:function(){var e=this.options;return e.mobile===!0&&M.support.mobileOS&&!M.support.mobileOS.tablet||"phone"===e.mobile},_groupsByResource:function(e,t,i,n,o){var r,s,a,l,c,d,u;if(i||(i=[]),r=e[0]){for(a=r.dataSource.view(),l=0,c=0;c<a.length;c++)d=M.getter(r.dataValueField)(a[c]),u=t+l+c,s=this._groupsByResource(e.slice(1),u,i,d,r.field),s[r.field]=d,l=s.groupIndex,o&&n&&(s[o]=n),1===e.length&&(s.groupIndex=t+c,i.push(s));return s}return{}},data:function(){return this._data},select:function(i){var n,o,r,s,a,l,c,d,u,h,p=this,f=p.view(),m=p._selection,g=f.groups;if(i===t)return r=f._selectedSlots,m?(m&&m.events&&(o=p._selectedEvents()),{start:m.start,end:m.end,events:o,slots:r,resources:f._resourceBySlot(m)}):[];if(!i)return p._selection=null,p._old=null,f.clearSelection(),t;if(e.isArray(i)&&(i={events:i.splice(0)}),i.resources){a=[],l=[],f.groupedResources&&p._groupsByResource(f.groupedResources,0,l);for(s in i.resources)a.push({field:s,operator:"eq",value:i.resources[s]});n=new M.data.Query(l).filter(a).toArray()}return i.events&&i.events.length?(p._selectEvents(i.events,n),p._select(),t):(g&&i.start&&i.end&&(c=z(f._startDate),d=M.date.addDays(z(f._endDate),1),i.start<d&&c<=i.end&&(u=n&&n.length?g[n[0].groupIndex]:g[0],h=u.ranges(i.start,i.end,i.isAllDay,!1),h.length&&(p._selection={start:M.timezone.toLocalDate(h[0].start.start),end:M.timezone.toLocalDate(h[h.length-1].end.end),groupIndex:h[0].start.groupIndex,index:h[0].start.index,isAllDay:h[0].start.isDaySlot,events:[]},p._select()))),t)},_selectEvents:function(e,t){var i,n,o,r,s,a,l,c,d=this,u=d.view(),h=u.groups,p=e.length,f=t&&t.length;for(i=0;i<p;i++)if(h&&f){for(n=h[t[0].groupIndex],o=[],r=n.timeSlotCollectionCount(),s=n.daySlotCollectionCount(),a=0;a<r;a++)o=o.concat(n.getTimeSlotCollection(a).events());for(l=0;l<s;l++)o=o.concat(n.getDaySlotCollection(l).events());o=new M.data.Query(o).filter({field:"element[0].getAttribute('data-uid')",operator:"eq",value:e[i]}).toArray(),o[0]&&d._createSelection(o[0].element)}else c=u.element.find(M.format(".k-event[data-uid={0}], .k-task[data-uid={0}]",e[i])),c.length&&d._createSelection(c[0])},_touchHandlers:function(){var t,i,n,o,r,s=this,a=s.wrapper,l=e.proxy(s._touchMove,s);a.on(ee+X,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){var n=s.wrapper.find(".k-scheduler-content");s._isTouch(e)&&(n.stop(!0,!1),s._touchPosX=t=s._tapPosition(e,"X"),s._touchPosY=i=s._tapPosition(e,"Y"),s._userTouched=!0,s.view()._scrolling=!1,r=Date.now(),a.on(te+X,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",l))}),a.on(ie+X,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){var c,d,u;s._isTouch(e)&&(c=Date.now()-r,d=s.wrapper.find(".k-scheduler-content"),u=-s._amplitude*(3e3/c),n=s._tapPosition(e,"X"),o=s._tapPosition(e,"Y"),s._dragging||((s.options.selectable&&Math.abs(n-t)<=10||Math.abs(o-i)<=10)&&s._mouseDownSelection(e),!M.support.kineticScrollNeeded&&c<200&&Math.abs(n-t)>10&&d.animate({scrollTop:d[0].scrollTop+u}),a.off(te+X,".k-scheduler-header-all-day td, .k-scheduler-content td",l)))})},_selectable:function(){var t,i=this,n=i.wrapper;i.options.selectable&&(i._tabindex(),n.on(J+X,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){i._isTouch(e)||i._mouseDownSelection(e)}),t=e.proxy(i._mouseMove,i),n.on(J+X,".k-scheduler-header-all-day td, .k-scheduler-content td",function(e){var o=e.which,r=e.button,s=o&&3===o||r&&2==r;i._isTouch(e)||s||n.on(ne+X,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),n.on("mouseup"+X+" mousecancel"+X,function(){n.off(ne+X,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),n.on("focus"+X,function(){i._selection||i._userTouched||i._selectFirstSlot(),i._select()}),n.on("focusout"+X,function(t){i._ctrlKey=i._shiftKey=!1,i.toolbar.find("ul > li").removeClass(de),e(t.relatedTarget).closest(he).length||i.toolbar.find(he).removeClass(ue)}),n.on("keydown"+X,K(i._keydown,i)),n.on("keyup"+X,function(e){i._ctrlKey=e.ctrlKey,i._shiftKey=e.shiftKey}))},_mouseDownSelection:function(e){var t=e.which,i=e.button,n=M.support.browser,o=t&&3===t||i&&2==i;o||(e.ctrlKey&&(this._ctrlKey=e.ctrlKey),e.shiftKey&&(this._shiftKey=e.shiftKey),this._createSelection(e.currentTarget)),this.wrapper.focus(),n.msie&&n.version<9&&setTimeout(function(){this.wrapper.focus()}),this.toolbar.find("ul > li").removeClass(de)},_selectFirstSlot:function(){this._createSelection(this.wrapper.find(".k-scheduler-content").find("td:first"))},_select:function(){var t,i,n,o,r,s=this,a=s.view(),l=s.wrapper,c=a.current(),d=s._selection,u=s._old?s._old.selection:null,h=s._old?s._old.eventsLength:null;if(d&&(c&&(c.removeAttribute("id"),c.removeAttribute("aria-label"),l.removeAttr("aria-activedescendant")),a.select(d),c=a.current(),c&&(u!==c||d.events&&h!==d.events.length))){if(t=e(c).data("uid"),s._old&&t&&t===e(s._old.selection).data("uid")&&d.events&&s._old.eventsLength===d.events.length)return;n=d,o=s._selectedEvents(),r=a._selectedSlots,o[0]?(n=o[0]||d,i=M.format(s.options.messages.ariaEventLabel,n.title,n.start,n.start)):i=M.format(s.options.messages.ariaSlotLabel,n.start,n.end),c.setAttribute("id",s._ariaId),c.setAttribute("aria-label",i),l.attr("aria-activedescendant",s._ariaId),s._old={selection:c,eventsLength:o.length},s.trigger("change",{start:d.start,end:d.end,events:o,slots:r,resources:a._resourceBySlot(d)})}},_selectedEvents:function(){for(var e,t=this._selection.events,i=t.length,n=0,o=[];n<i;n++)e=this.occurrenceByUid(t[n]),e&&o.push(e);return o},_tapPosition:function(e,t){return/touch/.test(e.type)?(e.originalEvent||e).changedTouches[0]["page"+t]:e["page"+t]},_touchMove:function(e){var t=this,i=t.wrapper.find(".k-scheduler-content"),n=i[0].scrollHeight>i[0].clientHeight,o=i[0].scrollWidth>i[0].clientWidth,r=t._tapPosition(e,"Y"),s=t._tapPosition(e,"X"),a=i[0].scrollTop-Math.round(r-t._touchPosY),l=i[0].scrollLeft-Math.round(s-t._touchPosX),c=n&&Math.abs(r-t._touchPosY)>10,d=o&&Math.abs(r-t._touchPosY)>10;t._dragging||M.support.kineticScrollNeeded||(c||d)&&(t._amplitude=Math.round(r-t._touchPosY),t._touchPosY=r,t._touchPosX=s,i.animate({scrollTop:a,scrollLeft:l},0),t.view()._scrolling=!0)},_mouseMove:function(t){var i=this;clearTimeout(i._moveTimer),i._isTouch(t)||(i._moveTimer=setTimeout(function(){var n,o,r,s=i.view(),a=i._selection;a&&(n=s.selectionByElement(e(t.currentTarget)),n&&a.groupIndex===n.groupIndex&&(o=n.startDate(),r=n.endDate(),o>=a.end?a.backward=!1:r<=a.start&&(a.backward=!0),a.backward?a.start=o:a.end=r,i._select()))},5))},_viewByIndex:function(e){var t,i=this.views;for(t in i){if(!e)return t;e--}},_keydown:function(i){var n,o,r,s,a,l,c=this,d=i.keyCode,u=c.view(),h=u.options.editable,p=c._selection,f=e.extend(p),m=16===d||18===d||17===d||91===d||92===d,g=".k-scheduler-tools > li,.k-scheduler-navigation > li,.k-scheduler-views > li.k-state-selected:visible, .k-scheduler-views > li.k-current-view:visible",v=c.toolbar.find(g),_=c.toolbar.find(he),b=e(i.target).closest(he).length||c.toolbar.find(".k-scheduler-views .k-state-focused").length,w=_.children().index(c.toolbar.find("."+de)),y=M.support.isRtl(c.element),k=y?-1:1;if(w==-1&&(w=_.children().index(c.toolbar.find(".k-state-selected"))),c._ctrlKey=i.ctrlKey,c._shiftKey=i.shiftKey,d===H.F10)return c.toolbar.find("ul > li:first").focus().addClass(de),i.preventDefault(),t;if(d===H.TAB){if(c.toolbar.find("."+de).length)return o=v.index(c.toolbar.find("."+de)),o===-1&&c._focusedView&&(o=v.index(c.toolbar.find(".k-scheduler-views > .k-state-selected"))),r=i.shiftKey?v[o-1]:v[o+1],c.toolbar.find("."+de).removeClass(de),r?(e(r).addClass(de).focus(),c._focusedView=null,i.preventDefault(),t):(c.element.focus(),i.preventDefault(),t)}else if(d===H.ENTER||d===H.SPACEBAR){if(b&&c._focusedView&&!c._focusedView.hasClass("k-state-selected"))return s=c._focusedView.data().name,c.trigger("navigate",{view:s,action:"changeView",date:c.date()})||(c.view(s),_.removeClass(ue),c.toolbar.find(".k-current-view:visible").length&&(e(document.activeElement).blur(),c.toolbar.find(".k-current-view:visible").addClass(de).find(".k-link").focus())),i.preventDefault(),t;if(c.toolbar.find("."+de+":visible").length)return c.toolbar.find("."+de+":visible").click(),i.preventDefault(),t}else if(i.altKey&&d===H.DOWN){if(c.toolbar.find("."+de+":visible").length)return c.toolbar.find("."+de+":visible").click(),i.preventDefault(),t}else{if(d===H.RIGHT&&b)return e(c.toolbar.find("."+de)).removeClass(de),c._focusedView=e(y?w-1===0?_.children(":not(.k-current-view):last"):_.children()[w+1*k]:w+1===_.children().length?_.children(":not(.k-current-view):first"):_.children()[w+1*k]),c._focusedView.focus().addClass(de),i.preventDefault(),t;if(d===H.LEFT&&b)return e(c.toolbar.find("."+de)).removeClass(de),c._focusedView=e(y?w+1===_.children().length?_.children(":not(.k-current-view):first"):_.children()[w-1*k]:w-1===0?_.children(":not(.k-current-view):last"):_.children()[w-1*k]),c._focusedView.focus().addClass(de),i.preventDefault(),t;if(d===H.DOWN&&c.toolbar.find(he).hasClass(ue))return c.toolbar.find("."+de).removeClass(de),n=c._focusedView?_.find(c._focusedView).index():_.children(".k-scheduler-views > .k-state-selected").index(),c._focusedView=e(n+1===_.children().length?_.children(":not(.k-current-view):first"):_.children()[n+1*k]),c._focusedView.focus().addClass(de),i.preventDefault(),t;if(d===H.UP&&c.toolbar.find(he).hasClass(ue))return c.toolbar.find("."+de).removeClass(de),n=c._focusedView?_.find(c._focusedView).index():_.children(".k-scheduler-views > .k-state-selected").index(),c._focusedView=e(n-1===0?_.children(":not(.k-current-view):last"):_.children()[n-1*k]),c._focusedView.focus().addClass(de),i.preventDefault(),t;if(i.altKey&&d===H.DOWN&&c.toolbar.find(".k-nav-current").hasClass(de))return c._showCalendar(),i.preventDefault(),t;if(d===H.ESC&&c.popup&&c.popup.visible())return c.popup.close(),i.preventDefault(),t;if(d===H.ESC&&c.toolbar.find(he).hasClass(ue))return c.toolbar.find(he).removeClass(ue),c.toolbar.find(he).children().removeClass(de),c._focusedView=null,c.toolbar.find(".k-current-view").focus().addClass(de),i.preventDefault(),t}if(!m){if(!p)return c._selectFirstSlot(),c._select(),c.element.focus(),t;d===H.TAB?u.moveToEvent(p,i.shiftKey)&&(c._select(),c.element.focus(),i.preventDefault()):d===H.ENTER||d===H.SPACEBAR?p.events.length&&h?h.update!==!1&&c.editEvent(p.events[0]):h&&h.create!==!1&&(p.isAllDay&&(p=e.extend({},p,{end:M.date.addDays(p.end,-1)})),i.preventDefault(),c.addEvent($({},p,u._resourceBySlot(p)))):d===H.DELETE&&h!==!1&&h.destroy!==!1?c.removeEvent(p.events[0]):d>=49&&d<=57?(a=c._viewByIndex(d-49),a&&!c.trigger("navigate",{view:a,action:"changeView",date:c.date()})&&c.view(a)):u.move(p,d,i.shiftKey)&&(u.inRange(p)?c._select():(l=c.date().getTime()>p.start.getTime()?"previous":"next",c.trigger("navigate",{view:c._selectedViewName,action:l,date:p.start})?(p.start=f.start,p.end=f.end):c.date(p.start)),c.toolbar.find("ul > li").removeClass(de),i.preventDefault()),c._adjustSelectedDate()}},_createSelection:function(t){var i,n,o=this._selection;t=e(t),t.is(".k-event")&&(i=t.attr(M.attr("uid")),o&&o.events.indexOf(i)!==-1&&!this._ctrlKey)||(o&&(this._ctrlKey||this._shiftKey)||(o=this._selection={events:[],groupIndex:0}),n=this.view().selectionByElement(t),n&&(o.groupIndex=n.groupIndex||0),i&&(n=l(this._data,i)),n&&n.uid&&(i=[n.uid]),this._updateSelection(n,i),this._adjustSelectedDate())},_updateSelection:function(e,i,n){var o,r,s,a=this._selection;e&&a&&(o=this.view(),e.uid&&(e=o._updateEventForSelection(e)),this._shiftKey&&a.start&&a.end?(r=e.end<a.end,a.end=e.endDate?e.endDate():e.end,r&&o._timeSlotInterval&&M.date.setTime(a.end,-o._timeSlotInterval())):(a.start=e.startDate?e.startDate():e.start,a.end=e.endDate?e.endDate():e.end),a.isAllDay="isDaySlot"in e?e.isDaySlot:e.isAllDay,null!==n&&n!==t&&(a.groupIndex=n),a.index=e.index,this._ctrlKey?(s=i&&i.length?a.events.indexOf(i[0]):-1,s>-1?a.events.splice(s,1):a.events=a.events.concat(i||[])):a.events=i||[])},options:{name:"Scheduler",date:fe,editable:!0,autoBind:!0,snap:!0,mobile:!1,timezone:"",allDaySlot:!0,min:new Date(1900,0,1),max:new Date(2099,11,31),toolbar:null,footer:{},messages:{today:"Today",pdf:"Export to PDF",save:"Save",cancel:"Cancel",destroy:"Delete",deleteWindowTitle:"Delete event",next:"Next",previous:"Previous",ariaSlotLabel:"Selected from {0:t} to {1:t}",ariaEventLabel:"{0} on {1:D} at {2:t}",views:{day:"Day",week:"Week",workWeek:"Work Week",agenda:"Agenda",month:"Month",timeline:"Timeline",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month"},recurrenceMessages:{deleteWindowTitle:"Delete Recurring Item",deleteWindowOccurrence:"Delete current occurrence",deleteWindowSeries:"Delete the series",editWindowTitle:"Edit Recurring Item",editWindowOccurrence:"Edit current occurrence",editWindowSeries:"Edit the series"},editable:{confirmation:_e},editor:{title:"Title",start:"Start",end:"End",allDayEvent:"All day event",description:"Description",repeat:"Repeat",timezone:"Timezone",startTimezone:"Start timezone",endTimezone:"End timezone",separateTimezones:"Use separate start and end time zones",timezoneEditorTitle:"Timezones",timezoneEditorButton:"Time zone",timezoneTitle:"Time zones",noTimezone:"No timezone",editorTitle:"Event"}},height:null,width:null,resources:[],group:{resources:[],orientation:"horizontal"},views:[],selectable:!1},events:[se,ce,re,ae,"add","dataBinding","dataBound","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","navigate","change"],destroy:function(){var t,i=this;O.fn.destroy.call(i),i.dataSource&&(i.dataSource.unbind(oe,i._refreshHandler),i.dataSource.unbind("progress",i._progressHandler),i.dataSource.unbind("error",i._errorHandler)),i.calendar&&(i.calendar.destroy(),i.popup.destroy()),i.view()&&i.view().destroy(),i._editor&&i._editor.destroy(),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),t=i.element.add(i.wrapper).add(i.toolbar).add(i.popup),t.off(X),clearTimeout(i._moveTimer),i._model=null,i.toolbar=null,i.element=null,e(window).off("resize"+X,i._resizeHandler),M.destroy(i.wrapper)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch?e.fetch():Q(e)&&this.view(this._selectedView)},items:function(){var e=this.wrapper.find(".k-scheduler-content"),t=this.view();return t&&"agenda"===t.options.name?e.find(".k-task"):e.find(".k-event").add(this.wrapper.find(".k-scheduler-header-wrap").find(".k-scheduler-header-all-day").siblings())},_movable:function(){var i,n,o,r,s,a,l,c,d,u,h=this,p=0,f=[],m=[],g=h._isMobile(),v=h.options.editable&&h.options.editable.move!==!1,b=h.options.editable&&h.options.editable.resize!==!1;(v||b&&g)&&(h._dragging=!1,g&&M.support.mobileOS.android&&(p=5),h._moveDraggable=new M.ui.Draggable(h.element,{distance:p,filter:".k-event",ignore:".k-resize-handle",holdToDrag:g,autoScroll:!0}),v&&h._moveDraggable.bind("dragstart",function(e){var s,p,m,g=h.view(),v=e.currentTarget,_=h._isTouch(e);if(h._dragging=!0,!g.options.editable||g.options.editable.move===!1)return h._dragging=!1,e.preventDefault(),t;if(_&&!v.hasClass("k-event-active"))return h._dragging=!1,h.element.find(".k-event-active").removeClass("k-event-active"),e.preventDefault(),t;if(a=h.occurrenceByUid(v.attr(M.attr("uid"))),l=a.clone(),u=a.clone(),l.update(g._eventOptionsForMove(l)),f=[],h._selection)for(s=h._selection.events,p=0;p<s.length;p++)m=h.occurrenceByUid(s[p]).clone(),m.update(g._eventOptionsForMove(m)),f.push(m);else f.push(l);i=g._slotByPosition(e.x.startLocation,e.y.startLocation),o=g._resourceBySlot(i),d=r=i.startOffset(e.x.startLocation,e.y.startLocation,h.options.snap),n=i,c=i,i&&!h.trigger("moveStart",{event:a})||e.preventDefault()}).bind("drag",function(t){var o,u,p,g,v,b=h.view(),w=b._slotByPosition(t.x.location,t.y.location);if(w){if(s=w.startOffset(t.x.location,t.y.location,h.options.snap),w.isDaySlot!==i.isDaySlot)if(w.isDaySlot!==c.isDaySlot)for(g=e(i.element).index(),v=e(w.element).parent().children().eq(g),i=b._slotByPosition(v.offset().left,v.offset().top),r=i.startOffset(t.x.location,t.y.location,!0),m=f.map(function(e){return e.clone()}),p=0;p<f.length;p++)f[p].isAllDay!=w.isDaySlot&&(f[p].isAllDay=w.isDaySlot,f[p].end=M.date.getDate(f[p].start),f[p].start=M.date.getDate(f[p].start),w.isDaySlot||(M.date.setTime(f[p].start,M.date.getMilliseconds(b.startTime())),M.date.setTime(f[p].end,M.date.getMilliseconds(b.startTime())+b._timeSlotInterval())));else i=e.extend(!0,{},c),r=d,f=m;for(o=s-r,p=0;p<f.length;p++)b._updateMoveHint(f[p],w.groupIndex,o);if(u=_(l,o),h.trigger("move",{event:a,slot:{element:w.element,start:w.startDate(),end:w.endDate(),isDaySlot:w.isDaySlot},resources:b._resourceBySlot(w),start:u.start,end:u.end}))for(p=0;p<f.length;p++)b._updateMoveHint(f[p],w.groupIndex,o);else n=w}}).bind("dragend",function(t){var i,d,u,p,g,v,b,w,y,k;if(h.view()._removeMoveHint(),i=s-r,d=_(l,i),u=d.start,p=d.end,h._dragging=!1,g=h.view()._resourceBySlot(n),v=h.trigger("moveEnd",{event:a,slot:{element:n.element,start:n.startDate(),end:n.endDate()},start:u,end:p,resources:g}),!v&&(a.start.getTime()!==u.getTime()||a.end.getTime()!==p.getTime()||c.isDaySlot!==n.isDaySlot||M.stringify(g)!==M.stringify(o))){for(h._isMultiDrag=f.length>1,b=0;b<f.length;b++)w=f[b],d=_(w,i),y=h.view()._eventOptionsForMove(w),k=e.extend({isAllDay:w.isAllDay,start:d.start,end:d.end},y,g),h._updateEvent(null,w,k);h._isMultiDrag&&(h.dataSource.sync(),h._isMultiDrag=!1)}t.currentTarget.removeClass("k-event-active"),this.cancelHold(),f=[],m=[]}).bind("dragcancel",function(){h.view()._removeMoveHint(),this.cancelHold(),f=[],m=[]}),h._moveDraggable.bind("hold",function(e){h._isTouch(e)&&(h.element.find(".k-event-active").removeClass("k-event-active"),h._createSelection(e.currentTarget),e.currentTarget.addClass("k-event-active"))}))},_resizable:function(){function t(e){var t,i={"k-resize-e":"east","k-resize-w":"west","k-resize-n":"north","k-resize-s":"south"};for(t in i)if(e.hasClass(t))return i[t]}var i,n,o,r,s,a=this,l=0;a._isMobile()&&M.support.mobileOS.android&&(l=5),a._resizeDraggable=new M.ui.Draggable(a.element,{distance:l,filter:".k-resize-handle",autoScroll:!0,dragstart:function(t){var l=e(t.currentTarget),c=l.closest(".k-event"),d=c.attr(M.attr("uid")),u=a.view();a._dragging=!0,o=a.occurrenceByUid(d),r=o.clone(),u._updateEventForResize(r),s=u._slotByPosition(t.x.startLocation,t.y.startLocation),a.trigger("resizeStart",{event:o})&&t.preventDefault(),i=M.date.toUtcTime(r.start),n=M.date.toUtcTime(r.end)},drag:function(l){var c,d,u,h,p,f;s&&(c=e(l.currentTarget),d=t(c),u=a.view(),h=u._slotByPosition(l.x.location,l.y.location),h&&s.groupIndex==h.groupIndex&&(s=h,p=i,f=n,"south"==d?!s.isDaySlot&&s.end-M.date.toUtcTime(r.start)>=u._timeSlotInterval()&&(n=r.isAllDay?s.startOffset(l.x.location,l.y.location,a.options.snap):s.endOffset(l.x.location,l.y.location,a.options.snap)):"north"==d?!s.isDaySlot&&M.date.toUtcTime(r.end)-s.start>=u._timeSlotInterval()&&(i=s.startOffset(l.x.location,l.y.location,a.options.snap)):"east"==d?s.isDaySlot&&M.date.toUtcTime(M.date.getDate(s.endDate()))>=M.date.toUtcTime(M.date.getDate(r.start))?n=r.isAllDay?s.startOffset(l.x.location,l.y.location,a.options.snap):s.endOffset(l.x.location,l.y.location,a.options.snap):!s.isDaySlot&&s.end-M.date.toUtcTime(r.start)>=u._timeSlotInterval()&&(n=s.endOffset(l.x.location,l.y.location,a.options.snap)):"west"==d&&(s.isDaySlot&&M.date.toUtcTime(M.date.getDate(r.end))>=M.date.toUtcTime(M.date.getDate(s.startDate()))?i=s.startOffset(l.x.location,l.y.location,a.options.snap):!s.isDaySlot&&M.date.toUtcTime(r.end)-s.start>=u._timeSlotInterval()&&(i=s.startOffset(l.x.location,l.y.location,a.options.snap))),a.trigger("resize",{event:o,slot:{element:s.element,start:s.startDate(),end:s.endDate()},start:M.timezone.toLocalDate(i),end:M.timezone.toLocalDate(n),resources:u._resourceBySlot(s)})?(i=p,n=f):u._updateResizeHint(r,s.groupIndex,i,n)))},dragend:function(l){var c,d=e(l.currentTarget),u=new Date(r.start.getTime()),h=new Date(r.end.getTime()),p=t(d);a._dragging=!1,a.view()._removeResizeHint(),"south"==p?h=M.timezone.toLocalDate(n):"north"==p?u=M.timezone.toLocalDate(i):"east"==p?h=s.isDaySlot?M.date.getDate(M.timezone.toLocalDate(n)):M.timezone.toLocalDate(n):"west"==p&&(s.isDaySlot?(u=new Date(M.timezone.toLocalDate(i)),u.setHours(0),u.setMinutes(0)):u=M.timezone.toLocalDate(i)),c=a.trigger("resizeEnd",{event:o,slot:{element:s.element,start:s.startDate(),end:s.endDate()},start:u,end:h,resources:a.view()._resourceBySlot(s)}),!c&&h.getTime()>=u.getTime()&&(r.start.getTime()==u.getTime()&&r.end.getTime()==h.getTime()||(a.view()._updateEventForResize(o),a._updateEvent(p,o,{start:u,end:h}))),s=null,o=null},dragcancel:function(){a._dragging=!1,a.view()._removeResizeHint(),s=null,o=null}})},_updateEvent:function(e,t,i){var n,o=this,r=function(e,t){try{o._preventRefresh=!0,e.update(i),o._convertDates(e)}finally{o._preventRefresh=!1}o.trigger(ae,{event:e})||(t&&t(),o._isMultiDrag||o.dataSource.sync())},s=function(e){return e.recurrenceRule?o.dataSource.getByUid(e.uid):o.dataSource.get(e.recurrenceId)},a=function(){var n,a,l=s(t);"south"!=e&&"north"!=e||(i.start&&(n=M.date.getDate(l.start),M.date.setTime(n,B(i.start)),i.start=n),i.end&&(a=M.date.getDate(l.end),M.date.setTime(a,B(i.end)),i.end=a)),o.dataSource._removeExceptions(l),r(l)},l=function(){var e=s(t),i=function(){o._convertDates(e),o._selection&&o._selection.events.push(a)},n=e.toOccurrence({start:t.start,end:t.end}),a=n.uid;r(o.dataSource.add(n),i)};t.recurrenceRule||t.isOccurrence()?(n=o.options.messages.recurrenceMessages,o._showRecurringDialog(t,l,a,{title:n.editWindowTitle,text:n.editRecurring?n.editRecurring:we,occurrenceText:n.editWindowOccurrence,seriesText:n.editWindowSeries})):r(o.dataSource.getByUid(t.uid))},_modelForContainer:function(t){return t=e(t).closest("["+M.attr("uid")+"]"),this.dataSource.getByUid(t.attr(M.attr("uid")))},showDialog:function(e){this._editor.showDialog(e)},focus:function(){this.wrapper.focus()},_confirmation:function(e,t){var i,n,o,r,s,a=this.options.editable;a===!0||a.confirmation!==!1?(i=this.options.messages,n=i.deleteWindowTitle,o=typeof a.confirmation===W?a.confirmation:i.editable.confirmation,this._isEditorOpened()&&t.isRecurring()&&(r=this.options.messages.recurrenceMessages,n=r.deleteWindowTitle,o=t.isException()?r.deleteRecurringConfirmation?r.deleteRecurringConfirmation:ye:r.deleteSeriesConfirmation?r.deleteSeriesConfirmation:ke),s=[{name:"destroy",text:i.destroy,click:function(){e()}}],this._isMobile()&&M.mobile.ui.Pane||s.push({name:"canceledit",text:i.cancel,click:function(){e(!0)}}),this._unbindResize(),this.showDialog({model:t,text:o,title:n,buttons:s}),this._bindResize()):e()},addEvent:function(e){var t,i,n=this._editor.editable,o=this.dataSource;e=e||{},i=this.trigger("add",{event:e}),!i&&(n&&n.end()||!n)&&(this.cancelEvent(),e&&e.toJSON&&(e=e.toJSON()),t=o.add(e),t&&(this.cancelEvent(),this._editEvent(t)))},saveEvent:function(){var e,t,i,n=this._editor;n&&(e=n.editable,t=n.container,i=this._modelForContainer(t),t&&e&&e.end()&&!this.trigger(ae,{container:t,event:i})&&(i.isRecurrenceHead()&&this.dataSource._removeExceptions(i),i.dirty||i.isOccurrence()||this._convertDates(i,"remove"),this.dataSource.sync()))},cancelEvent:function(){var e,t=this._editor,i=t.container;i&&(e=this._modelForContainer(i),e&&e.isOccurrence()&&(this._convertDates(e,"remove"),this._convertDates(this.dataSource.get(e.recurrenceId),"remove")),this.dataSource.cancelChanges(e),t.close())},editEvent:function(e){var t="string"==typeof e?this.occurrenceByUid(e):e;t&&(this.cancelEvent(),t.isRecurring()?this._editRecurringDialog(t):this._editEvent(t))},_editEvent:function(e){this._unbindResize(),this._createPopupEditor(e),this._bindResize()},_editRecurringDialog:function(e){var t=this,i=function(){e.isException()?t._editEvent(e):t.addEvent(e)},n=function(){e.recurrenceId&&(e=t.dataSource.get(e.recurrenceId)),t._editEvent(e)},o=t.options.messages.recurrenceMessages;t._showRecurringDialog(e,i,n,{title:o.editWindowTitle,text:o.editRecurring?o.editRecurring:we,occurrenceText:o.editWindowOccurrence,seriesText:o.editWindowSeries})},_showRecurringDialog:function(e,t,i,n){var o=this.options.editable,r=G(o)?o.editRecurringMode:"dialog";"occurrence"===r||this._isMultiDrag?t():"series"===r?i():(this._unbindResize(),this.showDialog({model:e,title:n.title,text:n.text,buttons:[{text:n.occurrenceText,click:t},{text:n.seriesText,click:i}]}),this._bindResize())},_createButton:function(e){var t=e.template||xe,i=typeof e===W?e:e.name||e.text,n={className:"k-scheduler-"+(i||"").replace(/\s/g,""),text:i,attr:""};if(!(i||G(e)&&e.template))throw Error("Custom commands should have name specified");return G(e)?(e.className&&(e.className+=" "+n.className),"edit"===i&&G(e.text)&&(e=$(!0,{},e),e.text=e.text.edit),n=$(!0,n,b[i],e)):n=$(!0,n,b[i]),M.template(t)(n)},_convertDates:function(e,t){var i=this.dataSource.reader.timezone,n=e.startTimezone,o=e.endTimezone,r=e.start,s=e.start;t=t||"apply",n=n||o,o=o||n,n&&(i?"apply"===t?(r=M.timezone.convert(e.start,i,n),s=M.timezone.convert(e.end,i,o)):(r=M.timezone.convert(e.start,n,i),s=M.timezone.convert(e.end,o,i)):(r=M.timezone[t](e.start,n),s=M.timezone[t](e.end,o)),e._set("start",r),e._set("end",s))},_createEditor:function(){var e,i=this;e=i._editor=this._isMobile()&&M.mobile.ui.Pane?new k(this.wrapper,$({},this.options,{target:this,timezone:i.dataSource.reader.timezone,resources:i.resources,createButton:K(this._createButton,this)})):new x(this.wrapper,$({},this.options,{target:this,createButton:K(this._createButton,this),timezone:i.dataSource.reader.timezone,resources:i.resources})),e.bind("cancel",function(e){return i.trigger("cancel",{container:e.container,event:e.model})?(e.preventDefault(),t):(i.cancelEvent(),i.focus(),t)}),e.bind("edit",function(e){i.trigger(ce,{container:e.container,event:e.model})&&e.preventDefault()}),e.bind("save",function(){i.saveEvent()}),e.bind("remove",function(e){i.removeEvent(e.model)})},_createPopupEditor:function(e){var t=this._editor;e.isNew()&&!e.isOccurrence()||(e.isOccurrence()&&this._convertDates(e.recurrenceId?this.dataSource.get(e.recurrenceId):e),this._convertDates(e)),this.editable=t.editEvent(e)},removeEvent:function(e){var t=this,i="string"==typeof e?t.occurrenceByUid(e):e;i&&(i.isRecurring()?t._deleteRecurringDialog(i):t._confirmation(function(e){e||t._removeEvent(i)},i))},occurrenceByUid:function(e){var t=this.dataSource.getByUid(e);return t||(t=l(this._data,e)),t},occurrencesInRange:function(e,t){return new M.data.Query(this._data).filter({logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lt",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:e},{field:"end",operator:"gt",value:e}]}]}).toArray()},_removeEvent:function(e){this.trigger(se,{event:e})||this.dataSource.remove(e)&&this.dataSource.sync()},_deleteRecurringDialog:function(e){var t,i,n,o,r,s=this,a=e,l=s.options.editable,c=G(l)?l.editRecurringMode:"dialog",d=function(){var e=a.recurrenceId?a:a.toOccurrence(),t=s.dataSource.get(e.recurrenceId);
s._convertDates(t),s._removeEvent(e)},u=function(){a.recurrenceId&&(a=s.dataSource.get(a.recurrenceId)),s._removeEvent(a)};("dialog"!=c||s._isEditorOpened())&&(t=function(){s._confirmation(function(e){e||d()},a)},i=function(){s._confirmation(function(e){e||u()},a)}),n=i||u,o=t||d,s._isEditorOpened()?e.isException()?o():n():(r=s.options.messages.recurrenceMessages,s._showRecurringDialog(e,o,n,{title:r.deleteWindowTitle,text:r.deleteRecurring?r.deleteRecurring:be,occurrenceText:r.deleteWindowOccurrence,seriesText:r.deleteWindowSeries}))},_isEditorOpened:function(){return!!this._editor.container},_unbindView:function(e){var t=this;t.angular("cleanup",function(){return{elements:t.items()}}),e.destroy()},_bindView:function(e){var t=this;t.options.editable&&(t._viewRemoveHandler&&e.unbind(se,t._viewRemoveHandler),t._viewRemoveHandler=function(e){t.removeEvent(e.uid)},e.bind(se,t._viewRemoveHandler),t._viewAddHandler&&e.unbind(le,t._viewAddHandler),t._viewAddHandler=function(e){t.addEvent(e.eventInfo)},e.bind(le,this._viewAddHandler),t._viewEditHandler&&e.unbind(ce,t._viewEditHandler),t._viewEditHandler=function(e){t.editEvent(e.uid)},e.bind(ce,this._viewEditHandler)),t._viewNavigateHandler&&e.unbind("navigate",t._viewNavigateHandler),t._viewNavigateHandler=function(e){var i,n;e.view&&(i="isWorkDay"in e,n=i?"changeWorkDay":"changeView",t.trigger("navigate",{view:e.view,isWorkDay:e.isWorkDay,action:n,date:e.date})||(i&&(t._workDayMode=e.isWorkDay),t._selectView(e.view),t.date(e.date)))},e.bind("navigate",t._viewNavigateHandler),t._viewActivateHandler&&e.unbind("activate",t._viewActivateHandler),t._viewActivateHandler=function(){var e=this;t._selection&&(e.constrainSelection(t._selection),t._select(),t._adjustSelectedDate())},e.bind("activate",t._viewActivateHandler)},_selectView:function(e){var t,i,n,o=this;e&&o.views[e]&&(o._selectedView&&o._unbindView(o._selectedView),o._selectedView=o._renderView(e),o._selectedViewName=e,o._viewsCount>1&&(t=Ce({views:o.views,view:e,ns:M.ns}),i=o.toolbar.find(".k-scheduler-views li:first-child"),i.is(".k-current-view")?i.replaceWith(t):o.toolbar.find(".k-scheduler-views").prepend(t),n=o.toolbar.find(".k-scheduler-views li").removeClass("k-state-selected"),n.end().find(".k-view-"+e.replace(/\./g,"\\.").toLowerCase()).addClass("k-state-selected")))},view:function(e){var i=this;return e?(i._selectView(e),i.rebind(),t):i._selectedView},viewName:function(){return this.view().name},_renderView:function(e){var t=this._initializeView(e);return this._bindView(t),(M.support.mouseAndTouchPresent||M.support.pointers)&&(t.content.css("-ms-touch-action","pinch-zoom"),t.content.css("touch-action","pinch-zoom")),this._model.set("formattedDate",t.dateForTitle()),this._model.set("formattedShortDate",t.shortDateForTitle()),t},resize:function(e){var t=this.getSize(),i=this._size,n=this.view();n&&n.groups&&(!e&&i&&t.width===i.width&&t.height===i.height||(this.refresh({action:"resize"}),this._size=t))},_adjustSelectedDate:function(){var e=this._model.selectedDate,t=this._selection,i=t.start;i&&!M.date.isInDateRange(e,z(i),z(t.end))&&e.setFullYear(i.getFullYear(),i.getMonth(),i.getDate())},_initializeView:function(e){var t,i,n=this.views[e];if(n){if(t=G(n),i=n.type,typeof i===W&&(i=M.getter(n.type)(window)),!i)throw Error("There is no such view");n=new i(this.wrapper,h($(!0,{},this.options,t?n:{},{resources:this.resources,date:this.date(),showWorkHours:this._workDayMode})))}return n},_views:function(){var e,t,i,n,o,r,s,a,l,c=this.options.views;for(this.views={},this._viewsCount=0,s=0,a=c.length;s<a;s++)l=!1,e=c[s],n=G(e),n?(r=o=e.type?e.type:e,typeof r!==W&&(o=e.name||e.title,l=!0)):r=o=e,t=S[o],t&&!l&&(e.type=t.type,t.title=this.options.messages.views[o],"day"===t.type?t.messages={allDay:this.options.messages.allDay}:"agenda"===t.type&&(t.messages={event:this.options.messages.event,date:this.options.messages.date,time:this.options.messages.time})),e=$({title:o},t,n?e:{}),o&&(this.views[o]=e,this._viewsCount++,i&&!e.selected||(i=o));i&&(this._selectedViewName=i)},rebind:function(){this.dataSource.fetch()},_dataSource:function(){var e=this,t=e.options,i=t.dataSource;i=Q(i)?{data:i}:i,!t.timezone||i instanceof Le?i instanceof Le&&(t.timezone=i.options.schema?i.options.schema.timezone:""):i=$(!0,i,{schema:{timezone:t.timezone}}),e.dataSource&&e._refreshHandler?e.dataSource.unbind(oe,e._refreshHandler).unbind("progress",e._progressHandler).unbind("error",e._errorHandler):(e._refreshHandler=K(e.refresh,e),e._progressHandler=K(e._requestStart,e),e._errorHandler=K(e._error,e)),e.dataSource=M.data.SchedulerDataSource.create(i).bind(oe,e._refreshHandler).bind("progress",e._progressHandler).bind("error",e._errorHandler),e.options.dataSource=e.dataSource},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_progress:function(e){var t=this.element.find(".k-scheduler-content");M.ui.progress(t,e)},_resources:function(){var t,i,n,o,r,s=this,a=s.options.resources;for(t=0;t<a.length;t++){if(i=a[t],n=i.field,o=i.dataSource,!n||!o)throw Error('The "field" and "dataSource" options of the scheduler resource are mandatory.');s.resources.push({field:n,name:i.name||n,title:i.title||n,dataTextField:i.dataTextField||"text",dataValueField:i.dataValueField||"value",dataColorField:i.dataColorField||"color",valuePrimitive:null==i.valuePrimitive||i.valuePrimitive,multiple:i.multiple||!1,dataSource:M.data.DataSource.create(o)})}r=e.map(s.resources,function(e){return e.dataSource.fetch()}),s.options.autoBind?e.when.apply(null,r).then(function(){s.view(s._selectedViewName)}):s._selectView(s._selectedViewName)},_initModel:function(){var e=this;e._model=M.observable({selectedDate:new Date(this.options.date),formattedDate:"",formattedShortDate:""}),e._model.bind("change",function(t){"selectedDate"===t.field&&e.view(e._selectedViewName)})},_wrapper:function(){var e=this,t=e.options,i=t.height,n=t.width;e.wrapper=e.element.addClass("k-widget k-scheduler k-floatwrap").attr("role","grid").attr("aria-multiselectable",!0),e._isMobile()&&e.wrapper.addClass("k-scheduler-mobile"),e._isMobilePhoneView()&&e.wrapper.addClass("k-scheduler-phone"),i&&e.wrapper.height(i),n&&e.wrapper.width(n)},date:function(e){return null!=e&&z(e)>=z(this.options.min)&&z(e)<=z(this.options.max)&&this._model.set("selectedDate",e),z(this._model.get("selectedDate"))},_toolbar:function(){var i,n,o=this,r=o.options,s=[];r.toolbar&&(s=e.isArray(r.toolbar)?r.toolbar:[r.toolbar]),i=this._isMobilePhoneView()?Te:Se,n=e(i({messages:r.messages,pdf:e.grep(s,function(e){return"pdf"==e||"pdf"==e.name}).length>0,ns:M.ns,view:o._selectedViewName,views:o.views,viewsCount:o._viewsCount})),o.wrapper.append(n),o.toolbar=n,M.bind(o.toolbar,o._model),n.on(Z+X,".k-pdf",function(e){e.preventDefault(),o.saveAsPDF()}),n.on(Z+X,".k-scheduler-navigation li",function(i){var n,r=e(this),s=new Date(o.date()),a="",l=new Date,c=o.options.timezone;if(i.preventDefault(),r.hasClass("k-nav-today"))a="today",c?(n=M.timezone.offset(l,c),s=M.timezone.convert(l,l.getTimezoneOffset(),n)):s=l;else if(r.hasClass("k-nav-next"))a="next",s=o.view().nextDate();else if(r.hasClass("k-nav-prev"))a="previous",s=o.view().previousDate();else if(r.hasClass("k-nav-current")&&!o._isMobilePhoneView())return o._showCalendar(),t;o.trigger("navigate",{view:o._selectedViewName,action:a,date:s})||o.date(s)}),n.on(Z+X,".k-scheduler-views li:not(.k-current-view), .k-scheduler-refresh",function(t){t.preventDefault();var i=e(this).attr(M.attr("name"));o.trigger("navigate",{view:i,action:"changeView",date:o.date()})||(o.view(i),o.element.find("."+ue).removeClass(ue))}),n.on(Z+X,".k-scheduler-views li.k-current-view",function(t){t.preventDefault(),o.element.find(".k-scheduler-views").toggleClass(ue),e(document).on(J+X,function(t){0===e(t.target).closest(".k-scheduler-views").length&&(o.element.find("."+ue).removeClass(ue),e(document).off(Z+X))})}),n.find("li").hover(function(){e(this).addClass("k-state-hover")},function(){e(this).removeClass("k-state-hover")})},_showCalendar:function(){var t=this,i=t.toolbar.find(".k-nav-current"),n=e('<div class="k-calendar-container"><div class="k-scheduler-calendar"/></div>');t.popup||(t.popup=new U(n,{anchor:i,open:function(){t.calendar||(t.calendar=new q(this.element.find(".k-scheduler-calendar"),{change:function(){var e=this.value();t.trigger("navigate",{view:t._selectedViewName,action:"changeDate",date:e})||(t.date(e),t.popup.close()),t._selectedView.element.focus(),t.toolbar.find(".k-nav-current").focus().addClass(de)},min:t.options.min,max:t.options.max})),t.calendar.element.on("keydown"+X,function(e){e.keyCode!==H.ESC&&e.keyCode!==H.TAB||(t.popup.close(),t._selectedView.element.focus(),t.toolbar.find(".k-nav-current").focus().addClass(de))}),t.calendar.value(t.date())},copyAnchorStyles:!1})),t.popup.open(),t.calendar.element.find("table").focus()},refresh:function(e){var t=this,i=this.view();this._progress(!1),this.angular("cleanup",function(){return{elements:t.items()}}),e=e||{},i&&(e&&"itemchange"===e.action&&(this._editor.editable||this._preventRefresh)||this.trigger("dataBinding",{action:e.action||"rebind",index:e.index,items:e.items})||(e&&"resize"===e.action||!this._editor||this._editor.close(),this._data=this.dataSource.expand(i.startDate(),i.visibleEndDate()),i.refreshLayout(),i.render(this._data),this.trigger("dataBound")))},slotByPosition:function(e,t){var i,n=this.view();return n._slotByPosition?(i=n._slotByPosition(e,t),i?{startDate:i.startDate(),endDate:i.endDate(),groupIndex:i.groupIndex,element:i.element,isDaySlot:i.isDaySlot}:null):null},slotByElement:function(t){var i=e(t).offset();return this.slotByPosition(i.left,i.top)},resourcesBySlot:function(e){return this.view()._resourceBySlot(e)}}),S={day:{type:"kendo.ui.DayView"},week:{type:"kendo.ui.WeekView"},workWeek:{type:"kendo.ui.WorkWeekView"},agenda:{type:"kendo.ui.AgendaView"},month:{type:"kendo.ui.MonthView"},timeline:{type:"kendo.ui.TimelineView"},timelineWeek:{type:"kendo.ui.TimelineWeekView"},timelineWorkWeek:{type:"kendo.ui.TimelineWorkWeekView"},timelineMonth:{type:"kendo.ui.TimelineMonthView"}},N.plugin(C),M.PDFMixin&&(M.PDFMixin.extend(C.prototype),T="k-scheduler-pdf-export",C.fn._drawPDF=function(t){var i,n,o,r=this.wrapper,s=r[0].style.cssText;return r.css({width:r.width(),height:r.height()}),r.addClass(T),i=this,n=new e.Deferred,o=r.find(".k-scheduler-content").find("table").css("table-layout","auto"),setTimeout(function(){o.css("table-layout","fixed"),i.resize(!0),i._drawPDFShadow({},{avoidLinks:i.options.pdf.avoidLinks}).done(function(e){var i={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(i),n.resolve(i.page)}).fail(function(e){n.reject(e)}).always(function(){r[0].style.cssText=s,r.removeClass(T),i.resize(!0),i.resize(!0)})}),n}),D=O.extend({init:function(e,t){var i=this,n=M.timezone.windows_zones;if(!n||!M.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");O.fn.init.call(i,e,t),i.wrapper=i.element,i._zonesQuery=new M.data.Query(n),i._zoneTitleId=M.guid(),i._zoneTitlePicker(),i._zonePicker(),i._zoneTitle.bind("cascade",function(){this.value()||i._zone.wrapper.hide()}),i._zone.bind("cascade",function(){i._value=this.value(),i.trigger("change")}),i.value(i.options.value)},options:{name:"TimezoneEditor",value:"",optionLabel:"No timezone"},events:["change"],_zoneTitlePicker:function(){var t=this,i=e('<input id="'+t._zoneTitleId+'" aria-label="'+t.options.title+'"/>').appendTo(t.wrapper);t._zoneTitle=new M.ui.DropDownList(i,{dataSource:M.timezone.zones_titles,dataValueField:"other_zone",dataTextField:"name",optionLabel:t.options.optionLabel})},_zonePicker:function(){var t=this,i=e('<input aria-label="'+t.options.title+'"/>').appendTo(this.wrapper);t._zone=new M.ui.DropDownList(i,{dataValueField:"zone",dataTextField:"territory",dataSource:t._zonesQuery.data,cascadeFrom:t._zoneTitleId,dataBound:function(){t._value=this.value(),this.wrapper.toggle(this.dataSource.view().length>1)}}),t._zone.wrapper.hide()},destroy:function(){O.fn.destroy.call(this),M.destroy(this.wrapper)},value:function(e){var i,n=this;return e===t?n._value:(i=n._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],i?(n._zoneTitle.value(i.other_zone),n._zone.value(i.zone)):n._zoneTitle.select(0),t)}}),N.plugin(D),A=M.template('<option value="#=other_zone#">#=name#</option>'),E=M.template('<option value="#=zone#">#=territory#</option>'),I=O.extend({init:function(e,t){var i=this,n=M.timezone.windows_zones;if(!n||!M.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");O.fn.init.call(i,e,t),i.wrapper=i.element,i._zonesQuery=new M.data.Query(n),i._zoneTitlePicker(),i._zonePicker(),i.value(i.options.value)},options:{name:"MobileTimezoneEditor",optionLabel:"No timezone",value:""},events:["change"],_bindZones:function(e){var t=e?this._filter(e):[];this._zone.html(this._options(t,E))},_filter:function(e){return this._zonesQuery.filter({field:"other_zone",operator:"eq",value:e}).data},_options:function(e,t,i){var n=0,o="",r=e.length;for(i&&(o+=t({other_zone:"",name:i}));n<r;n++)o+=t(e[n]);return o},_zoneTitlePicker:function(){var t=this,i=t._options(M.timezone.zones_titles,A,t.options.optionLabel);t._zoneTitle=e("<select>"+i+"</select>").appendTo(t.wrapper).change(function(){var e=this.value,i=t._zone;t._bindZones(e),e&&i[0].children.length>1?i.show():i.hide(),t._value=i[0].value,t.trigger("change")})},_zonePicker:function(){var t=this;t._zone=e('<select style="display:none"></select>').appendTo(this.wrapper).change(function(){t._value=this.value,t.trigger("change")}),t._bindZones(t._zoneTitle.val()),t._value=t._zone[0].value},destroy:function(){O.fn.destroy.call(this),M.destroy(this.wrapper)},value:function(e){var i,n=this,o=n._zone,r="",s="";return e===t?n._value:(i=n._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],i&&(s=i.zone,r=i.other_zone),n._zoneTitle.val(r),n._bindZones(r),o.val(s),s=o[0].value,s&&o[0].children.length>1?o.show():o.hide(),n._value=s,t)}}),N.plugin(I)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.touch.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.ui.Widget,o=e.proxy,r=Math.abs,s=20,a=n.extend({init:function(e,t){function r(e){return function(t){a._triggerTouch(e,t)}}function s(e){return function(t){a.trigger(e,{touches:t.touches,distance:t.distance,center:t.center,event:t.event})}}var a=this;n.fn.init.call(a,e,t),t=a.options,e=a.element,a.wrapper=e,a.events=new i.UserEvents(e,{filter:t.filter,surface:t.surface,minHold:t.minHold,multiTouch:t.multiTouch,allowSelection:!0,fastTap:t.fastTap,press:r("touchstart"),hold:r("hold"),tap:o(a,"_tap"),gesturestart:s("gesturestart"),gesturechange:s("gesturechange"),gestureend:s("gestureend")}),t.enableSwipe?(a.events.bind("start",o(a,"_swipestart")),a.events.bind("move",o(a,"_swipemove"))):(a.events.bind("start",o(a,"_dragstart")),a.events.bind("move",r("drag")),a.events.bind("end",r("dragend"))),i.notify(a)},events:["touchstart","dragstart","drag","dragend","tap","doubletap","hold","swipe","gesturestart","gesturechange","gestureend"],options:{name:"Touch",surface:null,global:!1,fastTap:!1,filter:null,multiTouch:!1,enableSwipe:!1,minXDelta:30,maxYDelta:20,maxDuration:1e3,minHold:800,doubleTapTimeout:800},cancel:function(){this.events.cancel()},destroy:function(){n.fn.destroy.call(this),this.events.destroy()},_triggerTouch:function(e,t){this.trigger(e,{touch:t.touch,event:t.event})&&t.preventDefault()},_tap:function(e){var t=this,n=t.lastTap,o=e.touch;n&&o.endTime-n.endTime<t.options.doubleTapTimeout&&i.touchDelta(o,n).distance<s?(t._triggerTouch("doubletap",e),t.lastTap=null):(t._triggerTouch("tap",e),t.lastTap=o)},_dragstart:function(e){this._triggerTouch("dragstart",e)},_swipestart:function(e){2*r(e.x.velocity)>=r(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this,i=t.options,n=e.touch,o=e.event.timeStamp-n.startTime,s=n.x.initialDelta>0?"right":"left";r(n.x.initialDelta)>=i.minXDelta&&r(n.y.initialDelta)<i.maxYDelta&&o<i.maxDuration&&(t.trigger("swipe",{direction:s,touch:e.touch}),n.cancel())}});i.ui.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.gantt.list.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min","kendo.columnsorter.min","kendo.datetimepicker.min","kendo.editable.min"],e)}(function(){return function(e){function t(e){var t,i,n=[],o=e.className;for(t=0,i=e.level;t<i;t++)n.push(r("span",{className:o}));return n}function i(){var t=n._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).blur()}var n=window.kendo,o=n.dom,r=o.element,s=o.text,a=n.support.browser,l=n.support.mobileOS,c=n.ui,d=c.Widget,u=e.extend,h=n._outerWidth,p=n._outerHeight,f=e.map,m=e.isFunction,g=a.msie&&a.version<9,v=n.keys,_={title:"Title",start:"Start Time",end:"End Time",percentComplete:"% Done",parentId:"Predecessor ID",id:"ID",orderId:"Order ID"},b="string",w=".kendoGanttList",y="click",k=".",x="<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",C={wrapper:"k-treelist k-grid k-widget",header:"k-header",alt:"k-alt",rtl:"k-rtl",editCell:"k-edit-cell",group:"k-treelist-group",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",selected:"k-state-selected",icon:"k-icon",iconCollapse:"k-i-collapse",iconExpand:"k-i-expand",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",link:"k-link",resizeHandle:"k-resize-handle",resizeHandleInner:"k-resize-handle-inner",dropPositions:"k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",dropTop:"k-i-insert-up",dropBottom:"k-i-insert-down",dropAdd:"k-i-plus",dropMiddle:"k-i-insert-middle",dropDenied:"k-i-cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text"},S=c.GanttList=d.extend({init:function(t,i){d.fn.init.call(this,t,i),0===this.options.columns.length&&this.options.columns.push("title"),this.dataSource=this.options.dataSource,this._columns(),this._layout(),this._domTrees(),this._header(),this._sortable(),this._editable(),this._selectable(),this._draggable(),this._resizable(),this._attachEvents(),this._adjustHeight(),this.bind("render",function(){var t,i;this.options.resizable&&(t=this.header.find("col"),i=this.content.find("col"),this.header.find("th").not(":last").each(function(n){var o=h(e(this));t.eq(n).width(o),i.eq(n).width(o)}),t.last().css("width","auto"),i.last().css("width","auto"))},!0)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-p(this.header.parent()))},destroy:function(){d.fn.destroy.call(this),this._reorderDraggable&&this._reorderDraggable.destroy(),this._tableDropArea&&this._tableDropArea.destroy(),this._contentDropArea&&this._contentDropArea.destroy(),this._columnResizable&&this._columnResizable.destroy(),this.touch&&this.touch.destroy(),this.timer&&clearTimeout(this.timer),this.content.off(w),this.header.find("thead").off(w),this.header.find(k+S.link).off(w),this.header=null,this.content=null,this.levels=null,n.destroy(this.element)},options:{name:"GanttList",selectable:!0,editable:!0,resizable:!1},_attachEvents:function(){var t=this,i=S.styles;t.content.on(y+w,"td > span."+i.icon+":not(."+i.iconHidden+")",function(i){var n=e(this),o=t._modelFromElement(n);o.set("expanded",!o.get("expanded")),i.stopPropagation()})},_domTrees:function(){this.headerTree=new o.Tree(this.header[0]),this.contentTree=new o.Tree(this.content[0])},_columns:function(){var e=this.options.columns,t=function(){this.field="",this.title="",this.editable=!1,this.sortable=!1};this.columns=f(e,function(e){return e=typeof e===b?{field:e,title:_[e]}:e,u(new t,e)})},_layout:function(){var t=this,i=this.options,o=this.element,r=S.styles,s=function(){var o,r=typeof i.rowHeight===b?i.rowHeight:i.rowHeight+"px",s=e(n.format(x,r));return t.content.append(s),o=p(s.find("tr")),s.remove(),o};o.addClass(r.wrapper).append("<div class='"+r.gridHeader+"'><div class='"+r.gridHeaderWrap+"'></div></div>").append("<div class='"+r.gridContentWrap+"'></div>"),this.header=o.find(k+r.gridHeaderWrap),this.content=o.find(k+r.gridContent),i.rowHeight&&(this._rowHeight=s())},_header:function(){var e=this.headerTree,t=r("colgroup",null,this._cols()),i=r("thead",{role:"rowgroup"},[r("tr",{role:"row"},this._ths())]),n=r("table",{style:{minWidth:this.options.listWidth+"px"},role:"grid"},[t,i]);e.render([n])},_render:function(e){var t,i,n,o={style:{minWidth:this.options.listWidth+"px"},tabIndex:0,role:"treegrid"};this._rowHeight&&(o.style.height=e.length*this._rowHeight+"px"),this.levels=[{field:null,value:0}],t=r("colgroup",null,this._cols()),i=r("tbody",{role:"rowgroup"},this._trs(e)),n=r("table",o,[t,i]),this.contentTree.render([n]),this.trigger("render")},_ths:function(){var e,t,i,n,o=this.columns,a=[];for(i=0,n=o.length;i<n;i++)e=o[i],t={"data-field":e.field,"data-title":e.title,className:S.styles.header,role:"columnheader"},a.push(r("th",t,[s(e.title)]));return this.options.resizable&&a.push(r("th",{className:S.styles.header,role:"columnheader"})),a},_cols:function(){var e,t,i,n,o,s=this.columns,a=[];for(n=0,o=s.length;n<o;n++)e=s[n],i=e.width,t=i&&0!==parseInt(i,10)?{style:{width:typeof i===b?i:i+"px"}}:null,a.push(r("col",t,[]));return this.options.resizable&&a.push(r("col",{style:{width:"1px"}})),a},_trs:function(e){var t,i,n,o,r,s=[],a=[],l=S.styles;for(o=0,r=e.length;o<r;o++)t=e[o],n=this._levels({idx:t.parentId,id:t.id,summary:t.summary}),i={"data-uid":t.uid,"data-level":n,role:"row"},t.summary&&(i["aria-expanded"]=t.expanded),o%2!==0&&a.push(l.alt),t.summary&&a.push(l.group),a.length&&(i.className=a.join(" ")),s.push(this._tds({task:t,attr:i,level:n})),a=[];return s},_tds:function(e){var t,i,n,o=[],s=this.columns;for(i=0,n=s.length;i<n;i++)t=s[i],o.push(this._td({task:e.task,column:t,level:e.level}));return this.options.resizable&&o.push(r("td",{role:"gridcell"})),r("tr",e.attr,o)},_td:function(e){var i,o,a,l=[],c=this.options.resourcesField,d=S.styles,u=e.task,h=e.column,p=u.get(h.field);if(h.field==c){for(p=p||[],i=[],a=0;a<p.length;a++)i.push(n.format("{0} [{1}]",p[a].get("name"),p[a].get("formatedValue")));i=i.join(", ")}else i=h.format?n.format(h.format,p):p;return"title"===h.field&&(l=t({level:e.level,className:d.iconPlaceHolder}),l.push(r("span",{className:d.icon+" "+(u.summary?u.expanded?d.iconCollapse:d.iconExpand:d.iconHidden)})),o=n.format("{0}, {1:P0}",i,u.percentComplete)),l.push(r("span",{"aria-label":o},[s(i)])),r("td",{role:"gridcell"},l)},_levels:function(e){var t,i,n,o=this.levels,r=e.summary,s=e.idx,a=e.id;for(i=0,n=o.length;i<n;i++)if(t=o[i],t.field==s)return r&&o.push({field:a,value:t.value+1}),t.value},_sortable:function(){var e,t,i,o,r,s=this,a=this.options.resourcesField,l=this.columns,c=this.header.find("th["+n.attr("field")+"]"),d=function(e){(0===s.dataSource.total()||s.editable&&s.editable.trigger("validate"))&&e.preventDefault()};for(o=0,r=c.length;o<r;o++)e=l[o],e.sortable&&e.field!==a&&(i=c.eq(o),t=i.data("kendoColumnSorter"),t&&t.destroy(),i.attr("data-"+n.ns+"field",e.field).kendoColumnSorter({dataSource:this.dataSource,change:d}));c=null},_selectable:function(){var t=this,i=this.options.selectable;i&&this.content.on(y+w,"tr",function(i){var n=e(this);t.editable&&t.editable.trigger("validate"),i.ctrlKey?t.clearSelection():t.select(n)})},select:function(e){var t=this.content.find(e),i=S.styles.selected;return t.length?(t.siblings(k+i).removeClass(i).attr("aria-selected",!1).end().addClass(i).attr("aria-selected",!0),void this.trigger("change")):this.content.find(k+i)},clearSelection:function(){var e=this.select();e.length&&(e.removeClass(S.styles.selected),this.trigger("change"))},_setDataSource:function(e){this.dataSource=e,this._sortable()},_editable:function(){var t=this,n=this.options.editable,o=S.styles,r="span."+o.icon+":not("+o.iconHidden+")",s=function(){var e=t.editable;e&&(e.end()?t._closeCell():e.trigger("validate"))},a=function(t){var n=e(t.currentTarget);n.hasClass(o.editCell)||i()};n&&n.update!==!1&&(this._startEditHandler=function(i){var n=i.currentTarget?e(i.currentTarget):i,o=t._columnFromElement(n);t.editable||o&&o.editable&&t._editCell({cell:n,column:o})},t.content.on("focusin"+w,function(){clearTimeout(t.timer),t.timer=null}).on("focusout"+w,function(){t.timer=setTimeout(s,1)}).on("keydown"+w,function(e){e.keyCode===v.ENTER&&e.preventDefault()}).on("keyup"+w,function(e){var n,o,r=e.keyCode;switch(r){case v.ENTER:i(),s();break;case v.ESC:t.editable&&(n=t._editableContainer,o=t._modelFromElement(n),t.trigger("cancel",{model:o,cell:n})||t._closeCell(!0))}}),l?t.touch=t.content.kendoTouch({filter:"td",touchstart:function(e){a(e.touch)},doubletap:function(i){e(i.touch.initialTouch).is(r)||t._startEditHandler(i.touch)}}).data("kendoTouch"):t.content.on("mousedown"+w,"td",function(e){a(e)}).on("dblclick"+w,"td",function(i){e(i.target).is(r)||t._startEditHandler(i)}))},_editCell:function(t){var i,o=this.options.resourcesField,r=S.styles,s=t.cell,a=t.column,l=this._modelFromElement(s),c=this.dataSource._createNewModel(l.toJSON()),d=c.fields[a.field]||c[a.field],u=d.validation,h=n.attr("type"),p=n.attr("bind"),f=n.attr("format"),v={name:a.field,required:!!d.validation&&d.validation.required===!0};return a.field===o?void a.editor(s,c):(this._editableContent=s.children().detach(),this._editableContainer=s,s.data("modelCopy",c),"date"!==d.type&&"date"!==e.type(d)||a.format&&!/H|m|s|F|g|u/.test(a.format)||(v[p]="value:"+a.field,v[h]="date",a.format&&(v[f]=n._extractFormat(a.format)),i=function(t,i){e('<input type="text"/>').attr(v).appendTo(t).kendoDateTimePicker({format:i.format})}),this.editable=s.addClass(r.editCell).kendoEditable({fields:{field:a.field,format:a.format,editor:a.editor||i},model:c,clearContainer:!1}).data("kendoEditable"),u&&u.dateCompare&&m(u.dateCompare)&&u.message&&(e("<span "+n.attr("for")+'="'+a.field+'" class="k-invalid-msg"/>').hide().appendTo(s),s.find("[name="+a.field+"]").attr(n.attr("dateCompare-msg"),u.message)),this.editable.bind("validate",function(e){var t=this.element.find(":kendoFocusable:first").focus();g&&t.focus(),e.preventDefault()}),void(this.trigger("edit",{model:l,cell:s})&&this._closeCell(!0)))},_closeCell:function(e){var t=S.styles,i=this._editableContainer,n=this._modelFromElement(i),o=this._columnFromElement(i),r=o.field,s=i.data("modelCopy"),a={};a[r]=s.get(r),i.empty().removeData("modelCopy").removeClass(t.editCell).append(this._editableContent),this.editable.unbind(),this.editable.destroy(),this.editable=null,this._editableContainer=null,this._editableContent=null,e||("start"===r&&(a.end=new Date(a.start.getTime()+n.duration())),this.trigger("update",{task:n,updateInfo:a}))},_draggable:function(){var t,i=this,o=null,r=!0,s=S.styles,a=n.support.isRtl(this.element),c="tr["+n.attr("level")+" = 0]:last",d={},h=this.options.editable,p=function(){o=null,t=null,r=!0,d={}},f=function(e){for(var t=e;t;){if(o.get("id")===t.get("id")){r=!1;break}t=i.dataSource.taskParent(t)}},m=function(){var i=e(t).height(),o=n.getOffset(t).top;u(t,{beforeLimit:o+.25*i,afterLimit:o+.75*i})},g=function(e){var i,o,r,a,l;t&&(i=e.location,o=s.dropAdd,r="add",a=parseInt(t.attr(n.attr("level")),10),i<=t.beforeLimit?(l=t.prev(),o=s.dropTop,r="insert-before"):i>=t.afterLimit&&(l=t.next(),o=s.dropBottom,r="insert-after"),l&&parseInt(l.attr(n.attr("level")),10)===a&&(o=s.dropMiddle),d.className=o,d.command=r)},v=function(){return i._reorderDraggable.hint.children(k+s.dragStatus).removeClass(s.dropPositions)};h&&h.reorder!==!1&&h.update!==!1&&(this._reorderDraggable=this.content.kendoDraggable({distance:10,holdToDrag:l,group:"listGroup",filter:"tr[data-uid]",ignore:k+s.input,hint:function(t){return e('<div class="'+s.header+" "+s.dragClue+'"/>').css({width:300,paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).append('<span class="'+s.icon+" "+s.dragStatus+'" /><span class="'+s.dragClueText+'"/>')},cursorOffset:{top:-20,left:0},container:this.content,dragstart:function(e){var t=i.editable;return t&&t.reorder!==!1&&t.trigger("validate")?void e.preventDefault():(o=i._modelFromElement(e.currentTarget),this.hint.children(k+s.dragClueText).text(o.get("title")),void(a&&this.hint.addClass(s.rtl)))},drag:function(e){r&&(g(e.y),v().addClass(d.className))},dragend:function(){p()},dragcancel:function(){p()}}).data("kendoDraggable"),this._tableDropArea=this.content.kendoDropTargetArea({distance:0,group:"listGroup",filter:"tr[data-uid]",dragenter:function(e){t=e.dropTarget,f(i._modelFromElement(t)),m(),v().toggleClass(s.dropDenied,!r)},dragleave:function(){r=!0,v()},drop:function(){var e=i._modelFromElement(t),n=e.orderId,s={parentId:e.parentId};if(r){switch(d.command){case"add":s.parentId=e.id;break;case"insert-before":s.orderId=e.parentId===o.parentId&&e.orderId>o.orderId?n-1:n;break;case"insert-after":s.orderId=e.parentId===o.parentId&&e.orderId>o.orderId?n:n+1}i.trigger("update",{task:o,updateInfo:s})}}}).data("kendoDropTargetArea"),this._contentDropArea=this.element.kendoDropTargetArea({distance:0,group:"listGroup",filter:k+s.gridContent,drop:function(){var e=i._modelFromElement(i.content.find(c)),t=e.orderId,n={parentId:null,orderId:null!==o.parentId?t+1:t};i.trigger("update",{task:o,updateInfo:n})}}).data("kendoDropTargetArea"))},_resizable:function(){var t=this,i=S.styles,n=function(n){var o,r,s=e(n.currentTarget),a=t.resizeHandle,l=s.position(),c=l.left,d=h(s),u=s.closest("div"),f=n.clientX+e(window).scrollLeft(),m=t.options.columnResizeHandleWidth;return c+=u.scrollLeft(),a||(a=t.resizeHandle=e('<div class="'+i.resizeHandle+'"><div class="'+i.resizeHandleInner+'" /></div>')),o=s.offset().left+d,(r=f>o-m&&f<o+m)?(u.append(a),void a.show().css({top:l.top,left:c+d-m-1,height:p(s),width:3*m}).data("th",s)):void a.hide()};this.options.resizable&&(this._columnResizable&&this._columnResizable.destroy(),this.header.find("thead").on("mousemove"+w,"th",n),this._columnResizable=this.header.kendoResizable({handle:k+i.resizeHandle,start:function(i){var n=e(i.currentTarget).data("th"),o="col:eq("+n.index()+")",r=t.header.find("table"),s=t.content.find("table");t.element.addClass("k-grid-column-resizing"),this.col=s.children("colgroup").find(o).add(r.find(o)),this.th=n,this.startLocation=i.x.location,this.columnWidth=h(n),this.table=r.add(s),this.totalWidth=this.table.width()-h(r.find("th:last"))},resize:function(e){var t=11,i=e.x.location-this.startLocation;this.columnWidth+i<t&&(i=t-this.columnWidth),this.table.css({minWidth:this.totalWidth+i}),this.col.width(this.columnWidth+i)},resizeend:function(){var e,i,n;t.element.removeClass("k-grid-column-resizing"),e=Math.floor(this.columnWidth),i=Math.floor(h(this.th)),n=t.columns[this.th.index()],t.trigger("columnResize",{column:n,oldWidth:e,newWidth:i}),this.table=this.col=this.th=null}}).data("kendoResizable"))},_modelFromElement:function(e){var t=e.closest("tr"),i=this.dataSource.getByUid(t.attr(n.attr("uid")));return i},_columnFromElement:function(e){var t=e.closest("td"),i=t.parent(),n=i.children().index(t);return this.columns[n]}});u(!0,c.GanttList,{styles:C})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.gantt.timeline.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min"],e)}(function(){return function(e){function t(e){return delete e.name,delete e.prefix,delete e.views,e}function i(e){var t=[],i=e.workWeekStart;for(t.push(i);e.workWeekEnd!=i;)i>6?i-=7:i++,t.push(i);return t}function n(){var t=kendo._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).blur()}var o,r,s=kendo.ui.Widget,a=kendo.dom.element,l=kendo.dom.text,c=kendo.dom.html,d=e.isPlainObject,u=kendo._outerWidth,h=kendo._outerHeight,p=e.extend,f=e.proxy,m=kendo.support.browser,g=!1,v=kendo.keys,_=kendo.data.Query,b="string",w=".kendoGanttTimeline",y="click",k="dblclick",x="mousemove",C="mouseenter",S="mouseleave",T="keydown",D=".",A=kendo.template("#=kendo.toString(start, 't')#"),E=kendo.template("#=kendo.toString(start, 'ddd M/dd')#"),I=kendo.template("#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"),M=kendo.template("#=kendo.toString(start, 'MMM')#"),R=kendo.template("#=kendo.toString(start, 'yyyy')#"),F=kendo.template('<div class="#=styles.marquee#"><div class="#=styles.marqueeColor#"></div></div>'),P=kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#"><div class="#=styles.tooltipContent#"><div>#=messages.start#: #=kendo.toString(start, format)#</div><div>#=messages.end#: #=kendo.toString(end, format)#</div></div></div>'),z=kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#" ><div class="#=styles.tooltipContent#">#=text#%</div><div class="#=styles.tooltipCallout#" style="left:13px;"></div></div>'),B=kendo.template('<div class="#=kendo.htmlEncode(styles.taskDetails)#"><strong>#=kendo.htmlEncode(task.title)#</strong><div class="#=styles.taskDetailsPercent#">#=kendo.toString(task.percentComplete, "p0")#</div><ul class="#=styles.reset#"><li>#=messages.start#: #=kendo.toString(task.start, "h:mm tt ddd, MMM d")#</li><li>#=messages.end#: #=kendo.toString(task.end, "h:mm tt ddd, MMM d")#</li></ul></div>'),L="<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",H={
day:{type:"kendo.ui.GanttDayView"},week:{type:"kendo.ui.GanttWeekView"},month:{type:"kendo.ui.GanttMonthView"},year:{type:"kendo.ui.GanttYearView"}},N={alt:"k-alt",reset:"k-reset",nonWorking:"k-nonwork-hour",header:"k-header",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasksWrapper:"k-gantt-tables",rowsTable:"k-gantt-rows",columnsTable:"k-gantt-columns",tasksTable:"k-gantt-tasks",dependenciesWrapper:"k-gantt-dependencies",resource:"k-resource",resourceAlt:"k-resource k-alt",task:"k-task",taskSingle:"k-task-single",taskMilestone:"k-task-milestone",taskSummary:"k-task-summary",taskWrap:"k-task-wrap",taskMilestoneWrap:"k-milestone-wrap",resourcesWrap:"k-resources-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",taskDragHandle:"k-task-draghandle",taskContent:"k-task-content",taskTemplate:"k-task-template",taskActions:"k-task-actions",taskDelete:"k-task-delete",taskComplete:"k-task-complete",taskDetails:"k-task-details",taskDetailsPercent:"k-task-pct",link:"k-link",icon:"k-icon",iconDelete:"k-i-close",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskResizeHandleEast:"k-resize-e",taskSummaryProgress:"k-task-summary-progress",taskSummaryComplete:"k-task-summary-complete",line:"k-line",lineHorizontal:"k-line-h",lineVertical:"k-line-v",arrowWest:"k-arrow-w",arrowEast:"k-arrow-e",dragHint:"k-drag-hint",dependencyHint:"k-dependency-hint",tooltipWrapper:"k-widget k-tooltip k-popup k-group k-reset",tooltipContent:"k-tooltip-content",tooltipCallout:"k-callout k-callout-s",callout:"k-callout",marquee:"k-marquee k-gantt-marquee",marqueeColor:"k-marquee-color"},O=kendo.ui.GanttView=s.extend({init:function(e,t){s.fn.init.call(this,e,t),this.title=this.options.title||this.options.name,this.header=this.element.find(D+O.styles.gridHeader),this.content=this.element.find(D+O.styles.gridContent),this.contentWidth=this.content.width(),this._workDays=i(this.options),this._headerTree=t.headerTree,this._taskTree=t.taskTree,this._taskTemplate=t.taskTemplate?kendo.template(t.taskTemplate,p({},kendo.Template,t.templateSettings)):null,this._dependencyTree=t.dependencyTree,this._taskCoordinates={},this._currentTime()},destroy:function(){s.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this.headerRow=null,this.header=null,this.content=null,this._dragHint=null,this._resizeHint=null,this._resizeTooltip=null,this._taskTooltip=null,this._percentCompleteResizeTooltip=null,this._headerTree=null,this._taskTree=null,this._dependencyTree=null},options:{showWorkHours:!1,showWorkDays:!1,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,slotSize:100,currentTimeMarker:{updateInterval:1e4}},renderLayout:function(){this._slots=this._createSlots(),this._tableWidth=this._calculateTableWidth(),this.createLayout(this._layout()),this._slotDimensions(),this._adjustHeight(),this.content.find(D+O.styles.dependenciesWrapper).width(this._tableWidth)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-h(this.header))},createLayout:function(e){var t=this._headers(e),i=this._colgroup(),n=this._headerTree,o=a("thead",null,t),r=a("table",{style:{width:this._tableWidth+"px"}},[i,o]);n.render([r]),this.headerRow=this.header.find("table:first tr").last()},_slotDimensions:function(){var e,t,i,n,o=this.headerRow[0].children,r=this._timeSlots();for(i=0,n=o.length;i<n;i++)t=o[i],e=r[i],e.offsetLeft=t.offsetLeft,e.offsetWidth=t.offsetWidth},render:function(e){var t,i,n=e.length,o=O.styles,r=this._rowsTable(n),s=this._columnsTable(n),a=this._tasksTable(e),l=this.options.currentTimeMarker,c=this.options.calculatedSize;this._taskTree.render([r,s,a]),t=this.content.find(D+o.rowsTable),c&&(i=c.row*e.length,this.content.find(D+o.tasksTable).height(i),t.height(i)),this._contentHeight=t.height(),this._rowHeight=c?c.row:this._contentHeight/t.find("tr").length,this.content.find(D+o.columnsTable).height(this._contentHeight),l!==!1&&void 0!==l.updateInterval&&this._renderCurrentTime()},_rowsTable:function(e){var t,i,n=[],o=O.styles,r=[null,{className:o.alt}];for(i=0;i<e;i++)t=a("tr",r[i%2],[a("td",null,[l(" ")])]),n.push(t);return this._createTable(1,n,{className:o.rowsTable})},_columnsTable:function(){var e,t,i,n,o,r=[],s=O.styles,c=this._timeSlots(),d=c.length,u=0;for(o=0;o<d;o++)t=c[o],n={},i=t.span,u+=i,1!==i&&(n.colspan=i),t.isNonWorking&&(n.className=s.nonWorking),r.push(a("td",n,[l(" ")]));return e=a("tr",null,r),this._createTable(u,[e],{className:s.columnsTable})},_tasksTable:function(e){var t,i,n,o,r,s,l,c,d=[],u=O.styles,h=this._taskCoordinates={},p=this._calculateMilestoneWidth(),f=Math.round(p.width),m=this.options.resourcesField,v=[u.resource,u.resourceAlt],_=this.options.calculatedSize,b=this._calculateResourcesMargin(),w=this._calculateTaskBorderWidth(),y=function(e){var t=n.left,i=t+n.width;o.isMilestone()&&(t-=f/2,i=t+f),h[o.id]={start:t,end:i,rowIndex:e}};for(l=0,c=e.length;l<c;l++)o=e[l],n=this._taskPosition(o),n.borderWidth=w,t=a("tr",null),i=a("td"),o.start<=this.end&&o.end>=this.start&&(i.children.push(this._renderTask(e[l],n)),o[m]&&o[m].length&&(r=g?this._tableWidth-n.left:Math.max(n.width||p.clientWidth,0)+n.left,s={width:this._tableWidth-(r+b)+"px"},s[g?"right":"left"]=r+"px",_&&(s.height=_.cell+"px"),i.children.push(a("div",{className:u.resourcesWrap,style:s},this._renderResources(o[m],v[l%2])))),y(l)),t.children.push(i),d.push(t);return this._createTable(1,d,{className:O.styles.tasksTable})},_createTable:function(e,t,i){var n,o,r,s=[];for(r=0;r<e;r++)s.push(a("col"));return n=a("colgroup",null,s),o=a("tbody",null,t),i.style||(i.style={}),i.style.width=this._tableWidth+"px",a("table",i,[n,o])},_calculateTableWidth:function(){var e,t,i,n,o=this._timeSlots(),r=0,s=0;for(i=0,n=o.length;i<n;i++)e=o[i].span,s+=e,e>r&&(r=e);return t=Math.round(s*this.options.slotSize/r)},_calculateMilestoneWidth:function(){var t,i,n=O.styles.task+" "+O.styles.taskMilestone,o=e("<div class='"+n+"' style='visibility: hidden; position: absolute'>");return this.content.append(o),i=o[0].getBoundingClientRect(),t={width:i.right-i.left,clientWidth:o[0].clientWidth},o.remove(),t},_calculateResourcesMargin:function(){var t,i=e("<div class='"+O.styles.resourcesWrap+"' style='visibility: hidden; position: absolute'>");return this.content.append(i),t=parseInt(i.css(g?"margin-right":"margin-left"),10),i.remove(),t},_calculateTaskBorderWidth:function(){var t,i,n=O.styles.task+" "+O.styles.taskSingle,o=e("<div class='"+n+"' style='visibility: hidden; position: absolute'>");return this.content.append(o),i=kendo.getComputedStyles(o[0],["border-left-width"]),t=parseFloat(i["border-left-width"],10),o.remove(),t},_renderTask:function(e,t){var i,n,o,r=this.options.editable,s=t.left,l=O.styles,c=l.taskWrap,d=this.options.calculatedSize,u={},h={className:c,style:{left:s+"px"}};return d&&(h.style.height=d.cell+"px"),e.summary?n=this._renderSummary(e,t):e.isMilestone()?(n=this._renderMilestone(e,t),h.className+=" "+l.taskMilestoneWrap):n=this._renderSingleTask(e,t),i=a("div",h,[n]),r&&r.dependencyCreate!==!1&&(i.children.push(a("div",{className:l.taskDot+" "+l.taskDotStart})),i.children.push(a("div",{className:l.taskDot+" "+l.taskDotEnd}))),e.summary||e.isMilestone()||!r||r.dragPercentComplete===!1||r.update===!1||null!==this._taskTemplate||(o=Math.round(t.width*e.percentComplete),u[g?"right":"left"]=o+"px",i.children.push(a("div",{className:l.taskDragHandle,style:u}))),i},_renderSingleTask:function(e,t){var i,n,o,r=O.styles,s=Math.round(t.width*e.percentComplete),d=[],u=this.options.editable;return null!==this._taskTemplate?i=c(this._taskTemplate(e)):(i=l(e.title),d.push(a("div",{className:r.taskComplete,style:{width:s+"px"}}))),n=a("div",{className:r.taskContent},[a("div",{className:r.taskTemplate},[i])]),d.push(n),u&&(u.destroy!==!1&&n.children.push(a("span",{className:r.taskActions},[a("a",{className:r.link+" "+r.taskDelete,href:"#","aria-label":"Delete"},[a("span",{className:r.icon+" "+r.iconDelete})])])),u.resize!==!1&&u.update!==!1&&(n.children.push(a("span",{className:r.taskResizeHandle+" "+r.taskResizeHandleWest})),n.children.push(a("span",{className:r.taskResizeHandle+" "+r.taskResizeHandleEast})))),o=a("div",{className:r.task+" "+r.taskSingle,"data-uid":e.uid,style:{width:Math.max(t.width-2*t.borderWidth,0)+"px"}},d)},_renderMilestone:function(e){var t=O.styles,i=a("div",{className:t.task+" "+t.taskMilestone,"data-uid":e.uid});return i},_renderSummary:function(e,t){var i=O.styles,n=Math.round(t.width*e.percentComplete),o=a("div",{className:i.task+" "+i.taskSummary,"data-uid":e.uid,style:{width:t.width+"px"}},[a("div",{className:i.taskSummaryProgress,style:{width:n+"px"}},[a("div",{className:i.taskSummaryComplete,style:{width:t.width+"px"}})])]);return o},_renderResources:function(e,t){var i,n,o,r=[];for(n=0,o=e.length;n<o;n++)i=e[n],r.push(a("span",{className:t,style:{color:i.get("color")}},[l(i.get("name"))]));return g&&r.reverse(),r},_taskPosition:function(e){var t=Math.round,i=t(this._offset(g?e.end:e.start)),n=t(this._offset(g?e.start:e.end));return{left:i,width:n-i}},_offset:function(e){var t,i,n,o,r=this._timeSlots(),s=0;return r.length?(o=this._slotIndex("start",e),t=r[o],t.end<e?s=t.offsetWidth:t.start<=e&&(i=e-t.start,n=t.end-t.start,s=i/n*t.offsetWidth),g&&(s=t.offsetWidth+1-s),t.offsetLeft+s):0},_slotIndex:function(e,t,i){var n,o=this._timeSlots(),r=0,s=o.length-1;i&&(o=[].slice.call(o).reverse());do n=Math.ceil((s+r)/2),o[n][e]<t?r=n:(n===s&&n--,s=n);while(r!==s);return i&&(r=o.length-1-r),r},_timeByPosition:function(t,i,n){var o,r,s,a=this._slotByPosition(t);return i?n?a.end:a.start:(o=t-e(D+O.styles.tasksTable).offset().left,r=a.end-a.start,s=o-a.offsetLeft,g&&(s=a.offsetWidth-s),new Date(a.start.getTime()+r*(s/a.offsetWidth)))},_slotByPosition:function(t){var i=t-e(D+O.styles.tasksTable).offset().left,n=this._slotIndex("offsetLeft",i,g);return this._timeSlots()[n]},_renderDependencies:function(e){var t,i,n=[],o=this._dependencyTree;for(t=0,i=e.length;t<i;t++)n.push.apply(n,this._renderDependency(e[t]));o.render(n)},_renderDependency:function(e){var t,i,n,o,r=this._taskCoordinates[e.predecessorId],s=this._taskCoordinates[e.successorId];if(!r||!s)return[];for(i="_render"+["FF","FS","SF","SS"][g?3-e.type:e.type],t=this[i](r,s),n=0,o=t.length;n<o;n++)t[n].attr["data-uid"]=e.uid;return t},_renderFF:function(e,t){var i=this._dependencyFF(e,t,!1);return i[i.length-1].children[0]=this._arrow(!0),i},_renderSS:function(e,t){var i=this._dependencyFF(t,e,!0);return i[0].children[0]=this._arrow(!1),i.reverse()},_renderFS:function(e,t){var i=this._dependencyFS(e,t,!1);return i[i.length-1].children[0]=this._arrow(!1),i},_renderSF:function(e,t){var i=this._dependencyFS(t,e,!0);return i[0].children[0]=this._arrow(!0),i.reverse()},_dependencyFF:function(e,t,i){var n,o=this,r=[],s=0,a=0,l=0,c=0,d=i?"start":"end",u=2,h=1,p=this._rowHeight,f=10,m=e.rowIndex*p+Math.floor(p/2)-1,g=t.rowIndex*p+Math.floor(p/2)-1,v=O.styles,_=function(){r.push(o._line(v.line+" "+v.lineHorizontal,{left:s+"px",top:a+"px",width:l+"px"}))},b=function(){r.push(o._line(v.line+" "+v.lineVertical,{left:s+"px",top:a+"px",height:c+"px"}))};return s=e[d],a=m,l=f,n=t[d]-e[d],n>0!==i&&(l=Math.abs(n)+f),i?(s-=l,l-=h,_()):(_(),s+=l-u),g<a?(c=a-g,c+=u,a=g,b()):(c=g-a,c+=u,b(),a+=c-u),l=Math.abs(s-t[d]),i||(l-=h,s-=l),_(),r},_dependencyFS:function(e,t,i){var n=this,o=[],r=0,s=0,a=0,l=0,c=this._rowHeight,d=Math.floor(c/2),u=10,h=2*u,p=t.start-e.end,f=2,m=1,g=e.rowIndex*c+Math.floor(c/2)-1,v=t.rowIndex*c+Math.floor(c/2)-1,_=O.styles,b=function(){o.push(n._line(_.line+" "+_.lineHorizontal,{left:r+"px",top:s+"px",width:a+"px"}))},w=function(){o.push(n._line(_.line+" "+_.lineVertical,{left:r+"px",top:s+"px",height:l+"px"}))};return r=e.end,s=g,a=u,i&&(r+=m,p>h&&(a=p-(u-f)),a-=m),b(),r+=a-f,p<=h&&(l=i?Math.abs(v-g)-d:d,v<g?(s-=l,l+=f,w()):(w(),s+=l),a=e.end-t.start+h,a<u&&(a=u),r-=a-f,b()),v<g?(l=s-v,s=v,l+=f,w()):(l=v-s,w(),s+=l),a=t.start-r,i||(a-=m),b(),o},_line:function(e,t){return a("div",{className:e,style:t})},_arrow:function(e){return a("span",{className:e?O.styles.arrowWest:O.styles.arrowEast})},_colgroup:function(){var e,t,i,n=this._timeSlots(),o=n.length,r=[];for(e=0;e<o;e++)for(t=0,i=n[e].span;t<i;t++)r.push(a("col"));return a("colgroup",null,r)},_createDragHint:function(e){this._dragHint=e.clone().addClass(O.styles.dragHint).css("cursor","move"),e.parent().append(this._dragHint)},_updateDragHint:function(e){var t=this._offset(e);this._dragHint.css({left:t})},_removeDragHint:function(){this._dragHint.remove(),this._dragHint=null},_createResizeHint:function(t){var i,n,o=O.styles,r=this._taskCoordinates[t.id].rowIndex*this._rowHeight,s=this.options,a=s.messages;this._resizeHint=e(F({styles:o})).css({top:0,height:this._contentHeight}),this.content.append(this._resizeHint),this._resizeTooltip=e(P({styles:o,start:t.start,end:t.end,messages:a.views,format:s.resizeTooltipFormat})).css({top:0,left:0}),this.content.append(this._resizeTooltip),this._resizeTooltipWidth=u(this._resizeTooltip),i=h(this._resizeTooltip),n=r-i,n<0&&(n=r+this._rowHeight),this._resizeTooltipTop=n},_updateResizeHint:function(t,i,n){var o=this._offset(g?i:t),r=this._offset(g?t:i),s=r-o,a=n!==g?o:r,l=this._tableWidth-kendo.support.scrollbar(),c=this._resizeTooltipWidth,d=this.options,u=d.messages,h=e(D+O.styles.tasksTable).offset().left-e(D+O.styles.tasksWrapper).offset().left;g&&(o+=h),this._resizeHint.css({left:o,width:s}),this._resizeTooltip&&this._resizeTooltip.remove(),a-=Math.round(c/2),a<0?a=0:a+c>l&&(a=l-c),g&&(a+=h),this._resizeTooltip=e(P({styles:O.styles,start:t,end:i,messages:u.views,format:d.resizeTooltipFormat})).css({top:this._resizeTooltipTop,left:a,"min-width":c}).appendTo(this.content)},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=null,this._resizeTooltip.remove(),this._resizeTooltip=null},_updatePercentCompleteTooltip:function(t,i,n){var o,r,s,a;this._removePercentCompleteTooltip(),o=this._percentCompleteResizeTooltip=e(z({styles:O.styles,text:n})).appendTo(this.element),r=Math.round(u(o)/2),s=o.find(D+O.styles.callout),a=Math.round(u(s)/2),o.css({top:t-(h(o)+a),left:i-r}),s.css("left",r-a)},_removePercentCompleteTooltip:function(){this._percentCompleteResizeTooltip&&this._percentCompleteResizeTooltip.remove(),this._percentCompleteResizeTooltip=null},_updateDependencyDragHint:function(e,t,i){this._removeDependencyDragHint(),i?this._creteVmlDependencyDragHint(e,t):this._creteDependencyDragHint(e,t)},_creteDependencyDragHint:function(t,i){var n=O.styles,o=i.x-t.x,r=i.y-t.y,s=Math.sqrt(o*o+r*r),a=Math.atan(r/o);o<0&&(a+=Math.PI),e("<div class='"+n.line+" "+n.lineHorizontal+" "+n.dependencyHint+"'></div>").css({top:t.y,left:t.x,width:s,"transform-origin":"0% 0","-ms-transform-origin":"0% 0","-webkit-transform-origin":"0% 0",transform:"rotate("+a+"rad)","-ms-transform":"rotate("+a+"rad)","-webkit-transform":"rotate("+a+"rad)"}).appendTo(this.content)},_creteVmlDependencyDragHint:function(t,i){var n=e("<kvml:line class='"+O.styles.dependencyHint+"' style='position:absolute; top: 0px; left: 0px;' strokecolor='black' strokeweight='2px' from='"+t.x+"px,"+t.y+"px' to='"+i.x+"px,"+i.y+"px'></kvml:line>").appendTo(this.content);n[0].outerHTML=n[0].outerHTML},_removeDependencyDragHint:function(){this.content.find(D+O.styles.dependencyHint).remove()},_createTaskTooltip:function(t,i,n){var o,r=O.styles,s=this.options,a=this.content,l=a.offset(),c=a.width(),d=kendo.scrollLeft(a),p=e(i).parents("tr").first(),f=p.offset(),m=s.tooltip&&s.tooltip.template?kendo.template(s.tooltip.template):B,v=g?n-(l.left+d+kendo.support.scrollbar()):n-(l.left-d),_=f.top+h(p)-l.top+a.scrollTop(),b=this._taskTooltip=e('<div style="z-index: 100002;" class="'+r.tooltipWrapper+'" ><div class="'+r.taskContent+'"></div></div>');b.css({left:v,top:_}).appendTo(a).find(D+r.taskContent).append(m({styles:r,task:t,messages:s.messages.views})),h(b)<f.top-l.top&&b.css("top",f.top-l.top-h(b)+a.scrollTop()),o=u(b),o+v-d>c&&(v-=o,v<d&&(v=d+c-(o+17)),b.css("left",v))},_removeTaskTooltip:function(){this._taskTooltip&&this._taskTooltip.remove(),this._taskTooltip=null},_scrollTo:function(e){var t=e.offset().left,i=e.width(),n=t+i,o=e.closest("tr"),r=o.offset().top,s=o.height(),a=r+s,l=this.content,c=l.offset(),d=c.top,u=l.height(),h=d+u,p=c.left,f=l.width(),m=p+f,g=kendo.support.scrollbar();r<d?l.scrollTop(l.scrollTop()+(r-d)):a>h&&l.scrollTop(l.scrollTop()+(a+g-h)),t<p&&i>f&&n<m||n>m&&i<f?l.scrollLeft(l.scrollLeft()+(n+g-m)):(n>m&&i>f&&t>p||t<p&&i<f)&&l.scrollLeft(l.scrollLeft()+(t-p))},_scrollToDate:function(e){var t,i=this.start,n=this.end;e>=i&&e<n&&(t=this._offset(e),kendo.support.isRtl(this.element)&&(t=this._tableWidth-t),kendo.scrollLeft(this.content,t))},_timeSlots:function(){return this._slots&&this._slots.length?this._slots[this._slots.length-1]:[]},_headers:function(e){var t,i,n,o,r,s,l,d,u=[],h=O.styles;for(r=0,s=e.length;r<s;r++){for(t=e[r],i=[],l=0,d=t.length;l<d;l++)n=t[l],o=c(n.text),i.push(a("th",{colspan:n.span,className:h.header+(n.isNonWorking?" "+h.nonWorking:"")},[o]));u.push(a("tr",null,i))}return u},_hours:function(e,t){var i,n,o,r=[],s=this.options,a=s.workDayStart.getHours(),l=s.workDayEnd.getHours(),c=s.hourSpan;for(e=new Date(e),t=new Date(t),s.showWorkHours&&e.setHours(a);e<t;)i=new Date(e),o=i.getHours(),n=o>=a&&o<l,i.setHours(i.getHours()+c),o==i.getHours()&&i.setHours(i.getHours()+2*c),s.showWorkHours&&!n||r.push({start:e,end:i,isNonWorking:!n,span:1}),e=i;return r},_days:function(e,t){var i,n,o=[];for(e=new Date(e),t=new Date(t);e<t;)i=t<kendo.date.nextDay(e)?t:kendo.date.nextDay(e),n=this._isWorkDay(e),this.options.showWorkDays&&!n||o.push({start:e,end:i,isNonWorking:!n,span:1}),e=i;return o},_weeks:function(e,t){var i,n,o,r=[],s=this.calendarInfo().firstDay;for(e=new Date(e),t=new Date(t);e<t;)i=kendo.date.dayOfWeek(kendo.date.addDays(e,1),s,1),i>t&&(i=t),n=this._days(e,i),o=n.length,o>0&&r.push({start:n[0].start,end:n[o-1].end,span:o}),e=i;return r},_months:function(e,t){var i,n,o,r,s=[];for(e=new Date(e),t=new Date(t);e<t;)i=new Date(e),n=kendo.date.firstDayOfMonth(new Date(i.setMonth(i.getMonth()+1))),i=t<n?t:n,o=this._days(e,i),r=o.length,r>0&&s.push({start:o[0].start,end:o[r-1].end,span:r}),e=i;return s},_years:function(e,t){var i,n,o,r=[];for(e=new Date(e),t=new Date(t);e<t;)i=new Date(e),i=kendo.date.firstDayOfMonth(new Date(i.setMonth(12))),i>=t&&(i=t),o=i.getMonth()||12,n=o-e.getMonth(),r.push({start:e,end:i,span:n}),e=i;return r},_slotHeaders:function(e,t){var i,n,o,r=[];for(n=0,o=e.length;n<o;n++)i=e[n],r.push({text:t(i),isNonWorking:!!i.isNonWorking,span:i.span});return r},_isWorkDay:function(e){var t,i,n=e.getDay(),o=this._workDays;for(t=0,i=o.length;t<i;t++)if(o[t]===n)return!0;return!1},calendarInfo:function(){return kendo.getCulture().calendars.standard},_renderCurrentTime:function(){var t,i=this._getCurrentTime(),n=this._offset(i),o=e("<div class='k-current-time'></div>"),r=O.styles,s=e(D+r.tasksWrapper),a=e(D+r.tasksTable);this.content&&this._timeSlots().length&&(this.content.find(".k-current-time").remove(),t=this._timeSlots()[this._slotIndex("start",i)],i<t.start||i>t.end||(s.length&&a.length&&(n+=a.offset().left-s.offset().left),o.css({left:n+"px",top:"0px",width:"1px",height:this._contentHeight+"px"}).appendTo(this.content)))},_getCurrentTime:function(){return new Date},_currentTime:function(){var e=this.options.currentTimeMarker;e!==!1&&void 0!==e.updateInterval&&(this._renderCurrentTime(),this._currentTimeUpdateTimer=setInterval(f(this._renderCurrentTime,this),e.updateInterval))}});p(!0,O,{styles:N}),kendo.ui.GanttDayView=O.extend({name:"day",options:{timeHeaderTemplate:A,dayHeaderTemplate:E,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(e){var t=this.options.range;this.start=kendo.date.getDate(e.start),this.end=kendo.date.getDate(e.end),(kendo.date.getMilliseconds(e.end)>0||this.end.getTime()===this.start.getTime())&&(this.end=kendo.date.addDays(this.end,1)),t&&t.start&&(this.start=kendo.date.getDate(t.start),this.start.setHours(t.start.getHours())),t&&t.end&&(this.end=kendo.date.getDate(t.end),this.end.setHours(t.end.getHours()))},_createSlots:function(){var e,t,i,n,o=[],r=this._days(this.start,this.end),s=[];for(i=0,n=r.length;i<n;i++)e=r[i],t=this._hours(e.start,e.end),e.span=t.length,s.push.apply(s,t);return o.push(r),o.push(s),o},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.dayHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.timeHeaderTemplate))),e}}),kendo.ui.GanttWeekView=O.extend({name:"week",options:{dayHeaderTemplate:E,weekHeaderTemplate:I,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(e){var t,i=this.options.range,n=this.calendarInfo(),o=n.firstDay,r=e.end;o===r.getDay()&&r.setDate(r.getDate()+7),this.start=kendo.date.getDate(kendo.date.dayOfWeek(e.start,o,-1)),this.end=kendo.date.getDate(kendo.date.dayOfWeek(r,o,1)),i&&i.start&&(this.start=kendo.date.getDate(i.start)),i&&i.end&&(t=new Date(i.end),this.end=kendo.date.getDate(t)<i.end?kendo.date.getDate(new Date(t.setDate(t.getDate()+1))):kendo.date.getDate(t))},_createSlots:function(){var e=[];return e.push(this._weeks(this.start,this.end)),e.push(this._days(this.start,this.end)),e},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.weekHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.dayHeaderTemplate))),e}}),kendo.ui.GanttMonthView=O.extend({name:"month",options:{weekHeaderTemplate:I,monthHeaderTemplate:M,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(e){var t,i=this.options.range;this.start=kendo.date.firstDayOfMonth(e.start),this.end=kendo.date.addDays(kendo.date.getDate(kendo.date.lastDayOfMonth(e.end)),1),i&&i.start&&(this.start=kendo.date.getDate(i.start)),i&&i.end&&(t=new Date(i.end),this.end=kendo.date.getDate(t)<i.end?kendo.date.getDate(new Date(t.setDate(t.getDate()+1))):kendo.date.getDate(t))},_createSlots:function(){var e=[];return e.push(this._months(this.start,this.end)),e.push(this._weeks(this.start,this.end)),e},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.monthHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.weekHeaderTemplate))),e}}),kendo.ui.GanttYearView=O.extend({name:"year",options:{yearHeaderTemplate:R,monthHeaderTemplate:M,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(e){var t,i=this.options.range;this.start=kendo.date.firstDayOfMonth(new Date(e.start.setMonth(0))),this.end=kendo.date.firstDayOfMonth(new Date(e.end.setMonth(12))),i&&i.start&&(this.start=kendo.date.firstDayOfMonth(i.start)),i&&i.end&&(t=kendo.date.firstDayOfMonth(i.end),this.end=kendo.date.getDate(new Date(t.setMonth(t.getMonth()+1))))},_createSlots:function(){var t=[],i=this._months(this.start,this.end);return e(i).each(function(e,t){t.span=1}),t.push(this._years(this.start,this.end)),t.push(i),t},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.yearHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.monthHeaderTemplate))),e}}),o={wrapper:"k-timeline k-grid k-widget",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",tasksWrapper:"k-gantt-tables",dependenciesWrapper:"k-gantt-dependencies",task:"k-task",line:"k-line",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskDragHandle:"k-task-draghandle",taskComplete:"k-task-complete",taskDelete:"k-task-delete",taskWrapActive:"k-task-wrap-active",taskWrap:"k-task-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",hovered:"k-state-hover",selected:"k-state-selected",origin:"k-origin"},r=kendo.ui.GanttTimeline=s.extend({init:function(e,t){s.fn.init.call(this,e,t),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),g=kendo.support.isRtl(e),this._wrapper(),this._domTrees(),this._views(),this._selectable(),this._draggable(),this._resizable(),this._percentResizeDraggable(),this._createDependencyDraggable(),this._attachEvents(),this._tooltip()},options:{name:"GanttTimeline",messages:{views:{day:"Day",week:"Week",month:"Month",year:"Year",start:"Start",end:"End"}},snap:!0,selectable:!0,editable:!0},destroy:function(){s.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this._currentTimeUpdateTimer&&clearInterval(this._currentTimeUpdateTimer),this._unbindView(this._selectedView),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this._percentDraggable&&this._percentDraggable.destroy(),this._dependencyDraggable&&this._dependencyDraggable.destroy(),this.touch&&this.touch.destroy(),this._headerTree=null,this._taskTree=null,this._dependencyTree=null,this.wrapper.off(w),kendo.destroy(this.wrapper)},_wrapper:function(){var t=r.styles,i=this,n=this.options,o=function(){var o,r,s=typeof n.rowHeight===b?n.rowHeight:n.rowHeight+"px",a=e(kendo.format(L,s)),l=i.wrapper.find(D+t.tasksWrapper);return l.append(a),o=h(a.find("tr")),r=a.find("td").height(),a.remove(),{row:o,cell:r}};this.wrapper=this.element.addClass(t.wrapper).append("<div class='"+t.gridHeader+"'><div class='"+t.gridHeaderWrap+"'></div></div>").append("<div class='"+t.gridContentWrap+"'><div class='"+t.tasksWrapper+"'></div><div class='"+t.dependenciesWrapper+"'></div></div>"),n.rowHeight&&(this._calculatedSize=o())},_domTrees:function(){var e=r.styles,t=kendo.dom.Tree,i=this.wrapper;this._headerTree=new t(i.find(D+e.gridHeaderWrap)[0]),this._taskTree=new t(i.find(D+e.tasksWrapper)[0]),this._dependencyTree=new t(i.find(D+e.dependenciesWrapper)[0])},_views:function(){var e,t,i,n,o,r,s,a=this.options.views;for(this.views={},r=0,s=a.length;r<s;r++)e=a[r],t=d(e),t&&e.selectable===!1||(i=t?"string"!=typeof e.type?e.title:e.type:e,n=H[i],n&&(t&&(e.type=n.type),n.title=this.options.messages.views[i]),e=p({title:i},n,t?e:{}),i&&(this.views[i]=e,o&&!e.selected||(o=i)));o&&(this._selectedViewName=o)},view:function(e){return e&&(this._selectView(e),this.trigger("navigate",{view:e,action:"changeView"})),this._selectedView},_selectView:function(e){e&&this.views[e]&&(this._selectedView&&this._unbindView(this._selectedView),this._selectedView=this._initializeView(e),this._selectedViewName=e)},_viewByIndex:function(e){var t,i=this.views;for(t in i){if(!e)return t;e--}},_initializeView:function(e){var i,n,o,r=this.views[e];if(r){if(i=r.type,"string"==typeof i&&(i=kendo.getter(r.type)(window)),!i)throw Error("There is no such view");n={},p(n,this.options.range,r.range),o=r.date||this.options.date,r=new i(this.wrapper,t(p(!0,{headerTree:this._headerTree,taskTree:this._taskTree,dependencyTree:this._dependencyTree,calculatedSize:this._calculatedSize},r,this.options,{date:o,range:n})))}return r},_unbindView:function(e){e&&e.destroy()},_range:function(e){var t,i,n={field:"start",dir:"asc"},o={field:"end",dir:"desc"};return e&&e.length?(t=new _(e).sort(n).toArray()[0].start||new Date,i=new _(e).sort(o).toArray()[0].end||new Date,{start:new Date(t),end:new Date(i)}):{start:new Date,end:new Date}},_render:function(e){var t=this.view(),i=this._range(e),n=t.options.date;this._tasks=e,t.range(i),t.renderLayout(),t.render(e),n&&t._scrollToDate(n)},_renderDependencies:function(e){this.view()._renderDependencies(e)},_taskByUid:function(e){var t,i,n=this._tasks,o=n.length;for(i=0;i<o;i++)if(t=n[i],t.uid===e)return t},_draggable:function(){var e,t,i,o,s=this,a=this.options.snap,l=r.styles,c=this.options.editable,d=function(){s.view()._removeDragHint(),e&&e.css("opacity",1),e=null,t=null,s.dragInProgress=!1};c&&c.move!==!1&&c.update!==!1&&(this._moveDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+l.task,holdToDrag:kendo.support.mobileOS,ignore:D+l.taskResizeHandle}),this._moveDraggable.bind("dragstart",function(n){var r=s.view();return e=n.currentTarget.parent(),t=s._taskByUid(n.currentTarget.attr("data-uid")),s.trigger("moveStart",{task:t})?void n.preventDefault():(i=t.start,o=r._timeByPosition(n.x.location,a)-i,r._createDragHint(e),e.css("opacity",.5),clearTimeout(s._tooltipTimeout),void(s.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){var n,r,l;s.dragInProgress&&(n=s.view(),r=new Date(n._timeByPosition(e.x.location,a)-o),l=r,s.trigger("move",{task:t,start:r})||(i=r,g&&(l=new Date(i.getTime()+t.duration())),n._updateDragHint(l)))},15)).bind("dragend",function(){s.trigger("moveEnd",{task:t,start:i}),d()}).bind("dragcancel",function(){d()}).userEvents.bind("select",function(){n()}))},_resizable:function(){var e,t,i,o,s,a=this,l=this.options.snap,c=r.styles,d=this.options.editable,u=function(){a.view()._removeResizeHint(),e=null,t=null,a.dragInProgress=!1};d&&d.resize!==!1&&d.update!==!1&&(this._resizeDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+c.taskResizeHandle,holdToDrag:!1}),this._resizeDraggable.bind("dragstart",function(n){return s=n.currentTarget.hasClass(c.taskResizeHandleWest),g&&(s=!s),e=n.currentTarget.closest(D+c.task),t=a._taskByUid(e.attr("data-uid")),a.trigger("resizeStart",{task:t})?void n.preventDefault():(i=t.start,o=t.end,a.view()._createResizeHint(t),clearTimeout(a._tooltipTimeout),void(a.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){var n,r;a.dragInProgress&&(n=a.view(),r=n._timeByPosition(e.x.location,l,!s),s?i=r<o?r:o:o=r>i?r:i,a.trigger("resize",{task:t,start:i,end:o})||n._updateResizeHint(i,o,s))},15)).bind("dragend",function(){a.trigger("resizeEnd",{task:t,resizeStart:s,start:i,end:o}),u()}).bind("dragcancel",function(){u()}).userEvents.bind("select",function(){n()}))},_percentResizeDraggable:function(){var e,t,i,o,s,a,l,c,d,h,p=this,f=r.styles,m=this.options.editable,v=function(){p.view()._removePercentCompleteTooltip(),t=null,e=null,p.dragInProgress=!1},_=function(e){t.find(D+f.taskComplete).width(e).end().siblings(D+f.taskDragHandle).css(g?"right":"left",e)};m&&m.dragPercentComplete!==!1&&m.update!==!1&&(this._percentDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+f.taskDragHandle,holdToDrag:!1}),this._percentDraggable.bind("dragstart",function(n){return p.trigger("percentResizeStart")?void n.preventDefault():(t=n.currentTarget.siblings(D+f.task),e=p._taskByUid(t.attr("data-uid")),l=e.percentComplete,i=t.offset(),o=this.element.offset(),s=t.find(D+f.taskComplete).width(),a=u(t),clearTimeout(p._tooltipTimeout),void(p.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){if(p.dragInProgress){h=g?-e.x.initialDelta:e.x.initialDelta;var t=Math.max(0,Math.min(a,s+h));l=Math.round(t/a*100),_(t),c=i.top-o.top,d=i.left+t-o.left,g&&(d+=a-2*t),p.view()._updatePercentCompleteTooltip(c,d,l)}},15)).bind("dragend",function(){p.trigger("percentResizeEnd",{task:e,percentComplete:l/100}),v()}).bind("dragcancel",function(){_(s),v()}).userEvents.bind("select",function(){n()}))},_createDependencyDraggable:function(){var t,i,o,s=this,a=e(),l=e(),c=m.msie&&m.version<9,d=r.styles,p=this.options.editable,f=function(){t.css("display","").removeClass(d.hovered),t.parent().removeClass(d.origin),t=null,g(!1),l=e(),a=e(),s.view()._removeDependencyDragHint(),s.dragInProgress=!1},g=function(e){l.hasClass(d.origin)||(l.find(D+d.taskDot).css("display",e?"block":""),a.toggleClass(d.hovered,e))};p&&p.dependencyCreate!==!1&&(c&&document.namespaces&&document.namespaces.add("kvml","urn:schemas-microsoft-com:vml","#default#VML"),this._dependencyDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+d.taskDot,holdToDrag:!1}),this._dependencyDraggable.bind("dragstart",function(e){var n,r;return s.trigger("dependencyDragStart")?void e.preventDefault():(t=e.currentTarget.css("display","block").addClass(d.hovered),t.parent().addClass(d.origin),n=t.offset(),r=s.wrapper.find(D+d.tasksWrapper).offset(),i=Math.round(n.left-r.left+h(t)/2),
o=Math.round(n.top-r.top+u(t)/2),clearTimeout(s._tooltipTimeout),void(s.dragInProgress=!0))}).bind("drag",kendo.throttle(function(t){var n,r,u,h;s.dragInProgress&&(s.view()._removeDependencyDragHint(),n=e(kendo.elementUnderCursor(t)),r=s.wrapper.find(D+d.tasksWrapper).offset(),u=t.x.location-r.left,h=t.y.location-r.top,s.view()._updateDependencyDragHint({x:i,y:o},{x:u,y:h},c),g(!1),a=n.hasClass(d.taskDot)?n:e(),l=n.closest(D+d.taskWrap),g(!0))},15)).bind("dragend",function(){var e,i,n,o,r;a.length&&(e=t.hasClass(d.taskDotStart),i=a.hasClass(d.taskDotStart),n=e?i?3:2:i?1:0,o=s._taskByUid(t.siblings(D+d.task).attr("data-uid")),r=s._taskByUid(a.siblings(D+d.task).attr("data-uid")),o!==r&&s.trigger("dependencyDragEnd",{type:n,predecessor:o,successor:r})),f()}).bind("dragcancel",function(){f()}).userEvents.bind("select",function(){n()}))},_selectable:function(){var t=this,i=r.styles;this.options.selectable&&this.wrapper.on(y+w,D+i.task,function(i){i.stopPropagation(),i.ctrlKey?t.trigger("clear"):t.trigger("select",{uid:e(this).attr("data-uid")})}).on(y+w,D+i.taskWrap,function(t){t.stopPropagation(),e(this).css("z-index","0");var n=e(document.elementFromPoint(t.clientX,t.clientY));n.hasClass(i.line)&&n.click(),e(this).css("z-index","")}).on(y+w,D+i.tasksWrapper,function(){t.selectDependency().length>0?t.clearSelection():t.trigger("clear")}).on(y+w,D+i.line,function(e){e.stopPropagation(),t.selectDependency(this)})},select:function(e){var t=this.wrapper.find(e),i=r.styles;return t.length?(this.clearSelection(),t.addClass(i.selected),void(kendo.support.mobileOS&&t.parent().addClass(i.taskWrapActive))):this.wrapper.find(D+i.task+D+i.selected)},selectDependency:function(t){var i,n=this.wrapper.find(t),o=r.styles;return n.length?(this.clearSelection(),this.trigger("clear"),i=e(n).attr("data-uid"),void this.wrapper.find(D+o.line+"[data-uid='"+i+"']").addClass(o.selected)):this.wrapper.find(D+o.line+D+o.selected)},clearSelection:function(){var e=r.styles;this.wrapper.find(D+e.selected).removeClass(e.selected),kendo.support.mobileOS&&this.wrapper.find(D+e.taskWrapActive).removeClass(e.taskWrapActive)},_attachEvents:function(){var t=this,i=r.styles,n=this.options.editable;n&&(this._tabindex(),this.wrapper.on(y+w,D+i.taskDelete,function(n){t.trigger("removeTask",{uid:e(this).closest(D+i.task).attr("data-uid")}),n.stopPropagation(),n.preventDefault()}).on(T+w,function(e){var i,n=t.options.editable;e.keyCode===v.DELETE&&n&&n.dependencyDestroy!==!1&&(i=t.selectDependency(),i.length&&(t.trigger("removeDependency",{uid:i.attr("data-uid")}),t.clearSelection()))}),kendo.support.mobileOS?this.touch=this.wrapper.kendoTouch({filter:D+i.task,doubletap:function(i){t.options.editable.update!==!1&&t.trigger("editTask",{uid:e(i.touch.currentTarget).attr("data-uid")})}}).data("kendoTouch"):this.wrapper.on(k+w,D+i.task,function(i){t.options.editable.update!==!1&&(t.trigger("editTask",{uid:e(this).attr("data-uid")}),i.stopPropagation(),i.preventDefault())}))},_tooltip:function(){var t,i=this,n=this.options.tooltip,o=r.styles,s=function(e){t=e.clientX};n&&n.visible===!1||(kendo.support.mobileOS?(this.wrapper.on(y+w,D+o.taskDelete,function(e){e.stopPropagation(),i.view()._removeTaskTooltip()}).on(S+w,D+o.task,function(t){var n=e(t.relatedTarget).parents(D+o.taskWrap,D+o.task);0===n.length&&i.view()._removeTaskTooltip()}),this.touch&&this.touch.bind("tap",function(t){var n=t.touch.target,o=i._taskByUid(e(n).attr("data-uid")),r=t.touch.x.client;i.view()._taskTooltip&&i.view()._removeTaskTooltip(),i.view()._createTaskTooltip(o,n,r)}).bind("doubletap",function(){i.view()._removeTaskTooltip()})):this.wrapper.on(C+w,D+o.task,function(){var n=this,o=i._taskByUid(e(this).attr("data-uid"));i.dragInProgress||(i._tooltipTimeout=setTimeout(function(){i.view()._createTaskTooltip(o,n,t)},800),e(this).on(x,s))}).on(S+w,D+o.task,function(){clearTimeout(i._tooltipTimeout),i.view()._removeTaskTooltip(),e(this).off(x,s)}))}}),p(!0,r,{styles:o})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.gantt.min",["kendo.data.min","kendo.popup.min","kendo.window.min","kendo.resizable.min","kendo.gantt.list.min","kendo.gantt.timeline.min","kendo.grid.min","kendo.pdf.min"],e)}(function(){return function(e,t){function i(e){return"["+m.attr("uid")+(e?"='"+e+"']":"]")}function n(e){return delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate,e}function o(e){var t,i,n,o,r,s;if(e.filter("[name=end], [name=start]").length){for(t=e.attr("name"),i=m.widgetInstance(e,m.ui),n={},o=e;o!==window&&!r;)o=o.parent(),r=o.data("kendoEditable");return!(s=r?r.options.model:null)||(n.start=s.start,n.end=s.end,n[t]=i?i.value():m.parseDate(e.value()),n.start<=n.end)}return!0}function r(t,i){var n=t.parents("["+m.attr("role")+'="gantt"]'),o=[],r=s(n);t.attr(H,0),i&&r.each(function(t,i){o[t]=e(i).scrollTop()});try{t[0].setActive()}catch(a){t[0].focus()}i&&r.each(function(t,i){e(i).scrollTop(o[t])})}function s(t){return e(t).parentsUntil("body").filter(function(e,t){var i=m.getComputedStyles(t,["overflow"]);return"visible"!=i.overflow}).add(window)}var a,l,c,d,u,h,p,f,m=window.kendo,g=e.extend({F10:121},m.keys),v="matchMedia"in window,_=m.support.browser,b=m.support.mobileOS,w=m.Observable,y=m.ui.Widget,k=m.data.DataSource,x=m.data.ObservableObject,C=m.data.ObservableArray,S=m.data.Query,T=e.isArray,D=e.inArray,A=m.isFunction,E=e.proxy,I=e.extend,M=e.isPlainObject,R=e.map,F=m._outerWidth,P=m._outerHeight,z=3,B=".kendoGantt",L="p0",H="tabIndex",N="click",O="width",V="string",W={down:{origin:"bottom left",position:"top left"},up:{origin:"top left",position:"bottom left"}},U="aria-activedescendant",q="aria-label",j="gantt_active_cell",G="action-option-focused",$=".",K="Are you sure you want to delete this task?",Y="Are you sure you want to delete this dependency?",Q=m.template('<button class="#=styles.buttonToggle#" type="button" '+q+'="Toggle"><span class="#=styles.iconToggle#"></span></button>'),X='<button class="#=styles.button# #=className#" type="button" #if (action) {#data-action="#=action#"#}#><span class="#=iconClass#"></span><span>#=text#</span></button>',Z='<a class="#=className#" #=attr# href="\\#">#=text#</a>',J=m.template('<li class="#=styles.currentView# #=styles.viewButtonDefault#"><a href="\\#" class="#=styles.link#">&nbps;</a></li>'),ee=m.template('<ul class="#=styles.viewsWrapper#">#for(var view in views){#<li class="#=styles.viewButtonDefault# #=styles.viewButton#-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a href="\\#" class="#=styles.link#">#=views[view].title#</a></li>#}#</ul>'),te=m.template('<div class="#=styles.popupWrapper#"><ul class="#=styles.popupList#" role="listbox">#for(var i = 0, l = actions.length; i < l; i++){#<li class="#=styles.item#" data-action="#=actions[i].data#" role="option">#=actions[i].text#</span>#}#</ul></div>'),ie=function(t,i){var n={name:i.field,title:i.title},o=i.model.fields[i.field].validation;o&&M(o)&&o.message&&(n[m.attr("dateCompare-msg")]=o.message),e('<input type="text" required '+m.attr("type")+'="date" '+m.attr("role")+'="datetimepicker" '+m.attr("bind")+'="value:'+i.field+'" '+m.attr("validate")+"='true' />").attr(n).appendTo(t),e("<span "+m.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},ne=function(t,i){e('<a href="#" class="'+i.styles.button+'">'+i.messages.assignButton+"</a>").click(i.click).appendTo(t)},oe={wrapper:"k-widget k-gantt",rowHeight:"k-gantt-rowheight",listWrapper:"k-gantt-layout k-gantt-treelist",list:"k-gantt-treelist",timelineWrapper:"k-gantt-layout k-gantt-timeline",timeline:"k-gantt-timeline",splitBarWrapper:"k-splitbar k-state-default k-splitbar-horizontal k-splitbar-draggable-horizontal k-gantt-layout",splitBar:"k-splitbar",splitBarHover:"k-splitbar-horizontal-hover",popupWrapper:"k-list-container",popupList:"k-list k-reset",resizeHandle:"k-resize-handle",icon:"k-icon",item:"k-item",line:"k-line",buttonDelete:"k-gantt-delete",buttonCancel:"k-gantt-cancel",buttonSave:"k-gantt-update",buttonToggle:"k-gantt-toggle",primary:"k-primary",hovered:"k-state-hover",selected:"k-state-selected",focused:"k-state-focused",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasks:"k-gantt-tasks",popup:{form:"k-popup-edit-form",editForm:"k-gantt-edit-form",formContainer:"k-edit-form-container",resourcesFormContainer:"k-resources-form-container",message:"k-popup-message",buttonsContainer:"k-edit-buttons k-state-default",button:"k-button",editField:"k-edit-field",editLabel:"k-edit-label",resourcesField:"k-gantt-resources"},toolbar:{headerWrapper:"k-floatwrap k-header k-gantt-toolbar",footerWrapper:"k-floatwrap k-header k-gantt-toolbar",toolbar:"k-gantt-toolbar",expanded:"k-state-expanded",views:"k-gantt-views",viewsWrapper:"k-reset k-header k-gantt-views",actions:"k-gantt-actions",button:"k-button k-button-icontext",buttonToggle:"k-button k-button-icon k-gantt-toggle",iconPlus:"k-icon k-i-plus",iconPdf:"k-icon k-i-file-pdf",iconToggle:"k-icon k-i-layout-1-by-4",viewButtonDefault:"k-state-default",viewButton:"k-view",currentView:"k-current-view",link:"k-link",pdfButton:"k-gantt-pdf",appendButton:"k-gantt-create"}},re=w.extend({init:function(e,t){w.fn.init.call(this),this.element=e,this.options=I(!0,{},this.options,t),this._popup()},options:{direction:"down",navigatable:!1},_current:function(e){var t=f.styles,i=this.list.find($+t.focused),n=i[e]();n.length&&(i.removeClass(t.focused).removeAttr("id"),n.addClass(t.focused).attr("id",G),this.list.find("ul").removeAttr(U).attr(U,G))},_popup:function(){var t=this,i=f.styles,n="li"+$+i.item,o=$+i.toolbar.appendButton,r=this.options.messages.actions,s=this.options.navigatable;this.list=e(te({styles:i,actions:[{data:"add",text:r.addChild},{data:"insert-before",text:r.insertBefore},{data:"insert-after",text:r.insertAfter}]})),this.element.append(this.list),this.popup=new m.ui.Popup(this.list,I({anchor:this.element.find(o),open:function(){t._adjustListWidth()},animation:this.options.animation},W[this.options.direction])),this.element.on(N+B,o,function(n){var o=e(this),r=o.attr(m.attr("action"));n.preventDefault(),r?t.trigger("command",{type:r}):(t.popup.open(),s&&t.list.find("li:first").addClass(i.focused).attr("id",G).end().find("ul").attr({TABINDEX:0,"aria-activedescendant":G}).focus())}),this.list.find(n).hover(function(){e(this).addClass(i.hovered)},function(){e(this).removeClass(i.hovered)}).end().on(N+B,n,function(){t.trigger("command",{type:e(this).attr(m.attr("action"))}),t.popup.close()}),s&&(this.popup.bind("close",function(){t.list.find(n).removeClass(i.focused).end().find("ul").attr(H,0),t.element.parents("["+m.attr("role")+'="gantt"]').find($+i.gridContent+" > table:first").focus()}),this.list.find("ul").on("keydown"+B,function(e){var n=e.keyCode;switch(n){case g.UP:e.preventDefault(),t._current("prev");break;case g.DOWN:e.preventDefault(),t._current("next");break;case g.ENTER:t.list.find($+i.focused).click();break;case g.ESC:e.preventDefault(),t.popup.close()}}))},_adjustListWidth:function(){var e,t,i=this.list,n=f.styles,o=i[0].style.width,r=this.element.find($+n.toolbar.appendButton),s=F(i);!i.data(O)&&o||(e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=e?parseFloat(e.width):F(r),e&&(_.mozilla||_.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==i.css("box-sizing")?t-(F(i)-i.width()):t,s>o&&(o=s),i.css({fontFamily:r.css("font-family"),width:o}).data(O,o))},destroy:function(){clearTimeout(this._focusTimeout),this.popup.destroy(),this.element.off(B),this.list.off(B),this.unbind()}}),se=function(e,t){return function(i){var n,o;if(i=T(i)?{data:i}:i,n=i||{},o=n.data,n.data=o,!(n instanceof e)&&n instanceof k)throw Error("Incorrect DataSource type. Only "+t+" instances are supported");return n instanceof e?n:new e(n)}},ae=m.data.Model.define({id:"id",fields:{id:{type:"number"},predecessorId:{type:"number"},successorId:{type:"number"},type:{type:"number"}}}),le=k.extend({init:function(e){k.fn.init.call(this,I(!0,{},{schema:{modelBase:ae,model:ae}},e))},successors:function(e){return this._dependencies("predecessorId",e)},predecessors:function(e){return this._dependencies("successorId",e)},dependencies:function(e){var t=this.predecessors(e),i=this.successors(e);return t.push.apply(t,i),t},_dependencies:function(e,t){var i=this.view(),n={field:e,operator:"eq",value:t};return i=new S(i).filter(n).toArray()}});le.create=se(le,"GanttDependencyDataSource"),l=m.data.Model.define({duration:function(){var e=this.end,t=this.start;return e-t},isMilestone:function(){return 0===this.duration()},_offset:function(e){var t,i,n=["start","end"];for(i=0;i<n.length;i++)t=new Date(this.get(n[i]).getTime()+e),this.set(n[i],t)},id:"id",fields:{id:{type:"number"},parentId:{type:"number",defaultValue:null,validation:{required:!0}},orderId:{type:"number",validation:{required:!0}},title:{type:"string",defaultValue:"New task"},start:{type:"date",validation:{required:!0}},end:{type:"date",validation:{required:!0,dateCompare:o,message:"End date should be after or equal to the start date"}},percentComplete:{type:"number",validation:{required:!0,min:0,max:1,step:.01}},summary:{type:"boolean"},expanded:{type:"boolean",defaultValue:!0}}}),c=k.extend({init:function(e){k.fn.init.call(this,I(!0,{},{schema:{modelBase:l,model:l}},e))},remove:function(e){var t=e.get("parentId"),i=this.taskAllChildren(e);return this._removeItems(i),e=k.fn.remove.call(this,e),this._childRemoved(t,e.get("orderId")),e},add:function(e){if(e)return e=this._toGanttTask(e),this.insert(this.taskSiblings(e).length,e)},insert:function(e,t){if(t)return t=this._toGanttTask(t),t.set("orderId",e),t=k.fn.insert.call(this,e,t),this._reorderSiblings(t,this.taskSiblings(t).length-1),this._resolveSummaryFields(this.taskParent(t)),t},taskChildren:function(e){var i,n=this.view(),o={field:"parentId",operator:"eq",value:null},r=this._sort&&this._sort.length?this._sort:{field:"orderId",dir:"asc"};if(e){if(i=e.get("id"),i===t||null===i||""===i)return[];o.value=i}return n=new S(n).filter(o).sort(r).toArray()},taskAllChildren:function(e){var t=[],i=this,n=function(e){var o=i.taskChildren(e);t.push.apply(t,o),R(o,n)};return e?n(e):t=this.view(),t},taskSiblings:function(e){if(!e)return null;var t=this.taskParent(e);return this.taskChildren(t)},taskParent:function(e){return e&&null!==e.get("parentId")?this.get(e.parentId):null},taskLevel:function(e){for(var t=0,i=this.taskParent(e);null!==i;)t+=1,i=this.taskParent(i);return t},taskTree:function(e){var t,i,n,o,r=[],s=this.taskChildren(e);for(i=0,n=s.length;i<n;i++)t=s[i],r.push(t),t.get("expanded")&&(o=this.taskTree(t),r.push.apply(r,o));return r},update:function(e,i){var n,o,r=this,s=function(e,t){var i,n,o=r.taskAllChildren(e);for(i=0,n=o.length;i<n;i++)o[i]._offset(t)},a=function(e){var t=e.field,i=e.sender;switch(t){case"start":r._resolveSummaryStart(r.taskParent(i)),s(i,i.get(t).getTime()-n.getTime());break;case"end":r._resolveSummaryEnd(r.taskParent(i));break;case"percentComplete":r._resolveSummaryPercentComplete(r.taskParent(i));break;case"orderId":r._reorderSiblings(i,n)}};i.parentId!==t&&(n=e.get("parentId"),n!==i.parentId&&(e.set("parentId",i.parentId),r._childRemoved(n,e.get("orderId")),e.set("orderId",r.taskSiblings(e).length-1),r._resolveSummaryFields(r.taskParent(e))),delete i.parentId),e.bind("change",a);for(o in i)n=e.get(o),e.set(o,i[o]);e.unbind("change",a)},_resolveSummaryFields:function(e){e&&(this._updateSummary(e),this.taskChildren(e).length&&(this._resolveSummaryStart(e),this._resolveSummaryEnd(e),this._resolveSummaryPercentComplete(e)))},_resolveSummaryStart:function(e){var t=this,i=function(e){var i,n,o,r=t.taskChildren(e),s=r[0].start.getTime();for(n=1,o=r.length;n<o;n++)i=r[n].start.getTime(),i<s&&(s=i);return new Date(s)};this._updateSummaryRecursive(e,"start",i)},_resolveSummaryEnd:function(e){var t=this,i=function(e){var i,n,o,r=t.taskChildren(e),s=r[0].end.getTime();for(n=1,o=r.length;n<o;n++)i=r[n].end.getTime(),i>s&&(s=i);return new Date(s)};this._updateSummaryRecursive(e,"end",i)},_resolveSummaryPercentComplete:function(e){var t=this,i=function(e){var i=t.taskChildren(e),n=new S(i).aggregate([{field:"percentComplete",aggregate:"average"}]);return n.percentComplete.average};this._updateSummaryRecursive(e,"percentComplete",i)},_updateSummaryRecursive:function(e,t,i){var n,o;e&&(n=i(e),e.set(t,n),o=this.taskParent(e),o&&this._updateSummaryRecursive(o,t,i))},_childRemoved:function(e,t){var i,n,o=null===e?null:this.get(e),r=this.taskChildren(o);for(i=t,n=r.length;i<n;i++)r[i].set("orderId",i);this._resolveSummaryFields(o)},_reorderSiblings:function(e,t){var i,n=e.get("orderId"),o=n>t,r=o?t:n,s=o?n:t,a=o?r:r+1,l=this.taskSiblings(e);for(s=Math.min(s,l.length-1),i=r;i<=s;i++)l[i]!==e&&(l[i].set("orderId",a),a+=1)},_updateSummary:function(e){if(null!==e){var t=this.taskChildren(e).length;e.set("summary",t>0)}},_toGanttTask:function(e){if(!(e instanceof l)){var t=e;e=this._createNewModel(),e.accept(t)}return e}}),c.create=se(c,"GanttDataSource"),I(!0,m.data,{GanttDataSource:c,GanttTask:l,GanttDependencyDataSource:le,GanttDependency:ae}),d={desktop:{dateRange:ie,resources:ne}},u=m.Observable.extend({init:function(e,t){m.Observable.fn.init.call(this),this.element=e,this.options=I(!0,{},this.options,t),this.createButton=this.options.createButton},fields:function(t,i){var n,o=this,r=this.options,s=r.messages.editor,a=r.resources,l=function(e){e.preventDefault(),a.editor(o.container.find($+f.styles.popup.resourcesField),i)};return r.editable.template?n=e.map(i.fields,function(e,t){return{field:t}}):(n=[{field:"title",title:s.title},{field:"start",title:s.start,editor:t.dateRange},{field:"end",title:s.end,editor:t.dateRange},{field:"percentComplete",title:s.percentComplete,format:L}],i.get(a.field)&&n.push({field:a.field,title:s.resources,messages:s,editor:t.resources,click:l,styles:f.styles.popup})),n},_buildEditTemplate:function(e,t,i){var n,o,r,s,a=this.options.resources,l=this.options.editable.template,c=I({},m.Template,this.options.templateSettings),d=c.paramName,u=f.styles.popup,h="";if(l)typeof l===V&&(l=window.unescape(l)),h+=m.template(l,c)(e);else for(n=0,o=t.length;n<o;n++)r=t[n],h+='<div class="'+u.editLabel+'"><label for="'+r.field+'">'+(r.title||r.field||"")+"</label></div>",r.field===a.field&&(h+='<div class="'+u.resourcesField+'" style="display:none"></div>'),!e.editable||e.editable(r.field)?(i.push(r),h+="<div "+m.attr("container-for")+'="'+r.field+'" class="'+u.editField+'"></div>'):(s="#:",r.field?(r=m.expr(r.field,d),s+=r+"==null?'':"+r):s+="''",s+="#",s=m.template(s,c),h+='<div class="'+u.editField+'">'+s(e)+"</div>");return h}}),h=u.extend({destroy:function(){this.close(),this.unbind()},editTask:function(e){this.editable=this._createPopupEditor(e)},close:function(){var e=this,t=function(){e.editable&&(e.editable.destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};this.editable&&this.container.is(":visible")?(e.trigger("close",{window:e.container}),this.container.data("kendoWindow").bind("deactivate",t).close()):t()},showDialog:function(t){var i,n,o,r,s=t.buttons,a=f.styles.popup,l=m.format('<div class="{0}"><div class="{1}"><p class="{2}">{3}</p><div class="{4}">',a.form,a.formContainer,a.message,t.text,a.buttonsContainer);for(i=0,n=s.length;i<n;i++)l+=this.createButton(s[i]);l+="</div></div></div>",o=this.element,this.popup&&this.popup.destroy(),r=this.popup=e(l).appendTo(o).eq(0).on("click",$+a.button,function(t){t.preventDefault(),r.close();var i=e(t.currentTarget).index();s[i].click()}).kendoWindow({modal:!0,autoFocus:!1,resizable:!1,draggable:!1,title:t.title,visible:!1,deactivate:function(){this.destroy(),o.focus()}}).getKendoWindow(),r.center().open(),r.element.find(".k-primary").focus()},_createPopupEditor:function(t){var i,n,o=this,r={},s=this.options.messages,a=f.styles,l=a.popup,c=m.format('<div {0}="{1}" class="{2} {3}"><div class="{4}">',m.attr("uid"),t.uid,l.form,l.editForm,l.formContainer),u=this.fields(d.desktop,t),h=[];return c+=this._buildEditTemplate(t,u,h),c+='<div class="'+l.buttonsContainer+'">',c+=this.createButton({name:"update",text:s.save,className:f.styles.primary}),c+=this.createButton({name:"cancel",text:s.cancel}),o.options.editable.destroy!==!1&&(c+=this.createButton({name:"delete",text:s.destroy})),c+="</div></div></div>",i=this.container=e(c).appendTo(this.element).eq(0).kendoWindow(I({modal:!0,resizable:!1,draggable:!0,title:s.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&o.trigger("cancel",{container:i,model:t})&&e.preventDefault()}},r)),n=i.kendoEditable({fields:h,model:t,clearContainer:!1,validateOnBlur:!0,target:o.options.target}).data("kendoEditable"),m.cycleForm(i),this.trigger("edit",{container:i,model:t})?o.trigger("cancel",{container:i,model:t}):(i.data("kendoWindow").center().open(),i.on(N+B,$+a.buttonCancel,function(e){e.preventDefault(),e.stopPropagation(),o.trigger("cancel",{container:i,model:t})}),i.on(N+B,$+a.buttonSave,function(e){var n,r,s,a,l;for(e.preventDefault(),e.stopPropagation(),n=o.fields(d.desktop,t),r={},a=0,l=n.length;a<l;a++)s=n[a].field,r[s]=t.get(s);o.trigger("save",{container:i,model:t,updateInfo:r})}),i.on(N+B,$+a.buttonDelete,function(e){e.preventDefault(),e.stopPropagation(),o.trigger("remove",{container:i,model:t})})),n}}),p=y.extend({init:function(e,t){y.fn.init.call(this,e,t),this.wrapper=this.element,this.model=this.options.model,this.resourcesField=this.options.resourcesField,this.createButton=this.options.createButton,this._initContainer(),this._attachHandlers()},events:["save"],open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",E(this.destroy,this)).close()},destroy:function(){this._dettachHandlers(),this.grid.destroy(),this.grid=null,this.window.destroy(),this.window=null,y.fn.destroy.call(this),m.destroy(this.wrapper),this.element=this.wrapper=null},_attachHandlers:function(){var t=f.styles,i=this.grid,n=this._cancelProxy=E(this._cancel,this);this.container.on(N+B,$+t.buttonCancel,this._cancelProxy),this._saveProxy=E(this._save,this),this.container.on(N+B,$+t.buttonSave,this._saveProxy),this.window.bind("close",function(e){e.userTriggered&&n(e)}),i.wrapper.on(N+B,"input[type='checkbox']",function(){var t=e(this),n=e(t).closest("tr"),o=i.dataSource.getByUid(n.attr(m.attr("uid"))),r=e(t).is(":checked")?1:"";o.set("value",r)})},_dettachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.container.off(B),this.grid.wrapper.off()},_cancel:function(e){e.preventDefault(),this.close()},_save:function(e){e.preventDefault(),this._updateModel(),this.wrapper.is($+f.styles.popup.resourcesField)||this.trigger("save",{container:this.wrapper,model:this.model}),this.close()},_initContainer:function(){var t=this,i=f.styles.popup,n=m.format('<div class="{0} {1}"><div class="{2} {3}"/></div>"',i.form,i.editForm,i.formContainer,i.resourcesFormContainer);n=e(n),this.container=n.find($+i.resourcesFormContainer),this.window=n.kendoWindow({modal:!0,resizable:!1,draggable:!0,visible:!1,title:this.options.messages.resourcesEditorTitle,open:function(){t.grid.resize(!0)}}).data("kendoWindow"),this._resourceGrid(),this._createButtons()},_resourceGrid:function(){var t=this,i=this.options.messages,n=e('<div id="resources-grid"/>').appendTo(this.container);this.grid=new m.ui.Grid(n,{columns:[{field:"name",title:i.resourcesHeader,template:"<label><input type='checkbox' value='#=name#'# if (value > 0 && value !== null) {#checked='checked'# } #/>#=name#</labe>"},{field:"value",title:i.unitsHeader,template:function(e){var t=e.format,i=null!==e.value?e.value:"";return t?m.toString(i,t):i}}],height:280,sortable:!0,editable:!0,filterable:!0,dataSource:{data:t.options.data,schema:{model:{id:"id",fields:{id:{from:"id"},name:{from:"name",type:"string",editable:!1},value:{from:"value",type:"number",validation:this.options.unitsValidation},format:{from:"format",type:"string"}}}}},save:function(e){var t=!!e.values.value;e.container.parent().find("input[type='checkbox']").prop("checked",t)}})},_createButtons:function(){var e,t,i=this.options.buttons,n='<div class="'+f.styles.popup.buttonsContainer+'">';for(e=0,t=i.length;e<t;e++)n+=this.createButton(i[e]);n+="</div>",this.container.append(n)},_updateModel:function(){var e,t,i,n=[],o=this.grid.dataSource.data();for(t=0,i=o.length;t<i;t++)e=o[t].get("value"),null!==e&&e>0&&n.push(o[t]);this.model[this.resourcesField]=n}}),f=y.extend({init:function(e,t,i){T(t)&&(t={dataSource:t}),a={append:{text:"Add Task",action:"add",className:f.styles.toolbar.appendButton,iconClass:f.styles.toolbar.iconPlus},pdf:{text:"Export to PDF",className:f.styles.toolbar.pdfButton,iconClass:f.styles.toolbar.iconPdf}},y.fn.init.call(this,e,t),i&&(this._events=i),this._wrapper(),this._resources(),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),this._timeline(),this._toolbar(),this._footer(),this._adjustDimensions(),this._preventRefresh=!0,this.view(this.timeline._selectedViewName),this._preventRefresh=!1,this._dataSource(),this._assignments(),this._dropDowns(),this._list(),this._dependencies(),this._resizable(),this._scrollable(),this._dataBind(),this._attachEvents(),this._createEditor(),m.notify(this)},events:["dataBinding","dataBound","add","edit","remove","cancel","save","change","navigate","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","columnResize"],options:{name:"Gantt",autoBind:!0,navigatable:!1,selectable:!0,editable:!0,resizable:!1,columnResizeHandleWidth:z,columns:[],views:[],dataSource:{},dependencies:{},resources:{},assignments:{},taskTemplate:null,messages:{save:"Save",cancel:"Cancel",destroy:"Delete",deleteTaskConfirmation:K,deleteDependencyConfirmation:Y,deleteTaskWindowTitle:"Delete task",deleteDependencyWindowTitle:"Delete dependency",views:{day:"Day",week:"Week",month:"Month",year:"Year",start:"Start",end:"End"},actions:{append:"Add Task",addChild:"Add Child",insertBefore:"Add Above",insertAfter:"Add Below",pdf:"Export to PDF"},editor:{editorTitle:"Task",resourcesEditorTitle:"Resources",title:"Title",start:"Start",end:"End",percentComplete:"Complete",resources:"Resources",assignButton:"Assign",resourcesHeader:"Resources",unitsHeader:"Units"}},showWorkHours:!0,showWorkDays:!0,toolbar:null,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,snap:!0,height:600,listWidth:"30%",rowHeight:null},select:function(e){var i=this.list;return e?(i.select(e),this.list.element.find("table[role=treegrid]").focus(),t):i.select()},clearSelection:function(){this.list.clearSelection()},destroy:function(){y.fn.destroy.call(this),this.dataSource&&(this.dataSource.unbind("change",this._refreshHandler),this.dataSource.unbind("progress",this._progressHandler),this.dataSource.unbind("error",this._errorHandler)),this.dependencies&&(this.dependencies.unbind("change",this._dependencyRefreshHandler),this.dependencies.unbind("error",this._dependencyErrorHandler)),this.timeline&&(this.timeline.unbind(),this.timeline.destroy()),this.list&&(this.list.unbind(),this.list.destroy()),this.footerDropDown&&this.footerDropDown.destroy(),this.headerDropDown&&this.headerDropDown.destroy(),this._editor&&this._editor.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this.toolbar.off(B),v&&(this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null),e(window).off("resize"+B,this._resizeHandler),e(this.wrapper).off(B),this.toolbar=null,this.footer=null},setOptions:function(t){var i,n=m.deepExtend({},this.options,t),o=this._events;t.views||(i=this.view().name,n.views=e.map(this.options.views,function(e){var t=M(e),n=t?"string"!=typeof e.type?e.title:e.type:e;return i===n?t?e.selected=!0:e={type:n,selected:!0}:t&&(e.selected=!1),e})),t.dataSource||(n.dataSource=this.dataSource),t.dependencies||(n.dependencies=this.dependencies),t.resources||(n.resources=this.resources),t.assignments||(n.assignments=this.assignments),this.destroy(),this.element.empty(),this.options=null,this.init(this.element,n,o),y.fn._setEvents.call(this,n)},_attachEvents:function(){this._resizeHandler=E(this.resize,this,!1),e(window).on("resize"+B,this._resizeHandler)},_wrapper:function(){var e=f.styles,t=[e.icon,e.resizeHandle].join(" "),i=this.options,n=i.height,o=i.width;this.wrapper=this.element.addClass(e.wrapper).append("<div class='"+e.listWrapper+"'><div></div></div>").append("<div class='"+e.splitBarWrapper+"'><div class='"+t+"'></div></div>").append("<div class='"+e.timelineWrapper+"'><div></div></div>"),this.wrapper.find($+e.list).width(i.listWidth),n&&this.wrapper.height(n),o&&this.wrapper.width(o),i.rowHeight&&this.wrapper.addClass(e.rowHeight)},_toolbar:function(){var t,i,n,o=this,r=f.styles,s=$+r.toolbar.views+" > li",a=$+r.toolbar.pdfButton,l=$+r.buttonToggle,c=$+r.gridContent,d=e($+r.list),u=e($+r.timeline),h=r.hovered,p=this.options.toolbar,_=e("<div class='"+r.toolbar.actions+"'>"),b=function(e){e.matches?d.css({display:"none","max-width":0}):(d.css({display:"inline-block",width:"30%","max-width":"none"}),u.css("display","inline-block"),o.refresh(),u.find(c).scrollTop(o.scrollTop)),o._resize()};A(p)||(p=typeof p===V?p:this._actions(p),p=E(m.template(p),this)),n=e(Q({styles:r.toolbar})),i=e(ee({ns:m.ns,views:this.timeline.views,styles:r.toolbar})),_.append(p({})),t=e("<div class='"+r.toolbar.headerWrapper+"'>").append(n).append(i).append(_),i.find("li").length>1&&i.prepend(J({styles:r.toolbar})),this.wrapper.prepend(t),this.toolbar=t,v&&(this._mediaQueryHandler=E(b,this),this._mediaQuery=window.matchMedia("(max-width: 480px)"),this._mediaQuery.addListener(this._mediaQueryHandler)),t.on(N+B,s,function(t){var n,s,a;t.preventDefault(),n=o.list,s=e(this).attr(m.attr("name")),a=i.find($+r.toolbar.currentView),a.is(":visible")&&a.parent().toggleClass(r.toolbar.expanded),n.editable&&n.editable.trigger("validate")||(o.trigger("navigate",{view:s})||o.view(s),o.toolbar.find($+r.focused).removeClass(r.focused))}).on("keydown"+B,s,function(t){var i=e($+r.toolbar.views).children(":not(.k-current-view)"),n=i.index(o._focusedView&&o._focusedView[0]||i.closest($+r.selected)[0]);t.keyCode===g.RIGHT?(e(o.toolbar.find($+r.focused)).removeClass(r.focused),o._focusedView=e(n+1===i.length?i[0]:i[n+1]),o._focusedView.focus().addClass(r.focused),t.preventDefault()):t.keyCode===g.LEFT?(e(o.toolbar.find($+r.focused)).removeClass(r.focused),o._focusedView=e(0===n?i[i.length-1]:i[n-1]),o._focusedView.focus().addClass(r.focused),t.preventDefault()):t.keyCode===g.DOWN&&o.toolbar.find($+r.toolbar.currentView).parent().hasClass(r.toolbar.expanded)?(e(o.toolbar.find($+r.focused)).removeClass(r.focused),o._focusedView=e(n+1===i.length?i[0]:i[n+1]),o._focusedView.focus().addClass(r.focused),t.preventDefault()):t.keyCode===g.UP&&o.toolbar.find($+r.toolbar.currentView).parent().hasClass(r.toolbar.expanded)?(e(o.toolbar.find($+r.focused)).removeClass(r.focused),o._focusedView=e(0===n?i[i.length-1]:i[n-1]),o._focusedView.focus().addClass(r.focused),t.preventDefault()):t.keyCode!==g.ENTER&&t.keyCode!==g.SPACEBAR||!o._focusedView?(t.keyCode===g.SPACEBAR||t.keyCode===g.ENTER||t.keyCode===g.DOWN&&t.altKey)&&o.toolbar.find($+r.toolbar.currentView+" > a").hasClass(r.focused)?(o.toolbar.find($+r.toolbar.currentView).parent().toggleClass(r.toolbar.expanded),t.preventDefault()):t.keyCode===g.ESC&&o.toolbar.find($+r.toolbar.currentView).parent().hasClass(r.toolbar.expanded)?(o.toolbar.find($+r.toolbar.currentView).parent().toggleClass(r.toolbar.expanded).blur(),o._focusedView=null,o.toolbar.find($+r.toolbar.currentView+" > a").addClass(r.focused).focus(),t.preventDefault()):t.keyCode>=49&&t.keyCode<=57&&o.view(o.timeline._viewByIndex(t.keyCode-49)):(o.view(o._focusedView.text().toLowerCase()),t.preventDefault())}).on(N+B,a,function(e){e.preventDefault(),o.saveAsPDF();
}).on(N+B,l,function(e){e.preventDefault(),d.is(":visible")?(d.css({display:"none",width:"0"}),u.css({display:"inline-block",width:"100%"}),o.refresh(),u.find(c).scrollTop(o.scrollTop)):(u.css({display:"none",width:0}),d.css({display:"inline-block",width:"100%","max-width":"none"}).find(c).scrollTop(o.scrollTop)),o._resize()}),this.wrapper.on("focusout"+B,function(t){e(t.relatedTarget).closest($+r.toolbar.toolbar).length||o.toolbar.find($+r.focused).removeClass(r.focused),e(t.relatedTarget).closest($+r.toolbar.views).length||o.toolbar.find($+r.toolbar.views).removeClass(r.toolbar.expanded)}).find($+r.toolbar.toolbar+" li").hover(function(){e(this).addClass(h)},function(){e(this).removeClass(h)})},_actions:function(){var e,t,i=this.options,n=i.editable,o=i.toolbar,r="";if(!T(o)){if(!n||n.create===!1)return r;o=["append"]}for(e=0,t=o.length;e<t;e++)r+=this._createButton(o[e]);return r},_footer:function(){var t,i,n,o,r,s=this.options.editable;s&&s.create!==!1&&(t=f.styles.toolbar,i=this.options.messages.actions,n=e(m.template(X)(I(!0,{styles:t},a.append,{text:i.append}))),o=e("<div class='"+t.actions+"'>").append(n),r=e("<div class='"+t.footerWrapper+"'>").append(o),this.wrapper.append(r),this.footer=r)},_createButton:function(e){var t=e.template||X,i=this.options.messages.actions,n=typeof e===V?e:e.name||e.text,o=a[n]?a[n].className:"k-gantt-"+(n||"").replace(/\s/g,""),r={iconClass:"",action:"",text:n,className:o,styles:f.styles.toolbar};if(!(n||M(e)&&e.template))throw Error("Custom commands should have name specified");return r=I(!0,r,a[n],{text:i[n]}),M(e)&&(e.className&&D(r.className,e.className.split(" "))<0&&(e.className+=" "+r.className),r=I(!0,r,e)),m.template(t)(r)},_adjustDimensions:function(){var e=this.element,t=f.styles,i=$+t.list,n=$+t.timeline,o=$+t.splitBar,r=P(this.toolbar),s=this.footer?P(this.footer):0,a=e.height(),l=e.width(),c=F(e.find(o)),d=F(e.find(i));e.children([i,n,o].join(",")).height(a-(r+s)).end().children(n).width(l-(c+d)),l<d+c&&e.find(i).width(l-c)},_scrollTo:function(e){var t,n,o=this.timeline.view(),r=this.list,s=m.attr("uid"),a="string"==typeof e?e:e.closest("tr"+i()).attr(s),l=function(){0!==n.length&&t()};o.content.is(":visible")?(n=o.content.find(i(a)),t=function(){o._scrollTo(n)}):(n=r.content.find(i(a)),t=function(){n.get(0).scrollIntoView()}),l()},_dropDowns:function(){var e=this,t=$+f.styles.toolbar.actions,i=this.options.messages.actions,n=this.timeline,o=this.options.editable,r=function(t){var i,o=t.type,r=e.dataSource,s=r._createNewModel(),a=e.dataItem(e.select()),l=r.taskParent(a),c=n.view()._timeSlots()[0],d="add"===o?a:l,u=e.list.editable;u&&u.trigger("validate")||(s.set("title","New task"),d?(s.set("parentId",d.get("id")),s.set("start",d.get("start")),s.set("end",d.get("end"))):(s.set("start",c.start),s.set("end",c.end)),"add"!==o&&(i=a.get("orderId"),i="insert-before"===o?i:i+1),e._createTask(s,i))};o&&o.create!==!1&&(this.footerDropDown=new re(this.footer.children(t).eq(0),{messages:{actions:i},direction:"up",animation:{open:{effects:"slideIn:up"}},navigatable:e.options.navigatable}),this.headerDropDown=new re(this.toolbar.children(t).eq(0),{messages:{actions:i},navigatable:e.options.navigatable}),this.footerDropDown.bind("command",r),this.headerDropDown.bind("command",r))},_list:function(){var e,t,i=this,n=i.options.navigatable,o=f.styles,s=this.wrapper.find($+o.list),a=s.find("> div"),l=this.wrapper.find($+o.toolbar.actions+" > button"),c={columns:this.options.columns||[],dataSource:this.dataSource,selectable:this.options.selectable,editable:this.options.editable,resizable:this.options.resizable,columnResizeHandleWidth:this.options.columnResizeHandleWidth,listWidth:F(s),resourcesField:this.resources.field,rowHeight:this.options.rowHeight},d=c.columns,u=function(){n&&(i._current(i._cachedCurrent),r(i.list.content.find("table"),!0)),delete i._cachedCurrent};for(t=0;t<d.length;t++)e=d[t],e.field===this.resources.field&&"function"!=typeof e.editor&&(e.editor=E(this._createResourceEditor,this));this.list=new m.ui.GanttList(a,c),this.list.bind("render",function(){i._navigatable()},!0).bind("edit",function(e){i._cachedCurrent=e.cell,i.trigger("edit",{task:e.model,container:e.cell})&&e.preventDefault()}).bind("cancel",function(e){i.trigger("cancel",{task:e.model,container:e.cell})&&e.preventDefault(),u()}).bind("update",function(e){i._updateTask(e.task,e.updateInfo),u()}).bind("change",function(){i.trigger("change");var e=i.list.select();e.length?(l.removeAttr("data-action","add"),i.timeline.select("[data-uid='"+e.attr("data-uid")+"']")):(l.attr("data-action","add"),i.timeline.clearSelection())}).bind("columnResize",function(e){i.trigger("columnResize",{column:e.column,oldWidth:e.oldWidth,newWidth:e.newWidth})})},_timeline:function(){var e=this,i=f.styles,o=n(I(!0,{resourcesField:this.resources.field},this.options)),r=this.wrapper.find($+i.timeline+" > div"),s=$+i.toolbar.currentView+" > "+$+i.toolbar.link;this.timeline=new m.ui.GanttTimeline(r,o),this.timeline.bind("navigate",function(t){var n=t.view.replace(/\./g,"\\.").toLowerCase(),o=e.toolbar.find($+i.toolbar.views+" > li").removeClass(i.selected).end().find($+i.toolbar.viewButton+"-"+n).addClass(i.selected).find($+i.toolbar.link).text();e.toolbar.find(s).text(o),e.refresh()}).bind("moveStart",function(i){var n=e.list.editable;return n&&n.trigger("validate")?(i.preventDefault(),t):(e.trigger("moveStart",{task:i.task})&&i.preventDefault(),t)}).bind("move",function(t){var i=t.task,n=t.start,o=new Date(n.getTime()+i.duration());e.trigger("move",{task:i,start:n,end:o})&&t.preventDefault()}).bind("moveEnd",function(t){var i=t.task,n=t.start,o=new Date(n.getTime()+i.duration());e.trigger("moveEnd",{task:i,start:n,end:o})||e._updateTask(e.dataSource.getByUid(i.uid),{start:n,end:o})}).bind("resizeStart",function(i){var n=e.list.editable;return n&&n.trigger("validate")?(i.preventDefault(),t):(e.trigger("resizeStart",{task:i.task})&&i.preventDefault(),t)}).bind("resize",function(t){e.trigger("resize",{task:t.task,start:t.start,end:t.end})&&t.preventDefault()}).bind("resizeEnd",function(t){var i=t.task,n={};t.resizeStart?n.start=t.start:n.end=t.end,e.trigger("resizeEnd",{task:i,start:t.start,end:t.end})||e._updateTask(e.dataSource.getByUid(i.uid),n)}).bind("percentResizeStart",function(t){var i=e.list.editable;i&&i.trigger("validate")&&t.preventDefault()}).bind("percentResizeEnd",function(t){e._updateTask(e.dataSource.getByUid(t.task.uid),{percentComplete:t.percentComplete})}).bind("dependencyDragStart",function(t){var i=e.list.editable;i&&i.trigger("validate")&&t.preventDefault()}).bind("dependencyDragEnd",function(t){var i=e.dependencies._createNewModel({type:t.type,predecessorId:t.predecessor.id,successorId:t.successor.id});e._createDependency(i)}).bind("select",function(t){var i=e.list.editable;i&&i.trigger("validate"),e.select("[data-uid='"+t.uid+"']")}).bind("editTask",function(t){var i=e.list.editable;i&&i.trigger("validate")||e.editTask(t.uid)}).bind("clear",function(){e.clearSelection()}).bind("removeTask",function(t){var i=e.list.editable;i&&i.trigger("validate")||e.removeTask(e.dataSource.getByUid(t.uid))}).bind("removeDependency",function(t){var i=e.list.editable;i&&i.trigger("validate")||e.removeDependency(e.dependencies.getByUid(t.uid))})},_dataSource:function(){var e=this.options,t=e.dataSource;t=T(t)?{data:t}:t,this.dataSource&&this._refreshHandler?this.dataSource.unbind("change",this._refreshHandler).unbind("progress",this._progressHandler).unbind("error",this._errorHandler):(this._refreshHandler=E(this.refresh,this),this._progressHandler=E(this._requestStart,this),this._errorHandler=E(this._error,this)),this.dataSource=m.data.GanttDataSource.create(t).bind("change",this._refreshHandler).bind("progress",this._progressHandler).bind("error",this._errorHandler)},_dependencies:function(){var e=this.options.dependencies||{},t=T(e)?{data:e}:e;this.dependencies&&this._dependencyRefreshHandler?this.dependencies.unbind("change",this._dependencyRefreshHandler).unbind("error",this._dependencyErrorHandler):(this._dependencyRefreshHandler=E(this.refreshDependencies,this),this._dependencyErrorHandler=E(this._error,this)),this.dependencies=m.data.GanttDependencyDataSource.create(t).bind("change",this._dependencyRefreshHandler).bind("error",this._dependencyErrorHandler)},_resources:function(){var e=this.options.resources,t=e.dataSource||{};this.resources={field:"resources",dataTextField:"name",dataColorField:"color",dataFormatField:"format"},I(this.resources,e),this.resources.dataSource=m.data.DataSource.create(t)},_assignments:function(){var e=this.options.assignments,t=e.dataSource||{};this.assignments?this.assignments.dataSource.unbind("change",this._assignmentsRefreshHandler):this._assignmentsRefreshHandler=E(this.refresh,this),this.assignments={dataTaskIdField:"taskId",dataResourceIdField:"resourceId",dataValueField:"value"},I(this.assignments,e),this.assignments.dataSource=m.data.DataSource.create(t),this.assignments.dataSource.bind("change",this._assignmentsRefreshHandler)},_createEditor:function(){var e=this,i=this._editor=new h(this.wrapper,I({},this.options,{target:this,resources:{field:this.resources.field,editor:E(this._createResourceEditor,this)},createButton:E(this._createPopupButton,this)}));i.bind("cancel",function(i){var n=e.dataSource.getByUid(i.model.uid);return e.trigger("cancel",{container:i.container,task:n})?(i.preventDefault(),t):(e.cancelTask(),t)}).bind("edit",function(t){var i=e.dataSource.getByUid(t.model.uid);e.trigger("edit",{container:t.container,task:i})&&t.preventDefault()}).bind("save",function(t){var i=e.dataSource.getByUid(t.model.uid);e.saveTask(i,t.updateInfo)}).bind("remove",function(t){e.removeTask(t.model.uid)}).bind("close",e._onDialogClose)},_onDialogClose:function(){},_createResourceEditor:function(e,t){var i,n=this,o=t instanceof x?t:t.model,r=o.get("id"),s=this.options.messages,a=this.resources.field,l={step:.01},c=this.assignments.dataSource.options.schema.model;c&&c.fields.Units&&c.fields.Units.validation&&I(!0,l,c.fields.Units.validation),i=this._resourceEditor=new p(e,{resourcesField:a,unitsValidation:l,data:this._wrapResourceData(r),model:o,messages:I({},s.editor),buttons:[{name:"update",text:s.save,className:f.styles.primary},{name:"cancel",text:s.cancel}],createButton:E(this._createPopupButton,this),save:function(e){n._updateAssignments(e.model.get("id"),e.model.get(a))}}),i.open()},_createPopupButton:function(e){var t=e.name||e.text,i={className:f.styles.popup.button+" k-gantt-"+(t||"").replace(/\s/g,""),text:t,attr:""};if(!(t||M(e)&&e.template))throw Error("Custom commands should have name specified");return M(e)&&(e.className&&(e.className+=" "+i.className),i=I(!0,i,e)),m.template(Z)(i)},view:function(e){return this.timeline.view(e)},range:function(e){var t=this.dataSource,i=this.view(),n=this.timeline;return e&&(i.options.range={start:e.start,end:e.end},n._render(t.taskTree()),n._renderDependencies(this.dependencies.view())),{start:i.start,end:i.end}},date:function(e){var t=this.view();return e&&(t.options.date=e,t._scrollToDate(e)),t.options.date},dataItem:function(e){var t,i;return e?(t=this.list,i=t.content.find(e),t._modelFromElement(i)):null},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.list._setDataSource(this.dataSource),this.options.autoBind&&e.fetch()},setDependenciesDataSource:function(e){this.options.dependencies=e,this._dependencies(),this.options.autoBind&&e.fetch()},items:function(){return this.wrapper.children(".k-task")},_updateAssignments:function(e,t){for(var i,n,o,r,s,a,l,c=this.assignments.dataSource,d=this.assignments.dataTaskIdField,u=this.assignments.dataResourceIdField,h=!1,p=new S(c.view()).filter({field:d,operator:"eq",value:e}).toArray();p.length;){for(i=p[0],r=0,s=t.length;r<s;r++)if(n=t[r],i.get(u)===n.get("id")){o=t[r].get("value"),this._updateAssignment(i,o),t.splice(r,1),h=!0;break}h||this._removeAssignment(i),h=!1,p.shift()}for(a=0,l=t.length;a<l;a++)n=t[a],this._createAssignment(n,e);c.sync()},cancelTask:function(){var e=this._editor,t=e.container;t&&e.close()},editTask:function(e){var t,i="string"==typeof e?this.dataSource.getByUid(e):e;i&&(t=this.dataSource._createNewModel(i.toJSON()),t.uid=i.uid,this.cancelTask(),this._editTask(t))},_editTask:function(e){this._editor.editTask(e)},saveTask:function(e,t){var i=this._editor,n=i.container,o=i.editable;n&&o&&o.end()&&this._updateTask(e,t)},_updateTask:function(e,t){var i=this.resources.field;this.trigger("save",{task:e,values:t})||(this._preventRefresh=!0,this.dataSource.update(e,t),t[i]&&this._updateAssignments(e.get("id"),t[i]),this._syncDataSource())},_updateAssignment:function(e,t){var i=this.assignments.dataValueField;e.set(i,t)},removeTask:function(e){var t=this,i="string"==typeof e?this.dataSource.getByUid(e):e;i&&this._taskConfirm(function(e){e||t._removeTask(i)},i)},_createTask:function(e,i){if(!this.trigger("add",{task:e,dependency:null})){var n=this.dataSource;this._preventRefresh=!0,i===t?n.add(e):n.insert(i,e),this._scrollToUid=e.uid,this._syncDataSource()}},_createDependency:function(e){this.trigger("add",{task:null,dependency:e})||(this._preventDependencyRefresh=!0,this.dependencies.add(e),this._preventDependencyRefresh=!1,this.dependencies.sync())},_createAssignment:function(e,t){var i=this.assignments,n=i.dataSource,o=i.dataTaskIdField,r=i.dataResourceIdField,s=i.dataValueField,a=n._createNewModel();a[o]=t,a[r]=e.get("id"),a[s]=e.get("value"),n.add(a)},removeDependency:function(e){var t=this,i="string"==typeof e?this.dependencies.getByUid(e):e;i&&this._dependencyConfirm(function(e){e||t._removeDependency(i)},i)},_removeTaskDependencies:function(e,t){this._preventDependencyRefresh=!0;for(var i=0,n=t.length;i<n;i++)this.dependencies.remove(t[i]);this._preventDependencyRefresh=!1,this.dependencies.sync()},_removeTaskAssignments:function(e){var t,i,n=this.assignments.dataSource,o=n.view(),r={field:this.assignments.dataTaskIdField,operator:"eq",value:e.get("id")};for(o=new S(o).filter(r).toArray(),this._preventRefresh=!0,t=0,i=o.length;t<i;t++)n.remove(o[t]);this._preventRefresh=!1,n.sync()},_removeTask:function(e){var t=this.dependencies.dependencies(e.id);this.trigger("remove",{task:e,dependencies:t})||(this._removeTaskDependencies(e,t),this._removeTaskAssignments(e),this._preventRefresh=!0,this.dataSource.remove(e)&&this._syncDataSource(),this._preventRefresh=!1)},_removeDependency:function(e){this.trigger("remove",{task:null,dependencies:[e]})||this.dependencies.remove(e)&&this.dependencies.sync()},_removeAssignment:function(e){this.assignments.dataSource.remove(e)},_taskConfirm:function(e,t){var i=this.options.messages;this._confirm(e,{model:t,text:i.deleteTaskConfirmation,title:i.deleteTaskWindowTitle})},_dependencyConfirm:function(e,t){var i=this.options.messages;this._confirm(e,{model:t,text:i.deleteDependencyConfirmation,title:i.deleteDependencyWindowTitle})},_confirm:function(e,t){var i,n,o=this.options.editable;o===!0||o.confirmation!==!1?(i=this.options.messages,n=[{name:"delete",text:i.destroy,className:f.styles.primary,click:function(){e()}},{name:"cancel",text:i.cancel,click:function(){e(!0)}}],this.showDialog(I(!0,{},t,{buttons:n}))):e()},showDialog:function(e){this._editor.showDialog(e)},refresh:function(){var e,t,n,o,r,s;this._preventRefresh||this.list.editable||(this._progress(!1),e=this.dataSource,t=e.taskTree(),n=this._scrollToUid,s=-1,this.current&&(r=this.current.closest("tr").attr(m.attr("uid")),s=this.current.index()),this.trigger("dataBinding")||(0!==this.resources.dataSource.data().length&&this._assignResources(t),this._editor&&this._editor.close(),this.clearSelection(),this.list._render(t),this.timeline._render(t),this.timeline._renderDependencies(this.dependencies.view()),n&&(this._scrollTo(n),this.select(i(n))),(n||r)&&s>=0&&(o=this.list.content.find("tr"+i(n||r)+" > td:eq("+s+")"),this._current(o)),this._scrollToUid=null,this.trigger("dataBound")))},refreshDependencies:function(){this._preventDependencyRefresh||this.trigger("dataBinding")||(this.timeline._renderDependencies(this.dependencies.view()),this.trigger("dataBound"))},_assignResources:function(e){var t,i,n=this.resources,o=this.assignments,r=function(){var e=o.dataSource.view(),t={field:o.dataTaskIdField};return e=new S(e).group(t).toArray()},s=r(),a=function(e,t){var i,o,r=e.get("id");for(m.setter(n.field)(e,new C([])),i=0,o=s.length;i<o;i++)s[i].value===r&&t(e,s[i].items)},l=function(e,t){var i,r,s,a,l,c,d,u;for(i=0,r=t.length;i<r;i++)s=t[i],a=n.dataSource.get(s.get(o.dataResourceIdField)),l=s.get(o.dataValueField),c=s.get(o.dataResourceIdField),d=a.get(n.dataFormatField)||L,u=m.toString(l,d),e[n.field].push(new x({id:c,name:a.get(n.dataTextField),color:a.get(n.dataColorField),value:l,formatedValue:u}))};for(t=0,i=e.length;t<i;t++)a(e[t],l)},_wrapResourceData:function(e){var t,i,n,o=this,r=[],s=this.resources.dataSource.view(),a=this.assignments.dataSource.view(),l=new S(a).filter({field:o.assignments.dataTaskIdField,operator:"eq",value:e}).toArray(),c=function(e){var t=null;return new S(l).filter({field:o.assignments.dataResourceIdField,operator:"eq",value:e}).select(function(e){t+=e.get(o.assignments.dataValueField)}),t};for(i=0,n=s.length;i<n;i++)t=s[i],r.push({id:t.get("id"),name:t.get(o.resources.dataTextField),format:t.get(o.resources.dataFormatField)||L,value:c(t.id)});return r},_syncDataSource:function(){this._preventRefresh=!1,this._requestStart(),this.dataSource.sync()},_requestStart:function(){this._progress(!0)},_error:function(){this._progress(!1)},_progress:function(e){m.ui.progress(this.element,e)},_resizable:function(){var t,i,n,o=this,r=this.wrapper,s=f.styles,a=$+s.gridContent,l=r.find($+s.list),c=r.find($+s.timeline);this._resizeDraggable=r.find($+s.splitBar).height(l.height()).hover(function(){e(this).addClass(s.splitBarHover)},function(){e(this).removeClass(s.splitBarHover)}).end().kendoResizable({orientation:"horizontal",handle:$+s.splitBar,start:function(){t=l.width(),i=c.width(),n=c.find(a).scrollLeft()},resize:function(e){var s=e.x.initialDelta;m.support.isRtl(r)&&(s*=-1),t+s<0||i-s<0||(l.width(t+s),c.width(i-s),c.find(a).scrollLeft(n+s),o.timeline.view()._renderCurrentTime())}}).data("kendoResizable")},_scrollable:function(){var t=this,i=f.styles,n=$+i.gridContent,o=$+i.gridHeaderWrap,r=this.timeline.element.find(o),s=this.timeline.element.find(n),a=this.list.element.find(o),l=this.list.element.find(n);b&&l.css("overflow-y","auto"),s.on("scroll",function(){t.scrollTop=this.scrollTop,r.scrollLeft(this.scrollLeft),l.scrollTop(this.scrollTop)}),l.on("scroll",function(){a.scrollLeft(this.scrollLeft)}).on("DOMMouseScroll"+B+" mousewheel"+B,function(t){var i=s.scrollTop(),n=m.wheelDeltaY(t);n&&(t.preventDefault(),e(t.currentTarget).one("wheel"+B,!1),s.scrollTop(i+-n))})},_navigatable:function(){var n,o=this,s=this.options.navigatable,a=this.options.editable,l=this.list.header.find("table"),c=this.list.content.find("table"),d=f.styles,u=m.support.isRtl(this.wrapper),h=this.timeline.element.find($+d.gridContent),p=l.add(c),v=i(),_={collapse:!1,expand:!0},b=function(e){var t=o.timeline.view()._timeSlots()[0].offsetWidth;h.scrollLeft(h.scrollLeft()+(e?-t:t))},w=function(e){var t=o.timeline.view()._rowHeight;h.scrollTop(h.scrollTop()+(e?-t:t))},y=function(e){var t=o.current.parent("tr"+i()),n=o.current.index(),s=t[e]();0!==o.select().length&&o.clearSelection(),0!==s.length?(o._current(s.children("td:eq("+n+")")),o._scrollTo(o.current)):o.current.is("td")&&"prev"==e?r(l):o.current.is("th")&&"next"==e&&r(c)},k=function(e){var t=o.current[e]();0!==t.length&&(o._current(t),n=o.current.index())},x=function(e){var t=o.dataItem(o.current);t.summary&&t.expanded!==e&&t.set("expanded",e)},C=function(){var e,t,i=o.options.editable;i&&i.destroy!==!1&&!o.list.editable&&(e=o.select(),t=m.attr("uid"),e.length&&o.removeTask(e.attr(t)))};return e(this.wrapper).on("mousedown"+B,"tr"+v+", div"+v+":not("+$+d.line+")",function(t){var n,l=e(t.currentTarget),c=e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap");t.ctrlKey||(s&&(n=l.is("tr")?e(t.target).closest("td"):o.list.content.find("tr"+i(l.attr(m.attr("uid")))+" > td:first"),o._current(n)),!s&&!a||c||(o._focusTimeout=setTimeout(function(){r(o.list.content.find("table"),!0)},2)))}).on("keydown"+B,function(i){var n,o=i.keyCode,r=this,s=e(r._getToolbarItems()),a=s.index(r.toolbar.find($+d.focused)[0]);if(a===-1&&e(i.target).closest($+d.toolbar.views).length&&(a=s.index(r.toolbar.find(".k-gantt-views > .k-state-selected:visible > a, .k-current-view:visible > a")[0])),n=i.shiftKey?s[a-1]:s[a+1],o===g.F10)r.toolbar.find(".k-button:visible:first").addClass(d.focused).focus(),i.preventDefault();else if(o==g.TAB&&e(i.target).closest($+d.toolbar.toolbar).length){if(r.toolbar.find($+d.focused).removeClass(d.focused).blur(),n)return e(n).addClass(d.focused).focus(),i.preventDefault(),t;this.list.element.is(":visible")?this.list.element.find("table[role=treegrid]").focus():this.element.find($+d.tasks)[0].focus(),i.preventDefault()}}.bind(this)),s!==!0?(c.on("keydown"+B,function(e){e.keyCode==g.DELETE&&C()}),t):(p.on("focus"+B,function(){var t=this===c.get(0)?"td":"th",i=o.select(),r=o.current||e(i.length?i:this).find(t+":eq("+(n||0)+")");o._current(r),e(o.toolbar.find($+d.focused)).removeClass(d.focused),e(o.toolbar.find($+d.toolbar.currentView)).parent().removeClass(d.toolbar.expanded)}).on("blur"+B,function(){o._current(),this==l&&e(this).attr(H,-1)}).on("keydown"+B,function(t){var i,n=t.keyCode;if(o.current)switch(i=o.current.is("td"),n){case g.RIGHT:t.preventDefault(),t.altKey?b():t.ctrlKey?x(u?_.collapse:_.expand):k(u?"prev":"next");break;case g.LEFT:t.preventDefault(),t.altKey?b(!0):t.ctrlKey?x(u?_.expand:_.collapse):k(u?"next":"prev");break;case g.UP:t.preventDefault(),t.altKey?w(!0):y("prev");break;case g.DOWN:t.preventDefault(),t.altKey?w():y("next");break;case g.SPACEBAR:t.preventDefault(),i&&o.select(o.current.closest("tr"));break;case g.ENTER:t.preventDefault(),i?o.options.editable&&o.options.editable.update!==!1&&(o._cachedCurrent=o.current,o.list._startEditHandler(o.current),e(this).one("keyup",function(e){e.stopPropagation()})):o.current.children("a.k-link").click();break;case g.ESC:break;case g.DELETE:i&&C();break;default:n>=49&&n<=57&&"input"!==t.target.tagName.toLowerCase()&&o.view(o.timeline._viewByIndex(n-49))}}),t)},_getToolbarItems:function(){return this.toolbar.find(".k-gantt-toggle:visible").toArray().concat(this.toolbar.find(".k-gantt-actions > .k-button:visible").toArray(),this.toolbar.find(".k-gantt-views > .k-state-selected:visible > a, .k-current-view:visible > a").toArray())},_current:function(t){var i,n=f.styles;this.current&&this.current.length&&this.current.removeClass(n.focused).removeAttr("id"),t&&t.length?(this.current=t.addClass(n.focused).attr("id",j),i=e(m._activeElement()),i.is("table")&&this.wrapper.find(i).length>0&&i.removeAttr(U).attr(U,j)):this.current=null},_dataBind:function(){var t,i=this;i.options.autoBind&&(this._preventRefresh=!0,this._preventDependencyRefresh=!0,t=e.map([this.dataSource,this.dependencies,this.resources.dataSource,this.assignments.dataSource],function(e){return e.fetch()}),e.when.apply(null,t).done(function(){i._preventRefresh=!1,i._preventDependencyRefresh=!1,i.refresh()}))},_resize:function(){this._adjustDimensions(),this.timeline.view()._adjustHeight(),this.timeline.view()._renderCurrentTime(),this.list._adjustHeight()}}),m.PDFMixin&&(m.PDFMixin.extend(f.fn),f.fn._drawPDF=function(){var e=f.styles,t="."+e.list,i=this.wrapper.find(t).width(),n=this.wrapper.clone();return n.find(t).css("width",i),this._drawPDFShadow({content:n},{avoidLinks:this.options.pdf.avoidLinks})}),m.ui.plugin(f),I(!0,f,{styles:oe})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.treelist.min",["kendo.dom.min","kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.selectable.min","kendo.resizable.min","kendo.treeview.draganddrop.min","kendo.pager.min"],e)}(function(){return function(e,t){function i(e){return function(t){return t[e]}}function n(e){return function(t){return!e(t)}}function o(){return"none"!==this.style.display}function r(i){var n=kendo.attr("index");return i.sort(function(i,o){var r,s;return i=e(i),o=e(o),r=i.attr(n),s=o.attr(n),r===t&&(r=e(i).index()),s===t&&(s=e(o).index()),r=parseInt(r,10),s=parseInt(s,10),r>s?1:r<s?-1:0})}function s(t){var i=t.find(">tr:not(.k-filter-row)"),n=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},o=e();return i.length>1&&(o=i.find("th").filter(n).filter(function(){return this.rowSpan>1})),o=o.add(i.last().find("th").filter(n)),r(o)}function a(e){var t,i,n=[],o=e.className;for(t=0,i=e.level;t<i;t++)n.push(K("span",{className:o}));return n}function l(e){var t,i,n,o=0;for(i=0,n=e.length;i<n;i++)t=e[i].style.width,t&&t.indexOf("%")==-1&&(o+=parseInt(t,10));return o}function c(e,t){var i,n,o,r;e=e[0],t=t[0],e.rows.length&&t.rows.length&&e.rows.length!==t.rows.length&&(i=e.offsetHeight,n=t.offsetHeight,i>n?(o=t.rows[t.rows.length-1],r=i-n):(o=e.rows[e.rows.length-1],r=n-i),o.style.height=o.offsetHeight+r+"px")}function d(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap,.k-tool-icon")}function u(e){return e.parentColumn?!!u(e.parentColumn):!!e.locked}function h(e,t,i,n){var o,r,s=!!i.locked;do o=e[t],t+=n?1:-1,r=!!o.locked;while(o&&t>-1&&t<e.length&&o!=i&&!o.columns&&r===s);return o}function p(e,t,i,n,o){var r,s,a,l,c;return t.columns?(t=t.columns,t[n?0:t.length-1]):(r=x(t,e),s=r?r.columns:e,a=fe(t,s),0===a&&n&&1!==s.length?a++:a!=s.length-1||n||0===a?(a>0||0===a&&!n&&0!==a)&&(a+=n?-1:1):a--,l=fe(i,s),t=h(s,a,i,l>a),c=fe(t,o),(!t.columns||c&&c!==s.length-1)&&t&&t!=i&&t.columns?p(e,t,i,n,o):null)}function f(e){var t,i=[];for(t=0;t<e.length;t++)e[t].columns?i=i.concat(f(e[t].columns)):i.push(e[t]);return i}function m(e){return pe(e,function(e){return!e.hidden})}function g(e){return v([e]).length>0}function v(e){return pe(e,function(e){var t=!e.hidden;return t&&e.columns&&(t=v(e.columns).length>0),t})}function _(e,t){return he(e,function(e){var i;return g(e)&&!t||(i=!0),e.columns&&(e.columns=_(e.columns,i)),de({hidden:i},e)})}function b(e){var t=S(E(e));return t.concat(S(I(e)))}function w(e,t,i,n){var o=e[i],r=e[n],s=x(o,t);return t=s?s.columns:t,fe(r,t)}function y(t){var i,n,o,r,s,a,l,c=t.closest("table"),d=e().add(t),u=t.closest("tr"),h=c.find("tr"),p=h.index(u);if(p>0){for(i=h.eq(p-1),n=i.find("th").filter(function(){return!e(this).attr("rowspan")}),o=0,r=u.find("th").index(t),s=t.prevAll().filter(function(){return this.colSpan>1}),a=0;a<s.length;a++)o+=s[a].colSpan||1;for(r+=Math.max(o-1,0),o=0,a=0;a<n.length;a++)if(l=n.eq(a),o+=l.attr("data-colspan")?l[0].getAttribute("data-colspan"):1,r>=a&&r<o){d=y(l).add(d);break}}return d}function k(t){var i,n,o,r,s,a,l,c=t.closest("thead"),d=e().add(t),u=t.closest("tr"),h=c.find("tr"),p=h.index(u)+t[0].rowSpan,f=kendo.attr("colspan");if(p<=h.length-1){for(i=u.next(),n=t.prevAll(),n=n.filter(function(){return!this.rowSpan||1===this.rowSpan}),r=0,o=0;o<n.length;o++)r+=parseInt(n.eq(o).attr(f),10)||1;for(s=i.find("th"),a=parseInt(t.attr(f),10)||1,o=0;o<a;)i=s.eq(o+r),d=d.add(k(i)),l=parseInt(i.attr(f),10),l>1&&(a-=l-1),o++}return d}function x(e,t){var i=[];return C(e,t,i),i[i.length-1]}function C(e,t,i){var n,o;for(i=i||[],n=0;n<t.length;n++){if(e===t[n])return!0;if(t[n].columns){if(o=i.length,i.push(t[n]),C(e,t[n].columns,i))return!0;i.splice(o,i.length-o)}}return!1}function S(e){var t,i=[],n=[];for(t=0;t<e.length;t++)i.push(e[t]),e[t].columns&&(n=n.concat(e[t].columns));return n.length&&(i=i.concat(S(n))),i}function T(e,t,i,n){var o,r;for(i=i||0,n=n||{},n[i]=n[i]||0,r=0;r<t.length;r++){if(t[r]==e){o={cell:n[i],row:i};break}if(t[r].columns&&(o=T(e,t[r].columns,i+1,n)))break;n[i]++}return o}function D(t,i,n){var o,r,s,a,l,c,d,u;for(n=n||0,s=i,i=f(i),a={},l=t.find(">tr:not(.k-filter-row)"),c=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},d=0,u=i.length;d<u;d++)o=T(i[d],s),a[o.row]||(a[o.row]=l.eq(o.row).find(".k-header").filter(c)),r=a[o.row].eq(o.cell),r.attr(kendo.attr("index"),n+d);return i.length}function A(e){var t,i,n=1,o=0;for(t=0;t<e.length;t++)e[t].columns&&(i=A(e[t].columns),i>o&&(o=i));return n+o}function E(e){return pe(e,i("locked"))}function I(e){return pe(e,n(i("locked")))}function M(e,t){var i=e.find("tr"),n=i.length;i.each(function(e){var i,o=this.cells;for(i=0;i<o.length;i++)o[i].colSpan<=1&&o[i].attributes.rowspan&&(t.children[e].children[i].attr.rowSpan=n-e,o[i].rowSpan=n-e)})}function R(t,i){var n,o=t.find("tr"),r=[];for(o.filter(function(t){var i=!e(this).children().length;return i&&r.push(t),i}).remove(),n=r.length-1;n>=0;n--)i.children.splice(r[n],1);M(t,i)}function F(t,i){var n,o,r=se.msie||se.edge;if(i===!0){if(t=e(t),n=t.parent().scrollTop(),o=t.parent().scrollLeft(),r)try{t[0].setActive()}catch(s){t[0].focus()}else t[0].focus();t.parent().scrollTop(n).scrollLeft(o)}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function P(e,t){var i,n=e.offsetHeight,o=t.offsetHeight;n>o?i=n+"px":n<o&&(i=o+"px"),i&&(e.style.height=t.style.height=i)}function z(e,t){return!(!(e&&t&&e.field)||e.selectable||e.command||e.editable&&!e.editable(t))&&(e.field&&t.editable&&t.editable(e.field))}function B(e,t){var i=(e||{}).field||"";return t.dirty&&t.dirtyFields&&t.dirtyFields[i]&&z(e,t)}function L(e){return t===e}function H(e){return"number"==typeof e&&!isNaN(e)}var N,O,V,W,U,q,j,G=kendo.data,$=kendo.dom,K=$.element,Y=$.text,Q=$.html,X=kendo._outerWidth,Z=kendo.keys,J=kendo._outerHeight,ee=kendo.ui,te=ee.DataBoundWidget,ie=G.DataSource,ne=G.ObservableArray,oe=G.Query,re=G.Model,se=kendo.support.browser,ae=kendo.template,le=kendo._activeElement,ce=e.isArray,de=e.extend,ue=e.proxy,he=e.map,pe=e.grep,fe=e.inArray,me=e.isPlainObject,ge=Array.prototype.push,ve="string",_e="change",be="itemChange",we="error",ye="progress",ke=".",xe=".kendoTreeList",Ce="click",Se="mousedown",Te="beforeEdit",De="edit",Ae="page",Ee="pageChange",Ie="save",Me="saveChanges",Re="expand",Fe="collapse",Pe="cellClose",ze="remove",Be="td:not(.k-group-cell):not(.k-hierarchy-cell):visible",Le="dataBinding",He="dataBound",Ne="cancel",Oe="tabIndex",Ve="filterMenuInit",We="filterMenuOpen",Ue="columnHide",qe="columnShow",je="th.k-header",Ge="columnReorder",$e="columnResize",Ke="columnMenuInit",Ye="columnMenuOpen",Qe="columnLock",Xe="columnUnlock",Ze="parentId",Je="dragstart",et="drag",tt="drop",it="dragend",nt="tr:visible",ot="td:visible",rt="th:visible",st="tr:not(.k-footer-template):visible",at=nt+" > td:first:visible",lt=st+":last",ct=!1,dt="height",ut="incell",ht="inline",pt="popup",ft="table",mt={wrapper:"k-treelist k-grid k-widget k-display-block",header:"k-header",button:"k-button",alt:"k-alt",editCell:"k-edit-cell",editRow:"k-grid-edit-row",dirtyCell:"k-dirty-cell",group:"k-treelist-group",gridToolbar:"k-grid-toolbar",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",gridFilter:"k-grid-filter",footerTemplate:"k-footer-template",focused:"k-state-focused",loading:"k-i-loading",refresh:"k-i-reload",retry:"k-request-retry",selected:"k-state-selected",status:"k-status",link:"k-link",withIcon:"k-with-icon",filterable:"k-filterable",icon:"k-icon",iconFilter:"k-i-filter",iconCollapse:"k-i-collapse",iconExpand:"k-i-expand",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",dropPositions:"k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",dropTop:"k-i-insert-up",dropBottom:"k-i-insert-down",dropAdd:"k-i-plus",dropMiddle:"k-i-insert-middle",dropDenied:"k-i-cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text"},gt={create:{imageClass:"k-i-plus",className:"k-grid-add",
methodName:"addRow"},createchild:{imageClass:"k-i-plus",className:"k-grid-add",methodName:"addRow"},destroy:{imageClass:"k-i-close",className:"k-grid-delete",methodName:"removeRow"},edit:{imageClass:"k-i-edit",className:"k-grid-edit",methodName:"editRow"},update:{imageClass:"k-i-check",className:"k-primary k-grid-update",methodName:"saveRow"},canceledit:{imageClass:"k-i-cancel",className:"k-grid-cancel",methodName:"_cancelEdit"},cancel:{imageClass:"k-icon k-i-cancel",text:"Cancel changes",className:"k-grid-cancel-changes",methodName:"cancelChanges"},save:{imageClass:"k-icon k-i-check",text:"Save changes",className:"k-grid-save-changes",methodName:"saveChanges"},excel:{imageClass:"k-i-file-excel",className:"k-grid-excel",methodName:"saveAsExcel"},pdf:{imageClass:"k-i-file-pdf",className:"k-grid-pdf",methodName:"saveAsPDF"}},vt=kendo.Class.extend({init:function(e,t){var i=this;i.data=e||[],i.options=de(i.options,t)},options:{defaultParentId:null,idField:"id",parentIdField:Ze},childrenMap:function(){var e,t,i,n,o=this,r={},s=o.data.length,a=o.options.idField,l=o.options.parentIdField;if(o._childrenMap)return o._childrenMap;for(n=0;n<s;n++)e=this.data[n],t=e[a],i=e[l],r[t]=r[t]||[],r[i]=r[i]||[],r[i].push(e);return o._childrenMap=r,r},idsMap:function(){var e,t,i=this,n={},o=i.data,r=o.length,s=i.options.idField;if(i._idMap)return i._idMap;for(t=0;t<r;t++)e=o[t],n[e[s]]=e;return i.idsMap=n,n},dataMaps:function(){var e,t,i,n,o=this,r={},s=o.data,a=s.length,l={},c=o.options.idField,d=o.options.parentIdField;if(o._dataMaps)return o._dataMaps;for(n=0;n<a;n++)e=s[n],t=e[c],i=e[d],l[t]=e,r[t]=r[t]||[],r[i]=r[i]||[],r[i].push(e);return o._dataMaps={children:r,ids:l}},rootNodes:function(){var e,t,i=this,n=i.data,o=i.options.defaultParentId,r=n.length,s=[],a=i.options.parentIdField;for(t=0;t<r;t++)e=n[t],e[a]===o&&s.push(e);return s},removeCollapsedSubtreesFromRootNodes:function(e){var t,i,n,o,r;for(e=e||{},t=this,i=t.rootNodes(),n=[],t._childrenMap=e.childrenMap=e.childrenMap||t.childrenMap(),e.maxDepth=e.maxDepth||1/0,r=0;r<i.length;r++)o=t.removeCollapsedSubtrees(i[r],e),n=n.concat(o);return n},removeCollapsedSubtrees:function(e,t){var i,n,o,r,s,a,l,c,d;if(t=t||{},i=this,n=[],s=t.childrenMap||{},a=t.maxDepth||1/0,l=i.options.idField,c=s[e[l]]||[],d=L(e.expanded)?t.expanded:e.expanded,n.push(e),c&&d)for(o=0;o<c.length&&!(n.length>=a);o++)r=i.removeCollapsedSubtrees(c[o],t),n=n.concat(r);return n}}),_t=function(e){this.data=e||[]};_t.prototype=new oe,_t.prototype.constructor=_t,_t.process=function(e,i,n){var o,r,s,a,l,c,d,u,h,p,f,m;return i=i||{},o=new _t(e),r=i.group,s=oe.normalizeGroup(r||[]).concat(oe.normalizeSort(i.sort||[])),a=i.filterCallback,l=i.filter,c=i.skip,d=i.take,s&&n&&(o=o.sort(s,t,t,n)),l&&(o=o.filter(l),a&&(o=a(o)),u=o.toArray().length),s&&!n&&(o=o.sort(s),r&&(e=o.toArray())),i.processFromRootNodes&&(f=new vt(o.toArray(),i),l&&(p=f.childrenMap()),m=f.removeCollapsedSubtreesFromRootNodes({childrenMap:l||s&&s.length?t:i.childrenMap,expanded:i.expanded,maxDepth:c+d||1/0}),h=f.childrenMap(),o=new _t(m)),c!==t&&d!==t&&(o=o.range(c,d)),r&&(o=o.group(r,e)),{total:u,data:o.toArray(),childrenMap:h,filteredChildrenMap:p}},N=re.define({id:"id",parentId:Ze,fields:{id:{type:"number"},parentId:{type:"number",nullable:!0}},init:function(e){re.fn.init.call(this,e),this._loaded=!1,this.parentIdField||(this.parentIdField=Ze),this.parentId=this.get(this.parentIdField)},accept:function(e){re.fn.accept.call(this,e),this.parentId=this.get(this.parentIdField)},set:function(e,t,i){e==Ze&&this.parentIdField!=Ze&&(this[this.parentIdField]=t),re.fn.set.call(this,e,t,i),e==this.parentIdField&&(this.parentId=this.get(this.parentIdField))},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return re.fn.shouldSerialize.call(this,e)&&"_loaded"!==e&&"_error"!=e&&"_edit"!=e&&!("parentId"!==this.parentIdField&&"parentId"===e)}}),N.parentIdField=Ze,N.define=function(e,i){var n,o;return i===t&&(i=e,e=N),n=i.parentId||Ze,i.parentIdField=n,o=re.define(e,i),n&&(o.parentIdField=n),o},O=ie.extend({init:function(e){e=e||{};var t=this;t._dataMaps=t._getDataMaps(),e.schema=de(!0,{},{modelBase:N,model:N},e.schema),ie.fn.init.call(this,e)},_addRange:function(){},_createNewModel:function(e){var t=this,i={},n=e instanceof re,o=this._modelParentIdField();return n&&(i=e),i=ie.fn._createNewModel.call(this,i),n||(e.parentId?e[i.parentIdField]=e.parentId:t._isPageable()&&e[o]&&(e[i.parentIdField]=e[o]),i.accept(e)),i},_shouldWrap:function(){return!0},_push:function(e,t){var i=ie.fn._readData.call(this,e);i||(i=e),this[t](i)},_getData:function(){return this._data||[]},_readData:function(e){var t=this,i=t._isPageable()?t._getData().toJSON():t.data();return e=ie.fn._readData.call(this,e),this._replaceData((i.toJSON?i.toJSON():i).concat(e),i),e instanceof ne?e:i},_replaceData:function(e,t){var i,n=e.length;for(i=0;i<n;i++)t[i]=e[i];t.length=n},_readAggregates:function(e){var t=de(this._aggregateResult,this.reader.aggregates(e));return""in t&&(t[this._defaultParentId()]=t[""],delete t[""]),t},read:function(e){var t=this;return t._isPageable()&&(t._dataMaps={}),ie.fn.read.call(t,e)},remove:function(e){this._removeChildData(e),this._removeFromDataMaps(e),ie.fn.remove.call(this,e)},_removeChildData:function(e){var t=this,i=t._isPageable(),n=i?this._getData():this.data(),o=i?t._getChildrenMap()||t.childrenMap(n):t._childrenMap(n),r=this._subtree(o,e.id),s=this._removeItems(r,!1);t._removeFromDataMaps(s)},insert:function(e,t){var i=this,n=i._createNewModel(t);return i._insertInDataMaps(n),ie.fn.insert.call(i,e,n)},_filterCallback:function(e){var t,i,n,o=this,r={},s=[],a=e.toArray(),l=o._modelIdField(),c=o._modelParentIdField(),d=o._isPageable(),u=[];for(t=0;t<a.length;t++)if(i=a[t],d){for(u=[],r[i[l]]||(r[i[l]]=!0,u.push(i)),n=o._parentNode(i);n&&!r[n[l]];)r[n[l]]=!0,u.unshift(n),n=o._parentNode(n);u.length&&(s=s.concat(u))}else for(;i&&(r[i[l]]||(r[i[l]]=!0,s.push(i)),!r[i[c]]);)r[i[c]]=!0,i=this.parentNode(i),i&&s.push(i);return new oe(s)},_subtree:function(e,t){var i,n,o=this,r=e[t]||[],s=o._defaultParentId(),a=o._modelIdField();for(i=0,n=r.length;i<n;i++)r[i][a]!==s&&(r=r.concat(o._subtree(e,r[i][a])));return r},_childrenMap:function(e){var t,i,n,o,r={};for(e=this._observeView(e),t=0;t<e.length;t++)i=e[t],n=i.id,o=i.parentId,r[n]=r[n]||[],r[o]=r[o]||[],r[o].push(i);return r},childrenMap:function(e){var t=this._createTreeView(e),i=t.childrenMap();return i},_getChildrenMap:function(){var e=this,t=e._getDataMaps();return t.children},_initIdsMap:function(e){var t=this,i=t._getDataMaps();return L(i.ids)&&(i.ids=t._idsMap(e)),i.ids},_idsMap:function(e){var t=this._createTreeView(e),i=t.idsMap();return i},_getIdsMap:function(){var e=this,t=e._getDataMaps();return t.ids||{}},_getFilteredChildrenMap:function(){var e=this,t=e._getDataMaps();return t.filteredChildren},_setFilteredChildrenMap:function(e){var t=this,i=t._getDataMaps();i.filteredChildren=e},_initDataMaps:function(e){var t=this,i=t._createTreeView(e);return t._dataMaps=i.dataMaps()},_initChildrenMapForParent:function(e){var t,i=this,n=i._getData(),o=i._getChildrenMap(),r=i._modelIdField(),s=i._modelParentIdField(),a=e[r];if(o)for(o[a]=[],t=0;t<n.length;t++)n[t][s]===a&&o[a].push(n[t])},_getDataMaps:function(){var e=this;return e._dataMaps=e._dataMaps||{}},_createTreeView:function(e,t){var i=new vt(e,de(t,this._defaultTreeModelOptions()));return i},_defaultTreeModelOptions:function(){var e=this,t=e._modelOptions();return{defaultParentId:e._defaultParentId(),idField:e._modelIdField(),parentIdField:e._modelParentIdField(),expanded:t.expanded}},_defaultDataItemType:function(){return this.reader.model||kendo.data.ObservableObject},_calculateAggregates:function(e,t){var i,n,o,r,s,a,l,c,d,u,h,p,f,m;if(t=t||{},i=this,n={},a=t.filter,l=t.skip,c=t.take,d=L(l)||L(c)?1/0:l+c,u=i._isPageable(),h=t.filteredChildrenMap,p=t.childrenMap,u){if(L(t.aggregate))return n;f=h?h:p?p:i.childrenMap(i._getData())}for(!u&&a&&(e=oe.process(e,{filter:a,filterCallback:ue(this._filterCallback,this)}).data),m=u?f:i._childrenMap(e),n[this._defaultParentId()]=new oe(this._subtree(m,this._defaultParentId())).aggregate(t.aggregate),s=0;s<e.length&&!(s>=d);s++)o=e[s],r=this._subtree(m,o.id),n[o.id]=new oe(r).aggregate(t.aggregate);return n},_queryProcess:function(e,t){var i,n,o,r,s,a,l=this,c={};if(t=t||{},t.filterCallback=ue(this._filterCallback,this),l._isPageable())return l._processPageableQuery(e,t);for(i=this._defaultParentId(),c=oe.process(e,t),n=this._childrenMap(c.data),e=n[i]||[],r=0;r<e.length;r++)s=e[r],s.id!==i&&(a=n[s.id],o=!(!a||!a.length),s.loaded()||s.loaded(o||!s.hasChildren),(s.loaded()||s.hasChildren!==!0)&&(s.hasChildren=o),o&&(e=e.slice(0,r+1).concat(a,e.slice(r+1))));return c.data=e,c},_processPageableQuery:function(e,t){var i,n,o=this,r=o._getDataMaps();return o._getData()===e&&r.children&&r.ids||(r=o._initDataMaps(o._getData())),t.childrenMap=r.children||{},t.idsMap=r.ids||{},i=o._processTreeQuery(e,t),o._replaceWithObservedData(i.data,e),o._processDataItemsState(i.data,i.childrenMap),o._replaceItemsInDataMaps(i.data),i.dataToAggregate=o._dataToAggregate(i.data,t),t.filter&&(n=i.filteredChildrenMap,o._replaceInMapWithObservedData(n,e),o._setFilteredChildrenMap(n),t.filteredChildrenMap=n),i},_dataToAggregate:function(e){var t=this,i=e[0]||{},n=t._parentNodes(i),o=n.concat(e);return o},_replaceItemsInDataMaps:function(e){var i,n,o,r,s=this,a=ce(e)?e:[e],l=s._defaultDataItemType(),c=s._defaultParentId(),d=s._modelIdField(),u=s._modelParentIdField(),h=s._getDataMaps();for(r=0;r<a.length;r++)i=a[r],i instanceof l&&(s._insertInIdsMap(i),n=s._parentNodes(i),o=n&&n.length?n[n.length-1]:t,i[u]===c?s._replaceInMap(h.children,c,i,l):o&&s._replaceInMap(h.children,o[d],i,l))},_replaceInMap:function(e,t,i,n){var o,r,s=this._modelIdField();e[t]=e[t]||[],n=n||this._defaultDataItemType(),o=e[t].filter(function(e){return i[s]===e[s]})[0],r=o?e[t].indexOf(o):-1,r===-1||o instanceof n||(e[t][r]=i)},_replaceWithObservedData:function(e,t){var i,n,o,r,s,a,l=this,c=l._getDataMaps().ids||{},d=l._modelIdField(),u=l._defaultDataItemType();for(a=0;a<e.length;a++)i=e[a],n=i[d],i instanceof u||(c[n]instanceof u?e[a]=c[n]:(o=l._getById(n),r=t.indexOf(o),o&&r!==-1&&(s=t.at(r),e[a]=s)))},_replaceInMapWithObservedData:function(e,t){var i,n=this;for(i in e)n._replaceWithObservedData(e[i],t)},_insertInDataMaps:function(e){var t=this;t._isPageable()&&(t._insertInIdsMap(e),t._insertInChildrenMap(e))},_insertInIdsMap:function(e){var t=this,i=t._getIdsMap(),n=t._modelIdField();L(e[n])||(i[e[n]]=e)},_insertInChildrenMap:function(e,t){var i=this,n=i._getChildrenMap()||{},o=i._modelIdField(),r=i._modelParentIdField(),s=e[o],a=e[r];t=t||0,n[s]=n[s]||[],n[a]=n[a]||[],n[a].splice(t,0,e)},_removeFromDataMaps:function(e){var t,i=this;if(e=ce(e)?e:[e],i._isPageable())for(t=0;t<e.length;t++)i._removeFromIdsMap(e[t]),i._removeFromChildrenMap(e[t])},_removeFromIdsMap:function(e){var i=this,n=i._getIdsMap(),o=i._modelIdField();L(e[o])||(n[e[o]]=t)},_removeFromChildrenMap:function(e){var t,i=this,n=i._getChildrenMap()||{},o=i._modelParentIdField(),r=e[o];n[r]=n[r]||[],t=i._indexInChildrenMap(e),t!==-1&&n[r].splice(t,1)},_indexInChildrenMap:function(e){var t=this;return t._itemIndexInMap(e,t._getChildrenMap())},_itemIndexInMap:function(e,t){var i,n,o=this,r=t||{},s=o._modelParentIdField(),a=e[s];return r[a]=r[a]||[],i=r[a].filter(function(t){return e.uid===t.uid})[0],n=i?r[a].indexOf(i):-1},_getById:function(e){var t,i=this,n=i._modelIdField(),o=i._getData();for(t=0;t<o.length;t++)if(o[t][n]===e)return o[t]},_isLastItemInView:function(e){var t=this.view();return t.length&&t[t.length-1]===e},_defaultPageableQueryOptions:function(){var e=this,t=e._getDataMaps(),i={skip:e.skip(),take:e.take(),page:e.page(),pageSize:e.pageSize(),sort:e.sort(),filter:e.filter(),group:e.group(),aggregate:e.aggregate(),filterCallback:ue(e._filterCallback,e),childrenMap:t.children,idsMap:t.ids};return i},_isPageable:function(){var e=this.pageSize();return!L(e)&&e>0},_updateTotalForAction:function(e,t){var i=this;ie.fn._updateTotalForAction.call(i,e,t),i._isPageable()&&i._updateCollapsedTotalForAction(e,t)},_updateCollapsedTotalForAction:function(e,i){var n=this,o=parseInt(n._collapsedTotal,10);return H(n._collapsedTotal)?("add"===e?o+=i.length:"remove"===e?o-=i.length:"itemchange"===e||"sync"===e||n.options.serverPaging?"sync"===e&&(o=n._calculateCollapsedTotal()):o=n._calculateCollapsedTotal(),n._collapsedTotal=o,t):(n._calculateCollapsedTotal(),t)},_setFilterTotal:function(e,t){var i=this;ie.fn._setFilterTotal.call(i,e,t),i._setFilterCollapsedTotal(e)},_setFilterCollapsedTotal:function(e){var i=this;i.options.serverFiltering||(e!==t?i._collapsedTotal=e:(i._getFilteredChildrenMap()&&i._calculateCollapsedTotal(),i._setFilteredChildrenMap(t)))},collapsedTotal:function(){var e=this;return L(e._collapsedTotal)?e._calculateCollapsedTotal():e._collapsedTotal},_calculateCollapsedTotal:function(){var e=this,t=e._dataWithoutCollapsedSubtrees();return t.length&&(e._collapsedTotal=t.length),e._collapsedTotal},_dataWithoutCollapsedSubtrees:function(){return this._removeCollapsedSubtrees(this._getData())},_removeCollapsedSubtrees:function(e){var t=this,i=t._createTreeView(e),n=i.removeCollapsedSubtreesFromRootNodes({expanded:t._modelOptions().expanded,childrenMap:t._getChildrenMap()});return n},_processTreeQuery:function(e,t){var i=_t.process(e,de(t,this._defaultTreeModelOptions(),{processFromRootNodes:!0}));return i},_processDataItemsState:function(e,t){var i,n=e.length;for(i=0;i<n;i++)this._processDataItemState(e[i],t)},_processDataItemState:function(e,t){var i,n,o=this._defaultParentId();e.id!==o&&(i=t[e.id]||[],n=!(!i||!i.length),e.loaded&&(e.loaded()||e.loaded(n||!e.hasChildren),(e.loaded()||e.hasChildren!==!0)&&(e.hasChildren=n)))},_queueRequest:function(e,t){t.call(this)},_modelLoaded:function(e){var t=this.get(e);t.loaded(!0),t.hasChildren=this.childNodes(t).length>0},_modelError:function(e,t){this.get(e)._error=t},success:function(e,i){i&&t!==i.id||(this._data=this._observe([])),ie.fn.success.call(this,e,i),this._total=this._data.length},load:function(t){var i="_query",n=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates,o=e.Deferred().resolve().promise();if(t.loaded()){if(n)return o}else t.hasChildren&&(i="read",this._removeChildData(t));return this[i]({id:t.id}).done(ue(this._modelLoaded,this,t.id)).fail(ue(this._modelError,this,t.id))},contains:function(e,t){for(var i=this,n=i._modelIdField(),o=i._modelParentIdField(),r=e[n],s=i._isPageable();t;){if(t[o]===r)return!0;t=s?i._parentNode(t):i.parentNode(t)}return!1},_byParentId:function(e,t){var i,n,o=[],r=this.view();if(e===t)return[];for(n=0;n<r.length;n++)i=r.at(n),i.parentId==e&&o.push(i);return o},_defaultParentId:function(){return this.reader.model.fn.defaults[this.reader.model.parentIdField]},_modelOptions:function(){var e=(this.options.schema||{}).model||{};return e},_modelIdField:function(){var e=this._modelOptions();return e.id||"id"},_modelParentIdField:function(){var e=this._modelOptions();return e.parentId||Ze},childNodes:function(e){return this._byParentId(e.id,this._defaultParentId())},rootNodes:function(){return this._byParentId(this._defaultParentId())},_rootNode:function(e){return this._parentNodes(e)[0]},_pageableRootNodes:function(e){var t,i,n,o,r,s,a,l;for(e=e||{},t=this,i=t._defaultParentId(),n=t._modelParentIdField(),o=[],r=t._nodesWithoutParentInView(e),l=0;l<r.length;l++)s=r[l],s[n]===i?o.push(s):(a=t._rootNode(s),a&&o.indexOf(a)===-1&&o.push(a));return o},parentNode:function(e){return this.get(e.parentId)},_parentNode:function(e){var t=this,i=t._modelParentIdField(),n=t._initIdsMap(t._getData()),o=e[i],r=n[o]||t._getById(o);return r},_parentNodes:function(e){for(var t=this,i=t._parentNode(e),n=[];i;)n.unshift(i),i=t._parentNode(i);return n},_parentNodesNotInView:function(){var e,t,i,n,o,r,s=this,a=s.view(),l=[],c=s._defaultParentId(),d=s._modelIdField(),u=s._modelParentIdField(),h=[];for(r=0;r<a.length;r++)i=a[r],n=i[d],o=i[u],e=s._parentInView(o),e||o===c||(h=s._parentNodes(i),t=h&&h.length?h[h.length-1]:s._getById(o),t&&l.indexOf(t)===-1&&l.push(t));return l},_nodesWithoutParentInView:function(e){var t,i,n,o,r,s,a,l,c,d;for(e=e||{},t=this,i=t.view(),n=e.childrenMap||t.childrenMap(t._getData()),o=t._modelIdField(),r=t._modelParentIdField(),l=[],c=[],d=0;d<i.length;d++)s=i[d],l=n[s[o]],a=t._parentInView(s[r]),a||c.push(s);return c},_parentInView:function(e){var t,i=this.view();for(t=0;t<i.length;t++)if(i[t].id===e)return i[t]},level:function(e){var t=-1;e instanceof N||(e=this.get(e));do e=this.parentNode(e),t++;while(e);return t},_pageableModelLevel:function(e){var t,i=this;return e&&i._isPageable()?(t=i._parentNodes(e),t.length):0},filter:function(e){var i=ie.fn.filter;return e===t?i.call(this,e):(i.call(this,e),t)},_pageableQueryOptions:function(e){var t=this._getDataMaps();return e.childrenMap=t.children,e.idsMap=t.ids,e},_flatData:function(e,t){return t=!!this._isPageable()||t,ie.fn._flatData.call(this,e,t)},data:function(e){var t=this,i=ie.fn.data.call(t,e);return t._isPageable()&&(t._initDataMaps(t._getData()),t._calculateCollapsedTotal()),i},cancelChanges:function(e){var t=this;ie.fn.cancelChanges.call(t,e),t._restorePageSizeAfterAddChild()},_modelCanceled:function(e){var t=this;t._isPageable()&&t._removeFromDataMaps(e)},_changesCanceled:function(){var e=this;e._isPageable()&&e._initDataMaps(e._getData())},_setAddChildPageSize:function(){var e=this,t={};e._isPageable()&&(e._addChildPageSize=e.pageSize()+1,t=e._defaultPageableQueryOptions(),t.take=e._addChildPageSize,t.pageSize=e._addChildPageSize,e._query(t))},_restorePageSizeAfterAddChild:function(){var e=this,i={};e._isPageable()&&(L(e._addChildPageSize)||(i=e._defaultPageableQueryOptions(),i.take=e._addChildPageSize-1,i.pageSize=e._addChildPageSize-1,e._query(i))),e._addChildPageSize=t},sync:function(){var e=this;return ie.fn.sync.call(e).then(function(){e._restorePageSizeAfterAddChild()})},_syncEnd:function(){var e=this;e._isPageable()&&e._initDataMaps(e._getData())}}),O.create=function(t){return e.isArray(t)?t={data:t}:t instanceof ne&&(t={data:t.toJSON()}),t instanceof O?t:new O(t)},V=ee.Pager.extend({options:{name:"TreeListPager"},totalPages:function(){var e=this,t=e.dataSource;return t&&t._filter?ee.Pager.fn.totalPages.call(e):Math.ceil((e._collapsedTotal()||0)/(e.pageSize()||1))},_createDataSource:function(e){this.dataSource=kendo.data.TreeListDataSource.create(e.dataSource)},_collapsedTotal:function(){var e=this.dataSource;return e?e.collapsedTotal()||0:0}}),W=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),t=this.options=de(!0,{},this.options,t),this.element=e,this.bind(this.events,t),this.model=this.options.model,this.fields=this._fields(this.options.columns),this._initContainer(),this.createEditable()},events:[],_initContainer:function(){this.wrapper=this.element},createEditable:function(){var e=this.options;this.editable=new ee.Editable(this.wrapper,{fields:this.fields,target:e.target,clearContainer:e.clearContainer,model:this.model,change:e.change})},_isEditable:function(e){return z(e,this.model)},_fields:function(e){var t,i,n,o=[];for(t=0,i=e.length;t<i;t++)n=e[t],this._isEditable(n)&&o.push({field:n.field,format:n.format,editor:n.editor});return o},end:function(){return this.editable.end()},close:function(){this.destroy()},destroy:function(){this.editable.destroy(),this.editable.element.find("["+kendo.attr("container-for")+"]").empty().end().removeAttr(kendo.attr("role")),this.model=this.wrapper=this.element=this.columns=this.editable=null}}),U=W.extend({init:function(e,t){W.fn.init.call(this,e,t),this._attachHandlers(),kendo.cycleForm(this.wrapper),this.open()},events:[Ne,Ie],options:{window:{modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1}},_initContainer:function(){var t=this.options,i=[];this.wrapper=e('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"),this.model.uid).append('<div class="k-edit-form-container"/>'),t.template?(this._appendTemplate(i),this.fields=[]):this._appendFields(i),this._appendButtons(i),new $.Tree(this.wrapper.children()[0]).render(i),this.wrapper.appendTo(t.appendTo),this.window=new ee.Window(this.wrapper,t.window)},_appendTemplate:function(e){var t=this.options.template;typeof t===ve&&(t=window.unescape(t)),t=kendo.template(t)(this.model),e.push(Q(t))},_appendFields:function(e){var t,i,n,o=this.options.columns;for(t=0,i=o.length;t<i;t++)n=o[t],n.command||(e.push(Q('<div class="k-edit-label"><label for="'+n.field+'">'+(n.title||n.field||"")+"</label></div>")),e.push(this._isEditable(n)?Q("<div "+kendo.attr("container-for")+'="'+n.field+'" class="k-edit-field"></div>'):K("div",{"class":"k-edit-field"},[this.options.fieldRenderer(n,this.model)])))},_appendButtons:function(e){e.push(K("div",{"class":"k-edit-buttons k-state-default"},this.options.commandRenderer()))},_attachHandlers:function(){var e=this._cancelProxy=ue(this._cancel,this);this.wrapper.on(Ce+xe,".k-grid-cancel",this._cancelProxy),this._saveProxy=ue(this._save,this),this.wrapper.on(Ce+xe,".k-grid-update",this._saveProxy),this.window.bind("close",function(t){t.userTriggered&&e(t)})},_detachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.wrapper.off(xe)},_cancel:function(e){this.trigger(Ne,e)},_save:function(){this.trigger(Ie)},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",ue(this.destroy,this)).close()},destroy:function(){this.window.destroy(),this.window=null,this._detachHandlers(),W.fn.destroy.call(this)}}),q=W.extend({destroy:function(){var e=this;e.editable.destroy(),e.editable.element.off().empty().removeAttr(kendo.attr("role")),e.model=e.wrapper=e.element=e.columns=e.editable=null}}),j=te.extend({init:function(t,i){if(te.fn.init.call(this,t,i),ct=kendo.support.isRtl(t),this._dataSource(this.options.dataSource),this._aria(),this._columns(),this._layout(),this._navigatable(),this._selectable(),this._sortable(),this._resizable(),this._filterable(),this._attachEvents(),this._toolbar(),this._scrollable(),this._reorderable(),this._columnMenu(),this._minScreenSupport(),this._draggable(),this._pageable(),this.options.autoBind&&this.dataSource.fetch(),this._hasLockedColumns){var n=this;this.wrapper.addClass("k-grid-lockedcolumns"),this._resizeHandler=function(){n.resize()},e(window).on("resize"+xe,this._resizeHandler)}kendo.notify(this)},_draggable:function(){var t=this,i=this.options.editable,n=t.dataSource,o=n._modelIdField(),r=n._modelParentIdField(),s=t._isPageable();i&&i.move&&(this._dragging=new kendo.ui.HierarchicalDragAndDrop(this.wrapper,{$angular:this.$angular,autoScroll:!0,filter:"tbody>tr",itemSelector:"tr",allowedContainers:this.wrapper,hintText:function(t){var i=function(){return e(this).text()},n="<span class='k-header k-drag-separator' />";return t.children("td").map(i).toArray().join(n)},contains:ue(function(e,t){var i=this.dataItem(t),n=this.dataItem(e);return n==i||this.dataSource.contains(n,i)},this),itemFromTarget:function(e){var t=e.closest("tr");return{item:t,content:t}},dragstart:ue(function(e){this.wrapper.addClass("k-treelist-dragging");var t=this.dataItem(e);return this.trigger(Je,{source:t})},this),drag:ue(function(e){e.source=this.dataItem(e.source),this.trigger(et,e)},this),drop:ue(function(e){return e.source=this.dataItem(e.source),e.destination=this.dataItem(e.destination),this.wrapper.removeClass("k-treelist-dragging"),this.trigger(tt,e)},this),dragend:ue(function(e){var t,i=this.dataItem(e.destination),a=this.dataItem(e.source),l=a[r],c=n._indexInChildrenMap(a);s&&(n._removeFromChildrenMap(a),a[r]=i?i[o]:null,n._initChildrenMapForParent(i),a[r]=l),t=a.set("parentId",i?i.id:null),s&&t&&(n._removeFromChildrenMap(a),a[r]=l,n._removeFromChildrenMap(a),n._insertInChildrenMap(a,c)),e.source=a,e.destination=i,this.trigger(it,e)},this),reorderable:!1,dropHintContainer:function(e){return e.children("td:eq(1)")},dropPositionFrom:function(e){return e.prevAll(".k-i-none").length>0?"after":"before"}}))},itemFor:function(e){return"number"==typeof e&&(e=this.dataSource.get(e)),this.tbody.find("["+kendo.attr("uid")+"="+e.uid+"]")},_scrollable:function(){var t,i,n;this.options.scrollable&&(t=this.thead.closest(".k-grid-header-wrap"),i=e(this.lockedContent).bind("DOMMouseScroll"+xe+" mousewheel"+xe,ue(this._wheelScroll,this)),this.content.bind("scroll"+xe,function(){t.scrollLeft(this.scrollLeft),i.scrollTop(this.scrollTop)}),n=kendo.touchScroller(this.content),n&&n.movable&&(this._touchScroller=n,n.movable.bind("change",function(e){t.scrollLeft(-e.sender.x),i&&i.scrollTop(-e.sender.y)})))},_wheelScroll:function(t){var i,n;t.ctrlKey||(i=kendo.wheelDeltaY(t),n=e(t.currentTarget),i&&(n[0].scrollHeight>n[0].clientHeight&&(n[0].scrollTop<n[0].scrollHeight-n[0].clientHeight&&i<0||n[0].scrollTop>0&&i>0)&&t.preventDefault(),n.one("wheel"+xe,!1),this.content.scrollTop(this.content.scrollTop()+-i)))},_progress:function(){var e=this.options.messages;this.tbody.find("tr").length||this._showStatus(kendo.template("<span class='#= className #' /> #: messages.loading #")({className:mt.icon+" "+mt.loading,messages:e}))},_error:function(e){this.dataSource.rootNodes().length||this._render({error:e})},refresh:function(t){var i,n,o;t=t||{},"itemchange"==t.action&&this.editor||this.trigger(Le)||(i=e(this.current()),n=!1,this._cancelEditor(),this._render(),this._adjustHeight(),this.options.navigatable&&((this._isActiveInTable()||this.editor)&&(n=i.is("th"),o=Math.max(this.cellIndex(i),0)),this._restoreCurrent(o,n)),this.trigger(He))},_angularFooters:function(e){var t,i,n,o=this.dataSource.aggregates(),r=this._footerItems();for(t=0;t<r.length;t++)i=r.eq(t),n=o[i.attr("data-parentId")],this._angularFooter(e,i.find("td").get(),n)},_angularFooter:function(e,t,i){var n=this.columns;this.angular(e,function(){return{elements:t,data:he(n,function(e){return{column:e,aggregate:i&&i[e.field]}})}})},items:function(){return this._hasLockedColumns?this._items(this.tbody).add(this._items(this.lockedTable)):this._items(this.tbody)},_items:function(t){return t.find("tr").filter(function(){return!e(this).hasClass(mt.footerTemplate)})},_footerItems:function(){var t=this.tbody;return this._hasLockedColumns&&(t=t.add(this.lockedTable)),t.find("tr").filter(function(){return e(this).hasClass(mt.footerTemplate)})},dataItems:function(){var e,t,i,n=kendo.ui.DataBoundWidget.fn.dataItems.call(this);if(this._hasLockedColumns){for(e=n.length,t=Array(2*e),i=e;--i>=0;)t[i]=t[i+e]=n[i];n=t}return n},_showStatus:function(t){var i=this.element.find(".k-status"),n=e(this.content).add(this.lockedContent);i.length||(i=e("<div class='k-status' />").appendTo(this.element)),this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]),n.hide(),i.html(t)},_hideStatus:function(){this.element.find(".k-status").remove(),e(this.content).add(this.lockedContent).show()},_adjustHeight:function(){var e,t,i=this,n=this.element,o=n.find(ke+mt.gridContentWrap),r=n.find(ke+mt.gridHeader),s=n.find(ke+mt.gridToolbar),a=i._isPageable()&&i.pager&&i.pager.element.is(":visible")?J(i.pager.element):0,l=kendo.support.scrollbar();n.css(dt,this.options.height),t=function(e){var t,i;return!!e[0].style.height||(t=e.height(),e.height("auto"),i=e.height(),e.height(""),t!=i)},t(n)&&(e=n.height()-J(r)-J(s)-a,o.height(e),this._hasLockedColumns&&(l=this.table[0].offsetWidth>this.table.parent()[0].clientWidth?l:0,this.lockedContent.height(e-l)))},_resize:function(){this._applyLockedContainersWidth(),this._adjustHeight()},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=ue(this.hideMinScreenCols,this),e(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){var e,i,n,o=this.columns,r=!1,s=window.innerWidth>0?window.innerWidth:screen.width;for(e=0;e<o.length;e++)i=o[e],n=i.minScreenWidth,n!==t&&null!==n&&(r=!0,n>s?this.hideColumn(i):this.showColumn(i));return r},destroy:function(){te.fn.destroy.call(this);var t=this.dataSource;t.unbind(_e,this._refreshHandler),t.unbind(we,this._errorHandler),t.unbind(ye,this._progressHandler),this._navigatableTables=null,this._current=null,this._resizeHandler&&e(window).off("resize"+xe,this._resizeHandler),this._dragging&&(this._dragging.destroy(),this._dragging=null),this.resizable&&(this.resizable.destroy(),this.resizable=null),this.reorderable&&(this.reorderable.destroy(),this.reorderable=null),this._draggableInstance&&this._draggableInstance.element&&(this._draggableInstance.destroy(),this._draggableInstance=null),this.minScreenResizeHandler&&e(window).off("resize",this.minScreenResizeHandler),this._destroyEditor(),this.element.off(xe),this.wrapper.off(xe),this._touchScroller&&this._touchScroller.destroy(),this._destroyPager(),t&&(t._dataMaps=null),this._autoExpandable=null,this._refreshHandler=this._errorHandler=this._progressHandler=this._dataSourceFetchProxy=null,this.thead=this.content=this.tbody=this.table=this.element=this.lockedHeader=this.lockedContent=null,this._statusTree=this._headerTree=this._contentTree=this._lockedHeaderColsTree=this._lockedContentColsTree=this._lockedHeaderTree=this._lockedContentTree=null},options:{name:"TreeList",columns:[],autoBind:!0,scrollable:!0,selectable:!1,sortable:!1,toolbar:null,height:null,columnMenu:!1,messages:{noRows:"No records to display",loading:"Loading...",requestFailed:"Request failed.",retry:"Retry",commands:{edit:"Edit",update:"Update",canceledit:"Cancel",create:"Add new record",createchild:"Add child record",destroy:"Delete",excel:"Export to Excel",pdf:"Export to PDF"}},excel:{hierarchy:!0},resizable:!1,filterable:!1,editable:!1,reorderable:!1},events:[_e,Te,De,Ae,Ie,Me,ze,Re,Fe,Le,He,Ne,Je,et,tt,it,Ve,be,Pe,We,Ue,qe,Ge,$e,Ke,Ye,Qe,Xe],_toggle:function(i,n){function o(){r._toggleData(),r._render(),r._syncLockedContentHeight()}var r=this,s=e.Deferred().resolve().promise(),a=i.loaded();return r._isIncellEditable()&&r.editor&&(e(le()).change(),r.closeCell()),i._error&&(i.expanded=!1,i._error=t),!a&&i.expanded?s:(t===n&&(n=!i.expanded),i.expanded=n,a||(s=this.dataSource.load(i).always(ue(function(){o()},this))),o(),s)},_toggleData:function(){var e=this;e._isPageable()&&e._togglePageableData()},_togglePageableData:function(){var e,t,i=this,n=i.dataSource,o=n._getData(),r=n._defaultPageableQueryOptions();i._renderProgress(!0),t=n._getChildrenMap()||n.childrenMap(n._getData()),n._processDataItemsState(o,t),e=n._processPageableQuery(o,r),r.childrenMap=e.childrenMap,r.filteredChildrenMap=e.filteredChildrenMap,n._aggregateResult=n._calculateAggregates(e.dataToAggregate,r),n.view(e.data),n._calculateCollapsedTotal(),i._refreshPager(),i._renderProgress(!1)},_refreshPager:function(){var e=this.pager;e&&e.refresh()},expand:function(e){return this._toggle(this.dataItem(e),!0)},collapse:function(e){return this._toggle(this.dataItem(e),!1)},_toggleChildren:function(t){var i,n=e(t.currentTarget),o=this.dataItem(n);o&&(i=o.expanded?Fe:Re,this.trigger(i,{model:o})||this._toggle(o),t.preventDefault())},_navigatable:function(){var t,i,n=this;n.options.navigatable&&(t=n.table.add(n.lockedTable),i=n.thead.parent().add(e(">table",n.lockedHeader)),n.options.scrollable&&(t=t.add(i),i.attr(Oe,-1)),this._navigatableTables=t,t.on(kendo.support.touch?"touchstart"+xe:"mousedown"+xe,nt+">:visible",ue(n._tableClick,n)).on("focus"+xe,ue(n._tableFocus,n)).on("focusout"+xe,ue(n._tableBlur,n)).on("keydown"+xe,ue(n._tableKeyDown,n)))},cellIndex:function(t){var i=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(i=f(E(this.columns)).length),e(t).parent().children().index(t)+i},_isActiveInTable:function(){var t=kendo._activeElement();return!!t&&(this.table[0]===t||e.contains(this.table[0],t)||this.lockedTable&&(this.lockedTable[0]===t||e.contains(this.lockedTable[0],t)))},_restoreCurrent:function(i,n){var o,r,s;i===t||i<0||(this._current&&this._current.removeClass("k-state-focused"),
n?this.current(this.thead.find("th").eq(i)):(o=0,i=0,r=e(),this.lockedTable&&(r=this.lockedTable.find(">tbody>tr:visible").eq(o)),r=r.add(this.tbody.children().eq(o)),s=r.find(">td:visible").eq(i),this.current(s)),this._current&&F(this._current.closest("table")[0],!0))},current:function(t){var i=this._current;return t=e(t),!t.length||i&&i[0]===t[0]||(this._updateCurrentAttr(i,t),this._scrollCurrent()),t&&t.length&&(this._lastCellIndex=t.parent().children(Be).index(t)),this._current},_setCurrent:function(t){var i=this;return t=e(t),t[0]&&(i._current=t,i._updateCurrentAttr(i._current,t),i._scrollCurrent()),i._current},_scrollCurrent:function(){var t,i,n,o,r,s=this._current,a=this.options.scrollable;s&&a&&(t=s.parent(),i=t.closest("table").parent(),n=i.is(".k-grid-content-locked,.k-grid-header-locked"),o=i.is(".k-grid-content-locked,.k-grid-content"),r=e(this.content)[0],o&&this._scrollTo(this._relatedRow(t)[0],r),this.lockedContent&&(this.lockedContent[0].scrollTop=r.scrollTop),n||this._scrollTo(s[0],r))},_scrollTo:function(t,i){var n,o=t.tagName.toLowerCase(),r="td"===o||"th"===o,s=t[r?"offsetLeft":"offsetTop"],a=t[r?"offsetWidth":"offsetHeight"],l=i[r?"scrollLeft":"scrollTop"],c=i[r?"clientWidth":"clientHeight"],d=s+a,u=0,h=0,p=0;ct&&r&&(n=e(t).closest("table")[0],se.msie?h=n.offsetLeft:se.mozilla&&(p=n.offsetLeft-kendo.support.scrollbar())),l=Math.abs(l+h-p),u=l>s?s:d>l+c?a<=c?d-c:s:l,u=Math.abs(u+h)+p,i[r?"scrollLeft":"scrollTop"]=u},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._elementId=e+"_active_element")},_currentDataIndex:function(e,i){var n,o=i.attr("data-index");return o?(n=E(this.columns).length,n&&!e.closest("div").hasClass("k-grid-content-locked")[0]?o-n:o):t},_prevVerticalCell:function(t,i){var n,r=i.parent(),a=t.children(nt),l=a.index(r),c=this._currentDataIndex(t,i);if(c||i.hasClass("k-header"))return n=y(i),n.eq(n.length-2);if(c=Math.max(r.children(Be).index(i),this._lastCellIndex||0),r.hasClass("k-filter-row"))return s(t).filter(o).eq(c);if(l==-1){if(r=t.find("tr.k-filter-row:visible"),!r[0])return s(t).filter(o).eq(c)}else r=0===l?e():a.eq(l-1);return n=r.children(Be),n.eq(n.length>c?c:0)},_nextVerticalCell:function(e,i){var n,o,r,s,a,l,c=i.parent(),d=e.children(nt),u=d.index(c),h=this._currentDataIndex(e,i);if(u!=-1&&h===t&&i.hasClass("k-header"))return k(i).eq(1);if(h=h?parseInt(h,10):c.children(Be).index(i),h=Math.max(h,this._lastCellIndex||0),c=d.eq(u==-1?0:u+i[0].rowSpan),o=h,this._currentDataIndex(e,i)!==t)for(r=c.children(":not(.k-group-cell):not(.k-hierarchy-cell)"),s=r.filter(":hidden"),a=0,l=s.length;a<l;a++)r.index(s[a])<h&&o--;return h=o,n=c.children(Be),n.eq(n.length>h?h:0)},_verticalContainer:function(e,t){var i=e.parent(),n=this._navigatableTables.length,o=Math.floor(n/2),r=fe(i[0],this._navigatableTables);return t&&(o*=-1),r+=o,(r>=0||r<n)&&(i=this._navigatableTables.eq(r)),i.find(t?"thead":"tbody")},_updateCurrentAttr:function(t,i){var n=e(t).data("headerId");e(t).removeClass(mt.focused).closest("table").removeAttr("aria-activedescendant"),n?(n=n.replace(this._elementId,""),e(t).attr("id",n)):e(t).removeAttr("id"),i.data("headerId",i.attr("id")).attr("id",this._elementId).addClass(mt.focused).closest("table").attr("aria-activedescendant",this._elementId),this._current=i},_tableKeyDown:function(t){var i=!1,n=this.current(),o=e(t.target),r=!t.isDefaultPrevented()&&!o.is(":button,a,:input,a>.k-icon");n=n?n:e(this.lockedTable).add(this.table).find(at),r&&t.keyCode==Z.UP&&(i=this._moveUp(n,t.shiftKey)),r&&t.keyCode==Z.DOWN&&(i=this._moveDown(n,t.shiftKey)),r&&t.keyCode==(ct?Z.LEFT:Z.RIGHT)&&(i=t.altKey?this._handleExpand(n):this._moveRight(n)),r&&t.keyCode==(ct?Z.RIGHT:Z.LEFT)&&(i=t.altKey?this._handleCollapse(n):this._moveLeft(n)),r&&t.keyCode==Z.PAGEDOWN&&(i=this._handlePageDown()),r&&t.keyCode==Z.PAGEUP&&(i=this._handlePageUp()),t.keyCode!=Z.ENTER&&t.keyCode!=Z.F2||(i=this._handleEnterKey(n,t.currentTarget,o)),t.keyCode==Z.ESC&&(i=this._handleEscKey(n,t.currentTarget)),r&&t.keyCode==Z.HOME&&(i=this._handleHome(n,t.ctrlKey)),r&&t.keyCode==Z.END&&(i=this._handleEnd(n,t.ctrlKey)),t.keyCode==Z.TAB&&(i=this._handleTabKey(n,t.currentTarget,t.shiftKey)),i&&(t.preventDefault(),t.stopPropagation())},_handleExpand:function(e){var t=this,i=e.parent(),n=t.dataItem(i);return!e.hasClass("k-header")&&(!(!n||!n.hasChildren||n.expanded||t.trigger(Re,{model:n}))&&(this.expand(i),!0))},_handleCollapse:function(e){var t=this,i=e.parent(),n=t.dataItem(i);return!e.hasClass("k-header")&&(!(!(n&&n.hasChildren&&n.expanded)||t.trigger(Fe,{model:n}))&&(t.collapse(i),!0))},_handleHome:function(e,t){var i,n=e.parent(),o=n.parent(),r=this.lockedTable&&this.lockedTable.children("tbody")[0]===o[0],s=o[0]===this.tbody[0];if(t?i=this.lockedTable?this.lockedTable.find(at):this.table.find(at):(s||r)&&(s&&this.lockedTable&&(n=this._relatedRow(n)),i=n.children(ot+":first")),i&&i.length)return this.current(i),!0},_handleEnd:function(e,t){var i,n=e.parent(),o=n.parent(),r=this.lockedTable&&this.lockedTable.children("tbody")[0]===o[0],s=o[0]===this.tbody[0];if(t?i=this.table.find(lt+">"+ot+":last"):(s||r)&&(!s&&this.lockedTable&&(n=this._relatedRow(n)),i=n.children(ot+":last")),i&&i.length)return this.current(i),!0},_handlePageDown:function(){var e=this;return!!e._isPageable()&&(e.dataSource._restorePageSizeAfterAddChild(),e.dataSource.page(e.dataSource.page()+1),!0)},_handlePageUp:function(){var e=this;return!!e._isPageable()&&(e.dataSource._restorePageSizeAfterAddChild(),e.dataSource.page(e.dataSource.page()-1),!0)},_handleEscKey:function(t,i){var n,o,r,s=kendo._activeElement(),a=this;return t&&t.parent().hasClass("k-grid-edit-row")?(a._isIncellEditable()?(o=t.parent(),r=t.index(),a.closeCell(!0),a._setCurrent(o.children().eq(r))):(n=e(t).parent().index(),s&&s.blur(),this.cancelRow(),n>=0&&this.current(this.items().eq(n).children(ot).first())),se.msie&&se.version<9&&document.body.focus(),F(i,!0),!0):!!t.has(s).length&&(F(i,!0),!0)},_handleEnterKey:function(t,i,n){var o,r=this.options.editable,s=n.closest("[role=gridcell]");return n.is("table")||e.contains(t[0],n[0])||(t=s),t.is("th")?(t.find(".k-link").click(),!0):(o=t.find(":kendoFocusable:first"),o[0]&&t.hasClass("k-state-focused")?(o.focus(),!0):!(!r||n.is(":button,.k-button,textarea"))&&(s[0]||(s=t),this._handleEditing(s,!1,i),!0))},_handleTabKey:function(t,i,n){var o,r=this,s=r.options.editable&&r._isIncellEditable();return!(!s||t.is("th"))&&(o=e(le()).closest(ke+mt.editCell),o[0]&&o[0]!==t[0]&&(t=o),o=r._tabNext(t,i,n),o.length?(r._handleEditing(t,o,o.closest(ft)),!0):(r._preventPageSizeRestore=!1,!1))},_tabNext:function(e,t,i){var n=this,o=!0,r=i?e.prevAll(Be+":first"):e.nextAll(":visible:first");return r.length||(r=e.parent(),n.lockedTable&&(o=i&&t==n.lockedTable[0]||!i&&t==n.table[0],r=n._relatedRow(r)),o&&(r=r[i?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")),r=r.children(Be+(i?":last":":first")),n.dataSource._restorePageSizeAfterAddChild()),r},_handleEditing:function(i,n,o){var r,s,a,l,c=this,d=e(kendo._activeElement()),u=se.msie,h=c.options.editable&&c.options.editable.update!==!1,p=c._isIncellEditable();if(o=e(o),a=p?i.hasClass(mt.editCell):i.parent().hasClass("k-grid-edit-row"),c.editor){if(r=c.editor.wrapper,r&&e.contains(r[0],d[0])&&(se.opera?d.blur().change().triggerHandler("blur"):(d.blur(),u&&d.blur())),!c.editor)return F(o),t;if(!c.editor.end())return c.current(p?r:r.children().filter(ot).first()),s=r.find(":kendoFocusable:first")[0],s&&s.focus(),t;p?(c._preventPageSizeRestore=!0,c.closeCell(),c._preventPageSizeRestore=!1):(c.saveRow(),a=!0)}n&&c.current(n),F(o,!0),h&&(!a&&!n||n?(l=c.current().index(),p?c.editCell(c.current()):(c.editRow(c.current().parent()),c.current(c.editor.wrapper.children().eq(l)),c.current().removeClass("k-state-focused"))):c.dataSource._restorePageSizeAfterAddChild())},_moveRight:function(e){var t=e.nextAll(ot).first(),i=e.parent();return e.hasClass("k-header")&&(t=e.nextAll(rt).first(),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.lockedHeader.find("table")[0]&&(t=this.thead.find(rt+":first"))),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.lockedTable[0]&&(t=this._relatedRow(i).children(ot).first()),t[0]&&t[0]!==e[0]&&F(t.closest("table"),!0),this.current(t),!0},_moveLeft:function(e){var t=e.prevAll(ot).first(),i=e.parent();return e.hasClass("k-header")&&(t=e.prevAll(rt).first(),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.thead.parent()[0]&&(t=this.lockedHeader.find(">table>thead>tr>"+rt+":last"))),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.table[0]&&(t=this._relatedRow(i).children(ot).last()),t[0]&&t[0]!==e[0]&&F(t.closest("table"),!0),this.current(t),!0},_moveUp:function(e,t){var i,n,o=e.parent().parent();return t?(i=e.parent(),i=i.prevAll(st+":first"),i=e.parent().is(st)?i.children().eq(e.index()):i.children(Be+":last")):(i=this._prevVerticalCell(o,e),i[0]||(this._lastCellIndex=0,o=this._verticalContainer(o,!0),i=this._prevVerticalCell(o,e),i[0]&&F(o.parent(),!0))),n=this._lastCellIndex||0,this.current(i),this._lastCellIndex=n,!0},_moveDown:function(e,t){var i,n,o=e.parent().parent();return t?(i=e.parent(),i=i.nextAll(st+":first"),i=e.parent().is(st)?i.children().eq(e.index()):i.children(Be+":first")):(i=this._nextVerticalCell(o,e),i[0]||(this._lastCellIndex=0,o=this._verticalContainer(o),i=this._nextVerticalCell(o,e),i[0]&&F(o.parent(),!0))),n=this._lastCellIndex||0,this.current(i),this._lastCellIndex=n,!0},_tableClick:function(t){var i=e(t.currentTarget),n=i.is("th"),o=this.table.add(this.lockedTable),r=this.thead.parent().add(e(">table",this.lockedHeader)),s=d(t.target),a=i.closest("table")[0];kendo.support.touch||a!==o[0]&&a!==o[1]&&a!==r[0]&&a!==r[1]||(this.options.navigatable&&this.current(i),!n&&s||setTimeout(function(){d(kendo._activeElement())&&e.contains(a,kendo._activeElement())||F(a,!0)}),n&&t.preventDefault())},_setTabIndex:function(e){this._navigatableTables.attr(Oe,-1),e.attr(Oe,0)},_tableFocus:function(t){var i=this.current(),n=e(t.currentTarget);i&&i.is(":visible")?i.addClass(mt.focused):this.current(n.find(at)),this._setTabIndex(n)},_tableBlur:function(){var e=this.current();e&&e.removeClass(mt.focused)},_attachEvents:function(){var e=ke+mt.iconCollapse+", ."+mt.iconExpand+", ."+mt.refresh,t=ke+mt.retry;this.element.on(Se+xe,e,ue(this._toggleChildren,this)).on(Ce+xe,t,this._dataSourceFetchProxy).on(Ce+xe,".k-button[data-command]",ue(this._commandClick,this)),this._attachCellEditingEventHandlers()},_attachCellEditingEventHandlers:function(){var i=this,n=i.options.editable,o=i.selectable&&i.selectable.options.multiple,r=function(t){var n=le(),o=i.editor||{},r=o.element;!r||e.contains(r[0],n)||r[0]===n||e(n).closest(".k-animation-container").length||o.end()&&(t.relatedTarget||!i._isPageable()||L(i.dataSource._addChildPageSize)||(i._preventPageSizeRestore=!1),i.closeCell()),i._preventPageSizeRestore=!1};i._isIncellEditable()&&n.update!==!1&&i.wrapper.on(Ce+xe,"tr:not(.k-grouping-row) > td",function(n){var r=e(this),s=i.lockedTable&&r.closest("table")[0]===i.lockedTable[0];return r.hasClass(mt.editCell)||r.has("a.k-grid-delete").length||r.has("button.k-grid-delete").length||r.closest("tbody")[0]!==i.tbody[0]&&!s||e(n.target).is(":input")||e(n.target).hasClass(mt.iconExpand)||e(n.target).hasClass(mt.iconCollapse)?(i.editor||i.dataSource._restorePageSizeAfterAddChild(),i._preventPageSizeRestore=!1,t):(i.editor?i.editor.end()&&(o&&e(le()).blur(),i.closeCell(),i.editCell(r)):i.editCell(r),t)}).on("mousedown"+xe,"tr:not(.k-grouping-row) > td",function(t){i._preventPageSizeRestore=!(!i.editor||!i._isPageable()||L(i.dataSource._addChildPageSize))&&e(t.target).parents(ke+mt.editRow).length>0}).on("focusin"+xe,function(){e.contains(this,le())||(clearTimeout(i._closeCellTimeout),i._closeCellTimeout=null)}).on("focusout"+xe,function(e){i._closeCellTimeout=setTimeout(function(){r(e)},1)})},_commandByName:function(t){var i,n,o,r,s=this.columns,a=e.isArray(this.options.toolbar)?this.options.toolbar:[];if(t=t.toLowerCase(),gt[t])return gt[t];for(i=0;i<s.length;i++)if(o=s[i].command)for(n=0;n<o.length;n++)if(r=o[n].name,r&&r.toLowerCase()==t)return o[n];for(i=0;i<a.length;i++)if(r=a[i].name,r&&r.toLowerCase()==t)return a[i]},_commandClick:function(i){var n=e(i.currentTarget),o=n.attr("data-command"),r=this._commandByName(o),s=n.parentsUntil(this.wrapper,"tr");s=s.length?s:t,r&&(r.methodName?this[r.methodName](s):r.click&&r.click.call(this,i),i.preventDefault())},_ensureExpandableColumn:function(){var e,t;this._autoExpandable&&delete this._autoExpandable.expandable,e=pe(this.columns,n(i("hidden"))),t=pe(e,i("expandable")),this.columns.length&&!t.length&&(this._autoExpandable=e[0],e[0].expandable=!0)},_columns:function(){var e,t=this.options.columns||[];this.columns=he(t,function(e){return e="string"==typeof e?{field:e}:e,de({encoded:!0},e)}),e=E(t),e.length>0&&(this._hasLockedColumns=!0,this.columns=e.concat(I(this.columns))),this.columns=_(this.columns),this._ensureExpandableColumn(),this._columnTemplates(),this._columnAttributes()},_columnTemplates:function(){var e,t,i,n=f(this.columns);for(e=0,t=n.length;e<t;e++)i=n[e],i.template&&(i.template=kendo.template(i.template)),i.headerTemplate&&(i.headerTemplate=kendo.template(i.headerTemplate)),i.footerTemplate&&(i.footerTemplate=kendo.template(i.footerTemplate))},_columnAttributes:function(){function t(t){var i,n,o,r;if(t&&t.style)for(i=t.style.split(";"),t.style={},n=0;n<i.length;n++)o=i[n].split(":"),r=e.trim(o[0]),r&&(t.style[e.camelCase(r)]=e.trim(o[1]))}var i,n,o=this.columns;for(i=0,n=o.length;i<n;i++)t(o[i].attributes),t(o[i].headerAttributes)},_layout:function(){var e,t,i,n=this.columns,o=this.element,r="";this.wrapper=o.addClass(mt.wrapper),r="<div class='#= gridHeader #'>",this._hasLockedColumns&&(r+="<div class='k-grid-header-locked'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div>"),r+="<div class='#= gridHeaderWrap #'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div></div>",this._hasLockedColumns&&(r+="<div class='k-grid-content-locked'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>"),r+="<div class='#= gridContentWrap # k-auto-scrollable'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>",this.options.scrollable||(r="<table role='treegrid' tabindex='0'><colgroup></colgroup><thead class='#= gridHeader #' role='rowgroup' /><tbody /></table>"),this.options.toolbar&&(r="<div class='#= header # #= gridToolbar #' />"+r),o.append(kendo.template(r)(mt)+"<div class='k-status' />"),this.toolbar=o.find(ke+mt.gridToolbar),e=o.find(ke+mt.gridHeader).find("thead").addBack().filter("thead"),this.thead=e.last(),this.options.scrollable&&(t=kendo.support.isRtl(o),o.find("div."+mt.gridHeader).css(t?"padding-left":"padding-right",kendo.support.scrollbar())),i=o.find(ke+mt.gridContentWrap),i.length?this.content=i:i=o,this.table=i.find(">table"),this.tbody=this.table.find(">tbody"),this._hasLockedColumns&&(this.lockedHeader=e.first().closest(".k-grid-header-locked"),this.lockedContent=o.find(".k-grid-content-locked"),this.lockedTable=this.lockedContent.children()),this._initVirtualTrees(),this._renderCols(),this._renderHeader(),this.angular("compile",function(){return{elements:e.find("th.k-header").get(),data:he(n,function(e){return{column:e}})}})},_initVirtualTrees:function(){this._headerColsTree=new $.Tree(this.thead.prev()[0]),this._contentColsTree=new $.Tree(this.tbody.prev()[0]),this._headerTree=new $.Tree(this.thead[0]),this._contentTree=new $.Tree(this.tbody[0]),this._statusTree=new $.Tree(this.element.children(".k-status")[0]),this.lockedHeader&&(this._lockedHeaderColsTree=new $.Tree(this.lockedHeader.find("colgroup")[0]),this._lockedContentColsTree=new $.Tree(this.lockedTable.find(">colgroup")[0]),this._lockedHeaderTree=new $.Tree(this.lockedHeader.find("thead")[0]),this._lockedContentTree=new $.Tree(this.lockedTable.find(">tbody")[0]))},_toolbar:function(){var t,i=this.options.toolbar,n=this.toolbar;i&&(e.isArray(i)?(t=this._buildCommands(i),new $.Tree(n[0]).render(t)):n.append(kendo.template(i)({})),this.angular("compile",function(){return{elements:n.get()}}))},_lockedColumns:function(){return pe(this.columns,i("locked"))},_nonLockedColumns:function(){return pe(this.columns,n(i("locked")))},_templateColumns:function(){return pe(this.columns,i("template"))},_flushCache:function(){this.options.$angular&&this._templateColumns().length&&(this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]))},_render:function(t){var i,n,o,r,s,a,l,c,d,u,h,p,m=this;t=t||{},t=m._renderOptions(t),i=this.options.messages,n=m._isPageable(),o=m.dataSource,r={children:t.filteredChildrenMap||t.childrenMap,ids:t.idsMap},s=n?r&&r.children&&r.ids?r:o._initDataMaps(o._getData()):{},a=s.children,l=s.ids,t.childrenMap=a,t.idsMap=l,c=m._dataToRender(t),d=m._renderedModelLevel(c[0],t),u=kendo.attr("uid"),h=this.select().removeClass("k-state-selected").map(function(t,i){return e(i).attr(u)}),this._absoluteIndex=0,this._angularItems("cleanup"),this._angularFooters("cleanup"),this._flushCache(),m._clearRenderMap(),t.error?this._showStatus(kendo.template("#: messages.requestFailed # <button class='#= buttonClass #'>#: messages.retry #</button>")({buttonClass:[mt.button,mt.retry].join(" "),messages:i})):c.length?(n&&(p=m._viewChildrenMap(t)),this._hideStatus(),this._contentTree.render(this._trs({columns:f(I(this.columns)),editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,aggregates:t.aggregates,selected:h,data:c,childrenMap:a,viewChildrenMap:p,visible:!0,level:0})),this._hasLockedColumns&&(this._absoluteIndex=0,this._lockedContentTree.render(this._trs({columns:f(E(this.columns)),editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,aggregates:t.aggregates,selected:h,data:c,childrenMap:a,viewChildrenMap:p,visible:!0,level:d})))):this._showStatus(kendo.htmlEncode(i.noRows)),this._touchScroller&&this._touchScroller.contentResized(),this._muteAngularRebind(function(){this._angularItems("compile"),this._angularFooters("compile")}),this.items().filter(function(){return e.inArray(e(this).attr(u),h)>=0}).addClass("k-state-selected"),this._syncLockedContentHeight(),m._togglePagerVisibility()},_renderProgress:function(e){kendo.ui.progress(this.wrapper,e)},_renderOptions:function(e){var t,i,n;return e=e||{},t=this,i=t.dataSource._getDataMaps(),n=t.dataSource.filter(),t._isPageable()&&(e.childrenMap=i.children,e.idsMap=i.ids,n&&(e.filteredChildrenMap=i.filteredChildren)),e},_renderedModelLevel:function(e,t){return this._isPageable()?this.dataSource._pageableModelLevel(e,t):0},_viewChildrenMap:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m;for(e=e||{},t=this,i=t.dataSource,n=i.childrenMap(i.view()),o=i._modelIdField(),r=i._parentNodesNotInView(),t._clearRenderMap(),f=0;f<r.length;f++)for(s=r[f],a=s[o],t._markNodeAsNonRenderable(a),n[a]=n[a]||[],l=i._parentNodes(s),p=l.slice(),p.push(s),m=0;m<p.length-1;m++)c=p[m],d=c[o],t._markNodeAsNonRenderable(d),n[d]=n[d]||[],u=p[m+1],h=u[o],t._markNodeAsNonRenderable(h),n[h]=n[h]||[],n[d].indexOf(u)===-1&&n[d].unshift(u);return n},_clearRenderMap:function(){this._skipRenderingMap={}},_dataToRender:function(e){var t=this;return t._isPageable()?t.dataSource._pageableRootNodes(e):t.dataSource.rootNodes()},_markNodeAsNonRenderable:function(e){this._skipRenderingMap[e]=!0},_adjustRowsHeight:function(e,t){var i,n,o,r,s,a,l,c,d,u;if(this._hasLockedColumns){for(i=e[0].rows,n=i.length,r=t[0].rows,s=e.add(t),a=s.length,l=[],o=0;o<n&&r[o];o++)i[o].style.height&&(i[o].style.height=r[o].style.height="");for(o=0;o<n&&r[o];o++)c=i[o].offsetHeight,d=r[o].offsetHeight,u=0,c>d?u=c:c<d&&(u=d),l.push(u);for(o=0;o<a;o++)s[o].style.display="none";for(o=0;o<n;o++)l[o]&&(i[o].style.height=r[o].style.height=l[o]+1+"px");for(o=0;o<a;o++)s[o].style.display=""}},_ths:function(e,t){var i,n,o,r,s,a,l,c,d=[];for(l=0,c=e.length;l<c;l++)i=e[l],o=[],r=[mt.header],n=i.headerTemplate?i.headerTemplate({}):i.title||i.field||"",a=i.headerTemplate?Q(n):Y(n),o.push(i.sortable?K("a",{href:"#",className:mt.link},[a]):a),s={"data-field":i.field,"data-title":i.title,style:i.hidden===!0?{display:"none"}:{},className:r.join(" "),role:"columnheader"},i.columns||(s.rowSpan=t?t:1),i.headerAttributes&&(1===i.headerAttributes.colSpan&&delete i.headerAttributes.colSpan,i.headerAttributes["class"]&&(s.className+=" "+i.headerAttributes["class"],delete i.headerAttributes["class"])),i["data-index"]>-1&&(s["data-index"]=i["data-index"]),s=de(!0,{},s,i.headerAttributes),d.push(K("th",s,o));return d},_cols:function(e){var t,i,n,o=[];for(n=0;n<e.length;n++)e[n].hidden!==!0&&(t=e[n].width,i={},t&&0!==parseInt(t,10)&&(i.style={width:"string"==typeof t?t:t+"px"}),o.push(K("col",i)));return o},_clearColsCache:function(){this._headerColsTree.render([]),this.options.scrollable&&this._contentColsTree.render([]),this._hasLockedColumns&&(this._lockedHeaderColsTree.render([]),this._lockedContentColsTree.render([]))},_renderCols:function(){var e=I(this.columns);this._headerColsTree.render(this._cols(f(e))),this.options.scrollable&&this._contentColsTree.render(this._cols(f(e))),this._hasLockedColumns&&(e=E(this.columns),this._lockedHeaderColsTree.render(this._cols(f(e))),this._lockedContentColsTree.render(this._cols(f(e))))},_retrieveFirstColumn:function(t,i){var n,o=e();if(i.length&&t[0]){for(n=t[0];n.columns&&n.columns.length;)n=n.columns[0],i=i.filter(":not(:first())");o=o.add(i)}return o},_updateFirstColumnClass:function(){var t,i=this,n=i.columns||[],o=i.thead.find(">tr:not(:first)");n=I(n),t=i._retrieveFirstColumn(n,o),i.lockedHeader&&(o=i.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),n=E(i.columns),t=t.add(i._retrieveFirstColumn(n,o))),t.each(function(){var t=e(this).find("th");t.removeClass("k-first"),t.eq(0).addClass("k-first")})},_updateRowSpans:function(e){var t,i;for(t=e.length-1;t>=0;t--)i=m(e[t].cells).length>0,i&&(e[t].rowSpan=e.length-t)},_setColumnDataIndexes:function(e){for(var t=0;t<e.length;t++)e[t]["data-index"]=t},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=D(e,E(this.columns))),D(this.thead,I(this.columns),t)},_setParentsVisibility:function(e,t){var i,n,o=this.columns,r=[],s=t?function(e){return v(e.columns).length&&e.hidden}:function(e){return!v(e.columns).length&&!e.hidden};if(C(e,o,r)&&r.length)for(i=r.length-1;i>=0;i--)n=r[i],s(n)&&(n.hidden=!t)},_prepareColumns:function(t,i,n,o,r){var s,a,l=o||t[t.length-1],c=t[l.index+1],d=0;for(s=0;s<i.length;s++)a=e.extend({},i[s],{headerAttributes:i[s].headerAttributes||{}}),l.cells.push(a),i[s].columns&&i[s].columns.length&&(c||(c={rowSpan:0,cells:[],index:t.length},t.push(c)),i[s].columns.length&&(a.headerAttributes.colSpan=m(i[s].columns).length||1,a.headerAttributes["data-colspan"]=f(i[s].columns).length),this._prepareColumns(t,i[s].columns,a,c,i[s]),a.hidden||(d+=a.headerAttributes.colSpan-1),l.rowSpan=t.length-l.index),i[s].rowIndex=l.index,r&&(i[s].parentColumn=r),i[s].cellIndex=l.cells.length-1;n&&(n.headerAttributes.colSpan+=d)},_renderHeaderTree:function(e,t,i){var n,o=[],r=[];if(i){for(o=[{rowSpan:1,cells:[],index:0}],this._prepareColumns(o,t),this._updateRowSpans(o),n=0;n<o.length;n++)r.push(K("tr",{role:"row"},this._ths(o[n].cells,o[n].rowSpan)));e.render(r)}else e.render([K("tr",{role:"row"},this._ths(t))])},_renderHeader:function(){var e=I(this.columns),i=pe(this.columns,function(e){return e.columns!==t}).length>0;this._setColumnDataIndexes(f(this.columns)),this._renderHeaderTree(this._headerTree,e,i),this._hasLockedColumns&&(e=E(this.columns),this._renderHeaderTree(this._lockedHeaderTree,e,i),this._applyLockedContainersWidth(),this._syncLockedHeaderHeight()),this._updateFirstColumnClass()},_applyLockedContainersWidth:function(){var e,t,i,n,o,r;this._hasLockedColumns&&(e=l(this.lockedHeader.find(">table>colgroup>col")),t=this.thead.parent(),i=l(t.find(">colgroup>col")),n=this.wrapper[0].clientWidth,o=kendo.support.scrollbar(),e>=n&&(e=n-3*o),this.lockedHeader.add(this.lockedContent).width(e),t.add(this.table).width(i),r=n-e-2,this.content.width(r),t.parent().width(r-o))},_trs:function(t){var i,n,o,r,s,a,l,c,d,u=this,h=[],p=t.level,f=t.data,m=this.dataSource,g=m.aggregates()||{},v=m._modelIdField(),_=m._modelParentIdField(),b=t.columns,w=u._isPageable(),y=t.childrenMap||m.childrenMap(m._getData());for(a=0,l=f.length;a<l;a++)if(o=[],i=f[a],c=i[v],s=w?y[c]:i.loaded()?m.childNodes(i):[],r=s&&s.length,n={role:"row"},n[kendo.attr("uid")]=i.uid,r&&(n["aria-expanded"]=!!i.expanded),t.visible?(!w||w&&!u._skipRenderingMap[c])&&(this._absoluteIndex%2!==0&&o.push(mt.alt),this._absoluteIndex++):n.style={display:"none"},e.inArray(i.uid,t.selected)>=0&&o.push(mt.selected),r&&o.push(mt.group),i._edit&&o.push("k-grid-edit-row"),n.className=o.join(" "),u._skipRenderingMap[c]||(d=this._tds({model:i,attr:n,level:w?u._renderedModelLevel(i,t):p,editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex},b,ue(this._td,this)),h.push(d)),r){if(w&&(s=(t.viewChildrenMap||{})[c]||[]),0===s.length)continue;h=h.concat(this._trs({columns:b,editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex,aggregates:g,selected:t.selected,visible:w?t.visible:t.visible&&!!i.expanded,data:s,childrenMap:t.childrenMap||y,viewChildrenMap:t.viewChildrenMap,level:p+1}))}return this._hasFooterTemplate()&&i&&(n={className:mt.footerTemplate,"data-parentId":i[_]},t.visible||(n.style={display:"none"}),h.push(this._tds({model:g[i[_]],attr:n,level:p,editedColumn:t.editedColumn,editedColumnIndex:t.editedColumnIndex},b,this._footerId))),h},_footerId:function(t){var i=[],n=t.column,o=t.column.footerTemplate||e.noop,r=t.model[n.field]||{},s={role:"gridcell",style:n.hidden===!0?{display:"none"}:{}};return n.expandable&&(i=i.concat(a({level:t.level+1,className:mt.iconPlaceHolder}))),n.attributes&&de(s,n.attributes),i.push(Q(o(r)||"")),K("td",s,i)},_hasFooterTemplate:function(){return!!pe(this.columns,function(e){return e.footerTemplate}).length},_tds:function(e,t,i){var n,o,r,s=[],a=(e.editedColumn||{}).field,l=this._isIncellEditable(),c=t.length;for(o=0;o<c;o++)n=t[o],r=i({model:e.model,column:n,editColumn:!l||l&&n.field===a&&e.editedColumnIndex===o,level:e.level}),s.push(r);return K("tr",e.attr,s)},_td:function(e){var t,i=[],n=e.model,o=e.column,r={role:"gridcell",style:o.hidden===!0?{display:"none"}:{}},s=this._isIncellEditable(),l=!1;return o.attributes&&de(!0,r,o.attributes),n._edit&&o.field&&e.editColumn&&(s||!s&&z(o,n))?(r[kendo.attr("container-for")]=o.field,s&&(r.className&&r.className.indexOf(mt.editCell)!==-1?r.className+=" "+mt.editCell:r.className||(r.className=mt.editCell))):(o.expandable&&(i=a({level:e.level,className:mt.iconPlaceHolder}),t=[mt.icon],t.push(n.hasChildren?n.expanded?mt.iconCollapse:mt.iconExpand:mt.iconHidden),n._error?t.push(mt.refresh):!n.loaded()&&n.expanded&&t.push(mt.loading),i.push(K("span",{className:t.join(" ")})),r.style["white-space"]="nowrap"),B(o,n)&&(r.className?r.className+=mt.dirtyCell:r.className||(r.className=mt.dirtyCell)),o.command?(r.className&&r.className.indexOf("k-command-cell")!==-1?r.className+=" k-command-cell":r.className||(r.className="k-command-cell"),r["class"]&&(r.className=r["class"]+" "+r.className),l=pe(o.command,function(e){return e===De||e.name===De}).length>0,i=this._buildCommands(n._edit&&!this._isIncellEditable()&&l?["update","canceledit"]:o.command)):i.push(this._cellContent(o,n))),K("td",r,i)},_cellContent:function(e,t){var i,n=this,o=n._isIncellEditable(),r=o?n._evalDirtyIndicatorTemplate(e,t):"";return e.template?i=n._evalColumnTemplate(e,t):e.field?(i=t.get(e.field),null===i||L(i)?i=r:(e.format&&(i=kendo.format(e.format,i)),i=r+i)):(null===i||L(i))&&(i=""),e.template||!e.encoded?Q(i):o?Q(i):Y(i)},_evalColumnTemplate:function(e,t){return this._isIncellEditable()?this._evalCustomColumnTemplate(e,t):e.template(t)},_evalCustomColumnTemplate:function(e,t){var i=this,n=i._customTemplateSettings(),o="#=this.columnTemplate("+n.paramName+")#",r=i._dirtyIndicatorTemplate(e.field)+o,s=ue(ae(r,n),{columnTemplate:e.template});return s(t)},_evalDirtyIndicatorTemplate:function(e,t){var i=this._dirtyIndicatorTemplate(e.field);return ae(i)(t)},_dirtyIndicatorTemplate:function(e){var t,i=this,n=i._customTemplateSettings(),o=n.paramName;return e&&o?(t="["===e.charAt(0)?kendo.expr(e,o+".dirtyFields"):o+".dirtyFields['"+e+"']","#= "+o+" && "+o+".dirty && "+o+".dirtyFields && "+t+" ? '<span class=\"k-dirty\"></span>' : '' #"):""},_customTemplateSettings:function(){return de({},kendo.Template,this.options.templateSettings)},_buildCommands:function(e){var t,i=[];for(t=0;t<e.length;t++)i.push(this._button(e[t]));return i},_button:function(e){var t=(e.name||e).toLowerCase(),i=this.options.messages.commands[t],n=[];return e=de({},gt[t],{text:i},e),e.imageClass&&n.push(K("span",{className:["k-icon",e.imageClass].join(" ")})),K("button",{type:"button","data-command":t,className:["k-button k-button-icontext",e.className].join(" ")},n.concat([Y(e.text||e.name)]))},_positionResizeHandle:function(t){var i,n,o,r=e(t.currentTarget),a=this.resizeHandle,l=r.position(),c=X(r),d=r.closest("div"),u=this.options.columnResizeHandleWidth||3,h=c;if(a||(a=this.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner" /></div>')),i=s(r.closest("thead")).filter(":visible"),ct)h=r.position().left;else for(n=0;n<i.length&&i[n]!=r[0];n++)h+=i[n].offsetWidth;d.append(a),a.show().css({top:l.top,left:h-u-1,height:J(r),width:3*u}).data("th",r),o=this,a.off("dblclick"+xe).on("dblclick"+xe,function(){var t=r.index();e.contains(o.thead[0],r[0])&&(t+=pe(o.columns,function(e){return e.locked&&!e.hidden}).length),o.autoFitColumn(t)})},autoFitColumn:function(t){var i,n,r,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y=this,k=y.options,x=y.columns,C=kendo.support.browser,S=y.lockedHeader?s(y.lockedHeader.find(">table>thead")).filter(o).length:0;if(t="number"==typeof t?x[t]:me(t)?pe(x,function(e){return e===t})[0]:pe(x,function(e){return e.field===t})[0],t&&!t.hidden){for(i=fe(t,x),a=t.locked,r=a?y.lockedHeader.children("table"):y.thead.parent(),n=r.find("[data-index='"+i+"']"),c=a?y.lockedTable:y.table,d=y.footer||e(),y.footer&&y.lockedContent&&(d=y.footer.children(a?".k-grid-footer-locked":".k-grid-footer-wrap")),u=d.find("table").first(),y.lockedHeader&&S>=i&&!a&&(i-=S),h=0;h<x.length&&x[h]!==t;h++)x[h].hidden&&i--;if(l=k.scrollable?r.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+i+")").add(c.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+i+")")).add(u.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+i+")")):c.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+i+")"),p=r.add(c).add(u),f=X(n),l.width(""),p.css("table-layout","fixed"),l.width("auto"),p.addClass("k-autofitting"),p.css("table-layout",""),m=Math.ceil(Math.max(X(n),X(c.find("tr").eq(0).children("td:visible").eq(i)),X(u.find("tr").eq(0).children("td:visible").eq(i)))),l.width(m),t.width=m,k.scrollable){for(g=r.find("col"),_=0,b=0,w=g.length;b<w;b+=1){if(v=g[b].style.width,!v||v.indexOf("%")!=-1){_=0;break}_+=parseInt(v,10)}_&&p.each(function(){this.style.width=_+"px"})}C.msie&&8==C.version&&(p.css("display","inline-table"),setTimeout(function(){p.css("display","table")},1)),p.removeClass("k-autofitting"),y.trigger($e,{column:t,oldWidth:f,newWidth:m}),y._applyLockedContainersWidth(),y._syncLockedContentHeight(),y._syncLockedHeaderHeight()}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),i=e[0].offsetWidth>t[0].clientWidth?kendo.support.scrollbar():0;this.lockedContent.height(t.height()-i)},_syncLockedContentHeight:function(){this.lockedTable&&(this._touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var e,t;this.lockedHeader&&(e=this.lockedHeader.children("table"),t=this.thead.parent(),
this._adjustRowsHeight(e,t),c(e,t))},_resizable:function(){if(this.options.resizable){this.resizable&&this.resizable.destroy();var t=this;e(this.lockedHeader).find("thead").add(this.thead).on("mousemove"+xe,"th",e.proxy(this._positionResizeHandle,this)),this.resizable=new kendo.ui.Resizable(this.wrapper,{handle:".k-resize-handle",start:function(i){var n,o,r=e(i.currentTarget).data("th"),a=e.inArray(r[0],s(r.closest("thead")).filter(":visible")),l="col:eq("+a+")";t.wrapper.addClass("k-grid-column-resizing"),t.lockedHeader&&e.contains(t.lockedHeader[0],r[0])?(n=t.lockedHeader,o=t.lockedTable):(n=t.thead.parent(),o=t.table),this.col=o.children("colgroup").find(l).add(n.find(l)),this.th=r,this.startLocation=i.x.location,this.columnWidth=X(r),this.table=this.col.closest("table"),this.totalWidth=this.table.width()},resize:function(e){var t=ct?-1:1,i=11,n=e.x.location*t-this.startLocation*t;this.columnWidth+n<i&&(n=i-this.columnWidth),this.table.width(this.totalWidth+n),this.col.width(this.columnWidth+n)},resizeend:function(){var e,i,n;t.wrapper.removeClass("k-grid-column-resizing"),e=this.th.attr("data-field"),i=pe(f(t.columns),function(t){return t.field==e}),n=Math.floor(X(this.th)),i[0].width=n,t._resize(),t._syncLockedContentHeight(),t._syncLockedHeaderHeight(),t.trigger($e,{column:i,oldWidth:this.columnWidth,newWidth:n}),this.table=this.col=this.th=null}})}},_sortable:function(){var i,n,o,a,l,c,d,u=this.options.sortable,h=pe(this.columns,function(e){return e.columns!==t}).length>0;if(u)for(a=h?this.lockedHeader?r(s(this.lockedHeader.find(">table>thead")).add(s(this.thead))):s(this.thead):e(this.lockedHeader).add(this.thead).find("th"),i=f(this.columns),c=0,d=a.length;c<d;c++)n=i[c],n.sortable!==!1&&!n.command&&n.field&&(l=a.eq(c),o=l.data("kendoColumnSorter"),o&&o.destroy(),l.kendoColumnSorter(de({},u,n.sortable,{dataSource:this.dataSource})))},_filterable:function(){var i,n,o,r,a,l,c,d,u,h=this.options.filterable,p=pe(this.columns,function(e){return e.columns!==t}).length>0;if(h&&!this.options.columnMenu)for(d=ue(function(e){this.trigger(Ve,{field:e.field,container:e.container})},this),u=ue(function(e){this.trigger(We,{field:e.field,container:e.container})},this),i=p?this.lockedHeader?s(this.lockedHeader.find(">table>thead")).add(s(this.thead)):s(this.thead):e(this.lockedHeader).add(this.thead).find("th"),r=f(this.columns),n=0,o=i.length;n<o;n++)a=r[n],l=i.eq(n),c=l.data("kendoFilterMenu"),c&&c.destroy(),a.command||a.filterable===!1||l.kendoFilterMenu(de(!0,{},h,a.filterable,{dataSource:this.dataSource,init:d,open:u}))},_change:function(){this.trigger(_e)},_isLocked:function(){return null!==this.lockedHeader},_selectable:function(){var i,n,o,r,s=this,a=this.options.selectable,l=this.table,c=s._isLocked();a&&(a=kendo.ui.Selectable.parseOptions(a),this._hasLockedColumns&&(l=l.add(this.lockedTable),n=a.multiple&&a.cell),i=">tbody>tr:not(.k-footer-template)",a.cell&&(i+=">td"),this.selectable=new kendo.ui.Selectable(l,{filter:i,aria:!0,multiple:a.multiple,inputSelectors:".k-icon.k-i-collapse,.k-icon.k-i-expand",change:ue(this._change,this),useAllItems:n,continuousItems:ue(this._continuousItems,this,i,a.cell),relatedTarget:!a.cell&&this._hasLockedColumns?ue(this._selectableTarget,this):t}),s.options.navigatable&&(o=a.multiple,r=a.cell,l.on("keydown"+xe,function(i){var n=s.current(),a=i.target;if(i.keyCode===Z.SPACEBAR&&!i.shiftKey&&e.inArray(a,l)>-1&&!n.is(".k-header")){if(i.preventDefault(),i.stopPropagation(),n=r?n:n.parent(),c&&!r&&(n=n.add(s._relatedRow(n))),o)if(i.ctrlKey){if(n.hasClass(mt.selected))return n.removeClass(mt.selected),s.trigger(_e),t}else s.selectable.clear();else s.selectable.clear();r||(s.selectable._lastActive=n),s.selectable.value(n)}else!r&&(i.shiftKey&&i.keyCode==Z.LEFT||i.shiftKey&&i.keyCode==Z.RIGHT||i.shiftKey&&i.keyCode==Z.UP||i.shiftKey&&i.keyCode==Z.DOWN||i.keyCode===Z.SPACEBAR&&i.shiftKey)&&(i.preventDefault(),i.stopPropagation(),n=n.parent(),c&&(n=n.add(s._relatedRow(n))),o?(s.selectable._lastActive||(s.selectable._lastActive=n),s.selectable.selectRange(s.selectable._firstSelectee(),n)):(s.selectable.clear(),s.selectable.value(n)))})))},_continuousItems:function(t,i){var n,o,r,s,a,l;if(this.lockedContent){for(n=e(t,this.lockedTable),o=e(t,this.table),r=i?E(this.columns).length:1,s=i?this.columns.length-r:1,a=[],l=0;l<n.length;l+=r)ge.apply(a,n.slice(l,l+r)),ge.apply(a,o.splice(0,s));return a}},_selectableTarget:function(t){var i,n,o,r=e();for(n=0,o=t.length;n<o;n++)i=this._relatedRow(t[n]),fe(i[0],t)<0&&(r=r.add(i));return r},_relatedRow:function(t){var i,n,o=this.lockedTable;return t=e(t),o?(i=t.closest(this.table.add(this.lockedTable)),n=i.find(">tbody>tr").index(t),i=i[0]===this.table[0]?o:this.table,i.find(">tbody>tr").eq(n)):t},select:function(i){var n=this.selectable;return n?(t!==i&&(n.options.multiple||(n.clear(),i=i.first()),this._hasLockedColumns&&(i=i.add(e.map(i,ue(this._relatedRow,this))))),n.value(i)):e()},clearSelection:function(){var e=this.select();e.length&&(this.selectable.clear(),this.trigger(_e))},_dataSource:function(e){var i=this,n=this.dataSource,o=i.options.pageable;n&&(n.unbind(_e,this._refreshHandler),n.unbind(we,this._errorHandler),n.unbind(ye,this._progressHandler)),this._refreshHandler=ue(this.refresh,this),this._errorHandler=ue(this._error,this),this._progressHandler=ue(this._progress,this),me(e)&&(de(e,{table:i.table,fields:i.columns}),me(o)&&o.pageSize!==t&&(e.pageSize=o.pageSize)),n=this.dataSource=O.create(e),o&&(n._collapsedTotal=t),n.bind(_e,this._refreshHandler),n.bind(we,this._errorHandler),n.bind(ye,this._progressHandler),this._dataSourceFetchProxy=ue(function(){this.dataSource.fetch()},this)},setDataSource:function(e){this._dataSource(e),this._sortable(),this._filterable(),this._columnMenu(),this._pageable(),this._contentTree.render([]),this.options.autoBind&&this.dataSource.fetch()},dataItem:function(t){var i,n,o;return t instanceof N?t:(i=e(t).closest("tr"),n=i.attr(kendo.attr("uid")),o=L(n)?null:this.dataSource.getByUid(n))},editRow:function(e){var i,n=this;if(!this._isIncellEditable()&&this.options.editable&&(typeof e===ve&&(e=this.tbody.find(e)),i=n._isPageable()&&n._isPopupEditable()&&e instanceof N?e:this.dataItem(e))){if("popup"!=this._editMode()&&(i._edit=!0),this._cancelEditor(),this.trigger(Te,{model:i}))return n.dataSource._restorePageSizeAfterAddChild(),t;this._render(),this._createEditor(i),this.trigger(De,{container:this.editor.wrapper,model:i})}},_cancelEdit:function(t){if(this.editor){var i;t=de(t,{container:this.editor.wrapper,model:this.editor.model}),this.trigger(Ne,t)||(this.options.navigatable&&(i=this.items().index(e(this.current()).parent())),this.cancelRow(),this.options.navigatable&&(this.current(this.items().eq(i).children().filter(ot).first()),F(this.table,!0)))}},cancelRow:function(){this._isIncellEditable()||(this._cancelEditor(),this._render())},saveRow:function(){var e,t=this.editor;this._isIncellEditable()||t&&(e={model:t.model,container:t.wrapper},t.end()&&!this.trigger(Ie,e)&&this.dataSource.sync())},addRow:function(e){var i=this,n=i.dataSource,o=i._isPageable(),r=i._isIncellEditable(),s=i._isInlineEditable(),a=this.editor,l=0,c={};if((!a||a.end())&&this.options.editable)return e?(e instanceof N||(e=this.dataItem(e)),c[e.parentIdField]=e.id,l=this.dataSource.indexOf(e)+1,this.expand(e).then(function(){var t=o&&n._isLastItemInView(e)&&(r||s);i._insertAt(c,l,t)}),t):(this._insertAt(c,l),t)},_insertAt:function(e,t,i){var n,o,r=this,s=r.dataSource;e=r.dataSource.insert(t,e),i&&s._setAddChildPageSize(),n=this.itemFor(e),r._isIncellEditable()?(o=n.children("td").eq(r._firstEditableColumnIndex(n)),r.editCell(o)):n&&n[0]?r.editRow(n):r._isPageable()&&r._isPopupEditable()&&r.editRow(e)},_firstEditableColumnIndex:function(e){var t,i,n=this,o=n.dataItem(e),r=f(n.columns),s=r.length;for(i=0;i<s;i++)if(t=r[i],o&&(!o.editable||o.editable(t.field))&&!t.command&&t.field&&t.hidden!==!0)return i;return-1},removeRow:function(e){var t=this.dataItem(e),i={model:t,row:e};t&&!this.trigger(ze,i)&&(this.dataSource.remove(t),this._isIncellEditable()||this.dataSource.sync())},_cancelEditor:function(){var e,t=this,i=t.editor;i&&(e=i.model,t._destroyEditor(),t._isIncellEditable()?t._shouldRestorePageSize()&&t.dataSource._restorePageSizeAfterAddChild():t.dataSource.cancelChanges(e),e._edit=!1),t._preventPageSizeRestore=!1},_shouldRestorePageSize:function(){var e=this;return e._isPageable()&&e._isIncellEditable()&&!e._preventPageSizeRestore},_destroyEditor:function(){this.editor&&(this.editor.close(),this.editor=null)},_createEditor:function(e){var t,i,n,o=this.itemFor(e),r=f(this.columns),s=[];for(t=0;t<r.length;t++)s.push(de({},r[t])),delete s[t].parentColumn;o=o.add(this._relatedRow(o)),i=this._editMode(),n={columns:s,model:e,target:this,clearContainer:!1,template:this.options.editable.template},"inline"==i?this.editor=new W(o,n):(de(n,{window:this.options.editable.window,commandRenderer:ue(function(){return this._buildCommands(["update","canceledit"])},this),fieldRenderer:ue(this._cellContent,this),save:ue(this.saveRow,this),cancel:ue(this._cancelEdit,this),appendTo:this.wrapper}),this.editor=new U(o,n))},_createIncellEditor:function(e,t){var i=this,n=de({},t.columns[0]);return delete n.parentColumn,new q(e,de({},{fieldRenderer:ue(i._cellContent,i),appendTo:i.wrapper,clearContainer:!1,target:i,columns:[n],model:t.model,change:t.change}))},editCell:function(t){var i,n,o=this;t=e(t),i=f(o.columns)[o.cellIndex(t)],n=o.dataItem(t),o._isIncellEditable()&&n&&z(i,n)&&o._editCell(t,i,n)},_editCell:function(e,i,n){var o,r=this;return r.trigger(Te,{model:n})?(r.dataSource._restorePageSizeAfterAddChild(),t):(r.closeCell(),n._edit=!0,r._cancelEditor(),r._render({editedColumn:i,editedColumnIndex:e.index()}),o=r.table.add(r.lockedTable).find(ke+mt.editCell).first(),r.editor=r._createIncellEditor(o,{columns:[i],model:n,change:function(t){r.trigger(Ie,{values:t.values,container:e,model:n})&&t.preventDefault()}}),r._current=o,r.trigger(De,{container:e,model:n}),t)},closeCell:function(e){var t,i,n=this,o=(n.editor||{}).element;o&&o[0]&&n._isIncellEditable()&&(i=n.dataItem(o),e&&n.trigger(Ne,{container:o,model:i})||(n.trigger(Pe,{type:e?Ne:Ie,model:i,container:o}),n._cancelEditor(),o.removeClass(mt.editCell),t=o.parent().removeClass(mt.editRow),n.lockedContent&&n._relatedRow(t).removeClass(mt.editRow),n._render(),n.trigger(be,{item:t,data:i,ns:ee}),n.lockedContent&&P(t.css("height","")[0],n._relatedRow(t).css("height","")[0])))},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this,t=(e.editor||{}).editable,i=t&&t.end();!i&&t||e.trigger(Me)||e.dataSource.sync()},_editMode:function(){var e="inline",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e.toLowerCase()},_isIncellEditable:function(){return this._editMode()===ut},_isInlineEditable:function(){return this._editMode()===ht},_isPopupEditable:function(){return this._editMode()===pt},hideColumn:function(e){this._toggleColumnVisibility(e,!0)},showColumn:function(e){this._toggleColumnVisibility(e,!1)},_toggleColumnVisibility:function(e,t){e=this._findColumn(e),e&&e.hidden!==t&&(e.hidden=t,this._setParentsVisibility(e,!t),this._ensureExpandableColumn(),this._renderCols(),this._renderHeader(),this._render(),this._adjustTablesWidth(),this.trigger(t?Ue:qe,{column:e}),t||e.width||this.table.add(this.thead.closest("table")).width(""),this._updateFirstColumnClass())},_findColumn:function(e){return e="number"==typeof e?this.columns[e]:me(e)?pe(f(this.columns),function(t){return t===e})[0]:pe(f(this.columns),function(t){return t.field===e})[0]},_adjustTablesWidth:function(){var e,t,i,n=this.thead.prev().children(),o=0;for(e=0,t=n.length;e<t;e++){if(i=n[e].style.width,!i||i.indexOf("%")!=-1){o=0;break}o+=parseInt(i,10)}o&&this.table.add(this.thead.closest("table")).width(o)},_reorderable:function(){var t,i,n;this.options.reorderable&&(t=this.options.scrollable===!0,i=(t?".k-grid-header:first ":"table:first>.k-grid-header ")+je,n=this,this._draggableInstance=new ee.Draggable(this.wrapper,{group:kendo.guid(),filter:i,hint:function(t){return e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(kendo.attr("title"))||t.attr(kendo.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}),this.reorderable=new ee.Reorderable(this.wrapper,{draggable:this._draggableInstance,dragOverContainers:ue(this._allowDragOverContainers,this),inSameContainer:function(t){return e(t.source).parent()[0]===e(t.target).parent()[0]&&w(b(n.columns),n.columns,t.sourceIndex,t.targetIndex)>-1},change:function(e){var t=b(n.columns),i=t[e.oldIndex],o=w(t,n.columns,e.oldIndex,e.newIndex);n.trigger(Ge,{newIndex:o,oldIndex:fe(i,t),column:i}),n.reorderColumn(o,i,"before"===e.position)}}))},_allowDragOverContainers:function(e,t){var i=b(this.columns);return i[e].lockable!==!1&&w(i,this.columns,e,t)>-1},_reorderTrees:function(i,n,o,r,s,a,l,c){var d,u,h,f,m,g,v,_,b=e(),w=s.find("tr:eq("+r[0].rowIndex+")"),y=a.children[r[0].rowIndex],k=w.children(),x=l?i[0]:i[i.length-1];for(_=0;_<r.length;_++)u=r[_].cellIndex,b=b.add(k.eq(u)),d=o.children[x.rowIndex].children,o===a&&l&&(u+=_),d.splice(l?x.cellIndex+_:x.cellIndex+1+_,0,y.children[u]);if(o===a&&l?y.children.splice(r[0].cellIndex+r.length,r.length):y.children.splice(r[0].cellIndex,r.length),h=n.find("tr:eq("+x.rowIndex+")"),v=h.find(">th.k-header:eq("+x.cellIndex+")"),v.length&&b[0]!==v[0]&&b[l?"insertBefore":"insertAfter"](v),c>=r[0].rowIndex+1&&1!=c){for(f=[],_=0;_<r.length;_++)r[_].columns&&(f=f.concat(r[_].columns));if(!f.length)return;for(m=[],_=0;_<i.length;_++)i[_].columns&&(m=m.concat(i[_].columns));if(!m.length&&(n!==s||x.cellIndex-r[0].cellIndex>1||r[0].cellIndex-x.cellIndex>1)&&(g=p(this.columns,x,r[0],l,this.columns),m=[g],!g&&f.length&&n.find("tr").length>r[0].rowIndex+1))return this._insertTree(f,s,a,n,o),t;if(!m.length)return;this._reorderTrees(m,n,o,f,s,a,l,c)}},_insertTree:function(t,i,n,o,r){var s,a=[],l=e(),c=i.find("tr:eq("+t[0].rowIndex+")"),d=n.children[t[0].rowIndex];for(s=0;s<t.length;s++)t[s].columns&&(a=a.concat(t[s].columns)),r.children[t[0].rowIndex].children.splice(s,0,d.children[t[s].rowIndex]),l=l.add(c.find(">th.k-header:eq("+t[s].cellIndex+")"));n.children[t[0].rowIndex].children.splice(t[0].cellIndex,t.length),o.find("tr:eq("+t[0].rowIndex+")").append(l),a.length&&this._insertTree(a,i,n,o,r)},_reorderHeader:function(e,t,i){var n,o,r=t.columns?A([t]):1,s=e.columns?A([e]):1,a=u(t),l=u(e),c=l?this.lockedHeader:this.thead,d=a?this.lockedHeader:this.thead,h=l?this._lockedHeaderTree:this._headerTree,p=a?this._lockedHeaderTree:this._headerTree,f=c.find("tr");if(r===s||r<f.length)this._reorderTrees([e],c,h,[t],d,p,i,r),M(c,h),R(d,p);else{if(c!==d)for(n=r-f.length,f.each(function(e){var t,i=this.cells;for(t=0;t<i.length;t++)i[t].colSpan<=1&&i[t].attributes.rowspan&&(h.children[e].children[t].attr.rowSpan+=n,i[t].rowSpan+=n)}),o=0;o<n;o++)h.children.push(K("tr",{role:"row"})),c.is("thead")?c.append("<tr role='row'></tr>"):c.find("thead").append("<tr role='row'></tr>");this._reorderTrees([e],c,h,[t],d,p,i,r),R(d,p)}},reorderColumn:function(i,n,o){var r,s,a,l=n.parentColumn,c=l?l.columns:this.columns,d=fe(n,c),u=c[i],h=!!u.locked,p=pe(this.columns,function(e){return e.columns!==t}).length>0,m=I(c).length;d!==i&&(h&&!n.locked&&1==m||!h&&n.locked&&c.length-m==1||(o===t&&(o=i<d),p&&this._reorderHeader(u,n,o),r=!!n.locked,r=r!=h,n.locked=h,c.splice(o?i:i+1,0,n),c.splice(d<i?d:d+1,1),this._setColumnDataIndexes(f(this.columns)),this._clearColsCache(),this._renderCols(),p?this.lockedHeader?(c=I(this.columns),this._prepareColumns([{rowSpan:1,cells:[],index:0}],c),c=E(this.columns),this._prepareColumns([{rowSpan:1,cells:[],index:0}],c)):this._prepareColumns([{rowSpan:1,cells:[],index:0}],this.columns):(s=e(this.lockedHeader).add(this.thead).find("th"),s.eq(d)[o?"insertBefore":"insertAfter"](s.eq(i)),a=this._headerTree.children[0].children,this._hasLockedColumns&&(a=this._lockedHeaderTree.children[0].children.concat(a)),a.splice(o?i:i+1,0,a[d]),a.splice(d<i?d:d+1,1),this._hasLockedColumns&&(this._lockedHeaderTree.children[0].children=a.splice(0,E(c).length),this._headerTree.children[0].children=a)),this._updateColumnCellIndex(),this._applyLockedContainersWidth(),this._syncLockedHeaderHeight(),this._updateFirstColumnClass(),this.refresh(),r&&(h?this.trigger(Qe,{column:n}):this.trigger(Xe,{column:n}))))},lockColumn:function(e){var t,i=this.columns;e="number"==typeof e?i[e]:pe(i,function(t){return t.field===e})[0],e&&!e.hidden&&(t=E(i).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,i=this.columns;e="number"==typeof e?i[e]:pe(i,function(t){return t.field===e})[0],e&&!e.hidden&&(t=E(i).length,this.reorderColumn(t,e,!0))},_columnMenu:function(){var i,n,o,a,l,c,d=e(this.lockedHeader).add(this.thead).find("th"),u=this.columns,h=this.options,p=h.columnMenu,m=ue(this._columnMenuInit,this),g=ue(this._columnMenuOpen,this),v=E(u).length,_=pe(this.columns,function(e){return e.columns!==t}).length>0;if(_?(u=f(u),d=this.lockedHeader?r(s(this.lockedHeader.find(">table>thead")).add(s(this.thead))):s(this.thead)):d=e(this.lockedHeader).add(this.thead).find("th"),p)for("boolean"==typeof p&&(p={}),c=0;c<d.length;c++)i=u[c],i.field&&(n=d.eq(c).data("kendoColumnMenu"),n&&n.destroy(),a=!1,i.sortable!==!1&&p.sortable!==!1&&h.sortable!==!1&&(a=de({},h.sortable,{compare:(i.sortable||{}).compare})),l=!1,h.filterable&&i.filterable!==!1&&p.filterable!==!1&&(l=de({pane:this.pane},i.filterable,h.filterable)),o={dataSource:this.dataSource,values:i.values,columns:p.columns,sortable:a,filterable:l,messages:p.messages,owner:this,closeCallback:e.noop,init:m,open:g,pane:this.pane,lockedColumns:!_&&i.lockable!==!1&&v>0},h.$angular&&(o.$angular=h.$angular),d.eq(c).kendoColumnMenu(o))},_columnMenuInit:function(e){this.trigger(Ke,{field:e.field,container:e.container})},_pageable:function(){var t,i=this,n=i.options.pageable;n&&(t=i.wrapper.children("div.k-grid-pager"),t.length||(t=e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(i.wrapper)),i._destroyPager(),"object"==typeof n&&n instanceof kendo.ui.TreeListPager?i.pager=n:i._createPager(t),i.pager.bind(Ee,function(e){i.trigger(Ae,{page:e.index})&&e.preventDefault()}))},_createPager:function(e,t){var i=this;i.pager=new V(e,de({},i.options.pageable,{dataSource:i.dataSource},t))},_destroyPager:function(){this.pager&&this.pager.destroy()},_isPageable:function(){var e=this;return e.options.pageable&&(!e.dataSource||e.dataSource&&e.dataSource._isPageable())},_togglePagerVisibility:function(){var e=this,t=e.options.pageable;t&&(me(t)||t instanceof V)&&t.alwaysVisible===!1&&e.wrapper.find(".k-grid-pager").toggle((e.dataSource.collapsedTotal()||0)>=e.dataSource.pageSize())}}),kendo.ExcelMixin&&kendo.ExcelMixin.extend(j.prototype),kendo.PDFMixin&&(kendo.PDFMixin.extend(j.prototype),j.prototype._drawPDF=function(i){function n(){a&&c!==t?(s.unbind("change",o),s.one("change",function(){r.resolve(l)}),s.page(c)):r.resolve(l)}function o(){d._drawPDFShadow({width:d.wrapper.width()},{avoidLinks:d.options.pdf.avoidLinks}).done(function(e){var t=s.page(),o=a?s.totalPages():1,r={page:e,pageNumber:t,progress:t/o,totalPages:o};i.notify(r),l.append(r.page),t<o?s.page(t+1):n()}).fail(function(e){r.reject(e)})}var r,s,a,l,c,d=this;return d.options.pdf.paperSize&&"auto"!=d.options.pdf.paperSize?d._drawPDF_autoPageBreak(i):(r=new e.Deferred,s=d.dataSource,a=d.options.pdf.allPages,this._initPDFProgress(i),l=new kendo.drawing.Group,c=s.page(),a?(s.bind("change",o),s.page(1)):o(),r.promise())},j.prototype._initPDFProgress=function(t){var i,n=e("<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>");n.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(n),i=e("<div class='k-loading-pdf-progress'>").appendTo(n).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar"),t.progress(function(e){i.value(e.progress)}).always(function(){kendo.destroy(n),n.remove()})},j.prototype._drawPDF_autoPageBreak=function(i){function n(){u&&a!==t?(d.one("change",o),d.page(a)):(l.refresh(),o())}function o(){p.appendTo(document.body);var t=e.extend({},l.options.pdf,{_destructive:!0,progress:function(e){i.notify({page:e.page,pageNumber:e.pageNum,progress:.5+e.pageNum/e.totalPages/2,totalPages:e.totalPages})}});kendo.drawing.drawDOM(f,t).always(function(){p.remove()}).then(function(e){c.resolve(e)}).fail(function(e){c.reject(e)})}function r(){var e=d.page(),t=u?d.totalPages():1;s.append(h.find("tr")),e<t?d.page(e+1):(d.unbind("change",r),n())}var s,a,l=this,c=new e.Deferred,d=l.dataSource,u=l.options.pdf.allPages,h=l.wrapper.find('table[role="treeList"] > tbody'),p=e("<div>").css({position:"absolute",left:-1e4,top:-1e4}),f=l.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(p);return f.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),f.find('table[role="treeList"], .k-grid-footer table').css({height:"auto",width:"100%",overflow:"visible"}),f.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),f.find(".k-grid-header, .k-grid-footer").css({paddingRight:0}),this._initPDFProgress(i),s=f.find('table[role="treeList"] > tbody').empty(),a=d.page(),u?(d.bind("change",r),d.page(1)):r(),c.promise()}),de(!0,kendo.data,{TreeListDataSource:O,TreeListModel:N}),ee.plugin(j),ee.plugin(V)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("util/main.min",["kendo.core.min"],e)}(function(){return function(){function e(e){return e*e}function t(e){return"string"!=typeof e&&(e+="px"),e}function i(e){var t,i,n=[];if(e)for(t=c.toHyphens(e).split("-"),i=0;i<t.length;i++)n.push("k-pos-"+t[i]);return n.join(" ")}function n(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"},i=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n="";e>0;)e<i[0]?i.shift():(n+=t[i[0]],e-=i[0]);return n}function o(e){var t,i,n,o,r;for(e=e.toLowerCase(),t={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},i=0,n=0,o=0;o<e.length;++o){if(r=t[e.charAt(o)],!r)return null;i+=r,r>n&&(i-=2*n),n=r}return i}function r(e){var t=Object.create(null);return function(){var i,n="";for(i=arguments.length;--i>=0;)n+=":"+arguments[i];return n in t?t[n]:t[n]=e.apply(this,arguments)}}function s(e){return l.test(e)}function a(e,t){function i(e){this.value=e}try{return e.call(t,function(e){throw new i(e)})}catch(n){if(n instanceof i)return n.value;throw n}}var l,c=window.kendo,d=c.deepExtend,u=Date.now;u||(u=function(){return(new Date).getTime()}),d(c,{util:{now:u,renderPos:i,renderSize:t,sqr:e,romanToArabic:o,arabicToRoman:n,memoize:r,isUnicodeLetter:s,withExit:a}}),l=RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]")}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("util/parse-xml.min",["kendo.core.min","util/main.min"],e)}(function(){"use strict";function e(e){var t,i=[];for(t=0;t<e.length;++t)i.push(e.charCodeAt(t));return i}function t(e,t){t>65535?(t-=65536,e.push(t>>>10&1023|55296,56320|1023&t)):e.push(t)}function i(e,i){function C(i){var n=e[j++];240&n^240?224&n^224?192&n^192?i.push(n):t(i,(31&n)<<6|63&e[j++]):t(i,(15&n)<<12|(63&e[j++])<<6|63&e[j++]):t(i,(3&n)<<18|(63&e[j++])<<12|(63&e[j++])<<6|63&e[j++])}function S(e){throw Error(e+", at "+j)}function T(t){for(var i=[];j<e.length&&t(e[j]);)i.push(e[j++]);return i}function D(e){return n.apply(0,T(e))}function A(){T(M)}function E(t){var i,n=j;for(i=0;i<t.length;++i)if(e[j++]!=t[i])return j=n,!1;return t}function I(e){E(e)||S("Expecting "+e.join(", "))}function M(e){return 9==e||10==e||13==e||32==e}function R(e){return e>=48&&e<=57}function F(e){return e>=48&&e<=57||(e|=32)>=97&&e<=102}function P(e){return 58==e||95==e||(e|=32)>=97&&e<=122}function z(e){return 45==e||R(e)||P(e)}function B(){for(var t=[];j<e.length;){if(E(a))return q("comment",n.apply(0,t));C(t)}}function L(){var e,t;E(h)?W():E(l)?B():(e=N(),t=U(e),G.push(t),E(c)?q("enter",e,t,!0):(I(f),q("enter",e,t),H(e),e!=N()&&S("Bad closing tag"),q("leave",e,t),A(),I(f)),G.pop())}function H(t){for(var i=[];j<e.length;){if(E(d))return i.length&&q("text",n.apply(0,i));if(E(r))for(;j<e.length&&!E(s);)C(i);else E(p)?(i.length&&q("text",n.apply(0,i)),L(),i=[]):E(v)?V(i):C(i)}S("Unclosed tag "+t)}function N(){return P(e[j])||S("Expecting XML name"),D(z)}function O(){var t,i=E(_)||E(b);for(i||S("Expecting string"),t=[];j<e.length;){if(E(i))return n.apply(0,t);E(v)?V(t):C(t)}S("Unfinished string")}function V(e){var i,n;E(w)?(i=E(y)||E(k)?parseInt(D(F),16):parseInt(D(R),10),isNaN(i)&&S("Bad numeric entity")):(n=N(),i=o[n],void 0===i&&S("Unknown entity "+n)),t(e,i),I(m)}function W(){q("decl",N(),U()),I(u)}function U(t){for(var i,n={$tag:t};j<e.length&&(A(),i=e[j],63!=i&&62!=i&&47!=i);)n[N()]=(I(g),O());return n}function q(e,t,n,o){var r=i&&i[e];r&&r.call($,t,n,o)}var j=0,G=[],$={is:function(e){for(var t=G.length,i=e.length;--t>=0&&--i>=0;)if(G[t].$tag!=e[i]&&"*"!=e[i])return!1;return i<0?G[G.length-1]:null},exit:function(){throw x},stack:G},K=[];for(C(K),65279!=K[0]&&(j=0);j<e.length;)A(),I(p),L(),A()}var n=String.fromCharCode,o={amp:38,lt:60,gt:62,quot:34,apos:39,nbsp:160},r=e("<![CDATA["),s=e("]]>"),a=e("-->"),l=e("!--"),c=e("/>"),d=e("</"),u=e("?>"),h=e("?"),p=e("<"),f=e(">"),m=e(";"),g=e("="),v=e("&"),_=e('"'),b=e("'"),w=e("#"),y=e("x"),k=e("X"),x={};kendo.util.parseXML=function(){try{return i.apply(this,arguments)}catch(e){if(e!==x)throw e}}},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/commands.min",["kendo.core.min","kendo.binder.min","kendo.window.min","kendo.list.min","kendo.tabstrip.min"],e)}(function(){!function(e){function t(e){var t=document.createElement("textarea");i(t).addClass("k-spreadsheet-clipboard").val(e).appendTo(document.body).focus().select(),document.execCommand("copy"),i(t).remove()}var i,n,o,r,s,a,l,c;e.support.browser.msie&&e.support.browser.version<9||(i=e.jQuery,n=e.spreadsheet.Command=e.Class.extend({init:function(e){this.options=e,this._workbook=e.workbook,this._property=e&&e.property,this._state={}},range:function(e){return void 0!==e&&this._setRange(e),this._range},_setRange:function(e){this._range=e},redo:function(){this.range().select(),this.exec()},undo:function(){this.setState(this._state)},getState:function(){this._state=this.range().getState(this._property)},setState:function(e){this.range().setState(e)},_forEachCell:function(e){var t=this.range(),i=t._ref;i.forEach(function(i){t.sheet().forEach(i.toRangeRef(),e.bind(this))}.bind(this))}}),o=n.extend({init:function(e){n.fn.init.call(this,e),this._target=e.target,
this._value=e.value},exec:function(){this.getState(),this.setState(this._value)}}),e.spreadsheet.ColumnWidthCommand=o.extend({getState:function(){this._state=this.range().sheet().columnWidth(this._target)},setState:function(e){this.range().sheet().columnWidth(this._target,e)}}),e.spreadsheet.RowHeightCommand=o.extend({getState:function(){this._state=this.range().sheet().rowHeight(this._target)},setState:function(e){this.range().sheet().rowHeight(this._target,e)}}),e.spreadsheet.HyperlinkCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._link=e.link},exec:function(){var e=this.range();this._prevLink=e.link(),this._prevUnderline=e.underline(),e.link(this._link),e.underline(!0),null==e.value()&&(this._hasSetValue=!0,e.value(this._link))},undo:function(){var e=this.range();e.link(this._prevLink),e.underline(this._prevUnderline),this._hasSetValue&&e.value(null)}}),e.spreadsheet.GridLinesChangeCommand=o.extend({getState:function(){this._state=this._range.sheet().showGridLines()},setState:function(e){this._range.sheet().showGridLines(e)}}),r=e.spreadsheet.PropertyChangeCommand=n.extend({_setRange:function(e){n.prototype._setRange.call(this,e.skipHiddenCells())},init:function(e){n.fn.init.call(this,e),this._value=e.value},exec:function(){var e=this.range();e.enable()&&(this.getState(),"format"===this.options.property&&this._workbook.trigger("changeFormat",{range:e}),e[this._property](this._value))}}),e.spreadsheet.ClearContentCommand=n.extend({exec:function(){return this.range().enable()?this.range().canEditArrayFormula()?(this.getState(),void this.range().skipHiddenCells().clearContent()):{reason:"error",type:"intersectsArray"}:{reason:"error",type:"cannotModifyDisabled"}}}),e.spreadsheet.EditCommand=r.extend({init:function(e){e.property=e.property||"input",r.fn.init.call(this,e)},rejectState:function(e){return this.undo(),{title:e.title,body:e.message,reason:"error",type:"validationError"}},_setRange:function(e){r.prototype._setRange.apply(this,arguments),this._editRange=this.options.arrayFormula?e:e.sheet().activeCellSelection()},getState:function(){this._state=this.range().getState()},exec:function(){var t,i,n=this.options.arrayFormula,o=this._editRange;if(!o.enable())return{reason:"error",type:"rangeDisabled"};if(!o.canEditArrayFormula())return{reason:"error",type:"intersectsArray"};if(t=this._value,this.getState(),"value"==this._property)return void o.value(t);try{if(o.link(null),""===t?o.value(null):(o.input(t,{arrayFormula:n}),/\n/.test(o.value())&&o.wrap(!0)),o._adjustRowHeight(),i=o._getValidationState())return this.rejectState(i)}catch(r){if(r instanceof e.spreadsheet.calc.ParseError)return{title:"Error in formula",body:r+"",reason:"error"};throw r}}}),e.spreadsheet.TextWrapCommand=r.extend({init:function(e){e.property="wrap",r.fn.init.call(this,e),this._value=e.value},getState:function(){var e={};this.range().forEachRow(function(t){var i=t.topLeft().row;e[i]=t.sheet().rowHeight(i)}),this._state=this.range().getState(this._property),this._rowHeight=e},undo:function(){var e,t=this.range().sheet(),i=this._rowHeight;this.range().setState(this._state);for(e in i)t.rowHeight(e,i[e])}}),e.spreadsheet.AdjustDecimalsCommand=n.extend({init:function(e){this._delta=e.value,e.property="format",n.fn.init.call(this,e)},exec:function(){var t=this.range().sheet(),i=this._delta,n=e.spreadsheet.formatting;this.getState(),t.batch(function(){this.range().forEachCell(function(e,o,r){var s,a=r.format;a||(s=r.value,"number"==typeof s&&/\./.test(s)&&(a="0."+(s+"").split(".")[1].replace(/\d/g,"0"))),(a||i>0)&&(a=n.adjustDecimals(a||"0",i),t.range(e,o).format(a))})}.bind(this))}}),e.spreadsheet.BorderChangeCommand=n.extend({init:function(e){e.property="border",n.fn.init.call(this,e),this._type=e.border,this._style=e.style},_batch:function(e){return this.range().sheet().batch(e,{})},exec:function(){var e=this;e.getState(),e._batch(function(){e[e._type](e._style)})},noBorders:function(){this.range().insideBorders(null),this.outsideBorders(null)},allBorders:function(e){this.range().insideBorders(e),this.outsideBorders(e)},leftBorder:function(e){this.range().leftColumn().borderLeft(e)},rightBorder:function(e){this.range().rightColumn().borderRight(e)},topBorder:function(e){this.range().topRow().borderTop(e)},bottomBorder:function(e){this.range().bottomRow().borderBottom(e)},outsideBorders:function(e){var t=this.range();t.leftColumn().borderLeft(e),t.topRow().borderTop(e),t.rightColumn().borderRight(e),t.bottomRow().borderBottom(e)},insideBorders:function(e){this.range().insideBorders(e),this.outsideBorders(null)},insideHorizontalBorders:function(e){this.range().insideHorizontalBorders(e)},insideVerticalBorders:function(e){this.range().insideVerticalBorders(e)}}),e.spreadsheet.MergeCellCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._type=e.value},exec:function(){this.getState(),this[this._type]()},activate:function(e){this.range().sheet().activeCell(e)},getState:function(){this._state=this.range().getState()},undo:function(){"unmerge"!==this._type&&(this.range().unmerge(),this.activate(this.range().topLeft())),this.range().setState(this._state)},cells:function(){var e=this.range(),t=e._ref;e.merge(),this.activate(t)},horizontally:function(){var e=this.range().topRow()._ref;this.range().forEachRow(function(e){e.merge()}),this.activate(e)},vertically:function(){var e=this.range().leftColumn()._ref;this.range().forEachColumn(function(e){e.merge()}),this.activate(e)},unmerge:function(){var e=this.range(),t=e._ref.topLeft;e.unmerge(),this.activate(t)}}),e.spreadsheet.FreezePanesCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._type=e.value},exec:function(){this.getState(),this._topLeft=this.range().topLeft(),this[this._type]()},getState:function(){this._state=this.range().sheet().getState()},undo:function(){this.range().sheet().setState(this._state)},panes:function(){var e=this._topLeft,t=this.range().sheet();t.frozenColumns(e.col).frozenRows(e.row)},rows:function(){var e=this._topLeft,t=this.range().sheet();t.frozenRows(e.row)},columns:function(){var e=this._topLeft,t=this.range().sheet();t.frozenColumns(e.col)},unfreeze:function(){var e=this.range().sheet();e.frozenRows(0).frozenColumns(0)}}),e.spreadsheet.PasteCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._clipboard.parse(),this._event=e.event,this._clipboardContent=this._clipboard._content,this._clipboardPasteRef=this._clipboard.pasteRef(),this._sheet=this._workbook.activeSheet(),this._range=this._sheet.range(this._clipboard.pasteRef()),this._state=this._range.getState()},exec:function(){var e,t,i=this._clipboard.canPaste();return i.canPaste?(e=this._workbook.activeSheet().selection(),t=this._workbook.trigger("paste",{range:e}),void(t?this._event.preventDefault():(this._sheet.range(this._clipboardPasteRef).setState(this._clipboardContent,this._clipboard),this._sheet.triggerChange({recalc:!0,ref:this._clipboardPasteRef}),e._adjustRowHeight()))):i.menuInvoked?{reason:"error",type:"useKeyboard"}:i.pasteOnMerged?{reason:"error",type:"modifyMerged"}:i.overflow?{reason:"error",type:"overflow"}:i.pasteOnDisabled?(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"}):{reason:"error"}}}),e.spreadsheet.AdjustRowHeightCommand=n.extend({exec:function(){var e=this.options,t=this._workbook.activeSheet(),i=e.range||t.range(e.rowIndex);i._adjustRowHeight()}}),e.spreadsheet.ToolbarPasteCommand=n.extend({exec:function(){return e.support.clipboard.paste?(this._workbook._view.clipboard.focus().select(),void document.execCommand("paste")):{reason:"error",type:"useKeyboard"}}}),e.spreadsheet.CutCommand=n.extend({_eventType:"cut",init:function(e){n.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._event=e.event},exec:function(){var e,t,i=this._clipboard.canCopy();if(i.canCopy){if(e=this._workbook.activeSheet().selection(),"cut"==this._eventType){if(!e.enable())return this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"};this.getState()}t=this._workbook.trigger(this._eventType,{range:e}),t?this._event.preventDefault():"cut"==this._eventType?this._clipboard.cut():this._clipboard.copy()}else{if(i.menuInvoked)return{reason:"error",type:"useKeyboard"};if(i.multiSelection)return{reason:"error",type:"unsupportedSelection"}}}}),e.spreadsheet.CopyCommand=e.spreadsheet.CutCommand.extend({_eventType:"copy",undo:i.noop}),e.spreadsheet.ToolbarCopyCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._clipboard=e.workbook.clipboard()},undo:i.noop,exec:function(){if(!e.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var i=this._workbook._view.clipboard;t(i.html()),i.trigger("copy")}}),e.spreadsheet.AutoFillCommand=n.extend({init:function(e){n.fn.init.call(this,e)},origin:function(e){this._origin=e},exec:function(){var t=this.range();if(!t.enable())return{reason:"error",type:"rangeDisabled"};if(t.intersectingArrayFormula())return{reason:"error",type:"intersectsArray"};this.getState();try{t.fillFrom(this._origin)}catch(i){if(i instanceof e.spreadsheet.Range.FillError)return{reason:"error",type:i.code};throw i}}}),e.spreadsheet.ToolbarCutCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._clipboard=e.workbook.clipboard()},exec:function(){if(!e.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var i=this._workbook._view.clipboard;t(i.html()),i.trigger("cut")}}),e.spreadsheet.FilterCommand=n.extend({undo:function(){this.range().filter(this._state)},exec:function(){var e=this.range();this._state=e.hasFilter(),e.filter(!this._state)}}),e.spreadsheet.SortCommand=n.extend({undo:function(){var e=this.range().sheet();e.setState(this._state)},exec:function(){var e,t=this.range(),i=t.sheet(),n=i.activeCell(),o=this.options.sheet?n.topLeft.col:this.options.column||0,r="asc"===this.options.value;return this._state=i.getState(),this.options.sheet&&(t=this.expandRange()),(e=t.cantSort())?{reason:"error",type:e.code}:void t.sort({column:o,ascending:r})},expandRange:function(){var t=this.range().sheet();return new e.spreadsheet.Range(t._sheetRef,t)}}),s=e.spreadsheet.ApplyFilterCommand=n.extend({column:function(){return this.options.column||0},undo:function(){var e=this.range().sheet();e.clearFilter(this.column()),this._state.length&&this.range().filter(this._state)},getState:function(){var e=this.range().sheet(),t=e.filter();t&&(this._state=t.columns.filter(function(e){return e.index==this.column()}.bind(this)))},exec:function(){var t,i,n=this.range(),o=this.column(),r=n.sheet().filter(),s=!1;this.options.valueFilter?i={column:o,filter:new e.spreadsheet.ValueFilter(this.options.valueFilter)}:this.options.customFilter&&(i={column:o,filter:new e.spreadsheet.CustomFilter(this.options.customFilter)}),this.getState(),r&&r.ref.eq(n._ref)&&r.columns.length?(r.columns.forEach(function(e){e.index===o&&(s=!0)}),t=r.columns.map(function(e){return e.index===o?i:{column:e.index,filter:e.filter}}),s||t.push(i)):t=i,n.filter(t)}}),e.spreadsheet.ClearFilterCommand=s.extend({exec:function(){var e=this.range(),t=this.column();this.getState(),e.clearFilter(t)}}),e.spreadsheet.HideLineCommand=n.extend({init:function(e){n.fn.init.call(this,e),this.axis=e.axis},undo:function(){var e=this.range().sheet();e.setAxisState(this._state)},exec:function(){var e=this.range().sheet();this._state=e.getAxisState(),"row"==this.axis?e.axisManager().hideSelectedRows():e.axisManager().hideSelectedColumns()}}),e.spreadsheet.UnHideLineCommand=e.spreadsheet.HideLineCommand.extend({exec:function(){var e=this.range().sheet();this._state=e.getAxisState(),"row"==this.axis?e.axisManager().unhideSelectedRows():e.axisManager().unhideSelectedColumns()}}),a=n.extend({exec:function(){this._expandedRange=this._expand(this.range()),this._state=this._expandedRange.getState(),this._indexes=this._exec(this._expandedRange.sheet())},undo:function(){var e=this,t=e._expandedRange,i=t.sheet();i.batch(function(){e._indexes.forEach(function(t){e._undoOne(i,t),i._restoreModifiedFormulas(t.formulas)}),t.setState(e._state)},{layout:!0,recalc:!0,ref:t._ref})}}),e.spreadsheet.DeleteRowCommand=a.extend({_expand:function(e){return e.resize({left:-(1/0),right:+(1/0)})},_exec:function(e){return e.axisManager().deleteSelectedRows()},_undoOne:function(e,t){e.insertRow(t.index),e.rowHeight(t.index,t.height)}}),e.spreadsheet.DeleteColumnCommand=a.extend({_expand:function(e){return e.resize({top:-(1/0),bottom:+(1/0)})},_exec:function(e){return e.axisManager().deleteSelectedColumns()},_undoOne:function(e,t){e.insertColumn(t.index),e.columnWidth(t.index,t.width)}}),l=n.extend({init:function(e){n.fn.init.call(this,e),this._value=e.value},undo:function(){var e=this,t=e.range().sheet();t.batch(function(){for(var i=e._pos.count;--i>=0;)e._undoOne(t,e._pos.base)},{layout:!0,recalc:!0})}}),e.spreadsheet.AddColumnCommand=l.extend({exec:function(){var e=this.range().sheet(),t=e.axisManager().preventAddColumn();return t?t:void(this._pos="left"===this._value?e.axisManager().addColumnLeft():e.axisManager().addColumnRight())},_undoOne:function(e,t){e.deleteColumn(t)}}),e.spreadsheet.AddRowCommand=l.extend({exec:function(){var e=this.range().sheet(),t=e.axisManager().preventAddRow();return t?t:void(this._pos="above"===this._value?e.axisManager().addRowAbove():e.axisManager().addRowBelow())},_undoOne:function(e,t){e.deleteRow(t)}}),e.spreadsheet.EditValidationCommand=n.extend({init:function(e){n.fn.init.call(this,e),this._value=e.value},exec:function(){this.range().validation(this._value)}}),e.spreadsheet.OpenCommand=n.extend({cannotUndo:!0,exec:function(){var e,t=this.options.file;return null===t.name.match(/.xlsx$/i)?{reason:"error",type:"openUnsupported"}:(e=this.options.workbook,void e.fromFile(this.options.file).then(function(){var t=e.excelImportErrors;t&&t.length&&e._view.openDialog("importError",{errors:t})}))}}),e.spreadsheet.SaveAsCommand=n.extend({exec:function(){var e=this.options.name+this.options.extension;".xlsx"===this.options.extension?this.options.workbook.saveAsExcel({fileName:e}):".pdf"===this.options.extension&&this.options.workbook.saveAsPDF(i.extend(this.options.pdf,{workbook:this.options.workbook,fileName:e}))}}),c=n.extend({init:function(e){n.fn.init.call(this,e),this._name=e.name,this._value=e.value},getState:function(){this._state=this._workbook.nameDefinition(this._name)},setState:function(){this._workbook.nameDefinition(this._name,this._state),this._workbook.trigger("change",{recalc:!0})}}),e.spreadsheet.DefineNameCommand=c.extend({exec:function(){this.getState();try{this._workbook.defineName(this._name,this._value),this._workbook.trigger("change",{recalc:!0})}catch(e){return{title:"Error",body:e+"",reason:"error"}}}}),e.spreadsheet.DeleteNameCommand=c.extend({exec:function(){this.getState(),this._workbook.undefineName(this._name),this._workbook.trigger("change",{recalc:!0})}}))}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/formulabar.min",["kendo.core.min"],e)}(function(){!function(e){var t,i,n;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,i={wrapper:"k-spreadsheet-formula-bar"},n=e.ui.Widget.extend({init:function(i,o){e.ui.Widget.call(this,i,o),i=this.element.addClass(n.classNames.wrapper),this.formulaInput=new e.spreadsheet.FormulaInput(t("<div/>").appendTo(i))},destroy:function(){this.formulaInput&&this.formulaInput.destroy(),this.formulaInput=null}}),e.spreadsheet.FormulaBar=n,t.extend(!0,n,{classNames:i}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/formulainput.min",["kendo.core.min"],e)}(function(){!function(e,t){function i(e){return"("==e||"["==e||"{"==e}function n(e){return")"==e||"]"==e||"}"==e}function o(e,t){return"("==t?")"==e:"["==t?"]"==e:"{"==t&&"}"==e}function r(e,t){return e.begin<=t.begin&&e.end>=t.end}function s(t){return e.spreadsheet.calc.runtime.FUNCS[t.toLowerCase()]}function a(e,t){return!(!e||!t)&&("ref"==e.type&&"ref"==t.type?e.ref.eq(t.ref):e.value===t.value)}var l,c,d,u,h,p,f,m,g;e.support.browser.msie&&e.support.browser.version<9||(l=e.jQuery,c=e.ui.Widget,d=".kendoFormulaInput",u=e.keys,h={wrapper:"k-spreadsheet-formula-input",listWrapper:"k-spreadsheet-formula-list"},p=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],f={27:"esc",37:"left",39:"right",35:"end",36:"home",32:"spacebar"},m=/(^_|[^a-z0-9]$)/i,g=c.extend({init:function(e,t){c.call(this,e,t),e=this.element,e.addClass(g.classNames.wrapper).attr("contenteditable",!0).attr("spellcheck",!1).css("white-space","pre"),this.options.autoScale&&e.on("input",this.scale.bind(this)),this._highlightedRefs=[],this._staticTokens=[],this._formulaSource(),this._formulaList(),this._popup(),this._tooltip(),e.on("keydown",this._keydown.bind(this)).on("keyup",this._keyup.bind(this)).on("blur",this._blur.bind(this)).on("input click",this._input.bind(this)).on("focus",this._focus.bind(this)).on("paste",this._paste.bind(this))},options:{name:"FormulaInput",autoScale:!1,filterOperator:"startswith",scalePadding:30,minLength:1},events:["keyup","focus"],enable:function(e){return void 0===e?"true"===this.element.attr("contenteditable"):(e?this.element.attr("contenteditable",e):this.element.removeAttr("contenteditable"),void this.element.toggleClass("k-state-disabled",!e))},getPos:function(){function e(e,t){try{!function o(i){if(i===e)throw t;if(1==i.nodeType)for(var n=i.firstChild;n;n=n.nextSibling)o(n);else 3==i.nodeType&&(t+=i.nodeValue.length)}(n)}catch(i){return i}}var i,n=this.element[0],o=t.getSelection(),r=e(o.focusNode,o.focusOffset),s=e(o.anchorNode,o.anchorOffset);if(null!=r&&null!=s)return r>s&&(i=r,r=s,s=i),{begin:r,end:s,collapsed:r==s}},setPos:function(e,i){function n(e,t){return e.startOffset!=t.startOffset||e.endOffset!=t.endOffset||e.startContainer!=t.endContainer||e.endContainer!=t.endContainer}function o(e,t){try{!function n(e){var i,o;if(3==e.nodeType){if(i=e.nodeValue.length,i>=t)throw e;t-=i}else if(1==e.nodeType)for(o=e.firstChild;o;o=o.nextSibling)n(o)}(e)}catch(i){return{node:i,pos:t}}}var r,s,a,l=this.element[0];e=o(l,e),i=null!=i?o(l,i):e,e&&i&&(r=document.createRange(),r.setStart(e.node,e.pos),r.setEnd(i.node,i.pos),s=t.getSelection(),a=s.getRangeAt(0),n(r,a)&&(s.removeAllRanges(),s.addRange(r)))},end:function(){this.setPos(this.length())},home:function(){this.setPos(0)},select:function(){this.setPos(0,this.length())},length:function(){return this.value().length},_formulaSource:function(){var t,i,n=[];for(i in e.spreadsheet.calc.runtime.FUNCS)m.test(i)||(t=i.toUpperCase(),n.push({value:t,text:t}));this.formulaSource=new e.data.DataSource({data:n})},_formulaList:function(){this.list=new e.ui.StaticList(l("<ul />").addClass(g.classNames.listWrapper).insertAfter(this.element),{autoBind:!1,selectable:!0,change:this._formulaListChange.bind(this),dataSource:this.formulaSource,dataValueField:"value",template:"#:data.value#"}),this.list.element.on("mousedown",function(e){e.preventDefault()})},_formulaListChange:function(){var e,t,i,n=this._tokenContext();n&&!this._mute&&(e=n.token,t=this.list.value()[0],i={replace:!0,token:e,end:e.end},n.nextToken&&"("==n.nextToken.value||(t+="("),this._replaceAt(i,t),this.popup.close())},_popup:function(){this.popup=new e.ui.Popup(this.list.element,{anchor:this.element})},_blur:function(){this.popup.close(),clearTimeout(this._focusId),this.trigger("blur")},_isFormula:function(){return/^=/.test(this.value())},_keydown:function(e){var t=e.keyCode;f[t]?(this.popup.close(),this._navigated=!0):this._move(t)&&(this._navigated=!0,e.preventDefault()),this._keyDownTimeout=setTimeout(this._syntaxHighlight.bind(this))},_keyup:function(){var e,t=this.popup;this._isFormula()&&!this._navigated&&(e=((this._tokenContext()||{}).token||{}).value,this.filter(e),e&&this.formulaSource.view().length?(t[t.visible()?"position":"open"](),this.list.focusFirst()):t.close()),this._navigated=!1,this._syntaxHighlight(),this.trigger("keyup")},_input:function(){this._syntaxHighlight()},_focus:function(){setTimeout(this._sync.bind(this)),this._focusTimeout=setTimeout(this._syntaxHighlight.bind(this)),this.trigger("focus")},_paste:function(i){var n,o,r;i.preventDefault(),n=this.getPos(),o=e.support.browser.msie?t.clipboardData.getData("Text"):i.originalEvent.clipboardData.getData("text/plain"),r=this.value(),r=r.substr(0,n.begin)+o+r.substr(n.end),this.value(r),this.setPos(n.begin+o.length),this.scale()},_move:function(e){var t=this.list,i=this.popup;if(i.visible()){if(e===u.DOWN)return t.focusNext(),t.focus()||t.focusFirst(),!0;if(e===u.UP)return t.focusPrev(),t.focus()||t.focusLast(),!0;if(e===u.ENTER)return t.select(t.focus()),i.close(),!0;if(e===u.TAB)return t.select(t.focus()),i.close(),!0;if(e===u.PAGEUP)return t.focusFirst(),!0;if(e===u.PAGEDOWN)return t.focusLast(),!0}return e===u.ENTER||e===u.TAB},_tokenContext:function(){var t,i,n,o=this.getPos(),s=this.value();if(!s||!o||!o.collapsed)return null;for(t=e.spreadsheet.calc.tokenize(s,this.row(),this.col()),n=0;n<t.length;++n)if(i=t[n],r(i,o)&&/^(?:str|sym|func)$/.test(i.type))return{token:i,nextToken:t[n+1]};return null},_sync:function(){this._editorToSync&&this.isActive()&&this._editorToSync.value(this.value())},_textContainer:function(){var t=e.getComputedStyles(this.element[0],p);t.position="absolute",t.visibility="hidden",t.whiteSpace="pre",t.top=-3333,t.left=-3333,this._span=l("<span style='white-space: pre'/>").css(t).insertAfter(this.element)},_tooltip:function(){this._cellTooltip=l('<div class="k-widget k-tooltip" style="position:absolute; display:none">A1</div>').insertAfter(this.element)},tooltip:function(e){this._cellTooltip.text(e)},toggleTooltip:function(e){this._cellTooltip.toggle(e)},isActive:function(){return this.element[0]===e._activeElement()},filter:function(e){!e||e.length<this.options.minLength||(this._mute=!0,this.list.select(-1),this._mute=!1,this.formulaSource.filter({field:this.list.options.dataValueField,operator:this.options.filterOperator,value:e}))},hide:function(){this.enable(!1),this.element.hide(),this._cellTooltip.hide()},show:function(){this.enable(!0),this.element.show()},row:function(){if(this.activeCell)return this.activeCell.row},col:function(){if(this.activeCell)return this.activeCell.col},position:function(e){e&&(this.show(),this.element.css({top:e.top+1+"px",left:e.left+1+"px"}),this._cellTooltip.css({top:e.top-this._cellTooltip.height()-10+"px",left:e.left}))},resize:function(e){e&&this.element.css({width:e.width-1,height:e.height-1})},canInsertRef:function(e){var t,i=this._canInsertRef(e),n=i&&i.token;if(n)for(t=0;t<this._staticTokens.length;t++)if(a(n,this._staticTokens[t]))return null;return i},_canInsertRef:function(t){function n(e){return e.begin>l.begin}function o(e){if(e){if(/^(?:num|str|bool|sym|ref)$/.test(e.type))return{replace:!0,token:e,end:e.end};if(/^(?:op|punc|startexp)$/.test(e.type))return e.end==l.end?s(e,c[u+1]):s(c[u-1],e)}}function s(e,t){if(null==e)return null;if(null==t)return/^(?:op|startexp)$/.test(e.type)||i(e.value)?{token:e,end:l.end}:null;if(a){if("op"==e.type&&/^(?:punc|op)$/.test(t.type))return{token:e,end:l.end}}else{if("startexp"==e.type)return{token:e,end:l.end};if(/^(?:op|punc)$/.test(e.type)&&/^[,;({]$/.test(e.value))return{token:e,end:l.end};if(/^(?:ref|sym)/.test(e.type))return{token:e,replace:!0,end:e.end};if(/^(?:ref|sym)/.test(t.type))return{token:t,replace:!0,end:t.end}}return!1}var a,l,c,d,u;if(this.popup.visible())return null;if(a=t,l=this.getPos(),l&&this._isFormula()){if(0===l.begin)return null;for(c=e.spreadsheet.calc.tokenize(this.value(),this.row(),this.col()),u=0;u<c.length;++u){if(d=c[u],r(d,l))return o(d);if(n(d))return s(c[u-1],d)}return s(d,null)}return null},refAtPoint:function(e){var t,i=this._canInsertRef();i&&(t=e.selection()._ref.simplify().clone().relative(0,0,3),e!==this.activeSheet&&(t=t.setSheet(e.name(),!0)),this._replaceAt(i,t.print(0,0)))},_replaceAt:function(e,t){var i,n=this.value(),o=e.token,r=n.substr(e.end);n=n.substr(0,e.replace?o.begin:e.end)+t,i=n.length,n+=r,this._value(n),this.setPos(i),this.scale(),this._syntaxHighlight()},syncWith:function(t){var i,n=this,o="input"+d,r=n._sync.bind(n);e.support.browser.msie&&(o="keydown"+d,i=function(){setTimeout(r)}),n._editorToSync=t,n.element.off(o).on(o,i||r)},scale:function(){var e,t,i=this.element;this._span||this._textContainer(),this._span.html(i.html()),e=this._span.width()+this.options.scalePadding,t=this._span.height(),e>i.width()&&i.width(e),t>i.height()&&i.height(t),this._sync()},_value:function(e){this.element.text(e)},value:function(e){if(void 0===e){var t=this.element[0].innerText;return t.replace(/\n$/,"")}this._value(e),this._syntaxHighlight()},highlightedRefs:function(){return this._highlightedRefs.slice()},_syntaxHighlight:function(){var t,a=this.getPos(),l=this.value(),c=e.spreadsheet.Pane.classNames.series,d=[],u=0,h=[],p=[];if(!a||a.collapsed){if(!/^=/.test(l))return(this._staticTokens.length||this._highlightedRefs.length)&&(this._staticTokens=[],this._highlightedRefs=[],this.element.text(l)),void(this.popup&&this.popup.close());p=e.spreadsheet.calc.tokenize(l,this.row(),this.col()),p.forEach(function(e){if(e.active=!1,e.cls=["k-syntax-"+e.type],"ref"==e.type&&(e.colorClass=c[u++%c.length],e.cls.push(e.colorClass),d.push(e)),a&&"punc"==e.type)if(i(e.value))h.unshift(e);else if(n(e.value)){var l=h.shift();l?o(e.value,l.value)?(r(e,a)||r(l,a))&&(e.cls.push("k-syntax-paren-match"),l.cls.push("k-syntax-paren-match")):(e.cls.push("k-syntax-error"),l.cls.push("k-syntax-error")):e.cls.push("k-syntax-error")}a&&r(e,a)&&(e.cls.push("k-syntax-at-point"),e.active=!0,t=e),"func"!=e.type||s(e.value)||a&&r(e,a)||e.cls.push("k-syntax-error")}),p.reverse().forEach(function(t){var i=t.begin,n=t.end,o=e.htmlEncode(l.substring(i,n));l=l.substr(0,i)+"<span class='"+t.cls.join(" ")+"'>"+o+"</span>"+l.substr(n)}),this.element.html(l),a&&this.setPos(a.begin,a.end),t&&/^(?:startexp|op|punc)$/.test(t.type)&&this._setStaticTokens(p),this._highlightedRefs=d}},_setStaticTokens:function(e){var t,i;for(this._staticTokens=[],t=0;t<e.length;t++)i=e[t],/^(?:num|str|bool|sym|ref)$/.test(i.type)&&this._staticTokens.push(i)},destroy:function(){this._editorToSync=null,this.element.off(d),clearTimeout(this._focusTimeout),clearTimeout(this._keyDownTimeout),this._cellTooltip=null,this._span=null,this.popup.destroy(),this.popup=null,c.fn.destroy.call(this)},insertNewline:function(){var e=this.value(),t=this.getPos(),i=t.end==e.length;e=e.substr(0,t.begin)+(i?"\n\n":"\n"+e.substr(t.end)),this.value(e),this.setPos(t.begin+1)}}),e.spreadsheet.FormulaInput=g,l.extend(!0,g,{classNames:h}))}(kendo,window)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/eventlistener.min",["kendo.core.min"],e)}(function(){!function(e){var t,i,n,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,i={8:"backspace",9:"tab",13:"enter",27:"esc",37:"left",38:"up",39:"right",40:"down",35:"end",36:"home",32:"spacebar",33:"pageup",34:"pagedown",46:"delete",113:":edit"},n=navigator.platform.toUpperCase().indexOf("MAC")>=0,o=function(e){return e>47&&e<58||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223||229===e},r=function(e){var t=e.keyCode,n=i[t];return!n&&o(t)&&(n=":alphanum"),!n&&e.key&&1==e.key.length&&(n=":alphanum"),n},s=e.Class.extend({init:function(e,i,n){if(this._handlers={},this.target=e,this._observer=i||window,this.keyDownProxy=this.keyDown.bind(this),this.mouseProxy=this.mouse.bind(this),this.threshold=5,this._pressLocation=null,e.on("keydown",this.keyDownProxy),e.on("contextmenu mousedown cut copy paste scroll wheel click dblclick focus",this.mouseProxy),t(document.documentElement).on("mousemove mouseup",this.mouseProxy),n)for(var o in n)this.on(o,n[o])},keyDown:function(e){this.handleEvent(e,r(e.originalEvent))},mouse:function(e){var t,i,n,o,r;e.which?t=3==e.which:e.button&&(t=2==e.button),i=e.type,"mousedown"===i&&(t?i="rightmousedown":this._pressLocation={x:e.pageX,y:e.pageY}),"mouseup"===i&&(t||(this._pressLocation=null)),"mousemove"===i&&this._pressLocation&&(n=this._pressLocation.x-e.pageX,o=this._pressLocation.y-e.pageY,r=Math.sqrt(n*n+o*o),r>this.threshold&&(i="mousedrag")),this.handleEvent(e,i)},handleEvent:function(e,t){var i,o,r="";e.mod=n?e.metaKey:e.ctrlKey&&!e.altKey,e.altKey&&(r+="alt+"),e.shiftKey&&(r+="shift+"),e.ctrlKey&&(r+="ctrl+"),r+=t,i=this._handlers["*+"+t],i&&i.call(this._observer,e,r),o=this._handlers[r],o&&o.call(this._observer,e,r)},on:function(e,t){var i=this._handlers;"string"==typeof t&&(t=this._observer[t]),"string"==typeof e&&(e=e.split(",")),e.forEach(function(e){i[e]=t})},destroy:function(){this.target.off("keydown",this.keyDownProxy),this.target.off("keydown",this.mouseProxy),t(document.documentElement).off("mousemove mouseup",this.mouseProxy)}}),e.spreadsheet.EventListener=s)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/rangelist.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){if(e.left.level===e.level){var t=e;e=e.left,t.left=e.right,e.right=t}return e}function i(e){if(e.right.right.level===e.level){var t=e;e=e.right,t.right=e.left,e.left=t,e.level+=1}return e}function n(e,o){return e===c?new l(1,o,c,c):(e.value.start>o.start?e.left=n(e.left,o):e.right=n(e.right,o),i(t(e)))}function o(e,n){var r,s;if(e===c)return e;if(r=e.value.start-n.start,0===r)if(e.left!==c&&e.right!==c){for(s=e.left;s.right!==c;)s=s.right;e.value=s.value,e.left=o(e.left,e.value)}else e=e.left===c?e.right:e.left;else r>0?e.left=o(e.left,n):e.right=o(e.right,n);return(e.left.level<e.level-1||e.right.level<e.level-1)&&(e.level-=1,e.right.level>e.level&&(e.right.level=e.level),e=t(e),e.right=t(e.right),e.right.right=t(e.right.right),e=i(e),e.right=i(e.right)),e}function r(e,t){e!==c&&(r(e.left,t),t.push(e.value),r(e.right,t))}function s(e,t,i){if(e!==c){var n=e.value;t.start<n.start&&s(e.left,t,i),n.intersects(t)&&i.push(n),t.end>n.end&&s(e.right,t,i)}}function a(e,t,i){t!==c&&(a(e,t.left,i),e.insert(i(t.value)),a(e,t.right,i))}var l,c,d,u,h,p,f;e.support.browser.msie&&e.support.browser.version<9||(l=e.Class.extend({init:function(e,t,i,n){this.level=e,this.value=t,this.left=i,this.right=n}}),c=new function(){this.left=this,this.right=this,this.level=0},d=e.Class.extend({init:function(e,t,i){this.start=e,this.end=t,this.value=i},intersects:function(e){return e.start<=this.end&&e.end>=this.start},clone:function(){return new d(this.start,this.end,this.value)}}),u=e.Class.extend({init:function(){this.root=c},insert:function(e){this.root=n(this.root,e)},remove:function(e){this.root=o(this.root,e)},findrange:function(e){for(var t=this.root;t!=c;)if(e<t.value.start)t=t.left;else{if(!(e>t.value.end))return t.value;t=t.right}return null},values:function(){var e=[];return r(this.root,e),e},intersecting:function(e,t){var i=[];return s(this.root,new d(e,t),i),i},map:function(e){var t=new u;return a(t,this.root,e),t},clone:function(){return this.map(function(e){return e.clone()})},first:function(){for(var e=this.root;e.left!=c;)e=e.left;return e},last:function(){for(var e=this.root;e.right!=c;)e=e.right;return e}}),h=e.Class.extend({init:function(e,t,i){void 0===t?this.tree=e:(this.tree=new u,this.tree.insert(new d(e,t,i)))},values:function(){return this.tree.values()},map:function(e){return new h(this.tree.map(e))},intersecting:function(e,t){return this.tree.intersecting(e,t)},first:function(){return this.tree.first().value},last:function(){return this.tree.last().value},insert:function(e,t,i){return this.tree.insert(new d(e,t,i))},value:function(e,t,i){var n,o,r,s,a,l,c,d,u;if(void 0===i)return void 0===t&&(t=e),this.intersecting(e,t)[0].value;if(n=this.tree.intersecting(e-1,t+1),n.length)for(o=n[0],r=n[n.length-1],o.end<e&&(o.value===i?e=o.start:n.shift()),r.start>t&&(r.value===i?t=r.end:n.pop()),s=0,a=n.length;s<a;s++)l=n[s],c=l.value,
d=l.start,u=l.end,this.tree.remove(l),d<e&&(c!==i?this.insert(d,e-1,c):e=d),u>t&&(c!==i?this.insert(t+1,u,c):t=u);this.insert(e,t,i)},expandedValues:function(e,t){var i,n=this.intersecting(e,t),o=[],r=0;for(i=e;i<=t;i++)n[r].end<i&&r++,o.push({index:i-e,value:n[r].value});return o},sortedIndices:function(e,t,i,n){var o=this.expandedValues(e,t),r=function(e,t){return e.value===t.value?e.index-t.index:i(e.value,t.value)};return n&&(r=function(e,t){var o=n[e.index],r=n[t.index];return o.value===r.value?i(e.value,t.value):e.index-t.index}),o.sort(r),o},sort:function(e,t,i){var n,o,r;if(1!==this.intersecting(e,t).length)for(n=this.expandedValues(e,t),o=0,r=i.length;o<r;o++)this.value(o+e,o+e,n[i[o].index].value)},copy:function(e,t,i){var n,o,r,s,a,l=this.intersecting(e,t),c=i;for(o=0,r=l.length;o<r;o++)s=l[o].start,s<e&&(s=e),a=l[o].end,a>t&&(a=t),n=c+(a-s),this.value(c,n,l[o].value),c=++n},iterator:function(e,t){return new p(e,t,this.intersecting(e,t))},getState:function(){return this.tree.clone()},setState:function(e){this.tree=e.clone()}}),p=e.Class.extend({init:function(e,t,i){this.start=e,this.end=t,this.index=0,this.ranges=i},unique:function(){return this.ranges.map(function(e){return e.value})},at:function(e){for(;this.ranges[this.index]&&this.ranges[this.index].end<e;)this.index++;return this.ranges[this.index]&&this.ranges[this.index].value},forEach:function(e){for(var t=this.start;t<=this.end;t++)e(this.at(t),t);this.index=0}}),f=h.extend({init:function(e,t,i){this.tree=new u,this.range=new d(e,t,i)},intersecting:function(e,t){var i,n,o,r=this.tree.intersecting(e,t),s=[];if(!r.length)return[this.range];for(n=0,o=r.length;n<o;n++)i=r[n],i.start>e&&s.push(new d(e,i.start-1,this.range.value)),s.push(i),e=i.end+1;return i.end<t&&s.push(new d(i.end+1,t,this.range.value)),s},insert:function(e,t,i){i!==this.range.value&&this.tree.insert(new d(e,t,i))},lastRangeStart:function(){var e=this.tree.root;if(e===c)return this.range.start;for(;e.right!==c;)e=e.right;return e.value.end+1}}),e.spreadsheet.RangeTree=u,e.spreadsheet.RangeList=h,e.spreadsheet.SparseRangeList=f,e.spreadsheet.ValueRange=d)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/propertybag.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}function i(e){return e=e.clone(),e.value=e.value.deepClone(),e}function n(){var e=this.map(i);return e.clone=n,e}var o,r,s;e.support.browser.msie&&e.support.browser.version<9||(o=e.Class.extend({init:function(e){this.list=e},get:function(e){return this.parse(this.list.value(e,e))},set:function(e,t,i){void 0===i&&(i=t,t=e),this.list.value(e,t,i)},parse:function(e){return e},copy:function(e,t,i){this.list.copy(e,t,i)},iterator:function(e,t){return this.list.iterator(e,t)}}),r=o.extend({set:function(e,t,i){this.list.value(e,t,JSON.stringify(i))},parse:function(e){return JSON.parse(e)}}),s=o.extend({init:function(e,t){o.prototype.init.call(this,e),this.formats=t},set:function(i,n,o){o instanceof Date&&(o=e.spreadsheet.dateToNumber(o),this.formats.value(i,n)||this.formats.value(i,n,t(e.culture().calendar.patterns.d))),this.list.value(i,n,o)}}),e.spreadsheet.PropertyBag=e.Class.extend({specs:[{property:o,name:"format",value:null,sortable:!0,serializable:!0},{property:s,name:"value",value:null,sortable:!0,serializable:!0,depends:"format"},{property:o,name:"formula",value:null,sortable:!0,serializable:!0},{property:o,name:"background",value:null,sortable:!0,serializable:!0},{property:r,name:"vBorders",value:null,sortable:!1,serializable:!1},{property:r,name:"hBorders",value:null,sortable:!1,serializable:!1},{property:o,name:"color",value:null,sortable:!0,serializable:!0},{property:o,name:"fontFamily",value:null,sortable:!0,serializable:!0},{property:o,name:"underline",value:null,sortable:!0,serializable:!0},{property:o,name:"fontSize",value:null,sortable:!0,serializable:!0},{property:o,name:"italic",value:null,sortable:!0,serializable:!0},{property:o,name:"bold",value:null,sortable:!0,serializable:!0},{property:o,name:"textAlign",value:null,sortable:!0,serializable:!0},{property:o,name:"verticalAlign",value:null,sortable:!0,serializable:!0},{property:o,name:"wrap",value:null,sortable:!0,serializable:!0},{property:o,name:"validation",value:null,sortable:!1,serializable:!0},{property:o,name:"enable",value:null,sortable:!1,serializable:!0},{property:o,name:"link",value:null,sortable:!0,serializable:!0},{property:o,name:"editor",value:null,sortable:!0,serializable:!0}],init:function(t,i,o){o=o||{};var r=t*i-1;this.rowCount=t,this.columnCount=i,this.cellCount=r,this.properties={},this.lists={},this.specs.forEach(function(t){var i,n=t.name,s=o[n];void 0===s&&(s=t.value),this.lists[n]=new e.spreadsheet.SparseRangeList(0,r,s),i=this.properties[n]=new t.property(this.lists[n],this.lists[t.depends]),i.spec=t},this),this.lists.formula.tree.clone=n,this.lists.validation.tree.clone=n},getState:function(){var e={};return this.specs.forEach(function(t){e[t.name]=this.lists[t.name].getState()},this),e},setState:function(e){this.specs.forEach(function(t){this.lists[t.name].setState(e[t.name])},this)},get:function(e,t){if(void 0===t)return this.lists[e];switch(e){case"borderRight":t+=this.rowCount;case"borderLeft":e="vBorders";break;case"borderBottom":t++;case"borderTop":e="hBorders"}return t>this.cellCount?null:this.properties[e].get(t)},set:function(e,t,i,n){switch(e){case"borderRight":t+=this.rowCount,i+=this.rowCount;case"borderLeft":e="vBorders";break;case"borderBottom":t++,i++;case"borderTop":e="hBorders"}t<=i&&i<=this.cellCount&&this.properties[e].set(t,i,n)},fromJSON:function(e,t){var i,n;for(i=0;i<this.specs.length;i++)n=this.specs[i],n.serializable&&void 0!==t[n.name]&&this.set(n.name,e,e,t[n.name],!1);["borderLeft","borderRight","borderTop","borderBottom"].forEach(function(i){void 0!==t[i]&&this.set(i,e,e,t[i])},this)},copy:function(e,t,i){this.specs.forEach(function(n){this.properties[n.name].copy(e,t,i)},this)},iterator:function(e,t,i){var n=this.properties[e],o=n.iterator(t,i),r=o.at,s=this.cellCount;return o.at=function(e){return e>s?null:n.parse(r.call(o,e))},o.name=e,o.value=n.spec.value,o},sortable:function(){return this.specs.filter(function(e){return e.sortable}).map(function(e){return this.lists[e.name]},this)},iterators:function(e,t){return this.specs.reduce(function(i,n){return n.serializable&&i.push(this.iterator(n.name,e,t)),i}.bind(this),[])},forEach:function(e,t,i){function n(e,t,i){var n=t.at(i);n!==t.value&&(o[e]=n)}var o,r,s,a,l,c=this.iterators(e,t),d=this.iterator("hBorders",e,t+1),u=this.iterator("vBorders",e,t),h=this.iterator("vBorders",e+this.rowCount,t+this.rowCount);for(r=e;r<=t;r++){for(o={},s=0;s<c.length;s++)a=c[s],l=a.at(r),l!==a.value&&(o[a.name]=l);n("borderLeft",u,r),n("borderRight",h,r+this.rowCount),n("borderTop",d,r),(r+1)%this.rowCount&&n("borderBottom",d,r+1),i(o)}},forEachProperty:function(e){for(var t in this.properties)e(this.properties[t])}}),e.spreadsheet.ALL_PROPERTIES=e.spreadsheet.PropertyBag.prototype.specs.reduce(function(e,t){return t.serializable&&e.push(t.name),e},["borderTop","borderRight","borderBottom","borderLeft"]))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/references.min",["kendo.core.min"],e)}(function(){"use strict";function e(t){var i=Math.floor(t/26)-1;return(i>=0?e(i):"")+String.fromCharCode(65+t%26)}function t(e){return/^[a-z_][a-z0-9_]*$/i.test(e)?e:"'"+e.replace(/\x27/g,"\\'")+"'"}function i(i,n,o,r){var s="";return++n,isFinite(n)?null==r||2&r||(n="$"+n):n="",isFinite(o)?(s=e(o),null==r||1&r||(s="$"+s)):o="",i?t(i)+"!"+s+n:s+n}var n,o,r,s,a,l,c,d;kendo.support.browser.msie&&kendo.support.browser.version<9||(n=kendo.spreadsheet,o=kendo.Class,r=o.extend({type:"ref",sheet:"",clone:function(){return this},hasSheet:function(){return this._hasSheet},simplify:function(){return this},setSheet:function(e,t){return this.sheet=e,null!=t&&(this._hasSheet=t),this},absolute:function(){return this},relative:function(){return this},adjust:function(){return this},toString:function(){return this.relative(0,0,3,3).print(0,0)},forEach:function(e,t){e.call(t,this)},map:function(e,t){return e.call(t,this)},intersects:function(e){return this.intersect(e)!==s},isCell:function(){return!1},toRow:function(){return this},toColumn:function(){return this},first:function(){return this},lastRange:function(){return this},size:function(){return 1},rangeAt:function(){return this},nextRangeIndex:function(){return 0},previousRangeIndex:function(){return 0},eq:function(e){var t,i,n,o,r=this,a=e;if(r===s||a===s)return r===a;if((a instanceof l||a instanceof c&&!(r instanceof l))&&(r=e,a=this),r instanceof l)return a=a.simplify(),a instanceof l&&r.row==a.row&&r.col==a.col&&r.sheet==a.sheet;if(r instanceof c){if(a instanceof c)return a.topLeft.eq(r.topLeft)&&a.bottomRight.eq(r.bottomRight);if(a instanceof d)return a.single()&&r.eq(a.refs[0])}else if(r instanceof d&&a instanceof d){if(t=r.refs,i=a.refs,t.length!=i.length)return!1;for(n=0,o=t.length;n<o;n++)if(!t[n].eq(i[n]))return!1;return!0}return r===a},concat:function(e){return new d([this,e])},replaceAt:function(e,t){return t},forEachColumnIndex:function(e){this.forEachAxisIndex("col",e)},forEachRowIndex:function(e){this.forEachAxisIndex("row",e)},forEachAxisIndex:function(e,t){var i=[],n="row"===e?"forEachRow":"forEachColumn";this[n](function(t){var n=t.first()[e];i.indexOf(n)===-1&&i.push(n)}),i.sort(function(e,t){return e>t?1:e<t?-1:0}).forEach(t)},valid:function(){return!1},renameSheet:function(e,t){if(this.sheet&&this.sheet.toLowerCase()==e.toLowerCase())return this.sheet=t,!0}}),r.display=i,s=new(r.extend({init:function(){},print:function(){return"#NULL!"},eq:function(e){return e===this},forEach:function(){}})),a=r.extend({ref:"name",init:function(e){this.name=e},clone:function(){return new a(this.name).setSheet(this.sheet,this.hasSheet())},print:function(){var e=t(this.name);return this.hasSheet()&&(e=t(this.sheet)+"!"+e),e}}),l=r.extend({ref:"cell",init:function(e,t,i){this.row=e,this.col=t,this.rel=i||0},clone:function(){return new l(this.row,this.col,this.rel).setSheet(this.sheet,this.hasSheet())},intersect:function(e){return e instanceof l?this.eq(e)?this:s:e.intersect(this)},print:function(e,n,o){var r,s,a=this.col,l=this.row,c=this.rel;return null==e&&c?(s=this.hasSheet()?t(this.sheet)+"!":"",a=isFinite(a)?1&c?"C["+a+"]":"C"+(a+1):"",l=isFinite(l)?2&c?"R["+l+"]":"R"+(l+1):"",s+l+a):(r=this.absolute(e,n),o?(l=r.row%1048576,a=r.col%16384,l<0&&(l+=1048576),a<0&&(a+=16384),i(this._hasSheet&&this.sheet,l,a,c)):r.valid()?i(this._hasSheet&&this.sheet,r.row,r.col,c):"#REF!")},absolute:function(e,t){var i=this.clone();return i.rel&!1?i:(1&i.rel&&(i.col=(i.col+t)%16384),2&i.rel&&(i.row=(i.row+e)%1048576),i.rel=0,i)},toRangeRef:function(){return new c(this,this)},relative:function(e,t,i){var n,o;return null==i&&(i=this.rel),n=2&i?this.row-e:this.row,o=1&i?this.col-t:this.col,new l(n,o,i).setSheet(this.sheet,this.hasSheet())},height:function(){return 1},width:function(){return 1},toString:function(){return i(null,this.row,this.col,3)},isCell:function(){return!0},leftColumn:function(){return this},rightColumn:function(){return this},topRow:function(){return this},bottomRow:function(){return this},forEachRow:function(e){e(this.toRangeRef())},forEachColumn:function(e){e(this.toRangeRef())},adjust:function(e,t,i,n,o,r,a){var l=this.absolute(e,t);if(o){if(l.row>=r){if(a<0&&l.row<r-a)return s;l.row+=a}}else if(l.col>=r){if(a<0&&l.col<r-a)return s;l.col+=a}return null!=i&&null!=n&&(l=l.relative(i,n,this.rel)),l},valid:function(){if(this.rel)throw Error("valid() called on relative reference");var e=this.col,t=this.row;return!(isFinite(e)&&e<0||isFinite(t)&&t<0)}}),c=r.extend({ref:"range",init:function(e,t){e._hasSheet&&t._hasSheet&&e.sheet.toLowerCase()!=t.sheet.toLowerCase()&&(this.endSheet=t.sheet),this.topLeft=new l(e.row,e.col,e.rel),this.bottomRight=new l(t.row,t.col,t.rel),this.normalize()},clone:function(){return new c(this.topLeft.clone(),this.bottomRight.clone()).setSheet(this.sheet,this.hasSheet())},_containsRange:function(e){return this._containsCell(e.topLeft)&&this._containsCell(e.bottomRight)},_containsCell:function(e){return e.sheet==this.sheet&&e.row>=this.topLeft.row&&e.col>=this.topLeft.col&&e.row<=this.bottomRight.row&&e.col<=this.bottomRight.col},contains:function(e){if(e instanceof Array){var t=this;return e.some(function(e){return t.contains(e)})}return e instanceof l?this._containsCell(e):e instanceof c&&this._containsRange(e)},_intersectRange:function(e){var t,i,n,o,r,a,d,u;return this.sheet!=e.sheet?s:(t=this.topLeft.col,i=this.topLeft.row,n=this.bottomRight.col,o=this.bottomRight.row,r=e.topLeft.col,a=e.topLeft.row,d=e.bottomRight.col,u=e.bottomRight.row,t<=d&&r<=n&&i<=u&&a<=o?new c(new l(Math.max(i,a),Math.max(t,r)),new l(Math.min(o,u),Math.min(n,d))).setSheet(this.sheet,this.hasSheet()):s)},intersect:function(e){return e instanceof l?this._containsCell(e)?e:s:e instanceof c?this._intersectRange(e).simplify():e instanceof d?e.intersect(this):s},simplify:function(){return this.isCell()?new l(this.topLeft.row,this.topLeft.col,this.topLeft.rel).setSheet(this.sheet,this.hasSheet()):this},normalize:function(){var e,t=this.topLeft,i=this.bottomRight,n=t.row,o=t.col,r=i.row,s=i.col,a=2&t.rel,c=1&t.rel,d=2&i.rel,u=1&i.rel,h=!1;return a===d&&c===u&&(n>r&&(h=!0,e=n,n=r,r=e,e=a,a=d,d=e),o>s&&(h=!0,e=o,o=s,s=e,e=c,c=u,u=e),h&&(this.topLeft=new l(n,o,c|a),this.bottomRight=new l(r,s,u|d))),this},print:function(e,i,n){if(n||this.absolute(e,i).valid()){var o=this.topLeft.print(e,i,n)+":"+this.bottomRight.print(e,i,n);return this.hasSheet()&&(o=t(this.sheet)+(this.endSheet?":"+t(this.endSheet):"")+"!"+o),o}return"#REF!"},absolute:function(e,t){return new c(this.topLeft.absolute(e,t),this.bottomRight.absolute(e,t)).setSheet(this.sheet,this.hasSheet())},relative:function(e,t,i,n){return null==n&&(n=i),new c(this.topLeft.relative(e,t,i),this.bottomRight.relative(e,t,n)).setSheet(this.sheet,this.hasSheet())},height:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw Error("Mixed relative/absolute references");return this.bottomRight.row-this.topLeft.row+1},width:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw Error("Mixed relative/absolute references");return this.bottomRight.col-this.topLeft.col+1},collapse:function(){return this.topLeft.toRangeRef()},leftColumn:function(){return new c(this.topLeft,new l(this.bottomRight.row,this.topLeft.col))},rightColumn:function(){return new c(new l(this.topLeft.row,this.bottomRight.col),this.bottomRight)},topRow:function(){return new c(this.topLeft,new l(this.topLeft.row,this.bottomRight.col))},bottomRow:function(){return new c(new l(this.bottomRight.row,this.topLeft.col),this.bottomRight)},toRangeRef:function(){return this},toRow:function(e){return e+=Math.max(0,this.topLeft.row),new c(new l(e,this.topLeft.col),new l(e,this.bottomRight.col)).setSheet(this.sheet,this.hasSheet())},toColumn:function(e){return e+=Math.max(0,this.topLeft.col),new c(new l(this.topLeft.row,e),new l(this.bottomRight.row,e)).setSheet(this.sheet,this.hasSheet())},toCell:function(e,t){return e+=Math.max(0,this.topLeft.row),t+=Math.max(0,this.topLeft.col),new l(e,t,0).setSheet(this.sheet,this.hasSheet())},forEachRow:function(e){var t,i=this.topLeft.row,n=this.bottomRight.row,o=this.topLeft.col,r=this.bottomRight.col;for(t=i;t<=n;t++)e(new c(new l(t,o),new l(t,r)))},forEachColumn:function(e){var t,i=this.topLeft.row,n=this.bottomRight.row,o=this.topLeft.col,r=this.bottomRight.col;for(t=o;t<=r;t++)e(new c(new l(i,t),new l(n,t)))},intersecting:function(e){return e.filter(function(e){return e.toRangeRef().intersects(this)},this)},union:function(e,t){var i,n=this.intersecting(e),o=this.topLeft.row,r=this.topLeft.col,s=this.bottomRight.row,a=this.bottomRight.col,d=!1;return n.forEach(function(e){e=e.toRangeRef(),e.topLeft.row<o&&(d=!0,o=e.topLeft.row),e.topLeft.col<r&&(d=!0,r=e.topLeft.col),e.bottomRight.row>s&&(d=!0,s=e.bottomRight.row),e.bottomRight.col>a&&(d=!0,a=e.bottomRight.col),t&&t(e)}),i=new c(new l(o,r),new l(s,a)),d?i.union(e,t):i},resize:function(e){function t(e){return e||0}var i=Math.max.bind(Math,0),n=this.topLeft.row+t(e.top),o=this.topLeft.col+t(e.left),r=this.bottomRight.row+t(e.bottom),a=this.bottomRight.col+t(e.right);return o<0&&a<0||n<0&&r<0?s:n<=r&&o<=a?new c(new l(i(n),i(o)),new l(i(r),i(a))):s},move:function(e,t){return new c(new l(this.topLeft.row+e,this.topLeft.col+t),new l(this.bottomRight.row+e,this.bottomRight.col+t))},first:function(){return this.topLeft.clone().setSheet(this.sheet,this.hasSheet())},isCell:function(){return!this.endSheet&&this.topLeft.eq(this.bottomRight)},toString:function(){return this.topLeft+":"+this.bottomRight},adjust:function(e,t,i,n,o,r,a){var l=this.topLeft.adjust(e,t,i,n,o,r,a),d=this.bottomRight.adjust(e,t,i,n,o,r,a);return l===s&&d===s?s:(l===s?(l=this.topLeft.absolute(e,t),o?l.row=r:l.col=r,null!=i&&null!=n&&(l=l.relative(i,n,this.topLeft.rel))):d===s&&(d=this.bottomRight.absolute(e,t),o?d.row=r-1:d.col=r-1,null!=i&&null!=n&&(d=d.relative(i,n,this.bottomRight.rel))),new c(l,d).setSheet(this.sheet,this.hasSheet()).simplify())},valid:function(){return this.topLeft.valid()&&this.bottomRight.valid()}}),d=r.extend({init:function(e){this.refs=e,this.length=e.length},clone:function(){return new d(this.refs.slice())},intersect:function(e){var t,i,n=[];for(t=0;t<this.length;++t)i=e.intersect(this.refs[t]),i!==s&&n.push(i);return n.length>0?new d(n).simplify():s},simplify:function(){var e=new d(this.refs.reduce(function(e,t){return t=t.simplify(),t!==s&&e.push(t),e},[]));return e.empty()?s:e.single()?e.refs[0]:e},absolute:function(e,t){return new d(this.refs.map(function(i){return i.absolute(e,t)}))},forEach:function(e,t){this.refs.forEach(function(i){i instanceof d?i.forEach(e,t):e.call(t,i)},t)},toRangeRef:function(){return this.refs[0].toRangeRef()},contains:function(e){return this.refs.some(function(t){return t.contains(e)})},map:function(e,t){var i=[];return this.forEach(function(n){i.push(e.call(t,n))}),new d(i)},first:function(){return this.refs[0].first()},lastRange:function(){return this.refs[this.length-1]},size:function(){return this.length},single:function(){return 1==this.length},empty:function(){return 0===this.length},isCell:function(){return this.single()&&this.refs[0].isCell()},rangeAt:function(e){return this.refs[e]},nextRangeIndex:function(e){return e===this.length-1?0:e+1},previousRangeIndex:function(e){return 0===e?this.length-1:e-1},concat:function(e){return new d(this.refs.concat([e]))},print:function(e,t,i){return this.refs.map(function(n){return n.print(e,t,i)}).join(",")},replaceAt:function(e,t){var i=this.refs.slice();return i.splice(e,1,t),new d(i)},leftColumn:function(){return this.map(function(e){return e.leftColumn()})},rightColumn:function(){return this.map(function(e){return e.rightColumn()})},topRow:function(){return this.map(function(e){return e.topRow()})},bottomRow:function(){return this.map(function(e){return e.bottomRow()})},forEachRow:function(e){this.forEach(function(t){t.forEachRow(e)})},forEachColumn:function(e){this.forEach(function(t){t.forEachColumn(e)})},adjust:function(e,t,i,n,o,r,s){return this.map(function(a){return a.adjust(e,t,i,n,o,r,s)}).simplify()},toString:function(){return this.refs.map(function(e){return""+e}).join(", ")},valid:function(){for(var e=this.refs.length;--e>=0;)if(this.refs[e].valid())return!1;return!0},renameSheet:function(e,t){this.refs.forEach(function(i){i.renameSheet(e,t)})}}),n.NULLREF=s,n.SHEETREF=new c(new l(0,0),new l(1/0,1/0)),n.FIRSTREF=new l(0,0),n.Ref=r,n.NameRef=a,n.CellRef=l,n.RangeRef=c,n.UnionRef=d,n.SHEETREF.print=function(){return"#SHEET"})},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/autofillcalculator.min",["kendo.core.min"],e)}(function(){!function(e){var t,i,n;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,i=e.spreadsheet.CellRef,n=e.Class.extend({init:function(e){this._grid=e},rectIsVertical:function(e,t,i,n){var o=this._grid.rectangle(e.toRangeRef()),r=this._grid.rectangle(t.toRangeRef());return Math.abs(r[n]-o[n])>Math.abs(o[i]-r[i])},autoFillDest:function(e,n){var o,r,s,a,l,c,d,u=e.topLeft,h=e.bottomRight,p=n.row>=u.row,f=n.col>=u.col;return o=p?f?4:3:f?2:1,4===o?(r=u,s=h,l=n.row>s.row||n.col>s.col,l&&(n=new i(Math.max(n.row,s.row),Math.max(n.col,s.col))),a=this.rectIsVertical(s,n,"right","bottom")?new i(n.row,s.col):new i(s.row,n.col)):3===o?(c=new i(u.col,h.row),n.row>h.row&&this.rectIsVertical(c,n,"left","bottom")?(r=u,a=new i(n.row,h.col)):(r=h,a=new i(u.row,n.col))):2===o?(d=new i(u.row,h.col),n.col>h.col&&!this.rectIsVertical(d,n,"right","top")?(r=u,a=new i(h.row,n.col)):(r=h,a=new i(n.row,u.col))):(r=h,a=this.rectIsVertical(u,n,"left","top")?new i(n.row,u.col):new i(u.row,n.col)),this._grid.normalize(new t(r,a))}}),e.spreadsheet.AutoFillCalculator=n)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/navigator.min",["kendo.core.min","spreadsheet/autofillcalculator.min"],e)}(function(){!function(e){var t,i,n,o;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,i=e.spreadsheet.CellRef,n=e.Class.extend({init:function(e,t,i,n){this.rangeGetter=i,this.prevLeft=function(i){var o=n(this.range(i)),r=this.range(t.prevVisible(o.topLeft[e]));return n(r).topLeft[e]},this.nextRight=function(i){var o=n(this.range(i)),r=this.range(t.nextVisible(o.bottomRight[e]));return n(r).bottomRight[e]},this.nextLeft=function(i){var o=n(this.range(i));return t.nextVisible(o.bottomRight[e])},this.prevRight=function(i){var o=n(this.range(i));return t.prevVisible(o.topLeft[e])}},boundary:function(e,t){this.top=e,this.bottom=t},range:function(e){return this.rangeGetter(e,this.top,this.bottom)}}),o=e.Class.extend({init:function(t){this._sheet=t,this.columns=this._sheet._grid._columns,this.autoFillCalculator=new e.spreadsheet.AutoFillCalculator(t._grid),this.colEdge=new n("col",this._sheet._grid._columns,this.columnRange.bind(this),this.union.bind(this)),this.rowEdge=new n("row",this._sheet._grid._rows,this.rowRange.bind(this),this.union.bind(this))},height:function(e){this._viewPortHeight=e},union:function(e){return this._sheet.unionWithMerged(e)},columnRange:function(e,t,i){return this._sheet._ref(t,e,i-t,1)},rowRange:function(e,t,i){return this._sheet._ref(e,t,1,i-t)},selectionIncludesMergedCells:function(){return this._sheet.select().contains(this._sheet._mergedCells)},setSelectionValue:function(e){var t=this._sheet.selection();setTimeout(function(){t.value(e())})},selectAll:function(){this._sheet.select(this._sheet._sheetRef)},select:function(e,t,i){e=this.refForMode(e,t),i&&(e=this._sheet.select().concat(e)),this._sheet.select(e)},refForMode:function(e,t){var i=this._sheet._grid;switch(t){case"range":e=i.normalize(e);break;case"row":e=i.rowRef(e.row);break;case"column":e=i.colRef(e.col);break;case"sheet":e=this._sheet._sheetRef}return e},startSelection:function(e,i,n,o){if("autofill"==i)this._sheet.startAutoFill();else if(o&&"range"==i){var r=new t(this._sheet.activeCell().first(),e);this._sheet.select(r,!1,!1),this._sheet.startSelection()}else this._sheet.startSelection(),this.select(e,i,n)},completeSelection:function(){this._sheet.completeSelection()},selectForContextMenu:function(e,t){var i=this._sheet;i.select().contains(this.refForMode(e,t))||this.select(e,t)},modifySelection:function(e){var i,n,o=this.determineDirection(e),r=this._sheet,s=this._viewPortHeight,a=r._grid._rows,l=r._grid._columns,c=r.currentOriginalSelectionRange(),d=r.select().toRangeRef(),u=r.activeCell(),h=c.topLeft.clone(),p=c.bottomRight.clone();switch(this.colEdge.boundary(d.topLeft.row,d.bottomRight.row),this.rowEdge.boundary(d.topLeft.col,d.bottomRight.col),o){case"expand-left":h.col=this.colEdge.prevLeft(h.col),i=h;break;case"shrink-right":h.col=this.colEdge.nextLeft(h.col),i=h;break;case"expand-right":p.col=this.colEdge.nextRight(p.col),i=p;break;case"shrink-left":p.col=this.colEdge.prevRight(p.col),i=p;break;case"expand-up":h.row=this.rowEdge.prevLeft(h.row),i=h;break;case"shrink-down":h.row=this.rowEdge.nextLeft(h.row),i=h;break;case"expand-down":p.row=this.rowEdge.nextRight(p.row),i=p;break;case"shrink-up":p.row=this.rowEdge.prevRight(p.row),i=p;break;case"expand-page-up":h.row=a.prevPage(h.row,s);break;case"shrink-page-up":p.row=a.prevPage(p.row,s);break;case"expand-page-down":p.row=a.nextPage(p.row,s);break;case"shrink-page-down":h.row=a.nextPage(h.row,s);break;case"first-col":h.col=l.firstVisible(),p.col=u.bottomRight.col,i=h;break;case"last-col":p.col=l.lastVisible(),h.col=u.topLeft.col,i=p;break;case"first-row":h.row=a.firstVisible(),p.row=u.bottomRight.row,i=h;break;case"last-row":p.row=a.lastVisible(),h.row=u.topLeft.row,i=p;break;case"last":p.row=a.lastVisible(),p.col=l.lastVisible(),h=u.topLeft,i=p;break;case"first":h.row=a.firstVisible(),h.col=l.firstVisible(),p=u.bottomRight,i=h}return n=new t(h,p),this.union(n).intersects(u)?(i&&r.focus(i),void this.updateCurrentSelectionRange(n)):void this.modifySelection(o.replace("shrink","expand"))},moveActiveCell:function(e){var t=this._sheet,n=t.activeCell(),o=n.topLeft,r=n.bottomRight,s=t.originalActiveCell(),a=t._grid._rows,l=t._grid._columns,c=s.row,d=s.col;switch(e){case"left":d=l.prevVisible(o.col);break;case"up":c=a.prevVisible(o.row);break;case"right":d=l.nextVisible(r.col);break;case"down":c=a.nextVisible(r.row);break;case"first-col":d=l.firstVisible();break;case"last-col":d=l.lastVisible();break;case"first-row":c=a.firstVisible();break;case"last-row":c=a.lastVisible();break;case"last":c=a.lastVisible(),d=l.lastVisible();break;case"first":c=a.firstVisible(),d=l.firstVisible();break;case"next-page":c=a.nextPage(r.row,this._viewPortHeight);break;case"prev-page":c=a.prevPage(r.row,this._viewPortHeight)}t.select(new i(c,d))},navigateInSelection:function(e){function t(e){n=e.topLeft,o=e.bottomRight}var n,o,r,s,a,l=this._sheet,c=l.activeCell(),d=c.topLeft,u=l.originalActiveCell(),h=l._grid._rows,p=l._grid._columns,f=u.row,m=u.col,g=d.col,v=d.row;for(t(l.currentNavigationRange()),s=!1;!s;){switch(a=new i(f,m),e){case"next":o.eq(a)?(t(l.nextNavigationRange()),f=n.row,m=n.col):(m=p.nextVisible(g),(m==g||m>o.col)&&(m=n.col,r=h.nextVisible(f),f=r==f||r>o.row?n.row:r));break;case"previous":n.eq(a)?(t(l.previousNavigationRange()),f=o.row,m=o.col):(m=p.prevVisible(g),(m==g||m<n.col)&&(m=o.col,r=h.prevVisible(f),f=r==f||r<n.row?o.row:r));break;case"lower":o.eq(a)?(t(l.nextNavigationRange()),f=n.row,m=n.col):(f=h.nextVisible(v),(f==v||f>o.row)&&(f=n.row,r=p.nextVisible(m),m=r==m||r>o.col?n.col:r));break;case"upper":n.eq(a)?(t(l.previousNavigationRange()),f=o.row,m=o.col):(f=h.prevVisible(v),(f==v||f<n.row)&&(f=o.row,r=p.prevVisible(m),m=r==m||r<n.col?o.col:r));break;default:throw Error("Unknown entry navigation: "+e)}s=!this.shouldSkip(f,m),g=m,v=f}l.singleCellSelection()?l.select(new i(f,m)):l.activeCell(new i(f,m))},extendSelection:function(e,i){var n,o=this._sheet,r=o._grid;return"autofill"===i?void this.resizeAutoFill(e):("range"===i?e=r.normalize(e):"row"===i?e=r.rowRef(e.row).bottomRight:"column"===i&&(e=r.colRef(e.col).bottomRight),n=o.originalActiveCell().toRangeRef(),void this.updateCurrentSelectionRange(new t(n.topLeft,e)))},shouldSkip:function(e,t){var n,o;return!(!this._sheet.isHiddenRow(e)&&!this._sheet.isHiddenColumn(t))||(n=new i(e,t),o=!1,this._sheet.forEachMergedCell(function(e){e.intersects(n)&&!e.collapse().eq(n)&&(o=!0)}),o)},resizeAutoFill:function(e){var t,i,n,o,r,s=this._sheet,a=s.select(),l=s._autoFillOrigin,c=this.autoFillCalculator.autoFillDest(a,e),d=this.punch(a,c);d||(o=s.range(c)._previewFillFrom(s.range(l)),o&&(i=o.direction,r=o.props,0===i||1==i?(n=r[r.length-1],t=n[n.length-1].value):2===i?(n=r[0],t=n[n.length-1].value):3===i&&(n=r[r.length-1],t=n[0].value))),s.updateAutoFill(c,d,t,i)},determineDirection:function(e){var t=this._sheet.currentSelectionRange(),i=this._sheet.activeCell(),n=i.topLeft.col==t.topLeft.col,o=i.bottomRight.col==t.bottomRight.col,r=i.topLeft.row==t.topLeft.row,s=i.bottomRight.row==t.bottomRight.row;switch(e){case"left":e=o?"expand-left":"shrink-left";break;case"right":e=n?"expand-right":"shrink-right";break;case"up":e=s?"expand-up":"shrink-up";break;case"down":e=r?"expand-down":"shrink-down";break;case"prev-page":e=s?"expand-page-up":"shrink-page-up";break;case"next-page":e=r?"expand-page-down":"shrink-page-down"}return e},updateCurrentSelectionRange:function(e){var t=this._sheet;t.select(t.originalSelect().replaceAt(t.selectionRangeIndex(),e),!1)},punch:function(e,n){var o,r,s;return n.topLeft.eq(e.topLeft)&&(n.bottomRight.row<e.bottomRight.row?(r=this.rowEdge.nextRight(n.bottomRight.row),o=new t(new i(r,e.topLeft.col),e.bottomRight)):n.bottomRight.col<e.bottomRight.col&&(s=this.colEdge.nextRight(n.bottomRight.col),o=new t(new i(e.topLeft.row,s),e.bottomRight))),o}}),e.spreadsheet.SheetNavigator=o)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/axismanager.min",["kendo.core.min"],e)}(function(){!function(e){if(!(e.support.browser.msie&&e.support.browser.version<9)){var t=e.Class.extend({init:function(e){this._sheet=e},forEachSelectedColumn:function(e){var t=this._sheet;t.batch(function(){t.select().forEachColumnIndex(function(i,n){e(t,i,n)})},{layout:!0,recalc:!0})},forEachSelectedRow:function(e){var t=this._sheet;t.batch(function(){t.select().forEachRowIndex(function(i,n){e(t,i,n)})},{layout:!0,recalc:!0})},includesHiddenColumns:function(e){return this._sheet._grid._columns.includesHidden(e.topLeft.col,e.bottomRight.col)},includesHiddenRows:function(e){return this._sheet._grid._rows.includesHidden(e.topLeft.row,e.bottomRight.row)},selectionIncludesHiddenColumns:function(){return this.includesHiddenColumns(this._sheet.select())},selectionIncludesHiddenRows:function(){return this.includesHiddenRows(this._sheet.select())},deleteSelectedColumns:function(){var e=[],t=0;return this.forEachSelectedColumn(function(i,n){if(n-=t,!i.isHiddenColumn(n)){t++;var o=[];e.unshift({index:n,formulas:o,width:i.columnWidth(n)}),i._saveModifiedFormulas(o,function(){i.deleteColumn(n)})}}),e},deleteSelectedRows:function(){var e=[],t=0;return this.forEachSelectedRow(function(i,n){if(n-=t,!i.isHiddenRow(n)){t++;var o=[];e.unshift({index:n,formulas:o,height:i.rowHeight(n)}),i._saveModifiedFormulas(o,function(){i.deleteRow(n)})}}),e},hideSelectedColumns:function(){var t,i,n,o,r,s,a;for(this.forEachSelectedColumn(function(e,t){e.hideColumn(t)}),t=this._sheet,i=t.select().toRangeRef(),n=i.topLeft.col,o=i.bottomRight.col,r=null;;){if(s=o<t._columns._count,a=n>=0,!a&&!s)break;if(s&&!t.isHiddenColumn(o)){r=o;break}if(a&&!t.isHiddenColumn(n)){r=n;break}n--,o++}null!==r&&(i=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(0,r),new e.spreadsheet.CellRef(t._rows._count-1,r)),t.range(i).select())},hideSelectedRows:function(){var t,i,n,o,r,s,a;for(this.forEachSelectedRow(function(e,t){e.hideRow(t)}),t=this._sheet,i=t.select().toRangeRef(),n=i.topLeft.row,o=i.bottomRight.row,r=null;;){if(s=o<t._rows._count,a=n>=0,!a&&!s)break;if(s&&!t.isHiddenRow(o)){r=o;break}if(a&&!t.isHiddenRow(n)){r=n;break}n--,o++}null!==r&&(i=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(r,0),new e.spreadsheet.CellRef(r,t._columns._count-1)),t.range(i).select())},unhideSelectedColumns:function(){this.forEachSelectedColumn(function(e,t){e.unhideColumn(t)})},unhideSelectedRows:function(){this.forEachSelectedRow(function(e,t){e.unhideRow(t)})},preventAddRow:function(){var e=this._sheet.select().toRangeRef(),t=e.height();return this._sheet.preventInsertRow(0,t)},preventAddColumn:function(){var e=this._sheet.select().toRangeRef(),t=e.width();return this._sheet.preventInsertColumn(0,t)},addColumnLeft:function(){
var e,t=this._sheet,i=0;return t.batch(function(){t.select().forEachColumnIndex(function(n){e||(e=n),t.insertColumn(e),++i})},{recalc:!0,layout:!0}),{base:e,count:i}},addColumnRight:function(){var e,t=this._sheet,i=0;return t.batch(function(){t.select().forEachColumnIndex(function(t){e=t+1,++i});for(var n=0;n<i;++n)t.insertColumn(e)},{recalc:!0,layout:!0}),{base:e,count:i}},addRowAbove:function(){var e,t=this._sheet,i=0;return t.batch(function(){t.select().forEachRowIndex(function(n){e||(e=n),t.insertRow(e),++i})},{recalc:!0,layout:!0}),{base:e,count:i}},addRowBelow:function(){var e,t=this._sheet,i=0;return t.batch(function(){t.select().forEachRowIndex(function(t){e=t+1,++i});for(var n=0;n<i;++n)t.insertRow(e)},{recalc:!0,layout:!0}),{base:e,count:i}}});e.spreadsheet.AxisManager=t}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/clipboard.min",["kendo.core.min"],e)}(function(){!function(e){function t(){var e=new c(0,0,0);return{ref:e,mergedCells:[],data:[],foreign:!0,origRef:e.toRangeRef()}}function i(e,t,i,n){var o,r=e.data||(e.data=[]);r[t]||(r[t]=[]),r[t][i]=n,o=e.origRef.bottomRight,o.row=Math.max(o.row,t),o.col=Math.max(o.col,i)}function n(e){return e.replace(/^-(?:ms|moz|webkit)-/,"")}function o(e){var t={};return["borderBottom","borderRight","borderLeft","borderTop"].forEach(function(i){t[i]="none"==e[i+"Style"]?null:{size:1,color:e[i+"Color"]}}),t}function r(e,t,i,r,s){var a=window.getComputedStyle(i),l=i.innerText,c=o(a),d={value:""===l?null:l,borderTop:c.borderTop||r.get(e,t)||null,borderBottom:c.borderBottom||r.get(e+1,t)||null,borderLeft:c.borderLeft||s.get(e,t)||null,borderRight:c.borderRight||s.get(e,t+1)||null,fontSize:parseInt(a["font-size"],10)};return r.set(e,t,d.borderTop),r.set(e+1,t,d.borderBottom),s.set(e,t,d.borderLeft),s.set(e,t+1,d.borderRight),"rgb(0, 0, 0)"!==a["background-color"]&&"rgba(0, 0, 0, 0)"!==a["background-color"]&&(d.background=a["background-color"]),"rgb(0, 0, 0)"!==a.color&&"rgba(0, 0, 0, 0)"!==a.color&&(d.color=a.color),"underline"==a["text-decoration"]&&(d.underline=!0),"italic"==a["font-style"]&&(d.italic=!0),"bold"==a["font-weight"]&&(d.bold=!0),"right"!==n(a["text-align"])&&(d.textAlign=n(a["text-align"])),"middle"!==a["vertical-align"]&&(d.verticalAlign=a["vertical-align"]),"normal"!==a["word-wrap"]&&(d.wrap=!0),d}function s(n){var o,s,a,l,d,u,h,p,f,m,g,v,_,b=t(),w=[],y=0,k=0;for(o=0;o<n.rows.length;++o)w.push([]);for(s=new e.spreadsheet.calc.runtime.Matrix,a=new e.spreadsheet.calc.runtime.Matrix,l=0;l<n.rows.length;++l,++y)for(d=n.rows[l],k=0,u=0;u<d.cells.length;++u){for(h=d.cells[u],p=h.rowSpan,f=h.colSpan;w[y][k];)k++;for(m=h.getAttribute("style"),g=/mso-ignore:colspan/.test(m),i(b,y,k,r(y,k,h,s,a)),(p>1||f>1&&!g)&&b.mergedCells.push(""+new e.spreadsheet.RangeRef(new c(y,k),new c(y+p-1,k+f-1))),v=y+p;--v>=y;)for(_=k+f;--_>=k;)v<w.length&&(w[v][_]=!0,v==y&&_==k||i(b,v,_,{}))}return b}function a(e){var n,o,r,s,a=t();if(e.indexOf("\t")===-1&&e.indexOf("\n")==-1)i(a,0,0,{value:e});else for(n=e.split("\n"),o=0;o<n.length;o++)for(r=n[o].split("\t"),s=0;s<r.length;s++)i(a,o,s,{value:r[s]});return a}var l,c,d;e.support.browser.msie&&e.support.browser.version<9||(l=e.jQuery,c=e.spreadsheet.CellRef,d=e.Class.extend({init:function(t){this._content={},this._externalContent={},this._internalContent={},this.workbook=t,this.origin=e.spreadsheet.NULLREF,this.iframe=document.createElement("iframe"),this.iframe.className="k-spreadsheet-clipboard-paste",this.menuInvoked=!1,this._uid=e.guid(),document.body.appendChild(this.iframe)},destroy:function(){document.body.removeChild(this.iframe)},canCopy:function(){var t={canCopy:!0},i=this.workbook.activeSheet().select();return i===e.spreadsheet.NULLREF&&(t.canCopy=!1),i instanceof e.spreadsheet.UnionRef&&(t.canCopy=!1,t.multiSelection=!0),this.menuInvoked&&(t.canCopy=!1,t.menuInvoked=!0),t},canPaste:function(){var e=this.workbook.activeSheet(),t=this.pasteRef(),i=e.range(t),n={canPaste:!0,pasteOnMerged:!1,pasteOnDisabled:!1};return i.enable()||(n.canPaste=!1,n.pasteOnDisabled=!0),t.eq(e.unionWithMerged(t))||(n.canPaste=!1,n.pasteOnMerged=!0),this.menuInvoked&&(n.canPaste=!1,n.menuInvoked=!0),(t.bottomRight.row>=e._rows._count||t.bottomRight.col>=e._columns._count)&&(n.canPaste=!1,n.overflow=!0),n},intersectsMerged:function(){var e,t=this.workbook.activeSheet();return this.parse(),this.origin=this._content.origRef,e=this.pasteRef(),!e.eq(t.unionWithMerged(e))},copy:function(){var e=this.workbook.activeSheet();this.origin=e.select(),this._internalContent=e.selection().getState(),delete this._externalContent.html,delete this._externalContent.plain},cut:function(){var e=this.workbook.activeSheet();this.copy(),e.range(e.select()).clear()},pasteRef:function(){var t,i,n,o,r=this.workbook.activeSheet();return this.origin===e.spreadsheet.NULLREF?r.select():(t=r.activeCell().first(),i=this.origin.first(),n=i.row-t.row,o=i.col-t.col,this.origin.relative(n,o,3))},paste:function(){var e=this.workbook.activeSheet(),t=this.pasteRef();e.range(t).setState(this._content,this),e.triggerChange({recalc:!0,ref:t})},external:function(e){return e&&(e.html||e.plain)?void(this._externalContent=e):this._externalContent},isExternal:function(){return!this._isInternal()},parse:function(){var e,i,n,o=t();this._isInternal()?o=this._internalContent:(e=this._externalContent,e.html?(i=this.iframe.contentWindow.document,i.open(),i.write(e.html),i.close(),n=i.querySelector("table"),o=n?s(n):a(e.plain)):o=a(e.plain),this.origin=o.origRef),this._content=o},_isInternal:function(){var e,t;return void 0===this._externalContent.html||(e=!!l("<div/>").html(this._externalContent.html).find("table.kendo-clipboard-"+this._uid).length,t=!!l("<div/>").html(this._externalContent.plain).find("table.kendo-clipboard-"+this._uid).length,e||t)}}),e.spreadsheet.Clipboard=d)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/range.min",["kendo.core.min","util/text-metrics.min","util/main.min"],e)}(function(){!function(e){function t(e,i,n){for(;e<=i&&n(e);)e++;if(e>i)return[];for(var o=e+1;o<=i;++o)if(n(o))return[{begin:e,end:o-1}].concat(t(o+1,i,n));return[{begin:e,end:i}]}function i(e){return e.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}function n(t){return!/^=/.test(t)&&/number|percent/.test(e.spreadsheet.calc.parse(null,0,0,t).type)}function o(t,i,n,o,r){var s={baselineMarkerSize:0,width:r===!0?i+"px":"auto","font-size":(o||12)+"px","font-family":n||"Arial","white-space":r===!0?"pre-wrap":"pre","overflow-wrap":r===!0?"break-word":"normal","word-wrap":r===!0?"break-word":"normal"};return e.util.measureText(t,s,{box:u,normalizeText:!1}).height}var r,s,a,l,c,d,u;e.support.browser.msie&&e.support.browser.version<9||(r=e.jQuery,s=e.spreadsheet.UnionRef,a=e.spreadsheet.CellRef,l=e.spreadsheet.RangeRef,c=["color","fontFamily","underline","italic","bold","textAlign","verticalAlign","background","format","link","editor","borderTop","borderRight","borderBottom","borderLeft"],d=e.Class.extend({init:function(e,t){this._sheet=t,this._ref=e},clone:function(){return new d(this._ref.clone(),this._sheet)},skipHiddenCells:function(){var e=[],i=this,n=i._sheet,o=n.isHiddenRow.bind(n),r=n.isHiddenColumn.bind(n);return i._ref.forEach(function(n){var s,c,d,u,h,p;for(n=i._normalize(n.toRangeRef()),s=n.topLeft,c=n.bottomRight,d=t(s.row,c.row,o),u=t(s.col,c.col,r),h=0;h<d.length;++h)for(p=0;p<u.length;++p)e.push(new l(new a(d[h].begin,u[p].begin),new a(d[h].end,u[p].end)))}),n.range(e.length>1?new s(e):e[0])},_normalize:function(e){return this._sheet._grid.normalize(e)},_set:function(e,t,i){var n=this,o=n._sheet;return n._ref.forEach(function(i){o._set(i.toRangeRef(),e,t)}),i||o.triggerChange({recalc:"formula"==e||"value"==e||"validation"==e,value:t,range:n,ref:n._ref}),n},_get:function(e){return this._sheet._get(this._ref.toRangeRef(),e)},_property:function(e,t){return void 0===t?this._get(e):this._set(e,t)},value:function(e){return void 0!==e&&this._set("formula",null,!0),this._property("value",e)},resize:function(e){var t=this._resizedRef(e);return new d(t,this._sheet)},_resizedRef:function(e){return this._ref.map(function(t){return t.toRangeRef().resize(e)})},input:function(t,o){var s,a,l,c,d,u,h;return o=r.extend({arrayFormula:!1},o),s=this._get("format"),void 0!==t?(l=this._ref.toRangeRef().topLeft,a=e.spreadsheet.calc.parse(this._sheet.name(),l.row,l.col,t,s),this._sheet.batch(function(){var n,r=null;"exp"==a.type?r=e.spreadsheet.calc.compile(a):"@"!=s?(n=s&&e.spreadsheet.formatting.type(a.value,s),"date"==a.type&&"date"!=n?this.format(a.format||i(e.culture().calendar.patterns.d)):"percent"==a.type&&"percent"!=n?this.format(100*a.value==(100*a.value|0)?"0%":"0.00%"):a.format&&(!s||a.currency||"number"==n&&"number"==a.type&&a.format.length>s.length)&&this.format(a.format)):"string"!=a.type&&(a.value=t),this.formula(r,o.arrayFormula),r||this.value(a.value)}.bind(this),{recalc:!0,value:t,ref:this._ref,editorChange:this._sheet.isInEditMode()}),this):(t=this._get("value"),c=this._get("formula"),d=s&&!c&&e.spreadsheet.formatting.type(t,s),c?t="="+c:s&&"date"==d&&(u=e.spreadsheet.formatting.text(t,s),a=e.spreadsheet.calc.parse(null,null,null,u,s),h=e.spreadsheet.formatting.text(a.value,s),u==h)?t=u:"date"===d?t=e.toString(e.spreadsheet.numberToDate(t),e.culture().calendar.patterns.d):"percent"===d?t=e.spreadsheet.calc.runtime.limitPrecision(100*t)+"%":"string"==typeof t&&(/^[=']/.test(t)||/^(?:true|false)$/i.test(t)||n(t))&&(t="'"+t),t)},enable:function(t){return void 0===t?!e.util.withExit(function(e){this._sheet.forEach(this._ref,function(t,i,n){n.enable===!1&&e(!0)})},this):this._property("enable",t)},formula:function(e,t){var i,n,o=this;return void 0===e?(i=o._get("formula"),i?""+i:null):(t?(n=this._ref.toRangeRef(),e=o._sheet.range(n.topLeft)._set("formula",e)._get("formula"),e&&e.setArrayFormulaRange(n)):o._set("formula",e),o)},intersectingArrayFormula:function(){var t=this._ref.clone().simplify().setSheet(this._sheet.name());return e.util.withExit(function(i){this._sheet._forFormulas(function(n){var o=n.arrayFormulaRange;o&&(o=t.intersect(o))!==e.spreadsheet.NULLREF&&i({formula:n,intersection:o})})},this)},canEditArrayFormula:function(){var e=this.intersectingArrayFormula();return!e||e.formula.arrayFormulaRange.eq(e.intersection)},validation:function(e){if(void 0===e){var t=this._get("validation");return t?t.toJSON():null}return this._property("validation",e)},_getValidationState:function(){var e,t,i,n=this._ref.toRangeRef(),o=n.topLeft.row,r=n.topLeft.col,s=n.bottomRight.row,a=n.bottomRight.col;for(e=r;e<=a;e++)for(t=o;t<=s;t++)if(i=this._sheet._validation(t,e),i&&"reject"===i.type&&i.value===!1)return i;return!1},merge:function(){return this._ref=this._sheet._merge(this._ref),this},unmerge:function(){var e=this._sheet._mergedCells;return this._ref.forEach(function(t){t.toRangeRef().intersecting(e).forEach(function(t){e.splice(e.indexOf(t),1)})}),this._sheet.triggerChange({}),this},select:function(){return this._sheet.select(this._ref),this},values:function(t){var i,n,o,r,a,l,c,d,u,h;if(this._ref instanceof s)throw Error("Unsupported for multiple ranges.");if(this._ref===e.spreadsheet.NULLREF){if(void 0!==t)throw Error("Unsupported for NULLREF.");return[]}if(i=this._ref.toRangeRef(),n=i.topLeft.row,o=i.topLeft.col,r=i.bottomRight.row,a=i.bottomRight.col,void 0===t){for(t=Array(i.height()),d=0;d<t.length;d++)t[d]=Array(i.width());for(l=o;l<=a;l++)for(c=n;c<=r;c++)t[c-n][l-o]=this._sheet._value(c,l);return t}for(this._sheet._set(i,"formula",null),l=o;l<=a;l++)for(c=n;c<=r;c++)u=t[c-n],u&&(h=u[l-o],void 0!==h&&this._sheet._value(c,l,h));return this._sheet.triggerChange({recalc:!0,ref:i}),this},_properties:function(t){var i,n,o,r,a,l,c,d,u,h,p;if(this._ref instanceof s)throw Error("Unsupported for multiple ranges.");if(this._ref===e.spreadsheet.NULLREF){if(void 0!==t)throw Error("Unsupported for NULLREF.");return[]}if(i=this._ref.toRangeRef(),n=i.topLeft.row,o=i.topLeft.col,r=i.bottomRight.row,a=i.bottomRight.col,d=this._sheet,void 0===t)return t=Array(i.height()),d.forEach(i,function(e,i,r){e-=n,i-=o;var s=t[e]||(t[e]=[]);s[i]=r}),t;for(i=i.clone(),h=function(e){var t=u[e];i.topLeft.row=i.bottomRight.row=c,i.topLeft.col=i.bottomRight.col=l,"value"==e&&d._set(i,"formula",null),d._set(i,e,t)},l=o;l<=a;l++)if(!d.isHiddenColumn(l))for(c=n;c<=r;c++)p=t[c-n],p&&!d.isHiddenRow(c)&&(u=p[l-o],u&&Object.keys(u).forEach(h));return d.triggerChange({recalc:!0,ref:this._ref}),this},clear:function(e){var t,i,n;return e=e||{},t=e.clearAll||!Object.keys(e).length,i=this._sheet,n={recalc:t||e.contentsOnly,ref:this._ref},i.batch(function(){n.recalc&&this.formula(null),t&&this.validation(null),(t||e.formatOnly)&&(c.forEach(function(t){e.keepBorders&&/^border/i.test(t)||this[t](null)}.bind(this)),this.fontSize(null),this.wrap(null),this.unmerge())}.bind(this),n),this},clearContent:function(){return this.clear({contentsOnly:!0})},clearFormat:function(){return this.clear({formatOnly:!0})},isSortable:function(){return!this.cantSort()},cantSort:function(){var t,i,n,o,r,l;if(this._ref instanceof s)return{code:"cantSortMultipleSelection",message:"Unsupported for multiple ranges."};if(this._ref===e.spreadsheet.NULLREF)return{code:"cantSortNullRef",message:"Unsupported for NULLREF."};t=this._sheet._getMergedCells(this._ref.toRangeRef()),i=t.primary,n=t.secondary,o=null,r=null,l={};try{this._sheet.forEach(this,function(e,s){var c=new a(e,s).print(),d=i[c];if(d){if(null===o)o=d.width(),r=d.height();else if(o!=d.width()||r!=d.height())throw l}else if(!n[c]&&t.hasMerged)throw l})}catch(c){if(c!==l)throw c;return{code:"cantSortMixedCells",message:"Unsupported for range containing cells of different shapes."}}return!1},sort:function(e){var t=this.cantSort();if(t)throw Error(t.message);return void 0===e&&(e={column:0}),e=e instanceof Array?e:[e],this._sheet._sortBy(this._ref.toRangeRef(),e.map(function(e,t){return"number"==typeof e&&(e={column:e}),{index:void 0===e.column?t:e.column,ascending:void 0===e.ascending||e.ascending}})),this},isFilterable:function(){return!(this._ref instanceof s)},filter:function(e){if(this._ref instanceof s)throw Error("Unsupported for multiple ranges.");return e===!1?this.clearFilters():(e=e===!0?[]:e instanceof Array?e:[e],this._sheet._filterBy(this._ref.toRangeRef(),e.map(function(e,t){return{index:void 0===e.column?t:e.column,filter:e.filter}}))),this},clearFilter:function(e){this._sheet.clearFilter(e)},clearFilters:function(){var e,t=this._sheet.filter(),i=[];if(t){for(e=0;e<t.columns.length;e++)i.push(t.columns[e].index);this._sheet.batch(function(){this.clearFilter(i),this._filter=null},{layout:!0,filter:!0})}},hasFilter:function(){var e=this._sheet.filter();return!!e},leftColumn:function(){return new d(this._ref.leftColumn(),this._sheet)},rightColumn:function(){return new d(this._ref.rightColumn(),this._sheet)},topRow:function(){return new d(this._ref.topRow(),this._sheet)},bottomRow:function(){return new d(this._ref.bottomRow(),this._sheet)},column:function(e){return new d(this._ref.toColumn(e),this._sheet)},row:function(e){return new d(this._ref.toRow(e),this._sheet)},forEachRow:function(e){this._ref.forEachRow(function(t){e(new d(t,this._sheet))}.bind(this))},forEachColumn:function(e){this._ref.forEachColumn(function(t){e(new d(t,this._sheet))}.bind(this))},sheet:function(){return this._sheet},topLeft:function(){return this._ref.toRangeRef().topLeft},intersectingMerged:function(){var e=this._sheet,t=[];return e._mergedCells.forEach(function(e){e.intersects(this._ref)&&t.push(""+e)}.bind(this)),t},getState:function(t){var i,n,o=this._ref.first(),r={ref:o,data:[],origRef:this._ref,rows:this._sheet._rows.getState()};return t?i="input"===t?["value","formula"]:"border"===t?["borderLeft","borderTop","borderRight","borderBottom"]:[t]:(i=e.spreadsheet.ALL_PROPERTIES,r.mergedCells=this.intersectingMerged()),n=r.data,this.forEachCell(function(t,r,s){var a={},l=t-o.row,c=r-o.col;n[l]||(n[l]=[]),n[l][c]=a,i.forEach(function(t){var i=void 0===s[t]?null:s[t];(i instanceof e.spreadsheet.calc.runtime.Formula||i instanceof e.spreadsheet.validation.Validation)&&(i=i.deepClone()),a[t]=i})}),r},setState:function(e,t){var i=this._sheet,n=this._ref.first(),o=e.ref.row-n.row,r=e.ref.col-n.col,s=t&&!t.isExternal(),a=t&&!s;i.batch(function(){var l,c;e.mergedCells&&this.unmerge(),t||this._sheet._rows.setState(e.rows),l=n.row,c=this.hasFilter(),e.data.forEach(function(o,r){if(!(c&&s&&i.isHiddenRow(e.ref.row+r))){var d=n.col;o.forEach(function(o,u){var h,p;if(!(c&&s&&i.isHiddenColumn(e.ref.col+u))){if(h=t?i.range(l,d):i.range(n.row+r,n.col+u),h.enable()){for(p in o)"value"!=p&&(t&&"enable"==p||h._set(p,o[p]));if(!o.formula)if(a)try{null==o.value?h._set("value",null):h.input(o.value)}catch(f){h._set("value",o.value)}else h._set("value",o.value)}d++}}),l++}}),e.mergedCells&&e.mergedCells.forEach(function(e){e=i._ref(e).relative(o,r,3),i.range(e).merge()},this)}.bind(this),{recalc:!0,ref:this._ref})},_adjustRowHeight:function(){var t=this._sheet,i=t._getMergedCells(this._ref.toRangeRef()),n=i.primary,o=i.secondary;this.forEachRow(function(i){var r=i._ref.topLeft.row,s=t.rowHeight(r);i.forEachCell(function(i,r,l){var c,d,u,h,p=new a(i,r).print();o[p]||(c=n[p],d=c?t._columns.sum(c.topLeft.col,c.bottomRight.col):t.columnWidth(r),u=l.value,l.format&&null!=u&&(u=e.spreadsheet.formatting.format(u,l.format)),h=e.spreadsheet.util.getTextHeight(u,d,l.fontFamily,l.fontSize,l.wrap),s=Math.max(s,h))}),t.rowHeight(r,s)})},forEachCell:function(e){this._ref.forEach(function(t){this._sheet.forEach(t.toRangeRef(),e.bind(this))}.bind(this))},hasValue:function(){var t=this._sheet._defaultCellStyle;return e.util.withExit(function(e){this.forEachCell(function(i,n,o){var r,s;for(r in o)s=o[r],void 0!==s&&null!==s&&s!==t[r]&&e(!0)})},this)},wrap:function(e){return void 0===e?!!this._property("wrap"):(this._property("wrap",e),null!==e&&this._adjustRowHeight(),this)},fontSize:function(e){return void 0===e?this._property("fontSize"):(this._property("fontSize",e),null!==e&&this._adjustRowHeight(),this)},draw:function(e,t){this._sheet.draw(this,e,t)},insideBorders:function(e){return this.insideVerticalBorders(e).insideHorizontalBorders(e)},insideVerticalBorders:function(e){return this._ref.forEach(function(t){t instanceof l&&t.width()>1&&(t=t.clone(),t.topLeft.col++,this._sheet.range(t)._set("vBorders",e))},this),this},insideHorizontalBorders:function(e){return this._ref.forEach(function(t){t instanceof l&&t.height()>1&&(t=t.clone(),t.topLeft.row++,this._sheet.range(t)._set("hBorders",e))},this),this}}),r.each(c,function(e,t){d.prototype[t]=function(e){return this._property(t,e)}}),u=r('<div style="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px 3px !important; box-sizing: border-box; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap;" />')[0],e.spreadsheet.util={getTextHeight:o},e.spreadsheet.Range=d)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/runtime.min",["spreadsheet/references.min"],e)}(function(){"use strict";function e(t){return t instanceof e?t:void(this.code=t)}function t(e,t,i){for(var n,o=i(e),r=e;++e<t;)n=i(e),n>o&&(o=n,r=e);return r}function i(e,t){if(e.constructor!==t.constructor)return!1;if(e instanceof E)return e.sheet==t.sheet&&e.row==t.row&&e.col==t.col&&e.rel==t.rel;if(e instanceof I)return i(e.topLeft,t.topLeft)&&i(e.bottomRight,t.bottomRight)&&e.endSheet==t.endSheet;if(e instanceof M){var n=e.refs.length;if(n!=t.refs.length)return!1;for(;--n>=0;)if(!i(e.refs[n],t.refs[n]))return!1}return!0}function n(t,i){function n(e){var t,i,o,s,d;return c=e[0],t="{ ",Array.isArray(c)?(h+="while (i < args.length) { ",p+="while (i < args.length) { ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="while (i < args.length) { ",t+=e.map(n).join(""),t+="} ",t+="xargs = stack.pop(); ",p+="} ",h+="} "):"+"==c?(h+="while (i < args.length) { ",p+="while (i < args.length) { ",t+="if (i >= args.length) return new CalcError('N/A'); ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="do { ",t+=e.slice(1).map(n).join(""),t+="} while (i < args.length); ",t+="xargs = stack.pop(); ",p+="} ",h+="} "):"?"==c?t+="if (!("+l(e[1])+")) return new CalcError(err); ":(i=e[1],Array.isArray(i)&&/^#?collect/.test(i[0])?(o=/!$/.test(i[0]),s=i[2],r(),t+="try {var $"+c+" = this.cellValues(args.slice(i",s&&(t+=", i + "+s),t+=")"+(o?",true":"")+").reduce(function(ret, $"+c+"){ ","#"!=i[0].charAt(0)&&(t+="if ($"+c+" instanceof CalcError) throw $"+c+"; "),t+="if ("+l(i[1])+") ret.push($"+c+"); ",t+="return ret; ",t+="}.bind(this), []); ",t+=s?"i += "+s+"; ":"i = args.length; ",t+="xargs.push($"+c+")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ",p+="toResolve.push(args.slice(i)); "):"rest"==i?t+="xargs.push(args.slice(i)); i = args.length; ":((g=/^\*/.test(c))&&(v=!0,c=c.substr(1)),t+="var $"+c+" = args[i++]; ",d=!1,/!$/.test(i)?(i=i.substr(0,i.length-1),d=!0):t+="if ($"+c+" instanceof CalcError) return $"+c+"; ",t+=a(i,d)+"xargs.push($"+c+"); ")),t+="} "}function r(){return d?"$"+c:(m=!0,d=!0,p+="toResolve.push(args[i++]); ","($"+c+" = this.force($"+c+"))")}function s(e){return"("+(e?"(typeof "+r()+" == 'number' ? ($"+c+" = round($"+c+"), true) : false) || ":"(typeof "+r()+" == 'number') || ")+"(typeof $"+c+" == 'boolean' ? ($"+c+" = +$"+c+", true) : false) || (typeof $"+c+" == 'string' && !/^(?:=|true|false)/i.test($"+c+") ? (tmp = kendo.spreadsheet.calc.parse(0, 0, 0, $"+c+"), /^date|number|percent$/.test(tmp.type) ? ($"+c+" = +tmp.value, true) : false) : false))"}function a(e,t){d=!1;var i="if (!("+l(e)+")) { ";return d&&!t&&(i+=" if ($"+c+" instanceof CalcError) return $"+c+"; "),i+="return new CalcError(err); } ",d||(p+="i++; "),h+=g?"var $"+c+" = this._arrayArg(args[i]); if ($"+c+") { xargs.push($"+c+"); width = Math.max(width, $"+c+".width); height = Math.max(height, $"+c+".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; ":"xargs.push(args[i++]); arrays.push(false); ",i}function l(e){if(Array.isArray(e)){if("or"==e[0])return"("+e.slice(1).map(l).join(") || (")+")";if("and"==e[0])return"("+e.slice(1).map(l).join(") && (")+")";if("values"==e[0])return"("+e.slice(1).map(function(e){return r()+" === "+e}).join(") || (")+")";if("null"==e[0])return"("+l("null")+" ? (($"+c+" = "+e[1]+"), true) : false)";if("between"==e[0]||"[between]"==e[0])return"("+r()+" >= "+e[1]+" && $"+c+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between)"==e[0])return"("+r()+" > "+e[1]+" && $"+c+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between]"==e[0])return"("+r()+" > "+e[1]+" && $"+c+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("[between)"==e[0])return"("+r()+" >= "+e[1]+" && $"+c+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("assert"==e[0]){var t=e[2]||"N/A";return"(("+e[1]+") ? true : (err = "+JSON.stringify(t)+", false))"}if("not"==e[0])return"!("+l(e[1])+")";throw Error("Unknown array type condition: "+e[0])}if("number"==e||"datetime"==e)return s(!0);if("number!"==e)return"(typeof "+r()+" == 'number' ? ($"+c+" = round($"+c+"), true) : false)";if("integer"==e||"date"==e)return"("+s()+" && (($"+c+" |= 0), true))";if("divisor"==e)return"("+s(!0)+" && ($"+c+" == 0 ? ((err = 'DIV/0'), false) : true))";if("number+"==e)return"("+s(!0)+" && ($"+c+" >= 0 ? true : ((err = 'NUM'), false)))";if("integer+"==e)return"("+s()+" && (($"+c+" |= 0) >= 0 ? true : ((err = 'NUM'), false)))";if("number++"==e)return"("+s(!0)+" && ($"+c+" > 0 ? true : ((err = 'NUM'), false)))";if("integer++"==e)return"("+s()+" && (($"+c+" |= 0) > 0 ? true : ((err = 'NUM'), false)))";if("string"==e)return"((typeof "+r()+" == 'string' || typeof $"+c+" == 'boolean' || typeof $"+c+" == 'number') ? ($"+c+" += '', true) : ($"+c+" === undefined ? (($"+c+" = ''), true) : false))";if("boolean"==e)return"(typeof "+r()+" == 'boolean')";if("logical"==e)return"(typeof "+r()+" == 'boolean' || (typeof $"+c+" == 'number' ? ($"+c+" = !!$"+c+", true) : false))";if("matrix"==e)return r(),"((m = this.asMatrix($"+c+")) ? ($"+c+" = m) : false)";if("#matrix"==e)return"((m = this.asMatrix($"+c+")) ? ($"+c+" = m) : false)";if("ref"==e)return"($"+c+" instanceof kendo.spreadsheet.Ref)";if("area"==e)return"($"+c+" instanceof kendo.spreadsheet.CellRef || $"+c+" instanceof kendo.spreadsheet.RangeRef)";if("cell"==e)return"($"+c+" instanceof kendo.spreadsheet.CellRef)";if("null"==e)return"("+r()+" == null)";if("anyvalue"==e)return"("+r()+" != null && i <= args.length)";if("forced"==e)return"("+r()+", i <= args.length)";if("anything"==e)return"(i <= args.length)";if("blank"==e)return"("+r()+" == null || $"+c+" === '')";throw Error("Can't check for type: "+e)}var c,d,u,h="function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",p="function resolve(args, callback) { var toResolve = [], i = 0; ",f="'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",m=!1,g=!1,v=!1;return f+=i.map(n).join(""),f+="if (i < args.length) return new CalcError('N/A'); ",f+="return xargs; } ",h+="return { args: xargs, width: width, height: height, arrays: arrays }; } ",m?(p+="this.resolveCells(toResolve, callback); } ",u=Function("CalcError","round",f+p+h+" return { resolve: resolve, check: check, arrayArgs: arrayArgs };")):u=Function("CalcError","round",f+" return { check: check };"),u=u(e,o),v||delete u.arrayArgs,u}function o(e){return+e.toPrecision(14)}function r(e){return"number"==typeof e?o(e):e}function s(t,i,n){if(n instanceof e)return n;try{return i.apply(t,n)}catch(o){if(o instanceof e)return o;throw o}}function a(e,t,i,n){return function(o,r){function a(){var t,a,l,c,d,u;if(n&&(t=n.call(this,r),r=t.args,t.width>0&&t.height>0)){for(a=new P(this),l=0;l<t.height;++l)for(c=0;c<t.width;++c){for(d=[],u=0;u<r.length;++u)d[u]=t.arrays[u]?r[u].getNA(l,c):r[u];d=i.call(this,d),a.set(l,c,s(this,e,d))}return o(a)}d=i.call(this,r),o(s(this,e,d))}t?t.call(this,r,a):a.call(this)}}function l(t,i,n,o){return function(r,s){function a(){var i,a,l,c,d,u,h,p;if(o&&(i=o.call(this,s),s=i.args,i.width>0&&i.height>0))for(a=new P(this),l=i.width*i.height,c=function(e,t){return function(i){if(a.set(e,t,i),--l,0===l)return r(a)}},d=0;d<i.height&&l>0;++d)for(u=0;u<i.width&&l>0;++u){for(h=[],p=0;p<s.length;++p)h[p]=i.arrays[p]?s[p].getNA(d,u):s[p];if(h=n.call(this,h),h instanceof e){if(a.set(d,u,h),--l,0===l)return r(a)}else h.unshift(c(d,u)),t.apply(this,h)}else i=n.call(this,s),i instanceof e?r(i):(i.unshift(r),t.apply(this,i))}i?i.call(this,s,a):a.call(this)}}function c(e,t){return e=e.toLowerCase(),B[e]=t,{args:function(i,o){var r,s=n(e,i);return o&&(s.arrayArgs&&console.log(""+s.arrayArgs),s.resolve&&console.log(""+s.resolve),s.check&&console.log(""+s.check)),r=B[e]=a(t,s.resolve,s.check,s.arrayArgs),r.kendoSpreadsheetArgs=i,this},argsAsync:function(i,o){var r,s=n(e,i);return o&&(s.arrayArgs&&console.log(""+s.arrayArgs),s.resolve&&console.log(""+s.resolve),s.check&&console.log(""+s.check)),r=B[e]=l(t,s.resolve,s.check,s.arrayArgs),r.kendoSpreadsheetArgs=i,this}}}function d(e,t,i){return t++,(1461*(e+4800+((t-14)/12|0))/4|0)+(367*(t-2-12*((t-14)/12|0))/12|0)-(3*((e+4900+((t-14)/12|0))/100|0)/4|0)+i-32075}function u(e){var t,i,n,o,r,s,a;return t=e+68569,i=4*t/146097|0,t-=(146097*i+3)/4|0,o=4e3*(t+1)/1461001|0,t=t-(1461*o/4|0)+31,n=80*t/2447|0,s=t-(2447*n/80|0),t=n/11|0,r=n+2-12*t,a=100*(i-49)+o+t,r--,{year:a,month:r,date:s,day:(e+1)%7,ord:N[h(a)][r]+s}}function h(e){return e%4?0:e%100?1:e%400?0:1}function p(e){return h(e)?366:365}function f(e,t){return h(e)&&1==t?29:H[t]}function m(e,t,i){return t>=1&&t<=12&&i>=1&&i<=f(e,t-1)}function g(e){return u((0|e)+L)}function v(e,t,i){return d(e,t,i)-L}function _(e){var t,i,n,o,r=e-(0|e);return r<0&&r++,t=Math.round(W*r),i=Math.floor(t/V),t-=i*V,n=Math.floor(t/O),t-=n*O,o=Math.floor(t/1e3),t-=1e3*o,{hours:i,minutes:n,seconds:o,milliseconds:t}}function b(e){var t=g(e),i=_(e);return new Date(t.year,t.month,t.date,i.hours,i.minutes,i.seconds,i.milliseconds)}function w(e,t,i,n){return(e+(t+(i+n/1e3)/60)/60)/24}function y(e){var t=w(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return e=v(e.getFullYear(),e.getMonth(),e.getDate()),e<0?e-1+t:e+t}function k(e,t){return t&&(t=kendo.spreadsheet.formatting.makeDateFormat(t)),kendo.parseExactDate(e,t)||kendo.parseExactDate(e)||kendo.parseExactDate(e,["MMMM dd yyyy","MMMM dd yy","MMM dd yyyy","MMM dd yy","dd MMMM yyyy","dd MMMM yy","dd MMM yyyy","dd MMM yy","MMMM dd, yyyy","MMMM dd, yy","MMM dd, yyyy","MMM dd, yy","MMMM dd","MMM dd","MMMM yyyy","MMM yyyy","dd MMMM","dd MMM"])}function x(t){return function(i,n){return"string"==typeof i&&"string"!=typeof n&&(n=null==n?"":n+""),"string"!=typeof i&&"string"==typeof n&&(i=null==i?"":i+""),"number"==typeof i&&null==n&&(n=0),"number"==typeof n&&null==i&&(i=0),"string"==typeof i&&"string"==typeof n&&(i=i.toLowerCase(),n=n.toLowerCase()),typeof n==typeof i?t(i,n):new e("VALUE")}}var C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j;kendo.support.browser.msie&&kendo.support.browser.version<9||(C={},S=kendo.spreadsheet,S.calc=C,T=C.runtime={},D=kendo.Class,A=S.Ref,E=S.CellRef,I=S.RangeRef,M=S.UnionRef,R=S.NULLREF,e.prototype.toString=function(){return"#"+this.code+("NAME"==this.code?"?":"!")},F=D.extend({init:function(e,t,i,n){this.callback=e,this.formula=t,this.ss=i,this.parent=n},resolve:function(e){var t=this;e instanceof A?t.resolveCells([e],function(){t._resolve(e)}):t._resolve(e)},error:function(t){return new e(t)},_resolve:function(e){e=void 0===e?null:Array.isArray(e)?this.asMatrix(e):r(e);var t=this.formula;t.arrayFormulaRange?e=this.asMatrix(e)||this.asMatrix([[e]]):e instanceof I&&(e=this._arrayArg(e)),t.value=e,this.ss.onFormula(t)&&this.callback&&this.callback.call(t,e)},resolveCells:function(e,t){function i(e){e.exec(s.ss,function(){--o||t.call(s)},s)}function n(e){var t,i;for(t=0;t<e.length;++t)i=e[t],i.formula&&a.push(i.formula);return!0}var o,r,s=this,a=[];if(function l(e){var t,i;for(t=0;t<e.length;++t)i=e[t],i instanceof A&&n(s.getRefCells(i)),Array.isArray(i)&&l(i)}(e),!a.length)return t.call(s);for(o=a.length,r=0;r<a.length;++r)i(a[r])},cellValues:function(e,t){var i,n,o=[];for(i=0;i<e.length;++i)n=e[i],n instanceof A?(n=this.getRefData(n,t),o=o.concat(n)):Array.isArray(n)?o=o.concat(this.cellValues(n,t)):n instanceof P?o=o.concat(this.cellValues(n.data,t)):o.push(n);return o},fetchName:function(t,i){var n,o=this.formula,r=this.ss.nameValue(t,o.sheet,o.row,o.col);r instanceof z?(r=r.clone(o.sheet,o.row,o.col,!0),n=new S.ValidationFormulaContext(this.ss.workbook),r.exec(n,i,this)):(r instanceof A&&(r=r.absolute(o.row,o.col),r.sheet||(r.sheet=o.sheet)),i(null==r?new e("NAME"):r))},force:function(e){return e instanceof A?this.getRefData(e):e},func:function(t,i,n){t=t.toLowerCase();var o=B[t];return o?o.call(this,i,n):void i(new e("NAME"))},bool:function(e){return e instanceof A&&(e=this.getRefData(e)),"string"==typeof e?"true"==e.toLowerCase():"number"==typeof e?0!==e:"boolean"==typeof e?e:null!=e},_arrayArg:function(t){var i=this.formula;return!i.arrayFormulaRange&&t instanceof I?1==t.height()&&i.col>=t.topLeft.col&&i.col<=t.bottomRight.col?this.getRefData(new E(t.topLeft.row,i.col).setSheet(t.sheet)):1==t.width()&&i.row>=t.topLeft.row&&i.row<=t.bottomRight.row?this.getRefData(new E(i.row,t.topLeft.col).setSheet(t.sheet)):new e("VALUE"):this.asMatrix(t)},asMatrix:function(e){var t,i,n,o,r,s,a;return e instanceof P?e:(t=this,e instanceof I?(i=e.topLeft,n=i.row,o=i.col,r=t.getRefCells(e),s=new P(t),isFinite(e.width())&&(s.width=e.width()),isFinite(e.height())&&(s.height=e.height()),isFinite(n)||(n=0),isFinite(o)||(o=0),r.forEach(function(e){s.set(e.row-n,e.col-o,e.value)}),s):Array.isArray(e)&&e.length>0?(s=new P(t),a=0,e.forEach(function(e){
var i=0,n=1;e.forEach(function(e){var o=e instanceof I;e instanceof A&&!o&&(e=t.getRefData(e)),(o||Array.isArray(e))&&(e=t.asMatrix(e)),e instanceof P?(e.each(function(e,t,n){s.set(a+t,i+n,e)}),n=Math.max(n,e.height),i+=e.width):s.set(a,i++,e)}),a+=n}),s):void 0)},getRefCells:function(e,t,i){var n=this.formula;return this.ss.getRefCells(e,t,n.sheet,n.row,n.col,i)},getRefData:function(e,t){var i=this.formula;return this.ss.getData(e,i.sheet,i.row,i.col,t)},workbook:function(){return this.ss.workbook}}),P=D.extend({init:function(e){this.context=e,this.height=0,this.width=0,this.data=[]},clone:function(){var e=new P(this.context);return e.height=this.height,e.width=this.width,e.data=this.data.map(function(e){return e.slice()}),e},get:function(e,t){var i=this.data[e],n=i?i[t]:null;return n instanceof A?this.context.getRefData(n):n},getNA:function(t,i){return t<this.height&&i<this.width?this.get(t,i):new e("N/A")},set:function(e,t,i){var n=this.data[e];null==n&&(n=this.data[e]=[]),n[t]=i,e>=this.height&&(this.height=e+1),t>=this.width&&(this.width=t+1)},each:function(e,t){var i,n,o;for(i=0;i<this.height;++i)for(n=0;n<this.width;++n)if(o=this.get(i,n),(t||null!=o)&&(o=e.call(this.context,o,i,n),void 0!==o))return o},map:function(e,t){var i=new P(this.context);return this.each(function(t,n,o){i.set(n,o,e.call(this,t,n,o))},t),i},eachRow:function(e){var t,i;for(t=0;t<this.height;++t)if(i=e.call(this.context,t),void 0!==i)return i},eachCol:function(e){var t,i;for(t=0;t<this.width;++t)if(i=e.call(this.context,t),void 0!==i)return i},mapRow:function(e){var t=new P(this.context);return this.eachRow(function(i){t.set(i,0,e.call(this.context,i))}),t},mapCol:function(e){var t=new P(this.context);return this.eachCol(function(i){t.set(0,i,e.call(this.context,i))}),t},toString:function(){return JSON.stringify(this.data)},transpose:function(){var e=new P(this.context);return this.each(function(t,i,n){e.set(n,i,t)}),e},unit:function(e){var t,i,n,o;for(this.width=this.height=e,t=this.data=Array(e),i=e;--i>=0;)for(n=t[i]=Array(e),o=e;--o>=0;)n[o]=i==o?1:0;return this},multiply:function(t){var i,n,o,r,s,a,l=this,c=new P(l.context);for(i=0;i<l.height;++i)for(n=0;n<t.width;++n){for(o=0,r=0;r<l.width;++r){if(s=l.get(i,r),a=t.get(r,n),"number"!=typeof s||"number"!=typeof a)throw new e("VALUE");o+=s*a}c.set(i,n,o)}return c},adds:function(e,t){var i,n,o,r,s=this,a=new P(s.context),l=t?-1:1;for(i=0;i<s.height;++i)for(n=0;n<s.width;++n)o=s.get(i,n),r=e.get(i,n),a.set(i,n,o+l*r);return a},determinant:function(){var e,t,i,n,o,r=this.clone().data,s=r.length,a=1;for(e=0;e<s;e++){for(t=e;t<s&&!r[t][e];t++);if(t==s)return 0;if(t!=e)for(a=-a,n=e;n<s;n++)o=r[e][n],r[e][n]=r[t][n],r[t][n]=o;for(i=e+1;i<s;i++)for(n=e+1;n<s;n++)r[i][n]-=r[e][n]*r[i][e]/r[e][e];a*=r[e][e]}return a},inverse:function(){var e,i,n,o,r,s,a=this.width,l=this.augment(new P(this.context).unit(a)),c=l.data;for(i=0;i<a;++i){if(n=t(i,a,function(e){return c[e][i]}),!c[n][i])return null;for(i!=n&&(e=c[i],c[i]=c[n],c[n]=e),o=i+1;o<a;++o){for(r=i+1;r<2*a;++r)c[o][r]-=c[i][r]*c[o][i]/c[i][i];c[o][i]=0}}for(o=0;o<a;++o)for(s=c[o][o],r=0;r<2*a;++r)c[o][r]/=s;for(i=a;--i>=0;)for(o=i;--o>=0;)if(c[o][i])for(r=2*a;--r>=a;)c[o][r]-=c[i][r]*c[o][i];return l.slice(0,a,a,a)},augment:function(e){var t=this.clone(),i=t.width;return e.each(function(e,n,o){t.set(n,o+i,e)}),t},slice:function(e,t,i,n){var o,r,s=new P(this.context);for(o=0;o<i;++o)for(r=0;r<n;++r)s.set(o,r,this.get(e+o,t+r));return s}}),z=D.extend({init:function(e,t,i,n,o,r,s){this.refs=e,this.handler=t,this.print=i,this.absrefs=null,this.sheet=n,this.row=o,this.col=r,this.onReady=[],this.pending=!1,this.arrayFormulaRange=s},setArrayFormulaRange:function(e){this.arrayFormulaRange=e.clone().setSheet(this.sheet)},clone:function(e,t,i,n){var o=e.toLowerCase(),r=this.refs,s=this.arrayFormulaRange;return(n||o!=this.sheet.toLowerCase())&&(r=r.map(function(t){return t.hasSheet()||t.sheet&&t.sheet.toLowerCase()==o||(t=t.clone().setSheet(e)),t}),s&&(s=s.clone().setSheet(e))),new z(r,this.handler,this.print,e,t,i,s)},deepClone:function(){var e=this.refs.map(function(e){return e.clone()});return new z(e,this.handler,this.print,this.sheet,this.row,this.col,this.arrayFormulaRange)},resolve:function(e){this.pending=!1,this.onReady.forEach(function(t){t(e)})},exec:function(t,i,n){var o,r,s;if("value"in this)i&&i(this.value);else{for(i&&this.onReady.push(i),o=new F(this.resolve,this,t,n),r=0;n;){if(n.formula===this)return this.pending=!1,void o.resolve(new e("CIRCULAR"));n=n.parent,++r}if(this.pending)return;this.pending=!0,s=function(){this.absrefs||(this.absrefs=this.refs.map(function(e){return e.absolute(this.row,this.col)},this)),this.handler.call(o)}.bind(this),r<20?s():setTimeout(s,0)}},reset:function(){this.onReady=[],this.pending=!1,delete this.value},renameSheet:function(e,t){e=e.toLowerCase(),this.absrefs=null,this.sheet.toLowerCase()==e&&(this.sheet=t),this.refs.forEach(function(i){i.renameSheet(e,t)})},adjust:function(e,t,n,o){function r(i){return i===R?i:i.sheet.toLowerCase()!=e?(c&&("row"==t&&s>=n&&(i=i.relative(o,0)),"col"==t&&a>=n&&(i=i.relative(0,o))),i):i.adjust(s,a,d,u,"row"==t,n,o)}var s,a,l,c,d,u,h,p,f;if(e=e.toLowerCase(),s=this.row,a=this.col,l=this.sheet.toLowerCase(),c=!1,l==e&&("row"==t&&s>=n&&(this.row+=o,c=!0),"col"==t&&a>=n&&(this.col+=o,c=!0)),d=this.row,u=this.col,this.absrefs=null,h=this.refs,p=c,this.refs=h.map(function(e){var t=r(e);return p||i(t,e)||(p=!0),t}),f=this.arrayFormulaRange,f&&(this.arrayFormulaRange=r(f),p||i(f,this.arrayFormulaRange)||(p=!0)),p)return new z(h,this.handler,this.print,this.sheet,s,a,f)},toString:function(){return this.print(this.row,this.col)}}),B=Object.create(null),B["if"]=function(t,i){var n=this,o=i[0],r=i[1],s=i[2];this.resolveCells([o],function(){var i=n.asMatrix(o);i?r(function(o){s(function(r){var s=n.asMatrix(o),a=n.asMatrix(r);t(i.map(function(t,i,l){return t instanceof e?t:n.bool(t)?s?s.get(i,l):o:a?a.get(i,l):r}))})}):(o=this.force(o),o instanceof e?t(o):n.bool(o)?r(t):s(t))})},B["φ"]=function(e){e((1+Math.sqrt(5))/2)},L=d(1900,0,-1),H=[31,28,31,30,31,30,31,31,30,31,30,31],N=[[0,31,59,90,120,151,181,212,243,273,304,334],[0,31,60,91,121,152,182,213,244,274,305,335]],O=6e4,V=60*O,W=24*V,T.CalcError=e,T.Formula=z,T.Matrix=P,T.packDate=v,T.unpackDate=g,T.packTime=w,T.unpackTime=_,T.serialToDate=b,T.dateToSerial=y,T.daysInMonth=f,T.validDate=m,T.isLeapYear=h,T.daysInYear=p,T.parseDate=k,T.limitPrecision=o,S.dateToNumber=y,S.numberToDate=b,S.defineFunction=c,S.CalcError=e,T.defineFunction=c,T.defineAlias=function(e,t){var i=B[t];if(!i)throw Error("Function "+t+" is not yet defined");i.kendoSpreadsheetAliases||(i.kendoSpreadsheetAliases=[t]),i.kendoSpreadsheetAliases.push(e),B[e]=i},T.FUNCS=B,U=["or","number",["null",0]],q=[["*a",U],["*b",U]],j=[["*a",["or","anyvalue",["null",0]]],["*b",["or","anyvalue",["null",0]]]],c("binary+",function(e,t){return e+t}).args(q),c("binary-",function(e,t){return e-t}).args(q),c("binary*",function(e,t){return e*t}).args(q),c("binary/",function(e,t){return e/t}).args([["*a",U],["*b","divisor"]]),c("binary^",function(e,t){return Math.pow(e,t)}).args(q),c("binary&",function(e,t){return null==e&&(e=""),null==t&&(t=""),""+e+t}).args([["*a",["or","number","string","boolean","null"]],["*b",["or","number","string","boolean","null"]]]),c("binary=",function(e,t){return e="string"==typeof e?e.toLowerCase():e,t="string"==typeof t?t.toLowerCase():t,e===t}).args(j),c("binary<>",function(e,t){return e!==t}).args(j),c("binary<",x(function(e,t){return e<t})).args(j),c("binary<=",x(function(e,t){return e<=t})).args(j),c("binary>",x(function(e,t){return e>t})).args(j),c("binary>=",x(function(e,t){return e>=t})).args(j),c("unary+",function(e){return e}).args([["*a",U]]),c("unary-",function(e){return-e}).args([["*a",U]]),c("unary%",function(e){return e/100}).args([["*a",U]]),c("binary:",function(e,t){return new I(e,t).setSheet(e.sheet||this.formula.sheet,e.hasSheet())}).args([["a","cell"],["b","cell"]]),c("binary,",function(e,t){return new M([e,t])}).args([["a","ref"],["b","ref"]]),c("binary ",function(e,t){return e.intersect(t)}).args([["a","ref"],["b","ref"]]),c("not",function(e){return!this.bool(e)}).args([["*a",["or","anyvalue",["null",0]]]]),c("isblank",function(e){return e instanceof E&&(e=this.getRefData(e),null==e)}).args([["*value","anything!"]]),c("iserror",function(t){return t instanceof e}).args([["*value","forced!"]]),c("iserr",function(t){return t instanceof e&&"N/A"!=t.code}).args([["*value","forced!"]]),c("isna",function(t){return t instanceof e&&"N/A"==t.code}).args([["*value","forced!"]]),c("islogical",function(e){return"boolean"==typeof e}).args([["*value","forced!"]]),c("isnontext",function(e){return"string"!=typeof e}).args([["*value","forced!"]]),c("istext",function(e){return"string"==typeof e}).args([["*value","forced!"]]),c("isnumber",function(e){return"number"==typeof e}).args([["*value","forced!"]]),c("isref",function(e){return e instanceof E||e instanceof I}).args([["*value","anything!"]]),B[",getname"]=function(e,t){this.fetchName(t[0],e)})},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/validation.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e,t,o,a){var c,d,u,h;if("string"==typeof a&&(a=JSON.parse(a)),a.from&&("list"!==a.dataType||a.fromIsListValue||(a.from=kendo.format(r,a.from),a.fromIsListValue=!0),"date"===a.dataType&&(u=n.runtime.parseDate(a.from),u&&(a.from=kendo.format(s,a.from),a.fromIsDateValue=!0)),a.from=n.compile(n.parseFormula(e,t,o,a.from))),a.to&&("date"===a.dataType&&(h=n.runtime.parseDate(a.to),h&&(a.to=kendo.format(s,a.to),a.toIsDateValue=!0)),a.to=n.compile(n.parseFormula(e,t,o,a.to))),d="custom"==a.dataType?i.validationComparers.custom:"list"==a.dataType?i.validationComparers.list:i.validationComparers[a.comparerType],!d)throw kendo.format("'{0}' comparer is not implemented.",a.comparerType);return c=function(e){var t,i=this.to&&this.to_value?this.to_value:void 0;return null===e||""===e?this.value=!!this.allowNulls:"custom"==this.dataType?this.value=d(e,this.from_value,i):"list"==this.dataType?(t=this._getListData(),this.value=d(e,t,i)):this.value=d(e,this.from_value,i),this.value},new kendo.spreadsheet.validation.Validation(l.extend(a,{handler:c,sheet:e,row:t,col:o}))}var t,i,n,o,r,s,a,l=kendo.jQuery;kendo.support.browser.msie&&kendo.support.browser.version<9||(t=kendo.spreadsheet,i={},t.validation=i,n=t.calc,o=kendo.Class,r="_matrix({0})",s='DATEVALUE("{0}")',n.runtime.defineFunction("_matrix",function(e){return"string"==typeof e&&(e=this.asMatrix([e.split(/\s*,\s*/)])),e}).args([["m",["or","matrix","string"]]]),a=o.extend({init:function(e){this.handler=e.handler,this.from=e.from,this.to=e.to,this.dataType=e.dataType,this.comparerType=e.comparerType,this.type=e.type?e.type:"warning",this.allowNulls=!!e.allowNulls,this.fromIsDateValue=!!e.fromIsDateValue,this.toIsDateValue=!!e.toIsDateValue,this.showButton=e.showButton,this.fromIsListValue=!!e.fromIsListValue,this.sheet=e.sheet,this.row=e.row,this.col=e.col,e.tooltipMessageTemplate&&(this.tooltipMessageTemplate=e.tooltipMessageTemplate),e.tooltipTitleTemplate&&(this.tooltipTitleTemplate=e.tooltipTitleTemplate),e.messageTemplate&&(this.messageTemplate=e.messageTemplate),e.titleTemplate&&(this.titleTemplate=e.titleTemplate)},_formatMessages:function(e){var t=this.from?this.from_value:"",i=this.to?this.to_value:"",n=this.from?""+this.from:"",o=this.to?""+this.to:"",r=this.dataType,s=this.type,a=this.comparerType;return kendo.format(e,t,i,n,o,r,s,a)},_setMessages:function(){this.title="",this.message="",this.tooltipTitleTemplate&&(this.tooltipTitle=this._formatMessages(this.tooltipTitleTemplate)),this.tooltipMessageTemplate&&(this.tooltipMessage=this._formatMessages(this.tooltipMessageTemplate)),this.titleTemplate&&(this.title=this._formatMessages(this.titleTemplate)),this.messageTemplate&&(this.message=this._formatMessages(this.messageTemplate))},_getListData:function(){var e,t,i,n,o;if(!this.from_value||!this.from_value.data)return[];for(e=this.from_value.data,n=[],t=0;t<e.length;t++)if(o=e[t])for(i=0;i<o.length;i++)n.push(o[i]);return n},clone:function(e,t,i){var n=this._getOptions();return n.from&&(n.from=n.from.clone(e,t,i)),n.to&&(n.to=n.to.clone(e,t,i)),new a(l.extend(n,{handler:this.handler},{sheet:e,row:t,col:i}))},deepClone:function(){var e=new a(this);return e.from=e.from.deepClone(),e.to&&(e.to=e.to.deepClone()),e},exec:function(e,t,i,n){function o(t){return t instanceof kendo.spreadsheet.Ref&&(t=e.getData(t),Array.isArray(t)&&(t=t[0])),t}var r=this,s=function(e){r.from_value=o(e),r.value=r.handler.call(r,t,i),r._setMessages(),n&&n(r.value)};r.to?r.to.exec(e,function(t){r.to_value=o(t),r.from.exec(e,s)}):r.from.exec(e,s)},reset:function(){this.from&&this.from.reset(),this.to&&this.to.reset(),delete this.value},adjust:function(e,t,i,n){var o,r,s,l,c=this.row,d=this.col;if(this.from&&(o=this.from.adjust(e,t,i,n)),this.to&&(r=this.to.adjust(e,t,i,n)),this.sheet.toLowerCase()==e.toLowerCase())switch(t){case"row":c>=i&&(s=!0,this.row+=n);break;case"col":d>=i&&(s=!0,this.col+=n)}if(s||o||r)return l=new a(this),l.from=o,l.to=r,l.row=c,l.col=d,l},toJSON:function(){var e=this._getOptions();return e.from&&(e.from=""+e.from,"list"===e.dataType&&(e.from=e.from.replace(/^_matrix\((.*)\)$/i,"$1"),delete e.fromIsListValue),"date"===e.dataType&&this.fromIsDateValue&&(e.from=e.from.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete e.fromIsDateValue)),e.to&&(e.to=""+e.to,"date"===e.dataType&&this.toIsDateValue&&(e.to=e.to.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete e.toIsDateValue)),e},_getOptions:function(){return{from:this.from,to:this.to,dataType:this.dataType,type:this.type,comparerType:this.comparerType,row:this.row,col:this.col,sheet:this.sheet,allowNulls:this.allowNulls,fromIsListValue:this.fromIsListValue,fromIsDateValue:this.fromIsDateValue,toIsDateValue:this.toIsDateValue,tooltipMessageTemplate:this.tooltipMessageTemplate,tooltipTitleTemplate:this.tooltipTitleTemplate,messageTemplate:this.messageTemplate,titleTemplate:this.titleTemplate,showButton:this.showButton}}}),i.compile=e,i.validationComparers={greaterThan:function(e,t){return e>t},lessThan:function(e,t){return e<t},between:function(e,t,i){return e>=t&&e<=i},equalTo:function(e,t){return e==t},notEqualTo:function(e,t){return e!=t},greaterThanOrEqualTo:function(e,t){return e>=t},lessThanOrEqualTo:function(e,t){return e<=t},notBetween:function(e,t,i){return e<t||e>i},custom:function(e,t){return t},list:function(e,t){return t.indexOf(e)>-1}},i.Validation=a)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/sheet.min",["kendo.core.min","kendo.color.min","spreadsheet/runtime.min","spreadsheet/validation.min","spreadsheet/references.min"],e)}(function(){!function(e){var t,i,n,o,r,s,a;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,i=e.spreadsheet.UnionRef,n=e.spreadsheet.CellRef,o=e.spreadsheet.Range,s=e.Class.extend({init:function(t){this._sheet=t,this.selection=e.spreadsheet.FIRSTREF.toRangeRef(),this.originalSelection=e.spreadsheet.FIRSTREF.toRangeRef(),this._activeCell=e.spreadsheet.FIRSTREF.toRangeRef(),this.originalActiveCell=e.spreadsheet.FIRSTREF},currentSelectionRange:function(){return this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()},currentOriginalNavigationRange:function(){return this.originalSelection.rangeAt(this.selectionRangeIndex).toRangeRef()},currentNavigationRange:function(){return this.singleCellSelection()?this._sheet._sheetRef:this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()},nextNavigationRange:function(){return this.singleCellSelection()||(this.selectionRangeIndex=this.selection.nextRangeIndex(this.selectionRangeIndex)),this.currentNavigationRange()},previousNavigationRange:function(){return this.singleCellSelection()||(this.selectionRangeIndex=this.selection.previousRangeIndex(this.selectionRangeIndex)),this.currentNavigationRange()},activeCell:function(e){return e&&(this.originalActiveCell=e.first(),this._activeCell=this._sheet.unionWithMerged(e.toRangeRef()),this._sheet.focus(e),this._sheet.triggerChange({activeCell:!0,selection:!0})),this._activeCell},select:function(e,t,i){if(e){if(e.eq(this.originalSelection))return;this._sheet.triggerSelect(new o(e,this._sheet)),this.originalSelection=e,this.selection=t,i!==!1?(e.isCell()?(this._sheet.forEachMergedCell(e,function(t){e=t.topLeft}),this.activeCell(e)):this.activeCell(this.selection.lastRange().first()),this.selectionRangeIndex=this.selection.size()-1):this._sheet.triggerChange({selection:!0})}return this.selection},singleCellSelection:function(){return this._activeCell.eq(this.selection)}}),a=e.Observable.extend({init:function(){e.Observable.prototype.init.call(this),this._reinit.apply(this,arguments)},events:["commandRequest","afterInsertRow","afterDeleteRow","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select"],_reinit:function(t,i,n,o,r,a,l){l=l||{},this._defaultCellStyle={background:l.background,color:l.color,fontFamily:l.fontFamily,fontSize:l.fontSize,italic:l.italic,bold:l.bold,underline:l.underline,wrap:l.wrap,verticalAlign:l.verticalAlign,textAlign:l.textAlign},this._rows=new e.spreadsheet.Axis(t,n),this._columns=new e.spreadsheet.Axis(i,o),this._mergedCells=[],this._frozenRows=0,this._frozenColumns=0,this._suspendChanges=!1,this._filter=null,this._showGridLines=!0,this._gridLinesColor=null,this._grid=new e.spreadsheet.Grid(this._rows,this._columns,t,i,r,a),this._sheetRef=this._grid.normalize(e.spreadsheet.SHEETREF),this._properties=new e.spreadsheet.PropertyBag(t,i,this._defaultCellStyle),this._sorter=new e.spreadsheet.Sorter(this._grid,this._properties.sortable()),this._viewSelection=new s(this),this._editSelection=new s(this),this._formulaSelections=[]},_selectionState:function(){return this._inEdit?this._editSelection:this._viewSelection},navigator:function(){return this._navigator||(this._navigator=new e.spreadsheet.SheetNavigator(this)),this._navigator},axisManager:function(){return this._axisManager||(this._axisManager=new e.spreadsheet.AxisManager(this)),this._axisManager},_name:function(e){return e?(this._sheetName=e,this):this._sheetName},name:function(){return this._name()},_property:function(e,t,i){return void 0===t?e():(e(t),this.triggerChange(i))},_field:function(e,t,i){return void 0===t?this[e]:(this[e]=t,this.triggerChange(i))},suspendChanges:function(e){return void 0===e?this._suspendChanges:(this._suspendChanges=e,this)},triggerChange:function(e){return this._suspendChanges||this.trigger("change",e),this},triggerSelect:function(e){this.trigger("select",{range:e})},setDataSource:function(t,i){this.dataSourceBinder&&this.dataSourceBinder.destroy(),this.dataSourceBinder=new e.spreadsheet.SheetDataSourceBinder({dataSource:t,sheet:this,columns:i}),this.dataSource=this.dataSourceBinder.dataSource},hideColumn:function(e){if(!this.trigger("hideColumn",{index:e}))return this._property(this._columns.hide.bind(this._columns),e,{layout:!0})},unhideColumn:function(e){if(!this.trigger("unhideColumn",{index:e}))return this._property(this._columns.unhide.bind(this._columns),e,{layout:!0})},isHiddenColumn:function(e){return this._grid._columns.hidden(e)},_copyRange:function(e,t){var i=this._grid,n=i.rowCount,o=i.normalize(e.topLeft),r=i.normalize(e.bottomRight),s=o.col*n+o.row,a=r.col*n+r.row,l=t.col*n+t.row;this._properties.copy(s,a,l)},_saveModifiedFormulas:function(e,t){var i,n=r;return r=e,i=t(),r=n,i},_restoreModifiedFormulas:function(t){var i=this._workbook;t.forEach(function(t){var n,o=i.sheetByName(t.sheet);t instanceof e.spreadsheet.calc.runtime.Formula&&(n=o._grid.cellRefIndex(t),o._properties.set("formula",n,n,t)),t instanceof e.spreadsheet.validation.Validation&&(n=o._grid.cellRefIndex(t),o._properties.set("validation",n,n,t))})},_adjustReferences:function(i,n,o,s){var a,l,c;this._mergedCells=s.reduce(function(e,r){return r=r.adjust(null,null,null,null,"row"==i,n,o),r instanceof t&&e.push(r),e},[]),this._workbook&&(a=this._name(),this._workbook._sheets.forEach(function(e){e._forFormulas(function(e){var t=e.adjust(a,i,n,o);t&&r&&r.push(t)}),e._forValidations(function(e){var t=e.adjust(a,i,n,o);t&&r&&r.push(t)})}),this._workbook.adjustNames(a,"row"==i,n,o)),l=this.select(),l=l.adjust(null,null,null,null,"row"==i,n,o),l!==e.spreadsheet.NULLREF&&this.select(l),c="col"==i?this._columns:this._rows,c.adjust(n,o)},_forFormulas:function(e){var t=this._properties,i=t.get("formula").values(),n=i.length;i.forEach(function(t,i){e.call(this,t.value,i,n)},this)},_forValidations:function(e){var t=this._properties;t.get("validation").values().forEach(function(t){e.call(this,t.value)},this)},preventInsertRow:function(e,t){var i,n;return this.selectedHeaders().allRows?{reason:"error",type:"insertRowWhenColumnIsSelected"}:(t=t||1,i=this._grid,n=this.range(i.rowCount-t,0,t,i.columnCount),!!n.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},preventInsertColumn:function(e,t){var i,n;return this.selectedHeaders().allCols?{reason:"error",type:"insertColumnWhenRowIsSelected"}:(t=t||1,i=this._grid,n=this.range(0,i.columnCount-t,i.rowCount,t),!!n.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},insertRow:function(e){var i=this.preventInsertRow(e);if(i)throw Error("Shifting nonblank cells off the worksheet is not supported!");if(!this.trigger("insertRow",{index:e}))return this.batch(function(){var i,r,s,a,l,c,d=this._grid,u=d.columnCount,h=d.rowCount,p=this.frozenRows();for(e<p&&this.frozenRows(p+1),i=this._mergedCells.slice(),r=0;r<u;r++)s=new t(new n(e,r),new n(e,r)),a=d.normalize(s.topLeft),l=d.normalize(s.bottomRight),c=new t(new n(a.row,a.col),new n(h-2,l.col)),this._copyRange(c,new n(a.row+1,a.col)),new o(s,this).clear({clearAll:!0,keepBorders:!0});this._adjustReferences("row",e,1,i)},{recalc:!0,layout:!0,insertRow:{index:e},ref:new t(new n(e,0),new n(1/0,1/0))}),this.trigger("afterInsertRow",{index:e}),this},isEnabledRow:function(e){var i=new t(new n(e,0),new n(e,this._grid.columnCount));return new o(i,this).enable()},deleteRow:function(e){if(!this.isEnabledRow(e))return this;if(!this.trigger("deleteRow",{index:e}))return this.batch(function(){var i,r,s,a,l,c,d,u=this._grid,h=u.columnCount,p=this.frozenRows();for(e<p&&this.frozenRows(p-1),i=this._mergedCells.slice(),r=0;r<h;r++)s=new t(new n(e,r),new n(e,r)),new o(s,this).clear({clearAll:!0,keepBorders:!0}),a=u.normalize(s.topLeft),l=u.normalize(s.bottomRight),c=new t(new n(a.row+1,a.col),new n(1/0,l.col)),this._copyRange(c,a),d=u.normalize(c.bottomRight),new o(new t(d,d),this).clear();this._adjustReferences("row",e,-1,i)},{recalc:!0,layout:!0,deleteRow:{index:e},ref:new t(new n(e,0),new n(1/0,1/0))}),this.trigger("afterDeleteRow",{index:e}),this},insertColumn:function(e){if(!this.trigger("insertColumn",{index:e}))return this.batch(function(){var i,r,s,a,l,c,d=this._grid,u=d.columnCount,h=this.frozenColumns();for(e<h&&this.frozenColumns(h+1),i=this._mergedCells.slice(),r=u;r>=e&&(s=new t(new n(0,r),new n(1/0,r)),new o(s,this).clear({clearAll:!0,keepBorders:!0}),r!=e);r--)a=d.normalize(s.topLeft),l=d.normalize(s.bottomRight),c=new t(new n(a.row,a.col-1),new n(l.row,l.col-1)),this._copyRange(c,a);this._adjustReferences("col",e,1,i)},{recalc:!0,layout:!0,insertColumn:{index:e},ref:new t(new n(0,e),new n(1/0,1/0))}),this},isEnabledColumn:function(e){var i=new t(new n(0,e),new n(1/0,e));return new o(i,this).enable()},deleteColumn:function(e){if(!this.isEnabledColumn(e))return this;if(!this.trigger("deleteColumn",{index:e}))return this.batch(function(){var i,r,s,a,l,c,d=this._grid,u=d.columnCount,h=this.frozenColumns();for(e<h&&this.frozenColumns(h-1),i=this._mergedCells.slice(),r=e;r<u&&(s=new t(new n(0,r),new n(1/0,r)),new o(s,this).clear({clearAll:!0,keepBorders:!0}),r!=u-1);r++)a=d.normalize(s.topLeft),l=d.normalize(s.bottomRight),c=new t(new n(a.row,a.col+1),new n(l.row,l.col+1)),this._copyRange(c,a);this._adjustReferences("col",e,-1,i)},{recalc:!0,layout:!0,deleteColumn:{index:e},ref:new t(new n(0,e),new n(1/0,1/0))}),this},hideRow:function(e){if(!this.trigger("hideRow",{index:e}))return this._property(this._rows.hide.bind(this._rows),e,{layout:!0})},unhideRow:function(e){if(!this.trigger("unhideRow",{index:e}))return this._property(this._rows.unhide.bind(this._rows),e,{layout:!0})},isHiddenRow:function(e){return this._grid._rows.hidden(e)},columnWidth:function(e,t){return this._property(this._columns.value.bind(this._columns,e,e),t,{layout:!0})},rowHeight:function(e,t){return this._property(this._rows.value.bind(this._rows,e,e),t,{layout:!0})},frozenRows:function(e){return this._field("_frozenRows",e,{layout:!0})},frozenColumns:function(e){return this._field("_frozenColumns",e,{layout:!0})},showGridLines:function(e){return this._field("_showGridLines",e,{layout:!0})},gridLinesColor:function(e){return this._field("_gridLinesColor",e,{layout:!0})},_ref:function(i,o,r,s){var a=null;return i instanceof e.spreadsheet.Ref?i:i instanceof e.spreadsheet.Range?i._ref.toRangeRef():("string"==typeof i?a=e.spreadsheet.calc.parseReference(i):(r||(r=1),s||(s=1),a=new t(new n(i,o),new n(i+r-1,o+s-1))),a)},range:function(e,t,i,n){return new o(this._ref(e,t,i,n),this)},_getMergedCells:function(e){var t=this._grid,i={},n={},o=!1;return this.forEachMergedCell(e,function(r){var s=r.topLeft;t.forEach(r,function(t){s.eq(t)?(i[t.print()]=r,o=!0):e.contains(t)&&(n[t.print()]=s,o=!0)})}),{primary:i,secondary:n,hasMerged:o}},forEachMergedCell:function(e,t){var i=!1;void 0===t&&(t=e,i=!0),this._mergedCells.forEach(function(n){(i||n.intersects(e))&&t(n)})},forEachFilterHeader:function(e,t){var i,n=!1;void 0===t&&(t=e,n=!0),this._filter&&(i=[],this._filter.ref.forEachColumn(function(t){(n||t.intersects(e))&&i.push(t.topLeft)}),this._mergedCells.forEach(function(e){i=i.map(function(t){return e.intersects(t)?e:t})}),i.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]).forEach(t))},forEach:function(e,n){function o(e){function i(e){n(l++,a,e)}var o,s,a,l,c,d;for(e instanceof t||(e=e.toRangeRef()),o=r._grid.normalize(e.topLeft),s=r._grid.normalize(e.bottomRight),a=o.col;a<=s.col;a++)l=o.row,c=r._grid.index(l,a),d=r._grid.index(s.row,a),r._properties.forEach(c,d,i)}var r=this;e instanceof t||(e=r._ref(e)),e instanceof i?e.forEach(o):o(e)},startResizing:function(e){this._initialPosition=e,this._resizeInProgress=!0},startAutoFill:function(){this._autoFillInProgress=!0;var e=this.select();this._autoFillOrigin=e,this._autoFillDest=e,this.triggerChange({selection:!0})},updateAutoFill:function(e,t,i,n){this._autoFillDest=e,this._autoFillPunch=t,this._autoFillHint=i,this._autoFillDirection=n,this.triggerChange({selection:!0})},autoFillRef:function(){return this._autoFillDest},autoFillPunch:function(){return this._autoFillPunch},autoFillInProgress:function(){return this._autoFillInProgress},resizingInProgress:function(){return this._resizeInProgress},completeResizing:function(){var e,t;this._resizeInProgress&&(this._resizeInProgress=!1,e=this.resizeHintPosition(),this._initialPosition&&e?(t=this.resizeHandlePosition(),t.col!==-(1/0)?this.trigger("commandRequest",{command:"ColumnWidthCommand",options:{target:t.col,value:this.columnWidth(t.col)-(this._initialPosition.x-e.x)}}):this.trigger("commandRequest",{command:"RowHeightCommand",options:{target:t.row,value:this.rowHeight(t.row)-(this._initialPosition.y-e.y)}})):this.trigger("change",{resize:!0}))},resizeHandlePosition:function(){return this._resizeHandlePosition},resizeHintPosition:function(e){return void 0!==e&&(this._resizeHintPosition=e,this.trigger("change",{resize:!0})),this._resizeHintPosition},removeResizeHandle:function(){this._resizeHandlePosition&&(this._resizeHintPosition=void 0,this._resizeHandlePosition=void 0,this._initialPosition=void 0,this.trigger("change",{resize:!0}))},positionResizeHandle:function(e){this._resizeHandlePosition=e,this.trigger("change",{resize:!0})},startSelection:function(){this._selectionInProgress=!0},completeSelection:function(){var e,t;this._selectionInProgress&&(this._selectionInProgress=!1,this._resizeHintPosition=void 0,this.trigger("change",{selection:!0})),this._autoFillInProgress&&(this._autoFillInProgress=!1,e=this._autoFillDest,t=this._autoFillOrigin,this._autoFillPunch?this.trigger("commandRequest",{command:"ClearContentCommand",options:{operatingRange:this.range(this._autoFillPunch)}}):e.eq(t)?this.triggerChange({selection:!0}):this.trigger("commandRequest",{command:"AutoFillCommand",options:{operatingRange:this.range(e),origin:this.range(t)}}),this._autoFillDest=null,this._autoFillPunch=null,this._autoFillOrigin=null,this.select(e))},selectionInProgress:function(){return this._selectionInProgress},select:function(e,t){var i,n=this._selectionState();return e&&(e=this._ref(e),e=this._grid.normalize(e),i=this._grid.isAxis(e)?e:this.unionWithMerged(e)),n.select(e,i,t)},originalSelect:function(){return this._selectionState().originalSelection},currentSelectionRange:function(){return this._selectionState().currentSelectionRange()},currentOriginalSelectionRange:function(){return this._selectionState().currentOriginalNavigationRange()},currentNavigationRange:function(){return this._selectionState().currentNavigationRange()},nextNavigationRange:function(){return this._selectionState().nextNavigationRange()},previousNavigationRange:function(){return this._selectionState().previousNavigationRange()},selectionRangeIndex:function(){return this._selectionState().selectionRangeIndex},activeCell:function(e){return this._selectionState().activeCell(e)},originalActiveCell:function(){return this._selectionState().originalActiveCell},singleCellSelection:function(){return this._selectionState().singleCellSelection()},unionWithMerged:function(e){var t=this._mergedCells;return e.map(function(e){return e.toRangeRef().union(t)})},trim:function(e){var t=[],i=this._grid;return this._properties.forEachProperty(function(n){t.push(i.trim(e,n.list))}),this.unionWithMerged(e.topLeft.toRangeRef().union(t))},focus:function(e){if(!e){var t=this._focus;return this._focus=null,t}this._focus=e.toRangeRef()},activeCellSelection:function(){return new o(this._grid.normalize(this.activeCell()),this)},selection:function(){return new o(this._grid.normalize(this._selectionState().selection),this)},selectedHeaders:function(){var e=this.select(),t={},i={},n=!1,o=!1,r=this._grid.rowCount-1,s=this._grid.columnCount-1;return e.forEach(function(e){var a,l,c,d,u,h="partial",p="partial";if(e=e.toRangeRef(),l=e.bottomRight,c=e.topLeft,d=c.col<=0&&l.col>=s,u=c.row<=0&&l.row>=r,u&&(o=!0,p="full"),d&&(n=!0,h="full"),!u)for(a=c.row;a<=l.row;a++)"full"!==t[a]&&(t[a]=h);if(!d)for(a=c.col;a<=l.col;a++)"full"!==i[a]&&(i[a]=p)}),{rows:t,cols:i,allRows:o,allCols:n,all:o&&n}},isInEditMode:function(e){return void 0===e?this._inEdit:(this._inEdit=e,void(e&&(this._editSelection.selection=this._viewSelection.selection.clone(),this._editSelection.originalSelection=this._viewSelection.originalSelection.clone(),this._editSelection._activeCell=this._viewSelection._activeCell.clone(),this._editSelection.originalActiveCell=this._viewSelection.originalActiveCell.clone())))},_setFormulaSelections:function(e){this._formulaSelections=(e||[]).slice(),this.triggerChange({selection:!0})},_viewActiveCell:function(){return this._viewSelection._activeCell.toRangeRef()},toJSON:function(){function t(e){Object.keys(l).forEach(function(t){e[t]===l[t]&&delete e[t]})}var i,n={},o=this._rows.toJSON("height",n),r=this._columns.toJSON("width",{}),s=this._viewSelection,a=[],l=this._defaultCellStyle||{};return this.forEach(e.spreadsheet.SHEETREF,function(i,r,s){if(t(s),0!==Object.keys(s).length){s.link&&a.push({ref:e.spreadsheet.Ref.display(null,i,r),target:s.link});var l=n[i];void 0===l&&(l=o.length,o.push({index:i}),n[i]=l),i=o[l],s.index=r,void 0===i.cells&&(i.cells=[]),s.formula&&(s.formula=s.formula.arrayFormulaRange?{src:""+s.formula,
ref:""+s.formula.arrayFormulaRange}:""+s.formula),s.validation&&(s.validation=s.validation.toJSON()),s.color&&(s.color=e.parseColor(s.color).toCss()),s.background&&(s.background=e.parseColor(s.background).toCss()),s.borderTop&&s.borderTop.color&&(s.borderTop.color=e.parseColor(s.borderTop.color).toCss()),s.borderBottom&&s.borderBottom.color&&(s.borderBottom.color=e.parseColor(s.borderBottom.color).toCss()),s.borderRight&&s.borderRight.color&&(s.borderRight.color=e.parseColor(s.borderRight.color).toCss()),s.borderLeft&&s.borderLeft.color&&(s.borderLeft.color=e.parseColor(s.borderLeft.color).toCss()),i.cells.push(s)}}),i={name:this._name(),rows:o,columns:r,selection:""+s.selection,activeCell:""+s.activeCell(),frozenRows:this.frozenRows(),frozenColumns:this.frozenColumns(),showGridLines:this.showGridLines(),gridLinesColor:this.gridLinesColor(),mergedCells:this._mergedCells.map(function(e){return""+e}),hyperlinks:a,defaultCellStyle:l},this._sort&&(i.sort={ref:""+this._sort.ref,columns:this._sort.columns.map(function(e){return{index:e.index,ascending:e.ascending}})}),this._filter&&(i.filter={ref:""+this._filter.ref,columns:this._filter.columns.map(function(e){var t=e.filter.toJSON();return t.index=e.index,t})}),i},fromJSON:function(t){this.batch(function(){var i,n,o,r,s,a,l,c,d,u,h,p;if(void 0!==t.name&&this._name(t.name),void 0!==t.frozenColumns&&this.frozenColumns(t.frozenColumns),void 0!==t.frozenRows&&this.frozenRows(t.frozenRows),void 0!==t.columns&&this._columns.fromJSON("width",t.columns),void 0!==t.rows)for(this._rows.fromJSON("height",t.rows),i=0;i<t.rows.length;i++)if(n=t.rows[i],o=n.index,void 0===o&&(o=i),n.cells)for(r=0;r<n.cells.length;r++)s=n.cells[r],a=s.index,void 0===a&&(a=r),s.formula&&(l="string"!=typeof s.formula,c=l?s.formula.src:s.formula,d=this._compileFormula(o,a,c),l&&d.setArrayFormulaRange(e.spreadsheet.calc.parseReference(s.formula.ref)),s.formula=d),s.validation&&(s.validation=this._compileValidation(o,a,s.validation)),this._properties.fromJSON(this._grid.index(o,a),s);t.selection&&(this._viewSelection.selection=this._viewSelection.originalSelection=this._ref(t.selection)),t.activeCell&&(u=this._ref(t.activeCell),this._viewSelection._activeCell=u.toRangeRef(),this._viewSelection.originalActiveCell=u.first()),t.mergedCells&&t.mergedCells.forEach(function(e){this.range(e).merge()},this),t.sort&&(this._sort={ref:this._ref(t.sort.ref),columns:t.sort.columns.slice(0)}),t.filter&&(h=t.filter.ref,p=void 0===t.filter.columns?[]:t.filter.columns,h?(this._filter={ref:this._ref(h),columns:p.map(function(t){return{index:t.index,filter:e.spreadsheet.Filter.create(t)}})},this._refreshFilter()):e.logToConsole("Dropping filter for sheet '"+t.name+"' due to missing ref")),void 0!==t.showGridLines&&(this._showGridLines=t.showGridLines),this._gridLinesColor=t.gridLinesColor}),this._rows._refresh(),this._columns._refresh()},formula:function(e){return this._properties.get("formula",this._grid.cellRefIndex(e))},validation:function(e){return this._properties.get("validation",this._grid.cellRefIndex(e))},resetFormulas:function(){this._forFormulas(function(e){e.reset()})},resetValidations:function(){this._forValidations(function(e){e.reset()})},recalc:function(e,t){function i(){r--,s!=o||r||t()}var n=this._properties.get("formula").values(),o=n.length,r=0,s=0;if(!o&&t)return t();for(;s<o;)r++,n[s++].value.exec(e,t?i:null)},revalidate:function(e){var i=this;this._forValidations(function(o){var r=new n(o.row,o.col),s=new t(r,r);o.exec(e,i._get(s,"value"),i._get(s,"format"))})},_value:function(e,t,i){var n=this._grid.index(e,t);return void 0===i?this._properties.get("value",n):void this._properties.set("value",n,n,i)},_validation:function(e,t){var i=this._grid.index(e,t);return this._properties.get("validation",i)},_compileValidation:function(t,i,n){return n instanceof e.spreadsheet.validation.Validation?n.clone(this._name(),t,i):(null!=n.from&&(n.from=(n.from+"").replace(/^=/,"")),null!=n.to&&(n.to=(n.to+"").replace(/^=/,"")),e.spreadsheet.validation.compile(this._name(),t,i,n))},_compileFormula:function(t,i,n){return n=n.replace(/^=/,""),n=e.spreadsheet.calc.parseFormula(this._name(),t,i,n),e.spreadsheet.calc.compile(n)},_copyValuesInRange:function(e,t,i,n){var o,r,s,a,l;for(o=e.col;o<=t.col;o++)for(r=this._grid.index(e.row,o),s=this._grid.index(t.row,o),a=r,l=e.row;a<=s;++a,++l)i=i.clone(this._name(),l,o),this._properties.set(n,a,a,i);return i},_set:function(t,i,n){var o,r,s,a=this._grid.normalize(t.topLeft),l=this._grid.normalize(t.bottomRight);if("number"==typeof n&&(n=e.spreadsheet.calc.runtime.limitPrecision(n)),n&&"formula"==i)"string"==typeof n&&(n=this._compileFormula(a.row,a.col,n)),n=this._copyValuesInRange(a,l,n,"formula");else if(n&&"validation"==i)n=this._compileValidation(a.row,a.col,n),n=this._copyValuesInRange(a,l,n,"validation");else for(o=a.col;o<=l.col;o++)r=this._grid.index(a.row,o),s=this._grid.index(l.row,o),this._properties.set(i,r,s,n),"formula"==i&&this._properties.set("value",r,s,null)},_get:function(e,t){var i=this._grid.normalize(e.topLeft),n=this._grid.index(i.row,i.col);return this._properties.get(t,n)},batch:function(e,t){var i=this.suspendChanges();return this.suspendChanges(!0),e.call(this),this.suspendChanges(i).triggerChange(t||{recalc:!0})},_sortBy:function(e,t){var i=null;t.forEach(function(t){i=this._sorter.sortBy(e,t.index,this._properties.get("value"),t.ascending,i)},this),this._sort={ref:e,columns:t},this._refreshFilter(),this.forEach(e,function(e,t,i){var n,o,r=i.formula;r&&(n=e-r.row,0!==n&&(o=n>0?r.row:r.row+n,r.adjust(this.name(),"row",o,n)))}.bind(this)),this.triggerChange({recalc:!0})},_refreshFilter:function(){this._filter&&this._filterBy(this._filter.ref,this._filter.columns)},_filterBy:function(t,i){this.batch(function(){for(var n=t.topLeft.row;n<=t.bottomRight.row;n++)this._rows.hidden(n)&&this._rows.unhide(n);i.forEach(function(i){var n,o,r,s=t.resize({top:1}).toColumn(i.index),a=[];if(s!==e.spreadsheet.NULLREF)for(this.forEach(s,function(e,t,i){i.row=e,a.push(i)}),i.filter.prepare(a),n=0;n<a.length;n++)o=a[n],r=i.filter.value(o),i.filter.matches(r)===!1&&this.hideRow(o.row)},this),this._filter={ref:t,columns:i}},{recalc:!0,layout:!0,filter:!0})},filterColumn:function(e){var t=this.filter().ref;return e.toRangeRef().topLeft.col-t.topLeft.col},filter:function(){return this._filter},clearFilter:function(e){this._clearFilter(e instanceof Array?e:[e])},_clearFilter:function(e){this._filter&&this.batch(function(){this._filter.columns=this._filter.columns.filter(function(t){return e.indexOf(t.index)<0}),this._refreshFilter()},{recalc:!0,layout:!0,filter:!0})},getAxisState:function(){return{rows:this._rows.getState(),columns:this._columns.getState()}},setAxisState:function(e){this._rows.setState(e.rows),this._columns.setState(e.columns),this.triggerChange({layout:!0})},getState:function(){return{rows:this._rows.getState(),columns:this._columns.getState(),mergedCells:this._mergedCells.map(function(e){return e.clone()}),properties:this._properties.getState()}},setState:function(t){this._rows.setState(t.rows),this._columns.setState(t.columns),this._mergedCells=t.mergedCells,this._properties.setState(t.properties),this.triggerChange(e.spreadsheet.ALL_REASONS)},_merge:function(t){var i,n=this._mergedCells,r=this;return this.batch(function(){i=t.map(function(t){var i,s,a,l,c,d,u;return t instanceof e.spreadsheet.CellRef?t:(i=t.toRangeRef().union(n,function(e){n.splice(n.indexOf(e),1)}),s=new o(i,r),a=s._get("formula"),l=s.value(),c=s.format(),d=s.background(),s.value(null),s.format(null),s.background(null),u=new o(i.collapse(),r),a?u._set("formula",a):u.value(l),u.format(c),u.background(d),n.push(i),i)});var s=r._viewSelection;s.selection=r.unionWithMerged(s.originalSelection),s._activeCell=r.unionWithMerged(s.originalActiveCell)},{activeCell:!0,selection:!0}),i}}),e.spreadsheet.Sheet=a)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/sheetsbar.min",["kendo.core.min","kendo.sortable.min"],e)}(function(){!function(e){var t,i,n,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,i=e._outerWidth,n=".",o=" ",r={sheetsBarWrapper:"k-widget k-header",sheetsBarSheetsWrapper:"k-tabstrip k-floatwrap k-tabstrip-bottom",sheetsBarActive:"k-spreadsheet-sheets-bar-active",sheetsBarInactive:"k-spreadsheet-sheets-bar-inactive",sheetsBarAdd:"k-spreadsheet-sheets-bar-add",sheetsBarRemove:"k-spreadsheet-sheets-remove",sheetsBarItems:"k-spreadsheet-sheets-items",sheetsBarEditor:"k-spreadsheet-sheets-editor",sheetsBarScrollable:"k-tabstrip-scrollable",sheetsBarNext:"k-tabstrip-next",sheetsBarPrev:"k-tabstrip-prev",sheetsBarKItem:"k-item k-state-default",sheetsBarKActive:"k-state-active k-state-tab-on-top",sheetsBarKTextbox:"k-textbox",sheetsBarKLink:"k-link",sheetsBarKIcon:"k-icon",sheetsBarKFontIcon:"k-icon",sheetsBarKButton:"k-button k-button-icon",sheetsBarKButtonBare:"k-bare",sheetsBarKArrowW:"k-i-arrow-60-left",sheetsBarKArrowE:"k-i-arrow-60-right",sheetsBarKReset:"k-reset k-tabstrip-items",sheetsBarKIconX:"k-i-close",sheetsBarKSprite:"k-sprite",sheetsBarKIconPlus:"k-i-plus",sheetsBarHintWrapper:"k-widget k-tabstrip k-tabstrip-bottom k-spreadsheet-sheets-items-hint",sheetsBarKResetItems:"k-reset k-tabstrip-items"},s=e.ui.Widget.extend({init:function(t,i){var o=s.classNames;e.ui.Widget.call(this,t,i),t=this.element,t.addClass(o.sheetsBarWrapper),this._openDialog=i.openDialog,this._tree=new e.dom.Tree(t[0]),this._tree.render([this._addButton(),this._createSheetsWrapper([])]),this._toggleScrollEvents(!0),this._createSortable(),this._sortable.bind("start",this._onSheetReorderStart.bind(this)),this._sortable.bind("end",this._onSheetReorderEnd.bind(this)),t.on("click",n+o.sheetsBarRemove,this._onSheetRemove.bind(this)),t.on("click","li",this._onSheetSelect.bind(this)),t.on("dblclick","li"+n+o.sheetsBarActive,this._createEditor.bind(this)),t.on("click",n+o.sheetsBarAdd,this._onAddSelect.bind(this))},options:{name:"SheetsBar",scrollable:{distance:200}},events:["select","reorder","rename"],_createEditor:function(){this._editor||(this._renderSheets(this._sheets,this._selectedIndex,!0),this._editor=this.element.find(e.format("input{0}{1}",n,s.classNames.sheetsBarEditor)).focus().on("keydown",this._onEditorKeydown.bind(this)).on("blur",this._onEditorBlur.bind(this)))},_destroyEditor:function(e){var t=e?null:this._editor.val();this._editor.off(),this._editor=null,this._renderSheets(this._sheets,this._selectedIndex,!1),this._onSheetRename(t)},renderSheets:function(e,t){!e||t<0||this._renderSheets(e,t,!1)},_renderSheets:function(t,r,a){var l,c,d,u,h,p,f,m,g,v,_,b=this,w=s.classNames;b._isRtl=e.support.isRtl(b.element),b._sheets=t,b._selectedIndex=r,b._renderHtml(a,!0),b._scrollableAllowed()&&(d=b._sheetsWrapper(),u=d.children(n+w.sheetsBarPrev),h=d.children(n+w.sheetsBarNext),p=2,f=b.element.find(n+w.sheetsBarAdd),m=i(f)+f.position().left+p,g=i(u)+p,v=b._sheetsGroup(),u.css({left:m}),d.addClass(w.sheetsBarScrollable+o+w.sheetsBarSheetsWrapper),v.css({marginLeft:m}),l=d[0].offsetWidth,c=v[0].scrollWidth,c+m>l?(_=Math.ceil(e.parseFloat(h.css("right"))),b._scrollableModeActive||(b._nowScrollingSheets=!1,b._scrollableModeActive=!0),v.css({marginLeft:g+m,marginRight:i(h)+_+p})):b._scrollableModeActive&&c<=l?(b._scrollableModeActive=!1,v.css({marginLeft:m,marginRight:""})):v.css({marginLeft:m}),b._toggleScrollButtons())},_toggleScrollButtons:function(e){var t=this,i=t._sheetsGroup(),o=t._sheetsWrapper(),r=i.scrollLeft(),a=o.find(n+s.classNames.sheetsBarPrev),l=o.find(n+s.classNames.sheetsBarNext);e===!1?(a.toggle(!1),l.toggle(!1)):(a.toggle(t._isRtl?r<i[0].scrollWidth-i[0].offsetWidth-1:0!==r),l.toggle(t._isRtl?0!==r:r<i[0].scrollWidth-i[0].offsetWidth-1))},_toggleScrollEvents:function(e){var t=this,i=s.classNames,o=t.options,r=t._sheetsWrapper(),a=r.children(n+i.sheetsBarPrev),l=r.children(n+i.sheetsBarNext);e?(a.on("mousedown",function(){t._nowScrollingSheets=!0,t._scrollSheetsByDelta(o.scrollable.distance*(t._isRtl?1:-1))}),l.on("mousedown",function(){t._nowScrollingSheets=!0,t._scrollSheetsByDelta(o.scrollable.distance*(t._isRtl?-1:1))}),a.add(l).on("mouseup",function(){t._nowScrollingSheets=!1})):(a.off(),l.off())},_renderHtml:function(t,i){var n,r,a,l,c,d,u=[],h=e.dom,p=h.element,f=this._sheets,m=this._selectedIndex,g=s.classNames;for(n=0;n<f.length;n++)r=f[n],a=n===m,l={className:g.sheetsBarKItem+o},c=[],l.className+=a?g.sheetsBarKActive+o+g.sheetsBarActive:g.sheetsBarInactive,a&&t?c.push(p("input",{type:"text",value:r.name(),className:g.sheetsBarKTextbox+o+g.sheetsBarEditor,maxlength:50},[])):(c.push(p("span",{className:g.sheetsBarKLink,title:r.name()},[h.text(r.name())])),f.length>1&&(d=p("span",{className:g.sheetsBarKIcon+o+g.sheetsBarKFontIcon+o+g.sheetsBarKIconX},[]),c.push(p("span",{className:g.sheetsBarKLink+o+g.sheetsBarRemove},[d])))),u.push(p("li",l,c));this._tree.render([this._addButton(),this._createSheetsWrapper(u,i)])},_createSheetsWrapper:function(t,i){var n,r=e.dom.element,a=s.classNames,l=[r("ul",{className:a.sheetsBarKReset},t)];return i=!0,i&&(n=a.sheetsBarKButton+o+a.sheetsBarKButtonBare+o,l.push(r("span",{className:n+a.sheetsBarPrev},[r("span",{className:a.sheetsBarKIcon+o+a.sheetsBarKArrowW},[])])),l.push(r("span",{className:n+a.sheetsBarNext},[r("span",{className:a.sheetsBarKIcon+o+a.sheetsBarKArrowE},[])]))),r("div",{className:a.sheetsBarItems},l)},_createSortable:function(){var i=s.classNames;this._sortable=new e.ui.Sortable(this.element,{filter:e.format("ul li.{0},ul li.{1}",i.sheetsBarActive,i.sheetsBarInactive),container:n+i.sheetsBarItems,axis:"x",animation:!1,ignore:"input",end:function(){this.draggable.hint&&this.draggable.hint.remove()},hint:function(e){var n=t(e).clone();return n.wrap("<div class='"+i.sheetsBarHintWrapper+"'><ul class='"+i.sheetsBarKResetItems+"'></ul></div>").closest("div")}})},_onEditorKeydown:function(e){this._editor&&(13===e.which&&this._destroyEditor(),27===e.which&&this._destroyEditor(!0))},_onEditorBlur:function(){this._editor&&this._destroyEditor()},_onSheetReorderEnd:function(e){e.preventDefault(),this.trigger("reorder",{oldIndex:e.oldIndex,newIndex:e.newIndex})},_onSheetReorderStart:function(e){this._editor&&e.preventDefault()},_onSheetRemove:function(e){var i,n=t(e.target).closest("li").text();this._editor&&this._destroyEditor(),i=function(e){var t=e.sender;t.isConfirmed()&&this.trigger("remove",{name:n,confirmation:!0})}.bind(this),this._openDialog("confirmation",{close:i})},_onSheetSelect:function(e){var i=t(e.target).text();return t(e.target).is(n+s.classNames.sheetsBarEditor)||!i?void e.preventDefault():(this._editor&&this._destroyEditor(),this._scrollSheetsToItem(t(e.target).closest("li")),void this.trigger("select",{name:i,isAddButton:!1}))},_onSheetRename:function(e){this._sheets[this._selectedIndex].name()!==e&&null!==e&&this.trigger("rename",{name:e,sheetIndex:this._selectedIndex})},_onAddSelect:function(){this.trigger("select",{isAddButton:!0})},_addButton:function(){var t=e.dom.element,i=s.classNames;return t("a",{className:i.sheetsBarAdd+o+i.sheetsBarKButton},[t("span",{className:i.sheetsBarKIcon+o+i.sheetsBarKFontIcon+o+i.sheetsBarKIconPlus},[])])},destroy:function(){this._sortable.destroy()},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!isNaN(e.scrollable.distance)},_scrollSheetsToItem:function(e){var t,n,o,r,s,a,l,c=this;c._scrollableModeActive&&(t=c._sheetsGroup(),n=t.scrollLeft(),o=i(e),r=c._isRtl?e.position().left:e.position().left-t.children().first().position().left,s=t[0].offsetWidth,a=Math.ceil(parseFloat(t.css("padding-left"))),c._isRtl?r<0?l=n+r-(s-n)-a:r+o>s&&(l=n+r-o+2*a):n+s<r+o?l=r+o-s+2*a:n>r&&(l=r-a),t.finish().animate({scrollLeft:l},"fast","linear",function(){c._toggleScrollButtons()}))},_sheetsGroup:function(){return this._sheetsWrapper().children("ul")},_sheetsWrapper:function(){return this.element.find(n+s.classNames.sheetsBarItems)},_scrollSheetsByDelta:function(e){var t=this,i=t._sheetsGroup(),n=i.scrollLeft();i.finish().animate({scrollLeft:n+e},"fast","linear",function(){t._nowScrollingSheets?t._scrollSheetsByDelta(e):t._toggleScrollButtons()})}}),e.spreadsheet.SheetsBar=s,t.extend(!0,s,{classNames:r}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/calc.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e){e=e.toUpperCase();for(var t=0,i=0;i<e.length;++i)t=26*t+e.charCodeAt(i)-64;return t-1}function t(e){return parseInt(e,10)-1}function i(i,n){var o,r,s,a,l,d;if("#sheet"==i.toLowerCase())return _.SHEETREF;e:{if(!(o=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(i))){for(a=c(i,{}),l=[];;){if(d=a.next(),d instanceof y)d.rel=0;else{if(!(d instanceof w))break e;d.topLeft.rel=0,d.bottomRight.rel=0}if(l.push(d),a.eof())break;if(!a.is("op",","))break e;a.next()}return 1==l.length?l[0]:new _.UnionRef(l)}if(r=t(o[4]),s=e(o[2]),r<1048576&&s<16384)return new y(t(o[4]),e(o[2]))}if(!n)throw Error("Cannot parse reference: "+i)}function n(e,t,i,n){function o(e){return e.index=v.length,v.push(e),e}function r(e,t,i){if(g(e,t))return n.next();var o=n.peek();o?n.croak("Expected "+e+" «"+t+"» but found "+o.type+" «"+o.value+"»"):i||n.croak("Expected "+e+" «"+t+"»")}function s(e){return m(p(u(e)),0,e)}function a(e){return"TRUE"==e.upper||"FALSE"==e.upper?"TRUE"==e.upper?D:A:o(new k(e.value))}function l(){var e,t=n.next();for(t=t.value,r("punc","("),e=[];;){if(g("punc",")"))break;if(g("op",","))e.push({type:"null"}),n.next();else{if(e.push(s(!1)),n.eof()||g("punc",")"))break;r("op",",")}}return r("punc",")",!0),{type:"func",func:t,args:e}}function d(t){return t.hasSheet()||t.setSheet(e),o(t)}function u(e){var t;return g("ref")?t=d(n.next()):g("func")?t=l():g("punc","(")?(n.next(),t=s(!0),r("punc",")",!0)):g("punc","{")?(n.next(),t=h(),r("punc","}",!0)):g("num")||g("str")||g("error")?t=n.next():g("sym")?t=a(n.next()):g("op","+")||g("op","-")?t={type:"prefix",op:n.next().value,exp:u(e)}:n.croak(n.peek()?g("punc","[")?"External reference not supported":"Parse error":"Incomplete expression"),f(t)}function h(){for(var e=[],t=[e],i=!0;!n.eof()&&!g("punc","}");)i?i=!1:g("punc",";")?(t.push(e=[]),n.next()):r("op",","),e.push(s(!1));return{type:"matrix",value:t}}function p(e){return g("punc","(")||g("ref")||g("num")||g("func")?{type:"binary",op:" ",left:e,right:s(!1)}:e}function f(e){return g("op","%")?(n.next(),f({type:"postfix",op:"%",exp:e})):e}function m(e,t,i){var o,r,s=g("op");return s&&(i||","!=s.value)&&(o=S[s.value],o>t)?(n.next(),r=m(u(i),o,i),m({type:"binary",op:s.value,left:e,right:r},t,i)):e}var g,v=[];return n=c(n,{row:t,col:i}),g=n.is,{type:"exp",ast:s(!0),refs:v,sheet:e,row:t,col:i}}function o(e,t){var i,o=n(null,0,0,e);if(!(o.ast instanceof k))throw new T("Invalid name: "+e);return o=o.ast,t instanceof b||(i=n(o.sheet,0,0,t),t=i.ast instanceof b?i.ast:/^(?:str|num|bool|error)$/.test(i.ast.type)?i.ast.value:a(i)),{name:o,value:t}}function r(e){function t(e,n,o){function r(t){var r=e.op,s=S[r]<o||!o&&","==r||"prefix"==n.type&&o==S[r]&&"-"==n.op||"binary"==n.type&&o==S[r]&&e===n.right;return i(t(),s)}switch(e.type){case"num":case"bool":return JSON.stringify(e.value);case"error":return JSON.stringify("#"+e.value);case"str":return JSON.stringify(JSON.stringify(e.value));case"ref":return"this.refs["+e.index+"].print(row, col, mod)";case"prefix":return r(function(){return JSON.stringify(e.op)+" + "+t(e.exp,e,S[e.op])});case"postfix":return r(function(){return t(e.exp,e,S[e.op])+" + "+JSON.stringify(e.op)});case"binary":return r(function(){var n=i(t(e.left,e,S[e.op]),e.left instanceof k&&":"==e.op),o=i(t(e.right,e,S[e.op]),e.right instanceof k&&":"==e.op);return n+" + "+JSON.stringify(e.op)+" + "+o});case"func":return JSON.stringify(e.func+"(")+" + "+(e.args.length>0?e.args.map(function(i){return t(i,e,0)}).join(" + ', ' + "):"''")+" + ')'";case"matrix":return"'{ ' + "+e.value.map(function(i){return i.map(function(i){return t(i,e,0)}).join(" + ', ' + ")}).join(" + '; ' + ")+"+ ' }'";case"null":return"''"}throw Error("Cannot make printer for node "+e.type)}function i(e,t){return t?"'(' + "+e+" + ')'":e}return E("function(row, col, mod){return("+t(e.ast,e,0)+")}")}function s(e,t){function i(e,t){switch(e.type){case"ref":return n(e,t);case"num":case"str":case"null":case"error":case"bool":return o(e,t);case"prefix":case"postfix":return s(e,t);case"binary":return a(e,t);case"func":return u(e,t);case"lambda":return h(e,t);case"matrix":return p(e.value,t,!0)}throw Error("Cannot CPS "+e.type)}function n(e,t){return"name"==e.ref?r(e,t):o(e,t)}function o(e,t){return t(e)}function r(e,t){return{type:"func",func:",getname",args:[f(t),e]}}function s(e,t){return i({type:"func",func:"unary"+e.op,args:[e.exp]},t)}function a(e,t){return i({type:"func",func:"binary"+e.op,args:[e.left,e.right]},t)}function l(e,t,n,o){return i(e,function(e){var r=f(o),s=m("T"),a=m("E");return{type:"func",func:"if",args:[r,e,{type:"lambda",vars:[s],body:i(t||D,function(e){return{type:"call",func:{type:"var",name:s},args:[e]}})},{type:"lambda",vars:[a],body:i(n||A,function(e){return{type:"call",func:{type:"var",name:a},args:[e]}})}]}})}function c(e,t){return 0===e.length?o(D,t):i({type:"func",func:"IF",args:[e[0],{type:"func",func:"AND",args:e.slice(1)},A]},t)}function d(e,t){return 0===e.length?o(A,t):i({type:"func",func:"IF",args:[e[0],D,{type:"func",func:"OR",args:e.slice(1)}]},t)}function u(e,t){switch(e.func.toLowerCase()){case"if":return l(e.args[0],e.args[1],e.args[2],t);case"and":return c(e.args,t);case"or":return d(e.args,t);case"true":return t(D);case"false":return t(A)}return function n(t,o){return o==e.args.length?{type:"func",func:e.func,args:t}:i(e.args[o],function(e){return n(t.concat([e]),o+1)})}([f(t)],0)}function h(e,t){var n=m("K"),o=i(e.body,function(e){return{type:"call",func:{type:"var",value:n},args:[e]}});return t({type:"lambda",vars:[n].concat(e.vars),body:o})}function p(e,t,n){var o=[];return function r(s){return s==e.length?t({type:"matrix",value:o}):(n?p:i)(e[s],function(e){return o[s]=e,r(s+1)})}(0)}function f(e){var t=m("R");return{type:"lambda",vars:[t],body:e({type:"var",name:t})}}function m(e){return e||(e=""),e="_"+e,e+ ++g}var g=0;return i(e,t)}function a(e){function t(e){var n=e.type;if("num"==n)return e.value+"";if("str"==n)return JSON.stringify(e.value);if("error"==n)return"context.error("+JSON.stringify(e.value)+")";if("return"==n)return"context.resolve("+t(e.value)+")";if("func"==n)return"context.func("+JSON.stringify(e.func)+", "+t(e.args[0])+", "+i(e.args.slice(1))+")";if("call"==n)return t(e.func)+"("+e.args.map(t).join(", ")+")";if("ref"==n)return"refs["+e.index+"]";if("bool"==n)return""+e.value;if("if"==n)return"(context.bool("+t(e.co)+") ? "+t(e.th)+" : "+t(e.el)+")";if("lambda"==n)return"(function("+e.vars.join(", ")+"){ return("+t(e.body)+") })";if("var"==n)return e.name;if("matrix"==n)return i(e.value);if("null"==n)return"null";throw Error("Cannot compile expression "+n)}function i(e){return"[ "+e.map(t).join(", ")+" ]"}var n,o=r(e),a=o.call(e),l=I[a];return l?l.clone(e.sheet,e.row,e.col):(n=t(s(e.ast,function(e){return{type:"return",value:e}})),n=["function(){","var context = this, refs = context.formula.absrefs",n,"}"].join(";\n"),l=new C.Formula(e.refs,E(n),o,e.sheet,e.row,e.col),I[a]=l.clone(e.sheet,e.row,e.col),l)}function l(e){return e}function c(i,n){function o(e,t){var i=r();return null==i||null!=e&&i.type!==e||null!=t&&i.value!==t?null:i}function r(){return null==C&&(C=a()),C}function s(){if(null!=C){var e=C;return C=null,e}return a()}function a(){var e,t=i.peek();return t&&("sym"!=t.type&&"rc"!=t.type&&"num"!=t.type||(e=b(8,d)||b(6,p)||b(6,f)||b(4,m)||b(4,g)||b(2,v)||b(2,_)),e||(e=i.next())),e}function c(o,r){var s,a,l,c,d;if("rc"==o.type)return!o.rel||n.forEditor||null!=n.row&&null!=n.col||i.croak("Cannot read relative cell in RC notation"),new y(o.row,o.col,o.rel);if("num"==o.type)return o.value<=1048577?S(new y(t(o.value),r?-(1/0):+(1/0),2)):null;if(s=o.value,a=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(s))return l=t(a[4]),c=e(a[2]),l<=1048576&&c<=16383?S(new y(t(a[4]),e(a[2]),(a[1]?0:1)|(a[3]?0:2))):null;if(d="$"==s.charAt(0),d&&(s=s.substr(1)),/^\d+$/.test(s)){if(l=t(s),l<=1048576)return S(new y(t(s),r?-(1/0):+(1/0),d?0:2))}else if(c=e(s),c<=16383)return S(new y(r?-(1/0):+(1/0),e(s),d?0:1))}function d(e,t,i,n,o,r,s,a){if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==i.type&&"punc"==n.type&&"!"==n.value&&("sym"==o.type||"rc"==o.type||"num"==o.type&&o.value==o.value|0)&&"op"==r.type&&":"==r.value&&("sym"==s.type||"rc"==s.type||"num"==s.type&&s.value==s.value|0)&&s.type==o.type&&("punc"!=a.type||"("!=a.value||s.space)){var l=c(o,!0),d=c(s,!1);if(l&&d)return x(7),T(new w(l.setSheet(e.value,!0),d.setSheet(i.value,!0)).setSheet(e.value,!0),e,s)}}function p(e,t,i,n,o,r){var s,a;if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==i.type&&"punc"==n.type&&"!"==n.value&&("sym"==o.type||"rc"==o.type||"num"==o.type&&o.value==o.value|0)&&("punc"!=r.type||"("!=r.value||o.space)&&(s=c(o)))return x(5),a=s.clone(),T(new w(s.setSheet(e.value,!0),a.setSheet(i.value,!0)).setSheet(e.value,!0),e,o)}function f(e,t,i,n,o,r){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==i.type||"rc"==i.type||"num"==i.type&&i.value==i.value|0)&&"op"==n.type&&":"==n.value&&("sym"==o.type||"rc"==o.type||"num"==o.type&&o.value==o.value|0)&&("punc"!=r.type||"("!=r.value||o.space)){var s=c(i,!0),a=c(o,!1);if(s&&a)return x(5),T(new w(s,a).setSheet(e.value,!0),e,o)}}function m(e,t,i,n){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==i.type||"rc"==i.type||"num"==i.type&&i.value==i.value|0)&&("punc"!=n.type||"("!=n.value||i.space)){x(3);var o=c(i);return o&&isFinite(o.row)||(o=new k(i.value)),T(o.setSheet(e.value,!0),e,i)}}function g(e,t,i,n){if(("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&"op"==t.type&&":"==t.value&&("sym"==i.type||"rc"==i.type||"num"==i.type&&i.value==i.value|0)&&("punc"!=n.type||"("!=n.value||i.space)){var o=c(e,!0),r=c(i,!1);if(o&&r)return x(3),T(new w(o,r),e,i)}}function v(e,t){if(("sym"==e.type||"rc"==e.type)&&("punc"!=t.type||"("!=t.value||e.space)){var i=c(e);if(i&&isFinite(i.row)&&isFinite(i.col))return x(1),T(i,e,e)}}function _(e,t){if("sym"==e.type&&"punc"==t.type&&"("==t.value&&!e.space)return e.type="func",x(1),e}var b,x,C,S,T;return i=u(h(i),n),b=i.ahead,x=i.skip,C=null,S=null!=n.row&&null!=n.col?function(e){return 1&e.rel&&(e.col-=n.col),2&e.rel&&(e.row-=n.row),e}:l,T=n.forEditor?function(e,t,i){return e.begin=t.begin,e.end=i.end,e}:l,{peek:r,next:s,croak:i.croak,eof:i.eof,is:o}}function d(e){return" \t\n ​".indexOf(e)>=0}function u(e,t){function i(e){return/[0-9]/i.test(e)}function n(e){return/[a-z$_]/i.test(e)||v.isUnicodeLetter(e)}function o(e){return n(e)||i(e)||"."==e}function r(e){return e in S}function s(e){return"!;(){}[]".indexOf(e)>=0}function a(){var e=!1,t=T(function(t){return"."==t?!e&&(e=!0,!0):i(t)});return{type:"num",value:parseFloat(t)}}function l(t,i){return{type:"sym",value:t,upper:t.toUpperCase(),space:d(e.peek()),quote:i}}function c(e,t,i){if(!e&&!t&&!i)return null;if(!e&&!i||e&&i){var n=t?parseInt(t,10):0;return e?n:n-1}}function u(){var t,i,n=e.lookingAt(/^R(\[)?(-?[0-9]+)?(\])?C(\[)?(-?[0-9]+)?(\])?/i);return n&&(t=c(n[1],n[2],n[3]),i=c(n[4],n[5],n[6]),null!=t&&null!=i)?(e.skip(n),{type:"rc",row:t,col:i,rel:(n[4]||!(n[4]||n[5]||n[6])?1:0)|(n[1]||!(n[1]||n[2]||n[3])?2:0)}):l(T(o))}function h(){return e.next(),{type:"str",value:e.readEscaped('"')}}function p(){return e.next(),l(e.readEscaped("'"),!0)}function f(){return{type:"op",value:T(function(e,t){return t+e in S})}}function m(){return{type:"punc",value:e.next()}}function g(){if(e.eof())return null;var o,l=e.peek();return'"'==l?h():"'"==l?p():i(l)||"."==l?a():n(l)?u():r(l)?f():s(l)?m():(o=e.lookingAt(/^#([a-z\/]+)[?!]?/i))?(e.skip(o),{type:"error",value:o[1]}):(t.forEditor||e.croak("Can't handle character: "+l),{type:"error",value:e.next()})}function _(){for(var i,n;x.length<=C;)T(d),i=e.pos(),n=g(),t.forEditor&&n&&(n.begin=i,n.end=e.pos()),x.push(n);return x[C]}function b(){var e=_();return e&&C++,e}function w(e,t){for(var i=C,n=[];e-- >0;)n.push(b()||M);return C=i,t.apply(n,n)}function y(e){C+=e}function k(){return null==_()}var x=[],C=0,T=e.readWhile;return{next:b,peek:_,eof:k,croak:e.croak,ahead:w,skip:y}}function h(e){function t(){return u}function i(){var t=e.charAt(u++);return"\n"==t?(h++,p=0):p++,t}function n(){return e.charAt(u)}function o(){return""===n()}function r(t){throw new T(t+" (input: "+e+")",u)}function s(t){if("string"==typeof t)e.substr(u,t.length)!=t&&r("Expected "+t),a(t.length);else if(t instanceof RegExp){var i=t.exec(e.substr(u));if(i)return a(i[0].length),i}else a(t[0].length)}function a(e){for(;e-- >0;)i()}function l(e){for(var t,n=!1,r="";!o();)if(t=i(),n)r+=t,n=!1;else if("\\"==t)n=!0;else{if(t==e)break;r+=t}return r}function c(e){for(var t="";!o()&&e(n(),t);)t+=i();return t}function d(t){return t.exec(e.substr(u))}var u=0,h=1,p=0;return{next:i,peek:n,eof:o,croak:r,readWhile:c,readEscaped:l,lookingAt:d,skip:s,forward:a,pos:t}}function p(e,t,i){function n(){var n=e.next();return"sym"==n.type?"TRUE"==n.upper?(n.type="bool",n.value=!0):"FALSE"==n.upper&&(n.type="bool",n.value=!1):"ref"==n.type&&(n={type:"ref",ref:null!=t&&null!=i?n.absolute(t,i):n,begin:n.begin,end:n.end}),n}var o,r=[];for(e=c(e,{forEditor:!0,row:t,col:i});!e.eof();)r.push(n());return o=r[0],"op"==o.type&&"="==o.value&&(o.type="startexp"),r}function f(e,t,i){var n,o;for(t=t||0,i=i||0,e=c(e,{row:t,col:i}),n=[];!e.eof();){if(o=e.next(),"ref"!=o.type)throw new T("Expecting a reference but got: "+JSON.stringify(o));n.push(o.absolute(t,i))}return n}function m(e,t){var i=e+t,n=P[i];return n||(n="^(\\d+(COM\\d{3})*(DOT\\d+)?)",n=n.replace(/DOT/g,"\\"+t).replace(/COM/g,"\\"+e),n=RegExp(n),P[i]=n),n}function g(e,t){for(var i="";t-- >0;)i+=e;return i}var v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F,P;kendo.support.browser.msie&&kendo.support.browser.version<9||(v=kendo.util,_=kendo.spreadsheet,b=_.Ref,w=_.RangeRef,y=_.CellRef,k=_.NameRef,x=_.calc,C=x.runtime,S=Object.create(null),T=kendo.Class.extend({init:function(e,t){this.message=e,this.pos=t},toString:function(){return this.message}}),function(e){e.forEach(function(t,i){t.forEach(function(t){S[t]=e.length-i})})}([[":"],[" "],[","],["%"],["^"],["*","/"],["+","-"],["&"],["=","<",">","<=",">=","<>"]]),D={type:"bool",value:!0},A={type:"bool",value:!1},E=function(e){return function(t){var i=e[t];return i||(i=e[t]=Function("'use strict';return("+t+")")()),i}}(Object.create(null)),I=Object.create(null),M={type:"eof"},R=[],F=x.registerFormatParser=function(e){R.push(e)},x.parse=function(e,t,i,o,r){var s,a,l,c,d;if(o instanceof Date)return{type:"date",value:C.dateToSerial(o)};if("number"==typeof o)return{type:"number",value:o};if("boolean"==typeof o)return{type:"boolean",value:o};if(o+="",/^'/.test(o))return{type:"string",value:o.substr(1)};if(/^[0-9]+%$/.test(o)&&(s=o.substr(0,o.length-1),a=parseFloat(s),!isNaN(a)&&a==s))return{type:"percent",value:a/100};if(/^=/.test(o))return o=o.substr(1),/\S/.test(o)?n(e,t,i,o):{type:"string",value:"="+o};for(l=0;l<R.length;++l)if(c=R[l](o))return c;return"true"==o.toLowerCase()?{type:"boolean",value:!0}:"false"==o.toLowerCase()?{type:"boolean",value:!1}:(d=C.parseDate(o,r))?{type:"date",value:C.dateToSerial(d)}:(a=parseFloat(o),!isNaN(a)&&o.length>0&&a==o?{type:"number",value:a}:{type:"string",value:o})},x.parseNameDefinition=o,x.parseFormula=n,x.parseReference=i,x.compile=a,x.parseSqref=f,x.InputStream=h,x.ParseError=T,x.tokenize=p,F(function(e){var t,i,n,o,r,s,a,l,c,d,u,h=0,p="";if(t=/^(\d+)([-\/.])(\d+)\2(\d{2}(?:\d{2})?)(\s*)/.exec(e)){if(i=parseInt(t[1],10),n=t[2],o=parseInt(t[3],10),r=parseInt(t[4],10),r<30?r+=2e3:r<100&&(r+=1900),s=!0,i>12&&(a=i,i=o,o=a,s=!1),!C.validDate(r,i,o))return null;h=C.packDate(r,i-1,o),h<0&&h--,p=s?["mm","dd","yyyy"].join(n):["dd","mm","yyyy"].join(n),p+=t[5],e=e.substr(t[0].length)}return(t=/^(\d+):(\d+)$/.exec(e))?(l=parseInt(t[1],10),
c=parseInt(t[2],10),{type:"date",format:p+"hh:mm",value:h+C.packTime(l,c,0,0)}):(t=/^(\d+):(\d+)(\.\d+)$/.exec(e))?(c=parseInt(t[1],10),d=parseInt(t[2],10),u=1e3*parseFloat(t[3]),{type:"date",format:p+"mm:ss.00",value:h+C.packTime(0,c,d,u)}):(t=/^(\d+):(\d+):(\d+)$/.exec(e))?(l=parseInt(t[1],10),c=parseInt(t[2],10),d=parseInt(t[3],10),{type:"date",format:p+"hh:mm:ss",value:h+C.packTime(l,c,d,0)}):(t=/^(\d+):(\d+):(\d+)(\.\d+)$/.exec(e))?(l=parseInt(t[1],10),c=parseInt(t[2],10),d=parseInt(t[3],10),u=1e3*parseFloat(t[4]),{type:"date",format:p+"hh:mm:ss.00",value:h+C.packTime(l,c,d,u)}):void 0}),F(function(e){var t,i,n,o=kendo.culture(),r=o.numberFormat[","],s=o.numberFormat["."],a=o.numberFormat.currency.symbol,l=m(r,s),c=RegExp("^\\s*\\"+a+"\\s*"),d=1,u="",p="",f=!1;if(e=h(e.replace(/^\s+|\s+$/g,"")),e.skip(/^-\s*/)&&(d=-1),(t=e.skip(c))&&(f=!0,u+='"'+t[0]+'"'),e.skip(/^-\s*/)){if(d<0)return null;d=-1}if(!(i=e.skip(l)))return null;if(u+="#",t=e.skip(c)){if(f)return null;f=!0,p='"'+t[0]+'"'}return e.eof()?((i[2]||f)&&(u+=",#"),i[3]&&(u+="."+g("0",i[3].length-1)),n=i[0].replace(RegExp("\\"+r,"g"),"").replace(RegExp("\\"+s,"g"),"."),u+=p,f&&(u+=";-"+u),{type:"number",currency:f,format:u,value:d*parseFloat(n)}):null}),F(function(e){var t;if(t=/^([0-9]*)\.([0-9]+)(\s*%)$/.exec(e))return{type:"number",value:parseFloat(e)/100,format:"0."+g("0",t[2].length)+t[3]}}),P={})},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/excel-reader.min",["kendo.core.min","kendo.color.min","util/parse-xml.min","spreadsheet/calc.min"],e)}(function(){"use strict";function e(e,t,n){var o=new FileReader;o.onload=function(e){var o=new JSZip(e.target.result);i(o,t,n)},o.readAsArrayBuffer(e)}function t(e){return e=/^\//.test(e)?e.substr(1):"xl/"+e}function i(e,t,i){var o,a,l,c,d,u,h;D=t.excelImportErrors=[],o=g(e),a=v(e,"_rels/workbook.xml"),l=b(e,a.byType.theme[0]),c=_(e,l),d=[],u=0,m(e,"xl/workbook.xml",{enter:function(i,n){var r,l,h,p;this.is(B)?(r=n["r:id"],l=a.byId[r],h=n.name,p=s(e,l),d.push({workbook:t,zip:e,strings:o,styles:c,file:l,options:{name:h,rows:Math.max(t.options.rows||0,p.rows),columns:Math.max(t.options.columns||0,p.cols),columnWidth:p.columnWidth,rowHeight:p.rowHeight}})):this.is(V)&&n.activeTab&&(u=w(n.activeTab))},text:function(e){var i,n,o,r=this.is(I);!r||y(r["function"])||y(r.vbProcedure)||(i=r.localSheetId,n=null,null!=i&&(n=d[i].options.name),o=r.name,"_xlnm._FilterDatabase"!=o&&(n&&(o="'"+n.replace(/\'/g,"\\'")+"'!"+o),p(n,null,function(){t.defineName(o,e,y(r.hidden))},"reading user-defined name: "+o)))}}),h=new x.Deferred,h.progress(function(e){i&&i.notify(e)}).then(function(){var e=t.sheets();r(e),t.activeSheet(e[u]),i&&i.resolve()}),n(d,t,h)}function n(e,t,i){var n,r=(new x.Deferred).resolve();for(n=0;n<e.length;n++)!function(n,s){r=r.then(function(){var r,a,l=t.insertSheet(n.options);return l.suspendChanges(!0),r=o(l,n),a={sheet:l,progress:s/(e.length-1)},r.then(function(){i.notify(a)}),r})}(e[n],n);r.then(function(){i.resolve()})}function o(e,t){var i=new x.Deferred;return setTimeout(function(){c(t.zip,t.file,e,t.strings,t.styles),i.resolve()},0),i}function r(e){for(var t=0;t<e.length;t++)e[t].suspendChanges(!1).triggerChange({recalc:!0})}function s(e,i){var n={rows:0,cols:0};return m(e,t(i),{enter:function(e,t){if("dimension"==e){var i=S(t.ref);i.bottomRight&&(n.cols=i.bottomRight.col+1,n.rows=i.bottomRight.row+1)}else"sheetFormatPr"===e?(t.defaultColWidth&&(n.columnWidth=a(parseFloat(t.defaultColWidth))),t.defaultRowHeight&&(n.rowHeight=l(parseFloat(t.defaultRowHeight)))):this.is(P)&&this.exit()}}),n}function a(e){var t=7,i=(256*e+Math.floor(128/t))/256;return Math.floor(i)*t}function l(e){return 1.5625*e}function c(e,i,n,o,r){function s(){n.range(B).filter(ee),B=null}var c,g,_,b,k,x,C,I,B,H,N,V,$,K,Y={},Q=n._columns._count,X=null,Z=i.replace(/worksheets\//,"worksheets/_rels/"),J=v(e,Z),ee=[];D=n._workbook.excelImportErrors,m(e,t(i),{enter:function(e,t,i){var o,p,m,v,x,C,T,D,I,L,O;if(this.is(M))i&&"shared"==t.t&&null!=t.si&&(b=n.range(Y[t.si])._get("formula"));else if(this.is(A))_=null,b=null,c=t.r,k=null,null==c&&(c=S(X),c.col++,c=""+c),X=c,g=t.t,p=t.s,null!=p&&f(n,c,r,p);else if(this.is(R))n.range(t.ref).merge();else if(this.is(E)){if(m=w(t.min)-1,v=Math.min(Q,w(t.max))-1,t.width&&(x=a(parseFloat(t.width)),0!==x&&n._columns.values.value(m,v,x)),"1"===t.hidden||0===x)for(C=m;C<=v;C++)n.hideColumn(C);null!=t.style&&f(n,new kendo.spreadsheet.RangeRef(new kendo.spreadsheet.CellRef((-(1/0)),m),new kendo.spreadsheet.CellRef((+(1/0)),v)),r,t.style)}else this.is(P)?(T=w(t.r)-1,t.ht&&(D=l(parseFloat(t.ht)),0!==D&&n._rows.values.value(T,T,D)),"1"!==t.hidden&&0!==D||n.hideRow(T)):this.is(z)?t.activeCell&&(I=S(t.activeCell),n.select(I,!0)):this.is(F)?"frozen"==t.state&&(t.xSplit&&n.frozenColumns(w(t.xSplit)),t.ySplit&&n.frozenRows(w(t.ySplit))):this.is(W)?n.showGridLines(y(t.showGridLines,!0)):this.is(U)?(L=t["r:id"],O=J.byId[L],O&&n.range(t.ref).link(O)):this.is(["autoFilter"])?(B=t.ref,i&&s()):B&&(this.is(["filterColumn"])?H=parseInt(t.colId,10):this.is(["customFilters"])?(N=y(t.and)?"and":"or",V=[]):this.is(["customFilter"])?(o=d(t.operator,t.val),o&&V.push({operator:o.operator,value:o.value})):this.is(["dynamicFilter"])?ee.push({column:H,filter:new kendo.spreadsheet.DynamicFilter({type:u(t.type)})}):this.is(["top10"])?ee.push({column:H,filter:new kendo.spreadsheet.TopFilter({value:h(t.val),type:function(e,t){return e&&t?"topPercent":t?"topNumber":e?"bottomPercent":"bottomNumber"}(y(t.percent),y(t.top))})}):this.is(["filters"])?($=y(t.blank),K=[]):this.is(["filter"])&&K.push(h(t.val)))},leave:function(e,t){var i,r;this.is(M)?b||"shared"!=t.t||null==t.si||(b=n.range(Y[t.si])._get("formula")):this.is(A)?null!=b?(i=p(n,k||c,function(){n.range(k||c).formula(b,x)},"parsing formula"),i&&n.range(k||c).value(b).background("#ffaaaa")):null!=_&&(r=n.range(c),r._get("formula")||(g&&"n"!=g?"s"==g?_=o[w(_)]:"b"==g?_="1"===_:"d"==g&&(_=kendo.parseDate(_)):_=parseFloat(_),null!=_&&r.value(_))):this.is(q)?!function(){var e=kendo.spreadsheet.calc.parseSqref(t.sqref),i=t.type.toLowerCase(),o=t.operator;/^(?:whole|decimal)$/.test(i)?i="number":"list"==i&&(o="list"),!o&&/^(?:number|date)$/.test(i)&&(o="between"),e.forEach(function(e){p(n,e,function(){n.range(e).validation({type:y(t.showErrorMessage,!0)?"reject":"warning",from:C,to:I,dataType:i,comparerType:T[o]||o,allowNulls:y(t.allowBlank),showButton:y(t.showDropDown)||"date"==i||"list"==i,messageTemplate:t.error,titleTemplate:t.errorTitle})},"parsing validation")})}():"cols"==e?n._columns._refresh():"sheetData"==e?n._rows._refresh():"autoFilter"==e?s():B&&("customFilters"==e?ee.push({column:H,filter:new kendo.spreadsheet.CustomFilter({logic:N,criteria:V})}):"filters"==e&&ee.push({column:H,filter:new kendo.spreadsheet.ValueFilter({values:K,blanks:$})}))},text:function(e){var t;this.is(O)||this.is(L)?_=e:(t=this.is(M))?(b=e,x="array"==t.t,x?k=t.ref:"shared"==t.t&&(Y[t.si]=c)):this.is(j)?C=e:this.is(G)&&(I=e)}})}function d(e,t){var i={equal:"eq",notEqual:"ne",greaterThan:"gt",greaterThanOrEqual:"gte",lessThan:"lt",lessThanOrEqual:"lte"}[e];return t=h(t),i&&"number"==typeof t?{operator:i,value:t}:"notEqual"!=e&&e||"string"!=typeof t?void 0:{operator:e?"doesnotmatch":"matches",value:t}}function u(e){return{Q1:"quarter1",Q2:"quarter2",Q3:"quarter3",Q4:"quarter4",M1:"january",M2:"february",M3:"march",M4:"april",M5:"may",M6:"june",M7:"july",M8:"august",M9:"september",M10:"october",M11:"november",M12:"december"}[e.toUpperCase()]||e}function h(e){var t=parseFloat(e);return isNaN(t)||t!=e?e:t}function p(e,t,i,n){try{return i(),!1}catch(o){var r={context:n,error:o+""};return e&&(r.sheet=e.name()),t&&(r.location=t+""),D.push(r),!0}}function f(e,t,i,n){function o(e){var t="string"==typeof e?e:e.formatCode;null==t||/^general$/i.test(t)||(t=t.replace(/^\[\$-[0-9]+\]/,""),u.format(t))}function r(e){"solid"==e.type&&u.background(e.color)}function s(e){u.fontFamily(e.name),u._property("fontSize",e.size),e.bold&&u.bold(!0),e.italic&&u.italic(!0),e.underline&&u.underline(!0)}function a(e){function t(t,i){var n,o,r=e[t];r&&(n=$[r.style],0!==n&&(o=r.color,null==o&&(o="#000"),u._property(i,{size:n,color:o})))}t("left","borderLeft"),t("top","borderTop"),t("right","borderRight"),t("bottom","borderBottom")}function l(e,t){var i=h[e];if(null!=i&&!i)return!1;if(d=h[t],c&&null==d){if(i=c[e],null!=i&&!i)return!1;d=c[t]}return null!=d}var c,d,u=e.range(t),h=i.inlineStyles[n];h.xfId&&(c=i.namedStyles[h.xfId]),l("applyBorder","borderId")&&a(i.borders[d]),l("applyFont","fontId")&&s(i.fonts[d]),l("applyAlignment","textAlign")&&u.textAlign(d),l("applyAlignment","verticalAlign")&&u.verticalAlign(d),l("applyAlignment","wrapText")&&u._property("wrap",d),l("applyFill","fillId")&&r(i.fills[d]),l("applyNumberFormat","numFmtId")&&o(i.numFmts[d]||K[d])}function m(e,t,i){var n=e.files[t];n&&C(n.asUint8Array(),i)}function g(e){var t=[],i=null;return m(e,"xl/sharedStrings.xml",{leave:function(){this.is(N)&&(t.push(i),i=null)},text:function(e){this.is(H)&&(null==i&&(i=""),i+=e)}}),t}function v(e,i){var n={byId:{},byType:{theme:[]}};return m(e,t(i)+".rels",{enter:function(e,t){var i,o;"Relationship"==e&&(n.byId[t.Id]=t.Target,i=t.Type.match(/\w+$/)[0],o=n.byType[i]||[],o.push(t.Target),n.byType[i]=o)}}),n}function _(e,t){function i(e){function t(t){null!=e[t]&&(i[t]=y(e[t]))}var i={borderId:w(e.borderId),fillId:w(e.fillId),fontId:w(e.fontId),numFmtId:w(e.numFmtId),pivotButton:y(e.pivotButton),quotePrefix:y(e.quotePrefix),xfId:w(e.xfId)};return t("applyAlignment"),t("applyBorder"),t("applyFill"),t("applyFont"),t("applyNumberFormat"),t("applyProtection"),i}function n(e){var i,n,o;return e.rgb?k(e.rgb):e.indexed?te[w(e.indexed)]:e.theme?(i=t.colorScheme[w(e.theme)])?(n=kendo.parseColor(i),e.tint&&(n=n.toHSL(),o=parseFloat(e.tint),n.l=o<0?n.l*(1+o):n.l*(1-o)+(100-100*(1-o))),n.toCssRgba()):te[0]:void 0}var o={fonts:[],numFmts:{},fills:[],borders:[],namedStyles:[],inlineStyles:[]},r=null,s=null,a=null,l=null;return m(e,"xl/styles.xml",{enter:function(e,t,c){if(this.is(ee))o.numFmts[t.numFmtId]=t;else if(this.is(X))o.fonts.push(r={});else if(r)"sz"==e?r.size=parseFloat(t.val):"name"==e?r.name=t.val:"b"==e?r.bold=y(t.val,!0):"i"==e?r.italic=y(t.val,!0):"u"==e&&(r.underline=null==t.val||"single"==t.val);else if(this.is(Q))o.fills.push(s={});else if(s)"patternFill"==e?s.type=t.patternType:"fgColor"==e&&"solid"===s.type?s.color=n(t):"bgColor"==e&&"solid"!==s.type&&(s.color=n(t));else if(this.is(Y))o.borders.push(a={});else if(a){if(/^(?:left|top|right|bottom)$/.test(e)&&t.style&&(a[e]={style:t.style}),"color"==e){var d=this.stack[this.stack.length-2].$tag;a[d].color=n(t)}}else this.is(J)?(l=i(t),o.namedStyles.push(l),c&&(l=null)):this.is(Z)?(l=i(t),o.inlineStyles.push(l),c&&(l=null)):l&&"alignment"==e&&(/^(?:left|center|right|justify)$/.test(t.horizontal)&&(l.textAlign=t.horizontal),/^(?:top|center|bottom)$/.test(t.vertical)&&(l.verticalAlign=t.vertical),null!=t.wrapText&&(l.wrapText=y(t.wrapText)))},leave:function(e){this.is(X)?r=null:this.is(Q)?s=null:this.is(Y)?a=null:"xf"==e&&(l=null)}}),o}function b(e,i){function n(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}var o=[],r={colorScheme:o},s=t(i);return e.files[s]&&(m(e,s,{enter:function(e,t){this.is(ne)?o.push(k("window"==t.val?"FFFFFFFF":"FF000000")):this.is(ie)&&o.push(k("FF"+t.val))}}),o.length>3&&(n(o,0,1),n(o,2,3))),r}function w(e){return null==e?null:parseInt(e,10)}function y(e,t){return null==e?t:"true"==e||e===!0||1==e}function k(e){var t=/^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return"rgba("+parseInt(t[2],16)+", "+parseInt(t[3],16)+", "+parseInt(t[4],16)+", "+parseInt(t[1],16)/255+")"}var x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G,$,K,Y,Q,X,Z,J,ee,te,ie,ne;kendo.support.browser.msie&&kendo.support.browser.version<9||(x=kendo.jQuery,C=kendo.util.parseXML,S=kendo.spreadsheet.calc.parseReference,T={greaterThanOrEqual:"greaterThanOrEqualTo",lessThanOrEqual:"lessThanOrEqualTo"},D=null,A=["sheetData","row","c"],E=["cols","col"],I=["definedNames","definedName"],M=["sheetData","row","c","f"],R=["mergeCells","mergeCell"],F=["sheetViews","sheetView","pane"],P=["sheetData","row"],z=["sheetViews","sheetView","selection"],B=["sheets","sheet"],L=["sheetData","row","c","is"],H=["t"],N=["si"],O=["sheetData","row","c","v"],V=["bookViews","workbookView"],W=["sheetViews","sheetView"],U=["hyperlinks","hyperlink"],q=["dataValidations","dataValidation"],j=["dataValidations","dataValidation","formula1"],G=["dataValidations","dataValidation","formula2"],$={none:0,thin:1,medium:2,dashed:1,dotted:1,thick:3,"double":3,hair:1,mediumDashed:2,dashDot:1,mediumDashDot:2,dashDotDot:1,mediumDashDotDot:2,slantDashDot:1},K={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"mm-dd-yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},Y=["borders","border"],Q=["fills","fill"],X=["fonts","font"],Z=["cellXfs","xf"],J=["cellStyleXfs","xf"],ee=["numFmts","numFmt"],te=[k("FF000000"),k("FFFFFFFF"),k("FFFF0000"),k("FF00FF00"),k("FF0000FF"),k("FFFFFF00"),k("FFFF00FF"),k("FF00FFFF"),k("FF000000"),k("FFFFFFFF"),k("FFFF0000"),k("FF00FF00"),k("FF0000FF"),k("FFFFFF00"),k("FFFF00FF"),k("FF00FFFF"),k("FF800000"),k("FF008000"),k("FF000080"),k("FF808000"),k("FF800080"),k("FF008080"),k("FFC0C0C0"),k("FF808080"),k("FF9999FF"),k("FF993366"),k("FFFFFFCC"),k("FFCCFFFF"),k("FF660066"),k("FFFF8080"),k("FF0066CC"),k("FFCCCCFF"),k("FF000080"),k("FFFF00FF"),k("FFFFFF00"),k("FF00FFFF"),k("FF800080"),k("FF800000"),k("FF008080"),k("FF0000FF"),k("FF00CCFF"),k("FFCCFFFF"),k("FFCCFFCC"),k("FFFFFF99"),k("FF99CCFF"),k("FFFF99CC"),k("FFCC99FF"),k("FFFFCC99"),k("FF3366FF"),k("FF33CCCC"),k("FF99CC00"),k("FFFFCC00"),k("FFFF9900"),k("FFFF6600"),k("FF666699"),k("FF969696"),k("FF003366"),k("FF339966"),k("FF003300"),k("FF333300"),k("FF993300"),k("FF993366"),k("FF333399"),k("FF333333"),k("FF000000"),k("FFFFFFFF")],ie=["a:clrScheme","*","a:srgbClr"],ne=["a:clrScheme","*","a:sysClr"],kendo.spreadsheet.readExcel=e,kendo.spreadsheet._readSheet=c,kendo.spreadsheet._readStrings=g,kendo.spreadsheet._readStyles=_,kendo.spreadsheet._readTheme=b,kendo.spreadsheet._readWorkbook=i)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/workbook.min",["kendo.core.min","spreadsheet/runtime.min","spreadsheet/references.min","spreadsheet/excel-reader.min"],e)}(function(){!function(e){function t(e,t){function i(e,t,i){return void 0!==e?e:void 0!==t?t:i}var n,o,r,s,a,l,c=i(e.rowCount,t.rows,200),d=i(e.columnCount,t.columns,50),u=i(e.rowHeight,t.rowHeight,20),h=i(e.columnWidth,t.columnWidth,64),p=i(e.headerHeight,t.headerHeight,20),f=i(e.headerWidth,t.headerWidth,32);if(void 0!==e.rows)for(n=0;n<e.rows.length;++n)if(o=e.rows[n],r=i(o.index,n),r>=c&&(c=r+1),o.cells)for(s=0;s<o.cells.length;++s)a=o.cells[s],l=i(a.index,s),l>=d&&(d=l+1);return{rowCount:c,columnCount:d,rowHeight:u,columnWidth:h,headerHeight:p,headerWidth:f}}var i,n,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(i=e.jQuery,n=e.spreadsheet.calc.runtime.Formula,o=e.spreadsheet.Ref,r=e.spreadsheet.CalcError,s=e.Observable.extend({init:function(t,i){e.Observable.fn.init.call(this),this.options=t,this._view=i,this._sheets=[],this._sheetsSearchCache={},this._sheet=this.insertSheet({rows:this.options.rows,columns:this.options.columns,rowHeight:this.options.rowHeight,columnWidth:this.options.columnWidth,headerHeight:this.options.headerHeight,headerWidth:this.options.headerWidth,dataSource:this.options.dataSource}),this.undoRedoStack=new e.util.UndoRedoStack,this.undoRedoStack.bind(["undo","redo"],this._onUndoRedo.bind(this)),this._context=new e.spreadsheet.FormulaContext(this),this._validationContext=new e.spreadsheet.ValidationFormulaContext(this),this._names=Object.create(null),this.fromJSON(this.options)},clipboard:function(){return this._clipboard||(this._clipboard=new e.spreadsheet.Clipboard(this)),this._clipboard},destroy:function(){this.unbind(),this._clipboard&&this._clipboard.destroy()},events:["cut","copy","paste","change","excelImport","excelExport","insertSheet","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat"],_sheetChange:function(e){this.trigger("change",e)},_sheetInsertRow:function(e){this.trigger("insertRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetInsertColumn:function(e){this.trigger("insertColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetDeleteRow:function(e){this.trigger("deleteRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetDeleteColumn:function(e){this.trigger("deleteColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetHideRow:function(e){this.trigger("hideRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetHideColumn:function(e){this.trigger("hideColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetUnhideRow:function(e){this.trigger("unhideRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetUnhideColumn:function(e){this.trigger("unhideColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetSelect:function(e){this.trigger("select",e)},_sheetCommandRequest:function(e){this.trigger("commandRequest",e)},_inputForRef:function(t){return new e.spreadsheet.Range(t,this._sheet).input()},_onUndoRedo:function(e){e.command.range().select()},execute:function(t){var n,o=i.extend({workbook:this},t.options),r=new e.spreadsheet[t.command](o),s=this.activeSheet();return o.origin&&r.origin(o.origin),r.range(o.operatingRange?o.operatingRange:s.selection()),n=r.exec(),n&&"error"===n.reason||(r.cannotUndo?this.undoRedoStack.clear():this.undoRedoStack.push(r)),n},resetFormulas:function(){this._sheets.forEach(function(e){e.resetFormulas()})},resetValidations:function(){this._sheets.forEach(function(e){e.resetValidations()})},refresh:function(e){e.recalc&&(this.resetFormulas(),this.resetValidations(),this._sheet.recalc(this._context),this._sheet.revalidate(this._validationContext))},activeSheet:function(t){return void 0===t?this._sheet:void(this.sheetByName(t.name())&&(this._sheet=t,t.triggerChange(e.spreadsheet.ALL_REASONS)))},moveSheetToIndex:function(e,t){var i=this.sheetIndex(e),n=this._sheets;i!==-1&&(this._sheetsSearchCache={},n.splice(t,0,n.splice(i,1)[0]),this.trigger("change",{sheetSelection:!0}))},insertSheet:function(t){var i,n,o,r,s,a;if(t=t||{},i=this,n="number"==typeof t.index?t.index:i._sheets.length,r=i._sheets,s=function(e){e=e?e:1;var t="Sheet"+e;return i.sheetByName(t)?s(e+1):t},!t.name||!i.sheetByName(t.name))return this._sheetsSearchCache={},o=t.name||s(),a=new e.spreadsheet.Sheet(t.rows||this.options.rows,t.columns||this.options.columns,t.rowHeight||this.options.rowHeight,t.columnWidth||this.options.columnWidth,t.headerHeight||this.options.headerHeight,t.headerWidth||this.options.headerWidth,t.defaultCellStyle||this.options.defaultCellStyle),a._workbook=this,a._name(o),this._bindSheetEvents(a),r.splice(n,0,a),t.data&&a.fromJSON(t.data),t.dataSource&&a.setDataSource(t.dataSource),this.trigger("change",{sheetSelection:!0}),a},_bindSheetEvents:function(e){e.bind("change",this._sheetChange.bind(this)),e.bind("insertRow",this._sheetInsertRow.bind(this)),e.bind("insertColumn",this._sheetInsertColumn.bind(this)),e.bind("deleteRow",this._sheetDeleteRow.bind(this)),e.bind("deleteColumn",this._sheetDeleteColumn.bind(this)),e.bind("hideRow",this._sheetHideRow.bind(this)),e.bind("hideColumn",this._sheetHideColumn.bind(this)),e.bind("unhideRow",this._sheetUnhideRow.bind(this)),e.bind("unhideColumn",this._sheetUnhideColumn.bind(this)),e.bind("select",this._sheetSelect.bind(this)),e.bind("commandRequest",this._sheetCommandRequest.bind(this))},sheets:function(){return this._sheets.slice()},sheetByName:function(e){return this._sheets[this.sheetIndex(e)]},sheetByIndex:function(e){return this._sheets[e]},sheetIndex:function(e){var t,i=this._sheets,n=("string"==typeof e?e:e.name()).toLowerCase(),o=this._sheetsSearchCache[n];if(o>=0)return o;for(o=0;o<i.length;o++)if(t=i[o].name().toLowerCase(),this._sheetsSearchCache[t]=o,t===n)return o;return-1},renameSheet:function(e,t){var i=e.name().toLowerCase();if(t&&i!==t.toLowerCase()&&!this.sheetByName(t)&&(e=this.sheetByName(i),e&&(this._sheetsSearchCache={},!this.trigger("renameSheet",{sheet:e,newSheetName:t}))))return this._sheets.forEach(function(e){e._forFormulas(function(e){e.renameSheet(i,t)})}),this.forEachName(function(e,r){e.nameref.renameSheet(i,t)&&(this.undefineName(r),e.name=e.nameref.print(),this.nameDefinition(e.name,e)),(e.value instanceof o||e.value instanceof n)&&e.value.renameSheet(i,t)}.bind(this)),e._name(t),this.trigger("change",{sheetSelection:!0}),e},removeSheet:function(e){var t,i=this,n=i._sheets,o=e.name(),r=i.sheetIndex(e);1!==n.length&&(this.trigger("removeSheet",{sheet:e})||(this._sheetsSearchCache={},r>-1&&(e.unbind(),n.splice(r,1),i.activeSheet().name()===o?(t=n[r===n.length?r-1:r],i.activeSheet(t)):this.trigger("change",{recalc:!0,sheetSelection:!0}))))},_clearSheets:function(){for(var e=0;e<this._sheets.length;e++)this._sheets[e].unbind();this._sheets=[],this._sheetsSearchCache={},this._names={}},fromJSON:function(e){var i,n,o,r;if(e.sheets)for(this._clearSheets(),i=0;i<e.sheets.length;i++)n=e.sheets[i],o=t(n,this.options),r=this.insertSheet({rows:o.rowCount,columns:o.columnCount,rowHeight:o.rowHeight,columnWidth:o.columnWidth,headerHeight:o.headerHeight,headerWidth:o.headerWidth,data:n}),n.dataSource&&r.setDataSource(n.dataSource);this.activeSheet(e.activeSheet?this.sheetByName(e.activeSheet):this._sheets[0]),e.names&&e.names.forEach(function(e){this.defineName(e.name,e.value,e.hidden)},this)},toJSON:function(){this.resetFormulas(),this.resetValidations();var e=Object.keys(this._names).map(function(e){var t=this._names[e],i=t.value;return i instanceof o||i instanceof n?i=i.print(0,0,!0):i instanceof r?i+="":i=JSON.stringify(i),{value:i,hidden:t.hidden,name:t.name,sheet:t.nameref.sheet,localName:t.nameref.name}},this);return{activeSheet:this.activeSheet().name(),sheets:this._sheets.map(function(e){return e.recalc(this._context),e.revalidate(this._validationContext),e.toJSON()},this),names:e,columnWidth:this.options.columnWidth,rowHeight:this.options.rowHeight}},fromFile:function(t){var n=new i.Deferred,o=n.promise(),r={file:t,promise:o};return t&&!this.trigger("excelImport",r)?(this._clearSheets(),e.spreadsheet.readExcel(t,this,n)):n.reject(),o},saveAsExcel:function(t){var n,o;t=i.extend({},this.options.excel,t),n=this.toJSON(),this.trigger("excelExport",{workbook:n})||(o=new e.ooxml.Workbook(n),e.saveAs({dataURI:o.toDataURL(),fileName:n.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy}))},draw:function(t,i){"function"!=typeof t||i||(i=t,t={});var n=[],o=this._sheets;!function r(s){if(s<o.length)o[s].draw(e.spreadsheet.SHEETREF,t,function(e){n.push(e),r(s+1)});else{var a=n[0];for(s=1;s<n.length;++s)a.children=a.children.concat(n[s].children);i(a)}}(0)},nameForRef:function(e,t){var i,n,r,s;void 0===t&&(t=e.sheet),t=t.toLowerCase(),i=e+"";for(n in this._names)if(r=this._names[n],s=r.value,s instanceof o&&(!s.sheet||s.sheet&&t==s.sheet.toLowerCase())&&s+""==i)return r;return{name:i}},defineName:function(t,i,n){var o=e.spreadsheet.calc.parseNameDefinition(t,i);t=o.name.print(),this._names[t.toLowerCase()]={value:o.value,hidden:n,name:t,nameref:o.name}},undefineName:function(e){delete this._names[e.toLowerCase()]},nameValue:function(e){return e=e.toLowerCase(),e in this._names?this._names[e].value:null},nameDefinition:function(e,t){return e=e.toLowerCase(),arguments.length>1&&(void 0===t?delete this._names[e]:this._names[e]=t),this._names[e]},forEachName:function(e){Object.keys(this._names).forEach(function(t){e(this._names[t],t)},this)},adjustNames:function(e,t,i,r){e=e.toLowerCase(),Object.keys(this._names).forEach(function(s){var a=this._names[s],l=a.value;l instanceof o&&l.sheet.toLowerCase()==e?a.value=l.adjust(null,null,null,null,t,i,r):l instanceof n&&l.adjust(e,t?"row":"col",i,r)},this)},options:{}}),e.spreadsheet.Workbook=s,e.PDFMixin&&(e.PDFMixin.extend(s.prototype),s.prototype.saveAsPDF=function(t){var n=new i.Deferred,o=n.promise(),r={promise:o};if(!this.trigger("pdfExport",r))return this._drawPDF(t,n).then(function(t){return e.drawing.exportPDF(t)}).done(function(i){e.saveAs({dataURI:i,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy,proxyTarget:t.proxyTarget}),n.resolve()}).fail(function(e){n.reject(e)}),o},s.prototype._drawPDF=function(e){var t=new i.Deferred,n=function(e){t.resolve(e)};switch(e.area){case"workbook":e.workbook.draw(e,n);break;case"sheet":e.workbook.activeSheet().draw(e,n);break;case"selection":e.workbook.activeSheet().selection().draw(e,n)}return t.promise()}))}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/formulacontext.min",["kendo.core.min"],e)}(function(){var e,t,i,n,o,r,s,a;kendo.support.browser.msie&&kendo.support.browser.version<9||(e=kendo.spreadsheet,t=e.CellRef,i=e.RangeRef,n=e.UnionRef,o=e.NameRef,r=e.Ref,s=kendo.Class.extend({init:function(e){this.workbook=e},getRefCells:function(e,s,a,l,c,d){var u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D;if(e instanceof t)return u=this.workbook.sheetByName(e.sheet),u&&e.valid()?(h=u.formula(e),p=u.range(e.row,e.col).value(),d||null!=h||null!=p?[{formula:h,value:p,row:e.row,col:e.col,sheet:e.sheet,hidden:!!s&&(0===u.columnWidth(e.col)||0===u.rowHeight(e.row))}]:[]):[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];if(e instanceof i){if(f=this.workbook.sheetIndex(e.sheet),m=[],g=f,e.endSheet&&(g=this.workbook.sheetIndex(e.endSheet),f>g&&(v=f,f=g,g=v)),f<0||g<0||!e.valid())return[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];for(;f<=g;)for(u=this.workbook.sheetByIndex(f++),_=u._grid.normalize(e.topLeft),b=u._grid.normalize(e.bottomRight),w=u._grid.cellRefIndex(_),y=u._grid.cellRefIndex(b),k=u._properties.iterator("value",w,y),x=_.col;x<=b.col;++x)for(C=_.row;C<=b.row;++C)S=u._grid.index(C,x),h=u._properties.get("formula",S),p=k.at(S),(d||null!=h||null!=p)&&m.push({formula:h,value:p,row:C,col:x,sheet:u.name(),hidden:!!s&&(0===u.columnWidth(x)||0===u.rowHeight(C))});return m}if(e instanceof n){for(T=[],f=0;f<e.refs.length;++f)T=T.concat(this.getRefCells(e.refs[f],s,a,l,c));return T}return e instanceof o?(D=this.nameValue(e,a,l,c),D instanceof r?this.getRefCells(D,s,a,l,c):[{value:null==D?new kendo.spreadsheet.calc.runtime.CalcError("NAME"):D}]):[]},nameValue:function(e,t,i,n){var o;return e.hasSheet()?o=this.workbook.nameValue(e.print()):(e=e.clone().setSheet(t,!0),o=this.workbook.nameValue(e.print()),null==o&&(o=this.workbook.nameValue(e.name))),o instanceof r&&(o=o.absolute(i,n)),o},getData:function(e,i,n,r,s){var a,l=e instanceof t;return e instanceof o&&(l=this.workbook.nameValue(e.name)instanceof t),a=this.getRefCells(e,!1,i,n,r,s).map(function(e){var t=e.value;return t instanceof kendo.spreadsheet.calc.runtime.Formula&&(t=t.value),t}),l?a[0]:a},onFormula:function(e){var t,i,n,o,s,a=this.workbook.sheetByName(e.sheet),l=e.row,c=e.col,d=e.value,u=a.formula({row:l,col:c});return u===e&&(t=e.arrayFormulaRange,t?(o=d.width,s=d.height,a.forEach(t,function(e,t){var r,l,c;void 0===i&&(i=e,n=t),r=e-i,l=t-n,c=r<s&&l<o?d.get(r,l):new kendo.spreadsheet.calc.runtime.CalcError("N/A"),a._value(e,t,c)})):(d instanceof r&&(d=this.getData(d,e.sheet,l,c),Array.isArray(d)&&(d=d[0]),void 0===d&&(d=null)),d instanceof kendo.spreadsheet.calc.runtime.Matrix&&(d=d.get(0,0)),a._value(l,c,d)),clearTimeout(a._formulaContextRefresh),a._formulaContextRefresh=setTimeout(function(){a.batch(function(){},{layout:!0})},50),!0)}}),a=s.extend({onFormula:function(){return!0}}),e.FormulaContext=s,e.ValidationFormulaContext=a)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/controller.min",["kendo.core.min"],e)}(function(){!function(e){"use strict";function t(e){return e.map(function(e){return'[data-action="'+e+'"]'}).join(",")}var i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_;if(!(e.support.browser.msie&&e.support.browser.version<9)){i=e.jQuery,n=/:alphanum$/,o={up:"up",down:"down",left:"left",right:"right",home:"first-col","ctrl+left":"first-col",end:"last-col","ctrl+right":"last-col","ctrl+up":"first-row","ctrl+down":"last-row","ctrl+home":"first","ctrl+end":"last",pageup:"prev-page",pagedown:"next-page"},r={tab:"next","shift+tab":"previous",enter:"lower","shift+enter":"upper","delete":"clearContents",backspace:"clearContents","shift+:alphanum":"edit","alt+:alphanum":"edit",":alphanum":"edit","ctrl+:alphanum":"ctrl","alt+ctrl+:alphanum":"edit",":edit":"edit"},s={wheel:"onWheel","*+mousedown":"onMouseDown",contextmenu:"onContextMenu","*+mousedrag":"onMouseDrag","*+mouseup":"onMouseUp","*+dblclick":"onDblClick",mousemove:"onMouseMove"},a={pageup:"onPageUp",pagedown:"onPageDown",mouseup:"onMouseUp","*+cut":"onCut","*+paste":"onPaste","*+copy":"onCopy"},l={esc:"onEditorEsc",enter:"onEditorBlur","alt+enter":"insertNewline","shift+enter":"onEditorBlur",tab:"onEditorBlur","shift+tab":"onEditorBlur","shift+ctrl+enter":"onEditorArrayFormula"},c=i.extend({focus:"onEditorBarFocus"},l),d=i.extend({focus:"onEditorCellFocus"},l),u={cell:"range",rowheader:"row",columnheader:"column",topcorner:"sheet",autofill:"autofill"},h=t(["cut","copy","paste","insert-left","insert-right","insert-above","insert-below"]),p=t(["unhide-row","unhide-column"]),f=[],m=[],g=[];for(v in o)f.push(v),m.push("shift+"+v);for(v in r)g.push(v);a[f]="onAction",a[m]="onShiftAction",a[g]="onEntryAction",d[f]="onEditorAction",d[m]="onEditorShiftAction",_=e.Class.extend({init:function(t,n){this.view=t,this.workbook(n),this.container=i(t.container),this.clipboardElement=i(t.clipboard),this.cellContextMenu=t.cellContextMenu,this.rowHeaderContextMenu=t.rowHeaderContextMenu,this.colHeaderContextMenu=t.colHeaderContextMenu,this.scroller=t.scroller,this.tabstrip=t.tabstrip,this.sheetsbar=t.sheetsbar,t.nameEditor.bind("enter",this.onNameEditorEnter.bind(this)),t.nameEditor.bind("cancel",this.onNameEditorCancel.bind(this)),t.nameEditor.bind("select",this.onNameEditorSelect.bind(this)),t.nameEditor.bind("delete",this.onNameEditorDelete.bind(this)),this.editor=t.editor,this.editor.bind("change",this.onEditorChange.bind(this)),this.editor.bind("activate",this.onEditorActivate.bind(this)),this.editor.bind("deactivate",this.onEditorDeactivate.bind(this)),this.editor.bind("update",this.onEditorUpdate.bind(this)),i(t.scroller).on("scroll",this.onScroll.bind(this)),this.listener=new e.spreadsheet.EventListener(this.container,this,s),this._enableEditorEvents(),this.sheetsbar&&(this.sheetsbar.bind("select",this.onSheetBarSelect.bind(this)),this.sheetsbar.bind("reorder",this.onSheetBarReorder.bind(this)),this.sheetsbar.bind("rename",this.onSheetBarRename.bind(this)),this.sheetsbar.bind("remove",this.onSheetBarRemove.bind(this))),this.cellContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.rowHeaderContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.colHeaderContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.cellContextMenu.element.add(this.rowHeaderContextMenu.element).add(this.colHeaderContextMenu.element).on("contextmenu",!1),this.tabstrip&&(this.tabstrip.bind("action",this.onCommandRequest.bind(this)),this.tabstrip.bind("dialog",this.onDialogRequest.bind(this)))},_enableEditorEvents:function(t){void 0===t||t?(this.keyListener=new e.spreadsheet.EventListener(this.clipboardElement,this,a),this.barKeyListener=new e.spreadsheet.EventListener(this.editor.barElement(),this,c),this.inputKeyListener=new e.spreadsheet.EventListener(this.editor.cellElement(),this,d)):(this.keyListener.destroy(),
this.barKeyListener.destroy(),this.inputKeyListener.destroy())},_execute:function(e){var t=this._workbook.execute(e);return"EditCommand"!==e.command||t||this._workbook.trigger("change",{editorClose:!0}),t&&(this._preventNavigation=!0,"error"===t.reason?(this.editor.deactivate(!0),this.view.showError(t,function(){this.activateEditor(!1),this.editor.value(this._lastEditorValue),this.editor._value=this._workbook._inputForRef(this._workbook.activeSheet()._viewActiveCell()),this.editor.select()}.bind(this))):this.view.openDialog(t.reason)),t},_activeTooltip:function(){return""+this._workbook.activeSheet().activeCell().simplify()},onContextMenuSelect:function(e){var t,n=i(e.item).data("action");switch(n){case"cut":t={command:"ToolbarCutCommand",options:{workbook:this._workbook}};break;case"copy":t={command:"ToolbarCopyCommand",options:{workbook:this._workbook}};break;case"paste":t={command:"ToolbarPasteCommand",options:{workbook:this._workbook}};break;case"unmerge":t={command:"MergeCellCommand",options:{value:"unmerge"}};break;case"merge":this.view.openDialog("merge");break;case"hide-row":t={command:"HideLineCommand",options:{axis:"row"}};break;case"hide-column":t={command:"HideLineCommand",options:{axis:"column"}};break;case"unhide-row":t={command:"UnHideLineCommand",options:{axis:"row"}};break;case"unhide-column":t={command:"UnHideLineCommand",options:{axis:"column"}};break;case"delete-row":t={command:"DeleteRowCommand"};break;case"delete-column":t={command:"DeleteColumnCommand"}}t&&this._execute(t)},onSheetBarRemove:function(e){var t=this._workbook.sheetByName(e.name);t&&this._workbook.removeSheet(t)},destroy:function(){this.listener.destroy(),this._enableEditorEvents(!1),this.keyListener.destroy(),this.inputKeyListener.destroy()},onSheetBarSelect:function(e){var t,i=this._workbook;if(e.isAddButton){if(this._workbook.trigger("insertSheet"))return;t=i.insertSheet()}else t=i.sheetByName(e.name);if(i.activeSheet().name()!==t.name()){if(this._workbook.trigger("selectSheet",{sheet:t}))return;this.editor.canInsertRef(!1)||this.editor.deactivate(),i.activeSheet(t)}},onSheetBarReorder:function(e){var t=this._workbook.sheetByIndex(e.oldIndex);this._workbook.moveSheetToIndex(t,e.newIndex),this._workbook.activeSheet(t)},onSheetBarRename:function(e){var t=this._workbook.sheetByIndex(e.sheetIndex);return this._workbook.sheetByName(e.name)?void this.view.showError({reason:"error",type:"duplicateSheetName"}):(this._workbook.renameSheet(t,e.name),void this.clipboardElement.focus())},sheet:function(e){this.navigator=e.navigator(),this.axisManager=e.axisManager()},workbook:function(e){this._workbook=e,this.clipboard=e.clipboard(),e.bind("commandRequest",this.onCommandRequest.bind(this))},refresh:function(){var e,t,i=this.editor,n=this._workbook,o=n.activeSheet();this._viewPortHeight=this.view.scroller.clientHeight,this.navigator.height(this._viewPortHeight),i.isActive()||this.isEditorDisabled||(i.enable(o.selection().enable()!==!1),this.resetEditorValue()),e=o.selection()._ref.simplify(),t=this._workbook.nameForRef(e,o.name()),this.view.nameEditor.value(t.name)},onScroll:function(){this.view.render()},onWheel:function(e){var t=e.originalEvent.deltaX,i=e.originalEvent.deltaY;1===e.originalEvent.deltaMode&&(t*=10,i*=10),this.scrollWith(t,i),e.preventDefault()},onAction:function(e,t){this.navigator.moveActiveCell(o[t]),e.preventDefault()},onPageUp:function(){this.scrollDown(-this._viewPortHeight)},onPageDown:function(){this.scrollDown(this._viewPortHeight)},onEntryAction:function(e,t){var i,o,s,a;if(e.mod){switch(i=!0,o=String.fromCharCode(e.keyCode)){case"A":this.navigator.selectAll();break;case"Y":this._workbook.undoRedoStack.redo();break;case"Z":this._workbook.undoRedoStack.undo();break;default:i=!1}i&&e.preventDefault()}else if(s=this._workbook.activeSheet().selection().enable()===!1,a=":edit"!==t,"delete"==t||"backspace"==t)s||this._execute({command:"ClearContentCommand"}),e.preventDefault();else if(n.test(t)||!a){if(s)return void e.preventDefault();a&&this.editor.value(""),this.activateEditor(a)}else this.navigator.navigateInSelection(r[t]),e.preventDefault()},onShiftAction:function(e,t){this.navigator.modifySelection(o[t.replace("shift+","")],this.appendSelection),e.preventDefault()},onMouseMove:function(e){var t,i=this._workbook.activeSheet();i.resizingInProgress()||i.selectionInProgress()||(t=this.objectAt(e),"columnresizehandle"===t.type||"rowresizehandle"===t.type?i.positionResizeHandle(t.ref):i.removeResizeHandle())},onMouseDown:function(e){var t,i=this.objectAt(e);if(i.pane&&(this.originFrame=i.pane),"editor"===i.type)return this.onEditorEsc(),this.openCustomEditor(),void e.preventDefault();if(this.editor.canInsertRef(!1)&&i.ref)return this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs()),this.navigator.startSelection(i.ref,this._selectionMode,this.appendSelection,e.shiftKey),void e.preventDefault();if(this._preventNavigation=!1,this.editor.deactivate(),!this._preventNavigation){if(t=this._workbook.activeSheet(),"columnresizehandle"===i.type||"rowresizehandle"===i.type)return t.startResizing({x:i.x,y:i.y}),void e.preventDefault();if("filtericon"===i.type)return this.openFilterMenu(e),void e.preventDefault();this._selectionMode=u[i.type],this.appendSelection=e.mod,this.navigator.startSelection(i.ref,this._selectionMode,this.appendSelection,e.shiftKey)}},onContextMenu:function(t){var i,n,o,r,s,a=this._workbook.activeSheet();a.resizingInProgress()||(t.preventDefault(),this.cellContextMenu.close(),this.colHeaderContextMenu.close(),this.rowHeaderContextMenu.close(),n=this.objectAt(t),"columnresizehandle"!==n.type&&"rowresizehandle"!==n.type&&(this.navigator.selectForContextMenu(n.ref,u[n.type]),o=this.navigator._sheet.select()instanceof e.spreadsheet.UnionRef,r=!1,s=!1,"columnheader"==n.type?(i=this.colHeaderContextMenu,r=!o&&this.axisManager.selectionIncludesHiddenColumns()):"rowheader"==n.type?(i=this.rowHeaderContextMenu,r=!o&&this.axisManager.selectionIncludesHiddenRows()):(i=this.cellContextMenu,s=this.navigator.selectionIncludesMergedCells()),i.element.find(h).toggle(!o),i.element.find(p).toggle(r),i.element.find("[data-action=unmerge]").toggle(s),setTimeout(function(){i.open(t.pageX,t.pageY)})))},prevent:function(e){e.preventDefault()},constrainResize:function(e,t){var i=this._workbook.activeSheet(),n=i.resizeHandlePosition();return!n||"outside"===e||"topcorner"===e||t.col<n.col||t.row<n.row},onMouseDrag:function(e){var t,i,n,o;if("sheet"!==this._selectionMode){if(t={clientX:e.clientX,clientY:e.clientY},i=this.objectAt(t),n=this._workbook.activeSheet(),n.resizingInProgress())return void(this.constrainResize(i.type,i.ref)||n.resizeHintPosition({x:i.x,y:i.y}));if("outside"===i.type)return void this.startAutoScroll(i);this.originFrame===i.pane?this.selectToLocation(t):(o=this.originFrame._grid,i.x>o.right&&this.scrollLeft(),i.y>o.bottom&&this.scrollTop(),i.y<o.top||i.x<o.left?this.startAutoScroll(i,t):this.selectToLocation(t)),e.preventDefault()}},onMouseUp:function(e){var t,i,n,o=this._workbook.activeSheet();if(o.completeResizing(),this.navigator.completeSelection(),this.stopAutoScroll(),t=this.editor.activeEditor()){for(i=e.target;i;){if(i===t.element[0])return;i=i.parentNode}n=this.objectAt(e),n&&n.ref&&t.canInsertRef(!1)&&(t.refAtPoint(o),o._setFormulaSelections(t.highlightedRefs()))}},onDblClick:function(e){var t,i=this.objectAt(e),n=this._workbook.activeSheet().selection().enable()===!1;"cell"!==i.type||n||(t=this._workbook.activeSheet().selection(),this.activateEditor(!t.value()&&!t.formula()),this.onEditorUpdate())},onCut:function(e){if(e){var t=this.clipboardElement.find("table.kendo-clipboard-"+this.clipboard._uid).detach();this.clipboardElement.append(t.clone(!1)),setTimeout(function(){this.clipboardElement.empty().append(t)}.bind(this))}this._execute({command:"CutCommand",options:{workbook:this.view._workbook,event:e.originalEvent||e}})},clipBoardValue:function(){return this.clipboardElement.html()},onPaste:function(t){var i,n,o,r="",s="";if(this.clipboard.menuInvoked=void 0===t,t){if(!t.originalEvent.clipboardData||!t.originalEvent.clipboardData.getData)return o=this.clipboardElement.find("table.kendo-clipboard-"+this.clipboard._uid).detach(),this.clipboardElement.empty(),void setTimeout(function(){var e=this.clipboardElement.html(),i=window.clipboardData.getData("Text").trim();(e||i)&&(this.clipboard.external({html:e,plain:i}),this.clipboardElement.empty().append(o),this._execute({command:"PasteCommand",options:{workbook:this.view._workbook,event:t.originalEvent||t}}),this.clipboard.menuInvoked=!0)}.bind(this));t.preventDefault(),i=!1,n=!1,window.DOMStringList&&t.originalEvent.clipboardData.types instanceof window.DOMStringList?(i=t.originalEvent.clipboardData.types.contains("text/html"),n=t.originalEvent.clipboardData.types.contains("text/plain")):(i=/text\/html/.test(t.originalEvent.clipboardData.types),n=/text\/plain/.test(t.originalEvent.clipboardData.types)),i&&(r=t.originalEvent.clipboardData.getData("text/html")),n&&(s=t.originalEvent.clipboardData.getData("text/plain").trim())}else{if(e.support.browser.msie)return this.clipboardElement.focus().select(),void document.execCommand("paste");this.clipboard.menuInvoked=!0}(r||s)&&(this.clipboard.external({html:r,plain:s}),this._execute({command:"PasteCommand",options:{workbook:this.view._workbook,event:t.originalEvent||t}}))},onCopy:function(e){this.clipboard.menuInvoked=void 0===e,this._execute({command:"CopyCommand",options:{workbook:this.view._workbook,event:e.originalEvent||e}})},scrollTop:function(){this.scroller.scrollTop=0},scrollLeft:function(){this.scroller.scrollLeft=0},scrollDown:function(e){this.scroller.scrollTop+=e},scrollRight:function(e){this.scroller.scrollLeft+=e},scrollWith:function(e,t){this.scroller.scrollTop+=t,this.scroller.scrollLeft+=e},objectAt:function(e){if(e){var t=this.container[0].getBoundingClientRect();return this.view.objectAt(e.clientX-t.left,e.clientY-t.top)}},selectToLocation:function(e){var t=this.objectAt(e);t.pane&&(this.extendSelection(t),this.lastKnownCellLocation=e,this.originFrame=t.pane),this.stopAutoScroll()},extendSelection:function(e){this.navigator.extendSelection(e.ref,this._selectionMode,this.appendSelection)},autoScroll:function(){var e=this._autoScrollTarget.x,t=this._autoScrollTarget.y,i=this.originFrame._grid,n=this.view.scroller,o=8,r=n.scrollLeft,s=n.scrollTop;e<i.left&&this.scrollRight(-o),e>i.right&&this.scrollRight(o),t<i.top&&this.scrollDown(-o),t>i.bottom&&this.scrollDown(o),s===n.scrollTop&&r===n.scrollLeft?this.selectToLocation(this.finalLocation):this.extendSelection(this.objectAt(this.lastKnownCellLocation))},startAutoScroll:function(e,t){this._scrollInterval||(this._scrollInterval=setInterval(this.autoScroll.bind(this),50)),this.finalLocation=t||this.lastKnownCellLocation,this._autoScrollTarget=e},stopAutoScroll:function(){clearInterval(this._scrollInterval),this._scrollInterval=null},openCustomEditor:function(){this.view.openCustomEditor()},openFilterMenu:function(e){var t=this.objectAt(e),i=this._workbook.activeSheet(),n=i.filterColumn(t.ref),o=this.view.createFilterMenu(n);o.bind("action",this.onCommandRequest.bind(this)),o.bind("action",o.close.bind(o)),o.openFor(e.target)},_saveEditorValue:function(e){var t=this.editor._range.sheet(),i=this.editor.value();this._workbook.activeSheet()!==t&&(this._workbook.activeSheet()._setFormulaSelections(),this._workbook.activeSheet(t)),t.isInEditMode(!1),this._lastEditorValue=i,this._execute({command:"EditCommand",options:{value:i,arrayFormula:e}})},onEditorChange:function(){this._saveEditorValue(!1)},onEditorArrayFormula:function(){this._saveEditorValue(!0),this.editor.deactivate(!0)},onEditorActivate:function(){var e=this._workbook,t=e.activeSheet();t._setFormulaSelections(this.editor.highlightedRefs()),t.isInEditMode(!0)},onEditorDeactivate:function(){var e=this._workbook.activeSheet();e.isInEditMode(!1),e._setFormulaSelections([])},onEditorUpdate:function(){this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs())},onEditorBarFocus:function(){var e=this._workbook.activeSheet().selection().enable()===!1;e||this.editor.activate({range:this._workbook.activeSheet().selection(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()})},onEditorCellFocus:function(){this.editor.scale()},onEditorEsc:function(){this.resetEditorValue(),this.editor.deactivate(),this.clipboardElement.focus()},insertNewline:function(e){e.preventDefault(),this.editor.insertNewline()},onEditorBlur:function(e,t){this.editor.isFiltered()||(this._preventNavigation=!1,this.editor.deactivate(),this._preventNavigation||(this.clipboardElement.focus(),this.navigator.navigateInSelection(r[t])))},onEditorAction:function(e,t){var i=this.editor,n=this._workbook.activeSheet();this._casualEditing&&/^(?:up|right|down|left)$/.test(t)?(this.deactivateEditor(),this.navigator.moveActiveCell(o[t]),e.preventDefault()):i.canInsertRef(!0)&&(this.navigator.moveActiveCell(o[t]),i.activeEditor().refAtPoint(n),n._setFormulaSelections(i.highlightedRefs()),e.preventDefault())},onEditorShiftAction:function(e,t){var i=this.editor,n=this._workbook.activeSheet();i.canInsertRef(!0)&&(this.navigator.modifySelection(o[t.replace("shift+","")],this.appendSelection),i.activeEditor().refAtPoint(n),n._setFormulaSelections(i.highlightedRefs()),e.preventDefault())},resetEditorValue:function(){var e=this._workbook.activeSheet(),t=e.activeCell(),i=this._workbook._inputForRef(t),n=e.range(t).intersectingArrayFormula();n&&(i="="+n.formula),this.editor.value(i,!!n)},activateEditor:function(e){this._casualEditing=e,this.editor.activate({range:this._workbook.activeSheet().selection(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()}).focus()},deactivateEditor:function(){this.view.editor.deactivate()},onCommandRequest:function(e){e.command?this._execute(e):this._workbook.undoRedoStack[e.action]()},onDialogRequest:function(e){var t={pdfExport:this._workbook.options.pdf,excelExport:this._workbook.options.excel};e.options?i.extend(!0,e.options,t):e.options=t,this.view.openDialog(e.name,e.options)},onNameEditorEnter:function(){var t,i=this._workbook,n=i.activeSheet(),o=this.view.nameEditor.value(),r=e.spreadsheet.calc.parseReference(o,!0)||i.nameValue(o);return r instanceof e.spreadsheet.Ref?(r.sheet&&r.sheet.toLowerCase()!=n.name().toLowerCase()&&(t=i.sheetByName(r.sheet),t&&(i.activeSheet(t),n=t)),void n.range(r).select()):(r=n.selection()._ref.clone().simplify().setSheet(n.name(),!0),this._execute({command:"DefineNameCommand",options:{name:o,value:r}}),void this.clipboardElement.focus())},onNameEditorCancel:function(){this.clipboardElement.focus()},onNameEditorSelect:function(t){var i,n=t.name,o=this._workbook,r=o.activeSheet(),s=o.nameValue(n);return s instanceof e.spreadsheet.Ref?(s.sheet&&s.sheet.toLowerCase()!=r.name().toLowerCase()&&(i=o.sheetByName(s.sheet),i&&(o.activeSheet(i),r=i)),void r.range(s).select()):void this.clipboardElement.focus()},onNameEditorDelete:function(e){this._execute({command:"DeleteNameCommand",options:{name:e.name}}),this.clipboardElement.focus()}}),e.spreadsheet.Controller=_}}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/view.min",["kendo.core.min","kendo.menu.min","spreadsheet/sheetsbar.min","util/main.min"],e)}(function(){!function(e){function t(e){var t,i=window.getSelection();i.removeAllRanges(),t=document.createRange(),t.selectNodeContents(e),i.addRange(t)}function i(e,t){var i=e.trs[t].children;return i[i.length-2]}function n(e,t){var i=e.trs[t-1],n=e.trs[t].children.length-1;if(i&&n>=0)return i.children[n]}function o(e){return(e.size||1)+"px solid "+(e.color||"#000")}function r(e){return/:\/\//.test(e)||(e="http://"+e),e}function s(t,i,n,s){function a(t){var n,o=i.link;return o||"object"==typeof i.value&&(o=i.value.link),o?(n={textDecoration:"none"},i.color&&(n.color=i.color),i.underline&&(n.textDecoration="underline"),e.dom.element("a",{href:r(o),style:n,target:"_blank"},t?[t]:[])):t}var l,c,d,u,h,p,f,m,g,v,_,b=null!=i.value||null!=i.validation&&!i.validation.value||i.background||i.merged;if(n||b){if(l={},c=i.background,c&&(d=c,s&&(d=e.parseColor(d).toHSV(),d.v*=.9,d=d.toCssRgba()),d=o({color:d}),l.outline=d),c&&(l.backgroundColor=c),i.color&&(l.color=i.color),i.fontFamily&&(l.fontFamily=i.fontFamily),i.underline&&(l.textDecoration="underline"),i.italic&&(l.fontStyle="italic"),i.textAlign&&(l.textAlign=i.textAlign),i.bold&&(l.fontWeight="bold"),i.fontSize&&(l.fontSize=i.fontSize+"px"),i.wrap===!0?(l.whiteSpace="pre-wrap",l.overflowWrap="break-word",l.wordWrap="break-word"):(l.whiteSpace="pre",l.overflowWrap="normal",l.wordWrap="normal"),l.left=i.left+1+"px",l.top=i.top+1+"px",l.width=i.width-1+"px",l.height=i.height-1+"px",u=i.value,h=typeof u,i.format&&null!=u?(u=e.spreadsheet.formatting.format(u,i.format),u.__dataType&&(h=u.__dataType)):null!==u&&void 0!==u&&(u=e.dom.text(u)),!l.textAlign)switch(h){case"number":case"date":case"percent":case"currency":l.textAlign="right";break;case"boolean":l.textAlign="center"}return p=[w.cell],n&&p.push(n),i.enable===!1&&p.push("k-state-disabled"),i.merged&&p.push("k-spreadsheet-merged-cell"),f=i.verticalAlign||"bottom",u=f&&u?e.dom.element("div",{className:"k-vertical-align-"+f},[a(u)]):a(u),m=u?[u]:[],g={style:l},v=i.validation,v&&!v.value&&(m.push(e.dom.element("span",{className:"k-dirty"})),p.push("k-dirty-cell"),g.title=v.message),g.className=p.join(" "),_=e.dom.element("div",g,m),t.push(_),_}}function a(t,r,s){var a,l,c,d,u,h,p={};if(s.background&&(p.backgroundColor=s.background),s.color&&(p.color=s.color),s.fontFamily&&(p.fontFamily=s.fontFamily),s.underline&&(p.textDecoration="underline"),s.italic&&(p.fontStyle="italic"),s.textAlign&&(p.textAlign=s.textAlign),s.verticalAlign&&(p.verticalAlign="center"===s.verticalAlign?"middle":s.verticalAlign),s.bold&&(p.fontWeight="bold"),s.fontSize&&(p.fontSize=s.fontSize+"px"),s.wrap===!0&&(p.whiteSpace="pre-wrap"),s.borderRight?p.borderRight=o(s.borderRight):s.background&&(p.borderRightColor=s.background),s.borderBottom?p.borderBottom=o(s.borderBottom):s.background&&(p.borderBottomColor=s.background),a=s.value,l=typeof a,s.format&&null!=a&&(a=e.spreadsheet.formatting.format(a,s.format),a.__dataType&&(l=a.__dataType)),!p.textAlign)switch(l){case"number":case"date":case"percent":case"currency":p.textAlign="right";break;case"boolean":p.textAlign="center"}return c=null,s.enable===!1&&(c="k-state-disabled"),d=t.addCell(r,a,p,c,s.validation),s.borderLeft?(h=i(t,r),u=o(s.borderLeft),h&&u&&(h.attr.style.borderRight=u)):s.background&&(p.borderLeftColor=s.background),s.borderTop?(h=n(t,r),u=o(s.borderTop),h&&u&&(h.attr.style.borderBottom=u)):s.background&&(p.borderTopColor=s.background),d}function l(e,t,i){return e>=t&&e<=i}var c,d,u,h,p,f,m,g,v,_,b,w,y;e.support.browser.msie&&e.support.browser.version<9||(c=e.jQuery,d=e.spreadsheet.CellRef,u=".",h=7,p={view:"k-spreadsheet-view",fixedContainer:"k-spreadsheet-fixed-container",editContainer:"k-spreadsheet-edit-container",scroller:"k-spreadsheet-scroller",viewSize:"k-spreadsheet-view-size",clipboard:"k-spreadsheet-clipboard",cellEditor:"k-spreadsheet-cell-editor",barEditor:"k-spreadsheet-editor",topCorner:"k-spreadsheet-top-corner",filterHeadersWrapper:"k-filter-wrapper",filterRange:"k-filter-range",filterButton:"k-spreadsheet-filter",filterButtonActive:"k-state-active",horizontalResize:"k-horizontal-resize",verticalResize:"k-vertical-resize",icon:"k-icon",iconFilterDefault:"k-i-arrow-60-down",sheetsBar:"k-spreadsheet-sheets-bar",sheetsBarActive:"k-spreadsheet-sheets-bar-active",sheetsBarInactive:"k-spreadsheet-sheets-bar-inactive",cellContextMenu:"k-spreadsheet-cell-context-menu",rowHeaderContextMenu:"k-spreadsheet-row-header-context-menu",colHeaderContextMenu:"k-spreadsheet-col-header-context-menu"},e.spreadsheet.messages.view={nameBox:"Name Box",errors:{openUnsupported:"Unsupported format. Please select an .xlsx file.",shiftingNonblankCells:"Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",insertColumnWhenRowIsSelected:"Cannot insert column when all columns are selected.",insertRowWhenColumnIsSelected:"Cannot insert row when all rows are selected.",filterRangeContainingMerges:"Cannot create a filter within a range containing merges",sortRangeContainingMerges:"Cannot sort a range containing merges",cantSortMultipleSelection:"Cannot sort multiple selection",cantSortNullRef:"Cannot sort empty selection",cantSortMixedCells:"Cannot sort range containing cells of mixed shapes",validationError:"The value that you entered violates the validation rules set on the cell.",cannotModifyDisabled:"Cannot modify disabled cells."},tabs:{home:"Home",insert:"Insert",data:"Data"}},f=e.Class.extend({init:function(){this.cols=[],this.trs=[],this._height=0,this._width=0},addColumn:function(t){this._width+=t;var i=e.dom.element("col",{style:{width:t+"px"}});i.visible=t>0,this.cols.push(i)},addRow:function(t){var i,n=null;n={style:{height:t+"px"}},this._height+=t,i=e.dom.element("tr",n),i.visible=t>0,this.trs.push(i)},addCell:function(t,i,n,o,r){var s,a,l;return null!==i&&void 0!==i||(i=""),i instanceof e.dom.Node||(i=e.dom.text(i)),s=[i],a={style:n},r&&!r.value&&(s.push(e.dom.element("span",{className:"k-dirty"})),o=(o||"")+(o?" ":"")+"k-dirty-cell",a.title=r.message),o&&(a.className=o),l=e.dom.element("td",a,s),this.trs[t].children.push(l),l},toDomTree:function(t,i,n){this.trs=this.trs.filter(function(e){return e.visible});var o=0;return this.cols=this.cols.filter(function(e,t){return e.visible||(this.trs.forEach(function(e){e.children.splice(t-o,1)}),o++),e.visible},this),e.dom.element("table",{style:{left:t+"px",top:i+"px",height:this._height+"px",width:this._width+"px"},className:n},[e.dom.element("colgroup",null,this.cols),e.dom.element("tbody",null,this.trs)])}}),m='<ul class="#=classNames.cellContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action=merge>Merge</li><li data-action=unmerge>Unmerge</li></ul>',g='<ul class="#=classNames.rowHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-row">Delete</li><li data-action="hide-row">Hide</li><li data-action="unhide-row">Unhide</li></ul>',v='<ul class="#=classNames.colHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-column">Delete</li><li data-action="hide-column">Hide</li><li data-action="unhide-column">Unhide</li></ul>',e.spreadsheet.ContextMenu=e.ui.ContextMenu,_=e.template('<div class="#=classNames.view#"><div class="#=classNames.fixedContainer#"></div><div class="#=classNames.scroller#"><div class="#=classNames.viewSize#"></div></div><div tabindex="0" class="#=classNames.clipboard#" contenteditable=true></div><div class="#=classNames.cellEditor#"></div></div><div class="#=classNames.sheetsBar#"></div>'+m+g+v),b=e.Class.extend({init:function(t,i){var n,o=b.classNames;this.element=t,this.options=c.extend(!0,{messages:e.spreadsheet.messages.view},this.options,i),this._chrome(),this._dialogs=[],t.append(_({classNames:o})),this._formulaInput(),this.wrapper=t.find(u+o.view),this.container=t.find(u+o.fixedContainer)[0],this.scroller=t.find(u+o.scroller)[0],this.clipboard=t.find(u+o.clipboard),this.viewSize=c(this.scroller.firstChild),this.tree=new e.dom.Tree(this.container),this.clipboardContents=new e.dom.Tree(this.clipboard[0]),this.editor=new e.spreadsheet.SheetEditor(this),this._sheetsbar(),n={target:t,animation:!1,showOn:"never"},this.cellContextMenu=new e.spreadsheet.ContextMenu(t.find(u+o.cellContextMenu),n),this.colHeaderContextMenu=new e.spreadsheet.ContextMenu(t.find(u+o.colHeaderContextMenu),n),this.rowHeaderContextMenu=new e.spreadsheet.ContextMenu(t.find(u+o.rowHeaderContextMenu),n)},enableClipboard:function(e){this.isClipboardDeactivated=!e,e?this.clipboard.attr("contenteditable",e):this.clipboard.removeAttr("contenteditable")},_resize:function(){var t=c(this.formulaBar.element).parents(".k-spreadsheet-action-bar"),i=e._outerHeight,n=this.tabstrip?i(this.tabstrip.element):0,o=t?i(t):0,r=this.sheetsbar?i(this.sheetsbar.element):0;this.wrapper.height(this.element.height()-(n+o+r)),this.tabstrip&&this.tabstrip.quickAccessAdjust()},_chrome:function(){var t,i=c("<div class='k-spreadsheet-action-bar' />").prependTo(this.element),n=c("<div class='k-spreadsheet-name-editor' />").appendTo(i);this.nameEditor=new e.spreadsheet.NameEditor(n,this.options),t=c("<div />").appendTo(i),this.formulaBar=new e.spreadsheet.FormulaBar(t),this.options.toolbar&&this._tabstrip()},_formulaInput:function(){var t=this.element.find(u+b.classNames.cellEditor);this.formulaInput=new e.spreadsheet.FormulaInput(t,{autoScale:!0})},_sheetsbar:function(){if(this.options.sheetsbar){var t=c.extend(!0,{openDialog:this.openDialog.bind(this)},this.options.sheetsbar);this.sheetsbar=new e.spreadsheet.SheetsBar(this.element.find(u+b.classNames.sheetsBar),t)}},_tabstrip:function(){var t,i=this.options.messages.tabs,n=c.extend(!0,{home:!0,insert:!0,data:!0},this.options.toolbar),o=[];this.tabstrip&&(this.tabstrip.destroy(),this.element.children(".k-tabstrip").remove());for(t in n)(n[t]===!0||n[t]instanceof Array)&&o.push({id:t,text:i[t],content:""});this.tabstrip=new e.spreadsheet.TabStrip(c("<div />").prependTo(this.element),{animation:!1,dataTextField:"text",dataContentField:"content",dataSource:o,toolbarOptions:n,view:this}),this.tabstrip.select(0)},_executeCommand:function(e){this._sheet.trigger("commandRequest",e)},workbook:function(e){this._workbook=e,e._view=this,this.nameEditor._workbook=e},sheet:function(e){this._sheet=e},activeCellRectangle:function(){return this.cellRectangle(this._sheet._viewActiveCell())},_rectangle:function(e,t){return e._grid.boundingRectangle(t.toRangeRef())},isColumnResizer:function(e,t,i){return e-=this._sheet._grid._headerWidth,t._grid.columns.frozen||(e+=this.scroller.scrollLeft),i=this._sheet._grid._columns.locate(0,i,function(t){return Math.abs(e-t)<=h/2}),null===i||this._sheet.isHiddenColumn(i)?null:i},isRowResizer:function(e,t,i){return e-=this._sheet._grid._headerHeight,t._grid.rows.frozen||(e+=this.scroller.scrollTop),i=this._sheet._grid._rows.locate(0,i,function(t){return Math.abs(e-t)<=h/2}),null===i||this._sheet.isHiddenRow(i)?null:i},isFilterIcon:function(t,i,n,o){var r=this,s=n._grid,a=s.rows.frozen?0:r.scroller.scrollTop,l=s.columns.frozen?0:r.scroller.scrollLeft;return t-=r._sheet._grid._headerWidth-l,i-=r._sheet._grid._headerHeight-a,e.util.withExit(function(e){r._sheet.forEachFilterHeader(o,function(o){var s=r._rectangle(n,o);n.filterIconRect(s).intersects(t,i)&&e(!0)})})},isAutoFill:function(e,t,i){var n,o=this._sheet.select();return!(o.size>1)&&(e-=this._sheet._grid._headerWidth,t-=this._sheet._grid._headerHeight,i._grid.columns.frozen||(e+=this.scroller.scrollLeft),i._grid.rows.frozen||(t+=this.scroller.scrollTop),n=this._rectangle(i,o),Math.abs(n.right-e)<8&&Math.abs(n.bottom-t)<8)},isEditButton:function(e,t,i){var n,o=this._sheet.activeCellCustomEditor();if(o&&(n=this.activeCellRectangle(),t>=n.top&&t<=n.bottom))return i._editorInLastColumn?e<n.left&&e>=n.left-20:e>n.right&&e<=n.right+20},objectAt:function(e,t){var i,n,o,r,s,a,l,c=this._sheet._grid;return e<0||t<0||e>this.scroller.clientWidth||t>this.scroller.clientHeight?i={type:"outside"}:e<c._headerWidth&&t<c._headerHeight?i={type:"topcorner"}:(n=this.paneAt(e,t),n?(o=n._grid.rows.indexVisible(t,this.scroller.scrollTop),r=n._grid.columns.indexVisible(e,this.scroller.scrollLeft),s="cell",a=new d(o,r),l=this._sheet.selectionInProgress(),this.isAutoFill(e,t,n)?s="autofill":this.isFilterIcon(e,t,n,a)?s="filtericon":!l&&e<c._headerWidth?(s="rowheader",null!==(o=this.isRowResizer(t,n,o))&&(a=new d(o,(-(1/0))),s="rowresizehandle")):!l&&t<c._headerHeight?(s="columnheader",null!==(r=this.isColumnResizer(e,n,r))&&(a=new d((-(1/0)),r),s="columnresizehandle")):this.isEditButton(e,t,n)&&(s="editor"),"cell"==s&&this._sheet.forEachMergedCell(a,function(e){a=e.topLeft}),i={type:s,ref:a}):i={type:"outside"}),i.pane=n,i.x=e,i.y=t,i},paneAt:function(e,t){return this.panes.filter(function(i){var n=i._grid;return l(t,n.top,n.bottom)&&l(e,n.left,n.right)})[0]},containingPane:function(e){return this.panes.filter(function(t){return!!t._grid.contains(e)})[0]},cellRectangle:function(e){var t=this.containingPane(e)._grid,i=this._sheet._grid.rectangle(e);return i.offset(t.headerWidth-(t.columns.frozen?0:this.scroller.scrollLeft),t.headerHeight-(t.rows.frozen?0:this.scroller.scrollTop))},refresh:function(e){var t,i,n=this._sheet;this.tabstrip&&this.tabstrip.refreshTools(n.range(n.activeCell())),e.sheetSelection&&this.sheetsbar&&this.sheetsbar.renderSheets(this._workbook.sheets(),this._workbook.sheetIndex(this._sheet)),this._resize(),this.viewSize[0].style.height=n._grid.totalHeight()+"px",this.viewSize[0].style.width=n._grid.totalWidth()+"px",e.layout&&(t=n.frozenColumns(),i=n.frozenRows(),this.panes=[this._pane(i,t)],t>0&&this.panes.push(this._pane(i,0,null,t)),i>0&&this.panes.push(this._pane(0,t,i,null)),i>0&&t>0&&this.panes.push(this._pane(0,0,i,t))),e.filter&&this._destroyFilterMenu(),e.activeCell&&(this._focus=n.activeCell().toRangeRef())},createFilterMenu:function(t){var i,n,o,r,s,a;return this._filterMenu&&this._filterMenu.options.column==t?this._filterMenu:(this._destroyFilterMenu(),i=this._sheet,n=i.filter().ref,o=new e.spreadsheet.Range(n,i),r=c("<div />").appendTo(this.element),s={column:t,range:o},a=new e.spreadsheet.FilterMenu(r,s),this._filterMenu=a,a)},selectClipBoardContents:function(){this.isClipboardDeactivated||(this.clipboard.focus(),t(this.clipboard[0]))},scrollIntoView:function(e){var t=!1,i=this.containingPane(e)._grid,n=i.scrollBoundaries(e),o=this.scroller,r=i.rows.frozen?0:o.scrollTop,s=i.columns.frozen?0:o.scrollLeft;return n.top<r&&(t=!0,o.scrollTop=n.scrollTop),n.bottom>r&&(t=!0,o.scrollTop=n.scrollBottom),n.left<s&&(t=!0,o.scrollLeft=n.scrollLeft),n.right>s&&(t=!0,o.scrollLeft=n.scrollRight),t},_destroyDialog:function(){this._dialogs.pop()},openCustomEditor:function(){var e=this,t=e._sheet.activeCell().first(),i=e._sheet.activeCellCustomEditor(),n=e._sheet.range(t);i.edit({range:n,rect:e.activeCellRectangle(),view:this,validation:this._sheet.validation(t),callback:function(t,i){e._executeCommand({command:"EditCommand",options:{operatingRange:n,property:i?"input":"value",value:t}})}})},openDialog:function(t,i){var n,o,r,s=e.spreadsheet.dialogs.create(t,i);if(s)return s.bind("action",this._executeCommand.bind(this)),s.bind("deactivate",this._destroyDialog.bind(this)),this._dialogs.push(s),n=this._sheet,o=n.activeCell(),r=new e.spreadsheet.Range(o,n),s.open(r),s},showError:function(t,i){var n,o=this.options.messages.errors,r=function(t){var i=t.sender.dialog().element;i.find(".k-button:first").focus(),i.find(".k-button, input").on("keydown",function(i){i.keyCode==e.keys.ESC&&t.sender.close()})},s=function(e){var t=e.sender;this.selectClipBoardContents(),t._retry&&i&&i()}.bind(this);e.spreadsheet.dialogs.registered(t.type)?(n={close:s},"validationError"===t.type&&(n=c.extend(n,{title:t.title||"Error",text:t.body?t.body:o[t.type],activate:r})),this.openDialog(t.type,n)):this.openDialog("message",{title:t.title||"Error",text:t.body?t.body:o[t.type],activate:r,close:s})},destroy:function(){this._dialogs.forEach(function(e){e.destroy()}),this.cellContextMenu.destroy(),this.rowHeaderContextMenu.destroy(),this.colHeaderContextMenu.destroy(),this.tabstrip&&this.tabstrip.destroy(),this._destroyFilterMenu()},_destroyFilterMenu:function(){this._filterMenu&&(this._filterMenu.destroy(),this._filterMenu=void 0,this._filterMenuColumn=void 0)},render:function(){var t,i,n,o,r,s,a,l,d;this.element.is(":visible")&&(t=this._sheet,
i=t.focus(),i&&this.scrollIntoView(i)||(n=t.resizingInProgress()?t.resizeHandlePosition().col===-(1/0)?"column":"row":"none",this.wrapper.toggleClass(p.editContainer,this.editor.isActive()).toggleClass(p.horizontalResize,"row"==n).toggleClass(p.verticalResize,"column"==n),o=t._grid,r=this.scroller.scrollTop,s=this.scroller.scrollLeft,r<0&&(r=0),s<0&&(s=0),a=this.panes.map(function(e){return e.render(s,r)}),l=e.dom.element("div",{style:{width:o._headerWidth+"px",height:o._headerHeight+"px"},className:b.classNames.topCorner}),a.push(l),t.resizeHandlePosition()&&t.resizeHintPosition()&&a.push(this.renderResizeHint()),this.tree.render(a),d=e.support.scrollbar(),c(this.container).css({width:this.wrapper[0].clientWidth-d,height:this.wrapper[0].clientHeight-d}),this.editor.isActive()?this.editor.toggleTooltip(this.activeCellRectangle()):t.selectionInProgress()||t.resizingInProgress()||t.isInEditMode()||this.renderClipboardContents()))},renderResizeHint:function(){var t,i,n=this._sheet,o=n.resizeHandlePosition(),r=o.col!==-(1/0);return t=r?{height:this.scroller.clientHeight+"px",width:h+"px",left:n.resizeHintPosition().x+"px",top:"0px"}:{height:h+"px",width:this.scroller.clientWidth+"px",top:n.resizeHintPosition().y+"px",left:"0px"},i=y.classNames,e.dom.element("div",{className:i.resizeHint+(r?"":" "+i.resizeHintVertical),style:t},[e.dom.element("div",{className:i.resizeHintHandle}),e.dom.element("div",{className:i.resizeHintMarker})])},renderClipboardContents:function(){var e,t,i,n,o,r=this._sheet,s=r._grid,l=s.normalize(r.select().toRangeRef()),c=this._workbook.clipboard().canCopy();return c.canCopy===!1&&c.multiSelection?(this.clipboardContents.render([]),void this.selectClipBoardContents()):(l=r.trim(l),e=new f,t=s.rangeDimensions(l),t.rows.forEach(function(t){e.addRow(t)}),t.columns.forEach(function(t){e.addColumn(t)}),i=r._getMergedCells(l),n=i.primary,o=i.secondary,r.forEach(l,function(t,i,r){var s,c,u=new d(t,i).print();o[u]||(s=a(e,t-l.topLeft.row,r),c=n[u],c&&(s.attr.colspan=c.width(),s.attr.rowspan=c.height()))}),this.clipboardContents.render([e.toDomTree(0,0,"kendo-clipboard-"+this._workbook.clipboard()._uid)]),void this.selectClipBoardContents())},_pane:function(e,t,i,n){var o=new y(this._sheet,this._sheet._grid.pane({row:e,column:t,rowCount:i,columnCount:n}));return o.refresh(this.scroller.clientWidth,this.scroller.clientHeight),o}}),w={cell:"k-spreadsheet-cell",vaxis:"k-spreadsheet-vaxis",haxis:"k-spreadsheet-haxis",vborder:"k-spreadsheet-vborder",hborder:"k-spreadsheet-hborder",rowHeader:"k-spreadsheet-row-header",columnHeader:"k-spreadsheet-column-header",pane:"k-spreadsheet-pane",data:"k-spreadsheet-data",mergedCell:"k-spreadsheet-merged-cell",mergedCellsWrapper:"k-merged-cells-wrapper",activeCell:"k-spreadsheet-active-cell",selection:"k-spreadsheet-selection",selectionWrapper:"k-selection-wrapper",autoFillWrapper:"k-auto-fill-wrapper",single:"k-single",top:"k-top",right:"k-right",bottom:"k-bottom",left:"k-left",resizeHandle:"k-resize-handle",columnResizeHandle:"k-column-resize-handle",rowResizeHandle:"k-row-resize-handle",resizeHint:"k-resize-hint",resizeHintHandle:"k-resize-hint-handle",resizeHintMarker:"k-resize-hint-marker",resizeHintVertical:"k-resize-hint-vertical",selectionHighlight:"k-spreadsheet-selection-highlight",series:["k-series-a","k-series-b","k-series-c","k-series-d","k-series-e","k-series-f"]},y=e.Class.extend({init:function(e,t){this._sheet=e,this._grid=t},refresh:function(e,t){this._grid.refresh(e,t)},isVisible:function(e,t,i){return this._grid.view(e,t).ref.intersects(i)},render:function(t,i){var n,o,r,s,a,l=y.classNames,c=this._sheet,d=this._grid,u=d.view(t,i);return this._currentView=u,this._currentRect=this._rectangle(u.ref),this._selectedHeaders=c.selectedHeaders(),n=[],n.push(this.renderData()),n.push(this.renderSelection()),n.push(this.renderAutoFill()),n.push(this.renderEditorSelection()),n.push(this.renderFilterHeaders()),d.hasRowHeader&&(o=e.dom.element("div",{className:l.rowHeader,style:{width:d.headerWidth+"px",top:u.rowOffset+"px"}}),n.push(o),c.forEach(u.ref.leftColumn(),function(t){if(!c.isHiddenRow(t)){var i=t+1,n=c.rowHeight(t);o.children.push(e.dom.element("div",{className:this.headerClassName(t,"row"),style:{width:d.headerWidth+"px",height:n+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(i+"")])]))}}.bind(this))),d.hasColumnHeader&&(r=e.dom.element("div",{className:l.columnHeader,style:{top:"0px",left:u.columnOffset+"px",width:this._currentRect.width+"px",height:d.headerHeight+"px"}}),n.push(r),s=0,c.forEach(u.ref.topRow(),function(t,i){if(!c.isHiddenColumn(i)){var n=e.spreadsheet.Ref.display(null,1/0,i),o=c.columnWidth(i);r.children.push(e.dom.element("div",{className:this.headerClassName(i,"col"),style:{position:"absolute",left:s+"px",width:o+"px",height:d.headerHeight+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(n+"")])])),s+=o}}.bind(this))),c.resizeHandlePosition()&&(d.hasColumnHeader||d.hasRowHeader)&&(c.resizeHintPosition()||this.renderResizeHandle(n)),a=[l.pane],d.hasColumnHeader&&a.push(l.top),d.hasRowHeader&&a.push(l.left),e.dom.element("div",{style:d.style,className:a.join(" ")},n)},headerClassName:function(e,t){var i,n,o,r=this._selectedHeaders;return"row"===t?(i=r.rows[e],n=r.allRows):(i=r.cols[e],n=r.allCols),o=i||(r.all?"full":n?"partial":"none"),o&&(o="k-selection-"+o),o},renderData:function(){var t,i,n,o,r=this._sheet,a=this._currentView,l=e.dom.element("div",{className:y.classNames.data,style:{position:"relative",left:a.columnOffset+"px",top:a.rowOffset+"px"}}),c=this._currentRect,d=e.spreadsheet.draw.doLayout(r,a.ref,{forScreen:!0}),u=r._showGridLines;return u&&(t=null,d.xCoords.forEach(function(i){i!==t&&(t=i,l.children.push(e.dom.element("div",{className:w.vaxis,style:{left:i+"px",height:c.height+"px",borderColor:r.gridLinesColor()}})))}),t=null,d.yCoords.forEach(function(i){i!==t&&(t=i,l.children.push(e.dom.element("div",{className:w.haxis,style:{top:i+"px",width:c.width+"px",borderColor:r.gridLinesColor()}})))})),i=e.spreadsheet.draw.Borders(),n=r.activeCell().toRangeRef(),o=n.topLeft,d.cells.forEach(function(e){var t=null;e.row+a.ref.topLeft.row==o.row&&e.col+a.ref.topLeft.col==o.col&&(t=[y.classNames.activeCell].concat(this._activeFormulaColor(),this._directionClasses(n)),r.singleCellSelection()&&t.push(y.classNames.single),t=t.join(" ")),i.add(e),s(l.children,e,t,u)},this),i.vert.forEach(function(t){t.forEach(function(t){if(!t.rendered){t.rendered=!0;var i={left:t.x+"px",top:t.top+"px",height:t.bottom-t.top+1+"px",borderWidth:t.size+"px",borderColor:t.color};1!=t.size&&(i.transform="translateX(-"+(t.size-1)/2+"px)"),l.children.push(e.dom.element("div",{className:w.vborder,style:i}))}})}),i.horiz.forEach(function(t){t.forEach(function(t){if(!t.rendered){t.rendered=!0;var i={top:t.y+"px",left:t.left+"px",width:t.right-t.left+"px",borderWidth:t.size+"px",borderColor:t.color};1!=t.size&&(i.transform="translateY(-"+(t.size-1)/2+"px)"),l.children.push(e.dom.element("div",{className:w.hborder,style:i}))}})}),l},renderResizeHandle:function(t){var i,n=this._sheet,o=n.resizeHandlePosition(),r=this._rectangle(o),s=[y.classNames.resizeHandle];if(o.col!==-(1/0)){if(this._grid.rows._start>0)return;i={height:this._grid.headerHeight+"px",width:h+"px",left:r.right-h/2+"px",top:"0px"},s.push(p.horizontalResize)}else{if(this._grid.columns._start>0)return;i={height:h+"px",width:this._grid.headerWidth+"px",top:r.bottom-h/2+"px",left:"0px"},s.push(p.verticalResize)}t.push(e.dom.element("div",{className:s.join(" "),style:i}))},filterIconRect:function(t){var i=16,n=3;return new e.spreadsheet.Rectangle(t.right-i-n,t.top+n,i,i)},renderFilterHeaders:function(){function t(t){return e.dom.element("span",{className:r.icon+" "+t})}function i(i,n,o){var r,a={left:n.left+"px",top:n.top+"px"},l=s&&s.columns.some(function(e){return e.index===o}),c=i.filterButton;return l&&(c+=" "+i.filterButtonActive),r=e.dom.element("span",{className:c,style:a},[t(i.iconFilterDefault)])}var n=this._sheet,o=[],r=b.classNames,s=n.filter();return s&&this._addDiv(o,s.ref,r.filterRange),n.forEachFilterHeader(this._currentView.ref,function(e){var t=this._rectangle(e),n=this.filterIconRect(t),s=this._sheet.filterColumn(e),a=i(r,n,s);o.push(a)}.bind(this)),e.dom.element("div",{className:r.filterHeadersWrapper},o)},renderEditorSelection:function(){var t=y.classNames,i=this._sheet,n=[];return i._formulaSelections.forEach(function(i){var o=i.ref;o!==e.spreadsheet.NULLREF&&this._addDiv(n,o,t.selectionHighlight+" "+i.colorClass)}.bind(this)),e.dom.element("div",{className:t.selectionWrapper},n)},renderSelection:function(){var t=y.classNames,i=[],n=[t.selection],o=this._sheet,r=o.activeCell().toRangeRef(),s=o.select();return n=n.concat(this._activeFormulaColor()),1===s.size()&&n.push("k-single-selection"),this._sheet.autoFillPunch()&&n.push("k-dim-auto-fill-handle"),s.forEach(function(t){t!==e.spreadsheet.NULLREF&&this._addDiv(i,t,n.join(" "))}.bind(this)),this._renderCustomEditorButton(i,r),e.dom.element("div",{className:t.selectionWrapper},i)},renderAutoFill:function(){var t,i,n,o,r,s,a,l=[];if(this._sheet.autoFillInProgress())if(t=this._sheet.autoFillRef(),i=this._sheet.autoFillPunch(),n=this._sheet._autoFillDirection,this._addDiv(l,t,"k-auto-fill"),i)this._addDiv(l,i,"k-auto-fill-punch");else if(void 0!==n){switch(n){case 0:o=t.bottomRight,r="k-auto-fill-br-hint";break;case 1:o=t.bottomRight,r="k-auto-fill-br-hint";break;case 2:o=new d(t.topLeft.row,t.bottomRight.col),r="k-auto-fill-tr-hint";break;case 3:o=new d(t.bottomRight.row,t.topLeft.col),r="k-auto-fill-bl-hint"}s=e.dom.element("span",{className:"k-tooltip"},[e.dom.text(this._sheet._autoFillHint)]),a=this._addDiv(l,o,r),a&&a.children.push(s)}return e.dom.element("div",{className:y.classNames.autoFillWrapper},l)},_addDiv:function(e,t,i){var n,o=this._currentView;return o.ref.intersects(t)&&(n=this._rectangle(t).resize(1,1).toDiv(i),e.push(n)),n},_renderCustomEditorButton:function(t,i){var n,o=this,r=o._sheet,s=o._currentView,a=o._grid.columns._axis._count,l=r.activeCellCustomEditor();l&&s.ref.intersects(i)&&(n=o._rectangle(i),r.forEach(i.collapse(),function(i,r,s){var c,d,u;s.left=n.left,s.top=n.top,s.width=n.width,s.height=n.height,c="k-button k-spreadsheet-editor-button",d=r==a-1,d&&(c+=" k-spreadsheet-last-column"),o._editorInLastColumn=d,u=e.dom.element("div",{className:c,style:{left:s.left+(d?0:s.width)+"px",top:s.top+"px",height:s.height+"px"}}),l.icon&&u.children.push(e.dom.element("span",{className:"k-icon "+l.icon})),t.push(u)}))},_activeFormulaColor:function(){var e,t=[];return this._sheet.isInEditMode()&&(e=this._sheet._formulaSelections.filter(function(e){return e.active&&"ref"==e.type})[0],e&&t.push(e.colorClass)),t},_directionClasses:function(e){var t=[],i=y.classNames,n=this._currentView.ref;return e.move(0,-1).intersects(n)||t.push(i.left),e.move(-1,0).intersects(n)||t.push(i.top),e.move(0,1).intersects(n)||t.push(i.right),e.move(1,0).intersects(n)||t.push(i.bottom),t},_rectangle:function(e){return this._grid.boundingRectangle(e.toRangeRef()).offset(-this._currentView.mergedCellLeft,-this._currentView.mergedCellTop)}}),e.spreadsheet.View=b,e.spreadsheet.Pane=y,e.spreadsheet.drawCell=s,c.extend(!0,b,{classNames:p}),c.extend(!0,y,{classNames:w}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/customeditors.min",["kendo.core.min","kendo.popup.min","kendo.calendar.min","kendo.listview.min","spreadsheet/sheet.min"],e)}(function(){!function(e){"use strict";var t,i;e.support.browser.msie&&e.support.browser.version<9||(t={},i=e.spreadsheet.registerEditor=function(e,i){t[e]=i},e.spreadsheet.Sheet.prototype.activeCellCustomEditor=function(){var e,i,n,o=this.activeCell().first();if(this.range(o).enable())return e=this.validation(o),i=this._properties.get("editor",this._grid.cellRefIndex(o)),null!=i?n=t[i]:e&&e.showButton&&(i="_validation_"+e.dataType,n=t[i]),"function"==typeof n&&(n=t[i]=n()),n},i("_validation_date",function(){function t(){o||(o=$("<div>").kendoCalendar(),r=$("<div>").kendoPopup(),o.appendTo(r),o=o.getKendoCalendar(),r=r.getKendoPopup(),o.bind("change",function(){r.close();var t=o.value();n.range.format()||n.range.format("yyyy-mm-dd"),n.callback(e.spreadsheet.dateToNumber(t))})),r.setOptions({anchor:n.view.element.find(".k-spreadsheet-editor-button")})}function i(){var i,s,a,l;t(),i=n.range.value(),o.value(null!=i?e.spreadsheet.numberToDate(i):null),s=n.validation,s?(a=e.ui.Calendar.fn.options.min,l=e.ui.Calendar.fn.options.max,/^(?:greaterThan|between)/.test(s.comparerType)&&(a=e.spreadsheet.numberToDate(s.from.value)),"between"==s.comparerType&&(l=e.spreadsheet.numberToDate(s.to.value)),"lessThan"==s.comparerType&&(l=e.spreadsheet.numberToDate(s.from.value)),o.setOptions({disableDates:function(t){var i=s.from?0|s.from.value:0,n=s.to?0|s.to.value:0;return t=0|e.spreadsheet.dateToNumber(t),!e.spreadsheet.validation.validationComparers[s.comparerType](t,i,n)},min:a,max:l})):o.setOptions({disableDates:null,min:null,max:null}),r.open()}var n,o,r;return{edit:function(e){n=e,i()},icon:"k-i-calendar"}}),i("_validation_list",function(){function t(){o||(o=$("<ul class='k-list k-reset'/>").kendoStaticList({template:"#:value#",selectable:!0,autoBind:!1}),r=$("<div>").kendoPopup(),o.appendTo(r),r=r.getKendoPopup(),o=o.getKendoStaticList(),o.bind("change",function(){r.close();var e=o.value()[0];e&&n.callback(e.value)})),r.setOptions({anchor:n.view.element.find(".k-spreadsheet-editor-button")})}function i(){var i,s,a,l;t(),i=n.validation.from.value,s=[],a=function(e){s.push({value:e})},i instanceof e.spreadsheet.calc.runtime.Matrix?i.each(a):(i+"").split(/\s*,\s*/).forEach(a),l=new e.data.DataSource({data:s}),o.setDataSource(l),l.read(),r.open()}var n,o,r;return{edit:function(e){n=e,i()},icon:"k-i-arrow-60-down"}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/grid.min",["kendo.core.min","spreadsheet/references.min"],e)}(function(){!function(e){var t,i,n,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.CellRef,i=e.spreadsheet.RangeRef,n=e.spreadsheet.UnionRef,o=e.Class.extend({init:function(e,t,i,n){this.left=e,this.width=i,this.right=e+i,this.top=t,this.height=n,this.bottom=t+n},offset:function(e,t){return new o(this.left+e,this.top+t,this.width,this.height)},resize:function(e,t){return new o(this.left,this.top,this.width+e,this.height+t)},intersects:function(e,t){return this.left<e&&e<this.left+this.width&&this.top<t&&t<this.top+this.height},toDiv:function(t){return e.dom.element("div",{className:t,style:{width:this.width+"px",height:this.height+"px",top:this.top+"px",left:this.left+"px"}})}}),r=e.Class.extend({init:function(e,t,i,n,o,r){this.rowCount=i,this.columnCount=n,this._columns=t,this._rows=e,this._headerHeight=o,this._headerWidth=r},isAxis:function(e){var t,i;return e=e.toRangeRef(),t=e.topLeft,i=e.bottomRight,0===t.row&&i.row===this.rowCount-1||0===t.col&&i.col===this.columnCount-1},width:function(e,t){return this._columns.sum(e,t)},height:function(e,t){return this._rows.sum(e,t)},totalHeight:function(){return this._rows.total+this._headerHeight},totalWidth:function(){return this._columns.total+this._headerWidth},index:function(e,t){return t*this.rowCount+e},cellRef:function(e){return new t(e%this.rowCount,e/this.rowCount>>0)},rowRef:function(e){return new i(new t(e,0),new t(e,this.columnCount-1))},colRef:function(e){return new i(new t(0,e),new t(this.rowCount-1,e))},cellRefIndex:function(e){return this.index(e.row,e.col)},normalize:function(e){return e instanceof i?new i(this.normalize(e.topLeft),this.normalize(e.bottomRight)).setSheet(e.sheet,e.hasSheet()):e instanceof n?e.map(function(e){return this.normalize(e)},this):(e instanceof t&&(e=e.clone(),e.col=Math.max(0,Math.min(this.columnCount-1,e.col)),e.row=Math.max(0,Math.min(this.rowCount-1,e.row))),e)},rectangle:function(e){var t=this.normalize(e.topLeft),i=this.normalize(e.bottomRight);return new o(this.width(0,t.col-1),this.height(0,t.row-1),this.width(t.col,i.col),this.height(t.row,i.row))},pane:function(t){return new s(new e.spreadsheet.PaneAxis(this._rows,t.row,t.rowCount,this._headerHeight),new e.spreadsheet.PaneAxis(this._columns,t.column,t.columnCount,this._headerWidth),this)},rangeDimensions:function(e){return{rows:this._rows.values.iterator(e.topLeft.row,e.bottomRight.row),columns:this._columns.values.iterator(e.topLeft.col,e.bottomRight.col)}},forEach:function(e,i){var n,o,r=this.normalize(e.topLeft),s=this.normalize(e.bottomRight);for(n=r.col;n<=s.col;n++)for(o=r.row;o<=s.row;o++)i(new t(o,n))},trim:function(e,n){var o,r,s,a,l,c=this.normalize(e.topLeft),d=this.normalize(e.bottomRight),u=c.row,h=c.col;for(o=c.col;o<=d.col;o++)r=this.index(c.row,o),s=this.index(d.row,o),a=n.tree.intersecting(r,s),a.length&&(l=this.cellRef(a[a.length-1].end),u=Math.max(u,l.row),h=o);return new i(e.topLeft,new t(Math.min(u,e.bottomRight.row),h))}}),s=e.Class.extend({init:function(e,t,i){this.rows=e,this.columns=t,this._grid=i,this.headerHeight=e.headerSize,this.headerWidth=t.headerSize,this.hasRowHeader=t.hasHeader,this.hasColumnHeader=e.hasHeader},refresh:function(e,t){var i,n;this.columns.viewSize(e),this.rows.viewSize(t),i=this.columns.paneSegment(),n=this.rows.paneSegment(),this.left=i.offset,this.top=n.offset,this.right=i.offset+i.length,this.bottom=n.offset+n.length,this.style={top:n.offset+"px",left:i.offset+"px",height:n.length+"px",width:i.length+"px"}},view:function(e,n){var o=this.rows.visible(n),r=this.columns.visible(e);return{rows:o,columns:r,rowOffset:o.offset,columnOffset:r.offset,mergedCellLeft:r.start,mergedCellTop:o.start,ref:new i(new t(o.values.start,r.values.start),new t(o.values.end,r.values.end))}},contains:function(e){return this.rows.contains(e.topLeft.row,e.bottomRight.row)&&this.columns.contains(e.topLeft.col,e.bottomRight.col)},index:function(e,t){return this._grid.index(e,t)},boundingRectangle:function(e){return this._grid.rectangle(e)},cellRefIndex:function(e){return this._grid.cellRefIndex(e)},scrollBoundaries:function(e){var t=this.boundingRectangle(e),i={top:Math.max(0,t.top-this.top+(this.hasColumnHeader?0:this.headerHeight)),left:Math.max(0,t.left-this.left+(this.hasRowHeader?0:this.headerWidth)),right:t.right-this.columns._viewSize+this.headerWidth,bottom:t.bottom-this.rows._viewSize+this.headerHeight},n=this.columns.defaultValue/2,o=this.rows.defaultValue/2;return i.scrollTop=i.top-o,i.scrollBottom=i.bottom+o,i.scrollLeft=i.left-n,i.scrollRight=i.right+n,i}}),e.spreadsheet.Grid=r,e.spreadsheet.PaneGrid=s,e.spreadsheet.Rectangle=o)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/axis.min",["kendo.core.min"],e)}(function(){!function(e){var t,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.Class.extend({init:function(t,i){this._value=i,this._count=t,this.values=new e.spreadsheet.RangeList(0,t-1,i),this._hidden=new e.spreadsheet.RangeList(0,t-1,0),this.scrollBarSize=e.support.scrollbar(),this._refresh()},adjust:function(e,t){t<0?(this.values.copy(e-t,this._count-1,e),this._hidden.copy(e-t,this._count-1,e)):(this.values.copy(e,this._count,e+t),this._hidden.copy(e,this._count,e+t),this.values.value(e,e+t-1,this._value),this._hidden.value(e,e+t-1,0)),this._refresh()},toJSON:function(e,t){var i,n,o,r,s,a=[],l=this.values.iterator(0,this._count-1);for(i=0;i<this._count;i++)n=l.at(i),o=this._hidden.value(i,i),(n!==this._value||o)&&(r=t[i],void 0===r&&(r=a.length,s={index:i},s[e]=n,o&&(s.hidden=o),a.push(s),t[i]=r));return a},fromJSON:function(e,t){var i,n,o,r;for(i=0;i<t.length;i++)n=t[i],o=n.index,void 0===o&&(o=i),r=n[e],0===r?(n.hidden&&this.value(o,o,n.hidden),this.hide(o)):this.value(o,o,r)},hide:function(e){if(!this.hidden(e)){var t=this.value(e,e);this._hidden.value(e,e,t),this.value(e,e,0)}},hidden:function(e){return 0!==this._hidden.value(e,e)},includesHidden:function(e,t){return this._hidden.intersecting(e,t).length>1},nextVisible:function(e){for(var t=this._count-1,i=e;++i<=t;)if(!this.hidden(i))return i;return e},nextPage:function(e,t){return this.index(this.sum(0,e-1)+t)},prevPage:function(e,t){return this.index(this.sum(0,e)-t)},firstVisible:function(){var e=this._hidden.first();return 0===e.value?0:e.end+1},lastVisible:function(){var e=this._hidden.last();return 0===e.value?this._count-1:e.start-1},prevVisible:function(e){for(var t=e;--t>=0;)if(!this.hidden(t))return t;return e},unhide:function(e){if(this.hidden(e)){var t=this._hidden.value(e,e);this._hidden.value(e,e,0),this.value(e,e,t)}},value:function(e,t,i){return void 0===i?this.values.iterator(e,t).at(0):(this.values.value(e,t,i),void this._refresh())},sum:function(e,t){var i,n=this.values.iterator(e,t),o=0;for(i=e;i<=t;i++)o+=n.at(i);return o},locate:function(e,t,i){var n,o,r=this.values.iterator(e,t),s=0;for(n=e;n<=t;n++)if(s+=r.at(n),o=i(s))return n;return null},visible:function(e,t){var i,n,o,r,s,a,l=null,c=null,d=!1;return t>=this.total+this.scrollBarSize&&(d=!0),i=this._pixelValues.intersecting(e,t),l=i[0],c=i[i.length-1],l?(n=e-l.start,o=(n/l.value.value>>0)+l.value.start,r=n-(o-l.value.start)*l.value.value,s=t-c.start,a=(s/c.value.value>>0)+c.value.start,a>c.value.end&&(a=c.value.end),d&&(r+=c.value.value-(s-(a-c.value.start)*c.value.value)),r=Math.min(-r,0),{values:this.values.iterator(o,a),offset:r}):{values:this.values.iterator(0,0),offset:0}},index:function(e){for(var t=0,i=this.values.iterator(0,this._count-1),n=i.at(0);n<e&&t<this._count-1;)n+=i.at(++t);return t},indexVisible:function(e){var t=this.index(e);return this.hidden(t)&&(t=this.prevVisible(t)),t},_refresh:function(){var t=0;this._pixelValues=this.values.map(function(i){var n,o=t;return t+=(i.end-i.start+1)*i.value,n=t-1,new e.spreadsheet.ValueRange(o,n,i)}),this.total=t},getState:function(){return{values:this.values.getState(),hidden:this._hidden.getState()}},setState:function(e){this.values.setState(e.values),this._hidden.setState(e.hidden),this._refresh()}}),i=e.Class.extend({init:function(e,t,i,n){this._axis=e,this._start=t,this._count=i,this.hasHeader=0===t,this.headerSize=n,this.defaultValue=e._value,this.frozen=i>0},viewSize:function(e){this._viewSize=e},sum:function(e,t){return this._axis.sum(e,t-1)},start:function(){return this.sum(0,this._start)},size:function(){return this.sum(this._start,this._start+this._count)},index:function(e,t){return this._axis.index(e+(this.frozen?0:t)-this.headerSize)},indexVisible:function(e,t){return this._axis.indexVisible(e+(this.frozen?0:t)-this.headerSize)},paneSegment:function(){var e,t=this.start();return this.hasHeader||(t+=this.headerSize),this.frozen?(e=this.size(),this.hasHeader?e+=this.headerSize:e-=this.headerSize):e=this._viewSize-t,{offset:t,length:e}},visible:function(e){var t,i,n=this.start();return this.frozen?(t=this.size(),this.hasHeader||(t-=this.headerSize)):(t=this._viewSize-n-this.headerSize,n+=e),i=this._axis.visible(n,n+t-1),this.frozen&&(i.offset=0),i.start=n,this.hasHeader&&(i.offset+=this.headerSize,i.start-=this.headerSize),i},contains:function(e,t){return this.frozen?!(e>this._start+this._count)&&!(t<this._start):t>=this._start}}),e.spreadsheet.Axis=t,e.spreadsheet.PaneAxis=i)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/filter.min",["kendo.core.min","kendo.data.min"],e)}(function(){!function(e){function t(e){var t=e.getMonth()+1;return t>=1&&t<=3?1:t>=4&&t<=6?2:t>=7&&t<=9?3:4}function i(t,i){if(t instanceof Date){var n=e.date.today();return n.setFullYear(n.getFullYear()+i),n.getFullYear()===t.getFullYear()}return!1}function n(t,i){if(t instanceof Date){var n=e.date.firstDayOfMonth(e.date.today());return n.setMonth(n.getMonth()+i,1),n.getTime()===e.date.firstDayOfMonth(t).getTime()}return!1}function o(t,i){var n,o;return i instanceof Date&&(n=e.date.dayOfWeek(e.date.getDate(t),1),o=e.date.dayOfWeek(e.date.getDate(i),1),n.getTime()===o.getTime())}if(!(e.support.browser.msie&&e.support.browser.version<9)){var r=e.spreadsheet.Filter=e.Class.extend({prepare:function(){},value:function(e){return e.value},matches:function(){throw Error("The 'matches' method is not implemented.")},toJSON:function(){throw Error("The 'toJSON' method is not implemented.")}});r.create=function(t){var i,n=t.filter;if(!n)throw Error("Filter type not specified.");if(i=e.spreadsheet[n.charAt(0).toUpperCase()+n.substring(1)+"Filter"],!i)throw Error("Filter type not recognized.");return new i(t)},e.spreadsheet.ValueFilter=r.extend({_values:[],_dates:[],_blanks:!1,init:function(e){void 0!==e.values&&(this._values=e.values),void 0!==e.blanks&&(this._blanks=e.blanks),void 0!==e.dates&&(this._dates=e.dates)},value:function(t){var i,n=t.value;return this._dates.length>0&&t.format&&"number"==typeof n&&(i=e.spreadsheet.formatting.type(n,t.format),"date"===i&&(n=e.spreadsheet.numberToDate(n))),n},matches:function(e){return null===e||void 0===e?this._blanks:e instanceof Date?this._dates.some(function(t){return!(t.year!==e.getFullYear()||void 0!==t.month&&t.month!==e.getMonth()||void 0!==t.day&&t.day!==e.getDate()||void 0!==t.hours&&t.hours!==e.getHours()||void 0!==t.minutes&&t.minutes!==e.getMinutes()||void 0!==t.seconds&&t.seconds!==e.getSeconds())}):this._values.indexOf(e)>=0},toJSON:function(){return{filter:"value",blanks:this._blanks,values:this._values.slice(0)}}}),e.spreadsheet.CustomFilter=r.extend({_logic:"and",init:function(t){if(void 0!==t.logic&&(this._logic=t.logic),void 0===t.criteria)throw Error("Must specify criteria.");this._criteria=t.criteria;var i=e.data.Query.filterExpr({logic:this._logic,filters:this._criteria}).expression;this._matches=Function("d","return "+i)},matches:function(e){return null!==e&&this._matches(e)},value:function(t){var i=t.value,n=this._criteria[0].value,o=n instanceof Date?"date":typeof n,r=typeof i;return t.format&&(r=e.spreadsheet.formatting.type(i,t.format)),r!=o?"string"==o&&(t.format&&(i=e.spreadsheet.formatting.text(i,t.format)),i+=""):"date"==r&&(i=e.spreadsheet.numberToDate(i)),i},toJSON:function(){return{filter:"custom",logic:this._logic,criteria:this._criteria}}}),e.spreadsheet.TopFilter=r.extend({init:function(e){this._type=e.type,this._value=e.value,this._values=[]},prepare:function(e){var t,i=e.map(this.value).sort().filter(function(e,t,i){return 0===t||e!==i[t-1]});i.sort("topNumber"===this._type||"topPercent"==this._type?function(e,t){return t-e}:function(e,t){return e-t}),t=this._value,"topPercent"!==this._type&&"bottomPercent"!==this._type||(t=i.length*t/100>>0),this._values=i.slice(0,t)},matches:function(e){return this._values.indexOf(e)>=0},toJSON:function(){return{filter:"top",type:this._type,value:this._value}}}),e.spreadsheet.DynamicFilter=r.extend({init:function(e){if(this._type=e.type,this._predicate=this[e.type],"function"!=typeof this._predicate)throw Error("DynamicFilter type '"+e.type+"' not recognized.")},value:function(t){var i,n=t.value;return t.format&&(i=e.spreadsheet.formatting.type(n,t.format),"date"===i&&(n=e.spreadsheet.numberToDate(n))),n},prepare:function(e){var t,i,n=0,o=0;for(t=0;t<e.length;t++)i=this.value(e[t]),"number"==typeof i&&(n+=i,o++);this._average=o>0?n/o:0},matches:function(e){return this._predicate(e)},aboveAverage:function(t){return t instanceof Date&&(t=e.spreadsheet.dateToNumber(t)),"number"==typeof t&&t>this._average},belowAverage:function(t){return t instanceof Date&&(t=e.spreadsheet.dateToNumber(t)),"number"==typeof t&&t<this._average},tomorrow:function(t){if(t instanceof Date){var i=e.date.addDays(e.date.today(),1);return e.date.getDate(t).getTime()===i.getTime()}return!1},today:function(t){return t instanceof Date&&e.date.isToday(t)},yesterday:function(t){if(t instanceof Date){var i=e.date.addDays(e.date.today(),-1);return e.date.getDate(t).getTime()===i.getTime()}return!1},nextWeek:function(t){return o(e.date.addDays(e.date.today(),7),t)},thisWeek:function(t){return o(e.date.today(),t)},lastWeek:function(t){return o(e.date.addDays(e.date.today(),-7),t)},nextMonth:function(e){return n(e,1)},thisMonth:function(e){return n(e,0)},lastMonth:function(e){return n(e,-1)},nextQuarter:function(i){var n,o;return i instanceof Date&&(n=e.date.today(),o=t(i)-t(n),1===o&&n.getFullYear()===i.getFullYear()||o==-3&&n.getFullYear()+1===i.getFullYear())},thisQuarter:function(i){var n,o;return i instanceof Date&&(n=e.date.today(),o=t(i)-t(n),0===o&&n.getFullYear()===i.getFullYear())},lastQuarter:function(i){var n,o;return i instanceof Date&&(n=e.date.today(),o=t(n)-t(i),1===o&&n.getFullYear()===i.getFullYear()||o==-3&&n.getFullYear()-1===i.getFullYear())},nextYear:function(e){return i(e,1)},thisYear:function(e){return i(e,0)},lastYear:function(e){return i(e,-1)},yearToDate:function(t){if(t instanceof Date){var i=e.date.today();return t.getFullYear()===i.getFullYear()&&t<=i}return!1},toJSON:function(){return{filter:"dynamic",type:this._type}}}),[1,2,3,4].forEach(function(i){e.spreadsheet.DynamicFilter.prototype["quarter"+i]=function(e){return e instanceof Date&&t(e)===i}}),e.cultures["en-US"].calendar.months.names.forEach(function(t,i){e.spreadsheet.DynamicFilter.prototype[t.toLowerCase()]=function(e){return e instanceof Date&&e.getMonth()===i}})}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/sorter.min",["kendo.core.min"],e)}(function(){!function(e){if(!(e.support.browser.msie&&e.support.browser.version<9)){var t=e.Class.extend({init:function(e,t){this._grid=e,this._lists=t},indices:function(e,i,n,o){var r=t.ascendingComparer;return n===!1&&(r=t.descendingComparer),i.sortedIndices(this._grid.cellRefIndex(e.topLeft),this._grid.cellRefIndex(e.bottomRight),r,o)},sortBy:function(e,t,i,n,o){var r,s,a,l,c=this.indices(e.toColumn(t),i,n,o);for(r=e.topLeft.col;r<=e.bottomRight.col;r++)for(s=this._grid.index(e.topLeft.row,r),a=this._grid.index(e.bottomRight.row,r),l=0;l<this._lists.length;l++)s<this._lists[l].lastRangeStart()&&this._lists[l].sort(s,a,c);return c}});t.ascendingComparer=function(t,i){var n,o;if(null===t&&null===i)return 0;if(null===t)return 1;if(null===i)return-1;if(n=typeof t,o=typeof i,"number"===n)return"number"===o?t-i:-1;if("string"===n)switch(o){case"number":return 1;case"string":return t.localeCompare(i);default:return-1}if("boolean"===n)switch(o){case"number":return 1;case"string":return 1;case"boolean":return t-i;default:return-1}if(t instanceof e.spreadsheet.calc.runtime.CalcError)return i instanceof e.spreadsheet.calc.runtime.CalcError?0:1;throw Error("Cannot compare "+t+" and "+i)},t.descendingComparer=function(e,i){return null===e&&null===i?0:null===e?1:null===i?-1:t.ascendingComparer(i,e)},e.spreadsheet.Sorter=t}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/numformat.min",["spreadsheet/calc.min","kendo.dom.min","util/main.min"],e)}(function(){"use strict";function e(e){function t(){var t=e.skip(d);if(t)return t[1].toLowerCase()}function i(){var t,i=e.skip(u);if(i&&(t=parseFloat(i[2]),!isNaN(t)))return{op:i[1],value:t}}function n(){for(var t,i=[],n=null;!e.eof()&&(t=r());)"date"==t.type?n&&/^(el)?time$/.test(n.type)&&"h"==n.part&&"m"==t.part&&t.format<3&&(t.type="time"):/^(el)?time$/.test(t.type)&&"s"==t.part&&n&&"date"==n.type&&"m"==n.part&&n.format<3&&(n.type="time"),/^(?:str|space|fill)$/.test(t.type)||(n=t),i.push(t);return i}function o(t){if("date"!=t.type||"m"==t.part&&t.format<3){var i=e.skip(/^\.(0+)/);i&&(t.fraction=i[1].length,"date"==t.type&&(t.type="time"))}return t}function r(){var t,i;if(i=e.skip(/^([#0?]+)(?:,([#0?]+))+/))return{type:"digit",sep:!0,format:i[1]+i[2],decimal:h};if(i=e.skip(/^[#0?]+/))return{type:"digit",sep:!1,format:i[0],decimal:h};if(i=e.skip(/^(e)([+-])/i))return{type:"exp",ch:i[1],sign:i[2]};if(i=e.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i))return i=i[1].toLowerCase(),o({type:"date",part:i.charAt(0),format:i.length});if(i=e.skip(/^(hh?|ss?)/i))return i=i[1].toLowerCase(),
o({type:"time",part:i.charAt(0),format:i.length});if(i=e.skip(/^\[(hh?|mm?|ss?)\]/i))return i=i[1].toLowerCase(),o({type:"eltime",part:i.charAt(0),format:i.length});if(i=e.skip(/^(a[.]?m[.]?\/p[.]?m[.]?|a\/p)/i))return i=i[1].split("/"),{type:"ampm",am:i[0],pm:i[1]};switch(t=e.next()){case";":return null;case"\\":return{type:"str",value:e.next()};case'"':return{type:"str",value:e.readEscaped(t)};case"@":return{type:"text"};case"_":return{type:"space",value:e.next()};case"*":return{type:"fill",value:e.next()};case".":return e.lookingAt(/^\s*[#0?]/)?(h=!0,{type:"dec"}):{type:"str",value:"."};case"%":return{type:"percent"};case",":return{type:"comma"}}return{type:"str",value:t}}function s(){h=!1;var e=t(),o=i();return!e&&o&&(e=t()),{color:e,cond:o,body:n()}}var a,c,h,p;for(e=l.InputStream(e),a=[],c=!1;!e.eof();)p=s(),a.push(p),p.cond&&(c=!0);return c||(1==a.length?a[0].cond="num":2==a.length?(a[0].cond={op:">=",value:0},a[1].cond={op:"<",value:0}):a.length>=3&&(a[0].cond={op:">",value:0},a[1].cond={op:"<",value:0},a[2].cond={op:"=",value:0},a.length>3&&(a[3].cond="text",a=a.slice(0,4)))),a}function t(e){function t(e){var t="";return e.color&&(t+="["+e.color+"]"),e.cond&&"text"!=e.cond&&"num"!=e.cond&&(t+="["+e.cond.op+e.cond.value+"]"),t+=e.body.map(n).join("")}function i(e,t){return t.fraction&&(e+="."+r("",t.fraction,"0")),e}function n(e){return"digit"==e.type?e.sep?e.format.charAt(0)+","+e.format.substr(1):e.format:"exp"==e.type?e.ch+e.sign:"date"==e.type||"time"==e.type?i(r("",e.format,e.part),e):"eltime"==e.type?i("["+r("",e.format,e.part)+"]",e):"ampm"==e.type?e.am+"/"+e.pm:"str"==e.type?JSON.stringify(e.value):"text"==e.type?"@":"space"==e.type?"_"+e.value:"fill"==e.type?"*"+e.value:"dec"==e.type?".":"percent"==e.type?"%":"comma"==e.type?",":void 0}return e.map(t).join(";")}function i(e,t){e.forEach(function(e){var i,n,o,s,a,l=t;if("text"!=e.cond){for(i=e.body,n=!1,o=i.length;0!==l&&--o>=0;)if(s=i[o],"digit"==s.type){if(s.decimal&&(n=!0,l>0?s.format+=r("",l,"0"):l<0&&(a=s.format.length,s.format=s.format.substr(0,a+l),l+=a-s.format.length),0===s.format.length))for(i.splice(o,1);--o>=0;){if(s=i[o],"digit"==s.type&&s.decimal){++o;break}if("dec"==s.type){i.splice(o,1);break}}if(l>0)break}!n&&l>0&&i.splice(o+1,0,{type:"dec"},{type:"digit",sep:!1,decimal:!0,format:r("",l,"0")})}})}function n(e){var t=0;return{next:function(){return e[t++]},eof:function(){return t>=e.length},ahead:function(i,n){if(t+i<=e.length){var o=n.apply(null,e.slice(t,t+i));return o&&(t+=i),o}},restart:function(){t=0}}}function o(e){function t(e,t){("digit"==e.type&&"comma"==t.type||"comma"==e.type&&e.hidden&&"comma"==t.type)&&(t.hidden=!0,u++)}var i,o,r=n(e.body),s=!1,a=!1,l=!1,c=0,d=/[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/,u=0,h="",p=!1,f=0,m=[],g=[],v=e.cond,_="";for("text"==v?_="if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { ":"num"==v?_="if (typeof value == 'number') { ":v&&(i="="==v.op?"==":v.op,_="if (typeof value == 'number' && value "+i+" "+v.value+") { ",h+="value = Math.abs(value); "),e.color&&(h+="result.color = "+JSON.stringify(e.color)+"; ");!r.eof();)r.ahead(2,t),o=r.next(),"percent"==o.type?c++:"digit"==o.type?o.decimal?(f+=o.format.length,g.push(o.format)):(m.push(o.format),o.sep&&(p=!0)):"time"==o.type?a=!0:"date"==o.type?s=!0:"ampm"==o.type&&(l=a=!0);for(c>0&&(h+="value *= "+Math.pow(100,c)+"; "),u>0&&(h+="value /= "+Math.pow(1e3,u)+"; "),m.length&&(h+="var intPart = runtime.formatInt(culture, value, "+JSON.stringify(m)+", "+f+", "+p+"); ",h+="var isNegative = parseInt(intPart[0]) < 0;"),g.length&&(h+="var decPart = runtime.formatDec(value, "+JSON.stringify(g)+", "+f+"); "),(m.length||g.length)&&(h+="type = 'number'; "),s&&(h+="var date = runtime.unpackDate(value); "),a&&(h+="var time = runtime.unpackTime(value); "),(s||a)&&(h+="type = 'date'; "),(c>0||u>0||m.length||g.length||s||a)&&(_||(_="if (typeof value == 'number') { ")),r.restart(),h+="var matchedCurrency = false;";!r.eof();)o=r.next(),"dec"==o.type?h+="output += culture.numberFormat['.']; ":"comma"!=o.type||o.hidden?"percent"==o.type?(h+="type = 'percent'; ",h+="output += culture.numberFormat.percent.symbol; "):"str"==o.type?(d.test(o.value)&&(h+="type = 'currency'; ",h+="if (isNegative) { output += '-'; matchedCurrency = true; }"),h+="output += "+JSON.stringify(o.value)+"; "):"text"==o.type?(h+="type = 'text'; ",h+="output += value; "):"space"==o.type?(h+="if (output) result.body.push(output); ",h+="output = ''; ",h+="result.body.push({ type: 'space', value: "+JSON.stringify(o.value)+" }); "):"fill"==o.type?h+="output += runtime.fill("+JSON.stringify(o.value)+"); ":"digit"==o.type?(h+="if (isNegative && intPart[0] && matchedCurrency) {intPart[0] = intPart[0].replace('-', '');}",h+="output += "+(o.decimal?"decPart":"intPart")+".shift(); "):"date"==o.type?h+="output += runtime.date(culture, date, "+JSON.stringify(o.part)+", "+o.format+"); ":"time"==o.type?h+="output += runtime.time(time, "+JSON.stringify(o.part)+", "+o.format+", "+l+", "+o.fraction+"); ":"eltime"==o.type?h+="output += runtime.eltime(value, "+JSON.stringify(o.part)+", "+o.format+", "+o.fraction+"); ":"ampm"==o.type&&(h+="output += time.hours < 12 ? "+JSON.stringify(o.am)+" : "+JSON.stringify(o.pm)+"; "):h+="output += ','; ";return h+="if (output) result.body.push(output); ",h+="result.type = type; ",h+="return result; ",_&&(h=_+h+"}"),h}function r(e,t,i){for(e+="";e.length<t;)e=i+e;return e}function s(e){var t,i,n=e.body,o="";for(t=0;t<n.length;++t)i=n[t],"string"==typeof i?o+=i:"space"==i.type&&(o+=" ");return o}var a,l,c,d,u,h,p,f,m;kendo.support.browser.msie&&kendo.support.browser.version<9||(a=kendo.util,l=kendo.spreadsheet.calc,c=kendo.dom,d=/^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i,u=/^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/,h=o({cond:"text",body:[{type:"text"}]}),p=a.memoize(function(t){var i=e(t),n=i.map(o);return n.push(h),n=n.join("\n"),n="'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; "+n+"; return result; };",Function("runtime",n)(m)}),f=a.memoize(function(t){function i(e,t){return t.fraction&&(e+=r("",Math.max(t.fraction,3),"f")),e}function n(e){if("digit"==e.type)return e.sep?e.format.charAt(0)+","+e.format.substr(1):e.format;if("exp"==e.type)return e.ch+e.sign;if("date"==e.type||"time"==e.type){var t=e.part;return"date"==e.type&&/^m/.test(t)?t="M":"time"==e.type&&/^h/.test(t)&&(d||(t=t.toUpperCase())),i(r("",e.format,t),e)}return"ampm"==e.type?"tt":"str"==e.type?e.value:"space"==e.type?" ":"dec"==e.type?".":"percent"==e.type?"%":"comma"==e.type?",":""}var o,s,a,l=e(t),c=!1,d=!1;for(s=0;s<l.length;++s){for(o=l[s],a=0;a<o.body.length;++a)/^(?:date|time|ampm)$/.test(o.body[s].type)&&(c=!0,"ampm"==o.body[s].type&&(d=!0));if(c)break}return c?o.body.map(n).join(""):null}),m={unpackDate:l.runtime.unpackDate,unpackTime:l.runtime.unpackTime,date:function(e,t,i,n){switch(i){case"d":switch(n){case 1:return t.date;case 2:return r(t.date,2,"0");case 3:return e.calendars.standard.days.namesAbbr[t.day];case 4:return e.calendars.standard.days.names[t.day]}break;case"m":switch(n){case 1:return t.month+1;case 2:return r(t.month+1,2,"0");case 3:return e.calendars.standard.months.namesAbbr[t.month];case 4:return e.calendars.standard.months.names[t.month];case 5:return e.calendars.standard.months.names[t.month].charAt(0)}break;case"y":switch(n){case 2:return t.year%100;case 4:return t.year}}return"##"},time:function(e,t,i,n,o){var s,a;switch(t){case"h":s=r(n?e.hours%12||12:e.hours,i,"0"),o&&(a=(e.minutes+(e.seconds+e.milliseconds/1e3)/60)/60);break;case"m":s=r(e.minutes,i,"0"),o&&(a=(e.seconds+e.milliseconds/1e3)/60);break;case"s":s=r(e.seconds,i,"0"),o&&(a=e.milliseconds/1e3)}return a&&(s+=m.toFixed(a,o).replace(/^0+/,"")),s},eltime:function(e,t,i,n){var o,s;switch(t){case"h":o=24*e;break;case"m":o=24*e*60;break;case"s":o=24*e*60*60}return n&&(s=o-(0|o)),o=r(0|o,i,"0"),s&&(o+=m.toFixed(s,n).replace(/^0+/,"")),o},fill:function(e){return e},formatInt:function(e,t,i,n,o){function r(t){o&&l&&l%3===0&&/^[0-9]$/.test(t)&&(c=e.numberFormat[","]+c),c=t+c,l++}var s,a,l,c,d,u,h,p;for(t=m.toFixed(t,n).replace(/\..*$/,""),n>0&&("0"===t?t="":"-0"===t&&(t="-")),s=t.length-1,a=[],l=0,d=i.length;--d>=0;){for(u=i[d],c="",h=u.length;--h>=0;)p=u.charAt(h),s<0?"0"==p?r("0"):"?"==p&&r(" "):(r("0"==t&&"?"==p?" ":t.charAt(s)),s--);if(0===d)for(;s>=0;)r(t.charAt(s--));a.unshift(c)}return a},formatDec:function(e,t,i){var n,o,r,s,a,l,c,d;for(e=m.toFixed(e,i),n=e.indexOf("."),e=n>=0?e.substr(n+1).replace(/0+$/,""):"",o=0,r=[],s=0;s<t.length;++s){for(a=t[s],l="",c=0;c<a.length;++c)d=a.charAt(c),o<e.length?l+=e.charAt(o++):"0"==d?l+="0":"?"==d&&(l+=" ");r.push(l)}return r},toFixed:function(e,t){var i,n,o,r,s,a,l,c,d,u;if(0===t)return Math.round(e)+"";if(i=e+"",n=i.indexOf("."),n>=0){if(o=i.substr(0,n),r=i.substr(n+1),r.length<t){for(;r.length<t;)r+="0";return o+"."+r}return s=/^0*/.exec(r)[0],r.length>14&&(a=Math.pow(10,r.length-14),r=Math.round(+r/a)*a,r=s+r),l=+r.substr(0,t),c=+r.charAt(t),c>=5&&(d=(l+"").length,l++,u=(l+"").length,u>d&&(s?s=s.substr(1):(o++,l=(l+"").substr(1)))),o+"."+s+l}return e.toFixed(t)}},kendo.spreadsheet.formatting={compile:p,parse:e,format:function(e,t,i){var n,o,r,s=p(t)(e,i),a=c.element("span");for(a.__dataType=s.type,n=s.body,s.color&&(a.attr.style={color:s.color}),o=0;o<n.length;++o)r=n[o],"string"==typeof r?a.children.push(c.text(r)):"space"==r.type&&a.children.push(c.element("span",{style:{visibility:"hidden"}},[c.text(r.value)]));return a},text:function(e,t,i){var n=p(t)(e,i);return s(n)},textAndColor:function(e,t,i){var n=p(t)(e,i);return{text:s(n),color:n.color,type:n.type}},type:function(e,t){return p(t)(e).type},adjustDecimals:function(n,o){var r=e(n);return i(r,o),t(r)},makeDateFormat:f})},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/runtime.functions.min",["spreadsheet/runtime.min","util/main.min"],e)}(function(){"use strict";function e(e){return(Math.exp(e)+Math.exp(-e))/2}function t(e){return(Math.exp(e)-Math.exp(-e))/2}function i(i){return t(i)/e(i)}function n(e,t){for(;t;){var i=e%t;e=t,t=i}return e}function o(e,t){return Math.abs(e*t)/n(e,t)}function r(e,t){for(var i,n,o,r=[],s=0,a=e[0];s<e.length;)r.push({matrix:e[s++],pred:G(e[s++])});for(i=0;i<a.height;++i)e:for(n=0;n<a.width;++n){for(s=0;s<r.length;++s)if(o=r[s].matrix.get(i,n),!r[s].pred(null==o||""===o?0:o))continue e;t(i,n)}}function s(e){return e.reduce(function(e,t){return e+t},0)/e.length}function a(e,t,i){return null==i&&(i=s(e)),e.reduce(function(e,t){return e+Math.pow(t-i,2)},0)/t}function l(e,t){return Math.sqrt(a(e,t))}function c(e,t,i){var n=0,o=0,r=null,s=null,a=!1;return e.forEach(function(e){e<t?(n++,r=null==r?e:Math.max(r,e)):e>t?(o++,s=null==s?e:Math.min(s,e)):a=!0}),n||o?a?i?(n+1)/(e.length+1):n/(n+o):((s-t)*c(e,r,i)+(t-r)*c(e,s,i))/(s-r):new A("N/A")}function d(e,t,i){var n,o=0,r=s(e),a=s(t),l=e.length;for(n=0;n<l;++n)o+=(e[n]-r)*(t[n]-a);return o/i}function u(e,t){var i,n,o;return e.sort(w),i=e.length,n=0|t,o=t-n,0===n?e[0]:n>=i?e[i-1]:(--n,e[n]+o*(e[n+1]-e[n]))}function h(e,t){var i=t*(e.length-1)+1;return u(e,i)}function p(e,t){var i=t*(e.length+1);return u(e,i)}function f(e,t,i){var n=[],o=1,r=2,s=4;return function a(t){if(t instanceof F)e.getRefCells(t,!0).forEach(function(e){var t,a=e.value;if(!(i&o&&e.hidden)){if(e.formula){if(t=e.formula.print(e.row,e.col),/^\s*(?:aggregate|subtotal)\s*\(/i.test(t)&&!(i&s))return;"value"in e.formula&&(a=e.formula.value)}i&r&&a instanceof A||("number"==typeof a||a instanceof A)&&n.push(a)}});else if(Array.isArray(t))for(var l=0;l<t.length;++l)a(t[l]);else t instanceof R?t.each(a):"number"==typeof t?n.push(t):t instanceof A&&!(i&r)&&n.push(t)}(t),n}function m(e,t,i,n){var o,r;if(n){for(o=0,r=0;r<=e;++r)o+=U(t,r)*Math.pow(i,r)*Math.pow(1-i,t-r);return o}return U(t,e)*Math.pow(i,e)*Math.pow(1-i,t-e)}function g(e){var t=B(z(e,0,1));return 4==t.day||3==t.day&&S.isLeapYear(e)?53:52}function v(e,t,i){var n=B(e),o=B(t);return i?(31==n.date&&(n.date=30),31==o.date&&(o.date=30)):(1==n.month&&1==o.month&&n.date==P(n.year,1)&&o.date==P(o.year,1)&&(o.date=30),n.date==P(n.year,n.month)?(n.date=30,31==o.date&&(o.date=30)):30==n.date&&31==o.date&&(o.date=30)),360*(o.year-n.year)+30*(o.month-n.month)+(o.date-n.date)}function _(e,t){this.link=e,this.text=t}function b(e){return"number"==typeof e||"boolean"==typeof e||null==e||""===e}function w(e,t){return e===t?0:e<t?-1:1}function y(e,t){return e===t?0:e<t?1:-1}var k,x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G;kendo.support.browser.msie&&kendo.support.browser.version<9||(k=kendo.util,x=kendo.spreadsheet,C=x.calc,S=C.runtime,T=S.defineFunction,D=S.defineAlias,A=S.CalcError,E=x.RangeRef,I=x.CellRef,M=x.UnionRef,R=S.Matrix,F=x.Ref,P=S.daysInMonth,z=S.packDate,B=S.unpackDate,L=S.daysInYear,["abs","cos","sin","acos","asin","tan","atan","exp","sqrt"].forEach(function(e){T(e,Math[e]).args([["*n","number"]])}),T("ln",Math.log).args([["*n","number"]]),T("log",function(e,t){return Math.log(e)/Math.log(t)}).args([["*num","number++"],["*base",["or","number++",["null",10]]],["?",["assert","$base != 1","DIV/0"]]]),T("log10",function(e){return Math.log(e)/Math.log(10)}).args([["*num","number++"]]),T("pi",function(){return Math.PI}).args([]),T("sqrtpi",function(e){return Math.sqrt(e*Math.PI)}).args([["*num","number+"]]),T("degrees",function(e){return 180*e/Math.PI%360}).args([["*radians","number"]]),T("radians",function(e){return Math.PI*e/180}).args([["*degrees","number"]]),T("cosh",e).args([["*num","number"]]),T("acosh",function(e){return Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1))}).args([["*num","number"],["?",["assert","$num >= 1"]]]),T("sinh",t).args([["*num","number"]]),T("asinh",function(e){return Math.log(e+Math.sqrt(e*e+1))}).args([["*num","number"]]),T("sec",function(e){return 1/Math.cos(e)}).args([["*num","number"]]),T("sech",function(t){return 1/e(t)}).args([["*num","number"]]),T("csc",function(e){return 1/Math.sin(e)}).args([["*num","number"]]),T("csch",function(e){return 1/t(e)}).args([["*num","number"]]),T("atan2",function(e,t){return Math.atan(t/e)}).args([["*x","divisor"],["*y","number"]]),T("tanh",i).args([["*num","number"]]),T("atanh",function(e){return Math.log(Math.sqrt(1-e*e)/(1-e))}).args([["*num",["and","number",["(between)",-1,1]]]]),T("cot",function(e){return 1/Math.tan(e)}).args([["*num","divisor"]]),T("coth",function(e){return 1/i(e)}).args([["*num","divisor"]]),T("acot",function(e){return Math.PI/2-Math.atan(e)}).args([["*num","number"]]),T("acoth",function(e){return Math.log((e+1)/(e-1))/2}).args([["*num","number"],["?",["or",["assert","$num < -1"],["assert","$num > 1"]]]]),T("power",function(e,t){return Math.pow(e,t)}).args([["*a","number"],["*b","number"]]),T("mod",function(e,t){return e%t}).args([["*a","number"],["*b","divisor"]]),T("quotient",function(e,t){return Math.floor(e/t)}).args([["*a","number"],["*b","divisor"]]),T("ceiling",function(e,t){return t?t*Math.ceil(e/t):0}).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),T("ceiling.precise",function(e,t){return t=Math.abs(t),t?t*Math.ceil(e/t):0}).args([["*number","number"],["*significance",["or","number",["null",1]]]]),D("iso.ceiling","ceiling.precise"),T("ceiling.math",function(e,t,i){return t&&e?(e<0&&(!i&&t<0||i&&t>0)&&(t=-t),t?t*Math.ceil(e/t):0):0}).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),T("floor",function(e,t){return t?t*Math.floor(e/t):0}).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),T("floor.precise",function(e,t){return t=Math.abs(t),t?t*Math.floor(e/t):0}).args([["*number","number"],["*significance",["or","number",["null",1]]]]),T("floor.math",function(e,t,i){return t&&e?(e<0&&(!i&&t<0||i&&t>0)&&(t=-t),t?t*Math.floor(e/t):0):0}).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),T("int",Math.floor).args([["*number","number"]]),T("mround",function(e,t){return t?t*Math.round(e/t):0}).args([["*number","number"],["*multiple","number"]]),T("round",function(e,t){var i=e<0?-1:1;return i<0&&(e=-e),t=Math.pow(10,t),e*=t,e=Math.round(e),i*e/t}).args([["*number","number"],["*digits","number"]]),T("roundup",function(e,t){return t=Math.pow(10,t),e*=t,e=e<0?Math.floor(e):Math.ceil(e),e/t}).args([["*number","number"],["*digits","number"]]),T("rounddown",function(e,t){return t=Math.pow(10,t),e*=t,e=e<0?Math.ceil(e):Math.floor(e),e/t}).args([["*number","number"],["*digits","number"]]),T("even",function(e){var t=e<0?Math.floor(e):Math.ceil(e);return t%2?t+(t<0?-1:1):t}).args([["*number","number"]]),T("odd",function(e){var t=e<0?Math.floor(e):Math.ceil(e);return t%2?t:t+(t<0?-1:1)}).args([["*number","number"]]),T("sign",function(e){return e<0?-1:e>0?1:0}).args([["*number","number"]]),T("gcd",function(e){var t,i=e[0];for(t=1;t<e.length;++t)i=n(i,e[t]);return i}).args([["numbers",["collect","number"]]]),T("lcm",function(e){var t,i=e[0];for(t=1;t<e.length;++t)i=o(i,e[t]);return i}).args([["numbers",["collect","number"]]]),T("sum",function(e){return e.reduce(function(e,t){return e+t},0)}).args([["numbers",["collect","number"]]]),T("product",function(e){return e.reduce(function(e,t){return e*t},1)}).args([["numbers",["collect","number"]]]),T("sumproduct",function(e,t){var i=0;return e.each(function(e,n,o){var r,s;if("number"==typeof e){for(r=0;r<t.length;++r){if(s=t[r].get(n,o),"number"!=typeof s)return;e*=s}i+=e}}),i}).args([["a1","matrix"],["+",["a2",["and","matrix",["assert","$a2.width == $a1.width"],["assert","$a2.height == $a1.height"]]]]]),T("sumsq",function(e){return e.reduce(function(e,t){return e+t*t},0)}).args([["numbers",["collect","number"]]]),T("sumx2my2",function(e,t){var i=0;return e.each(function(e,n,o){var r=t.get(n,o);"number"==typeof e&&"number"==typeof r&&(i+=e*e-r*r)}),i}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),T("sumx2py2",function(e,t){var i=0;return e.each(function(e,n,o){var r=t.get(n,o);"number"==typeof e&&"number"==typeof r&&(i+=e*e+r*r)}),i}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),T("sumxmy2",function(e,t){var i=0;return e.each(function(e,n,o){var r=t.get(n,o);"number"==typeof e&&"number"==typeof r&&(i+=(e-r)*(e-r))}),i}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),T("seriessum",function(e,t,i,n){var o=0;return n.each(function(n){if("number"!=typeof n)throw new A("VALUE");o+=n*Math.pow(e,t),t+=i}),o}).args([["x","number"],["y","number"],["m","number"],["a","matrix"]]),T("min",function(e){return e.length?Math.min.apply(Math,e):0}).args([["numbers",["collect","number"]]]),T("max",function(e){return e.length?Math.max.apply(Math,e):0}).args([["numbers",["collect","number"]]]),T("counta",function(e){return e.length}).args([["values",["#collect","anyvalue"]]]),T("count",function(e){return e.length}).args([["numbers",["#collect","number"]]]),T("countunique",function(e){var t=0,i=[];return e.forEach(function(e){i.indexOf(e)<0&&(t++,i.push(e))}),t}).args([["values",["#collect","anyvalue"]]]),T("countblank",function(e){function t(e){null!=e&&""!==e||n++}function i(e){var i,n;for(i=0;i<e.length;++i)n=e[i],n instanceof R?n.each(t,!0):t(n)}var n=0;return i(e),n}).args([["+",["args",["or","matrix","anyvalue"]]]]),T("iseven",function(e){return e%2===0}).args([["*number","number"]]),T("isodd",function(e){return e%2!==0}).args([["*number","number"]]),T("n",function(e){return"boolean"==typeof e?e?1:0:"number"==typeof e?e:0}).args([["*value","anyvalue"]]),T("na",function(){return new A("N/A")}).args([]),H=[["m1","matrix"],["c1","anyvalue"],[["m2","matrix"],["c2","anyvalue"]]],T("countifs",function(e,t,i){var n=0;return i.unshift(e,t),r(i,function(){n++}),n}).args(H),N=[["range","matrix"]].concat(H),T("sumifs",function(e,t,i,n){n.unshift(e,b,t,i);var o=0;return r(n,function(t,i){var n=e.get(t,i);n&&(o+=n)}),o}).args(N),T("averageifs",function(e,t,i,n){n.unshift(e,b,t,i);var o=0,s=0;return r(n,function(t,i){var n=e.get(t,i);null!=n&&""!==n||(n=0),o+=n,s++}),s?o/s:new A("DIV/0")}).args(N),T("countif",function(e,t){t=G(t);var i=0;return e.each(function(e){t(e)&&i++}),i}).args([["range","matrix"],["*criteria","anyvalue"]]),O=[["range","matrix"],["*criteria","anyvalue"],["sumRange",["or",["and","matrix",["assert","$sumRange.width == $range.width"],["assert","$sumRange.height == $range.height"]],["null","$range"]]]],T("sumif",function(e,t,i){var n=0;return t=G(t),e.each(function(e,o,r){if(t(e)){var s=i.get(o,r);b(s)&&(n+=s||0)}}),n}).args(O),T("averageif",function(e,t,i){var n=0,o=0;return t=G(t),e.each(function(e,r,s){if(t(e)){var a=i.get(r,s);b(a)&&(n+=a||0,o++)}}),o?n/o:new A("DIV/0")}).args(O),function(e){e("large",function(e,t){return e.sort(y)[t]}),e("small",function(e,t){return e.sort(w)[t]})}(function(e,t){T(e,function(e,i){var n=[],o=e.each(function(e){return e instanceof A?e:void("number"==typeof e&&n.push(e))});return o?o:i>n.length?new A("NUM"):t(n,i-1)}).args([["array","matrix"],["*nth","number++"]])}),T("stdev.s",function(e){return l(e,e.length-1)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),T("stdev.p",function(e){return l(e,e.length)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),T("var.s",function(e){return a(e,e.length-1)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),T("var.p",function(e){return a(e,e.length)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),T("median",function(e){var t=e.length;return e.sort(w),t%2?e[t>>1]:(e[t>>=1]+e[t-1])/2}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),T("mode.sngl",function(e){var t,i,n,o,r,s;for(e.sort(w),t=null,i=0,n=1,o=null,r=0;r<e.length;++r)s=e[r],s!=t?(i=1,t=s):i++,i>n&&(n=i,o=s);return null==o?new A("N/A"):o}).args([["numbers",["collect","number"]]]),T("mode.mult",function(e){var t,i=Object.create(null),n=2,o=[];return e.forEach(function(e){var t=i[e]||0;i[e]=++t,t==n?o.push(e):t>n&&(n=t,o=[e])}),t=new R(this),o.forEach(function(e,i){t.set(i,0,e)}),t}).args([["numbers",["collect","number"]]]),T("geomean",function(e){var t=e.length,i=e.reduce(function(e,t){if(t<0)throw new A("NUM");return e*t},1);return Math.pow(i,1/t)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),T("harmean",function(e){var t=e.length,i=e.reduce(function(e,t){if(!t)throw new A("DIV/0");return e+1/t},0);return t/i}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),T("trimmean",function(e,t){var i,n,o,r=e.length;for(e.sort(w),i=Math.floor(r*t),i%2&&--i,i/=2,n=0,o=i;o<r-i;++o)n+=e[o];return n/(r-2*i)}).args([["numbers",["collect","number",1]],["percent",["and","number",["[between)",0,1]]],["?",["assert","$numbers.length > 0","NUM"]]]),T("frequency",function(e,t){function i(t){for(var i=0;o<e.length&&e[o]>n&&e[o]<=t;)++i,++o;return i}var n,o,r;return e.sort(w),t.sort(w),n=-(1/0),o=0,r=new R(this),t.forEach(function(e,t){var o=i(e);n=e,r.set(t,0,o)}),r.set(r.height,0,e.length-o),r}).args([["data",["collect","number",1]],["bins",["collect","number",1]]]),T("rank.eq",function(e,t,i){t.sort(i?w:y);var n=t.indexOf(e);return n<0?new A("N/A"):n+1}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),D("rank","rank.eq"),T("rank.avg",function(e,t,i){var n,o;if(t.sort(i?w:y),n=t.indexOf(e),n<0)return new A("N/A");for(o=n;t[o]==e;++o);return(n+o+1)/2}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),T("kurt",function(e){var t=e.length,i=s(e),n=a(e,t-1,i),o=Math.sqrt(n),r=e.reduce(function(e,t){return e+Math.pow((t-i)/o,4)},0);return t*(t+1)/((t-1)*(t-2)*(t-3))*r-3*Math.pow(t-1,2)/((t-2)*(t-3))}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 4","NUM"]]]),V=[["array",["collect","number",1]],["x","number"],["significance",["or",["null",3],"integer++"]],["?",["assert","$array.length > 0","NUM"]]],T("percentrank.inc",function(e,t,i){var n=c(e,t,0);return n=n.toFixed(i+1),parseFloat(n.substr(0,n.length-1))}).args(V),T("percentrank.exc",function(e,t,i){var n=c(e,t,1);return n=n.toFixed(i+1),parseFloat(n.substr(0,n.length-1))}).args(V),D("percentrank","percentrank.inc"),T("covariance.p",function(e,t){return d(e,t,e.length)}).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 0","DIV/0"]]]),T("covariance.s",function(e,t){return d(e,t,e.length-1)}).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 1","DIV/0"]]]),D("covar","covariance.p"),W=k.memoize(function(e){for(var t=2,i=1;t<=e;++t)i*=t;return i}),T("fact",W).args([["*n","integer+"]]),T("factdouble",function(e){for(var t=2+(1&e),i=1;t<=e;t+=2)i*=t;return i}).args([["*n","integer+"]]),T("multinomial",function(e){var t=1,i=0;return e.forEach(function(e){if(e<0)throw new A("NUM");i+=e,t*=W(e)}),W(i)/t}).args([["numbers",["collect","number"]]]),U=k.memoize(function(e,t){for(var i=t+1,n=1,o=1,r=1;n<=e-t;++i,++n)o*=i,r*=n;return o/r}),T("combin",U).args([["*n","integer++"],["*k",["and","integer",["[between]",0,"$n"]]]]),T("combina",function(e,t){return U(e+t-1,e-1)}).args([["*n","integer++"],["*k",["and","integer",["[between]",1,"$n"]]]]),T("average",function(e){var t=e.reduce(function(e,t){return e+t},0);return t/e.length}).args([["numbers",["collect","number!"]],["?",["assert","$numbers.length > 0","DIV/0"]]]),T("averagea",function(e){var t=0,i=0;return e.forEach(function(e){"string"!=typeof e&&(t+=e),++i}),i?t/i:new A("DIV/0")}).args([["values",["collect","anyvalue"]]]),T("percentile.inc",h).args([["numbers",["collect","number",1]],["p",["and","number",["[between]",0,1]]]]),T("percentile.exc",p).args([["numbers",["collect","number",1]],["p",["and","number",["(between)",0,1]]]]),T("quartile.inc",function(e,t){return h(e,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),T("quartile.exc",function(e,t){return p(e,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),D("quartile","quartile.inc"),D("percentile","percentile.inc"),q=["AVERAGE","COUNT","COUNTA","MAX","MIN","PRODUCT","STDEV.S","STDEV.P","SUM","VAR.S","VAR.P","MEDIAN","MODE.SNGL","LARGE","SMALL","PERCENTILE.INC","QUARTILE.INC","PERCENTILE.EXC","QUARTILE.EXC"],T("aggregate",function(e,t,i,n){var o=this;o.resolveCells(n,function(){var r,s;if(t>12){if(r=f(o,n[0],i),s=n[1],s instanceof I&&(s=o.getRefData(s)),"number"!=typeof s)return e(new A("VALUE"))}else r=f(o,n,i);o.func(q[t-1],e,r)})}).argsAsync([["funcId",["values",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]],["options",["or",["null",0],["values",0,1,2,3,4,5,6,7]]],["args","rest"]]),T("subtotal",function(e,t){var i,n,o=this,r=t>100;for(r&&(t-=100),i=[],n=2;n<arguments.length;++n)i.push(arguments[n]);o.resolveCells(i,function(){var n=f(o,i,r?1:0);o.func(q[t-1],e,n)})}).argsAsync([["funcId",["values",1,2,3,4,5,6,7,8,9,10,11,101,102,103,104,105,106,107,108,109,110,111]],["+",["ref",["or","ref","#matrix"]]]]),T("avedev",function(e){var t=e.reduce(function(e,t){return e+t},0)/e.length;return e.reduce(function(e,i){return e+Math.abs(i-t)},0)/e.length}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),T("binom.dist",m).args([["successes","integer+"],["trials",["and","integer",["assert","$trials >= $successes"]]],["probability",["and","number",["[between]",0,1]]],["cumulative","logical"]]),D("binomdist","binom.dist"),T("binom.inv",function(e,t,i){for(var n=0;n<=e;++n)if(m(n,e,t,!0)>=i)return n;return new A("N/A")}).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["alpha",["and","number",["[between]",0,1]]]]),D("critbinom","binom.inv"),T("binom.dist.range",function(e,t,i,n){var o,r=0;for(o=i;o<=n;++o)r+=U(e,o)*Math.pow(t,o)*Math.pow(1-t,e-o);return r}).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["successes_min",["and","integer",["[between]",0,"$trials"]]],["successes_max",["or",["and","integer",["[between]","$successes_min","$trials"]],["null","$successes_min"]]]]),T("negbinom.dist",function(e,t,i,n){if(n){for(var o=0;e>=0;)o+=U(e+t-1,e)*Math.pow(i,t)*Math.pow(1-i,e),e--;return o}return U(e+t-1,e)*Math.pow(i,t)*Math.pow(1-i,e)}).args([["number_f","integer+"],["number_s","integer+"],["probability_s",["and","number",["[between]",0,1]]],["cumulative","logical"]]),D("negbinomdist","negbinom.dist"),T("address",function(e,t,i,n,o){var r=new I(e-1,t-1,i-1);return o&&r.setSheet(o,!0),n?r.print(0,0):r.print()}).args([["row","integer++"],["col","integer++"],["abs",["or",["null",1],["values",1,2,3,4]]],["a1",["or",["null",!0],"logical"]],["sheet",["or","null","string"]]]),T("areas",function(e){var t=0;return function i(e){e instanceof I||e instanceof E?t++:e instanceof M&&e.refs.forEach(i)}(e),t}).args([["ref","ref"]]),T("choose",function(e,t){return e>t.length?new A("N/A"):t[e-1]}).args([["*index","integer"],["+",["value","anything"]]]),T("column",function(e){return e?e instanceof I?e.col+1:this.asMatrix(e).mapCol(function(t){return t+e.topLeft.col+1}):this.formula.col+1}).args([["ref",["or","area","null"]]]),T("columns",function(e){return e instanceof F?e.width():e.width}).args([["ref",["or","area","#matrix"]]]),T("formulatext",function(e){var t=this.getRefCells(e)[0];return t.formula?t.formula.print(t.row,t.col):new A("N/A")}).args([["ref","ref"]]),T("hlookup",function(e,t,i,n){var o=null;return t.eachCol(function(i){var r=t.get(0,i);if(n){if(r>e)return!0;o=i}else if(r===e)return o=i,!0}),null==o?new A("N/A"):t.get(i-1,o)}).args([["value","anyvalue"],["range","matrix"],["row","integer++"],["approx",["or","logical",["null",!0]]]]),T("index",function(e,t,i,n,o){var r,s,a,l=this;if(t instanceof M&&(t=t.refs[o-1]),!i&&!n||!t)return e(new A("N/A"));if(t instanceof I&&(t=t.toRangeRef()),t instanceof E){if(i&&n)return n>t.width()||i>t.height()?e(new A("REF")):(r=t.toCell(i-1,n-1),void l.resolveCells([r],function(){e(l.getRefData(r))}));if(!i)return s=t.toColumn(n-1),void l.resolveCells([s],function(){e(l.asMatrix(s))});if(!n)return a=t.toRow(i-1),void l.resolveCells([a],function(){e(l.asMatrix(a))})}else if(t instanceof R){if(t.width>1&&t.height>1){if(i&&n)return e(t.get(i-1,n-1));if(!i)return e(t.mapRow(function(e){return t.get(e,n-1)}));if(!n)return e(t.mapCol(function(e){return t.get(i-1,e)}))}if(1==t.width)return e(t.get(i-1,0));if(1==t.height)return e(t.get(0,n-1))}else e(new A("REF"))}).argsAsync([["range",["or","ref","matrix"]],["row",["or","integer+","null"]],["col",["or","integer+","null"]],["areanum",["or","integer++",["null",1]]]]),T("indirect",function(e){var t,i;try{if(t=this.formula,i=C.parseFormula(t.sheet,t.row,t.col,e),!(i.ast instanceof F))throw 1;return i.ast.absolute(t.row,t.col)}catch(n){return new A("REF")}}).args([["thing","string"]]),T("match",function(e,t,i){var n,o=1;return 0===i?n=G(e):i===-1?n=G("<="+e):1===i&&(n=G(">="+e)),t.each(function(t){return null!=t&&n(t)?(0!==i&&e!=t&&--o,!0):void o++},!0)&&o>0?o:new A("N/A")}).args([["value","anyvalue"],["range","matrix"],["type",["or",["values",-1,0,1],["null",1]]]]),T("offset",function(e,t,i,n,o){var r=(e instanceof I?e:e.topLeft).clone();return r.row+=t,r.col+=i,r.row<0||r.col<0?new A("VALUE"):n>1||o>1?new E(r,new I(r.row+n-1,r.col+o-1)).setSheet(e.sheet,e.hasSheet()):r;
}).args([["ref","area"],["*rows","integer"],["*cols","integer"],["*height",["or","integer++",["null","$ref.height()"]]],["*width",["or","integer++",["null","$ref.width()"]]]]),T("row",function(e){return e?e instanceof I?e.row+1:this.asMatrix(e).mapRow(function(t){return t+e.topLeft.row+1}):this.formula.row+1}).args([["ref",["or","area","null"]]]),T("rows",function(e){return e instanceof F?e.height():e.height}).args([["ref",["or","area","#matrix"]]]),T("vlookup",function(e,t,i,n){var o=null;return"number"!=typeof e&&(n=!1),"string"==typeof e&&(e=e.toLowerCase()),t.eachRow(function(i){var r=t.get(i,0);if(n){if(r>e)return!0;o=i}else if("string"==typeof r&&(r=r.toLowerCase()),r===e)return o=i,!0}),null==o?new A("N/A"):t.get(o,i-1)}).args([["value","anyvalue"],["range","matrix"],["col","integer++"],["approx",["or","logical",["null",!0]]]]),T("date",function(e,t,i){return z(e,t-1,i)}).args([["*year","integer"],["*month","integer"],["*date","integer"]]),T("day",function(e){return B(e).date}).args([["*date","date"]]),T("month",function(e){return B(e).month+1}).args([["*date","date"]]),T("year",function(e){return B(e).year}).args([["*date","date"]]),T("weekday",function(e){return B(e).day+1}).args([["*date","date"]]),T("weeknum",function(e,t){var i,n=z(B(e).year,0,1),o=B(n);return 21==t?(i=3-(o.day+6)%7,i<0&&(i+=7),n+=i,o.date+=i,o.day=4,t=1):t=1==t?0:2==t?1:(t-10)%7,i=o.day-t,i<0&&(i+=7),n-=i,Math.ceil((e+1-n)/7)}).args([["*date","date"],["*type",["or",["null",1],["values",1,2,11,12,13,14,15,16,17,21]]]]),T("isoweeknum",function(e){var t=B(e),i=t.day||7,n=Math.floor((t.ord-i+10)/7);return n<1?g(t.year-1):53==n&&n>g(t.year)?1:n}).args([["*date","date"]]),T("now",function(){return S.dateToSerial(new Date)}).args([]),T("today",function(){return 0|S.dateToSerial(new Date)}).args([]),T("time",function(e,t,i){return S.packTime(e,t,i,0)}).args([["*hours","integer"],["*minutes","integer"],["*seconds","integer"]]),T("hour",function(e){return S.unpackTime(e).hours}).args([["*time","datetime"]]),T("minute",function(e){return S.unpackTime(e).minutes}).args([["*time","datetime"]]),T("second",function(e){return S.unpackTime(e).seconds}).args([["*time","datetime"]]),T("edate",function(e,t){var i=B(e),n=i.month+t,o=i.year+Math.floor(n/12);return n%=12,n<0&&(n+=12),i=Math.min(i.date,P(o,n)),z(o,n,i)}).args([["*start_date","date"],["*months","integer"]]),T("eomonth",function(e,t){var i=B(e),n=i.month+t,o=i.year+Math.floor(n/12);return n%=12,n<0&&(n+=12),i=P(o,n),z(o,n,i)}).args([["*start_date","date"],["*months","integer"]]),T("workday",function(e,t,i){var n,o=t>0?1:-1;for(t=Math.abs(t),n=B(e).day;t>0;)e+=o,n=(n+o)%7,n>0&&n<6&&i.indexOf(e)<0&&--t;return e}).args([["start_date","date"],["days","integer"],["holidays",["collect","date"]]]),T("networkdays",function(e,t,i){var n,o,r;for(e>t&&(n=e,e=t,t=n),o=0,r=B(e).day;e<=t;)r>0&&r<6&&i.indexOf(e)<0&&o++,e++,r=(r+1)%7;return o}).args([["start_date","date"],["end_date","date"],["holidays",["collect","date"]]]),T("days",function(e,t){return t-e}).args([["*start_date","date"],["*end_date","date"]]),S._days_360=v,T("days360",v).args([["*start_date","date"],["*end_date","date"],["*method",["or","logical",["null",!1]]]]),T("yearfrac",function(e,t,i){switch(i){case 0:return v(e,t,!1)/360;case 1:return(t-e)/L(B(e).year);case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return v(e,t,!0)/360}}).args([["*start_date","date"],["*end_date","date"],["*method",["or",["null",0],["values",0,1,2,3,4]]]]),T("datevalue",function(e){var t=S.parseDate(e);return t?S.dateToSerial(t):new A("VALUE")}).args([["*text","string"]]),T("timevalue",function(e){var t,i,n,o,r=e.toLowerCase().match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);return r?(t=parseFloat(r[1]),i=parseFloat(r[2]),n=r[3]?parseFloat(r[4]):0,o=r[7],o&&(t>12||t<1)?new A("VALUE"):(/^p/.test(o)&&(t+=12),S.packTime(t,i,n,0))):new A("VALUE")}).args([["*text","string"]]),T("mdeterm",function(e){var t=e.each(function(e){if("number"!=typeof e)return new A("VALUE")},!0);return t||e.determinant()}).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),T("transpose",function(e){return e.transpose()}).args([["range","matrix"]]),T("mmult",function(e,t){return e.multiply(t)}).args([["a","matrix"],["b",["and","matrix",["assert","$b.height == $a.width"]]]]),T("munit",function(e){return new R(this).unit(e)}).args([["n","integer+"]]),T("minverse",function(e){var t=e.each(function(e){if("number"!=typeof e)return new A("VALUE")},!0);return t||e.inverse()||new A("VALUE")}).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),T("rand",function(){return Math.random()}).args([]),T("randbetween",function(e,t){return e+Math.floor((t-e+1)*Math.random())}).args([["min","integer"],["max",["and","integer",["assert","$max >= $min"]]]]),T("true",function(){return!0}).args([]),T("false",function(){return!0}).args([]),T("roman",function(e){return k.arabicToRoman(e).toUpperCase()}).args([["*number","integer"]]),T("arabic",function(e){var t=k.romanToArabic(e);return null==t?new A("VALUE"):t}).args([["*roman","string"]]),T("base",function(e,t,i){for(var n=e.toString(t).toUpperCase();n.length<i;)n="0"+n;return n}).args([["*number","integer"],["*radix",["and","integer",["[between]",2,36]]],["*minLen",["or","integer+",["null",0]]]]),T("decimal",function(e,t){var i,n,o;for(e=e.toUpperCase(),i=0,n=0;n<e.length;++n){if(o=e.charCodeAt(n),o>=48&&o<=57)o-=48;else{if(!(o>=65&&o<55+t))return new A("VALUE");o-=55}i=i*t+o}return i}).args([["*text","string"],["*radix",["and","integer",["[between]",2,36]]]]),T("char",function(e){return String.fromCharCode(e)}).args([["*code","integer+"]]),j=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,T("clean",function(e){return e.replace(j,"")}).args([["*text","string"]]),T("code",function(e){return e.charAt(0)}).args([["*text","string"]]),D("unichar","char"),D("unicode","code"),T("concatenate",function(e){var t,i="";for(t=0;t<e.length;++t)i+=e[t];return i}).args([["+",["*text","string"]]]),T("dollar",function(e,t){for(var i="$#,##0.DECIMALS;($#,##0.DECIMALS)",n="";t-- >0;)n+="0";return i=i.replace(/DECIMALS/g,n),x.formatting.text(e,i)}).args([["*number","number"],["*decimals",["or","integer++",["null",2]]]]),T("exact",function(e,t){return e===t}).args([["*text1","string"],["*text2","string"]]),T("find",function(e,t,i){var n=t.indexOf(e,i-1);return n<0?new A("VALUE"):n+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),T("fixed",function(e,t,i){var n,o=Math.pow(10,t);if(e=Math.round(e*o)/o,n=i?"0":"#,##0",t>0)for(n+=".";t-- >0;)n+="0";return x.formatting.text(e,n)}).args([["*number","number"],["*decimals",["or","integer",["null",2]]],["*noCommas",["or","boolean",["null",!1]]]]),T("left",function(e,t){return e.substr(0,t)}).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),T("right",function(e,t){return e.substr(-t)}).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),T("len",function(e){return e.length}).args([["*text","string"]]),T("lower",function(e){return e.toLowerCase()}).args([["*text","string"]]),T("upper",function(e){return e.toUpperCase()}).args([["*text","string"]]),T("ltrim",function(e){return e.replace(/^\s+/,"")}).args([["*text","string"]]),T("rtrim",function(e){return e.replace(/\s+$/,"")}).args([["*text","string"]]),T("trim",function(e){return e.replace(/^\s+|\s+$/,"")}).args([["*text","string"]]),T("mid",function(e,t,i){return e.substr(t-1,i)}).args([["*text","string"],["*start","integer++"],["*length","integer+"]]),T("proper",function(e){return e.toLowerCase().replace(/\b./g,function(e){return e.toUpperCase()})}).args([["*text","string"]]),T("replace",function(e,t,i,n){return e.substr(0,--t)+n+e.substr(t+i)}).args([["*text","string"],["*start","integer++"],["*length","integer+"],["*newText","string"]]),T("rept",function(e,t){for(var i="";t-- >0;)i+=e;return i}).args([["*text","string"],["*number","integer+"]]),T("search",function(e,t,i){var n=t.toLowerCase().indexOf(e.toLowerCase(),i-1);return n<0?new A("VALUE"):n+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),T("substitute",function(e,t,i,n){function o(){e=e.substring(0,r)+i+e.substring(r+t.length)}if(t===i)return e;for(var r=-1;(r=e.indexOf(t,r+1))>=0;)if(null==n)o();else if(0===--n){o();break}return e}).args([["*text","string"],["*oldText","string"],["*newText","string"],["*nth",["or","integer++","null"]]]),T("t",function(e){return"string"==typeof e?e:""}).args([["*value","anyvalue"]]),T("text",function(e,t){return x.formatting.text(e,t)}).args([["*value","anyvalue"],["*format","string"]]),T("value",function(e){return"number"==typeof e?e:"boolean"==typeof e?+e:(e=(e+"").replace(/[$€,]/g,""),e=parseFloat(e),isNaN(e)?new A("VALUE"):e)}).args([["*value","anyvalue"]]),_.prototype.toString=function(){return this.text},T("hyperlink",function(e,t){return new _(e,t)}).args([["*link","string"],["*text",["or","string",["null","$link"]]]]),T("iferror",function(e,t){return e instanceof A?t:e}).args([["*value","forced!"],["*value_if_error","anyvalue!"]]),G=function(){function e(e,t){if("string"==typeof t){var i=parseFloat(t);isNaN(i)||i!=t||(t=i)}return function(i){var n=t;return"string"==typeof i&&"string"==typeof n&&(i=i.toLowerCase(),n=n.toLowerCase()),e(i,n)}}function t(e){var t,i;return"string"==typeof e&&(e=e.toLowerCase()),/^[0-9.]+%$/.test(e)?(i=e.substr(0,e.length-1),t=parseFloat(i),isNaN(t)||t!=i||(e=t/100)):/^[0-9.]+$/.test(e)&&(t=parseFloat(e),isNaN(t)||t!=e||(e=t)),e}function i(e,i){return t(e)<t(i)}function n(e,i){return t(e)<=t(i)}function o(e,i){return t(e)>t(i)}function r(e,i){return t(e)>=t(i)}function s(e,t){return!a(e,t)}function a(e,i){return i instanceof RegExp?i.test(e):("string"!=typeof e&&"string"!=typeof i||(e+="",i+=""),t(e)==t(i))}var l=Object.create(null);return function(t){var c,d;return"function"==typeof t?t:(c=/^=(.*)$/.exec(t))?e(a,c[1]):(c=/^<>(.*)$/.exec(t))?e(s,c[1]):(c=/^<=(.*)$/.exec(t))?e(n,c[1]):(c=/^<(.*)$/.exec(t))?e(i,c[1]):(c=/^>=(.*)$/.exec(t))?e(r,c[1]):(c=/^>(.*)$/.exec(t))?e(o,c[1]):/[?*]/.exec(t)?(d=l[t],d||(d=t.replace(/(~\?|~\*|[\]({\+\.\|\^\$\\})\[]|[?*])/g,function(e){switch(e){case"~?":return"\\?";case"~*":return"\\*";case"?":return".";case"*":return".*";default:return"\\"+e}}),d=l[t]=RegExp("^"+d+"$","i")),e(a,d)):e(a,t)}}())},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/runtime.functions.2.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e){var i,n,o,r;if(dt(e)>=3.3)return 1-t(e);for(i=e>0?1:-1,i==-1&&(e=-e),n=0,o=1,r=1;r<100;r++)n+=o,o*=2*e*e/(2*r+1);return 2*i/Math.sqrt(Math.PI)*e*Math.exp(-e*e)*n}function t(t){var i,n,o;if(dt(t)<3.3)return 1-e(t);for(i=1,t<0&&(i=-1,t=-t),n=t,o=8;o>=1;o-=.5)n=t+o/n;return n=1/(t+n),1==i?Math.exp(-t*t)/Math.sqrt(Math.PI)*n:2-Math.exp(-t*t)/Math.sqrt(Math.PI)*n}function i(e){var t,i=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],n=e,o=e+5.5,r=i[0];for(o-=(e+.5)*Math.log(o),t=1;t<=6;t++)n+=1,r+=i[t]/n;return-o+Math.log(Math.sqrt(2*Math.PI)*r/e)}function n(e){if(e>0)return Math.exp(i(e));var t=Math.PI,o=-e;return-t/(o*n(o)*Math.sin(t*o))}function o(e,t){return i(e)+i(t)-i(e+t)}function r(e,t){return Math.exp(o(e,t))}function s(e,t){return t<e+1?a(e,t):1-l(e,t)}function a(e,t){var n,o=1/e,r=o,s=e,a=i(e);for(n=1;n<=at&&(s++,r*=t/s,o+=r,!(dt(r)<dt(o)*lt));n++);return o*Math.exp(-t+e*Math.log(t)-a)}function l(e,t){var n,o,r=ct,s=r,a=0,l=1,c=t+1-e,d=i(e);for(n=1;n<=at&&(a=c+l*a,dt(a)<ct&&(a=ct),s=c+l/s,dt(s)<ct&&(s=ct),a=1/a,o=s*a,r*=o,!(dt(o-1)<lt));n++)c+=2,l=-n*(n-e);return r*Math.exp(-t-d+e*Math.log(t))}function c(e,t,i,o){return o?s(t,e/i):Math.pow(e/i,t-1)*Math.exp(-e/i)/(i*n(t))}function d(e,t,i){var n,o,r,s,a,l;if(0===e)return 0;if(1==e)return 1/0;for(n=0,o=10,r=0,s=t*i,s>1&&(o*=s),a=0;a<at&&(r=.5*(n+o),l=c(r,t,i,!0),!(dt(e-l)<1e-16));a++)l>e?o=r:n=r;return r}function u(t,i){return i?.5+.5*e(t/Math.sqrt(2)):Math.exp(-t*t/2)/Math.sqrt(2*Math.PI)}function h(e){var t,i,n=[-39.69683028665376,220.9460984245205,-275.9285104469687,138.357751867269,-30.66479806614716,2.506628277459239],o=[-54.47609879822406,161.5858368580409,-155.6989798598866,66.80131188771972,-13.28068155288572],r=[-.007784894002430293,-.3223964580411365,-2.400758277161838,-2.549732539343734,4.374664141464968,2.938163982698783],s=[.007784695709041462,.3224671290700398,2.445134137142996,3.754408661907416],a=.02425,l=1-a;return e<a?(t=Math.sqrt(-2*Math.log(e)),(((((r[0]*t+r[1])*t+r[2])*t+r[3])*t+r[4])*t+r[5])/((((s[0]*t+s[1])*t+s[2])*t+s[3])*t+1)):l<e?(t=Math.sqrt(-2*Math.log(1-e)),-(((((r[0]*t+r[1])*t+r[2])*t+r[3])*t+r[4])*t+r[5])/((((s[0]*t+s[1])*t+s[2])*t+s[3])*t+1)):(t=e-.5,i=t*t,(((((n[0]*i+n[1])*i+n[2])*i+n[3])*i+n[4])*i+n[5])*t/(((((o[0]*i+o[1])*i+o[2])*i+o[3])*i+o[4])*i+1))}function p(e,t,i,n){return n?u((e-t)/i,!0):Math.exp(-(e-t)*(e-t)/(2*i*i))/(i*Math.sqrt(2*Math.PI))}function f(e,t,i){return t+i*h(e)}function m(e,t,i){return Math.exp((t-1)*Math.log(e)+(i-1)*Math.log(1-e)-o(t,i))}function g(e,t,i){var n=Math.exp(t*Math.log(e)+i*Math.log(1-e)-o(t,i));return e<(t+1)/(t+i+2)?n*v(t,i,e)/t:1-n*v(i,t,1-e)/i}function v(e,t,i){var n,o,r,s,a,l=e+t,c=e+1,d=e-1,u=1,h=1-l*i/c;for(dt(h)<ct&&(h=ct),h=1/h,a=h,n=1;n<=at&&(o=2*n,r=n*(t-n)*i/((d+o)*(e+o)),h=1+r*h,dt(h)<ct&&(h=ct),u=1+r/u,dt(u)<ct&&(u=ct),h=1/h,a*=h*u,r=-(e+n)*(l+n)*i/((e+o)*(c+o)),h=1+r*h,dt(h)<ct&&(h=ct),u=1+r/u,dt(u)<ct&&(u=ct),h=1/h,s=h*u,a*=s,!(dt(s-1)<lt));n++);return a}function _(e,t,i){var n,o,r=0,s=1,a=0;for(n=0;n<at&&(a=.5*(r+s),o=g(a,t,i),!(dt(e-o)<lt));n++)o>e?s=a:r=a;return a}function b(e,t,i,n,o){return g((e-n)/(o-n),t,i)}function w(e,t,i,n,o,r){return n?g((e-o)/(r-o),t,i):m((e-o)/(r-o),t,i)/(r-o)}function y(e,t,i,n,o){return n+(o-n)*_(e,t,i)}function k(e,t,i){return c(e,t/2,2,i)}function x(e,t){return 1-k(e,t,!0)}function C(e,t){return d(e,t/2,2)}function S(e,t){return C(1-e,t)}function T(e,t){var i,n,o,r,s,a=e.length,l=e[0].length,c=0;for(i=0;i<a;i++)for(n=0;n<l;n++)o=t[i][n],r=e[i][n]-o,r*=r,c+=r/o;return s=(a-1)*(l-1),x(c,s)}function D(e,t,i){return i?1-Math.exp(-t*e):t*Math.exp(-t*e)}function A(e,t,i){var n,o;if(i)return 1-k(2*t,2*(e+1),!0);for(n=0,o=2;o<=e;o++)n+=Math.log(o);return Math.exp(e*Math.log(t)-t-n)}function E(e,t,i,n){if(n)return g(t*e/(i+t*e),t/2,i/2);var o=t/i;return t/=2,i/=2,o/r(t,i)*Math.pow(o*e,t-1)/Math.pow(1+o*e,t+i)}function I(e,t,i){return 1-E(e,t,i,!0)}function M(e,t,i){return i/t*(1/y(e,i/2,t/2,0,1)-1)}function R(e,t,i){return i/t*(1/y(1-e,i/2,t/2,0,1)-1)}function F(e){var t,i=0,n=e.length;for(t=0;t<n;t++)i+=e[t];return i/n}function P(e,t){var i,n,o=0,r=e.length;for(i=0;i<r;i++)n=e[i]-t,o+=n*n;return o/(r-1)}function z(e,t){var i=e.length-1,n=t.length-1,o=P(e,F(e)),r=P(t,F(t));if(!o||!r)throw new et("DIV/0");return 2*E(o/r,i,n,!0)}function B(e){return.5*Math.log((1+e)/(1-e))}function L(e){var t=Math.exp(2*e);return(t-1)/(t+1)}function H(e,t,i){return i?1-.5*g(t/(e*e+t),t/2,.5):1/(Math.sqrt(t)*r(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)}function N(e,t){return 1-H(e,t,!0)}function O(e,t){return e<0&&(e=-e),2*N(e,t)}function V(e,t){var i=_(2*Math.min(e,1-e),t/2,.5);return i=Math.sqrt(t*(1-i)/i),e>.5?i:-i}function W(e,t){return V(1-e/2,t)}function U(e,t,i,n){var o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w=e.length,y=t.length;if(1==n){for(s=0,a=0,l=0;l<w;l++)c=e[l]-t[l],s+=c,a+=c*c;return d=s/w,o=d/Math.sqrt((a-s*d)/(w*(w-1))),1==i?N(o,w-1):O(o,w-1)}return u=F(e),h=F(t),p=P(e,u),f=P(t,h),3==n?(m=p/w,g=f/y,v=m+g,_=m/v,b=g/v,r=1/(_*_/(w-1)+b*b/(y-1)),o=dt(u-h)/Math.sqrt(v),1==i?N(o,r):O(o,r)):(r=w+y-2,o=dt(u-h)*Math.sqrt(r*w*y/((w+y)*((w-1)*p+(y-1)*f))),1==i?N(o,r):O(o,r))}function q(e,t,i){return-V(e/2,i-1)*t/Math.sqrt(i)}function j(e,t,i){return-h(e/2)*t/Math.sqrt(i)}function G(e){return u(e,!0)-.5}function $(e){return u(e)}function K(t,i,n,o){if(o)return.5+.5*e((Math.log(t)-i)/(n*Math.sqrt(2)));var r=Math.log(t)-i;return Math.exp(-r*r/(2*n*n))/(t*n*Math.sqrt(2*Math.PI))}function Y(e,t,i){return Math.exp(f(e,t,i))}function Q(e,t,i,n){var o,r,s,a=e.length,l=0;for(o=0;o<a;o++){if(t[o]<=0||t[o]>1)throw new et("NUM");l+=t[o]}if(1!=l)throw new et("NUM");for(r=0,o=0;o<a;o++)s=e[o],s>=i&&s<=n&&(r+=t[o]);return r}function X(e,t){var i,n,o,r=F(t),s=F(e),a=0,l=0;for(i=0,n=e.length;i<n;i++)o=t[i]-r,a+=o*(e[i]-s),l+=o*o;return a/l}function Z(e,t){var i,n,o,r=F(t),s=F(e),a=0,l=0;for(i=0,n=e.length;i<n;i++)o=t[i]-r,a+=o*(e[i]-s),l+=o*o;return s-a*r/l}function J(e,t){var i,n,o,r,s,a,l,c,d;for(Ye(e,t),i=F(e),n=F(t),o=0,r=0,s=0,a=0,l=e.length;a<l;a++)c=e[a]-i,d=t[a]-n,o+=c*d,r+=c*c,s+=d*d;return o/Math.sqrt(r*s)}function ee(e,t){var i=J(e,t);return i*i}function te(e,t){var i,n,o,r=t.length,s=F(t),a=F(e),l=0,c=0,d=0;for(i=0;i<r;i++)n=t[i]-s,o=e[i]-a,l+=o*o,c+=n*o,d+=n*n;return Math.sqrt((l-c*c/d)/(r-2))}function ie(e,t,i){var n,o,r,s,a,l,c=F(i),d=F(t),u=0,h=0;for(n=0,o=i.length;n<o;n++)r=i[n]-c,s=t[n]-d,u+=r*s,h+=r*r;if(0===h)throw new et("N/A");return a=u/h,l=d-a*c,l+a*e}function ne(e){var t,i=e.height,n=0;for(t=0;t<i;t++)n+=e.data[t][0];return n/i}function oe(e,t){var i,n,o=e.height,r=0;for(i=0;i<o;i++)n=e.data[i][0]-t,r+=n*n;return r}function re(e,t,i,n){var o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k=0;for(t||(t=e.map(function(){return++k})),i&&(t=t.clone(),t.eachRow(function(e){t.data[e].unshift(1)}),++t.width),o=t.transpose(),r=o.multiply(t).inverse().multiply(o).multiply(e),s=[],k=r.height-1;k>=0;k--)s.push(r.data[k][0]);if(i||s.push(0),!n)return this.asMatrix([s]);for(a=t.multiply(r),l=e.adds(a,!0),c=i?ne(a):0,d=oe(a,c),u=i?ne(l):0,h=oe(l,u),p=[],p.push(d,h),f=d/(d+h),m=e.height-t.width,g=Math.sqrt(h/m),v=[],v.push(f,g),_=i?d/(t.width-1)/(h/m):f/t.width/((1-f)/m),b=[],b.push(_,m),w=o.multiply(t).inverse(),y=[],k=w.height-1;k>=0;k--)y.push(Math.sqrt(w.data[k][k]*h/m));return this.asMatrix([s,y,v,b,p])}function se(e,t,i,n){return re.call(this,e.map(Math.log),t,i,n).map(Math.exp)}function ae(e,t,i,n){var o,r,s=0;return t||(t=e.map(function(){return++s})),n&&(t=t.clone(),t.eachRow(function(e){t.data[e].unshift(1)}),++t.width),o=t.transpose(),r=o.multiply(t).inverse().multiply(o).multiply(e),i?n&&(i=i.clone(),i.eachRow(function(e){i.data[e].unshift(1)}),++i.width):i=t,i.multiply(r)}function le(e,t,i,n){return ae.call(this,e.map(Math.log),t,i,n).map(Math.exp)}function ce(e,t,i,n){var o,r,s,a,l,c=i||20,d=n||1e-7,u=t;for(o=1;o<=c;o++)if(r=e(u),s=r[0],a=r[1],l=s/a,u-=l,Math.abs(l)<d)return u;return new et("NUM")}function de(e,t,i,n,o){var r=Math.pow(1+e,t),s=e?(r-1)/e:t;return-(n*r+i*s*(1+e*o))}function ue(e,t,i,n,o){if(!e)return-n-i*t;var r=Math.pow(1+e,t);return-(n+i*(r-1)/e*(1+e*o))/r}function he(e,t,i,n,o){if(!e)return-(n+i)/t;var r=Math.pow(1+e,t);return-e*(n+i*r)/((1+e*o)*(r-1))}function pe(e,t,i,n,o){if(!e)return-(n+i)/t;var r=t*(1+e*o);return Math.log((r-n*e)/(r+i*e))/Math.log(1+e)}function fe(e,t,i,n,o,r){function s(r){var s=Math.pow(1+r,e-1),a=s*(1+r);return[i*a+t*(1/r+o)*(a-1)+n,e*i*s+t*(-(a-1)/(r*r)+(1/r+o)*e*s)]}return ce(s,r)}function me(e,t,i,n,o,r){var s,a;return 1==r&&1==t?0:(s=he(e,i,n,o,r),a=de(e,t-1,s,n,r)*e,r?a/(1+e):a)}function ge(e,t,i,n,o,r){var s=he(e,i,n,o,r);return s-me(e,t,i,n,o,r)}function ve(e,t,i,n,o,r){var s,a,l,c,d,u;return 1==r&&(n--,o--),s=Math.pow(1+e,t),a=Math.pow(1+e,n-1),l=Math.pow(1+e,o),c=e*i*s/(s-1),d=a*i-(a-1)/e*c,u=l*i-(l-1)/e*c,u-d}function _e(e,t,i,n,o,r){var s,a=0;for(s=n;s<=o;s++)a+=me(e,s,t,i,0,r);return a}function be(e,t){var i,n,o=0;for(i=0,n=t.length;i<n;i++)o+=t[i]*Math.pow(1+e,-i-1);return o}function we(e,t){function i(t){var i,n,o=0,r=0;for(i=0,n=e.length;i<n;i++)o+=e[i]*Math.pow(1+t,-i-1),r+=-i*e[i]*Math.pow(1+t,-i-2);return[o,r]}return ce(i,t)}function ye(e,t){return Math.pow(1+e/t,t)-1}function ke(e,t){return t*(Math.pow(e+1,1/t)-1)}function xe(e,t,i){var n,o,r=0;for(n=0,o=t.length;n<o;n++)r+=t[n]*Math.pow(1+e,(i[0]-i[n])/365);return r}function Ce(e,t,i){function n(i){var n,o,r,s=e[0],a=0;for(n=1,o=e.length;n<o;n++)r=(t[0]-t[n])/365,s+=e[n]*Math.pow(1+i,r),a+=r*e[n]*Math.pow(1+i,r-1);return[s,a]}return ce(n,i)}function Se(e,t,i,n){var o=-n*e;return o*(1-t/i)}function Te(e,t,i,n,o){var r,s,a=1-Math.pow(t/e,1/i);if(a=Math.floor(1e3*a+.5)/1e3,r=e*a*o/12,1==n)return r;for(s=1;s<i;s++){if(s==n-1)return(e-r)*a;r+=(e-r)*a}return(e-r)*a*(12-o)/12}function De(e,t,i,n,o){var r=o/i,s=-e*(Math.pow(1-r,n-1)-1),a=(e-s)*r;return a=Math.min(a,Math.max(0,e-s-t))}function Ae(e,t,i){return(e-t)/i}function Ee(e,t,i,n){return(e-t)*(i-n+1)*2/(i*(i+1))}function Ie(e,t,i,n,o,r,s){function a(e,i){var n,o,r;return o=1==p?1==i?e:0:e*Math.pow(1-p,i-1),r=e*Math.pow(1-p,i),n=r<t?o-t:o-r,n<0?0:n}function l(e,i,n){var o,r,s,l=e-t,c=Math.ceil(n),d=0,u=0,h=!1;for(r=1;r<=c;r++)h?o=d:(s=a(e,r),d=l/(i-r+1),d>s?(o=d,h=!0):(o=s,l-=s)),r==c&&(o*=n+1-c),u+=o;return u}var c,d,u,h,p=r>=i?1:r/i,f=Math.floor(n),m=Math.ceil(o),g=0;if(s)for(c=f+1;c<=m;c++)d=a(e,c),c==f+1?d*=Math.min(o,f+1)-n:c==m&&(d*=o+1-m),g+=d;else u=i,n!=Math.floor(n)&&r>1&&n>=i/2&&(h=n-i/2,n=i/2,o-=h,u+=1),e-=l(e,u,n),g=l(e,i-n,o-n);return g}function Me(e,t){var i=it(e),n=i.month+t,o=i.year+Math.floor(n/12);return n%=12,n<0&&(n+=12),i=Math.min(i.date,ot(o,n)),tt(o,n,i)}function Re(e,t,i){return 1==i||2==i||3==i?t-e:rt(e,t,i)}function Fe(e,t,i){var n,o,r,s=it(e),a=it(t),l=a.year-s.year;l>0&&(l=(l-1)*i),r=12/i;do l++,n=Me(t,-l*r);while(e<n);return l--,o=Me(t,-l*r),[n,o]}function Pe(e,t,i){var n,o,r,s=it(t),a=it(e),l=s.year-a.year;for(l>0&&(l=(l-1)*i),n=e,r=12/i;t>n;)o=n,l++,n=Me(e,l*r);return[o,n]}function ze(e,t,i,n){var o=Fe(e,t,i)[0];return Re(o,e,n)}function Be(e,t,i,n){if(1==n){var o=Fe(e,t,i);return Re(o[0],o[1],1)}return 3==n?365/i:360/i}function Le(e,t,i,n){var o=Fe(e,t,i)[1];return Re(e,o,n)}function He(e,t,i){return Fe(e,t,i)[0]}function Ne(e,t,i){return Fe(e,t,i)[1]}function Oe(e,t,i){var n=it(e),o=it(t),r=12*(o.year-n.year)+o.month-n.month;return 1+(r*i/12|0)}function Ve(e,t){return 3==t?365:1==t?nt(e)?366:365:360}function We(e,t,i,n,o){var r=Ve(it(t).year,o);return i*n*Re(e,t,o)/r}function Ue(e,t,i,n,o,r,s,a){function l(e,t){return(t-e)*r/v|0}var c,d,u,h,p,f,m=0,g=o*n/r,v=s%2===0?360:365;return i<=t?(c=Fe(i,t,r),d=c[0],u=c[1],d<=e?g*Re(e,i,s)/Re(d,u,s):(c=Fe(e,d,r),h=c[0],p=c[1],f=l(p,i),g*(f+Re(e,p,s)/Re(h,p,s)+(i<u?Re(d,i,s)/Re(d,u,s):0)))):(c=Pe(t,i,r),d=c[0],u=c[1],f=l(t,i),m=u==i?g*f:g*(f+Re(d,i,s)/Re(d,u,s)),a?(c=Fe(e,t,r),d=c[0],u=c[1],f=l(e,t),m+=g*(f+Re(e,u,s)/Re(d,u,s))):m)}function qe(e,t,i,n,o){var r=o%2===0?360:nt(it(e).year)?366:365;return(n-i)/n*r/Re(e,t,o)}function je(e,t,i,n,o){var r=o%2===0?360:nt(it(e).year)?366:365;return(n-i)/i*r/Re(e,t,o)}function Ge(e,t,i,n,o){var r=o%2===0?360:nt(it(e).year)?366:365;return i/(1-n*Re(e,t,o)/r)}function $e(e,t,i,n,o,r,s){var a=1+((t-e)*r/(s%2===0?360:365)|0),l=Fe(e,t,r),c=l[0],d=l[1],u=Re(c,e,s),h=Re(e,d,s),p=Re(c,d,s),f=100*i/r,m=n/r,g=h/p;return 1==a?(o+f)/(1+g*m)-u/p*f:o/Math.pow(1+m,a-1+g)+f*Math.pow(1+m,1-a-g)*(Math.pow(1+m,a)-1)/m-u/p*f}function Ke(e,t,i,n,o){var r=Re(e,t,o),s=Ve(it(t).year,o);return n-i*n*r/s}function Ye(e,t){for(var i=e.length;--i>=0;)"number"==typeof e[i]&&"number"==typeof t[i]||(e.splice(i,1),t.splice(i,1))}var Qe,Xe,Ze,Je,et,tt,it,nt,ot,rt,st,at,lt,ct,dt;kendo.support.browser.msie&&kendo.support.browser.version<9||(Qe=kendo.spreadsheet,Xe=Qe.calc,Ze=Xe.runtime,Je=Ze.defineFunction,et=Ze.CalcError,tt=Ze.packDate,it=Ze.unpackDate,nt=Ze.isLeapYear,ot=Ze.daysInMonth,rt=Ze._days_360,Je("ERF",function(t,i){return null==i?e(t):e(i)-e(t)}).args([["lower_limit","number"],["upper_limit",["or","number","null"]]]),Je("ERFC",t).args([["x","number"]]),Je("GAMMALN",i).args([["x","number++"]]),Je("GAMMA",n).args([["x","number"]]),Je("GAMMA.DIST",c).args([["x","number+"],["alpha","number++"],["beta","number++"],["cumulative","logical"]]),Je("GAMMA.INV",d).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"]]),Je("NORM.S.DIST",u).args([["z","number"],["cumulative","logical"]]),Je("NORM.S.INV",h).args([["p",["and","number",["[between]",0,1]]]]),Je("NORM.DIST",p).args([["x","number"],["mean","number"],["stddev","number++"],["cumulative","logical"]]),Je("NORM.INV",f).args([["p",["and","number",["[between]",0,1]]],["mean","number"],["stddev","number++"]]),Je("BETADIST",b).args([["x","number"],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]],["?",["assert","$x >= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),Je("BETA.DIST",w).args([["x","number"],["alpha","number++"],["beta","number++"],["cumulative","logical"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]],["?",["assert","$x >= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),Je("BETA.INV",y).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]]]),Je("CHISQ.DIST",k).args([["x","number+"],["deg_freedom","integer++"],["cumulative","logical"]]),Je("CHISQ.DIST.RT",x).args([["x","number+"],["deg_freedom","integer++"]]),Je("CHISQ.INV",C).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),Je("CHISQ.INV.RT",S).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),Je("CHISQ.TEST",function(e,t){return T(e.data,t.data)}).args([["actual_range","matrix"],["expected_range","matrix"],["?",["assert","$actual_range.width == $expected_range.width"]],["?",["assert","$actual_range.height == $expected_range.height"]]]),Je("EXPON.DIST",D).args([["x","number+"],["lambda","number++"],["cumulative","logical"]]),Je("POISSON.DIST",A).args([["x","integer+"],["mean","number+"],["cumulative","logical"]]),Je("F.DIST",E).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"],["cumulative","logical"]]),Je("F.DIST.RT",I).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Je("F.INV",R).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Je("F.INV.RT",M).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Je("F.TEST",z).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),Je("FISHER",B).args([["x",["and","number",["(between)",-1,1]]]]),Je("FISHERINV",L).args([["y","number"]]),Je("T.DIST",H).args([["x","number"],["deg_freedom","integer++"],["cumulative","logical"]]),Je("T.DIST.RT",N).args([["x","number"],["deg_freedom","integer++"]]),Je("T.DIST.2T",O).args([["x","number+"],["deg_freedom","integer++"]]),Je("T.INV",V).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),Je("T.INV.2T",W).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),Je("T.TEST",U).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["tails",["and","integer",["values",1,2]]],["type",["and","integer",["values",1,2,3]]],["?",["assert","$type != 1 || $array1.length == $array2.length","N/A"]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),Je("CONFIDENCE.T",q).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++",["assert","$size != 1","DIV/0"]]]]),Je("CONFIDENCE.NORM",j).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++"]]]),Je("GAUSS",G).args([["z","number"]]),Je("PHI",$).args([["x","number"]]),Je("LOGNORM.DIST",K).args([["x","number++"],["mean","number"],["standard_dev","number++"],["cumulative","logical"]]),Je("LOGNORM.INV",Y).args([["probability",["and","number",["(between)",0,1]]],["mean","number"],["standard_dev","number++"]]),Je("PROB",Q).args([["x_range",["collect","number",1]],["prob_range",["collect","number",1]],["lower_limit","number"],["upper_limit",["or","number",["null","$lower_limit"]]],["?",["assert","$prob_range.length == $x_range.length","N/A"]]]),Je("SLOPE",X).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),
Je("INTERCEPT",Z).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),Je("PEARSON",J).args([["array1",["collect!","anything",1]],["array2",["collect!","anything",1]],["?",["assert","$array2.length == $array1.length","N/A"]],["?",["assert","$array2.length > 0 && $array1.length > 0","N/A"]]]),Je("RSQ",ee).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]],["?",["assert","$known_x.length != 1 && $known_y.length != 1","N/A"]]]),Je("STEYX",te).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length >= 3 && $known_y.length >= 3","DIV/0"]]]),Je("FORECAST",ie).args([["x","number"],["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),Je("LINEST",re).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),Je("LOGEST",se).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),Je("TREND",ae).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),Je("GROWTH",le).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),Je("FV",de).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["pv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$pmt || $pv"]]]),Je("PV",ue).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Je("PMT",he).args([["rate","number"],["nper","number"],["pmt","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Je("NPER",pe).args([["rate","number"],["pmt","number"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Je("RATE",fe).args([["nper","number"],["pmt",["or","number",["null",0]]],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["guess",["or","number++",["null",.01]]],["?",["assert","$pmt || $fv"]]]),Je("IPMT",me).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$per >= 1 && $per <= $nper"]]]),Je("PPMT",ge).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$per >= 1 && $per <= $nper"]]]),Je("CUMPRINC",ve).args([["rate","number++"],["nper","number++"],["pv","number++"],["start_period","number++"],["end_period","number++"],["type",["or",["values",0,1],["null",0]]],["?",["assert","$end_period >= $start_period","NUM"]]]),Je("CUMIPMT",_e).args([["rate","number++"],["nper","number++"],["pv","number++"],["start_period","number++"],["end_period","number++"],["type",["or",["values",0,1],["null",0]]],["?",["assert","$end_period >= $start_period","NUM"]]]),Je("NPV",be).args([["rate","number"],["values",["collect","number"]],["?",["assert","$values.length > 0","N/A"]]]),Je("IRR",we).args([["values",["collect","number",1]],["guess",["or","number",["null",.1]]]]),Je("EFFECT",ye).args([["nominal_rate","number++"],["npery","integer++"]]),Je("NOMINAL",ke).args([["effect_rate","number++"],["npery","integer++"]]),Je("XNPV",xe).args([["rate","number"],["values",["collect","number",1]],["dates",["collect","date",1]],["?",["assert","$values.length == $dates.length","NUM"]]]),Je("XIRR",Ce).args([["values",["collect","number",1]],["dates",["collect","date",1]],["guess",["or","number",["null",.1]]],["?",["assert","$values.length == $dates.length","NUM"]]]),Je("ISPMT",Se).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["?",["assert","$per >= 1 && $per <= $nper"]]]),Je("DB",Te).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["month",["or","number",["null",12]]]]),Je("DDB",De).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["factor",["or","number",["null",2]]]]),Je("SLN",Ae).args([["cost","number"],["salvage","number"],["life","number++"]]),Je("SYD",Ee).args([["cost","number"],["salvage","number"],["life","number++"],["per","number++"]]),Je("VDB",Ie).args([["cost","number+"],["salvage","number+"],["life","number++"],["start_period","number+"],["end_period","number+"],["factor",["or","number+",["null",2]]],["no_switch",["or","logical",["null",!1]]],["?",["assert","$end_period >= $start_period","NUM"]]]),st=[["settlement","date"],["maturity","date"],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]],Je("COUPDAYBS",ze).args(st),Je("COUPDAYS",Be).args(st),Je("COUPDAYSNC",Le).args(st),Je("COUPPCD",He).args(st),Je("COUPNCD",Ne).args(st),Je("COUPNUM",Oe).args(st),Je("ACCRINTM",We).args([["issue","date"],["settlement","date"],["rate","number++"],["par",["or",["null",1e3],"number++"]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$issue < $settlement","NUM"]]]),Je("ACCRINT",Ue).args([["issue","date"],["first_interest","date"],["settlement","date"],["rate","number++"],["par",["or",["null",1e3],"number++"]],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["calc_method",["or","logical",["null",!0]]],["?",["assert","$issue < $settlement","NUM"]]]),Je("DISC",qe).args([["settlement","date"],["maturity","date"],["pr","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("INTRATE",je).args([["settlement","date"],["maturity","date"],["investment","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("RECEIVED",Ge).args([["settlement","date"],["maturity","date"],["investment","number++"],["discount","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("PRICE",$e).args([["settlement","date"],["maturity","date"],["rate","number++"],["yld","number++"],["redemption","number++"],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("PRICEDISC",Ke).args([["settlement","date"],["maturity","date"],["discount","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),at=300,lt=2.2204e-16,ct=1e-30,dt=Math.abs)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/borderpalette.min",["kendo.core.min","kendo.colorpicker.min","kendo.popup.min"],e)}(function(){!function(e){function t(e){return function(t){return t.preventDefault(),e.apply(this,arguments)}}var i,n,o,r,s,a;e.support.browser.msie&&e.support.browser.version<9||(i=e.jQuery,n=["allBorders","insideBorders","insideHorizontalBorders","insideVerticalBorders","outsideBorders","leftBorder","topBorder","rightBorder","bottomBorder","noBorders"],o=e.spreadsheet.messages.borderPalette={allBorders:"All borders",insideBorders:"Inside borders",insideHorizontalBorders:"Inside horizontal borders",insideVerticalBorders:"Inside vertical borders",outsideBorders:"Outside borders",leftBorder:"Left border",topBorder:"Top border",rightBorder:"Right border",bottomBorder:"Bottom border",noBorders:"No border"},r=e.spreadsheet.messages.colorPicker={reset:"Reset color",customColor:"Custom color...",apply:"Apply",cancel:"Cancel"},s=e.ui.Widget.extend({init:function(i,n){e.ui.Widget.call(this,i,n),this.element=i,this.color=n.color,this._resetButton(),this._colorPalette(),this._customColorPalette(),this._customColorButton(),this.resetButton.on("click",t(this.resetColor.bind(this))),this.customColorButton.on("click",t(this.customColor.bind(this)))},options:{name:"ColorChooser"},events:["change"],destroy:function(){e.unbind(this.dialog.element.find(".k-action-buttons")),this.dialog.destroy(),this.colorPalette.destroy(),this.resetButton.off("click"),this.customColorButton.off("click")},value:function(e){return void 0===e?this.color:(this.color=e,this.customColorButton.find(".k-icon").css("background-color",this.color),this.colorPalette.value(null),this.flatColorPicker.value(this.color),void 0)},_change:function(e){this.color=e,this.trigger("change",{value:e})},_colorPalette:function(){var e=i("<div />",{"class":"k-spreadsheet-color-palette"}),t=this.colorPalette=i("<div />").kendoColorPalette({palette:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],value:this.color,change:function(e){this.customColorButton.find(".k-icon").css("background-color","transparent"),this.flatColorPicker.value(null),this._change(e.value)}.bind(this)}).data("kendoColorPalette");e.append(t.wrapper).appendTo(this.element)},_customColorPalette:function(){var t,n,o=i("<div />",{"class":"k-spreadsheet-window",html:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>"+r.apply+"</button><button class='k-button' data-bind='click: close'>"+r.cancel+"</button></div>"}),s=this.dialog=o.appendTo(document.body).kendoWindow({animation:!1,scrollable:!1,resizable:!1,maximizable:!1,modal:!0,visible:!1,width:268,open:function(){this.center()}}).data("kendoWindow");s.one("activate",function(){this.element.find("[data-role=flatcolorpicker]").data("kendoFlatColorPicker")._hueSlider.resize()}),t=this.flatColorPicker=s.element.children().first().kendoFlatColorPicker().data("kendoFlatColorPicker"),n=e.observable({apply:function(){this.customColorButton.find(".k-icon").css("background-color",t.value()),this.colorPalette.value(null),this._change(t.value()),s.close()}.bind(this),close:function(){t.value(null),s.close()}}),e.bind(s.element.find(".k-action-buttons"),n)},_resetButton:function(){this.resetButton=i("<a class='k-button k-reset-color' href='#'><span class='k-icon k-i-reset-color'></span>"+r.reset+"</a>").appendTo(this.element)},_customColorButton:function(){this.customColorButton=i("<a class='k-button k-custom-color' href='#'><span class='k-icon'></span>"+r.customColor+"</a>").appendTo(this.element)},resetColor:function(){this.colorPalette.value(null),this.flatColorPicker.value(null),this._change(null)},customColor:function(){this.dialog.open()}}),a=e.ui.Widget.extend({init:function(i,n){e.ui.Widget.call(this,i,n),this.element=i,this.color="#000",this.element.addClass("k-spreadsheet-border-palette"),this._borderTypePalette(),this._borderColorPalette(),this.element.on("click",".k-spreadsheet-border-type-palette .k-button",t(this._click.bind(this)))},options:{name:"BorderPalette"},events:["change"],destroy:function(){this.colorChooser.destroy(),this.element.off("click")},_borderTypePalette:function(){var t=o,r=n.map(function(i){return'<a title="'+t[i]+'" aria-label="'+t[i]+'" href="#" data-border-type="'+i+'" class="k-button k-button-icon"><span class="k-icon k-i-'+e.toHyphens(i)+'"></span></a>'}).join(""),s=i("<div />",{"class":"k-spreadsheet-border-type-palette",html:r});s.appendTo(this.element)},_borderColorPalette:function(){var e=i("<div />",{"class":"k-spreadsheet-border-color-palette"});e.appendTo(this.element),this.colorChooser=new s(e,{color:this.color,change:this._colorChange.bind(this)})},_click:function(e){this.type=i(e.currentTarget).data("borderType"),this.trigger("change",{type:this.type,color:this.color})},_colorChange:function(e){this.color=e.value,this.type&&this.trigger("change",{type:this.type,color:this.color})}}),e.spreadsheet.ColorChooser=s,e.spreadsheet.BorderPalette=a)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/toolbar.min",["kendo.toolbar.min","kendo.colorpicker.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.popup.min","spreadsheet/borderpalette.min"],e)}(function(){!function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F,P,z;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,i=e.ui.ToolBar,n=e.spreadsheet.messages.toolbar={addColumnLeft:"Add column left",addColumnRight:"Add column right",addRowAbove:"Add row above",addRowBelow:"Add row below",alignment:"Alignment",alignmentButtons:{justtifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"},backgroundColor:"Background",bold:"Bold",borders:"Borders",copy:"Copy",cut:"Cut",deleteColumn:"Delete column",deleteRow:"Delete row",filter:"Filter",fontFamily:"Font",fontSize:"Font size",format:"Custom format...",formatTypes:{automatic:"Automatic",text:"Text",number:"Number",percent:"Percent",financial:"Financial",currency:"Currency",date:"Date",time:"Time",dateTime:"Date time",duration:"Duration",moreFormats:"More formats..."},formatDecreaseDecimal:"Decrease decimal",formatIncreaseDecimal:"Increase decimal",freeze:"Freeze panes",freezeButtons:{freezePanes:"Freeze panes",freezeRows:"Freeze rows",freezeColumns:"Freeze columns",unfreeze:"Unfreeze panes"},italic:"Italic",merge:"Merge cells",mergeButtons:{mergeCells:"Merge all",mergeHorizontally:"Merge horizontally",mergeVertically:"Merge vertically",unmerge:"Unmerge"},open:"Open...",paste:"Paste",quickAccess:{redo:"Redo",undo:"Undo"},exportAs:"Export...",toggleGridlines:"Toggle gridlines",sort:"Sort",sortButtons:{sortRangeAsc:"Sort range A to Z",sortRangeDesc:"Sort range Z to A"},textColor:"Text Color",textWrap:"Wrap text",underline:"Underline",validation:"Data validation...",hyperlink:"Link"},o={home:["open","exportAs",["cut","copy","paste"],["bold","italic","underline"],"hyperlink","backgroundColor","textColor","borders","fontSize","fontFamily","alignment","textWrap",["formatDecreaseDecimal","formatIncreaseDecimal"],"format","merge","freeze","filter","toggleGridlines"],insert:[["addColumnLeft","addColumnRight","addRowBelow","addRowAbove"],["deleteColumn","deleteRow"]],data:["sort","filter","validation"]},r={open:{type:"open",overflow:"never",iconClass:"file-excel"},exportAs:{type:"exportAsDialog",dialogName:"exportAs",overflow:"never",text:"",iconClass:"file-excel"},bold:{type:"button",command:"PropertyChangeCommand",property:"bold",value:!0,iconClass:"bold",togglable:!0},italic:{type:"button",command:"PropertyChangeCommand",property:"italic",value:!0,iconClass:"italic",togglable:!0},underline:{type:"button",command:"PropertyChangeCommand",property:"underline",value:!0,iconClass:"underline",togglable:!0},formatDecreaseDecimal:{type:"button",command:"AdjustDecimalsCommand",value:-1,iconClass:"decimal-decrease"},formatIncreaseDecimal:{type:"button",command:"AdjustDecimalsCommand",value:1,iconClass:"decimal-increase"},textWrap:{type:"button",command:"TextWrapCommand",property:"wrap",value:!0,iconClass:"text-wrap",togglable:!0},cut:{type:"button",command:"ToolbarCutCommand",iconClass:"cut"},copy:{type:"button",command:"ToolbarCopyCommand",iconClass:"copy"},paste:{type:"button",command:"ToolbarPasteCommand",iconClass:"paste"},separator:{type:"separator"},alignment:{type:"alignment",iconClass:"align-left"},backgroundColor:{type:"colorPicker",property:"background",iconClass:"paint"},textColor:{type:"colorPicker",property:"color",iconClass:"foreground-color"},fontFamily:{type:"fontFamily",property:"fontFamily",iconClass:"font-family"},fontSize:{type:"fontSize",property:"fontSize",iconClass:"font-size"},format:{type:"format",property:"format",iconClass:"custom-format"},filter:{type:"filter",property:"hasFilter",iconClass:"filter"},merge:{type:"merge",iconClass:"cells-merge"},freeze:{type:"freeze",iconClass:"pane-freeze"},borders:{type:"borders",iconClass:"borders-all"},formatCells:{type:"dialog",dialogName:"formatCells",overflow:"never"},hyperlink:{type:"dialog",dialogName:"hyperlink",iconClass:"link-horizontal",overflow:"never",text:""},toggleGridlines:{type:"button",command:"GridLinesChangeCommand",property:"gridLines",value:!0,iconClass:"border-no",togglable:!0},addColumnLeft:{type:"button",command:"AddColumnCommand",value:"left",iconClass:"table-column-insert-left"},addColumnRight:{type:"button",command:"AddColumnCommand",value:"right",iconClass:"table-column-insert-right"},addRowBelow:{type:"button",command:"AddRowCommand",value:"below",iconClass:"table-row-insert-below"},addRowAbove:{type:"button",command:"AddRowCommand",value:"above",iconClass:"table-row-insert-above"},deleteColumn:{type:"button",command:"DeleteColumnCommand",iconClass:"table-column-delete"},deleteRow:{type:"button",command:"DeleteRowCommand",iconClass:"table-row-delete"},sort:{type:"sort",iconClass:"sort-desc"},validation:{type:"dialog",dialogName:"validation",iconClass:"exception",overflow:"never"}},s=i.extend({init:function(e,n){var o,r;n.items=this._expandTools(n.tools||s.prototype.options.tools[n.toolbarName]),i.fn.init.call(this,e,n),o=this._click.bind(this),this.element.addClass("k-spreadsheet-toolbar"),this._addSeparators(this.element),r=this,this.element.on("keydown",function(e){var i;9===e.keyCode&&(i=r._nextTool(e.shiftKey?-1:1),i&&(document.activeElement.blur(),t(i).is(".k-upload-button")&&t(i).addClass("k-state-focused"),t(i).find("input").length?t(i).find("input").focus():i.focus(),e.preventDefault()))}),this.element.on("focusout",function(){t(this).find(".k-toolbar-first-visible").removeClass("k-state-focused")}),this.bind({click:o,toggle:o})},_nextTool:function(e){var i=this,n=i.element.find(".k-widget, .k-button, .k-button-group > a"),o=n.index(t(document.activeElement).closest(".k-widget, .k-button, .k-button-group > a"));if(o>0)return n[o+e]},_addSeparators:function(e){var t=e.children(".k-widget, a.k-button, .k-button-group");t.before("<span class='k-separator' />")},_expandTools:function(e){function i(e){var o=t.isPlainObject(e)?e:r[e]||{},s="k-icon k-i-"+o.iconClass,a=o.type,l={button:{showText:"overflow"},colorPicker:{toolIcon:s,spriteCssClass:s},borders:{spriteCssClass:s},alignment:{spriteCssClass:s},merge:{spriteCssClass:s},freeze:{spriteCssClass:s}},c=t.extend({name:o.name||e,text:n[o.name||e],icon:o.iconClass,attributes:{title:n[o.name||e],"aria-label":n[o.name||e]}},l[a],o);return"splitButton"==a&&(c.menuButtons=c.menuButtons.map(i)),c.attributes["data-tool"]=e,o.property&&(c.attributes["data-property"]=o.property),c}return e.reduce(function(e,n){return e.push(t.isArray(n)?{type:"buttonGroup",buttons:n.map(i)}:i.call(this,n)),e},[])},_click:function(e){var t,i=e.target.attr("data-tool"),n=r[i]||{},o=n.command;o&&(t={command:o,options:{property:n.property||null,value:n.value||null}},"boolean"==typeof t.options.value&&(t.options.value=!!e.checked||null),this.action(t))},events:["click","toggle","open","close","overflowOpen","overflowClose","action","dialog"],options:{name:"SpreadsheetToolBar",resizable:!0,tools:o},action:function(e){this.trigger("action",e)},dialog:function(e){this.trigger("dialog",e)},refresh:function(t){function i(e,t){var i,n=e.toolbar,o=e.overflow,r=n&&n.options.togglable||o&&o.options.togglable;r&&(i=!1,"boolean"==typeof t?i=t:"string"==typeof t&&(i=n.options.value===t),n.toggle(i),o&&o.toggle(i))}function n(e,t){var i=e.toolbar,n=e.overflow;i&&i.update&&i.update(t),n&&n.update&&n.update(t)}var o,r,s,a,l=t,c=this._tools();for(o=0;o<c.length;o++)r=c[o].property,s=c[o].tool,a=e.isFunction(l[r])?l[r]():l,"gridLines"==r&&(a=l.sheet().showGridLines()),"button"===s.type?i(s,a):n(s,a);this.resize()},_tools:function(){return this.element.find("[data-property]").toArray().map(function(e){return e=t(e),{property:e.attr("data-property"),tool:this._getItem(e)}}.bind(this))},destroy:function(){this.element.find("[data-command],.k-button").each(function(){var e=t(this),i=e.data("instance");i&&i.destroy&&i.destroy()}),i.fn.destroy.call(this)}}),e.spreadsheet.ToolBar=s,a=e.toolbar.Item.extend({init:function(e,i){var n=t("<select />").attr("title",e.attributes.title).attr("aria-label",e.attributes.title).kendoDropDownList({height:"auto"}).data("kendoDropDownList");this.dropDownList=n,this.element=n.wrapper,this.options=e,this.toolbar=i,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),n.bind("open",this._open.bind(this)),n.bind("change",this._change.bind(this)),this.element.width(e.width).attr({"data-command":"PropertyChangeCommand","data-property":e.property})},_open:function(){var t,i=this.dropDownList,n=i.list;n.css({whiteSpace:"nowrap",width:"auto"}),t=n.width(),t>0?t+=20:t=i._listWidth,n.css("width",t+e.support.scrollbar()),i._listWidth=t},_change:function(e){var t=this,i=e.sender,n=i.value(),o=i.dataItem(),r=o?o.popup:void 0;r?setTimeout(function(){t.toolbar.dialog({name:r})}):t.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:"null"==n?null:n}})},value:function(e){return void 0===e?this.dropDownList.value():void this.dropDownList.value(e)}}),l=e.toolbar.Item.extend({init:function(e,i){this.element=t("<a href='#' class='k-button k-button-icon'><span class='"+e.spriteCssClass+"'></span><span class='k-icon k-i-arrow-60-down'></span></a>"),this.element.on("click touchend",this.open.bind(this)).attr("data-command",e.command),this.options=e,this.toolbar=i,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this._popup()},destroy:function(){this.popup.destroy()},open:function(e){e.preventDefault(),this.popup.toggle()},_popup:function(){var e=this.element;this.popup=t("<div class='k-spreadsheet-popup' />").appendTo(e).kendoPopup({anchor:e}).data("kendoPopup")}}),e.toolbar.registerComponent("dialog",e.toolbar.ToolBarButton.extend({init:function(t,i){e.toolbar.ToolBarButton.fn.init.call(this,t,i),this._dialogName=t.dialogName,this.element.bind("click touchend",this.open.bind(this)).data("instance",this)},open:function(){this.toolbar.dialog({name:this._dialogName})}})),e.toolbar.registerComponent("exportAsDialog",e.toolbar.Item.extend({init:function(e,i){this._dialogName=e.dialogName,this.toolbar=i,this._title=e.attributes.title,this.element=t("<button type='button' class='k-button k-button-icon'><span class='k-icon k-i-download' /></button>").attr("title",this._title).attr("aria-label",this._title).data("instance",this),this.element.bind("click",this.open.bind(this)).data("instance",this)},open:function(){this.toolbar.dialog({name:this._dialogName})}})),c=e.toolbar.OverflowButton.extend({init:function(t,i){e.toolbar.OverflowButton.fn.init.call(this,t,i),this.element.on("click touchend",this._click.bind(this)),this.message=this.options.text;var n=this.element.data("button");this.element.data(this.options.type,n)},_click:t.noop}),d=l.extend({init:function(t,i){l.fn.init.call(this,t,i),this.popup.element.addClass("k-spreadsheet-colorpicker"),this.colorChooser=new e.spreadsheet.ColorChooser(this.popup.element,{change:this._colorChange.bind(this)}),this.element.attr({"data-property":t.property}),this.element.data({type:"colorPicker",colorPicker:this,instance:this})},destroy:function(){this.colorChooser.destroy(),l.fn.destroy.call(this)},update:function(e){this.value(e)},value:function(e){this.colorChooser.value(e)},_colorChange:function(e){this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:e.sender.value()}}),this.popup.close()}}),u=c.extend({init:function(e,t){e.iconName="text",c.fn.init.call(this,e,t)},_click:function(){this.toolbar.dialog({name:"colorPicker",options:{title:this.options.property,property:this.options.property}})}}),e.toolbar.registerComponent("colorPicker",d,u),h=[8,9,10,11,12,13,14,16,18,20,22,24,26,28,36,48,72],p=12,f=e.toolbar.Item.extend({init:function(e,i){var n=t("<input />").attr("aria-label",e.attributes.title).kendoComboBox({change:this._valueChange.bind(this),clearButton:!1,dataSource:e.fontSizes||h,value:p}).data("kendoComboBox");this.comboBox=n,this.element=n.wrapper,this.options=e,this.toolbar=i,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.element.width(e.width).attr({"data-command":"PropertyChangeCommand","data-property":e.property}),this.element.data({type:"fontSize",fontSize:this})},_valueChange:function(t){this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:e.parseInt(t.sender.value())}})},update:function(t){this.value(e.parseInt(t)||p)},value:function(e){return void 0===e?this.comboBox.value():void this.comboBox.value(e)}}),m=c.extend({_click:function(){this.toolbar.dialog({name:"fontSize",options:{sizes:h,defaultSize:p}})},update:function(e){this._value=e||p,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),e.toolbar.registerComponent("fontSize",f,m),g=["Arial","Courier New","Georgia","Times New Roman","Trebuchet MS","Verdana"],v="Arial",_=a.extend({init:function(e,t){a.fn.init.call(this,e,t);var i=this.dropDownList;i.setDataSource(e.fontFamilies||g),i.value(v),this.element.data({type:"fontFamily",fontFamily:this})},update:function(e){this.value(e||v)}}),b=c.extend({_click:function(){this.toolbar.dialog({name:"fontFamily",options:{fonts:g,defaultFont:v}})},update:function(e){this._value=e||v,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),e.toolbar.registerComponent("fontFamily",_,b),w=e.spreadsheet.formats={automatic:null,text:"@",number:"#,0.00",percent:"0.00%",financial:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',currency:"$#,##0.00;[Red]$#,##0.00",date:"m/d/yyyy",time:"h:mm:ss AM/PM",dateTime:"m/d/yyyy h:mm",duration:"[h]:mm:ss"},y=a.extend({_revertTitle:function(e){e.sender.value(""),e.sender.wrapper.width("auto")},init:function(e,t){var i,o;a.fn.init.call(this,e,t),i=this.dropDownList,o="<span class='k-icon k-i-"+e.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",i.bind("change",this._revertTitle.bind(this)),i.bind("dataBound",this._revertTitle.bind(this)),i.setOptions({dataValueField:"format",dataTextField:"name",dataValuePrimitive:!0,valueTemplate:o,template:"# if (data.sample) { #<span class='k-spreadsheet-sample'>#: data.sample #</span># } ##: data.name #"}),i.text(o),i.setDataSource([{format:w.automatic,name:n.formatTypes.automatic},{format:w.text,name:n.formatTypes.text},{format:w.number,name:n.formatTypes.number,sample:"1,499.99"},{format:w.percent,name:n.formatTypes.percent,sample:"14.50%"},{format:w.financial,name:n.formatTypes.financial,sample:"(1,000.12)"},{format:w.currency,name:n.formatTypes.currency,sample:"$1,499.99"},{format:w.date,name:n.formatTypes.date,sample:"4/21/2012"},{format:w.time,name:n.formatTypes.time,sample:"5:49:00 PM"},{format:w.dateTime,name:n.formatTypes.dateTime,sample:"4/21/2012 5:49:00"},{format:w.duration,name:n.formatTypes.duration,sample:"168:05:00"},{popup:"formatCells",name:n.formatTypes.moreFormats}]),this.element.data({type:"format",format:this})}}),k=c.extend({_click:function(){this.toolbar.dialog({name:"formatCells"})}}),e.toolbar.registerComponent("format",y,k),x=l.extend({init:function(e,t){l.fn.init.call(this,e,t),this._borderPalette(),this.element.data({type:"borders",instance:this})},destroy:function(){this.borderPalette.destroy(),l.fn.destroy.call(this)},_borderPalette:function(){var i=t("<div />").appendTo(this.popup.element);this.borderPalette=new e.spreadsheet.BorderPalette(i,{change:this._action.bind(this)})},_action:function(e){this.toolbar.action({command:"BorderChangeCommand",options:{border:e.type,style:{size:1,color:e.color}}})}}),C=c.extend({_click:function(){this.toolbar.dialog({name:"borders"})}}),e.toolbar.registerComponent("borders",x,C),S=l.extend({init:function(e,i){l.fn.init.call(this,e,i),this.element.attr({"data-property":"alignment"}),this._defineButtons(),this._commandPalette(),this.popup.element.on("click",".k-button",function(e){this._action(t(e.currentTarget))}.bind(this)),this.element.data({type:"alignment",alignment:this,instance:this})},_defineButtons:function(){this.buttons=[{property:"textAlign",value:"left",iconClass:"align-left",text:n.alignmentButtons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:n.alignmentButtons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:n.alignmentButtons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:n.alignmentButtons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:n.alignmentButtons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:n.alignmentButtons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:n.alignmentButtons.alignBottom}]},destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},update:function(e){var t=e.textAlign(),i=e.verticalAlign(),n=this.popup.element;n.find(".k-button").removeClass("k-state-active"),t&&n.find("[data-property=textAlign][data-value="+t+"]").addClass("k-state-active"),i&&n.find("[data-property=verticalAlign][data-value="+i+"]").addClass("k-state-active")},_commandPalette:function(){var e=this.buttons,i=t("<div />").appendTo(this.popup.element);e.forEach(function(n,o){var r="<a title='"+n.text+"' data-property='"+n.property+"' data-value='"+n.value+"' class='k-button k-button-icon'><span class='k-icon k-i-"+n.iconClass+"'></span></a>";0!==o&&e[o-1].property!==n.property&&i.append(t("<span class='k-separator' />")),i.append(r)})},_action:function(e){var t=e.attr("data-property"),i=e.attr("data-value");this.toolbar.action({command:"PropertyChangeCommand",options:{property:t,value:i}})}}),T=c.extend({_click:function(){this.toolbar.dialog({name:"alignment"})}}),e.toolbar.registerComponent("alignment",S,T),D=l.extend({init:function(e,i){l.fn.init.call(this,e,i),this._defineButtons(),this._commandPalette(),this.popup.element.on("click",".k-button",function(e){this._action(t(e.currentTarget))}.bind(this)),this.element.data({type:"merge",merge:this,instance:this})},_defineButtons:function(){this.buttons=[{value:"cells",iconClass:"cells-merge",text:n.mergeButtons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:n.mergeButtons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:n.mergeButtons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:n.mergeButtons.unmerge}]},destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},_commandPalette:function(){var e=t("<div />").appendTo(this.popup.element);this.buttons.forEach(function(t){var i="<a title='"+t.text+"' data-value='"+t.value+"' class='k-button k-button-icontext'><span class='k-icon k-i-"+t.iconClass+"'></span>"+t.text+"</a>";e.append(i)})},_action:function(e){var t=e.attr("data-value");this.toolbar.action({command:"MergeCellCommand",
options:{value:t}})}}),A=c.extend({_click:function(){this.toolbar.dialog({name:"merge"})}}),e.toolbar.registerComponent("merge",D,A),E=l.extend({init:function(e,i){l.fn.init.call(this,e,i),this._defineButtons(),this._commandPalette(),this.popup.element.on("click",".k-button",function(e){this._action(t(e.currentTarget))}.bind(this)),this.element.data({type:"freeze",freeze:this,instance:this})},_defineButtons:function(){this.buttons=[{value:"panes",iconClass:"pane-freeze",text:n.freezeButtons.freezePanes},{value:"rows",iconClass:"row-freeze",text:n.freezeButtons.freezeRows},{value:"columns",iconClass:"column-freeze",text:n.freezeButtons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:n.freezeButtons.unfreeze}]},destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},_commandPalette:function(){var e=t("<div />").appendTo(this.popup.element);this.buttons.forEach(function(t){var i="<a title='"+t.text+"' data-value='"+t.value+"' class='k-button k-button-icontext'><span class='k-icon k-i-"+t.iconClass+"'></span>"+t.text+"</a>";e.append(i)})},_action:function(e){var t=e.attr("data-value");this.toolbar.action({command:"FreezePanesCommand",options:{value:t}})}}),I=c.extend({_click:function(){this.toolbar.dialog({name:"freeze"})}}),e.toolbar.registerComponent("freeze",E,I),M=a.extend({_revertTitle:function(e){e.sender.value(""),e.sender.wrapper.width("auto")},init:function(e,t){a.fn.init.call(this,e,t);var i=this.dropDownList;i.bind("change",this._revertTitle.bind(this)),i.bind("dataBound",this._revertTitle.bind(this)),i.setOptions({valueTemplate:"<span class='k-icon k-i-"+e.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",template:"<span class='k-icon k-i-#= iconClass #' style='line-height: 1em; width: 1.35em;'></span>#=text#",dataTextField:"text",dataValueField:"value"}),i.setDataSource([{value:"asc",sheet:!1,text:n.sortButtons.sortRangeAsc,iconClass:"sort-asc"},{value:"desc",sheet:!1,text:n.sortButtons.sortRangeDesc,iconClass:"sort-desc"}]),i.select(0),this.element.data({type:"sort",sort:this})},_change:function(e){var t=e.sender,i=t.dataItem();i&&this.toolbar.action({command:"SortCommand",options:{value:i.value,sheet:i.sheet}})},value:t.noop}),R=c.extend({_click:function(){this.toolbar.dialog({name:"sort"})}}),e.toolbar.registerComponent("sort",M,R),F=e.toolbar.ToolBarButton.extend({init:function(t,i){t.showText="overflow",e.toolbar.ToolBarButton.fn.init.call(this,t,i),this.element.on("click",this._click.bind(this)),this.element.data({type:"filter",filter:this})},_click:function(){this.toolbar.action({command:"FilterCommand"})},update:function(e){this.toggle(e)}}),P=c.extend({init:function(e,t){c.fn.init.call(this,e,t),this.element.data({type:"filter",filter:this})},_click:function(){this.toolbar.action({command:"FilterCommand"})},update:function(e){this.toggle(e)}}),e.toolbar.registerComponent("filter",F,P),z=e.toolbar.Item.extend({init:function(e,i){this.toolbar=i,this.element=t("<div class='k-button k-upload-button k-button-icon'><span class='k-icon k-i-folder-open' /></div>").data("instance",this),this._title=e.attributes.title,this._reset()},_reset:function(){this.element.find("input").remove(),t("<input type='file' autocomplete='off' accept='.xlsx'/>").attr("title",this._title).attr("aria-label",this._title).one("change",this._change.bind(this)).appendTo(this.element)},_change:function(e){this.toolbar.action({command:"OpenCommand",options:{file:e.target.files[0]}}),this._reset()}}),e.toolbar.registerComponent("open",z),e.spreadsheet.TabStrip=e.ui.TabStrip.extend({init:function(i,n){e.ui.TabStrip.fn.init.call(this,i,n),i.addClass("k-spreadsheet-tabstrip"),this._quickAccessButtons(),this.toolbars={};var o=n.dataSource;this.contentElements.each(function(e,i){this._toolbar(t(i),o[e].id,n.toolbarOptions[o[e].id])}.bind(this)),this.one("activate",function(){this.toolbars[this.options.dataSource[0].id].resize()})},events:e.ui.TabStrip.fn.events.concat(["action","dialog"]),destroy:function(){this.quickAccessToolBar.off("click"),e.ui.TabStrip.fn.destroy.call(this);for(var t in this.toolbars)this.toolbars[t].destroy()},action:function(e){this.trigger("action",e)},dialog:function(e){this.trigger("dialog",e)},refreshTools:function(e){var t,i=this.toolbars;for(t in i)i.hasOwnProperty(t)&&i[t].refresh(e)},_quickAccessButtons:function(){var i=[{title:n.quickAccess.undo,iconClass:"undo",action:"undo"},{title:n.quickAccess.redo,iconClass:"redo",action:"redo"}],o=e.template("<a href='\\#' title='#= title #' data-action='#= action #' class='k-button k-button-icon' aria-label='#= title #'><span class='k-icon k-i-#=iconClass#'></span></a>");this.quickAccessToolBar=t("<div />",{"class":"k-spreadsheet-quick-access-toolbar",html:e.render(o,i)}).insertBefore(this.wrapper),this.quickAccessToolBar.on("click",".k-button",function(e){e.preventDefault();var i=t(e.currentTarget).attr("data-action");this.action({action:i})}.bind(this)),this.quickAccessAdjust()},quickAccessAdjust:function(){this.tabGroup.css("padding-left",e._outerWidth(this.quickAccessToolBar))},_toolbar:function(t,i,n){var o,r;this.toolbars[i]&&(this.toolbars[i].destroy(),t.children(".k-toolbar").remove()),n&&(o=t.html("<div />").children("div"),r={tools:"boolean"==typeof n?void 0:n,toolbarName:i,action:this.action.bind(this),dialog:this.dialog.bind(this)},this.toolbars[i]=new e.spreadsheet.ToolBar(o,r))}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/dialogs.min",["kendo.core.min","kendo.binder.min","kendo.validator.min"],e)}(function(){!function(e){function t(t,i){return e.spreadsheet.formatting.text(t,i)}function i(e,t){var i,n=[],r=[];for(i=0;i<t.length;i++)o.inArray(t[i][e],r)==-1&&(n.push(t[i]),r.push(t[i][e]));return n}function n(t,i){e.spreadsheet.dialogs.register(t,u.extend({options:{messageId:i}}))}var o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A;e.support.browser.msie&&e.support.browser.version<9||(o=e.jQuery,r=e.data.ObservableObject,s=e.spreadsheet.messages.dialogs={apply:"Apply",save:"Save",cancel:"Cancel",remove:"Remove",retry:"Retry",revert:"Revert",okText:"OK",formatCellsDialog:{title:"Format",categories:{number:"Number",currency:"Currency",date:"Date"}},fontFamilyDialog:{title:"Font"},fontSizeDialog:{title:"Font size"},bordersDialog:{title:"Borders"},alignmentDialog:{title:"Alignment",buttons:{justtifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"}},mergeDialog:{title:"Merge cells",buttons:{mergeCells:"Merge all",mergeHorizontally:"Merge horizontally",mergeVertically:"Merge vertically",unmerge:"Unmerge"}},freezeDialog:{title:"Freeze panes",buttons:{freezePanes:"Freeze panes",freezeRows:"Freeze rows",freezeColumns:"Freeze columns",unfreeze:"Unfreeze panes"}},confirmationDialog:{text:"Are you sure you want to remove this sheet?",title:"Sheet remove"},validationDialog:{title:"Data Validation",hintMessage:"Please enter a valid {0} value {1}.",hintTitle:"Validation {0}",criteria:{any:"Any value",number:"Number",text:"Text",date:"Date",custom:"Custom Formula",list:"List"},comparers:{greaterThan:"greater than",lessThan:"less than",between:"between",notBetween:"not between",equalTo:"equal to",notEqualTo:"not equal to",greaterThanOrEqualTo:"greater than or equal to",lessThanOrEqualTo:"less than or equal to"},comparerMessages:{greaterThan:"greater than {0}",lessThan:"less than {0}",between:"between {0} and {1}",notBetween:"not between {0} and {1}",equalTo:"equal to {0}",notEqualTo:"not equal to {0}",greaterThanOrEqualTo:"greater than or equal to {0}",lessThanOrEqualTo:"less than or equal to {0}",custom:"that satisfies the formula: {0}"},labels:{criteria:"Criteria",comparer:"Comparer",min:"Min",max:"Max",value:"Value",start:"Start",end:"End",onInvalidData:"On invalid data",rejectInput:"Reject input",showWarning:"Show warning",showHint:"Show hint",hintTitle:"Hint title",hintMessage:"Hint message",ignoreBlank:"Ignore blank",showListButton:"Display button to show list",showCalendarButton:"Display button to show calendar"},placeholders:{typeTitle:"Type title",typeMessage:"Type message"}},exportAsDialog:{title:"Export...",labels:{scale:"Scale",fit:"Fit to page",fileName:"File name",saveAsType:"Save as type",exportArea:"Export",paperSize:"Paper size",margins:"Margins",orientation:"Orientation",print:"Print",guidelines:"Guidelines",center:"Center",horizontally:"Horizontally",vertically:"Vertically"}},modifyMergedDialog:{errorMessage:"Cannot change part of a merged cell."},rangeDisabledDialog:{errorMessage:"Destination range contains disabled cells."},intersectsArrayDialog:{errorMessage:"You cannot alter part of an array"},incompatibleRangesDialog:{errorMessage:"Incompatible ranges"},noFillDirectionDialog:{errorMessage:"Cannot determine fill direction"},duplicateSheetNameDialog:{errorMessage:"Duplicate sheet name"},overflowDialog:{errorMessage:"Cannot paste, because the copy area and the paste area are not the same size and shape."},useKeyboardDialog:{title:"Copying and pasting",errorMessage:"These actions cannot be invoked through the menu. Please use the keyboard shortcuts instead:",labels:{forCopy:"for copy",forCut:"for cut",forPaste:"for paste"}},unsupportedSelectionDialog:{errorMessage:"That action cannot be performed on multiple selection."},linkDialog:{title:"Hyperlink",labels:{text:"Text",url:"Address",removeLink:"Remove link"}}},a={},e.spreadsheet.dialogs={register:function(e,t){a[e]=t},registered:function(e){return!!a[e]},create:function(e,t){var i=a[e];if(i)return new i(t)}},l=e.spreadsheet.SpreadsheetDialog=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.options=o.extend(!0,{},this.options,t),this.bind(this.events,t)},events:["close","activate"],options:{autoFocus:!0},dialog:function(){return this._dialog||(this._dialog=o("<div class='k-spreadsheet-window k-action-window k-popup-edit-form' />").addClass(this.options.className||"").append(e.template(this.options.template)({messages:e.spreadsheet.messages.dialogs||s,errors:this.options.errors})).appendTo(document.body).kendoWindow({autoFocus:!1,scrollable:!1,resizable:!1,modal:!0,visible:!1,width:this.options.width||320,title:this.options.title,open:function(){this.center()},close:this._onDialogClose.bind(this),activate:this._onDialogActivate.bind(this),deactivate:this._onDialogDeactivate.bind(this)}).data("kendoWindow")),this._dialog},_onDialogClose:function(){this.trigger("close",{action:this._action})},_onDialogActivate:function(){this.trigger("activate")},_onDialogDeactivate:function(){this.trigger("deactivate"),this.destroy()},destroy:function(){this._dialog&&(this._dialog.destroy(),this._dialog=null)},open:function(){this.dialog().open(),this.dialog().element.find(".k-primary").focus()},apply:function(){this.close()},close:function(){this._action="close",this.dialog().close()}}),c=e.spreadsheet.FormatCellsViewModel=r.extend({init:function(e){r.fn.init.call(this,e),this.useCategory(this.category)},useCategory:function(e){var t=e&&e.type||"number",i="currency"==t;this.category=e,this.set("showCurrencyFilter",i&&this.currencies.length>1),i?this.currency(this.currencies[0]):this.set("formats",this.allFormats[t+"Formats"]),this.useFirstFormat()},useFirstFormat:function(){this.formats.length&&this.set("format",this.formats[0].value)},currency:function(e){var i,n;return void 0!==e&&(this._currency=e,i=e.value,n=[{currency:i,decimals:!0},{currency:i,decimals:!0,iso:!0},{currency:i,decimals:!1}],n=n.map(function(e){return e=c.convert.currency(e),{value:e,name:t(1e3,e)}}),this.set("formats",n),this.useFirstFormat()),this._currency||this.currencies[0]},categoryFilter:function(e){return void 0!==e&&this.useCategory(e),this.category},preview:function(){var e=this.get("format"),i=this.value||0;return e&&e.length?t(i,e):i}}),c.convert={currency:function(e){function t(e,t){return Array(t+1).join(e)}var i=e.currency,n=i.pattern[1];return e.decimals&&(n=n.replace(/n/g,"n"+i["."]+t("0",i.decimals))),n=e.iso?'"'+i.abbr+'" '+n.replace(/\s*\$\s*/g,""):n.replace(/\$/g,i.symbol),n=n.replace(/n/g,"?")},date:function(e){return/T|Z/.test(e)?"":e.toLowerCase().replace(/tt/g,"AM/PM").replace(/'/g,'"')}},d=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.formatCellsDialog||s,n={title:i.title,categories:[{type:"number",name:i.categories.number},{type:"currency",name:i.categories.currency},{type:"date",name:i.categories.date}]};l.fn.init.call(this,o.extend(n,t)),this._generateFormats()},options:{className:"k-spreadsheet-format-cells",template:"<div class='k-edit-form-container'><div class='k-root-tabs' data-role='tabstrip' data-text-field='name' data-bind='source: categories, value: categoryFilter' data-animation='false' /><div class='k-spreadsheet-preview' data-bind='text: preview' /><script type='text/x-kendo-template' id='format-item-template'>\\#: data.name \\#</script><select data-role='dropdownlist' class='k-format-filter' data-text-field='description' data-value-field='value.name' data-bind='visible: showCurrencyFilter, value: currency, source: currencies' /><ul data-role='staticlist' tabindex='0' class='k-list k-reset' data-template='format-item-template' data-value-primitive='true' data-value-field='value' data-bind='source: formats, value: format' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div></div>"},_generateFormats:function(){var n,r=this.options;r.currencies||(r.currencies=d.currenciesFrom(e.cultures)),r.numberFormats||(r.numberFormats=[{value:"#.00%",name:"100.00%"},{value:"#%",name:"100%"},{value:"#.00",name:"1024.00"},{value:"#,###.00",name:"1,024.00"}]),r.dateFormats||(n=e.cultures.current.calendars.standard.patterns,r.dateFormats=i("value",o.map(n,function(e){if(e=c.convert.date(e))return{value:e,name:t(34567.7678,e)}})))},open:function(t){var i,n,o=this.options,r=t.value(),s=o.categories.slice(0);this.viewModel=new c({currencies:o.currencies.slice(0),allFormats:{numberFormats:o.numberFormats.slice(0),dateFormats:o.dateFormats.slice(0)},categories:s,format:t.format(),category:r instanceof Date?s[2]:s[0],apply:this.apply.bind(this),close:this.close.bind(this),value:r}),l.fn.open.call(this),i=this.dialog().element,e.bind(i,this.viewModel),n=i.find("select.k-format-filter").data("kendoDropDownList"),o.currencies.length>10&&n.setOptions({filter:"contains"}),i.find(e.roleSelector("staticlist")).parent().addClass("k-list-wrapper")},apply:function(){var e=this.viewModel.format;l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"format",value:e}})}}),d.currenciesFrom=function(t){return i("description",o.map(t,function(t,i){var n,o;if(/-/.test(i))return n=t.numberFormat.currency,o=e.format("{0} ({1}, {2})",n.name,n.abbr,n.symbol),{description:o,value:n}}))},e.spreadsheet.dialogs.register("formatCells",d),e.spreadsheet.dialogs.FormatCellsDialog=d,u=l.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"},open:function(){var t,i;l.fn.open.call(this),t=this.options,i=t.text,t.messageId&&(i=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:i,close:this.close.bind(this)})}}),e.spreadsheet.dialogs.register("message",u),h=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.confirmationDialog||s,n={title:i.title,text:i.text};l.fn.init.call(this,o.extend(n,t))},options:{className:"k-spreadsheet-message",messageId:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: confirm'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>"},open:function(){var t,i;l.fn.open.call(this),t=this.options,i=t.text,t.messageId&&(i=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:i,confirm:this.confirm.bind(this),cancel:this.close.bind(this)})},isConfirmed:function(){return this._confirmed},confirm:function(){this._confirmed=!0,this.close()}}),e.spreadsheet.dialogs.register("confirmation",h),p=l.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: retry'>#= messages.retry #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>"},open:function(){var t,i;l.fn.open.call(this),t=this.options,i=t.text,t.messageId&&(i=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:i,retry:this.retry.bind(this),cancel:this.close.bind(this)})},retry:function(){this._retry=!0,this.close()}}),e.spreadsheet.dialogs.register("validationError",p),f=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.fontFamilyDialog||s;l.fn.init.call(this,o.extend({title:i.title},t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul"),i=this.options.fonts,n=this.options.defaultFont;this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:i}),template:"#: data #",value:n,change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontFamily",value:e.sender.value()[0]}})}}),e.spreadsheet.dialogs.register("fontFamily",f),m=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.fontSizeDialog||s;l.fn.init.call(this,o.extend({title:i.title},t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul"),i=this.options.sizes,n=this.options.defaultSize;this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:i}),template:"#: data #",value:n,change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(t){l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontSize",value:e.parseInt(t.sender.value()[0])}})}}),e.spreadsheet.dialogs.register("fontSize",m),g=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.bordersDialog||s;l.fn.init.call(this,o.extend({title:i.title},t)),this.element=this.dialog().element,this._borderPalette(),this.viewModel=e.observable({apply:this.apply.bind(this),close:this.close.bind(this)}),e.bind(this.element.find(".k-action-buttons"),this.viewModel)},options:{width:177,template:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){l.fn.apply.call(this);var e=this.value();this.trigger("action",{command:"BorderChangeCommand",options:{border:e.type,style:{size:1,color:e.color}}})},_borderPalette:function(){var t=this.dialog().element.find("div:first");this.borderPalette=new e.spreadsheet.BorderPalette(t,{change:this.value.bind(this)})},value:function(e){return void 0===e?this._state:void(this._state=e)}}),e.spreadsheet.dialogs.register("borders",g),v=l.extend({init:function(t){l.fn.init.call(this,t),this.element=this.dialog().element,this.property=t.property,this.options.title=t.title,this.viewModel=e.observable({apply:this.apply.bind(this),close:this.close.bind(this)}),e.bind(this.element.find(".k-action-buttons"),this.viewModel)},options:{template:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:this.property,value:this.value()}})},value:function(e){return void 0===e?this._value:void(this._value=e.value)}}),_=v.extend({init:function(e){e.width=177,v.fn.init.call(this,e),this._colorPalette()},_colorPalette:function(){var e=this.dialog().element.find("div:first");this.colorPalette=e.kendoColorPalette({palette:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],change:this.value.bind(this)}).data("kendoColorPalette")}}),e.spreadsheet.dialogs.register("colorPicker",_),b=v.extend({init:function(e){e.width=268,v.fn.init.call(this,e),this.dialog().setOptions({animation:!1}),this.dialog().one("activate",this._colorPicker.bind(this))},_colorPicker:function(){var e=this.dialog().element.find("div:first");this.colorPicker=e.kendoFlatColorPicker({change:this.value.bind(this)}).data("kendoFlatColorPicker")}}),e.spreadsheet.dialogs.register("customColor",b),w=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.alignmentDialog||s,n={title:i.title,buttons:[{property:"textAlign",value:"left",iconClass:"align-left",text:i.buttons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:i.buttons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:i.buttons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:i.buttons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:i.buttons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:i.buttons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:i.buttons.alignBottom}]};l.fn.init.call(this,o.extend(n,t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-property='#=property#' data-value='#=value#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:t.property,value:t.value}})}}),e.spreadsheet.dialogs.register("alignment",w),y=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.mergeDialog||s,n={title:i.title,buttons:[{value:"cells",iconClass:"cells-merge",text:i.buttons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:i.buttons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:i.buttons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:i.buttons.unmerge}]};l.fn.init.call(this,o.extend(n,t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];l.fn.apply.call(this),this.trigger("action",{command:"MergeCellCommand",options:{value:t.value}})}}),e.spreadsheet.dialogs.register("merge",y),k=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.freezeDialog||s,n={title:i.title,buttons:[{value:"panes",iconClass:"pane-freeze",text:i.buttons.freezePanes},{value:"rows",iconClass:"row-freeze",text:i.buttons.freezeRows},{value:"columns",iconClass:"column-freeze",text:i.buttons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:i.buttons.unfreeze}]};l.fn.init.call(this,o.extend(n,t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];l.fn.apply.call(this),this.trigger("action",{command:"FreezePanesCommand",options:{value:t.value}})}}),e.spreadsheet.dialogs.register("freeze",k),x=e.spreadsheet.ValidationCellsViewModel=r.extend({init:function(e){r.fn.init.call(this,e),this.bind("change",function(e){"criterion"===e.field&&(this.reset(),"custom"!==this.criterion&&"list"!==this.criterion||this.setHintMessageTemplate()),"comparer"===e.field&&this.setHintMessageTemplate(),"hintMessage"!=e.field&&"hintTitle"!=e.field||this._mute||(this.shouldBuild=!1),"from"!=e.field&&"to"!=e.field&&"hintMessageTemplate"!=e.field&&"type"!=e.field||!this.shouldBuild||this.buildMessages()}.bind(this)),this.reset()},buildMessages:function(){this._mute=!0,this.set("hintTitle",this.hintTitleTemplate?e.format(this.hintTitleTemplate,this.type):""),this.set("hintMessage",this.hintMessageTemplate?e.format(this.hintMessageTemplate,this.from,this.to):""),this._mute=!1},reset:function(){this.setComparers(),this.set("comparer",this.comparers[0].type),this.set("from",null),this.set("to",null),this.set("useCustomMessages",!1),this.shouldBuild=!0,this.hintTitleTemplate=this.defaultHintTitle,this.buildMessages()},setComparers:function(){var e,t,i=this.defaultComparers,n=[];if("text"===this.criterion)for(e=["equalTo","notEqualTo"],t=0;t<i.length;t++)e[0]==i[t].type&&(n.push(i[t]),e.shift());else n=i.slice();this.set("comparers",n)},setHintMessageTemplate:function(){"custom"!==this.criterion&&"list"!==this.criterion?this.set("hintMessageTemplate",e.format(this.defaultHintMessage,this.criterion,this.comparerMessages[this.comparer])):(this.set("hintMessageTemplate",""),this.set("hintMessage",""))},isAny:function(){return"any"===this.get("criterion")},isNumber:function(){return"number"===this.get("criterion")},showToForNumber:function(){return this.showTo()&&this.isNumber()},showToForDate:function(){return this.showTo()&&this.isDate()},isText:function(){return"text"===this.get("criterion")},isDate:function(){return"date"===this.get("criterion")},isList:function(){return"list"===this.get("criterion")},isCustom:function(){return"custom"===this.get("criterion")},showRemove:function(){return this.get("hasValidation")},showTo:function(){return"between"==this.get("comparer")||"notBetween"==this.get("comparer")},update:function(e){this.set("hasValidation",!!e),e&&this.fromValidationObject(e)},fromValidationObject:function(e){this.set("criterion",e.dataType),this.set("comparer",e.comparerType),this.set("from",e.from),this.set("to",e.to),this.set("type",e.type),this.set("ignoreBlank",e.allowNulls),this.set("showButton",e.showButton),e.messageTemplate||e.titleTemplate?(this.hintMessageTemplate=e.messageTemplate,this.hintMessage=e.messageTemplate,this.hintTitleTemplate=e.titleTemplate,this.hintTitle=e.titleTemplate,this.useCustomMessages=!0,this.buildMessages()):this.useCustomMessages=!1},toValidationObject:function(){if("any"===this.criterion)return null;var e={type:this.type,dataType:this.criterion,comparerType:this.comparer,from:this.from,to:this.to,allowNulls:this.ignoreBlank,showButton:this.showButton};return this.useCustomMessages&&(e.messageTemplate=this.shouldBuild?this.hintMessageTemplate:this.hintMessage,e.titleTemplate=this.hintTitle),e}}),C=l.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.validationDialog||s,n={title:i.title,hintMessage:i.hintMessage,hintTitle:i.hintTitle,criteria:[{type:"any",name:i.criteria.any},{type:"number",name:i.criteria.number},{type:"text",name:i.criteria.text},{type:"date",name:i.criteria.date},{type:"custom",name:i.criteria.custom},{type:"list",name:i.criteria.list}],comparers:[{type:"greaterThan",name:i.comparers.greaterThan},{type:"lessThan",name:i.comparers.lessThan},{type:"between",name:i.comparers.between},{type:"notBetween",name:i.comparers.notBetween},{type:"equalTo",name:i.comparers.equalTo},{type:"notEqualTo",name:i.comparers.notEqualTo},{type:"greaterThanOrEqualTo",name:i.comparers.greaterThanOrEqualTo},{type:"lessThanOrEqualTo",name:i.comparers.lessThanOrEqualTo}],comparerMessages:i.comparerMessages};l.fn.init.call(this,o.extend(n,t))},options:{width:450,criterion:"any",type:"reject",ignoreBlank:!0,showButton:!0,useCustomMessages:!1,errorTemplate:'<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#= message #<div class="k-callout k-callout-n"></div></div>',template:'<div class="k-edit-form-container"><div class="k-edit-label"><label>#: messages.validationDialog.labels.criteria #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.criteria #"data-text-field="name" data-value-field="type" data-bind="value: criterion, source: criteria" /></div><div data-bind="visible: isNumber"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.min #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.min #" title="#: messages.validationDialog.labels.min #" placeholder="e.g. 10" class="k-textbox" data-bind="value: from, enabled: isNumber" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.max #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.max #" title="#: messages.validationDialog.labels.max #" placeholder="e.g. 100" class="k-textbox" data-bind="value: to, enabled: showToForNumber" required="required" /></div></div></div><div data-bind="visible: isText"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isText" required="required" /></div></div><div data-bind="visible: isDate"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.start #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.start #" title="#: messages.validationDialog.labels.start #" class="k-textbox" data-bind="value: from, enabled: isDate" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.end #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.end #" title="#: messages.validationDialog.labels.end #" class="k-textbox" data-bind="value: to, enabled: showToForDate" required="required" /></div></div></div><div data-bind="visible: isCustom"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isCustom" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isList" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-field"><input type="checkbox" name="showButton" id="listShowButton" class="k-checkbox" data-bind="checked: showButton"/><label for="listShowButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showListButton #</label></div></div><div data-bind="visible: isDate"><div class="k-edit-field"><input type="checkbox" name="showButton" id="dateShowButton" class="k-checkbox" data-bind="checked: showButton"/><label for="dateShowButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showCalendarButton #</label></div></div><div data-bind="invisible: isAny"><div class="k-edit-field"><input type="checkbox" title="#: messages.validationDialog.labels.ignoreBlank #" name="ignoreBlank" id="ignoreBlank" class="k-checkbox" data-bind="checked: ignoreBlank"/><label for="ignoreBlank" class="k-checkbox-label"> #: messages.validationDialog.labels.ignoreBlank #</label></div></div><div data-bind="invisible: isAny"><div class="k-hr"></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.onInvalidData #:</label></div><div class="k-edit-field"><input type="radio" title="#: messages.validationDialog.labels.rejectInput #" id="validationTypeReject" name="validationType" value="reject" data-bind="checked: type" class="k-radio" /><label for="validationTypeReject" class="k-radio-label">#: messages.validationDialog.labels.rejectInput #</label> <input type="radio" title="#: messages.validationDialog.labels.showWarning #" id="validationTypeWarning"  name="validationType" value="warning" data-bind="checked: type" class="k-radio" /><label for="validationTypeWarning" class="k-radio-label">#: messages.validationDialog.labels.showWarning #</label></div></div><div data-bind="invisible: isAny" class="hint-wrapper"><div class="k-edit-field"><input type="checkbox" title="#: messages.validationDialog.labels.showHint #" name="useCustomMessages" id="useCustomMessages" class="k-checkbox" data-bind="checked: useCustomMessages" /><label class="k-checkbox-label" for="useCustomMessages"> #: messages.validationDialog.labels.showHint #</label></div><div data-bind="visible: useCustomMessages"><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintTitle #:</label></div><div class="k-edit-field"><input class="k-textbox" title="#: messages.validationDialog.labels.hintTitle #" placeholder="#: messages.validationDialog.placeholders.typeTitle #" data-bind="value: hintTitle" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintMessage #:</label></div><div class="k-edit-field"><input class="k-textbox" title="#: messages.validationDialog.labels.hintMessage #" placeholder="#: messages.validationDialog.placeholders.typeMessage #" data-bind="value: hintMessage" /></div></div></div><div class="k-action-buttons"><button class="k-button" data-bind="visible: showRemove, click: remove">#: messages.remove #</button><button class="k-button k-primary" data-bind="click: apply">#: messages.apply #</button><button class="k-button" data-bind="click: close">#: messages.cancel #</button></div></div>'
},open:function(t){var i,n=this.options;this.viewModel=new x({type:n.type,defaultHintMessage:n.hintMessage,defaultHintTitle:n.hintTitle,defaultComparers:n.comparers.slice(0),comparerMessages:n.comparerMessages,criteria:n.criteria.slice(0),criterion:n.criterion,ignoreBlank:n.ignoreBlank,showButton:n.showButton,apply:this.apply.bind(this),close:this.close.bind(this),remove:this.remove.bind(this)}),this.viewModel.update(t.validation()),l.fn.open.call(this),i=this.dialog().element,this.validatable&&this.validatable.destroy(),e.bind(i,this.viewModel),this.validatable=new e.ui.Validator(i.find(".k-edit-form-container"),{validateOnBlur:!1,errorTemplate:this.options.errorTemplate||void 0})},apply:function(){this.validatable.validate()&&(l.fn.apply.call(this),this.trigger("action",{command:"EditValidationCommand",options:{value:this.viewModel.toValidationObject()}}))},remove:function(){this.viewModel.set("criterion","any"),this.apply()}}),e.spreadsheet.dialogs.register("validation",C),e.spreadsheet.dialogs.ValidationDialog=C,S=l.extend({init:function(t){var i,n=e.spreadsheet.messages.dialogs.exportAsDialog||s;l.fn.init.call(this,o.extend({title:n.title},t)),this.viewModel=e.observable({title:this.options.title,name:this.options.name,extension:this.options.extension,fileFormats:this.options.fileFormats,excel:t.excelExport,pdf:{proxyURL:t.pdfExport.proxyURL,forceProxy:t.pdfExport.forceProxy,title:t.pdfExport.title,author:t.pdfExport.author,subject:t.pdfExport.subject,keywords:t.pdfExport.keywords,creator:t.pdfExport.creator,date:t.pdfExport.date,fitWidth:this.options.pdf.fitWidth,area:this.options.pdf.area,areas:this.options.pdf.areas,paperSize:this.options.pdf.paperSize,paperSizes:this.options.pdf.paperSizes,margin:this.options.pdf.margin,margins:this.options.pdf.margins,landscape:this.options.pdf.landscape,guidelines:this.options.pdf.guidelines,hCenter:this.options.pdf.hCenter,vCenter:this.options.pdf.vCenter},apply:this.apply.bind(this),close:this.close.bind(this)}),i=this.dialog(),this.viewModel.bind("change",function(e){"extension"===e.field&&(this.set("showPdfOptions",".pdf"===this.extension),i.center())}),e.bind(i.element,this.viewModel)},options:{name:"Workbook",extension:".xlsx",fileFormats:[{description:"Excel Workbook (.xlsx)",extension:".xlsx"},{description:"Portable Document Format(.pdf)",extension:".pdf"}],pdf:{fitWidth:!0,area:"workbook",areas:[{area:"workbook",text:"Entire Workbook"},{area:"sheet",text:"Active Sheet"},{area:"selection",text:"Selection"}],paperSize:"a4",paperSizes:[{value:"a2",text:"A2 (420 mm × 594 mm)     "},{value:"a3",text:"A3 (297 mm x 420 mm)     "},{value:"a4",text:"A4 (210 mm x 297 mm)     "},{value:"a5",text:"A5 (148 mm x 210 mm)     "},{value:"b3",text:"B3 (353 mm × 500 mm)     "},{value:"b4",text:"B4 (250 mm x 353 mm)     "},{value:"b5",text:"B5 (176 mm x 250 mm)     "},{value:"folio",text:'Folio (8.5" x 13")       '},{value:"legal",text:'Legal (8.5" x 14")       '},{value:"letter",text:'Letter (8.5" x 11")      '},{value:"tabloid",text:'Tabloid (11" x 17")      '},{value:"executive",text:'Executive (7.25" x 10.5")'}],margin:{bottom:"0.75in",left:"0.7in",right:"0.7in",top:"0.75in"},margins:[{value:{bottom:"0.75in",left:"0.7in",right:"0.7in",top:"0.75in"},text:"Normal"},{value:{bottom:"0.75in",left:"0.25in",right:"0.25in",top:"0.75in"},text:"Narrow"},{value:{bottom:"1in",left:"1in",right:"1in",top:"1in"},text:"Wide"}],landscape:!0,guidelines:!0,hCenter:!0,vCenter:!0},width:520,template:"<div class='k-edit-label'><label>#: messages.exportAsDialog.labels.fileName #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: name' /></div><div ><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.saveAsType #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='description' data-value-field='extension' data-bind='value: extension, source: fileFormats' /></div></div><div class='k-export-config' data-bind='visible: showPdfOptions'><hr class='k-hr' /><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.exportArea #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='area' data-bind='value: pdf.area, source: pdf.areas' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.paperSize#:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='value' data-bind='value: pdf.paperSize, source: pdf.paperSizes' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.margins #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-value-primitive='true'data-text-field='text' data-value-field='value' data-bind='value: pdf.margin, source: pdf.margins' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.orientation #:</label></div><div class='k-edit-field'><div class='k-button-group'><input type='radio' id='k-orientation-portrait' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='false' /><label class='k-button k-button-icon k-group-start k-orientation-button' for='k-orientation-portrait'><span class='k-icon k-i-page-portrait'></span></label><input type='radio' id='k-orientation-landscape' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='true' /><label class='k-button k-button-icon k-group-end k-orientation-button' for='k-orientation-landscape'><span class='k-icon k-i-page-landscape'></span></label></div></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.print #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='guidelines' type='checkbox' data-bind='checked: pdf.guidelines'/><label class='k-checkbox-label' for='guidelines'>#: messages.exportAsDialog.labels.guidelines#</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.scale #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='fitWidth' type='checkbox' data-bind='checked: pdf.fitWidth'/><label class='k-checkbox-label' for='fitWidth'>#: messages.exportAsDialog.labels.fit #</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.center #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='hCenter' type='checkbox' data-bind='checked: pdf.hCenter'/><label class='k-checkbox-label' for='hCenter'>#: messages.exportAsDialog.labels.horizontally #</label><input class='k-checkbox' id='vCenter' type='checkbox' data-bind='checked: pdf.vCenter'/><label class='k-checkbox-label' for='vCenter'>#: messages.exportAsDialog.labels.vertically #</label></div><div class='k-page-orientation'><span class='k-icon k-i-page-portrait' data-bind='invisible: pdf.landscape'></span><span class='k-icon k-i-page-landscape' data-bind='visible: pdf.landscape'></span></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.save #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){l.fn.apply.call(this),this.trigger("action",{command:"SaveAsCommand",options:this.viewModel})}}),e.spreadsheet.dialogs.register("exportAs",S),n("modifyMerged","modifyMergedDialog.errorMessage"),n("rangeDisabled","rangeDisabledDialog.errorMessage"),n("intersectsArray","intersectsArrayDialog.errorMessage"),n("overflow","overflowDialog.errorMessage"),n("unsupportedSelection","unsupportedSelectionDialog.errorMessage"),n("incompatibleRanges","incompatibleRangesDialog.errorMessage"),n("noFillDirection","noFillDirectionDialog.errorMessage"),n("duplicateSheetName","duplicateSheetNameDialog.errorMessage"),T=u.extend({options:{width:640,title:"Errors in import",template:"<div class='k-spreadsheet-message-content k-spreadsheet-import-errors'><div class='k--header-message'>We encountered #= errors.length # errors while reading this file.  Please be aware that some formulas might be missing, or contain invalid results.</div><div class='k--errors'><table><thead><tr><th>Context</th><th>Error message</th></tr></thead># for (var i = 0; i < errors.length; ++i) { ## var err = errors[i]; #<tr><td>#: err.context #</td><td>#: err.error #</td></tr># } #</table></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#: messages.okText #</button></div>"}}),e.spreadsheet.dialogs.register("importError",T),D=u.extend({init:function(t){var i=e.spreadsheet.messages.dialogs.useKeyboardDialog||s;l.fn.init.call(this,o.extend({title:i.title},t))},options:{template:"#: messages.useKeyboardDialog.errorMessage #<div>Ctrl+C #: messages.useKeyboardDialog.labels.forCopy #</div><div>Ctrl+X #: messages.useKeyboardDialog.labels.forCut #</div><div>Ctrl+V #: messages.useKeyboardDialog.labels.forPaste #</div><div class=\"k-action-buttons\"><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"}}),e.spreadsheet.dialogs.register("useKeyboard",D),A=l.extend({options:{template:"<div class='k-edit-label'><label>#: messages.linkDialog.labels.url #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: url' title='#: messages.linkDialog.labels.url #' /></div><div class='k-action-buttons'><button class='k-button k-left' data-bind='click: remove'>#= messages.linkDialog.labels.removeLink #</button><button class='k-button k-primary' data-bind='click: apply'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",title:s.linkDialog.title,autoFocus:!1},open:function(t){var i,n,r=this;l.fn.open.apply(r,arguments),i=r.dialog().element,n=e.observable({url:t.link(),apply:function(){/\S/.test(n.url)||(n.url=null),r.trigger("action",{command:"HyperlinkCommand",options:{link:n.url}}),r.close()},remove:function(){n.url=null,n.apply()},cancel:r.close.bind(r)}),e.bind(i,n),i.find("input").focus().on("keydown",function(e){13==e.keyCode?(n.url=o(this).val(),e.stopPropagation(),e.preventDefault(),n.apply()):27==e.keyCode&&(e.stopPropagation(),e.preventDefault(),n.cancel())})}}),e.spreadsheet.dialogs.register("hyperlink",A))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/sheetbinder.min",["kendo.core.min","kendo.data.min","spreadsheet/sheet.min"],e)}(function(){!function(e){var t,i;e.support.browser.msie&&e.support.browser.version<9||(t=function(e){return e},i=e.Class.extend({init:function(t){this.options=e.jQuery.extend({},this.options,t),this.columns=this._normalizeColumns(this.options.columns),this._sheet(),this._dataSource(),this._header(),this._boundRowsCount=0,this.dataSource.fetch()},_sheet:function(){this.sheet=this.options.sheet,this._sheetChangeHandler=this._sheetChange.bind(this),this._sheetDeleteRowHandler=this._sheetDeleteRow.bind(this),this._sheetInsertRowHandler=this._sheetInsertRow.bind(this),this.sheet.bind("change",this._sheetChangeHandler).bind("afterDeleteRow",this._sheetDeleteRowHandler).bind("afterInsertRow",this._sheetInsertRowHandler)},_sheetInsertRow:function(e){void 0!==e.index&&this.dataSource.insert(Math.max(e.index-1,0),{})},_sheetDeleteRow:function(e){var t,i;void 0!==e.index&&(t=this.dataSource,i=t.view()[e.index-1],i&&t.remove(i))},_header:function(){this.sheet.batch(function(){this.columns.forEach(function(e,t){this.sheet.range(0,t).value(e.title)}.bind(this))}.bind(this))},_sheetChange:function(i){var n,o,r,s,a,l,c;i.insertRow||i.deleteRow||i.recalc&&i.ref&&(n=this.dataSource,o=n.view(),r=this.columns,n.reader.model&&(s=n.reader.model.fields),!r.length&&o.length&&(r=Object.keys(o[0].toJSON())),a=r.map(function(i){var n=i.field;return n&&s&&s[n]&&"date"==s[n].type?e.spreadsheet.numberToDate:t}),this._skipRebind=!0,l=this.sheet._grid.normalize(i.ref),c=this.sheet.range(l).values(),l.forEach(function(e){var t,i,s,l,d;for(e=e.toRangeRef(),i=0,s=e.topLeft.row;s<=e.bottomRight.row;s++){for(t=o[s-1],t||(t=n.insert(s-1,{}),o=n.view()),l=0,d=e.topLeft.col;d<=e.bottomRight.col&&d<r.length;d++)t.set(r[d].field,a[d](c[i][l++]));i++}}),this._boundRowsCount=n.view().length,this._skipRebind=!1)},_normalizeColumns:function(e){return e.map(function(e){var t=e.field||e;return{field:t,title:e.title||t}})},_dataSource:function(){var t=this.options,i=t.dataSource;i=Array.isArray(i)?{data:i}:i,this.dataSource&&this._changeHandler?this.dataSource.unbind("change",this._changeHandler):this._changeHandler=this._change.bind(this),this.dataSource=e.data.DataSource.create(i).bind("change",this._changeHandler)},_change:function(){var t,i,n;this._skipRebind||(t=this.dataSource.view(),i=this.columns,!i.length&&t.length&&(this.columns=i=this._normalizeColumns(Object.keys(t[0].toJSON())),this._header()),n=i.map(function(t){return e.getter(t.field)}),this.sheet.batch(function(){var e,i,o,r=Math.max(t.length,this._boundRowsCount);for(e=0;e<r;e++)for(i=0;i<n.length;i++)o=t[e]?n[i](t[e]):null,this.sheet.range(e+1,i).value(o)}.bind(this)),this._boundRowsCount=t.length)},destroy:function(){this.dataSource.unbind("change",this._changeHandler),this.sheet.unbind("change",this._sheetChangeHandler).unbind("deleteRow",this._sheetDeleteRowHandler).unbind("insertRow",this._sheetInsertRowHandler)},options:{columns:[]}}),e.spreadsheet.SheetDataSourceBinder=i)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/filtermenu.min",["kendo.core.min","kendo.popup.min","kendo.treeview.min","kendo.numerictextbox.min","kendo.datepicker.min","kendo.datetimepicker.min"],e)}(function(){!function(e){function t(e){var t,i={},n=[];for(t=0;t<e.length;t++)i[e[t].value]?!i[e[t].value].checked&&e[t].checked&&(i[e[t].value].checked=!0):(i[e[t].value]=e[t],n.push(e[t]));return n}function i(t,n){var o,r,s,a,l,c,d=!1,u=t instanceof e.data.HierarchicalDataSource&&t.data(),h=this,p=this.values;for(o=0;o<u.length;o++)r=u[o],s=(""+r.text).toLowerCase(),a=n===!0||""===n||s.indexOf(n)>=0,l=i.bind(h),c=l(r.children,n),d=d||c||a,r.hidden=!a&&!c,n.length||p&&!p.length?r.checked=!r.hidden:p&&p.indexOf(r.text)!=-1&&(r.checked=!0);return u&&t.filter({field:"hidden",operator:"neq",value:!0}),d}function n(t){var i,o,r=t instanceof e.data.HierarchicalDataSource&&t.data();for(i=0;i<r.length;i++)o=r[i],o.checked=!1,o.hasChildren&&n(o.children)}function o(e){var t,i,n=c.operators,o=[];for(t in e)if(e.hasOwnProperty(t))for(i in e[t])e[t].hasOwnProperty(i)&&o.push({text:n[t][i],value:i,unique:t+"_"+i,type:t});return o}var r,s,a,l,c,d,u,h,p;e.support.browser.msie&&e.support.browser.version<9||(r=e.jQuery,s=e.ui.Widget,a={details:"k-details",button:"k-button",detailsSummary:"k-details-summary",detailsContent:"k-details-content",icon:"k-icon",iconCollapse:"k-i-arrow-45-down-right",iconExpand:"k-i-arrow-60-right",iconSearch:"k-i-zoom",textbox:"k-textbox",wrapper:"k-spreadsheet-filter-menu",filterByCondition:"k-spreadsheet-condition-filter",filterByValue:"k-spreadsheet-value-filter",valuesTreeViewWrapper:"k-spreadsheet-value-treeview-wrapper",actionButtons:"k-action-buttons"},l=s.extend({init:function(t,i){s.fn.init.call(this,t,i),this.element.addClass(p.classNames.details),this._summary=this.element.find("."+p.classNames.detailsSummary).on("click",this._toggle.bind(this));var n=i.expanded?p.classNames.iconCollapse:p.classNames.iconExpand;this._icon=r("<span />",{"class":p.classNames.icon+" "+n}).prependTo(this._summary),this._container=e.wrap(this._summary.next(),!0),i.expanded||this._container.hide()},options:{name:"Details"},events:["toggle"],visible:function(){return this.options.expanded},toggle:function(t){var i=e.fx(this._container).expand("vertical");i.stop()[t?"reverse":"play"](),this._icon.toggleClass(p.classNames.iconExpand,t).toggleClass(p.classNames.iconCollapse,!t),this.options.expanded=!t},_toggle:function(){var e=this.visible();this.toggle(e),this.trigger("toggle",{show:e})}}),c=e.spreadsheet.messages.filterMenu={sortAscending:"Sort range A to Z",sortDescending:"Sort range Z to A",filterByValue:"Filter by value",filterByCondition:"Filter by condition",apply:"Apply",search:"Search",addToCurrent:"Add to current selection",clear:"Clear",blanks:"(Blanks)",operatorNone:"None",and:"AND",or:"OR",operators:{string:{contains:"Text contains",doesnotcontain:"Text does not contain",startswith:"Text starts with",endswith:"Text ends with",matches:"Text matches",doesnotmatch:"Text does not match"},date:{eq:"Date is",neq:"Date is not",lt:"Date is before",gt:"Date is after"},number:{eq:"Is equal to",neq:"Is not equal to",gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"}}},e.data.binders.spreadsheetFilterValue=e.data.Binder.extend({init:function(t,i,n){e.data.Binder.fn.init.call(this,t,i,n),this._change=r.proxy(this.change,this),r(this.element).on("change",this._change)},refresh:function(){var e=this,t=e.bindings.spreadsheetFilterValue.get();r(e.element).val(t instanceof Date?"":t)},change:function(){var e=this.element.value;this.bindings.spreadsheetFilterValue.set(e)}}),e.data.binders.widget.spreadsheetFilterValue=e.data.Binder.extend({init:function(t,i,n){e.data.Binder.fn.init.call(this,t.element[0],i,n),this.widget=t,this._change=r.proxy(this.change,this),this.widget.first("change",this._change)},refresh:function(){var e=this.bindings.spreadsheetFilterValue,t=e.get(),i=r(this.widget.element).data("filterType");this.widget.value("date"===i&&t instanceof Date||"number"===i&&!isNaN(t)?t:null)},change:function(){var e=this.widget.value(),t=this.bindings.spreadsheetFilterValue;t.set(e)}}),d={filterByValue:"<div class='"+a.detailsSummary+"'>#= messages.filterByValue #</div><div class='"+a.detailsContent+"'><div class='k-textbox k-space-right'><input placeholder='#= messages.search #' data-#=ns#bind='events: { input: filterValues }' /><span class='k-icon k-i-zoom' /></div><div data-#=ns#bind='visible: hasActiveSearch'><input class='k-checkbox' type='checkbox' data-#=ns#bind='checked: appendToSearch' id='_#=guid#' /><label class='k-checkbox-label' for='_#=guid#'>#= messages.addToCurrent #</label></div><div class='"+a.valuesTreeViewWrapper+"'><div data-#=ns#role='treeview' data-#=ns#checkboxes='{ checkChildren: true }' data-#=ns#bind='source: valuesDataSource, events: { check: valuesChange, select: valueSelect }' /></div></div>",filterByCondition:"<div class='"+a.detailsSummary+"'>#= messages.filterByCondition #</div><div class='"+a.detailsContent+'\'><div><select data-#=ns#role="dropdownlist"data-#=ns#bind="value: operator, source: operators, events: { change: operatorChange } "data-value-primitive="false"data-option-label="#=messages.operatorNone#"data-height="auto"data-text-field="text"data-value-field="unique"></select></div><div data-#=ns#bind="visible: isString"><input data-filter-type="string" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" class="k-textbox" /></div><div data-#=ns#bind="visible: isNumber"><input data-filter-type="number" data-#=ns#role="numerictextbox" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div><div data-#=ns#bind="visible: isDate"><input data-filter-type="date" data-#=ns#role="datepicker" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div></div>',menuItem:"<li data-command='#=command#' data-dir='#=dir#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</li>",actionButtons:"<button data-#=ns#bind='click: apply' class='k-button k-primary'>#=messages.apply#</button><button data-#=ns#bind='click: clear' class='k-button'>#=messages.clear#</button>"},u=e.spreadsheet.FilterMenuViewModel=e.data.ObservableObject.extend({valuesChange:function(t){var i=t?t.sender.dataSource:this.valuesDataSource,n=function(e){return e.checked},o=function(t){return"date"===t.dataType?e.spreadsheet.dateToNumber(t.value):t.value},r=function(e,t,i){return i.lastIndexOf(e)===t},s=i.data(),a=s[0].children.data().toJSON(),l=a.filter(function(e){return"blank"===e.dataType});l=!!l.length&&l[0].checked,a=a.filter(n).map(o),this.appendToSearch&&this.valueFilter&&this.valueFilter.values.length&&(a=a.concat(this.valueFilter.values.toJSON()).sort().filter(r)),this.set("valueFilter",{values:a,blanks:l})},valueSelect:function(e){e.preventDefault();var t=e.sender.dataItem(e.node);t.set("checked",!t.checked)},hasActiveSearch:!1,appendToSearch:!1,filterValues:function(e){var t,o="string"==typeof e?e:r(e.target).val().toLowerCase(),s=this.valuesDataSource;this.set("hasActiveSearch",!!o),t=i.bind(this.valueFilter),n(s),t(s,o)},reset:function(){this.set("customFilter",{logic:"and",criteria:[{operator:null,value:null}]}),this.set("valueFilter",{values:[]})},operatorChange:function(e){var t=e.sender.dataItem();this.set("operatorType",t.type),this.get("customFilter")||this.reset(),this.set("customFilter.criteria[0].operator",t.value)},isNone:function(){return void 0===this.get("operatorType")},isString:function(){return"string"===this.get("operatorType")},isNumber:function(){return"number"===this.get("operatorType")},isDate:function(){return"date"===this.get("operatorType")}}),h=e.spreadsheet.FilterMenuController={valuesTree:function(e,t){return[{text:"All",expanded:!0,checked:!1,items:this.values(e.resize({top:1}),t)}]},values:function(i,n){var o=[],r=c,s=i.column(n),a=i.sheet();return s.forEachCell(function(t,i,n){var s,l,c,d=!0;a.isHiddenRow(t)&&(d=!1),s=n.value,l=n.dataType,c=n.text,l=void 0===s?"blank":n.format?e.spreadsheet.formatting.type(s,n.format):typeof s,c=null!==s&&n.format?e.spreadsheet.formatting.text(s,n.format):"blank"==l?r.blanks:s,"percent"!==l&&"currency"!==l||(l="number"),"date"===l&&(s=e.spreadsheet.numberToDate(s)),o.push({dataType:l,value:s,text:c,checked:d})}),o=t(o),o.sort(function(e,t){return e.dataType===t.dataType?0:"blank"===e.dataType||"blank"===t.dataType?"blank"===e.dataType?-1:1:"number"===e.dataType||"number"===t.dataType?"number"===e.dataType?-1:1:"date"===e.dataType||"date"===t.dataType?"date"===e.dataType?-1:1:0}),o},filterType:function(e,t){var i,n,o,r=e.sheet(),s=this.filterForColumn(t,r);return s=s&&s.filter.toJSON(),s&&"custom"==s.filter&&(n=s.criteria[0].value,n instanceof Date?i="date":"string"==typeof n?i="string":"number"==typeof n&&(i="number")),i||(o=this.values(e.row(1),t)[0],i=o&&o.dataType,"blank"==i&&(i=null)),i},filterForColumn:function(e,t){var i,n=t.filter();return n&&(i=n.columns.filter(function(t){return t.index===e})[0]),i},filter:function(e,t){var i,n,o,r,s=this.filterForColumn(e,t);if(s)return i=s.filter.toJSON(),n=i.filter,delete i.filter,o={type:n,options:i},r=i.criteria,r&&r.length&&(o.operator=r[0].operator),o}},p=s.extend({init:function(e,t){s.call(this,e,t),this.element.addClass(p.classNames.wrapper),this.viewModel=new u({active:"value",operator:null,operators:o(this.options.operators),clear:this.clear.bind(this),apply:this.apply.bind(this)}),this._filterInit(),this._popup(),this._sort(),this._filterByCondition(),this._filterByValue(),this._actionButtons()},options:{name:"FilterMenu",column:0,range:null,operators:{string:{contains:"Text contains",doesnotcontain:"Text does not contain",startswith:"Text starts with",endswith:"Text ends with",matches:"Text matches",doesnotmatch:"Text does not match"},date:{eq:"Date is",neq:"Date is not",lt:"Date is before",gt:"Date is after"},number:{eq:"Is equal to",neq:"Is not equal to",gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"}}},events:["action"],destroy:function(){s.fn.destroy.call(this),this.menu.destroy(),this.valuesTreeView.destroy(),this.popup.destroy()},openFor:function(e){this.popup.setOptions({anchor:e}),this.popup.open()},close:function(){this.popup.close()},clear:function(){this.action({command:"ClearFilterCommand",options:{column:this.options.column}}),this.viewModel.reset(),this.close()},apply:function(){var e,t,i;this._active(),e={operatingRange:this.options.range,column:this.options.column},"value"===this.viewModel.active?(this.viewModel.valuesChange({sender:this.valuesTreeView}),t=this.viewModel.valueFilter.toJSON(),(t.blanks||t.values&&t.values.length)&&(e.valueFilter=t)):"custom"===this.viewModel.active&&(i=this.viewModel.customFilter.toJSON(),i.criteria.length&&null!==i.criteria[0].value&&(e.customFilter=i)),(e.valueFilter||e.customFilter)&&this.action({command:"ApplyFilterCommand",options:e})},action:function(e){this.trigger("action",r.extend({},e))},_filterInit:function(){var e,t=this.options.column,i=this.options.range,n=i.sheet(),o=h.filter(t,n);o?(e=h.filterType(i,t),this.viewModel.set("active",o.type),this.viewModel.set(o.type+"Filter",o.options),"custom"==o.type&&(this.viewModel.set("operator",e+"_"+o.operator),this.viewModel.set("operatorType",e))):this.viewModel.reset()},_popup:function(){this.popup=this.element.kendoPopup({copyAnchorStyles:!1}).data("kendoPopup")},_sort:function(){var t=e.template(p.templates.menuItem),i=c,n=[{command:"sort",dir:"asc",text:i.sortAscending,iconClass:"sort-asc"},{command:"sort",dir:"desc",text:i.sortDescending,iconClass:"sort-desc"}],o=r("<ul />",{html:e.render(t,n)}).appendTo(this.element);this.menu=o.kendoMenu({orientation:"vertical",select:function(e){var t=r(e.item).data("dir"),i=this.options.range.resize({top:1}),n={value:t,sheet:!1,operatingRange:i,column:this.options.column};i.isSortable()?this.action({command:"SortCommand",options:n}):this.close()}.bind(this)}).data("kendoMenu")},_appendTemplate:function(t,i,n,o){var s=e.template(t),a=r("<div class='"+i+"'/>").html(s({messages:c,guid:e.guid(),ns:e.ns}));return this.element.append(a),n&&(n=new l(a,{expanded:o,toggle:this._detailToggle.bind(this)})),e.bind(a,this.viewModel),a},_detailToggle:function(e){this.element.find("[data-role=details]").not(e.sender.element).data("kendoDetails").toggle(!e.show)},_filterByCondition:function(){var e="custom"===this.viewModel.active;this._appendTemplate(p.templates.filterByCondition,p.classNames.filterByCondition,!0,e)},_filterByValue:function(){var t,i="value"===this.viewModel.active,n=this._appendTemplate(p.templates.filterByValue,p.classNames.filterByValue,!0,i);this.valuesTreeView=n.find("[data-role=treeview]").data("kendoTreeView"),t=h.valuesTree(this.options.range,this.options.column),this.viewModel.set("valuesDataSource",new e.data.HierarchicalDataSource({data:t}))},_actionButtons:function(){this._appendTemplate(p.templates.actionButtons,p.classNames.actionButtons,!1)},_active:function(){var e=this.element.find("[data-role=details]").filter(function(e,t){return r(t).data("kendoDetails").visible()});e.hasClass(p.classNames.filterByValue)?this.viewModel.set("active","value"):e.hasClass(p.classNames.filterByCondition)&&this.viewModel.set("active","custom")}}),e.spreadsheet.FilterMenu=p,r.extend(!0,p,{classNames:a,templates:d}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/editor.min",["kendo.core.min"],e)}(function(){!function(e){function t(e,t){return e&&(e.top!==t.top||e.left!==t.left)}if(!(e.support.browser.msie&&e.support.browser.version<9)){var i=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this),this.view=t,this.formulaBar=t.formulaBar,this._active=!1,this.barInput=t.formulaBar.formulaInput,this.cellInput=t.formulaInput,this.barInput.syncWith(this.cellInput),this.cellInput.syncWith(this.barInput),this.barInput.bind("keyup",this._triggerUpdate.bind(this)),this.cellInput.bind("keyup",this._triggerUpdate.bind(this)),this.barInput.bind("blur",this._blur.bind(this)),this.cellInput.bind("blur",this._blur.bind(this))},events:["activate","deactivate","change","update"],_blur:function(){this.deactivate()},_triggerUpdate:function(){this.trigger("update",{value:this.value()})},activeEditor:function(){var t=null,i=e._activeElement();return this.barElement()[0]===i?t=this.barInput:this.cellElement()[0]===i&&(t=this.cellInput),t},activate:function(e){return this._active=!0,this._rect=e.rect,this._range=e.range,this.cellInput.position(e.rect),this.cellInput.resize(e.rect),this.cellInput.tooltip(e.tooltip),this.cellInput.activeCell=this.barInput.activeCell=this._range.topLeft(),this.cellInput.activeSheet=this.barInput.activeSheet=this._range._sheet,this.trigger("activate"),this},deactivate:function(e){var t=this.cellInput;this._active&&(this._active=!1,e||t.value()==this._value||this.trigger("change",{value:t.value(),range:this._range}),this._rect=null,t.hide(),this.trigger("deactivate"))},enable:function(e){this.barInput.enable(e),this.cellInput.enable(e)},barElement:function(){return this.barInput.element},cellElement:function(){return this.cellInput.element},focus:function(e){e=e||"cell","cell"===e?(this.cellInput.element.focus(),this.cellInput.end()):this.barInput.element.focus()},isActive:function(){return this._active},isFiltered:function(){return this.barInput.popup.visible()||this.cellInput.popup.visible()},canInsertRef:function(e){var t=this.activeEditor();return t&&t.canInsertRef(e)},highlightedRefs:function(){var e=this.activeEditor(),t=[];return e&&(t=e.highlightedRefs()),t},scale:function(){this.cellInput.scale()},toggleTooltip:function(e){this.cellInput.toggleTooltip(t(this._rect,e))},value:function(e,t){return void 0===e?this.barInput.value():(null===e&&(e=""),this._value=e,this.barInput.value(e),this.cellInput.value(e),void this.barInput.element.toggleClass("k-spreadsheet-array-formula",!!t))},insertNewline:function(){this.activeEditor().insertNewline(),this.scale()},select:function(){this.activeEditor().select()}});e.spreadsheet.SheetEditor=i}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/autofill.min",["spreadsheet/runtime.min","spreadsheet/range.min"],e)}(function(){"use strict";function e(e){var t,i,n,o,r,s=e.length,a=(s+1)/2,l=e.reduce(function(e,t){return e+t},0)/s,c=0,d=0;for(t=0;t<s;t++)i=t+1-a,n=e[t]-l,c+=i*n,d+=i*i;return d?(o=c/d,r=l-o*a,function(e){return r+o*(e+1)}):function(t){return e[t%e.length]}}function t(t){function o(e){var t,i=e[1]-e[0];for(t=2;t<e.length;++t)if(e[t]-e[t-1]!=i)return null;return i}function r(e){return e.map(function(e){return e.number})}var s=[],a=t.map(function(e){return e.formula||e.value});return n(a,function(t,i,n,l){var c,d,u,h,p;for("number"==n?(d=r(l),c=e(d)):"string"==n||"formula"==n||"boolean"==n?c=function(e,t){return a[t]}:Array.isArray(n)?1==l.length?c=function(e){return n[(l[0].number+e)%n.length]}:(u=o(r(l)),c=null==u?function(e){return l[e%l.length].value}:function(e){var t=l[0].number+u*e;return n[t%n.length]}):"null"!=n?(d=r(l),1==d.length&&d.push(d[0]+1),d=e(d),c=function(e,t){return a[t].replace(/^(.*\D)\d+/,"$1"+d(e,t))}):c=function(){return null},h={f:c,begin:t,end:i,len:i-t},p=t;p<i;++p)s[p]=h}),function(e,n){var o=s[n],r=e/a.length|0,l=e%a.length,c=r*o.len+l-o.begin,d=o.f(c,n),h=i(t[n]);return delete h.enable,d instanceof u?h.formula=d:h.value=d,h}}function i(e){var t={};return Object.keys(e||{}).forEach(function(i){t[i]=e[i]}),t}function n(e,t){var i,n,r=null,s=0,a=[];for(n=0;n<e.length;++n)i=o(e[n]),a.push(i),null!=r&&i.type!==r.type&&(t(s,n,r.type,a.slice(s,n)),s=n),r=i;t(s,n,r.type,a.slice(s,n))}function o(e){var t,i;if("number"==typeof e)return{type:"number",number:e};if("string"==typeof e)return(t=s(e))?t:(i=/^(.*\D)(\d+)/.exec(e),i?(e=e.replace(/^(.*\D)\d+/,"$1-######"),{type:e,match:i,number:parseFloat(i[2])}):{type:"string"});if("boolean"==typeof e)return{type:"boolean"};if(null==e)return{type:"null"};if(e instanceof u)return{type:"formula"};throw window.console.error(e),Error("Cannot fill data")}function r(){var e=kendo.culture();return[e.calendars.standard.days.namesAbbr,e.calendars.standard.days.names,e.calendars.standard.months.namesAbbr,e.calendars.standard.months.names]}function s(e){var t,i,n,o,s=e.toLowerCase(),a=r();for(t=0;t<a.length;++t)for(i=a[t],n=i.length;--n>=0;)if(o=i[n].toLowerCase(),o==s)return{
type:i,number:n,value:e}}function a(e){var t,i,n=e.length,o=e[0].length,r=[];for(t=0;t<o;++t)for(r[t]=[],i=0;i<n;++i)r[t][i]=e[i][t];return r}var l,c,d,u,h,p,f;kendo.support.browser.msie&&kendo.support.browser.version<9||(l=kendo.spreadsheet,c=l.Range,d=l.calc.runtime,u=d.Formula,h="incompatibleRanges",p="noFillDirection",f=c.FillError=function(e){this.code=e},c.prototype._previewFillFrom=function(e,i){var n,o,r,s,l,c,d,u,m,g,v,_,b,w,y=this,k=y._sheet;if("string"==typeof e&&(e=k.range(e)),n=e._ref.toRangeRef().clone().setSheet(k.name()),o=y._ref.toRangeRef().clone().setSheet(k.name()),n.intersects(o)){if(n.eq(o))return null;if(o=o.clone(),n.topLeft.eq(o.topLeft))if(n.width()==o.width())o.topLeft.row+=n.height(),i=0;else{if(n.height()!=o.height())throw new f(h);o.topLeft.col+=n.width(),i=1}else{if(!n.bottomRight.eq(o.bottomRight))throw new f(h);if(n.width()==o.width())o.bottomRight.row-=n.height(),i=2;else{if(n.height()!=o.height())throw new f(h);o.bottomRight.col-=n.width(),i=3}}return k.range(o)._previewFillFrom(e,i)}if(null==i)if(n.topLeft.col==o.topLeft.col)i=n.topLeft.row<o.topLeft.row?0:2;else{if(n.topLeft.row!=o.topLeft.row)throw new f(p);i=n.topLeft.col<o.topLeft.col?1:3}if(r=1&i,s=2&i,r&&n.height()!=o.height()||!r&&n.width()!=o.width())throw new f(h);for(l=e._properties(),r?c=o.width():(l=a(l),c=o.height()),d=Array(l.length),u=0;u<l.length;++u)for(m=l[u],g=t(m),v=d[u]=Array(c),_=0;_<c;++_)b=s?-_-1:m.length+_,w=s?m.length-_%m.length-1:_%m.length,v[s?c-_-1:_]=g(b,w);return r||(d=a(d)),{props:d,direction:i,dest:y}},c.prototype.fillFrom=function(e,t){var i=this._previewFillFrom(e,t);return i.dest._properties(i.props),i.dest})},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/nameeditor.min",["kendo.core.min"],e)}(function(){!function(e){var t,i,n;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,i={input:"k-spreadsheet-name-editor",list:"k-spreadsheet-name-list"},n=e.ui.Widget.extend({init:function(n,o){var r,s,a;e.ui.Widget.call(this,n,o),n.addClass(i.input),r=o.messages.nameBox||"Name Box",s=new e.data.DataSource({transport:{read:function(t){var i=[];this._workbook.forEachName(function(t){!t.hidden&&t.value instanceof e.spreadsheet.Ref&&i.push({name:t.name})}),t.success(i)}.bind(this),cache:!1}}),a=t("<input />").attr("title",r).attr("aria-label",r),this.combo=a.appendTo(n).kendoComboBox({clearButton:!1,dataTextField:"name",dataValueField:"name",template:"#:data.name#<a class='k-button-delete' href='\\#'><span class='k-icon k-i-close'></span></a>",dataSource:s,autoBind:!1,ignoreCase:!0,change:this._on_listChange.bind(this),noDataTemplate:"<div></div>",open:function(){s.read()}}).getKendoComboBox(),this.combo.input.on("keydown",this._on_keyDown.bind(this)).on("focus",this._on_focus.bind(this)),this.combo.popup.element.addClass("k-spreadsheet-names-popup").on("mousemove",function(e){e.stopPropagation()}).on("click",".k-button-delete",function(e){e.preventDefault(),e.stopPropagation();var i=t(e.target).closest(".k-item");i=this.combo.dataItem(i),this._deleteItem(i.name)}.bind(this))},value:function(e){return void 0===e?this.combo.value():void this.combo.value(e)},_deleteItem:function(e){this.trigger("delete",{name:e})},_on_keyDown:function(e){switch(e.keyCode){case 27:this.combo.value(this._prevValue),this.trigger("cancel");break;case 13:this.trigger("enter")}},_on_focus:function(){this._prevValue=this.combo.value()},_on_listChange:function(){var e=this.combo.value();e&&this.trigger("select",{name:e})}}),e.spreadsheet.NameEditor=n)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("spreadsheet/print.min",["kendo.pdf.min","spreadsheet/sheet.min","spreadsheet/range.min","spreadsheet/references.min","spreadsheet/numformat.min","util/text-metrics.min"],e)}(function(){"use strict";function e(e,t,i,n,o){var r=0,s=[],a=t,l=0;return t&&i&&(i*=t),e.forEach(function(e,c){null!=n&&c<n&&(l+=e),t&&r+e>a&&(a-r<i&&(r=t*Math.ceil(r/t)+l,l>0&&o.push(r-l)),a+=t*Math.ceil(e/t)),s.push(r),r+=e}),s.push(r),s}function t(t,n,c){var d,u,h,p,f,m,g,v,b,w,y,k,x,C,S,T,D=t._grid;return n=D.normalize(n),d=[],u=[],h=[],p=t._getMergedCells(n),f=-1,m=-1,t.forEach(n,function(e,i,o){var r,a,l,g=e-n.topLeft.row,v=i-n.topLeft.col,b=t.rowHeight(e),w=t.columnWidth(i);v||u.push(b),g||h.push(w),!t.isHiddenColumn(i)&&!t.isHiddenRow(e)&&b&&w&&(r=c.forScreen||s(o),(c.emptyCells||r)&&(a=new _(e,i).print(),p.secondary[a]||(r?(f=Math.max(f,g),m=Math.max(m,v)):o.empty=!0,o.row=g,o.col=v,l=p.primary[a],l?(delete p.primary[a],o.merged=!0,o.rowspan=l.height(),o.colspan=l.width(),c.forScreen&&(o.width=t._columns.sum(l.topLeft.col,l.bottomRight.col),o.height=t._rows.sum(l.topLeft.row,l.bottomRight.row))):(o.rowspan=1,o.colspan=1),d.push(o))))}),u=u.slice(0,f+1),h=h.slice(0,m+1),g=c.pageWidth,v=c.pageHeight,b=c.scale||1,c.fitWidth&&(w=h.reduce(o,0),w>g&&(b=g/w)),g=Math.ceil(g/b),v=Math.ceil(v/b),y=[],k=e(u,v||0,c.maxEmpty,c.headerRows,y),x=e(h,g||0,c.maxEmpty),C=0,S=0,T=[],d=d.filter(function(e){return(!e.empty||!(e.row>f||e.col>m))&&(c.headerRows&&e.row<c.headerRows&&T.push(e),e.left=x[e.col],e.top=k[e.row],e.merged?c.forScreen?(e.right=e.left+e.width,e.bottom=e.top+e.height):(e.right=r(x,e.col+e.colspan),e.bottom=r(k,e.row+e.rowspan),e.width=e.right-e.left,e.height=e.bottom-e.top):(e.width=h[e.col],e.height=u[e.row],e.bottom=e.top+e.height,e.right=e.left+e.width),C=Math.max(C,e.right),S=Math.max(S,e.bottom),!0)}),Object.keys(p.primary).forEach(function(e){var i=p.primary[e];t.forEach(i.topLeft.toRangeRef(),function(e,o,r){var s=e-n.topLeft.row,a=o-n.topLeft.col;r.merged=!0,r.colspan=i.width(),r.rowspan=i.height(),r.top=s<0?-t._rows.sum(e,e-s-1):k[s],r.left=a<0?-t._columns.sum(o,o-a-1):x[a],r.height=t._rows.sum(i.topLeft.row,i.bottomRight.row),r.width=t._columns.sum(i.topLeft.col,i.bottomRight.col),r.height>0&&r.width>0&&(r.right=r.left+r.width,r.bottom=r.top+r.height,r.row=s,r.col=a,d.push(r))})}),c.headerRows&&(y.forEach(function(e){T.forEach(function(t){t=i(t),t.top+=e,t.bottom=t.top+t.height,d.push(t)}),k.push(e)}),k.sort(l)),{width:C,height:S,cells:d.sort(a),scale:b,xCoords:x,yCoords:k}}function i(e,t){return t||(t={}),Object.assign?Object.assign(t,e):Object.keys(e).reduce(function(t,i){return t[i]=e[i],t},t)}function n(e,t){return e.size===t.size&&e.color===t.color}function o(e,t){return e+t}function r(e,t){return t<e.length?e[t]:e[e.length-1]}function s(e){return null!=e.value||e.merged||null!=e.background||null!=e.borderRight||null!=e.borderBottom||null!=e.validation&&!e.validation.value}function a(e,t){return e.top<t.top?-1:e.top==t.top?e.left<t.left?-1:e.left==t.left?0:1:1}function l(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,n){function o(o,r){var s,a,l,h,p,f,g=r*c,v=g+c,_=o*u,w=_+u,x=0,C=0,S=t.cells.filter(function(e){return!(e.right<=g||e.left>=v||e.bottom<=_||e.top>=w)&&(x=Math.max(e.bottom,x),C=Math.max(e.right,C),!0)});x=Math.min(x,w),C=Math.min(C,v),S.length>0&&(s=new b.Group,i.append(s),a=new b.Group,s.append(a),a.clip(b.Path.fromRect(new y.Rect([g-1,_-1],[C+1,x+1]))),l=y.Matrix.scale(t.scale,t.scale).multiplyCopy(y.Matrix.translate(-g,-_)),(n.hCenter||n.vCenter)&&(l=l.multiplyCopy(y.Matrix.translate(n.hCenter?(v-C)/2:0,n.vCenter?(w-x)/2:0))),a.transform(l),n.guidelines&&(h=null,t.xCoords.forEach(function(e){e=Math.min(e,C),e!==h&&e>=g&&e<=v&&(h=e,a.append((new b.Path).moveTo(e,_).lineTo(e,x).close().stroke(n.guideColor,k)))}),h=null,t.yCoords.forEach(function(e){e=Math.min(e,x),e!==h&&e>=_&&e<=w&&(h=e,a.append((new b.Path).moveTo(g,e).lineTo(C,e).close().stroke(n.guideColor,k)))})),p=m(),S.forEach(function(t){d(t,a,n),p.add(t,e)}),f=new b.Group,p.vert.forEach(function(e){e.forEach(function(e){e.rendered||(e.rendered=!0,f.append((new b.Path).moveTo(e.x,e.top).lineTo(e.x,e.bottom).close().stroke(e.color,e.size)))})}),p.horiz.forEach(function(e){e.forEach(function(e){e.rendered||(e.rendered=!0,f.append((new b.Path).moveTo(e.left,e.y).lineTo(e.right,e.y).close().stroke(e.color,e.size)))})}),a.append(f))}var r,s,a=Math.ceil(t.width/n.pageWidth),l=Math.ceil(t.height/n.pageHeight),c=Math.ceil(n.pageWidth/t.scale),u=Math.ceil(n.pageHeight/t.scale);for(r=0;r<l;++r)for(s=0;s<a;++s)o(r,s)}function d(e,t,i){var n,o,r,s,a,l,c=new b.Group;if(t.append(c),n=new y.Rect([e.left,e.top],[e.width,e.height]),(e.background||e.merged)&&(o=n,i.guidelines&&(o=n.clone(),o.origin.x+=k/2+.1,o.origin.y+=k/2+.1,o.size.width-=k+.2,o.size.height-=k+.2),c.append(new b.Rect(o).fill(e.background||"#fff").stroke(null))),r=e.value,null!=r){if(s="number"==typeof r?"number":null,a=new b.Group,a.clip(b.Path.fromRect(n)),c.append(a),e.format?(l=w.textAndColor(r,e.format),r=l.text,l.type&&(s=l.type)):r+="",!e.textAlign)switch(s){case"number":case"date":case"percent":case"currency":e.textAlign="right";break;case"boolean":e.textAlign="center"}u(r,l&&l.color||e.color||"#000",e,a)}}function u(e,t,i,n){var o,r;switch(x||(x=document.createElement("div"),x.style.position="absolute",x.style.left="0px",x.style.top="0px",x.style.visibility="hidden",x.style.overflow="hidden",x.style.boxSizing="border-box",x.style.padding="2px 4px",x.style.lineHeight="normal",document.body.appendChild(x)),x.firstChild&&x.removeChild(x.firstChild),x.style.color=t,x.style.font=h(i),x.style.width=i.width+"px",x.style.textAlign=i.textAlign||"left",x.style.textDecoration=i.underline?"underline":"none",i.wrap?(x.style.whiteSpace="pre-wrap",x.style.overflowWrap=x.style.wordWrap="break-word"):(x.style.whiteSpace="pre",x.style.overflowWrap=x.style.wordWrap="normal"),x.appendChild(document.createTextNode(e)),o=0,i.verticalAlign){case"center":o=i.height-x.offsetHeight>>1;break;case void 0:case null:case"bottom":o=i.height-x.offsetHeight}o<0&&(o=0),r=kendo.drawing.drawDOM.drawText(x),r.transform(y.Matrix.translate(i.left,i.top+o)),n.append(r)}function h(e){var t=[];return e.italic&&t.push("italic"),e.bold&&t.push("bold"),t.push((e.fontSize||12)+"px"),t.push(e.fontFamily||"Arial"),t.join(" ")}function p(e,i,n,o){var r,s,a,l,d;null==n&&null==o&&(o=i,n={},i=v.SHEETREF),null==o&&(o=n,i instanceof v.Range||i instanceof v.Ref||"string"==typeof i?n={}:(n=i,i=v.SHEETREF)),n=kendo.jQuery.extend({paperSize:"A4",landscape:!0,margin:"1cm",guidelines:!0,guideColor:"#aaa",emptyCells:!0,fitWidth:!1,center:!1,headerRows:null,maxEmpty:.2,scale:1},n),r=new b.Group,s=kendo.pdf.getPaperOptions(n),r.options.set("pdf",{author:n.author,creator:n.creator,date:n.date,keywords:n.keywords,margin:s.margin,multiPage:!0,paperSize:s.paperSize,subject:n.subject,title:n.title}),a=s.paperSize[0],l=s.paperSize[1],s.margin&&(a-=s.margin.left+s.margin.right+1,l-=s.margin.top+s.margin.bottom+1),n.pageWidth=a,n.pageHeight=l,d=t(e,e._ref(i),n),c(e,d,r,n),o(r)}function f(){}function m(){function e(e,n){var o,r;n&&(o=n._properties,r=n._grid,e.borderLeft=o.get("vBorders",r.index(e.row,e.col)),e.borderRight=o.get("vBorders",r.index(e.row,e.col+e.colspan)),e.borderTop=o.get("hBorders",r.index(e.row,e.col)),e.borderBottom=o.get("hBorders",r.index(e.row+e.rowspan,e.col))),e.borderLeft&&t(e.row,e.col,e.borderLeft,e.left,e.top,e.bottom),e.borderRight&&t(e.row,e.col+e.colspan,e.borderRight,e.right,e.top,e.bottom),e.borderTop&&i(e.row,e.col,e.borderTop,e.top,e.left,e.right),e.borderBottom&&i(e.row+e.rowspan,e.col,e.borderBottom,e.bottom,e.left,e.right)}function t(e,t,i,o,s,a){var l=r[t]||(r[t]=new f),c=e>0&&l[e-1];c&&n(c,i)?(l[e]=c,c.bottom=a):l[e]={size:i.size,color:i.color,x:o,top:s,bottom:a}}function i(e,t,i,r,s,a){var l=o[e]||(o[e]=new f),c=t>0&&l[t-1];c&&n(c,i)?(l[t]=c,c.right=a):l[t]={size:i.size,color:i.color,y:r,left:s,right:a}}var o=new f,r=new f;return{add:e,horiz:o,vert:r}}function g(e){function t(e){var t,i;if(null!=e){for(t=12,i=e.length;--i>=0;)t+=o(e.charAt(i));return t}return 0}function n(e){return r?i(e,{borderLeft:r,borderTop:r,borderRight:r,borderBottom:r}):e}var o,r,s=new $.Deferred,a=s.promise();return e=i(e,{dataSource:null,guidelines:!0,guideColor:"#000",columns:null,headerBackground:"#999",headerColor:"#000",oddBackground:null,evenBackground:null,fontFamily:"Arial",fontSize:12,paperSize:"A4",margin:"1cm",landscape:!0,fitWidth:!1,scale:1,rowHeight:20,maxEmpty:1,useGridFormat:!0}),kendo.drawing.pdf.defineFont(kendo.drawing.drawDOM.getFontFaces(document)),o=S(e.fontFamily,e.fontSize),r=e.guidelines?{size:1,color:e.guideColor}:null,e.dataSource.fetch(function(){var i,o,r,a,l,c=e.dataSource.data();return c.length?(i=e.columns.map(function(e){return"string"==typeof e?{title:e,field:e}:e}),o=i.map(function(e){return e.title||e.field}),r=o.map(t),a=c.map(function(o,s){return{cells:i.map(function(i,a){var l=o[i.field];return e.useGridFormat&&(null!=l&&(i.format?l=kendo.format(i.format,l):l+=""),r[a]=Math.max(t(l),r[a])),n({value:l,format:e.useGridFormat?null:i.format,background:s%2?e.evenBackground:e.oddBackground})})}}),a.unshift({cells:o.map(function(t){return n({value:t,background:e.headerBackground,color:e.headerColor})})}),l=new kendo.spreadsheet.Sheet(a.length+1,i.length+1,e.rowHeight,50,20,20,{fontFamily:e.fontFamily,fontSize:e.fontSize,verticalAlign:"center"}),l.fromJSON({name:"Sheet1",rows:a,columns:r.map(function(e,t){return{index:t,width:e}})}),void l.draw({paperSize:e.paperSize,landscape:e.landscape,margin:e.margin,guidelines:!1,scale:e.scale,fitWidth:e.fitWidth,maxEmpty:e.maxEmpty,headerRows:1},s.resolve.bind(s))):s.reject("Empty dataset")}),a}var v,_,b,w,y,k,x,C,S;kendo.support.browser.msie&&kendo.support.browser.version<9||(v=kendo.spreadsheet,_=v.CellRef,b=kendo.drawing,w=v.formatting,y=kendo.geometry,k=.8,v.Sheet.prototype.draw=function(e,t,i){var n=this;n._workbook?n.recalc(n._workbook._context,function(){p(n,e,t,i)}):p(n,e,t,i)},f.prototype={forEach:function(e){Object.keys(this).forEach(function(t){e(this[t],t,this)},this)}},C={},S=function(e,t){var i,n,o,r,s=t+":"+e,a=C[s];if(!a){for(n=document.createElement("div"),n.style.position="fixed",n.style.left="-10000px",n.style.top="-10000px",n.style.fontFamily=e,n.style.fontSize=t+"px",n.style.whiteSpace="pre",o=32;o<128;++o)i=document.createElement("span"),i.appendChild(document.createTextNode(String.fromCharCode(o))),n.appendChild(i);for(document.body.appendChild(n),r={},o=32,i=n.firstChild;o<128&&i;++o,i=i.nextSibling)r[o]=i.offsetWidth;for(;i=n.firstChild;)n.removeChild(i);a=C[s]=function(e){var t=e.charCodeAt(0),o=r[t];return null==o&&(i=document.createElement("span"),i.appendChild(document.createTextNode(String.fromCharCode(t))),n.appendChild(i),o=r[t]=i.offsetWidth,n.removeChild(i)),o}}return a},v.draw={Borders:m,doLayout:t},v.drawTabularData=g)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.spreadsheet.min",["util/undoredostack.min","util/text-metrics.min","util/parse-xml.min","kendo.excel.min","kendo.progressbar.min","kendo.pdf.min","spreadsheet/commands.min","spreadsheet/formulabar.min","spreadsheet/formulainput.min","spreadsheet/eventlistener.min","spreadsheet/rangelist.min","spreadsheet/propertybag.min","spreadsheet/references.min","spreadsheet/navigator.min","spreadsheet/axismanager.min","spreadsheet/clipboard.min","spreadsheet/range.min","spreadsheet/sheet.min","spreadsheet/sheetsbar.min","spreadsheet/excel-reader.min","spreadsheet/workbook.min","spreadsheet/formulacontext.min","spreadsheet/controller.min","spreadsheet/view.min","spreadsheet/customeditors.min","spreadsheet/grid.min","spreadsheet/axis.min","spreadsheet/filter.min","spreadsheet/sorter.min","spreadsheet/runtime.min","spreadsheet/calc.min","spreadsheet/numformat.min","spreadsheet/runtime.functions.min","spreadsheet/runtime.functions.2.min","spreadsheet/toolbar.min","spreadsheet/dialogs.min","spreadsheet/sheetbinder.min","spreadsheet/filtermenu.min","spreadsheet/editor.min","spreadsheet/autofill.min","spreadsheet/nameeditor.min","spreadsheet/print.min"],e)}(function(){return function(e,t){var i,n,o,r,s,a,l,c,d,u;e.support.browser.msie&&e.support.browser.version<9||(i=e.jQuery,n=i.extend({F10:121,F11:122,B:66,I:73,U:85,N:78,H:72,A:65,PAGEDOWN:34,PAGEUP:33,DELETE:46,R:82},e.keys),o=e.ui.Widget,r=e.spreadsheet.Workbook,s=e.spreadsheet.Controller,a=e.spreadsheet.View,l=".kendoSpreadsheet",c={recalc:!0,selection:!0,activeCell:!0,layout:!0,sheetSelection:!0,resize:!0,editorChange:!1,editorClose:!1},d={wrapper:"k-widget k-spreadsheet"},u=e.ui.Widget.extend({init:function(e,t){o.fn.init.call(this,e,t),this.element.addClass(u.classNames.wrapper),this._view=new a(this.element,{messages:this.options.messages.view,toolbar:this.options.toolbar,sheetsbar:this.options.sheetsbar}),this._workbook=new r(this.options,this._view),this._controller=new s(this._view,this._workbook),this._autoRefresh=!0,this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._view.enableClipboard(!1),this.refresh(),this._view.enableClipboard(!0),this._resizeHandler=function(){this.resize()}.bind(this),i(window).on("resize"+l,this._resizeHandler),this.element.on("keydown"+l,this._keyDown.bind(this))},_keyDown:function(e){var o,r=e.keyCode,s=i(".k-spreadsheet-quick-access-toolbar [title=Redo]");if(r===n.F11&&e.shiftKey)return this._view.sheetsbar._onAddSelect(),e.preventDefault(),t;if(e.altKey&&r===n.PAGEDOWN)this._view.sheetsbar.trigger("select",{name:this._view.sheetsbar._sheets[this._view.sheetsbar._selectedIndex+1].name(),isAddButton:!1});else if(e.altKey&&r===n.PAGEUP)this._view.sheetsbar.trigger("select",{name:this._view.sheetsbar._sheets[this._view.sheetsbar._selectedIndex-1].name(),isAddButton:!1});else{if(e.altKey&&r===n.DELETE)return o=function(e){var t=e.sender;t.isConfirmed()&&this._view.sheetsbar.trigger("remove",{name:this.activeSheet()._name(),confirmation:!0})}.bind(this),this._view.sheetsbar._openDialog("confirmation",{close:o}),e.preventDefault(),t;if(e.altKey&&r===n.R)return this._view.sheetsbar._createEditor(),e.preventDefault(),t;if(r===n.F10&&this._view.tabstrip||r===n.TAB&&!e.shiftKey&&i(document.activeElement).is(s))return this._view.tabstrip.toolbars[this._view.tabstrip.element.find("li.k-state-active").text().toLowerCase()].element.find(":not(.k-overflow-anchor):kendoFocusable:first").focus(),this._view.tabstrip.toolbars[this._view.tabstrip.element.find("li.k-state-active").text().toLowerCase()].element.find(".k-toolbar-first-visible").addClass("k-state-focused"),e.preventDefault(),t;if(e.ctrlKey&&r===n.B)i("[data-tool=bold]")[0].click();else if(e.ctrlKey&&r===n.I)i("[data-tool=italic]")[0].click();else if(e.ctrlKey&&r===n.U)i("[data-tool=underline]")[0].click();else{if(e.altKey&&r===n.H)return this._view.tabstrip.select(0),e.preventDefault(),t;if(e.altKey&&r===n.N)return this._view.tabstrip.select(1),e.preventDefault(),t;if(e.altKey&&r===n.A)return this._view.tabstrip.select(2),e.preventDefault(),t}}},_resize:function(){this.refresh({layout:!0})},_workbookChange:function(t){if(this._autoRefresh&&this.refresh(t),t.recalc&&t.ref){var i=t.range||new e.spreadsheet.Range(t.ref,this.activeSheet());this.trigger("change",{range:i})}},_workbookCut:function(e){this.trigger("cut",e)},_workbookCopy:function(e){this.trigger("copy",e)},_workbookPaste:function(e){this.trigger("paste",e)},activeSheet:function(e){return this._workbook.activeSheet(e)},moveSheetToIndex:function(e,t){return this._workbook.moveSheetToIndex(e,t)},insertSheet:function(e){return this._workbook.insertSheet(e)},sheets:function(){return this._workbook.sheets()},removeSheet:function(e){return this._workbook.removeSheet(e)},sheetByName:function(e){return this._workbook.sheetByName(e)},sheetIndex:function(e){return this._workbook.sheetIndex(e)},sheetByIndex:function(e){return this._workbook.sheetByIndex(e)},renameSheet:function(e,t){return this._workbook.renameSheet(e,t)},refresh:function(e){return e||(e=c),e.editorClose||(this._view.sheet(this._workbook.activeSheet()),this._controller.sheet(this._workbook.activeSheet()),this._workbook.refresh(e)),e.editorChange||(this._view.refresh(e),this._controller.refresh(),this._view.render(),this.trigger("render")),this},openDialog:function(e,t){return this._view.openDialog(e,t)},autoRefresh:function(e){return e!==t?(this._autoRefresh=e,e===!0&&this.refresh(),this):this._autoRefresh},toJSON:function(){return this._workbook.toJSON()},fromJSON:function(e){e.sheets?(this._workbook.destroy(),this._workbook=new r(i.extend({},this.options,e)),this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._controller.workbook(this._workbook),this.activeSheet(this.activeSheet())):this.refresh()},fromFile:function(e,t){return this._workbook.fromFile(e,t)},saveAsPDF:function(e){this._workbook.saveAsPDF(i.extend({},this.options.pdf,e,{workbook:this._workbook}))},saveAsExcel:function(e){this._workbook.saveAsExcel(e)},draw:function(e,t){this._workbook.draw(e,t)},_workbookExcelExport:function(e){this.trigger("excelExport",e)&&e.preventDefault()},_workbookExcelImport:function(e){this.trigger("excelImport",e)?e.preventDefault():this._initProgress(e.promise)},_initProgress:function(t){var n=i("<div class='k-loading-mask' style='width: 100%; height: 100%; top: 0;'><div class='k-loading-color'/></div>").appendTo(this.element),o=i("<div class='k-loading-progress'>").appendTo(n).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar");t.progress(function(e){o.value(e.progress)}).always(function(){e.destroy(n),n.remove()})},_workbookPdfExport:function(e){this.trigger("pdfExport",e)&&e.preventDefault()},_workbookInsertSheet:function(e){this.trigger("insertSheet",e)&&e.preventDefault()},_workbookRemoveSheet:function(e){this.trigger("removeSheet",e)&&e.preventDefault()},_workbookSelectSheet:function(e){this.trigger("selectSheet",e)&&e.preventDefault()},_workbookRenameSheet:function(e){this.trigger("renameSheet",e)&&e.preventDefault()},_workbookInsertRow:function(e){this.trigger("insertRow",e)&&e.preventDefault()},_workbookInsertColumn:function(e){this.trigger("insertColumn",e)&&e.preventDefault()},_workbookDeleteRow:function(e){this.trigger("deleteRow",e)&&e.preventDefault()},_workbookDeleteColumn:function(e){this.trigger("deleteColumn",e)&&e.preventDefault()},_workbookHideRow:function(e){this.trigger("hideRow",e)&&e.preventDefault()},_workbookHideColumn:function(e){this.trigger("hideColumn",e)&&e.preventDefault()},_workbookUnhideRow:function(e){this.trigger("unhideRow",e)&&e.preventDefault()},_workbookUnhideColumn:function(e){this.trigger("unhideColumn",e)&&e.preventDefault()},_workbookSelect:function(e){this.trigger("select",e)},_workbookChangeFormat:function(e){this.trigger("changeFormat",e)},_bindWorkbookEvents:function(){this._workbook.bind("cut",this._workbookCut.bind(this)),this._workbook.bind("copy",this._workbookCopy.bind(this)),this._workbook.bind("paste",this._workbookPaste.bind(this)),this._workbook.bind("change",this._workbookChange.bind(this)),this._workbook.bind("excelExport",this._workbookExcelExport.bind(this)),this._workbook.bind("excelImport",this._workbookExcelImport.bind(this)),this._workbook.bind("pdfExport",this._workbookPdfExport.bind(this)),this._workbook.bind("insertSheet",this._workbookInsertSheet.bind(this)),this._workbook.bind("removeSheet",this._workbookRemoveSheet.bind(this)),this._workbook.bind("selectSheet",this._workbookSelectSheet.bind(this)),this._workbook.bind("renameSheet",this._workbookRenameSheet.bind(this)),this._workbook.bind("insertRow",this._workbookInsertRow.bind(this)),this._workbook.bind("insertColumn",this._workbookInsertColumn.bind(this)),this._workbook.bind("deleteRow",this._workbookDeleteRow.bind(this)),this._workbook.bind("deleteColumn",this._workbookDeleteColumn.bind(this)),this._workbook.bind("hideRow",this._workbookHideRow.bind(this)),this._workbook.bind("hideColumn",this._workbookHideColumn.bind(this)),this._workbook.bind("unhideRow",this._workbookUnhideRow.bind(this)),this._workbook.bind("unhideColumn",this._workbookUnhideColumn.bind(this)),this._workbook.bind("select",this._workbookSelect.bind(this)),this._workbook.bind("changeFormat",this._workbookChangeFormat.bind(this))},destroy:function(){e.ui.Widget.fn.destroy.call(this),this._workbook.destroy(),this._controller.destroy(),this._view.destroy(),this._resizeHandler&&i(window).off("resize"+l,this._resizeHandler)},options:{name:"Spreadsheet",toolbar:!0,sheetsbar:!0,rows:200,columns:50,rowHeight:20,columnWidth:64,headerHeight:20,headerWidth:32,excel:{proxyURL:"",fileName:"Workbook.xlsx"},messages:{},pdf:{area:"workbook",fileName:"Workbook.pdf",proxyURL:"",paperSize:"a4",landscape:!0,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+e.version,date:null},defaultCellStyle:{fontFamily:"Arial",fontSize:"12"}},defineName:function(e,t,i){return this._workbook.defineName(e,t,i)},undefineName:function(e){return this._workbook.undefineName(e)},nameValue:function(e){return this._workbook.nameValue(e)},forEachName:function(e){return this._workbook.forEachName(e)},cellContextMenu:function(){return this._view.cellContextMenu},rowHeaderContextMenu:function(){return this._view.rowHeaderContextMenu},colHeaderContextMenu:function(){return this._view.colHeaderContextMenu},events:["cut","copy","paste","pdfExport","excelExport","excelImport","change","render","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","insertSheet","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat"]}),e.spreadsheet.ALL_REASONS=c,e.ui.plugin(u),i.extend(!0,u,{classNames:d}))}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.pivot.configurator.min",["kendo.dom.min"],e)}(function(){return function(e,t){function i(e){for(var t,i=0,n=e.length;i<n;i++)if(2==e[i].type){t=!0;break}t&&e.splice(i+1,0,{caption:"KPIs",defaultHierarchy:"[KPIs]",name:"KPIs",uniqueName:"[KPIs]"})}function n(e){return{name:e.uniqueName,type:e.type}}function o(e){for(var t=0,i=e.length;t<i;t++)e[t].uniqueName=e[t].name,e[t].type="kpi";return e}function r(t){var i=e(t).closest(".k-pivot-setting");return i.length?i.data("kendoPivotSettingTarget"):null}function s(e,t,i){return{hierarchyUniqueName:e,uniqueName:t,caption:t,measure:t,name:t,type:i,kpi:!0}}function a(e){var t=e.name;return[s(t,e.value,"value"),s(t,e.goal,"goal"),s(t,e.status,"status"),s(t,e.trend,"trend")]}var l=window.kendo,c=l.ui,d=c.Widget,u=".kendoPivotConfigurator",h="mouseenter"+u+" mouseleave"+u,p=l.template('<p class="k-reset"><span class="k-icon #=icon#"></span>${name}</p><div class="k-list-container k-reset"/>'),f=d.extend({init:function(e,t){d.fn.init.call(this,e,t),this.element.addClass("k-widget k-fieldselector k-alt k-edit-form-container"),this._dataSource(),this._layout(),this.refresh(),l.notify(this)},events:[],options:{name:"PivotConfigurator",filterable:!1,sortable:!1,messages:{measures:"Drop Data Fields Here",columns:"Drop Column Fields Here",rows:"Drop Rows Fields Here",measuresLabel:"Measures",columnsLabel:"Columns",rowsLabel:"Rows",fieldsLabel:"Fields"}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler).unbind("error",t._errorHandler).unbind("progress",t._progressHandler):(t._errorHandler=e.proxy(t._error,t),t._refreshHandler=e.proxy(t.refresh,t),t._progressHandler=e.proxy(t._requestStart,t)),t.dataSource=l.data.PivotDataSource.create(t.options.dataSource),t.dataSource.bind("change",t._refreshHandler).bind("error",t._errorHandler).bind("progress",t._progressHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.measures&&this.measures.setDataSource(e),this.rows&&this.rows.setDataSource(e),this.columns&&this.columns.setDataSource(e),this.refresh()},_treeViewDataSource:function(){var t=this;return l.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(e){return!("hierarchyUniqueName"in e||"aggregator"in e)}}},transport:{read:function(n){var r,s,l;e.isEmptyObject(n.data)?(r=t.dataSource.schemaDimensions(),r.done(function(e){t.dataSource.cubeBuilder||i(e),n.success(e)}).fail(n.error)):(s=t.treeView.dataSource.get(n.data.uniqueName),"[KPIs]"===s.uniqueName?(l=!0,r=t.dataSource.schemaKPIs(),r.done(function(e){n.success(o(e))}).fail(n.error)):"kpi"==s.type&&(l=!0,n.success(a(s))),l||(r=2==s.type?t.dataSource.schemaMeasures():s.dimensionUniqueName?t.dataSource.schemaLevels(n.data.uniqueName):t.dataSource.schemaHierarchies(n.data.uniqueName),r.done(n.success).fail(n.error)))}}})},_progress:function(e){l.ui.progress(this.element,e)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_layout:function(){this.form=e('<div class="k-columns k-state-default k-floatwrap"/>').appendTo(this.element),this._fields(),this._targets()},_fields:function(){var t=e('<div class="k-state-default"><p class="k-reset"><span class="k-icon k-i-group"></span>'+this.options.messages.fieldsLabel+"</p></div>").appendTo(this.form),i='# if (item.type == 2 || item.uniqueName == "[KPIs]") { #<span class="k-icon k-i-#= (item.type == 2 ? "sum" : "kpi") #"></span># } else if (item.type && item.type !== "kpi") { #<span class="k-icon k-i-arrows-dimensions"></span># } ##: item.caption || item.name #';this.treeView=e("<div/>").appendTo(t).kendoTreeView({template:i,dataTextField:"caption",dragAndDrop:!0,autoBind:!1,dataSource:this._treeViewDataSource(),dragstart:function(e){var t=this.dataItem(e.sourceNode);(t.hasChildren||t.aggregator||t.measure)&&2!=t.type&&"[KPIs]"!==t.uniqueName||e.preventDefault()},drag:function(e){var t="k-i-cancel",i=r(e.dropTarget);i&&i.validate(this.dataItem(e.sourceNode))&&(t="k-i-plus"),e.setStatusClass(t)},drop:function(e){var t,i,o,s,l,c;if(e.preventDefault(),t=r(e.dropTarget),i=this.dataItem(e.sourceNode),t&&t.validate(i)){if(c=i.defaultHierarchy||i.uniqueName,"kpi"===i.type)for(l=a(i),s=l.length,c=[],o=0;o<s;o++)c.push(n(l[o]));else i.kpi&&(c=[n(i)]);t.add(c)}}}).data("kendoTreeView")},_createTarget:function(t,i){var n='<li class="k-item k-header" data-'+l.ns+'name="${data.name}">${data.name}',o=i.sortable,r="";return o&&(r+="#if (data.sortIcon) {#",r+='<span class="k-icon ${data.sortIcon}-sm"></span>',r+="#}#"),(i.filterable||o)&&(r+='<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),r+='<span class="k-icon k-i-close k-setting-delete"></span>',n+='<span class="k-field-actions">'+r+"</span></li>",new l.ui.PivotSettingTarget(t,e.extend({dataSource:this.dataSource,hint:function(t){var i=e('<div class="k-fieldselector"><ul class="k-list k-reset"></ul></div>');return i.find(".k-list").append(t.clone()),i},template:n,emptyTemplate:'<li class="k-item k-empty">${data}</li>'},i))},_targets:function(){var t=e('<div class="k-state-default"/>').appendTo(this.form),i=e(p({name:this.options.messages.columnsLabel,icon:"k-i-columns"})).appendTo(t),n=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(i.last()),o=e(p({name:this.options.messages.rowsLabel,icon:"k-i-rows"})).appendTo(t),r=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(o.last()),s=e(p({name:this.options.messages.measuresLabel,icon:"k-i-sum"})).appendTo(t),a=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(s.last()),l=this.options;this.columns=this._createTarget(n,{filterable:l.filterable,sortable:l.sortable,connectWith:r,messages:{empty:l.messages.columns,fieldMenu:l.messages.fieldMenu}}),this.rows=this._createTarget(r,{filterable:l.filterable,sortable:l.sortable,setting:"rows",connectWith:n,messages:{empty:this.options.messages.rows,fieldMenu:this.options.messages.fieldMenu}}),this.measures=this._createTarget(a,{setting:"measures",messages:{empty:l.messages.measures}}),n.add(r).add(a).on(h,".k-item:not(.k-empty)",this._toggleHover)},_toggleHover:function(t){e(t.currentTarget).toggleClass("k-state-hover","mouseenter"===t.type)},_resize:function(){var e,t,i=this.element,n=this.options.height,o=l._outerHeight;n&&(i.height(n),i.is(":visible")&&(t=i.children(".k-columns").children("div.k-state-default"),n=i.innerHeight(),e=(o(i)-n)/2,n=n-(o(t,!0)-t.height())-e,t.height(n)))},refresh:function(){var e=this.dataSource;(e.cubeBuilder||this._cube!==e.cube()||this._catalog!==e.catalog())&&this.treeView.dataSource.fetch(),this._catalog=this.dataSource.catalog(),
this._cube=this.dataSource.cube(),this._resize(),this._progress(!1)},destroy:function(){d.fn.destroy.call(this),this.dataSource.unbind("change",this._refreshHandler),this.form.find(".k-list").off(u),this.rows.destroy(),this.columns.destroy(),this.measures.destroy(),this.treeView.destroy(),this.element=null,this._refreshHandler=null}});c.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.angular.min",["kendo.core.min"],e)}(function(){return function(e,t,i){"use strict";function n(e){var t=T;try{return T=function(e){return e()},e()}finally{T=t}}function o(t,n,o,c,d,g){function v(){var i,g,v,_,b,x,S;return o.kRebind&&(i=e(e(n)[0].cloneNode(!0))),C=r(t,n,o,c,k).options,n.is("select")&&!function(t){var i,n;if(t.length>0)for(i=e(t[0]),!/\S/.test(i.text())&&/^\?/.test(i.val())&&i.remove(),n=0;n<t.length;n++)e(t[n]).off("$destroy")}(n[0].options),g=k.call(n,E=C).data(c),l(g,t,o,c,d),t.$emit("kendoWidgetCreated",g),v=p(t,g),o.kRebind&&m(g,t,n,i,o.kRebind,v,o),o.kNgDisabled&&(_=o.kNgDisabled,b=t.$eval(_),b&&g.enable(!b),s(g,t,n,_)),o.kNgReadonly&&(x=o.kNgReadonly,S=t.$eval(x),S&&g.readonly(S),a(g,t,n,x)),o.kNgModel&&h(g,t,o.kNgModel),w&&u(g,t,n,w,y),g&&f(g,n),g}var _,b,w,y,k,x,C,S,D,A,I,M,R,F;if(!(n 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,b=t.$eval(_),g=g||[],w=g[0],y=g[1],k=e(n)[c],!k)return window.console.error("Could not find: "+c),null;if(x=r(t,n,o,c,k),C=x.options,x.unresolved.length){for(S=[],D=0,A=x.unresolved.length;D<A;D++)I=x.unresolved[D],M=e.Deferred(function(e){var n=t.$watch(I.path,function(t){t!==i&&(n(),e.resolve())})}).promise(),S.push(M);return e.when.apply(null,S).then(v),i}return _&&!b?(R=t.$root||t,F=function(){var e=t.$watch(_,function(t){t!==i&&(e(),n.removeAttr(o.$attr.kNgDelay),_=null,T(v))})},/^\$(digest|apply)$/.test(R.$$phase)?F():t.$apply(F),i):v()}function r(n,o,r,s,a){function l(e,o){var r=t.copy(n.$eval(o));r===i?f.push({option:e,path:o}):c[e]=r}var c,d,u,h,p=s.replace(/^kendo/,""),f=[],m=r.kOptions||r.options,g=n.$eval(m);return m&&g===i&&f.push({option:"options",path:m}),c=t.extend({},r.defaultOptions,g),d=a.widget.prototype.options,u=a.widget.prototype.events,e.each(r,function(e,t){var i,n,o,r;"source"!==e&&"kDataSource"!==e&&"kScopeField"!==e&&"scopeField"!==e&&(i="data"+e.charAt(0).toUpperCase()+e.slice(1),0===e.indexOf("on")&&(n=e.replace(/^on./,function(e){return e.charAt(2).toLowerCase()}),u.indexOf(n)>-1&&(c[n]=t)),d.hasOwnProperty(i)?l(i,t):d.hasOwnProperty(e)&&!R[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)))))}),h=r.kDataSource||r.source,h&&(c.dataSource=I(n,o,p,h)),c.$angular=[n],{options:c,unresolved:f}}function s(e,t,n,o){return kendo.ui.PanelBar&&e instanceof kendo.ui.PanelBar||kendo.ui.Menu&&e instanceof kendo.ui.Menu?(A.warn("k-ng-disabled specified on a widget that does not have the enable() method: "+e.options.name),i):(t.$watch(o,function(t,i){t!=i&&e.enable(!t)}),i)}function a(e,t,n,o){return"function"!=typeof e.readonly?(A.warn("k-ng-readonly specified on a widget that does not have the readonly() method: "+e.options.name),i):(t.$watch(o,function(t,i){t!=i&&e.readonly(t)}),i)}function l(e,t,i,n,o){if(i[o]){var r=S(i[o]).assign;if(!r)throw Error(o+" attribute used but expression in it is not assignable: "+i[n]);r(t,e)}}function c(e){return/checkbox|radio/i.test(e.attr("type"))?e.prop("checked"):e.val()}function d(e){return F.test(e[0].tagName)}function u(e,t,n,o,r){var s,a,l,u,h;e.value&&(a=!1,s=d(n)?function(){return c(n)}:function(){return e.value()},l=function(){var n=o.$viewValue;n===i&&(n=o.$modelValue),n===i&&(n=null),a=!0,setTimeout(function(){if(a=!1,e){var i=t[e.element.attr("k-ng-model")];i&&(n=i),e.options.autoBind!==!1||e.listView.bound()?e.value(n):n&&e.value(n)}},0)},o.$render=l,setTimeout(function(){o.$render!==l&&(o.$render=l)()}),d(n)&&n.on("change",function(){a=!0}),u=function(e){return function(){var i;a&&!n.is("select")||(e&&r&&(i=r.$pristine),o.$setViewValue(s()),e&&(o.$setPristine(),i&&r.$setPristine()),w(t))}},e.first("change",u(!1)),e.first("spin",u(!1)),kendo.ui.AutoComplete&&e instanceof kendo.ui.AutoComplete||e.first("dataBound",u(!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 h(t,n,o){var r,s,a,l,c,d,u,h,p,f;return"function"!=typeof t.value?(A.warn("k-ng-model specified on a widget that does not have the value() method: "+t.options.name),i):(r=e(t.element).parents("ng-form, form").first(),s=kendo.getter(r.attr("name"),!0)(n),a=S(o),l=a.assign,c=!1,d=kendo.ui.MultiSelect&&t instanceof kendo.ui.MultiSelect||kendo.ui.RangeSlider&&t instanceof kendo.ui.RangeSlider,u=function(e){return e&&d?e.length:0},h=u(a(n)),t.$angular_setLogicValue(a(n)),p=function(e,n){e===i&&(e=null),c||e==n&&u(e)==h||(h=u(e),t.$angular_setLogicValue(e))},d?n.$watchCollection(o,p):n.$watch(o,p),f=function(){c=!0,s&&s.$pristine&&s.$setDirty(),w(n,function(){l(n,t.$angular_getLogicValue()),h=u(a(n))}),c=!1},t.first("change",f),t.first("spin",f),i)}function p(e,t){var i=e.$on("$destroy",function(){i(),t&&(kendo.destroy(t.element),t=null)});return i}function f(t,i){function n(){s.disconnect()}function o(){s.observe(e(i)[0],{attributes:!0})}var r,s;window.MutationObserver&&t.wrapper&&(r=[].slice.call(e(i)[0].classList),s=new MutationObserver(function(i){n(),t&&(i.forEach(function(i){var n,o=e(t.wrapper)[0];switch(i.attributeName){case"class":n=[].slice.call(i.target.classList),n.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){n.indexOf(e)<0&&(o.classList.remove(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.remove(e))}),r=n;break;case"disabled":"function"!=typeof t.enable||t.element.attr("readonly")||t.enable(!e(i.target).attr("disabled"));break;case"readonly":"function"!=typeof t.readonly||t.element.attr("disabled")||t.readonly(!!e(i.target).attr("readonly"))}}),o())}),o(),t.first("destroy",n))}function m(t,i,n,o,r,s,a){var l=i.$watch(r,function(r,c){var d,u,h,p,f;t._muteRebind||r===c||(l(),a._cleanUp&&a._cleanUp(),d=U[t.options.name],d&&d.forEach(function(t){var n=i.$eval(a["k"+t]);n&&o.append(e(n).attr(kendo.toHyphens("k"+t),""))}),u=e(t.wrapper)[0],h=e(t.element)[0],p="Upload"===t.options.name,p&&(n=e(h)),f=n.injector().get("$compile"),t._destroy(),s&&s(),t=null,h&&(u&&u.parentNode.replaceChild(h,u),e(n).replaceWith(o)),f(o)(i))},!0);w(i)}function g(e,t){return function(i,n){return e.call(t,i,n)}}function v(e,t){this[e]=kendo.stringify(t)}function _(e,i){function n(e,t){x.directive(e,["directiveFactory",function(i){return i.create(t,e)}])}var o,r,s,a,l=i?"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"),z.indexOf(l.replace("kendo",""))==-1&&(a=l===r?[l]:[l,r],t.forEach(a,function(e){x.directive(e,function(){return{restrict:"E",replace:!0,template:function(e,t){var i=P[o]||"div",n=t.kScopeField||t.scopeField;return"<"+i+" "+s+(n?'="'+n+'"':"")+">"+e.html()+"</"+i+">"}}})})),B.indexOf(l.replace("kendo",""))>-1||(n(l,l),r!=l&&n(r,l))}function b(t){return t=e(t),kendo.widgetInstance(t,kendo.ui)||kendo.widgetInstance(t,kendo.mobile.ui)||kendo.widgetInstance(t,kendo.dataviz.ui)}function w(e,t){var i=e.$root||e,n=/^\$(digest|apply)$/.test(i.$$phase);t?n?t():i.$apply(t):n||i.$digest()}function y(t,i){t.$destroy(),i&&e(i).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function k(i,n,o){var r,s,a;if(e.isArray(i))return t.forEach(i,function(e){k(e,n,o)});if("string"==typeof i){for(r=i.split("."),s=kendo;s&&r.length>0;)s=s[r.shift()];if(!s)return W.push([i,n,o]),!1;i=s.prototype}return a=i[n],i[n]=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 x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U;t&&t.injector&&(x=t.module("kendo.directives",[]),C=t.injector(["ng"]),S=C.get("$parse"),T=C.get("$timeout"),A=C.get("$log"),I=function(){var e={TreeList:"TreeListDataSource",TreeView:"HierarchicalDataSource",Scheduler:"SchedulerDataSource",PivotGrid:"PivotDataSource",PivotConfigurator:"PivotDataSource",PanelBar:"HierarchicalDataSource",Menu:"$PLAIN",ContextMenu:"$PLAIN"},t=function(e,t){return"$PLAIN"==t?e:kendo.data[t].create(e)};return function(i,n,o,r){var s=e[o]||"DataSource",a=i.$eval(r),l=t(a,s);return i.$watch(r,function(e){var i,o=b(n);o&&"function"==typeof o.setDataSource&&e!==a&&e!==o.dataSource&&(i=t(e,s),o.setDataSource(i),a=e)}),l}}(),M={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},R={name:!0,title:!0,style:!0},F=/^(input|select|textarea)$/i,x.factory("directiveFactory",["$compile",function(t){var i,n,r=!1;return D=t,n=function(t,n){return{restrict:"AC",require:["?ngModel","^?form"],scope:!1,controller:["$scope","$attrs","$element",function(e,t){this.template=g(v,t),t._cleanUp=g(function(){this.template=null,t._cleanUp=null},this)}],link:function(s,a,l,c){var d,u=e(a),h=t.replace(/([A-Z])/g,"-$1");u.attr(h,u.attr("data-"+h)),u[0].removeAttribute("data-"+h),d=o(s,a,l,t,n,c),d&&(i&&clearTimeout(i),i=setTimeout(function(){s.$emit("kendoRendered"),r||(r=!0,e("form").each(function(){var t=e(this).controller("form");t&&t.$setPristine()}))}))}}},{create:n}}]),P={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",PanelBar:"ul",TreeView:"ul",Menu:"ul",ContextMenu:"ul",ActionSheet:"ul"},z=["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,x.directive(e,function(){return{restrict:"A",link:function(t,i,n){o(t,i,n,e,e)}}})}),L=kendo.htmlEncode,H=/{{/g,N=/}}/g,O="{&#8203;{",V="}&#8203;}",kendo.htmlEncode=function(e){return L(e).replace(H,O).replace(N,V)},W=[],kendo.onWidgetRegistered(function(t){W=e.grep(W,function(e){return!k.apply(null,e)}),_(t.widget,"Mobile"==t.prefix)}),k(["ui.Widget","mobile.ui.Widget"],"angular",function(o,r){var s,a=this.self;return"init"==o?(!r&&E&&(r=E),E=null,r&&r.$angular&&(a.$angular_scope=r.$angular[0],a.$angular_init(a.element,r)),i):(s=a.$angular_scope,s&&n(function(){var n,l,c=r(),d=c.elements,u=c.data;if(d.length>0)switch(o){case"cleanup":t.forEach(d,function(t){var i=e(t).data("$$kendoScope");i&&i!==s&&i.$$kendoScope&&y(i,t)});break;case"compile":n=a.element.injector(),l=n?n.get("$compile"):D,t.forEach(d,function(t,n){var o,r;c.scopeFrom?o=c.scopeFrom:(r=u&&u[n],r!==i?(o=e.extend(s.$new(),r),o.$$kendoScope=!0):o=s),e(t).data("$$kendoScope",o),l(t)(o)}),w(s)}}),i)}),k("ui.Widget","$angular_getLogicValue",function(){return this.self.value()}),k("ui.Widget","$angular_setLogicValue",function(e){this.self.value(e)}),k("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}),k("ui.Select","$angular_setLogicValue",function(e){var t=this.self,n=t.options,o=n.dataValueField,r=n.text||"";e===i&&(e=""),o&&!n.valuePrimitive&&e&&(r=e[n.dataTextField]||"",e=e[o||n.dataTextField]),t.options.autoBind!==!1||t.listView.bound()?t.value(e):!r&&e&&n.valuePrimitive?t.value(e):t._preselect(e,r)}),k("ui.MultiSelect","$angular_getLogicValue",function(){var t=this.self.dataItems().slice(0),i=this.self.options.dataValueField;return i&&this.self.options.valuePrimitive&&(t=e.map(t,function(e){return e[i]})),t}),k("ui.MultiSelect","$angular_setLogicValue",function(t){var i,n,o,r;null==t&&(t=[]),i=this.self,n=i.options,o=n.dataValueField,r=t,o&&!n.valuePrimitive&&(t=e.map(t,function(e){return e[o]})),n.autoBind!==!1||n.valuePrimitive||i.listView.bound()?i.value(t):i._preselect(r,t)}),k("ui.Widget","$angular_init",function(t,i){var n,o,r,s,a=this.self;if(i&&!e.isArray(i))for(n=a.$angular_scope,o=a.events.length;--o>=0;)r=a.events[o],s=i[r],s&&"string"==typeof s&&(i[r]=a.$angular_makeEventHandler(r,n,s))}),k("ui.Widget","$angular_makeEventHandler",function(e,t,i){return i=S(i),function(e){w(t,function(){i(t,{kendoEvent:e})})}}),k(["ui.Grid","ui.ListView","ui.TreeView","ui.PanelBar"],"$angular_makeEventHandler",function(e,i,n){return"change"!=e?this.next():(n=S(n),function(e){var o,r,s,a,l,c,d,u,h,p=e.sender,f=p.options,m={kendoEvent:e};for(t.isString(f.selectable)&&(o=f.selectable.indexOf("cell")!==-1,r=f.selectable.indexOf("multiple")!==-1),p._checkBoxSelection&&(r=!0),s=m.selected=this.select(),a=m.data=[],l=m.columns=[],d=0;d<s.length;d++)u=o?s[d].parentNode:s[d],h=p.dataItem(u),o?(t.element.inArray(h,a)<0&&a.push(h),c=t.element(s[d]).index(),t.element.inArray(c,l)<0&&l.push(c)):a.push(h);r||(m.dataItem=m.data=a[0],m.angularDataItem=kendo.proxyModelSetters(m.dataItem),m.selected=s[0]),w(i,function(){n(i,m)})})}),k("ui.Grid","$angular_init",function(n,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!==i&&!e.encoded||(e.template="<span ng-bind='"+kendo.expr(e.field,"dataItem")+"'>#: "+kendo.expr(e.field,r.paramName)+"#</span>")})}}),k("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}),k("mobile.ui.ButtonGroup","_select",function(){this.next(),this.self.trigger("change")}),x.directive("kendoMobileApplication",function(){return{terminal:!0,link:function(e,t,i){o(e,t,i,"kendoMobileApplication","kendoMobileApplication")}}}).directive("kendoMobileView",function(){return{scope:!0,link:{pre:function(e,t,i){i.defaultOptions=e.viewOptions,i._instance=o(e,t,i,"kendoMobileView","kendoMobileView")},post:function(e,t,i){i._instance._layout(),i._instance._scroller()}}}}).directive("kendoMobileDrawer",function(){return{scope:!0,link:{pre:function(e,t,i){i.defaultOptions=e.viewOptions,i._instance=o(e,t,i,"kendoMobileDrawer","kendoMobileDrawer")},post:function(e,t,i){i._instance._layout(),i._instance._scroller()}}}}).directive("kendoMobileModalView",function(){return{scope:!0,link:{pre:function(e,t,i){i.defaultOptions=e.viewOptions,i._instance=o(e,t,i,"kendoMobileModalView","kendoMobileModalView")},post:function(e,t,i){i._instance._layout(),i._instance._scroller()}}}}).directive("kendoMobileSplitView",function(){return{terminal:!0,link:{pre:function(e,t,i){i.defaultOptions=e.viewOptions,i._instance=o(e,t,i,"kendoMobileSplitView","kendoMobileSplitView")},post:function(e,t,i){i._instance._layout()}}}}).directive("kendoMobilePane",function(){return{terminal:!0,link:{pre:function(e,t,i){i.defaultOptions=e.viewOptions,o(e,t,i,"kendoMobilePane","kendoMobilePane")}}}}).directive("kendoMobileLayout",function(){return{link:{pre:function(e,t,i){o(e,t,i,"kendoMobileLayout","kendoMobileLayout")}}}}).directive("kendoMobileActionSheet",function(){return{restrict:"A",link:function(t,i,n){i.find("a[k-action]").each(function(){e(this).attr("data-"+kendo.ns+"action",e(this).attr("k-action"))}),o(t,i,n,"kendoMobileActionSheet","kendoMobileActionSheet")}}}).directive("kendoMobilePopOver",function(){return{terminal:!0,link:{pre:function(e,t,i){i.defaultOptions=e.viewOptions,o(e,t,i,"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);x.directive(t,function(){return{restrict:"A",priority:2,link:function(i,n,o){n.attr(kendo.attr(kendo.toHyphens(e)),i.$eval(o[t]))}}})}),U={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"],PanelBar:["Template"],TreeView:["Template"],Validator:["ErrorTemplate"]},function(){var e={};t.forEach(U,function(i,n){t.forEach(i,function(t){e[t]||(e[t]=[]),e[t].push("?^^kendo"+n)})}),t.forEach(e,function(e,t){var i="k"+t,n=kendo.toHyphens(i);x.directive(i,function(){return{restrict:"A",require:e,terminal:!0,compile:function(t,o){if(""===o[i]){t.removeAttr(n);var r=t[0].outerHTML;return function(t,o,s,a){for(var l;!l&&a.length;)l=a.shift();l?(l.template(i,r),o.remove()):A.warn(n+" without a matching parent widget found. It can be one of the following: "+e.join(", "))}}}}})})}())}(window.kendo.jQuery,window.angular),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.web.min",["kendo.core.min","kendo.router.min","kendo.view.min","kendo.fx.min","kendo.dom.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.ooxml.min","kendo.excel.min","kendo.data.signalr.min","kendo.binder.min","kendo.drawing.min","kendo.validator.min","kendo.userevents.min","kendo.draganddrop.min","kendo.mobile.scroller.min","kendo.groupable.min","kendo.reorderable.min","kendo.resizable.min","kendo.sortable.min","kendo.selectable.min","kendo.chat.min","kendo.button.min","kendo.buttongroup.min","kendo.pager.min","kendo.popup.min","kendo.notification.min","kendo.tooltip.min","kendo.list.min","kendo.calendar.min","kendo.datepicker.min","kendo.dateinput.min","kendo.autocomplete.min","kendo.dropdownlist.min","kendo.dropdowntree.min","kendo.combobox.min","kendo.multiselect.min","kendo.multicolumncombobox.min","kendo.colorpicker.min","kendo.columnmenu.min","kendo.columnsorter.min","kendo.grid.min","kendo.listview.min","kendo.listbox.min","kendo.filebrowser.min","kendo.imagebrowser.min","kendo.editor.min","kendo.numerictextbox.min","kendo.maskedtextbox.min","kendo.mediaplayer.min","kendo.menu.min","kendo.editable.min","kendo.pivot.fieldmenu.min","kendo.filtercell.min","kendo.panelbar.min","kendo.progressbar.min","kendo.responsivepanel.min","kendo.tabstrip.min","kendo.timepicker.min","kendo.toolbar.min","kendo.datetimepicker.min","kendo.treeview.draganddrop.min","kendo.treeview.min","kendo.slider.min","kendo.splitter.min","kendo.upload.min","kendo.dialog.min","kendo.window.min","kendo.virtuallist.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.recurrence.min","kendo.scheduler.min","kendo.gantt.list.min","kendo.gantt.timeline.min","kendo.gantt.min","kendo.treelist.min","kendo.pivotgrid.min","kendo.spreadsheet.min","kendo.pivot.configurator.min","kendo.angular.min"],e)}(function(){"bundle all";return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/core/kendo-core.min",["kendo.core.min","kendo.drawing.min"],e)}(function(){!function(e){function t(e){return Array.isArray(e)}function i(e,i){var n,o,r=t(i)?i:[i];for(n=0;n<r.length;n++)o=r[n],e.className.indexOf(o)===-1&&(e.className+=" "+o)}function n(e,t){e&&e.className&&(e.className=e.className.replace(t,"").replace(_t," "))}function o(e){var t,i=.5;for(e.options.stroke&&kendo.drawing.util.defined(e.options.stroke.width)&&e.options.stroke.width%2===0&&(i=0),t=0;t<e.segments.length;t++)e.segments[t].anchor().round(0).translate(i,i);return e}function r(e,t){return-e.x*t.y+e.y*t.x<0}function s(e){return"number"==typeof e&&!isNaN(e)}function a(e){return typeof e===ct}function l(e){return s(e)||a(e)&&isFinite(e)}function c(e){return"object"==typeof e}function d(e){return s(e)?e+"px":e}function u(e){return bt.test(e)}function h(e,i){var n,o,r,s,l,h=a(i)?[i]:i;if(t(h)){for(n={},o=window.getComputedStyle(e),r=0;r<h.length;r++)s=h[r],n[s]=u(s)?parseFloat(o[s]):o[s];return n}if(c(i))for(l in i)e.style[l]=d(i[l])}function p(e,t){void 0===t&&(t=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof e?i[dt]=i[at]=i[Le]=i[Ze]=e:(i[dt]=e[dt]||t,i[at]=e[at]||t,i[Le]=e[Le]||t,i[Ze]=e[Ze]||t),i}function f(e){void 0===e&&(e={});var t;return e.template?e.template=t=Et.compile(e.template):Re(e.content)&&(t=e.content),t}function m(e,t){var i,n=e.length,o=[];for(i=0;i<n;i++)t(e[i])&&o.push(e[i]);return o}function g(e,t){var i,n;if(e.className)for(i=t.split(" "),n=0;n<i.length;n++)if(e.className.indexOf(i[n])!==-1)return!0}function v(e,t){if(t)return t.indexOf(e)!==-1}function _(e,t,i){return kendo.drawing.util.round(e+(t-e)*i,Oe)}function b(e,t){var i,n,o=e.length,r=[];for(i=0;i<o;i++)n=t(e[i]),kendo.drawing.util.defined(n)&&r.push(n);return r}function w(e){var t=0;return e.wheelDelta&&(t=-e.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=kendo.drawing.util.round(e.detail/3)),t}function y(e,t){var i=e.prototype;i.options=i.options?Me({},i.options,t):t}function k(e){var t,i,n,o=Je,r=et;for(t=0,i=e.length;t<i;t++)n=e[t],null!==n&&isFinite(n)&&(o=Math.min(o,n),r=Math.max(r,n));return{min:o===Je?void 0:o,max:r===et?void 0:r}}function x(e,t){var i,n,o,r=$t(t-e,je-1);if(0===r){if(0===t)return.1;r=Math.abs(t)}return i=Math.pow(10,Math.floor(Math.log(r)/Math.log(10))),n=$t(r/i,je),o=1,o=n<1.904762?.2:n<4.761904?.5:n<9.523809?1:2,$t(i*o,je)}function C(e,t,i,n,o){var r=Gt(o);return new Xt(i+(e-i)*Math.cos(r)+(t-n)*Math.sin(r),n-(e-i)*Math.sin(r)+(t-n)*Math.cos(r))}function S(e,t){return e-t}function T(e,t){var i,n,o,r,s,a,l,c,d;return e.x1===t.x1&&e.y1===t.y1&&e.x2===t.x2&&e.y2===t.y2?t:(i=Math.min(e.x1,t.x1),n=Math.max(e.x1,t.x1),o=Math.min(e.x2,t.x2),r=Math.max(e.x2,t.x2),s=Math.min(e.y1,t.y1),a=Math.max(e.y1,t.y1),l=Math.min(e.y2,t.y2),c=Math.max(e.y2,t.y2),d=[],d[0]=new Zt(n,s,o,a),d[1]=new Zt(i,a,n,l),d[2]=new Zt(o,a,r,l),d[3]=new Zt(n,l,o,c),e.x1===i&&e.y1===s||t.x1===i&&t.y1===s?(d[4]=new Zt(i,s,n,a),d[5]=new Zt(o,l,r,c)):(d[4]=new Zt(o,s,r,a),d[5]=new Zt(i,l,n,c)),m(d,function(e){return e.height()>0&&e.width()>0})[0])}function D(t){var i,n,o=t.stops,r=t.innerRadius/t.radius*100,s=o.length,a=[];for(i=0;i<s;i++)n=e.extend({},o[i]),n.offset=(n.offset*(100-r)+r)/100,a.push(n);return a}function A(e){var t=e.origin,i=e.bottomRight();return new Zt(t.x,t.y,i.x,i.y)}function E(e,t){var i=e.tickX,n=e.tickY,r=e.position,s=new ke({stroke:{width:t.width,color:t.color}});return e.vertical?s.moveTo(i,r).lineTo(i+t.size,r):s.moveTo(r,n).lineTo(r,n+t.size),o(s),s}function I(e,t){var i=e.lineStart,n=e.lineEnd,r=e.position,s=new ke({stroke:{width:t.width,color:t.color,dashType:t.dashType}});return e.vertical?s.moveTo(i,r).lineTo(n,r):s.moveTo(r,i).lineTo(r,n),o(s),s}function M(e,t){var i=e.getTime()-t,n=e.getTimezoneOffset()-t.getTimezoneOffset();return i-n*Mi}function R(e,t){return new Date(e.getTime()+t)}function F(e){var t;return e instanceof Date?t=e:e&&(t=new Date(e)),t}function P(e,t){var i,n;if(void 0===t&&(t=0),i=0,n=e.getDay(),!isNaN(n))for(;n!==t;)0===n?n=6:n--,i++;return R(e,-i*Fi)}function z(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function B(e,t){var i,n=new Date(e);return n.setMinutes(0,0,0),i=(e.getTimezoneOffset()-n.getTimezoneOffset())*Mi,R(n,i+t*Ri)}function L(e,t,i,n){var o,r,s=e;return e&&(o=F(e),r=o.getHours(),i===Ai?(s=new Date(o.getFullYear()+t,0,1),z(s,0)):i===Di?(s=new Date(o.getFullYear(),o.getMonth()+t,1),z(s,r)):i===Ti?(s=L(P(o,n),7*t,Si),z(s,r)):i===Si?(s=new Date(o.getFullYear(),o.getMonth(),o.getDate()+t),z(s,r)):i===Ci?s=B(o,t):i===xi?(s=R(o,t*Mi),s.getSeconds()>0&&s.setSeconds(0)):i===ki?s=R(o,t*Ii):i===yi&&(s=R(o,t)),i!==yi&&s.getMilliseconds()>0&&s.setMilliseconds(0)),s}function H(e,t,i){return L(F(e),0,t,i)}function N(e,t,i){var n=F(e);return n&&H(n,t,i).getTime()===n.getTime()?n:L(n,1,t,i)}function O(e,t){return e&&t?e.getTime()-t.getTime():-1}function V(e,t){return e.getTime()-t}function W(e){var i,n;if(t(e)){for(i=[],n=0;n<e.length;n++)i.push(W(e[n]));return i}if(e)return F(e).getTime()}function U(e,t){return e&&t?W(e)===W(t):e===t}function q(e,t,i){return M(e,t)/Li[i]}function j(e,t,i,n){var o,r=F(e),s=F(t);return o=i===Di?r.getMonth()-s.getMonth()+12*(r.getFullYear()-s.getFullYear())+q(r,new Date(r.getFullYear(),r.getMonth()),Si)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Ai?r.getFullYear()-s.getFullYear()+j(r,new Date(r.getFullYear(),0),Di,1)/12:i===Si||i===Ti?q(r,s,i):V(r,t)/Li[i],o/n}function G(e,t,i){var n;return n=i===Ai?t.getFullYear()-e.getFullYear():i===Di?12*G(e,t,Ai)+t.getMonth()-e.getMonth():i===Si?Math.floor(V(t,e)/Fi):Math.floor(V(t,e)/Li[i])}function $(e,t){for(var i,n,o=0,r=t.length-1;o<=r;)if(i=Math.floor((o+r)/2),n=t[i],n<e)o=i+1;else{if(!(n>e)){for(;U(t[i-1],e);)i--;return i}r=i-1}return t[i]<=e?i:i-1}function K(e,t){var i;return i=a(t)?e.parseDate(t)||F(t):F(t)}function Y(e,i){var n,o;if(t(i)){for(n=[],o=0;o<i.length;o++)n.push(K(e,i[o]));return n}return K(e,i)}function Q(e,t){var i,n;if(e instanceof Date){for(i=t.length,n=0;n<i;n++)if(U(t[n],e))return n;return-1}return t.indexOf(e)}function X(e){var t=e._range;return t||(t=e._range=k(e),t.min=F(t.min),t.max=F(t.max)),t}function Z(e,t,i){for(var n,o,r,s=X(e.categories),a=(e.max||s.max)-(e.min||s.min),l=e.autoBaseUnitSteps,c=e.maxDateGroups,d=e.baseUnit===ji,u=t?qi.indexOf(t):0,h=d?qi[u++]:e.baseUnit,p=a/Li[h],f=p;!o||p>=c;){n=n||l[h].slice(0);do r=n.shift();while(r&&t===h&&r<i);if(r)o=r,p=f/o;else{if(h===Ut(qi)){o=Math.ceil(f/c);break}if(!d){p>c&&(o=Math.ceil(f/c));break}h=qi[u++]||Ut(qi),f=a/Li[h],n=null}}e.baseUnitStep=o,e.baseUnit=h}function J(e){var t,i,n,o,r,s=e.categories,a=Lt(s)?s.length:0,l=Je;for(n=0;n<a;n++)o=s[n],o&&t&&(r=M(o,t),r>0&&(l=Math.min(l,r),i=l>=Bi?Ai:l>=zi-3*Fi?Di:l>=Pi?Ti:l>=Fi?Si:l>=Ri?Ci:l>=Mi?xi:ki)),t=o;e.baseUnit=i||Si}function ee(e){var t=(e.baseUnit||"").toLowerCase(),i=t!==ji&&!v(t,qi);return i&&J(e),t!==ji&&e.baseUnitStep!==Ui||Z(e),e}function te(e,t,i){var n,o,r;if(!e&&!t)return 0;if(e>=0&&t>=0){if(o=e===t?0:e,r=(t-o)/t,i===!1||!i&&r>Wi)return 0;n=Math.max(0,o-(t-o)/2)}else n=e;return n}function ie(e,t,i){var n,o,r;if(!e&&!t)return 1;if(e<=0&&t<=0){if(o=e===t?0:t,r=Math.abs((o-e)/o),i===!1||!i&&r>Wi)return 0;n=Math.min(0,o-(e-o)/2)}else n=t;return n}function ne(e,t){return $t(Math.floor(e/t)*t,je)}function oe(e,t){return $t(Math.ceil(e/t)*t,je)}function re(e){return Math.max(Math.min(e,Oi),-Oi)}function se(e,t,i){var n=i.narrowRange,o=te(e,t,n),r=ie(e,t,n),s=x(o,r),a={majorUnit:s};return i.roundToMajorUnit!==!1&&(o<0&&de(o,s,1/3)&&(o-=s),r>0&&de(r,s,1/3)&&(r+=s)),a.min=ne(o,s),a.max=oe(r,s),a}function ae(e,t){return{min:Lt(t.min)?Math.min(e.min,t.min):e.min,max:Lt(t.max)?Math.max(e.max,t.max):e.max,majorUnit:e.majorUnit}}function le(e,t){var i,n;for(i=0;i<t.length;i++)n=t[i],null===e[n]&&(e[n]=void 0)}function ce(e,t){var i,n,o,r,s=t;return t&&(le(t,["min","max"]),i=Lt(t.min),n=Lt(t.max),o=i||n,o&&t.min===t.max&&(t.min>0?t.min=0:t.max=1),t.majorUnit?(e.min=ne(e.min,t.majorUnit),e.max=oe(e.max,t.majorUnit)):o&&(s=Me(e,t),e.majorUnit=x(s.min,s.max))),e.minorUnit=(s.majorUnit||e.majorUnit)/5,r=Me(e,s),r.min>=r.max&&(i&&!n?r.max=r.min+r.majorUnit:!i&&n&&(r.min=r.max-r.majorUnit)),r}function de(e,t,i){var n=$t(Math.abs(e%t),je),o=t*(1-i);return 0===n||n>o}function ue(e){var t=Ci;return e>=Bi?t=Ai:e>=zi?t=Di:e>=Pi?t=Ti:e>=Fi&&(t=Si),t}function he(e,t,i){var n=i.min||e,o=i.max||t,r=i.baseUnit||(o&&n?ue(M(o,n)):Ci),s=Li[r],a=H(W(n)-1,r)||F(o),l=N(W(o)+1,r),c=i.majorUnit?i.majorUnit:void 0,d=c||oe(x(a.getTime(),l.getTime()),s)/s,u=G(a,l,r),h=oe(u,d),p=h-u,f=Math.floor(p/2),m=p-f;return i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||r,i.min=i.min||L(a,-f,r),i.max=i.max||L(l,m,r),i.minorUnit=i.minorUnit||d/5,i.majorUnit=d,i}function pe(e,t,i,n){var o=i.min,r=i.max;return Lt(i.axisCrossingValue)&&i.axisCrossingValue<=0&&ge(),Lt(n.max)?n.max<=0&&ge():r=t,Lt(n.min)?n.min<=0&&ge():o=e,{min:o,max:r}}function fe(e,t,i){var n=i.majorUnit,o=e;return e<=0?o=t<=1?Math.pow(n,-2):1:i.narrowRange||(o=Math.pow(n,Math.floor(ve(e,n)))),o}function me(e,t){var i,n=$t(ve(e,t),je)%1;return i=e<=0?t:0!==n&&(n<.3||n>.9)?Math.pow(t,ve(e,t)+.2):Math.pow(t,Math.ceil(ve(e,t)))}function ge(){throw Error("Non positive values cannot be used for a logarithmic axis")}function ve(e,t){return Math.log(e)/Math.log(t)}function _e(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function be(e){return e<=0?-1:1}var we,ye,ke,xe,Ce,Se,Te,De,Ae,Ee,Ie,Me,Re,Fe,Pe,ze,Be,Le,He,Ne,Oe,Ve,We,Ue,qe,je,Ge,$e,Ke,Ye,Qe,Xe,Ze,Je,et,tt,it,nt,ot,rt,st,at,lt,ct,dt,ut,ht,pt,ft,mt,gt,vt,_t,bt,wt,yt,kt,xt,Ct,St,Tt,Dt,At,Et,It,Mt,Rt,Ft,Pt,zt,Bt,Lt,Ht,Nt,Ot,Vt,Wt,Ut,qt,jt,Gt,$t,Kt,Yt,Qt,Xt,Zt,Jt,ei,ti,ii,ni,oi,ri,si,ai,li,ci,di,ui,hi,pi,fi,mi,gi,vi,_i,bi,wi,yi,ki,xi,Ci,Si,Ti,Di,Ai,Ei,Ii,Mi,Ri,Fi,Pi,zi,Bi,Li,Hi,Ni,Oi,Vi,Wi,Ui,qi,ji,Gi,$i,Ki,Yi,Qi,Xi,Zi,Ji,en,tn,nn,on,rn,sn,an,ln,cn;window.kendo.dataviz=window.kendo.dataviz||{},we=kendo.drawing,ye=we.util,ke=we.Path,xe=we.Group,Ce=kendo.Class,Se=kendo.geometry,Te=Se.Rect,De=Se.Circle,Ae=Se.transform,Ee=Se.Segment,Ie=kendo.dataviz,Me=kendo.deepExtend,Re=kendo.isFunction,Fe=kendo.getter,Pe="arc",ze="axisLabelClick",Be="#000",Le="bottom",He="center",Ne="circle",Oe=3,Ve="cross",We="date",Ue="12px sans-serif",qe=400,je=10,Ge=600,$e="end",Ke=/\{\d+:?/,Ye="height",Qe=100,Xe="inside",Ze="left",Je=Number.MAX_VALUE,et=-Number.MAX_VALUE,tt="none",it="noteClick",nt="noteHover",ot="noteLeave",rt="object",st="outside",at="right",lt="start",ct="string",dt="top",ut="triangle",ht="value",pt="#fff",ft="width",mt="x",gt="y",vt={ARC:Pe,AXIS_LABEL_CLICK:ze,BLACK:Be,BOTTOM:Le,CENTER:He,CIRCLE:Ne,COORD_PRECISION:Oe,CROSS:Ve,DATE:We,DEFAULT_FONT:Ue,DEFAULT_HEIGHT:qe,DEFAULT_PRECISION:je,DEFAULT_WIDTH:Ge,END:$e,FORMAT_REGEX:Ke,HEIGHT:Ye,HIGHLIGHT_ZINDEX:Qe,INSIDE:Xe,LEFT:Ze,MAX_VALUE:Je,MIN_VALUE:et,NONE:tt,NOTE_CLICK:it,NOTE_HOVER:nt,NOTE_LEAVE:ot,OBJECT:rt,OUTSIDE:st,RIGHT:at,START:lt,STRING:ct,TOP:dt,TRIANGLE:ut,VALUE:ht,WHITE:pt,WIDTH:ft,X:mt,Y:gt},_t=/\s+/g,bt=/width|height|top|left|bottom|right/i,wt={format:function(e,t){return t},toString:function(e){return e},parseDate:function(e){return new Date(e)}},yt=wt,kt=Ce.extend({}),kt.register=function(e){yt=e},Object.defineProperties&&Object.defineProperties(kt,{implementation:{get:function(){return yt}}}),xt=/\{(\d+)(:[^\}]+)?\}/g,Ct=Ce.extend({init:function(e){this._intlService=e},auto:function(e){for(var t,i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return t=this.intl,a(e)&&e.match(Ke)?t.format.apply(t,[e].concat(i)):t.toString(i[0],e)},localeAuto:function(e,t,i){var n,o=this.intl;return n=a(e)&&e.match(Ke)?e.replace(xt,function(e,n,r){var s=t[parseInt(n,10)];return o.toString(s,r?r.substring(1):"",i)}):o.toString(t[0],e,i)}}),Object.defineProperties&&Object.defineProperties(Ct.fn,{intl:{get:function(){return this._intlService||kt.implementation},set:function(e){this._intlService=e}}}),St=Ce.extend({init:function(e,t){void 0===t&&(t={}),this._intlService=t.intlService,this.sender=t.sender||e,
this.format=new Ct(t.intlService),this.chart=e,this.rtl=!!t.rtl},notify:function(e,t){this.chart&&this.chart.trigger(e,t)},isPannable:function(e){var t=((this.chart||{}).options||{}).pannable;return t&&t.lock!==e}}),Object.defineProperties&&Object.defineProperties(St.fn,{intl:{get:function(){return this._intlService||kt.implementation},set:function(e){this._intlService=e,this.format.intl=e}}}),Dt=Ce.extend({}),Dt.register=function(e){Tt=e},Dt.create=function(e,t){if(Tt)return Tt.create(e,t)},At={compile:function(e){return e}},Et=Ce.extend({}),Et.register=function(e){At=e},Et.compile=function(e){return At.compile(e)},It={ChartService:St,DomEventsBuilder:Dt,FormatService:Ct,IntlService:kt,TemplateService:Et},Mt=function(){this._map={}},Mt.prototype.get=function(e){return this._map[this._key(e)]},Mt.prototype.set=function(e,t){this._map[this._key(e)]=t},Mt.prototype._key=function(e){return e instanceof Date?e.getTime():e},Rt="trigger",Ft=Ce.extend({init:function(e,t){this.observer=e,this.handlerMap=Me({},this.handlerMap,t)},trigger:function(e,t){var i,n=this,o=n.observer,r=n.handlerMap;return r[e]?i=this.callObserver(r[e],t):o[Rt]&&(i=this.callObserver(Rt,e,t)),i},callObserver:function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];return this.observer[e].apply(this.observer,t)},requiresHandlers:function(e){var t,i=this;if(this.observer.requiresHandlers)return this.observer.requiresHandlers(e);for(t=0;t<e.length;t++)if(i.handlerMap[e[t]])return!0}}),Pt=kendo.drawing.util,zt=Pt.append,Bt=Pt.bindEvents,Lt=Pt.defined,Ht=Pt.deg,Nt=Pt.elementOffset,Ot=Pt.elementSize,Vt=Pt.eventElement,Wt=Pt.eventCoordinates,Ut=Pt.last,qt=Pt.limitValue,jt=Pt.objectKey,Gt=Pt.rad,$t=Pt.round,Kt=Pt.unbindEvents,Yt=Pt.valueOrDefault,Qt=Ce.extend({}),Qt.fetchFonts=function(e,t,i){void 0===i&&(i={depth:0});var n=5;!e||i.depth>n||!document.fonts||Object.keys(e).forEach(function(n){var o=e[n];"dataSource"!==n&&"$"!==n[0]&&o&&("font"===n?t.push(o):"object"==typeof o&&(i.depth++,Qt.fetchFonts(o,t,i),i.depth--))})},Qt.loadFonts=function(e,t){var i=[];if(e.length>0&&document.fonts){try{i=e.map(function(e){return document.fonts.load(e)})}catch(n){kendo.logToConsole(n)}Promise.all(i).then(t,t)}else t()},Qt.preloadFonts=function(e,t){var i=[];Qt.fetchFonts(e,i),Qt.loadFonts(i,t)},Xt=Ce.extend({init:function(e,t){this.x=e||0,this.y=t||0},clone:function(){return new Xt(this.x,this.y)},equals:function(e){return e&&this.x===e.x&&this.y===e.y},rotate:function(e,t){var i=Gt(t),n=Math.cos(i),o=Math.sin(i),r=e.x,s=e.y,a=this,l=a.x,c=a.y;return this.x=$t(r+(l-r)*n+(c-s)*o,Oe),this.y=$t(s+(c-s)*n-(l-r)*o,Oe),this},multiply:function(e){return this.x*=e,this.y*=e,this},distanceTo:function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)}}),Xt.onCircle=function(e,t,i){var n=Gt(t);return new Xt(e.x-i*Math.cos(n),e.y-i*Math.sin(n))},Zt=Ce.extend({init:function(e,t,i,n){this.x1=e||0,this.y1=t||0,this.x2=i||0,this.y2=n||0},equals:function(e){return this.x1===e.x1&&this.x2===e.x2&&this.y1===e.y1&&this.y2===e.y2},width:function(){return this.x2-this.x1},height:function(){return this.y2-this.y1},translate:function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},move:function(e,t){var i=this.height(),n=this.width();return Lt(e)&&(this.x1=e,this.x2=this.x1+n),Lt(t)&&(this.y1=t,this.y2=this.y1+i),this},wrap:function(e){return this.x1=Math.min(this.x1,e.x1),this.y1=Math.min(this.y1,e.y1),this.x2=Math.max(this.x2,e.x2),this.y2=Math.max(this.y2,e.y2),this},wrapPoint:function(e){var i=t(e),n=i?e[0]:e.x,o=i?e[1]:e.y;return this.wrap(new Zt(n,o,n,o)),this},snapTo:function(e,t){return t!==mt&&t||(this.x1=e.x1,this.x2=e.x2),t!==gt&&t||(this.y1=e.y1,this.y2=e.y2),this},alignTo:function(e,t){var i,n,o=this.height(),r=this.width(),s=t===dt||t===Le?gt:mt,a=s===gt?o:r;return t===He?(i=e.center(),n=this.center(),this.x1+=i.x-n.x,this.y1+=i.y-n.y):this[s+1]=t===dt||t===Ze?e[s+1]-a:e[s+2],this.x2=this.x1+r,this.y2=this.y1+o,this},shrink:function(e,t){return this.x2-=e,this.y2-=t,this},expand:function(e,t){return this.shrink(-e,-t),this},pad:function(e){var t=p(e);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},unpad:function(e){var t=p(e);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},clone:function(){return new Zt(this.x1,this.y1,this.x2,this.y2)},center:function(){return new Xt(this.x1+this.width()/2,this.y1+this.height()/2)},containsPoint:function(e){return e.x>=this.x1&&e.x<=this.x2&&e.y>=this.y1&&e.y<=this.y2},points:function(){return[new Xt(this.x1,this.y1),new Xt(this.x2,this.y1),new Xt(this.x2,this.y2),new Xt(this.x1,this.y2)]},getHash:function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},overlaps:function(e){return!(e.y2<this.y1||this.y2<e.y1||e.x2<this.x1||this.x2<e.x1)},rotate:function(e){var t=this.width(),i=this.height(),n=this.center(),o=n.x,r=n.y,s=C(0,0,o,r,e),a=C(t,0,o,r,e),l=C(t,i,o,r,e),c=C(0,i,o,r,e);return t=Math.max(s.x,a.x,l.x,c.x)-Math.min(s.x,a.x,l.x,c.x),i=Math.max(s.y,a.y,l.y,c.y)-Math.min(s.y,a.y,l.y,c.y),this.x2=this.x1+t,this.y2=this.y1+i,this},toRect:function(){return new Te([this.x1,this.y1],[this.width(),this.height()])},hasSize:function(){return 0!==this.width()&&0!==this.height()},align:function(e,t,i){var n=t+1,o=t+2,r=t===mt?ft:Ye,s=this[r]();v(i,[Ze,dt])?(this[n]=e[n],this[o]=this[n]+s):v(i,[at,Le])?(this[o]=e[o],this[n]=this[o]-s):i===He&&(this[n]=e[n]+(e[r]()-s)/2,this[o]=this[n]+s)}}),Jt=Ce.extend({init:function(e,t,i,n,o){this.center=e,this.innerRadius=t,this.radius=i,this.startAngle=n,this.angle=o},clone:function(){return new Jt(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},middle:function(){return this.startAngle+this.angle/2},setRadius:function(e,t){return t?this.innerRadius=e:this.radius=e,this},point:function(e,t){var i=Gt(e),n=Math.cos(i),o=Math.sin(i),r=t?this.innerRadius:this.radius,s=$t(this.center.x-n*r,Oe),a=$t(this.center.y-o*r,Oe);return new Xt(s,a)},adjacentBox:function(e,t,i){var n=this.clone().expand(e),o=n.middle(),r=n.point(o),s=t/2,a=i/2,l=Math.sin(Gt(o)),c=Math.cos(Gt(o)),d=r.x-s,u=r.y-a;return Math.abs(l)<.9&&(d+=s*-c/Math.abs(c)),Math.abs(c)<.9&&(u+=a*-l/Math.abs(l)),new Zt(d,u,d+t,u+i)},containsPoint:function(e){var t=this.center,i=this.innerRadius,n=this.radius,o=this.startAngle,s=this.startAngle+this.angle,a=e.x-t.x,l=e.y-t.y,c=new Xt(a,l),d=this.point(o),u=new Xt(d.x-t.x,d.y-t.y),h=this.point(s),p=new Xt(h.x-t.x,h.y-t.y),f=$t(a*a+l*l,Oe);return(u.equals(c)||r(u,c))&&!r(p,c)&&f>=i*i&&f<=n*n},getBBox:function(){var e,t,i,n=this,o=new Zt(Je,Je,et,et),r=$t(this.startAngle%360),s=$t((r+this.angle)%360),a=this.innerRadius,l=[0,90,180,270,r,s].sort(S),c=l.indexOf(r),d=l.indexOf(s);for(e=r===s?l:c<d?l.slice(c,d+1):[].concat(l.slice(0,d+1),l.slice(c,l.length)),t=0;t<e.length;t++)i=n.point(e[t]),o.wrapPoint(i),o.wrapPoint(i,a);return a||o.wrapPoint(this.center),o},expand:function(e){return this.radius+=e,this}}),ei=Jt.extend({init:function(e,t,i,n){Jt.fn.init.call(this,e,0,t,i,n)},expand:function(e){return Jt.fn.expand.call(this,e)},clone:function(){return new ei(this.center,this.radius,this.startAngle,this.angle)},setRadius:function(e){return this.radius=e,this}}),ti=.001,ii=Ce.extend({createRing:function(e,t){var i,n,o,r,s,a,l=e.startAngle+180,c=e.angle+l;return e.angle>0&&l===c&&(c+=ti),i=new Se.Point(e.center.x,e.center.y),n=Math.max(e.radius,0),o=Math.max(e.innerRadius,0),r=new Se.Arc(i,{startAngle:l,endAngle:c,radiusX:n,radiusY:n}),s=ke.fromArc(r,t).close(),o?(r.radiusX=r.radiusY=o,a=r.pointAt(c),s.lineTo(a.x,a.y),s.arc(c,l,o,o,!0)):s.lineTo(i.x,i.y),s}}),ii.current=new ii,ni=Ce.extend({init:function(e){this.children=[],this.options=Me({},this.options,this.initUserOptions(e))},initUserOptions:function(e){return e},reflow:function(e){var t,i,n,o=this.children;for(i=0;i<o.length;i++)n=o[i],n.reflow(e),t=t?t.wrap(n.box):n.box.clone();this.box=t||e},destroy:function(){var e,t=this.children;for(this.animation&&this.animation.destroy(),e=0;e<t.length;e++)t[e].destroy()},getRoot:function(){var e=this.parent;return e?e.getRoot():null},getSender:function(){var e=this.getService();if(e)return e.sender},getService:function(){for(var e=this;e;){if(e.chartService)return e.chartService;e=e.parent}},translateChildren:function(e,t){var i,n=this.children,o=n.length;for(i=0;i<o;i++)n[i].box.translate(e,t)},append:function(){var e,t,i=arguments,n=this;for(e=0;e<arguments.length;e++)t=i[e],n.children.push(t),t.parent=n},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,i=t.length;for(e=0;e<i;e++)t[e].renderVisual()},createVisual:function(){this.visual=new xe({zIndex:this.options.zIndex,visible:Yt(this.options.visible,!0)})},createAnimation:function(){this.visual&&this.options.animation&&(this.animation=we.Animation.create(this.visual,this.options.animation))},appendVisual:function(e){e.chartElement||(e.chartElement=this),e.options.noclip?this.clipRoot().visual.append(e):Lt(e.options.zIndex)?this.stackRoot().stackVisual(e):this.isStackRoot?this.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,i,n,o=e.options.zIndex||0,r=this.visual.children,s=r.length;for(t=0;t<s&&(i=r[t],n=Yt(i.options.zIndex,0),!(n>o));t++);this.visual.insert(t,e)},traverse:function(e){var t,i,n=this.children,o=n.length;for(t=0;t<o;t++)i=n[t],e(i),i.traverse&&i.traverse(e)},closest:function(e){for(var t=this,i=!1;t&&!i;)i=e(t),i||(t=t.parent);if(i)return t},renderComplete:function(){},hasHighlight:function(){var e=(this.options||{}).highlight;return!(!this.createHighlight||e&&e.visible===!1)},toggleHighlight:function(t){var i,n=this,o=(this.options||{}).highlight||{},r=o.visual,s=this._highlight;if(!s){if(i={fill:{color:pt,opacity:.2},stroke:{color:pt,width:1,opacity:.2}},r){if(s=this._highlight=r(e.extend(this.highlightVisualArgs(),{createVisual:function(){return n.createHighlight(i)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total})),!s)return}else s=this._highlight=this.createHighlight(i);Lt(s.options.zIndex)||(s.options.zIndex=Yt(o.zIndex,this.options.zIndex)),this.appendVisual(s)}s.visible(t)},createGradientOverlay:function(t,i,n){var o=new ke(e.extend({stroke:{color:"none"},fill:this.createGradient(n),closed:t.options.closed},i));return o.segments.elements(t.segments.elements()),o},createGradient:function(e){if(this.parent)return this.parent.createGradient(e)}}),ni.prototype.options={},oi=ni.extend({init:function(e){ni.fn.init.call(this,e),this.options.margin=p(this.options.margin),this.options.padding=p(this.options.padding)},reflow:function(e){var t,i,n,o,r=this,s=this.options,a=s.width,l=s.height,c=s.shrinkToFit,d=a&&l,u=s.margin,h=s.padding,p=s.border.width,f=function(){r.align(e,mt,s.align),r.align(e,gt,s.vAlign),r.paddingBox=t.clone().unpad(u).unpad(p)},m=e.clone();for(d&&(m.x2=m.x1+a,m.y2=m.y1+l),c&&m.unpad(u).unpad(p).unpad(h),ni.fn.reflow.call(this,m),t=d?this.box=new Zt(0,0,a,l):this.box,c&&d?(f(),m=this.contentBox=this.paddingBox.clone().unpad(h)):(m=this.contentBox=t.clone(),t.pad(h).pad(p).pad(u),f()),this.translateChildren(t.x1-m.x1+u.left+p+h.left,t.y1-m.y1+u.top+p+h.top),i=this.children,n=0;n<i.length;n++)o=i[n],o.reflow(o.box)},align:function(e,t,i){this.box.align(e,t,i)},hasBox:function(){var e=this.options;return e.border.width||e.background},createVisual:function(){ni.fn.createVisual.call(this);var e=this.options;e.visible&&this.hasBox()&&this.visual.append(ke.fromRect(this.paddingBox.toRect(),this.visualStyle()))},visualStyle:function(){var e=this.options,t=e.border||{};return{stroke:{width:t.width,color:t.color,opacity:Yt(t.opacity,e.opacity),dashType:t.dashType},fill:{color:e.background,opacity:e.opacity},cursor:e.cursor}}}),y(oi,{align:Ze,vAlign:dt,margin:{},padding:{},border:{color:Be,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0}),ri=oi.extend({init:function(e,t){oi.fn.init.call(this,e),this.pointData=t},getElement:function(){var e,t,i=this,n=i.options,o=i.paddingBox,r=n.type,s=n.rotation,a=o.center(),l=o.width()/2;return n.visible&&this.hasBox()?(e=this.visualStyle(),r===Ne?t=new we.Circle(new De([$t(o.x1+l,Oe),$t(o.y1+o.height()/2,Oe)],l),e):r===ut?t=ke.fromPoints([[o.x1+l,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===Ve?(t=new we.MultiPath(e),t.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):t=ke.fromRect(o.toRect(),e),s&&t.transform(Ae().rotate(-s,[a.x,a.y])),t.options.zIndex=n.zIndex,t):null},createElement:function(){var e,t=this,i=this.options.visual,n=this.pointData||{};return e=i?i({value:n.value,dataItem:n.dataItem,sender:this.getSender(),series:n.series,category:n.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.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()}}),y(ri,{type:Ne,align:He,vAlign:He}),si="linear",ai="radial",li={glass:{type:si,rotation:0,stops:[{offset:0,color:pt,opacity:0},{offset:.25,color:pt,opacity:.3},{offset:1,color:pt,opacity:0}]},sharpBevel:{type:ai,stops:[{offset:0,color:pt,opacity:.55},{offset:.65,color:pt,opacity:0},{offset:.95,color:pt,opacity:.25}]},roundedBevel:{type:ai,stops:[{offset:.33,color:pt,opacity:.06},{offset:.83,color:pt,opacity:.2},{offset:.95,color:pt,opacity:0}]},roundedGlass:{type:ai,supportVML:!1,stops:[{offset:0,color:pt,opacity:0},{offset:.5,color:pt,opacity:.3},{offset:.99,color:pt,opacity:0}]},sharpGlass:{type:ai,supportVML:!1,stops:[{offset:0,color:pt,opacity:.2},{offset:.15,color:pt,opacity:.15},{offset:.17,color:pt,opacity:.35},{offset:.85,color:pt,opacity:.05},{offset:.87,color:pt,opacity:.15},{offset:.99,color:pt,opacity:0}]},bubbleShadow:{type:ai,center:[.5,.5],radius:.5}},ci=ni.extend({init:function(e){ni.fn.init.call(this,e);var t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}},reflow:function(){var e,t=this,i=t.options,n=t.children,o=new Zt(0,0,i.width,i.height);for(this.box=o.unpad(i.margin),e=0;e<n.length;e++)n[e].reflow(o),o=T(o,n[e].box)||new Zt},createVisual:function(){this.visual=new xe,this.createBackground()},createBackground:function(){var e=this.options,t=e.border||{},i=this.box.clone().pad(e.margin).unpad(t.width),n=ke.fromRect(i.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(n)},getRoot:function(){return this},createGradient:function(t){var i,n,o=this.gradients,r=jt(t),s=li[t.gradient];return o[r]?i=o[r]:(n=e.extend({},s,t),"linear"===s.type?i=new we.LinearGradient(n):(t.innerRadius&&(n.stops=D(n)),i=new we.RadialGradient(n),i.supportVML=s.supportVML!==!1),o[r]=i),i},cleanGradients:function(){var e,t=this.gradients;for(e in t)t[e]._observers=[]},size:function(){var e=this.options;return new Zt(0,0,e.width,e.height)}}),y(ci,{width:Ge,height:qe,background:pt,border:{color:Be,width:0},margin:p(5),zIndex:-2}),di=ni.extend({init:function(e){ni.fn.init.call(this,e),this._initDirection()},_initDirection:function(){var e=this.options;e.vertical?(this.groupAxis=mt,this.elementAxis=gt,this.groupSizeField=ft,this.elementSizeField=Ye,this.groupSpacing=e.spacing,this.elementSpacing=e.vSpacing):(this.groupAxis=gt,this.elementAxis=mt,this.groupSizeField=Ye,this.elementSizeField=ft,this.groupSpacing=e.vSpacing,this.elementSpacing=e.spacing)},reflow:function(e){this.box=e.clone(),this.reflowChildren()},reflowChildren:function(){var e,t,i,n,o,r,s,a,l,c,d,u=this,h=this,p=h.box,f=h.elementAxis,m=h.groupAxis,g=h.elementSizeField,v=h.groupSizeField,_=this.groupOptions(),b=_.groups,w=_.groupsSize,y=_.maxGroupElementsSize,k=b.length,x=p[m+1]+this.alignStart(w,p[v]());if(k){for(e=x,t=0;t<k;t++){for(i=b[t],n=i.groupElements,o=p[f+1],r=n.length,s=0;s<r;s++)a=n[s],l=u.elementSize(a),c=e+u.alignStart(l[v],i.groupSize),d=new Zt,d[m+1]=c,d[m+2]=c+l[v],d[f+1]=o,d[f+2]=o+l[g],a.reflow(d),o+=l[g]+u.elementSpacing;e+=i.groupSize+u.groupSpacing}p[m+1]=x,p[m+2]=x+w,p[f+2]=p[f+1]+y}},alignStart:function(e,t){var i=0,n=this.options.align;return n===at||n===Le?i=t-e:n===He&&(i=(t-e)/2),i},groupOptions:function(){var e,t,i,n=this,o=this,r=o.box,s=o.children,a=o.elementSizeField,l=o.groupSizeField,c=o.elementSpacing,d=o.groupSpacing,u=$t(r[a]()),h=s.length,p=[],f=0,m=0,g=0,v=0,_=[];for(e=0;e<h;e++)t=s[e],t.box||t.reflow(r),i=n.elementSize(t),n.options.wrap&&$t(m+c+i[a])>u&&(p.push({groupElements:_,groupSize:f,groupElementsSize:m}),v=Math.max(v,m),g+=d+f,f=0,m=0,_=[]),f=Math.max(f,i[l]),m>0&&(m+=c),m+=i[a],_.push(t);return p.push({groupElements:_,groupSize:f,groupElementsSize:m}),v=Math.max(v,m),g+=f,{groups:p,groupsSize:g,maxGroupElementsSize:v}},elementSize:function(e){return{width:e.box.width(),height:e.box.height()}},createVisual:function(){}}),y(di,{vertical:!0,wrap:!0,vSpacing:0,spacing:0}),ui=we.Text,hi=ni.extend({init:function(e,t){ni.fn.init.call(this,t),this.content=e,this.reflow(new Zt)},reflow:function(e){var t=this.options,i=t.size=ye.measureText(this.content,{font:t.font});this.baseline=i.baseline,this.box=new Zt(e.x1,e.y1,e.x1+i.width,e.y1+i.height)},createVisual:function(){var e=this.options,t=e.font,i=e.color,n=e.opacity,o=e.cursor;this.visual=new ui(this.content,this.box.toRect().topLeft(),{font:t,fill:{color:i,opacity:n},cursor:o})}}),y(hi,{font:Ue,color:Be}),pi=/\n/m,fi=oi.extend({init:function(e,t,i){oi.fn.init.call(this,t),this.content=e,this.data=i,this._initContainer(),this.options._autoReflow!==!1&&this.reflow(new Zt)},_initContainer:function(){var e,t,i=this.options,n=(this.content+"").split(pi),o=new di({vertical:!0,align:i.align,wrap:!1}),r=Me({},i,{opacity:1,animation:null});for(this.container=o,this.append(o),e=0;e<n.length;e++)t=new hi(n[e].trim(),r),o.append(t)},reflow:function(e){var t,i,n,o,r=this.options,s=r.visual;this.container.options.align=r.align,s&&!this._boxReflow?(t=e,t.hasSize()||(this._boxReflow=!0,this.reflow(t),this._boxReflow=!1,t=this.box),i=this.visual=s(this.visualContext(t)),i&&(t=A(i.clippedBBox()||new Te),i.options.zIndex=r.zIndex),this.box=this.contentBox=this.paddingBox=t):(oi.fn.reflow.call(this,e),r.rotation&&(n=p(r.margin),o=this.box.unpad(n),this.targetBox=e,this.normalBox=o.clone(),o=this.rotate(),o.translate(n.left-n.right,n.top-n.bottom),this.rotatedBox=o.clone(),o.pad(n)))},createVisual:function(){var e,t=this.options;this.visual=new xe({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(e=ke.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(e))},renderVisual:function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!Lt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else oi.fn.renderVisual.call(this)},visualContext:function(t){var i=this,n={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return i._boxReflow=!0,i.reflow(t),i._boxReflow=!1,i.getDefaultVisual()}};return this.data&&e.extend(n,this.data),n},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,mt,e.align),this.align(this.targetBox,gt,e.vAlign),this.box},rotationTransform:function(){var e,t,i,n,o=this.options.rotation;return o?(e=this.normalBox.center(),t=e.x,i=e.y,n=this.rotatedBox.center(),Ae().translate(n.x-t,n.y-i).rotate(o,[t,i])):null}}),mi=ni.extend({init:function(t){ni.fn.init.call(this,t),this.append(new fi(this.options.text,e.extend({},this.options,{vAlign:this.options.position})))},reflow:function(e){ni.fn.reflow.call(this,e),this.box.snapTo(e,mt)}}),mi.buildTitle=function(t,i,n){var o,r=t;return"string"==typeof t&&(r={text:t}),r=e.extend({visible:!0},n,r),r&&r.visible&&r.text&&(o=new mi(r),i.append(o)),o},y(mi,{color:Be,position:dt,align:He,margin:p(5),padding:p(5)}),gi=fi.extend({init:function(e,t,i,n,o){fi.fn.init.call(this,t,o),this.text=t,this.value=e,this.index=i,this.dataItem=n,this.reflow(new Zt)},visualContext:function(e){var t=fi.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(e,t){e.trigger(ze,{element:Vt(t),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},rotate:function(){var e,t;return this.options.alignRotation!==He?(e=this.normalBox.toRect(),t=this.rotationTransform(),this.box=A(e.bbox(t.matrix()))):fi.fn.rotate.call(this),this.box},rotationTransform:function(){var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_=this.options,b=_.rotation;return b?_.alignRotation===He?fi.fn.rotationTransform.call(this):(e=Ae().rotate(b).matrix(),t=this.normalBox.toRect(),i=this.targetBox.toRect(),n=_.rotationOrigin||dt,o=n===dt||n===Le?mt:gt,r=n===dt||n===Le?gt:mt,s=n===dt||n===Ze?i.origin:i.bottomRight(),a=t.topLeft().transformCopy(e),l=t.topRight().transformCopy(e),c=t.bottomRight().transformCopy(e),d=t.bottomLeft().transformCopy(e),u=Te.fromPoints(a,l,c,d),h={},h[r]=i.origin[r]-u.origin[r],p=Math.abs(a[r]+h[r]-s[r]),f=Math.abs(l[r]+h[r]-s[r]),$t(p,je)===$t(f,je)?(m=a,g=l):f<p?(m=l,g=c):(m=a,g=d),v=m[o]+(g[o]-m[o])/2,h[o]=i.center()[o]-v,Ae().translate(h.x,h.y).rotate(b)):null}}),y(gi,{_autoReflow:!1}),vi=7,_i="#fff",bi=oi.extend({init:function(e,t,i){oi.fn.init.call(this,t),this.fields=e,this.chartService=i,this.render()},hide:function(){this.options.visible=!1},show:function(){this.options.visible=!0},render:function(){var e,t,i,n,o,r,s,a,l,c,d=this,u=this.options;u.visible&&(e=u.label,t=u.icon,i=new Zt,n=function(){return d},o=t.size,r=this.fields.text,Lt(e)&&e.visible&&(l=f(e),l?r=l(this.fields):e.format&&(r=this.chartService.format.auto(e.format,r)),e.color||(e.color=e.position===Xe?_i:t.background),this.label=new fi(r,Me({},e)),this.label.aliasFor=n,e.position!==Xe||Lt(o)||(t.type===Ne?o=Math.max(this.label.box.width(),this.label.box.height()):(s=this.label.box.width(),a=this.label.box.height()),i.wrap(this.label.box))),t.width=s||o||vi,t.height=a||o||vi,c=new ri(Me({},t)),c.aliasFor=n,this.marker=c,this.append(c),this.label&&this.append(this.label),c.reflow(new Zt),this.wrapperBox=i.wrap(c.box))},reflow:function(e){var t,i,n,o=this,r=o.options,s=o.label,a=o.marker,l=o.wrapperBox,c=e.center(),d=r.line.length,u=r.position;r.visible&&(v(u,[Ze,at])?u===Ze?(n=l.alignTo(e,u).translate(-d,e.center().y-l.center().y),r.line.visible&&(t=[e.x1,c.y],this.linePoints=[t,[n.x2,c.y]],i=n.clone().wrapPoint(t))):(n=l.alignTo(e,u).translate(d,e.center().y-l.center().y),r.line.visible&&(t=[e.x2,c.y],this.linePoints=[t,[n.x1,c.y]],i=n.clone().wrapPoint(t))):u===Le?(n=l.alignTo(e,u).translate(e.center().x-l.center().x,d),r.line.visible&&(t=[c.x,e.y2],this.linePoints=[t,[c.x,n.y1]],i=n.clone().wrapPoint(t))):(n=l.alignTo(e,u).translate(e.center().x-l.center().x,-d),r.line.visible&&(t=[c.x,e.y1],this.linePoints=[t,[c.x,n.y2]],i=n.clone().wrapPoint(t))),a&&a.reflow(n),s&&(s.reflow(n),a&&(r.label.position===st&&s.box.alignTo(a.box,u),s.reflow(s.box))),this.contentBox=n,this.targetBox=e,this.box=i||n)},createVisual:function(){oi.fn.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},renderVisual:function(){var t=this,i=this.options,n=i.visual;i.visible&&n?(this.visual=n(e.extend(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:i.background,border:i.background,icon:i.icon,label:i.label,line:i.line,position:i.position,visible:i.visible},createVisual:function(){t.createVisual(),t.renderChildren();var e=t.visual;return delete t.visual,e}})),this.addVisual()):oi.fn.renderVisual.call(this)},createLine:function(){var e,t=this.options.line;this.linePoints&&(e=ke.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}}),o(e),this.visual.append(e))},click:function(e,t){var i=this.eventArgs(t);e.trigger(it,i)||t.preventDefault()},over:function(e,t){var i=this.eventArgs(t);e.trigger(nt,i)||t.preventDefault()},out:function(e,t){var i=this.eventArgs(t);e.trigger(ot,i)},eventArgs:function(t){var i=this.options;return e.extend(this.fields,{element:Vt(t),text:Lt(i.label)?i.label.text:"",visual:this.visual})}}),y(bi,{icon:{visible:!0,type:Ne},label:{position:Xe,visible:!0,align:He,vAlign:He},line:{visible:!0},visible:!0,position:dt,zIndex:2}),wi=ni.extend({init:function(e,t){void 0===t&&(t=new St),ni.fn.init.call(this,e),this.chartService=t,this.options.visible||(this.options=Me({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=Me({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==tt},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=Me({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==tt},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()},initFields:function(){},labelsRange:function(){return{min:this.options.labels.skip,max:this.labelsCount()}},createLabels:function(){var e,t,i,n,o=this,r=this.options,s=r.vertical?at:He,a=Me({},r.labels,{align:s,zIndex:r.zIndex}),l=Math.max(1,a.step);if(this.clearLabels(),a.visible)for(e=this.labelsRange(),t=a.rotation,c(t)&&(a.alignRotation=t.align,a.rotation=t.angle),"auto"===a.rotation&&(a.rotation=0,r.autoRotateLabels=!0),i=e.min;i<e.max;i+=l)n=o.createAxisLabel(i,a),n&&(o.append(n),o.labels.push(n))},clearLabels:function(){this.children=m(this.children,function(e){return!(e instanceof gi)}),this.labels=[]},clearTitle:function(){var e=this;this.title&&(this.children=m(this.children,function(t){return t!==e.title}),this.title=void 0)},clear:function(){this.clearLabels(),this.clearTitle()},lineBox:function(){var e=this,t=e.options,i=e.box,n=t.vertical,o=t.labels.mirror,r=o?i.x1:i.x2,s=o?i.y2:i.y1,a=t.line.width||0;return n?new Zt(r,i.y1,r,i.y2-a):new Zt(i.x1,s,i.x2-a,s)},createTitle:function(){var e,t=this.options,i=Me({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);i.visible&&i.text&&(e=new fi(i.text,i),this.append(e),this.title=e)},createNotes:function(){var e,t,i,n=this,o=this.options,r=o.notes,s=r.data||[];for(this.notes=[],e=0;e<s.length;e++)t=Me({},r,s[e]),t.value=n.parseNoteValue(t.value),i=new bi({value:t.value,text:t.label.text,dataItem:t},t,n.chartService),i.options.visible&&(Lt(i.options.position)?o.vertical&&!v(i.options.position,[Ze,at])?i.options.position=o.reverse?Ze:at:o.vertical||v(i.options.position,[dt,Le])||(i.options.position=o.reverse?Le:dt):i.options.position=o.vertical?o.reverse?Ze:at:o.reverse?Le:dt,n.append(i),n.notes.push(i))},parseNoteValue:function(e){return e},renderVisual:function(){ni.fn.renderVisual.call(this),this.createPlotBands()},createVisual:function(){ni.fn.createVisual.call(this),this.createBackground(),this.createLine()},gridLinesVisual:function(){var e=this._gridLines;return e||(e=this._gridLines=new xe({zIndex:-2}),this.appendVisual(this._gridLines)),e},createTicks:function(e){function t(t,i,r){var a,l=t.length,c=Math.max(1,i.step);if(i.visible)for(a=i.skip;a<l;a+=c)Lt(r)&&a%r===0||(s.tickX=o?n.x2:n.x2-i.size,s.tickY=o?n.y1-i.size:n.y1,s.position=t[a],e.append(E(s,i)))}var i=this.options,n=this.lineBox(),o=i.labels.mirror,r=i.majorTicks.visible?i.majorUnit:0,s={vertical:i.vertical};t(this.getMajorTickPositions(),i.majorTicks),t(this.getMinorTickPositions(),i.minorTicks,r/i.minorUnit)},createLine:function(){var e,t,i=this.options,n=i.line,r=this.lineBox();n.width>0&&n.visible&&(e=new ke({stroke:{width:n.width,color:n.color,dashType:n.dashType}}),e.moveTo(r.x1,r.y1).lineTo(r.x2,r.y2),i._alignLines&&o(e),t=this._lineGroup=new xe,t.append(e),this.visual.append(t),this.createTicks(t))},getActualTickSize:function(){var e=this.options,t=0;return e.majorTicks.visible&&e.minorTicks.visible?t=Math.max(e.majorTicks.size,e.minorTicks.size):e.majorTicks.visible?t=e.majorTicks.size:e.minorTicks.visible&&(t=e.minorTicks.size),t},createBackground:function(){var e=this,t=e.options,i=e.box,n=t.background;n&&(this._backgroundPath=ke.fromRect(i.toRect(),{fill:{color:n},stroke:null}),this.visual.append(this._backgroundPath))},createPlotBands:function(){var e,t,i,n,o,r,s,a,l=this,c=this.options,d=c.plotBands||[],u=c.vertical,h=this.plotArea;if(0!==d.length){for(e=this._plotbandGroup=new xe({zIndex:-1}),t=m(this.pane.axes,function(e){return e.options.vertical!==l.options.vertical})[0],i=0;i<d.length;i++)n=d[i],o=void 0,r=void 0,u?(o=(t||h.axisX).lineBox(),r=l.getSlot(n.from,n.to,!0)):(o=l.getSlot(n.from,n.to,!0),r=(t||h.axisY).lineBox()),0!==o.width()&&0!==r.height()&&(s=new Te([o.x1,r.y1],[o.width(),r.height()]),a=ke.fromRect(s,{fill:{color:n.color,opacity:n.opacity},stroke:null}),e.append(a));this.appendVisual(e)}},createGridLines:function(e){function t(e,t,i){var n,o,r=e.length,s=Math.max(1,t.step);if(t.visible)for(n=t.skip;n<r;n+=s)o=$t(e[n]),v(o,h)||n%i===0||a&&d===o||(u.position=o,p.append(I(u,t)),h.push(o))}var i=this.options,n=i.minorGridLines,o=i.majorGridLines,r=i.minorUnit,s=i.vertical,a=e.options.line.visible,l=o.visible?i.majorUnit:0,c=e.lineBox(),d=c[s?"y1":"x1"],u={lineStart:c[s?"x1":"y1"],lineEnd:c[s?"x2":"y2"],vertical:s},h=[],p=this.gridLinesVisual();return t(this.getMajorTickPositions(),o),t(this.getMinorTickPositions(),n,l/r),p.children},reflow:function(e){var t,i,n=this,o=n.options,r=n.labels,s=n.title,a=o.vertical,l=r.length,c=a?ft:Ye,d=s?s.box[c]():0,u=this.getActualTickSize()+o.margin+d,h=(this.getRoot()||{}).box||e,p=h[c](),f=0;for(t=0;t<l;t++)i=r[t].box[c](),i+u<=p&&(f=Math.max(f,i));this.box=a?new Zt(e.x1,e.y1,e.x1+f+u,e.y2):new Zt(e.x1,e.y1,e.x2,e.y1+f+u),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},getLabelsTickPositions:function(){return this.getMajorTickPositions()},labelTickIndex:function(e){return e.index},arrangeLabels:function(){var e,t,i,n,o,r,s,a,l,c,d,u=this,h=this,p=h.options,f=h.labels,m=this.labelsBetweenTicks(),g=p.vertical,v=this.lineBox(),_=p.labels.mirror,b=this.getLabelsTickPositions(),w=this.getActualTickSize()+p.margin;for(e=0;e<f.length;e++)t=f[e],i=u.labelTickIndex(t),n=g?t.box.height():t.box.width(),o=b[i]-n/2,r=void 0,s=void 0,a=void 0,g?(m&&(s=b[i],a=b[i+1],l=s+(a-s)/2,o=l-n/2),c=v.x2,_?(c+=w,t.options.rotationOrigin=Ze):(c-=w+t.box.width(),t.options.rotationOrigin=at),r=t.box.move(c,o)):(m?(s=b[i],a=b[i+1]):(s=o,a=o+n),d=v.y1,_?(d-=w+t.box.height(),t.options.rotationOrigin=Le):(d+=w,t.options.rotationOrigin=dt),r=new Zt(s,d,a,d+t.box.height())),t.reflow(r)},autoRotateLabels:function(){var e,t,i,n,o,r,s;if(this.options.autoRotateLabels&&!this.options.vertical){for(e=this.getMajorTickPositions(),t=this.labels,n=0;n<t.length;n++)if(o=Math.abs(e[n+1]-e[n]),r=t[n].box,r.width()>o){if(r.height()>o){i=-90;break}i=-45}if(i){for(s=0;s<t.length;s++)t[s].options.rotation=i,t[s].reflow(new Zt);return!0}}},arrangeTitle:function(){var e=this,t=e.options,i=e.title,n=t.labels.mirror,o=t.vertical;i&&(o?(i.options.align=n?at:Ze,i.options.vAlign=i.options.position):(i.options.align=i.options.position,
i.options.vAlign=n?dt:Le),i.reflow(this.box))},arrangeNotes:function(){var e,t,i,n,o=this;for(e=0;e<this.notes.length;e++)t=o.notes[e],i=t.options.value,n=void 0,Lt(i)?(o.shouldRenderNote(i)?t.show():t.hide(),n=o.noteSlot(i)):t.hide(),t.reflow(n||o.lineBox())},noteSlot:function(e){return this.getSlot(e)},alignTo:function(e){var t=e.lineBox(),i=this.options.vertical,n=i?gt:mt;this.box.snapTo(t,n),i?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[n+1]-=this.lineBox()[n+1]-t[n+1],this.box[n+2]-=this.lineBox()[n+2]-t[n+2]},axisLabelText:function(e,t,i){var n=f(i),o=e;return n?o=n({value:e,dataItem:t,format:i.format,culture:i.culture}):i.format&&(o=this.chartService.format.localeAuto(i.format,[e],i.culture)),o},slot:function(e,t,i){var n=this.getSlot(e,t,i);if(n)return n.toRect()},contentBox:function(){var e,t,i,n=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?gt:mt,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),n[e+1]-=t.start,n[e+2]+=t.end):(o[0].options.visible&&n.wrap(o[0].box),i=o[o.length-1],i.options.visible&&n.wrap(i.box))),n},maxLabelOffset:function(){var e,t,i,n,o,r=this,s=this.options,a=s.vertical,l=s.reverse,c=this.labelsBetweenTicks(),d=this.getLabelsTickPositions(),u=a?gt:mt,h=this.labels,p=l?1:0,f=l?0:1,m=0,g=0;for(e=0;e<h.length;e++)t=h[e],i=r.labelTickIndex(t),n=void 0,o=void 0,c?(n=d[i+p],o=d[i+f]):n=o=d[i],m=Math.max(m,n-t.box[u+1]),g=Math.max(g,t.box[u+2]-o);return{start:m,end:g}},limitRange:function(e,t,i,n,o){var r,s,a,l=this.options;return e<i&&o<0&&(!Lt(l.min)||l.min<=i)||n<t&&o>0&&(!Lt(l.max)||n<=l.max)?null:t<i&&o>0||n<e&&o<0?{min:e,max:t}:(r=t-e,s=e,a=t,e<i&&o<0?(s=qt(e,i,n),a=qt(e+r,i+r,n)):t>n&&o>0&&(a=qt(t,i,n),s=qt(t-r,i,n-r)),{min:s,max:a})},valueRange:function(){return{min:this.seriesMin,max:this.seriesMax}},labelsBetweenTicks:function(){return!this.options.justified},prepareUserOptions:function(){}}),y(wi,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Be,visible:!0},title:{visible:!0,position:He},majorTicks:{align:st,size:4,skip:0,step:1},minorTicks:{align:st,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:st,minorTickType:tt,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Be,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1}),yi="milliseconds",ki="seconds",xi="minutes",Ci="hours",Si="days",Ti="weeks",Di="months",Ai="years",Ei=1,Ii=1e3,Mi=60*Ii,Ri=60*Mi,Fi=24*Ri,Pi=7*Fi,zi=31*Fi,Bi=365*Fi,Li={years:Bi,months:zi,weeks:Pi,days:Fi,hours:Ri,minutes:Mi,seconds:Ii,milliseconds:Ei},Hi=.01,Ni=wi.extend({initFields:function(){this._ticks={}},categoriesHash:function(){return""},clone:function(){var t=new Ni(e.extend({},this.options),this.chartService);return t.createLabels(),t},initUserOptions:function(e){var t,i,n=e.categories||[],o=Lt(e.min),r=Lt(e.max);return e.srcCategories=e.categories=n,(o||r)&&n.length&&(t=o?Math.floor(e.min):0,i=r?e.justified?Math.floor(e.max)+1:Math.ceil(e.max):n.length,e.categories=e.categories.slice(t,i)),e},rangeIndices:function(){var e,t=this.options,i=t.categories.length||1,n=s(t.min)?t.min%1:0;return e=s(t.max)&&t.max%1!==0&&t.max<this.totalRange().max?i-(1-t.max%1):i-(t.justified?1:0),{min:n,max:e}},totalRangeIndices:function(e){var t,i,n=this.options,o=s(n.min)?n.min:0;return t=s(n.max)?n.max:s(n.min)?o+n.categories.length:this.totalRange().max||1,e&&(i=this.totalRange(),o=qt(o,0,i.max),t=qt(t,0,i.max)),{min:o,max:t}},range:function(){var e=this.options,t=s(e.min)?e.min:0,i=s(e.max)?e.max:this.totalRange().max;return{min:t,max:i}},totalRange:function(){var e=this.options;return{min:0,max:Math.max(this._seriesMax||0,e.srcCategories.length)-(e.justified?1:0)}},scaleOptions:function(){var e=this.rangeIndices(),t=e.min,i=e.max,n=this.lineBox(),o=this.options.vertical?n.height():n.width(),r=o/(i-t||1);return{scale:r*(this.options.reverse?-1:1),box:n,min:t,max:i}},arrangeLabels:function(){wi.fn.arrangeLabels.call(this),this.hideOutOfRangeLabels()},hideOutOfRangeLabels:function(){var e,t,i,n,o,r=this,s=r.box,a=r.labels;a.length&&(e=this.options.vertical?gt:mt,t=s[e+1],i=s[e+2],n=a[0],o=Ut(a),(n.box[e+1]>i||n.box[e+2]<t)&&(n.options.visible=!1),(o.box[e+1]>i||o.box[e+2]<t)&&(o.options.visible=!1))},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getLabelsTickPositions:function(){return this.getTicks().labelTicks},tickIndices:function(e){for(var t=this.rangeIndices(),i=t.min,n=t.max,o=Math.ceil(n),r=Math.floor(i),s=[];r<=o;)s.push(r),r+=e;return s},getTickPositions:function(e){var t,i=this.options,n=i.vertical,o=i.reverse,r=this.scaleOptions(),s=r.scale,a=r.box,l=r.min,c=a[(n?gt:mt)+(o?2:1)],d=this.tickIndices(e),u=[];for(t=0;t<d.length;t++)u.push(c+$t(s*(d[t]-l),Oe));return u},getTicks:function(){var e,t=this.options,i=this._ticks,n=this.rangeIndices(),o=this.lineBox(),r=o.getHash()+n.min+","+n.max+t.reverse+t.justified;return i._hash!==r&&(e=t.minorTicks.visible||t.minorGridLines.visible,i._hash=r,i.labelTicks=this.getTickPositions(1),i.majorTicks=this.filterOutOfRangePositions(i.labelTicks,o),i.minorTicks=e?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),i},filterOutOfRangePositions:function(e,t){var i,n,o,r,s;if(!e.length)return e;for(i=this.options.vertical?gt:mt,n=function(e){return t[i+1]<=e&&e<=t[i+2]},o=e.length-1,r=0;!n(e[r])&&r<=o;)r++;for(s=o;!n(e[s])&&s>=0;)s--;return e.slice(r,s+1)},getSlot:function(e,t,i){var n,o,r=this.options,s=r.reverse,a=r.justified,l=r.vertical,c=this.scaleOptions(),d=c.scale,u=c.box,h=c.min,p=l?gt:mt,f=u[p+(s?2:1)],m=u.clone(),g=!Lt(t),v=Yt(e,0),_=Yt(t,v);return _=Math.max(_-1,v),_=Math.max(v,_),n=f+(v-h)*d,o=f+(_+1-h)*d,g&&a&&(o=n),i&&(n=qt(n,u[p+1],u[p+2]),o=qt(o,u[p+1],u[p+2])),m[p+1]=s?o:n,m[p+2]=s?n:o,m},limitSlot:function(e){var t=this.options.vertical,i=t?gt:mt,n=this.lineBox(),o=e.clone();return o[i+1]=qt(e[i+1],n[i+1],n[i+2]),o[i+2]=qt(e[i+2],n[i+1],n[i+2]),o},slot:function(e,t,i){var n=Math.floor(this.options.min||0),o=e,r=t;return"string"==typeof o?o=this.categoryIndex(o):s(o)&&(o-=n),"string"==typeof r?r=this.categoryIndex(r):s(r)&&(r-=n),wi.fn.slot.call(this,o,r,i)},pointCategoryIndex:function(e){var t,i,n=this.options,o=n.reverse,r=n.justified,s=n.vertical,a=s?gt:mt,l=this.scaleOptions(),c=l.scale,d=l.box,u=l.min,h=l.max,p=o?h:u,f=d[a+1],m=d[a+2],g=e[a];return g<f||g>m?null:(t=p+(g-f)/c,i=t%1,r?t=Math.round(t):0===i&&t>0&&t--,Math.floor(t))},getCategory:function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.options.categories[t]},categoryIndex:function(e){return this.totalIndex(e)-Math.floor(this.options.min||0)},categoryAt:function(e,t){var i=this.options;return(t?i.srcCategories:i.categories)[e]},categoriesCount:function(){return(this.options.categories||[]).length},translateRange:function(e){var t=this.options,i=this.lineBox(),n=t.vertical?i.height():i.width(),o=t.categories.length,r=n/o,s=$t(e/r,je);return{min:s,max:o+s}},zoomRange:function(e){var t=this.totalRangeIndices(),i=this.totalRange(),n=i.min,o=i.max,r=qt(t.min+e,n,o),s=qt(t.max-e,n,o);if(s-r>0)return{min:r,max:s}},scaleRange:function(e){var t=this.options.categories.length,i=e*t;return{min:-i,max:t+i}},labelsCount:function(){var e=this.labelsRange();return e.max-e.min},labelsRange:function(){var e,t=this.options,i=t.justified,n=t.labels,o=this.totalRangeIndices(!0),r=o.min,s=o.max,a=Math.floor(r);return i?(r=Math.ceil(r),s=Math.floor(s)):(r=Math.floor(r),s=Math.ceil(s)),e=r>n.skip?n.skip+n.step*Math.ceil((r-n.skip)/n.step):n.skip,{min:e-a,max:(t.categories.length?s+(i?1:0):0)-a}},createAxisLabel:function(e,t){var i=this.options,n=i.dataItems?i.dataItems[e]:null,o=Yt(i.categories[e],""),r=this.axisLabelText(o,n,t);return new gi(o,r,e,n,t)},shouldRenderNote:function(e){var t=this.totalRangeIndices();return Math.floor(t.min)<=e&&e<=Math.ceil(t.max)},noteSlot:function(e){var t=this.options,i=e-Math.floor(t.min||0);return this.getSlot(i)},arrangeNotes:function(){wi.fn.arrangeNotes.call(this),this.hideOutOfRangeNotes()},hideOutOfRangeNotes:function(){var e,t,i,n,o,r=this,s=r.notes,a=r.box;if(s&&s.length)for(e=this.options.vertical?gt:mt,t=a[e+1],i=a[e+2],n=0;n<s.length;n++)o=s[n],o.box&&(i<o.box[e+1]||o.box[e+2]<t)&&o.hide()},pan:function(e){var t=this.totalRangeIndices(!0),i=this.scaleOptions(),n=i.scale,o=$t(e/n,je),r=this.totalRange(),s=t.min+o,a=t.max+o;return this.limitRange(s,a,0,r.max,o)},pointsRange:function(e,t){var i=this.options,n=i.reverse,o=i.vertical,r=o?gt:mt,s=this.totalRangeIndices(!0),a=this.scaleOptions(),l=a.scale,c=a.box,d=c[r+(n?2:1)],u=e[r]-d,h=t[r]-d,p=s.min+u/l,f=s.min+h/l,m=Math.min(p,f),g=Math.max(p,f);if(g-m>=Hi)return{min:m,max:g}},valueRange:function(){return this.range()},totalIndex:function(e){var t=this.options,i=this._categoriesMap?this._categoriesMap.get(e):Q(e,t.srcCategories);return i},currentRangeIndices:function(){var e,t=this.options,i=0;return s(t.min)&&(i=Math.floor(t.min)),e=s(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1,{min:i,max:e}},mapCategories:function(){var e,t,i;if(!this._categoriesMap)for(e=this._categoriesMap=new Mt,t=this.options.srcCategories,i=0;i<t.length;i++)e.set(t[i],i)},totalCount:function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)}}),y(Ni,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:Be},labels:{zIndex:1},justified:!1,_deferLabels:!0}),Oi=3e5,Vi={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Wi=.2,Ui="auto",qi=[yi,ki,xi,Ci,Si,Ti,Di,Ai],ji="fit",Gi=Ce.extend({init:function(e){this.options=e},displayIndices:function(){return{min:0,max:1}},displayRange:function(){return{}},total:function(){return{}},valueRange:function(){return{}},valueIndex:function(){return-1},values:function(){return[]},totalIndex:function(){return-1},valuesCount:function(){return 0},totalCount:function(){return 0},dateAt:function(){return null}}),$i=Ce.extend({init:function(e,t,i){var n,o,r,s,a,l;this.options=i,i.baseUnitStep=i.baseUnitStep||1,n=i.roundToBaseUnit,o=i.justified,this.start=L(e,0,i.baseUnit,i.weekStartDay),r=this.roundToTotalStep(t),s=!o&&U(t,r)&&!i.justifyEnd,this.end=this.roundToTotalStep(t,!o,s?1:0),a=i.min||e,this.valueStart=this.roundToTotalStep(a),this.displayStart=n?this.valueStart:a,l=i.max,l?(this.valueEnd=this.roundToTotalStep(l,!1,!o&&U(l,this.roundToTotalStep(l))?-1:0),this.displayEnd=n?this.roundToTotalStep(l,!o):i.max):(this.valueEnd=r,this.displayEnd=n||s?this.end:t),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))},displayRange:function(){return{min:this.displayStart,max:this.displayEnd}},displayIndices:function(){var e,t,i,n,o;return this._indices||(e=this.options,t=e.baseUnit,i=e.baseUnitStep,n=j(this.displayStart,this.valueStart,t,i),o=j(this.displayEnd,this.valueStart,t,i),this._indices={min:n,max:o}),this._indices},total:function(){return{min:this.start,max:this.end}},totalCount:function(){var e=this.totalIndex(this.end);return e+(this.options.justified?1:0)},valueRange:function(){return{min:this.valueStart,max:this.valueEnd}},valueIndex:function(e){var t=this.options;return Math.floor(j(e,this.valueStart,t.baseUnit,t.baseUnitStep))},totalIndex:function(e){var t=this.options;return Math.floor(j(e,this.start,t.baseUnit,t.baseUnitStep))},dateIndex:function(e){var t=this.options;return j(e,this.valueStart,t.baseUnit,t.baseUnitStep)},valuesCount:function(){var e=this.valueIndex(this.valueEnd);return e+1},values:function(){var e,t,i,n=this._values;if(!n)for(e=this.options,t=this.valueRange(),this._values=n=[],i=t.min;i<=t.max;)n.push(i),i=L(i,e.baseUnitStep,e.baseUnit,e.weekStartDay);return n},dateAt:function(e,t){var i=this.options;return L(t?this.start:this.valueStart,i.baseUnitStep*e,i.baseUnit,i.weekStartDay)},roundToTotalStep:function(e,t,i){var n=this.options,o=n.baseUnit,r=n.baseUnitStep,s=n.weekStartDay,a=this.start,l=j(e,a,o,r),c=t?Math.ceil(l):Math.floor(l);return i&&(c+=i),L(a,c*r,o,s)}}),Ki=Ni.extend({clone:function(){var t=new Ki(e.extend({},this.options),this.chartService);return t.createLabels(),t},categoriesHash:function(){var e=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+e},initUserOptions:function(e){return e},initFields:function(){var t,i,n,o,r,s,a,l,c;Ni.fn.initFields.call(this),t=this.chartService,i=t.intl,n=this.options,o=n.categories||[],o._parsed||(o=Y(i,o),o._parsed=!0),n=Me({roundToBaseUnit:!0},n,{categories:o,min:K(i,n.min),max:K(i,n.max)}),t.panning&&t.isPannable(n.vertical?gt:mt)&&(n.roundToBaseUnit=!1),n.userSetBaseUnit=n.userSetBaseUnit||n.baseUnit,n.userSetBaseUnitStep=n.userSetBaseUnitStep||n.baseUnitStep,this.options=n,n.srcCategories=o,o.length>0?(r=X(o),s=n.maxDivisions,this.dataRange=new $i(r.min,r.max,ee(n)),s?(a=this.dataRange.displayRange(),l=e.extend({},n,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),c=this.dataRange.options,Z(l,c.baseUnit,c.baseUnitStep),this.divisionRange=new $i(r.min,r.max,l)):this.divisionRange=this.dataRange):(n.baseUnit=n.baseUnit||Si,this.dataRange=this.divisionRange=new Gi(n))},tickIndices:function(e){var t,i,n,o,r,s=this,a=s.dataRange,l=s.divisionRange,c=l.valuesCount();if(!this.options.maxDivisions||!c)return Ni.fn.tickIndices.call(this,e);for(t=[],i=l.values(),n=0,this.options.justified||(i=i.concat(l.dateAt(c)),n=.5),o=0;o<i.length;o++)t.push(a.dateIndex(i[o])+n),1!==e&&o>=1&&(r=t.length-1,t.splice(o,0,t[r-1]+(t[r]-t[r-1])*e));return t},shouldRenderNote:function(e){var t=this.range(),i=this.options.categories||[];return O(e,t.min)>=0&&O(e,t.max)<=0&&i.length},parseNoteValue:function(e){return K(this.chartService.intl,e)},noteSlot:function(e){return this.getSlot(e)},translateRange:function(e){var t,i,n=this.options,o=n.baseUnit,r=n.weekStartDay,s=n.vertical,a=this.lineBox(),l=s?a.height():a.width(),c=this.range(),d=l/(c.max-c.min),u=$t(e/d,je);return c.min&&c.max&&(t=R(n.min||c.min,u),i=R(n.max||c.max,u),c={min:L(t,0,o,r),max:L(i,0,o,r)}),c},scaleRange:function(e){var t,i,n=Math.abs(e),o=this.range(),r=o.min,s=o.max;if(r&&s){for(;n--;)t=V(r,s),i=Math.round(.1*t),e<0?(r=R(r,i),s=R(s,-i)):(r=R(r,-i),s=R(s,i));o={min:r,max:s}}return o},labelsRange:function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},pan:function(e){var t,i,n,o,r,s,a,l,c,d,u,h;return this.isEmpty()?null:(t=this.options,i=this.lineBox(),n=t.vertical?i.height():i.width(),o=this.dataRange.displayRange(),r=o.min,s=o.max,a=this.dataRange.total(),l=n/(s-r),c=$t(e/l,je)*(t.reverse?-1:1),d=R(r,c),u=R(s,c),h=this.limitRange(W(d),W(u),W(a.min),W(a.max),c),h?(h.min=F(h.min),h.max=F(h.max),h.baseUnit=t.baseUnit,h.baseUnitStep=t.baseUnitStep||1,h.userSetBaseUnit=t.userSetBaseUnit,h.userSetBaseUnitStep=t.userSetBaseUnitStep,h):void 0)},pointsRange:function(e,t){var i,n,o,r,s,a,l;return this.isEmpty()?null:(i=Ni.fn.pointsRange.call(this,e,t),n=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),r=V(n.max,n.min)/(o.max-o.min),s=this.options,a=R(n.min,i.min*r),l=R(n.min,i.max*r),{min:a,max:l,baseUnit:s.userSetBaseUnit||s.baseUnit,baseUnitStep:s.userSetBaseUnitStep||s.baseUnitStep})},zoomRange:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y;if(this.isEmpty())return null;if(t=this.options,i=t.userSetBaseUnit===ji,n=this.dataRange.total(),o=this.dataRange.displayRange(),r=o.min,s=o.max,a=this.dataRange.options,l=a.weekStartDay,c=a.baseUnit,d=a.baseUnitStep,u=L(r,e*d,c,l),h=L(s,-e*d,c,l),i)if(p=t.autoBaseUnitSteps,f=t.maxDateGroups,m=Ut(p[c])*f*Li[c],g=V(s,r),v=V(h,u),_=qi.indexOf(c),v<Li[c]&&c!==yi)c=qi[_-1],b=Ut(p[c]),w=(g-(f-1)*b*Li[c])/2,u=R(r,w),h=R(s,-w);else if(v>m&&c!==Ai){y=0;do{_++,c=qi[_],y=0,w=2*Li[c];do b=p[c][y],y++;while(y<p[c].length&&w*b<g)}while(c!==Ai&&w*b<g);w=(w*b-g)/2,w>0&&(u=R(r,-w),h=R(s,w),u=R(u,qt(h,n.min,n.max)-h),h=R(h,qt(u,n.min,n.max)-u))}return u<n.min&&(u=n.min),h>n.max&&(h=n.max),u&&h&&V(h,u)>0?{min:u,max:h,baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}:void 0},range:function(){return this.dataRange.displayRange()},createAxisLabel:function(e,t){var i,n=this.options,o=n.dataItems&&!n.maxDivisions?n.dataItems[e]:null,r=this.divisionRange.dateAt(e),s=t.dateFormats[this.divisionRange.options.baseUnit];if(t.format=t.format||s,i=this.axisLabelText(r,o,t))return new gi(r,i,e,o,t)},categoryIndex:function(e){return this.dataRange.valueIndex(e)},slot:function(e,t,i){var n,o=this.dataRange,r=e,s=t;if(r instanceof Date&&(r=o.dateIndex(r)),s instanceof Date&&(s=o.dateIndex(s)),n=this.getSlot(r,s,i))return n.toRect()},getSlot:function(e,t,i){var n=e,o=t;return typeof n===rt&&(n=this.categoryIndex(n)),typeof o===rt&&(o=this.categoryIndex(o)),Ni.fn.getSlot.call(this,n,o,i)},valueRange:function(){var e=this.options,t=X(e.srcCategories);return{min:F(t.min),max:F(t.max)}},categoryAt:function(e,t){return this.dataRange.dateAt(e,t)},categoriesCount:function(){return this.dataRange.valuesCount()},rangeIndices:function(){return this.dataRange.displayIndices()},labelsBetweenTicks:function(){return!this.divisionRange.options.justified},prepareUserOptions:function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},getCategory:function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.dataRange.dateAt(t)},totalIndex:function(e){return this.dataRange.totalIndex(e)},currentRangeIndices:function(){var e=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(e.min),max:this.dataRange.totalIndex(e.max)}},totalRange:function(){return this.dataRange.total()},totalCount:function(){return this.dataRange.totalCount()},isEmpty:function(){return!this.options.srcCategories.length},roundedRange:function(){var t,i,n;return this.options.roundToBaseUnit!==!1||this.isEmpty()?this.range():(t=this.options,i=X(t.srcCategories),n=new $i(i.min,i.max,e.extend({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})),n.displayRange())}}),y(Ki,{type:We,labels:{dateFormats:Vi},autoBaseUnitSteps:{milliseconds:[1,10,100],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}),Yi=Math.pow(10,-je+1),Qi=wi.extend({init:function(t,i,n,o){wi.fn.init.call(this,e.extend({},n,{seriesMin:t,seriesMax:i}),o)},initUserOptions:function(e){var t=se(e.seriesMin,e.seriesMax,e);return this.totalOptions=ae(t,e),ce(t,e)},initFields:function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},clone:function(){return new Qi(this.seriesMin,this.seriesMax,e.extend({},this.options),this.chartService)},startValue:function(){return 0},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t,i;return 0===e?1:(t=this.options,i=t.max-t.min,Math.floor($t(i/e,Oe))+1)},getTickPositions:function(e,t){var i,n=this.options,o=n.vertical,r=n.reverse,s=this.lineBox(),a=o?s.height():s.width(),l=n.max-n.min,c=a/l,d=e*c,u=this.getDivisions(e),h=(o?-1:1)*(r?-1:1),p=1===h?1:2,f=[],m=s[(o?gt:mt)+p],g=0;for(t&&(g=t/e),i=0;i<u;i++)i%g!==0&&f.push($t(m,Oe)),m+=d*h;return f},getMajorTickPositions:function(){return this.getTickPositions(this.options.majorUnit)},getMinorTickPositions:function(){return this.getTickPositions(this.options.minorUnit)},getSlot:function(e,t,i){var n,o,r,s,a,l,c,d,u,h,p,f,m,g;return void 0===i&&(i=!1),n=this.options,o=n.vertical,r=n.reverse,s=o?gt:mt,a=this.lineBox(),l=a[s+(r?2:1)],c=o?a.height():a.width(),d=r?-1:1,u=d*(c/(n.max-n.min)),h=new Zt(a.x1,a.y1,a.x1,a.y1),p=e,f=t,Lt(p)||(p=f||0),Lt(f)||(f=p||0),i&&(p=Math.max(Math.min(p,n.max),n.min),f=Math.max(Math.min(f,n.max),n.min)),o?(m=n.max-Math.max(p,f),g=n.max-Math.min(p,f)):(m=Math.min(p,f)-n.min,g=Math.max(p,f)-n.min),h[s+1]=re(l+u*(r?g:m)),h[s+2]=re(l+u*(r?m:g)),h},getValue:function(e){var t,i=this.options,n=i.vertical,o=i.reverse,r=+i.max,s=+i.min,a=n?gt:mt,l=this.lineBox(),c=l[a+(o?2:1)],d=n?l.height():l.width(),u=o?-1:1,h=u*(e[a]-c),p=(r-s)/d,f=h*p;return h<0||h>d?null:(t=n?r-f:s+f,$t(t,je))},translateRange:function(e){var t=this.options,i=t.vertical,n=t.reverse,o=t.max,r=t.min,s=this.lineBox(),a=i?s.height():s.width(),l=o-r,c=a/l,d=$t(e/c,je);return!i&&!n||i&&n||(d=-d),{min:r+d,max:o+d,offset:d}},scaleRange:function(e){var t=this.options,i=-e*t.majorUnit;return{min:t.min-i,max:t.max+i}},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var i=this.options,n=$t(i.min+e*i.majorUnit,je),o=this.axisLabelText(n,null,t);return new gi(n,o,e,null,t)},shouldRenderNote:function(e){var t=this.range();return t.min<=e&&e<=t.max},pan:function(e){var t=this.translateRange(e);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},pointsRange:function(e,t){var i=this.getValue(e),n=this.getValue(t),o=Math.min(i,n),r=Math.max(i,n);if(this.isValidRange(o,r))return{min:o,max:r}},zoomRange:function(e){var t=this,i=t.totalMin,n=t.totalMax,o=this.scaleRange(e),r=qt(o.min,i,n),s=qt(o.max,i,n);if(this.isValidRange(r,s))return{min:r,max:s}},isValidRange:function(e,t){return t-e>Yi}}),y(Qi,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Be},labels:{format:"#.####################"},zIndex:1}),Xi=wi.extend({init:function(e,t,i,n){var o=F(e),r=F(t),s=n.intl,a=i||{};a=Me(a||{},{min:K(s,a.min),max:K(s,a.max),axisCrossingValue:Y(s,a.axisCrossingValues||a.axisCrossingValue)}),a=he(o,r,a),wi.fn.init.call(this,a,n),this.intlService=s,this.seriesMin=o,this.seriesMax=r,this.totalMin=W(H(W(o)-1,a.baseUnit)),this.totalMax=W(N(W(r)+1,a.baseUnit))},clone:function(){return new Xi(this.seriesMin,this.seriesMax,e.extend({},this.options),this.chartService)},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return Math.floor(G(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,i,n,o=this.options,r=o.vertical,s=this.lineBox(),a=(r?-1:1)*(o.reverse?-1:1),l=1===a?1:2,c=s[(r?gt:mt)+l],d=this.getDivisions(e),u=V(o.max,o.min),h=r?s.height():s.width(),p=h/u,f=[c];for(t=1;t<d;t++)i=L(o.min,t*e,o.baseUnit),n=c+V(i,o.min)*p*a,f.push($t(n,Oe));return f},getMajorTickPositions:function(){return this.getTickPositions(this.options.majorUnit)},getMinorTickPositions:function(){return this.getTickPositions(this.options.minorUnit)},getSlot:function(e,t,i){return Qi.prototype.getSlot.call(this,K(this.intlService,e),K(this.intlService,t),i)},getValue:function(e){var t=Qi.prototype.getValue.call(this,e);return null!==t?F(t):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var i,n,o=this.options,r=e*o.majorUnit,s=o.min;return r>0&&(s=L(s,r,o.baseUnit)),i=t.dateFormats[o.baseUnit],t.format=t.format||i,n=this.axisLabelText(s,null,t),new gi(s,n,e,null,t)},translateRange:function(e,t){var i=this.options,n=i.baseUnit,o=i.weekStartDay,r=this.lineBox(),s=i.vertical?r.height():r.width(),a=this.range(),l=s/V(a.max,a.min),c=$t(e/l,je)*(i.reverse?-1:1),d=R(i.min,c),u=R(i.max,c);return t||(d=L(d,0,n,o),u=L(u,0,n,o)),{min:d,max:u,offset:c}},scaleRange:function(e){for(var t,i,n=this.options,o=n.min,r=n.max,s=Math.abs(e);s--;)t=V(o,r),i=Math.round(.1*t),e<0?(o=R(o,i),r=R(r,-i)):(o=R(o,-i),r=R(r,i));return{min:o,max:r}},shouldRenderNote:function(e){var t=this.range();return O(e,t.min)>=0&&O(e,t.max)<=0},pan:function(e){var t=this.translateRange(e,!0),i=this.limitRange(W(t.min),W(t.max),this.totalMin,this.totalMax,t.offset);if(i)return{min:F(i.min),max:F(i.max)}},pointsRange:function(e,t){var i=this.getValue(e),n=this.getValue(t),o=Math.min(i,n),r=Math.max(i,n);return{min:F(o),max:F(r)}},zoomRange:function(e){var t=this.scaleRange(e),i=F(qt(W(t.min),this.totalMin,this.totalMax)),n=F(qt(W(t.max),this.totalMin,this.totalMax));return{min:i,max:n}}}),y(Xi,{type:We,majorGridLines:{visible:!0,width:1,color:Be},labels:{dateFormats:Vi}}),Zi=10,Ji=wi.extend({init:function(e,t,i,n){var o=Me({majorUnit:Zi,min:e,max:t},i),r=o.majorUnit,s=me(t,r),a=fe(e,t,o),l=pe(a,s,o,i);o.max=l.max,o.min=l.min,o.minorUnit=i.minorUnit||$t(r-1,je),wi.fn.init.call(this,o,n),this.totalMin=Lt(i.min)?Math.min(a,i.min):a,this.totalMax=Lt(i.max)?Math.max(s,i.max):s,this.logMin=$t(ve(l.min,r),je),this.logMax=$t(ve(l.max,r),je),this.seriesMin=e,this.seriesMax=t,this.createLabels()},clone:function(){return new Ji(this.seriesMin,this.seriesMax,e.extend({},this.options),this.chartService)},startValue:function(){return this.options.min},getSlot:function(e,t,i){var n,o,r=this,s=r.options,a=r.logMin,l=r.logMax,c=s.reverse,d=s.vertical,u=s.majorUnit,h=d?gt:mt,p=this.lineBox(),f=p[h+(c?2:1)],m=d?p.height():p.width(),g=c?-1:1,v=g*(m/(l-a)),_=new Zt(p.x1,p.y1,p.x1,p.y1),b=e,w=t;return Lt(b)||(b=w||1),Lt(w)||(w=b||1),b<=0||w<=0?null:(i&&(b=Math.max(Math.min(b,s.max),s.min),w=Math.max(Math.min(w,s.max),s.min)),b=ve(b,u),w=ve(w,u),d?(n=l-Math.max(b,w),o=l-Math.min(b,w)):(n=Math.min(b,w)-a,o=Math.max(b,w)-a),_[h+1]=re(f+v*(c?o:n)),_[h+2]=re(f+v*(c?n:o)),_)},getValue:function(e){var t,i=this,n=i.options,o=i.logMin,r=i.logMax,s=n.reverse,a=n.vertical,l=n.majorUnit,c=this.lineBox(),d=a===s?1:-1,u=1===d?1:2,h=a?c.height():c.width(),p=(r-o)/h,f=a?gt:mt,m=c[f+u],g=d*(e[f]-m),v=g*p;return g<0||g>h?null:(t=o+v,$t(Math.pow(l,t),je))},range:function(){var e=this.options;return{min:e.min,max:e.max}},scaleRange:function(e){var t=this.options.majorUnit,i=-e;return{min:Math.pow(t,this.logMin-i),max:Math.pow(t,this.logMax+i)}},translateRange:function(e){var t=this,i=t.options,n=t.logMin,o=t.logMax,r=i.reverse,s=i.vertical,a=i.majorUnit,l=this.lineBox(),c=s?l.height():l.width(),d=c/(o-n),u=$t(e/d,je);return!s&&!r||s&&r||(u=-u),{min:Math.pow(a,n+u),max:Math.pow(a,o+u),offset:u}},labelsCount:function(){var e=Math.floor(this.logMax),t=Math.floor(e-this.logMin)+1;return t},getMajorTickPositions:function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},createTicks:function(e){function t(t,i){c.tickX=s?a.x2:a.x2-i.size,c.tickY=s?a.y1-i.size:a.y1,c.position=t,e.append(E(c,i))}var i=this.options,n=i.majorTicks,o=i.minorTicks,r=i.vertical,s=i.labels.mirror,a=this.lineBox(),l=[],c={vertical:r};return n.visible&&this.traverseMajorTicksPositions(t,n),o.visible&&this.traverseMinorTicksPositions(t,o),l},createGridLines:function(e){function t(e,t){v(e,l)||(a.position=e,c.append(I(a,t)),l.push(e))}var i=this.options,n=i.minorGridLines,o=i.majorGridLines,r=i.vertical,s=e.lineBox(),a={lineStart:s[r?"x1":"y1"],lineEnd:s[r?"x2":"y2"],vertical:r},l=[],c=this.gridLinesVisual();return o.visible&&this.traverseMajorTicksPositions(t,o),n.visible&&this.traverseMinorTicksPositions(t,n),c.children},traverseMajorTicksPositions:function(e,t){var i,n,o=this._lineOptions(),r=o.lineStart,s=o.step,a=this,l=a.logMin,c=a.logMax;for(i=Math.ceil(l)+t.skip;i<=c;i+=t.step)n=$t(r+s*(i-l),je),e(n,t)},traverseMinorTicksPositions:function(e,t){var i,n,o,r,s,a=this,l=this.options,c=l.min,d=l.max,u=l.minorUnit,h=l.majorUnit,p=this._lineOptions(),f=p.lineStart,m=p.step,g=this,v=g.logMin,_=g.logMax,b=Math.floor(v);for(i=b;i<_;i++)for(n=a._minorIntervalOptions(i),o=t.skip;o<u&&(r=n.value+o*n.minorStep,!(r>d));o+=t.step)r>=c&&(s=$t(f+m*(ve(r,h)-v),je),e(s,t))},createAxisLabel:function(e,t){var i=Math.ceil(this.logMin+e),n=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(n,null,t);return new gi(n,o,e,null,t)},shouldRenderNote:function(e){var t=this.range();return t.min<=e&&e<=t.max},pan:function(e){var t=this.translateRange(e);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},pointsRange:function(e,t){var i=this.getValue(e),n=this.getValue(t),o=Math.min(i,n),r=Math.max(i,n);return{min:o,max:r}},zoomRange:function(e){var t=this,i=t.options,n=t.totalMin,o=t.totalMax,r=this.scaleRange(e),s=qt(r.min,n,o),a=qt(r.max,n,o),l=i.majorUnit,c=a>s&&i.min&&i.max&&$t(ve(i.max,l)-ve(i.min,l),je)<1,d=!(i.min===n&&i.max===o)&&$t(ve(a,l)-ve(s,l),je)>=1;if(c||d)return{min:s,max:a}},_minorIntervalOptions:function(e){var t=this.options,i=t.minorUnit,n=t.majorUnit,o=Math.pow(n,e),r=Math.pow(n,e+1),s=r-o,a=s/i;return{value:o,minorStep:a}},_lineOptions:function(){var e=this.options,t=e.reverse,i=e.vertical,n=i?gt:mt,o=this.lineBox(),r=i===t?1:-1,s=1===r?1:2,a=i?o.height():o.width(),l=r*(a/(this.logMax-this.logMin)),c=o[n+s];return{step:l,lineStart:c,lineBox:o}}}),y(Ji,{type:"log",majorUnit:Zi,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Be},zIndex:1,_deferLabels:!0}),en={createGridLines:function(e){var t,i,n=this.options,o=Math.abs(this.box.center().y-e.lineBox().y1),r=[],s=!1;return n.majorGridLines.visible&&(t=this.majorGridLineAngles(e),s=!0,r=this.renderMajorGridLines(t,o,n.majorGridLines)),n.minorGridLines.visible&&(i=this.minorGridLineAngles(e,s),zt(r,this.renderMinorGridLines(i,o,n.minorGridLines,e,s))),r},renderMajorGridLines:function(e,t,i){return this.renderGridLines(e,t,i)},renderMinorGridLines:function(e,t,i,n,o){var r=this.radiusCallback&&this.radiusCallback(t,n,o);return this.renderGridLines(e,t,i,r)},renderGridLines:function(e,t,i,n){var o,r,s={stroke:{width:i.width,color:i.color,dashType:i.dashType}},a=this.box.center(),l=new De([a.x,a.y],t),c=this.gridLinesVisual();for(o=0;o<e.length;o++)r=new ke(s),n&&(l.radius=n(e[o])),r.moveTo(l.center).lineTo(l.pointAt(e[o]+180)),c.append(r);return c.children},gridLineAngles:function(e,t,i,n,o){var r=this,s=this.intervals(t,i,n,o),a=e.options,l=a.visible&&(a.line||{}).visible!==!1;return b(s,function(e){var t=r.intervalAngle(e);if(!l||90!==t)return t})}},tn=Ni.extend({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,i=this,n=this,o=n.labels,r=n.options.labels,s=r.skip||0,a=r.step||1,l=new Zt;for(e=0;e<o.length;e++)o[e].reflow(l),t=o[e].box,o[e].reflow(i.getSlot(s+e*a).adjacentBox(0,t.width(),t.height()))},intervals:function(e,t,i,n){var o,r,s,a,l,c,d,u,h;for(void 0===n&&(n=!1),o=this.options,r=o.categories.length,s=r/e||1,a=360/s,l=t||0,c=i||1,d=[],u=0,h=l;h<s;h+=c)u=o.reverse?360-h*a:h*a,u=$t(u,Oe)%360,n&&v(u,n)||d.push(u);return d},majorIntervals:function(){return this.intervals(1)},minorIntervals:function(){return this.intervals(.5)},intervalAngle:function(e){return(360+e+this.options.startAngle)%360},majorAngles:function(){var e=this;return b(this.majorIntervals(),function(t){return e.intervalAngle(t)})},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 i=this.options,n=i.minorGridLines,o=i.majorGridLines,r=t?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(e,.5,n.skip,n.step,r)},radiusCallback:function(e,t,i){var n,o,r,s;if(t.options.type!==Pe)return n=Gt(360/(2*this.options.categories.length)),o=Math.cos(n)*e,r=this.majorAngles(),s=function(t){return!i&&v(t,r)?e:o}},createPlotBands:function(){var e,t,i,n,o,r,s,a=this,l=this.options.plotBands||[],c=this._plotbandGroup=new xe({zIndex:-1});for(e=0;e<l.length;e++)t=l[e],i=a.plotBandSlot(t),n=a.getSlot(t.from),o=t.from-Math.floor(t.from),i.startAngle+=o*n.angle,r=Math.ceil(t.to)-t.to,i.angle-=(r+o)*n.angle,s=ii.current.createRing(i,{fill:{color:t.color,opacity:t.opacity},stroke:{opacity:t.opacity}}),c.append(s);this.appendVisual(c)},plotBandSlot:function(e){return this.getSlot(e.from,e.to-1)},getSlot:function(e,t){var i,n,o,r,s=this.options,a=s.justified,l=this.box,c=this.majorAngles(),d=c.length,u=360/d,h=e;return s.reverse&&!a&&(h=(h+1)%d),
h=qt(Math.floor(h),0,d-1),i=c[h],a&&(i-=u/2,i<0&&(i+=360)),n=qt(Math.ceil(t||h),h,d-1),o=n-h+1,r=u*o,new Jt(l.center(),0,l.height()/2,i,r)},slot:function(e,t){var i=this.getSlot(e,t),n=i.startAngle+180,o=n+i.angle;return new Se.Arc([i.center.x,i.center.y],{startAngle:n,endAngle:o,radiusX:i.radius,radiusY:i.radius})},pointCategoryIndex:function(e){var t,i,n=this,o=this.options.categories.length,r=null;for(t=0;t<o;t++)if(i=n.getSlot(t),i.containsPoint(e)){r=t;break}return r}}),y(tn,{startAngle:90,labels:{margin:p(10)},majorGridLines:{visible:!0},justified:!0}),Me(tn.prototype,en),nn=wi.extend({init:function(e,t){wi.fn.init.call(this,e,t);var i=this.options;i.minorUnit=i.minorUnit||i.majorUnit/2},getDivisions:function(e){return Qi.prototype.getDivisions.call(this,e)-1},reflow:function(e){this.box=e,this.reflowLabels()},reflowLabels:function(){var e,t,i=this,n=this,o=n.options,r=n.labels,s=n.options.labels,a=s.skip||0,l=s.step||1,c=new Zt,d=this.intervals(o.majorUnit,a,l);for(e=0;e<r.length;e++)r[e].reflow(c),t=r[e].box,r[e].reflow(i.getSlot(d[e]).adjacentBox(0,t.width(),t.height()))},lineBox:function(){return this.box},intervals:function(e,t,i,n){var o,r,s,a,l,c,d;for(void 0===n&&(n=!1),o=this.options.min,r=this.getDivisions(e),s=[],a=t||0,l=i||1,c=a;c<r;c+=l)d=(360+o+c*e)%360,n&&v(d,n)||s.push(d);return s},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},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 i=this.options,n=i.minorGridLines,o=i.majorGridLines,r=t?this.intervals(i.majorUnit,o.skip,o.step):null;return this.gridLineAngles(e,i.minorUnit,n.skip,n.step,r)},plotBandSlot:function(e){return this.getSlot(e.from,e.to)},getSlot:function(e,t){var i,n=this,o=n.options,r=n.box,s=o.startAngle,a=qt(e,o.min,o.max),l=qt(t||a,a,o.max);return o.reverse&&(a*=-1,l*=-1),a=(540-a-s)%360,l=(540-l-s)%360,l<a&&(i=a,a=l,l=i),new Jt(r.center(),0,r.height()/2,a,l-a)},slot:function(e,t){var i,n,o,r,s,a,l;return void 0===t&&(t=e),i=this.options,n=360-i.startAngle,o=this.getSlot(e,t),r=Math.min(e,t),s=Math.max(e,t),i.reverse?(a=r,l=s):(a=360-s,l=360-r),a=(a+n)%360,l=(l+n)%360,new Se.Arc([o.center.x,o.center.y],{startAngle:a,endAngle:l,radiusX:o.radius,radiusY:o.radius})},getValue:function(e){var t=this.options,i=this.box.center(),n=e.x-i.x,o=e.y-i.y,r=Math.round(Ht(Math.atan2(o,n))),s=t.startAngle;return t.reverse||(r*=-1,s*=-1),(r+s+360)%360},valueRange:function(){return{min:0,max:2*Math.PI}}}),y(nn,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:p(10)},majorGridLines:{color:Be,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),Me(nn.prototype,en,{createPlotBands:tn.prototype.createPlotBands,majorAngles:tn.prototype.majorAngles,range:Qi.prototype.range,labelsCount:Qi.prototype.labelsCount,createAxisLabel:Qi.prototype.createAxisLabel}),on={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var e,t,i,n,o,r,s,a,l,c,d=this,u=this.options,h=u.majorGridLines.type,p=u.plotBands;for(void 0===p&&(p=[]),e=this.plotArea.polarAxis,t=e.majorAngles(),i=e.box.center(),n=this._plotbandGroup=new xe({zIndex:-1}),o=0;o<p.length;o++)r=p[o],s={fill:{color:r.color,opacity:r.opacity},stroke:{opacity:r.opacity}},a=d.getSlot(r.from,r.to,!0),l=new Jt(i,i.y-a.y2,i.y-a.y1,0,360),c=void 0,c=h===Pe?ii.current.createRing(l,s):ke.fromPoints(d.plotBandPoints(l,t),s).close(),n.append(c);this.appendVisual(n)},plotBandPoints:function(e,t){var i,n=[],o=[],r=[e.center.x,e.center.y],s=new De(r,e.innerRadius),a=new De(r,e.radius);for(i=0;i<t.length;i++)n.push(s.pointAt(t[i]+180)),o.push(a.pointAt(t[i]+180));return n.reverse(),n.push(n[0]),o.push(o[0]),o.concat(n)},createGridLines:function(e){var t,i=this.options,n=this.radarMajorGridLinePositions(),o=e.majorAngles(),r=e.box.center(),s=[];return i.majorGridLines.visible&&(s=this.renderGridLines(r,n,o,i.majorGridLines)),i.minorGridLines.visible&&(t=this.radarMinorGridLinePositions(),zt(s,this.renderGridLines(r,t,o,i.minorGridLines))),s},renderGridLines:function(e,t,i,n){var o,r,s,a,l,c,d,u={stroke:{width:n.width,color:n.color,dashType:n.dashType}},h=n.skip;for(void 0===h&&(h=0),o=n.step,void 0===o&&(o=0),r=this.gridLinesVisual(),s=h;s<t.length;s+=o)if(a=e.y-t[s],a>0)if(l=new De([e.x,e.y],a),n.type===Pe)r.append(new we.Circle(l,u));else{for(c=new ke(u),d=0;d<i.length;d++)c.lineTo(l.pointAt(i[d]+180));c.close(),r.append(c)}return r.children},getValue:function(e){var t,i,n,o,r,s,a,l=this.lineBox(),c=this.plotArea.polarAxis,d=c.majorAngles(),u=c.box.center(),h=e.distanceTo(u),p=h;return this.options.majorGridLines.type!==Pe&&d.length>1&&(t=e.x-u.x,i=e.y-u.y,n=(Ht(Math.atan2(i,t))+540)%360,d.sort(function(e,t){return _e(e,n)-_e(t,n)}),o=_e(d[0],d[1])/2,r=_e(n,d[0]),s=90-o,a=180-r-s,p=h*(Math.sin(Gt(a))/Math.sin(Gt(s)))),this.axisType().prototype.getValue.call(this,new Xt(l.x1,l.y2-p))}},rn=Qi.extend({radarMajorGridLinePositions:function(){return this.getTickPositions(this.options.majorUnit)},radarMinorGridLinePositions:function(){var e=this.options,t=0;return e.majorGridLines.visible&&(t=e.majorUnit),this.getTickPositions(e.minorUnit,t)},axisType:function(){return Qi}}),Me(rn.prototype,on),sn=Ji.extend({radarMajorGridLinePositions:function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},radarMinorGridLinePositions:function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},axisType:function(){return Ji}}),Me(sn.prototype,on),an=.333,ln=.01,cn=Ce.extend({init:function(e){this.closed=e},process:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m=this,g=e.slice(0),v=[],_=this.closed,b=g.length;if(b>2&&(this.removeDuplicates(0,g),b=g.length),b<2||2===b&&g[0].equals(g[1]))return v;for(t=g[0],i=g[1],n=g[2],v.push(new Ee(t));t.equals(g[b-1]);)_=!0,g.pop(),b--;if(2===b)return o=this.tangent(t,i,mt,gt),Ut(v).controlOut(this.firstControlPoint(o,t,i,mt,gt)),v.push(new Ee(i,this.secondControlPoint(o,t,i,mt,gt))),v;for(_?(t=g[b-1],i=g[0],n=g[1],a=this.controlPoints(t,i,n),r=a[1],s=a[0]):(l=this.tangent(t,i,mt,gt),r=this.firstControlPoint(l,t,i,mt,gt)),c=r,d=0;d<=b-3;d++)m.removeDuplicates(d,g),b=g.length,d+3<=b&&(t=g[d],i=g[d+1],n=g[d+2],u=m.controlPoints(t,i,n),Ut(v).controlOut(c),c=u[1],h=u[0],v.push(new Ee(i,h)));return _?(t=g[b-2],i=g[b-1],n=g[0],p=this.controlPoints(t,i,n),Ut(v).controlOut(c),v.push(new Ee(i,p[0])),Ut(v).controlOut(p[1]),v.push(new Ee(n,s))):(f=this.tangent(i,n,mt,gt),Ut(v).controlOut(c),v.push(new Ee(n,this.secondControlPoint(f,i,n,mt,gt)))),v},removeDuplicates:function(e,t){for(;t[e+1]&&(t[e].equals(t[e+1])||t[e+1].equals(t[e+2]));)t.splice(e+1,1)},invertAxis:function(e,t,i){var n,o,r=!1;return e.x===t.x?r=!0:t.x===i.x?(t.y<i.y&&e.y<=t.y||i.y<t.y&&t.y<=e.y)&&(r=!0):(n=this.lineFunction(e,t),o=this.calculateFunction(n,i.x),e.y<=t.y&&i.y<=o||t.y<=e.y&&i.y>=o||(r=!0)),r},isLine:function(e,t,i){var n=this.lineFunction(e,t),o=this.calculateFunction(n,i.x);return e.x===t.x&&t.x===i.x||$t(o,1)===$t(i.y,1)},lineFunction:function(e,t){var i=(t.y-e.y)/(t.x-e.x),n=e.y-i*e.x;return[n,i]},controlPoints:function(e,t,i){var n,o,r,s,a,l,c=mt,d=gt,u=!1,h=!1;return this.isLine(e,t,i)?n=this.tangent(e,t,mt,gt):(o={x:this.isMonotonicByField(e,t,i,mt),y:this.isMonotonicByField(e,t,i,gt)},o.x&&o.y?(n=this.tangent(e,i,mt,gt),u=!0):(this.invertAxis(e,t,i)&&(c=gt,d=mt),o[c]?n=0:(r=i[d]<e[d]&&e[d]<=t[d]||e[d]<i[d]&&t[d]<=e[d]?be((i[d]-e[d])*(t[c]-e[c])):-be((i[c]-e[c])*(t[d]-e[d])),n=ln*r,h=!0))),s=this.secondControlPoint(n,e,t,c,d),h&&(a=c,c=d,d=a),l=this.firstControlPoint(n,t,i,c,d),u&&(this.restrictControlPoint(e,t,s,n),this.restrictControlPoint(t,i,l,n)),[s,l]},restrictControlPoint:function(e,t,i,n){e.y<t.y?t.y<i.y?(i.x=e.x+(t.y-e.y)/n,i.y=t.y):i.y<e.y&&(i.x=t.x-(t.y-e.y)/n,i.y=e.y):i.y<t.y?(i.x=e.x-(e.y-t.y)/n,i.y=t.y):e.y<i.y&&(i.x=t.x+(e.y-t.y)/n,i.y=e.y)},tangent:function(e,t,i,n){var o,r=t[i]-e[i],s=t[n]-e[n];return o=0===r?0:s/r},isMonotonicByField:function(e,t,i,n){return i[n]>t[n]&&t[n]>e[n]||i[n]<t[n]&&t[n]<e[n]},firstControlPoint:function(e,t,i,n,o){var r=t[n],s=i[n],a=(s-r)*an;return this.point(r+a,t[o]+a*e,n,o)},secondControlPoint:function(e,t,i,n,o){var r=t[n],s=i[n],a=(s-r)*an;return this.point(s-a,i[o]-a*e,n,o)},point:function(e,t,i,n){var o=new Se.Point;return o[i]=e,o[n]=t,o},calculateFunction:function(e,t){var i,n=e.length,o=0;for(i=0;i<n;i++)o+=Math.pow(t,i)*e[i];return o}}),Ie.Gradients=li,kendo.deepExtend(kendo.dataviz,{constants:vt,services:It,autoMajorUnit:x,Point:Xt,Box:Zt,Ring:Jt,Sector:ei,ShapeBuilder:ii,ShapeElement:ri,ChartElement:ni,BoxElement:oi,RootElement:ci,FloatElement:di,Text:hi,TextBox:fi,Title:mi,AxisLabel:gi,Axis:wi,Note:bi,CategoryAxis:Ni,DateCategoryAxis:Ki,DateValueAxis:Xi,NumericAxis:Qi,LogarithmicAxis:Ji,PolarAxis:nn,RadarCategoryAxis:tn,RadarNumericAxis:rn,RadarLogarithmicAxis:sn,CurveProcessor:cn,rectToBox:A,addClass:i,removeClass:n,alignPathToPixel:o,clockwise:r,convertableToNumber:l,deepExtend:Me,elementStyles:h,getSpacing:p,getTemplate:f,getter:Fe,grep:m,hasClasses:g,HashMap:Mt,inArray:v,interpolateValue:_,InstanceObserver:Ft,isArray:t,isFunction:Re,isNumber:s,isObject:c,isString:a,map:b,mousewheelDelta:w,FontLoader:Qt,setDefaultOptions:y,sparseArrayLimits:k,styleValue:d,append:zt,bindEvents:Bt,Class:Ce,defined:Lt,deg:Ht,elementOffset:Nt,elementSize:Ot,eventElement:Vt,eventCoordinates:Wt,last:Ut,limitValue:qt,logToConsole:kendo.logToConsole,objectKey:jt,rad:Gt,round:$t,unbindEvents:Kt,valueOrDefault:Yt,absoluteDateDiff:M,addDuration:L,addTicks:R,ceilDate:N,dateComparer:O,dateDiff:V,dateEquals:U,dateIndex:j,duration:G,floorDate:H,lteDateIndex:$,startOfWeek:P,toDate:F,parseDate:K,parseDates:Y,toTime:W})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/core/core.min",["dataviz/core/kendo-core.min"],e)}(function(){!function(e){var t=kendo.dataviz,i=t.services,n=kendo.drawing;t.ExportMixin={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 n.exportSVG(this.exportVisual(),e)},exportImage:function(e){return n.exportImage(this.exportVisual(e),e)},exportPDF:function(e){return n.exportPDF(this.exportVisual(),e)},svg:function(){if(n.svg.Surface)return n.svg.exportGroup(this.exportVisual());throw Error("SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface")},imageDataURL:function(){var t,i,o;if(!kendo.support.canvas)return null;if(n.canvas.Surface)return t=e("<div />").css({display:"none",width:this.element.width(),height:this.element.height()}).appendTo(document.body),i=new n.canvas.Surface(t[0]),i.draw(this.exportVisual()),o=i._rootElement.toDataURL(),i.destroy(),t.remove(),o;throw Error("Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface")}},i.IntlService.register({format:function(e){return kendo.format.apply(null,[e].concat(Array.prototype.slice.call(arguments,1)))},toString:kendo.toString,parseDate:kendo.parseDate}),i.TemplateService.register({compile:kendo.template}),t.Point2D=t.Point,t.Box2D=t.Box,t.mwDelta=function(e){return t.mousewheelDelta(e.originalEvent)}}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.core.min",["dataviz/core/kendo-core.min","dataviz/core/core.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/themes/chart-base-theme.min",["kendo.dataviz.core.min"],e)}(function(){!function(){var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F;window.kendo.dataviz=window.kendo.dataviz||{},e=1.5,t=.4,i="#000",n="Arial, Helvetica, sans-serif",o="11px "+n,r="12px "+n,s="16px "+n,a="transparent",l="#fff",c=function(){return{icon:{border:{width:1}},label:{font:r,padding:3},line:{length:10,width:2},visible:!0}},d=function(){return{labels:{font:r},notes:c(),title:{font:s,margin:5}}},u=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4}},h=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4}},p=function(){return{gap:e,spacing:t}},f=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:l,gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}}},m=function(){return{border:{width:0},labels:{background:a},opacity:.6}},g=function(){return{gap:e,spacing:t,target:{color:"#ff0000"}}},v=function(){return{border:{_brightness:.8,width:1},downColor:l,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:i,width:1},spacing:.3}},_=function(){return{gap:e,spacing:t}},b=function(){return{margin:1}},w=function(){return{width:2}},y=function(){return{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3}},k=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5}},x=function(){return{markers:{visible:!1},width:2}},C=function(){return{gap:e,spacing:t}},S=function(){return{gap:e,spacing:t}},T=function(){return{width:1}},D=function(){return{gap:.5,line:{color:i,width:1},spacing:t}},A=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}}},E=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}}},I=function(e){return{visible:!0,labels:{font:o},overlay:e.gradients?{}:{gradient:"none"},area:u(),rangeArea:h(),verticalRangeArea:h(),bar:p(),boxPlot:f(),bubble:m(),bullet:g(),candlestick:v(),column:_(),pie:A(),donut:b(),funnel:E(),horizontalWaterfall:D(),line:w(),notes:c(),ohlc:y(),radarArea:k(),radarLine:x(),polarArea:k(),polarLine:x(),rangeBar:C(),rangeColumn:S(),scatterLine:T(),verticalArea:u(),verticalBoxPlot:f(),verticalBullet:g(),verticalLine:w(),waterfall:D()}},M=function(){return{font:s}},R=function(){return{labels:{font:r}}},F=function(e){return void 0===e&&(e={}),{axisDefaults:d(),categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:I(e),title:M(),legend:R()}},kendo.deepExtend(kendo.dataviz,{chartBaseTheme:F})}()},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/themes/auto-theme.min",["kendo.dataviz.core.min"],e)}(function(){function e(e){function i(e,t){o(e,n(t,"backgroundColor"))}function n(e,t){return s.find(".k-var--"+e).css(t)}function o(e,t){for(var i=r,n=e.split("."),o=n.shift();n.length>0;)i=i[o]=i[o]||{},o=n.shift();i[o]=t}var r,s;return!e&&t?t:(r={chart:kendo.dataviz.chartBaseTheme()},s=$('<div style="display: none">  <div class="k-var--accent"></div>  <div class="k-var--accent-contrast"></div>  <div class="k-var--base"></div>  <div class="k-var--background"></div>  <div class="k-var--normal-background"></div>  <div class="k-var--normal-text-color"></div>  <div class="k-var--hover-background"></div>  <div class="k-var--hover-text-color"></div>  <div class="k-var--selected-background"></div>  <div class="k-var--selected-text-color"></div>  <div class="k-var--chart-error-bars-background"></div>  <div class="k-var--chart-notes-background"></div>  <div class="k-var--chart-notes-border"></div>  <div class="k-var--chart-notes-lines"></div>  <div class="k-var--chart-crosshair-background"></div>  <div class="k-var--chart-inactive"></div>  <div class="k-var--chart-major-lines"></div>  <div class="k-var--chart-minor-lines"></div>  <div class="k-var--chart-area-opacity"></div>  <div class="k-widget">      <div class="k-var--chart-font"></div>      <div class="k-var--chart-title-font"></div>      <div class="k-var--chart-label-font"></div>  </div>  <div class="k-var--series">    <div class="k-var--series-a"></div>    <div class="k-var--series-b"></div>    <div class="k-var--series-c"></div>    <div class="k-var--series-d"></div>    <div class="k-var--series-e"></div>    <div class="k-var--series-f"></div>  </div>  <div class="k-var--gauge-pointer"></div>  <div class="k-var--gauge-track"></div></div>').appendTo(document.body),function(){i("chart.axisDefaults.crosshair.color","chart-crosshair-background"),i("chart.axisDefaults.labels.color","normal-text-color"),i("chart.axisDefaults.line.color","chart-major-lines"),i("chart.axisDefaults.majorGridLines.color","chart-major-lines"),i("chart.axisDefaults.minorGridLines.color","chart-minor-lines"),i("chart.axisDefaults.notes.icon.background","chart-notes-background"),i("chart.axisDefaults.notes.icon.border.color","chart-notes-border"),i("chart.axisDefaults.notes.line.color","chart-notes-lines"),i("chart.axisDefaults.title.color","normal-text-color"),i("chart.chartArea.background","background"),i("chart.legend.inactiveItems.labels.color","chart-inactive"),i("chart.legend.inactiveItems.markers.color","chart-inactive"),i("chart.legend.labels.color","normal-text-color"),i("chart.seriesDefaults.boxPlot.downColor","chart-major-lines"),i("chart.seriesDefaults.boxPlot.mean.color","base"),i("chart.seriesDefaults.boxPlot.median.color","base"),i("chart.seriesDefaults.boxPlot.whiskers.color","accent"),i("chart.seriesDefaults.bullet.target.color","accent"),i("chart.seriesDefaults.candlestick.downColor","normal-text-color"),i("chart.seriesDefaults.candlestick.line.color","normal-text-color"),i("chart.seriesDefaults.errorBars.color","chart-error-bars-background"),i("chart.seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),i("chart.seriesDefaults.icon.border.color","chart-major-lines"),i("chart.seriesDefaults.labels.background","background"),i("chart.seriesDefaults.labels.color","normal-text-color"),i("chart.seriesDefaults.notes.icon.background","chart-notes-background"),i("chart.seriesDefaults.notes.icon.border.color","chart-notes-border"),i("chart.seriesDefaults.notes.line.color","chart-notes-lines"),i("chart.seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),i("chart.seriesDefaults.verticalBoxPlot.mean.color","base"),i("chart.seriesDefaults.verticalBoxPlot.median.color","base"),i("chart.seriesDefaults.verticalBoxPlot.whiskers.color","accent"),i("chart.seriesDefaults.verticalBullet.target.color","accent"),i("chart.seriesDefaults.waterfall.line.color","chart-major-lines"),i("chart.title.color","normal-text-color"),o("chart.seriesDefaults.labels.opacity",n("chart-area-opacity","opacity")),i("diagram.shapeDefaults.fill.color","accent"),i("diagram.shapeDefaults.content.color","accent-contrast"),i("diagram.shapeDefaults.connectorDefaults.fill.color","normal-text-color"),i("diagram.shapeDefaults.connectorDefaults.stroke.color","accent-contrast"),i("diagram.shapeDefaults.connectorDefaults.hover.fill.color","accent-contrast"),i("diagram.shapeDefaults.connectorDefaults.hover.stroke.color","normal-text-color"),i("diagram.editable.resize.handles.stroke.color","normal-text-color"),i("diagram.editable.resize.handles.fill.color","normal-background"),i("diagram.editable.resize.handles.hover.stroke.color","normal-text-color"),i("diagram.editable.resize.handles.hover.fill.color","normal-text-color"),i("diagram.selectable.stroke.color","normal-text-color"),i("diagram.connectionDefaults.stroke.color","normal-text-color"),i("diagram.connectionDefaults.content.color","normal-text-color"),i("diagram.connectionDefaults.selection.handles.fill.color","accent-contrast"),i("diagram.connectionDefaults.selection.handles.stroke.color","normal-text-color"),i("diagram.connectionDefaults.selection.stroke.color","normal-text-color"),i("gauge.pointer.color","gauge-pointer"),i("gauge.scale.labels.color","normal-text-color"),i("gauge.scale.minorTicks.color","normal-text-color"),i("gauge.scale.majorTicks.color","normal-text-color"),i("gauge.scale.line.color","normal-text-color"),i("gauge.scale.rangePlaceholderColor","gauge-track")}(),function(){function e(e){return n(e,"fontSize")+" "+n(e,"fontFamily")}var t=e("chart-font"),i=e("chart-title-font"),r=e("chart-label-font");o("chart.axisDefaults.labels.font",r),o("chart.axisDefaults.notes.label.font",t),o("chart.axisDefaults.title.font",t),o("chart.legend.labels.font",t),o("chart.seriesDefaults.labels.font",r),o("chart.seriesDefaults.notes.label.font",t),o("chart.title.font",i)}(),function(){function e(e){return e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0)}function t(t){return e(t.match(/series-([a-z])$/)[1])}var i=$(".k-var--series div").toArray(),n=i.reduce(function(e,i){var n=t(i.className);return e[n]=$(i).css("backgroundColor"),e},[]);o("chart.seriesColors",n)}(),s.remove(),t=r,r)}var t;kendo.dataviz.autoTheme=e},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/themes/themes.min",["dataviz/themes/chart-base-theme.min"],e)}(function(){return function(e){function t(t,i){return e.map(t,function(e,t){return[[e,i[t]]]})}var i=window.kendo,n=i.dataviz.ui,o=i.deepExtend,r="#000",s="Arial,Helvetica,sans-serif",a="12px "+s,l="#fff",c=i.dataviz.chartBaseTheme({gradients:!0}),d={scale:{labels:{font:a}}},u={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"]}}},h=n.themes,p=n.registerTheme=function(e,t){var i,n={};n.chart=o({},c,t.chart),n.gauge=o({},d,t.gauge),n.diagram=o({},u,t.diagram),n.treeMap=o({},t.treeMap),i=n.chart.seriesDefaults,i.verticalLine=o({},i.line),i.verticalArea=o({},i.area),i.rangeArea=o({},i.area),i.verticalRangeArea=o({},i.rangeArea),i.verticalBoxPlot=o({},i.boxPlot),i.polarArea=o({},i.radarArea),i.polarLine=o({},i.radarLine),h[e]=n};p("black",{chart:{title:{color:l},legend:{labels:{color:l},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:l},errorBars:{color:l},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:l},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:l},border:{_brightness:1.5,opacity:1},highlight:{border:{color:l,opacity:.2}}},ohlc:{line:{color:l}}},chartArea:{background:"#3d3d3d"},seriesColors:["#0081da","#3aafff","#99c900","#ffeb3d","#b20753","#ff4195"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:l},majorGridLines:{color:"#545454"},minorGridLines:{color:"#454545"},title:{color:l},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:l},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#0070e4"},scale:{rangePlaceholderColor:"#1d1d1d",labels:{color:l},minorTicks:{color:l},majorTicks:{color:l},line:{color:l}}},diagram:{shapeDefaults:{fill:{color:"#0066cc"},connectorDefaults:{fill:{color:l},stroke:{color:"#384049"},hover:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#3d3d3d"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:l}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:l}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0081da","#314b5c"],["#3aafff","#3c5464"],["#99c900","#4f5931"],["#ffeb3d","#64603d"],["#b20753","#543241"],["#ff4195","#643e4f"]]}}),p("blueopal",{chart:{title:{color:"#293135"},legend:{labels:{color:"#293135"},inactiveItems:{labels:{color:"#27A5BA"},markers:{color:"#27A5BA"}}},seriesDefaults:{labels:{color:r,background:l,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:l},hover:{fill:{color:l},stroke:{color:"#003f59"}}},content:{color:"#293135"}},editable:{resize:{handles:{fill:{color:l},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"]]}}),p("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:l},stroke:{color:"#2c232b"},hover:{fill:{color:"#2c232b"},stroke:{color:l}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#2c232b"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:l}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:l}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#2c232b"},stroke:{color:l}}}}},treeMap:{colors:[["#a7008f","#451c3f"],["#ffb800","#564122"],["#3aafff","#2f3f55"],["#99c900","#424422"],["#b20753","#471d33"],["#ff4195","#562940"]]}}),p("default",{chart:{title:{color:"#8e8e8e"},legend:{labels:{color:"#232323"},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:r,background:l,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:l},hover:{fill:{color:l},stroke:{color:"#282828"}}},content:{color:"#2e2e2e"}},editable:{resize:{handles:{fill:{color:l},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:l},stroke:{color:"#282828"}}}}},treeMap:{colors:[["#ff6800","#edcfba"],["#a0a700","#dadcba"],["#ff8d00","#edd7ba"],["#678900","#cfd6ba"],["#ffb53c","#eddfc6"],["#396000","#c6ceba"]]}}),p("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:l},hover:{fill:{color:l},stroke:{color:"#282828"}}},content:{color:"#515967"}},editable:{resize:{handles:{fill:{color:l},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:l},stroke:{color:"#515967"}}}}},treeMap:{colors:[["#007bc3","#c2dbea"],["#76b800","#dae7c3"],["#ffae00","#f5e5c3"],["#ef4c00","#f2d2c3"],["#a419b7","#e3c7e8"],["#430b62","#d0c5d7"]]}}),p("metro",{chart:{title:{color:"#777777"},legend:{labels:{color:"#777777"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:r},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:r},stroke:{color:l},hover:{fill:{color:l},stroke:{color:r}}},content:{color:"#777"}},editable:{resize:{handles:{fill:{color:l},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:l},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"]]}}),p("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:l},stroke:{color:"#0e0e0e"},hover:{fill:{color:"#0e0e0e"},stroke:{color:l}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#0e0e0e"},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:"#787878"}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#0e0e0e"},stroke:{color:l}}}}},treeMap:{colors:[["#00aba9","#0b2d2d"],["#309b46","#152a19"],["#8ebc00","#28310b"],["#ff6900","#3e200b"],["#e61e26","#391113"],["#d8e404","#36390c"],["#25a0da","#132b37"],["#7e51a1","#241b2b"],["#313131","#151515"],["#ed1691","#3b1028"]]}}),p("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:l,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:l},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},line:{color:"#8c909e"}}},diagram:{shapeDefaults:{fill:{color:"#f3ae03"},connectorDefaults:{fill:{color:l},stroke:{color:"#414550"},hover:{fill:{color:"#414550"},stroke:{color:l}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#414550"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:l}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:l}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#414550"},stroke:{color:l}}}}},treeMap:{colors:[["#ffca08","#4e4b2b"],["#ff710f","#4e392d"],["#ed2e24","#4b2c31"],["#ff9f03","#4e422a"],["#e13c02","#482e2a"],["#a00201","#3b232a"]]}}),p("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:l},hover:{fill:{color:l},stroke:{color:"#686868"}}},content:{color:"#686868"}},editable:{resize:{handles:{fill:{color:l},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:l},stroke:{color:"#686868"}}}}},treeMap:{colors:[["#527aa3","#d0d8e1"],["#6f91b3","#d6dde4"],["#8ca7c2","#dce1e7"],["#a8bdd1","#e2e6ea"],["#c5d3e0","#e7eaed"],["#e2e9f0","#edeff0"]]}}),p("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:l},hover:{fill:{color:l},stroke:{color:"#333333"}}},content:{color:"#333333"}},editable:{resize:{handles:{fill:{color:l},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:l},stroke:{color:"#333333"}},stroke:{color:"#333333"}}}},treeMap:{colors:[["#428bca","#d1e0ec"],["#5bc0de","#d6eaf0"],["#5cb85c","#d6e9d6"],["#5cb85c","#f4e8d7"],["#e67d4a","#f2ddd3"],["#da3b36","#f0d0cf"]]}}),p("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:l},hover:{fill:{color:l},stroke:{color:"#363940"}}},content:{color:"#4c5356"}},editable:{resize:{handles:{fill:{color:l},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:l},stroke:{color:"#363940"}},stroke:{color:"#363940"}}}},treeMap:{colors:[["#10c4b2","#cff3f0"],["#ff7663","#ffe4e0"],["#ffb74f","#fff1dc"],["#a2df53","#ecf9dd"],["#1c9ec4","#d2ecf3"],["#ff63a5","#ffe0ed"],["#1cc47b","#d2f3e5"]]}}),p("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:l},hover:{fill:{color:l},stroke:{color:"#7f7f7f"}}},content:{color:"#444444"}},editable:{resize:{handles:{fill:{color:l},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:l},stroke:{color:"#444444"}},stroke:{color:"#444444"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),p("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:l},hover:{fill:{color:l},stroke:{color:"#7f7f7f"}}},content:{color:"#fff"}},editable:{resize:{handles:{fill:{color:l},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:l},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 i="#333333",n="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#dddddd",a=["#008fd3","#99d101","#f39b02","#f05662","#c03c53","#acacac"],c=["#cbe8f5","#eaf5cb","#fceacc","#fbdcdf","#f2d7dc","#eeeeee"],d=a[0],u=l;p("fiori",{chart:{title:{color:i},legend:{labels:{color:i},inactiveItems:{labels:{color:n},markers:{color:n}}},seriesDefaults:{labels:{color:i},errorBars:{color:i},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:i},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:i},crosshair:{color:n},notes:e()}},gauge:{pointer:{color:d},scale:{rangePlaceholderColor:r,labels:{color:i},minorTicks:{color:i},majorTicks:{color:i},line:{color:i}}},diagram:{shapeDefaults:{fill:{color:d},connectorDefaults:{fill:{color:i},stroke:{color:u},hover:{fill:{color:u},stroke:{color:i}}},content:{color:i}},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,c)}})}(),function(){function e(){return{icon:{background:"#00b0ff",border:{color:"#00b0ff"}},label:{color:"#ffffff"},line:{color:r}}}var i="#4e4e4e",n="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#e5e5e5",a=["#0072c6","#5db2ff","#008a17","#82ba00","#ff8f32","#ac193d"],c=["#cbe2f3","#deeffe","#cbe7d0","#e5f0cb","#fee8d5","#eed0d7"],d=a[0],u=l;p("office365",{chart:{title:{color:i},legend:{labels:{color:i},inactiveItems:{labels:{color:n},markers:{color:n}}},seriesDefaults:{labels:{color:i},errorBars:{color:i},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:i},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:i},crosshair:{color:n},notes:e()}},gauge:{pointer:{color:d},scale:{rangePlaceholderColor:r,labels:{color:i},minorTicks:{color:i},majorTicks:{color:i},line:{color:i}}},diagram:{shapeDefaults:{fill:{color:d},connectorDefaults:{fill:{color:i},stroke:{color:u},hover:{fill:{color:u},stroke:{color:i}}},content:{color:i}},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,c)}})}(),function(){function e(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var i="#32364c",n="#7f7f7f",o="#bdbdbd",r="#dfe0e1",s="#dfe0e1",a=["#ff4350","#ff9ea5","#00acc1","#80deea","#ffbf46","#ffd78c"],c=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],d=a[0],u=l;p("nova",{chart:{title:{color:i},legend:{labels:{color:i},inactiveItems:{labels:{color:n},markers:{color:n}}},seriesDefaults:{labels:{color:i},errorBars:{color:i},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:i},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:i},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:d},scale:{rangePlaceholderColor:r,labels:{color:i},minorTicks:{color:i},majorTicks:{color:i},line:{color:i}}},diagram:{shapeDefaults:{fill:{color:d},connectorDefaults:{fill:{color:i},stroke:{color:u},hover:{fill:{color:u},stroke:{color:i}}},content:{color:i}},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,c)}})}(),function(){var e=["#ff6358","#ffd246","#78d237","#28b4c8","#2d73f5","#aa46be"],i=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"];p("default-v2",{chart:{},gauge:{},diagram:{},treeMap:{colors:t(e,i)}}),h.sass=h["default-v2"]}(),function(){var e="#292b2c",i="rgba(0, 0, 0, .04)",n=["#0275d8","#5bc0de","#5cb85c","#f0ad4e","#e67d4a","#d9534f"],o=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],r=n[0];p("bootstrap-v4",{chart:{},gauge:{pointer:{color:r},scale:{rangePlaceholderColor:i,labels:{color:e},minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}},diagram:{},treeMap:{colors:t(n,o)}})}()}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.themes.min",["kendo.dataviz.core.min","dataviz/themes/chart-base-theme.min","dataviz/themes/auto-theme.min","dataviz/themes/themes.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/chart/kendo-chart.min",["kendo.core.min","kendo.color.min","kendo.drawing.min","kendo.dataviz.core.min"],e)}(function(){!function(e){function t(e,t){for(var i=0;i<t.length;i++)if(t[i].options.name===e)return t[i].prepareUserOptions(),new ct(t[i])}function i(e){var t,i,n=e.length,o=0;for(t=0;t<n;t++)i=e[t],te(i)&&o++;return o}function n(e,t){if(null===t)return t;var i=we(e,!0);return i(t)}function o(e,t,i,n){var r,s,a,l,c;if(void 0===i&&(i={}),void 0===n&&(n=!1),r=i.defaults=i.defaults||{},s=i.depth=i.depth||0,a=!1,i.excluded=i.excluded||[],s>Xi)return null;for(l in e)!De(l,i.excluded)&&e.hasOwnProperty(l)&&(c=e[l],Ae(c)?(a=!0,n||(e[l]=Ee(c(t),r[l]))):Ie(c)&&(n||(i.defaults=r[l]),i.depth++,a=o(c,t,i,n)||a,i.depth--));return a}function r(e){var t,i=e.length,n=0;for(t=0;t<i;t++)n=Math.max(n,e[t].data.length);return n}function s(e,t,i,n,o){var r=e.box,s=new at;return s[t]=r[t+i],s[n]=r[n+o],s}function a(e){for(var t=0;t<e.length;t++)if(be(e[t].zIndex))return!0}function l(e){var t=e.overlay;return t&&t.gradient&&"none"!==t.gradient}function c(e,t){e.forEach(t)}function d(e,t){var i,n=e.length;for(i=n-1;i>=0;i--)t(e[i],i-n-1)}function u(e){return i(e)===e.length}function h(e){return be(e)&&null!==e}function p(e){var t,i,n,o=e.series;for(t=0;t<o.length;t++)i=o[t],n=i.data,!n||ye(n[0])||Ie(n[0])||(i.data=[n])}function f(){return"pane"+Nn++}function m(e,t){null!==t&&e.push(t)}function g(e,t,i){var n,o=t.visible;return be(o)?o:(n=e.pointVisibility,n?n[i]:void 0)}function v(e){var t,i,n,o=e.data,r=[],s=0,a=0;for(t=0;t<o.length;t++)i=pt.current.bindPoint(e,t),n=i.valueFields.value,Oe(n)&&(n=parseFloat(n)),te(n)?(i.visible=g(e,i.fields,t)!==!1,i.value=Math.abs(n),r.push(i),i.visible&&(s+=i.value),0!==n&&a++):r.push(null);return{total:s,points:r,count:a}}function _(e,t){return e&&t?e.toLowerCase()===t.toLowerCase():e===t}function b(e,t){var i,n,o=[],r=[].concat(t);for(i=0;i<e.length;i++)n=e[i],De(n.type,r)&&o.push(n);return o}function w(e,t,i){var n,o;return null===t?t:(n="_date_"+e,o=t[n],o||(o=Ve(i,we(e,!0)(t)),t[n]=o),o)}function y(e,t){var i=e.type,n=t instanceof Date;return!i&&n||_(i,ge)}function k(e){return 1===e.length?e[0]:e}function x(e){return e.missingValues?e.missingValues:On.test(e.type)||e.stack?Ft:Pt}function C(e,t){var i,n=pt.current.bindPoint(e,null,t),o=n.valueFields;for(i in o)if(J.convertableToNumber(o[i]))return!0}function S(e){var t,i,n=e.start,o=e.dir,r=e.min,s=e.max,a=e.getter,l=e.hasItem,c=e.series,d=n;do d+=o,l(d)&&(i=a(d),t=C(c,i.item));while(r<=d&&d<=s&&!t);if(t)return i}function T(e,t,i,n,o){var r,s,a,l,c,d=t.min,u=t.max,h=d>0&&d<i,p=u+1<i;(h||p)&&(r=x(e),r!==Pt?(h&&(s=n(d-1)),p&&(a=n(u+1))):(h&&(l=n(d-1),c=C(e,l.item),s=c?l:S({start:d,dir:-1,min:0,max:i-1,getter:n,hasItem:o,series:e})),p&&(l=n(u+1),c=C(e,l.item),a=c?l:S({start:u,dir:1,min:0,max:i-1,getter:n,hasItem:o,series:e}))),s&&(e._outOfRangeMinPoint=s),a&&(e._outOfRangeMaxPoint=a))}function D(e){var t,i,n,o=e.length;if(o>0)for(i=0;i<o;i++)n=e[i].contentBox(),t?t.wrap(n):t=n.clone();return t||new Ce}function A(e,t){var i,n;for(i=0;i<e.length;i++)if(n=e[i],n&&n.pane===t)return n}function E(e){return""===e||null===e||"none"===e||"transparent"===e||!be(e)}function I(e,t,i){var n,o=t,r=e;if(e.indexOf(".")>-1){for(n=e.split(".");n.length>1;)r=n.shift(),be(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}function M(e,t,i){var n=[].concat(t instanceof Ue?e.categoryAxis:e.valueAxis);Me(n[t.axisIndex],i)}function R(e,t,i){return $e(e,function(e){return 0===i&&!e.categoryAxis||e.categoryAxis===t})}function F(){this._defaultPrevented=!0}function P(e,t){var i=(t||"").toLowerCase(),n=e.event,o="none"===i&&!(n.ctrlKey||n.shiftKey||n.altKey)||n[i+"Key"];return o}function z(e){var t,i,n={};for(t=0;t<e.length;t++)i=e[t],i.axis.options.name&&(n[i.axis.options.name]={min:i.range.min,max:i.range.max});return n}function B(e){var t=document.createElement("div");return e&&(t.className=e),t}function L(e){for(var t=e;t&&!Ye(t,"k-handle");)t=t.parentNode;return t}function H(e,t,i,n){var o=[].concat(i?e.yAxis:e.xAxis)[t];Me(o,n)}function N(e){var t,i,n=J.rad(e),o=je(Math.sin(n),ve),r=je(Math.cos(n),ve);return t=Math.abs(o)>zo?se:r<0?fe:ce,i=Math.abs(o)<Po?se:o<0?le:ae,{horizontal:t,vertical:i}}function O(e,t,i,n){var o,r,s=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),a=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);return 0!==a&&(r=s/a,o=new xe(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y))),o}function V(e,t){return e.value.x-t.value.x}function W(e){var t,i,n=_r;for(t=0;t<n.length;t++)i=n[t]+"Axes",e[i]&&(e[n[t]+"Axis"]=e[i],delete e[i])}function U(e,t){if(e)for(var i=0;i<e.length;i++)if(e[i].category===t)return[e[i]]}function q(e,t){function i(e){var t=(e||{}).color||o.color,i=Me({},a,a[n],o,o[n],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete i[n],i}var n,o,r,s,a=(t||{}).axisDefaults||{};for(s=0;s<_r.length;s++)n=_r[s]+"Axis",o=e.axisDefaults||{},r=[].concat(e[n]),r=r.map(i),e[n]=r.length>1?r:r[0]}function j(e,t){var i,n,o,r=e.series,s=r.length,a=e.seriesDefaults,l=Me({},e.seriesDefaults),c=t?Me({},t.seriesDefaults):{},d=Me({},c);for(G(l),G(d),i=0;i<s;i++)n=r[i].type||e.seriesDefaults.type,o=Me({data:[]},d,c[n],{tooltip:e.tooltip},l,a[n]),r[i]._defaults=o,r[i]=Me({},o,r[i])}function G(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 $(e){var t,i,n,o={};for(t=0;t<e.length;t++)i=e[t],n=i.options.name,n&&(o[n]=i.range());return o}function K(e,t){void 0===t&&(t=J.dateComparer);for(var i=1,n=e.length;i<n;i++)if(t(e[i],e[i-1])<0){e.sort(t);break}return e}function Y(e,t){var i,n,o,r;for(void 0===t&&(t=J.dateComparer),i=K(e,t),n=i.length,o=n>0?[i[0]]:[],r=1;r<n;r++)0!==t(i[r],Re(o))&&o.push(i[r]);return o}function Q(e){var t,i,n,o,r=e.length,s=[];for(t=0;t<r;t++)for(i=e[t],n=i.length,o=0;o<n;o++)s[o]=s[o]||[],s[o].push(i[o]);return s}function X(e,t){var i,n,o,r;for(i in t)!De(i,Cr)&&t.hasOwnProperty(i)&&(n=t[i],o=e[i],be(o)&&(r=null===n,r||!be(n)?(delete e[i],r&&delete t[i]):o&&Ie(n)&&Ie(o)&&X(o,n)))}function Z(e){for(var t=0;t<e.length;t++)e[t].notifyRender()}var J,ee,te,ie,ne,oe,re,se,ae,le,ce,de,ue,he,pe,fe,me,ge,ve,_e,be,we,ye,ke,xe,Ce,Se,Te,De,Ae,Ee,Ie,Me,Re,Fe,Pe,ze,Be,Le,He,Ne,Oe,Ve,We,Ue,qe,je,Ge,$e,Ke,Ye,Qe,Xe,Ze,Je,et,tt,it,nt,ot,rt,st,at,lt,ct,dt,ut,ht,pt,ft,mt,gt,vt,_t,bt,wt,yt,kt,xt,Ct,St,Tt,Dt,At,Et,It,Mt,Rt,Ft,Pt,zt,Bt,Lt,Ht,Nt,Ot,Vt,Wt,Ut,qt,jt,Gt,$t,Kt,Yt,Qt,Xt,Zt,Jt,ei,ti,ii,ni,oi,ri,si,ai,li,ci,di,ui,hi,pi,fi,mi,gi,vi,_i,bi,wi,yi,ki,xi,Ci,Si,Ti,Di,Ai,Ei,Ii,Mi,Ri,Fi,Pi,zi,Bi,Li,Hi,Ni,Oi,Vi,Wi,Ui,qi,ji,Gi,$i,Ki,Yi,Qi,Xi,Zi,Ji,en,tn,nn,on,rn,sn,an,ln,cn,dn,un,hn,pn,fn,mn,gn,vn,_n,bn,wn,yn,kn,xn,Cn,Sn,Tn,Dn,An,En,In,Mn,Rn,Fn,Pn,zn,Bn,Ln,Hn,Nn,On,Vn,Wn,Un,qn,jn,Gn,$n,Kn,Yn,Qn,Xn,Zn,Jn,eo,to,io,no,oo,ro,so,ao,lo,co,uo,ho,po,fo,mo,go,vo,_o,bo,wo,yo,ko,xo,Co,So,To,Do,Ao,Eo,Io,Mo,Ro,Fo,Po,zo,Bo,Lo,Ho,No,Oo,Vo,Wo,Uo,qo,jo,Go,$o,Ko,Yo,Qo,Xo,Zo,Jo,er,tr,ir,nr,or,rr,sr,ar,lr,cr,dr,ur,hr,pr,fr,mr,gr,vr,_r,br,wr,yr,kr,xr,Cr;window.kendo.dataviz=window.kendo.dataviz||{},J=kendo.dataviz,ee=J.Class,te=J.isNumber,ie=J.constants,ne=ie.MAX_VALUE,oe=ie.MIN_VALUE,re=ie.VALUE,se=ie.CENTER,ae=ie.TOP,le=ie.BOTTOM,ce=ie.LEFT,de=ie.WHITE,ue=ie.CIRCLE,he=ie.X,pe=ie.Y,fe=ie.RIGHT,me=ie.BLACK,ge=ie.DATE,ve=ie.DEFAULT_PRECISION,_e=ie.ARC,be=J.defined,we=J.getter,ye=J.isArray,ke=J.ChartElement,xe=J.Point,Ce=J.Box,Se=J.alignPathToPixel,Te=J.setDefaultOptions,De=J.inArray,Ae=J.isFunction,Ee=J.valueOrDefault,Ie=J.isObject,Me=J.deepExtend,Re=J.last,Fe=J.eventElement,Pe=J.getTemplate,ze=J.TextBox,Be=J.ShapeElement,Le=J.getSpacing,He=J.CurveProcessor,Ne=J.append,Oe=J.isString,Ve=J.parseDate,We=J.styleValue,Ue=J.CategoryAxis,qe=J.BoxElement,je=J.round,Ge=J.limitValue,$e=J.grep,Ke=J.elementStyles,Ye=J.hasClasses,Qe=J.bindEvents,Xe=J.services,Ze=J.unbindEvents,Je=kendo.support,et=kendo.drawing,tt=et.Path,it=et.Animation,nt=et.AnimationFactory,ot=et.Group,rt=kendo.Color,st=kendo.geometry,at=st.Point,lt=st.transform,ct=ee.extend({init:function(e){this._axis=e,this.options=e.options},value:function(e){var t=this._axis,i=t.getCategory?t.getCategory(e):t.getValue(e);return i},slot:function(e,t,i){return void 0===i&&(i=!0),this._axis.slot(e,t,i)},range:function(){return this._axis.range()},valueRange:function(){return this._axis.valueRange()}}),dt=kendo.Class.extend({init:function(e){this.visual=e.visual,this.chartsVisual=e.chartContainer.visual,this._pane=e},findAxisByName:function(e){return t(e,this._pane.axes)}}),ut=ee.extend({init:function(e){this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}}),ht={min:function(e){var t,i,n=e.length,o=ne;for(t=0;t<n;t++)i=e[t],te(i)&&(o=Math.min(o,i));return o===ne?e[0]:o},max:function(e){var t,i,n=e.length,o=oe;for(t=0;t<n;t++)i=e[t],te(i)&&(o=Math.max(o,i));return o===oe?e[0]:o},sum:function(e){var t,i,n=e.length,o=0;for(t=0;t<n;t++)i=e[t],te(i)&&(o+=i);return o},sumOrNull:function(e){var t=null;return i(e)&&(t=ht.sum(e)),t},count:function(e){var t,i,n=e.length,o=0;for(t=0;t<n;t++)i=e[t],null!==i&&be(i)&&o++;return o},avg:function(e){var t=i(e),n=e[0];return t>0&&(n=ht.sum(e)/t),n},first:function(e){var t,i,n=e.length;for(t=0;t<n;t++)if(i=e[t],null!==i&&be(i))return i;return e[0]}},pt=ee.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(e,t,i){var n,o,r=this;for(void 0===t&&(t=[re]),void 0===i&&(i={}),n=0;n<e.length;n++)o=e[n],r._valueFields[o]=t,r._otherFields[o]=i,r._nullValue[o]=r._makeValue(t,null),r._undefinedValue[o]=r._makeValue(t,void 0)},canonicalFields:function(e){return this.valueFields(e).concat(this.otherFields(e))},valueFields:function(e){return this._valueFields[e.type]||[re]},otherFields:function(e){return this._otherFields[e.type]||[re]},bindPoint:function(e,t,i){var n,o,r,s,a,l=e.data,c=be(i)?i:l[t],d={valueFields:{value:c}},u=this.valueFields(e),h=this._otherFields[e.type];return null===c?o=this._nullValue[e.type]:be(c)?Array.isArray(c)?(r=c.slice(u.length),o=this._bindFromArray(c,u),n=this._bindFromArray(r,h)):"object"==typeof c&&(s=this.sourceFields(e,u),a=this.sourceFields(e,h),o=this._bindFromObject(c,u,s),n=this._bindFromObject(c,h,a)):o=this._undefinedValue[e.type],be(o)&&(1===u.length?d.valueFields.value=o[u[0]]:d.valueFields=o),d.fields=n||{},d},_makeValue:function(e,t){var i,n,o={},r=e.length;for(i=0;i<r;i++)n=e[i],o[n]=t;return o},_bindFromArray:function(e,t){var i,n,o={};if(t)for(i=Math.min(t.length,e.length),n=0;n<i;n++)o[t[n]]=e[n];return o},_bindFromObject:function(e,t,i){var o,r,s,a,l;if(void 0===i&&(i=t),o={},t)for(r=t.length,s=0;s<r;s++)a=t[s],l=i[s],o[a]=n(l,e);return o},sourceFields:function(e,t){var i,n,o,r,s=[];if(t)for(i=t.length,n=0;n<i;n++)o=t[n],r=o===re?"field":o+"Field",s.push(e[r]||o);return s}}),pt.current=new pt,ft="stderr",mt="stddev",gt=/percent(?:\w*)\((\d+)\)/,vt=RegExp("^"+mt+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),_t=ee.extend({init:function(e,t,i){this.initGlobalRanges(e,t,i)},initGlobalRanges:function(e,t,i){var n,o,r,s,a,l=t.data,c=vt.exec(e);c?(this.valueGetter=this.createValueGetter(t,i),n=this.getAverage(l),o=this.getStandardDeviation(l,n,!1),r=c[1]?parseFloat(c[1]):1,s={low:n.value-o*r,high:n.value+o*r},this.globalRange=function(){return s}):e.indexOf&&e.indexOf(ft)>=0&&(this.valueGetter=this.createValueGetter(t,i),
a=this.getStandardError(l,this.getAverage(l)),this.globalRange=function(e){return{low:e-a,high:e+a}})},createValueGetter:function(e,t){var i,n,o,r=e.data,s=pt.current,a=s.valueFields(e),l=be(r[0])?r[0]:{};return ye(l)?(n=t?a.indexOf(t):0,i=we("["+n+"]")):te(l)?i=we():typeof l===ie.OBJECT&&(o=s.sourceFields(e,a),i=we(o[a.indexOf(t)])),i},getErrorRange:function(e,t){var i,n,o,r;if(!be(t))return null;if(this.globalRange)return this.globalRange(e);if(ye(t))i=e-t[0],n=e+t[1];else if(te(o=parseFloat(t)))i=e-o,n=e+o;else{if(!(o=gt.exec(t)))throw Error("Invalid ErrorBar value: "+t);r=e*(parseFloat(o[1])/100),i=e-Math.abs(r),n=e+Math.abs(r)}return{low:i,high:n}},getStandardError:function(e,t){return this.getStandardDeviation(e,t,!0)/Math.sqrt(t.count)},getStandardDeviation:function(e,t,i){var n,o,r=this,s=e.length,a=i?t.count-1:t.count,l=0;for(n=0;n<s;n++)o=r.valueGetter(e[n]),te(o)&&(l+=Math.pow(o-t.value,2));return Math.sqrt(l/a)},getAverage:function(e){var t,i,n=this,o=e.length,r=0,s=0;for(t=0;t<o;t++)i=n.valueGetter(e[t]),te(i)&&(r+=i,s++);return{value:r/s,count:s}}}),bt=Je.browser||{},wt=600,yt="fadeIn",kt="glass",xt=.8,Ct=5,St=bt.msie?.001:0,Tt="errorLow",Dt="errorHigh",At="xErrorLow",Et="xErrorHigh",It="yErrorLow",Mt="yErrorHigh",Rt=8,Ft="zero",Pt="interpolate",zt="gap",Bt="above",Lt="below",Ht="smooth",Nt="step",Ot="area",Vt="bar",Wt="boxPlot",Ut="bubble",qt="bullet",jt="candlestick",Gt="column",$t="donut",Kt="funnel",Yt="horizontalWaterfall",Qt="line",Xt="ohlc",Zt="pie",Jt="polarArea",ei="polarLine",ti="polarScatter",ii="radarArea",ni="radarColumn",oi="radarLine",ri="rangeArea",si="rangeBar",ai="rangeColumn",li="scatter",ci="scatterLine",di="verticalArea",ui="verticalBoxPlot",hi="verticalBullet",pi="verticalLine",fi="verticalRangeArea",mi="waterfall",gi=[Vt,Gt,Xt,jt,Wt,ui,qt,ai,si,mi,Yt],vi="legendItemClick",_i="legendItemHover",bi="legendItemLeave",wi="seriesClick",yi="seriesHover",ki="seriesOver",xi="seriesLeave",Ci="plotAreaClick",Si="plotAreaHover",Ti="plotAreaLeave",Di="drag",Ai="dragEnd",Ei="dragStart",Ii="zoomStart",Mi="zoom",Ri="zoomEnd",Fi="selectStart",Pi="select",zi="selectEnd",Bi="render",Li="showTooltip",Hi="hideTooltip",Ni="paneRender",Oi="log",Vi="category",Wi="insideEnd",Ui="insideBase",qi="outsideEnd",ji="DOMMouseScroll mousewheel",Gi=150,$i={INITIAL_ANIMATION_DURATION:wt,FADEIN:yt,LEGEND_ITEM_CLICK:vi,LEGEND_ITEM_HOVER:_i,LEGEND_ITEM_LEAVE:bi,SERIES_CLICK:wi,SERIES_HOVER:yi,SERIES_OVER:ki,SERIES_LEAVE:xi,GLASS:kt,BORDER_BRIGHTNESS:xt,TOOLTIP_OFFSET:Ct,START_SCALE:St,ERROR_LOW_FIELD:Tt,ERROR_HIGH_FIELD:Dt,X_ERROR_LOW_FIELD:At,X_ERROR_HIGH_FIELD:Et,Y_ERROR_LOW_FIELD:It,Y_ERROR_HIGH_FIELD:Mt,LINE_MARKER_SIZE:Rt,INTERPOLATE:Pt,ZERO:Ft,SMOOTH:Ht,STEP:Nt,CATEGORY:Vi,FUNNEL:Kt,BAR:Vt,CANDLESTICK:jt,PIE:Zt,COLUMN:Gt,AREA:Ot,VERTICAL_BULLET:hi,BOX_PLOT:Wt,OHLC:Xt,WATERFALL:mi,LINE:Qt,BULLET:qt,VERTICAL_LINE:pi,VERTICAL_AREA:di,RANGE_AREA:ri,VERTICAL_RANGE_AREA:fi,RANGE_COLUMN:ai,VERTICAL_BOX_PLOT:ui,RANGE_BAR:si,HORIZONTAL_WATERFALL:Yt,SCATTER:li,SCATTER_LINE:ci,BUBBLE:Ut,RADAR_AREA:ii,RADAR_LINE:oi,RADAR_COLUMN:ni,POLAR_LINE:ei,POLAR_AREA:Jt,POLAR_SCATTER:ti,RENDER:Bi,PLOT_AREA_CLICK:Ci,PLOT_AREA_HOVER:Si,PLOT_AREA_LEAVE:Ti,LOGARITHMIC:Oi,DRAG:Di,DRAG_START:Ei,DRAG_END:Ai,ZOOM_START:Ii,ZOOM:Mi,ZOOM_END:Ri,SELECT_START:Fi,SELECT:Pi,SELECT_END:zi,PANE_RENDER:Ni,GAP:zt,DONUT:$t,INSIDE_END:Wi,INSIDE_BASE:Ui,OUTSIDE_END:qi,MOUSEWHEEL:ji,MOUSEWHEEL_DELAY:Gi,SHOW_TOOLTIP:Li,HIDE_TOOLTIP:Hi,EQUALLY_SPACED_SERIES:gi,ABOVE:Bt,BELOW:Lt},Ki=4,Yi=ke.extend({init:function(e,t,i,n,o,r){ke.fn.init.call(this,r),this.low=e,this.high=t,this.isVertical=i,this.chart=n,this.series=o},reflow:function(e){var t,i=this.options.endCaps,n=this.isVertical,o=this.getAxis(),r=o.getSlot(this.low,this.high),s=e.center(),a=this.getCapsWidth(e,n),l=n?s.x:s.y,c=l-a,d=l+a;n?(t=[new xe(s.x,r.y1),new xe(s.x,r.y2)],i&&t.push(new xe(c,r.y1),new xe(d,r.y1),new xe(c,r.y2),new xe(d,r.y2)),this.box=new Ce(c,r.y1,d,r.y2)):(t=[new xe(r.x1,s.y),new xe(r.x2,s.y)],i&&t.push(new xe(r.x1,c),new xe(r.x1,d),new xe(r.x2,c),new xe(r.x2,d)),this.box=new Ce(r.x1,c,r.x2,d)),this.linePoints=t},getCapsWidth:function(e,t){var i=t?e.width():e.height(),n=Math.min(Math.floor(i/2),Ki)||Ki;return n},createVisual:function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},createDefaultVisual:function(){var e,t,i=this,n=this,o=n.options,r=n.linePoints,s={stroke:{color:o.color,width:o.line.width,dashType:o.line.dashType}};for(ke.fn.createVisual.call(this),e=0;e<r.length;e+=2)t=new tt(s).moveTo(r[e].x,r[e].y).lineTo(r[e+1].x,r[e+1].y),Se(t),i.visual.append(t)}}),Te(Yi,{animation:{type:yt,delay:wt},endCaps:!0,line:{width:2},zIndex:1}),Qi=Yi.extend({getAxis:function(){var e=this.chart.seriesValueAxis(this.series);return e}}),Xi=5,Zi=ke.extend({init:function(e,t){ke.fn.init.call(this,t),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(t.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()},render:function(){this.traverseDataPoints(this.addValue.bind(this))},pointOptions:function(e,t){var i,n=this.seriesOptions[t];return n||(i=this.pointType().prototype.defaults,this.seriesOptions[t]=n=Me({},i,{vertical:!this.options.invertAxes},e)),n},plotValue:function(e){var t,i,n,o,r,s,a,l;if(!e)return 0;if(this.options.isStacked100&&te(e.value)){for(t=e.categoryIx,i=this.categoryPoints[t],n=[],o=0,r=0;r<i.length;r++)if(s=i[r]){if(a=e.series.stack,l=s.series.stack,a&&l&&a.group!==l.group)continue;te(s.value)&&(o+=Math.abs(s.value),n.push(Math.abs(s.value)))}if(o>0)return e.value/o}return e.value},plotRange:function(e,t){var i,n,o,r,s,a,l,c,d,u,h,p,f,m=this;if(void 0===t&&(t=0),i=this.categoryPoints[e.categoryIx],this.options.isStacked){for(n=this.plotValue(e),o=n>=0,r=t,s=!1,a=0;a<i.length&&(l=i[a],e!==l);a++){if(c=e.series.stack,d=l.series.stack,c&&d){if(typeof c===ie.STRING&&c!==d)continue;if(c.group&&c.group!==d.group)continue}u=m.plotValue(l),(u>=0&&o||u<0&&!o)&&(r+=u,n+=u,s=!0,m.options.isStacked100&&(n=Math.min(n,1)))}return s&&(r-=t),[r,n]}return h=e.series,p=this.seriesValueAxis(h),f=this.categoryAxisCrossingValue(p),[f,J.convertableToNumber(e.value)?e.value:f]},stackLimits:function(e,t){var i,n,o,r,s,a=this,l=ne,c=oe;for(i=0;i<this.categoryPoints.length;i++)if(n=a.categoryPoints[i])for(o=0;o<n.length;o++)r=n[o],r&&(r.series.stack!==t&&r.series.axis!==e||(s=a.plotRange(r,0)[1],be(s)&&isFinite(s)&&(c=Math.max(c,s),l=Math.min(l,s))));return{min:l,max:c}},updateStackRange:function(){var e,t,i,n,o,r,s=this,a=this.options,l=a.isStacked,c=a.series,d={};if(l)for(e=0;e<c.length;e++)t=c[e],i=t.axis,n=i+t.stack,o=d[n],o||(o=s.stackLimits(i,t.stack),r=s.errorTotals,r&&(r.negative.length&&(o.min=Math.min(o.min,J.sparseArrayLimits(r.negative).min)),r.positive.length&&(o.max=Math.max(o.max,J.sparseArrayLimits(r.positive).max))),o.min!==ne||o.max!==oe?d[n]=o:o=null),o&&(s.valueAxisRanges[i]=o)},addErrorBar:function(e,t,i){var n,o=e.value,r=e.series,s=e.seriesIx,a=e.options.errorBars,l=t.fields[Tt],c=t.fields[Dt];te(l)&&te(c)?n={low:l,high:c}:a&&be(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new _t(a.value,r,re),n=this.seriesErrorRanges[s].getErrorRange(o,a.value)),n&&(e.low=n.low,e.high=n.high,this.addPointErrorBar(e,i))},addPointErrorBar:function(e,t){var i,n,o,r=!this.options.invertAxes,s=e.options.errorBars,a=e.series,l=e.low,c=e.high;this.options.isStacked?(i=this.stackedErrorRange(e,t),l=i.low,c=i.high):(n={categoryIx:t,series:a},this.updateRange({value:l},n),this.updateRange({value:c},n)),o=new Qi(l,c,r,this,a,s),e.errorBars=[o],e.append(o)},stackedErrorRange:function(e,t){var i=this.plotRange(e,0)[1]-e.value,n=e.low+i,o=e.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},n<0&&(this.errorTotals.negative[t]=Math.min(this.errorTotals.negative[t]||0,n)),o>0&&(this.errorTotals.positive[t]=Math.max(this.errorTotals.positive[t]||0,o)),{low:n,high:o}},addValue:function(t,i){var n,o,r=i.categoryIx,s=i.series,a=i.seriesIx,l=this.categoryPoints[r];l||(this.categoryPoints[r]=l=[]),n=this.seriesPoints[a],n||(this.seriesPoints[a]=n=[]),o=this.createPoint(t,i),o&&(e.extend(o,i),o.owner=this,o.noteText=t.fields.noteText,be(o.dataItem)||(o.dataItem=s.data[r]),this.addErrorBar(o,t,r)),this.points.push(o),n.push(o),l.push(o),this.updateRange(t.valueFields,i)},evalPointOptions:function(e,t,i,n,r,s){var a,l={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},c=this._evalSeries[s];return be(c)||(this._evalSeries[s]=c=o(e,{},l,!0)),a=e,c&&(a=Me({},a),o(a,{value:t,category:i,index:n,series:r,dataItem:r.data[n]},l)),a},updateRange:function(e,t){var i=t.series.axis,n=e.value,o=this.valueAxisRanges[i];isFinite(n)&&null!==n&&(o=this.valueAxisRanges[i]=o||{min:ne,max:oe},o.min=Math.min(o.min,n),o.max=Math.max(o.max,n))},seriesValueAxis:function(e){var t=this.plotArea,i=e.axis,n=i?t.namedValueAxes[i]:t.valueAxis;if(!n)throw Error("Unable to locate value axis with name "+i);return n},reflow:function(e){var t=this,i=this.categorySlots=[],n=this.points,o=this.categoryAxis,r=0;this.traverseDataPoints(function(e,s){var a,l,c,d=s.categoryIx,u=s.series,h=t.seriesValueAxis(u),p=n[r++],f=i[d];f||(i[d]=f=t.categorySlot(o,d,h)),p&&(a=t.plotRange(p,h.startValue()),l=t.valueSlot(h,a),l?(c=t.pointSlot(f,l),p.aboveAxis=t.aboveAxis(p,h),p.stackValue=a[1],t.options.isStacked100&&(p.percentage=t.plotValue(p)),t.reflowPoint(p,c)):p.visible=!1)}),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=e},valueSlot:function(e,t){return e.getSlot(t[0],t[1],!this.options.clip)},limitPoints:function(){var e,t=this,i=this.categoryPoints,n=i[0].concat(Re(i));for(e=0;e<n.length;e++)n[e]&&t.limitPoint(n[e])},limitPoint:function(e){var t=this.categoryAxis.limitSlot(e.box);t.equals(e.box)||e.reflow(t)},aboveAxis:function(e,t){var i=this.categoryAxisCrossingValue(t),n=e.value;return t.options.reverse?n<i:n>=i},categoryAxisCrossingValue:function(e){var t=this.categoryAxis,i=e.options,n=[].concat(i.axisCrossingValues||i.axisCrossingValue);return n[t.axisIndex||0]||0},reflowPoint:function(e,t){e.reflow(t)},reflowCategories:function(){},pointSlot:function(e,t){var i=this.options,n=i.invertAxes,o=n?t:e,r=n?e:t;return new Ce(o.x1,r.y1,o.x2,r.y2)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,i,n,o,s,a,l,c=this,d=this.options.series,u=r(d),h=d.length;for(t=0;t<h;t++)c._outOfRangeCallback(d[t],"_outOfRangeMinPoint",t,e);for(i=0;i<u;i++)for(n=0;n<h;n++)o=d[n],s=c.categoryAxis.categoryAt(i),a=c._bindPoint(o,n,i),e(a,{category:s,categoryIx:i,series:o,seriesIx:n});for(l=0;l<h;l++)c._outOfRangeCallback(d[l],"_outOfRangeMaxPoint",l,e)},_outOfRangeCallback:function(e,t,i,n){var o,r,s=e[t];s&&(o=s.categoryIx,r=this._bindPoint(e,i,o,s.item),n(r,{category:s.category,categoryIx:o,series:e,seriesIx:i,dataItem:s.item}))},_bindPoint:function(e,t,i,n){var o,r;return this._bindCache||(this._bindCache=[]),o=this._bindCache[t],o||(o=this._bindCache[t]=[]),r=o[i],r||(r=o[i]=pt.current.bindPoint(e,i,n)),r},formatPointValue:function(e,t){return null===e.value?"":this.chartService.format.auto(t,e.value)},pointValue:function(e){return e.valueFields.value}}),Te(Zi,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0}),Ji={click:function(e,t){return e.trigger(wi,this.eventArgs(t))},hover:function(e,t){return e.trigger(yi,this.eventArgs(t))},over:function(e,t){return e.trigger(ki,this.eventArgs(t))},out:function(e,t){return e.trigger(xi,this.eventArgs(t))},eventArgs:function(e){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:Fe(e),originalEvent:e,point:this}}},en={createNote:function(){var e=this.options.notes,t=this.noteText||e.label.text;e.visible!==!1&&be(t)&&null!==t&&(this.note=new J.Note({value:this.value,text:t,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},tn=ke.extend({init:function(e,t){ke.fn.init.call(this),this.value=e,this.options=t,this.aboveAxis=Ee(this.options.aboveAxis,!0),this.tooltipTracking=!0},render:function(){var e,t,i,n=this.options,o=n.markers,r=n.labels;this._rendered||(this._rendered=!0,o.visible&&o.size&&(this.marker=this.createMarker(),this.append(this.marker)),r.visible&&(e=Pe(r),t=this.pointData(),i=this.value,e?i=e(t):r.format&&(i=this.formatValue(r.format)),this.label=new ze(i,Me({align:se,vAlign:se,margin:{left:5,right:5},zIndex:Ee(r.zIndex,this.series.zIndex)},r),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},markerBorder:function(){var e=this.options.markers,t=e.background,i=Me({color:this.color},e.border);return be(i.color)||(i.color=new rt(t).brightness(xt).toHex()),i},createVisual:function(){},createMarker:function(){var e=this.options.markers,t=new Be({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:this.markerBorder(),opacity:e.opacity,zIndex:Ee(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,i,n,o,r=this,s=this,a=s.options,l=s.aboveAxis,c=a.vertical;if(this.render(),this.box=e,t=e.clone(),c?l?t.y1-=t.height():t.y2+=t.height():l?t.x1+=t.width():t.x2-=t.width(),this._childBox=t,this.marker&&this.marker.reflow(t),this.reflowLabel(t),this.errorBars)for(i=0;i<this.errorBars.length;i++)r.errorBars[i].reflow(t);this.note&&(n=this.markerBox(),a.markers.visible&&a.markers.size||(o=n.center(),n=new Ce(o.x,o.y,o.x,o.y)),this.note.reflow(n))},reflowLabel:function(e){var t=this,i=t.options,n=t.label,o=i.labels.position;n&&(o=o===Bt?ae:o,o=o===Lt?le:o,n.reflow(e),n.box.alignTo(this.markerBox(),o),n.reflow(n.box))},createHighlight:function(){var e=this.options.highlight.markers,t=this.markerBorder().color,i=this.options.markers,n=i.size+(i.border.width||0)+(e.border.width||0),o=new Be({type:i.type,width:n,height:n,rotation:i.rotation,background:e.color||t,border:{color:e.border.color,width:e.border.width,opacity:Ee(e.border.opacity,1)},opacity:Ee(e.opacity,1)});return o.reflow(this._childBox),o.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var e,t,i,n,o,r=this.marker;return r?(t=r.paddingBox.toRect(),e=r.visual):(i=this.options.markers.size,n=i/2,o=this.box.center(),t=new st.Rect([o.x-n,o.y-n],[i,i])),{options:this.options,rect:t,visual:e}},tooltipAnchor:function(){var e,t,i,n,o=this.markerBox(),r=this.owner.pane.clipBox(),s=!r||r.overlaps(o);if(s)return e=o.x2+Ct,t=ce,this.aboveAxis?(i=o.y1,n=le):(i=o.y2,n=ae),{point:new xe(e,i),align:{horizontal:t,vertical:n}}},formatValue:function(e){return this.owner.formatPointValue(this,e)},overlapsBox:function(e){var t=this.markerBox();return t.overlaps(e)},unclipElements:function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},pointData:function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}}}),tn.prototype.defaults={vertical:!0,markers:{visible:!0,background:de,size:Rt,type:ue,border:{width:2},opacity:1},labels:{visible:!1,position:Bt,margin:Le(3),padding:Le(4),animation:{type:yt,delay:wt}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:ie.HIGHLIGHT_ZINDEX},errorBars:{line:{width:1}}},Me(tn.prototype,Ji),Me(tn.prototype,en),nn=ke.extend({init:function(e,t,i){ke.fn.init.call(this),this.linePoints=e,this.series=t,this.seriesIx=i},points:function(){return this.toGeometryPoints(this.linePoints)},toGeometryPoints:function(e){var t,i,n=[];for(t=0,i=e.length;t<i;t++)e[t]&&e[t].visible!==!1&&n.push(e[t]._childBox.toRect().center());return n},createVisual:function(){var e=this,t=this.series.visual;t?(this.visual=t({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return e.segmentVisual(),e.visual}}),this.visual&&!be(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},segmentVisual:function(){var e,t=this,i=t.options,n=t.series,o=n.color,r=n._defaults;Ae(o)&&r&&(o=r.color),e=tt.fromPoints(this.points(),{stroke:{color:o,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.closed&&e.close(),this.visual=e},aliasFor:function(e,t){return this.parent.getNearestPoint(t.x,t.y,this.seriesIx)}}),Te(nn,{closed:!1}),on={calculateStepPoints:function(e){var t,i,n,o=this.parent.plotArea.seriesCategoryAxis(this.series),r=o.options,a=r.justified,l=r.vertical,c=r.reverse,d=l?he:pe,u=l?pe:he,h=c?2:1,p=h,f=s(e[0],d,h,u,p),m=[f];for(t=1;t<e.length;t++)i=s(e[t],d,h,u,p),f[d]!==i[d]&&(n=new at,n[d]=f[d],n[u]=i[u],m.push(n,i)),f=i;return a?f!==Re(m)&&m.push(f):m.push(s(Re(e),d,h,u,c?1:2)),m}},rn=nn.extend({points:function(){return this.calculateStepPoints(this.linePoints)}}),Me(rn.prototype,on),sn=nn.extend({segmentVisual:function(){var e,t,i,n=this.series,o=n._defaults,r=n.color;Ae(r)&&o&&(r=o.color),e=new He(this.options.closed),t=e.process(this.points()),i=new tt({stroke:{color:r,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.segments.push.apply(i.segments,t),this.visual=i}}),an={renderSegments:function(){var e,t,i,n,o,r,s,a,l=this,c=this,d=c.options,u=c.seriesPoints,h=d.series,p=u.length;for(this._segments=[],t=0;t<p;t++){for(i=h[t],n=l.sortPoints(u[t]),o=n.length,r=[],s=0;s<o;s++)a=n[s],a?r.push(a):l.seriesMissingValues(i)!==Pt&&(r.length>1&&(e=l.createSegment(r,i,t,e),l._addSegment(e)),r=[]);r.length>1&&(e=l.createSegment(r,i,t,e),l._addSegment(e))}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,i=!t&&this.options.isStacked;return i?Ft:t||Pt},getNearestPoint:function(e,t,i){var n,o,r,s,a,l=new xe(e,t),c=this.seriesPoints[i],d=ne;for(o=0;o<c.length;o++)r=c[o],r&&be(r.value)&&null!==r.value&&r.visible!==!1&&(s=r.box,a=s.center().distanceTo(l),a<d&&(n=r,d=a));return n}},ln=it.extend({setup:function(){this._setEnd(this.options.box.x1)},step:function(e){var t=this.options.box;this._setEnd(J.interpolateValue(t.x1,t.x2,e))},_setEnd:function(e){var t=this.element,i=t.segments,n=i[1].anchor(),o=i[2].anchor();t.suspend(),n.setX(e),t.resume(),o.setX(e)}}),Te(ln,{duration:wt}),nt.current.register("clip",ln),cn={createAnimation:function(){var e,t,i=this.getRoot();i&&(i.options||{}).transitions!==!1&&(e=i.size(),t=tt.fromRect(e.toRect()),this.visual.clip(t),this.animation=new ln(t,{box:e}),a(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(e){var t,i,n=this.animationPoints();for(t=0;t<n.length;t++)i=n[t],i&&i.visual&&be(i.visual.options.zIndex)&&i.visual.clip(e)}},dn=Zi.extend({render:function(){Zi.fn.render.call(this),this.updateStackRange(),this.renderSegments()},pointType:function(){return tn},createPoint:function(e,t){var i,n,o,r=t.categoryIx,s=t.category,a=t.series,l=t.seriesIx,c=this.seriesMissingValues(a),d=e.valueFields.value;if(!be(d)||null===d){if(c!==Ft)return null;d=0}return i=this.pointOptions(a,l),i=this.evalPointOptions(i,d,s,r,a,l),n=e.fields.color||a.color,Ae(a.color)&&(n=i.color),o=new tn(d,i),o.color=n,this.append(o),o},plotRange:function(e){var t,i,n,o,r=this,s=this.plotValue(e);if(this.options.isStacked)for(t=e.categoryIx,i=this.categoryPoints[t],n=0;n<i.length&&(o=i[n],e!==o);n++)s+=r.plotValue(o),r.options.isStacked100&&(s=Math.min(s,1));return[s,s]},createSegment:function(e,t,i){var n,o=t.style;return new(n=o===Nt?rn:o===Ht?sn:nn)(e,t,i)},animationPoints:function(){var e,t=this.points,i=[];for(e=0;e<t.length;e++)i.push((t[e]||{}).marker);return i.concat(this._segments)}}),Me(dn.prototype,an,cn),un=nn.extend({init:function(e,t,i,n,o){nn.fn.init.call(this,e,t,i),this.prevSegment=n,this.stackPoints=o},createVisual:function(){var e=this.series,t=e._defaults,i=e.line||{},n=e.color;Ae(n)&&t&&(n=t.color),this.visual=new ot({zIndex:e.zIndex}),this.createFill({fill:{color:n,opacity:e.opacity},stroke:null}),i.width>0&&i.visible!==!1&&this.createStroke({stroke:Me({color:n,opacity:e.opacity,lineCap:"butt"},i)})},strokeSegments:function(){var e=this._strokeSegments;return e||(e=this._strokeSegments=this.createStrokeSegments()),e},createStrokeSegments:function(){return this.segmentsFromPoints(this.points())},stackSegments:function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},createStackSegments:function(e){return this.segmentsFromPoints(this.toGeometryPoints(e)).reverse()},segmentsFromPoints:function(e){return e.map(function(e){return new st.Segment(e)})},createStroke:function(e){var t=new tt(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},hasStackSegment:function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},createFill:function(e){var t,i,n=this.strokeSegments(),o=n.slice(0),r=this.hasStackSegment();r&&(t=this.stackSegments(),Ne(o,t)),i=new tt(e),i.segments.push.apply(i.segments,o),!r&&n.length>1&&this.fillToAxes(i),this.visual.append(i)},fillToAxes:function(e){var t=this.parent,i=t.options.invertAxes,n=t.seriesValueAxis(this.series),o=t.categoryAxisCrossingValue(n),r=n.getSlot(o,o,!0),s=this.strokeSegments(),a=s[0].anchor(),l=Re(s).anchor(),c=i?r.x1:r.y1;i?e.lineTo(c,l.y).lineTo(c,a.y):e.lineTo(l.x,c).lineTo(a.x,c)}}),hn=un.extend({createStrokeSegments:function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},createStackSegments:function(e){return this.segmentsFromPoints(this.calculateStepPoints(e)).reverse()}}),Me(hn.prototype,on),pn=un.extend({createStrokeSegments:function(){var e=new He(this.options.closed),t=this.points();return e.process(t)},createStackSegments:function(){var e,t,i=this.strokeSegments(),n=[];for(e=i.length-1;e>=0;e--)t=i[e],n.push(new st.Segment(t.anchor(),t.controlOut(),t.controlIn()));return n}}),fn=dn.extend({createSegment:function(e,t,i,n){var o,r,s,a,l=this.options.isStacked,c=(t.line||{}).style;return l&&i>0&&n&&(s=this.seriesMissingValues(t),"gap"!==s?(r=n.linePoints,o=n):r=this._gapStackPoints(e,i,c)),new(a=c===Nt?hn:c===Ht?pn:un)(e,t,i,o,r)},reflow:function(e){var t,i,n,o,r=this;if(dn.fn.reflow.call(this,e),t=this._stackPoints)for(i=0;i<t.length;i++)n=t[i],o=r.categoryAxis.getSlot(n.categoryIx),n.reflow(o)},_gapStackPoints:function(e,t,i){var n,o,r,s,a,l,c,d,u=this,h=this.seriesPoints,p=e[0].categoryIx,f=e.length;for(p<0&&(p=0,f--),n=p+f,o=this.seriesOptions[0]._outOfRangeMinPoint?1:0,r=[],this._stackPoints=this._stackPoints||[],s=p;s<n;s++){a=s+o,l=t,c=void 0;do l--,c=h[l][a];while(l>0&&!c);c?(i!==Nt&&s>p&&!h[l][a-1]&&r.push(u._previousSegmentPoint(s,a,a-1,l)),r.push(c),i!==Nt&&s+1<n&&!h[l][a+1]&&r.push(u._previousSegmentPoint(s,a,a+1,l))):(d=u._createGapStackPoint(s),u._stackPoints.push(d),r.push(d))}return r},_previousSegmentPoint:function(e,t,i,n){for(var o,r=this.seriesPoints,s=n;s>0&&!o;)s--,o=r[s][i];return o?o=r[s][t]:(o=this._createGapStackPoint(e),this._stackPoints.push(o)),o},_createGapStackPoint:function(e){var t=this.pointOptions({},0),i=new tn(0,t);return i.categoryIx=e,i.series={},i},seriesMissingValues:function(e){return e.missingValues||Ft}}),mn=ee.extend({init:function(){this.axisRanges={}},update:function(e){var t,i,n,o=this.axisRanges;for(t in e)i=e[t],n=o[t],o[t]=n=n||{min:ne,max:oe},n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max)},reset:function(e){this.axisRanges[e]=void 0},query:function(e){return this.axisRanges[e]}}),gn=ke.extend({init:function(e,t,i){ke.fn.init.call(this,t),this.textBox=new ze(e,this.options,i),this.append(this.textBox)},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(e){var t=this.options,i=t.vertical,n=t.aboveAxis,o=this.children[0],r=o.options,s=o.box,a=o.options.padding,l=e;r.align=i?se:ce,r.vAlign=i?ae:se,t.position===Wi?i?(r.vAlign=ae,!n&&s.height()<e.height()&&(r.vAlign=le)):r.align=n?fe:ce:t.position===se?(r.vAlign=se,r.align=se):t.position===Ui?i?r.vAlign=n?le:ae:r.align=n?ce:fe:t.position===qi&&(i?l=n?new Ce(e.x1,e.y1-s.height(),e.x2,e.y1):new Ce(e.x1,e.y2,e.x2,e.y2+s.height()):(r.align=se,l=n?new Ce(e.x2,e.y1,e.x2+s.width(),e.y2):new Ce(e.x1-s.width(),e.y1,e.x1,e.y2))),t.rotation||(i?a.left=a.right=(l.width()-o.contentBox.width())/2:a.top=a.bottom=(l.height()-o.contentBox.height())/2),o.reflow(l)},alignToClipBox:function(e){var t,i=this.options.vertical,n=i?pe:he,o=n+"1",r=n+"2",s=this.children[0],a=this.parent.box;(a[o]<e[o]||e[r]<a[r])&&(t=s.paddingBox.clone(),t[o]=Math.max(a[o],e[o]),t[r]=Math.min(a[r],e[r]),this.reflow(t))}}),Te(gn,{position:qi,margin:Le(3),padding:Le(4),color:me,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:yt,delay:wt},zIndex:2}),vn=6,_n=ke.extend({init:function(e,t){ke.fn.init.call(this),this.options=t,this.color=t.color||de,this.aboveAxis=Ee(this.options.aboveAxis,!0),this.value=e},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var e,t,i,n=this.options,o=n.labels;o.visible&&(e=this.pointData(),t=Pe(o),i=t?t(e):this.formatValue(o.format),this.label=new gn(i,Me({vertical:n.vertical},o),e),this.append(this.label))},formatValue:function(e){return this.owner.formatPointValue(this,e)},reflow:function(e){var t,i,n=this;if(this.render(),t=this.label,this.box=e,t&&(t.options.aboveAxis=this.aboveAxis,t.reflow(e)),this.note&&this.note.reflow(e),this.errorBars)for(i=0;i<this.errorBars.length;i++)n.errorBars[i].reflow(e)},createVisual:function(){var e,t=this,i=this,n=i.box,o=i.options,r=o.visual;this.visible!==!1&&(ke.fn.createVisual.call(this),r?(e=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:n.toRect(),createVisual:function(){var e=new ot;return t.createRect(e),e},options:o}),e&&this.visual.append(e)):n.width()>0&&n.height()>0&&this.createRect(this.visual))},createRect:function(e){var t,i,n,o,r,s=this.options,a=s.border,c=be(a.opacity)?a.opacity:s.opacity,d=this.box.toRect();d.size.width=Math.round(d.size.width),t=this.rectVisual=tt.fromRect(d,{fill:{color:this.color,opacity:s.opacity},stroke:{color:this.getBorderColor(),width:a.width,opacity:c,dashType:a.dashType}}),i=this.box.width(),n=this.box.height(),o=s.vertical?i:n,o>vn&&(Se(t),(i<1||n<1)&&(t.options.stroke.lineJoin="round")),e.append(t),l(s)&&(r=this.createGradientOverlay(t,{baseColor:this.color},Me({end:s.vertical?void 0:[0,1]},s.overlay)),e.append(r))},createHighlight:function(e){var t=tt.fromRect(this.box.toRect(),e);return Se(t)},highlightVisual:function(){return this.rectVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},getBorderColor:function(){var e=this.color,t=this.options.border,i=t._brightness||xt,n=t.color;return be(n)||(n=new rt(e).brightness(i).toHex()),n},tooltipAnchor:function(){var e,t,i,n,o=this,r=o.options,s=o.box,a=o.aboveAxis,l=this.owner.pane.clipBox()||s,c=ce,d=ae;return r.vertical?(e=Math.min(s.x2,l.x2)+Ct,a?t=Math.max(s.y1,l.y1):(t=Math.min(s.y2,l.y2),d=le)):(i=Math.max(s.x1,l.x1),n=Math.min(s.x2,l.x2),r.isStacked?(d=le,a?(c=fe,e=n):e=i,t=Math.max(s.y1,l.y1)-Ct):(a?e=n+Ct:(e=i-Ct,c=fe),t=Math.max(s.y1,l.y1))),{point:new xe(e,t),align:{horizontal:c,vertical:d}}},overlapsBox:function(e){return this.box.overlaps(e)},pointData:function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}}}),Me(_n.prototype,Ji),Me(_n.prototype,en),_n.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},bn=ke.extend({init:function(e){ke.fn.init.call(this,e),this.forEach=e.rtl?d:c},reflow:function(e){var t=this.options,i=t.vertical,n=t.gap,o=t.spacing,r=this.children,s=r.length,a=i?pe:he,l=s+n+o*(s-1),c=(i?e.height():e.width())/l,d=e[a+1]+c*(n/2);this.forEach(r,function(t,i){var n=(t.box||e).clone();n[a+1]=d,n[a+2]=d+c,t.reflow(n),i<s-1&&(d+=c*o),d+=c})}}),Te(bn,{vertical:!1,gap:0,spacing:0}),wn=ke.extend({reflow:function(e){var t,i,n,o=this,r=this.options.vertical?he:pe,s=this.children,a=s.length,l=this.box=new Ce;for(t=0;t<a;t++)i=s[t],i.visible!==!1&&(n=i.box.clone(),n.snapTo(e,r),0===t&&(l=o.box=n.clone()),i.reflow(n),l.wrap(n))}}),Te(wn,{vertical:!0}),yn=Zi.extend({render:function(){Zi.fn.render.call(this),this.updateStackRange()},pointType:function(){return _n},clusterType:function(){return bn},stackType:function(){return wn},stackLimits:function(e,t){var i=Zi.fn.stackLimits.call(this,e,t);return i},createPoint:function(e,t){var i,n,o,r,s,a,l=t.categoryIx,c=t.category,d=t.series,u=t.seriesIx,h=this,p=h.options,f=h.children,m=p.isStacked,g=this.pointValue(e),v=this.pointOptions(d,u),_=v.labels;return m&&_.position===qi&&(_.position=Wi),v.isStacked=m,i=e.fields.color||d.color,g<0&&v.negativeColor&&(i=v.negativeColor),v=this.evalPointOptions(v,g,c,l,d,u),Ae(d.color)&&(i=v.color),n=this.pointType(),o=new n(g,v),o.color=i,r=f[l],r||(s=this.clusterType(),r=new s({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(r)),m?(a=this.getStackWrap(d,r),a.append(o)):r.append(o),o},getStackWrap:function(e,t){var i,n,o,r=e.stack,s=r?r.group||r:r,a=t.children;if(typeof s===ie.STRING){for(n=0;n<a.length;n++)if(a[n]._stackGroup===s){i=a[n];break}}else i=a[0];return i||(o=this.stackType(),i=new o({vertical:!this.options.invertAxes}),i._stackGroup=s,t.append(i)),i},categorySlot:function(e,t,i){var n,o,r=this.options,s=e.getSlot(t),a=i.startValue();return r.isStacked&&(n=i.getSlot(a,a,!0),o=r.invertAxes?he:pe,s[o+1]=s[o+2]=n[o+1]),s},reflowCategories:function(e){var t,i=this.children,n=i.length;for(t=0;t<n;t++)i[t].reflow(e[t])},createAnimation:function(){this._setAnimationOptions(),Zi.fn.createAnimation.call(this),a(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var e,t,i,n=this,o=this.points;for(e=0;e<o.length;e++)t=o[e],i=t.visual,i&&be(i.options.zIndex)&&(t.options.animation=n.options.animation,t.createAnimation())},_setAnimationOptions:function(){var e,t,i=this.options,n=i.animation||{};i.isStacked?(t=this.seriesValueAxis(i.series[0]),e=t.getSlot(t.startValue())):e=this.categoryAxis.getSlot(0),n.origin=new at(e.x1,e.y1),n.vertical=!i.invertAxes}}),Te(yn,{animation:{type:Vt}}),kn=ke.extend({init:function(e,t){ke.fn.init.call(this,t),this.value=e},reflow:function(e){var t,i,n=this,o=n.options,r=n.value,s=n.owner,a=s.seriesValueAxis(o),l=a.getSlot(r.open,r.close),c=a.getSlot(r.low,r.high);l.x1=c.x1=e.x1,l.x2=c.x2=e.x2,this.realBody=l,t=c.center().x,i=[],i.push([[t,c.y1],[t,l.y1]]),i.push([[t,l.y2],[t,c.y2]]),this.lines=i,this.box=c.clone().wrap(l),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},
reflowNote:function(){this.note&&this.note.reflow(this.box)},createVisual:function(){ke.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(e){var t=new ot;return this.createBody(t,e),this.createLines(t,e),t},createBody:function(e,t){var i=tt.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});t.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(),width:t.border.width,dashType:t.border.dashType,opacity:Ee(t.border.opacity,t.opacity)}),Se(i),e.append(i),l(t)&&e.append(this.createGradientOverlay(i,{baseColor:this.color},Me({end:t.vertical?void 0:[0,1]},t.overlay)))},createLines:function(e,t){this.drawLines(e,t,this.lines,t.line)},drawLines:function(e,t,i,n){var o,r,s;if(i)for(o={stroke:{color:n.color||this.color,opacity:Ee(n.opacity,t.opacity),width:n.width,dashType:n.dashType,lineCap:"butt"}},r=0;r<i.length;r++)s=tt.fromPoints(i[r],o),Se(s),e.append(s)},getBorderColor:function(){var e=this.options.border,t=e.color;return be(t)||(t=new rt(this.color).brightness(e._brightness).toHex()),t},createOverlay:function(){var e=tt.fromRect(this.box.toRect(),{fill:{color:de,opacity:0},stroke:null});this.visual.append(e)},createHighlight:function(){var e,t=this.options.highlight,i=this.color;return this.color=t.color||this.color,e=this.mainVisual(Me({},this.options,{line:{color:this.getBorderColor()}},t)),this.color=i,e},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var e=this.box,t=this.owner.pane.clipBox()||e;return{point:new xe(e.x2+Ct,Math.max(e.y1,t.y1)+Ct),align:{horizontal:ce,vertical:ae}}},formatValue:function(e){return this.owner.formatPointValue(this,e)},overlapsBox:function(e){return this.box.overlaps(e)}}),Te(kn,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><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:{}}}),Me(kn.prototype,Ji),Me(kn.prototype,en),xn=Zi.extend({reflowCategories:function(e){var t,i=this.children,n=i.length;for(t=0;t<n;t++)i[t].reflow(e[t])},addValue:function(e,t){var i,n,o=t.categoryIx,r=t.category,s=t.series,a=t.seriesIx,l=this,c=l.children,d=l.options,h=e.valueFields,p=this.splitValue(h),f=u(p),m=s.data[o],g=this.categoryPoints[o];g||(this.categoryPoints[o]=g=[]),f&&(i=this.createPoint(e,t)),n=c[o],n||(n=new bn({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing,rtl:!d.invertAxes&&(this.chartService||{}).rtl}),this.append(n)),i&&(this.updateRange(h,t),n.append(i),i.categoryIx=o,i.category=r,i.series=s,i.seriesIx=a,i.owner=this,i.dataItem=m,i.noteText=e.fields.noteText),this.points.push(i),g.push(i)},pointType:function(){return kn},createPoint:function(e,t){var i,n=t.categoryIx,o=t.category,r=t.series,s=t.seriesIx,a=this.pointType(),l=e.valueFields,c=Me({},r),d=e.fields.color||r.color;return c=this.evalPointOptions(c,l,o,n,r,s),r.type===jt&&l.open>l.close&&(d=e.fields.downColor||r.downColor||r.color),Ae(r.color)&&(d=c.color),c.vertical=!this.options.invertAxes,i=new a(l,c),i.color=d,i},splitValue:function(e){return[e.low,e.open,e.close,e.high]},updateRange:function(e,t){var i=t.series.axis,n=this.splitValue(e),o=this.valueAxisRanges[i];o=this.valueAxisRanges[i]=o||{min:ne,max:oe},o=this.valueAxisRanges[i]={min:Math.min.apply(Math,n.concat([o.min])),max:Math.max.apply(Math,n.concat([o.max]))}},formatPointValue:function(e,t){var i=e.value;return this.chartService.format.auto(t,i.open,i.high,i.low,i.close,e.category)},animationPoints:function(){return this.points}}),Me(xn.prototype,cn),Cn=kn.extend({init:function(e,t){kn.fn.init.call(this,e,t),this.createNote()},reflow:function(e){var t,i,n,o,r=this,s=r.options,a=r.value,l=r.owner,c=l.seriesValueAxis(s);this.boxSlot=i=c.getSlot(a.q1,a.q3),this.realBody=i,this.reflowBoxSlot(e),this.whiskerSlot=t=c.getSlot(a.lower,a.upper),this.reflowWhiskerSlot(e),n=c.getSlot(a.median),a.mean&&(o=c.getSlot(a.mean),this.meanPoints=this.calcMeanPoints(e,o)),this.whiskerPoints=this.calcWhiskerPoints(i,t),this.medianPoints=this.calcMedianPoints(e,n),this.box=t.clone().wrap(i),this.reflowNote()},reflowBoxSlot:function(e){this.boxSlot.x1=e.x1,this.boxSlot.x2=e.x2},reflowWhiskerSlot:function(e){this.whiskerSlot.x1=e.x1,this.whiskerSlot.x2=e.x2},calcMeanPoints:function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},calcWhiskerPoints:function(e,t){var i=t.center().x;return[[[i-5,t.y1],[i+5,t.y1],[i,t.y1],[i,e.y1]],[[i-5,t.y2],[i+5,t.y2],[i,t.y2],[i,e.y2]]]},calcMedianPoints:function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},renderOutliers:function(e){var t,i,n,o,r=this,s=this.value,a=s.outliers||[],l=3*Math.abs(s.q3-s.q1),c=[],d=e.markers||{};for(t=0;t<a.length;t++)i=a[t],d=i<s.q3+l&&i>s.q1-l?e.outliers:e.extremes,n=Me({},d.border),be(n.color)||(n.color=be(r.color)?r.color:new rt(d.background).brightness(xt).toHex()),o=new Be({type:d.type,width:d.size,height:d.size,rotation:d.rotation,background:d.background,border:n,opacity:d.opacity}),o.value=i,c.push(o);return this.reflowOutliers(c),c},reflowOutliers:function(e){var t,i,n,o=this,r=this.owner.seriesValueAxis(this.options),s=this.box.center();for(t=0;t<e.length;t++)i=e[t].value,n=r.getSlot(i),o.options.vertical?n.move(s.x):n.move(void 0,s.y),o.box=o.box.wrap(n),e[t].reflow(n)},mainVisual:function(e){var t,i,n=kn.fn.mainVisual.call(this,e),o=this.renderOutliers(e);for(t=0;t<o.length;t++)i=o[t].getElement(),i&&n.append(i);return n},createLines:function(e,t){this.drawLines(e,t,this.whiskerPoints,t.whiskers),this.drawLines(e,t,this.medianPoints,t.median),this.drawLines(e,t,this.meanPoints,t.mean)},getBorderColor:function(){return this.color?this.color:kn.fn.getBorderColor.call(this)}}),Te(Cn,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><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:Rt,type:ie.CROSS,background:de,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:Rt,type:ue,background:de,border:{width:2,opacity:1},opacity:0}}),Me(Cn.prototype,Ji),Sn=Cn.extend({reflowBoxSlot:function(e){this.boxSlot.y1=e.y1,this.boxSlot.y2=e.y2},reflowWhiskerSlot:function(e){this.whiskerSlot.y1=e.y1,this.whiskerSlot.y2=e.y2},calcMeanPoints:function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]},calcWhiskerPoints:function(e,t){var i=t.center().y;return[[[t.x1,i-5],[t.x1,i+5],[t.x1,i],[e.x1,i]],[[t.x2,i-5],[t.x2,i+5],[t.x2,i],[e.x2,i]]]},calcMedianPoints:function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]}}),Tn=xn.extend({addValue:function(e,t){var i,n,o=t.categoryIx,r=t.category,s=t.series,a=t.seriesIx,l=this,c=l.children,d=l.options,h=e.valueFields,p=this.splitValue(h),f=u(p),m=s.data[o],g=this.categoryPoints[o];g||(this.categoryPoints[o]=g=[]),f&&(i=this.createPoint(e,t)),n=c[o],n||(n=new bn({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing,rtl:!d.invertAxes&&(this.chartService||{}).rtl}),this.append(n)),i&&(this.updateRange(h,t),n.append(i),i.categoryIx=o,i.category=r,i.series=s,i.seriesIx=a,i.owner=this,i.dataItem=m),this.points.push(i),g.push(i)},pointType:function(){return this.options.invertAxes?Sn:Cn},splitValue:function(e){return[e.lower,e.q1,e.median,e.q3,e.upper]},updateRange:function(e,t){var i=t.series.axis,n=this.valueAxisRanges[i],o=this.splitValue(e).concat(this.filterOutliers(e.outliers));be(e.mean)&&(o=o.concat(e.mean)),n=this.valueAxisRanges[i]=n||{min:ne,max:oe},n=this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([n.min])),max:Math.max.apply(Math,o.concat([n.max]))}},formatPointValue:function(e,t){var i=e.value;return this.chartService.format.auto(t,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,e.category)},filterOutliers:function(e){var t,i,n=(e||[]).length,o=[];for(t=0;t<n;t++)i=e[t],be(i)&&null!==i&&o.push(i);return o}}),Dn=Yi.extend({getAxis:function(){var e=this.chart.seriesAxes(this.series),t=this.isVertical?e.y:e.x;return t}}),An=ke.extend({init:function(e,t){ke.fn.init.call(this,t),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()},_initFields:function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},render:function(){this.traverseDataPoints(this.addValue.bind(this))},addErrorBar:function(e,t,i){var n,o=e.value[t],r=t+"Value",s=t+"ErrorLow",a=t+"ErrorHigh",l=i.seriesIx,c=i.series,d=e.options.errorBars,u=i[s],h=i[a];te(o)&&(te(u)&&te(h)&&(n={low:u,high:h}),d&&be(d[r])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[t][l]=this.seriesErrorRanges[t][l]||new _t(d[r],c,t),n=this.seriesErrorRanges[t][l].getErrorRange(o,d[r])),n&&this.addPointErrorBar(n,e,t))},addPointErrorBar:function(e,t,i){var n,o=e.low,r=e.high,s=t.series,a=t.options.errorBars,l=i===pe,c={};t[i+"Low"]=o,t[i+"High"]=r,t.errorBars=t.errorBars||[],n=new Dn(o,r,l,this,s,a),t.errorBars.push(n),t.append(n),c[i]=o,this.updateRange(c,s),c[i]=r,this.updateRange(c,s)},addValue:function(t,i){var n,o=t.x,r=t.y,s=i.seriesIx,a=this.options.series[s],l=this.seriesMissingValues(a),c=this.seriesPoints[s],d=t;h(o)&&h(r)||(d=this.createMissingValue(d,l)),d&&(n=this.createPoint(d,i),n&&(e.extend(n,i),this.addErrorBar(n,he,i),this.addErrorBar(n,pe,i)),this.updateRange(d,i.series)),this.points.push(n),c.push(n)},seriesMissingValues:function(e){return e.missingValues},createMissingValue:function(){},updateRange:function(e,t){var i=this.chartService.intl,n=t.xAxis,o=t.yAxis,r=e.x,s=e.y,a=this.xAxisRanges[n],l=this.yAxisRanges[o];h(r)&&(a=this.xAxisRanges[n]=a||{min:ne,max:oe},Oe(r)&&(r=Ve(i,r)),a.min=Math.min(a.min,r),a.max=Math.max(a.max,r)),h(s)&&(l=this.yAxisRanges[o]=l||{min:ne,max:oe},Oe(s)&&(s=Ve(i,s)),l.min=Math.min(l.min,s),l.max=Math.max(l.max,s))},evalPointOptions:function(e,t,i){var n,r=i.series,s=i.seriesIx,a={defaults:r._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},l=this._evalSeries[s];return be(l)||(this._evalSeries[s]=l=o(e,{},a,!0)),n=e,l&&(n=Me({},e),o(n,{value:t,series:r,dataItem:i.dataItem},a)),n},pointType:function(){return tn},pointOptions:function(e,t){var i,n=this.seriesOptions[t];return n||(i=this.pointType().prototype.defaults,this.seriesOptions[t]=n=Me({},i,{markers:{opacity:e.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},e)),n},createPoint:function(e,t){var i,n=t.series,o=this.pointOptions(n,t.seriesIx),r=t.color||n.color;return o=this.evalPointOptions(o,e,t),Ae(n.color)&&(r=o.color),i=new tn(e,o),i.color=r,this.append(i),i},seriesAxes:function(e){var t=e.xAxis,i=e.yAxis,n=this.plotArea,o=t?n.namedXAxes[t]:n.axisX,r=i?n.namedYAxes[i]:n.axisY;if(!o)throw Error("Unable to locate X axis with name "+t);if(!r)throw Error("Unable to locate Y axis with name "+i);return{x:o,y:r}},reflow:function(e){var t=this,i=this.points,n=!this.options.clip,o=0;this.traverseDataPoints(function(e,r){var s,a=i[o++],l=t.seriesAxes(r.series),c=l.x.getSlot(e.x,e.x,n),d=l.y.getSlot(e.y,e.y,n);a&&(c&&d?(s=t.pointSlot(c,d),a.reflow(s)):a.visible=!1)}),this.box=e},pointSlot:function(e,t){return new Ce(e.x1,t.y1,e.x2,t.y2)},traverseDataPoints:function(e){var t,i,n,o,r,s,a,l=this,c=this,d=c.options.series,u=c.seriesPoints;for(t=0;t<d.length;t++)for(i=d[t],n=u[t],n||(u[t]=[]),o=0;o<i.data.length;o++)r=l._bindPoint(i,t,o),s=r.valueFields,a=r.fields,e(s,Me({pointIx:o,series:i,seriesIx:t,dataItem:i.data[o],owner:l},a))},formatPointValue:function(e,t){var i=e.value;return this.chartService.format.auto(t,i.x,i.y)},animationPoints:function(){var e,t=this.points,i=[];for(e=0;e<t.length;e++)i.push((t[e]||{}).marker);return i}}),Te(An,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),Me(An.prototype,cn,{_bindPoint:Zi.prototype._bindPoint}),En=tn.extend({init:function(e,t){tn.fn.init.call(this,e,t),this.category=e.category},createHighlight:function(){var e=this.options.highlight,t=e.border,i=this.options.markers,n=this.box.center(),o=(i.size+i.border.width+t.width)/2,r=new ot,s=new et.Circle(new st.Circle([n.x,n.y+o/5+t.width/2],o+t.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),a=new et.Circle(new st.Circle([n.x,n.y],o),{stroke:{color:t.color||new rt(i.background).brightness(xt).toHex(),width:t.width,opacity:t.opacity},fill:{color:i.background,opacity:e.opacity}});return r.append(s,a),r}}),En.prototype.defaults=Me({},En.prototype.defaults,{labels:{position:se},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),En.prototype.defaults.highlight.zIndex=void 0,In=An.extend({_initFields:function(){this._maxSize=oe,An.fn._initFields.call(this)},addValue:function(e,t){null!==e.size&&(e.size>0||e.size<0&&t.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),An.fn.addValue.call(this,e,t)):(this.points.push(null),this.seriesPoints[t.seriesIx].push(null))},reflow:function(e){this.updateBubblesSize(e),An.fn.reflow.call(this,e)},pointType:function(){return En},createPoint:function(e,t){var i,n,o=t.series,r=o.data.length,s=t.pointIx*(wt/r),a={delay:s,duration:wt-s,type:Ut},l=t.color||o.color;return e.size<0&&o.negativeValues.visible&&(l=Ee(o.negativeValues.color,l)),i=Me({labels:{animation:{delay:s,duration:wt-s}}},this.pointOptions(o,t.seriesIx),{markers:{type:ue,border:o.border,opacity:o.opacity,animation:a}}),i=this.evalPointOptions(i,e,t),Ae(o.color)&&(l=i.color),i.markers.background=l,n=new En(e,i),n.color=l,this.append(n),n},updateBubblesSize:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_=this,b=this,w=b.options.series,y=Math.min(e.width(),e.height());for(t=0;t<w.length;t++)for(i=w[t],n=_.seriesPoints[t],o=i.minSize||Math.max(.02*y,10),r=i.maxSize||.2*y,s=o/2,a=r/2,l=Math.PI*s*s,c=Math.PI*a*a,d=c-l,u=d/_._maxSize,h=0;h<n.length;h++)p=n[h],p&&(f=Math.abs(p.value.size)*u,m=Math.sqrt((l+f)/Math.PI),g=Ee(p.options.zIndex,0),v=g+(1-m/a),Me(p.options,{zIndex:v,markers:{size:2*m,zIndex:v},labels:{zIndex:v+1}}))},formatPointValue:function(e,t){var i=e.value;return this.chartService.format.auto(t,i.x,i.y,i.size,e.category)},createAnimation:function(){},createVisual:function(){}}),Te(In,{tooltip:{format:"{3}"},labels:{format:"{3}"}}),Mn=Be.extend({}),Me(Mn.prototype,Ji),Rn=ke.extend({init:function(e,t){ke.fn.init.call(this,t),this.aboveAxis=this.options.aboveAxis,this.color=t.color||de,this.value=e},render:function(){var e=this.options;this._rendered||(this._rendered=!0,be(this.value.target)&&(this.target=new Mn({type:e.target.shape,background:e.target.color||this.color,opacity:e.opacity,zIndex:e.zIndex,border:e.target.border,vAlign:ae,align:fe}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},reflow:function(e){var t,i,n,o,r,s,a,l,c,d,u;this.render(),t=this,i=t.options,n=t.target,o=t.owner,r=i.invertAxes,s=o.seriesValueAxis(this.options),a=o.categorySlot(o.categoryAxis,i.categoryIx,s),l=s.getSlot(this.value.target),c=r?l:a,d=r?a:l,n&&(u=new Ce(c.x1,d.y1,c.x2,d.y2),n.options.height=r?u.height():i.target.line.width,n.options.width=r?i.target.line.width:u.width(),n.reflow(u)),this.note&&this.note.reflow(e),this.box=e},createVisual:function(){var e,t;ke.fn.createVisual.call(this),e=this.options,t=tt.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:Ee(e.border.opacity,e.opacity)}),this.bodyVisual=t,Se(t),this.visual.append(t)},createAnimation:function(){this.bodyVisual&&(this.animation=it.create(this.bodyVisual,this.options.animation))},createHighlight:function(e){return tt.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){return this.owner.formatPointValue(this,e)}}),Rn.prototype.tooltipAnchor=_n.prototype.tooltipAnchor,Te(Rn,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),Me(Rn.prototype,Ji),Me(Rn.prototype,en),Fn=Zi.extend({init:function(e,t){p(t),Zi.fn.init.call(this,e,t)},reflowCategories:function(e){var t,i=this.children,n=i.length;for(t=0;t<n;t++)i[t].reflow(e[t])},plotRange:function(e){var t=e.series,i=this.seriesValueAxis(t),n=this.categoryAxisCrossingValue(i);return[n,e.value.current||n]},createPoint:function(e,t){var i,n,o=t.categoryIx,r=t.category,s=t.series,a=t.seriesIx,l=this,c=l.options,d=l.children,u=e.valueFields,h=Me({vertical:!c.invertAxes,overlay:s.overlay,categoryIx:o,invertAxes:c.invertAxes},s),p=e.fields.color||s.color;return h=this.evalPointOptions(h,u,r,o,s,a),Ae(s.color)&&(p=h.color),i=new Rn(u,h),i.color=p,n=d[o],n||(n=new bn({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing,rtl:!c.invertAxes&&(this.chartService||{}).rtl}),this.append(n)),n.append(i),i},updateRange:function(e,t){var i=e.current,n=e.target,o=t.series.axis,r=this.valueAxisRanges[o];be(i)&&!isNaN(i)&&be(n&&!isNaN(n))&&(r=this.valueAxisRanges[o]=r||{min:ne,max:oe},r.min=Math.min(r.min,i,n),r.max=Math.max(r.max,i,n))},formatPointValue:function(e,t){return this.chartService.format.auto(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,i=this,n=this.points;for(this._setAnimationOptions(),e=0;e<n.length;e++)t=n[e],t.options.animation=i.options.animation,t.createAnimation()}}),Fn.prototype._setAnimationOptions=yn.prototype._setAnimationOptions,Te(Fn,{animation:{type:Vt}}),Pn=ee.extend({init:function(e,t){this.chartService=e,this.options=Me({},this.options,t)},getStyle:function(e,t){var i,n,o=e.background,r=e.border.color;return t&&(i=t.color||t.options.color,o=Ee(o,i),r=Ee(r,i)),n=Le(e.padding||{},"auto"),{backgroundColor:o,borderColor:r,font:e.font,color:e.color,opacity:e.opacity,borderWidth:We(e.border.width),paddingTop:We(n.top),paddingBottom:We(n.bottom),paddingLeft:We(n.left),paddingRight:We(n.right)}},show:function(e,t,i){e.format=t.format;var n=this.getStyle(t,i);e.style=n,!be(t.color)&&new rt(n.backgroundColor).percBrightness()>180&&(e.className="k-chart-tooltip-inverse"),this.chartService.notify(Li,e),this.visible=!0},hide:function(){this.chartService&&this.chartService.notify(Hi),this.visible=!1},destroy:function(){delete this.chartService}}),Te(Pn,{border:{width:1},opacity:1}),zn=Pn.extend({init:function(e,t,i){Pn.fn.init.call(this,e,i),this.crosshair=t,this.formatService=e.format,this.initAxisName()},initAxisName:function(){var e,t=this.crosshair.axis,i=t.plotArea;e=i.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis",this.axisName=e},showAt:function(e){var t=this,i=t.crosshair.axis,n=t.options,o=i[n.stickyMode?"getCategory":"getValue"](e),r=o;n.format?r=this.formatService.auto(n.format,o):i.options.type===ge&&(r=this.formatService.auto(i.options.labels.dateFormats[i.options.baseUnit],o)),this.show({point:e,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},hide:function(){this.chartService.notify(Hi,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},getAnchor:function(){var e,t,i,n=this,o=n.crosshair,r=n.options,s=r.position,a=r.padding,l=!o.axis.options.vertical,c=o.line.bbox();return l?(e=se,s===le?(t=ae,i=c.bottomLeft().translate(0,a)):(t=le,i=c.topLeft().translate(0,-a))):(t=se,s===ce?(e=fe,i=c.topLeft().translate(-a,0)):(e=ce,i=c.topRight().translate(a,0))),{point:i,align:{horizontal:e,vertical:t}}}}),Te(zn,{padding:10}),Bn=ke.extend({init:function(e,t,i){ke.fn.init.call(this,i),this.axis=t,this.stickyMode=t instanceof Ue;var n=this.options.tooltip;n.visible&&(this.tooltip=new zn(e,this,Me({},n,{stickyMode:this.stickyMode})))},showAt:function(e){this.point=e,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(e)},hide:function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},moveLine:function(){var e,t,i=this,n=i.axis,o=i.point,r=n.options.vertical,s=this.getBox(),a=r?pe:he,l=new at(s.x1,s.y1);e=r?new at(s.x2,s.y1):new at(s.x1,s.y2),o&&(this.stickyMode?(t=n.getSlot(n.pointCategoryIndex(o)),l[a]=e[a]=t.center()[a]):l[a]=e[a]=o[a]),this.box=s,this.line.moveTo(l).lineTo(e)},getBox:function(){var e,t,i,n=this.axis,o=n.pane.axes,r=o.length,s=n.options.vertical,a=n.lineBox().clone(),l=s?he:pe;for(t=0;t<r;t++)i=o[t],i.options.vertical!==s&&(e?e.wrap(i.lineBox()):e=i.lineBox().clone());return a[l+1]=e[l+1],a[l+2]=e[l+2],a},createVisual:function(){ke.fn.createVisual.call(this);var e=this.options;this.line=new tt({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},destroy:function(){this.tooltip&&this.tooltip.destroy(),ke.fn.destroy.call(this)}}),Te(Bn,{color:me,width:2,zIndex:-1,tooltip:{visible:!1}}),Ln=ke.extend({init:function(e,t){ke.fn.init.call(this,e),this.pane=t},shouldClip:function(){var e,t=this.children,i=t.length;for(e=0;e<i;e++)if(t[e].options.clip===!0)return!0;return!1},_clipBox:function(){return this.pane.chartsBox()},createVisual:function(){var e,t,i;this.visual=new ot({zIndex:0}),this.shouldClip()&&(e=this.clipBox=this._clipBox(),t=e.toRect(),i=tt.fromRect(t),this.visual.clip(i),this.unclipLabels())},stackRoot:function(){return this},unclipLabels:function(){var e,t,i,n,o,r,s,a=this,l=a.children,c=a.clipBox;for(e=0;e<l.length;e++)for(t=l[e].points||{},i=t.length,n=0;n<i;n++)o=t[n],o&&o.visible!==!1&&o.overlapsBox&&o.overlapsBox(c)&&(o.unclipElements?o.unclipElements():(r=o.label,s=o.note,r&&r.options.visible&&(r.alignToClipBox&&r.alignToClipBox(c),r.options.noclip=!0),s&&s.options.visible&&(s.options.noclip=!0)))},destroy:function(){ke.fn.destroy.call(this),delete this.parent}}),Ln.prototype.isStackRoot=!0,Hn=qe.extend({init:function(e){qe.fn.init.call(this,e),this.id=f(),this.createTitle(),this.content=new ke,this.chartContainer=new Ln({},this),this.append(this.content),this.axes=[],this.charts=[]},createTitle:function(){var e=this.options.title;Ie(e)&&(e=Me({},e,{align:e.position,position:ae})),this.title=J.Title.buildTitle(e,this,Hn.prototype.options.title)},appendAxis:function(e){this.content.append(e),this.axes.push(e),e.pane=this},appendAxisAt:function(e,t){this.content.append(e),this.axes.splice(t,0,e),e.pane=this},appendChart:function(e){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(e),this.chartContainer.append(e),e.pane=this},empty:function(){var e,t,i=this,n=this.parent;if(n){for(e=0;e<this.axes.length;e++)n.removeAxis(i.axes[e]);for(t=0;t<this.charts.length;t++)n.removeChart(i.charts[t])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},reflow:function(e){var t;Re(this.children)===this.content&&(t=this.children.pop()),qe.fn.reflow.call(this,e),t&&this.children.push(t),this.title&&(this.contentBox.y1+=this.title.box.height())},visualStyle:function(){var e=qe.fn.visualStyle.call(this);return e.zIndex=-10,e},renderComplete:function(){this.options.visible&&this.createGridLines()},stackRoot:function(){return this},clipRoot:function(){return this},createGridLines:function(){var e,t,i,n,o,r,s=this.axes,a=s.concat(this.parent.axes),l=[],c=[];for(e=0;e<s.length;e++)for(t=s[e],i=t.options.vertical,n=i?l:c,o=0;o<a.length;o++)0===n.length&&(r=a[o],i!==r.options.vertical&&Ne(n,t.createGridLines(r)))},refresh:function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},chartsBox:function(){var e,t,i,n,o,r,s,a,l,c=this.axes,d=c.length,u=new Ce;for(e=0;e<d;e++)t=c[e],i=t.options.vertical?pe:he,n=t.lineBox(),u[i+1]=n[i+1],u[i+2]=n[i+2];if(0===u.x2)for(o=this.parent.axes,r=o.length,s=0;s<r;s++)a=o[s],a.options.vertical||(l=a.lineBox(),u.x1=l.x1,u.x2=l.x2);return u},clipBox:function(){return this.chartContainer.clipBox},notifyRender:function(){var e=this.getService();e&&e.notify(Ni,{pane:new dt(this),index:this.paneIndex,name:this.options.name})}}),Nn=1,Hn.prototype.isStackRoot=!0,Te(Hn,{zIndex:-1,shrinkToFit:!0,title:{align:ce},visible:!0}),On=/area/i,Vn=ke.extend({init:function(e,t,i){ke.fn.init.call(this,t),this.initFields(e,t),this.series=e,this.initSeries(),this.charts=[],this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=t,this.createPanes(),this.render(),this.createCrosshairs()},initFields:function(){},initSeries:function(){var e,t=this.series;for(e=0;e<t.length;e++)t[e].index=e},createPanes:function(){function e(e,t){Oe(e.title)&&(e.title={text:e.title}),e.title=Me({},t.title,e.title)}var t,i,n,o=this,r={title:{color:(this.options.title||{}).color}},s=[],a=this.options.panes||[],l=Math.max(a.length,1);for(t=0;t<l;t++)i=a[t]||{},e(i,r),n=new Hn(i),n.paneIndex=t,s.push(n),o.append(n);this.panes=s},createCrosshairs:function(e){var t,i,n,o,r,s=this;for(void 0===e&&(e=this.panes),t=0;t<e.length;t++)for(i=e[t],n=0;n<i.axes.length;n++)o=i.axes[n],o.options.crosshair&&o.options.crosshair.visible&&(r=new Bn(s.chartService,o,o.options.crosshair),s.crosshairs.push(r),i.content.append(r))},removeCrosshairs:function(e){var t,i,n=this.crosshairs,o=e.axes;for(t=n.length-1;t>=0;t--)for(i=0;i<o.length;i++)if(n[t].axis===o[i]){n.splice(t,1);break}},hideCrosshairs:function(){var e,t=this.crosshairs;for(e=0;e<t.length;e++)t[e].hide()},findPane:function(e){var t,i,n=this.panes;for(i=0;i<n.length;i++)if(n[i].options.name===e){t=n[i];break}return t||n[0]},findPointPane:function(e){var t,i,n=this.panes;for(i=0;i<n.length;i++)if(n[i].box.containsPoint(e)){t=n[i];break}return t},appendAxis:function(e){var t=this.findPane(e.options.pane);t.appendAxis(e),this.axes.push(e),e.plotArea=this},removeAxis:function(e){var t,i,n=this,o=[];for(t=0;t<this.axes.length;t++)i=n.axes[t],e!==i?o.push(i):i.destroy();this.axes=o},appendChart:function(e,t){this.charts.push(e),t?t.appendChart(e):this.append(e)},removeChart:function(e){var t,i,n=this,o=[];for(t=0;t<this.charts.length;t++)i=n.charts[t],i!==e?o.push(i):i.destroy();this.charts=o},addToLegend:function(e){var t,i,n,o,r,s,a,l,c,d=e.length,u=this.options.legend,p=u.labels||{},f=u.inactiveItems||{},m=f.labels||{},g=[];for(t=0;t<d;t++)i=e[t],n=i.visible!==!1,i.visibleInLegend!==!1&&(o=i.name,r=n?Pe(p):Pe(m)||Pe(p),r&&(o=r({text:h(o)?o:"",series:i})),s=i._defaults,a=i.color,Ae(a)&&s&&(a=s.color),l=void 0,c=void 0,n?(l={},c=a):(l={color:m.color,font:m.font},c=f.markers.color),h(o)&&""!==o&&g.push({text:o,labels:l,markerColor:c,series:i,active:n}));Ne(u.items,g)},groupAxes:function(e){var t,i,n,o,r=[],s=[];for(t=0;t<e.length;t++)for(i=e[t].axes,n=0;n<i.length;n++)o=i[n],o.options.vertical?s.push(o):r.push(o);return{x:r,y:s,any:r.concat(s)}},groupSeriesByPane:function(){var e,t,i,n=this,o=this.series,r={};for(e=0;e<o.length;e++)t=o[e],i=n.seriesPaneName(t),r[i]?r[i].push(t):r[i]=[t];return r},filterVisibleSeries:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],i.visible!==!1&&n.push(i);return n},reflow:function(e){var t=this.options.plotArea,i=this.panes,n=Le(t.margin);this.box=e.clone().unpad(n),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},redraw:function(e){var t,i,n,o=this,r=[].concat(e);for(this.initSeries(),t=this.getRoot(),t&&t.cleanGradients(),i=0;i<r.length;i++)o.removeCrosshairs(r[i]),r[i].empty();for(this.render(r),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(r),this.createCrosshairs(r),n=0;n<r.length;n++)r[n].refresh()},axisCrossingValues:function(e,t){var i,n=e.options,o=[].concat(n.axisCrossingValues||n.axisCrossingValue),r=t.length-o.length,s=o[0]||0;for(i=0;i<r;i++)o.push(s);return o},alignAxisTo:function(e,t,i,n){var o=e.getSlot(i,i,!0),r=e.options.reverse?2:1,s=t.getSlot(n,n,!0),a=t.options.reverse?2:1,l=e.box.translate(s[he+a]-o[he+r],s[pe+a]-o[pe+r]);e.pane!==t.pane&&l.translate(0,e.pane.box.y1-t.pane.box.y1),e.reflow(l)},alignAxes:function(e,t){var i,n,o,r,s,a,l,c,d,u,h,p,f,m,g=this,v=e[0],_=t[0],b=this.axisCrossingValues(v,t),w=this.axisCrossingValues(_,e),y={},k={},x={},C={};for(i=0;i<t.length;i++)n=t[i],o=n.pane,r=o.id,s=n.options.visible!==!1,a=A(e,o)||v,l=b,a!==v&&(l=g.axisCrossingValues(a,t)),g.alignAxisTo(n,a,w[i],l[i]),n.options._overlap||(je(n.lineBox().x1)===je(a.lineBox().x1)&&(y[r]&&n.reflow(n.box.alignTo(y[r].box,ce).translate(-n.options.margin,0)),s&&(y[r]=n)),je(n.lineBox().x2)===je(a.lineBox().x2)&&(n._mirrored||(n.options.labels.mirror=!n.options.labels.mirror,n._mirrored=!0),g.alignAxisTo(n,a,w[i],l[i]),k[r]&&n.reflow(n.box.alignTo(k[r].box,fe).translate(n.options.margin,0)),s&&(k[r]=n)),0!==i&&_.pane===n.pane&&(n.alignTo(_),n.reflow(n.box)));for(c=0;c<e.length;c++)d=e[c],u=d.pane,h=u.id,p=d.options.visible!==!1,f=A(t,u)||_,m=w,f!==_&&(m=g.axisCrossingValues(f,e)),g.alignAxisTo(d,f,b[c],m[c]),d.options._overlap||(je(d.lineBox().y1)===je(f.lineBox().y1)&&(d._mirrored||(d.options.labels.mirror=!d.options.labels.mirror,d._mirrored=!0),g.alignAxisTo(d,f,b[c],m[c]),x[h]&&d.reflow(d.box.alignTo(x[h].box,ae).translate(0,-d.options.margin)),p&&(x[h]=d)),je(d.lineBox().y2,ie.COORD_PRECISION)===je(f.lineBox().y2,ie.COORD_PRECISION)&&(C[h]&&d.reflow(d.box.alignTo(C[h].box,le).translate(0,d.options.margin)),p&&(C[h]=d)),0!==c&&(d.alignTo(v),d.reflow(d.box)))},shrinkAxisWidth:function(e){var t,i,n,o,r=this.groupAxes(e).any,s=D(r),a=0;for(t=0;t<e.length;t++)i=e[t],i.axes.length>0&&(a=Math.max(a,s.width()-i.contentBox.width()));if(0!==a)for(n=0;n<r.length;n++)o=r[n],o.options.vertical||o.reflow(o.box.shrink(a,0))},shrinkAxisHeight:function(e){var t,i,n,o,r,s,a;for(i=0;i<e.length;i++)if(n=e[i],o=n.axes,r=Math.max(0,D(o).height()-n.contentBox.height()),0!==r){for(s=0;s<o.length;s++)a=o[s],a.options.vertical&&a.reflow(a.box.shrink(0,r));t=!0}return t},fitAxes:function(e){var t,i,n,o,r,s,a,l,c,d,u=this.groupAxes(e).any,h=0;for(t=0;t<e.length;t++)if(i=e[t],n=i.axes,o=i.contentBox,n.length>0)for(r=D(n),s=Math.max(o.y1-r.y1,o.y2-r.y2),h=Math.max(h,o.x1-r.x1),a=0;a<n.length;a++)l=n[a],l.reflow(l.box.translate(0,s));for(c=0;c<u.length;c++)d=u[c],d.reflow(d.box.translate(h,0))},reflowAxes:function(e){var t,i=this,n=this.groupAxes(e);for(t=0;t<e.length;t++)i.reflowPaneAxes(e[t]);n.x.length>0&&n.y.length>0&&(this.alignAxes(n.x,n.y),this.shrinkAxisWidth(e),this.autoRotateAxisLabels(n),this.alignAxes(n.x,n.y),this.shrinkAxisWidth(e)&&this.alignAxes(n.x,n.y),this.shrinkAxisHeight(e),this.alignAxes(n.x,n.y),this.shrinkAxisHeight(e)&&this.alignAxes(n.x,n.y),this.fitAxes(e))},autoRotateAxisLabels:function(e){var t,i,n,o,r=this,s=this,a=s.panes,l=Wn(a);for(i=0;i<l.length;i++)n=l[i],n.autoRotateLabels()&&(t=!0);if(t){for(o=0;o<a.length;o++)r.reflowPaneAxes(a[o]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),
this.shrinkAxisWidth(a))}},reflowPaneAxes:function(e){var t,i=e.axes,n=i.length;if(n>0)for(t=0;t<n;t++)i[t].reflow(e.contentBox)},reflowCharts:function(e){var t,i,n=this.charts,o=n.length,r=this.box;for(t=0;t<o;t++)i=n[t].pane,i&&!De(i,e)||n[t].reflow(r)},reflowPanes:function(){var e,t,i,n,o,r,s,a,l,c=this,d=c.box,u=c.panes,h=u.length,p=d.height(),f=h,m=0,g=d.y1;for(e=0;e<h;e++)t=u[e],i=t.options.height,t.options.width=d.width(),t.options.height?(i.indexOf&&i.indexOf("%")&&(n=parseInt(i,10)/100,t.options.height=n*d.height()),t.reflow(d.clone()),p-=t.options.height):m++;for(o=0;o<h;o++)r=u[o],r.options.height||(r.options.height=p/m);for(s=0;s<h;s++)a=u[s],l=d.clone().move(d.x1,g),a.reflow(l),f--,g+=a.options.height},backgroundBox:function(){var e,t,i,n,o,r,s=this.axes,a=s.length;for(t=0;t<a;t++)for(i=s[t],n=0;n<a;n++)o=s[n],i.options.vertical!==o.options.vertical&&(r=i.lineBox().clone().wrap(o.lineBox()),e=e?e.wrap(r):r);return e||this.box},chartsBoxes:function(){var e,t=this.panes,i=[];for(e=0;e<t.length;e++)i.push(t[e].chartsBox());return i},addBackgroundPaths:function(e){var t,i=this.chartsBoxes();for(t=0;t<i.length;t++)e.paths.push(tt.fromRect(i[t].toRect()))},backgroundContainsPoint:function(e){var t,i=this.chartsBoxes();for(t=0;t<i.length;t++)if(i[t].containsPoint(e))return!0},createVisual:function(){var e,t,i,n,o;ke.fn.createVisual.call(this),e=this.options.plotArea,t=e.opacity,i=e.background,n=e.border,void 0===n&&(n={}),E(i)&&(i=de,t=0),o=this._bgVisual=new et.MultiPath({fill:{color:i,opacity:t},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1}),this.addBackgroundPaths(o),this.appendVisual(o)},pointsByCategoryIndex:function(e){var t,i,n,o,r,s=this.charts,a=[];if(null!==e)for(t=0;t<s.length;t++)if(i=s[t],"_navigator"!==i.pane.options.name&&(n=s[t].categoryPoints[e],n&&n.length))for(o=0;o<n.length;o++)r=n[o],r&&be(r.value)&&null!==r.value&&a.push(r);return a},pointsBySeriesIndex:function(e){return this.filterPoints(function(t){return t.series.index===e})},pointsBySeriesName:function(e){return this.filterPoints(function(t){return t.series.name===e})},filterPoints:function(e){var t,i,n,o,r,s=this.charts,a=[];for(t=0;t<s.length;t++)for(i=s[t],n=i.points,o=0;o<n.length;o++)r=n[o],r&&r.visible!==!1&&e(r)&&a.push(r);return a},findPoint:function(e){var t,i,n,o,r,s=this.charts;for(t=0;t<s.length;t++)for(i=s[t],n=i.points,o=0;o<n.length;o++)if(r=n[o],r&&r.visible!==!1&&e(r))return r},paneByPoint:function(e){var t,i,n=this.panes;for(t=0;t<n.length;t++)if(i=n[t],i.box.containsPoint(e))return i},detachLabels:function(){var e=this.groupAxes(this.panes),t=e.x,i=e.y;this.detachAxisGroupLabels(i,t),this.detachAxisGroupLabels(t,i)},detachAxisGroupLabels:function(e,t){var i,n,o,r,s,a,l,c=this,d=0;for(i=0;i<e.length;i++)n=e[i],o=n.pane,r=A(t,o)||t[0],s=i+d,a=c.createLabelAxis(n,s,r),a&&(d++,l=o.axes.indexOf(n)+d,o.appendAxisAt(a,l))},createLabelAxis:function(e,t,i){var n,o,r,s,a,l,c,d,u=e.options.labels,h=u.position,p=h!==ie.END&&h!==ie.START,f=u.visible;return p||f===!1?null:(n=this.groupAxes(this.panes),o=i.options.vertical?n.x:n.y,r=this.axisCrossingValues(i,o),s=h===ie.END,a=i.range(),l=s?a.max:a.min,c=Ge(r[t],a.min,a.max),c-l===0?null:(r.splice(t+1,0,l),i.options.axisCrossingValues=r,d=e.clone(),e.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d))}}),Wn=function(e){return e.reduce(function(e,t){return e.concat(t.axes)},[])},Te(Vn,{series:[],plotArea:{margin:{}},background:"",border:{color:me,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),Un={hover:function(e,t){this._dispatchEvent(e,t,Si)},click:function(e,t){this._dispatchEvent(e,t,Ci)}},qn=ee.extend({init:function(e,t,i){var n,o,r,s=t.canonicalFields(e),a=t.valueFields(e),l=t.sourceFields(e,s),c=this._seriesFields=[],d=i.query(e.type),u=e.aggregate||d;for(this._series=e,this._binder=t,n=0;n<s.length;n++){if(o=s[n],r=void 0,Ie(u))r=u[o];else{if(0!==n&&!De(o,a))break;r=u}r&&c.push({canonicalName:o,name:l[n],transform:Ae(r)?r:ht[r]})}},aggregatePoints:function(e,t){var i,n,o,r,s,a=this,l=this,c=l._series,d=l._seriesFields,u=this._bindPoints(e||[]),h=u.dataItems[0],p={};for(!h||te(h)||ye(h)||(i=function(){},i.prototype=h,p=new i),n=0;n<d.length;n++){if(o=d[n],r=a._bindField(u.values,o.canonicalName),s=o.transform(r,c,u.dataItems,t),!(null===s||!Ie(s)||be(s.length)||s instanceof Date)){p=s;break}be(s)&&I(o.name,p,s)}return p},_bindPoints:function(e){var t,i,n=this,o=n._binder,r=n._series,s=[],a=[];for(t=0;t<e.length;t++)i=e[t],s.push(o.bindPoint(r,i)),a.push(r.data[i]);return{values:s,dataItems:a}},_bindField:function(e,t){var i,n,o,r,s=[],a=e.length;for(i=0;i<a;i++)n=e[i],o=n.valueFields,r=void 0,r=be(o[t])?o[t]:n.fields[t],s.push(r);return s}}),jn=ee.extend({init:function(){this._defaults={}},register:function(e,t){var i,n=this;for(i=0;i<e.length;i++)n._defaults[e[i]]=t},query:function(e){return this._defaults[e]}}),jn.current=new jn,Gn=_n.extend({createLabel:function(){var e=this.options.labels,t=Me({},e,e.from),i=Me({},e,e.to);t.visible&&(this.labelFrom=this._createLabel(t),this.append(this.labelFrom)),i.visible&&(this.labelTo=this._createLabel(i),this.append(this.labelTo))},_createLabel:function(e){var t,i=Pe(e),n=this.pointData();return t=i?i(n):this.formatValue(e.format),new gn(t,Me({vertical:this.options.vertical},e),n)},reflow:function(e){var t,i,n,o;this.render(),t=this,i=t.labelFrom,n=t.labelTo,o=t.value,this.box=e,i&&(i.options.aboveAxis=o.from>o.to,i.reflow(e)),n&&(n.options.aboveAxis=o.to>o.from,n.reflow(e)),this.note&&this.note.reflow(e)}}),Gn.prototype.defaults=Me({},Gn.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}}),$n=yn.extend({pointType:function(){return Gn},pointValue:function(e){return e.valueFields},formatPointValue:function(e,t){return null===e.value.from&&null===e.value.to?"":this.chartService.format.auto(t,e.value.from,e.value.to)},plotRange:function(e){return e?[e.value.from,e.value.to]:0},updateRange:function(e,t){var i=t.series.axis,n=e.from,o=e.to,r=this.valueAxisRanges[i];null!==e&&te(n)&&te(o)&&(r=this.valueAxisRanges[i]=r||{min:ne,max:oe},r.min=Math.min(r.min,n),r.max=Math.max(r.max,n),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},aboveAxis:function(e){var t=e.value;return t.from<t.to}}),$n.prototype.plotLimits=Zi.prototype.plotLimits,Kn=tn.extend({aliasFor:function(){return this.parent}}),Yn="auto",Qn="{0}",Xn="{1}",Zn=ke.extend({init:function(e,t){ke.fn.init.call(this),this.value=e,this.options=t,this.aboveAxis=Ee(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()},render:function(){var e,t,i,n,o,r;this._rendered||(this._rendered=!0,e=this.options,t=e.markers,i=e.labels,n=this.value,o=this.fromPoint=new Kn(n,Me({},this.options,{labels:i.from,markers:t.from})),r=this.toPoint=new Kn(n,Me({},this.options,{labels:i.to,markers:t.to})),this.copyFields(o),this.copyFields(r),this.append(o),this.append(r))},reflow:function(e){var t,i;this.render(),t=e.from,i=e.to,this.positionLabels(t,i),this.fromPoint.reflow(t),this.toPoint.reflow(i),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},createHighlight:function(){var e=new ot;return e.append(this.fromPoint.createHighlight()),e.append(this.toPoint.createHighlight()),e},highlightVisual:function(){return this.visual},highlightVisualArgs:function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},tooltipAnchor:function(){var e,t,i,n,o,r,s=this.owner.pane.clipBox(),a=!s||s.overlaps(this.box);if(a)return e=this.box,t=e.center(),i=ce,this.options.vertical?(n=t.x,o=e.y1-Ct,r=le):(n=e.x2+Ct,o=t.y,r=se),{point:new xe(n,o),align:{horizontal:i,vertical:r}}},formatValue:function(e){return this.owner.formatPointValue(this,e)},overlapsBox:function(e){return this.box.overlaps(e)},unclipElements:function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},initLabelsFormat:function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=e.extend({},t.from,{format:Qn})),t.to&&t.to.format||(t.to=e.extend({},t.to,{format:Xn})))},positionLabels:function(e,t){var i,n,o=this.options,r=o.labels,s=o.vertical;r.position===Yn&&(s?t.y1<=e.y1?(n=Bt,i=Lt):(n=Lt,i=Bt):t.x1<=e.x1?(n=ce,i=fe):(n=fe,i=ce),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=n))},copyFields:function(e){e.dataItem=this.dataItem,e.category=this.category,e.series=this.series,e.color=this.color,e.owner=this.owner}}),Me(Zn.prototype,Ji),Me(Zn.prototype,en),Zn.prototype.defaults={markers:{visible:!1,background:de,size:Rt,type:ue,border:{width:2},opacity:1},labels:{visible:!1,margin:Le(3),padding:Le(4),animation:{type:yt,delay:wt},position:Yn},notes:{label:{}},highlight:{markers:{border:{color:de,width:2}},zIndex:ie.HIGHLIGHT_ZINDEX},tooltip:{format:"{0} - {1}"}},Jn=un.extend({createStrokeSegments:function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},stackSegments:function(){var e=this.fromSegments;return this.fromSegments||(e=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),e},createStroke:function(e){var t=new tt(e),i=new tt(e);t.segments.push.apply(t.segments,this.strokeSegments()),i.segments.push.apply(i.segments,this.stackSegments()),this.visual.append(t),this.visual.append(i)},hasStackSegment:function(){return!0},fromPoints:function(){return this.linePoints.map(function(e){return e.fromPoint})},toPoints:function(){return this.linePoints.map(function(e){return e.toPoint})}}),eo=Jn.extend({createStrokeSegments:function(){return this.createCurveSegments(this.toPoints())},stackSegments:function(){var e=this.fromSegments;return this.fromSegments||(e=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),e},createCurveSegments:function(e){var t=new He;return t.process(this.toGeometryPoints(e))}}),to=Jn.extend({createStrokeSegments:function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},stackSegments:function(){var e=this.fromSegments;return this.fromSegments||(e=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints())),e.reverse()),e}}),Me(to.prototype,on),io=Zi.extend({render:function(){Zi.fn.render.call(this),this.renderSegments()},pointType:function(){return Zn},createPoint:function(e,t){var i,n,o,r=t.categoryIx,s=t.category,a=t.series,l=t.seriesIx,c=e.valueFields;if(!h(c.from)&&!h(c.to)){if(this.seriesMissingValues(a)!==Ft)return null;c={from:0,to:0}}return i=this.pointOptions(a,l),i=this.evalPointOptions(i,c,s,r,a,l),n=e.fields.color||a.color,Ae(a.color)&&(n=i.color),o=new Zn(c,i),o.color=n,this.append(o),o},createSegment:function(e,t,i){var n,o=(t.line||{}).style;return new(n="smooth"===o?eo:"step"===o?to:Jn)(e,t,i)},plotRange:function(e,t){return e?[e.value.from,e.value.to]:[t,t]},valueSlot:function(e,t){var i=e.getSlot(t[0],t[0],!this.options.clip),n=e.getSlot(t[1],t[1],!this.options.clip);if(i&&n)return{from:i,to:n}},pointSlot:function(e,t){var i,n,o=t.from,r=t.to;return this.options.invertAxes?(i=new Ce(o.x1,e.y1,o.x2,e.y2),n=new Ce(r.x1,e.y1,r.x2,e.y2)):(i=new Ce(e.x1,o.y1,e.x2,o.y2),n=new Ce(e.x1,r.y1,e.x2,r.y2)),{from:i,to:n}},addValue:function(e,t){var i=e.valueFields;te(i.from)||(i.from=i.to),te(i.to)||(i.to=i.from),Zi.fn.addValue.call(this,e,t)},updateRange:function(e,t){var i,n,o,r;null!==e&&te(e.from)&&te(e.to)&&(i=t.series.axis,n=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:ne,max:oe},o=e.from,r=e.to,n.min=Math.min(n.min,o,r),n.max=Math.max(n.max,o,r))},formatPointValue:function(e,t){var i=e.value;return this.chartService.format.auto(t,i.from,i.to)},animationPoints:function(){var e,t,i=this.points,n=[];for(e=0;e<i.length;e++)t=i[e],t&&(n.push((t.fromPoint||{}).marker),n.push((t.toPoint||{}).marker));return n.concat(this._segments)}}),Me(io.prototype,an,cn),no=kn.extend({reflow:function(e){var t,i=this,n=i.options,o=i.value,r=i.owner,s=r.seriesValueAxis(n),a=[],l=[],c=[],d=s.getSlot(o.low,o.high),u=s.getSlot(o.open,o.open),h=s.getSlot(o.close,o.close);u.x1=h.x1=d.x1=e.x1,u.x2=h.x2=d.x2=e.x2,t=d.center().x,a.push([u.x1,u.y1]),a.push([t,u.y1]),l.push([t,h.y1]),l.push([h.x2,h.y1]),c.push([t,d.y1]),c.push([t,d.y2]),this.lines=[a,l,c],this.box=d.clone().wrap(u.clone().wrap(h)),this.reflowNote()},createBody:function(){}}),oo=xn.extend({pointType:function(){return no}}),ro=ke.extend({init:function(e,t,i){ke.fn.init.call(this),this.from=e,this.to=t,this.series=i},linePoints:function(){var e,t,i=this.from,n=this,o=n.from.box,r=n.to.box,s=[];return i.isVertical?(e=i.aboveAxis?o.y1:o.y2,s.push([o.x1,e],[r.x2,e])):(t=i.aboveAxis?o.x2:o.x1,s.push([t,o.y1],[t,r.y2])),s},createVisual:function(){var e,t;ke.fn.createVisual.call(this),e=this.series.line||{},t=tt.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}}),Se(t),this.visual.append(t)}}),Te(ro,{animation:{type:yt,delay:wt}}),so=yn.extend({render:function(){yn.fn.render.call(this),this.createSegments()},traverseDataPoints:function(e){var t,i,n,o,s,a,l,c,d,u,h=this,p=this.options.series,f=r(p),m=!this.options.invertAxes;for(t=0;t<p.length;t++)for(i=p[t],n=0,o=0,s=0;s<f;s++)a=pt.current.bindPoint(i,s),l=a.valueFields.value,c=a.fields.summary,d=n,u=void 0,c?"total"===c.toLowerCase()?(a.valueFields.value=n,d=0,u=n):(a.valueFields.value=o,u=d-o,o=0):te(l)&&(o+=l,n+=l,u=n),e(a,{category:h.categoryAxis.categoryAt(s),categoryIx:s,series:i,seriesIx:t,total:n,runningTotal:o,from:d,to:u,isVertical:m})},updateRange:function(e,t){yn.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,i,n,o,r,s,a=this,l=this.options.series,c=this.seriesPoints,d=this.segments=[];for(e=0;e<l.length;e++)if(t=l[e],i=c[e])for(n=void 0,o=0;o<i.length;o++)r=i[o],r&&n&&(s=new ro(n,r,t),d.push(s),a.append(s)),n=r}}),ao=[Ot,di,ri,fi],lo=[Qt,pi].concat(ao),co=Vn.extend({initFields:function(e){var t,i,n=this;if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new mn,e.length>0)for(this.invertAxes=De(e[0].type,[Vt,qt,pi,di,fi,si,Yt,ui]),t=0;t<e.length;t++)if(i=e[t].stack,i&&"100%"===i.type){n.stack100=!0;break}},render:function(e){void 0===e&&(e=this.panes),this.createCategoryAxes(e),this.aggregateCategories(e),this.createCategoryAxesLabels(e),this.createCharts(e),this.createValueAxes(e)},removeAxis:function(e){var t=e.options.name;Vn.fn.removeAxis.call(this,e),e instanceof Ue?delete this.namedCategoryAxes[t]:(this.valueAxisRangeTracker.reset(t),delete this.namedValueAxes[t]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},createCharts:function(e){var t,i,n,o,r,s,a=this,l=this.groupSeriesByPane();for(t=0;t<e.length;t++)if(i=e[t],n=l[i.options.name||"default"]||[],a.addToLegend(n),o=a.filterVisibleSeries(n))for(r=a.groupSeriesByCategoryAxis(o),s=0;s<r.length;s++)a.createChartGroup(r[s],i)},createChartGroup:function(e,t){this.createAreaChart(b(e,[Ot,di]),t),this.createRangeAreaChart(b(e,[ri,fi]),t),this.createBarChart(b(e,[Gt,Vt]),t),this.createRangeBarChart(b(e,[ai,si]),t),this.createBulletChart(b(e,[qt,hi]),t),this.createCandlestickChart(b(e,jt),t),this.createBoxPlotChart(b(e,[Wt,ui]),t),this.createOHLCChart(b(e,Xt),t),this.createWaterfallChart(b(e,[mi,Yt]),t),this.createLineChart(b(e,[Qt,pi]),t)},aggregateCategories:function(e){var t,i,n,o,r,s=this,a=this.srcSeries||this.series,l=[];for(this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{},t=0;t<a.length;t++)i=a[t],n=s.seriesCategoryAxis(i),o=s.findPane(n.options.pane),r=_(n.options.type,ge),i=(r||i.categoryField)&&De(o,e)?s.aggregateSeries(i,n):s.filterSeries(i,n),l.push(i);this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=a,this.series=l},filterSeries:function(e,t){var i,n,o,r=(e.data||{}).length;return t._seriesMax=Math.max(t._seriesMax||0,r),te(t.options.min)||te(t.options.max)?(i=t.currentRangeIndices(),n=De(e.type,lo),o=Me({},e),o.data=(o.data||[]).slice(i.min,i.max+1),n&&T(o,i,r,function(n){return{item:e.data[n],category:t.categoryAt(n,!0),categoryIx:n-i.min}},function(t){return be(e.data[t])}),o):e},clearSeriesPointsCache:function(){this._seriesPointsCache={}},seriesSourcePoints:function(e,t){var i,o,r,s,a,l,c,d,u,h=this,p=e.index+";"+t.categoriesHash();if(this._seriesPointsCache[p])return this._currentPointsCache[p]=this._seriesPointsCache[p],this._seriesPointsCache[p];for(i=t.options,o=i.srcCategories,r=_(i.type,ge),s=e.data,a=r?w:n,l=[],r||t.mapCategories(),c=0;c<s.length;c++)d=void 0,d=e.categoryField?a(e.categoryField,s[c],h.chartService.intl):o[c],be(d)&&null!==d&&(u=t.totalIndex(d),l[u]=l[u]||{items:[],category:d},l[u].items.push(c));return this._currentPointsCache[p]=l,l},aggregateSeries:function(e,t){var i,n,o,r,s,a,l,c,d,u=e.data;if(!u.length)return e;for(i=this.seriesSourcePoints(e,t),n=Me({},e),o=new qn(Me({},e),pt.current,jn.current),r=n.data=[],s=t.options.dataItems||[],a=t.currentRangeIndices(),l=function(e){var n,r=e-a.min,s=i[e];return s||(s=i[e]={}),s.categoryIx=r,s.item||(n=t.categoryAt(e,!0),s.category=n,s.item=o.aggregatePoints(s.items,n)),s},c=a.min;c<=a.max;c++)d=l(c),r[d.categoryIx]=d.item,d.items&&d.items.length&&(s[d.categoryIx]=d.item);return De(n.type,lo)&&T(n,a,t.totalCount(),l,function(e){return i[e]}),t.options.dataItems=s,n},appendChart:function(e,t){var i=e.options.series,n=this.seriesCategoryAxis(i[0]),o=n.options.categories,s=Math.max(0,r(i)-o.length);if(s>0)for(o=n.options.categories=n.options.categories.slice(0);s--;)o.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),Vn.fn.appendChart.call(this,e,t)},seriesPaneName:function(e){var t=this.options,i=e.axis,n=[].concat(t.valueAxis),o=$e(n,function(e){return e.name===i})[0],r=t.panes||[{}],s=(r[0]||{}).name||"default",a=(o||{}).pane||s;return a},seriesCategoryAxis:function(e){var t=e.categoryAxis,i=t?this.namedCategoryAxes[t]:this.categoryAxis;if(!i)throw Error("Unable to locate category axis with name "+t);return i},stackableChartOptions:function(e,t){var i=e.stack,n=i&&"100%"===i.type,o=t.options.clip;return{isStacked:i,isStacked100:n,clip:o}},groupSeriesByCategoryAxis:function(e){var t,i,n,o,r,s,a=[],l={};for(t=0;t<e.length;t++)i=e[t].categoryAxis||"$$default$$",l.hasOwnProperty(i)||(l[i]=!0,a.push(i));for(n=[],o=0;o<a.length;o++)r=a[o],s=R(e,r,o),0!==s.length&&n.push(s);return n},createBarChart:function(t,i){var n,o;0!==t.length&&(n=t[0],o=new yn(this,e.extend({series:t,invertAxes:this.invertAxes,gap:n.gap,spacing:n.spacing},this.stackableChartOptions(n,i))),this.appendChart(o,i))},createRangeBarChart:function(e,t){var i,n;0!==e.length&&(i=e[0],n=new $n(this,{series:e,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(n,t))},createBulletChart:function(e,t){var i,n;0!==e.length&&(i=e[0],n=new Fn(this,{series:e,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:t.options.clip}),this.appendChart(n,t))},createLineChart:function(t,i){var n,o;0!==t.length&&(n=t[0],o=new dn(this,e.extend({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(n,i))),this.appendChart(o,i))},createAreaChart:function(t,i){var n,o;0!==t.length&&(n=t[0],o=new fn(this,e.extend({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(n,i))),this.appendChart(o,i))},createRangeAreaChart:function(e,t){if(0!==e.length){var i=new io(this,{invertAxes:this.invertAxes,series:e,clip:t.options.clip});this.appendChart(i,t)}},createOHLCChart:function(e,t){var i,n;0!==e.length&&(i=e[0],n=new oo(this,{invertAxes:this.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip}),this.appendChart(n,t))},createCandlestickChart:function(e,t){var i,n;0!==e.length&&(i=e[0],n=new xn(this,{invertAxes:this.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip}),this.appendChart(n,t))},createBoxPlotChart:function(e,t){var i,n;0!==e.length&&(i=e[0],n=new Tn(this,{invertAxes:this.invertAxes,gap:i.gap,series:e,spacing:i.spacing,clip:t.options.clip}),this.appendChart(n,t))},createWaterfallChart:function(e,t){var i,n;0!==e.length&&(i=e[0],n=new so(this,{series:e,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(n,t))},axisRequiresRounding:function(e,t){var i,n,o,r,s,a=this,l=b(this.series,gi);for(i=0;i<this.series.length;i++)n=a.series[i],De(n.type,ao)&&(o=n.line,o&&o.style===Nt&&l.push(n));for(r=0;r<l.length;r++)if(s=l[r].categoryAxis||"",s===e||!s&&0===t)return!0},aggregatedAxis:function(e,t){var i,n,o=this.series;for(i=0;i<o.length;i++)if(n=o[i].categoryAxis||"",(n===e||!n&&0===t)&&o[i].categoryField)return!0},createCategoryAxesLabels:function(){var e,t=this.axes;for(e=0;e<t.length;e++)t[e]instanceof Ue&&t[e].createLabels()},createCategoryAxes:function(e){var t,i,n,o,r,s,a,l=this,c=this.invertAxes,d=[].concat(this.options.categoryAxis),u=[];for(t=0;t<d.length;t++)if(i=d[t],n=l.findPane(i.pane),De(n,e)){if(o=i.name,r=i.categories,void 0===r&&(r=[]),i=Me({vertical:c,reverse:!c&&l.chartService.rtl,axisCrossingValue:c?ne:0},i),be(i.justified)||(i.justified=l.isJustified()),l.axisRequiresRounding(o,t)&&(i.justified=!1),s=void 0,s=y(i,r[0])?new J.DateCategoryAxis(i,l.chartService):new Ue(i,l.chartService),d[t].categories=s.options.srcCategories,o){if(l.namedCategoryAxes[o])throw Error("Category axis with name "+o+" is already defined");l.namedCategoryAxes[o]=s}s.axisIndex=t,u.push(s),l.appendAxis(s)}a=this.categoryAxis||u[0],this.categoryAxis=a,c?this.axisY=a:this.axisX=a},isJustified:function(){var e,t,i=this.series;for(e=0;e<i.length;e++)if(t=i[e],!De(t.type,ao))return!1;return!0},createValueAxes:function(e){var t,i,n,o,r,s,a,l,c,d=this,u=this.valueAxisRangeTracker,h=u.query(),p=[].concat(this.options.valueAxis),f=this.invertAxes,m={vertical:!f,reverse:f&&this.chartService.rtl},g=[];for(this.stack100&&(m.roundToMajorUnit=!1,m.labels={format:"P0"}),t=0;t<p.length;t++)if(i=p[t],n=d.findPane(i.pane),De(n,e)){if(o=i.name,r=_(i.type,Oi)?{min:.1,max:1}:{min:0,max:1},s=u.query(o)||h||r,0===t&&s&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max)),a=void 0,a=_(i.type,Oi)?J.LogarithmicAxis:J.NumericAxis,l=new a(s.min,s.max,Me({},m,i),d.chartService),o){if(d.namedValueAxes[o])throw Error("Value axis with name "+o+" is already defined");d.namedValueAxes[o]=l}l.axisIndex=t,g.push(l),d.appendAxis(l)}c=this.valueAxis||g[0],this.valueAxis=c,f?this.axisX=c:this.axisY=c},_dispatchEvent:function(e,t,i){var n,o,r,s=e._eventCoordinates(t),a=new xe(s.x,s.y),l=this.pointPane(a),c=[],d=[];if(l){for(n=l.axes,o=0;o<n.length;o++)r=n[o],r.getValue?m(d,r.getValue(a)):m(c,r.getCategory(a));0===c.length&&m(c,this.categoryAxis.getCategory(a)),c.length>0&&d.length>0&&e.trigger(i,{element:Fe(t),originalEvent:t,category:k(c),value:k(d)})}},pointPane:function(e){var t,i,n=this.panes;for(t=0;t<n.length;t++)if(i=n[t],i.contentBox.containsPoint(e))return i},updateAxisOptions:function(e,t){M(this.options,e,t),M(this.originalOptions,e,t)}}),Te(co,{categoryAxis:{},valueAxis:{}}),Me(co.prototype,Un),uo=ee.extend({init:function(){this._points=[]},destroy:function(){this._points=[]},show:function(e){var t,i,n=this,o=[].concat(e);for(this.hide(),t=0;t<o.length;t++)i=o[t],i&&i.toggleHighlight&&i.hasHighlight()&&(n.togglePointHighlight(i,!0),n._points.push(i))},togglePointHighlight:function(e,t){var i,n=(e.options.highlight||{}).toggle;n?(i={category:e.category,series:e.series,dataItem:e.dataItem,value:e.value,stackValue:e.stackValue,preventDefault:F,visual:e.highlightVisual(),show:t},n(i),i._defaultPrevented||e.toggleHighlight(t)):e.toggleHighlight(t)},hide:function(){for(var e=this,t=this._points;t.length;)e.togglePointHighlight(t.pop(),!1)},isHighlighted:function(e){var t,i,n=this._points;for(t=0;t<n.length;t++)if(i=n[t],e===i)return!0;return!1}}),ho=ee.extend({init:function(e,t){this.plotArea=e,this.options=Me({},this.options,t)},start:function(e){return this._active=P(e,this.options.key)},move:function(e){if(this._active){var t=this.axisRanges=this._panAxes(e,he).concat(this._panAxes(e,pe));if(t.length)return this.axisRanges=t,z(t)}},end:function(){var e=this._active;return this._active=!1,e},pan:function(){var e,t,i=this,n=i.plotArea,o=i.axisRanges;if(o.length){for(e=0;e<o.length;e++)t=o[e],n.updateAxisOptions(t.axis,t.range);n.redraw(n.panes)}},destroy:function(){delete this.plotArea},_panAxes:function(e,t){var i,n,o,r,s=this.plotArea,a=-e[t].delta,l=(this.options.lock||"").toLowerCase(),c=[];if(0!==a&&(l||"").toLowerCase()!==t)for(i=s.axes,n=0;n<i.length;n++)o=i[n],(t===he&&!o.options.vertical||t===pe&&o.options.vertical)&&(r=o.pan(a),r&&(r.limitRange=!0,c.push({axis:o,range:r})));return c}}),ho.prototype.options={key:"none",lock:"none"},po=ee.extend({init:function(e,t){this.chart=e,this.options=Me({},this.options,t),this.createElement()},createElement:function(){var e,t=this._marquee=document.createElement("div");t.className="k-marquee",e=document.createElement("div"),e.className="k-marquee-color",t.appendChild(e)},removeElement:function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},setStyles:function(e){Ke(this._marquee,e)},start:function(e){var t,i,n,o,r;return!!(P(e,this.options.key)&&(t=this.chart,i=t._eventCoordinates(e),n=this._zoomPane=t._plotArea.paneByPoint(i),n&&n.clipBox()))&&(o=n.clipBox().clone(),r=this._elementOffset(),o.translate(r.left,r.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:e.pageX+1,top:e.pageY+1,width:0,height:0}),!0)},_elementOffset:function(){var e=this.chart.element,t=Ke(e,["paddingLeft","paddingTop"]),i=t.paddingLeft,n=t.paddingTop,o=J.elementOffset(e);return{left:i+o.left,top:n+o.top}},move:function(e){var t=this._zoomPane;t&&this.setStyles(this._selectionPosition(e))},end:function(e){var t,i,n,o,r=this._zoomPane;if(r)return t=this._elementOffset(),i=this._selectionPosition(e),i.left-=t.left,i.top-=t.top,n={x:i.left,y:i.top},o={x:i.left+i.width,y:i.top+i.height},this._updateAxisRanges(n,o),this.removeElement(),delete this._zoomPane,z(this.axisRanges)},zoom:function(){var e,t,i,n=this.axisRanges;if(n&&n.length){for(e=this.chart._plotArea,t=0;t<n.length;t++)i=n[t],e.updateAxisOptions(i.axis,i.range);e.redraw(e.panes)}},destroy:function(){this.removeElement(),delete this._marquee,delete this.chart},_updateAxisRanges:function(e,t){var i,n,o,r,s=(this.options.lock||"").toLowerCase(),a=[],l=this._zoomPane.axes;for(i=0;i<l.length;i++)n=l[i],o=n.options.vertical,s===he&&!o||s===pe&&o||(r=n.pointsRange(e,t),r&&a.push({axis:n,range:r}));this.axisRanges=a},_selectionPosition:function(e){var t=this._zoomPaneClipBox,i={x:e.x.startLocation,y:e.y.startLocation},n=e.x.location,o=e.y.location,r=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,n),a=Math.min(i.y,o),l=Math.abs(i.x-n),c=Math.abs(i.y-o);return r===he&&(s=t.x1,l=t.width()),r===pe&&(a=t.y1,c=t.height()),n>t.x2&&(l=t.x2-i.x),n<t.x1&&(l=i.x-t.x1),o>t.y2&&(c=t.y2-i.y),o<t.y1&&(c=i.y-t.y1),{left:Math.max(s,t.x1),top:Math.max(a,t.y1),width:l,height:c}}}),po.prototype.options={key:"shift",lock:"none"},fo=ee.extend({init:function(e,t){this.chart=e,this.options=Me({},this.options,t)},updateRanges:function(e){var t,i,n,o,r=(this.options.lock||"").toLowerCase(),s=[],a=this.chart._plotArea.axes;for(t=0;t<a.length;t++)i=a[t],n=i.options.vertical,r===he&&!n||r===pe&&n||(o=i.zoomRange(-e),o&&s.push({axis:i,range:o}));return this.axisRanges=s,z(s)},zoom:function(){var e,t,i,n=this.axisRanges;if(n&&n.length){for(e=this.chart._plotArea,t=0;t<n.length;t++)i=n[t],e.updateAxisOptions(i.axis,i.range);e.redraw(e.panes)}},destroy:function(){delete this.chart}}),mo=ke.extend({init:function(e,t){ke.fn.init.call(this,e),this.chartService=t},render:function(){var e,t,i=this,n=i.children,o=i.options,r=o.vertical;for(this.visual=new et.Layout(null,{spacing:r?0:o.spacing,lineSpacing:r?o.spacing:0,orientation:r?"vertical":"horizontal",reverse:o.rtl,alignItems:r?"start":"center"}),e=0;e<n.length;e++)t=n[e],t.reflow(new Ce),t.renderVisual()},reflow:function(e){this.visual.rect(e.toRect()),this.visual.reflow();var t=this.visual.clippedBBox();this.box=t?J.rectToBox(t):new Ce},renderVisual:function(){this.addVisual()},createVisual:function(){}}),go=qe.extend({init:function(e){qe.fn.init.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())},createContainer:function(){this.container=new J.FloatElement({vertical:!1,wrap:!1,align:se,spacing:this.options.spacing}),this.append(this.container)},createMarker:function(){this.container.append(new Be(this.markerOptions()))},markerOptions:function(){var e=this.options,t=e.markerColor;return Me({},e.markers,{background:t,border:{color:t}})},createLabel:function(){var e=this.options,t=Me({},e.labels);this.container.append(new ze(e.text,t))},renderComplete:function(){var e,t;qe.fn.renderComplete.call(this),e=this.options.cursor||{},t=this._itemOverlay=tt.fromRect(this.container.box.toRect(),{fill:{color:de,opacity:0},stroke:null,cursor:e.style||e}),this.appendVisual(t)},click:function(e,t){var i=this.eventArgs(t);!e.trigger(vi,i)&&t&&"contextmenu"===t.type&&t.preventDefault()},over:function(e,t){var i=this.eventArgs(t);return e.trigger(_i,i)||e._legendItemHover(i.seriesIndex,i.pointIndex),!0},out:function(e,t){e._unsetActivePoint(),e.trigger(bi,this.eventArgs(t))},eventArgs:function(e){var t=this.options;return{element:Fe(e),text:t.text,series:t.series,seriesIndex:t.series.index,pointIndex:t.pointIndex}},renderVisual:function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):qe.fn.renderVisual.call(this)}}),vo="horizontal",_o="pointer",bo="custom",wo=ke.extend({init:function(e,t){void 0===t&&(t={}),ke.fn.init.call(this,e),this.chartService=t,De(this.options.position,[ae,fe,le,ce,bo])||(this.options.position=fe),this.createContainer(),this.createItems()},createContainer:function(){var e=this.options,t=e.position,i=e.align,n=t,o=se;t===bo?n=ce:De(t,[ae,le])?(n="start"===i?ce:"end"===i?fe:se,o=t):i&&("start"===i?o=ae:"end"===i&&(o=le)),this.container=new qe({margin:e.margin,padding:e.padding,background:e.background,border:e.border,vAlign:o,align:n,zIndex:e.zIndex,shrinkToFit:!0}),this.append(this.container)},createItems:function(){var e,t,i,n=this.getService(),o=this.options,r=this.isVertical(),s=new mo({vertical:r,spacing:o.spacing,rtl:n.rtl},n),a=o.items;for(o.reverse&&(a=a.slice(0).reverse()),e=a.length,t=0;t<e;t++)i=a[t],s.append(new go(Me({},{markers:o.markers,labels:o.labels,rtl:n.rtl},o.item,i)));s.render(),this.container.append(s)},isVertical:function(){var e=this.options,t=e.orientation,i=e.position,n=i===bo&&t!==vo||(be(t)?t!==vo:De(i,[ce,fe]));return n},hasItems:function(){return this.container.children[0].children.length>0},reflow:function(e){var t=this.options,i=e.clone();return this.hasItems()?void(t.position===bo?(this.containerCustomReflow(i),this.box=i):this.containerReflow(i)):void(this.box=i)},containerReflow:function(e){var t,i=this,n=i.options,o=i.container,r=n.position,s=n.width,a=n.height,l=r===ae||r===le?he:pe,c=this.isVertical(),d=e.clone(),u=e.clone();r!==ce&&r!==fe||(u.y1=d.y1=0),c&&a?(u.y2=u.y1+a,u.align(d,pe,o.options.vAlign)):!c&&s&&(u.x2=u.x1+s,u.align(d,he,o.options.align)),o.reflow(u),u=o.box,t=u.clone(),(n.offsetX||n.offsetY)&&(u.translate(n.offsetX,n.offsetY),this.container.reflow(u)),t[l+1]=e[l+1],t[l+2]=e[l+2],this.box=t},containerCustomReflow:function(e){var t=this,i=t.options,n=t.container,o=i.offsetX,r=i.offsetY,s=i.width,a=i.height,l=this.isVertical(),c=e.clone();l&&a?c.y2=c.y1+a:!l&&s&&(c.x2=c.x1+s),
n.reflow(c),c=n.box,n.reflow(new Ce(o,r,o+c.width(),r+c.height()))},renderVisual:function(){this.hasItems()&&ke.fn.renderVisual.call(this)}}),Te(wo,{position:fe,items:[],offsetX:0,offsetY:0,margin:Le(5),padding:Le(5),border:{color:me,width:0},item:{cursor:_o,spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:ce,vAlign:se}}),yo=ee.extend({init:function(){this._registry=[]},register:function(e,t){this._registry.push({type:e,seriesTypes:t})},create:function(e,t,i){var n,o,r,s=this._registry,a=s[0];for(o=0;o<s.length;o++)if(r=s[o],n=b(e,r.seriesTypes),n.length>0){a=r;break}return new a.type(n,t,i)}}),yo.current=new yo,ko=3,xo=.1,Co=ee.extend({init:function(e,t,i,n){var o=e.element;this.options=Me({},this.options,i),this.chart=e,this.observer=n,this.chartElement=o,this.categoryAxis=t,this._dateAxis=this.categoryAxis instanceof J.DateCategoryAxis,this.initOptions(),this.options.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())},onPane:function(e){return this.categoryAxis.pane===e},createElements:function(){var e,t,i,n,o,r,s=this.options,a=this.wrapper=B("k-selector");Ke(a,{top:s.offset.top,left:s.offset.left,width:s.width,height:s.height,direction:"ltr"}),e=this.selection=B("k-selection"),this.leftMask=B("k-mask"),this.rightMask=B("k-mask"),a.appendChild(this.leftMask),a.appendChild(this.rightMask),a.appendChild(e),e.appendChild(B("k-selection-bg")),t=this.leftHandle=B("k-handle k-left-handle"),i=this.rightHandle=B("k-handle k-right-handle"),t.appendChild(B()),i.appendChild(B()),e.appendChild(t),e.appendChild(i),this.chartElement.appendChild(a),n=Ke(e,["borderLeftWidth","borderRightWidth","height"]),o=Ke(t,"height").height,r=Ke(i,"height").height,s.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},Ke(t,{top:(n.height-o)/2}),Ke(i,{top:(n.height-r)/2}),a.style.cssText=a.style.cssText},bindEvents:function(){if(this.options.mousewheel!==!1){this._mousewheelHandler=this._mousewheel.bind(this);var e;Qe(this.wrapper,(e={},e[ji]=this._mousewheelHandler,e))}this._domEvents=Xe.DomEventsBuilder.create(this.wrapper,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},initOptions:function(){var e,t,i,n=this,o=n.options,r=n.categoryAxis,s=r.pane.chartsBox(),a=this.chart.chartService.intl;this._dateAxis&&Me(o,{min:Ve(a,o.min),max:Ve(a,o.max),from:Ve(a,o.from),to:Ve(a,o.to)}),e=Ke(this.chartElement,["paddingLeft","paddingTop"]),t=e.paddingLeft,i=e.paddingTop,this.options=Me({},{width:s.width(),height:s.height()+xo,padding:{left:t,top:i},offset:{left:s.x1+t,top:s.y1+i},from:o.min,to:o.max},o)},destroy:function(){if(this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper){if(this._mousewheelHandler){var e;Ze(this.wrapper,(e={},e[ji]=this._mousewheelHandler,e)),this._mousewheelHandler=null}this.chartElement.removeChild(this.wrapper),this.wrapper=null}},_rangeEventArgs:function(e){return{axis:this.categoryAxis.options,from:this._value(e.from),to:this._value(e.to)}},_start:function(e){var t,i=this.options,n=Fe(e);!this._state&&n&&(this.chart._unsetActivePoint(),this._state={moveTarget:L(n)||n,startLocation:e.x?e.x.location:0,range:{from:this._index(i.from),to:this._index(i.to)}},t=this._rangeEventArgs({from:this._index(i.from),to:this._index(i.to)}),this.trigger(Fi,t)&&(this._state=null))},_press:function(e){var t;t=this._state?this._state.moveTarget:L(Fe(e)),t&&J.addClass(t,"k-handle-active")},_move:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_;this._state&&(t=this,i=t._state,n=t.options,o=t.categoryAxis,r=i.range,s=i.moveTarget,a=o.options.reverse,l=this._index(n.from),c=this._index(n.to),d=this._index(n.min),u=this._index(n.max),h=i.startLocation-e.x.location,p={from:r.from,to:r.to},f=r.to-r.from,m=Ke(this.wrapper,"width").width/(o.categoriesCount()-1),g=Math.round(h/m)*(a?-1:1),s&&(v=Ye(s,"k-left-handle"),_=Ye(s,"k-right-handle"),Ye(s,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(d,l-g),u-f),r.to=Math.min(r.from+f,u)):v&&!a||_&&a?(r.from=Math.min(Math.max(d,l-g),u-1),r.to=Math.max(r.from+1,r.to)):(v&&a||_&&!a)&&(r.to=Math.min(Math.max(d+1,c-g),u),r.from=Math.min(r.to-1,r.from)),r.from===p.from&&r.to===p.to||(this.move(r.from,r.to),this.trigger(Pi,this._rangeEventArgs(r)))))},_end:function(){var e,t;this._state&&(e=this._state.moveTarget,e&&J.removeClass(e,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(zi,this._rangeEventArgs(t)),delete this._state)},_tap:function(e){var t=this,i=t.options,n=t.categoryAxis,o=this.chart._eventCoordinates(e),r=n.pointCategoryIndex(new xe(o.x,n.box.y1)),s=this._index(i.from),a=this._index(i.to),l=this._index(i.min),c=this._index(i.max),d=a-s,u=s+d/2,h={},p=3===e.event.which,f=Math.round(u-r);this._state||p||(this.chart._unsetActivePoint(),n.options.justified||f--,h.from=Math.min(Math.max(l,s-f),c-d),h.to=Math.min(h.from+d,c),this._start(e),this._state&&(this._state.range=h,this.trigger(Pi,this._rangeEventArgs(h)),this._end()))},_mousewheel:function(e){var t,i=this,n=J.mousewheelDelta(e);this._start({target:this.selection}),this._state&&(t=this._state.range,e.preventDefault(),e.stopPropagation(),Math.abs(n)>1&&(n*=ko),this.options.mousewheel.reverse&&(n*=-1),this.expand(n)&&this.trigger(Pi,{axis:this.categoryAxis.options,delta:n,originalEvent:e,from:this._value(t.from),to:this._value(t.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},Gi))},_gesturestart:function(e){var t,i=this.options;this._state={range:{from:this._index(i.from),to:this._index(i.to)}},t=this._rangeEventArgs(this._state.range),this.trigger(Fi,t)?this._state=null:e.preventDefault()},_gestureend:function(){this._state&&(this.trigger(zi,this._rangeEventArgs(this._state.range)),delete this._state)},_gesturechange:function(e){var t=this,i=t.chart,n=t._state,o=t.options,r=t.categoryAxis,s=n.range,a=i._toModelCoordinates(e.touches[0].x.location).x,l=i._toModelCoordinates(e.touches[1].x.location).x,c=Math.min(a,l),d=Math.max(a,l);e.preventDefault(),s.from=r.pointCategoryIndex(new xe(c))||o.min,s.to=r.pointCategoryIndex(new xe(d))||o.max,this.move(s.from,s.to),this.trigger(Pi,this._rangeEventArgs(s))},_index:function(e){var t=e;return e instanceof Date&&(t=this.categoryAxis.categoryIndex(e)),t},_value:function(e){var t=e;return this._dateAxis&&(t=this.categoryAxis.categoryAt(e),t>this.options.max&&(t=this.options.max)),t},_slot:function(e){var t=this.categoryAxis,i=this._index(e);return t.getSlot(i,i,!0)},move:function(e,t){var i,n,o=this.options,r=this.categoryAxis.options.reverse,s=o.offset,a=o.padding,l=o.selection.border,c=r?t:e,d=r?e:t,u="x"+(r?2:1),h=this._slot(c),p=je(h[u]-s.left+a.left);Ke(this.leftMask,{width:p}),Ke(this.selection,{left:p}),h=this._slot(d),i=je(o.width-(h[u]-s.left+a.left)),Ke(this.rightMask,{width:i}),n=o.width-i,n!==o.width&&(n+=l.right),Ke(this.rightMask,{left:n}),Ke(this.selection,{width:Math.max(o.width-(p+i)-l.right,0)})},set:function(e,t){var i=this.options,n=this._index(i.min),o=this._index(i.max),r=Ge(this._index(e),n,o),s=Ge(this._index(t),r+1,o);i.visible&&this.move(r,s),i.from=this._value(r),i.to=this._value(s)},expand:function(e){var t=this.options,i=this._index(t.min),n=this._index(t.max),o=t.mousewheel.zoom,r=this._index(t.from),s=this._index(t.to),a={from:r,to:s},l=Me({},a);if(this._state&&(a=this._state.range),o!==fe&&(a.from=Ge(Ge(r-e,0,s-1),i,n)),o!==ce&&(a.to=Ge(Ge(s+e,a.from+1,n),i,n)),a.from!==l.from||a.to!==l.to)return this.set(a.from,a.to),!0},trigger:function(e,t){return(this.observer||this.chart).trigger(e,t)}}),Te(Co,{visible:!0,mousewheel:{zoom:"both"},min:oe,max:ne}),So=Pn.extend({show:function(e){var t,i;!e||!e.tooltipAnchor||this._current&&this._current===e||(t=Me({},this.options,e.options.tooltip),i=e.tooltipAnchor(),i?(this._current=e,Pn.fn.show.call(this,{point:e,anchor:i},t,e)):this.hide())},hide:function(){delete this._current,Pn.fn.hide.call(this)}}),To=Pn.extend({init:function(e,t){Pn.fn.init.call(this,e.chartService,t),this.plotArea=e,this.formatService=e.chartService.format},showAt:function(e,t){var i,n,o,r=$e(e,function(e){var t=e.series.tooltip,i=t&&t.visible===!1;return!i});r.length>0&&(i=r[0],n=this.plotArea.categoryAxis.getSlot(i.categoryIx),o=t?this._slotAnchor(t,n):this._defaultAnchor(i,n),this.show({anchor:o,shared:!0,points:e,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},_slotAnchor:function(e,t){var i=this.plotArea.categoryAxis,n={horizontal:"left",vertical:"center"};return i.options.vertical||(e.x=t.center().x),{point:e,align:n}},_defaultAnchor:function(e,t){var i,n=e.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=n.center(),s=t.center(),a={horizontal:"center",vertical:"center"};return i=o?new xe(r.x,s.y):new xe(s.x,r.y),{point:i,align:a}}}),Te(To,{categoryFormat:"{0:d}"}),Do=it.extend({setup:function(){var e,t,i=this,n=i.element,o=i.options,r=n.bbox();r?(this.origin=o.origin,e=o.vertical?pe:he,t=this.fromScale=new at(1,1),t[e]=St,n.transform(lt().scale(t.x,t.y))):this.abort()},step:function(e){var t=J.interpolateValue(this.fromScale.x,1,e),i=J.interpolateValue(this.fromScale.y,1,e);this.element.transform(lt().scale(t,i,this.origin))},abort:function(){it.fn.abort.call(this),this.element.transform(null)}}),Te(Do,{duration:wt}),nt.current.register(Vt,Do),Ao=it.extend({setup:function(){var e=this.center=this.element.bbox().center();this.element.transform(lt().scale(St,St,e))},step:function(e){this.element.transform(lt().scale(e,e,this.center))}}),Te(Ao,{easing:"easeOutElastic"}),nt.current.register(Ut,Ao),Eo=it.extend({setup:function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},step:function(e){this.element.opacity(e*this.fadeTo)}}),Te(Eo,{duration:200,easing:"linear"}),nt.current.register(yt,Eo),Io=it.extend({setup:function(){this.element.transform(lt().scale(St,St,this.options.center))},step:function(e){this.element.transform(lt().scale(e,e,this.options.center))}}),Te(Io,{easing:"easeOutElastic",duration:wt}),nt.current.register(Zt,Io),Mo=An.extend({render:function(){An.fn.render.call(this),this.renderSegments()},createSegment:function(e,t,i){var n,o=t.style;return new(n=o===Ht?sn:nn)(e,t,i)},animationPoints:function(){var e=An.fn.animationPoints.call(this);return e.concat(this._segments)},createMissingValue:function(e,t){if(t===Ft){var i={x:e.x,y:e.y};return h(i.x)||(i.x=0),h(i.y)||(i.y=0),i}}}),Me(Mo.prototype,an),Ro=Vn.extend({initFields:function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new mn,this.yAxisRangeTracker=new mn},render:function(e){var t,i,n,o,r,s=this;for(void 0===e&&(e=this.panes),t=this.groupSeriesByPane(),i=0;i<e.length;i++)n=e[i],o=t[n.options.name||"default"]||[],s.addToLegend(o),r=s.filterVisibleSeries(o),r&&(s.createScatterChart(b(r,li),n),s.createScatterLineChart(b(r,ci),n),s.createBubbleChart(b(r,Ut),n));this.createAxes(e)},appendChart:function(e,t){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),Vn.fn.appendChart.call(this,e,t)},removeAxis:function(e){var t=e.options.name;Vn.fn.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(t),delete this.namedYAxes[t]):(this.xAxisRangeTracker.reset(t),delete this.namedXAxes[t]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},seriesPaneName:function(e){var t=this.options,i=e.xAxis,n=[].concat(t.xAxis),o=$e(n,function(e){return e.name===i})[0],r=e.yAxis,s=[].concat(t.yAxis),a=$e(s,function(e){return e.name===r})[0],l=t.panes||[{}],c=l[0].name||"default",d=(o||{}).pane||(a||{}).pane||c;return d},createScatterChart:function(e,t){e.length>0&&this.appendChart(new An(this,{series:e,clip:t.options.clip}),t)},createScatterLineChart:function(e,t){e.length>0&&this.appendChart(new Mo(this,{series:e,clip:t.options.clip}),t)},createBubbleChart:function(e,t){e.length>0&&this.appendChart(new In(this,{series:e,clip:t.options.clip}),t)},createXYAxis:function(e,t,i){var n,o,r,s,a,l,c,d,u=e.name,h=t?this.namedYAxes:this.namedXAxes,p=t?this.yAxisRangeTracker:this.xAxisRangeTracker,f=Me({reverse:!t&&this.chartService.rtl},e,{vertical:t}),m=_(f.type,Oi),g=p.query(),v=m?{min:.1,max:1}:{min:0,max:1},b=p.query(u)||g||v,w=[f.min,f.max],y=this.series;for(n=0;n<y.length;n++)if(o=y[n],r=o[t?"yAxis":"xAxis"],r===f.name||0===i&&!r){s=pt.current.bindPoint(o,0).valueFields,w.push(s[t?"y":"x"]);break}for(0===i&&g&&(b.min=Math.min(b.min,g.min),b.max=Math.max(b.max,g.max)),l=0;l<w.length;l++)if(w[l]instanceof Date){a=!0;break}if(c=_(f.type,ge)||!f.type&&a?J.DateValueAxis:m?J.LogarithmicAxis:J.NumericAxis,d=new c(b.min,b.max,f,this.chartService),d.axisIndex=i,u){if(h[u])throw Error((t?"Y":"X")+" axis with name "+u+" is already defined");h[u]=d}return this.appendAxis(d),d},createAxes:function(e){var t,i,n,o,r=this,s=this.options,a=[].concat(s.xAxis),l=[],c=[].concat(s.yAxis),d=[];for(t=0;t<a.length;t++)i=r.findPane(a[t].pane),De(i,e)&&l.push(r.createXYAxis(a[t],!1,t));for(n=0;n<c.length;n++)o=r.findPane(c[n].pane),De(o,e)&&d.push(r.createXYAxis(c[n],!0,n));this.axisX=this.axisX||l[0],this.axisY=this.axisY||d[0]},_dispatchEvent:function(e,t,i){var n,o,r,s,a=e._eventCoordinates(t),l=new xe(a.x,a.y),c=this.axes,d=c.length,u=[],h=[];for(n=0;n<d;n++)o=c[n],r=o.options.vertical?h:u,s=o.getValue(l),null!==s&&r.push(s);u.length>0&&h.length>0&&e.trigger(i,{element:Fe(t),originalEvent:t,x:k(u),y:k(h)})},updateAxisOptions:function(e,t){var i=e.options.vertical,n=this.groupAxes(this.panes),o=(i?n.y:n.x).indexOf(e);H(this.options,o,i,t),H(this.originalOptions,o,i,t)}}),Te(Ro,{xAxis:{},yAxis:{}}),Me(Ro.prototype,Un),Fo=ke.extend({init:function(e,t,i){ke.fn.init.call(this,i),this.value=e,this.sector=t},render:function(){var e,t,i,n,o=this.options.labels,r=this.owner.chartService,s=this.value;this._rendered||this.visible===!1||(this._rendered=!0,e=Pe(o),t=this.pointData(),e?s=e(t):o.format&&(s=r.format.auto(o.format,s)),o.visible&&(s||0===s)&&(o.position===se||o.position===Wi?(o.color||(i=new rt(this.options.color).percBrightness(),o.color=i>180?me:de),o.background||(o.background=this.options.color)):(n=r.theme.seriesDefaults.labels,o.color=o.color||n.color,o.background=o.background||n.background),this.label=new ze(s,Me({},o,{align:se,vAlign:"",animation:{type:yt,delay:this.animationDelay}}),t),this.append(this.label)))},reflow:function(e){this.render(),this.box=e,this.reflowLabel()},reflowLabel:function(){var e,t,i,n,o=this,r=o.options.labels,s=o.label,a=this.sector.clone(),l=r.distance,c=a.middle();s&&(e=s.box.height(),t=s.box.width(),r.position===se?(a.radius=Math.abs((a.radius-e)/2)+e,i=a.point(c),s.reflow(new Ce(i.x,i.y-e/2,i.x,i.y))):r.position===Wi?(a.radius=a.radius-e/2,i=a.point(c),s.reflow(new Ce(i.x,i.y-e/2,i.x,i.y))):(i=a.clone().expand(l).point(c),i.x>=a.center.x?(n=i.x+t,s.orientation=fe):(n=i.x-t,s.orientation=ce),s.reflow(new Ce(n,i.y-e,i.x,i.y))))},createVisual:function(){var e,t,i=this,n=this,o=n.sector,r=n.options;ke.fn.createVisual.call(this),this.value&&(r.visual?(e=(o.startAngle+180)%360,t=r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new at(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:e,endAngle:e+o.angle,options:r,sender:this.getSender(),createVisual:function(){var e=new ot;return i.createSegmentVisual(e),e}}),t&&this.visual.append(t)):this.createSegmentVisual(this.visual))},createSegmentVisual:function(e){var t=this,i=t.sector,n=t.options,o=n.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},s=n.color,a={color:s,opacity:n.opacity},c=this.createSegment(i,Me({fill:a,stroke:{opacity:n.opacity},zIndex:n.zIndex},r));e.append(c),l(n)&&e.append(this.createGradientOverlay(c,{baseColor:s,fallbackFill:a},Me({center:[i.center.x,i.center.y],innerRadius:i.innerRadius,radius:i.radius,userSpace:!0},n.overlay)))},createSegment:function(e,t){return t.singleSegment?new et.Circle(new st.Circle(new at(e.center.x,e.center.y),e.radius),t):J.ShapeBuilder.current.createRing(e,t)},createAnimation:function(){var e=this,t=e.options,i=e.sector.center;Me(t,{animation:{center:[i.x,i.y],delay:this.animationDelay}}),ke.fn.createAnimation.call(this)},createHighlight:function(e){var t=this.options.highlight||{},i=t.border||{};return this.createSegment(this.sector,Me({},e,{fill:{color:t.color,opacity:t.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.radius,innerRadius:e.innerRadius,center:new at(e.center.x,e.center.y),startAngle:e.startAngle,endAngle:e.angle+e.startAngle,visual:this.visual}},tooltipAnchor:function(){var e=this.sector.clone().expand(Ct),t=e.middle(),i=e.point(t);return{point:i,align:N(t+180)}},formatValue:function(e){return this.owner.formatPointValue(this,e)},pointData:function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}}}),Po=je(J.rad(30),ve),zo=je(J.rad(60),ve),Te(Fo,{color:de,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:ie.DEFAULT_FONT,margin:Le(.5),align:ue,zIndex:1,position:qi},animation:{type:Zt},highlight:{visible:!0,border:{width:1}},visible:!0}),Me(Fo.prototype,Ji),Bo={createLegendItem:function(e,t,i){var n,o,r,s,a,l=this.options.legend||{},c=l.labels||{},d=l.inactiveItems||{},u=d.labels||{};i&&i.visibleInLegend!==!1&&(n=i.visible!==!1,o=n?Pe(c):Pe(u)||Pe(c),r=i.category,o&&(r=o({text:r,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:e})),n?(s={},a=t.color):(s={color:u.color,font:u.font},a=(d.markers||{}).color),h(r)&&""!==r&&this.legendItems.push({active:n,pointIndex:i.index,text:r,series:i.series,markerColor:a,labels:s}))}},Lo=70,Ho=ke.extend({init:function(e,t){ke.fn.init.call(this,t),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()},render:function(){this.traverseDataPoints(this.addValue.bind(this))},traverseDataPoints:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,_,b,w,y,k=this,x=this,C=x.options,S=x.plotArea.options.seriesColors;for(void 0===S&&(S=[]),t=S.length,i=C.series,n=i.length,o=0;o<n;o++)for(r=i[o],s=r.data,a=v(r),l=a.total,c=a.points,d=a.count,u=360/l,h=void 0,isFinite(u)||(h=360/d),p=void 0,p=be(r.startAngle)?r.startAngle:C.startAngle,o!==n-1&&r.labels.position===qi&&(r.labels.position=se),f=0;f<c.length;f++)m=c[f],m&&(g=m.fields,_=m.value,b=m.visible,w=0!==_?h||_*u:0,y=1!==s.length&&!!g.explode,Ae(r.color)||(r.color=g.color||S[f%t]),e(m.valueFields.value,new J.Ring(null,0,0,p,w),{owner:k,category:be(g.category)?g.category:"",index:f,series:r,seriesIx:o,dataItem:s[f],percentage:0!==l?_/l:0,explode:y,visibleInLegend:g.visibleInLegend,visible:b,zIndex:n-o,animationDelay:k.animationDelay(f,o,n)}),b!==!1&&(p+=w))},evalSegmentOptions:function(e,t,i){var n=i.series;o(e,{value:t,series:n,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:n._defaults,excluded:["data","content","template","visual","toggle"]})},addValue:function(t,i,n){var o,r=Me({},n.series,{index:n.index});this.evalSegmentOptions(r,t,n),this.createLegendItem(t,r,n),n.visible!==!1&&(o=new Fo(t,i,r),e.extend(o,n),this.append(o),this.points.push(o))},reflow:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k=this,x=k.options,C=k.points,S=k.seriesConfigs;for(void 0===S&&(S=[]),t=C.length,i=e.clone(),n=5,o=Math.min(i.width(),i.height()),r=o/2,s=o-.85*o,a=new Ce(i.x1,i.y1,i.x1+o,i.y1+o),l=a.center(),c=i.center(),d=x.series.length,u=[],h=[],p=Ee(x.padding,s),p=p>r-n?r-n:p,a.translate(c.x-l.x,c.y-l.y),f=r-p,m=new xe(f+a.x1+p,f+a.y1+p),g=0;g<t;g++)v=C[g],_=v.sector,b=v.seriesIx,_.radius=f,_.center=m,S.length&&(w=S[b],_.innerRadius=w.innerRadius,_.radius=w.radius),b===d-1&&v.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),v.reflow(a),y=v.label,y&&y.options.position===qi&&b===d-1&&(y.orientation===fe?h.push(y):u.push(y));u.length>0&&(u.sort(this.labelComparator(!0)),this.leftLabelsReflow(u)),h.length>0&&(h.sort(this.labelComparator(!1)),this.rightLabelsReflow(h)),this.box=a},leftLabelsReflow:function(e){var t=this.distanceBetweenLabels(e);this.distributeLabels(t,e)},rightLabelsReflow:function(e){var t=this.distanceBetweenLabels(e);this.distributeLabels(t,e)},distanceBetweenLabels:function(e){var t,i,n=Re(this.points),o=n.sector,r=e.length-1,s=o.radius+n.options.labels.distance,a=[],l=e[0].box,c=je(l.y1-(o.center.y-s-l.height()-l.height()/2));for(a.push(c),t=0;t<r;t++)i=e[t+1].box,l=e[t].box,c=je(i.y1-l.y2),a.push(c);return c=je(o.center.y+s-e[r].box.y2-e[r].box.height()/2),a.push(c),a},distributeLabels:function(e,t){var i,n,o,r,s=this,a=e.length;for(r=0;r<a;r++)for(o=-e[r],i=n=r;o>0&&(i>=0||n<a);)o=s._takeDistance(e,r,--i,o),o=s._takeDistance(e,r,++n,o);this.reflowLabels(e,t)},_takeDistance:function(e,t,i,n){var o,r=n;return e[i]>0&&(o=Math.min(e[i],r),r-=o,e[i]-=o,e[t]+=o),r},reflowLabels:function(e,t){var i,n,o,r,s=this,a=Re(this.points),l=a.sector,c=a.options.labels,d=t.length,u=c.distance,h=l.center.y-(l.radius+u)-t[0].box.height();for(e[0]+=2,n=0;n<d;n++)o=t[n],r=o.box,h+=e[n],i=s.hAlignLabel(r.x2,l.clone().expand(u),h,h+r.height(),o.orientation===fe),o.orientation===fe?(c.align!==ue&&(i=l.radius+l.center.x+u),o.reflow(new Ce(i+r.width(),h,i,h))):(c.align!==ue&&(i=l.center.x-l.radius-u),o.reflow(new Ce(i-r.width(),h,i,h))),h+=r.height()},createVisual:function(){var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f=this,m=this,g=m.options.connectors,v=m.points,_=v.length,b=4;for(ke.fn.createVisual.call(this),this._connectorLines=[],e=0;e<_;e++)t=v[e],i=t.sector,n=t.label,o=i.middle(),r=(t.options.connectors||{}).color||g.color,n&&(s=new tt({stroke:{color:r,width:g.width},animation:{type:yt,delay:t.animationDelay}}),n.options.position===qi&&(a=n.box,l=i.center,c=i.point(o),d=new xe(a.x1,a.center().y),u=void 0,h=void 0,p=void 0,c=i.clone().expand(g.padding).point(o),s.moveTo(c.x,c.y),n.orientation===fe?(h=new xe(a.x1-g.padding,a.center().y),p=O(l,c,d,h),d=new xe(h.x-b,h.y),p=p||d,p.x=Math.min(p.x,d.x),f.pointInCircle(p,i.center,i.radius+b)||p.x<i.center.x?(u=i.center.x+i.radius+b,t.options.labels.align!==Gt?u<d.x?s.lineTo(u,c.y):s.lineTo(c.x+2*b,c.y):s.lineTo(u,c.y),s.lineTo(d.x,h.y)):(p.y=h.y,s.lineTo(p.x,p.y))):(h=new xe(a.x2+g.padding,a.center().y),p=O(l,c,d,h),d=new xe(h.x+b,h.y),p=p||d,p.x=Math.max(p.x,d.x),f.pointInCircle(p,i.center,i.radius+b)||p.x>i.center.x?(u=i.center.x-i.radius-b,t.options.labels.align!==Gt?u>d.x?s.lineTo(u,c.y):s.lineTo(c.x-2*b,c.y):s.lineTo(u,c.y),s.lineTo(d.x,h.y)):(p.y=h.y,s.lineTo(p.x,p.y))),s.lineTo(h.x,h.y),f._connectorLines.push(s),f.visual.append(s)))},labelComparator:function(e){var t=e?-1:1;return function(e,i){var n=(e.parent.sector.middle()+270)%360,o=(i.parent.sector.middle()+270)%360;return(n-o)*t}},hAlignLabel:function(e,t,i,n,o){var r=t.radius,s=t.center,a=s.x,l=s.y,c=Math.min(Math.abs(l-i),Math.abs(l-n));return c>r?e:a+Math.sqrt(r*r-c*c)*(o?1:-1)},pointInCircle:function(e,t,i){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<Math.pow(i,2)},formatPointValue:function(e,t){return this.chartService.format.auto(t,e.value)},animationDelay:function(e){return e*Lo}}),Te(Ho,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),Me(Ho.prototype,Bo),No=Vn.extend({render:function(){this.createPieChart(this.series)},createPieChart:function(e){var t=e[0],i=new Ho(this,{series:e,padding:t.padding,startAngle:t.startAngle,connectors:t.connectors,legend:this.options.legend});this.appendChart(i)},appendChart:function(e,t){Vn.fn.appendChart.call(this,e,t),Ne(this.options.legend.items,e.legendItems)}}),Oo=Fo.extend({reflowLabel:function(){var e,t,i=this,n=i.options.labels,o=i.label,r=this.sector.clone(),s=r.middle();o&&(e=o.box.height(),n.position===se?(r.radius-=(r.radius-r.innerRadius)/2,t=r.point(s),o.reflow(new Ce(t.x,t.y-e/2,t.x,t.y))):Fo.fn.reflowLabel.call(this))},createSegment:function(e,t){return J.ShapeBuilder.current.createRing(e,t)}}),Te(Oo,{overlay:{gradient:"roundedGlass"},labels:{position:se},animation:{type:Zt}}),Me(Oo.prototype,Ji),Vo=50,Wo=Ho.extend({addValue:function(t,i,n){var o,r=Me({},n.series,{index:n.index});this.evalSegmentOptions(r,t,n),this.createLegendItem(t,r,n),t&&n.visible!==!1&&(o=new Oo(t,i,r),e.extend(o,n),this.append(o),this.points.push(o))},reflow:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p=this,f=this.options,m=e.clone(),g=5,v=Math.min(m.width(),m.height()),_=v/2,b=v-.85*v,w=f.series,y=w.length,k=Ee(f.padding,b);for(k=k>_-g?_-g:k,t=_-k,i=0,o=0;o<y;o++)r=w[o],0===o&&be(r.holeSize)&&(n=r.holeSize,t-=r.holeSize),be(r.size)?t-=r.size:i++,be(r.margin)&&o!==y-1&&(t-=r.margin);for(be(n)||(s=(_-k)/(y+.75),n=.75*s,t-=n),a=n,l=0,this.seriesConfigs=[],u=0;u<y;u++)h=w[u],c=Ee(h.size,t/i),a+=l,d=a+c,p.seriesConfigs.push({innerRadius:a,radius:d}),l=h.margin||0,a=d;Ho.fn.reflow.call(this,e)},animationDelay:function(e,t,i){return e*Vo+wt*(t+1)/(i+1)}}),Te(Wo,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}}),Uo=No.extend({render:function(){this.createDonutChart(this.series)},createDonutChart:function(e){var t=e[0],i=new Wo(this,{series:e,padding:t.padding,connectors:t.connectors,legend:this.options.legend});this.appendChart(i)}}),qo=.15,jo=Vn.extend({initFields:function(){this.valueAxisRangeTracker=new mn},render:function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},alignAxes:function(){var e=this.valueAxis,t=e.range(),i=e.options.reverse?t.max:t.min,n=e.getSlot(i),o=this.polarAxis.getSlot(0).center,r=e.box.translate(o.x-n.x1,o.y-n.y1);e.reflow(r)},createValueAxis:function(){var e,t,i,n,o=this.valueAxisRangeTracker,r=o.query(),s=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});s.type===Oi?(e=J.RadarLogarithmicAxis,t={min:.1,max:1}):(e=J.RadarNumericAxis,t={min:0,max:1}),i=o.query(name)||r||t,i&&r&&(i.min=Math.min(i.min,r.min),i.max=Math.max(i.max,r.max)),n=new e(i.min,i.max,s,this.chartService),this.valueAxis=n,this.appendAxis(n)},reflowAxes:function(){var e,t,i=this,n=i.options.plotArea,o=i.valueAxis,r=i.polarAxis,s=i.box,a=Math.min(s.width(),s.height())*qo,l=Le(n.padding||{},a),c=s.clone().unpad(l),d=c.clone();d.y2=d.y1+Math.min(d.width(),d.height()),d.align(c,pe,se),e=d.clone().shrink(0,d.height()/2),r.reflow(d),o.reflow(e),t=o.lineBox().height()-o.box.height(),o.reflow(o.box.unpad({top:t})),this.axisBox=d,this.alignAxes(d)},backgroundBox:function(){return this.box},detachLabels:function(){}}),Go=An.extend({pointSlot:function(e,t){var i=e.center.y-t.y1,n=xe.onCircle(e.center,e.startAngle,i);return new Ce(n.x,n.y,n.x,n.y)}}),Te(Go,{clip:!1}),$o=Mo.extend({}),$o.prototype.pointSlot=Go.prototype.pointSlot,Te($o,{clip:!1}),Ko=pn.extend({fillToAxes:function(e){var t=this._polarAxisCenter();e.lineTo(t.x,t.y)},_polarAxisCenter:function(){var e=this.parent.plotArea.polarAxis,t=e.box.center();return t},strokeSegments:function(){var e,t,i,n=this._strokeSegments;return n||(e=this._polarAxisCenter(),t=new He((!1)),i=this.points(),i.push(e),n=this._strokeSegments=t.process(i),n.pop()),n}}),Yo=un.extend({fillToAxes:function(e){var t=this.parent.plotArea.polarAxis,i=t.box.center(),n=new st.Segment([i.x,i.y]);e.segments.unshift(n),e.segments.push(n)}}),Qo=$o.extend({createSegment:function(e,t,i){var n,o=(t.line||{}).style;return n=o===Ht?new Ko(e,t,i):new Yo(e,t,i)},createMissingValue:function(e,t){var i;return h(e.x)&&t!==Pt&&(i={x:e.x,y:e.y},t===Ft&&(i.y=0)),i},seriesMissingValues:function(e){return e.missingValues||Ft},_hasMissingValuesGap:function(){var e,t=this,i=this.options.series;for(e=0;e<i.length;e++)if(t.seriesMissingValues(i[e])===zt)return!0},sortPoints:function(e){var t,i,n,o=this;if(e.sort(V),this._hasMissingValuesGap())for(t=0;t<e.length;t++)i=e[t],i&&(n=i.value,h(n.y)||o.seriesMissingValues(i.series)!==zt||delete e[t]);return e}}),Xo=jo.extend({createPolarAxis:function(){var e=new J.PolarAxis(this.options.xAxis,this.chartService);this.polarAxis=e,this.axisX=e,this.appendAxis(e)},valueAxisOptions:function(e){return Me(e,{majorGridLines:{type:_e},minorGridLines:{type:_e}},this.options.yAxis)},createValueAxis:function(){jo.fn.createValueAxis.call(this),this.axisY=this.valueAxis},appendChart:function(e,t){this.valueAxisRangeTracker.update(e.yAxisRanges),Vn.prototype.appendChart.call(this,e,t)},createCharts:function(){var e=this.filterVisibleSeries(this.series),t=this.panes[0];this.createLineChart(b(e,[ei]),t),this.createScatterChart(b(e,[ti]),t),this.createAreaChart(b(e,[Jt]),t)},createLineChart:function(e,t){if(0!==e.length){var i=new $o(this,{series:e});this.appendChart(i,t)}},createScatterChart:function(e,t){if(0!==e.length){var i=new Go(this,{series:e});this.appendChart(i,t)}},createAreaChart:function(e,t){if(0!==e.length){var i=new Qo(this,{series:e});this.appendChart(i,t)}},_dispatchEvent:function(e,t,i){var n=e._eventCoordinates(t),o=new xe(n.x,n.y),r=this.axisX.getValue(o),s=this.axisY.getValue(o);null!==r&&null!==s&&e.trigger(i,{element:Fe(t),x:r,y:s})},createCrosshairs:function(){}}),Te(Xo,{xAxis:{},yAxis:{}}),Me(Xo.prototype,Un),Zo=dn.extend({pointSlot:function(e,t){var i=e.center.y-t.y1,n=xe.onCircle(e.center,e.middle(),i);return new Ce(n.x,n.y,n.x,n.y)},createSegment:function(e,t,i){var n,o,r=t.style;return n=r===Ht?sn:nn,o=new n(e,t,i),e.length===t.data.length&&(o.options.closed=!0),o}}),Te(Zo,{clip:!1,limitPoints:!1}),Jo=pn.extend({fillToAxes:function(){}}),er=un.extend({fillToAxes:function(){}}),tr=Zo.extend({createSegment:function(e,t,i,n){var o,r,s,a=this.options.isStacked,l=(t.line||{}).style;return a&&i>0&&n&&(r=n.linePoints.slice(0),o=n),l===Ht?(s=new Jo(e,t,i,o,r),s.options.closed=!0):(e.push(e[0]),s=new er(e,t,i,o,r)),s},seriesMissingValues:function(e){return e.missingValues||Ft}}),ir=Oo.extend({init:function(e,t){Oo.fn.init.call(this,e,null,t)}}),Te(ir,{overlay:{gradient:"none"},labels:{distance:10}}),nr=ke.extend({init:function(e){ke.fn.init.call(this,e),this.forEach=e.rtl?d:c},reflow:function(e){var t=this,i=t.options,n=t.children,o=i.gap,r=i.spacing,s=n.length,a=s+o+r*(s-1),l=e.angle/a,c=e.startAngle+l*(o/2);this.forEach(n,function(t){var i=e.clone();i.startAngle=c,i.angle=l,t.sector&&(i.radius=t.sector.radius),t.reflow(i),t.sector=i,c+=l+l*r})}}),Te(nr,{gap:1,spacing:0}),or=ke.extend({reflow:function(e){var t,i,n=this,o=n.options.reverse,r=n.children,s=r.length,a=o?s-1:0,l=o?-1:1;for(this.box=new Ce,t=a;t>=0&&t<s;t+=l)i=r[t].sector,i.startAngle=e.startAngle,i.angle=e.angle}}),rr=yn.extend({pointType:function(){return ir},clusterType:function(){return nr},stackType:function(){return or},categorySlot:function(e,t){return e.getSlot(t)},pointSlot:function(e,t){var i=e.clone(),n=e.center.y;return i.radius=n-t.y1,i.innerRadius=n-t.y2,i},reflowPoint:function(e,t){e.sector=t,e.reflow()},createAnimation:function(){this.options.animation.center=this.box.toRect().center(),yn.fn.createAnimation.call(this)}}),rr.prototype.reflow=Zi.prototype.reflow,Te(rr,{clip:!1,limitPoints:!1,animation:{type:"pie"}}),sr=jo.extend({createPolarAxis:function(){var e=new J.RadarCategoryAxis(this.options.categoryAxis,this.chartService);this.polarAxis=e,this.categoryAxis=e,this.appendAxis(e),this.aggregateCategories(),this.createCategoryAxesLabels()},valueAxisOptions:function(e){return this._hasBarCharts&&Me(e,{majorGridLines:{type:_e},minorGridLines:{type:_e}}),this._isStacked100&&Me(e,{roundToMajorUnit:!1,labels:{format:"P0"}}),Me(e,this.options.valueAxis)},aggregateCategories:function(){co.prototype.aggregateCategories.call(this,this.panes);
},createCategoryAxesLabels:function(){co.prototype.createCategoryAxesLabels.call(this,this.panes)},filterSeries:function(e){return e},createCharts:function(){var e=this.filterVisibleSeries(this.series),t=this.panes[0];this.createAreaChart(b(e,[ii]),t),this.createLineChart(b(e,[oi]),t),this.createBarChart(b(e,[ni]),t)},chartOptions:function(e){var t,i,n={series:e},o=e[0];return o&&(t=this.filterVisibleSeries(e),i=o.stack,n.isStacked=i&&t.length>1,n.isStacked100=i&&"100%"===i.type&&t.length>1,n.isStacked100&&(this._isStacked100=!0)),n},createAreaChart:function(e,t){if(0!==e.length){var i=new tr(this,this.chartOptions(e));this.appendChart(i,t)}},createLineChart:function(e,t){if(0!==e.length){var i=new Zo(this,this.chartOptions(e));this.appendChart(i,t)}},createBarChart:function(e,t){var i,n,o;0!==e.length&&(i=e[0],n=this.chartOptions(e),n.gap=i.gap,n.spacing=i.spacing,o=new rr(this,n),this.appendChart(o,t),this._hasBarCharts=!0)},seriesCategoryAxis:function(){return this.categoryAxis},_dispatchEvent:function(e,t,i){var n=e._eventCoordinates(t),o=new xe(n.x,n.y),r=this.categoryAxis.getCategory(o),s=this.valueAxis.getValue(o);null!==r&&null!==s&&e.trigger(i,{element:Fe(t),category:r,value:s})},createCrosshairs:function(){}}),Me(sr.prototype,Un,{appendChart:co.prototype.appendChart,aggregateSeries:co.prototype.aggregateSeries,seriesSourcePoints:co.prototype.seriesSourcePoints}),Te(sr,{categoryAxis:{categories:[]},valueAxis:{}}),ar=ke.extend({init:function(e,t,i){ke.fn.init.call(this,t),this.value=e,this.options.index=i.index},reflow:function(e){var t=this.points,i=this.children[0];this.box=new Ce(t[0].x,t[0].y,t[1].x,t[2].y),i&&i.reflow(new Ce(e.x1,t[0].y,e.x2,t[2].y))},createVisual:function(){var e,t=this,i=this.options;ke.fn.createVisual.call(this),e=i.visual?i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:i,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath(),e&&this.visual.append(e)},createPath:function(){var e=this.options,t=e.border,i=tt.fromPoints(this.points,{fill:{color:e.color,opacity:e.opacity},stroke:{color:t.color,opacity:t.opacity,width:t.width}}).close();return i},createHighlight:function(e){return tt.fromPoints(this.points,e)},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var e=tt.fromPoints(this.points).close();return{options:this.options,path:e}},tooltipAnchor:function(){var e=this.box;return{point:new xe(e.center().x,e.y1),align:{horizontal:"center",vertical:"top"}}},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Te(ar,{color:de,border:{width:1}}),Me(ar.prototype,Ji),lr=ke.extend({init:function(e,t){ke.fn.init.call(this,t),this.plotArea=e,this.points=[],this.labels=[],this.legendItems=[],this.render()},formatPointValue:function(e,t){return this.chartService.format.auto(t,e.value)},render:function(){var e,t,i,n,o,r,s,a,l,c,d,u=this,h=this,p=h.options,f=h.plotArea.options.seriesColors;if(void 0===f&&(f=[]),e=p.series[0],t=e.data)for(i=v(e),n=i.total,o=i.points,r=0;r<o.length;r++)s=o[r],s&&(a=s.fields,Ae(e.color)||(e.color=a.color||f[r%f.length]),a=Me({index:r,owner:u,series:e,dataItem:t[r],percentage:s.value/n},a,{visible:s.visible}),l=s.valueFields.value,c=u.createSegment(l,a),d=u.createLabel(l,a),c&&d&&c.append(d))},evalSegmentOptions:function(e,t,i){var n=i.series;o(e,{value:t,series:n,dataItem:i.dataItem,index:i.index},{defaults:n._defaults,excluded:["data","content","template","toggle","visual"]})},createSegment:function(t,i){var n,o=Me({},i.series);if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),i.visible!==!1)return n=new ar(t,o,i),e.extend(n,i),this.append(n),this.points.push(n),n},createLabel:function(e,t){var i,n,o,r,s=t.series,a=t.dataItem,l=Me({},this.options.labels,s.labels),c=e;if(l.visible)return i=Pe(l),n={dataItem:a,value:e,percentage:t.percentage,category:t.category,series:s},i?c=i(n):l.format&&(c=this.plotArea.chartService.format.auto(l.format,c)),l.color||(o=new rt(s.color).percBrightness(),l.color=o>180?me:de,l.background||(l.background=s.color)),this.evalSegmentOptions(l,e,t),r=new ze(c,Me({vAlign:l.position},l),n),this.labels.push(r),r},labelPadding:function(){var e,t,i,n,o=this.labels,r={left:0,right:0};for(e=0;e<o.length;e++)t=o[e],i=t.options.align,i!==se&&(n=o[e].box.width(),i===ce?r.left=Math.max(r.left,n):r.right=Math.max(r.right,n));return r},dynamicSlopeReflow:function(e,t,i){var n,o,r,s,a,l,c,d,u,h,p,f=this,m=f.options,g=f.points,v=g.length,_=g[0],b=_;for(n=0;n<g.length;n++)g[n].percentage>b.percentage&&(b=g[n]);for(o=_.percentage/b.percentage*t,r=(t-o)/2,s=0,a=0;a<v;a++)l=g[a].percentage,c=g[a+1],d=c?c.percentage:l,u=g[a].points=[],h=m.dynamicHeight?i*l:i/v,p=void 0,p=l?(t-o*(d/l))/2:d?0:t/2,p=Ge(p,0,t),u.push(new at(e.x1+r,e.y1+s)),u.push(new at(e.x1+t-r,e.y1+s)),u.push(new at(e.x1+t-p,e.y1+h+s)),u.push(new at(e.x1+p,e.y1+h+s)),r=p,s+=h+m.segmentSpacing,o=Ge(t-2*p,0,t)},constantSlopeReflow:function(e,t,i){var n,o,r,s,a,l=this,c=l.options,d=l.points,u=d.length,h=c.neckRatio<=1,p=h?c.neckRatio*t:t,f=h?0:(t-t/c.neckRatio)/2,m=h?t:t-2*f,g=(m-p)/2,v=0;for(n=0;n<u;n++)o=d[n].points=[],r=d[n].percentage,s=c.dynamicHeight?g*r:g/u,a=c.dynamicHeight?i*r:i/u,o.push(new at(e.x1+f,e.y1+v)),o.push(new at(e.x1+t-f,e.y1+v)),o.push(new at(e.x1+t-f-s,e.y1+a+v)),o.push(new at(e.x1+f+s,e.y1+a+v)),f+=s,v+=a+c.segmentSpacing},reflow:function(e){var t,i,n,o,r,s=this.points,a=s.length;if(a)for(t=this.options,i=e.clone().unpad(this.labelPadding()),n=i.height()-t.segmentSpacing*(a-1),o=i.width(),t.dynamicSlope?this.dynamicSlopeReflow(i,o,n):this.constantSlopeReflow(i,o,n),r=0;r<a;r++)s[r].reflow(e)}}),Te(lr,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:se,position:se,zIndex:1}}),Me(lr.prototype,Bo),cr=Vn.extend({render:function(){this.createFunnelChart(this.series)},createFunnelChart:function(e){var t=e[0],i=new lr(this,{series:e,legend:this.options.legend,neckRatio:t.neckRatio,dynamicHeight:t.dynamicHeight,dynamicSlope:t.dynamicSlope,segmentSpacing:t.segmentSpacing,highlight:t.highlight});this.appendChart(i)},appendChart:function(e,t){Vn.fn.appendChart.call(this,e,t),Ne(this.options.legend.items,e.legendItems)}}),dr="color",ur="first",hr="from",pr="max",fr="min",mr="noteText",gr="summary",vr="to",yo.current.register(co,[Vt,Gt,Qt,pi,Ot,di,jt,Xt,qt,hi,Wt,ui,ai,si,mi,Yt,ri,fi]),yo.current.register(Ro,[li,ci,Ut]),yo.current.register(No,[Zt]),yo.current.register(Uo,[$t]),yo.current.register(cr,[Kt]),yo.current.register(Xo,[Jt,ei,ti]),yo.current.register(sr,[ii,ni,oi]),pt.current.register([Vt,Gt,Qt,pi,Ot,di],[re],[Vi,dr,mr,Tt,Dt]),pt.current.register([ai,si,ri,fi],[hr,vr],[Vi,dr,mr]),pt.current.register([mi,Yt],[re],[Vi,dr,mr,gr]),pt.current.register([Jt,ei,ti],[he,pe],[dr]),pt.current.register([ii,ni,oi],[re],[dr]),pt.current.register([Kt],[re],[Vi,dr,"visibleInLegend","visible"]),jn.current.register([Vt,Gt,Qt,pi,Ot,di,mi,Yt],{value:pr,color:ur,noteText:ur,errorLow:fr,errorHigh:pr}),jn.current.register([ai,si,ri,fi],{from:fr,to:pr,color:ur,noteText:ur}),jn.current.register([ii,ni,oi],{value:pr,color:ur}),pt.current.register([li,ci,Ut],[he,pe],[dr,mr,At,Et,It,Mt]),pt.current.register([Ut],[he,pe,"size"],[dr,Vi,mr]),pt.current.register([jt,Xt],["open","high","low","close"],[Vi,dr,"downColor",mr]),jn.current.register([jt,Xt],{open:pr,high:pr,low:fr,close:pr,color:ur,downColor:ur,noteText:ur}),pt.current.register([Wt,ui],["lower","q1","median","q3","upper","mean","outliers"],[Vi,dr,mr]),jn.current.register([Wt,ui],{lower:pr,q1:pr,median:pr,q3:pr,upper:pr,mean:pr,outliers:ur,color:ur,noteText:ur}),pt.current.register([qt,hi],["current","target"],[Vi,dr,"visibleInLegend",mr]),jn.current.register([qt,hi],{current:pr,target:pr,color:ur,noteText:ur}),pt.current.register([Zt,$t],[re],[Vi,dr,"explode","visibleInLegend","visible"]),_r=[Vi,re,he,pe],br="mousemove",wr="contextmenu",yr="mouseleave",kr=20,xr=ee.extend({init:function(e,t,i,n){var o,r=this;void 0===n&&(n={}),this.observers=[],this.addObserver(n.observer),this.chartService=new Xe.ChartService(this,n),this.chartService.theme=i,this._initElement(e),o=Me({},this.options,t),this._originalOptions=Me({},o),this._theme=i,this._initTheme(o,i),this._initHandlers(),this._initSurface(),this.bindCategories(),J.FontLoader.preloadFonts(t,function(){r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})},_initElement:function(e){for(this._setElementClass(e),e.style.position="relative";e.firstChild;)e.removeChild(e.firstChild);this.element=e},_setElementClass:function(e){J.addClass(e,"k-chart")},_initTheme:function(t,i){var n,o=[],r=t.series||[];for(n=0;n<r.length;n++)o.push(e.extend({},r[n]));t.series=o,W(t),this.applyDefaults(t,i),null===t.seriesColors&&delete t.seriesColors,this.options=Me({},i,t),this.applySeriesColors()},getSize:function(){var e=this.options.chartArea||{},t=e.width?parseInt(e.width,10):Math.floor(this.element.offsetWidth),i=e.height?parseInt(e.height,10):Math.floor(this.element.offsetHeight);return{width:t,height:i}},resize:function(e){var t=this.getSize(),i=this._size;(e||(t.width>0||t.height>0)&&(!i||t.width!==i.width||t.height!==i.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},_resize:function(){this._noTransitionsRedraw()},redraw:function(e){var t,i;this.applyDefaults(this.options),this.applySeriesColors(),e?(t=this._model._plotArea,i=t.findPane(e),t.redraw(i)):this._redraw()},getAxis:function(e){return t(e,this._plotArea.axes)},findAxisByName:function(e){return this.getAxis(e)},findPaneByName:function(e){var t,i=this._plotArea.panes;for(t=0;t<i.length;t++)if(i[t].options.name===e)return new dt(i[t])},findPaneByIndex:function(e){var t=this._plotArea.panes;if(t[e])return new dt(t[e])},plotArea:function(){return new ut(this._plotArea)},toggleHighlight:function(e,t){var i,n,o,r=this._plotArea,s=(r.srcSeries||r.series||[])[0];Ae(t)?i=r.filterPoints(t):(Ie(t)?(n=t.series,o=t.category):n=o=t,i=s.type===$t?U(r.pointsBySeriesName(n),o):s.type===Zt||s.type===Kt?U((r.charts[0]||{}).points,o):r.pointsBySeriesName(n)),i&&this.togglePointsHighlight(e,i)},togglePointsHighlight:function(e,t){var i,n=this._highlight;for(i=0;i<t.length;i++)n.togglePointHighlight(t[i],e)},showTooltip:function(e){var t,i,n,o=this._sharedTooltip(),r=this,s=r._tooltip,a=r._plotArea;Ae(e)?(t=a.findPoint(e),t&&o&&(i=t.categoryIx)):o&&be(e)&&(i=a.categoryAxis.categoryIndex(e)),o?i>=0&&(n=this._plotArea.pointsByCategoryIndex(i),s.showAt(n)):t&&s.show(t)},hideTooltip:function(){this._tooltip.hide()},_initSurface:function(){var e=this.surface,t=this._surfaceWrap(),i=this.options.chartArea;i.width&&J.elementSize(t,{width:i.width}),i.height&&J.elementSize(t,{height:i.height}),e&&e.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=et.Surface.create(t,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},_surfaceWrap:function(){return this.element},_redraw:function(){var e=this._getModel();this._size={width:e.options.width,height:e.options.height},this._destroyView(),this._model=e,this._plotArea=e._plotArea,e.renderVisual(),this.options.transitions!==!1&&e.traverse(function(e){e.animation&&e.animation.setup()}),this._initSurface(),this.surface.draw(e.visual),this.options.transitions!==!1&&e.traverse(function(e){e.animation&&e.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new uo,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger(Bi),Z(this._plotArea.panes),this._navState||this._cancelDomEvents()},exportVisual:function(e){var t,i,n,o;return e&&(e.width||e.height||e.options)?(i=this.options,n=Me({},e.options,{chartArea:{width:e.width,height:e.height}}),X(this._originalOptions,n),this.options=Me({},this._originalOptions,n),this._initTheme(this.options,this._theme),this.bindCategories(),o=this._getModel(),o.renderVisual(),Z(o._plotArea.panes),t=o.visual,this.options=i):t=this.surface.exportVisual(),t},_sharedTooltip:function(){return this._plotArea instanceof co&&this.options.tooltip.shared},_createPannable:function(){var e=this.options;e.pannable!==!1&&(this._pannable=new ho(this._plotArea,e.pannable))},_createZoomSelection:function(){var e=this.options.zoomable,t=(e||{}).selection;e!==!1&&t!==!1&&(this._zoomSelection=new po(this,t))},_toggleDomDrag:function(){var e,t,i;this.domEvents&&this.domEvents.toggleDrag&&(e=this.options.pannable,t=this.options.zoomable,i=(t||{}).selection,this.domEvents.toggleDrag(e||t!==!1&&i!==!1||this.requiresHandlers([Ei,Di,Ai])?!0:!1))},_createMousewheelZoom:function(){var e=this.options.zoomable,t=(e||{}).mousewheel;e!==!1&&t!==!1&&(this._mousewheelZoom=new fo(this,t))},_toggleDomZoom:function(){var e,t;this.domEvents&&this.domEvents.toggleZoom&&(e=this.options.zoomable,t=(e||{}).mousewheel,this.domEvents.toggleZoom(e!==!1&&t!==!1||this.requiresHandlers([Ii,Mi,Ri])?!0:!1))},_createTooltip:function(){var e,t=this,i=t.options.tooltip;return e=this._sharedTooltip()?this._createSharedTooltip(i):new So(this.chartService,i)},_createSharedTooltip:function(e){return new To(this._plotArea,e)},applyDefaults:function(e,t){q(e,t),j(e,t)},applySeriesColors:function(){var e,t,i,n,o=this.options,r=o.series,s=o.seriesColors||[];for(e=0;e<r.length;e++)t=r[e],i=s[e%s.length],n=t._defaults,t.color=t.color||i,n&&(n.color=n.color||i)},_getModel:function(){var e=this.options,t=this._createPlotArea(),i=new J.RootElement(this._modelOptions());return i.chart=this,i._plotArea=t,J.Title.buildTitle(e.title,i),e.legend.visible&&i.append(new wo(t.options.legend,this.chartService)),i.append(t),i.reflow(),i},_modelOptions:function(){var e=this.options,t=this.getSize();return Me({transitions:e.transitions,width:t.width||ie.DEFAULT_WIDTH,height:t.height||ie.DEFAULT_HEIGHT},e.chartArea)},_createPlotArea:function(e){var t=this.options,i=yo.current.create(e?[]:t.series,t,this.chartService);return i},_setupSelection:function(){var e,t,i,n,o,r=this,s=this,a=s._plotArea.axes,l=this._selections=[];for(e=0;e<a.length;e++)t=a[e],i=t.options,t instanceof Ue&&i.select&&!i.vertical&&(n=t.range(),o=new Co(r,t,Me({min:n.min,max:n.max},i.select)),l.push(o))},_selectStart:function(e){return this.trigger(Fi,e)},_select:function(e){return this.trigger(Pi,e)},_selectEnd:function(e){return this.trigger(zi,e)},_initHandlers:function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=kendo.throttle(this._mousemove.bind(this),kr)},addObserver:function(e){e&&this.observers.push(e)},removeObserver:function(e){var t=this.observers.indexOf(e);t>=0&&this.observers.splice(t,1)},requiresHandlers:function(e){var t,i=this.observers;for(t=0;t<i.length;t++)if(i[t].requiresHandlers(e))return!0},trigger:function(e,t){var i,n,o;for(void 0===t&&(t={}),e===Li&&(t.anchor.point=this._toDocumentCoordinates(t.anchor.point)),t.sender=this,i=this.observers,n=!1,o=0;o<i.length;o++)i[o].trigger(e,t)&&(n=!0);return n},_attachEvents:function(){var e,t,i=this.element;Qe(i,(e={},e[wr]=this._clickHandler,e[ji]=this._mousewheelHandler,e[yr]=this._mouseleaveHandler,e)),this._shouldAttachMouseMove()&&Qe(i,(t={},t[br]=this._mousemove,t)),this.domEvents=Xe.DomEventsBuilder.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDomDrag(),this._toggleDomZoom()},_mouseleave:function(e){this._hoveredPoint&&(this._hoveredPoint.out(this,e),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger(Ti),this._plotArea.hovered=!1)},_cancelDomEvents:function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},_gesturestart:function(e){this._mousewheelZoom&&!this._stopChartHandlers(e)&&(this._gestureDistance=e.distance,this._unsetActivePoint(),this.surface.suspendTracking())},_gestureend:function(e){this._zooming&&!this._stopChartHandlers(e)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Ri,{}))},_gesturechange:function(e){var t,i,n,o,r=this._mousewheelZoom;r&&!this._stopChartHandlers(e)&&(e.preventDefault(),t=this._gestureDistance,i=-e.distance/t+1,Math.abs(i)>=.1&&(i=Math.round(10*i),this._gestureDistance=e.distance,n={delta:i,axisRanges:$(this._plotArea.axes),originalEvent:e},!this._zooming&&this.trigger(Ii,n)||(this._zooming||(this._zooming=!0),o=n.axisRanges=r.updateRanges(i),o&&!this.trigger(Mi,n)&&r.zoom())))},_mouseout:function(e){if(e.element){var t=this._drawingChartElement(e.element,e);t&&t.leave&&t.leave(this,e.originalEvent)}},_start:function(e){var t=this._eventCoordinates(e);!this._stopChartHandlers(e)&&this._plotArea.backgroundContainsPoint(t)&&(this.requiresHandlers([Ei,Di,Ai])&&this._startNavigation(e,t,Ei),this._pannable&&this._pannable.start(e)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(e)&&this.trigger(Ii,{axisRanges:$(this._plotArea.axes),originalEvent:e}))},_move:function(e){var t,i,n,o,r,s,a,l,c=this,d=c._navState,u=c._pannable;if(!this._stopChartHandlers(e)){if(u)t=u.move(e),t&&!this.trigger(Di,{axisRanges:t,originalEvent:e})&&u.pan();else if(d){for(i={},n=d.axes,o=0;o<n.length;o++)r=n[o],s=r.options.name,s&&(a=r.options.vertical?e.y:e.x,l=a.startLocation-a.location,0!==l&&(i[r.options.name]=r.translateRange(l)));d.axisRanges=i,this.trigger(Di,{axisRanges:i,originalEvent:e})}this._zoomSelection&&this._zoomSelection.move(e)}},_end:function(e){var t,i;this._stopChartHandlers(e)||(t=this._pannable,t&&t.end(e)?(this.surface.resumeTracking(),this.trigger(Ai,{axisRanges:$(this._plotArea.axes),originalEvent:e}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(e,Ai),this._zoomSelection&&(i=this._zoomSelection.end(e),i&&!this.trigger(Mi,{axisRanges:i,originalEvent:e})&&(this._zoomSelection.zoom(),this.trigger(Ri,{axisRanges:i,originalEvent:e}))))},_stopChartHandlers:function(e){var t,i,n,o=this._selections||[];if(!o.length)return!1;if(t=this._eventCoordinates(e),i=this._plotArea.paneByPoint(t))for(n=0;n<o.length;n++)if(o[n].onPane(i))return!0},_mousewheel:function(e){var t,i,n,o,r,s,a,l,c,d=this,u=J.mousewheelDelta(e),h=this._mousewheelZoom,p=this._eventCoordinates(e);if(!this._stopChartHandlers(e)&&this._plotArea.backgroundContainsPoint(p))if(h)t={delta:u,axisRanges:$(this._plotArea.axes),originalEvent:e},!this._zooming&&this.trigger(Ii,t)||(e.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),t.axisRanges=h.updateRanges(u),t.axisRanges&&!this.trigger(Mi,t)&&h.zoom(),this._mwTimeout=setTimeout(function(){d.trigger(Ri,t),d._zooming=!1,d.surface&&d.surface.resumeTracking()},Gi));else if(i=this._navState,i||(n=this._startNavigation(e,p,Ii),n||(i=this._navState)),i){for(o=i.totalDelta||u,i.totalDelta=o+u,r=this._navState.axes,s={},a=0;a<r.length;a++)l=r[a],c=l.options.name,c&&(s[c]=l.scaleRange(-o));this.trigger(Mi,{delta:u,axisRanges:s,originalEvent:e}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){d._endNavigation(e,Ri)},Gi)}},_startNavigation:function(e,t,i){var n,o,r=this._model._plotArea,s=r.findPointPane(t),a=r.axes.slice(0);s&&(n=$(a),o=this.trigger(i,{axisRanges:n,originalEvent:e}),o?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:n,pane:s,axes:a}))},_endNavigation:function(e,t){this._navState&&(this.trigger(t,{axisRanges:this._navState.axisRanges,originalEvent:e}),this._suppressHover=!1,this._navState=null)},_getChartElement:function(e,t){var i=this.surface.eventTarget(e);if(i)return this._drawingChartElement(i,e,t)},_drawingChartElement:function(e,t,i){for(var n,o=e;o&&!n;)n=o.chartElement,o=o.parent;if(n)return n.aliasFor&&(n=n.aliasFor(t,this._eventCoordinates(t))),i&&(n=n.closest(i),n&&n.aliasFor&&(n=n.aliasFor())),n},_eventCoordinates:function(e){var t=J.eventCoordinates(e);return this._toModelCoordinates(t.x,t.y)},_elementPadding:function(){var e,t,i;return this._padding||(e=Ke(this.element,["paddingLeft","paddingTop"]),t=e.paddingLeft,i=e.paddingTop,this._padding={top:i,left:t}),this._padding},_toDocumentCoordinates:function(e){var t=this._elementPadding(),i=J.elementOffset(this.element);return{left:je(e.x+t.left+i.left),top:je(e.y+t.top+i.top)}},_toModelCoordinates:function(e,t){var i=this.element,n=J.elementOffset(i),o=this._elementPadding();return new xe(e-n.left-o.left,t-n.top-o.top)},_tap:function(e){var t=this,i=this.surface.eventTarget(e),n=this._drawingChartElement(i,e),o=this._sharedTooltip();this._startHover(i,e)||o||this._unsetActivePoint(),o&&this._trackSharedTooltip(this._eventCoordinates(e),e,!0),this._propagateClick(n,e),this.handlingTap=!0,setTimeout(function(){t.handlingTap=!1},0)},_click:function(e){var t=this._getChartElement(e);this._propagateClick(t,e)},_propagateClick:function(e,t){for(var i=this,n=e;n;)n.click&&n.click(i,t),n=n.parent},_startHover:function(e,t){var i,n,o,r;return!this._suppressHover&&(i=this._drawingChartElement(e,t,function(e){return(e.hover||e.over)&&!(e instanceof Vn)}),n=this._activePoint,o=this._hoveredPoint,o&&o!==i&&(o.out(this,t),this._hoveredPoint=null),i&&o!==i&&i.over&&(this._hoveredPoint=i,i.over(this,t)),i&&n!==i&&i.hover&&(this._activePoint=i,this._sharedTooltip()||i.hover(this,t)||(r=Me({},this.options.tooltip,i.options.tooltip),r.visible&&this._tooltip.show(i),this._highlight.show(i))),i)},_mouseover:function(e){var t,i=this._startHover(e.element,e.originalEvent);i&&i.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),Qe(document,(t={},t[br]=this._mouseMoveTrackHandler,t)))},_mouseMoveTracking:function(e){var t,i,n,o=this,r=o.options,s=o._tooltip,a=o._highlight,l=o._activePoint,c=this._eventCoordinates(e);this._plotArea.box.containsPoint(c)?l&&l.tooltipTracking&&l.series&&l.parent.getNearestPoint&&(t=l.parent.getNearestPoint(c.x,c.y,l.seriesIx),t&&t!==l&&(this._activePoint=t,t.hover(this,e)||(i=Me({},r.tooltip,t.options.tooltip),i.visible&&s.show(t),a.show(t)))):(Ze(document,(n={},n[br]=this._mouseMoveTrackHandler,n)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},_mousemove:function(e){var t,i=this._eventCoordinates(e),n=this._plotArea;this._trackCrosshairs(i),n.hover&&(t=n.backgroundContainsPoint(i),t?(n.hovered=!0,this._plotArea.hover(this,e)):n.hovered&&!t&&(this.trigger(Ti),n.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(i,e)},_trackCrosshairs:function(e){var t,i,n=this._plotArea.crosshairs;for(t=0;t<n.length;t++)i=n[t],i.box.containsPoint(e)?i.showAt(e):i.hide()},_trackSharedTooltip:function(e,t,i){var n,o,r,s,a,l,c,d,u,h;this._suppressHover||(n=this,o=n.options.tooltip,r=n._plotArea,s=n._plotArea.categoryAxis,a=n._tooltip,l=n._highlight,r.backgroundContainsPoint(e)?(c=s.pointCategoryIndex(e),c!==this._tooltipCategoryIx||!this._sharedHighlight&&i?(d=r.pointsByCategoryIndex(c),u=d.map(function(e){return e.eventArgs(t)}),h=u[0]||{},h.categoryPoints=u,d.length>0&&!this.trigger(yi,h)?(o.visible&&a.showAt(d,e),l.show(d),this._sharedHighlight=!0):a.hide(),this._tooltipCategoryIx=c):i&&this._sharedHighlight&&(l.hide(),a.hide(),this._sharedHighlight=!1)):this._sharedHighlight&&(l.hide(),a.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},hideElements:function(){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint()},_unsetActivePoint:function(){var e=this,t=e._tooltip,i=e._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,i&&i.hide()},_deferRedraw:function(){this._redraw()},_clearRedrawTimeout:function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},bindCategories:function(){var e,t,i=this,n=this.options,o=[].concat(n.categoryAxis);for(e=0;e<o.length;e++)t=o[e],t.autoBind!==!1&&i.bindCategoryAxisFromSeries(t,e)},bindCategoryAxisFromSeries:function(e,t){var i,o,r,s,a,l,c,d,u,h,p,f,m=this,g=this.options.series,v=g.length,_=new J.HashMap,b=[],k=!1;for(o=0;o<v;o++)if(r=g[o],s=r.categoryAxis===e.name||!r.categoryAxis&&0===t,a=r.data,l=a.length,c=r.categoryField&&s,k=c||k,c&&l>0)for(i=y(e,n(r.categoryField,a[0])),d=i?w:n,u=0;u<l;u++)h=a[u],p=d(r.categoryField,h,m.chartService.intl),!i&&_.get(p)||(b.push([p,h]),i||_.set(p,!0));b.length>0?(i&&(b=Y(b,function(e,t){return J.dateComparer(e[0],t[0])})),f=Q(b),e.categories=f[0]):k&&(e.categories=[])},_isBindable:function(e){var t,i,n=pt.current.valueFields(e),o=!0;for(t=0;t<n.length;t++)if(i=n[t],i===re?i="field":i+="Field",!be(e[i])){o=!1;break}return o},_noTransitionsRedraw:function(){var e,t=this.options;t.transitions&&(t.transitions=!1,e=!0),this._redraw(),e&&(t.transitions=!0)},_legendItemHover:function(e,t){var i,n=this,o=n._plotArea,r=n._highlight,s=(o.srcSeries||o.series)[e];i=De(s.type,[Zt,$t,Kt])?o.findPoint(function(i){return i.series.index===e&&i.index===t}):o.pointsBySeriesIndex(e),r.show(i)},_shouldAttachMouseMove:function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Si,Ti])},updateMouseMoveHandler:function(){var e,t;Ze(this.element,(e={},e[br]=this._mousemove,e)),this._shouldAttachMouseMove()&&Qe(this.element,(t={},t[br]=this._mousemove,t))},applyOptions:function(e,t){X(this._originalOptions,e),this._originalOptions=Me(this._originalOptions,e),this.options=Me({},this._originalOptions),t&&(this._theme=t,this.chartService.theme=t),this._initTheme(this.options,this._theme)},setOptions:function(e,t){this.applyOptions(e,t),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._toggleDomDrag(),this._toggleDomZoom()},setDirection:function(e){this.chartService.rtl=!!e,this.surface&&"svg"===this.surface.type&&this._destroySurface()},setIntlService:function(e){this.chartService.intl=e},noTransitionsRedraw:function(){this._noTransitionsRedraw()},destroy:function(){var e,t;this._destroyed=!0,Ze(this.element,(e={},e[wr]=this._clickHandler,e[ji]=this._mousewheelHandler,e[br]=this._mousemove,e[yr]=this._mouseleaveHandler,e)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Ze(document,(t={},t[br]=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},_destroySurface:function(){var e=this.surface;e&&(e.unbind("mouseenter",this._surfaceMouseenterHandler),e.unbind("mouseleave",this._surfaceMouseleaveHandler),e.destroy(),this.surface=null)},_destroyView:function(){var e=this,t=e._model,i=e._selections;if(t&&(t.destroy(),this._model=null),i)for(;i.length>0;)i.shift().destroy();this._unsetActivePoint(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)}}),Cr=["data","categories"],Te(xr,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Gt,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}),kendo.deepExtend(kendo.dataviz,{constants:$i,Aggregates:ht,AreaChart:fn,AreaSegment:un,AxisGroupRangeTracker:mn,Bar:_n,BarChart:yn,BarLabel:gn,BoxPlotChart:Tn,BoxPlot:Cn,BubbleChart:In,Bullet:Rn,BulletChart:Fn,CandlestickChart:xn,Candlestick:kn,CategoricalChart:Zi,CategoricalErrorBar:Qi,CategoricalPlotArea:co,Chart:xr,ChartContainer:Ln,ClipAnimation:ln,ClusterLayout:bn,Crosshair:Bn,CrosshairTooltip:zn,DefaultAggregates:jn,DonutChart:Wo,DonutPlotArea:Uo,DonutSegment:Oo,ErrorBarBase:Yi,ErrorRangeCalculator:_t,Highlight:uo,SharedTooltip:To,Legend:wo,LegendItem:go,LegendLayout:mo,LineChart:dn,LinePoint:tn,LineSegment:nn,Pane:Hn,PieAnimation:Io,PieChart:Ho,PieChartMixin:Bo,PiePlotArea:No,PieSegment:Fo,PlotAreaBase:Vn,PlotAreaEventsMixin:Un,PlotAreaFactory:yo,PointEventsMixin:Ji,RangeBar:Gn,RangeBarChart:$n,RangeAreaPoint:Zn,RangeAreaChart:io,ScatterChart:An,ScatterErrorBar:Dn,ScatterLineChart:Mo,Selection:Co,SeriesAggregator:qn,SeriesBinder:pt,SplineSegment:sn,SplineAreaSegment:pn,StackWrap:wn,Tooltip:So,OHLCChart:oo,OHLCPoint:no,WaterfallChart:so,WaterfallSegment:ro,XYPlotArea:Ro,MousewheelZoom:fo,ZoomSelection:po,Pannable:ho,ChartAxis:ct,ChartPane:dt,ChartPlotArea:ut,findAxisByName:t,anyHasZIndex:a,appendIfNotNull:m,areNumbers:u,bindSegments:v,categoriesCount:r,countNumbers:i,equalsIgnoreCase:_,evalOptions:o,filterSeriesByType:b,getDateField:w,getField:n,hasGradientOverlay:l,hasValue:h,isDateAxis:y,segmentVisible:g,singleItemOrArray:k,createOutOfRangePoints:T})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/chart/chart.min",["dataviz/chart/kendo-chart.min","kendo.data.min","kendo.dataviz.core.min","kendo.dataviz.themes.min","kendo.drawing.min","kendo.userevents.min"],e)}(function(){return function(e,t){function i(e){a.fn[e]=function(){var t=this._instance;if(t)return t[e].apply(t,arguments)}}function n(e,i){var n,o,r,s=[],a=e.groupNameTemplate,l=i.length;if(0===l)return r=D({},e),r.visibleInLegend=!1,[r];for(A(a)?(v.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"),a&&(n=B(a))):(n=B(e.name||""),0===n._slotCount&&(n=B(A(e.name)?"#= group.value #: #= series.name #":"#= group.value #"))),o=0;o<l;o++)r=D({},e),v.isFunction(r.color)||(r.color=t),r._groupIx=o,r._groupValue=i[o].value,s.push(r),n&&(r.name=n({series:r,group:i[o]}));return s}function o(e){for(var i in e)e[i]===t&&(e[i]="");return e}function r(e){for(var t=0;t<e.length;t++)e[t].notifyRender()}var s,a,l,c,d,u,h,p,f,m,g=".kendoChart",v=window.kendo,_=v.Class,b=v._outerWidth,w=v._outerHeight,y=v.dataviz,k=y.constants,x=y.Chart,C=y.SeriesBinder,S=v.ui.Widget,T=v.data.DataSource,D=v.deepExtend,A=y.defined,E=y.getField,I=y.InstanceObserver,M=y.inArray,R=y.services,F=e.proxy,P=e.isArray,z=e.extend,B=v.template,L="mouseleave"+g,H=k.AXIS_LABEL_CLICK,N=k.LEGEND_ITEM_CLICK,O=k.LEGEND_ITEM_HOVER,V=k.LEGEND_ITEM_LEAVE,W=k.SERIES_CLICK,U=k.SERIES_HOVER,q=k.SERIES_OVER,j=k.SERIES_LEAVE,G=k.PANE_RENDER,$=k.PLOT_AREA_CLICK,K=k.PLOT_AREA_HOVER,Y=k.PLOT_AREA_LEAVE,Q=k.DRAG,X=k.DRAG_END,Z=k.DRAG_START,J=k.ZOOM_START,ee=k.ZOOM,te=k.ZOOM_END,ie=k.SELECT_START,ne=k.SELECT,oe=k.SELECT_END,re=k.RENDER,se=k.NOTE_CLICK,ae=k.NOTE_HOVER,le=k.NOTE_LEAVE,ce="change",de="dataBound",ue="leave",he=k.VALUE,pe=k.PIE,fe=k.DONUT,me=k.FUNNEL,ge=v.Observable,ve=150,_e=100,be="k-chart-tooltip-inverse",we="k-chart-shared-tooltip",ye="rtl";for(R.DomEventsBuilder.register({create:function(e,t){return new v.UserEvents(e,D({global:!0,multiTouch:!0,fastTap:!0},t))}}),s=I.extend({handlerMap:{showTooltip:"_showTooltip",hideTooltip:"_hideTooltip",legendItemClick:"_onLegendItemClick",render:"_onRender",init:"_onInit"}}),a=S.extend({init:function(e,t){var i;v.destroy(e),S.fn.init.call(this,e),t&&(i=t.dataSource,delete t.dataSource),this.options=D({},this.options,t),this.wrapper=this.element,this._attachEvents(),t&&(t.dataSource=i),this._seriesVisibility=new d,this.bind(this.events,this.options),this._initDataSource(t),v.notify(this,y.ui);
},events:[de,W,U,q,j,H,N,O,V,G,$,K,Y,Z,Q,X,J,ee,te,ie,ne,oe,se,ae,le,re],options:{name:"Chart",renderAs:"",theme:"default",axisDefaults:{},chartArea:{},legend:{},categoryAxis:{},autoBind:!0,seriesDefaults:{},series:[],seriesColors:null,tooltip:{},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1},items:function(){return e()},refresh:function(){var e=this,t=e._instance;t.applyDefaults(e.options),t.applySeriesColors(),e._bindSeries(),e._bindCategories(),e.trigger(de),e._redraw()},getSize:function(){return v.dimensions(this.element)},redraw:function(e){this._size=null,this._instance.redraw(e)},setOptions:function(e){var t=this,i=e.dataSource;delete e.dataSource,S.fn._setEvents.call(t,e),this._instance.applyOptions(e,this._getThemeOptions(e)),this.options=this._instance.options,this._tooltip.setOptions(this.options.tooltip),this._seriesVisibility.setOptions(this.options),this._sourceSeries=null,i&&t.setDataSource(i),t._hasDataSource?t._onDataChanged():(t._bindCategories(),t.redraw()),t._instance.updateMouseMoveHandler()},setDataSource:function(e){var t=this;t.dataSource.unbind(ce,t._dataChangeHandler),t.dataSource=e=T.create(e),t._hasDataSource=!0,t._hasData=!1,e.bind(ce,t._dataChangeHandler),t.options.autoBind&&e.fetch()},destroy:function(){var e=this,t=e.dataSource;e.element.off(g),t&&t.unbind(ce,e._dataChangeHandler),e._instance&&(e._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),this._destroyCrosshairTooltips(),S.fn.destroy.call(e)},findPaneByName:function(e){var t,i=this._plotArea.panes;for(t=0;t<i.length;t++)if(i[t].options.name===e)return new f(this,i[t])},findPaneByIndex:function(e){var t=this._plotArea.panes;if(t[e])return new f(this,t[e])},findSeries:function(e){var t,i=this._plotArea,n=i.srcSeries||i.series;for(t=0;t<n.length;t++)if(e(n[t]))return new m(this,n[t])},findSeriesByName:function(e){return this._createSeries({name:e})},findSeriesByIndex:function(e){return this._createSeries({index:e})},exportVisual:function(e){var t,i,n,o,s=this._instance;if(s)return e&&(e.width||e.height)?(i=s.options.chartArea,n=s._originalOptions.chartArea,D(i,e),o=s._getModel(),i.width=n.width,i.height=n.height,o.renderVisual(),r(o._plotArea.panes),t=o.visual):t=s.exportVisual(),t},_createSeries:function(e){var t=this._seriesOptions(e);if(t)return new m(this,t)},_seriesOptions:function(e){var t,i,n=this._plotArea,o=n.srcSeries||n.series;if(A(e.index))t=o[e.index];else if(A(e.name))for(i=0;i<o.length;i++)if(o[i].name===e.name){t=o[i];break}return t},_attachEvents:function(){this.element.on(L,F(this._mouseleave,this))},_mouseleave:function(t){var i=this._instance,n=this._tooltip,o=t.relatedTarget;o&&e(o).closest(n.element).length||!i||i.handlingTap||i.hideElements()},_getThemeOptions:function(e){var i,n,o=(e||{}).theme;return"sass"===o||"default-v2"===o||"bootstrap-v4"===o?y.autoTheme().chart:A(o)?(i=y.ui.themes||{},n=i[o]||i[o.toLowerCase()]||{},n.chart||{}):t},_initChart:function(){this._createChart(this.options,this._getThemeOptions(this.options)),this.options=this._instance.options,this._seriesVisibility.setOptions(this.options)},_createChart:function(e,t){this._instance=new x(this.element[0],e,t,{observer:new s(this),sender:this,rtl:this._isRtl()})},_onInit:function(e){this._instance=e.sender},_initDataSource:function(e){var t=this,i=(e||{}).dataSource;t._dataChangeHandler=F(t._onDataChanged,t),t.dataSource=T.create(i).bind("change",t._dataChangeHandler),t._bindCategories(),i&&(t._hasDataSource=!0),this._initChart(),this._initTooltip(),i&&t.options.autoBind&&t.dataSource.fetch()},_destroyCrosshairTooltips:function(){var e,t=this._crosshairTooltips;if(t)for(e in t)t[e].destroy();this._crosshairTooltips={}},_getCrosshairTooltip:function(e,t){var i=this._crosshairTooltips=this._crosshairTooltips||{},n=e+t,o=i[n];return o||(o=i[n]=new p(this.element)),o},_showTooltip:function(e){if(e.crosshair){var t=this._getCrosshairTooltip(e.axisName,e.axisIndex);t.show(e)}else this._tooltip&&this._tooltip.show(e)},_hideTooltip:function(e){if(e.crosshair){var t=this._getCrosshairTooltip(e.axisName,e.axisIndex);t.hide()}else this._tooltip&&this._tooltip.hide(e)},_onRender:function(e){this._destroyCrosshairTooltips(),this._copyMembers(e.sender),this._hasDataSource&&!this._hasData&&this.options.autoBind||this.trigger(re)},_copyMembers:function(e){this.options=e.options,this._originalOptions=e._originalOptions,this.surface=e.surface,this._plotArea=e._plotArea,this._model=e._model,this._highlight=e._highlight,this._selections=e._selections,this._pannable=e._pannable,this._zoomSelection=e._zoomSelection,this._mousewheelZoom=e._mousewheelZoom},requiresHandlers:function(e){var t,i=this._events;for(t=0;t<e.length;t++)if(A(i[e[t]]))return!0},_initTooltip:function(){this._tooltip=this._createTooltip(),this._tooltip.bind(ue,F(this._tooltipleave,this))},_onLegendItemClick:function(e){this.trigger(N,e)||this._legendItemClick(e.seriesIndex,e.pointIndex)},_legendItemClick:function(t,i){var n,o,r,s=this._instance,a=s._plotArea,l=(a.srcSeries||a.series)[t];e.inArray(l.type,[pe,fe,me])>=0?(n=l.data[i],n&&A(n.visible)?n.visible=!n.visible:(o=l.pointVisibility=l.pointVisibility||{},r=o[i],o[i]=!!A(r)&&!r)):(l.visible=!l.visible,this._seriesVisibility.save(l)),s._noTransitionsRedraw()},_createTooltip:function(){return new h(this.element,z({},this.options.tooltip,{rtl:this._isRtl()}))},_tooltipleave:function(){this._instance&&this._instance.hideElements()},_bindData:function(e){var t,i,o,r=this,s=r.options,a=r._sourceSeries||s.series,l=a.length,c=r.dataSource.view(),d=(r.dataSource.group()||[]).length>0,u=[],h=this._seriesVisibility;for(h.read(),t=0;t<l;t++)i=a[t],r._isBindable(i)&&d?(o=n(i,c),u=u.concat(o),h.applyByGroup(o,e)):(i=z({},i),u.push(i),h.applyByIndex(i,e));r._sourceSeries=a,s.series=u,this._instance.applySeriesColors(),r._bindSeries(),r._bindCategories(),this._hasData=!0},_onDataChanged:function(e){this._bindData(e),this.trigger(de),this._redraw()},_bindSeries:function(){var e,t,i,n,o=this,r=o.dataSource.view(),s=o.options.series,a=s.length;for(e=0;e<a;e++)t=s[e],o._isBindable(t)&&(i=t._groupIx,n=A(i)?(r[i]||{}).items:r,t.autoBind!==!1&&(t.data=n))},_bindCategories:function(){var e,t,i=this,n=i.dataSource.view()||[],o=(i.dataSource.group()||[]).length>0,r=n,s=i.options,a=[].concat(s.categoryAxis);for(o&&n.length&&(r=n[0].items),e=0;e<a.length;e++)t=a[e],t.autoBind!==!1&&i._bindCategoryAxis(t,r,e)},_bindCategoryAxis:function(e,t,i){var n,o,r,s=(t||[]).length;if(e.field)for(e.categories=[],n=0;n<s;n++)r=t[n],o=E(e.field,r),0===n?(e.categories=[o],e.dataItems=[r]):(e.categories.push(o),e.dataItems.push(r));else this._instance&&this._instance.bindCategoryAxisFromSeries(e,i)},_isBindable:function(e){var t,i,n=C.current.valueFields(e),o=!0;for(i=0;i<n.length;i++)if(t=n[i],t===he?t="field":t+="Field",!A(e[t])){o=!1;break}return o},_isRtl:function(){return v.support.isRtl(this.element)&&this.element.css("direction")===ye}}),l=["getAxis","findAxisByName","plotArea","toggleHighlight","showTooltip","hideTooltip","_resize","_redraw","_noTransitionsRedraw","_legendItemHover","_eventCoordinates"],c=0;c<l.length;c++)i(l[c]);y.ExportMixin.extend(a.fn),v.PDFMixin&&v.PDFMixin.extend(a.fn),y.ui.plugin(a),d=_.extend({init:function(){this.groups={},this.index={},this.options={}},applyByGroup:function(e,t){if(t&&t.action||this.options.persistSeriesVisibility)for(var i=0;i<e.length;i++)this.groups[e[i]._groupValue]===!1&&(e[i].visible=!1);else this.groups={}},applyByIndex:function(e,t){t&&t.action||this.options.persistSeriesVisibility?this.index[e.index]===!1&&(e.visible=!1):this.index={}},save:function(e){e&&(this.options.persistSeriesVisibility?this.options.series[e.index].visible=e.visible:this.saveState(e))},setOptions:function(e){this.options=e,this.groups={},this.index={}},read:function(){var e,t,i=this.options;if(i.persistSeriesVisibility)for(e=i.series,t=0;t<e.length;t++)this.saveState(e[t])},saveState:function(e){A(e._groupValue)?this.groups[e._groupValue]=e.visible:this.index[e.index]=e.visible}}),u=v.geometry,h=ge.extend({init:function(t,i){var n,o=this;ge.fn.init.call(o),this.setOptions(i),o.chartElement=t,o.template=h.template,o.template||(o.template=h.template=v.template("<div class='k-tooltip k-chart-tooltip#= d.rtl ? \" k-rtl\" : \"\"#' style='display:none; position: absolute; font: #= d.font #;#if (d.border) {# border: #= d.border.width #px solid; #}#opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>",{useWithBlock:!1,paramName:"d"})),o.element=e(o.template(o.options)),o.move=F(o.move,o),o._mouseleave=F(o._mouseleave,o),n=v.format("[{0}='content'],[{0}='scroller']",v.attr("role")),o._mobileScroller=t.closest(n).data("kendoMobileScroller")},destroy:function(){this._clearShowTimeout(),this.element&&(this.element.off(L).remove(),this.element=null)},setOptions:function(e){this.options=D({},this.options,e)},options:{opacity:1,animation:{duration:ve},sharedTemplate:"<table><th colspan='#= colspan #'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(colorMarker) { # <td><span class='k-chart-shared-tooltip-marker' style='background-color:#:point.series.color#'></span></td># } ## if(nameColumn) { # <td> #if (point.series.name) {# #: point.series.name #: #} else {# &nbsp; #}#</td># } #<td>#= content(point) #</td></tr># } #</table>",categoryFormat:"{0:d}"},move:function(){var e,t=this,i=t.options,n=t.element;t.anchor&&t.element&&(e=t._offset(),t.visible||n.css({top:e.top,left:e.left}),t.visible=!0,t._ensureElement(document.body),n.stop(!0,!0).show().animate({left:e.left,top:e.top},i.animation.duration))},_clearShowTimeout:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},getAnchor:function(e){var t=this.anchor,i=t.point,n=t.align,o=i.left,r=i.top;return"center"===n.horizontal?o-=e.width/2:"right"===n.horizontal&&(o-=e.width),"center"===n.vertical?r-=e.height/2:"bottom"===n.vertical&&(r-=e.height),{x:o,y:r}},_offset:function(){var t,i,n=this,o=n._measure(),r=n.getAnchor(o),s=r.y,a=r.x,l=v.support.zoomLevel(),c=e(window),d=window.pageYOffset||document.documentElement.scrollTop||0,h=window.pageXOffset||document.documentElement.scrollLeft||0,p=(this._mobileScroller||{}).movable;return p&&1!==p.scale?(t=u.transform().scale(p.scale,p.scale,[p.x,p.y]),i=new u.Point(a,s).transform(t),a=i.x,s=i.y):(s+=n._fit(s-d,o.height,w(c)/l),a+=n._fit(a-h,o.width,b(c)/l)),{top:s,left:a}},show:function(e){this.anchor=e.anchor,this.element.css(o(e.style)),this.element.toggleClass(be,!!e.className),this.element.toggleClass(we,!!e.shared);var t=e.shared?this._sharedContent(e):this._pointContent(e.point);this.element.html(t),this._clearShowTimeout(),this.showTimeout=setTimeout(this.move,_e)},hide:function(){var e=this;clearTimeout(e.showTimeout),e._hideElement(),e.visible&&(e.point=null,e.visible=!1,e.index=null)},_sharedContent:function(e){var t,i,n=e.points,o=y.grep(n,function(e){return A(e.series.name)}).length,r=e.series.length>1,s=1;return o&&s++,r&&s++,t=v.template(this.options.sharedTemplate),i=t({points:n,category:e.category,categoryText:e.categoryText,content:this._pointContent,colorMarker:r,nameColumn:o,colspan:s})},_measure:function(){this._ensureElement();var e={width:b(this.element),height:w(this.element)};return e},_ensureElement:function(){this.element&&this.element.appendTo(document.body).on(L,this._mouseleave)},_mouseleave:function(t){var i=t.relatedTarget,n=this.chartElement[0];i&&i!==n&&!e.contains(n,i)&&this.trigger(ue)},_hideElement:function(){var e=this,t=this.element;t&&t.fadeOut({always:function(){e.visible||t.off(L).remove()}})},_pointContent:function(e){var t,i,n=this,o=D({},n.options,e.options.tooltip);return A(e.value)&&(t=""+e.value),o.template?(i=B(o.template),t=i({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},_fit:function(e,t,i){var n=0;return e+t>i&&(n=i-(e+t)),e<0&&(n=-e),n}}),p=h.extend({init:function(e,t){h.fn.init.call(this,e,t),this.element.addClass("k-chart-crosshair-tooltip")},show:function(e){var t=this.element;t&&(this.anchor=e.anchor,this.element.css(e.style),this.element.html(this.content(e)),this.move())},move:function(){var e=this,t=e.element,i=e._offset();e._ensureElement(),t.css({top:i.top,left:i.left}).show()},content:function(e){var t=e.value,i=e.crosshair.options.tooltip;return i.template&&(t=B(i.template)({value:t})),t},hide:function(){this.element.hide()}}),f=_.extend({init:function(e,t){this._chart=e,this._pane=t,this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this.name=t.options.name},series:function(){var e,t=this._chart,i=t._plotArea.groupSeriesByPane(),n=i[this.name||"default"],o=[];if(n)for(e=0;e<n.length;e++)o.push(new m(t,n[e]));return o}}),m=_.extend({init:function(e,t){this._chart=e,this._options=t},points:function(e){var t,i,n=this._points;return n||(t=this._seriesOptions(),i=this._chart._plotArea,this._points=n=i.pointsBySeriesIndex(t.index)),v.isFunction(e)&&(n=this._filterPoints(n,e)),n},data:function(e){var t,i,n,o,r=this._seriesOptions();return e&&(t=this._chart,i=t._plotArea,r.data=e,r.categoryField&&(n=i.seriesCategoryAxis(r),o=[].concat(t.options.categoryAxis),t._instance.bindCategoryAxisFromSeries(o[n.axisIndex],n.axisIndex)),t._noTransitionsRedraw(),this._clearFields()),r.data},findPoint:function(e){var t,i=this.points();for(t=0;t<i.length;t++)if(e(i[t]))return i[t]},toggleHighlight:function(e,t){t=t?v.isFunction(t)?this.points(t):P(t)?t:[t]:this.points(),this._chart._instance.togglePointsHighlight(e,t)},toggleVisibility:function(e,t){var i,n,o=this._chart,r=this._seriesOptions(),s=v.isFunction(t);if(s)if(M(r.type,[pe,fe,me]))for(i=this._filterData(t),n=0;n<i.length;n++)i[n].visible=e;else r.visible=function(i){return!t(i.dataItem)||e};else r.visible=e,o._seriesVisibility.save(r);o._noTransitionsRedraw(),this._clearFields()},_filterData:function(e){var t,i=this._seriesOptions().data,n=i.length,o=[];for(t=0;t<n;t++)e(i[t])&&o.push(i[t]);return o},_filterPoints:function(e,t){var i,n=[],o=e.length;for(i=0;i<o;i++)t(e[i])&&n.push(e[i]);return n},_seriesOptions:function(){var e=this._series;return e||(e=this._series=this._chart._seriesOptions(this._options)),e},_clearFields:function(){delete this._points,delete this._series}}),y.Tooltip=h,y.CrosshairTooltip=p,y.ChartInstanceObserver=s,y.ChartPane=f,y.ChartSeries=m}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.chart.min",["dataviz/chart/kendo-chart.min","dataviz/chart/chart.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/gauge/kendo-gauges.min",["kendo.core.min","kendo.color.min","kendo.drawing.min","kendo.dataviz.core.min"],e)}(function(){!function(e){function t(e,t){var i=e.getOrigin(),n=e.getSize(),o=d(t);return e.setOrigin([i.x-o.left,i.y-o.top]),e.setSize([n.width+(o.left+o.right),n.height+(o.top+o.bottom)]),e}function i(e,i){var n=e.box,o=e.children[0].box,r=i.border||{},s=i.background||"",a=K.fromRect(new I([n.x1,n.y1],[n.width(),n.height()]),{stroke:{}}),l=new Y(e.text,new M(o.x1,o.y1),{font:i.font,fill:{color:i.color}}),c=t(l.bbox().clone(),i.padding),d=K.fromRect(c,{stroke:{color:r.width?r.color:"",width:r.width,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:s}}),u=new $;return u.append(a),u.append(d),u.append(l),u}function n(e,t,i){var n=u(e.from)?e.from:h.MIN_VALUE,o=u(e.to)?e.to:h.MAX_VALUE;return e.from=Math.max(Math.min(o,n),t),e.to=Math.min(Math.max(o,n),i),e}function o(e,i){var n=d(i);return n.left=-n.left,n.top=-n.top,n.right=-n.right,n.bottom=-n.bottom,t(e,n)}function r(e,t){var i,n,o,r=e.position,s=e.tickX,a=e.tickY;return e.vertical?(i=new ie(s,r),n=new ie(s+t.size,r)):(i=new ie(r,a),n=new ie(r,a+t.size)),o=new ee({stroke:{color:t.color,width:t.width}}).moveTo(i).lineTo(n)}function s(e,t,i,n){var o,s,a,l=t.length;if(n.visible)for(o=i.mirror,s=i.lineBox,a=n.skip;a<l;a+=n.step)a%n.skipUnit!==0&&(i.tickX=o?s.x2:s.x2-n.size,i.tickY=o?s.y1-n.size:s.y1,i.position=t[a],e.append(r(i,n)))}function a(e,t,i,n){var o,r,s,a=new ye,l=e.center,c=e.getRadiusX();if(n.visible)for(o=0;o<t.length;o++)r=e.pointAt(t[o]),s=new M(l.x+c-n.size,l.y).rotate(t[o],l),a.append(new we({stroke:{color:n.color,width:n.width}}).moveTo(r).lineTo(s));return a}function l(e,t,i,n){return{from:e,to:t,color:i,opacity:n}}var c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G,$,K,Y,Q,X,Z,J,ee,te,ie,ne,oe,re,se,ae,le,ce,de,ue,he,pe,fe,me,ge,ve,_e,be,we,ye,ke,xe,Ce,Se,Te,De,Ae,Ee,Ie,Me,Re,Fe,Pe,ze;window.kendo.dataviz=window.kendo.dataviz||{},c=kendo.dataviz,d=c.getSpacing,u=c.defined,h=c.constants,p=h.BLACK,f=h.COORD_PRECISION,m=c.services,g=c.deepExtend,v=c.isArray,_=c.setDefaultOptions,b=c.NumericAxis,w=c.limitValue,y=c.Box,k=c.interpolateValue,x=c.round,C=kendo.drawing,S=C.Group,T=C.Path,D=C.Animation,A=C.AnimationFactory,E=kendo.geometry,I=E.Rect,M=E.Point,R=E.transform,F=150,P=250,z="arrow",B="arrowPointer",L="barPointer",H=200,N=.5,O=200,V=Math.PI/180,W="inside",U="linear",q="outside",j="radialPointer",G="radialRangePointer",$=S,K=T,Y=C.Text,Q=5,X=T,Z=C.Surface,J=c.Class.extend({init:function(e,t,i,n){void 0===n&&(n={}),this.element=e,this.theme=i,this.contextService=new m.ChartService(this,n),this._originalOptions=g({},this.options,t),this.options=g({},this._originalOptions),this._initTheme(i),this.redraw()},destroy:function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},value:function(e){var t=this.pointers[0];return 0===arguments.length?t.value():(t.value(e),void this._setValueOptions(e))},_draw:function(){var e=this.surface;e.clear(),e.draw(this._visuals)},exportVisual:function(){return this._visuals},allValues:function(e){var t,i,n=this.pointers,o=[];if(0===arguments.length){for(t=0;t<n.length;t++)o.push(n[t].value());return o}if(v(e))for(i=0;i<e.length;i++)c.isNumber(e[i])&&n[i].value(e[i]);this._setValueOptions(e)},_setValueOptions:function(e){var t,i=[].concat(this.options.pointer),n=[].concat(e);for(t=0;t<n.length;t++)i[t].value=n[t]},resize:function(){this.noTransitionsRedraw()},noTransitionsRedraw:function(){var e=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(e)},redraw:function(){var e,t=this._surfaceSize(),i=new I([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),e=o(i.bbox(),this._gaugeAreaMargin),this.reflow(e)},setOptions:function(e,t){this._originalOptions=g(this._originalOptions,e),this.options=g({},this._originalOptions),this._initTheme(t),this.redraw()},setDirection:function(e){this.contextService.rtl=!!e,this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},setIntlService:function(e){this.contextService.intl=e},_initTheme:function(e){var t,i,n,o,r=e||this.theme||{};if(this.theme=r,this.options=g({},r,this.options),t=this.options,i=t.pointer,v(i)){for(n=[],o=0;o<i.length;o++)n.push(g({},r.pointer,i[o]));t.pointer=n}},_createGaugeArea:function(){var e,t=this.options.gaugeArea,i=this.surface.size(),n=t.border||{},r=new I([0,0],[i.width,i.height]);return this._gaugeAreaMargin=t.margin||Q,n.width>0&&(r=o(r,n.width)),e=X.fromRect(r,{stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},_initSurface:function(){var e=this,t=e.options,i=e.surface,n=this._surfaceElement(),o=this._surfaceSize();c.elementSize(n,o),i&&i.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(i&&i.destroy(),this.surface=Z.create(n,{type:t.renderAs}))},_surfaceSize:function(){var e=this.options,t=this._getSize();return e.gaugeArea&&g(t,e.gaugeArea),t},_surfaceElement:function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},getSize:function(){return this._getSize()},_getSize:function(){var e=this.element,t=this._defaultSize(),i=e.offsetWidth,n=e.offsetHeight;return i||(i=t.width),n||(n=t.height),{width:i,height:n}},_defaultSize:function(){return{width:O,height:H}},_toggleTransitions:function(e){var t,i=this;for(this.options.transitions=e,t=0;t<this.pointers.length;t++)i.pointers[t].options.animation.transitions=e}}),_(J,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}}),ee=T,te=S,ie=M,ne=b.extend({init:function(t,i){var n=t||{};!u(n.reverse)&&n.vertical===!1&&(i||{}).rtl&&(n=e.extend({},n,{reverse:!0})),b.fn.init.call(this,0,1,n,i),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10},initUserOptions:function(e){var t=g({},this.options,e);return t=g({},t,{labels:{mirror:t.mirror}}),t.majorUnit=t.majorUnit||c.autoMajorUnit(t.min,t.max),t},initFields:function(){},render:function(){var e=this.elements=new te,t=this.renderLabels(),i=this.renderLine(),n=this.renderTicks(),o=this.renderRanges();return e.append(i,t,n,o),e},renderRanges:function(){var e,t,i,o,r,s=this,a=this.options,l=a.min,c=a.max,d=a.vertical,u=a.labels.mirror,h=a.ranges||[],p=new te,f=h.length,m=a.rangeSize||a.minorTicks.size/2;for(e=0;e<f;e++)t=n(h[e],l,c),i=s.getSlot(t.from,t.to),o=d?s.lineBox():i,r=d?i:s.lineBox(),d?o.x1-=m*(u?-1:1):r.y2+=m*(u?-1:1),p.append(ee.fromRect(new I([o.x1,r.y1],[o.x2-o.x1,r.y2-r.y1]),{fill:{color:t.color,opacity:t.opacity},stroke:{}}));return p},renderLabels:function(){var e,t=this,n=t.labels,o=t.options,r=new te;for(e=0;e<n.length;e++)r.append(i(n[e],o.labels));return r},renderLine:function(){var e,t=this.options.line,i=this.lineBox(),n=new te;return t.width>0&&t.visible&&(e=new ee({stroke:{color:t.color,dashType:t.dashType,width:t.width}}),e.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),n.append(e)),n},renderTicks:function(){var e=new te,t=this.options,i=t.majorTicks.visible?t.majorUnit:0,n={vertical:t.vertical,mirror:t.labels.mirror,lineBox:this.lineBox()};return s(e,this.getMajorTickPositions(),n,t.majorTicks),s(e,this.getMinorTickPositions(),n,g({},{skipUnit:i/t.minorUnit},t.minorTicks)),e}}),_(ne,{min:0,max:50,majorTicks:{size:15,align:W,color:p,width:N,visible:!0},minorTicks:{size:10,align:W,color:p,width:N,visible:!0},line:{width:N},labels:{position:W,padding:2},mirror:!1,_alignLines:!1}),oe=c.Class.extend({init:function(e,t){var i=e.options,n=i.min,o=i.max,r=this.options=g({},this.options,t);r.fill=r.color,this.scale=e,r.value=u(r.value)?w(r.value,n,o):n},value:function(e){var t,i,n,o=this.options,r=o.value;return 0===arguments.length?r:(t=this.scale.options,i=t.min,n=t.max,o._oldValue=u(o._oldValue)?o.value:i,o.value=w(e,i,n),void(this.elements&&this.repaint()))}}),_(oe,{color:p}),re=oe.extend({init:function(e,t){oe.fn.init.call(this,e,t),this.options=g({track:{visible:u(t.track)}},this.options)},reflow:function(){var e,t,i,n=this,o=n.options,r=n.scale,s=r.options,a=s.mirror,l=s.vertical,c=r.lineBox(),u=o.track.size||o.size,h=o.size/2,p=d(o.margin),f=l?p[a?"left":"right"]:p[a?"bottom":"top"];f=a?-f:f,l?(i=new y(c.x1+f,c.y1,c.x1+f,c.y2),a?i.x1-=u:i.x2+=u,o.shape!==L&&(t=new y(c.x2+f,c.y1-h,c.x2+f,c.y2+h),e=t)):(i=new y(c.x1,c.y1-f,c.x2,c.y1-f),a?i.y2+=u:i.y1-=u,o.shape!==L&&(t=new y(c.x1-h,c.y1-f,c.x2+h,c.y1-f),e=t)),this.trackBox=i,this.pointerRangeBox=t,this.box=e||i.clone().pad(o.border.width)},getElementOptions:function(){var e=this.options;return{fill:{color:e.color,opacity:e.opacity},stroke:u(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.scale,i=e.options,n=t.options,o=n.mirror,r=n.vertical,s=d(i.margin),a=r?s[o?"left":"right"]:s[o?"bottom":"top"];return a}}),_(re,{shape:L,track:{border:{width:1}},color:p,border:{width:1},opacity:1,margin:d(3),animation:{type:L},visible:!0}),se=D.extend({setup:function(){var e,t,i=this.options,n=i.margin,o=i.from,r=i.to,s=i.vertical,a=s?"x1":"y1";i.mirror===s?(o[a]-=n,r[a]-=n):(o[a]+=n,r[a]+=n),e=this.fromScale=new M(o.x1,o.y1),t=this.toScale=new M(r.x1,r.y1),0!==i.duration&&(i.duration=Math.max(e.distanceTo(t)/i.duration*1e3,1))},step:function(e){var t=k(this.fromScale.x,this.toScale.x,e),i=k(this.fromScale.y,this.toScale.y,e);this.element.transform(R().translate(t,i))}}),_(se,{easing:U,duration:P}),A.current.register(B,se),ae=M,le=T,ce=re.extend({init:function(e,t){re.fn.init.call(this,e,t),u(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)},pointerShape:function(){var e,t=this,i=t.scale,n=t.options.size,o=n/2,r=i.options.mirror?-1:1;return e=i.options.vertical?[new ae(0,0-o),new ae(0-r*n,0),new ae(0,0+o)]:[new ae(0-o,0),new ae(0,0+r*n),new ae(0+o,0)]},repaint:function(){var e=this,t=e.scale,i=e.options,n=new se(this.elements,g(i.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(i.margin),from:t.getSlot(i._oldValue),to:t.getSlot(i.value)}));i.animation.transitions===!1&&(n.options.duration=0),n.setup(),n.play()},render:function(){var e,t,i=this,n=i.scale,o=i.options,r=this.getElementOptions(),s=this.pointerShape(o.value);return o.animation.type=B,e=new le({stroke:r.stroke,fill:r.fill}).moveTo(s[0]).lineTo(s[1]).lineTo(s[2]).close(),t=n.getSlot(o.value),e.transform(R().translate(t.x1,t.y1)),this.elements=e,e}}),de=D.extend({setup:function(){var e=this.options,t=this.axis=e.vertical?h.Y:h.X,i=this.to=e.newPoints[0][t],n=this.from=e.oldPoints[0][t];0!==e.duration&&(e.duration=Math.max(Math.abs(i-n)/e.speed*1e3,1)),this._set(n)},step:function(e){var t=k(this.from,this.to,e);this._set(t)},_set:function(e){var t="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][t](e),i[1][t](e)}}),_(de,{easing:U,speed:P}),A.current.register(L,de),ue=S,he=T,pe=re.extend({init:function(e,t){re.fn.init.call(this,e,t),u(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)},pointerShape:function(e){var t,i,n,o=this,r=o.scale,s=o.options,a=r.options,l=a.mirror,c=a.vertical,d=l===c?-1:1,u=s.size*d,p=r.getSlot(r.options.min),f=r.getSlot(e),m=c?h.Y:h.X,g=c?h.X:h.Y,v=this._margin()*d,_=new M;return _[m]=p[m+"1"],_[g]=p[g+"1"],t=new M,t[m]=f[m+"1"],t[g]=f[g+"1"],c?(_.translate(v,0),t.translate(v,0)):(_.translate(0,v),t.translate(0,v)),i=t.clone(),n=_.clone(),c?(i.translate(u,0),n.translate(u,0)):(i.translate(0,u),n.translate(0,u)),[_,t,i,n]},repaint:function(){var e,t=this,i=t.scale,n=t.options,o=this.pointerShape(n.value),r=this.elements.children[0],s=this.pointerShape(n._oldValue);r.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),e=new de(r,g(n.animation,{reverse:i.options.reverse,vertical:i.options.vertical,oldPoints:[s[1],s[2]],newPoints:[o[1],o[2]]})),n.animation.transitions===!1&&(e.options.duration=0),e.setup(),e.play()},render:function(){var e=new ue,t=this.getElementOptions(),i=new he({stroke:t.stroke,fill:t.fill});return e.append(i),this.elements=e,e}}),fe=60,me=60,ge=S,ve=J.extend({reflow:function(e){var t,i=this.pointers,n=e.origin.x,o=e.origin.y,r=new y(n,o,n+e.width(),o+e.height());for(this.scale.reflow(r),this._shrinkScaleWidth(r),t=0;t<i.length;t++)i[t].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},_buildVisual:function(){var e,t,i=new ge,n=this.scale.render(),o=this.pointers;for(i.append(this.gaugeArea),i.append(n),e=0;e<o.length;e++)t=o[e],i.append(t.render()),t.value(t.options.value);this._visuals=i},_createModel:function(){var e,t,i,n,o=this,r=this.options,s=this.scale=new ne(r.scale,this.contextService);for(this.pointers=[],e=r.pointer,e=v(e)?e:[e],t=0;t<e.length;t++)i=g({},e[t],{animation:{transitions:r.transitions}}),n=i.shape===z?ce:pe,o.pointers.push(new n(s,i))},_defaultSize:function(){var e=this.options.scale.vertical;return{width:e?fe:O,height:e?H:me}},_getBox:function(e){var t,i,n=this,o=n.scale,r=n.pointers,s=e.center(),a=r[0].box.clone().wrap(o.box);for(t=0;t<r.length;t++)a.wrap(r[t].box.clone());return o.options.vertical?(i=a.width()/2,a=new y(s.x-i,e.y1,s.x+i,e.y2)):(i=a.height()/2,a=new y(e.x1,s.y-i,e.x2,s.y+i)),a},_alignElements:function(){var e,t,i,n=this,o=this,r=o.scale,s=o.pointers,a=r.box,l=s[0].box.clone().wrap(r.box),c=this.bbox;for(e=0;e<s.length;e++)l.wrap(s[e].box.clone());for(r.options.vertical?(t=c.center().x-l.center().x,r.reflow(new y(a.x1+t,c.y1,a.x2+t,c.y2))):(t=c.center().y-l.center().y,r.reflow(new y(a.x1,a.y1+t,a.x2,a.y2+t))),i=0;i<s.length;i++)s[i].reflow(n.bbox)},_shrinkScaleWidth:function(e){var t,i=this,n=i.scale;n.options.vertical||(t=n.contentBox().width()-e.width(),t>0&&(n.box.shrink(t,0),n.box.alignTo(e,"center"),n.reflow(n.box)))},_shrinkElements:function(){var e,t,i=this,n=this,o=n.scale,r=n.pointers,s=o.box.clone(),a=o.options.vertical?"y":"x",l=r[0].box;for(e=0;e<r.length;e++)l.wrap(r[e].box.clone());for(s[a+1]+=Math.max(s[a+1]-l[a+1],0),s[a+2]-=Math.max(l[a+2]-s[a+2],0),o.reflow(s),t=0;t<r.length;t++)r[t].reflow(i.bbox)}}),_(ve,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}}),_e=180,be=C.Arc,we=T,ye=S,ke=b.extend({init:function(e,t){b.fn.init.call(this,0,1,e,t)},initUserOptions:function(e){var t=g({},this.options,e);return t.majorUnit=t.majorUnit||c.autoMajorUnit(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},initFields:function(){},render:function(e,t){var i=this.renderArc(e,t);this.bbox=i.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},reflow:function(e){var t=e.center(),i=Math.min(e.height(),e.width())/2;return u(this.bbox)?(this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels(),void 0):this.render(t,i)},slotAngle:function(e){var t,i=this.options,n=i.min,o=i.max,r=i.reverse,s=i.startAngle,a=i.endAngle,l=a-s;return t=r?a-(e-n)/(o-n)*l:(e-n)/(o-n)*l+s,t+_e},hasRanges:function(){var e=this.options.ranges;return e&&e.length},ticksSize:function(){var e=this.options,t=e.majorTicks,i=e.minorTicks,n=0;return t.visible&&(n=t.size),i.visible&&(n=Math.max(i.size,n)),n},renderLabels:function(){var e,t,n,o,r,s,a,l,c,d,h,p,f,m,g,v,_,b,w,k=this,x=this.options,C=this.arc.clone(),S=C.getRadiusX(),T=this.tickAngles(C,x.majorUnit),D=x.rangeSize=x.rangeSize||.1*S,A=new ye,E=.05*S;for(u(x.rangeDistance)?E=x.rangeDistance:x.rangeDistance=E,e=x.labels,t=e.position===W,n=u(this.labelElements),t&&(S-=this.ticksSize(),this.hasRanges()&&!n&&(S-=D+E),C.setRadiusX(S).setRadiusY(S)),o=this.labels,r=o.length,s=e.padding,a=0;a<r;a++)l=o[a],c=l.box.width()/2,d=l.box.height()/2,h=T[a],p=(h-_e)*V,f=C.pointAt(h),m=f.x+Math.cos(p)*(c+s)*(t?1:-1),g=f.y+Math.sin(p)*(d+s)*(t?1:-1),l.reflow(new y(m-c,g-d,m+c,g+d)),v=new M(l.box.x1,l.box.y1),_=void 0,n?(_=k.labelElements.children[a],b=_.bbox().origin,w=_.transform()||R(),w.translate(v.x-b.x,v.y-b.y),_.transform(w)):(_=i(l,x.labels),A.append(_)),k.bbox=I.union(k.bbox,_.bbox());return A},repositionRanges:function(){var e,t,i,n,o,r,s=this.ranges.children;if(s.length>0){for(e=this.options,t=e.rangeDistance,i=e.rangeSize,n=this.getRangeRadius(),this.options.labels.position===W&&(n+=i+t),o=n+i/2,r=0;r<s.length;r++)s[r]._geometry.setRadiusX(o).setRadiusY(o);this.bbox=I.union(this.bbox,this.ranges.bbox())}},renderRanges:function(){var e,t,i,n,o,r,s,a,l,c=this,d=this.rangeSegments(),u=d.length,h=new ye;if(u)for(e=this.options,t=e.rangeSize,i=e.reverse,n=e.rangeDistance,o=this.getRangeRadius(),this.radius(this.radius()-t-n),r=0;r<u;r++)s=d[r],a=c.slotAngle(s[i?"to":"from"]),l=c.slotAngle(s[i?"from":"to"]),l-a!==0&&h.append(c.createRange(a,l,o,s));return h},createRange:function(e,t,i,n){var o=this.options.rangeSize,r=new E.Arc(this.arc.center,{radiusX:i+o/2,radiusY:i+o/2,startAngle:e,endAngle:t});return new be(r,{stroke:{width:o,color:n.color,
opacity:n.opacity,lineCap:n.lineCap}})},rangeSegments:function(){var e,t,i,o,r,s,a,c,d=this.options,u=d.ranges||[],h=u.length,p=[];if(h)for(e=d.min,t=d.max,i=d.rangePlaceholderColor,p.push(l(e,t,i)),o=0;o<h;o++)for(r=n(u[o],e,t),s=p.length,a=0;a<s;a++)if(c=p[a],c.from<=r.from&&r.from<=c.to){p.push(l(r.from,r.to,r.color,r.opacity)),c.from<=r.to&&r.to<=c.to&&p.push(l(r.to,c.to,i,r.opacity)),c.to=r.from;break}return p},getRangeRadius:function(){var e,t=this,i=t.arc,n=t.options,o=n.rangeSize,r=n.rangeDistance,s=n.majorTicks.size;return e=n.labels.position===q?i.getRadiusX()-s-r-o:i.getRadiusX()-o},renderArc:function(e,t){var i=this.options,n=this.arc=new E.Arc(e,{radiusX:t,radiusY:t,startAngle:i.startAngle+_e,endAngle:i.endAngle+_e});return n},renderTicks:function(){var e,t,i,n,o=this,r=o.arc,s=o.options,l=r.clone();return this.majorTickAngles=this.tickAngles(r,s.majorUnit),this.majorTicks=a(l,this.majorTickAngles,s.majorUnit,s.majorTicks),e=new ye,e.append(this.majorTicks),t=s.majorTicks.size,i=s.minorTicks.size,this._tickDifference=t-i,s.labels.position===q&&(n=l.getRadiusX(),l.setRadiusX(n-t+i).setRadiusY(n-t+i)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(r,s.minorUnit)),this.minorTicks=a(l,this.minorTickAngles,s.minorUnit,s.minorTicks),e.append(this.minorTicks),e},normalizeTickAngles:function(e){var t,i=this.options,n=i.majorUnit/i.minorUnit;for(t=e.length-1;t>=0;t--)t%n===0&&e.splice(t,1);return e},tickAngles:function(e,t){var i,n,o=this.options,r=o.reverse,s=o.max-o.min,a=e.endAngle-e.startAngle,l=s/t,c=e.startAngle,d=a/l;for(r&&(c+=a,d=-d),i=[],n=0;n<l;n++)i.push(x(c,f)),c+=d;return x(c)<=e.endAngle&&i.push(c),i},radius:function(e){return e?(this.arc.setRadiusX(e).setRadiusY(e),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0),void 0):this.arc.getRadiusX()},repositionTicks:function(e,t,i){var n,o,r,s,a,l=i?this._tickDifference||0:0,c=this.arc,d=c.getRadiusX();for(i&&this.options.labels.position===q&&0!==l&&(c=this.arc.clone(),c.setRadiusX(d-l).setRadiusY(d-l)),n=0;n<e.length;n++)o=c.pointAt(t[n]),r=e[n].segments,s=o.x-r[0].anchor().x,a=o.y-r[0].anchor().y,e[n].transform((new R).translate(s,a))}}),_(ke,{min:0,max:100,majorTicks:{size:15,align:W,color:p,width:N,visible:!0},minorTicks:{size:10,align:W,color:p,width:N,visible:!0},startAngle:-30,endAngle:210,labels:{position:W,padding:2}}),xe=D.extend({init:function(e,t){D.fn.init.call(this,e,t);var i=this.options;i.duration=Math.max(Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3,1)},step:function(e){var t=this.options,i=k(t.oldAngle,t.newAngle,e);this.element.transform(R().rotate(i,t.center))}}),_(xe,{easing:U,duration:F}),A.current.register(j,xe),Ce=.05,Se=C.Circle,Te=S,De=T,Ae=oe.extend({setAngle:function(e){this.elements.transform(R().rotate(e,this.center))},repaint:function(){var e=this,t=e.scale,i=e.options,n=t.slotAngle(i._oldValue),o=t.slotAngle(i.value);i.animation.transitions===!1?this.setAngle(o):new xe(this.elements,g(i.animation,{oldAngle:n,newAngle:o})).play()},render:function(){var e=this,t=e.scale,i=e.options,n=new Te;return i.animation!==!1&&g(i.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),n.append(this._renderNeedle(),this._renderCap()),this.elements=n,this.setAngle(V),n},reflow:function(e){var t=this.center=e.center,i=w(this.options.length||1,.1,1.5),n=this.radius=e.getRadiusX()*i,o=this.capSize=Math.round(n*this.options.cap.size);this.bbox=I.fromPoints(new M(t.x-o,t.y-o),new M(t.x+o,t.y+o))},_renderNeedle:function(){var e=this.scale.options.minorTicks.size,t=this.center,i=this.options.color,n=new De({fill:{color:i},stroke:{color:i,width:N}});return n.moveTo(t.x+this.radius-e,t.y).lineTo(t.x,t.y-this.capSize/2).lineTo(t.x,t.y+this.capSize/2).close(),n},_renderCap:function(){var e=this.options,t=e.cap.color||e.color,i=new E.Circle(this.center,this.capSize),n=new Se(i,{fill:{color:t},stroke:{color:t}});return n}}),_(Ae,{cap:{size:Ce},arrow:{width:16,height:14},animation:{type:j,duration:F}}),Ee=S,Ie=J.extend({reflow:function(e){var t,i=this,n=this.pointers;for(this.scale.reflow(e),this._initialPlotArea=this.scale.bbox,t=0;t<n.length;t++)n[t].reflow(i.scale.arc),i._initialPlotArea=I.union(i._initialPlotArea,n[t].bbox);this.fitScale(e),this.alignScale(e),this._buildVisual(this.gaugeArea,n,this.scale),this._draw()},_buildVisual:function(e,t,i){var n=this._visuals=new Ee;n.append(e),n.append(i.ticks),n.append(i.ranges),this._buildPointers(t),n.append(i.labelElements)},_buildPointers:function(e){var t,i,n=this;for(t=0;t<e.length;t++)i=e[t],i.render(),n._visuals.append(i.elements),i.value(i.options.value)},fitScale:function(e){for(var t,i,n,o,r,s=this,a=this.scale.arc,l=this._initialPlotArea,c=Math.abs(this.getDiff(l,e)),d=x(c,f),u=x(-c,f),h=0,p=0;!(!(p++<100)||(h=r===n?h+1:0,h>5)||d!==o&&(t=s.getPlotBox(d,e,a),0<=t&&t<=2)||u!==o&&(n=s.getPlotBox(u,e,a),0<=n&&n<=2)||(o=t>0&&n>0?2*d:t<0&&n<0?2*u:x((d+u)/2||1,f),i=s.getPlotBox(o,e,a),0<=i&&i<=2));)r=n,i>0?(u=o,n=i):(d=o,t=i)},getPlotBox:function(e,t,i){var n,o=this,r=this.scale,s=this.pointers,a=i.getRadiusX(),l=i.clone();for(l.setRadiusX(a+e).setRadiusY(a+e),r.arc=l,r.reflow(t),this.plotBbox=r.bbox,n=0;n<s.length;n++)s[n].reflow(l),o.plotBbox=I.union(o.plotBbox,s[n].bbox);return this.getDiff(this.plotBbox,t)},getDiff:function(e,t){return Math.min(t.width()-e.width(),t.height()-e.height())},alignScale:function(e){var t,i=this,n=this.plotBbox.center(),o=e.center(),r=n.x-o.x,s=n.y-o.y,a=this,l=a.scale,c=a.pointers;for(l.arc.center.x-=r,l.arc.center.y-=s,l.reflow(e),t=0;t<c.length;t++)c[t].reflow(l.arc),i.plotBbox=I.union(l.bbox,c[t].bbox)},_createModel:function(){var e,t,i,n=this,o=this.options,r=o.pointer,s=this.scale=new ke(o.scale,this.contextService);for(this.pointers=[],e=v(r)?r:[r],t=0;t<e.length;t++)i=new Ae(s,g({},e[t],{animation:{transitions:o.transitions}})),n.pointers.push(i)}}),_(Ie,{transitions:!0,gaugeArea:{background:""}}),Me=ke.extend({rangeSegments:function(){var e=this.options,t=e.min,i=e.max,n=e.rangePlaceholderColor,o=e.rangeLineCap;return[{from:t,to:i,color:n,lineCap:o}]},hasRanges:function(){return!0},placeholderRangeAngle:function(e){var t=this.ranges.children[0].geometry();this.options.reverse?t.setEndAngle(e):t.setStartAngle(e)},addRange:function(e,t,i){var n=this.options.reverse,o=this.slotAngle(n?t:e),r=this.slotAngle(n?e:t),s=this.createRange(o,r,this.getRangeRadius(),i);return this.ranges.append(s),s}}),_(Me,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"}),Re=800,Fe=D.extend({init:function(e,t){var i,n,o,r;D.fn.init.call(this,e,t),i=this.options,n=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3,i.duration=w(n,F,Re),o=e.elements.options.get("stroke.color"),r=e.currentColor(),o!==r&&(this.startColor=new kendo.Color(o),this.color=new kendo.Color(r))},step:function(e){var t,i,n,o=this,r=o.options,s=o.startColor,a=o.color,l=k(r.oldAngle,r.newAngle,e);this.element.angle(l),a&&(t=x(k(s.r,a.r,e)),i=x(k(s.g,a.g,e)),n=x(k(s.b,a.b,e)),this.element.stroke(new kendo.Color(t,i,n).toHex()))}}),_(Fe,{easing:U,duration:F}),A.current.register(G,Fe),Pe=oe.extend({repaint:function(){var e=this,t=e.scale,i=e.options,n=t.slotAngle(i._oldValue),o=t.slotAngle(i.value);this.animation&&this.animation.abort(),i.animation.transitions===!1?(this.angle(o),this.stroke(this.currentColor())):(this.animation=new Fe(this,g(i.animation,{oldAngle:n,newAngle:o})),this.animation.play())},angle:function(e){var t=this.elements.geometry();this.scale.options.reverse?t.setStartAngle(e):t.setEndAngle(e),this.scale.placeholderRangeAngle(e)},stroke:function(e){this.elements.stroke(e)},render:function(){var e,t,i;this.elements||(e=this,t=e.scale,i=e.options,i.animation!==!1&&g(i.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:i.opacity,lineCap:t.options.rangeLineCap}))},currentColor:function(){var e,t,i,n,o,r=this.scale.options,s=r.min,a=r.max,l=this.options,d=l.colors,u=l.color,h=l.value,p=c.isNumber(h)?h:s;if(d)for(e=0;e<d.length;e++)if(t=d[e],i=t.color,n=t.from,void 0===n&&(n=s),o=t.to,void 0===o&&(o=a),n<=p&&p<=o)return i;return u},reflow:function(){this.render(),this.bbox=this.elements.bbox()}}),_(Pe,{animation:{type:G,duration:F}}),ze=Ie.extend({_initTheme:function(e){Ie.fn._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},_createModel:function(){var e=this.options,t=this.scale=new Me(e.scale,this.contextService),i=new Pe(t,g({},{colors:e.colors,color:e.color,value:e.value,opacity:e.opacity,animation:{transitions:e.transitions}}));this.pointers=[i]},_buildPointers:function(e){var t,i;for(t=0;t<e.length;t++)i=e[t],i.render(),i.value(i.options.value)},_setValueOptions:function(e){this.options.value=e},currentColor:function(){var e=this.pointers[0];if(e)return e.currentColor()},centerLabelPosition:function(e,t){var i,n,o,r,s=this.getSize(),a=this.scale.arc.center,l=a.x-e/2,c=a.y-t/2;return e<s.width&&(i=l+e,l=Math.max(l,0),i>s.width&&(l-=i-s.width)),t<s.height&&(n=this.scale.bbox,o=n.bottomRight().y,r=c+t,c=Math.max(c,n.origin.y),r>o&&(c-=r-o)),{left:l,top:c}}}),kendo.deepExtend(kendo.dataviz,{Gauge:J,LinearGauge:ve,LinearPointer:re,ArrowLinearPointer:ce,BarLinearPointer:pe,LinearScale:ne,RadialGauge:Ie,RadialPointer:Ae,RadialScale:ke,ArcGauge:ze,RangePointer:Pe,ArcScale:Me})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/gauge/main.min",["dataviz/gauge/kendo-gauges.min"],e)}(function(){return function(e){function t(e){var t=u.ui.themes||{},i=e.theme||"",n=i.toLowerCase();return g.indexOf(n)!=-1?u.autoTheme().gauge:(t[i]||t[n]||{}).gauge}function i(e){v.fn[e]=function(){return this._instance[e].apply(this._instance,arguments)}}function n(e){a.fn[e]=function(t){var i=this,n=m[e];return i._centerElement?m.drawDOM(i.element).then(function(e){return n(e,t)}):n(i.exportVisual(),t)}}var o,r,s,a,l,c=window.kendo,d=c.ui.Widget,u=c.dataviz,h=u.LinearGauge,p=u.RadialGauge,f=u.ArcGauge,m=c.drawing,g=["sass","default-v2","bootstrap-v4"],v=d.extend({init:function(t,i){c.destroy(t),e(t).empty(),d.fn.init.call(this,t),this.options=c.deepExtend(this.options,i),this.wrapper=this.element,this._createInstance(),this.element.addClass("k-gauge"),c.notify(this,u.ui)},options:{theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{background:""},transitions:!0},setOptions:function(e){this._instance.setOptions(e,t(e)),this._copyFields()},redraw:function(){this._instance.redraw(),this._copyFields()},destroy:function(){d.fn.destroy.call(this),this._instance.destroy()},_createInstance:function(){var e=this._gaugeType();this._instance=new e(this.element[0],this.options,t(this.options)),this._copyFields()},_copyFields:function(){this._originalOptions=this._instance._originalOptions,this.options=this._instance.options,this.surface=this._instance.surface,this.bbox=this._instance.bbox,this.gaugeArea=this._instance.gaugeArea,this.pointers=this._instance.pointers,this.scale=this._instance.scale},_resize:function(){this._instance.resize()}}),_=["getSize","value","allValues","exportVisual"];for(o=0;o<_.length;o++)i(_[o]);for(u.ExportMixin.extend(v.fn),r=v.extend({options:{name:"RadialGauge"},_gaugeType:function(){return p}}),s=v.extend({options:{name:"LinearGauge",scale:{vertical:!0}},_gaugeType:function(){return h}}),a=v.extend({init:function(e,t){v.fn.init.call(this,e,t),this.element.css("position","relative"),this.element.addClass("k-arcgauge"),this._centerTemplate()},options:{name:"ArcGauge"},setOptions:function(e){v.fn.setOptions.call(this,e),this._centerTemplate()},redraw:function(){v.fn.redraw.call(this),this._centerTemplate()},value:function(e){var t=this._instance;return 0===arguments.length?t.value():(t.value(e),void this._centerTemplate())},destroy:function(){v.fn.destroy.call(this),delete this._centerElement},exportVisual:function(){return!this._centerElement&&v.fn.exportVisual.call(this)},_resize:function(){this._instance.resize(),this._centerTemplate()},_centerTemplate:function(){var e,t,i,n;this.options.centerTemplate?(e=c.template(this.options.centerTemplate),t=this._instance,i=this._getCenterElement(),i.html(e({color:t.currentColor(),value:t.value()})),n=t.centerLabelPosition(i.width(),i.height()),i.css(n)):this._centerElement&&(this._centerElement.remove(),this._centerElement=null)},_getCenterElement:function(){var t=this._centerElement;return t||(t=this._centerElement=e("<div></div>").addClass("k-arcgauge-label"),this.element.append(t)),t},_gaugeType:function(){return f}}),l=["exportSVG","exportImage","exportPDF"],o=0;o<l.length;o++)n(l[o]);u.ui.plugin(s),u.ui.plugin(r),u.ui.plugin(a),c.deepExtend(u,{Gauge:v,LinearGauge:s,RadialGauge:r,ArcGauge:a})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.gauge.min",["dataviz/gauge/main.min","kendo.dataviz.themes.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.barcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],e)}(function(){return function(e,t){function i(e,t,i){return e.substring(t,t+i)}var n,o,r,s,a,l,c=window.kendo,d=c.ui.Widget,u=e.extend,h=c.deepExtend,p=e.inArray,f=e.isPlainObject,m=c.drawing,g=c.geometry,v=c.drawing.util,_=v.defined,b=c.dataviz,w=b.Box2D,y=b.TextBox,k=300,x=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=u({},t.options,e),t.quietZoneLength=t.options.addQuietZone?2*t.options.quietZoneLength:0},encode:function(e,t,i){var n=this;return _(e)&&(e+=""),n.initValue(e,t,i),n.options.addQuietZone&&n.addQuietZone(),n.addData(),n.options.addQuietZone&&n.addQuietZone(),{baseUnit:n.baseUnit,pattern:n.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))}}),E={},I=A.extend({minBaseUnitLength:.7,addData:function(){var e,t=this,i=t.value;for(t.addStart(),e=0;e<i.length;e++)t.addCharacter(i.charAt(e));t.options.addCheckSum&&t.pushCheckSum(),t.addStop(),t.prepareValues()},addCharacter:function(e){var t=this,i=t.characterMap[e];i||t.invalidCharacterError(e),t.addBase(i)},addBase:function(){}}),M={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 i,n,o,r=this;for(n=0;n<r.extendedMappings.length;n++)if(i=r.extendedMappings[n].call(r,e)){for(o=0;o<i.length;o++)r.addBase(i[o]);return r.dataLength+=i.length-1,t}},extendedMappings:[function(e){if(97<=e&&e<=122){var t=this;return[t.characterMap[t.shiftCharacters[0]],t.characterMap[String.fromCharCode(e-32)]]}},function(e){if(33<=e&&e<=58){var t=this;return[t.characterMap[t.shiftCharacters[1]],t.characterMap[String.fromCharCode(e+32)]]}},function(e){if(1<=e&&e<=26){var t=this;return[t.characterMap[t.shiftCharacters[2]],t.characterMap[String.fromCharCode(e+64)]]}},function(e){var t,i,n,o=this;if(o.specialAsciiCodes[e])for(t=[],n=0;n<o.specialAsciiCodes[e].length;n++)t.push(o.characterMap[o.shiftCharacters[3]]),t.push(o.characterMap[o.specialAsciiCodes[e][n]]);else i=6*Math.floor(e/32)+(e-27)%32+64,t=[o.characterMap[o.shiftCharacters[3]],o.characterMap[String.fromCharCode(i)]];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"]};E.code39=I.extend({name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",initValue:function(e,t,i){var n=this;n.width=t,n.height=i,n.value=e,n.dataLength=e.length,n.pattern=[],n.patternString=""},prepareValues:function(){var e,t,i=this,n=i.minBaseUnitLength,o=i.maxRatio,r=i.minRatio,s=Math.max(.15*i.width,24);if(i.height<s)throw Error("Insufficient Height. The minimum height for value: "+i.value+" is: "+s);for(;(e=i.getBaseUnit(o))<n&&o>r;)o=parseFloat((o-.1).toFixed(1));if(e<n)throw t=Math.ceil(i.getBaseWidth(r)*n),Error("Insufficient width. The minimum width for value: "+i.value+" is: "+t);i.ratio=o,i.baseUnit=e,i.patternString=i.patternString.substring(0,i.patternString.length-1),i.pattern=i.pattern.concat(i.patternString.replace(/ratio/g,o).split(i.splitCharacter))},getBaseUnit:function(e){return this.width/this.getBaseWidth(e)},getBaseWidth:function(e){var t=this,i=3*(e+2);return t.quietZoneLength+i*(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;t<e.length;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}}),E.code39extended=E.code39.extend(h({},M,{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}}})),E.code93=I.extend({name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,initValue:function(e,t,i){var n=this;n.value=e,n.width=t,n.height=i,n.pattern=[],n.values=[],n.dataLength=e.length},prepareValues:function(){var e=this,t=Math.max(.15*e.width,24);if(e.height<t)throw Error("Insufficient Height");if(e.setBaseUnit(),e.baseUnit<e.minBaseUnitLength)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,i=this,n=i._getCheckValues();for(i.checksum=n.join(""),t=0;t<n.length;t++)e=i.characterMap[i._findCharacterByValue(n[t])],i.addPattern(e.pattern)},_getCheckValues:function(){var e,t,i,n=this,o=n.values,r=o.length,s=0;for(i=r-1;i>=0;i--)s+=n.weightedValue(o[i],r-i,n.cCheckSumTotal);for(e=s%n.checkSumMod,s=n.weightedValue(e,1,n.kCheckSumTotal),i=r-1;i>=0;i--)s+=n.weightedValue(o[i],r-i+1,n.kCheckSumTotal);return t=s%n.checkSumMod,[e,t]},_findCharacterByValue:function(e){for(var t in this.characterMap)if(this.characterMap[t].value===e)return t},weightedValue:function(e,t,i){return(t%i||i)*e},addPattern:function(e){var t,i;for(i=0;i<e.length;i++)t=parseInt(e.charAt(i),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"}}),E.code93extended=E.code93.extend(h({},M,{name:"Code 93 extended",pushCheckSum:function(){var e,t,i=this,n=i._getCheckValues();for(i.checksum=n.join(""),t=0;t<n.length;t++)e=n[t],i.shiftValuesAsciiCodes[e]?i.addExtended(i.shiftValuesAsciiCodes[e]):i.addPattern(i.characterMap[i._findCharacterByValue(e)].pattern)}})),n=c.Class.extend({init:function(e){this.encoding=e},addStart:function(){},is:function(){},move:function(){},pushState:function(){}}),o=n.extend({FNC4:"FNC4",init:function(e,t){var i=this;i.encoding=e,i.states=t,i._initMoves(t)},addStart:function(){this.encoding.addPattern(this.START)},is:function(e,t){var i=e.charCodeAt(t);return this.isCode(i)},move:function(e){for(var t=this,i=0;!t._moves[i].call(t,e)&&i<t._moves.length;)i++},pushState:function(e){var t,i,n=this,o=n.states,r=e.value,s=r.length;for(p("C",o)>=0&&(i=r.substr(e.index).match(/\d{4,}/g),i&&(s=r.indexOf(i[0],e.index)));(t=e.value.charCodeAt(e.index))>=0&&n.isCode(t)&&e.index<s;)n.encoding.addPattern(n.getValue(t)),e.index++},_initMoves:function(e){var t=this;t._moves=[],p(t.FNC4,e)>=0&&t._moves.push(t._moveFNC),p(t.shiftKey,e)>=0&&t._moves.push(t._shiftState),t._moves.push(t._moveState)},_moveFNC:function(e){if(e.fnc)return e.fnc=!1,e.previousState==this.key},_shiftState:function(e){var t=this;if(e.previousState==t.shiftKey&&(e.index+1>=e.value.length||t.encoding[t.shiftKey].is(e.value,e.index+1)))return t.encoding.addPattern(t.SHIFT),e.shifted=!0,!0},_moveState:function(){return this.encoding.addPattern(this.MOVE),!0},SHIFT:98}),r={},r.A=o.extend({key:"A",shiftKey:"B",isCode:function(e){return 0<=e&&e<96},getValue:function(e){return e<32?e+64:e-32},MOVE:101,START:103}),r.B=o.extend({key:"B",shiftKey:"A",isCode:function(e){return 32<=e&&e<128},getValue:function(e){return e-32},MOVE:100,START:104}),r.C=n.extend({key:"C",addStart:function(){this.encoding.addPattern(this.START)},is:function(e,t){var n=i(e,t,4);return(t+4<=e.length||2==e.length)&&S.test(n)},move:function(){this.encoding.addPattern(this.MOVE)},pushState:function(e){for(var t;(t=i(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=n.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,i=this._getSubState(t);this.encoding[i].addStart()},is:function(e,t){var i=e.charCodeAt(t);return this.isCode(i)},isCode:function(e){return 128<=e&&e<256},pushState:function(e){var t,i=this,n=i._initSubState(e),o=i.encoding,r=n.value.length;if(e.index+=r,r<3)for(;n.index<r;n.index++)t=n.value.charCodeAt(n.index),n.state=i._getSubState(t),n.previousState!=n.state&&(n.previousState=n.state,o[n.state].move(n)),o.addPattern(o[n.state].MOVE),o.addPattern(o[n.state].getValue(t));else n.state!=n.previousState&&o[n.state].move(n),i._pushStart(n),o.pushData(n,i.subStates),e.index<e.value.length&&i._pushStart(n);e.fnc=!0,e.state=n.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,i={value:t._getAll(e.value,e.index),index:0};return i.state=t._getSubState(i.value.charCodeAt(0)),i.previousState=e.previousState==t.key?i.state:e.previousState,i},_initSubStates:function(e){var t,i=this;for(i.subStates=[],t=0;t<e.length;t++)p(e[t],i.dependentStates)>=0&&i.subStates.push(e[t])},_getSubState:function(e){var t,i=this;for(t=0;t<i.subStates.length;t++)if(i.encoding[i.subStates[t]].isCode(e))return i.subStates[t]},_getAll:function(e,t){for(var i,n="";(i=e.charCodeAt(t++))&&this.isCode(i);)n+=String.fromCharCode(i-128);return n}}),r.FNC1=n.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 p(this.key,this.states)>=0},pushState:function(e){var t,i,n,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,n=s.charAt(l)===o.startAI?2:0,t=n>0?o.getBySeparator(s,l):o.getByLength(s,l),t.ai.length)i=l+n+t.id.length+t.ai.length;else if(i=s.indexOf(o.startAI,l+1),i<0){if(l+t.ai.max+t.id.length+n<s.length)throw Error("Separators are required after variable length identifiers");i=s.length}if(c.value=s.substring(l,i).replace(a,""),o.validate(t,c.value),r.pushData(c,o.dependentStates),i>=s.length)break;l=i,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 i=t.substr(e.id.length),n=e.ai;if(!n.type&&!S.test(i))throw Error("Application identifier "+e.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"==n.type&&!T.test(i))throw Error("Application identifier "+e.id+" is alphanumeric only but contains non alphanumeric character(s).");if(n.length&&n.length!==i.length)throw Error("Application identifier "+e.id+" must be "+n.length+" characters long.");if(n.min&&n.min>i.length)throw Error("Application identifier "+e.id+" must be at least "+n.min+" characters long.");if(n.max&&n.max<i.length)throw Error("Application identifier "+e.id+" must be at most "+n.max+" characters long.")},getByLength:function(e,t){var n,o,r,s=this;for(r=2;r<=4;r++)if(n=i(e,t,r),o=s.getAI(n)||s.getAI(n.substring(0,n.length-1)))return{id:n,ai:o};s.unsupportedAIError(n)},unsupportedAIError:function(e){throw Error(c.format("'{0}' is not a supported Application Identifier"),e)},getBySeparator:function(e,t){var i=this,n=e.indexOf(i.startAI,t),o=e.indexOf(i.endAI,n),r=e.substring(n+1,o),s=i.getAI(r)||i.getAI(r.substr(r.length-1));return s||i.unsupportedAIError(r),{ai:s,id:r}},getAI:function(e){var t,i,n,o=this.applicationIdentifiers,r=o.multiKey;if(o[e])return o[e];for(t=0;t<r.length;t++){if(r[t].ids&&p(e,r[t].ids)>=0)return r[t].type;if(r[t].ranges)for(i=r[t].ranges,n=0;n<i.length;n++)if(i[n][0]<=e&&e<=i[n][1])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;e<t.states.length;e++)t[t.states[e]]=new r[t.states[e]](t,t.states)},initValue:function(e,t,i){var n=this;n.pattern=[],n.value=e,n.width=t,n.height=i,n.checkSum=0,n.totalUnits=0,n.index=0,n.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 i,n=this;;){if(n[e.state].pushState(e),e.index>=e.value.length)break;e.shifted?(i=e.state,e.state=e.previousState,e.previousState=i,e.shifted=!1):(e.previousState=e.state,e.state=n.getNextState(e,t),n[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,i,n=this,o=""+n.characterMap[e];for(i=0;i<o.length;i++)t=parseInt(o.charAt(i),10),n.pattern.push(t),n.totalUnits+=t;n.checkSum+=e*n.position++},getNextState:function(e,t){for(var i=0;i<t.length;i++)if(this[t[i]].is(e.value,e.index))return t[i];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}),E.code128a=s.extend({name:"Code 128 A",states:["A"]}),E.code128b=s.extend({name:"Code 128 B",states:["B"]}),E.code128c=s.extend({name:"Code 128 C",states:["C"]}),E.code128=s.extend({name:"Code 128",states:["C","B","A","FNC4"]}),E["gs1-128"]=s.extend({name:"Code GS1-128",states:["FNC1","C","B"]}),a=A.extend({initValue:function(e,t){var i=this;i.pattern=[],i.value=e,i.checkSumLength=0,i.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,i=t.value;for(t.addPattern(t.START),e=0;e<i.length;e++)t.addCharacter(i.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.STOP),t.setBaseUnit()},addCharacter:function(e){var t=this,i=t.characterMap[e];i||t.invalidCharacterError(e),t.addPattern(i)},addPattern:function(e){for(var t=0;t<e.length;t++)this.pattern.push(parseInt(e.charAt(t),10))},addCheckSum:function(){var e,t=this,i=t.checkSums[t.checkSumType],n=i.call(t.checkSums,t.value);for(t.checksum=n.join(""),e=0;e<n.length;e++)t.checkSumLength++,t.addPattern(t.characterMap[n[e]])},checkSums:{Modulo10:function(e){var t,i,n,o=[0,""],r=e.length%2;for(t=0;t<e.length;t++)o[(t+r)%2]+=parseInt(e.charAt(t),10);for(n=o[0],i=""+2*o[1],t=0;t<i.length;t++)n+=parseInt(i.charAt(t),10);return[(10-n%10)%10]},Modulo11:function(e){var t,i,n,o=0,r=11,s=e.length;for(n=0;n<s;n++)t=((s-n)%6||6)+1,o+=t*e.charAt(n);return i=(r-o%r)%r,10!=i?[i]:[1,0]},Modulo11Modulo10:function(e){var t,i=this.Modulo11(e);return t=e+i[0],i.concat(this.Modulo10(t))},Modulo10Modulo10:function(e){var t,i=this.Modulo10(e);return t=e+i[0],i.concat(this.Modulo10(t))}},characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:""}),E.msimod10=a.extend({name:"MSI Modulo10",checkSumType:"Modulo10"}),E.msimod11=a.extend({name:"MSI Modulo11",checkSumType:"Modulo11"}),E.msimod1110=a.extend({name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"}),E.msimod1010=a.extend({name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"}),E.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 i=this;i.pattern=[],i.value=e,i.width=t,i.totalUnits=0},addData:function(){var e,t=this,i=t.value;for(t.addPattern(t.START),e=0;e<i.length;e++)t.addCharacter(i.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,i=t.value,n=i.length,o=t.getWeightedSum(i,n,t.cCheckSumTotal)%t.checkSumMod;t.checksum=o+"",t.addPattern(t.characterMap[o]),n++,n>=t.kCheckSumMinLength&&(e=(o+t.getWeightedSum(i,n,t.kCheckSumTotal))%t.checkSumMod,t.checksum+=e,t.addPattern(t.characterMap[e]))},getWeightedSum:function(e,t,i){var n,o=0;for(n=0;n<e.length;n++)o+=this.weightedValue(this.getValue(e.charAt(n)),t,n,i);return o},weightedValue:function(e,t,i,n){var o=(t-i)%n||n;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,i=t.getValue(e),n=t.characterMap[i];t.addPattern(n)},addPattern:function(e){var t,i;for(i=0;i<e.length;i++)t=parseInt(e.charAt(i),10),this.pattern.push(t),this.totalUnits+=t},characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],options:{addCheckSum:!0}}),E.postnet=A.extend({name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",initValue:function(e,t,i){var n=this;n.height=i,n.width=t,n.baseHeight=i/2,n.value=e.replace(RegExp(n.DIGIT_SEPARATOR,"g"),""),n.pattern=[],n.validate(n.value),n.checkSum=0,n.setBaseUnit()},addData:function(){var e,t=this,i=t.value;for(t.addPattern(t.START),e=0;e<i.length;e++)t.addCharacter(i.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.START),t.pattern.pop()},addCharacter:function(e){var t=this,i=t.characterMap[e];t.checkSum+=parseInt(e,10),t.addPattern(i)},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]),p(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,i,n=this;for(i=0;i<e.length;i++)t=n.height-n.baseHeight*e.charAt(i),n.pattern.push({width:1,y1:t,y2:n.height}),n.pattern.push(1)},characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]}),E.ean13=A.extend({initValue:function(e,t,i){if(e+="",12!=e.length||/\D/.test(e))throw Error('The value of the "EAN13" encoding should be 12 symbols');var n=this;n.pattern=[],n.options.height=i,n.baseUnit=t/(95+n.quietZoneLength),n.value=e,n.checksum=n.calculateChecksum(),n.leftKey=e[0],n.leftPart=e.substr(1,6),n.rightPart=e.substr(7)+n.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 i,n=this;for(i=0;i<e.length;i++)t&&parseInt(n.keyTable[t].charAt(i),10)?n.addPieces(Array.prototype.slice.call(n.characterMap.digits[e.charAt(i)]).reverse(),!0):n.addPieces(n.characterMap.digits[e.charAt(i)],!0)},addPieces:function(e,t){var i,n=this;for(i=0;i<e.length;i++)n.pattern.push(t?{y1:0,y2:.95*n.options.height,width:e[i]}:e[i])},calculateChecksum:function(){var e,t,i=0,n=0,o=this.value.split("").reverse().join("");for(e=0;e<o.length;e++)e%2?n+=parseInt(o.charAt(e),10):i+=parseInt(o.charAt(e),10);return t=(10-(3*i+n)%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]}}),E.ean8=E.ean13.extend({initValue:function(e,t,i){var n=this;if(7!=e.length||/\D/.test(e))throw Error("Invalid value provided");n.value=e,n.options.height=i,n.checksum=n.calculateChecksum(n.value),n.leftPart=n.value.substr(0,4),n.rightPart=n.value.substr(4)+n.checksum,n.pattern=[],n.baseUnit=t/(67+n.quietZoneLength)}}),l=d.extend({init:function(t,i){var n=this;d.fn.init.call(n,t,i),n.element=e(t),n.wrapper=n.element,n.element.addClass("k-barcode").css("display","block"),n.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),n.surface=m.Surface.create(n.surfaceWrap,{type:n.options.renderAs}),n._setOptions(i),i&&_(i.value)&&n.redraw()},setOptions:function(e){this._setOptions(e),this.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,i,n=this,o=n.options,r=o.value,s=o.text,a=b.getSpacing(s.margin),l=n._getSize(),c=o.border||{},d=n.encoding,u=new w(0,0,l.width,l.height).unpad(c.width).unpad(o.padding),h=u.height(),p=new m.Group;return n.contentBox=u,p.append(n._getBackground(l)),s.visible&&(i=m.util.measureText(r,{font:s.font}).height,h-=i+a.top+a.bottom),e=d.encode(r,u.width(),h),s.visible&&(t=r,o.checksum&&_(d.checksum)&&(t+=" "+d.checksum),p.append(n._getText(t))),n.barHeight=h,this._bandsGroup=this._getBands(e.pattern,e.baseUnit),p.append(this._bandsGroup),p},exportVisual:function(){return this._render()},_getSize:function(){var e=this,t=e.element,i=new g.Size(k,x);return t.width()>0&&(i.width=t.width()),t.height()>0&&(i.height=t.height()),e.options.width&&(i.width=e.options.width),e.options.height&&(i.height=e.options.height),i},value:function(e){var i=this;return _(e)?(i.options.value=e+"",i.redraw(),t):i.options.value},_getBands:function(e,t){var i,n,o,r,s,a=this,l=a.contentBox,c=l.x1,d=new m.Group;for(o=0;o<e.length;o++)n=f(e[o])?e[o]:{width:e[o],y1:0,y2:a.barHeight},i=n.width*t,o%2&&(r=g.Rect.fromPoints(new g.Point(c,n.y1+l.y1),new g.Point(c+i,n.y2+l.y1)),s=m.Path.fromRect(r,{fill:{color:a.options.color},stroke:null}),d.append(s)),c+=i;return d},_getBackground:function(e){var t=this,i=t.options,n=i.border||{},o=new w(0,0,e.width,e.height).unpad(n.width/2),r=m.Path.fromRect(o.toRect(),{fill:{color:i.background},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType}});return r},_getText:function(e){var t=this,i=t.options.text,n=t._textbox=new y(e,{font:i.font,color:i.color,align:"center",vAlign:"bottom",margin:i.margin});return n.reflow(t.contentBox),n.renderVisual(),n.visual},_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),!E[t.type])throw Error("Encoding "+t.type+"is not supported.");t.encoding=new E[t.type],t.options=u(!0,t.options,e)},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}}}),b.ExportMixin.extend(l.fn),b.ui.plugin(l),c.deepExtend(b,{encodings:E,Encoding:A})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.qrcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],e)}(function(){return function(e,t){function i(e){return parseInt(e,2)}function n(e,t){var i=(+e).toString(2);return i.length<t&&(i=Array(t-i.length+1).join(0)+i),i}function o(e,t){for(var i=[],n=0;n<e.length;)i.push(e.substring(n,n+t)),n+=t;return i}function r(e,t,i,n){for(var o=0;o<e.length;o++)e[o][i][n]=t}function s(e,t,i,n){for(var o=0;o<ve.length;o++)e[o][i][n]=ve[o](i,n)?1^t:parseInt(t,10)}function a(){var e,t;for(t=1;t<255;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,i,n=68;for(e=2;e<=n;e++)t=se[e-1],i=[e,0],se[e]=w(t,i)}function c(e,i){var n=[],o=e.length-1;do n[o]=re[(e[o]+i)%255],o--;while(e[o]!==t);return n}function d(e,t){return parseInt(e.charAt(t),10)}function u(e,t,i,n,o){t[e][n]=(t[e][n]<<1^o)%128,t[e][n]==ge&&(i[e]+=40)}function h(e,t,i,n,o,r){i[e][r]==n?o[e][r]++:(i[e][r]=n,o[e][r]>=5&&(t[e]+=3+o[e][r]-5),o[e][r]=1)}function p(e,t){var i=Math.floor(e/t*100),n=i%5,o=Math.abs(i-n-50),r=Math.abs(i+5-n-50),s=10*Math.min(o/5,r/5);return s}var f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U,q,j,G,$,K=window.kendo,Y=e.extend,Q=K.drawing,X=K.dataviz,Z=K.ui.Widget,J=X.Box2D,ee="0000",te="numeric",ie="alphanumeric",ne="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],de=[1,0,1],ue={L:"01",M:"00",Q:"11",H:"10"},he="101010000010010",pe="10100110111",fe="1111100100101",me=["11101100","00010001"],ge=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+/,be="A-Z0-9 $%*+./:-",we="A-Z $%*+./:-",ye=RegExp("^["+we+"]+"),ke=RegExp("^["+be+"]+"),xe=RegExp("^[^"+be+"]+"),Ce=8,Se=5,Te=8,De=17,Ae=9,Ee=16,Ie=Math.round,Me=K.Class.extend({getVersionIndex:function(e){return e<10?0:e>26?2:1},getBitsCharacterCount:function(e){var t=this;return t.bitsInCharacterCount[t.getVersionIndex(e||40)]},getModeCountString:function(e,t){var i=this;return i.modeIndicator+n(e,i.getBitsCharacterCount(t))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Re={};Re[te]=Me.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(e){return parseInt(e,10)},encode:function(e,t){var i,r=this,s=o(e,3),a=r.getModeCountString(e.length,t);for(i=0;i<s.length-1;i++)a+=n(s[i],10);return a+n(s[i],1+3*s[i].length)},getStringBitsLength:function(e,t){var i=e%3;return 4+this.getBitsCharacterCount(t)+10*Math.floor(e/3)+3*i+(0===i?0:1)}}),Re[ie]=Me.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 i,r,s=this,a=o(e,2),l=s.getModeCountString(e.length,t);for(r=0;r<a.length-1;r++)i=45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)),l+=n(i,11);return i=2==a[r].length?45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)):s.getValue(a[r].charAt(0)),l+n(i,1+5*a[r].length)},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+11*Math.floor(e/2)+6*(e%2)}}),Re[ne]=Me.extend({bitsInCharacterCount:[8,16,16],modeIndicator:"0100",getValue:function(e){var t=e.charCodeAt(0);if(t<=127||160<=t&&t<=255)return t;throw Error("Unsupported character: "+e)},encode:function(e,t){var i,o=this,r=o.getModeCountString(e.length,t);for(i=0;i<e.length;i++)r+=n(o.getValue(e.charAt(i)),8);return r},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+8*e}}),f={};for(m in Re)f[m]=new Re[m];g=function(e){var i=this,n=e.length-1,o=e.length-1,r=o,s=-1,a=0;i.move=function(){n+=s*a,a^=1,o=r-a},i.getNextCell=function(){for(;e[n][o]!==t;)i.move(),(n<0||n>=e.length)&&(s=-s,r-=8!=r?2:3,o=r,n=s<0?e.length-1:0);return{row:n,column:o}},i.getNextRemainderCell=function(){if(i.move(),e[n][o]===t)return{row:n,column:o}}},v=function(e,t){var i,n,o,r,a,l,c=new g(e[0]);for(r=0;r<t.length;r++)for(i=t[r],n=0;i.length>0;){for(a=0;a<i.length;a++)for(l=0;l<8;l++)o=c.getNextCell(),s(e,i[a][n].charAt(l),o.row,o.column);for(n++;i[0]&&n==i[0].length;)i.splice(0,1)}for(;o=c.getNextRemainderCell();)s(e,0,o.row,o.column)},_=function(e,t){for(var i=8*t,n=0,o=0;e.length<i&&n<ee.length;)e+=ee.charAt(n++);for(e.length%8!==0&&(e+=Array(9-e.length%8).join("0"));e.length<i;)e+=me[o],o^=1;return e},b=function(e,t){var i,n=[],o=e.length-2;for(i=o;i>=0;i--)n[i]=e[i]^t[i];return n},w=function(e,i){var n,o,r=[];for(n=0;n<e.length;n++)for(o=0;o<i.length;o++)r[n+o]=r[n+o]===t?(e[n]+(i[o]>=0?i[o]:0))%255:oe[re[r[n+o]]^re[(e[n]+i[o])%255]];return r},a(),l(),y=function(e,t){var i,o,r=se[t-1],s=Array(t).concat(e),a=Array(s.length-r.length).concat(r),l=e.length,d=[];for(o=0;o<l;o++)i=c(a,oe[s[s.length-1]]),a.splice(0,1),s=b(i,s);for(o=s.length-1;o>=0;o--)d[t-1-o]=n(s[o],8);return d},k=function(e,t){var n,o,r,s,a,l,c,d,u=0,h=[],p=[],f=t.groups;for(l=0;l<f.length;l++)for(r=f[l][0],c=0;c<r;c++){for(o=f[l][1],n=[],s=[],d=1;d<=o;d++)a=e.substring(u,u+8),n.push(a),s[o-d]=i(a),u+=8;h.push(n),p.push(y(s,t.errorCodewordsPerBlock))}return[h,p]},x=function(e,t,i,n,o){var r,s,a=_e.exec(e),l=a?a[0]:"",c=ye.exec(e),d=c?c[0]:"",u=ke.exec(e),h=u?u[0]:"";return l&&(l.length>=t||e.length==l.length||l.length>=i&&!ke.test(e.charAt(l.length)))?(r=te,s=l):h&&(e.length==h.length||h.length>=n||o==ie)?(r=ie,s=l||d):(r=ne,s=h?h+xe.exec(e.substring(h.length))[0]:xe.exec(e)[0]),{mode:r,modeString:s}},C=function(e){var t,i,n=[],o=0;for(n.push(x(e,Ce,Se,Te,t)),t=n[0].mode,e=e.substr(n[0].modeString.length);e.length>0;)i=x(e,De,Ae,Ee,t),i.mode!=t?(t=i.mode,n.push(i),o++):n[o].modeString+=i.modeString,e=e.substr(i.modeString.length);return n},S=function(e){var t,i,n=0;for(i=0;i<e.length;i++)t=f[e[i].mode],n+=t.getStringBitsLength(e[i].modeString.length);return Math.ceil(n/8)},T=function(e,t){var i=0,n=le.length-1,o=Math.floor(le.length/2);do e<le[o][t].totalDataCodewords?n=o:i=o,o=i+Math.floor((n-i)/2);while(n-i>1);return e<=le[i][t].totalDataCodewords?o+1:n+1},D=function(e,t){var i,n,o="";for(n=0;n<e.length;n++)i=f[e[n].mode],o+=i.encode(e[n].modeString,t);return o},A=function(e){var t,n,o=i(e),r="";if(0===o)return"101010000010010";for(t=E(i(e),pe,15),n=0;n<t.length;n++)r+=t.charAt(n)^he.charAt(n);return r},E=function(e,t,o){var r=i(t),s=t.length-1,a=e<<s,l=o-s,c=n(e,l),d=I(a,r);return d=c+n(d,s)},I=function(e,t){var i=t.toString(2).length,n=e.toString(2).length;do e^=t<<n-i,n=e.toString(2).length;while(n>=i);return e},M=function(e){var t,i,n=[],o=17+4*e;for(t=0;t<ve.length;t++)for(n[t]=Array(o),i=0;i<o;i++)n[t][i]=Array(o);return n},R=function(e,t){var i,n,o=e[0],s=0,a=t.length;for(i=0,n=8;i<=8;i++)6!==i&&r(e,d(t,a-1-s++),i,n);for(i=8,n=7;n>=0;n--)6!==n&&r(e,d(t,a-1-s++),i,n);for(s=0,n=o.length-1,i=8;n>=o.length-8;n--)r(e,d(t,a-1-s++),i,n);for(r(e,1,o.length-8,8),i=o.length-7,n=8;i<o.length;i++)r(e,d(t,a-1-s++),i,n)},F=function(e){return E(e,fe,18)},P=function(e,t){var i,n,o,s,a=e[0],l=a.length,c=0,u=l-11,h=l-11,p=0;for(s=0;s<t.length;s++)i=Math.floor(s/3),n=s%3,o=d(t,t.length-s-1),r(e,o,c+i,u+n),r(e,o,h+n,p+i)},z=function(e,t,i,n){var o,s,a,l=t.length+2,c=t.length+1;for(s=0;s<t.length;s++)for(a=s;a<l-s;a++)o=t[s],r(e,o,i+a,n+s),r(e,o,i+s,n+a),r(e,o,i+c-a,n+c-s),r(e,o,i+c-s,n+c-a)},B=function(e,t,i,n){var o=i,s=n,a=e[0];do r(e,0,o,n),r(e,0,i,s),o+=t[0],s+=t[1];while(o>=0&&o<a.length)},L=function(e){var t=e[0].length;z(e,ce,0,0),B(e,[-1,-1],7,7),z(e,ce,t-7,0),B(e,[1,-1],t-8,7),z(e,ce,0,t-7),B(e,[-1,1],7,t-8)},H=function(e,i){var n,o,r,s,a,l,c,d,u;if(!(i<2)){for(n=e[0],o=n.length,r=Math.floor(i/7),s=[6],c=0,(a=ae[i])?l=(o-13-a)/r:a=l=(o-13)/(r+1),s.push(s[c++]+a);s[c]+l<o;)s.push(s[c++]+l);for(d=0;d<s.length;d++)for(u=0;u<s.length;u++)n[s[d]][s[u]]===t&&z(e,de,s[d]-2,s[u]-2)}},N=function(e){var t,i=6,n=6,o=1,s=e[0].length;for(t=8;t<s-8;t++)r(e,o,i,t),r(e,o,t,n),o^=1},O=function(e){var t,i,n,o,r,s,a,l=[],c=[],d=[],f=[],m=[],g=0,v=1,_=e[0].length;for(i=0;i<e.length;i++)l[i]=0,d[i]=0,m[i]=[0,0],f[i]=[0,0],c[i]=[];for(i=0;i<_;i++)for(n=0;n<_;n++)for(o=0;o<e.length;o++)t=e[o],d[o]+=parseInt(t[i][n],10),c[o][g]===t[i][n]&&i+1<_&&n-1>=0&&t[i+1][n]==c[o][g]&&t[i+1][n-1]==c[o][g]&&(l[o]+=3),u(o,f,l,g,t[i][n]),u(o,f,l,v,t[n][i]),h(o,l,c,t[i][n],m,g),h(o,l,c,t[n][i],m,v);for(r=_*_,a=Number.MAX_VALUE,i=0;i<l.length;i++)l[i]+=p(d[i],r),l[i]<a&&(a=l[i],s=i);return s},V=function(e,t){this.dataString=e,this.version=t},W=function(){this.getEncodingResult=function(e,t){var i=C(e),n=S(i),o=T(n,t),r=D(i,o);return new V(r,o)}},U=function(){this.mode=f[this.encodingMode]},U.fn=U.prototype={encodingMode:ne,utfBOM:"111011111011101110111111",initialModeCountStringLength:20,getEncodingResult:function(e,t){var i=this,n=i.encode(e),o=i.getDataCodewordsCount(n),r=T(o,t),s=i.mode.getModeCountString(n.length/8,r)+n;return new V(s,r)},getDataCodewordsCount:function(e){var t=this,i=e.length,n=Math.ceil((t.initialModeCountStringLength+i)/8);return n},encode:function(e){var t,i=this,n=i.utfBOM;for(t=0;t<e.length;t++)n+=i.encodeCharacter(e.charCodeAt(t));return n},encodeCharacter:function(e){var t,i,o=this.getBytesCount(e),r=o-1,s="";if(1==o)s=n(e,8);else{for(t=8-o,i=0;i<r;i++)s=n(e>>6*i&63|128,8)+s;s=(e>>6*r|255>>t<<t).toString(2)+s}return s},getBytesCount:function(e){var t,i=this.ranges;for(t=0;t<i.length;t++)if(e<i[t])return t+1},ranges:[128,2048,65536,2097152,67108864]},q=function(e){return e&&e.toLowerCase().indexOf("utf_8")>=0?new U:new W},j=function(e,t,i){var o,r,s,a=new q(i),l=a.getEncodingResult(e,t),c=l.version,d=le[c-1][t],u=_(l.dataString,d.totalDataCodewords),h=k(u,d),p=M(c);return L(p),H(p,c),N(p),c>=7&&P(p,n(0,18)),R(p,n(0,15)),v(p,h),o=O(p),r=p[o],c>=7&&P([r],F(c)),s=ue[t]+n(o,3),R([r],A(s)),r},G={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,i){var n=this;Z.fn.init.call(n,t,i),n.element=e(t),n.wrapper=n.element,n.element.addClass("k-qrcode"),
n.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),n.surface=Q.Surface.create(n.surfaceWrap,{type:n.options.renderAs}),n.setOptions(i)},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 K.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},exportVisual:function(){return this._render()},_render:function(){var e,t,i,n,o,r,s,a=this,l=a._value,c=a.options.border||{},d=a.options.padding||0,u=c.width||0;return c.width=u,s=new Q.Group,l&&(i=j(l,a.options.errorCorrection,a.options.encoding),n=a._getSize(),r=n-2*(u+d),e=a._calculateBaseUnit(r,i.length),o=i.length*e,t=u+d+(r-o)/2,s.append(a._renderBackground(n,c)),s.append(a._renderMatrix(i,e,t))),s},_getSize:function(){var e,t,i,n=this;return n.options.size?e=parseInt(n.options.size,10):(t=n.element,i=Math.min(t.width(),t.height()),e=i>0?i:G.DEFAULT_SIZE),e},_calculateBaseUnit:function(e,t){var i=Math.floor(e/t);if(i<G.MIN_BASE_UNIT_SIZE)throw Error("Insufficient size.");return i*t>=e&&i-1>=G.MIN_BASE_UNIT_SIZE&&i--,i},_renderMatrix:function(e,t,i){var n,o,r,s,a,l,c,d,u=new Q.MultiPath({fill:{color:this.options.color},stroke:null});for(n=0;n<e.length;n++)for(o=i+n*t,r=0;r<e.length;){for(;0===e[n][r]&&r<e.length;)r++;if(r<e.length){for(s=r;1==e[n][r];)r++;a=Ie(i+s*t),l=Ie(o),c=Ie(i+r*t),d=Ie(o+t),u.moveTo(a,l).lineTo(a,d).lineTo(c,d).lineTo(c,l).close()}}return u},_renderBackground:function(e,t){var i=new J(0,0,e,e).unpad(t.width/2);return Q.Path.fromRect(i.toRect(),{fill:{color:this.options.background},stroke:{color:t.color,width:t.width}})},setOptions:function(e){var i=this;e=e||{},i.options=Y(i.options,e),e.value!==t&&(i._value=i.options.value+""),i.redraw()},value:function(e){var i=this;return e===t?i._value:(i._value=e+"",i.redraw(),t)},options:{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:G.DEFAULT_ERROR_CORRECTION_LEVEL,background:G.DEFAULT_BACKGROUND,color:G.DEFAULT_DARK_MODULE_COLOR,size:"",padding:0,border:{color:"",width:0}}}),X.ExportMixin.extend($.fn),X.ui.plugin($),K.deepExtend(X,{QRCode:$,QRCodeDefaults:G,QRCodeFunctions:{FreeCellVisitor:g,fillData:v,padDataString:_,generateErrorCodewords:y,xorPolynomials:b,getBlocks:k,multiplyPolynomials:w,chooseMode:x,getModes:C,getDataCodewordsCount:S,getVersion:T,getDataString:D,encodeFormatInformation:A,encodeBCH:E,dividePolynomials:I,initMatrices:M,addFormatInformation:R,encodeVersionInformation:F,addVersionInformation:P,addCentricPattern:z,addFinderSeparator:B,addFinderPatterns:L,addAlignmentPatterns:H,addTimingFunctions:N,scoreMaskMatrixes:O,encodeData:j,UTF8Encoder:U},QRCodeFields:{modes:f,powersOfTwo:oe,powersOfTwoResult:re,generatorPolynomials:se}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/stock/kendo-stock-chart.min",["kendo.dataviz.chart.min"],e)}(function(){!function(){function e(e,t){var i=document.createElement("div");return i.className=e,t&&(i.style.cssText=t),i}function t(){}function i(e){return t.prototype=e,new t}var n,o,r,s,a,l,c,d,u,h,p,f,m,g,v,_;window.kendo.dataviz=window.kendo.dataviz||{},n=kendo.dataviz,o=n.elementStyles,r=n.deepExtend,s=n.toTime,a=n.constants,l=n.Chart,c=kendo.drawing,d=c.Animation.extend({setup:function(){this._initialOpacity=parseFloat(o(this.element,"opacity").opacity)},step:function(e){o(this.element,{opacity:n.interpolateValue(this._initialOpacity,0,e)+""})},abort:function(){c.Animation.fn.abort.call(this),o(this.element,{display:"none",opacity:this._initialOpacity+""})},cancel:function(){c.Animation.fn.abort.call(this),o(this.element,{opacity:this._initialOpacity+""})}}),u=n.Class.extend({init:function(e,t,i){this.options=r({},this.options,i),this.container=e,this.chartService=t;var n=o(e,["paddingLeft","paddingTop"]);this.chartPadding={top:n.paddingTop,left:n.paddingLeft},this.createElements(),e.appendChild(this.element)},createElements:function(){var t=this.element=e("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),i=this.tooltip=e("k-tooltip k-chart-tooltip"),n=this.scroll=e("k-scroll");i.innerHTML="&nbsp;",t.appendChild(i),t.appendChild(n)},show:function(e,t,i){var r,a=this,l=a.element,c=a.options,d=a.scroll,u=a.tooltip,h=n.toDate(s(e)+s(t-e)/2),p=.4*i.width(),f=i.center().x-p,m=i.center().x,g=m-f,v=c.max-c.min,_=g/v,b=h-c.min,w=this.chartService.intl.format(c.format,e,t),y=n.getTemplate(c);this.clearHideTimeout(),this._visible||(o(l,{visibility:"hidden",display:"block"}),this._visible=!0),y&&(w=y({from:e,to:t})),u.innerHTML=w,o(u,{left:i.center().x-u.offsetWidth/2,top:i.y1}),r=o(u,["marginTop","borderTopWidth","height"]),o(d,{width:p,left:f+b*_,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),o(l,{visibility:"visible"})},clearHideTimeout:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},hide:function(){var e=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){e._visible=!1,e._hideAnimation=new d(e.element),e._hideAnimation.setup(),e._hideAnimation.play()},this.options.hideDelay)},destroy:function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll}}),n.setDefaultOptions(u,{format:"{0:d} - {1:d}",hideDelay:500}),h="_navigator",p=h,f={NAVIGATOR_AXIS:p,NAVIGATOR_PANE:h},m=3,g=n.Class.extend({init:function(e){var t,i,o;this.chart=e,t=this.options=r({},this.options,e.options.navigator),i=t.select,i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),n.defined(t.hint.visible)||(t.hint.visible=t.visible),this.chartObserver=new n.InstanceObserver(this,(o={},o[a.DRAG]="_drag",o[a.DRAG_END]="_dragEnd",o[a.ZOOM]="_zoom",o[a.ZOOM_END]="_zoomEnd",o)),e.addObserver(this.chartObserver)},parseDate:function(e){return n.parseDate(this.chart.chartService.intl,e)},clean:function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},destroy:function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},redraw:function(){this._redrawSelf(),this.initSelection()},initSelection:function(){var e=this,t=e.chart,o=e.options,r=this.mainAxis(),s=r.roundedRange(),a=s.min,l=s.max,c=o.select,d=c.from,h=c.to,p=c.mousewheel,f=i(r);0!==r.categoriesCount()&&(this.clean(),f.box=r.box,this.selection=new n.Selection(t,f,{min:a,max:l,from:d||a,to:h||l,mousewheel:n.valueOrDefault(p,{zoom:"left"}),visible:o.visible},new n.InstanceObserver(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new u(t.element,t.chartService,{min:a,max:l,template:n.getTemplate(o.hint),format:o.hint.format})))},setRange:function(){var e,t=this.chart._createPlotArea(!0),i=t.namedCategoryAxes[p],n=i.roundedRange(),o=n.min,s=n.max,a=this.options.select||{},l=a.from||o;l<o&&(l=o),e=a.to||s,e>s&&(e=s),this.options.select=r({},a,{from:l,to:e}),this.filterAxes()},_redrawSelf:function(e){var t=this.chart._plotArea;t&&t.redraw(n.last(t.panes),e)},redrawSlaves:function(){var e=this.chart,t=e._plotArea,i=t.panes.slice(0,-1);t.srcSeries=e.options.series,t.options.categoryAxis=e.options.categoryAxis,t.clearSeriesPointsCache(),t.redraw(i)},_drag:function(e){var t,i,o,r=this,a=r.chart,l=r.selection,c=a._eventCoordinates(e.originalEvent),d=this.mainAxis(),u=d.roundedRange(),h=d.pane.box.containsPoint(c),p=a._plotArea.categoryAxis,f=e.axisRanges[p.options.name],m=this.options.select;f&&!h&&l&&(t=m.from&&m.to?s(m.to)-s(m.from):s(l.options.to)-s(l.options.from),i=n.toDate(n.limitValue(s(f.min),u.min,s(u.max)-t)),o=n.toDate(n.limitValue(s(i)+t,s(u.min)+t,u.max)),this.options.select={from:i,to:o},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),l.set(i,o),this.showHint(i,o))},_dragEnd:function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},readSelection:function(){var e=this,t=e.selection.options,i=t.from,n=t.to,o=e.options.select;o.from=i,o.to=n},filterAxes:function(){var e,t,i,n,o,r,s=this,a=s.options.select;for(void 0===a&&(a={}),e=s.chart,t=e.options.categoryAxis,i=a.from,n=a.to,o=0;o<t.length;o++)r=t[o],r.pane!==h&&(r.min=i,r.max=n)},filter:function(){var e,t=this,i=t.chart,o=t.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=new n.DateCategoryAxis(r({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,this.chart.trigger("navigatorFilter",{from:n.addDuration(e.min,-e.baseUnitStep,e.baseUnit),to:n.addDuration(e.max,e.baseUnitStep,e.baseUnit)}))},_zoom:function(e){var t,i,n=this,o=n.chart._plotArea.categoryAxis,r=n.selection,s=n.options,a=s.select,l=s.liveDrag,c=this.mainAxis(),d=e.delta;r&&(t=c.categoryIndex(r.options.from),i=c.categoryIndex(r.options.to),e.originalEvent.preventDefault(),Math.abs(d)>1&&(d*=m),i-t>1?(r.expand(d),this.readSelection()):(o.options.min=a.from,a.from=o.scaleRange(-e.delta).min),l&&(this.filterAxes(),this.redrawSlaves()),r.set(a.from,a.to),this.showHint(this.options.select.from,this.options.select.to))},_zoomEnd:function(e){this._dragEnd(e)},showHint:function(e,t){var i=this.chart._plotArea;this.hint&&this.hint.show(e,t,i.backgroundBox())},_selectStart:function(e){return this.chart._selectStart(e)},_select:function(e){return this.showHint(e.from,e.to),this.chart._select(e)},_selectEnd:function(e){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(e)},mainAxis:function(){var e=this.chart._plotArea;if(e)return e.namedCategoryAxes[p]},select:function(e,t){var i=this.options.select;return e&&t&&(i.from=this.parseDate(e),i.to=this.parseDate(t),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(e,t)),{from:i.from,to:i.to}}}),g.setup=function(e,t){var i,n,o;void 0===e&&(e={}),void 0===t&&(t={}),e.__navi||(e.__navi=!0,i=r({},t.navigator,e.navigator),n=e.panes=[].concat(e.panes),o=r({},i.pane,{name:h}),i.visible||(o.visible=!1,o.height=.1),n.push(o),g.attachAxes(e,i),g.attachSeries(e,i,t))},g.attachAxes=function(e,t){var i=t.series||[],o=e.categoryAxis=[].concat(e.categoryAxis),s=e.valueAxis=[].concat(e.valueAxis),l=n.filterSeriesByType(i,a.EQUALLY_SPACED_SERIES),c=0===l.length,d=r({type:"date",pane:h,roundToBaseUnit:!c,justified:c,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:t.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),u=t.categoryAxis;o.push(r({},d,{maxDateGroups:200},u,{name:p,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),r({},d,u,{name:p+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),r({},d,u,{name:p+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),s.push(r({name:p,pane:h,majorGridLines:{visible:!1},visible:!1},t.valueAxis))},g.attachSeries=function(e,t,i){var n,o=e.series=e.series||[],s=[].concat(t.series||[]),a=i.seriesColors,l=t.seriesDefaults;for(n=0;n<s.length;n++)o.push(r({color:a[n%a.length],categoryField:t.dateField,visibleInLegend:!1,tooltip:{visible:!1}},l,s[n],{axis:p,categoryAxis:p,autoBind:t.autoBindElements}))},v=28,_=l.extend({applyDefaults:function(e,t){var i=n.elementSize(this.element).width||a.DEFAULT_WIDTH,o=t,s={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/v)}}};o&&(o=r({},o,s)),g.setup(e,o),l.fn.applyDefaults.call(this,e,o)},_setElementClass:function(e){n.addClass(e,"k-chart k-stockchart")},setOptions:function(e){this.destroyNavigator(),l.fn.setOptions.call(this,e)},noTransitionsRedraw:function(){var e=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=e},_resize:function(){this.noTransitionsRedraw()},_redraw:function(){var e=this.navigator;!this._dirty()&&e&&e.options.partialRedraw?e.redrawSlaves():this._fullRedraw()},_dirty:function(){var e=this.options,t=[].concat(e.series,e.navigator.series),i=n.grep(t,function(e){return e&&e.visible}).length,o=this._seriesCount!==i;return this._seriesCount=i,o},_fullRedraw:function(){var e=this.navigator;e||(e=this.navigator=new g(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),l.fn._redraw.call(this),e.initSelection()},_trackSharedTooltip:function(e){var t=this._plotArea,i=t.paneByPoint(e);i&&i.options.name===h?this._unsetActivePoint():l.fn._trackSharedTooltip.call(this,e)},bindCategories:function(){l.fn.bindCategories.call(this),this.copyNavigatorCategories()},copyNavigatorCategories:function(){var e,t,i,n=[].concat(this.options.categoryAxis);for(t=0;t<n.length;t++)i=n[t],i.name===p?e=i.categories:e&&i.pane===h&&(i.categories=e)},destroyNavigator:function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},destroy:function(){this.destroyNavigator(),l.fn.destroy.call(this)},_stopChartHandlers:function(e){var t=this._eventCoordinates(e),i=this._plotArea.paneByPoint(t);return l.fn._stopChartHandlers.call(this,e)||i&&i.options.name===h}}),n.setDefaultOptions(_,{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},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}}),kendo.deepExtend(kendo.dataviz,{constants:f,Navigator:g,NavigatorHint:u,StockChart:_})}()},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/stock/stock-chart.min",["dataviz/stock/kendo-stock-chart.min"],e)}(function(){!function(e){function t(e,t){return[{field:"Date",operator:"gte",value:e},{field:"Date",operator:"lt",value:t}]}var i=window.kendo,n=i.dataviz,o=n.ChartInstanceObserver,r=n.ui.Chart,s=n.StockChart,a=n.constants,l=a.NAVIGATOR_AXIS,c=a.NAVIGATOR_PANE,d=i.deepExtend,u=n.defined,h=e.proxy,p="change",f=o.extend({handlerMap:{navigatorFilter:"_onNavigatorFilter",navigatorCreated:"_onNavigatorCreated"}}),m=r.extend({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},persistSeriesVisibility:!0},_createChart:function(e,t){this._initNavigatorOptions(e),this._instance=new s(this.element[0],e,t,{observer:new f(this),sender:this,rtl:this._isRtl()})},_initNavigatorOptions:function(e){var t=e.navigator||{},n=i.support,o=n.touch,r=n.browser.mozilla;d(t,{autoBindElements:!t.dataSource,partialRedraw:t.dataSource,liveDrag:!o&&!r})},_initDataSource:function(e){var o,s,a,l,c=e||{},u=c.dataSource,h=u&&u.serverFiltering,p=[].concat(c.categoryAxis)[0],f=c.navigator||{},m=f.select,g=m&&m.from&&m.to;h&&g&&(o=[].concat(u.filter||[]),s=i.parseDate(m.from),a=i.parseDate(m.to),l=new n.DateCategoryAxis(d({baseUnit:"fit"},p,{categories:[s,a]}),i),u.filter=t(l.range().min,a).concat(o)),r.fn._initDataSource.call(this,e)},_onNavigatorCreated:function(e){this._instance=e.sender,this.options=e.sender.options,this._navigator=this.navigator=e.navigator,this._initNavigatorDataSource()},_initNavigatorDataSource:function(){var e=this.options.navigator,t=e.autoBind,n=e.dataSource;n&&(this._navigatorDataChangedHandler=this._navigatorDataChangedHandler||h(this._onNavigatorDataChanged,this),this._navigatorDataSource=i.data.DataSource.create(n).bind(p,this._navigatorDataChangedHandler),u(t)||(t=this.options.autoBind),t&&this._navigatorDataSource.fetch())},_bindNavigatorSeries:function(e,t){var i,n,o=e.length;for(i=0;i<o;i++)n=e[i],n.axis==l&&this._isBindable(n)&&(n.data=t)},_onNavigatorDataChanged:function(){var e,t,i,n,o=this,r=o._instance,s=o.options.categoryAxis,a=s.length,d=o._navigatorDataSource.view();for(this._bindNavigatorSeries(o.options.series,d),o._sourceSeries&&this._bindNavigatorSeries(o._sourceSeries,d),e=0;e<a;e++)t=s[e],t.pane==c&&(t.name==l?(o._bindCategoryAxis(t,d,e),i=t.categories):t.categories=i);r._model&&(n=this.navigator,n.redraw(),n.setRange(),(!o.options.dataSource||o.options.dataSource&&o._dataBound)&&n.redrawSlaves())},_bindCategories:function(){r.fn._bindCategories.call(this),this._instance&&this._instance.copyNavigatorCategories()},_onDataChanged:function(){r.fn._onDataChanged.call(this),this._dataBound=!0},setOptions:function(e){this._removeNavigatorDataSource(),this._initNavigatorOptions(e),this._instance.destroyNavigator(),r.fn.setOptions.call(this,e)},_onNavigatorFilter:function(e){this.dataSource.filter(t(e.from,e.to))},requiresHandlers:function(e){var t,i;return n.inArray("navigatorFilter",e)?(t=this.dataSource,i=t&&t.options.serverFiltering,i&&this.options.navigator.dataSource):r.fn.requiresHandlers.call(this,e)},_removeNavigatorDataSource:function(){var e=this._navigatorDataSource;e&&(e.unbind(p,this._navigatorDataChangedHandler),delete this._navigatorDataSource)},destroy:function(){r.fn.destroy.call(this),this._removeNavigatorDataSource()}});n.ui.plugin(m)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.stock.min",["dataviz/stock/kendo-stock-chart.min","dataviz/stock/stock-chart.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/sparkline/kendo-sparkline.min",["kendo.dataviz.chart.min"],e)}(function(){!function(){function e(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n[t]=i.style.display,i.style.display="none";return n}function t(e,t){for(var i=0;i<e.length;i++)e[i].style.display=t[i]}function i(e){return n.isNumber(e)?[e]:e}var n,o,r,s,a,l,c,d,u,h,p;window.kendo.dataviz=window.kendo.dataviz||{},n=kendo.dataviz,o=n.constants,r=n.Chart,s=n.elementSize,a=n.deepExtend,l=-2,c=n.SharedTooltip.extend({_slotAnchor:function(e,t){var i,o=this.plotArea.categoryAxis,r=o.options.vertical,s=r?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return i=r?new n.Point(this.plotArea.box.x2,t.center().y):new n.Point(t.center().x,l),{point:i,align:s}},_defaultAnchor:function(e,t){return this._slotAnchor({},t)}}),d=150,u=150,h=[o.BAR,o.BULLET],p=r.extend({_setElementClass:function(e){n.addClass(e,"k-sparkline")},_initElement:function(e){r.fn._initElement.call(this,e),this._initialWidth=Math.floor(s(e).width)},_resize:function(){var i=this.element,n=e(i.childNodes);this._initialWidth=Math.floor(s(i).width),t(i.childNodes,n),r.fn._resize.call(this)},_modelOptions:function(){var i,n=this.options,o=this._surfaceWrap(),r=e(o.childNodes),l=document.createElement("span");return l.innerHTML="&nbsp;",o.appendChild(l),i=a({width:this._autoWidth,height:s(o).height,transitions:n.transitions},n.chartArea,{inline:!0,align:!1}),s(o,{width:i.width,height:i.height}),o.removeChild(l),t(o.childNodes,r),this.surface&&this.surface.resize(),i},_surfaceWrap:function(){if(!this.stage){var e=this.stage=document.createElement("span");this.element.appendChild(e)}return this.stage},_createPlotArea:function(e){var t=r.fn._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},_calculateWidth:function(e){var t,i,r,a,l,c,h=this.options,p=n.getSpacing(h.chartArea.margin),f=e.charts,m=this._surfaceWrap(),g=0;for(t=0;t<f.length;t++)if(i=f[t],r=(i.options.series||[])[0]){if(r.type===o.BAR)return d;if(r.type===o.BULLET)return u;if(r.type===o.PIE)return s(m).height;a=i.categoryAxis,a&&(l=a.categoriesCount()*(!i.options.isStacked&&n.inArray(r.type,[o.COLUMN,o.VERTICAL_BULLET])?i.seriesOptions.length:1),g=Math.max(g,l))}return c=g*h.pointWidth,c>0&&(c+=p.left+p.right),c},_createSharedTooltip:function(e){return new c(this._plotArea,e)}}),p.normalizeOptions=function(e){var t=i(e);return t=n.isArray(t)?{seriesDefaults:{data:t}}:a({},t),t.series||(t.series=[{data:i(t.data)}]),a(t,{seriesDefaults:{type:t.type}}),(n.inArray(t.series[0].type,h)||n.inArray(t.seriesDefaults.type,h))&&(t=a({},{categoryAxis:{crosshair:{visible:!1}}},t)),t},n.setDefaultOptions(p,{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}]}),kendo.deepExtend(kendo.dataviz,{Sparkline:p})}()},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/sparkline/sparkline.min",["dataviz/sparkline/kendo-sparkline.min"],e)}(function(){!function(e){var t,i=kendo.dataviz,n=i.ui.Chart,o=i.Sparkline,r=i.ChartInstanceObserver,s=e.extend,a=n.extend({init:function(e,t){var i=t;i instanceof kendo.data.ObservableArray&&(i={seriesDefaults:{data:i}}),n.fn.init.call(this,e,o.normalizeOptions(i))},_createChart:function(e,t){this._instance=new o(this.element[0],e,t,{observer:new r(this),sender:this,rtl:this._isRtl()})},_createTooltip:function(){return new t(this.element,s({},this.options.tooltip,{rtl:this._isRtl()}))},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}]}});i.ui.plugin(a),t=i.Tooltip.extend({options:{animation:{duration:0}},_hideElement:function(){this.element&&this.element.hide().remove()}}),i.SparklineTooltip=t}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.sparkline.min",["dataviz/sparkline/kendo-sparkline.min","dataviz/sparkline/sparkline.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/location.min",["kendo.drawing.min","util/main.min"],e)}(function(){!function(e,t){var i,n=Math,o=n.abs,r=n.atan,s=n.atan2,a=n.cos,l=n.max,c=n.min,d=n.sin,u=n.tan,h=window.kendo,p=h.Class,f=h.dataviz,m=h.deepExtend,g=h.drawing.util,v=g.defined,_=g.deg,b=g.rad,w=g.round,y=g.valueOrDefault,k=h.util.sqr,x=p.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 x(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,i){var o,r,l,c,u;return t=b(t),i=i||f.map.datums.WGS84,o=b(this.lat),r=b(this.lng),l=e/h.dataviz.map.datums.WGS84.a,c=n.asin(d(o)*a(l)+a(o)*d(l)*a(t)),u=r+s(d(t)*d(l)*a(o),a(l)-d(o)*d(c)),new x(_(c),_(u))},greatCircleTo:function(e,t){var i,l,c,h,p,m,g,v,y,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N,O,V,W,U;if(e=x.create(e),t=t||f.map.datums.WGS84,!e||this.clone().round(8).equals(e.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(i=t.a,l=t.b,c=t.f,h=b(e.lng-this.lng),p=r((1-c)*u(b(this.lat))),m=d(p),g=a(p),v=r((1-c)*u(b(e.lat))),y=d(v),C=a(v),S=h,D=this.DISTANCE_ITERATIONS,A=!1;!A&&D-- >0;)E=d(S),I=a(S),M=n.sqrt(k(C*E)+k(g*y-m*C*I)),F=m*y+g*C*I,z=s(M,F),B=g*C*E/M,R=1-k(B),P=0,0!==R&&(P=F-2*m*y/R),T=S,L=c/16*R*(4+c*(4-3*R)),S=h+(1-L)*c*B*(z+L*M*(P+L*F*(-1+2*k(P)))),A=o(S-T)<=this.DISTANCE_CONVERGENCE;return H=R*(k(i)-k(l))/k(l),N=1+H/16384*(4096+H*(-768+H*(320-175*H))),O=H/1024*(256+H*(-128+H*(74-47*H))),V=O*M*(P+O/4*(F*(-1+2*k(P))-O/6*P*(-3+4*k(M))*(-3+4*k(P)))),W=s(C*E,g*y-m*C*I),U=s(g*E,-m*C+g*y*I),{distance:w(l*N*(z-V),this.DISTANCE_PRECISION),azimuthFrom:_(W),azimuthTo:_(U)}}});x.fn.toString=function(){return h.format(this.FORMAT,this.lat,this.lng)},x.fromLngLat=function(e){return new x(e[1],e[0])},x.fromLatLng=function(e){return new x(e[0],e[1])},x.create=function(e,t){if(v(e))return e instanceof x?e.clone():1===arguments.length&&2===e.length?x.fromLatLng(e):new x(e,t)},i=p.extend({init:function(e,t){e=x.create(e),t=x.create(t),e.lng+180>t.lng+180&&e.lat+90<t.lat+90?(this.se=e,this.nw=t):(this.se=t,this.nw=e)},contains:function(e){var t=this.nw,i=this.se,n=y(e.lng,e[1]),o=y(e.lat,e[0]);return e&&n+180>=t.lng+180&&n+180<=i.lng+180&&o+90>=i.lat+90&&o+90<=t.lat+90},center:function(){var e=this.nw,t=this.se,i=e.lng+(t.lng-e.lng)/2,n=e.lat+(t.lat-e.lat)/2;return new x(n,i)},containsAny:function(e){var t,i=!1;for(t=0;t<e.length;t++)i=i||this.contains(e[t]);return i},include:function(e){var t=this.nw,i=this.se,n=y(e.lng,e[1]),o=y(e.lat,e[0]);t.lng=c(t.lng,n),t.lat=l(t.lat,o),i.lng=l(i.lng,n),i.lat=c(i.lat,o)},includeAll:function(e){for(var t=0;t<e.length;t++)this.include(e[t])},edges:function(){var e=this.nw,t=this.se;return{nw:this.nw,ne:new x(e.lat,t.lng),se:this.se,sw:new x(t.lat,e.lng)}},toArray:function(){var e=this.nw,t=this.se;return[e,new x(e.lat,t.lng),t,new x(t.lat,e.lng)]},overlaps:function(e){return this.containsAny(e.toArray())||e.containsAny(this.toArray())}}),i.World=new i([90,-180],[-90,180]),i.create=function(e,n){return e instanceof i?e:e&&n?new i(e,n):e&&4===e.length&&!n?new i([e[0],e[1]],[e[2],e[3]]):t},m(f,{map:{Extent:i,Location:x}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/attribution.min",["kendo.drawing.min"],e)}(function(){!function(){var e=window.kendo,t=e.ui.Widget,i=e.template,n=e.drawing.util,o=n.valueOrDefault,r=n.defined,s=t.extend({init:function(e,i){t.fn.init.call(this,e,i),this._initOptions(i),this.items=[],this.element.addClass("k-widget k-attribution")},options:{name:"Attribution",separator:"&nbsp;|&nbsp;",itemTemplate:"#= text #"},filter:function(e,t){this._extent=e,this._zoom=t,this._render()},add:function(e){r(e)&&("string"==typeof e&&(e={text:e}),this.items.push(e),this._render())},remove:function(e){var t,i,n=[];for(t=0;t<this.items.length;t++)i=this.items[t],i.text!==e&&n.push(i);this.items=n,this._render()},clear:function(){this.items=[],this.element.empty()},_render:function(){var e,t,n,o=[],r=i(this.options.itemTemplate);for(e=0;e<this.items.length;e++)t=this.items[e],n=this._itemText(t),""!==n&&o.push(r({text:n}));o.length>0?this.element.empty().append(o.join(this.options.separator)).show():this.element.hide()},_itemText:function(e){var t="",i=this._inZoomLevel(e.minZoom,e.maxZoom),n=this._inArea(e.extent);return i&&n&&(t+=e.text),t},_inZoomLevel:function(e,t){var i=!0;return e=o(e,-Number.MAX_VALUE),t=o(t,Number.MAX_VALUE),i=this._zoom>e&&this._zoom<t},_inArea:function(e){var t=!0;return e&&(t=e.contains(this._extent)),t}});e.dataviz.ui.plugin(s)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/navigator.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return i.format('<button class="k-button k-navigator-{0}" aria-label="move {0}"><span class="k-icon k-i-arrow-60-{0}"/></button>',e)}var i=window.kendo,n=i.ui.Widget,o=i.keys,r=e.proxy,s=".kendoNavigator",a=t("up")+t("right")+t("down")+t("left"),l=n.extend({init:function(e,t){n.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("["+i.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 i=this.options.panStep;this.trigger("pan",{x:e*i,y:t*i})},_click:function(t){var i=0,n=0,o=e(t.currentTarget);o.is(".k-navigator-up")?n=1:o.is(".k-navigator-down")?n=-1:o.is(".k-navigator-right")?i=1:o.is(".k-navigator-left")&&(i=-1),this._pan(i,n),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()}}});i.dataviz.ui.plugin(l)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/zoom.min",["kendo.core.min"],e)}(function(){!function(e){function t(e,t){return i.format('<button class="k-button k-zoom-{0}" title="zoom-{0}" aria-label="zoom-{0}"><span class="k-icon {1}"></span></button>',e,t)}var i=window.kendo,n=i.ui.Widget,o=i.keys,r=e.proxy,s=".kendoZoomControl",a=t("in","k-i-plus")+t("out","k-i-minus"),l=187,c=189,d=61,u=173,h=n.extend({init:function(e,t){n.fn.init.call(this,e,t),this._initOptions(t),this.element.addClass("k-widget k-zoom-control k-button-wrap k-buttons-horizontal k-button-group k-group-horizontal").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+i.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 i=e(t.currentTarget),n=1;i.is(".k-zoom-out")&&(n=-1),this._change(n),t.preventDefault()},_keydown:function(e){switch(e.which){case o.NUMPAD_PLUS:case l:case d:this._change(1);break;case o.NUMPAD_MINUS:case c:case u:this._change(-1)}}});i.dataviz.ui.plugin(h)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/crs.min",["dataviz/map/location.min","kendo.drawing.min"],e)}(function(){!function(e,t){var i=Math,n=i.atan,o=i.exp,r=i.pow,s=i.sin,a=i.log,l=i.tan,c=window.kendo,d=c.Class,u=c.dataviz,h=c.deepExtend,p=c.geometry,f=p.Point,m=u.map,g=m.Location,v=c.drawing.util,_=v.rad,b=v.deg,w=v.limitValue,y=i.PI,k=y/2,x=y/4,C=y/180,S={a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149},T=d.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:S},forward:function(e,t){var i=this,n=i.options,o=n.datum,r=o.a,s=n.centralMeridian,a=w(e.lat,-i.MAX_LAT,i.MAX_LAT),l=t?w(e.lng,-i.MAX_LNG,i.MAX_LNG):e.lng,c=_(l-s)*r,d=i._projectLat(a);return new f(c,d)},_projectLat:function(e){var t=this.options.datum,i=t.e,n=t.a,o=_(e),c=l(x+o/2),d=i*s(o),u=r((1-d)/(1+d),i/2);return n*a(c*u)},inverse:function(e,t){var i=this,n=i.options,o=n.datum,r=o.a,s=n.centralMeridian,a=e.x/(C*r)+s,l=w(i._inverseY(e.y),-i.MAX_LAT,i.MAX_LAT);return t&&(a=w(a,-i.MAX_LNG,i.MAX_LNG)),new g(l,a)},_inverseY:function(e){var t,a,l,c,d=this,u=d.options.datum,h=u.a,p=u.e,f=p/2,m=o(-e/h),g=k-2*n(m);for(t=0;t<=d.INVERSE_ITERATIONS&&(a=p*s(g),l=r((1-a)/(1+a),f),c=k-2*n(m*l)-g,g+=c,!(i.abs(c)<=d.INVERSE_CONVERGENCE));t++);return b(g)}}),D=T.extend({MAX_LAT:85.0511287798,
_projectLat:function(e){var t=this.options.datum.a,i=_(e),n=l(x+i/2);return t*a(n)},_inverseY:function(e){var t=this.options.datum.a,i=o(-e/t);return b(k-2*n(i))}}),A=d.extend({forward:function(e){return new f(e.lng,e.lat)},inverse:function(e){return new g(e.y,e.x)}}),E=d.extend({init:function(){var e=this,t=e._proj=new D,i=this.c=2*y*t.options.datum.a;this._tm=p.transform().translate(.5,.5).scale(1/i,-1/i),this._itm=p.transform().scale(i,-i).translate(-.5,-.5)},toPoint:function(e,t,i){var n=this._proj.forward(e,i);return n.transform(this._tm).scale(t||1)},toLocation:function(e,t,i){return e=e.clone().scale(1/(t||1)).transform(this._itm),this._proj.inverse(e,i)}}),I=d.extend({init:function(){this._proj=new T},toPoint:function(e){return this._proj.forward(e)},toLocation:function(e){return this._proj.inverse(e)}}),M=d.extend({init:function(){this._proj=new A},toPoint:function(e){return this._proj.forward(e)},toLocation:function(e){return this._proj.inverse(e)}});h(u,{map:{crs:{EPSG3395:I,EPSG3857:E,EPSG4326:M},datums:{WGS84:S},projections:{Equirectangular:A,Mercator:T,SphericalMercator:D}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/layers/base.min",["kendo.core.min","dataviz/map/location.min"],e)}(function(){!function(e,t){var i=e.proxy,n=window.kendo,o=n.Class,r=n.dataviz,s=n.deepExtend,a=r.map.Extent,l=n.drawing.util,c=l.defined,d=o.extend({init:function(t,n){this._initOptions(n),this.map=t,this.element=e("<div class='k-layer'></div>").css({zIndex:this.options.zIndex,opacity:this.options.opacity}).appendTo(t.scrollElement),this._beforeReset=i(this._beforeReset,this),this._reset=i(this._reset,this),this._resize=i(this._resize,this),this._panEnd=i(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(),i=!c(e.minZoom)||t>=e.minZoom,n=!c(e.maxZoom)||t<=e.maxZoom,o=a.create(e.extent),r=!o||o.overlaps(this.map.extent());this._setVisibility(i&&n&&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)}});s(r,{map:{layers:{Layer:d}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/layers/shape.min",["dataviz/map/layers/base.min","dataviz/map/location.min"],e)}(function(){!function(e,t){var i=e.proxy,n=window.kendo,o=n.Class,r=n.data.DataSource,s=n.dataviz,a=n.deepExtend,l=n.geometry,c=n.drawing,d=c.Group,u=c.util.last,h=c.util.defined,p=s.map,f=p.Location,m=p.layers.Layer,g=m.extend({init:function(e,t){this._pan=i(this._pan,this),m.fn.init.call(this,e,t),this.surface=c.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(){m.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(){m.fn._reset.call(this),this._translateSurface(),this._data&&this._load(this._data)},_initRoot:function(){this._root=new d,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=i(this._dataChange,this),this.dataSource=r.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,i,n;for(this._clearMarkers(),this._loader||(this._loader=new v(this.map,this.options.style,this)),t=new d,i=0;i<e.length;i++)n=this._loader.parse(e[i]),n&&t.append(n);this._root.clear(),this._root.append(t)},shapeCreated:function(e){var t,i=!1;return e instanceof c.Circle&&(i=h(this._createMarker(e))),i||(t={layer:this,shape:e},i=this.map.trigger("shapeCreated",t)),i},featureCreated:function(e){e.layer=this,this.map.trigger("shapeFeatureCreated",e)},_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;e<this._markers.length;e++)this.map.markers.remove(this._markers[e]);this._markers=[]},_pan:function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},_panEnd:function(e){m.fn._panEnd.call(this,e),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},_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(i){if(i.element){var n={layer:t,shape:i.element,originalEvent:i.originalEvent};t.map.trigger(e,n)}}},_activate:function(){m.fn._activate.call(this),this.map.bind("pan",this._pan)},_deactivate:function(){m.fn._deactivate.call(this),this.map.unbind("pan",this._pan)}}),v=o.extend({init:function(e,t,i){this.observer=i,this.locator=e,this.style=t},parse:function(e){var t=new d,i=!0;return"Feature"===e.type?(i=!1,this._loadGeometryTo(t,e.geometry,e),this._featureCreated(t,e)):this._loadGeometryTo(t,e,e),i&&t.children.length<2&&(t=t.children[0]),t},_shapeCreated:function(e){var t=!1;return this.observer&&this.observer.shapeCreated&&(t=this.observer.shapeCreated(e)),t},_featureCreated:function(e,t){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:e,dataItem:t,properties:t.properties})},_loadGeometryTo:function(e,t,i){var n,o,r=t.coordinates;switch(t.type){case"LineString":o=this._loadPolygon(e,[r],i),this._setLineFill(o);break;case"MultiLineString":for(n=0;n<r.length;n++)o=this._loadPolygon(e,[r[n]],i),this._setLineFill(o);break;case"Polygon":this._loadPolygon(e,r,i);break;case"MultiPolygon":for(n=0;n<r.length;n++)this._loadPolygon(e,r[n],i);break;case"Point":this._loadPoint(e,r,i);break;case"MultiPoint":for(n=0;n<r.length;n++)this._loadPoint(e,r[n],i)}},_setLineFill:function(e){var t=e.segments;(t.length<4||!t[0].anchor().equals(u(t).anchor()))&&(e.options.fill=null)},_loadShape:function(e,t){return this._shapeCreated(t)||e.append(t),t},_loadPolygon:function(e,t,i){var n=this._buildPolygon(t);return n.dataItem=i,this._loadShape(e,n)},_buildPolygon:function(e){var t,i,n,o=e.length>1?c.MultiPath:c.Path,r=new o(this.style);for(t=0;t<e.length;t++)for(i=0;i<e[t].length;i++)n=this.locator.locationToView(f.fromLngLat(e[t][i])),0===i?r.moveTo(n.x,n.y):r.lineTo(n.x,n.y);return r},_loadPoint:function(e,t,i){var n=f.fromLngLat(t),o=this.locator.locationToView(n),r=new l.Circle(o,10),s=new c.Circle(r,this.style);return s.dataItem=i,s.location=n,this._loadShape(e,s)}});a(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"}}}}),a(s,{map:{layers:{shape:g,ShapeLayer:g},GeoJSONLoader:v}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/layers/bubble.min",["dataviz/map/layers/shape.min"],e)}(function(){!function(e,t){var i=window.kendo,n=i.getter,o=i.dataviz,r=i.deepExtend,s=i.geometry,a=i.drawing,l=a.util,c=l.defined,d=o.map,u=d.Location,h=d.layers.ShapeLayer,p=h.extend({options:{autoBind:!0,locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle"},_load:function(e){var t,i,o,r,s,a,l,d,h,p,f;if(this.surface.clear(),0!==e.length)for(t=this.options,i=n(t.valueField),e=e.slice(0),e.sort(function(e,t){return i(t)-i(e)}),o=this._scaleType(),s=0;s<e.length;s++)a=e[s],l=n(t.locationField)(a),d=n(t.valueField)(a),c(l)&&c(d)&&(r||(r=new o([0,d],[t.minSize,t.maxSize])),l=u.create(l),h=this.map.locationToView(l),p=r.map(d),f=this._createSymbol({center:h,size:p,style:t.style,dataItem:a,location:l}),f.dataItem=a,f.location=l,f.value=d,this._drawSymbol(f))},_scaleType:function(){var e=this.options.scale;return i.isFunction(e)?e:o.map.scales[e]},_createSymbol:function(e){var t=this.options.symbol;return i.isFunction(t)||(t=o.map.symbols[t]),t(e)},_drawSymbol:function(e){var t={layer:this,shape:e},i=this.map.trigger("shapeCreated",t);i||this.surface.draw(e)}}),f=i.Class.extend({init:function(e,t){var i,n;this._domain=e,this._range=t,i=Math.sqrt(e[1])-Math.sqrt(e[0]),n=t[1]-t[0],this._ratio=n/i},map:function(e){var t=(Math.sqrt(e)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t}}),m={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),i=e.size/2,n=e.center;return t.moveTo(n.x-i,n.y-i).lineTo(n.x+i,n.y-i).lineTo(n.x+i,n.y+i).lineTo(n.x-i,n.y+i).close(),t}};r(o,{map:{layers:{bubble:p,BubbleLayer:p},scales:{sqrt:f},symbols:m}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/layers/tile.min",["dataviz/map/layers/base.min","dataviz/map/location.min"],e)}(function(){!function(e,t){function i(e){return new u(g(e.x),g(e.y))}var n=Math,o=e.proxy,r=window.kendo,s=r.Class,a=r.template,l=r.dataviz,c=r.deepExtend,d=r.geometry,u=d.Point,h=l.map.layers.Layer,p=r.util,f=p.renderSize,m=r.drawing.util,g=m.round,v=m.limitValue,_=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 i=this._viewType();this._view=new i(this.element,this.options)},destroy:function(){h.fn.destroy.call(this),this._view.destroy(),this._view=null},_beforeReset:function(){var e=this.map,t=e.locationToLayer(e.extent().nw).round();this._view.viewOrigin(t)},_reset:function(){h.fn._reset.call(this),this._updateView(),this._view.reset()},_viewType:function(){return b},_activate:function(){h.fn._activate.call(this),r.support.mobileOS||(this._pan||(this._pan=r.throttle(o(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,i=t.extent(),n={nw:t.locationToLayer(i.nw).round(),se:t.locationToLayer(i.se).round()};e.center(t.locationToLayer(t.center())),e.extent(n),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()}}),b=s.extend({init:function(e,t){this.element=e,this._initOptions(t),this.pool=new y},options:{tileSize:256,subdomains:["a","b","c"],urlTemplate:""},center:function(e){this._center=e},extent:function(e){this._extent=e},viewOrigin:function(e){this._viewOrigin=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,i=t.clone().translate(-e.x,-e.y);return{width:i.x,height:i.y}},indexToPoint:function(e){var t=e.x,i=e.y;return new u(t*this.options.tileSize,i*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.render()},render:function(){var e,t,i,n=this.tileCount(),o=this.pointToTileIndex(this._extent.nw);for(t=0;t<n.x;t++)for(i=0;i<n.y;i++)e=this.createTile({x:o.x+t,y:o.y+i}),e.visible||e.show()},createTile:function(e){var t=this.tileOptions(e),i=this.pool.get(this._center,t);return 0===i.element.parent().length&&this.element.append(i.element),i},tileOptions:function(e){var t=this.wrapIndex(e),n=this.indexToPoint(e),o=this._viewOrigin,r=n.clone().translate(-o.x,-o.y);return{index:t,currentIndex:e,point:n,offset:i(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:v(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)}}),w=s.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;' alt='' />").css({width:this.options.size,height:this.options.size}).on("error",o(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=f(this.options.offset.y),t.style.left=f(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=a(this.options.urlTemplate);return e(this.urlOptions())},errorUrl:function(){var e=a(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)}}),y=s.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;e<t.length;e++)t[e].destroy();this._items=[]},reset:function(){var e,t=this._items;for(e=0;e<t.length;e++)t[e].hide()},_create:function(e){var t,i,n=this._items,o=p.hashKey(""+e.point+(""+e.offset)+e.zoom+e.urlTemplate);for(i=0;i<n.length;i++)if(n[i].id===o){t=n[i];break}return t?t.show():(t=new w(o,e),this._items.push(t)),t},_remove:function(e){var t,i,n=this._items,o=-1,r=-1;for(t=0;t<n.length;t++)i=n[t].options.point.distanceTo(e),i>o&&!n[t].visible&&(r=t,o=i);r!==-1&&(n[r].destroy(),n.splice(r,1))}});c(l,{map:{layers:{tile:_,TileLayer:_,ImageTile:w,TilePool:y,TileView:b}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/layers/bing.min",["dataviz/map/layers/tile.min"],e)}(function(){!function(e,t){var i=window.kendo,n=i.dataviz,o=i.deepExtend,r=i.drawing.util.defined,s=n.map.Extent,a=n.map.Location,l=n.map.layers.TileLayer,c=n.map.layers.TileView,d=l.extend({init:function(t,i){this.options.baseUrl=this._scheme()+"://dev.virtualearth.net/REST/v1/Imagery/Metadata/",l.fn.init.call(this,t,i),this._onMetadata=e.proxy(this._onMetadata,this),this._fetchMetadata()},options:{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()},type:"get",dataType:"jsonp",jsonp:"jsonp",success:this._onMetadata})},_scheme:function(e){return e=e||window.location.protocol,"https"===e.replace(":","")?"https":"http"},_onMetadata:function(e){var t,i;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}),i=this.options,r(i.minZoom)||(i.minZoom=t.zoomMin),r(i.maxZoom)||(i.maxZoom=t.zoomMax),this._addAttribution(),"none"!==this.element.css("display")&&this._reset())},_viewType:function(){return u},_addAttribution:function(){var e,t,i,n,o,r=this.map.attribution;if(r&&(e=this.resource.imageryProviders))for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.coverageAreas.length;n++)o=i.coverageAreas[n],r.add({text:i.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(),t):this.options.imagerySet}}),u=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,i,n,o="";for(n=this._zoom;n>0;n--)t=0,i=1<<n-1,0!==(e.x&i)&&t++,0!==(e.y&i)&&(t+=2),o+=t;return o}});o(n,{map:{layers:{bing:d,BingLayer:d,BingView:u}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/layers/marker.min",["dataviz/map/layers/base.min","dataviz/map/location.min","kendo.data.min","kendo.tooltip.min"],e)}(function(){!function(e,t){var i=document,n=Math,o=e.inArray,r=e.proxy,s=window.kendo,a=s.Class,l=s.data.DataSource,c=s.ui.Tooltip,d=s.dataviz,u=s.deepExtend,h=d.map,p=h.Location,f=h.layers.Layer,m=f.extend({init:function(e,t){f.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(){f.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 i=0;i<t.length;i++)this._addOne(t[i])},remove:function(e){e.destroy();var t=o(e,this.items);t>-1&&this.items.splice(t,1)},clear:function(){for(var e=0;e<this.items.length;e++)this.items[e].destroy();this.items=[]},update:function(e){var t,i=e.location();i&&(e.showAt(this.map.locationToView(i)),t={marker:e,layer:this},this.map.trigger("markerActivate",t))},_reset:function(){var e,t;for(f.fn._reset.call(this),e=this.items,t=0;t<e.length;t++)this.update(e[t])},bind:function(e,t){var i,n,o=h.Marker.create(e,this.options);if(o.dataItem=t,i={marker:o,layer:this},n=this.map.trigger("markerCreated",i),!n)return this.add(o),o},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=g.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,i,n,o;for(this._data=e,this.clear(),t=s.getter(this.options.locationField),i=s.getter(this.options.titleField),n=0;n<e.length;n++)o=e[n],this.bind({location:t(o),title:i(o)},o)},_markerClick:function(t){var i={marker:e(t.target).data("kendoMarker"),layer:this};this.map.trigger("markerClick",i)}}),g=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=p.create(e).toArray(),this.layer&&this.layer.update(this),this):p.create(this.options.location)},showAt:function(e){this.render(),this.element.css({left:n.round(e.x),top:n.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,n;this.element||(t=this.options,n=this.layer,this.element=e(i.createElement("span")).addClass("k-marker k-icon k-i-marker-"+s.toHyphens(t.shape||"pin")).attr("title",t.title).attr(t.attributes||{}).data("kendoMarker",this).css("zIndex",t.zIndex),n&&n.element.append(this.element),this.renderTooltip())},renderTooltip:function(){var e,t,i=this,n=i.options.title,o=i.options.tooltip||{};o&&c&&(e=o.template,e&&(t=s.template(e),o.content=function(e){return e.location=i.location(),e.marker=i,t(e)}),(n||o.content||o.contentUrl)&&(this.tooltip=new c(this.element,o),this.tooltip.marker=this))}});g.create=function(e,t){return e instanceof g?e:new g(u({},t,e))},u(d,{map:{layers:{marker:m,MarkerLayer:m},Marker:g}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/map/main.min",["dataviz/map/crs.min","dataviz/map/location.min"],e)}(function(){!function(e,t){var i=document,n=Math,o=n.min,r=n.pow,s=e.proxy,a=window.kendo,l=a.ui.Widget,c=a.deepExtend,d=a.dataviz,u=d.ui,h=a.geometry,p=h.Point,f=d.map,m=f.Extent,g=f.Location,v=f.crs.EPSG3857,_=a.util,b=_.renderPos,w=a.drawing.util,y=w.defined,k=w.limitValue,x=w.valueOrDefault,C="k-",S=.9,T=.93,D="DOMMouseScroll mousewheel",A=5,E=1,I=l.extend({init:function(e,t){a.destroy(e),l.fn.init.call(this,e),this._initOptions(t),this.bind(this.events,t),this.crs=new v,this.element.addClass(C+this.options.name.toLowerCase()).css("position","relative").empty().append(i.createElement("div")),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheel=s(this._mousewheel,this),this.element.bind(D,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","markerActivate","markerClick","markerCreated","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"],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;e<this.layers.length;e++)this.layers[e].destroy();l.fn.destroy.call(this)},zoom:function(e){var t=this.options;return y(e)?(e=n.round(k(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){l.fn.setOptions.call(this,e),this._reset()},locationToLayer:function(e,t){var i=!this.options.wraparound;return e=g.create(e),this.crs.toPoint(e,this._layerSize(t),i)},layerToLocation:function(e,t){var i=!this.options.wraparound;return e=p.create(e),this.crs.toLocation(e,this._layerSize(t),i)},locationToView:function(e){var t,i;return e=g.create(e),t=this.locationToLayer(this._viewOrigin),i=this.locationToLayer(e),i.translateWith(t.scale(-1))},viewToLocation:function(e,t){var i=this.locationToLayer(this._getOrigin(),t);return e=p.create(e),e=e.clone().translateWith(i),this.layerToLocation(e,t)},eventOffset:function(e){var t,i,n,o,r,s=this.element.offset();return e.x||e.y?(o="location",i=e.x[o]-s.left,n=e.y[o]-s.top,t=new h.Point(i,n)):(r=e.originalEvent||e,i=x(r.pageX,r.clientX)-s.left,n=x(r.pageY,r.clientY)-s.top,t=new h.Point(i,n)),t},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(),i=e.width();return this.options.wraparound||(i=o(t,i)),{width:i,height:o(t,e.height())}},exportVisual:function(){return this._reset(),!1},_setOrigin:function(e,t){var i,n=this.viewSize();return e=this._origin=g.create(e),i=this.locationToLayer(e,t),i.x+=n.width/2,i.y+=n.height/2,this.options.center=this.layerToLocation(i,t).toArray(),this},_getOrigin:function(e){var t,i=this.viewSize();return!e&&this._origin||(t=this.locationToLayer(this.center()),t.x-=i.width/2,t.y-=i.height/2,this._origin=this.layerToLocation(t)),this._origin},_setExtent:function(e){var t,i,o,r,s,a,l,c=m.create(e),d=c.se.clone();for(this.options.wraparound&&d.lng<0&&e.nw.lng>0&&(d.lng=180+(180+d.lng)),e=new m(c.nw,d),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),!(a<=t&&l<=i));o--);this.zoom(o)},_getExtent:function(){var e,t=this._getOrigin(),i=this.locationToLayer(t),n=this.viewSize();return i.x+=n.width,i.y+=n.height,e=this.layerToLocation(i),new m(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),a.support.mobileOS||(u.Navigator&&e.navigator&&this._createNavigator(e.navigator),u.ZoomControl&&e.zoom&&this._createZoomControl(e.zoom))},_createControlElement:function(t,i){var n=t.position||i,o="."+b(n).replace(" ","."),r=e(".k-map-controls"+o,this.element);return 0===r.length&&(r=e("<div>").addClass("k-map-controls "+b(n)).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"),i=this.navigator=new u.Navigator(t,e);this._navigatorPan=s(this._navigatorPan,this),i.bind("pan",this._navigatorPan),this._navigatorCenter=s(this._navigatorCenter,this),i.bind("center",this._navigatorCenter)},_navigatorPan:function(e){var t=this,i=t.scroller,n=i.scrollLeft+e.x,o=i.scrollTop-e.y,r=this._virtualSize,s=this.element.height(),a=this.element.width();n=k(n,r.x.min,r.x.max-a),o=k(o,r.y.min,r.y.max-s),t.scroller.one("scroll",function(e){t._scrollEnd(e)}),t.scroller.scrollTo(-n,-o)},_navigatorCenter:function(){this.center(this.options.center)},_createZoomControl:function(e){var t=this._createControlElement(e,"topLeft"),i=this.zoomControl=new u.ZoomControl(t,e);this._zoomControlChange=s(this._zoomControlChange,this),i.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=a.support.mobileOS?T:S,t=this.options.zoomable!==!1,i=this.scroller=new a.mobile.ui.Scroller(this.element.children(0),{friction:e,velocityMultiplier:A,zoom:t,mousewheelScrolling:!1,supportDoubleTap:!0});i.bind("scroll",s(this._scroll,this)),i.bind("scrollEnd",s(this._scrollEnd,this)),i.userEvents.bind("gesturestart",s(this._scaleStart,this)),i.userEvents.bind("gestureend",s(this._scale,this)),i.userEvents.bind("doubleTap",s(this._doubleTap,this)),i.userEvents.bind("tap",s(this._tap,this)),this.scrollElement=i.scrollElement},_initLayers:function(){var e,t,i,n,o,r=this.options.layers,s=this.layers=[];for(e=0;e<r.length;e++)t=r[e],i=t.type||"shape",n=this.options.layerDefaults[i],o=d.map.layers[i],s.push(new o(this,c({},n,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(),i=e.sender.movable,n=new h.Point(i.x,i.y).scale(-1).scale(1/i.scale);t.x+=n.x,t.y+=n.y,this._scrollOffset=n,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,i=this._scaleToZoom(t),n=new h.Point(e.center.x,e.center.y),o=this.viewToLocation(n,i),r=this.locationToLayer(o,i),s=r.translate(-n.x,-n.y);this._zoomAround(s,i),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,i,n,o=this.scroller,s=o.dimensions.x,a=o.dimensions.y,l=this._layerSize(),c=this.extent().nw,d=this.locationToLayer(c).round();o.movable.round=!0,o.reset(),o.userEvents.cancel(),e=this.zoom(),o.dimensions.forcedMinScale=r(2,this.options.minZoom-e),o.dimensions.maxScale=r(2,this.options.maxZoom-e),t={min:-d.x,max:l-d.x},i={min:-d.y,max:l-d.y},this.options.wraparound&&(t.max=20*l,t.min=-t.max),this.options.pannable===!1&&(n=this.viewSize(),t.min=i.min=0,t.max=n.width,i.max=n.height),s.makeVirtual(),a.makeVirtual(),s.virtualSize(t.min,t.max),a.virtualSize(i.min,i.max),this._virtualSize={x:t,y:i}},_renderLayers:function(){var e,t,i,n,o,r=this.options.layers,s=this.layers=[],a=this.scrollWrap;for(a.empty(),e=0;e<r.length;e++)t=r[e],i=t.type||"shape",n=this.options.layerDefaults[i],o=d.map.layers[i],s.push(new o(this,c({},n,t)))},_layerSize:function(e){return e=x(e,this.options.zoom),this.options.minSize*r(2,e)},_tap:function(e){if(this._panComplete()){var t=this.eventOffset(e);this.trigger("click",{originalEvent:e,location:this.viewToLocation(t)})}},_doubleTap:function(e){var t,i,n,o,r,s=this.options;s.zoomable!==!1&&(this.trigger("zoomStart",{originalEvent:e})||(t=this.zoom()+E,i=this.eventOffset(e),n=this.viewToLocation(i),o=this.locationToLayer(n,t),r=o.translate(-i.x,-i.y),this._zoomAround(r,t),this.trigger("zoomEnd",{originalEvent:e})))},_mousewheel:function(e){var t,i,n,o,r,s,a,l;e.preventDefault(),t=d.mwDelta(e)>0?-1:1,i=this.options,n=this.zoom(),o=k(n+t,i.minZoom,i.maxZoom),i.zoomable!==!1&&o!==n&&(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})))}});d.ui.plugin(I)}(window.kendo.jQuery);
},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.map.min",["kendo.data.min","kendo.userevents.min","kendo.tooltip.min","kendo.mobile.scroller.min","kendo.draganddrop.min","kendo.dataviz.core.min","dataviz/map/location.min","dataviz/map/attribution.min","dataviz/map/navigator.min","dataviz/map/zoom.min","dataviz/map/crs.min","dataviz/map/layers/base.min","dataviz/map/layers/shape.min","dataviz/map/layers/bubble.min","dataviz/map/layers/tile.min","dataviz/map/layers/bing.min","dataviz/map/layers/marker.min","dataviz/map/main.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/diagram/utils.min",["kendo.core.min"],e)}(function(){!function(e,t){function i(e,i,n){function o(e){for(var t=1;e*t%1;)t*=10;return t}var r,s,a,l;if(t===e||t===i)return[];if(n&&u.sign(i-e)!=u.sign(n))throw"The sign of the increment should allow to reach the stop-value.";if(n=n||1,e=e||0,i=i||e,(i-e)/n===1/0)throw"Infinite range defined.";if(r=[],s=-1,l=o(Math.abs(n)),e*=l,i*=l,n*=l,e>i&&n>0&&(n=-n),n<0)for(;(a=e+n*++s)>=i;)r.push(a/l);else for(;(a=e+n*++s)<=i;)r.push(a/l);return r}function n(e,t){if(e==t)return 0;var i=t.x-e.x,n=e.y-t.y,o=Math.atan(i/n);return n>=0?i<0?o+2*Math.PI:o:o+Math.PI}var o,r,s=window.kendo,a=s.dataviz.diagram={},l=s.deepExtend,c=e.isArray,d=1e-6,u={};l(u,{isNearZero:function(e){return Math.abs(e)<d},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)||u.isString(e))return 0===e.length;for(var t in e)if(u.has(e,t))return!1;return!0},simpleExtend:function(e,t){if(u.isObject(t))for(var i in t)e[i]=t[i]},initArray:function(e,t){var i,n=[];for(i=0;i<e;++i)n[i]=t;return n},serializePoints:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push(i.x+";"+i.y);return n.join(";")},deserializePoints:function(e){var t,i=e.split(";"),n=[];if(i.length%2!==0)throw"Not an array of points.";for(t=0;t<i.length;t+=2)n.push(new a.Point(parseInt(i[t],10),parseInt(i[t+1],10)));return n},randomInteger:function(e,t){return parseInt(Math.floor(Math.random()*t)+e,10)},DFT:function(e,t){var i,n;if(t(e),e.childNodes)for(i=0;i<e.childNodes.length;i++)n=e.childNodes[i],this.DFT(n,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),i=Math.sqrt(e.b*e.b+e.d*e.d);return[t,i]}}),u.sign=function(e){return e?e<0?-1:1:0},u.findAngle=function(e,t){return 180*n(e,t)/Math.PI},u.forEach=function(e,t,i){for(var n=0;n<e.length;n++)t.call(i,e[n],n,e)},u.any=function(e,t){for(var i=0;i<e.length;++i)if(t(e[i]))return e[i];return null},u.remove=function(e,t){for(var i;(i=u.indexOf(e,t))!==-1;)e.splice(i,1);return e},u.contains=function(e,t){return u.indexOf(e,t)!==-1},u.indexOf=function(t,i){return e.inArray(i,t)},u.fold=function(e,t,i,n){var o,r,s=arguments.length>2;for(o=0;o<e.length;o++)r=e[o],s?i=t.call(n,i,r,o,e):(i=r,s=!0);if(!s)throw"Reduce of empty array with no initial value";return i},u.find=function(e,t,i){var n;return u.any(e,function(e,o,r){return!!t.call(i,e,o,r)&&(n=e,!0)}),n},u.first=function(e,t,i){return 0===e.length?null:u.isUndefined(t)?e[0]:u.find(e,t,i)},u.insert=function(e,t,i){return e.splice(i,0,t),e},u.all=function(e,t,i){var n,o,r=!0;for(o=0;o<e.length&&(n=e[o],r=r&&t.call(i,n,o,e),r);o++);return r},u.clear=function(e){e.splice(0,e.length)},u.bisort=function(e,t,i){if(u.isUndefined(e))throw"First array is not specified.";if(u.isUndefined(t))throw"Second array is not specified.";if(e.length!=t.length)throw"The two arrays should have equal length";var n,o=[];for(n=0;n<e.length;n++)o.push({x:e[n],y:t[n]});for(o.sort(u.isUndefined(i)?function(e,t){return e.x-t.x}:function(e,t){return i(e.x,t.x)}),u.clear(e),u.clear(t),n=0;n<o.length;n++)e.push(o[n].x),t.push(o[n].y)},u.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&&u.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;e<this.adapters.length;e++)this.adapters[e].initState()},propagate:function(){var e,t=this.transition(this.tick);for(e=0;e<this.adapters.length;e++)this.adapters[e].update(t)},onTimerEvent:function(){var e,t=(new Date).getTime(),i=t-this.lastTime;this.lastTime=t,e=i/this.duration*(this.tick<this.target?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:u,Range:i,Ticker:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/diagram/math.min",["dataviz/diagram/utils.min","kendo.dataviz.core.min"],e)}(function(){!function(e,t){function i(e){return Math.abs(e)<F}function n(e,t,n,o,r){var s,a,l,c,d=(t.x-e.x)*(o.y-n.y)-(t.y-e.y)*(o.x-n.x);if(!i(d)&&(s=(e.y-n.y)*(o.x-n.x)-(e.x-n.x)*(o.y-n.y),a=(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y),l=s/d,c=a/d,!r||!(l<0||l>1||c<0||c>1)))return new A(e.x+l*(t.x-e.x),e.y+l*(t.y-e.y))}function o(e,t){var i,n,o;do i=2*Math.random()-1,n=2*Math.random()-1,o=i*i+n*n;while(!o||o>1);return e+t*i*Math.sqrt(-2*Math.log(o)/o)}function r(e){var t,i,n;for(D.isUndefined(e)&&(e=10),t="",i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=e;n>0;--n)t+=i.charAt(Math.round(Math.random()*(i.length-1)));return t}var s,a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k=window.kendo,x=k.dataviz.diagram,C=k.Class,S=k.deepExtend,T=k.dataviz,D=x.Utils,A=T.Point2D,E=k.isFunction,I=D.contains,M=e.map,R=3,F=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,i,n,o=1;if(e&&(o=180/Math.PI),t=Math.atan2(Math.abs(this.y),Math.abs(this.x)),i=Math.PI/2,n=this.length(),0===this.x){if(0===this.y)return new u(0,0);if(this.y>0)return new u(n,o*i);if(this.y<0)return new u(n,3*o*i)}else if(this.x>0){if(0===this.y)return new u(n,0);if(this.y>0)return new u(n,o*t);if(this.y<0)return new u(n,o*(4*i-t))}else{if(0===this.y)return new u(n,2*i);if(this.y>0)return new u(n,o*(2*i-t));if(this.y<0)return new u(n,o*(2*i+t))}},isOnLine:function(e,t){var i,n,o,r,s;return e.x>t.x&&(i=t,t=e,e=i),n=new a(e.x,e.y).inflate(R,R),o=new a(t.x,t.y).inflate(R,R),!!n.union(o).contains(this)&&(e.x===t.x||e.y===t.y||(e.y<t.y?(r=n.x+(o.x-n.x)*(this.y-(n.y+n.height))/(o.y+o.height-(n.y+n.height)),s=n.x+n.width+(o.x+o.width-(n.x+n.width))*(this.y-n.y)/(o.y-n.y)):(r=n.x+(o.x-n.x)*(this.y-n.y)/(o.y-n.y),s=n.x+n.width+(o.x+o.width-(n.x+n.width))*(this.y-(n.y+n.height))/(o.y+o.height-(n.y+n.height))),this.x>r&&this.x<s))}}),S(A,{parse:function(e){var t=e.slice(1,e.length-1),i=t.split(","),n=parseInt(i[0],10),o=parseInt(i[1],10);if(!isNaN(n)&&!isNaN(o))return new A(n,o)}}),s=C.extend({init:function(e,t,i){this.point=e,this.left=t,this.right=i}}),a=C.extend({init:function(e,t,i,n){this.x=e||0,this.y=t||0,this.width=i||0,this.height=n||0},contains:function(e){return e.x>=this.x&&e.x<=this.x+this.width&&e.y>=this.y&&e.y<=this.y+this.height},inflate:function(e,i){return i===t&&(i=e),this.x-=e,this.y-=i,this.width+=2*e+1,this.height+=2*i+1,this},offset:function(e,t){var i=e,n=t;return e instanceof A&&(i=e.x,n=e.y),this.x+=i,this.y+=n,this},union:function(e){var t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),n=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,i,n-t,o-i)},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(),i=this.rotatedPoints(e),n=i[0],o=i[1],r=i[2],s=i[3];return t.x=Math.min(r.x,n.x,o.x,s.x),t.y=Math.min(r.y,n.y,o.y,s.y),t.width=Math.max(r.x,n.x,o.x,s.x)-t.x,t.height=Math.max(r.y,n.y,o.y,s.y)-t.y,t},rotatedPoints:function(e){var t=this,i=t.center(),n=t.bottomRight().rotate(i,360-e),o=t.topLeft().rotate(i,360-e),r=t.topRight().rotate(i,360-e),s=t.bottomLeft().rotate(i,360-e);return[o,r,n,s]},toString:function(e){return e=e||" ",this.x+e+this.y+e+this.width+e+this.height},scale:function(e,t,i,n,o){var r,s,a,l=this.topLeft(),c=this.center();l.rotate(c,360-o).rotate(n,o),r=i.minus(l),s=new A(r.x*e,r.y*t),a=r.minus(s),l=l.plus(a),l.rotate(n,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(),i=e.bottomRight(),n=!(t.x<e.x||t.y<e.y||i.x<this.x||i.y<this.y);return n}}),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,i,o){return n(e,t,i,o)},segments:function(e,t,i,o){return n(e,t,i,o,!0)},rectWithLine:function(e,t,i){return c.segments(t,i,e.topLeft(),e.topRight())||c.segments(t,i,e.topRight(),e.bottomRight())||c.segments(t,i,e.bottomLeft(),e.bottomRight())||c.segments(t,i,e.topLeft(),e.bottomLeft())},rects:function(e,t,i){var n,o,r=t.topLeft(),s=t.topRight(),a=t.bottomLeft(),l=t.bottomRight(),d=t.center();return i&&(r=r.rotate(d,i),s=s.rotate(d,i),a=a.rotate(d,i),l=l.rotate(d,i)),n=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),n||(r=e.topLeft(),s=e.topRight(),a=e.bottomLeft(),l=e.bottomRight(),i&&(o=360-i,r=r.rotate(d,o),s=s.rotate(d,o),a=a.rotate(d,o),l=l.rotate(d,o)),n=t.contains(r)||t.contains(s)||t.contains(a)||t.contains(l)),n}},d=C.extend({init:function(e){this.container=a.toRect(e)},align:function(e,t){var i,n=t.toLowerCase().split(" ");for(i=0;i<n.length;i++)e=this._singleAlign(e,n[i]);return e},_singleAlign:function(e,t){return E(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}}),u=C.extend({init:function(e,t){this.r=e,this.angle=t}}),h=C.extend({init:function(e,t,i,n,o,r){this.a=e||0,this.b=t||0,this.c=i||0,this.d=n||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 h(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(h,{fromSVGMatrix:function(e){var t=new h;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 h;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 h;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 i=new h;return i.a=1,i.b=0,i.c=0,i.d=1,i.e=e,i.f=t,i},unit:function(){return new h(1,0,0,1,0,0)},rotation:function(e,t,i){var n=new h;return n.a=Math.cos(e*Math.PI/180),n.b=Math.sin(e*Math.PI/180),n.c=-n.b,n.d=n.a,n.e=t-t*n.a+i*n.b||0,n.f=i-i*n.a-t*n.b||0,n},scaling:function(e,t){var i=new h;return i.a=e,i.b=0,i.c=0,i.d=t,i.e=0,i.f=0,i},parse:function(e){var t,i;if(e){if(e=e.trim(),"matrix"===e.slice(0,6).toLowerCase()){if(i=e.slice(7,e.length-1).trim(),t=i.split(","),6===t.length)return h.fromList(M(t,function(e){return parseFloat(e)}));if(t=i.split(" "),6===t.length)return h.fromList(M(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 h.fromList(M(t,function(e){return parseFloat(e)}));if(e.indexOf(" ")>0&&(t=e.split(" "),6===t.length))return h.fromList(M(t,function(e){return parseFloat(e)}))}return t}}),p=C.extend({init:function(e,t,i,n,o,r){this.a=e||0,this.b=t||0,this.c=i||0,this.d=n||0,this.e=o||0,this.f=r||0},fromMatrix:function(e){var t=new p;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}}),f={_distanceToLineSquared:function(e,t,i){function n(e,t){return(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)}if(t===i)return n(e,t);var o=i.x-t.x,r=i.y-t.y,s=(e.x-t.x)*o+(e.y-t.y)*r;return s<0?n(t,e):(s=(i.x-e.x)*o+(i.y-e.y)*r,s<0?n(i,e):(s=(i.x-e.x)*r-(i.y-e.y)*o,s*s/(o*o+r*r)))},distanceToLine:function(e,t,i){return Math.sqrt(this._distanceToLineSquared(e,t,i))},distanceToPolyline:function(e,t){var i,n,o,r,s=Number.MAX_VALUE;if(D.isUndefined(t)||0===t.length)return Number.MAX_VALUE;for(i=0;i<t.length-1;i++)n=t[i],o=t[i+1],r=this._distanceToLineSquared(e,n,o),r<s&&(s=r);return Math.sqrt(s)}},m=k.Class.extend({init:function(){this._buckets=[],this.length=0},add:function(e,t){var i=this._createGetBucket(e);return D.isDefined(t)&&(i.value=t),i},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,i,n,o,r=this._hashes();for(t=0,i=r.length;t<i;t++)n=r[t],o=this._buckets[n],D.isUndefined(o)||e(o)},clone:function(){var e,t,i,n,o=new m,r=this._hashes();for(e=0,t=r.length;e<t;e++)i=r[e],n=this._buckets[i],D.isUndefined(n)||o.add(n.key,n.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),i=this._buckets[t];return D.isUndefined(i)&&(i={key:e},this._buckets[t]=i,this.length++),i},_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,i,n=0;if(0===e.length)return n;for(t=0;t<e.length;t++)i=e.charCodeAt(t),n=32*n-n+i;return n},_objectHashId:function(e){var t=e._hashId;return D.isUndefined(t)&&(t=r(),e._hashId=t),t}}),g=k.Observable.extend({init:function(t){var i,n=this;if(k.Observable.fn.init.call(n),this._hashTable=new m,this.length=0,D.isDefined(t))if(e.isArray(t))for(i=0;i<t.length;i++)this.add(t[i]);else t.forEach(function(e,t){this.add(e,t)},this)},add:function(e,t){var i=this._hashTable.get(e);i||(i=this._hashTable.add(e),this.length++,this.trigger("changed")),i.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){if(this.containsKey(e))return this.trigger("changed"),this.length--,this._hashTable.remove(e)},forEach:function(e,t){this._hashTable.forEach(function(i){e.call(t,i.key,i.value)})},forEachValue:function(e,t){this._hashTable.forEach(function(i){e.call(t,i.value)})},forEachKey:function(e,t){this._hashTable.forEach(function(i){e.call(t,i.key)})},keys:function(){var e=[];return this.forEachKey(function(t){e.push(t)}),e}}),v=k.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(this.length<1)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}}),_=k.Observable.extend({init:function(e){var t=this;k.Observable.fn.init.call(t),this._hashTable=new m,this.length=0,D.isDefined(e)&&(e instanceof m?e.forEach(function(e){this.add(e)}):e instanceof g&&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}}),b=k.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 i=t.bounds();this.width=i.width,this.height=i.height,this.x=i.x,this.y=i.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 x.Rect(this.x,this.y,this.width,this.height)},isLinkedTo:function(e){var t=this;return D.any(t.links,function(i){return i.getComplement(t)===e})},getChildren:function(){var e,t,i,n;if(0===this.outgoing.length)return[];for(e=[],t=0,i=this.outgoing.length;t<i;t++)n=this.outgoing[t],e.push(n.getComplement(this));return e},getParents:function(){var e,t,i,n;if(0===this.incoming.length)return[];for(e=[],t=0,i=this.incoming.length;t<i;t++)n=this.incoming[t],e.push(n.getComplement(this));return e},clone:function(){var e=new b;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 I(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=k.Class.extend({init:function(e,t,i,n){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 b(e):e,s=D.isString(t)?new b(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(i)?i:r(),this.associatedConnection=D.isDefined(n)?n: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 I(this.source.links,e)||I(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}}),y=k.Class.extend({init:function(e){this.links=[],this.nodes=[],this._nodeMap=new g,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,i,n;if(D.isUndefined(e)&&(e=!1),!this._hasCachedRelationships||e){for(t=0,i=this.nodes.length;t<i;t++)n=this.nodes[t],n.children=this.getChildren(n),n.parents=this.getParents(n);this._hasCachedRelationships=!0}},assignLevels:function(e,t,i){var n,o,r,s;if(!e)throw"Start node not specified.";for(D.isUndefined(t)&&(t=0),this.cacheRelationships(),D.isUndefined(i)&&(i=new g,D.forEach(this.nodes,function(e){i.add(e,!1)})),i.set(e,!0),e.level=t,n=e.children,o=0,r=n.length;o<r;o++)s=n[o],s&&!i.get(s)&&this.assignLevels(s,t+1,i)},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,i,n,o;for(this.componentIndex=0,this.setItemIndices(),e=D.initArray(this.nodes.length,-1),t=0;t<this.nodes.length;t++)e[t]===-1&&(this._collectConnectedNodes(e,t),this.componentIndex++);for(i=[],n=0;n<this.componentIndex;++n)i[n]=new y;for(n=0;n<e.length;++n)o=i[e[n]],o.addNodeAndOutgoings(this.nodes[n]);return i.sort(function(e,t){return t.nodes.length-e.nodes.length}),i},_collectConnectedNodes:function(e,t){e[t]=this.componentIndex;var i=this.nodes[t];D.forEach(i.links,function(t){var n=t.getComplement(i),o=n.index;e[o]===-1&&this._collectConnectedNodes(e,o)},this)},calcBounds:function(){var e,t,i,n;if(this.isEmpty())return this.bounds=new a;for(e=null,t=0,i=this.nodes.length;t<i;t++)n=this.nodes[t],e=e?e.union(n.bounds()):n.bounds();return this.bounds=e},getSpanningTree:function(e){var t,i,n,o,r,s,a,l,c,d,u,h,p=new y,f=new g;for(p.root=e.clone(),p.root.level=0,p.root.id=e.id,f.add(e,p.root),e.level=0,n=[],o=[],p._addNode(p.root),n.push(e),o.push(e),r=1;o.length>0;)for(s=o.pop(),a=0;a<s.links.length;a++)l=s.links[a],c=l.getComplement(s),I(n,c)||(c.level=s.level+1,r<c.level+1&&(r=c.level+1),I(o,c)||o.push(c),I(n,c)||n.push(c),f.containsKey(s)?t=f.get(s):(t=s.clone(),t.level=s.level,t.id=s.id,f.add(s,t)),f.containsKey(c)?i=f.get(c):(i=c.clone(),i.level=c.level,i.id=c.id,f.add(c,i)),d=new w(t,i),p.addLink(d));for(u=[],h=0;h<r;h++)u.push([]);return D.forEach(p.nodes,function(e){u[e.level].push(e)}),p.treeLevels=u,p.cacheRelationships(),p},takeRandomNode:function(t,i){if(D.isUndefined(t)&&(t=[]),D.isUndefined(i)&&(i=4),0===this.nodes.length)return null;if(1===this.nodes.length)return I(t,this.nodes[0])?null:this.nodes[0];var n=e.grep(this.nodes,function(e){return!I(t,e)&&e.degree()<=i});return D.isEmpty(n)?null:n[D.randomInteger(0,n.length)]},isEmpty:function(){return D.isEmpty(this.nodes)},isHealthy:function(){return D.all(this.links,function(e){return I(this.nodes,e.source)&&I(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,i,n){var o,r,s;if(D.isUndefined(e))throw"The source of the link is not defined.";if(D.isUndefined(i)){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(i),D.isUndefined(r)&&(r=this.addNode(i)),s=new w(o,r),D.isDefined(n)&&(s.owner=n),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,i;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)?(i=this.getNode(e.target.id),e.changeTarget(i)):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 I(this.links,e);throw"The given object is neither an identifier nor a Link."},getNode:function(e){var t=e.id||e;if(this._nodeMap.containsKey(t))return this._nodeMap.get(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,i,n,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=[],i=0,n=t.length;i<n;i++)o=t[i],this.removeLink(o);this._removeNode(r)},areConnected:function(e,t){return D.any(this.links,function(i){return i.source==e&&i.target==t||i.source==t&&i.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,i){var n=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);n=new b(e)}else{if(this.hasNode(e))return this.getNode(e);n=e}return D.isDefined(t)&&n.bounds(t),D.isDefined(i)&&(n.owner=i),this._addNode(n),n},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;e<this.nodes.length;++e)this.nodes[e].index=e;for(e=0;e<this.links.length;++e)this.links[e].index=e},clone:function(e){var t,i=new y,n=D.isDefined(e)&&e===!0;return n&&(i.nodeMap=new g,i.linkMap=new g),t=new g,D.forEach(this.nodes,function(e){var o=e.clone();t.set(e,o),i._addNode(o),n&&i.nodeMap.set(o,e)}),D.forEach(this.links,function(e){if(t.containsKey(e.source)&&t.containsKey(e.target)){var o=i.addLink(t.get(e.source),t.get(e.target));n&&i.linkMap.set(o,e)}}),i},linearize:function(e){return y.Utils.linearize(this,e)},depthFirstTraversal:function(e,t){var i,n;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";i=this.getNode(e),n=[],this._dftIterator(i,t,n)},_dftIterator:function(e,t,i){var n,o,r,s;for(t(e),i.push(e),n=e.getChildren(),o=0,r=n.length;o<r;o++)s=n[o],I(i,s)||this._dftIterator(s,t,i)},breadthFirstTraversal:function(e,t){var i,n,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(i=this.getNode(e),n=new v,o=[],n.enqueue(i);n.length>0;)for(r=n.dequeue(),t(r),o.push(r),s=r.getChildren(),a=0,l=s.length;a<l;a++)c=s[a],I(o,c)||I(n,c)||n.enqueue(c)},_stronglyConnectedComponents:function(e,t,i,n,o,r,s){var a,l,c,d,u;for(i.add(t,s),n.add(t,s),s++,r.push(t),a=t.getChildren(),c=0,d=a.length;c<d;c++)l=a[c],i.containsKey(l)?I(r,l)&&n.add(t,Math.min(n.get(t),i.get(l))):(this._stronglyConnectedComponents(e,l,i,n,o,r,s),n.add(t,Math.min(n.get(t),n.get(l))));if(n.get(t)===i.get(t)){u=[];do l=r.pop(),u.push(l);while(l!==t);(!e||u.length>1)&&o.push(u)}},findCycles:function(e){var t,i,n,o,r,s,a;for(D.isUndefined(e)&&(e=!0),t=new g,i=new g,n=[],o=[],r=0,s=this.nodes.length;r<s;r++)a=this.nodes[r],t.containsKey(a)||this._stronglyConnectedComponents(e,a,t,i,n,o,0);return n},isAcyclic:function(){return D.isEmpty(this.findCycles())},isSubGraph:function(e){var t=e.linearize(),i=this.linearize();return D.all(t,function(e){return I(i,e)})},makeAcyclic:function(){var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,v,_,b,w,y,k,x,C,S,T,A,E,I,M,R,F;
if(this.isEmpty()||this.nodes.length<=1||this.links.length<=1)return[];if(2==this.nodes.length){if(e=[],this.links.length>1)for(t=this.links[0],i=t.source,n=0,o=this.links.length;n<o;n++)r=this.links[n],r.source!=i&&(s=r.reverse(),e.push(s));return e}for(a=this.clone(!0),l=this.nodes.length,c=new g,d=function(e){return 0===e.outgoing.length?2-l:0===e.incoming.length?l-2:e.outgoing.length-e.incoming.length},u=function(e,t){var i=d(e,l);t.containsKey(i)||t.set(i,[]),t.get(i).push(e)},D.forEach(a.nodes,function(e){u(e,c)}),h=[],p=[];a.nodes.length>0;){if(c.containsKey(2-l))for(_=c.get(2-l);_.length>0;){for(m=_.pop(),b=0;b<m.links.length;b++)w=m.links[b],f=w.getComplement(m),v=d(f,l),D.remove(c.get(v),f),f.removeLink(w),u(f,c);a._removeNode(m),p.unshift(m)}if(c.containsKey(l-2))for(y=c.get(l-2);y.length>0;){for(f=y.pop(),k=0;k<f.links.length;k++)x=f.links[k],m=x.getComplement(f),v=d(m,l),D.remove(c.get(v),m),m.removeLink(x),u(m,c);h.push(f),a._removeNode(f)}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;A<T.links.length;A++)E=T.links[A],I=E.getComplement(T),v=d(I,l),D.remove(c.get(v),I),I.removeLink(E),u(I,c);h.push(T),a._removeNode(T);break}}for(h=h.concat(p),M=new g,R=0;R<this.nodes.length;R++)M.set(a.nodeMap.get(h[R]),R);return F=[],D.forEach(this.links,function(e){M.get(e.source)>M.get(e.target)&&(e.reverse(),F.push(e))}),F}}),y.Predefined={EightGraph:function(){return y.Utils.parse(["1->2","2->3","3->4","4->1","3->5","5->6","6->7","7->3"])},Mindmap:function(){return y.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 y.Utils.parse(["1->2","2->3","3->1"])},BinaryTree:function(e){return D.isUndefined(e)&&(e=5),y.Utils.createBalancedTree(e,2)},Linear:function(e){return D.isUndefined(e)&&(e=10),y.Utils.createBalancedTree(e,1)},Tree:function(e,t){return y.Utils.createBalancedTree(e,t)},Forest:function(e,t,i){return y.Utils.createBalancedForest(e,t,i)},Workflow:function(){return y.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 i,n,o,r,s,a=new x.Graph;if(e<=0&&t<=0)return a;for(i=0;i<e+1;i++)for(n=null,o=0;o<t+1;o++)r=new b(""+i+"."+o),a.addNode(r),n&&a.addLink(n,r),i>0&&(s=a.getNode(""+(i-1)+"."+o),a.addLink(s,r)),n=r;return a}},y.Utils={parse:function(e){var t,i,n,o,r,s=new x.Graph,a=e.slice();for(i=0,n=a.length;i<n;i++){if(o=a[i],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.";k.deepExtend(t,o)}}return s},linearize:function(e,t){var i,n,o,r;if(D.isUndefined(e))throw"Expected an instance of a Graph object in slot one.";for(D.isUndefined(t)&&(t=!1),i=[],n=0,o=e.links.length;n<o;n++)r=e.links[n],i.push(r.source.id+"->"+r.target.id),t&&i.push({id:r.id});return i},_addShape:function(e,t,i,n){return D.isUndefined(t)&&(t=new x.Point(0,0)),D.isUndefined(i)&&(i=r()),n=k.deepExtend({width:20,height:20,id:i,radius:10,fill:"#778899",data:"circle",undoable:!1,x:t.x,y:t.y},n),e.addShape(n)},_addConnection:function(e,t,i,n){return e.connect(t,i,n)},createDiagramFromGraph:function(e,t,i,n){var o,r,s,l,c,d,u,h,p,f,m,g,v,_,b,w;if(D.isUndefined(e))throw"The diagram surface is undefined.";if(D.isUndefined(t))throw"No graph specification defined.";for(D.isUndefined(i)&&(i=!0),D.isUndefined(n)&&(n=!1),o=e.element.clientWidth||200,r=e.element.clientHeight||200,s=[],d=0,u=t.nodes.length;d<u;d++)l=t.nodes[d],h=l.position,D.isUndefined(h)&&(h=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))),p={},"0"===l.id||n&&k.deepExtend(p,{width:150*Math.random()+20,height:80*Math.random()+50,data:"rectangle",fill:{color:"#778899"}}),c=this._addShape(e,h,l.id,p),f=c.bounds(),D.isDefined(f)&&(l.x=f.x,l.y=f.y,l.width=f.width,l.height=f.height),s[l.id]=c;for(m=0;m<t.links.length;m++)g=t.links[m],v=s[g.source.id],D.isUndefined(v)||(_=s[g.target.id],D.isUndefined(_)||this._addConnection(e,v,_,{id:g.id}));if(i)for(b=new e.SpringLayout(e),b.layoutGraph(t,{limitToView:!1}),w=0;w<t.nodes.length;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 i,n,o,r,s,a,l,c,d,u;if(D.isUndefined(e)&&(e=3),D.isUndefined(t)&&(t=3),i=new x.Graph,n=-1,o=[],e<=0||t<=0)return i;for(s=new b(""+ ++n),i.addNode(s),i.root=s,o.push(s),a=0;a<e;a++){for(r=[],l=0;l<o.length;l++)for(c=o[l],d=0;d<t;d++)u=new b(""+ ++n),i.addLink(c,u),r.push(u);o=r}return i},createBalancedForest:function(e,t,i){var n,o,r,s,a,l,c,d,u,h,p;if(D.isUndefined(e)&&(e=3),D.isUndefined(t)&&(t=3),D.isUndefined(i)&&(i=5),n=new x.Graph,o=-1,r=[],e<=0||t<=0||i<=0)return n;for(a=0;a<i;a++)for(l=new b(""+ ++o),n.addNode(l),r=[l],c=0;c<e;c++){for(s=[],d=0;d<r.length;d++)for(u=r[d],h=0;h<t;h++)p=new b(""+ ++o),n.addLink(u,p),s.push(p);r=s}return n},createRandomConnectedGraph:function(e,t,i){var n,o,r,s,a,l,c,d,u,h;if(D.isUndefined(e)&&(e=40),D.isUndefined(t)&&(t=4),D.isUndefined(i)&&(i=!1),n=new x.Graph,o=-1,e<=0)return n;if(r=new b(""+ ++o),n.addNode(r),1===e)return n;if(e>1){for(s=1;s<e&&(a=n.takeRandomNode([],t),a);s++)l=n.addNode(""+s),n.addLink(a,l);if(!i&&e>1)for(c=D.randomInteger(1,e),d=0;d<c;d++)u=n.takeRandomNode([],t),h=n.takeRandomNode([],t),u&&h&&!n.areConnected(u,h)&&n.addLink(u,h);return n}},randomDiagram:function(e,t,i,n,o){var r=k.dataviz.diagram.Graph.Utils.createRandomConnectedGraph(t,i,n);y.Utils.createDiagramFromGraph(e,r,!1,o)}},k.deepExtend(x,{init:function(e){k.init(e,x.ui)},Point:A,Intersect:c,Geometry:f,Rect:a,Size:l,RectAlign:d,Matrix:h,MatrixVector:p,normalVariable:o,randomId:r,Dictionary:g,HashTable:m,Queue:v,Set:_,Node:b,Link:w,Graph:y,PathDefiner:s})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/diagram/svg.min",["kendo.drawing.min","dataviz/diagram/math.min"],e)}(function(){!function(e,t){function i(e,t){var i,n,o,r=this.options,s=!1;for(o=0;o<t.length;o++)n=t[o],i=e[n],H(i)&&r[n]!==i&&(r[n]=i,s=!0);return s}function n(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!=j?new W.Color(e).toHex():e}function s(e,t){var i=t.x-e.x,n=t.y-e.y,o=W.util.deg(Math.atan2(n,i));return o}function a(e,t){return new W.Segment(new V.Point(e,t))}function l(e){if(e)return new V.Rect([e.x,e.y],[e.width,e.height])}var c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I=window.kendo,M=I.dataviz.diagram,R=I.Class,F=I.deepExtend,P=M.Point,z=M.Rect,B=M.Matrix,L=M.Utils,H=L.isNumber,N=L.isString,O=M.MatrixVector,V=I.geometry,W=I.drawing,U=W.util.defined,q=e.inArray,j="transparent",G={none:"none",arrowStart:"ArrowStart",filledCircle:"FilledCircle",arrowEnd:"ArrowEnd"},$=360,K="start",Y="end",Q="width",X="height",Z="x",J="y";M.Markers=G,c=R.extend({init:function(e,t){this.x=e,this.y=t},toMatrix:function(){return B.scaling(this.x,this.y)},toString:function(){return I.format("scale({0},{1})",this.x,this.y)},invert:function(){return new c(1/this.x,1/this.y)}}),d=R.extend({init:function(e,t){this.x=e,this.y=t},toMatrixVector:function(){return new O(0,0,0,0,this.x,this.y)},toMatrix:function(){return B.translation(this.x,this.y)},toString:function(){return I.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 d((-this.x),(-this.y))}}),u=R.extend({init:function(e,t,i){this.x=t||0,this.y=i||0,this.angle=e},toString:function(){return this.x&&this.y?I.format("rotate({0},{1},{2})",this.angle,this.x,this.y):I.format("rotate({0})",this.angle)},toMatrix:function(){return B.rotation(this.angle,this.x,this.y)},center:function(){return new P(this.x,this.y)},invert:function(){return new u($-this.angle,this.x,this.y)}}),u.ZERO=new u(0),u.create=function(e){return new u(e.angle,e.x,e.y)},u.parse=function(e){var t=e.slice(1,e.length-1).split(","),i=t[0],n=t[1],o=t[2],r=new u(i,n,o);return r},h=R.extend({init:function(e,i,n,o,r,s){this.translate=new d(e,i),n!==t&&o!==t&&(this.scale=new c(n,o)),r!==t&&(this.rotate=s?new u(r,s.x,s.y):new u(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=B.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,i,n=this.rotate?this.rotate.invert():t,o=n?n.toMatrix():B.unit(),r=this.scale?this.scale.invert():t,s=r?r.toMatrix():B.unit(),a=new P((-this.translate.x),(-this.translate.y));return a=o.times(s).apply(a),e=new d(a.x,a.y),i=new h,i.translate=e,i.rotate=n,i.scale=r,i}}),p={_setScale:function(){var e=this.options,t=this._originWidth,i=this._originHeight,n=e.width/t,o=e.height/i;H(n)||(n=1),H(o)||(o=1),this._transform.scale=new c(n,o)},_setTranslate:function(){var e=this.options,t=e.x||0,i=e.y||0;this._transform.translate=new d(t,i)},_initSize:function(){var e=this.options,t=!1;e.autoSize!==!1&&(U(e.width)||U(e.height))&&(this._measure(!0),this._setScale(),t=!0),(U(e.x)||U(e.y))&&(this._setTranslate(),t=!0),t&&this._renderTransform()},_updateSize:function(e){var t=!1;return this.options.autoSize!==!1&&this._diffNumericOptions(e,[Q,X])&&(t=!0,this._measure(!0),this._setScale()),this._diffNumericOptions(e,[Z,J])&&(t=!0,this._setTranslate()),t&&this._renderTransform(),t}},f=R.extend({init:function(e){var t=this;t.options=F({},t.options,e),t.id=t.options.id,t._originSize=z.empty(),t._transform=new h},visible:function(e){return this.drawingContainer().visible(e)},redraw:function(e){e&&e.id&&(this.id=e.id)},position:function(e,i){var n=this.options;return U(e)?(U(i)?(n.x=e,n.y=i):e instanceof P&&(n.x=e.x,n.y=e.y),this._transform.translate=new d(n.x,n.y),this._renderTransform(),t):new P(n.x,n.y)},rotate:function(e,t){return U(e)&&(this._transform.rotate=new u(e,t.x,t.y),this._renderTransform()),this._transform.rotate||u.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:i,_measure:function(e){var t,i,n;return!this._measured||e?(i=this._boundingBox()||new V.Rect,n=i.topLeft(),t=new z(n.x,n.y,i.width(),i.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()}}),m=f.extend({init:function(e){f.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:j}},fill:function(e,t){this._fill({color:r(e),opacity:t})},stroke:function(e,t,i){this._stroke({color:r(e),width:t,opacity:i})},redraw:function(e){var t,i;e&&(t=e.stroke,i=e.fill,t&&this._stroke(o(t)),i&&this._fill(o(i)),f.fn.redraw.call(this,e))},_hover:function(e){var t,i=this.drawingElement,n=this.options,r=n.hover;r&&r.fill&&(t=e?o(r.fill):n.fill,i.fill(t.color,t.opacity))},_stroke:function(e){var t,i=this.options;F(i,{stroke:e}),e=i.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,i,n,o=this.options;F(o,{fill:e||{}}),t=o.fill,t.gradient?(i=t.gradient,n="radial"===i.type?W.RadialGradient:W.LinearGradient,this.drawingElement.fill(new n(i))):this.drawingElement.fill(t.color,t.opacity)}}),g=m.extend({init:function(e){e=this._textColor(e),m.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 W.Text(U(e.text)?e.text:"",new V.Point,{font:e.font}),this._fill(),this._stroke()},_textColor:function(e){return e&&e.color&&(e=F({},e,{fill:{color:e.color}})),e},_font:function(){var e,t=this.options;t.fontFamily&&U(t.fontSize)?(e=[],t.fontStyle&&e.push(t.fontStyle),t.fontWeight&&e.push(t.fontWeight),e.push(t.fontSize+(H(t.fontSize)?"px":"")),e.push(t.fontFamily),t.font=e.join(" ")):delete t.font},content:function(e){return this.drawingElement.content(e)},redraw:function(e){var t,i;e&&(t=!1,i=this.options,e=this._textColor(e),m.fn.redraw.call(this,e),(e.fontFamily||U(e.fontSize)||e.fontStyle||e.fontWeight)&&(F(i,{fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight}),this._font(),this.drawingElement.options.set("font",i.font),t=!0),e.text&&(this.content(e.text),t=!0),!this._updateSize(e)&&t&&this._initSize())}}),F(g.fn,p),v=m.extend({init:function(e){m.fn.init.call(this,e),this._initPath(),this._setPosition()},_setPosition:function(){var e=this.options,t=e.x,i=e.y;(U(t)||U(i))&&this.position(t||0,i||0)},redraw:function(e){e&&(m.fn.redraw.call(this,e),this._diffNumericOptions(e,[Q,X])&&this._drawPath(),this._diffNumericOptions(e,[Z,J])&&this._setPosition())},_initPath:function(){var e=this.options;this.drawingElement=new W.Path({stroke:e.stroke,closed:!0}),this._fill(),this._drawPath()},_drawPath:function(){var e=this.drawingElement,t=n(this.options),i=t.width,o=t.height;e.segments.elements([a(0,0),a(i,0),a(i,o),a(0,o)])}}),_=m.extend({init:function(e){m.fn.init.call(this,e);var t=this.options.anchor;this.anchor=new V.Point(t.x,t.y),this.createElement()},options:{stroke:{color:j,width:0},fill:{color:"black"}},_transformToPath:function(e,t){var i=t.transform();return e&&i&&(e=e.transformCopy(i)),e},redraw:function(e){e&&(e.position&&(this.options.position=e.position),m.fn.redraw.call(this,e))}}),b=_.extend({options:{radius:4,anchor:{x:0,y:0}},createElement:function(){var e=this.options;this.drawingElement=new W.Circle(new V.Circle(this.anchor,e.radius),{fill:e.fill,stroke:e.stroke})},positionMarker:function(e){var t,i,n=this.options,o=n.position,r=e.segments;t=o==K?r[0]:r[r.length-1],t&&(i=this._transformToPath(t.anchor(),e),this.drawingElement.transform(V.transform().translate(i.x,i.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=W.Path.parse(e.path,{fill:e.fill,stroke:e.stroke})},positionMarker:function(e){var t,i,n=this._linePoints(e),o=n.start,r=n.end,a=V.transform();o&&a.rotate(s(o,r),r),r&&(t=this.anchor,i=r.clone().translate(-t.x,-t.y),a.translate(i.x,i.y)),this.drawingElement.transform(a)},_linePoints:function(e){var t,i,n,o,r,s=this.options,a=e.segments;if(s.position==K?(n=a[0],n&&(i=n.anchor(),t=n.controlOut(),o=a[1],!t&&o&&(t=o.anchor()))):(n=a[a.length-1],n&&(i=n.anchor(),t=n.controlIn(),r=a[a.length-2],!t&&r&&(t=r.anchor()))),i)return{start:this._transformToPath(t,e),end:this._transformToPath(i,e)}}}),y={_getPath:function(e){var t=this.drawingElement;if(t instanceof W.MultiPath&&(t=e==K?t.paths[0]:t.paths[t.paths.length-1]),t&&t.segments.length)return t},_normalizeMarkerOptions:function(e){var t=e.startCap,i=e.endCap;N(t)&&(e.startCap={type:t}),N(i)&&(e.endCap={type:i})},_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[K]=this._createMarker(e.startCap,K),this._markers[Y]=this._createMarker(e.endCap,Y)},_createMarker:function(e,i){var n,o,r=(e||{}).type,s=this._getPath(i);return s?(r==G.filledCircle?n=b:r==G.arrowStart||r==G.arrowEnd?n=w:this._removeMarker(i),n?(o=new n(F({},e,{position:i})),o.positionMarker(s),this.drawingContainer().append(o.drawingElement),o):t):(this._removeMarker(i),t)},_positionMarker:function(e){var t,i=this._markers[e];i&&(t=this._getPath(e),t?i.positionMarker(t):this._removeMarker(e))},_capMap:{start:"startCap",end:"endCap"},_redrawMarker:function(e,t,i){var n,o,r,s,a;return this._normalizeMarkerOptions(i),n=this.options,o=this._capMap[t],r=(n[o]||{}).type,s=i[o],a=!1,s?(n[o]=F({},n[o],s),s.type&&r!=s.type?(this._removeMarker(t),this._markers[t]=this._createMarker(n[o],t),a=!0):this._markers[t]&&this._markers[t].redraw(s)):e&&!this._markers[t]&&n[o]&&(this._markers[t]=this._createMarker(n[o],t),a=!0),a},_redrawMarkers:function(e,t){!this._redrawMarker(e,K,t)&&e&&this._positionMarker(K),!this._redrawMarker(e,Y,t)&&e&&this._positionMarker(Y)}},k=m.extend({init:function(e){m.fn.init.call(this,e),this.container=new W.Group,this._createElements(),this._initSize()},options:{autoSize:!0},drawingContainer:function(){return this.container},data:function(e){var i=this.options;return e?(i.data!=e&&(i.data=e,this._setData(e),this._initSize(),this._redrawMarkers(!0,{})),t):i.data},redraw:function(e){var t,i;e&&(m.fn.redraw.call(this,e),t=this.options,i=e.data,U(i)&&t.data!=i?(t.data=i,this._setData(i),this._updateSize(e)||this._initSize(),this._redrawMarkers(!0,e)):(this._updateSize(e),this._redrawMarkers(!1,e)))},_createElements:function(){var e=this.options;this.drawingElement=W.Path.parse(e.data||"",{stroke:e.stroke}),this._fill(),this.container.append(this.drawingElement),this._createMarkers()},_setData:function(e){var t=this.drawingElement,i=W.Path.parse(e||""),n=i.paths.slice(0);i.paths.elements([]),t.paths.elements(n)}}),F(k.fn,p),F(k.fn,y),x=m.extend({init:function(e){m.fn.init.call(this,e),this.container=new W.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},redraw:function(e){var t,i;e&&(e=e||{},t=e.from,i=e.to,t&&(this.options.from=t),i&&(this.options.to=i),t||i?(this._drawPath(),this._redrawMarkers(!0,e)):this._redrawMarkers(!1,e),m.fn.redraw.call(this,e))},_initPath:function(){var e=this.options,t=this.drawingElement=new W.Path({stroke:e.stroke});this._fill(),this._drawPath(),this.container.append(t)},_drawPath:function(){var e=this.options,t=this.drawingElement,i=e.from||new P,n=e.to||new P;t.segments.elements([a(i.x,i.y),a(n.x,n.y)])}}),F(x.fn,y),C=m.extend({init:function(e){m.fn.init.call(this,e),this.container=new W.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},points:function(e){var i=this.options;return e?(i.points=e,this._updatePath(),t):i.points},redraw:function(e){if(e){var t=e.points;m.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 W.Path({stroke:e.stroke}),this._fill(),this.container.append(this.drawingElement),e.points&&this._updatePath()},_pointsDiffer:function(e){var t,i=this.options.points,n=i.length!==e.length;if(!n)for(t=0;t<e.length;t++)if(i[t].x!==e[t].x||i[t].y!==e[t].y){n=!0;break}return n},_updatePath:function(){var e,t,i=this.drawingElement,n=this.options,o=n.points,r=[];for(t=0;t<o.length;t++)e=o[t],r.push(a(e.x,e.y));i.segments.elements(r)},options:{points:[]}}),F(C.fn,y),S=f.extend({init:function(e){f.fn.init.call(this,e),this._initImage()},redraw:function(e){e&&(e.source&&this.drawingElement.src(e.source),this._diffNumericOptions(e,[Q,X,Z,J])&&this.drawingElement.rect(this._rect()),f.fn.redraw.call(this,e))},_initImage:function(){var e=this.options,t=this._rect();this.drawingElement=new W.Image(e.source,t,{})},_rect:function(){var e=n(this.options),t=new V.Point(e.x,e.y),i=new V.Size(e.width,e.height);return new V.Rect(t,i)}}),T=f.extend({init:function(e){this.children=[],f.fn.init.call(this,e),this.drawingElement=new W.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 t=q(e,this.children);if(t>=0)return this.drawingElement.removeAt(t),this.children.splice(t,1),!0},clear:function(){this.drawingElement.clear(),this.children=[],this._childrenChange=!0},toFront:function(e){var t,i;for(i=0;i<e.length;i++)t=e[i],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 i,n,o,r,s,a=this.drawingElement,l=a.children.slice(0),c=this.children,d=H(t);for(i=0;i<e.length;i++)s=e[i],r=s.drawingContainer(),n=q(s,c),n>=0&&(l.splice(n,1),c.splice(n,1),o=d?t:t[i],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),f.fn.redraw.call(this,e))},_boundingBox:function(){var e,t,i,n,o=this.children;for(n=0;n<o.length;n++)t=o[n],t.visible()&&t._includeInBBox!==!1&&(i=t.drawingContainer().clippedBBox(null),i&&(e=e?V.Rect.union(e,i):i));return e}}),F(T.fn,p),D=T.extend({init:function(e,t){this.children=[],f.fn.init.call(this,t),this.drawingElement=new W.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 z(t.origin.x,t.origin.y,t.size.width,t.size.height)}},reflow:function(){this.drawingElement.reflow()},redraw:function(e){I.deepExtend(this.drawingElement.options,e),T.fn.redraw.call(this,e)}}),A=m.extend({init:function(e){m.fn.init.call(this,e),this._initCircle(),this._initSize()},redraw:function(e){if(e){var t=this.options;e.center&&(F(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),m.fn.redraw.call(this,e)}},_initCircle:function(){var e,t=this.options,i=t.width,n=t.height,o=t.radius;U(o)||(U(i)||(i=n),U(n)||(n=i),t.radius=o=Math.min(i,n)/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 W.Circle(this._circle,{stroke:t.stroke}),this._fill()}}),F(A.fn,p),E=R.extend({init:function(e,t){t=t||{},this.element=e,this.surface=W.Surface.create(e,t),I.isFunction(this.surface.translate)&&(this.translate=this._translate),this.drawingElement=new W.Group,this._viewBox=new z(0,0,t.width,t.height),this.size(this._viewBox)},bounds:function(){var e=this.drawingElement.clippedBBox();return new z(0,0,e.width(),e.height())},size:function(e){var t=this._viewBox;return U(e)&&(t.width=e.width,t.height=e.height,this.surface.setSize(e)),{width:t.width,height:t.height}},_translate:function(e,t){var i=this._viewBox;return U(e)&&U(t)&&(i.x=e,i.y=t,this.surface.translate({x:e,y:t})),{x:i.x,y:i.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()}}),I.deepExtend(M,{init:function(e){I.init(e,M.ui)},diffNumericOptions:i,Element:f,Scale:c,Translation:d,Rotation:u,Circle:A,Group:T,Rectangle:v,Canvas:E,Path:k,Layout:D,Line:x,MarkerBase:_,ArrowMarker:w,CircleMarker:b,Polyline:C,CompositeTransform:h,TextBlock:g,Image:S,VisualBase:m})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/diagram/services.min",["kendo.drawing.min","dataviz/diagram/svg.min"],e)}(function(){!function(e,t){function i(e,t){return t.charCodeAt(0)==e||t.toUpperCase().charCodeAt(0)==e}function n(e,t){var i;return e.x==-1&&e.y==-1?i=t.bottomRight():1==e.x&&1==e.y?i=t.topLeft():e.x==-1&&1==e.y?i=t.topRight():1==e.x&&e.y==-1?i=t.bottomLeft():0===e.x&&e.y==-1?i=t.bottom():0===e.x&&1==e.y?i=t.top():1==e.x&&0===e.y?i=t.left():e.x==-1&&0===e.y&&(i=t.right()),i}function o(e){var t=e.options.editable;return t&&t.drag!==!1}function r(e,t){var i,n,o,r;for(r=0;r<e.connectors.length;r++)if(i=e.connectors[r],n=i.position(),o=new q(n.x,n.y),o.inflate(re,re),o.contains(t))return i}function s(e){return e.ctrlKey===!1&&e.altKey===!1&&e.shiftKey===!1}var a,l,c,d,u,h,p,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,I,M,R,F,P,z,B,L,H,N=window.kendo,O=N.dataviz,V=O.diagram,W=N.Class,U=V.Group,q=V.Rect,j=V.Rectangle,G=V.Utils,$=G.isUndefined,K=V.Point,Y=V.Circle,Q=V.Ticker,X=N.deepExtend,Z=N.ui.Movable,J=N.support.browser,ee=N.drawing.util,te=ee.defined,ie=e.inArray,ne=e.proxy,oe={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"},re=10,se="Auto",ae="Top",le="Right",ce="Left",de="Bottom",ue=10,he=10,pe="dragStart",fe="drag",me="dragEnd",ge="itemRotate",ve="itemBoundsChange",_e=5,be=5,we="mouseEnter",ye="mouseLeave",ke="zoomStart",xe="zoomEnd",Ce=-2e4,Se=2e4,Te=.9,De=.93,Ae=5,Ee="transparent",Ie="pan",Me="rotated",Re="source",Fe="target",Pe={"-1":Re,1:Fe};V.Cursors=oe,a=N.Class.extend({init:function(e){this.layoutState=e,this.diagram=e.diagram},initState:function(){function e(e,t){var i=this.diagram.getShapeById(e);i&&(this.subjects.push(i),this.froms.push(i.bounds().topLeft()),this.tos.push(t.topLeft()))}this.froms=[],this.tos=[],this.subjects=[],this.layoutState.nodeMap.forEach(e,this)},update:function(e){if(!(this.subjects.length<=0))for(var t=0;t<this.subjects.length;t++)this.subjects[t].position(new K(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))}}),l=W.extend({init:function(e,t,i){this.animate=!$(i)&&i,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,i=e.diagram;this.animate?(e.linkMap.forEach(function(e,t){var n=i.getShapeById(e);n.visible(!1),n&&n.points(t)}),t=new Q,t.addAdapter(new a(e)),t.onComplete(function(){e.linkMap.forEach(function(e){var t=i.getShapeById(e);t.visible(!0)})}),t.play()):(e.nodeMap.forEach(function(e,t){var n=i.getShapeById(e);n&&n.position(t.topLeft())}),e.linkMap.forEach(function(e,t){var n=i.getShapeById(e);n&&n.points(t)}))}}),c=W.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;e<this.units.length;e++)this.units[e].undo()},redo:function(){for(var e=0;e<this.units.length;e++)this.units[e].redo()}}),d=W.extend({init:function(e,t,i){this.item=e,this._redoSource=t,this._redoTarget=i,te(t)&&(this._undoSource=e.source()),te(i)&&(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()}}),u=W.extend({init:function(e,t,i){this.item=e,this._undoSource=t,this._undoTarget=i,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()}}),h=W.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)}}),p=W.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)}}),f=W.extend({init:function(e,t,i){var n,o;for(this.shapes=e,this.undoStates=t,this.title="Transformation",this.redoStates=[],this.adorner=i,n=0;n<this.shapes.length;n++)o=this.shapes[n],this.redoStates.push(o.bounds())},undo:function(){var e,t;for(e=0;e<this.shapes.length;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;e<this.shapes.length;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())}}),m=W.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)}}),g=W.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)}}),v=W.extend({init:function(e,t,i){this.initial=e,this.finalPos=t,this.diagram=i,this.title="Pan Unit"},undo:function(){this.diagram.pan(this.initial)},redo:function(){this.diagram.pan(this.finalPos)}}),_=W.extend({init:function(e,t,i){var n,o;for(this.shapes=t,this.undoRotates=i,this.title="Rotation",this.redoRotates=[],this.redoAngle=e._angle,this.adorner=e,this.center=e._innerBounds.center(),n=0;n<this.shapes.length;n++)o=this.shapes[n],this.redoRotates.push(o.rotate().angle)},undo:function(){var e,t;for(e=0;e<this.shapes.length;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;e<this.shapes.length;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=W.extend({init:function(e,t,i){this.diagram=e,this.indices=i,this.items=t,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toFront(this.items,!1)}}),w=W.extend({init:function(e,t,i){this.diagram=e,this.indices=i,this.items=t,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toBack(this.items,!1)}}),y=N.Observable.extend({init:function(e){N.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 c},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.index<this.stack.length&&(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}}),k=W.extend({init:function(e){this.toolService=e},start:function(){},move:function(){},end:function(){},tryActivate:function(){return!1},getCursor:function(){return oe.arrow}}),x=k.extend({init:function(t){var i,n,o,r,s=this,a=N.support.mobileOS?De:Te;k.fn.init.call(s,t),i=s.toolService.diagram,n=i.canvas,o=i.scroller=s.scroller=e(i.scrollable).kendoMobileScroller({friction:a,velocityMultiplier:Ae,mousewheelScrolling:!1,zoom:!1,scroll:ne(s._move,s)}).data("kendoMobileScroller"),n.translate&&(s.movableCanvas=new Z(n.element)),r=function(e,t,i){e.makeVirtual(),e.virtualSize(t||Ce,i||Se)},r(o.dimensions.x),r(o.dimensions.y),o.disable()},tryActivate:function(e,t){var i=this.toolService,n=i.diagram.options.pannable,o=t.ctrlKey;return te(n.key)&&(o=n.key&&"none"!=n.key?t[n.key+"Key"]:s(t)&&!te(i.hoveredItem)),n!==!1&&o&&!te(i.hoveredAdorner)&&!te(i._hoveredConnector)},start:function(){this.scroller.enable()},move:function(){},_move:function(e){var t=this,i=t.toolService.diagram,n=i.canvas,o=new K(e.scrollLeft,e.scrollTop);n.translate?(i._storePan(o.times(-1)),t.movableCanvas.moveTo(o),n.translate(o.x,o.y)):o=o.plus(i._pan.times(-1)),i.trigger(Ie,{pan:o})},end:function(){this.scroller.disable()},getCursor:function(){return oe.move}}),C=W.extend({init:function(e){this.toolService=e},tryActivate:function(){return!0},start:function(e,t){var i=this.toolService,n=i.diagram,o=i.hoveredItem;o&&(i.selectSingle(o,t),o.adorner&&(this.adorner=o.adorner,this.handle=this.adorner._hitTest(e))),this.handle||(this.handle=n._resizingAdorner._hitTest(e),this.handle&&(this.adorner=n._resizingAdorner)),this.adorner&&(this.adorner.isDragHandle(this.handle)&&n.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(fe,{shapes:this.adorner.shapes,connections:[]}))},end:function(){var e,i=this.toolService.diagram,n=this.adorner;n&&(n.isDragHandle(this.handle)&&i.trigger(me,{shapes:n.shapes,connections:[]})?n.cancel():(e=n.stop(),e&&i.undoRedoService.add(e,!1))),this.adorner=t,this.handle=t},getCursor:function(e){return this.toolService.hoveredItem?this.toolService.hoveredItem._getCursor(e):oe.arrow}}),S=W.extend({init:function(e){this.toolService=e},tryActivate:function(e,t){var i=this.toolService,n=i.diagram.options.selectable,o=n&&n.multiple!==!1;return o&&(o=n.key&&"none"!=n.key?t[n.key+"Key"]:s(t)),o&&!te(i.hoveredItem)&&!te(i.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 i=this.toolService.diagram,n=this.toolService.hoveredItem,o=i.selector.bounds();n&&n.isSelected||t.ctrlKey||i.deselect(),o.isEmpty()||i.selectArea(o),i.selector.end()},getCursor:function(){return oe.arrow}}),T=W.extend({init:function(e){this.toolService=e,this.type="ConnectionTool"},tryActivate:function(){return this.toolService._hoveredConnector},start:function(e,t){var i=this.toolService,n=i.diagram,r=i._hoveredConnector,s=n._createConnection({},r._c,e);o(s)&&!n.trigger(pe,{shapes:[],connections:[s],connectionHandle:Fe})&&n._addConnection(s)?(i._connectionManipulation(s,r._c.shape,!0),i._removeHover(),i.selectSingle(i.activeConnection,t),"touchmove"==t.type&&(n._cachedTouchTarget=r.visual)):(s.source(null),i.end(e))},move:function(e){var t=this.toolService,i=t.activeConnection;return i.target(e),t.diagram.trigger(fe,{shapes:[],connections:[i],connectionHandle:Fe}),!0},end:function(e){var t,i=this.toolService,n=i.diagram,o=i.activeConnection,r=i.hoveredItem,s=i._hoveredConnector,a=n._cachedTouchTarget;o&&(t=s&&s._c!=o.sourceConnector?s._c:r&&r instanceof V.Shape?r.getConnector(se)||r.getConnector(e):e,o.target(t),n.trigger(me,{shapes:[],connections:[o],connectionHandle:Fe})?(n.remove(o,!1),n.undoRedoService.pop()):(o.updateModel(),n._syncConnectionChanges()),i._connectionManipulation(),a&&(n._connectorsAdorner.visual.remove(a),n._cachedTouchTarget=null))},getCursor:function(){return oe.arrow}}),D=W.extend({init:function(e){this.toolService=e,this.type="ConnectionTool"},tryActivate:function(e,t){var i=this.toolService,n=i.diagram,o=n.options.selectable,r=i.hoveredItem,s=o!==!1&&r&&r.path&&!(r.isSelected&&t.ctrlKey);return s&&(this._c=r),s},start:function(e,t){var i,n,r,s=this.toolService,a=this._c;s.selectSingle(a,t),i=a.adorner,i&&(n=i._hitTest(e),r=Pe[n]),o(a)&&i&&!s.diagram.trigger(pe,{shapes:[],connections:[a],connectionHandle:r})?(this.handle=n,this.handleName=r,i.start(e)):(s.startPoint=e,s.end(e))},move:function(e){var t=this._c.adorner;if(o(this._c)&&t)return t.move(this.handle,e),this.toolService.diagram.trigger(fe,{shapes:[],connections:[this._c],connectionHandle:this.handleName}),!0},end:function(e){var t,i=this._c,n=i.adorner,r=this.toolService,s=r.diagram;n&&o(i)&&(t=n.stop(e),s.trigger(me,{shapes:[],connections:[i],connectionHandle:this.handleName})?t.undo():(s.undoRedoService.add(t,!1),i.updateModel(),s._syncConnectionChanges()))},getCursor:function(){return oe.move}}),A=W.extend({init:function(e){this.diagram=e,this.tools=[new x(this),new D(this),new T(this),new S(this),new C(this)],this.activeTool=t},start:function(e,t){return t=X({},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.diagram.canvas.surface.suspendTracking(),this.startPoint=e,!0},move:function(e,t){t=X({},t);var i=!0;return this.activeTool&&(i=this.activeTool.move(e,t)),i&&this._updateHoveredItem(e),this._updateCursor(e),!0},end:function(e,i){return i=X({},i),this.activeTool&&this.activeTool.end(e,i),this.diagram.canvas.surface.resumeTracking(),this.activeTool=t,this._updateCursor(e),!0},keyDown:function(e,t){var n,o=this.diagram;if(t=X({ctrlKey:!1,metaKey:!1,altKey:!1},t),!t.ctrlKey&&!t.metaKey||t.altKey){if(46===e||8===e)return n=this.diagram._triggerRemove(o.select()),n.length&&(this.diagram.remove(n,!0),this.diagram._syncChanges(),this.diagram._destroyToolBar()),!0;if(27===e)return this._discardNewConnection(),o.deselect(),o._destroyToolBar(),!0}else{if(i(e,"a"))return o.selectAll(),o._destroyToolBar(),!0;if(i(e,"z"))return o.undo(),o._destroyToolBar(),!0;if(i(e,"y"))return o.redo(),o._destroyToolBar(),!0;i(e,"c")?(o.copy(),o._destroyToolBar()):i(e,"x")?(o.cut(),o._destroyToolBar()):i(e,"v")?(o.paste(),o._destroyToolBar()):i(e,"l")?(o.layout(),o._destroyToolBar()):i(e,"d")&&(o._destroyToolBar(),o.copy(),o.paste())}},wheel:function(e,t){var i=this.diagram,n=t.delta,o=i.zoom(),r=i.options,s=r.zoomRate,a={point:e,meta:t,zoom:o};if(!i.trigger(ke,a))return n<0?o+=s:o-=s,o=N.dataviz.round(Math.max(r.zoomMin,Math.min(r.zoomMax,o)),2),a.zoom=o,i.zoom(o,a),i.trigger(xe,a),!0},setTool:function(e,t){e.toolService=this,this.tools[t]=e},selectSingle:function(e,t){var i,n=this.diagram,o=n.options.selectable;o&&!e.isSelected&&e.options.selectable!==!1&&(i=t.ctrlKey&&o.multiple!==!1,n.select(e,{addToSelection:i}))},_discardNewConnection:function(){this.newConnection&&(this.diagram.remove(this.newConnection),this.newConnection=t)},_activateTool:function(e,t){var i,n;for(i=0;i<this.tools.length;i++)if(n=this.tools[i],n.tryActivate(e,t)){this.activeTool=n;break}},_updateCursor:function(e){var t=this.diagram.element,i=this.activeTool?this.activeTool.getCursor(e):this.hoveredAdorner?this.hoveredAdorner._getCursor(e):this.hoveredItem?this.hoveredItem._getCursor(e):oe.arrow;t.css({cursor:i}),J.msie&&7==J.version&&(t[0].style.cssText=t[0].style.cssText)},_connectionManipulation:function(e,i,n){this.activeConnection=e,this.disabledShape=i,this.newConnection=n?this.activeConnection:t},_updateHoveredItem:function(e){var i=this._hitTest(e),n=this.diagram;i==this.hoveredItem||this.disabledShape&&i==this.disabledShape||(this.hoveredItem&&(n.trigger(ye,{item:this.hoveredItem}),this.hoveredItem._hover(!1)),i&&i.options.enable?(n.trigger(we,{item:i}),this.hoveredItem=i,this.hoveredItem._hover(!0)):this.hoveredItem=t)},_removeHover:function(){this.hoveredItem&&(this.hoveredItem._hover(!1),this.hoveredItem=t)},_hitTest:function(e){var i,n,o,r,s=this.diagram;if(this._hoveredConnector&&(this._hoveredConnector._hover(!1),this._hoveredConnector=t),s._connectorsAdorner._visible&&(i=s._connectorsAdorner._hitTest(e)))return i;if(i=this.diagram._resizingAdorner._hitTest(e)){if(this.hoveredAdorner=s._resizingAdorner,0!==i.x||0!==i.y)return;i=t}else this.hoveredAdorner=t;if(!this.activeTool||"ConnectionTool"!==this.activeTool.type){for(r=[],o=0;o<s._selectedItems.length;o++)n=s._selectedItems[o],n instanceof V.Connection&&r.push(n);i=this._hitTestItems(r,e)}return i||this._hitTestElements(e)},_hitTestElements:function(e){var t,i,n,o,s=this.diagram,a=this._hitTestItems(s.shapes,e),l=this._hitTestItems(s.connections,e);return this.activeTool&&"ConnectionTool"==this.activeTool.type||!a||!l||r(a,e)||(i=s.mainLayer,n=ie(a.visual,i.children),o=ie(l.visual,i.children),t=n>o?a:l),t||a||l},_hitTestItems:function(e,t){var i,n,o;for(i=e.length-1;i>=0;i--)if(n=e[i],o=n._hitTest(t))return o}}),E=N.Class.extend({init:function(){}}),I=E.extend({init:function(e){var t=this;E.fn.init.call(t),this.connection=e},hitTest:function(e){var t=this.getBounds().inflate(re);return!!t.contains(e)&&V.Geometry.distanceToPolyline(e,this.connection.allPoints())<re},getBounds:function(){var e,t=this.connection.allPoints(),i=t[0],n=t[t.length-1],o=Math.max(i.x,n.x),r=Math.min(i.x,n.x),s=Math.min(i.y,n.y),a=Math.max(i.y,n.y);for(e=1;e<t.length-1;++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)}}),M=I.extend({init:function(e){var t=this;I.fn.init.call(t),this.connection=e},route:function(){}}),R=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,i,n){var o;return o=i&&n?this._connectorPoints(e,t,i,n):this._floatingPoints(e,t,i)},route:function(){var e=this.connection._resolvedSourceConnector,t=this.connection._resolvedTargetConnector,i=this.connection.sourcePoint(),n=this.connection.targetPoint(),o=this.routePoints(i,n,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 i,n,o,r,s,a=e.position(),l=e.shape.bounds(Me),c={topLeft:l.topLeft(),bottomRight:l.bottomRight()},d=this._connectorSides,u=ee.MAX_NUM;for(s=0;s<d.length;s++)r=d[s],o=r.axis,i=Math.round(Math.abs(a[o]-c[r.boundsPoint][o])),i<u?(u=i,n=r):i===u&&(a[o]-t[o])*r.secondarySign>(a[n.axis]-t[n.axis])*n.secondarySign&&(n=r);return n.name},_sameSideDistance:function(e){var t=e.shape.bounds(Me);return Math.min(t.width,t.height)/this.SAME_SIDE_DISTANCE_RATIO},_connectorPoints:function(e,t,i,n){var o,r,s=this._connectorSide(i,t),a=this._connectorSide(n,e),l=t.x-e.x,c=t.y-e.y,d=this._sameSideDistance(i),u=[];return s===ae||s==de?a==ae||a==de?s==a?(r=s==ae?Math.min(e.y,t.y)-d:Math.max(e.y,t.y)+d,u=[new K(e.x,r),new K(t.x,r)]):u=[new K(e.x,e.y+c/2),new K(t.x,e.y+c/2)]:u=[new K(e.x,t.y)]:a==ce||a==le?s==a?(o=s==ce?Math.min(e.x,t.x)-d:Math.max(e.x,t.x)+d,u=[new K(o,e.y),new K(o,t.y)]):u=[new K(e.x+l/2,e.y),new K(e.x+l/2,e.y+c)]:u=[new K(t.x,e.y)],u},_floatingPoints:function(e,t,i){var n,o,r,s=i?this._connectorSide(i,t):null,a=this._startHorizontal(e,t,s),l=[e,e,t,t],c=t.x-e.x,d=t.y-e.y,u=l.length;for(r=1;r<u-1;++r)a?r%2!==0?(n=c/(u/2),o=0):(n=0,o=d/((u-1)/2)):r%2!==0?(n=0,o=d/(u/2)):(n=c/((u-1)/2),o=0),l[r]=new K(l[r-1].x+n,l[r-1].y+o);return r--,l[u-2]=a&&r%2!==0||!a&&r%2===0?new K(l[u-1].x,l[u-2].y):new K(l[u-2].x,l[u-1].y),[l[1],l[2]]},_startHorizontal:function(e,t,i){var n;return n=null!==i&&(i===le||i===ce)||Math.abs(e.x-t.x)>Math.abs(e.y-t.y)}}),F=W.extend({init:function(e,t){var i=this;i.diagram=e,i.options=X({},i.options,t),i.visual=new U,i.diagram._adorners.push(i)},refresh:function(){}}),P=F.extend({init:function(e,t){var i,n,o,r=this;r.connection=e,i=r.connection.diagram,r._ts=i.toolService,F.fn.init.call(r,i,t),n=r.connection.sourcePoint(),o=r.connection.targetPoint(),r.spVisual=new Y(X(r.options.handles,{center:n})),r.epVisual=new Y(X(r.options.handles,{center:o})),r.visual.append(r.spVisual),r.visual.append(r.epVisual)},options:{handles:{}},_getCursor:function(){return oe.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 i=t.minus(this.startPoint);this.startPoint=t,this.connection.sourceConnector||this.connection.source(this.connection.sourcePoint().plus(i)),this.connection.targetConnector||this.connection.target(this.connection.targetPoint().plus(i))}return this.refresh(),!0},stop:function(e){var i,n=this.diagram.toolService,o=n.hoveredItem;return i=n._hoveredConnector?n._hoveredConnector._c:o&&o instanceof V.Shape?o.getConnector(se)||o.getConnector(e):e,this.handle===-1?this.connection.source(i):1===this.handle&&this.connection.target(i),this.handle=t,this._ts._connectionManipulation(),new u(this.connection,this._initialSource,this._initialTarget)},_hitTest:function(e){var t=this.connection.sourcePoint(),i=this.connection.targetPoint(),n=this.options.handles.width/2+re,o=this.options.handles.height/2+re,r=t.distanceTo(e),s=i.distanceTo(e),a=new q(t.x,t.y).inflate(n,o).contains(e),l=new q(i.x,i.y).inflate(n,o).contains(e),c=0;return a&&(!l||r<s)?c=-1:l&&(!a||s<r)&&(c=1),c},refresh:function(){this.spVisual.redraw({center:this.diagram.modelToLayer(this.connection.sourcePoint())}),this.epVisual.redraw({center:this.diagram.modelToLayer(this.connection.targetPoint())})}}),z=F.extend({init:function(e,t){var i=this;F.fn.init.call(i,e,t),i._refreshHandler=function(e){e.item==i.shape&&i.refresh()}},show:function(e){var t,i,n,o=this;for(o._visible=!0,o.shape=e,o.diagram.bind(ve,o._refreshHandler),t=e.connectors.length,o.connectors=[],o._clearVisual(),i=0;i<t;i++)n=new H(e.connectors[i]),o.connectors.push(n),o.visual.append(n.visual);o.visual.visible(!0),o.refresh()},_clearVisual:function(){var e=this;e.diagram._cachedTouchTarget?e._keepCachedTouchTarget():e.visual.clear()},_keepCachedTouchTarget:function(){var e,t=this,i=t.visual.children,n=i.length,o=ie(t.diagram._cachedTouchTarget,i);for(e=n-1;e>=0;e--)e!=o&&t.visual.remove(i[e])},destroy:function(){var e=this;e.diagram.unbind(ve,e._refreshHandler),e.shape=t,e._visible=t,e.visual.visible(!1)},_hitTest:function(e){var t,i;for(i=0;i<this.connectors.length;i++)if(t=this.connectors[i],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()})}}}),B=F.extend({init:function(e,t){var i=this;F.fn.init.call(i,e,t),i._manipulating=!1,i.map=[],i.shapes=[],i._initSelection(),i._createHandles(),i.redraw(),i.diagram.bind("select",function(e){i._initialize(e.selected)}),i._refreshHandler=function(){i._internalChange||(i.refreshBounds(),i.refresh())},i._rotatedHandler=function(){1==i.shapes.length&&(i._angle=i.shapes[0].rotate().angle),i._refreshHandler()},i.diagram.bind(ve,i._refreshHandler).bind(ge,i._rotatedHandler),i.refreshBounds(),i.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,i=t.options.selectable,n=X({},e.options.selectable,i);e.rect=new j(n),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,i,n;if(this._resizable())for(e=this._handleOptions(),n=-1;n<=1;n++)for(i=-1;i<=1;i++)0===n&&0===i||(t=new j(e),t.drawingElement._hover=ne(this._hover,this),this.map.push({x:n,y:i,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 t,i,n,o,r=this.diagram.modelToLayer(e),s=this.map.length;if(this._angle&&(r=r.clone().rotate(this._bounds.center(),this._angle)),this._resizable())for(t=0;t<s;t++)if(o=this.map[t],i=new K(o.x,o.y),n=this._getHandleBounds(i),n.offset(this._bounds.x,this._bounds.y),n.contains(r))return i;if(this._bounds.contains(r))return new K(0,0)},_getHandleBounds:function(e){if(this._resizable()){var t=this._handleOptions(),i=t.width,n=t.height,o=new q(0,0,i,n);return e.x<0?o.x=-i/2:0===e.x?o.x=Math.floor(this._bounds.width/2)-i/2:e.x>0&&(o.x=this._bounds.width+1-i/2),e.y<0?o.y=-n/2:0===e.y?o.y=Math.floor(this._bounds.height/2)-n/2:e.y>0&&(o.y=this._bounds.height+1-n/2),o}},_getCursor:function(e){var t,i=this._hitTest(e);if(i&&i.x>=-1&&i.x<=1&&i.y>=-1&&i.y<=1&&this._resizable()){if(t=this._angle,t&&(t=360-t,i.rotate(new K(0,0),t),i=new K(Math.round(i.x),Math.round(i.y))),i.x==-1&&i.y==-1)return"nw-resize";if(1==i.x&&1==i.y)return"se-resize";if(i.x==-1&&1==i.y)return"sw-resize";if(1==i.x&&i.y==-1)return"ne-resize";if(0===i.x&&i.y==-1)return"n-resize";if(0===i.x&&1==i.y)return"s-resize";if(1==i.x&&0===i.y)return"e-resize";if(i.x==-1&&0===i.y)return"w-resize"}return this._manipulating?oe.move:oe.select},_initialize:function(){var e,t,i=this,n=i.diagram.select();for(i.shapes=[],e=0;e<n.length;e++)t=n[e],t instanceof V.Shape&&(i.shapes.push(t),t._rotationOffset=new K);i._angle=1==i.shapes.length?i.shapes[0].rotate().angle:0,i._startAngle=i._angle,i._rotates(),i._positions(),i.refreshBounds(),i.refresh(),i.redraw()},_rotates:function(){var e,t,i=this;for(i.initialRotates=[],e=0;e<i.shapes.length;e++)t=i.shapes[e],i.initialRotates.push(t.rotate().angle)},_positions:function(){var e,t,i=this;for(i.initialStates=[],e=0;e<i.shapes.length;e++)t=i.shapes[e],i.initialStates.push(t.bounds())},_hover:function(e,t){if(this._resizable()){var i=this._handleOptions(),n=i.hover,o=i.stroke,r=i.fill;e&&G.isDefined(n.stroke)&&(o=X({},o,n.stroke)),e&&G.isDefined(n.fill)&&(r=n.fill),t.stroke(o.color,o.width,o.opacity),t.fill(r.color,r.opacity)}},start:function(e){var t,i;for(this._sp=e,this._cp=e,this._lp=e,this._manipulating=!0,this._internalChange=!0,this.shapeStates=[],t=0;t<this.shapes.length;t++)i=this.shapes[t],this.shapeStates.push(i.bounds())},redraw:function(){var e,t,i=this._resizable();for(e=0;e<this.map.length;e++)t=this.map[e],t.visual.visible(i)},angle:function(e){return te(e)&&(this._angle=e),this._angle},rotate:function(){var e,t,i=this._innerBounds.center(),n=this.angle();for(this._internalChange=!0,e=0;e<this.shapes.length;e++)t=this.shapes[e],n=(n+this.initialRotates[e]-this._startAngle)%360,t.rotate(n,i);this.refresh()},move:function(e,i){var r,s,a,l,c,d,u,h,p,f,m,g,v,_,b=new K,w=new K,y=0;if(e.y===-2&&e.x===-1){for(l=this._innerBounds.center(),this._angle=this._truncateAngle(G.findAngle(l,i)),d=0;d<this.shapes.length;d++)c=this.shapes[d],u=(this._angle+this.initialRotates[d]-this._startAngle)%360,c.rotate(u,l),c.hasOwnProperty("layout")&&c.layout(c),this._rotating=!0;this.refresh()}else{if(this.shouldSnap()){if(g=this._truncateDistance(i.minus(this._lp)),0===g.x&&0===g.y)return this._cp=i,t;r=g,this._lp=new K(this._lp.x+g.x,this._lp.y+g.y)}else r=i.minus(this._cp);for(this.isDragHandle(e)?(w=b=r,s=!0):(this._angle&&r.rotate(new K(0,0),this._angle),e.x==-1?b.x=r.x:1==e.x&&(w.x=r.x),e.y==-1?b.y=r.y:1==e.y&&(w.y=r.y)),s||(p=n(e,this._innerBounds),f=(this._innerBounds.width+r.x*e.x)/this._innerBounds.width,m=(this._innerBounds.height+r.y*e.y)/this._innerBounds.height),d=0;d<this.shapes.length;d++){if(c=this.shapes[d],a=c.bounds(),s){if(!o(c))continue;h=this._displaceBounds(a,b,w,s)}else h=a.clone(),h.scale(f,m,p,this._innerBounds.center(),c.rotate().angle),v=h.center(),v.rotate(a.center(),-this._angle),h=new q(v.x-h.width/2,v.y-h.height/2,h.width,h.height);h.width>=c.options.minWidth&&h.height>=c.options.minHeight&&(_=a,c.bounds(h),c.hasOwnProperty("layout")&&c.layout(c,_,h),_.width===h.width&&_.height===h.height||c.rotate(c.rotate().angle),y+=1)}y&&(y==d?(h=this._displaceBounds(this._innerBounds,b,w,s),this.bounds(h)):this.refreshBounds(),this.refresh()),this._positions()}this._cp=i},isDragHandle:function(e){return 0===e.x&&0===e.y},cancel:function(){var e,i=this.shapes,n=this.shapeStates;for(e=0;e<i.length;e++)i[e].bounds(n[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(),i=Math.max(t.angle||he,be);return t?Math.floor(e%360/i)*i:e%360},_truncateDistance:function(e){var t,i;return e instanceof V.Point?new V.Point(this._truncateDistance(e.x),this._truncateDistance(e.y)):(t=this.snapOptions()||{},i=Math.max(t.size||ue,_e),t?Math.floor(e/i)*i: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,i=(t||{}).snap;return e!==!1&&t!==!1&&i!==!1},_displaceBounds:function(e,t,i,n){var o,r=e.topLeft().plus(t),s=e.bottomRight().plus(i),a=q.fromPoints(r,s);return n||(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,i,n,o;if(this._cp!=this._sp)if(this._rotating)e=new _(this,this.shapes,this.initialRotates),this._rotating=!1;else if(this._diffStates()){if(this.diagram.ruler)for(i=0;i<this.shapes.length;i++)n=this.shapes[i],o=n.bounds(),o=this._truncateSizeToGuides(this._truncatePositionToGuides(o)),n.bounds(o),this.refreshBounds(),this.refresh();for(i=0;i<this.shapes.length;i++)n=this.shapes[i],n.updateModel();e=new f(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,i=this.shapeStates;for(e=0;e<t.length;e++)if(!t[e].bounds().equals(i[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,i,n,o,r=this;this.shapes.length>0?(i=this.bounds(),this.visual.visible(!0),this.visual.position(i.topLeft()),e.each(this.map,function(){t=r._getHandleBounds(new K(this.x,this.y)),this.visual.position(t.topLeft())}),this.visual.position(i.topLeft()),n=new K(i.width/2,i.height/2),this.visual.rotate(this._angle,n),this.rect.redraw({width:i.width,height:i.height}),this.rotationThumb&&(o=this.options.editable.rotate.thumb,this._rotationThumbBounds=new q(i.center().x,i.y+o.y,0,0).inflate(o.width),this.rotationThumb.redraw({x:i.width/2-o.width/2}))):this.visual.visible(!1)}}),L=W.extend({init:function(e){var t=e.options.selectable;this.options=X({},this.options,t),this.visual=new j(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=W.extend({init:function(e){this.options=X({},e.options),this._c=e,this.visual=new Y(this.options),this.refresh()},_hover:function(e){var t=this.options,i=t.hover,n=t.stroke,o=t.fill;e&&G.isDefined(i.stroke)&&(n=X({},n,i.stroke)),e&&G.isDefined(i.fill)&&(o=i.fill),this.visual.redraw({stroke:n,fill:o})},refresh:function(){var e=this._c.shape.diagram.modelToView(this._c.position()),t=e.minus(this._c.shape.bounds("transformed").topLeft()),i=new q(e.x,e.y,0,0);i.inflate(this.options.width/2,this.options.height/2),this._visualBounds=i,this.visual.redraw({center:new K(t.x,t.y)})},_hitTest:function(e){var t=this._c.shape.diagram.modelToView(e);return this._visualBounds.contains(t)}}),X(V,{CompositeUnit:c,TransformUnit:f,PanUndoUnit:v,AddShapeUnit:g,AddConnectionUnit:m,DeleteShapeUnit:p,DeleteConnectionUnit:h,ConnectionEditAdorner:P,ConnectionTool:T,ConnectorVisual:H,UndoRedoService:y,ResizingAdorner:B,Selector:L,ToolService:A,ConnectorsAdorner:z,LayoutUndoUnit:l,ConnectionEditUnit:d,ToFrontUnit:b,ToBackUnit:w,ConnectionRouterBase:E,PolylineRouter:M,CascadingRouter:R,SelectionTool:S,ScrollerTool:x,PointerTool:C,ConnectionEditTool:D,RotateUnit:_})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/diagram/layout.min",["dataviz/diagram/math.min"],e)}(function(){!function(e,t){var i=window.kendo,n=i.dataviz.diagram,o=n.Graph,r=n.Node,s=n.Link,a=i.deepExtend,l=n.Size,c=n.Rect,d=n.Dictionary,u=n.Set,h=n.Graph,p=n.Utils,f=n.Point,m=1e-6,g=Math.PI/180,v=p.contains,_=e.grep,b=i.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,i,n,o,r,s,a,l,c,d,u,h,m,g,v;if(!e)throw"No components supplied.";for(p.forEach(e,function(e){e.calcBounds()}),e.sort(function(e,t){return t.bounds.width-e.bounds.width}),t=this.options.grid.width,i=this.options.grid.componentSpacingX,n=this.options.grid.componentSpacingY,o=0,r=this.options.grid.offsetX,s=this.options.grid.offsetY,a=r,l=s,d=[],u=[];e.length>0;){for(a>=t&&(a=r,l+=o+n,o=0),h=e.pop(),this.moveToOffset(h,new f(a,l)),c=0;c<h.nodes.length;c++)u.push(h.nodes[c]);for(c=0;c<h.links.length;c++)d.push(h.links[c]);m=h.bounds,g=m.height,(g<=0||isNaN(g))&&(g=0),v=m.width,(v<=0||isNaN(v))&&(v=0),g>=o&&(o=g),a+=v+i}return{nodes:u,links:d}},moveToOffset:function(e,t){var i,n,o,r,s,a,l,d,u=e.bounds,h=t.x-u.x,p=t.y-u.y;for(i=0;i<e.nodes.length;i++)o=e.nodes[i],r=o.bounds(),0===r.width&&0===r.height&&0===r.x&&0===r.y&&(r=new c(0,0,0,0)),r.x+=h,r.y+=p,o.bounds(r);for(i=0;i<e.links.length;i++)if(s=e.links[i],s.points){for(a=[],l=s.points,n=0;n<l.length;n++)d=l[n],d.x+=h,d.y+=p,a.push(d);s.points=a}return this.currentHorizontalOffset+=u.width+this.options.grid.offsetX,new f(h,p)},transferOptions:function(e){this.options=i.deepExtend({},this.defaultOptions),p.isUndefined(e)||(this.options=i.deepExtend(this.options,e||{}))}}),w=i.Class.extend({init:function(e){this.nodeMap=new d,this.shapeMap=new d,this.nodes=[],this.edges=[],this.edgeMap=new d,this.finalNodes=[],this.finalLinks=[],this.ignoredConnections=[],this.ignoredShapes=[],this.hyperMap=new d,this.hyperTree=new o,this.finalGraph=null,this.diagram=e},convert:function(e){if(p.isUndefined(this.diagram))throw"No diagram to convert.";return this.options=i.deepExtend({ignoreInvisible:!0,ignoreContainers:!0,layoutContainerChildren:!1},e||{}),this.clear(),this._renormalizeShapes(),this._renormalizeConnections(),this.finalNodes=new d(this.nodes),this.finalLinks=new d(this.edges),this.finalGraph=new o,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 p.first(e.links,function(i){return i.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 d:null,this.nodeMap=new d,this.shapeMap=new d,this.nodes=[],this.edges=[],this.edgeMap=new d,this.ignoredConnections=[],this.ignoredShapes=[],this.finalNodes=[],this.finalLinks=[]},listToRoot:function(e){var t=[],i=e.container;if(!i)return t;for(t.push(i);i.parentContainer;)i=i.parentContainer,t.push(i);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))||t.isContainer&&this.isDescendantOf(t,e)},isDescendantOf:function(e,t){var i,n,o,r;if(!e.isContainer)throw"Expecting a container.";if(e===t)return!1;if(v(e.children,t))return!0;for(i=[],n=0,o=e.children.length;n<o;n++)r=e.children[n],r.isContainer&&this.isDescendantOf(r,t)&&i.push(r);return i.length>0},isIgnorableItem:function(e){return this.options.ignoreInvisible?(!e.isCollapsed||!this._isVisible(e))&&!(!e.isCollapsed&&this._isVisible(e)):e.isCollapsed&&!this._isTop(e)},isShapeMapped:function(e){return e.isCollapsed&&!this._isVisible(e)&&!this._isTop(e)},leastCommonAncestor:function(e,t){var i,n,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(i=this.listToRoot(e),n=this.listToRoot(t),o=null,p.isEmpty(i)||p.isEmpty(n))return this.hyperTree.root.data;for(r=i[0],s=n[0],a=0;r===s&&(o=i[a],a++,!(a>=i.length||a>=n.length));)r=i[a],s=n[a];return o?_(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())},_isCollapsed:function(e){return!(!e.isContainer||!e.isCollapsed)||e.parentContainer&&this._isCollapsed(e.parentContainer)},_renormalizeShapes:function(){var e,t,i,n;if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";for(e=0,t=this.diagram.shapes.length;e<t;e++)i=this.diagram.shapes[e],this.options.ignoreInvisible&&!this._isVisible(i)||i.isContainer?this.ignoredShapes.push(i):(n=new r(i.id,i),n.isVirtual=!1,this.nodeMap.add(i.id,n),this.nodes.push(n))},_renormalizeConnections:function(){var e,t,i,n,o,r,a,l;if(0!==this.diagram.connections.length)for(e=0,t=this.diagram.connections.length;e<t;e++)if(i=this.diagram.connections[e],this.isIgnorableItem(i))this.ignoredConnections.push(i);else if(n=i.sourceConnector?i.sourceConnector.shape:null,o=i.targetConnector?i.targetConnector.shape:null,n&&o)if(!v(this.ignoredShapes,n)||this.shapeMap.containsKey(n))if(!v(this.ignoredShapes,o)||this.shapeMap.containsKey(o))if(this.shapeMap.containsKey(n)&&(n=this.shapeMap[n]),
this.shapeMap.containsKey(o)&&(o=this.shapeMap[o]),r=this.mapShape(n),a=this.mapShape(o),r===a||this.areConnectedAlready(r,a))this.ignoredConnections.push(i);else{if(null===r||null===a)throw"A shape was not mapped to a node.";if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";r.isVirtual||a.isVirtual?this.ignoredConnections.push(i):(l=new s(r,a,i.id,i),this.edgeMap.add(i.id,l),this.edges.push(l))}else this.ignoredConnections.push(i);else this.ignoredConnections.push(i);else this.ignoredConnections.push(i)},areConnectedAlready:function(e,t){return p.any(this.edges,function(i){return i.source===e&&i.target===t||i.source===t&&i.target===e})}}),y=b.extend({init:function(e){var t=this;if(b.fn.init.call(t),p.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 w(this.diagram),i=t.convert(e),!i.isEmpty()&&(o=i.getConnectedComponents(),!p.isEmpty(o))){for(r=0;r<o.length;r++)s=o[r],this.layoutGraph(s,e);return a=this.gridLayoutComponents(o),new n.LayoutState(this.diagram,a)}},layoutGraph:function(e,t){var i,n,o;for(p.isDefined(t)&&this.transferOptions(t),this.graph=e,i=9*this.options.nodeDistance,this.temperature=i,n=this._expectedBounds(),this.width=n.width,this.height=n.height,o=0;o<this.options.iterations;o++)this.refineStage=o>=5*this.options.iterations/6,this.tick(),this.temperature=this.refineStage?i/30:i*(1-o/(2*this.options.iterations))},tick:function(){var e,t,i;for(e=0;e<this.graph.nodes.length;e++)this._repulsion(this.graph.nodes[e]);for(e=0;e<this.graph.links.length;e++)this._attraction(this.graph.links[e]);for(e=0;e<this.graph.nodes.length;e++){if(t=this.graph.nodes[e],i=Math.sqrt(t.dx*t.dx+t.dy*t.dy),0===i)return;t.x+=Math.min(i,this.temperature)*t.dx/i,t.y+=Math.min(i,this.temperature)*t.dy/i,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,i=2*Math.random()*Math.PI;e.x+=t*Math.cos(i),e.y-=t*Math.sin(i)},_InverseSquareForce:function(e,t,i){var n,o,r,s,a,l,c;return this.refineStage?(o=t.x-i.x,r=t.y-i.y,s=t.width/2,a=t.height/2,l=i.width/2,c=i.height/2,n=Math.pow(o,2)/Math.pow(s+l+this.options.nodeDistance,2)+Math.pow(r,2)/Math.pow(a+c+this.options.nodeDistance,2)):n=Math.pow(e,2)/Math.pow(this.options.nodeDistance,2),4*n/3},_SquareForce:function(e,t,i){return 1/this._InverseSquareForce(e,t,i)},_repulsion:function(e){e.dx=0,e.dy=0,p.forEach(this.graph.nodes,function(t){var i,n,o,r;if(t!==e){for(;e.x===t.x&&e.y===t.y;)this._shake(t);i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),r=2*this._SquareForce(o,e,t),e.dx+=i/o*r,e.dy+=n/o*r}},this)},_attraction:function(e){var t,i,n,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,i=l.y-a.y,n=Math.sqrt(t*t+i*i),o=5*this._InverseSquareForce(n,l,a),r=t/n*o,s=i/n*o,a.dx+=r,a.dy+=s,l.dx-=r,l.dy-=s}},_expectedBounds:function(){var e,t,i,n,o,r=this.graph.nodes.length,s=1.5,a=4;return 0===r?e:(e=p.fold(this.graph.nodes,function(e,t){var i=t.width*t.height;return i>0?e+=Math.sqrt(i):0},0,this),t=e/r,i=t*Math.ceil(Math.sqrt(r)),n=i*Math.sqrt(s),o=i/Math.sqrt(s),{width:n*a,height:o*a})}}),k=i.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(!v(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,i,n,o,r,s,a,c;for(this.setChildrenDirection(this.center,"Left",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,i=0,o=0;o<e.length;o++)r=e[o],r.TreeDirection="Left",s=this.measure(r,l.Empty),i=Math.max(i,s.Width),t+=s.height+this.options.verticalSeparation;for(t-=this.options.verticalSeparation,a=this.center.x-this.options.horizontalSeparation,n=this.center.y+(this.center.height-t)/2,o=0;o<e.length;o++)r=e[o],c=new f(a-r.Size.width,n),this.arrange(r,c),n+=r.Size.height+this.options.verticalSeparation},layoutRight:function(e){var t,i,n,o,r,s,a,c;for(this.setChildrenDirection(this.center,"Right",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,i=0,o=0;o<e.length;o++)r=e[o],r.TreeDirection="Right",s=this.measure(r,l.Empty),i=Math.max(i,s.Width),t+=s.height+this.options.verticalSeparation;for(t-=this.options.verticalSeparation,a=this.center.x+this.options.horizontalSeparation+this.center.width,n=this.center.y+(this.center.height-t)/2,o=0;o<e.length;o++)r=e[o],c=new f(a,n),this.arrange(r,c),n+=r.Size.height+this.options.verticalSeparation},layoutUp:function(e){var t,i,n,o,r,s,a;for(this.setChildrenDirection(this.center,"Up",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,o=0;o<e.length;o++)n=e[o],n.TreeDirection="Up",r=this.measure(n,l.Empty),t+=r.width+this.options.horizontalSeparation;for(t-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-t/2,o=0;o<e.length;o++)n=e[o],i=this.center.y-this.options.verticalSeparation-n.Size.height,a=new f(s,i),this.arrange(n,a),s+=n.Size.width+this.options.horizontalSeparation},layoutDown:function(e){var t,i,n,o,r,s,a;for(this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),n=0,i=0;i<e.length;i++)t=e[i],t.treeDirection="Down",r=this.measure(t,l.Empty),n+=r.width+this.options.horizontalSeparation;for(n-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-n/2,o=this.center.y+this.options.verticalSeparation+this.center.height,i=0;i<e.length;i++)t=e[i],a=new f(s,o),this.arrange(t,a),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,t<=e)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 i,n,o,r,s,a,c;for(p.isUndefined(t)&&(t=0),this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),this.setChildrenLayout(this.center,"Underneath",!1,t),i=0,r=0;r<e.length;r++)o=e[r],o.TreeDirection="Down",s=this.measure(o,l.Empty),i+=s.width+this.options.horizontalSeparation;for(i-=this.options.horizontalSeparation,i-=e[e.length-1].width,i+=e[e.length-1].associatedShape.bounds().width,a=this.center.x+this.center.width/2-i/2,n=this.center.y+this.options.verticalSeparation+this.center.height,r=0;r<e.length;r++)o=e[r],c=new f(a,n),this.arrange(o,c),a+=o.Size.width+this.options.horizontalSeparation},calculateAngularWidth:function(e,t){var i,n,o,r,s,a,l;if(t>this.maxDepth&&(this.maxDepth=t),i=0,n=1e3,o=1e3,r=0===t?0:Math.sqrt(n*n+o*o)/t,e.children.length>0){for(s=0,a=e.children.length;s<a;s++)l=e.children[s],i+=this.calculateAngularWidth(l,t+1);i=Math.max(r,i)}else i=r;return e.sectorAngle=i,i},sortChildren:function(e){var t,i,n,o,r,s,a,l,c,d,u,h=0;if(e.parents.length>1)throw"Node is not part of a tree.";if(i=e.parents[0],i&&(n=new f(i.x,i.y),o=new f(e.x,e.y),h=this.normalizeAngle(Math.atan2(n.y-o.y,n.x-o.x))),r=e.children.length,0===r)return null;for(s=[],a=[],t=0;t<r;++t)l=e.children[t],c=new f(l.x,l.y),a[t]=t,s[t]=this.normalizeAngle(-h+Math.atan2(c.y-c.y,c.x-c.x));for(p.bisort(s,a),d=[],u=e.children,t=0;t<r;++t)d.push(u[a[t]]);return d},normalizeAngle:function(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;e<0;)e+=2*Math.PI;return e},radialLayout:function(e,t,i,n){var o,r,s,a,l,c=n-i,d=c/2,u=e.sectorAngle,h=0,p=this.sortChildren(e);for(o=0,r=p.length;o<r;o++)s=p[o],a=s,l=a.sectorAngle/u,s.children.length>0&&this.radialLayout(s,t+this.options.radialSeparation,i+h*c,i+(h+l)*c),this.setPolarLocation(s,t,i+h*c+l*d),a.angle=l*c,h+=l},setPolarLocation:function(e,t,i){e.x=this.origin.x+t*Math.cos(i),e.y=this.origin.y+t*Math.sin(i),e.BoundingRectangle=new c(e.x,e.y,e.width,e.height)},setChildrenDirection:function(e,t,i){var n=e.treeDirection;this.graph.depthFirstTraversal(e,function(e){e.treeDirection=t}),i||(e.treeDirection=n)},setChildrenLayout:function(e,t,i,n){p.isUndefined(n)&&(n=0);var o=e.childrenLayout;n>0?(this.graph.assignLevels(e),this.graph.depthFirstTraversal(e,function(e){e.level>=n+1&&(e.childrenLayout=t)})):(this.graph.depthFirstTraversal(e,function(e){e.childrenLayout=t}),i||(e.childrenLayout=o))},measure:function(e,t){var i,n,o,r,s,a,c,d=0,u=0,h=new l(0,0);if(!e)throw"";if(n=e.associatedShape.bounds(),o=n.width,r=n.height,1!==e.parents.length)throw"Node not in a spanning tree.";if(s=e.parents[0],"Undefined"===e.treeDirection&&(e.treeDirection=s.treeDirection),p.isEmpty(e.children))h=new l(Math.abs(o)<m?50:o,Math.abs(r)<m?25:r);else if(1===e.children.length){switch(e.treeDirection){case"Radial":i=this.measure(e.children[0],t),d=o+this.options.radialSeparation*Math.cos(e.AngleToParent)+i.width,u=r+Math.abs(this.options.radialSeparation*Math.sin(e.AngleToParent))+i.height;break;case"Left":case"Right":switch(e.childrenLayout){case"TopAlignedWithParent":break;case"BottomAlignedWithParent":break;case"Underneath":i=this.measure(e.children[0],t),d=o+i.width+this.options.underneathHorizontalOffset,u=r+this.options.underneathVerticalTopOffset+i.height;break;case"Default":i=this.measure(e.children[0],t),d=o+this.options.horizontalSeparation+i.width,u=Math.max(r,i.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":i=this.measure(e.children[0],t),d=Math.max(o,i.width+this.options.underneathHorizontalOffset),u=r+this.options.underneathVerticalTopOffset+i.height;break;case"Default":i=this.measure(e.children[0],t),u=r+this.options.verticalSeparation+i.height,d=Math.max(o,i.width);break;default:throw"Unhandled TreeDirection in the Down layout measuring."}break;default:throw"Unhandled TreeDirection in the layout measuring."}h=new l(d,u)}else{switch(e.treeDirection){case"Left":case"Right":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(d=o,u=r+this.options.underneathVerticalTopOffset,a=0;a<e.children.length;a++)c=e.children[a],i=this.measure(c,t),d=Math.max(d,i.width+this.options.underneathHorizontalOffset),u+=i.height+this.options.underneathVerticalSeparation;u-=this.options.underneathVerticalSeparation;break;case"Default":for(d=o,u=0,a=0;a<e.children.length;a++)c=e.children[a],i=this.measure(c,t),d=Math.max(d,o+this.options.horizontalSeparation+i.width),u+=i.height+this.options.verticalSeparation;u-=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(d=o,u=r+this.options.underneathVerticalTopOffset,a=0;a<e.children.length;a++)c=e.children[a],i=this.measure(c,t),d=Math.max(d,i.width+this.options.underneathHorizontalOffset),u+=i.height+this.options.underneathVerticalSeparation;u-=this.options.underneathVerticalSeparation;break;case"Default":for(d=0,u=0,a=0;a<e.children.length;a++)c=e.children[a],i=this.measure(c,t),d+=i.width+this.options.horizontalSeparation,u=Math.max(u,i.height+this.options.verticalSeparation+r);d-=this.options.horizontalSeparation;break;default:throw"Unhandled TreeDirection in the Down layout measuring."}break;default:throw"Unhandled TreeDirection in the layout measuring."}h=new l(d,u)}return e.SectorAngle=Math.sqrt(d*d/4+u*u/4),e.Size=h,h},arrange:function(e,t){var i,n,o,r,s,a,l,d,u=e.associatedShape.bounds(),h=u.width,g=u.height;if(p.isEmpty(e.children))e.x=t.x,e.y=t.y,e.BoundingRectangle=new c(t.x,t.y,h,g);else switch(e.treeDirection){case"Left":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(d=t,e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),l=t.y+g+this.options.underneathVerticalTopOffset,i=0;i<r.children.length;i++)r=r.children[i],a=d.x-r.associatedShape.width-this.options.underneathHorizontalOffset,n=new f(a,l),this.arrange(r,n),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(d=new f(t.x+e.Size.width-h,t.y+(e.Size.height-g)/2),e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),a=d.x-this.options.horizontalSeparation,l=t.y,i=0;i<e.children.length;i++)r=e.children[i],n=new f(a-r.Size.width,l),this.arrange(r,n),l+=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(d=t,e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),a=t.x+h+this.options.underneathHorizontalOffset,l=t.y+g+this.options.underneathVerticalTopOffset,i=0;i<e.children.length;i++)r=e.children[i],n=new f(a,l),this.arrange(r,n),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(d=new f(t.x,t.y+(e.Size.height-g)/2),e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),a=t.x+h+this.options.horizontalSeparation,l=t.y,i=0;i<e.children.length;i++)r=e.children[i],n=new f(a,l),this.arrange(r,n),l+=r.Size.height+this.options.verticalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"Up":if(d=new f(t.x+(e.Size.width-h)/2,t.y+e.Size.height-g),e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),Math.abs(d.x-t.x)<m){for(s=0,i=0;i<e.children.length;i++)o=e.children[i],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=t.x+(h-s)/2}else a=t.x;for(i=0;i<e.children.length;i++)r=e.children[i],l=d.y-this.options.verticalSeparation-r.Size.height,n=new f(a,l),this.arrange(r,n),a+=r.Size.width+this.options.horizontalSeparation;break;case"Down":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(d=t,e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),a=t.x+this.options.underneathHorizontalOffset,l=t.y+g+this.options.underneathVerticalTopOffset,i=0;i<e.children.length;i++)r=e.children[i],n=new f(a,l),this.arrange(r,n),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":if(d=new f(t.x+(e.Size.width-h)/2,t.y),e.x=d.x,e.y=d.y,e.BoundingRectangle=new c(e.x,e.y,e.width,e.height),Math.abs(d.x-t.x)<m){for(s=0,i=0;i<e.children.length;i++)o=e.children[i],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=t.x+(h-s)/2}else a=t.x;for(i=0;i<e.children.length;i++)r=e.children[i],l=d.y+this.options.verticalSeparation+g,n=new f(a,l),this.arrange(r,n),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,i,n,o,r;if(this.center&&!p.isEmpty(this.center.children))switch(e=this.options.subtype,p.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,i=_(this.center.children,function(e){return p.indexOf(r,e)<o}),n=_(this.center.children,function(e){return p.indexOf(r,e)>=o}),this.layoutLeft(i),this.layoutRight(n));break;case"mindmapvertical":t=this.center.children,1===this.center.children.length?this.layoutDown(t):(o=r.length/2,i=_(this.center.children,function(e){return p.indexOf(r,e)<o}),n=_(this.center.children,function(e){return p.indexOf(r,e)>=o}),this.layoutUp(i),this.layoutDown(n));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(this.options.tipOverTreeStartLevel<0)throw"The tip-over level should be a positive integer.";this.tipOverTree(this.center.children,this.options.tipOverTreeStartLevel);break;case"undefined":case"none":}}}),x=b.extend({init:function(e){var t=this;if(b.fn.init.call(t),p.isUndefined(e))throw"No diagram specified.";this.diagram=e},layout:function(e){var t,i;return this.transferOptions(e),t=new w(this.diagram),this.graph=t.convert(),i=this.layoutComponents(),new n.LayoutState(this.diagram,i)},layoutComponents:function(){var e,t,i,n,o,r,s,a;if(!this.graph.isEmpty()&&(e=this.graph.getConnectedComponents(),!p.isEmpty(e))){for(t=new k(this.options),i=[],n=0;n<e.length;n++){if(o=e[n],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),i.push(a)}return this.gridLayoutComponents(i)}},getTree:function(e){var t,i,n,o,r,s=null;if(this.options.roots&&this.options.roots.length>0)for(t=0,i=e.nodes.length;t<i;t++)for(n=e.nodes[t],o=0;o<this.options.roots.length;o++)if(r=this.options.roots[o],r===n.associatedShape){s=n;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 i=e.getSpanningTree(t);return p.isUndefined(i)||i.isEmpty()?null:{tree:i,root:i.root}}}),C=b.extend({init:function(e){var t=this;if(b.fn.init.call(t),p.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 w(this.diagram),i=t.convert(e),!i.isEmpty()&&(o=i.getConnectedComponents(),!p.isEmpty(o))){for(r=0;r<o.length;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;e<this.graph.nodes.length;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,i,n,o,r,s,a,l,c,u,h,f=[],m=new d,g=0;for(p.forEach(e.nodes,function(e){0===e.incoming.length&&(m.set(e,0),f.push(e))});f.length>0;)for(r=f.shift(),t=0;t<r.outgoing.length;t++)n=r.outgoing[t],s=n.target,o=m.containsKey(s)?Math.max(m.get(r)+1,m.get(s)):m.get(r)+1,m.set(s,o),o>g&&(g=o),v(f,s)||f.push(s);for(a=m.keys(),a.sort(function(e,t){var i=m.get(e),n=m.get(t);return p.sign(n-i)}),l=0;l<a.length;++l)if(c=a[l],u=Number.MAX_VALUE,0!==c.outgoing.length){for(i=0;i<c.outgoing.length;++i)n=c.outgoing[i],u=Math.min(u,m.get(n.target));u>1&&m.set(c,u-1)}for(this.layers=[],t=0;t<g+1;t++)h=[],h.linksTo={},this.layers.push(h);for(m.forEach(function(e,t){e.layer=t,this.layers[t].push(e)},this),i=0;i<this.layers.length;i++)for(h=this.layers[i],t=0;t<h.length;t++)h[t].gridPosition=t},layoutGraph:function(e,t){if(p.isUndefined(e))throw"No graph given or graph analysis of the diagram failed.";p.isDefined(t)&&this.transferOptions(t),this.graph=e,e.setItemIndices();var i=e.makeAcyclic();this._initRuntimeProperties(),this._prepare(e,t),this._dummify(),this._optimizeCrossings(),this._swapPairs(),this.arrangeNodes(),this._moveThingsAround(),this._dedummify(),p.forEach(i,function(e){e.points&&e.points.reverse()})},setMinDist:function(e,t,i){var n=e.layer,o=e.layerIndex;this.minDistances[n][o]=i},getMinDist:function(e,t){var i,n=0,o=e.layerIndex,r=t.layerIndex,s=e.layer,a=Math.min(o,r),l=Math.max(o,r);for(i=a;i<l;++i)n+=this.minDistances[s][i];return n},placeLeftToRight:function(e){var t,i,n,o,r,s,a,l,c,u,h=new d;for(n=0;n<this.layers.length;++n)if(o=e[n]){for(t=0;t<o.length;t++)i=o[t],h.containsKey(i)||this.placeLeft(i,h,n);for(r=Number.POSITIVE_INFINITY,t=0;t<o.length;t++)i=o[t],s=this.rightSibling(i),s&&this.nodeLeftClass.get(s)!==n&&(r=Math.min(r,h.get(s)-h.get(i)-this.getMinDist(i,s)));if(r===Number.POSITIVE_INFINITY){for(a=[],t=0;t<o.length;t++)for(i=o[t],l=[],p.addRange(l,this.upNodes.get(i)),p.addRange(l,this.downNodes.get(i)),c=0;c<l.length;c++)u=l[c],this.nodeLeftClass.get(u)<n&&a.push(h.get(u)-h.get(i));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;t<o.length;t++)i=o[t],h.set(i,h.get(i)+r)}return h},placeRightToLeft:function(e){var t,i,n,o,r,s,a,l,c,u,h=new d;for(n=0;n<this.layers.length;++n)if(o=e[n]){for(t=0;t<o.length;t++)i=o[t],h.containsKey(i)||this.placeRight(i,h,n);for(r=Number.NEGATIVE_INFINITY,t=0;t<o.length;t++)i=o[t],s=this.leftSibling(i),s&&this.nodeRightClass.get(s)!==n&&(r=Math.max(r,h.get(s)-h.get(i)+this.getMinDist(s,i)));if(r===Number.NEGATIVE_INFINITY){for(a=[],t=0;t<o.length;t++)for(i=o[t],l=[],p.addRange(l,this.upNodes.get(i)),p.addRange(l,this.downNodes.get(i)),c=0;c<l.length;c++)u=l[c],this.nodeRightClass.get(u)<n&&a.push(h.get(i)-h.get(u));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;t<o.length;t++)i=o[t],h.set(i,h.get(i)+r)}return h},_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 i,n,o,r,s,a,l,c,u,h=0,p=e.value=new d;for(i=0;i<this.layers.length;++i)for(h=i,n=this.layers[i],o=1===t?0:n.length-1;0<=o&&o<n.length;o+=t)if(r=n[o],p.containsKey(r))h=p.get(r);else if(p.set(r,h),r.isVirtual)for(s=this._nodesInLink(r),a=0;a<s.length;a++)l=s[a],p.set(l,h);for(c=[],u=0;u<this.layers.length;u++)c.push(null);return p.forEach(function(e,t){null===c[t]&&(c[t]=[]),c[t].push(e)}),c},_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 i,n,o=Number.MIN_VALUE;for(i=0;i<e.length;++i)n=e[i],o=t._isVerticalLayout()?Math.max(o,n.height):Math.max(o,n.width);return o}var t,i,n,o,r,s,a,l,c,u,h,f,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E;for(i=0;i<this.layers.length;++i)o=this.layers[i],o.sort(this._gridPositionComparer);for(this.minDistances=[],i=0;i<this.layers.length;++i)for(o=this.layers[i],this.minDistances[i]=[],r=0;r<o.length;++r)n=o[r],n.layerIndex=r,this.minDistances[i][r]=this.options.nodeDistance,r<o.length-1&&(this.minDistances[i][r]+=this._isVerticalLayout()?(n.width+o[r+1].width)/2:(n.height+o[r+1].height)/2);for(this.downNodes=new d,this.upNodes=new d,p.forEach(this.graph.nodes,function(e){this.downNodes.set(e,[]),this.upNodes.set(e,[])},this),p.forEach(this.graph.links,function(e){var t=e.source,i=e.target,n=null,o=null;t.layer>i.layer?(n=e.source,o=e.target):(o=e.source,n=e.target),this.downNodes.get(o).push(n),this.upNodes.get(n).push(o)},this),this.downNodes.forEachValue(function(e){e.sort(this._gridPositionComparer)},this),this.upNodes.forEachValue(function(e){e.sort(this._gridPositionComparer)},this),i=0;i<this.layers.length-1;++i)for(o=this.layers[i],s=0;s<o.length-1;s++)if(a=o[s],a.isVirtual&&(l=this.downNodes.get(a)[0],l.isVirtual))for(r=s+1;r<o.length;++r)n=o[r],n.isVirtual&&(c=this.downNodes.get(n)[0],c.isVirtual&&l.gridPosition>c.gridPosition&&(u=l.gridPosition,l.gridPosition=c.gridPosition,c.gridPosition=u,h=l.layerIndex,f=c.layerIndex,this.layers[i+1][h]=c,this.layers[i+1][f]=l,l.layerIndex=f,c.layerIndex=h));for(m=this._getLeftWing(),g=this._getRightWing(),v=this.placeLeftToRight(m),_=this.placeRightToLeft(g),b=new d,p.forEach(this.graph.nodes,function(e){b.set(e,(v.get(e)+_.get(e))/2)}),w=new d,y=new d,i=0;i<this.layers.length;++i)for(o=this.layers[i],k=-1,x=-1,r=0;r<o.length;++r)n=o[r],w.set(n,0),y.set(n,!1),n.isVirtual&&(k===-1?k=r:k===r-1?k=r:(x=r,w.set(o[k],0),b.get(n)-b.get(o[k])===this.getMinDist(o[k],n)?y.set(o[k],!0):y.set(o[k],!1),k=r));for(C=[1,-1],p.forEach(C,function(e){var i,n,o,r,s,a,l,c=1===e?0:this.layers.length-1;for(i=c;0<=i&&i<this.layers.length;i+=e){if(n=this.layers[i],o=this._firstVirtualNode(n),r=null,s=null,o!==-1)for(r=n[o],s=[],t=0;t<o;t++)s.push(n[t]);else r=null,s=n;if(s.length>0){for(this._sequencer(b,null,r,e,s),t=0;t<s.length-1;++t)this.setMinDist(s[t],s[t+1],b.get(s[t+1])-b.get(s[t]));r&&this.setMinDist(s[s.length-1],r,b.get(r)-b.get(s[s.length-1]))}for(;r;){if(a=this.nextVirtualNode(n,r)){if(w.get(r)===e){for(o=r.layerIndex,l=a.layerIndex,s=[],t=o+1;t<l;t++)s.push(n[t]);s.length>0&&this._sequencer(b,r,a,e,s),y.set(r,!0)}}else{for(o=r.layerIndex,s=[],t=o+1;t<n.length;t++)s.push(n[t]);if(s.length>0){for(this._sequencer(b,r,null,e,s),t=0;t<s.length-1;++t)this.setMinDist(s[t],s[t+1],b.get(s[t+1])-b.get(s[t]));this.setMinDist(r,s[0],b.get(s[0])-b.get(r))}}r=a}this.adjustDirections(i,e,w,y)}},this),S=this._isIncreasingLayout()?0:this.layers.length-1,T=function(e,t){return t._isIncreasingLayout()?e<t.layers.length:e>=0},D=this._isIncreasingLayout()?1:-1,A=0,t=S;T(t,this);t+=D){for(o=this.layers[t],E=e(o,this),r=0;r<o.length;++r)n=o[r],this._isVerticalLayout()?(n.x=b.get(n),n.y=A+E/2):(n.x=A+E/2,n.y=b.get(n));A+=this.options.layerSeparation+E}},adjustDirections:function(e,t,i,n){var o,r,s,a,l,c,d,u,h,p,f,m,g,v;if(!(e+t<0||e+t>=this.layers.length))for(o=null,r=null,s=this.layers[e+t],a=0;a<s.length;++a)if(l=s[a],l.isVirtual&&(c=this.getNeighborOnLayer(l,e),c.isVirtual)){if(o){for(d=n.get(r),u=this.layers[e],h=r.layerIndex,p=c.layerIndex,f=h+1;f<p;++f)u[f].isVirtual&&(d=d&&n.get(u[f]));if(d)for(i.set(o,t),m=o.layerIndex,g=l.layerIndex,v=m+1;v<g;++v)s[v].isVirtual&&i.set(s[v],t)}o=l,r=c}},getNeighborOnLayer:function(e,t){var i=this.upNodes.get(e)[0];return i.layer===t?i:(i=this.downNodes.get(e)[0],i.layer===t?i:null)},_sequencer:function(e,t,i,n,o){if(1===o.length&&this._sequenceSingle(e,t,i,n,o[0]),o.length>1){var r=o.length,s=this.intDiv(r,2);this._sequencer(e,t,i,n,o.slice(0,s)),this._sequencer(e,t,i,n,o.slice(s)),this.combineSequences(e,t,i,n,o)}},_sequenceSingle:function(e,t,i,n,o){var r=n===-1?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))),i&&e.set(o,Math.min(e.get(o),e.get(i)-this.getMinDist(o,i))))},combineSequences:function(e,t,i,n,o){var r,s,a,l,c,d,u,h,p,f,m=o.length,g=this.intDiv(m,2),v=[];for(r=0;r<g;++r){for(s=0,l=n===-1?this.downNodes.get(o[r]):this.upNodes.get(o[r]),a=0;a<l.length;++a)c=l[a],e.get(c)>=e.get(o[r])?s++:(s--,v.push({k:e.get(c)+this.getMinDist(o[r],o[g-1]),v:2}));v.push({k:e.get(o[r])+this.getMinDist(o[r],o[g-1]),v:s})}for(t&&v.push({k:e.get(t)+this.getMinDist(t,o[g-1]),v:Number.MAX_VALUE}),v.sort(this._positionDescendingComparer),u=[],r=g;r<m;++r){for(s=0,l=n===-1?this.downNodes.get(o[r]):this.upNodes.get(o[r]),a=0;a<l.length;++a)c=l[a],e.get(c)<=e.get(o[r])?s++:(s--,u.push({k:e.get(c)-this.getMinDist(o[r],o[g]),v:2}));u.push({k:e.get(o[r])-this.getMinDist(o[r],o[g]),v:s})}for(i&&u.push({k:e.get(i)-this.getMinDist(i,o[g]),v:Number.MAX_VALUE}),u.sort(this._positionAscendingComparer),h=0,p=0,f=this.getMinDist(o[g-1],o[g]);e.get(o[g])-e.get(o[g-1])<f;)if(h<p){if(0===v.length){e.set(o[g-1],e.get(o[g])-f);break}d=v.shift(),h+=d.v,e.set(o[g-1],d.k),e.set(o[g-1],Math.max(e.get(o[g-1]),e.get(o[g])-f))}else{if(0===u.length){e.set(o[g],e.get(o[g-1])+f);break}d=u.shift(),p+=d.v,e.set(o[g],d.k),e.set(o[g],Math.min(e.get(o[g]),e.get(o[g-1])+f))}for(r=g-2;r>=0;r--)e.set(o[r],Math.min(e.get(o[r]),e.get(o[g-1])-this.getMinDist(o[r],o[g-1])));for(r=g+1;r<m;r++)e.set(o[r],Math.max(e.get(o[r]),e.get(o[g])+this.getMinDist(o[r],o[g])))},placeLeft:function(e,t,i){var n=Number.NEGATIVE_INFINITY;p.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,i),n=Math.max(n,t.get(o)+this.getMinDist(o,e)))},this),n===Number.NEGATIVE_INFINITY&&(n=0),p.forEach(this._getComposite(e),function(e){t.set(e,n)})},placeRight:function(e,t,i){var n=Number.POSITIVE_INFINITY;p.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,i),n=Math.min(n,t.get(o)-this.getMinDist(e,o)))},this),n===Number.POSITIVE_INFINITY&&(n=0),p.forEach(this._getComposite(e),function(e){t.set(e,n)})},leftSibling:function(e){var t=this.layers[e.layer],i=e.layerIndex;return 0===i?null:t[i-1]},rightSibling:function(e){var t=this.layers[e.layer],i=e.layerIndex;return i===t.length-1?null:t[i+1]},_getComposite:function(e){return e.isVirtual?this._nodesInLink(e):[e]},arrangeNodes:function(){var e,t,i,n,o,r,s,a;for(t=0;t<this.layers.length;t++)for(n=this.layers[t],i=0;i<n.length;i++)o=n[i],o.upstreamPriority=o.upstreamLinkCount,o.downstreamPriority=o.downstreamLinkCount;for(r=2,s=0;s<r;s++){for(e=this.layers.length-1;e>=1;e--)this.layoutLayer(!1,e);for(e=0;e<this.layers.length-1;e++)this.layoutLayer(!0,e)}for(a=Number.MAX_VALUE,t=0;t<this.layers.length;t++)for(n=this.layers[t],i=0;i<n.length;i++)o=n[i],a=Math.min(a,o.gridPosition);if(a<0)for(t=0;t<this.layers.length;t++)for(n=this.layers[t],i=0;i<n.length;i++)o=n[i],o.gridPosition=o.gridPosition-a},layoutLayer:function(e,t){var i,n,o,r;for(n=e?this.layers[i=t+1]:this.layers[i=t-1],o=[],r=0;r<n.length;r++)o.push(n[r]);o.sort(function(e,t){var i=(e.upstreamPriority+e.downstreamPriority)/2,n=(t.upstreamPriority+t.downstreamPriority)/2;return Math.abs(i-n)<1e-4?0:i<n?1:-1}),p.forEach(o,function(e){var t=e.gridPosition,i=this.calcBaryCenter(e),o=(e.upstreamPriority+e.downstreamPriority)/2;if(!(Math.abs(t-i)<1e-4||Math.abs(t-i)<.2501))if(t<i)for(;t<i&&this.moveRight(e,n,o);)t=e.gridPosition;else for(;t>i&&this.moveLeft(e,n,o);)t=e.gridPosition},this),i>0&&this.calcDownData(i-1),i<this.layers.length-1&&this.calcUpData(i+1)},moveRight:function(e,t,i){var n,o,r=p.indexOf(t,e);return r===t.length-1?(e.gridPosition=e.gridPosition+.5,!0):(n=t[r+1],o=(n.upstreamPriority+n.downstreamPriority)/2,n.gridPosition>e.gridPosition+1?(e.gridPosition=e.gridPosition+.5,!0):!(o>i||Math.abs(o-i)<1e-4)&&(!!this.moveRight(n,t,i)&&(e.gridPosition=e.gridPosition+.5,!0)))},moveLeft:function(e,t,i){var n,o,r=p.indexOf(t,e);return 0===r?(e.gridPosition=e.gridPosition-.5,!0):(n=t[r-1],o=(n.upstreamPriority+n.downstreamPriority)/2,n.gridPosition<e.gridPosition-1?(e.gridPosition=e.gridPosition-.5,!0):!(o>i||Math.abs(o-i)<1e-4)&&(!!this.moveLeft(n,t,i)&&(e.gridPosition=e.gridPosition-.5,!0)))},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,i,n,o,a,l,c,u,h,f,m,g,v,_,b,w,y,k,x;for(this.linkToNodeMap=new d,this.nodeToLinkMap=new d,u=this.graph.links.slice(0),h=this.layers,f=function(e,t,i){h[e].linksTo[t]=h[e].linksTo[t]||[],h[e].linksTo[t].push(i)},c=0;c<u.length;c++)if(m=u[c],g=m.source,v=m.target,_=g.layer,b=v.layer,w=g.gridPosition,y=v.gridPosition,k=(y-w)/Math.abs(b-_),x=g,_-b>1){for(l=_-1;l>b;l--){for(i=new r,i.x=g.x,i.y=g.y,i.width=g.width/100,i.height=g.height/100,e=h[l],t=(l-b)*k+w,t>e.length&&(t=e.length),w>=h[_].length-1&&y>=h[b].length-1?t=e.length:0===w&&0===y&&(t=0),i.layer=l,i.uBaryCenter=0,i.dBaryCenter=0,i.upstreamLinkCount=0,i.downstreamLinkCount=0,i.gridPosition=t,i.isVirtual=!0,p.insert(e,i,t),
o=t+1;o<e.length;o++)n=e[o],n.gridPosition=n.gridPosition+1;a=new s(x,i),a.depthOfDumminess=0,f(l-1,l,a),x=i,this.graph._addNode(i),this.graph.addLink(a),i.index=this.graph.nodes.length-1,this.mapVirtualNode(i,m)}f(b-1,b,a),m.changeSource(x),m.depthOfDumminess=_-b-1}else if(_-b<-1){for(l=_+1;l<b;l++){for(i=new r,i.x=g.x,i.y=g.y,i.width=g.width/100,i.height=g.height/100,e=h[l],t=(l-_)*k+w,t>e.length&&(t=e.length),w>=h[_].length-1&&y>=h[b].length-1?t=e.length:0===w&&0===y&&(t=0),i.layer=l,i.uBaryCenter=0,i.dBaryCenter=0,i.upstreamLinkCount=0,i.downstreamLinkCount=0,i.gridPosition=t,i.isVirtual=!0,t&=t,p.insert(e,i,t),o=t+1;o<e.length;o++)n=e[o],n.gridPosition=n.gridPosition+1;a=new s(x,i),a.depthOfDumminess=0,f(l-1,l,a),x=i,this.graph._addNode(i),this.graph.addLink(a),i.index=this.graph.nodes.length-1,this.mapVirtualNode(i,m)}f(b-1,b,m),m.changeSource(x),m.depthOfDumminess=b-_-1}else f(_,b,m)},_dedummify:function(){for(var e,t,i,n,o,r,s,a,l=!0;l;)for(l=!1,e=0;e<this.graph.links.length;e++)if(t=this.graph.links[e],t.depthOfDumminess){for(i=[],i.unshift({x:t.target.x,y:t.target.y}),i.unshift({x:t.source.x,y:t.source.y}),n=t,o=t.depthOfDumminess,r=0;r<o;r++)s=n.source,a=s.incoming[0],i.unshift({x:a.source.x,y:a.source.y}),n=a;t.changeSource(n.source),t.depthOfDumminess=0,i.length>2?(i.splice(0,1),i.splice(i.length-1),t.points=i):t.points=[],l=!0;break}},_optimizeCrossings:function(){for(var e,t=-1,i=3,n=0;0!==t&&!(n++>i);){for(t=0,e=this.layers.length-1;e>=1;e--)t+=this.optimizeLayerCrossings(!1,e);for(e=0;e<this.layers.length-1;e++)t+=this.optimizeLayerCrossings(!0,e)}},calcUpData:function(e){var t,i,n,o,r,s,a,l,c;if(0!==e){for(t=this.layers[e],r=new u,s=this.layers[e-1],i=0;i<s.length;i++)r.add(s[i]);for(i=0;i<t.length;i++){for(a=t[i],l=0,c=0,n=0;n<a.incoming.length;n++)o=a.incoming[n],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(n=0;n<a.outgoing.length;n++)o=a.outgoing[n],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.uBaryCenter=l/c,a.upstreamLinkCount=c):(a.uBaryCenter=i,a.upstreamLinkCount=0)}}},calcDownData:function(e){var t,i,n,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],i=0;i<s.length;i++)r.add(s[i]);for(i=0;i<t.length;i++){for(a=t[i],l=0,c=0,n=0;n<a.incoming.length;n++)o=a.incoming[n],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(n=0;n<a.outgoing.length;n++)o=a.outgoing[n],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.dBaryCenter=l/c,a.downstreamLinkCount=c):(a.dBaryCenter=i,a.downstreamLinkCount=0)}}},optimizeLayerCrossings:function(e,t){var i,n,o,r,s,a,l,c;for(n=e?this.layers[i=t+1]:this.layers[i=t-1],o=n.slice(0),e?this.calcUpData(i):this.calcDownData(i),r=this,n.sort(function(e,t){var i,n=r.calcBaryCenter(e),o=r.calcBaryCenter(t);return Math.abs(n-o)<1e-4?e.degree()===t.degree()?r.compareByIndex(e,t):e.degree()<t.degree()?1:-1:(i=1e3*(o-n),i>0?-1:i<0?1:r.compareByIndex(e,t))}),a=0,s=0;s<n.length;s++)n[s]!==o[s]&&a++;if(a>0)for(l=0,s=0;s<n.length;s++)c=n[s],c.gridPosition=l++;return a},_swapPairs:function(){for(var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f,m,g,v=this.options.layeredIterations,_=0;;){if(_++>v)break;for(e=_%4<=1,t=_%4===1,i=e?0:this.layers.length-1;e?i<=this.layers.length-1:i>=0;i+=e?1:-1){for(n=this.layers[i],o=!1,r=!0,s=0,a=0;a<n.length-1;a++)l=0,c=0,d=0,r?(0!==i&&(l=this.countLinksCrossingBetweenTwoLayers(i-1,i)),i!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(i,i+1)),e?l*=2:c*=2,d=l+c):d=s,0!==d&&(u=n[a],h=n[a+1],p=u.gridPosition,f=h.gridPosition,n[a]=h,n[a+1]=u,u.gridPosition=f,h.gridPosition=p,l=0,0!==i&&(l=this.countLinksCrossingBetweenTwoLayers(i-1,i)),c=0,i!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(i,i+1)),e?l*=2:c*=2,m=l+c,g=!1,g=t?m>=d:m>d,g?(u=n[a],h=n[a+1],p=u.gridPosition,f=h.gridPosition,n[a]=h,n[a+1]=u,u.gridPosition=f,h.gridPosition=p,s=d,r=!1):(o=!0,r=!0));o&&(i!==this.layers.length-1&&this.calcUpData(i+1),0!==i&&this.calcDownData(i-1))}}},countLinksCrossingBetweenTwoLayers:function(e,t){var i,n,o,r,s,a,l,c,d,u,h,p,f=this.layers[e].linksTo[t],m=0,g=f.length;for(l=0;l<g;l++)for(i=f[l],c=l+1;c<g;c++)n=f[c],i.target.layer===t?(o=i.source,r=i.target):(o=i.target,r=i.source),n.target.layer===t?(s=n.source,a=n.target):(s=n.target,a=n.source),d=o.gridPosition,u=r.gridPosition,h=s.gridPosition,p=a.gridPosition,(d-h)*(u-p)<0&&m++;return m},calcBaryCenter:function(e){var t=e.upstreamLinkCount,i=e.downstreamLinkCount,n=e.uBaryCenter,o=e.dBaryCenter;return t>0&&i>0?(n+o)/2:t>0?n:i>0?o:0},_gridPositionComparer:function(e,t){return e.gridPosition<t.gridPosition?-1:e.gridPosition>t.gridPosition?1:0},_positionAscendingComparer:function(e,t){return e.k<t.k?-1:e.k>t.k?1:0},_positionDescendingComparer:function(e,t){return e.k<t.k?1:e.k>t.k?-1:0},_firstVirtualNode:function(e){for(var t=0;t<e.length;t++)if(e[t].isVirtual)return t;return-1},compareByIndex:function(e,t){var i=e.index,n=t.index;return i<n?1:i>n?-1:0},intDiv:function(e,t){return(e-e%t)/t},nextVirtualNode:function(e,t){var i,n=t.layerIndex;for(i=n+1;i<e.length;++i)if(e[i].isVirtual)return e[i];return null}}),S=i.Class.extend({init:function(e,t){if(p.isUndefined(e))throw"No diagram given";this.diagram=e,this.nodeMap=new d,this.linkMap=new d,this.capture(t?t:e)},capture:function(e){var t,i,o,r,s,a,l,d,u;if(e instanceof n.Graph){for(r=0;r<e.nodes.length;r++)t=e.nodes[r],o=t.associatedShape,this.nodeMap.set(o.visual.id,new c(t.x,t.y,t.width,t.height));for(r=0;r<e.links.length;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;r<i.length;r++)t=i[r],o=t.associatedShape,o&&this.nodeMap.set(o.visual.id,new c(t.x,t.y,t.width,t.height));else if(e.hasOwnProperty("links")&&e.hasOwnProperty("nodes")){for(i=e.nodes,l=e.links,r=0;r<i.length;r++)t=i[r],o=t.associatedShape,o&&this.nodeMap.set(o.visual.id,new c(t.x,t.y,t.width,t.height));for(r=0;r<l.length;r++)a=l[r],s=a.associatedConnection,s&&this.linkMap.set(s.visual.id,a.points)}else{for(d=this.diagram.shapes,u=this.diagram.connections,r=0;r<d.length;r++)o=d[r],this.nodeMap.set(o.visual.id,o.bounds());for(r=0;r<u.length;r++)s=u[r],this.linkMap.set(s.visual.id,s.points())}}});a(n,{init:function(e){i.init(e,n.ui)},SpringLayout:y,TreeLayout:x,GraphAdapter:w,LayeredLayout:C,LayoutBase:b,LayoutState:S})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("dataviz/diagram/dom.min",["kendo.data.min","kendo.draganddrop.min","kendo.toolbar.min","kendo.editable.min","kendo.window.min","kendo.dropdownlist.min","kendo.dataviz.core.min","kendo.dataviz.themes.min","dataviz/diagram/svg.min","dataviz/diagram/services.min","dataviz/diagram/layout.min"],e)}(function(){!function(e,t){function i(e){var t=e.originalEvent,i=0;return t.wheelDelta?(i=-t.wheelDelta/40,i=i>0?ye.ceil(i):ye.floor(i)):t.detail&&(i=t.detail),i}function n(e){return e.options.name.toLowerCase()===Pe.toLowerCase()}function o(e,t){var i,o,r,s,a=Ne;for(r=0;r<t.length;r++)o=t[r],n(o)||(s=e.distanceTo(o.position()),s<a&&(a=s,i=o));return i}function r(e,t){var i,n,o,r=[],s=e.drawingContainer().children,a=s.length;for(i=0;i<t.length;i++)for(n=t[i],o=0;o<a;o++)if(s[o]==n.drawingContainer()){r.push(o);break}return r}function s(e){var t={};return e=e||{},ge(e.text)&&null!==e.text&&(t.text=e.text),ge(e.x)&&null!==e.x&&(t.x=e.x),ge(e.y)&&null!==e.y&&(t.y=e.y),ge(e.width)&&null!==e.width&&(t.width=e.width),ge(e.height)&&null!==e.height&&(t.height=e.height),ge(e.type)&&null!==e.type&&(t.type=e.type),t}function a(e){var t={};return e=e||{},ge(e.text)&&null!==e.text&&(t.content=e.text),ge(e.type)&&null!==e.type&&(t.type=e.type),ge(e.from)&&null!==e.from&&(t.from=e.from),ge(e.fromConnector)&&null!==e.fromConnector&&(t.fromConnector=e.fromConnector),ge(e.fromX)&&null!==e.fromX&&(t.fromX=e.fromX),ge(e.fromY)&&null!==e.fromY&&(t.fromY=e.fromY),ge(e.to)&&null!==e.to&&(t.to=e.to),ge(e.toConnector)&&null!==e.toConnector&&(t.toConnector=e.toConnector),ge(e.toX)&&null!==e.toX&&(t.toX=e.toX),ge(e.toY)&&null!==e.toY&&(t.toY=e.toY),t}function l(t,i){var n,o=this.dataSource.reader.model;o&&(n=o.fn.fields.text?"text":o.idField,e("<input name='"+i.field+"' />").appendTo(t).kendoDropDownList({dataValueField:o.idField,dataTextField:n,dataSource:this.dataSource.data().toJSON(),optionLabel:" ",valuePrimitive:!0}))}function c(e){this.dataItem=e,this.callbacks=[]}function d(){this.items={}}function u(e){var t=e;return e instanceof kendo.data.Model&&(t=e.toJSON(),t[e.idField]=e._defaultId),t}function h(e){var t,i,n=[],o=[];for(i=0;i<e.length;i++)t=e[i],t instanceof y?o.push(t):n.push(t);return{shapes:o,connections:n}}function p(e,t){return e.reader.model?new e.reader.model(t):new kendo.data.ObservableObject(t)}function f(e,t){ge(t[e])&&t.set(e,null)}function m(e,t,i){var n,o;for(o=0;o<i.length;o++)n=i[o],t&&!ge(t[n])&&(t[n]=e[n])}function g(e){var t=e.drawingContainer().clippedBBox(null);0===t.origin.x&&0===t.origin.y||e.position(-t.origin.x,-t.origin.y)}function v(e){e.preventDefault()}var _,b,w,y,k,x,C,S,T,D,A,E,I=kendo.dataviz,M=kendo.drawing,R=kendo.geometry,F=I.diagram,P=kendo.ui.Widget,z=kendo.Class,B=e.proxy,L=kendo.deepExtend,H=kendo._outerWidth,N=kendo._outerHeight,O=e.extend,V=kendo.data.HierarchicalDataSource,W=F.Canvas,U=F.Group,q=F.Rectangle,j=F.Circle,G=F.CompositeTransform,$=F.Rect,K=F.Path,Y=F.DeleteShapeUnit,Q=F.DeleteConnectionUnit,X=F.TextBlock,Z=F.Image,J=F.Point,ee=F.Intersect,te=F.ConnectionEditAdorner,ie=F.UndoRedoService,ne=F.ToolService,oe=F.Selector,re=F.ResizingAdorner,se=F.ConnectorsAdorner,ae=F.Cursors,le=F.Utils,ce=kendo.Observable,de=F.ToBackUnit,ue=F.ToFrontUnit,he=F.PolylineRouter,pe=F.CascadingRouter,fe=le.isUndefined,me=le.isDefined,ge=M.util.defined,ve=e.isArray,_e=kendo.isFunction,be=le.isString,we=e.isPlainObject,ye=Math,ke=["sass","default-v2","bootstrap-v4"],xe=".kendoDiagram",Ce="cascading",Se="itemBoundsChange",Te="change",De="click",Ae="drag",Ee="dragEnd",Ie="dragStart",Me="mouseEnter",Re="mouseLeave",Fe="error",Pe="Auto",ze="Top",Be="Right",Le="Left",He="Bottom",Ne=9007199254740992,Oe="select",Ve="itemRotate",We="pan",Ue="zoomStart",qe="zoomEnd",je="none",Ge=600,$e=600,Ke="rectangle",Ye=100,Qe=100,Xe=20,Ze=20,Je=0,et="Yellow",tt=Number.MAX_VALUE,it=-Number.MAX_VALUE,nt="absolute",ot="transformed",rt="rotated",st="transparent",at="width",lt="height",ct="x",dt="y",ut="DOMMouseScroll"+xe+" mousewheel"+xe,ht=.05,pt=5,ft='<a class="k-button k-button-icontext #=className#" href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',mt=5;F.DefaultConnectors=[{name:ze},{name:He},{name:Le},{name:Be},{name:Pe,position:function(e){return e.getPosition("center")}}],_={cancel:{text:"Cancel",imageClass:"k-i-cancel",className:"k-diagram-cancel",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-i-checkmark",className:"k-diagram-update",iconClass:"k-icon"}},F.shapeDefaults=function(e){var t={type:Ke,path:"",autoSize:!0,visual:null,x:Je,y:Je,minWidth:Xe,minHeight:Ze,width:Ye,height:Qe,hover:{},editable:{connect:!0,tools:[]},connectors:F.DefaultConnectors,rotation:{angle:0}};return le.simpleExtend(t,e),t},b=ce.extend({init:function(e){var t=this;t.dataItem=(e||{}).dataItem,ce.fn.init.call(t),t.options=L({id:F.randomId()},t.options,e),t.isSelected=!1,t.visual=new U({id:t.options.id,autoSize:t.options.autoSize}),t.id=t.options.id,t._template()},options:{hover:{},cursor:ae.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 fe(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=L({},{options:this.options});return this.dataItem&&(e.dataItem=""+this.dataItem),e},_content:function(e){var i,n,o;return e!==t&&(i=this.options,F.Utils.isString(e)?i.content.text=e:L(i.content,e),n=i.content,o=this._contentVisual,o?this._updateContentVisual(n):this._createContentVisual(n)),this.options.content.text},_createContentVisual:function(e){e.text&&(this._contentVisual=new X(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,i=this;i.options.content.template&&(e=i.dataItem||{},t=kendo.template(i.options.content.template,{paramName:"dataItem"}),i.options.content.text=t(e))},_canSelect:function(){return this.options.selectable!==!1},toJSON:function(){return{id:this.options.id}}}),w=z.extend({init:function(e,t){this.options=L({},this.options,t),this.connections=[],this.shape=e},options:{width:7,height:7,fill:{color:et},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}}}),w.parse=function(e,t){var i,n,o=t.split(":"),r=o[0],s=o[1]||Pe;for(i=0;i<e.shapes.length;i++)if(n=e.shapes[i],n.options.id==r)return n.getConnector(s.trim())},y=b.extend({init:function(e,t){var i=this;b.fn.init.call(i,e),this.diagram=t,this.updateOptionsFromModel(),e=i.options,i.connectors=[],i.type=e.type,i.createShapeVisual(),i.updateBounds(),i.content(i.content()),i._createConnectors()},options:F.shapeDefaults(),_setOptionsFromModel:function(e){var t=s(e||this.dataItem);this.options=L({},this.options,t),this.redrawVisual()},updateOptionsFromModel:function(e,t){var i,n;this.diagram&&this.diagram._isEditable&&(i=s(e||this.dataItem),e&&t?I.inArray(t,["x","y","width","height"])?(n=this.bounds(),n[t]=e[t],this.bounds(n)):(this.options.visual?this._redrawVisual():i.type&&(this.options=L({},this.options,i),this._redrawVisual()),this.options.content&&(this._template(),this.content(this.options.content))):this.options=L({},this.options,i))},_redrawVisual:function(){this.visual.clear(),this._contentVisual=null,this.options.dataItem=this.dataItem,this.createShapeVisual(),this.updateBounds()},redrawVisual:function(){this._redrawVisual(),this.options.content&&(this._template(),this.content(this.options.content))},updateModel:function(e){var t,i,n=this.diagram;n&&n._isEditable&&(t=this._bounds,i=this.dataItem,i&&(n._suspendModelRefresh(),ge(i.x)&&t.x!==i.x&&i.set("x",t.x),ge(i.y)&&t.y!==i.y&&i.set("y",t.y),ge(i.width)&&t.width!==i.width&&i.set("width",t.width),ge(i.height)&&t.height!==i.height&&i.set("height",t.height),this.dataItem=i,n._resumeModelRefresh(),e&&n._syncShapeChanges()))},updateBounds:function(){var e=this.visual._measure(!0),t=this.options;this.bounds(new $(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,i,n,o,r=this.options.content||{},s=this._contentVisual;s&&r.align&&(e=this.visual._measure(),t=new F.RectAlign(e),i=s.drawingElement.bbox(null),n=new $(0,0,i.width(),i.height()),o=t.align(n,r.align),s.position(o.topLeft()))},_createConnectors:function(){var e,t,i=this.options,n=i.connectors.length,o=i.connectorDefaults;for(t=0;t<n;t++)e=new w(this,L({},o,i.connectors[t])),this.connectors.push(e)},bounds:function(e){var t,i;if(e)if(be(e))switch(e){case ot:t=this._transformedBounds();break;case nt:t=this._transformedBounds(),i=this.diagram._pan,t.x+=i.x,t.y+=i.y;break;case rt: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,i=e.topLeft(),n=t.x=i.x,o=t.y=i.y,r=t.width=ye.max(e.width,t.minWidth),s=t.height=ye.max(e.height,t.minHeight);this._bounds=new $(n,o,r,s),this.visual.redraw({x:n,y:o,width:r,height:s})},position:function(e){return e?(this.bounds(new $(e.x,e.y,this._bounds.width,this._bounds.height)),t):this._bounds.topLeft()},clone:function(){var e=this.serialize();return e.options.id=F.randomId(),this.diagram&&this.diagram._isEditable&&ge(this.dataItem)&&(e.options.dataItem=u(this.dataItem)),new y(e.options)},select:function(e){var t,i,n=this.diagram;if(fe(e)&&(e=!0),this._canSelect()&&this.isSelected!=e)return t=[],i=[],this.isSelected=e,this.isSelected?(n._selectedItems.push(this),t.push(this)):(le.remove(n._selectedItems,this),i.push(this)),n._internalSelection||n._selectionChanged(t,i),!0},rotate:function(e,i,n){var o,r,s,a,l=this.visual.rotate();return e!==t&&(n!==!1&&this.diagram&&this.diagram.undoRedoService&&e!==l.angle&&this.diagram.undoRedoService.add(new F.RotateUnit(this.diagram._resizingAdorner,[this],[l.angle]),!1),o=this.bounds(),r=new J(o.width/2,o.height/2),i&&(s=e-l.angle,a=o.center().rotate(i,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(Ve,{item:this})),l},connections:function(e){var t,i,n,o,r,s,a,l=[];for(t=0;t<this.connectors.length;t++)for(r=this.connectors[t],o=r.connections,i=0,o;i<o.length;i++)n=o[i],"out"==e?(s=n.source(),s.shape&&s.shape==this&&l.push(n)):"in"==e?(a=n.target(),a.shape&&a.shape==this&&l.push(n)):l.push(n);return l},refreshConnections:function(){e.each(this.connections(),function(){this.refresh()})},getConnector:function(e){var t,i;if(!be(e))return e instanceof J?o(e,this.connectors):this.connectors.length?this.connectors[0]:null;for(e=e.toLocaleLowerCase(),t=0;t<this.connectors.length;t++)if(i=this.connectors[t],i.options.name.toLocaleLowerCase()==e)return i},getPosition:function(e){var t=this.bounds(),i=e.charAt(0).toLowerCase()+e.slice(1);return _e(t[i])?this._transformPoint(t[i]()):t.center()},redraw:function(e){var t,i;e&&(t=this.options,this.shapeVisual.redraw(this._visualOptions(e)),this._diffNumericOptions(e,[at,lt,ct,dt])&&(this.bounds(new $(t.x,t.y,t.width,t.height)),i=!0),e.connectors&&(t.connectors=e.connectors,this._updateConnectors()),t=L(t,e),(e.rotation||i)&&this._rotate(),t.content&&this.content(t.content))},_updateConnectors:function(){var e,t,i,n,o=this.connections();for(this.connectors=[],this._createConnectors(),n=0;n<o.length;n++)e=o[n],t=e.source(),i=e.target(),t.shape&&t.shape===this?e.source(this.getConnector(t.options.name)||null):i.shape&&i.shape===this&&e.target(this.getConnector(i.options.name)||null),e.updateModel()},_diffNumericOptions:F.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(Se,{item:this,bounds:this._bounds.clone()})},_transformPoint:function(e){var t=this.rotate(),i=this.bounds(),n=i.topLeft();return t.angle&&e.rotate(t.center().plus(n),360-t.angle),e},_transformedBounds:function(){var e=this.bounds(),t=e.topLeft(),i=e.bottomRight();return $.fromPoints(this.diagram.modelToView(t),this.diagram.modelToView(i))},_rotatedBounds:function(){var e=this.bounds().rotatedBounds(this.rotate().angle),t=e.topLeft(),i=e.bottomRight();return $.fromPoints(t,i)},_rotate:function(){var e=this.options.rotation;e&&e.angle&&this.rotate(e.angle),this._rotationOffset=new J},_hover:function(e){var t=this.options,i=t.hover,n=t.stroke,o=t.fill;e&&me(i.stroke)&&(n=L({},n,i.stroke)),e&&me(i.fill)&&(o=i.fill),this.shapeVisual.redraw({stroke:n,fill:o}),t.editable&&t.editable.connect&&this.diagram._showConnectors(this,e)},_hitTest:function(e){if(this.visible()){var t,i=this.bounds(),n=this.rotate().angle;if(e.isEmpty&&!e.isEmpty())return ee.rects(e,i,n?n:0);if(t=e.clone().rotate(i.center(),n),i.contains(t))return this}},toJSON:function(){return{shapeId:this.options.id}},createShapeVisual:function(){var e,t=this.options,i=this._visualOptions(t),n=t.visual,o=(t.type+"").toLocaleLowerCase();i.width=t.width,i.height=t.height,_e(n)?e=n.call(this,t):i.data?(e=new K(i),g(e)):e="rectangle"==o?new q(i):"circle"==o?new j(i):"text"==o?new X(i):"image"==o?new Z(i):new K(i),this.shapeVisual=e,this.visual.append(this.shapeVisual)}}),k=b.extend({init:function(e,t,i){var n=this;b.fn.init.call(n,i),this.updateOptionsFromModel(),this._initRouter(),n.path=new F.Polyline(n.options),n.path.fill(st),n.visual.append(n.path),n._sourcePoint=n._targetPoint=new J,n._setSource(e),n._setTarget(t),n.content(n.options.content),n.definers=[],ge(i)&&i.points&&n.points(i.points)},options:{hover:{stroke:{}},startCap:je,endCap:je,points:[],selectable:!0,fromConnector:Pe,toConnector:Pe},_setOptionsFromModel:function(e){this.updateOptionsFromModel(e||this.dataItem)},updateOptionsFromModel:function(e){var t,i,n,o;this.diagram&&this.diagram._isEditable&&(t=this.diagram._dataMap,i=a(e||this.dataItem),e?(ge(i.from)?(n=t[i.from],n&&ge(i.fromConnector)&&(n=n.getConnector(i.fromConnector)),this.source(n)):ge(i.fromX)&&ge(i.fromY)&&this.source(new J(i.fromX,i.fromY)),ge(i.to)?(o=t[i.to],o&&ge(i.toConnector)&&(o=o.getConnector(i.toConnector)),this.target(o)):ge(i.toX)&&ge(i.toY)&&this.target(new J(i.toX,i.toY)),ge(i.type)&&this.type()!==i.type&&(this.points([]),this.type(i.type)),this.dataItem=e,this._template(),this.redraw(this.options)):this.options=L({},i,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(),ge(this.options.fromX)&&null!==this.options.fromX?(f("from",t),f("fromConnector",t),t.set("fromX",this.options.fromX),t.set("fromY",this.options.fromY)):(t.set("from",this.options.from),ge(t.fromConnector)&&t.set("fromConnector",this.sourceConnector?this.sourceConnector.options.name:null),f("fromX",t),f("fromY",t)),ge(this.options.toX)&&null!==this.options.toX?(f("to",t),f("toConnector",t),t.set("toX",this.options.toX),t.set("toY",this.options.toY)):(t.set("to",this.options.to),ge(t.toConnector)&&t.set("toConnector",this.targetConnector?this.targetConnector.options.name:null),f("toX",t),f("toY",t)),ge(this.options.type)&&ge(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 i,n=e instanceof y,o=this.options.fromConnector||Pe;n&&!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 w?(i=e.shape.dataItem,i&&this._setFromOptions(i.id),this.sourceConnector=e,this.sourceConnector.connections.push(this)):e instanceof J?(this._setFromOptions(null,e),this._sourcePoint=e,this.sourceConnector&&this._clearSourceConnector()):n&&(i=e.dataItem,i&&this._setFromOptions(i.id),this.sourceConnector=e.getConnector(o),this.sourceConnector.connections.push(this)))},source:function(e,t){return me(e)&&(t&&this.diagram&&this.diagram.undoRedoService.addCompositeItem(new F.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 F.PathDefiner(this.sourcePoint(),null,null)),this._sourceDefiner;if(!(e instanceof F.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 i,n=e instanceof y,o=this.options.toConnector||Pe;n&&!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 w?(i=e.shape.dataItem,i&&this._setToOptions(i.id),this.targetConnector=e,this.targetConnector.connections.push(this)):e instanceof J?(this._setToOptions(null,e),this._targetPoint=e,this.targetConnector&&this._clearTargetConnector()):n&&(i=e.dataItem,i&&this._setToOptions(i.id),this.targetConnector=e.getConnector(o),this.targetConnector.connections.push(this)))},target:function(e,i){return me(e)&&(i&&this.diagram&&this.diagram.undoRedoService.addCompositeItem(new F.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 F.PathDefiner(this.targetPoint(),null,null)),this._targetDefiner;if(!(e instanceof F.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 i,n,o,r,s=this,a=s.diagram;e instanceof w&&!a.getShapeById(e.shape.id)?(i=e.shape.dataItem,n=e.options.name,o=function(){var o=a._dataMap[i.id];e=o.getConnector(n),s[t](e,!1),s.updateModel()},a._dataMap[i.id]?o():(r=a._inactiveShapeItems.getByUid(i.uid),r&&a._deferredConnectionUpdates.push(r.onActivate(o)))):s[t](e,!1)},content:function(e){var t=this._content(e);return ge(e)&&this._alignContent(),t},_createContentVisual:function(e){var t;return _e(e.visual)?t=e.visual.call(this,e):e.text&&(t=new X(e)),t&&(this._contentVisual=t,t._includeInBBox=!1,this.visual.append(t)),t},_updateContentVisual:function(e){_e(e.visual)?(this.visual.remove(this._contentVisual),this._createContentVisual(e)):this._contentVisual.redraw(e)},_alignContent:function(){var e,t,i,n,o,r,s,a,l,c,d,u,h,p,f,m;if(this._contentVisual){for(e=mt,t=this.allPoints(),i=ye.floor(t.length/2),n=i-1;n>0&&t[n].equals(t[i]);)n--,i++;o=t[i],r=t[n],s=this._contentVisual._measure(),a=s.width,l=s.height,c=t.length%2===0,d=r.distanceTo(o),c&&t.length>2&&d>0&&(r.y===o.y&&d<a||r.x===o.x&&d<l)&&(c=!1,e=0),c?(h=M.util.deg(ye.atan2(o.y-r.y,o.x-r.x)),u=new J((o.x-r.x)/2+r.x,(o.y-r.y)/2+r.y),90===ye.abs(h)?(u.x+=e,u.y-=l/2):h%180===0?(u.x-=a/2,u.y-=l+e):h<-90||0<h&&h<90?u.y-=l:(h<0||h>90)&&(u.x-=a,u.y-=l)):(p=ye.floor(t.length/2),u=t[p].clone(),r=t[p-1],o=t[p+1],f=r.x<=u.x&&o.x<=u.x?e:-s.width-e,m=r.y<=u.y&&o.y<=u.y?e:-s.height-e,u.x+=f,u.y+=m),this._contentVisual.position(u)}},select:function(e){var i,n,o=this.diagram;if(this._canSelect()&&this.isSelected!==e)return this.isSelected=e,i=[],n=[],this.isSelected?(this.adorner=new te(this,this.options.selection),o._adorn(this.adorner,!0),o._selectedItems.push(this),i.push(this)):this.adorner&&(o._adorn(this.adorner,!1),le.remove(o._selectedItems,this),this.adorner=t,n.push(this)),this.adorner&&this.adorner.refresh(),o._internalSelection||o._selectionChanged(i,n),!0},bounds:function(e){return!e||be(e)?this._bounds:(this._bounds=e,t)},type:function(e){var i=this.options;return e?(e!==i.type&&(i.type=e,this._initRouter(),this.refresh()),t):i.type},_initRouter:function(){var e=(this.options.type||"").toLowerCase();this._router=e==Ce?new pe(this):new he(this)},points:function(e){var t,i,n,o;if(!e){if(n=[],me(this.definers))for(o=0;o<this.definers.length;o++)n.push(this.definers[o].point);return n}for(this.definers=[],t=0;t<e.length;t++)if(i=e[t],i instanceof F.Point)this.definers.push(new F.PathDefiner(i));else{if(!i.hasOwnProperty("x")||!i.hasOwnProperty("y"))throw"A Connection point needs to be a Point or an object with x and y properties.";this.definers.push(new F.PathDefiner(new J(i.x,i.y)))}},allPoints:function(){var e,t=[this.sourcePoint()];if(this.definers)for(e=0;e<this.definers.length;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,i,r,s=this,a=s.source(),l=s.target();a instanceof J?e=a:a instanceof w&&(i=n(a)?a.shape.connectors:[a]),l instanceof J?t=l:l instanceof w&&(r=n(l)?l.shape.connectors:[l]),e?r&&(s._resolvedTargetConnector=o(e,r)):i&&(t?s._resolvedSourceConnector=o(t,i):r&&this._resolveAutoConnectors(i,r))},_resolveAutoConnectors:function(e,t){var i,o,r,s,a,l,c,d,u,h,p,f=Ne,m=Ne;for(u=0;u<e.length;u++)if(c=e[u],!n(c))for(r=c.position(),h=0;h<t.length;h++)d=t[h],n(d)||(s=d.position(),p=ye.round(r.distanceTo(s)),p<f&&this.diagram&&this._testRoutePoints(r,s,c,d)&&(f=p,i=c,o=d),p<m&&(a=c,l=d,m=p));i&&(a=i,l=o),this._resolvedSourceConnector=a,this._resolvedTargetConnector=l},_testRoutePoints:function(e,t,i,n){var o,r,s,a,l,c,d=this._router,u=!0;if(d instanceof pe)for(o=d.routePoints(e,t,i,n),l=this._getRouteExclude(e,t,i.shape,n.shape),o.unshift(e),o.push(t),c=1;c<o.length;c++)if(r=o[c-1],s=o[c],a=new $(ye.min(r.x,s.x),ye.min(r.y,s.y),ye.abs(r.x-s.x),ye.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,l)){u=!1;break}return u},_getRouteExclude:function(e,t,i,n){var o=[];return this._isPointInsideShape(e,i)&&o.push(i),this._isPointInsideShape(t,n)&&o.push(n),o},_isPointInsideShape:function(e,t){var i,n,o,r=t.bounds(),s=t.rotate().angle,a=r.x,l=r.y;return i=e.clone().rotate(r.center(),s),n=i.x,o=i.y,n>a&&n<a+r.width&&o>l&&o<l+r.height},redraw:function(e){if(e){this.options=L({},this.options,e);var t=this.options.points;ge(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&&ge(this.dataItem)&&(e.options.dataItem=u(this.dataItem)),new k(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,i=L({},{options:this.options,from:e,to:t});return ge(this.dataItem)&&(i.dataItem=""+this.dataItem),i.options.points=this.points(),i},_hitTest:function(e){if(this.visible()){var t=new J(e.x,e.y),i=this.sourcePoint(),n=this.targetPoint();if(e.isEmpty&&!e.isEmpty()&&e.contains(i)&&e.contains(n))return this;if(this._router.hitTest(t))return this}},_hover:function(e){var t=(this.options.stroke||{}).color;e&&me(this.options.hover.stroke.color)&&(t=this.options.hover.stroke.color),this.path.redraw({stroke:{color:t}})},_refreshPath:function(){ge(this.path)&&(this._drawPath(),this.bounds(this._router.getBounds()))},_drawPath:function(){var e,t,i;this._router&&this._router.route(),e=this.sourcePoint(),t=this.targetPoint(),i=this.points(),this.path.redraw({points:[e].concat(i,[t])})},_clearSourceConnector:function(){this.sourceConnector=t,this._resolvedSourceConnector=t},_clearTargetConnector:function(){this.targetConnector=t,this._resolvedTargetConnector=t},_removeFromSourceConnector:function(){this.sourceConnector&&le.remove(this.sourceConnector.connections,this)},_removeFromTargetConnector:function(){this.targetConnector&&le.remove(this.targetConnector.connections,this)},toJSON:function(){var e,t,i,n=this;return n.from&&n.from.toJSON?e=n.from.toJSON():(i=n._sourcePoint,e={x:i.x,y:i.y}),n.to&&n.to.toJSON?t=n.to.toJSON():(i=n._targetPoint,t={x:i.x,y:i.y}),{from:e,to:t}}}),x=P.extend({init:function(e,t){
var i=this;kendo.destroy(e),P.fn.init.call(i,e,t),i._initTheme(),i._initElements(),i._extendLayoutOptions(i.options),i._initDefaults(t),i._interactionDefaults(),i._initCanvas(),i.mainLayer=new U({id:"main-layer"}),i.canvas.append(i.mainLayer),i._shapesQuadTree=new E(i),i._pan=new J,i._adorners=[],i.adornerLayer=new U({id:"adorner-layer"}),i.canvas.append(i.adornerLayer),i._createHandlers(),i._initialize(),i._resizingAdorner=new re(i,{editable:i.options.editable}),i._connectorsAdorner=new se(i),i._adorn(i._resizingAdorner,!0),i._adorn(i._connectorsAdorner,!0),i.selector=new oe(i),i._clipboard=[],i.pauseMouseHandlers=!1,i._fetchFreshData(),i._createGlobalToolBar(),i._createOptionElements(),i.zoom(i.options.zoom),i.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:{},selectable:{key:"none"},tooltip:{enabled:!0,format:"{0}"},copy:{enabled:!0,offsetX:20,offsetY:20},shapeDefaults:F.shapeDefaults({undoable:!0}),connectionDefaults:{editable:{tools:[]},type:Ce},shapes:[],connections:[]},events:[qe,Ue,We,Oe,Ve,Se,Te,De,Me,Re,"toolBarClick","save","cancel","edit","remove","add","dataBound",Ie,Ae,Ee],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 C(this,{tools:e||{},click:B(this._toolBarClick,this),modal:!1}),this.toolBar.element.css({textAlign:"left"}),this.element.prepend(this.toolBar.element),this._resize()))},createShape:function(){var e,t,i,n,o,r;(this.editor&&this.editor.end()||!this.editor)&&(e=this.dataSource,t=e.view()||[],i=t.length,n=p(e,{}),o=this._createShape(n,{}),this.trigger("add",{shape:o})||(e.insert(i,n),r=this._inactiveShapeItems.getByUid(n.uid),r.element=o,this.edit(o)))},_createShape:function(e,t){t=L({},this.options.shapeDefaults,t),t.dataItem=e;var i=new y(t,this);return i},createConnection:function(){var e,t,i,n,o;(this.editor&&this.editor.end()||!this.editor)&&(e=this.connectionsDataSource,t=e.view()||[],i=t.length,n=p(e,{}),o=this._createConnection(n),this.trigger("add",{connection:o})||(this._connectionsDataMap[n.uid]=o,e.insert(i,n),this.addConnection(o,!1),this.edit(o)))},_createConnection:function(e,t,i){var n,o=L({},this.options.connectionDefaults);return o.dataItem=e,n=new k(t||new J,i||new J,o)},editModel:function(e,t){var i,n,o,r;if(this.cancelEdit(),o=this.options.editable,"shape"==t)i=o.shapeEditors,n=o.shapeTemplate;else{if("connection"!=t)return;r=B(l,this),i=L({},{from:r,to:r},o.connectionEditors),n=o.connectionTemplate}this.editor=new T(this.element,{update:B(this._update,this),cancel:B(this._cancel,this),model:e,type:t,target:this,editors:i,template:n}),this.trigger("edit",this._editArgs())},edit:function(e){if(e.dataItem){var t=e instanceof y?"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,i=t.editable,n=t.shapeDefaults,o=t.connectionDefaults,r=(e||{}).shapeDefaults;i===!1?(n.editable=!1,o.editable=!1):(m(i,n.editable,["drag","remove","connect"]),m(i,o.editable,["drag","remove"])),r&&r.connectors&&(t.shapeDefaults.connectors=r.connectors)},_interactionDefaults:function(){var e=this.options,t=e.selectable,i=e.pannable,n=kendo.support.mobileOS;t&&!ge(t.multiple)&&(e.selectable=L({multiple:!n},e.selectable)),i&&!ge(i.key)&&(e.pannable=L({key:n?"none":"ctrl"},e.pannable))},_initCanvas:function(){var t=e("<div class='k-layer'></div>").appendTo(this.scrollable)[0],i=this.viewport();this.canvas=new W(t,{width:i.width||Ge,height:i.height||$e})},_createHandlers:function(){var e=this,t=e.element;t.on(ut,B(e._wheel,e)).on("keydown"+xe,B(e._keydown,e)),e._userEvents=new kendo.UserEvents(this.scrollable,{multiTouch:!0,fastTap:!0,tap:B(e._tap,e),start:B(e._dragStart,e),move:B(e._drag,e),end:B(e._dragEnd,e),gesturestart:B(e._gestureStart,e),gesturechange:B(e._gestureChange,e),gestureend:B(e._gestureEnd,e),doubleTap:B(e._doubleTap,e),supportDoubleTap:!0}),e.toolService=new ne(e),this.scrollable.on("mouseover"+xe,B(e._mouseover,e)).on("mouseout"+xe,B(e._mouseout,e)).on("mousemove"+xe,B(e._mouseMove,e)).on("mousedown"+xe,B(e._mouseDown,e)).on("mouseup"+xe,B(e._mouseUp,e)),this._syncHandler=B(e._syncChanges,e),e._resizeHandler=B(e.resize,e,!1),kendo.onResize(e._resizeHandler),this.bind(Ue,B(e._destroyToolBar,e)),this.bind(We,B(e._destroyToolBar,e))},_dragStart:function(e){var t,i;this._pauseMouseHandlers=!0,t=this._eventPositions(e,!0),i=e.event,this.toolService.start(t,this._meta(i))&&(this._destroyToolBar(),i.preventDefault())},_drag:function(e){var t=this._eventPositions(e),i=e.event;this.toolService.move(t,this._meta(i))&&i.preventDefault()},_dragEnd:function(e){var t,i;this._pauseMouseHandlers=!1,t=this._eventPositions(e),i=e.event,this.toolService.end(t,this._meta(i))&&(this._createToolBar(),i.preventDefault())},_mouseMove:function(e){if(!this._pauseMouseHandlers){var t=this._eventPositions(e);this.toolService._updateHoveredItem(t),this.toolService._updateCursor(t)}},_mouseDown:function(){this._pauseMouseHandlers=!0},_mouseUp:function(){this._pauseMouseHandlers=!1},_tap:function(e){var t,i,n,o=this.toolService,r=this.options.selectable,s=this._eventPositions(e),a=this.focus();o._updateHoveredItem(s),o.hoveredItem?(t=o.hoveredItem,this.trigger("click",{item:t,point:s}),r&&t.options.selectable!==!1&&(i=r.multiple!==!1,n=kendo.support.mobileOS||this._meta(e.event).ctrlKey,t.isSelected?n?(this._destroyToolBar(),t.select(!1)):this._createToolBar(a):(this._destroyToolBar(),this.select(t,{addToSelection:i&&n}),this._createToolBar(a)))):r&&(this._destroyToolBar(),this.deselect())},_keydown:function(e){this.toolService.keyDown(e.keyCode,this._meta(e))&&e.preventDefault()},_wheel:function(e){var t=i(e),n=this._eventPositions(e),o=L(this._meta(e),{delta:t});this.toolService.wheel(n,o)&&e.preventDefault()},_meta:function(e){return{ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,shiftKey:e.shiftKey,type:e.type}},_eventPositions:function(e,t){var i,n,o;return e.touch?(n=t?"startLocation":"location",i=new J(e.x[n],e.y[n])):(o=e.originalEvent,i=new J(o.pageX,o.pageY)),this.documentToModel(i)},_gestureStart:function(e){var t,i;this._destroyToolBar(),this.scroller.disable(),t=this.documentToModel(new J(e.center.x,e.center.y)),i={point:t,zoom:this.zoom()},this.trigger(Ue,i)||(this._gesture=e,this._initialCenter=t)},_gestureChange:function(e){var t,i,n=this._gesture,o=this._initialCenter,r=this.documentToView(new J(e.center.x,e.center.y)),s=e.distance/n.distance,a=this._zoom,l=!1;ye.abs(s-1)>=ht&&(this._zoom=a=this._getValidZoom(a*s),this.options.zoom=a,this._gesture=e,l=!0),t=o.times(a),i=r.minus(t),(l||this._pan.distanceTo(i)>=pt)&&(this._panTransform(i),this._updateAdorners()),e.preventDefault()},_doubleTap:function(e){var t=this,i=this._eventPositions(e),n=t.options,o=n.zoomRate,r=t.zoom()+o,s=this._meta(e),a={point:i,meta:s,zoom:r};t.trigger(Ue,a)||(r=kendo.dataviz.round(Math.max(n.zoomMin,Math.min(n.zoomMax,r)),2),a.zoom=r,t.zoom(r,a),t.trigger(qe,a))},_gestureEnd:function(){this.options.pannable!==!1&&this.scroller.enable(),this.trigger(qe,{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,t=this,i=((t.options||{}).theme||"").toLowerCase(),n=I.ui.themes||{};e=ke.indexOf(i)!=-1?I.autoTheme().diagram:(n[i]||{}).diagram,t.options=L({},e,t.options),t.options.editable===!0&&L(t.options,{editable:(e||{}).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,i=this,n=i.options,o=n.shapes;for(t=0;t<o.length;t++)e=o[t],i.addShape(e)},_createConnections:function(){var e,t,i,n,o=this,r=o.options,s=r.connectionDefaults,a=r.connections;for(n=0;n<a.length;n++)e=a[n],t=o._findConnectionTarget(e.from),i=o._findConnectionTarget(e.to),o.connect(t,i,L({},s,e))},_findConnectionTarget:function(e){var t,i,n;return e=e||{},t=this,i=be(e)?e:e.shapeId||e.id,i?(n=t.getShapeById(i),e.connector&&(n=n.getConnector(e.connector))):n=new J(e.x||0,e.y||0),n},destroy:function(){var e=this;P.fn.destroy.call(e),this._userEvents&&this._userEvents.destroy(),kendo.unbindResize(e._resizeHandler),e.clear(),e.element.off(xe),e.scroller.wrapper.off(xe),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,i,n={shapes:[],connections:[]};for(e=0;e<this.shapes.length;e++)i=this.shapes[e],i.options.serializable&&n.shapes.push(i.options);for(e=0;e<this.connections.length;e++)t=this.connections[e],n.connections.push(L({},t.options,t.toJSON()));return n},focus:function(){if(!this.element.is(kendo._activeElement())){var e,t=this.element,i=t[0],n=[],o=[],r=document.documentElement;do i=i.parentNode,i.scrollHeight>i.clientHeight&&(n.push(i),o.push(i.scrollTop));while(i!=r);for(t.focus(),e=0;e<n.length;e++)n[e].scrollTop=o[e];return!0}},load:function(e){this.clear(),this.setOptions(e),this._createShapes(),this._createConnections()},setOptions:function(e){L(this.options,e)},clear:function(){var e=this;e.select(!1),e.mainLayer.clear(),e._shapesQuadTree.clear(),e._initialize()},connect:function(e,t,i){var n,o;return this.connectionsDataSource&&this._isEditable?(o=this.connectionsDataSource.add({}),n=this._connectionsDataMap[o.uid],n.source(e),n.target(t),n.redraw(i),n.updateModel()):(n=new k(e,t,L({},this.options.connectionDefaults,i)),this.addConnection(n)),n},connected:function(e,t){var i,n;for(i=0;i<this.connections.length;i++)if(n=this.connections[i],n.from==e&&n.to==t)return!0;return!1},addConnection:function(e,t){return t!==!1&&this.undoRedoService.add(new F.AddConnectionUnit(e,this),!1),e.diagram=this,e._setOptionsFromModel(),e.refresh(),this.mainLayer.append(e.visual),this.connections.push(e),this.trigger(Te,{added:[e],removed:[]}),e},_addConnection:function(e,t){var i,n=this.connectionsDataSource;if(n&&this._isEditable){if(i=p(n,u(e.dataItem)),e.dataItem=i,e.updateModel(),!this.trigger("add",{connection:e}))return this._connectionsDataMap[i.uid]=e,n.add(i),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 i,n=this.options.shapeDefaults;if(e instanceof y)i=e;else{if(e instanceof kendo.Class)return;n=L({},n,e||{}),i=new y(n,this)}return t!==!1&&this.undoRedoService.add(new F.AddShapeUnit(i,this),!1),this.shapes.push(i),i.diagram!==this&&(this._shapesQuadTree.insert(i),i.diagram=this),this.mainLayer.append(i.visual),this.trigger(Te,{added:[i],removed:[]}),i},_addShape:function(e,t){var i,n,o=this,r=o.dataSource;if(r&&this._isEditable){if(i=p(r,u(e.dataItem)),e.dataItem=i,e.updateModel(),!this.trigger("add",{shape:e}))return this.dataSource.add(i),n=this._inactiveShapeItems.getByUid(i.uid),n.element=e,n.undoable=t,e}else if(!this.trigger("add",{shape:e}))return this.addShape(e,t)},remove:function(e,t){var i,n,o,r;for(e=ve(e)?e.slice(0):[e],i=h(e),n=i.shapes,o=i.connections,ge(t)||(t=!0),t&&this.undoRedoService.begin(),this._suspendModelRefresh(),r=n.length-1;r>=0;r--)this._removeItem(n[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(Te,{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,i,n,o,r=[];for(o=0;o<e.length;o++)t=e[o],n=t.options.editable,i=t instanceof y?{shape:t}:{connection:t},n&&n.remove!==!1&&!this.trigger("remove",i)&&r.push(t);return r},undo:function(){this.undoRedoService.undo()},redo:function(){this.undoRedoService.redo()},select:function(e,t){if(!me(e))return this._selectedItems;t=L({addToSelection:!1},t);var i,n,o=t.addToSelection,r=[],s=[];for(o||this.deselect(),this._internalSelection=!0,e instanceof Array?r=e:e instanceof b&&(r=[e]),i=0;i<r.length;i++)n=r[i],n.select(!0)&&s.push(n);this._selectionChanged(s,[]),this._internalSelection=!1},selectAll:function(){this.select(this.shapes.concat(this.connections))},selectArea:function(e){var t,i,n,o;if(this._internalSelection=!0,o=[],e instanceof $)for(i=this.shapes.concat(this.connections),t=0;t<i.length;t++)n=i[t],e&&!n._hitTest(e)||!n.options.enable||n.select(!0)&&o.push(n);this._selectionChanged(o,[]),this._internalSelection=!1},deselect:function(e){this._internalSelection=!0;var t,i,n=[],o=[];for(e instanceof Array?o=e:e instanceof b?o.push(e):me(e)||(o=this._selectedItems.slice(0)),i=0;i<o.length;i++)t=o[i],t.select(!1)&&n.push(t);this._selectionChanged([],n),this._internalSelection=!1},toFront:function(e,t){var i,n,o;e||(e=this._selectedItems.slice()),i=this._getDiagramItems(e),!ge(t)||t?(n=r(this.mainLayer,i.visuals),o=new ue(this,e,n),this.undoRedoService.add(o)):(this.mainLayer.toFront(i.visuals),this._fixOrdering(i,!0))},toBack:function(e,t){var i,n,o;e||(e=this._selectedItems.slice()),i=this._getDiagramItems(e),!ge(t)||t?(n=r(this.mainLayer,i.visuals),o=new de(this,e,n),this.undoRedoService.add(o)):(this.mainLayer.toBack(i.visuals),this._fixOrdering(i,!1))},bringIntoView:function(e,t){var i,n,o,r,s=this.viewport(),a=new F.RectAlign(s);0!==s.width&&0!==s.height&&(t=L({animate:!1,align:"center middle"},t),"none"==t.align&&(t.align="center middle"),e instanceof b?n=e.bounds(ot):ve(e)?n=this.boundingBox(e):e instanceof $&&(n=e.clone()),o=n.clone(),n.zoom(this._zoom),(n.width>s.width||n.height>s.height)&&(this._zoom=this._getValidZoom(ye.min(s.width/o.width,s.height/o.height)),n=o.clone().zoom(this._zoom)),this._zoomMainLayer(),i=n.clone(),a.align(n,t.align),r=n.topLeft().minus(i.topLeft()),this.pan(r.times(-1),t.animate))},alignShapes:function(e){var t,i,n,o,r,s,a;if(fe(e)&&(e="Left"),t=this.select(),0!==t.length){switch(e.toLowerCase()){case"left":case"top":i=tt;break;case"right":case"bottom":i=it}for(o=0;o<t.length;o++)if(n=t[o],n instanceof y)switch(e.toLowerCase()){case"left":i=ye.min(i,n.options.x);break;case"top":i=ye.min(i,n.options.y);break;case"right":i=ye.max(i,n.options.x);break;case"bottom":i=ye.max(i,n.options.y)}for(r=[],s=[],o=0;o<t.length;o++)if(n=t[o],n instanceof y)switch(s.push(n),r.push(n.bounds()),e.toLowerCase()){case"left":case"right":n.position(new J(i,n.options.y));break;case"top":case"bottom":n.position(new J(n.options.x,i))}a=new F.TransformUnit(s,r),this.undoRedoService.add(a,!1)}},zoom:function(e,t){var i,n,o,r;return e&&(i=t?t.point:new F.Point(0,0),e=this._zoom=this._getValidZoom(e),fe(i)||(i=new F.Point(ye.round(i.x),ye.round(i.y)),n=i.times(e),o=this.modelToView(i),r=o.minus(n),this._storePan(new F.Point(ye.round(r.x),ye.round(r.y)))),t&&(t.zoom=e),this._panTransform(),this.canvas.surface.hideTooltip(),this._updateAdorners()),this._zoom},_getPan:function(e){var t=this.canvas;return t.translate||(e=e.plus(this._pan)),e},pan:function(e,i){var n,o;return e instanceof J?(n=this,o=n.scroller,e=n._getPan(e),e=e.times(-1),i?o.animatedScrollTo(e.x,e.y,function(){n._updateAdorners()}):(o.scrollTo(e.x,e.y),n._updateAdorners()),t):this._pan.times(-1)},viewport:function(){var e=this.element,t=e.width(),i=e.height();return this.toolBar&&(i-=N(this.toolBar.element)),new $(0,0,t,i)},copy:function(){var e,t;if(this.options.copy.enabled)for(this._clipboard=[],this._copyOffset=1,e=0;e<this._selectedItems.length;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;e<this._selectedItems.length;e++)t=this._selectedItems[e],this._clipboard.push(t);this.remove(this._clipboard,!0)}},paste:function(){var e,t,i,n,o,r,s,a;if(this._clipboard.length>0){for(n={},o=h(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(),i=0;i<s.length;i++)e=s[i],t=e.clone(),n[e.id]=t,t.position(new J(e.options.x+a.x,e.options.y+a.y)),t.diagram=this,t=this._addShape(t),t&&t.select();for(i=0;i<r.length;i++)e=r[i],t=this._addConnection(e.clone()),t&&(this._updateCopiedConnection(t,e,"source",n,a),this._updateCopiedConnection(t,e,"target",n,a),t.select(!0),t.updateModel());this._syncChanges(),this._copyOffset+=1}},_updateCopiedConnection:function(e,t,i,n,o){var r,s,a,l=t[i](),c=this;l instanceof w&&n[l.shape.id]?(a=n[l.shape.id],c.getShapeById(a.id)?e[i](a.getConnector(l.options.name)):(s=c._inactiveShapeItems.getByUid(a.dataItem.uid),s&&(r=function(t){a=c._dataMap[t.id],e[i](a.getConnector(l.options.name)),e.updateModel()},c._deferredConnectionUpdates.push(s.onActivate(r))))):e[i](new J(t[i+"Point"]().x+o.x,t[i+"Point"]().y+o.y))},boundingBox:function(e,t){var i,n,o,r=$.empty(),s=me(e)?this._getDiagramItems(e):{shapes:this.shapes};if(s.shapes.length>0)for(n=s.shapes[0],r=n.bounds(rt),o=1;o<s.shapes.length;o++)n=s.shapes[o],i=n.bounds(rt),t===!0&&(i.x-=n._rotationOffset.x,i.y-=n._rotationOffset.y),r=r.union(i);return r},_containerOffset:function(){var e=this.element.offset();return this.toolBar&&(e.top+=N(this.toolBar.element)),e},documentToView:function(e){var t=this._containerOffset();return new J(e.x-t.left,e.y-t.top)},viewToDocument:function(e){var t=this._containerOffset();return new J(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 i,n,o=e;return e instanceof J?t&&(o=t.apply(e)):(i=this._transformWithMatrix(e.topLeft(),t),n=this._transformWithMatrix(e.bottomRight(),t),o=$.fromPoints(i,n)),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,i,n,o,r;switch(this._layouting=!0,fe(e)&&(e=this.options.layout),t=fe(e)||fe(e.type)?"Tree":e.type,t.toLowerCase()){case"tree":i=new F.TreeLayout(this);break;case"layered":i=new F.LayeredLayout(this);break;case"forcedirected":case"force":case"spring":case"springembedder":i=new F.SpringLayout(this);break;default:throw"Layout algorithm '"+t+"' is not supported."}n=new F.LayoutState(this),o=i.layout(e),o&&(r=new F.LayoutUndoUnit(n,o,e?e.animate:null),this.undoRedoService.add(r)),this._layouting=!1,this._redrawConnections()},getShapeById:function(e){var t;return(t=le.first(this.shapes,function(t){return t.visual.id===e}))?t:t=le.first(this.connections,function(t){return t.visual.id===e})},getShapeByModelId:function(e){var t;return t=this._isEditable?this._dataMap[e]:le.first(this.shapes,function(t){return(t.dataItem||{}).id===e})},getShapeByModelUid:function(e){var t;return t=this._isEditable?le.first(this.shapes,function(t){return(t.dataItem||{}).uid===e}):this._dataMap[e]},getConnectionByModelId:function(e){var t;return this.connectionsDataSource&&(t=le.first(this.connections,function(t){return(t.dataItem||{}).id===e})),t},getConnectionByModelUid:function(e){var t;return this.connectionsDataSource&&(t=this._connectionsDataMap[e]),t},_extendLayoutOptions:function(e){e.layout&&(e.layout=L({},F.LayoutBase.fn.defaultOptions||{},e.layout))},_selectionChanged:function(e,t){(e.length||t.length)&&this.trigger(Oe,{selected:e,deselected:t})},_getValidZoom:function(e){return ye.min(ye.max(e,this.options.zoomMin),this.options.zoomMax)},_panTransform:function(e){var t=this,i=e||t._pan;t.canvas.translate?(t.scroller.scrollTo(i.x,i.y),t._zoomMainLayer()):(t._storePan(i),t._transformMainLayer())},_finishPan:function(){this.trigger(We,{total:this._pan,delta:Number.NaN})},_storePan:function(e){this._pan=e,this._storeViewMatrix()},_zoomMainLayer:function(){var e=this._zoom,t=new G(0,0,e,e);t.render(this.mainLayer),this._storeLayerMatrix(t),this._storeViewMatrix()},_transformMainLayer:function(){var e=this._pan,t=this._zoom,i=new G(e.x,e.y,t,t);i.render(this.mainLayer),this._storeLayerMatrix(i),this._storeViewMatrix()},_storeLayerMatrix:function(e){this._layerMatrix=e.toMatrix(),this._layerMatrixInvert=e.invert().toMatrix()},_storeViewMatrix:function(){var e=this._pan,t=this._zoom,i=new G(e.x,e.y,t,t);this._matrix=i.toMatrix(),this._matrixInvert=i.invert().toMatrix()},_toIndex:function(e,t){var i=this._getDiagramItems(e);this.mainLayer.toIndex(i.visuals,t),this._fixOrdering(i,!1)},_fixOrdering:function(e,t){var i,n,o=t?this.shapes.length-1:0,r=t?this.connections.length-1:0;for(i=0;i<e.shapes.length;i++)n=e.shapes[i],le.remove(this.shapes,n),le.insert(this.shapes,n,o);for(i=0;i<e.cons.length;i++)n=e.cons[i],le.remove(this.connections,n),le.insert(this.connections,n,r)},_getDiagramItems:function(e){var t,i,n={},o=e;for(n.visuals=[],n.shapes=[],n.cons=[],e?ve(e)||(o=[e]):o=this._selectedItems.slice(),t=0;t<o.length;t++)i=o[t],i instanceof y?(n.shapes.push(i),n.visuals.push(i.visual)):i instanceof k&&(n.cons.push(i),n.visuals.push(i.visual));return n},_removeItem:function(e,t,i){e.select(!1),e instanceof y?(this._removeShapeDataItem(e),this._removeShape(e,t,i)):e instanceof k&&(this._removeConnectionDataItem(e),this._removeConnection(e,t)),this.mainLayer.remove(e.visual)},_removeShape:function(e,t,i){var n,o,r,s,a=[],l=[];for(this.toolService._removeHover(),t&&this.undoRedoService.addCompositeItem(new Y(e)),le.remove(this.shapes,e),this._shapesQuadTree.remove(e),n=0;n<e.connectors.length;n++)for(r=e.connectors[n],s=0;s<r.connections.length;s++)o=r.connections[s],i&&I.inArray(o,i)||(o.sourceConnector==r?a.push(o):o.targetConnector==r&&l.push(o));for(n=0;n<a.length;n++)a[n].source(null,t),a[n].updateModel();for(n=0;n<l.length;n++)l[n].target(null,t),l[n].updateModel()},_removeConnection:function(e,t){e.sourceConnector&&le.remove(e.sourceConnector.connections,e),e.targetConnector&&le.remove(e.targetConnector.connections,e),t&&this.undoRedoService.addCompositeItem(new Q(e)),le.remove(this.connections,e)},_removeDataItems:function(e,t){var i,n,o,r;for(e=ve(e)?e:[e];e.length;)if(i=e.shift(),o=this._dataMap[i.uid],o&&(this._removeShapeConnections(o),this._removeItem(o,!1),delete this._dataMap[i.uid],t&&i.hasChildren&&i.loaded()))for(n=i.children.data(),r=0;r<n.length;r++)e.push(n[r])},_removeShapeConnections:function(e){var t,i=e.connections();if(i)for(t=0;t<i.length;t++)this._removeItem(i[t],!1)},_addDataItem:function(e,t){var i,n;if(ge(e))return(i=this._dataMap[e.id])?i:(n=L({},this.options.shapeDefaults),n.dataItem=e,i=new y(n,this),this.addShape(i,t!==!1),this._dataMap[e.id]=i,i)},_addDataItemByUid:function(e){var t,i;if(ge(e))return(t=this._dataMap[e.uid])?t:(i=L({},this.options.shapeDefaults),i.dataItem=e,t=new y(i,this),this.addShape(t),this._dataMap[e.uid]=t,t)},_addDataItems:function(e,t){var i,n,o,r,s;for(n=0;n<e.length;n++)i=e[n],o=this._addDataItemByUid(i),r=this._addDataItemByUid(t),r&&!this.connected(r,o)&&(s=this.connect(r,o))},_refreshSource:function(e){var t,i,n=this,o=e.node,r=e.action,s=e.items,a=n.options;if(e.field)for(t=0;t<s.length;t++)this._dataMap[s[t].uid]&&this._dataMap[s[t].uid].redrawVisual();else{if("remove"==r)this._removeDataItems(e.items,!0);else for(r&&"itemloaded"!==r||this._bindingRoots||(this._bindingRoots=!0,i=!0),r||o||n.clear(),this._addDataItems(s,o),t=0;t<s.length;t++)s[t].load();a.layout&&(i||"remove"==r||"add"==r)&&n.layout(a.layout),i&&(this.trigger("dataBound"),this._bindingRoots=!1)}},_addItem:function(e){e instanceof y?this.addShape(e):e instanceof k&&this.addConnection(e)},_createToolBar:function(e){var t,i,n,o,r,s,a,l,c,d=this.toolService.diagram;this.singleToolBar||1!==d.select().length||(t=d.select()[0],t&&t.options.editable!==!1&&(i=t.options.editable,n=i.tools,this._isEditable&&0===n.length&&(t instanceof y?n=["edit","rotateClockwise","rotateAnticlockwise"]:t instanceof k&&(n=["edit"]),i&&i.remove!==!1&&n.push("delete")),n&&n.length&&(o=20,this.singleToolBar=new C(d,{tools:n,click:B(this._toolBarClick,this),modal:!0,popupZIndex:parseInt(d.element.closest(".k-window").css("zIndex"),10)+10}),s=H(this.singleToolBar._popup.element),a=N(this.singleToolBar._popup.element),t instanceof y?(l=this.modelToView(t.bounds(rt)),r=new J(l.x,l.y).minus(new J((s-l.width)/2,a+o))):t instanceof k&&(c=this.modelToView(t.bounds()),r=new J(c.x,c.y).minus(new J((s-c.width-20)/2,a+o))),r?(this.canvas.translate||(r=r.minus(new J(this.scroller.scrollLeft,this.scroller.scrollTop))),r=this.viewToDocument(r),r=new J(ye.max(r.x,0),ye.max(r.y,0)),this.singleToolBar.showAt(r),e&&this.singleToolBar._popup.one("close",v)):this._destroyToolBar())))},_toolBarClick:function(e){this.trigger("toolBarClick",e),this._destroyToolBar()},_normalizePointZoom:function(e){return e.times(1/this.zoom())},_initialize:function(){this.shapes=[],this._selectedItems=[],this.connections=[],this._dataMap={},this._connectionsDataMap={},this._inactiveShapeItems=new d,this._deferredConnectionUpdates=[],this.undoRedoService=new ie({undone:this._syncHandler,redone:this._syncHandler}),this.id=F.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;ge(this.options.connectionsDataSource)?(this._isEditable=!0,e=this.options.dataSource||{},t=ve(e)?{data:e}:e,this.dataSource&&this._shapesRefreshHandler?this.dataSource.unbind("change",this._shapesRefreshHandler).unbind("requestStart",this._shapesRequestStartHandler).unbind("error",this._shapesErrorHandler):(this._shapesRefreshHandler=B(this._refreshShapes,this),this._shapesRequestStartHandler=B(this._shapesRequestStart,this),this._shapesErrorHandler=B(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=ve(t)?{data:t}:t,this.connectionsDataSource&&this._connectionsRefreshHandler?this.connectionsDataSource.unbind("change",this._connectionsRefreshHandler).unbind("requestStart",this._connectionsRequestStartHandler).unbind("error",this._connectionsErrorHandler):(this._connectionsRefreshHandler=B(this._refreshConnections,this),this._connectionsRequestStartHandler=B(this._connectionsRequestStart,this),this._connectionsErrorHandler=B(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=ye.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;e<t.length;e++)t[e].refresh()},_removeShapes:function(e){var t,i,n=this._dataMap;for(i=0;i<e.length;i++)t=e[i],n[t.id]&&(this.remove(n[t.id],!1),n[t.id]=null)},_syncShapes:function(){var e=this,t=e._inactiveShapeItems;t.forEach(function(i){var n=i.dataItem,o=i.element;n.isNew()||(o?(o._setOptionsFromModel(),e.addShape(o,i.undoable),e._dataMap[n.id]=o):e._addDataItem(n),i.activate(),t.remove(n))})},_updateShapes:function(e,t){var i,n,o;for(i=0;i<e.length;i++)n=e[i],o=this._dataMap[n.id],o&&o.updateOptionsFromModel(n,t)},_addShapes:function(e){for(var t=0;t<e.length;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;t<e.length;t++)this.remove(this._connectionsDataMap[e[t].uid],!1),this._connectionsDataMap[e[t].uid]=null},_updateConnections:function(e){var t,i,n;for(t=0;t<e.length;t++)i=e[t],n=this._connectionsDataMap[i.uid],n.updateOptionsFromModel(i)},_addConnections:function(e,t){var i,n,o=e.length;for(i=0;i<o;i++)n=e[i],this._addConnectionDataItem(n,t)},_addConnectionDataItem:function(e,t){var i,n,o,r;this._connectionsDataMap[e.uid]||(i=this._validateConnector(e.from),ge(i)&&null!==i||(i=new J(e.fromX,e.fromY)),n=this._validateConnector(e.to),
ge(n)&&null!==n||(n=new J(e.toX,e.toY)),ge(i)&&ge(n)&&(o=L({},this.options.connectionDefaults),o.dataItem=e,r=new k(i,n,o),this._connectionsDataMap[e.uid]=r,this.addConnection(r,t)))},_validateConnector:function(e){var t;return ge(e)&&null!==e&&(t=this._dataMap[e]),t},_treeDataSource:function(){var e=this,t=e.options,i=t.dataSource;if(i=ve(i)?{data:i}:i,i instanceof kendo.data.DataSource&&!(i instanceof kendo.data.HierarchicalDataSource))throw Error("Incorrect DataSource type. If a single dataSource instance is set to the diagram then it should be a HierarchicalDataSource. You should set only the options instead of an instance or a HierarchicalDataSource instance or supply connectionsDataSource as well.");i.fields||(i.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource&&e._refreshHandler&&e._unbindDataSource(),e._refreshHandler=B(e._refreshSource,e),e._errorHandler=B(e._error,e),e.dataSource=V.create(i).bind(Te,e._refreshHandler).bind(Fe,e._errorHandler)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(Te,e._refreshHandler).unbind(Fe,e._errorHandler)},_adorn:function(e,i){i!==t&&e&&(i?(this._adorners.push(e),this.adornerLayer.append(e.visual)):(le.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,i=this._adorners;for(e=0;e<i.length;e++)t=i[e],t.refreshBounds&&t.refreshBounds(),t.refresh()},_refresh:function(){for(var e=0;e<this.connections.length;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=R.transform().translate(-e.x,-e.y),i=new R.Rect([0,0],[e.width,e.height]),n=M.Path.fromRect(i),o=new M.Group({transform:t}),r=new M.Group({clip:n}),s=this.canvas.drawingElement.children[0];return r.append(o),o.children.push(s),r},exportVisual:function(){var e=R.transform().scale(1/this._zoom),t=new M.Group({transform:e}),i=this.mainLayer.drawingElement;return t.children.push(i),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=[])}}),I.ExportMixin.extend(x.fn,!0),kendo.PDFMixin&&kendo.PDFMixin.extend(x.fn),C=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),this.diagram=e,this.options=L({},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;e<this._tools.length;e++)t=this._tools[e],(t.buttons&&t.buttons.length||!ge(t.buttons))&&this._toolBar.add(t)},createToolBar:function(){this.element=e("<div/>"),this._toolBar=this.element.kendoToolBar({click:B(this.click,this),resizable:!1}).getKendoToolBar(),this.element.css("border","none")},createTools:function(){for(var e=0;e<this.options.tools.length;e++)this.createTool(this.options.tools[e])},createTool:function(e){we(e)||(e={name:e});var t=e.name+"Tool";this[t]?this[t](e):this._tools.push(L({},e,{attributes:this._setAttributes({action:e.name})}))},showAt:function(e){var t=parseInt(this.options.popupZIndex,10);this._popup&&(this._popup.open(e.x,e.y),t&&this._popup.wrapper.css("zIndex",t))},hide:function(){this._popup&&this._popup.close()},newGroup:function(){return{type:"buttonGroup",buttons:[]}},editTool:function(){this._tools.push({icon:"edit",showText:"overflow",type:"button",text:"Edit",attributes:this._setAttributes({action:"edit"})})},deleteTool:function(){this._tools.push({icon:"close",showText:"overflow",type:"button",text:"Delete",attributes:this._setAttributes({action:"delete"})})},rotateAnticlockwiseTool:function(e){this._appendGroup("rotate"),this._rotateGroup.buttons.push({icon:"rotate-left",showText:"overflow",text:"RotateAnticlockwise",group:"rotate",attributes:this._setAttributes({action:"rotateAnticlockwise",step:e.step})})},rotateClockwiseTool:function(e){this._appendGroup("rotate"),this._rotateGroup.buttons.push({icon:"rotate-right",attributes:this._setAttributes({action:"rotateClockwise",step:e.step}),showText:"overflow",text:"RotateClockwise",group:"rotate"})},createShapeTool:function(){this._appendGroup("create"),this._createGroup.buttons.push({icon:"shape",showText:"overflow",text:"CreateShape",group:"create",attributes:this._setAttributes({action:"createShape"})})},createConnectionTool:function(){this._appendGroup("create"),this._createGroup.buttons.push({icon:"connector",showText:"overflow",text:"CreateConnection",group:"create",attributes:this._setAttributes({action:"createConnection"})})},undoTool:function(){this._appendGroup("history"),this._historyGroup.buttons.push({icon:"undo",showText:"overflow",text:"Undo",group:"history",attributes:this._setAttributes({action:"undo"})})},redoTool:function(){this._appendGroup("history"),this._historyGroup.buttons.push({icon:"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,i={},n=e.attr(kendo.attr("action"));return n&&(i.action=n),t=e.attr(kendo.attr("step")),t&&(i.step=t),i},click:function(t){var i=this._getAttributes(e(t.target)),n=i.action;n&&this[n]&&this[n](i),this.trigger("click",this.eventData(n,t.target))},eventData:function(e,t){var i,n,o=this.selectedElements(),r=o.length,s=[],a=[];for(n=0;n<r;n++)i=o[n],i instanceof y?s.push(i):a.push(i);return{shapes:s,connections:a,action:e,target:t}},"delete":function(){var e=this.diagram,t=e._triggerRemove(this.selectedElements());t.length&&(this.diagram.remove(t,!0),this.diagram._syncChanges())},edit:function(){var e=this.selectedElements();1===e.length&&this.diagram.edit(e[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()}}),S=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),this.options=O(!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,i,n=[],o=this.model.fields;for(e in o)t={},this._isEditable(e)&&(i=this.options.editors[e],i&&(t.editor=i),t.field=e,n.push(t));return n},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}}),T=S.extend({init:function(e,t){S.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,i=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(),i._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,i="";for(e=0;e<this.fields.length;e++)t=this.fields[e],i+='<div class="k-edit-label"><label for="'+t.field+'">'+(t.field||"")+"</label></div>",this._isEditable(t.field)&&(i+="<div "+kendo.attr("container-for")+'="'+t.field+'" class="k-edit-field"></div>');return i},_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(ft)(_[e])},_attachButtonEvents:function(){this._cancelClickHandler=B(this._cancelClick,this),this.window.element.on(De+xe,"a.k-diagram-cancel",this._cancelClickHandler),this._updateClickHandler=B(this._updateClick,this),this.window.element.on(De+xe,"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",B(this.destroy,this)).close()},destroy:function(){this.window.close().destroy(),this.window.element.off(De+xe,"a.k-diagram-cancel",this._cancelClickHandler),this.window.element.off(De+xe,"a.k-diagram-update",this._updateClickHandler),this._cancelClickHandler=null,this._editUpdateClickHandler=null,this.window=null,S.fn.destroy.call(this)}}),c.fn=c.prototype={onActivate:function(t){var i=e.Deferred();return this.callbacks.push({callback:t,deferred:i}),i},activate:function(){var e,t,i=this.callbacks;for(t=0;t<i.length;t++)e=this.callbacks[t],e.callback(this.dataItem),e.deferred.resolve();this.callbacks=[]}},d.fn=d.prototype={add:function(e){for(var t=0;t<e.length;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]}},D=z.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,i=this.shapes,n=i.length;for(t=0;t<n;t++)if(i[t].shape===e){i.splice(t,1);break}},hitTestRect:function(e,t){var i,n=this.shapes,o=n.length;for(i=0;i<o;i++)if(this._testRect(n[i].shape,e)&&!I.inArray(n[i].shape,t))return!0},_testRect:function(e,t){var i,n=e.rotate().angle,o=e.bounds();return i=n?ee.rects(t,o,-n):o.overlaps(t)}}),A=D.extend({init:function(e){D.fn.init.call(this),this.children=[],this.rect=e},inBounds:function(e){var t=this.rect,i=t.bottomRight(),n=e.bottomRight(),o=t.x<=e.x&&t.y<=e.y&&n.x<=i.x&&n.y<=i.y;return o},overlapsBounds:function(e){return this.rect.overlaps(e)},insert:function(e,t){var i,n=!1,o=this.children,r=o.length;if(this.inBounds(t)){if(!r&&this.shapes.length<4)this._add(e,t);else{for(r||this._initChildren(),i=0;i<o.length;i++)if(o[i].insert(e,t)){n=!0;break}n||this._add(e,t)}n=!0}return n},_initChildren:function(){var e,t,i=this.rect,n=this.children,o=this.shapes,r=i.center(),s=i.width/2,a=i.height/2;for(n.push(new A(new $(i.x,i.y,s,a)),new A(new $(r.x,i.y,s,a)),new A(new $(i.x,r.y,s,a)),new A(new $(r.x,r.y,s,a))),t=o.length-1;t>=0;t--)for(e=0;e<n.length;e++)if(n[e].insert(o[t].shape,o[t].bounds)){o.splice(t,1);break}},hitTestRect:function(e,t){var i,n=this.children,o=n.length,r=!1;if(this.overlapsBounds(e))if(D.fn.hitTestRect.call(this,e,t))r=!0;else for(i=0;i<o;i++)if(n[i].hitTestRect(e,t)){r=!0;break}return r}}),E=z.extend({ROOT_SIZE:1e3,init:function(e){var t=B(this._boundsChange,this);e.bind(Se,t),e.bind(Ve,t),this.initRoots()},initRoots:function(){this.rootMap={},this.root=new D},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(rt),i=this.ROOT_SIZE,n=this.getSectors(t),o=n[0][0],r=n[1][0];this.inRoot(n)?this.root.insert(e,t):(this.rootMap[o]||(this.rootMap[o]={}),this.rootMap[o][r]||(this.rootMap[o][r]=new A(new $(o*i,r*i,i,i))),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,i,n=this.ROOT_SIZE,o=e.bottomRight(),r=ye.floor(o.x/n),s=ye.floor(o.y/n),a=[[],[]];for(t=ye.floor(e.x/n);t<=r;t++)a[0].push(t);for(i=ye.floor(e.y/n);i<=s;i++)a[1].push(i);return a},hitTestRect:function(e,t){var i,n,o,r,s,a=this.getSectors(e);if(this.root.hitTestRect(e,t))return!0;for(i=0;i<a[0].length;i++)for(o=a[0][i],n=0;n<a[1].length;n++)if(r=a[1][n],s=(this.rootMap[o]||{})[r],s&&s.hitTestRect(e,t))return!0;return!1}}),I.ui.plugin(x),L(F,{Shape:y,Connection:k,Connector:w,DiagramToolBar:C,QuadNode:A,QuadRoot:D,ShapesQuadTree:E,PopupEditor:T})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.diagram.min",["kendo.data.min","kendo.draganddrop.min","kendo.userevents.min","kendo.mobile.scroller.min","kendo.drawing.min","dataviz/diagram/utils.min","dataviz/diagram/math.min","dataviz/diagram/svg.min","dataviz/diagram/services.min","dataviz/diagram/layout.min","dataviz/diagram/dom.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.treemap.min",["kendo.data.min","kendo.userevents.min","kendo.dataviz.themes.min"],e)}(function(){return function(e,t){function i(e,t){if(null===t)return t;var i=C(e,!0);return i(t)}function n(e){return typeof e!==F}function o(e,t,i){var n,o,l=a(e),c=a(t),d=u(e)-u(t)<0,h=[];for(h.push(e),n=0;n<i;n++)o={r:r(l.r,c.r,n,i,d),g:r(l.g,c.g,n,i,d),b:r(l.b,c.b,n,i,d)},h.push(s(o));return h.push(t),h}function r(e,t,i,n,o){var r,s=p.min(p.abs(e),p.abs(t)),a=p.max(p.abs(e),p.abs(t)),l=(a-s)/(n+1),c=l*(i+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:d(t.r),g:d(t.g),b:d(t.b)}}function l(e){var t=p.round(e).toString(16).toUpperCase();return 1===t.length&&(t="0"+t),t}function c(e){var t=e.length,i={};return 3===t?(i.r=e[0],i.g=e[1],i.b=e[2]):(i.r=e.substring(0,2),i.g=e.substring(2,4),i.b=e.substring(4,6)),i}function d(e){return parseInt(e.toString(16),16)}function u(e){var t=0;return e&&(e=a(e),t=p.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)),t}function h(e){var t=p.pow(10,4);return p.round(e*t)/t}var p=Math,f=e.proxy,m=e.isArray,g=window.kendo,v=g._outerHeight,_=g._outerWidth,b=g.Class,w=g.ui.Widget,y=g.template,k=g.deepExtend,x=g.data.HierarchicalDataSource,C=g.getter,S=g.dataviz,T=".kendoTreeMap",D="change",A="dataBound",E="itemCreated",I=Number.MAX_VALUE,M="mouseover"+T,R="mouseleave"+T,F="undefined",P=w.extend({init:function(t,i){g.destroy(t),e(t).empty(),w.fn.init.call(this,t,i),this.wrapper=this.element,this._initTheme(this.options),this.element.addClass("k-widget k-treemap"),this._setLayout(),this._originalOptions=k({},this.options),this._initDataSource(),this._attachEvents(),g.notify(this,S.ui)},options:{name:"TreeMap",theme:"default",autoBind:!0,textField:"text",valueField:"value",colorField:"color"},events:[A,E],_initTheme:function(e){var t=this,i=S.ui.themes||{},n=((e||{}).theme||"").toLowerCase(),o=(i[n]||{}).treeMap;t.options=k({},o,e)},_attachEvents:function(){this.element.on(M,f(this._mouseover,this)).on(R,f(this._mouseleave,this)),this._resizeHandler=f(this.resize,this,!1),g.onResize(this._resizeHandler)},_setLayout:function(){"horizontal"===this.options.type?(this._layout=new L((!1)),this._view=new H(this,this.options)):"vertical"===this.options.type?(this._layout=new L((!0)),this._view=new H(this,this.options)):(this._layout=new z,this._view=new B(this,this.options))},_initDataSource:function(){var e=this,t=e.options,i=t.dataSource;e._dataChangeHandler=f(e._onDataChange,e),e.dataSource=x.create(i).bind(D,e._dataChangeHandler),i&&e.options.autoBind&&e.dataSource.fetch()},setDataSource:function(e){var t=this;t.dataSource.unbind(D,t._dataChangeHandler),t.dataSource=e.bind(D,t._dataChangeHandler),e&&t.options.autoBind&&t.dataSource.fetch()},_onDataChange:function(e){var t,i,n,o,r=e.node,s=e.items,a=this.options;if(r){if(s.length){for(n=this._getByUid(r.uid),n.children=[],s=new g.data.Query(s)._sortForGrouping(a.valueField,"desc"),i=0;i<s.length;i++)t=s[i],n.children.push(this._wrapItem(t));o=this._view.htmlSize(n),this._layout.compute(n.children,n.coord,o),this._setColors(n.children),this._view.render(n)}}else this._cleanItems(),this.element.empty(),t=this._wrapItem(s[0]),this._layout.createRoot(t,_(this.element),v(this.element),"vertical"===this.options.type),this._view.createRoot(t),this._root=t,this._colorIdx=0;for(i=0;i<s.length;i++)s[i].load();r&&this.trigger(A,{node:r})},_cleanItems:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element.find(".k-leaf div,.k-treemap-title,.k-treemap-title-vertical")}})},_setColors:function(e){var t,i,r,s,a=this.options.colors,l=this._colorIdx,c=a[l%a.length];for(m(c)&&(t=o(c[0],c[1],e.length)),r=!1,s=0;s<e.length;s++)i=e[s],n(i.color)||(i.color=t?t[s]:c),i.dataItem.hasChildren||(r=!0);r&&this._colorIdx++},_contentSize:function(e){this.view.renderHeight(e)},_wrapItem:function(e){var t={};return n(this.options.valueField)&&(t.value=i(this.options.valueField,e)),n(this.options.colorField)&&(t.color=i(this.options.colorField,e)),n(this.options.textField)&&(t.text=i(this.options.textField,e)),t.level=e.level(),t.dataItem=e,t},_getByUid:function(e){for(var t,i=[this._root];i.length;){if(t=i.pop(),t.dataItem.uid===e)return t;t.children&&(i=i.concat(t.children))}},dataItem:function(t){var i=e(t).attr(g.attr("uid")),n=this.dataSource;return n&&n.getByUid(i)},findByUid:function(e){return this.element.find(".k-treemap-tile["+g.attr("uid")+"='"+e+"']")},_mouseover:function(t){var i=e(t.target);i.hasClass("k-leaf")&&(this._removeActiveState(),i.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(){w.fn.destroy.call(this),this.element.off(T),this.dataSource&&this.dataSource.unbind(D,this._dataChangeHandler),this._root=null,g.unbindResize(this._resizeHandler),g.destroy(this.element)},items:function(){return e()},getSize:function(){return g.dimensions(this.element)},_resize:function(){var e,t,i=this._root;i&&(e=this.element,t=e.children(),i.coord.width=_(e),i.coord.height=v(e),t.css({width:i.coord.width,height:i.coord.height}),this._resizeItems(i,t))},_resizeItems:function(e,t){var i,n,o,r;if(e.children&&e.children.length)for(i=t.children(".k-treemap-wrap").children(),this._layout.compute(e.children,e.coord,{text:this._view.titleSize(e,t)}),r=0;r<e.children.length;r++)n=e.children[r],o=i.filter("["+g.attr("uid")+"='"+n.dataItem.uid+"']"),this._view.setItemSize(n,o),this._resizeItems(n,o)},setOptions:function(e){var i=e.dataSource;e.dataSource=t,this._originalOptions=k(this._originalOptions,e),this.options=k({},this._originalOptions),this._setLayout(),this._initTheme(this.options),w.fn._setEvents.call(this,e),i&&this.setDataSource(x.create(i)),this.options.autoBind&&this.dataSource.fetch()}}),z=b.extend({createRoot:function(e,t,i){e.coord={width:t,height:i,top:0,left:0}},leaf:function(e){return!e.children},layoutChildren:function(e,t){var i,n,o,r,s=t.width*t.height,a=0,l=[];for(i=0;i<e.length;i++)l[i]=parseFloat(e[i].value),a+=l[i];for(i=0;i<l.length;i++)e[i].area=s*l[i]/a;n=this.layoutHorizontal()?t.height:t.width,o=[e[0]],r=e.slice(1),this.squarify(r,o,n,t)},squarify:function(e,t,i,n){this.computeDim(e,t,i,n)},computeDim:function(e,i,n,o){var r,s,a;return e.length+i.length==1?(r=1==e.length?e:i,this.layoutLast(r,n,o),t):(e.length>=2&&0===i.length&&(i=[e[0]],e=e.slice(1)),0===e.length?(i.length>0&&this.layoutRow(i,n,o),t):(s=e[0],this.worstAspectRatio(i,n)>=this.worstAspectRatio([s].concat(i),n)?this.computeDim(e.slice(1),i.concat([s]),n,o):(a=this.layoutRow(i,n,o),this.computeDim(e,[],a.dim,a)),t))},layoutLast:function(e,t,i){e[0].coord=i},layoutRow:function(e,t,i){return this.layoutHorizontal()?this.layoutV(e,t,i):this.layoutH(e,t,i)},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 i,n,o,r,s;if(!e||0===e.length)return I;for(i=0,n=0,o=I,r=0;r<e.length;r++)s=e[r].area,i+=s,o=o<s?o:s,n=n>s?n:s;return p.max(t*t*n/(i*i),i*i/(t*t*o))},compute:function(e,t,i){if(t.width>=t.height&&this.layoutHorizontal()||this.layoutChange(),e&&e.length>0){var n={width:t.width,height:t.height-i.text,top:0,left:0};this.layoutChildren(e,n)}},layoutV:function(e,t,i){var n,o,r,s=this._totalArea(e),a=0;for(t=h(s/t),n=0;n<e.length;n++)o=h(e[n].area/t),e[n].coord={height:o,width:t,top:i.top+a,left:i.left},a+=o;return r={height:i.height,width:i.width-t,top:i.top,left:i.left+t},r.dim=p.min(r.width,r.height),r.dim!=r.height&&this.layoutChange(),r},layoutH:function(e,t,i){var n,o,r=this._totalArea(e),s=h(r/t),a=i.top,l=0;for(n=0;n<e.length;n++)e[n].coord={height:s,width:h(e[n].area/s),top:a,left:i.left+l},l+=e[n].coord.width;return o={height:i.height-s,width:i.width,top:i.top+s,left:i.left},o.dim=p.min(o.width,o.height),o.dim!=o.width&&this.layoutChange(),o},_totalArea:function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].area;return i}}),B=b.extend({init:function(t,i){this.options=k({},this.options,i),this.treeMap=t,this.element=e(t.element),this.offset=0},titleSize:function(e,t){var i=t.children(".k-treemap-title");return i.height()||0},htmlSize:function(e){var t,i,n=this._getByUid(e.dataItem.uid),o={text:0};return e.children&&(this._clean(n),t=this._getText(e),t&&(i=this._createTitle(e),n.append(i),this._compile(i,e.dataItem),o.text=i.height()),n.append(this._createWrap()),this.offset=(_(n)-n.innerWidth())/2),o},_compile:function(e,t){this.treeMap.angular("compile",function(){return{elements:e,data:[{dataItem:t}]}})},_getByUid:function(e){return this.element.find(".k-treemap-tile["+g.attr("uid")+"='"+e+"']")},render:function(e){var t,i,n,o,r=this._getByUid(e.dataItem.uid),s=e.children;if(s)for(t=r.find(".k-treemap-wrap"),i=0;i<s.length;i++)n=s[i],o=this._createLeaf(n),t.append(o),this._compile(o.children(),n.dataItem),this.treeMap.trigger(E,{element:o})},createRoot:function(e){var t=this._createLeaf(e);this.element.append(t),this._compile(t.children(),e.dataItem),this.treeMap.trigger(E,{element:t})},_clean:function(e){this.treeMap.angular("cleanup",function(){return{elements:e.children(":not(.k-treemap-wrap)")}}),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).toggle(0!==t.value).append(e("<div></div>").html(this._getText(t)))},_createTile:function(t){var i=e("<div class='k-treemap-tile'></div>");return this.setItemSize(t,i),n(t.dataItem)&&n(t.dataItem.uid)&&i.attr(g.attr("uid"),t.dataItem.uid),i},_itemCoordinates:function(e){var t={width:e.coord.width,height:e.coord.height,left:e.coord.left,top:e.coord.top};return t.width+=t.left&&this.offset?2*this.offset:this.offset,t.height+=t.top?2*this.offset:this.offset,t},setItemSize:function(e,t){var i=this._itemCoordinates(e);t.css({width:i.width,height:i.height,left:i.left,top:i.top})},_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 u(e.color)}}),L=b.extend({createRoot:function(e,t,i,n){e.coord={width:t,height:i,top:0,left:0},e.vertical=n},init:function(e){this.vertical=e,this.quotient=e?1:0},compute:function(e,t,i){var n,o,r;e.length>0&&(n=t.width,o=t.height,this.vertical?o-=i.text:n-=i.text,r={width:n,height:o,top:0,left:0},this.layoutChildren(e,r))},layoutChildren:function(e,t){var i,n,o=t.width*t.height,r=0,s=[];for(i=0;i<e.length;i++)n=e[i],s[i]=parseFloat(e[i].value),r+=s[i],n.vertical=this.vertical;for(i=0;i<s.length;i++)e[i].area=o*s[i]/r;this.sliceAndDice(e,t)},sliceAndDice:function(e,t){var i=this._totalArea(e);e[0].level%2===this.quotient?this.layoutHorizontal(e,t,i):this.layoutVertical(e,t,i)},layoutHorizontal:function(e,t,i){var n,o,r,s=0;for(n=0;n<e.length;n++)o=e[n],r=o.area/(i/t.width),o.coord={height:t.height,width:r,top:t.top,left:t.left+s},s+=r},layoutVertical:function(e,t,i){var n,o,r,s=0;for(n=0;n<e.length;n++)o=e[n],r=o.area/(i/t.height),o.coord={height:r,width:t.width,top:t.top+s,left:t.left},s+=r},_totalArea:function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].area;return i}}),H=B.extend({htmlSize:function(e){var t,i,n=this._getByUid(e.dataItem.uid),o={text:0,offset:0};return e.children&&(this._clean(n),t=this._getText(e),t&&(i=this._createTitle(e),n.append(i),this._compile(i,e.dataItem),o.text=e.vertical?i.height():i.width()),n.append(this._createWrap()),this.offset=(_(n)-n.innerWidth())/2),o},titleSize:function(e,t){var i;return i=e.vertical?t.children(".k-treemap-title").height():t.children(".k-treemap-title-vertical").width(),i||0},_createTitle:function(t){var i;return i=e(t.vertical?"<div class='k-treemap-title'></div>":"<div class='k-treemap-title-vertical'></div>"),i.append(e("<div></div>").html(this._getText(t)))}});S.ui.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.min",["kendo.core.min","kendo.fx.min","kendo.router.min","kendo.view.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.data.signalr.min","kendo.binder.min","kendo.userevents.min","kendo.draganddrop.min","kendo.mobile.scroller.min","kendo.popup.min","kendo.tooltip.min","kendo.drawing.min","kendo.dataviz.core.min","kendo.dataviz.themes.min","kendo.dataviz.chart.min","kendo.dataviz.gauge.min","kendo.dataviz.barcode.min","kendo.dataviz.qrcode.min","kendo.dataviz.stock.min","kendo.dataviz.sparkline.min","kendo.dataviz.map.min","kendo.dataviz.diagram.min","kendo.dataviz.treemap.min","kendo.angular.min"],e)}(function(){"bundle all";return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.modalview.min",["kendo.mobile.shim.min","kendo.mobile.view.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile.ui,o=n.Shim,r=n.Widget,s="beforeOpen",a="open",l="close",c="init",d='<div class="km-modalview-wrapper" />',u=n.View.extend({init:function(e,t){var i=this;r.fn.init.call(i,e,t),i._id(),i._wrap(),i._shim(),this.options.$angular||(i._layout(),i._scroller(),i._model()),i.element.css("display",""),i.trigger(c)},events:[c,s,a,l],options:{name:"ModalView",modal:!0,width:null,height:null},destroy:function(){r.fn.destroy.call(this),this.shim.destroy()},open:function(t){var i=this;i.target=e(t),i.shim.show(),i._invokeNgController(),i.trigger("show",{view:i})},openFor:function(e){this.trigger(s,{target:e})||(this.open(e),this.trigger(a,{target:e}))},close:function(){this.element.is(":visible")&&!this.trigger(l)&&this.shim.hide()},_wrap:function(){var e,t,i=this,n=i.element,o=i.options;e=n[0].style.width||"auto",t=n[0].style.height||"auto",n.addClass("km-modalview").wrap(d),i.wrapper=n.parent().css({width:o.width||e||300,height:o.height||t||300}).addClass("auto"==t?" km-auto-height":""),n.css({width:"",height:""})},_shim:function(){var e=this;e.shim=new o(e.wrapper,{modal:e.options.modal,position:"center center",align:"center center",effect:"fade:in",className:"km-modalview-root",hide:function(t){e.trigger(l)&&t.preventDefault()}})}});n.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.drawer.min",["kendo.mobile.view.min","kendo.userevents.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile,o=i.support.mobileOS,r=i.effects.Transition,s=i.roleSelector,a="x",l=n.ui,c=!(o.ios&&7==o.majorVersion&&!o.appMode),d="beforeShow",u="init",h="show",p="hide",f="afterHide",m={enable:e.noop},g=l.View.extend({init:function(t,o){var r,a,l,d,h;if(e(t).parent().prepend(t),n.ui.Widget.fn.init.call(this,t,o),this.options.$angular||(this._layout(),this._scroller()),this._model(),r=this.element.closest(s("pane")).data("kendoMobilePane"))this.pane=r,this.pane.bind("viewShow",function(e){d._viewShow(e)}),this.pane.bind("sameViewRequested",function(){d.hide()}),a=this.userEvents=new i.UserEvents(r.element,{fastTap:!0,filter:s("view splitview"),allowSelection:!0});else{if(this.currentView=m,l=e(this.options.container),!l)throw Error("The drawer needs a container configuration option set.");a=this.userEvents=new i.UserEvents(l,{fastTap:!0,allowSelection:!0}),this._attachTransition(l)}d=this,h=function(e){d.visible&&(d.hide(),e.preventDefault())},this.options.swipeToOpen&&c?(a.bind("press",function(){d.transition.cancel()}),a.bind("start",function(e){d._start(e)}),a.bind("move",function(e){d._update(e)}),a.bind("end",function(e){d._end(e)}),a.bind("tap",h)):a.bind("press",h),this.leftPositioned="left"===this.options.position,this.visible=!1,this.element.hide().addClass("km-drawer").addClass(this.leftPositioned?"km-left-drawer":"km-right-drawer"),this.trigger(u)},options:{name:"Drawer",position:"left",views:[],swipeToOpenViews:[],swipeToOpen:!0,title:"",container:null},events:[d,p,f,u,h],show:function(){this._activate()&&this._show()},hide:function(){this.currentView&&(this.currentView.enable(),g.current=null,this._moveViewTo(0),this.trigger(p,{view:this}))},openFor:function(){this.visible?this.hide():this.show()},destroy:function(){l.View.fn.destroy.call(this),this.userEvents.destroy()},_activate:function(){if(this.visible)return!0;var e=this._currentViewIncludedIn(this.options.views);return!(!e||this.trigger(d,{view:this}))&&(this._setAsCurrent(),this.element.show(),this.trigger(h,{view:this}),this._invokeNgController(),!0)},_currentViewIncludedIn:function(t){if(!this.pane||!t.length)return!0;var i=this.pane.view();return e.inArray(i.id.replace("#",""),t)>-1||e.inArray(i.element.attr("id"),t)>-1},_show:function(){this.currentView.enable(!1),this.visible=!0;var e=this.element.width();this.leftPositioned||(e=-e),this._moveViewTo(e)},_setAsCurrent:function(){g.last!==this&&(g.last&&g.last.element.hide(),this.element.show()),g.last=this,g.current=this},_moveViewTo:function(e){this.userEvents.cancel(),this.transition.moveTo({location:e,duration:400,ease:r.easeOutExpo})},_viewShow:function(e){return this.currentView&&this.currentView.enable(),this.currentView===e.view?(this.hide(),t):(this.currentView=e.view,this._attachTransition(e.view.element),t)},_attachTransition:function(e){var t=this,n=this.movable,o=n&&n.x;this.transition&&(this.transition.cancel(),this.movable.moveAxis("x",0)),
n=this.movable=new i.ui.Movable(e),this.transition=new r({axis:a,movable:this.movable,onEnd:function(){0===n[a]&&(e[0].style.cssText="",t.element.hide(),t.trigger(f),t.visible=!1)}}),o&&(e.addClass("k-fx-hidden"),i.animationFrame(function(){e.removeClass("k-fx-hidden"),t.movable.moveAxis(a,o),t.hide()}))},_start:function(e){var n,o,r,s,a,l=e.sender;return Math.abs(e.x.velocity)<Math.abs(e.y.velocity)||i.triggeredByInput(e.event)||!this._currentViewIncludedIn(this.options.swipeToOpenViews)?(l.cancel(),t):(n=this.leftPositioned,o=this.visible,r=n&&o||!n&&!g.current,s=!n&&o||n&&!g.current,a=e.x.velocity<0,(r&&a||s&&!a)&&this._activate()?(l.capture(),t):(l.cancel(),t))},_update:function(e){var t,i=this.movable,n=i.x+e.x.delta;t=this.leftPositioned?Math.min(Math.max(0,n),this.element.width()):Math.max(Math.min(0,n),-this.element.width()),this.movable.moveAxis(a,t),e.event.preventDefault(),e.event.stopPropagation()},_end:function(e){var t,i=e.x.velocity,n=Math.abs(this.movable.x)>this.element.width()/2,o=.8;t=this.leftPositioned?i>-o&&(i>o||n):i<o&&(i<-o||n),t?this._show():this.hide()}});l.plugin(g)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.splitview.min",["kendo.mobile.pane.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile.ui,o=n.Widget,r="<div class='km-expanded-pane-shim' />",s=n.View,a=s.extend({init:function(t,s){var a,l,c=this;o.fn.init.call(c,t,s),t=c.element,e.extend(c,s),c._id(),c.options.$angular?c._overlay():(c._layout(),c._overlay()),c._style(),l=t.children(c._locate("modalview")),c.options.$angular?l.each(function(t,n){i.compileMobileDirective(e(n),s.$angular[0])}):i.mobile.init(l),c.panes=[],c._paramsHistory=[],c.options.$angular?(c.element.children(i.directiveSelector("pane")).each(function(){a=i.compileMobileDirective(e(this),s.$angular[0]),c.panes.push(a)}),c.element.children(i.directiveSelector("header footer")).each(function(){i.compileMobileDirective(e(this),s.$angular[0])})):c.content.children(i.roleSelector("pane")).each(function(){a=i.initWidget(this,{},n.roles),c.panes.push(a)}),c.expandedPaneShim=e(r).appendTo(c.element),c._shimUserEvents=new i.UserEvents(c.expandedPaneShim,{fastTap:!0,tap:function(){c.collapsePanes()}})},_locate:function(e){return this.options.$angular?i.directiveSelector(e):i.roleSelector(e)},options:{name:"SplitView",style:"horizontal"},expandPanes:function(){this.element.addClass("km-expanded-splitview")},collapsePanes:function(){this.element.removeClass("km-expanded-splitview")},_layout:function(){var e=this,t=e.element;e.transition=i.attrValue(t,"transition"),i.mobile.ui.View.prototype._layout.call(this),i.mobile.init(this.header.add(this.footer)),e.element.addClass("km-splitview"),e.content.addClass("km-split-content")},_style:function(){var t,i=this.options.style,n=this.element;i&&(t=i.split(" "),e.each(t,function(){n.addClass("km-split-"+this)}))},showStart:function(){var t=this;t.element.css("display",""),t.inited?this._invokeNgController():(t.inited=!0,e.each(t.panes,function(){this.options.initial?this.navigateToInitial():this.navigate("")}),t.trigger("init",{view:t})),t.trigger("show",{view:t})}});n.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.application.min",["kendo.mobile.pane.min","kendo.router.min"],e)}(function(){return function(e,t){function i(e,t){var i=[];return f&&i.push("km-on-"+f.name),i.push(e.skin?"km-"+e.skin:"ios"==e.name&&e.majorVersion>6?"km-ios7":"km-"+e.name),("ios"==e.name&&e.majorVersion<7||"ios"!=e.name)&&i.push("km-"+e.name+e.majorVersion),i.push("km-"+e.majorVersion),i.push("km-m"+(e.minorVersion?e.minorVersion[0]:0)),e.variant&&(e.skin&&e.skin===e.name||!e.skin||e.setDefaultPlatform===!1)&&i.push("km-"+(e.skin?e.skin:e.name)+"-"+e.variant),e.cordova&&i.push("km-cordova"),i.push(e.appMode?"km-app":"km-web"),t&&t.statusBarStyle&&i.push("km-"+t.statusBarStyle+"-status-bar"),i.join(" ")}function n(t){return"km-wp-"+(t.noVariantSet?0===parseInt(e("<div style='background: Background' />").css("background-color").split(",")[1],10)?"dark":"light":t.variant+" km-wp-"+t.variant+"-force")}function o(e){return f.wp?"-kendo-landscape"==e.css("animation-name"):Math.abs(window.orientation)/90==1}function r(e){return o(e)?y:v}function s(e){e.parent().addBack().css("min-height",window.innerHeight)}function a(){e("meta[name=viewport]").remove(),z.append(x({height:", width=device-width"+(o()?", height="+window.innerHeight+"px":d.mobileOS.flatVersion>=600&&d.mobileOS.flatVersion<700?", height="+window.innerWidth+"px":", height=device-height")}))}var l=window.kendo,c=l.mobile,d=l.support,u=c.ui.Widget,h=c.ui.Pane,p="ios7",f=d.mobileOS,m="blackberry"==f.device&&f.flatVersion>=600&&f.flatVersion<1e3&&f.appMode,g=.93,v="km-vertical",_="chrome"===f.browser,b=f.ios&&f.flatVersion>=700&&f.flatVersion<800&&(f.appMode||_),w=Math.abs(window.orientation)/90==1,y="km-horizontal",k={ios7:{ios:!0,browser:"default",device:"iphone",flatVersion:"700",majorVersion:"7",minorVersion:"0.0",name:"ios",tablet:!1},ios:{ios:!0,browser:"default",device:"iphone",flatVersion:"612",majorVersion:"6",minorVersion:"1.2",name:"ios",tablet:!1},android:{android:!0,browser:"default",device:"android",flatVersion:"442",majorVersion:"4",minorVersion:"4.2",name:"android",tablet:!1},blackberry:{blackberry:!0,browser:"default",device:"blackberry",flatVersion:"710",majorVersion:"7",minorVersion:"1.0",name:"blackberry",tablet:!1},meego:{meego:!0,browser:"default",device:"meego",flatVersion:"850",majorVersion:"8",minorVersion:"5.0",name:"meego",tablet:!1},wp:{wp:!0,browser:"default",device:"wp",flatVersion:"800",majorVersion:"8",minorVersion:"0.0",name:"wp",tablet:!1}},x=l.template('<meta content="initial-scale=#: data.scale #, maximum-scale=#: data.scale #, user-scalable=no#=data.height#" name="viewport" />',{usedWithBlock:!1}),C=l.template('<meta name="apple-mobile-web-app-capable" content="#= data.webAppCapable === false ? \'no\' : \'yes\' #" /> <meta name="apple-mobile-web-app-status-bar-style" content="#=data.statusBarStyle#" /> <meta name="msapplication-tap-highlight" content="no" /> ',{usedWithBlock:!1}),S=l.template("<style>.km-view { clip: rect(0 #= data.width #px #= data.height #px 0); }</style>",{usedWithBlock:!1}),T=f.android&&"chrome"!=f.browser||f.blackberry,D=l.template('<link rel="apple-touch-icon'+(f.android?"-precomposed":"")+'" # if(data.size) { # sizes="#=data.size#" #}# href="#=data.icon#" />',{usedWithBlock:!1}),A=("iphone"==f.device||"ipod"==f.device)&&f.majorVersion<7,E=("iphone"==f.device||"ipod"==f.device)&&f.majorVersion>=7,I=E?"none":null,M="mobilesafari"==f.browser?60:0,R=20,F=e(window),P=window.screen,z=e("head"),B="init",L=e.proxy,H=u.extend({init:function(t,i){c.application=this,e(e.proxy(this,"bootstrap",t,i))},bootstrap:function(t,i){var n,o,r;t=e(t),t[0]||(t=e(document.body)),u.fn.init.call(this,t,i),this.element.removeAttr("data-"+l.ns+"role"),this._setupPlatform(),this._attachMeta(),this._setupElementClass(),this._attachHideBarHandlers(),n=e.extend({},this.options),delete n.name,o=this,r=function(){o.pane=new h(o.element,n),o.pane.navigateToInitial(),o.options.updateDocumentTitle&&o._setupDocumentTitle(),o._startHistory(),o.trigger(B)},this.options.$angular?setTimeout(r):r()},options:{name:"Application",hideAddressBar:!0,browserHistory:!0,historyTransition:I,modelScope:window,statusBarStyle:"black",transition:"",retina:!1,platform:null,skin:null,updateDocumentTitle:!0,useNativeScrolling:!1},events:[B],navigate:function(e,t){this.pane.navigate(e,t)},replace:function(e,t){this.pane.replace(e,t)},scroller:function(){return this.view().scroller},hideLoading:function(){if(!this.pane)throw Error("The mobile application instance is not fully instantiated. Please consider activating loading in the application init event handler.");this.pane.hideLoading()},showLoading:function(){if(!this.pane)throw Error("The mobile application instance is not fully instantiated. Please consider activating loading in the application init event handler.");this.pane.showLoading()},changeLoadingMessage:function(e){if(!this.pane)throw Error("The mobile application instance is not fully instantiated. Please consider changing the message in the application init event handler.");this.pane.changeLoadingMessage(e)},view:function(){return this.pane.view()},skin:function(e){var t=this;return arguments.length?(t.options.skin=e||"",t.element[0].className="km-pane",t._setupPlatform(),t._setupElementClass(),t.options.skin):t.options.skin},destroy:function(){u.fn.destroy.call(this),this.pane.destroy(),this.options.browserHistory&&this.router.destroy()},_setupPlatform:function(){var t=this,o=t.options.platform,r=t.options.skin,s=[],a=f||k[p];o&&(a.setDefaultPlatform=!0,"string"==typeof o?(s=o.split("-"),a=e.extend({variant:s[1]},a,k[s[0]])):a=o),r&&(s=r.split("-"),f||(a.setDefaultPlatform=!1),a=e.extend({},a,{skin:s[0],variant:s[1]})),a.variant||(a.noVariantSet=!0,a.variant="dark"),t.os=a,t.osCssClass=i(t.os,t.options),"wp"==a.name&&(t.refreshBackgroundColorProxy||(t.refreshBackgroundColorProxy=e.proxy(function(){(t.os.variant&&t.os.skin&&t.os.skin===t.os.name||!t.os.skin)&&t.element.removeClass("km-wp-dark km-wp-light km-wp-dark-force km-wp-light-force").addClass(n(t.os))},t)),e(document).off("visibilitychange",t.refreshBackgroundColorProxy),e(document).off("resume",t.refreshBackgroundColorProxy),a.skin||(t.element.parent().css("overflow","hidden"),e(document).on("visibilitychange",t.refreshBackgroundColorProxy),e(document).on("resume",t.refreshBackgroundColorProxy),t.refreshBackgroundColorProxy()))},_startHistory:function(){this.options.browserHistory?(this.router=new l.Router({pushState:this.options.pushState,root:this.options.root,hashBang:this.options.hashBang}),this.pane.bindToRouter(this.router),this.router.start()):this.options.initial||this.pane.navigate("")},_resizeToScreenHeight:function(){var t,i=e("meta[name=apple-mobile-web-app-status-bar-style]").attr("content").match(/black-translucent|hidden/),n=this.element;t=_?window.innerHeight:o(n)?i?w?P.availWidth+R:P.availWidth:w?P.availWidth:P.availWidth-R:i?w?P.availHeight:P.availHeight+R:w?P.availHeight-R:P.availHeight,n.height(t)},_setupElementClass:function(){var t,i=this,n=i.element;n.parent().addClass("km-root km-"+(i.os.tablet?"tablet":"phone")),n.addClass(i.osCssClass+" "+r(n)),this.options.useNativeScrolling&&n.parent().addClass("km-native-scrolling"),_&&n.addClass("km-ios-chrome"),d.wpDevicePixelRatio&&n.parent().css("font-size",d.wpDevicePixelRatio+"em"),this.options.retina&&(n.parent().addClass("km-retina"),n.parent().css("font-size",d.devicePixelRatio*g+"em")),m&&a(),i.options.useNativeScrolling?n.parent().addClass("km-native-scrolling"):T&&(t=(screen.availWidth>screen.availHeight?screen.availWidth:screen.availHeight)+200,e(S({width:t,height:t})).appendTo(z)),b&&i._resizeToScreenHeight(),l.onResize(function(){n.removeClass("km-horizontal km-vertical").addClass(r(n)),i.options.useNativeScrolling&&s(n),b&&i._resizeToScreenHeight(),m&&a(),l.resize(n)})},_clearExistingMeta:function(){z.find("meta").filter("[name|='apple-mobile-web-app'],[name|='msapplication-tap'],[name='viewport']").remove()},_attachMeta:function(){var e,t=this.options,i=t.icon;if(this._clearExistingMeta(),m||z.prepend(x({height:"",scale:this.options.retina?1/d.devicePixelRatio:"1.0"})),z.prepend(C(t)),i){"string"==typeof i&&(i={"":i});for(e in i)z.prepend(D({icon:i[e],size:e}))}t.useNativeScrolling&&s(this.element)},_attachHideBarHandlers:function(){var e=this,t=L(e,"_hideBar");!d.mobileOS.appMode&&e.options.hideAddressBar&&A&&!e.options.useNativeScrolling&&(e._initialHeight={},F.on("load",t),l.onResize(function(){setTimeout(window.scrollTo,0,0,1)}))},_setupDocumentTitle:function(){var e=this,i=document.title;e.pane.bind("viewShow",function(e){var n=e.view.title;document.title=n!==t?n:i})},_hideBar:function(){var t=this,i=t.element;i.height(l.support.transforms.css+"calc(100% + "+M+"px)"),e(window).trigger(l.support.resize)}});l.mobile.Application=H,l.ui.plugin(H,l.mobile,"Mobile")}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.button.min",["kendo.userevents.min"],e)}(function(){return function(e,t){function i(t,i,n){e(i.target).closest(".km-button,.km-detail").toggleClass("km-state-active",n),d&&t.deactivateTimeoutID&&(clearTimeout(t.deactivateTimeoutID),t.deactivateTimeoutID=0)}function n(t){return e('<span class="km-badge">'+t+"</span>")}var o=window.kendo,r=o.mobile,s=r.ui,a=s.Widget,l=o.support,c=l.mobileOS,d=c.android&&c.flatVersion>=300,u="click",h="disabled",p="km-state-disabled",f=a.extend({init:function(e,t){var n,r=this;a.fn.init.call(r,e,t),n="up"===r.options.clickOn,r._wrap(),r._style(),n||r.element.attr("data-navigate-on-press",!0),r.options.enable=r.options.enable&&!r.element.attr(h),r.enable(r.options.enable),r._userEvents=new o.UserEvents(r.element,{allowSelection:!n,fastTap:!0,press:function(e){r._activate(e)},release:function(e){i(r,e,!1),n||e.event.stopPropagation()}}),r._userEvents.bind(n?"tap":"press",function(e){r._release(e)}),d&&r.element.on("move",function(e){r._timeoutDeactivate(e)})},destroy:function(){a.fn.destroy.call(this),this._userEvents.destroy()},events:[u],options:{name:"Button",icon:"",style:"",badge:"",clickOn:"up",enable:!0},badge:function(e){var t=this.badgeElement=this.badgeElement||n(e).appendTo(this.element);return e||0===e?(t.html(e),this):e===!1?(t.empty().remove(),this.badgeElement=!1,this):t.html()},enable:function(e){var i=this.element;t===e&&(e=!0),this.options.enable=e,e?i.removeAttr(h):i.attr(h,h),i.toggleClass(p,!e)},_timeoutDeactivate:function(e){this.deactivateTimeoutID||(this.deactivateTimeoutID=setTimeout(i,500,this,e,!1))},_activate:function(e){var t=document.activeElement,n=t?t.nodeName:"";this.options.enable&&(i(this,e,!0),"INPUT"!=n&&"TEXTAREA"!=n||t.blur())},_release:function(i){var n=this;if(!(i.which>1))return n.options.enable?(n.trigger(u,{target:e(i.target),button:n.element})&&i.preventDefault(),t):(i.preventDefault(),t)},_style:function(){var t,i=this.options.style,n=this.element;i&&(t=i.split(" "),e.each(t,function(){n.addClass("km-"+this)}))},_wrap:function(){var t=this,i=t.options.icon,o=t.options.badge,r='<span class="km-icon km-'+i,s=t.element.addClass("km-button"),a=s.children("span:not(.km-icon)").addClass("km-text"),l=s.find("img").addClass("km-image");!a[0]&&s.html()&&(a=s.wrapInner('<span class="km-text" />').children("span.km-text")),!l[0]&&i&&(a[0]||(r+=" km-notext"),t.iconElement=s.prepend(e(r+'" />'))),(o||0===o)&&(t.badgeElement=n(o).appendTo(s))}}),m=f.extend({options:{name:"BackButton",style:"back"},init:function(e,i){var n=this;f.fn.init.call(n,e,i),t===n.element.attr("href")&&n.element.attr("href","#:back")}}),g=f.extend({options:{name:"DetailButton",style:""},init:function(e,t){f.fn.init.call(this,e,t)},_style:function(){var t,i=this.options.style+" detail",n=this.element;i&&(t=i.split(" "),e.each(t,function(){n.addClass("km-"+this)}))},_wrap:function(){var t=this,i=t.options.icon,n='<span class="km-icon km-'+i,o=t.element,r=o.children("span"),s=o.find("img").addClass("km-image");!s[0]&&i&&(r[0]||(n+=" km-notext"),o.prepend(e(n+'" />')))}});s.plugin(f),s.plugin(m),s.plugin(g)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.buttongroup.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(e){return"k-"+e+" km-"+e}function n(t){return e('<span class="'+i("badge")+'">'+t+"</span>")}var o=window.kendo,r=o.mobile.ui,s=r.Widget,a="state-active",l="state-disabled",c="select",d="li:not(.km-"+a+")",u=s.extend({init:function(e,t){var n=this;s.fn.init.call(n,e,t),n.element.addClass("km-buttongroup k-widget k-button-group").find("li").each(n._button),n.element.on(n.options.selectOn,d,"_select"),n._enable=!0,n.select(n.options.index),n.options.enable||(n._enable=!1,n.wrapper.addClass(i(l)))},events:[c],options:{name:"ButtonGroup",selectOn:"down",index:-1,enable:!0},current:function(){return this.element.find(".km-"+a)},select:function(n){var o=this,r=-1;n!==t&&n!==-1&&o._enable&&!e(n).is(".km-"+l)&&(o.current().removeClass(i(a)),"number"==typeof n?(r=n,n=e(o.element[0].children[n])):n.nodeType&&(n=e(n),r=n.index()),n.addClass(i(a)),o.selectedIndex=r)},badge:function(t,i){var o,r=this.element;return isNaN(t)||(t=r.children().get(t)),t=r.find(t),o=e(t.children(".km-badge")[0]||n(i).appendTo(t)),i||0===i?(o.html(i),this):i===!1?(o.empty().remove(),this):o.html()},enable:function(e){t===e&&(e=!0),this.wrapper.toggleClass(i(l),!e),this._enable=this.options.enable=e},_button:function(){var t=e(this).addClass(i("button")),r=o.attrValue(t,"icon"),s=o.attrValue(t,"badge"),a=t.children("span"),l=t.find("img").addClass(i("image"));a[0]||(a=t.wrapInner("<span/>").children("span")),a.addClass(i("text")),!l[0]&&r&&t.prepend(e('<span class="'+i("icon")+" "+i(r)+'"/>')),(s||0===s)&&n(s).appendTo(t)},_select:function(e){e.which>1||e.isDefaultPrevented()||!this._enable||(this.select(e.currentTarget),this.trigger(c,{index:this.selectedIndex}))}});r.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.collapsible.min",["kendo.core.min"],e)}(function(){return function(e,t){var i=window.kendo,n=i.mobile.ui,o=n.Widget,r="km-collapsible",s="km-collapsible-header",a="km-collapsible-content",l="km-collapsibleinset",c="<div data-role='collapsible-header' class='"+s+"'></div>",d="<div data-role='collapsible-content' class='"+a+"'></div>",u="km-collapsed",h="km-expanded",p="km-animated",f="left",m="expand",g="collapse",v=o.extend({init:function(t,n){var s=this,a=e(t);o.fn.init.call(s,a,n),a.addClass(r),s._buildHeader(),s.content=a.children().not(s.header).wrapAll(d).parent(),s._userEvents=new i.UserEvents(s.header,{fastTap:!0,tap:function(){s.toggle()}}),a.addClass(s.options.collapsed?u:h),s.options.inset&&a.addClass(l),s.options.animation?(s.content.addClass(p),s.content.height(0),s.options.collapsed&&s.content.hide()):s.options.collapsed&&s.content.hide()},events:[m,g],options:{name:"Collapsible",collapsed:!0,collapseIcon:"arrow-n",expandIcon:"arrow-s",iconPosition:f,animation:!0,inset:!1},destroy:function(){o.fn.destroy.call(this),this._userEvents.destroy()},expand:function(e){var t=this.options.collapseIcon,n=this.content,o=i.support.mobileOS.ios;this.trigger(m)||(t&&this.header.find(".km-icon").removeClass().addClass("km-icon km-"+t),this.element.removeClass(u).addClass(h),this.options.animation&&!e?(n.off("transitionend"),n.show(),o&&n.removeClass(p),n.height(this._getContentHeight()),o&&n.addClass(p),i.resize(n)):n.show())},collapse:function(e){var t=this.options.expandIcon,i=this.content;this.trigger(g)||(t&&this.header.find(".km-icon").removeClass().addClass("km-icon km-"+t),this.element.removeClass(h).addClass(u),this.options.animation&&!e?(i.one("transitionend",function(){i.hide()}),i.height(0)):i.hide())},toggle:function(e){this.isCollapsed()?this.expand(e):this.collapse(e)},isCollapsed:function(){return this.element.hasClass(u)},resize:function(){!this.isCollapsed()&&this.options.animation&&this.content.height(this._getContentHeight())},_buildHeader:function(){var t=this.element.children(":header").wrapAll(c),i=e('<span class="km-icon"/>'),n=this.options.collapsed?this.options.expandIcon:this.options.collapseIcon,o=this.options.iconPosition;n&&(t.prepend(i),i.addClass("km-"+n)),this.header=t.parent(),this.header.addClass("km-icon-"+o)},_getContentHeight:function(){var e,t=this.content.attr("style");return this.content.css({position:"absolute",visibility:"hidden",height:"auto"}),e=this.content.height(),this.content.attr("style",t?t:""),e}});n.plugin(v)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.listview.min",["kendo.data.min","kendo.userevents.min","kendo.mobile.button.min"],e)}(function(){return function(e,t){function i(){return this.nodeType===v.TEXT_NODE&&this.nodeValue.match(U)}function n(e,t){t&&!e[0].querySelector(".km-icon")&&e.prepend('<span class="km-icon km-'+t+'"/>')}function o(e){n(e,D(e,"icon")),n(e,D(e.children(S),"icon"))}function r(e){var t=e.parent(),o=e.add(t.children(g.roleSelector("detailbutton"))),r=t.contents().not(o).not(i);r.length||(e.addClass("km-listview-link").attr(g.attr("role"),"listview-link"),n(e,D(t,"icon")),n(e,D(e,"icon")))}function s(e){if(e[0].querySelector("input[type=checkbox],input[type=radio]")){var t=e.parent();t.contents().not(e).not(function(){return 3==this.nodeType})[0]||(e.addClass("km-listview-label"),e.children("[type=checkbox],[type=radio]").addClass("km-widget km-icon km-check"))}}function a(t,i){e(t).css("transform","translate3d(0px, "+i+"px, 0px)")}var l,c,d,u,h,p,f,m,g=window.kendo,v=window.Node,_=g.mobile,b=_.ui,w=g._outerHeight,y=g.data.DataSource,k=b.DataBoundWidget,x=".km-list > li, > li:not(.km-group-container)",C=".km-listview-link, .km-listview-label",S="["+g.attr("icon")+"]",T=e.proxy,D=g.attrValue,A="km-group-title",E="km-state-active",I='<div class="'+A+'"><div class="km-text"></div></div>',M=g.template('<li><div class="'+A+'"><div class="km-text">#= this.headerTemplate(data) #</div></div><ul>#= kendo.render(this.template, data.items)#</ul></li>'),R='<div class="km-listview-wrapper" />',F=g.template('<form class="km-filter-form"><div class="km-filter-wrap"><input type="search" placeholder="#=placeholder#"/><a href="\\#" class="km-filter-reset" title="Clear"><span class="km-icon km-clear"></span><span class="km-text">Clear</span></a></div></form>'),P=".kendoMobileListView",z="styled",B="dataBound",L="dataBinding",H="itemChange",N="click",O="change",V="progress",W="function",U=/^\s+$/,q=/button/,j=g.Class.extend({init:function(e){var t,i,n=e.scroller();n&&(this.options=e.options,this.element=e.element,this.scroller=e.scroller(),this._shouldFixHeaders(),t=this,i=function(){t._cacheHeaders()},e.bind("resize",i),e.bind(z,i),e.bind(B,i),this._scrollHandler=function(e){t._fixHeader(e)},n.bind("scroll",this._scrollHandler))},destroy:function(){var e=this;e.scroller&&e.scroller.unbind("scroll",e._scrollHandler)},_fixHeader:function(t){if(this.fixedHeaders){var i,n,o,r=0,s=this.scroller,a=this.headers,l=t.scrollTop;do{if(i=a[r++],!i){o=e("<div />");break}n=i.offset,o=i.header}while(n+1>l);this.currentHeader!=r&&(s.fixedContainer.html(o.clone()),this.currentHeader=r)}},_shouldFixHeaders:function(){this.fixedHeaders="group"===this.options.type&&this.options.fixedHeaders},_cacheHeaders:function(){if(this._shouldFixHeaders(),this.fixedHeaders){var t=[],i=this.scroller.scrollTop;this.element.find("."+A).each(function(n,o){o=e(o),t.unshift({offset:o.position().top+i,header:o})}),this.headers=t,this._fixHeader({scrollTop:i})}}}),G=function(){return{page:1}},$=g.Class.extend({init:function(e){var t=this,i=e.options,n=e.scroller(),o=i.pullParameters||G;this.listView=e,this.scroller=n,e.bind("_dataSource",function(e){t.setDataSource(e.dataSource)}),n.setOptions({pullToRefresh:!0,pull:function(){t._pulled||(t._pulled=!0,t.dataSource.read(o.call(e,t._first)))},messages:{pullTemplate:i.messages.pullTemplate,releaseTemplate:i.messages.releaseTemplate,refreshTemplate:i.messages.refreshTemplate}})},setDataSource:function(e){var t=this;this._first=e.view()[0],this.dataSource=e,e.bind("change",function(){t._change()}),e.bind("error",function(){t._change()})},_change:function(){var e,t=this.scroller,i=this.dataSource;this._pulled&&t.pullHandled(),!this._pulled&&this._first||(e=i.view(),e[0]&&(this._first=e[0])),this._pulled=!1}}),K=g.Observable.extend({init:function(e){var t=this;g.Observable.fn.init.call(t),t.buffer=e.buffer,t.height=e.height,t.item=e.item,t.items=[],t.footer=e.footer,t.buffer.bind("reset",function(){t.refresh()})},refresh:function(){for(var e,t,i,n,o=this.buffer,r=this.items,s=!1;r.length;)r.pop().destroy();for(this.offset=o.offset,e=this.item,n=0;n<o.viewSize;n++){if(n===o.total()){s=!0;break}i=e(this.content(this.offset+r.length)),i.below(t),t=i,r.push(i)}this.itemCount=r.length,this.trigger("reset"),this._resize(),s&&this.trigger("endReached")},totalHeight:function(){if(!this.items[0])return 0;var e=this,t=e.items,i=t[0].top,n=t[t.length-1].bottom,o=(n-i)/e.itemCount,r=e.buffer.length-e.offset-e.itemCount;return(this.footer?this.footer.height:0)+n+r*o},batchUpdate:function(e){var t,i,n=this.height(),o=this.items,r=this.offset;if(o[0]){if(this.lastDirection)for(;o[o.length-1].bottom>e+2*n&&0!==this.offset;)this.offset--,t=o.pop(),t.update(this.content(this.offset)),t.above(o[0]),o.unshift(t);else for(;o[0].top<e-n;){if(i=this.offset+this.itemCount,i===this.buffer.total()){this.trigger("endReached");break}if(i===this.buffer.length)break;t=o.shift(),t.update(this.content(this.offset+this.itemCount)),t.below(o[o.length-1]),o.push(t),this.offset++}r!==this.offset&&this._resize()}},update:function(e){var t,i,n,o,r=this,s=this.items,a=this.height(),l=this.itemCount,c=a/2,d=(this.lastTop||0)>e,u=e-c,h=e+a+c;s[0]&&(this.lastTop=e,this.lastDirection=d,d?s[0].top>u&&s[s.length-1].bottom>h+c&&this.offset>0&&(this.offset--,t=s.pop(),i=s[0],t.update(this.content(this.offset)),s.unshift(t),t.above(i),r._resize()):s[s.length-1].bottom<h&&s[0].top<u-c&&(o=this.offset+l,o===this.buffer.total()?this.trigger("endReached"):o!==this.buffer.length&&(t=s.shift(),n=s[s.length-1],s.push(t),t.update(this.content(this.offset+this.itemCount)),r.offset++,t.below(n),r._resize())))},content:function(e){return this.buffer.at(e)},destroy:function(){this.unbind()},_resize:function(){var e=this.items,t=0,i=0,n=e[0],o=e[e.length-1];n&&(t=n.top,i=o.bottom),this.trigger("resize",{top:t,bottom:i}),this.footer&&this.footer.below(o)}});g.mobile.ui.VirtualList=K,l=g.Class.extend({init:function(t,i){var n=t.append([i],!0)[0],o=n.offsetHeight;e.extend(this,{top:0,element:n,listView:t,height:o,bottom:o})},update:function(e){this.element=this.listView.setDataItem(this.element,e)},above:function(e){e&&(this.height=this.element.offsetHeight,this.top=e.top-this.height,this.bottom=e.top,a(this.element,this.top))},below:function(e){e&&(this.height=this.element.offsetHeight,this.top=e.bottom,this.bottom=this.top+this.height,a(this.element,this.top))},destroy:function(){g.destroy(this.element),e(this.element).remove()}}),c='<div><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>',d=g.Class.extend({init:function(t){this.element=e('<li class="km-load-more km-scroller-refresh" style="display: none"></li>').appendTo(t.element),this._loadIcon=e(c).appendTo(this.element)},enable:function(){this.element.show(),this.height=w(this.element,!0)},disable:function(){this.element.hide(),this.height=0},below:function(e){e&&(this.top=e.bottom,this.bottom=this.height+this.top,a(this.element,this.top))}}),u=d.extend({init:function(t,i){this._loadIcon=e(c).hide(),this._loadButton=e('<a class="km-load">'+t.options.messages.loadMoreText+"</a>").hide(),this.element=e('<li class="km-load-more" style="display: none"></li>').append(this._loadIcon).append(this._loadButton).appendTo(t.element);var n=this;this._loadButton.kendoMobileButton().data("kendoMobileButton").bind("click",function(){n._hideShowButton(),i.next()}),i.bind("resize",function(){n._showLoadButton()}),this.height=w(this.element,!0),this.disable()},_hideShowButton:function(){this._loadButton.hide(),this.element.addClass("km-scroller-refresh"),this._loadIcon.css("display","block")},_showLoadButton:function(){this._loadButton.show(),this.element.removeClass("km-scroller-refresh"),this._loadIcon.hide()}}),h=g.Class.extend({init:function(e){var t=this;this.chromeHeight=w(e.wrapper.children().not(e.element)),this.listView=e,this.scroller=e.scroller(),this.options=e.options,e.bind("_dataSource",function(e){t.setDataSource(e.dataSource,e.empty)}),e.bind("resize",function(){t.list.items.length&&(t.scroller.reset(),t.buffer.range(0),t.list.refresh())}),this.scroller.makeVirtual(),this._scroll=function(e){t.list.update(e.scrollTop)},this.scroller.bind("scroll",this._scroll),this._scrollEnd=function(e){t.list.batchUpdate(e.scrollTop)},this.scroller.bind("scrollEnd",this._scrollEnd)},destroy:function(){this.list.unbind(),this.buffer.unbind(),this.scroller.unbind("scroll",this._scroll),this.scroller.unbind("scrollEnd",this._scrollEnd)},setDataSource:function(t,i){var n,o,r,s,a=this,c=this.options,h=this.listView,p=h.scroller(),f=c.loadMore;if(this.dataSource=t,n=t.pageSize()||c.virtualViewSize,!n&&!i)throw Error("the DataSource does not have page size configured. Page Size setting is mandatory for the mobile listview virtual scrolling to work as expected.");this.buffer&&this.buffer.destroy(),o=new g.data.Buffer(t,Math.floor(n/2),f),r=f?new u(h,o):new d(h),this.list&&this.list.destroy(),s=new K({buffer:o,footer:r,item:function(e){return new l(h,e)},height:function(){return p.height()}}),s.bind("resize",function(){a.updateScrollerSize(),h.updateSize()}),s.bind("reset",function(){a.footer.enable()}),s.bind("endReached",function(){r.disable(),a.updateScrollerSize()}),o.bind("expand",function(){s.lastDirection=!1,s.batchUpdate(p.scrollTop)}),e.extend(this,{buffer:o,scroller:p,list:s,footer:r})},updateScrollerSize:function(){this.scroller.virtualSize(0,this.list.totalHeight()+this.chromeHeight)},refresh:function(){this.list.refresh()},reset:function(){this.buffer.range(0),this.list.refresh()}}),p=g.Class.extend({init:function(e){var t,i=this;this.listView=e,this.options=e.options,t=this,this._refreshHandler=function(e){t.refresh(e)},this._progressHandler=function(){e.showLoading()},e.bind("_dataSource",function(e){i.setDataSource(e.dataSource)})},destroy:function(){this._unbindDataSource()},reset:function(){},refresh:function(e){var i,n,o,r,s,a,l,c=e&&e.action,d=e&&e.items,u=this.listView,h=this.dataSource,p=this.options.appendOnRefresh,f=h.view(),m=h.group(),g=m&&m[0];return"itemchange"===c?(u._hasBindingTarget()||(i=u.findByDataItem(d)[0],i&&u.setDataItem(i,d[0])),t):(s="add"===c&&!g||p&&!u._filter,a="remove"===c&&!g,s?n=[]:a&&(n=u.findByDataItem(d)),u.trigger(L,{action:c||"rebind",items:d,removedItems:n,index:e&&e.index})?(this._shouldShowLoading()&&u.hideLoading(),t):("add"!==c||g?"remove"!==c||g?g?u.replaceGrouped(f):p&&!u._filter?(o=u.prepend(f),r=f):u.replace(f):(o=[],u.remove(d)):(l=f.indexOf(d[0]),l>-1&&(o=u.insertAt(d,l),r=d)),this._shouldShowLoading()&&u.hideLoading(),u.trigger(B,{ns:b,addedItems:o,addedDataItems:r}),t))},setDataSource:function(e){this.dataSource&&this._unbindDataSource(),this.dataSource=e,e.bind(O,this._refreshHandler),this._shouldShowLoading()&&this.dataSource.bind(V,this._progressHandler)},_unbindDataSource:function(){this.dataSource.unbind(O,this._refreshHandler).unbind(V,this._progressHandler)},_shouldShowLoading:function(){var e=this.options;return!e.pullToRefresh&&!e.loadMore&&!e.endlessScroll}}),f=g.Class.extend({init:function(t){var i=this,n=t.options.filterable,o="change paste",r=this;this.listView=t,this.options=n,t.element.before(F({placeholder:n.placeholder||"Search..."})),n.autoFilter!==!1&&(o+=" keyup"),this.element=t.wrapper.find(".km-search-form"),this.searchInput=t.wrapper.find("input[type=search]").closest("form").on("submit"+P,function(e){e.preventDefault()}).end().on("focus"+P,function(){i._oldFilter=i.searchInput.val()}).on(o.split(" ").join(P+" ")+P,T(this._filterChange,this)),this.clearButton=t.wrapper.find(".km-filter-reset").on(N,T(this,"_clearFilter")).hide(),this._dataSourceChange=e.proxy(this._refreshInput,this),t.bind("_dataSource",function(e){e.dataSource.bind("change",r._dataSourceChange)})},_refreshInput:function(){var e=this.listView.dataSource.filter(),t=this.listView._filter.searchInput;t.val(e&&e.filters[0].field===this.listView.options.filterable.field?e.filters[0].value:"");
},_search:function(e){this._filter=!0,this.clearButton[e?"show":"hide"](),this.listView.dataSource.filter(e)},_filterChange:function(e){var t=this;"paste"==e.type&&this.options.autoFilter!==!1?setTimeout(function(){t._applyFilter()},1):this._applyFilter()},_applyFilter:function(){var e=this.options,t=this.searchInput.val(),i=t.length?{field:e.field,operator:e.operator||"startswith",ignoreCase:e.ignoreCase,value:t}:null;t!==this._oldFilter&&(this._oldFilter=t,this._search(i))},_clearFilter:function(e){this.searchInput.val(""),this._search(null),e.preventDefault()}}),m=k.extend({init:function(t,i){var n=this;k.fn.init.call(this,t,i),t=this.element,i=this.options,i.scrollTreshold&&(i.scrollThreshold=i.scrollTreshold),t.on("down",C,"_highlight").on("move up cancel",C,"_dim"),this._userEvents=new g.UserEvents(t,{fastTap:!0,filter:x,allowSelection:!0,tap:function(e){n._click(e)}}),t.css("-ms-touch-action","auto"),t.wrap(R),this.wrapper=this.element.parent(),this._headerFixer=new j(this),this._itemsCache={},this._templates(),this.virtual=i.endlessScroll||i.loadMore,this._style(),this.options.$angular&&(this.virtual||this.options.pullToRefresh)?setTimeout(e.proxy(this,"_start")):this._start()},_start:function(){var e=this.options;this.options.filterable&&(this._filter=new f(this)),this._itemBinder=this.virtual?new h(this):new p(this),this.options.pullToRefresh&&(this._pullToRefreshHandler=new $(this)),this.setDataSource(e.dataSource),this._enhanceItems(this.items()),g.notify(this,b)},events:[N,L,B,H],options:{name:"ListView",style:"",type:"flat",autoBind:!0,fixedHeaders:!1,template:"#:data#",headerTemplate:'<span class="km-text">#:value#</span>',appendOnRefresh:!1,loadMore:!1,endlessScroll:!1,scrollThreshold:30,pullToRefresh:!1,messages:{loadMoreText:"Press to load more",pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},pullOffset:140,filterable:!1,virtualViewSize:null},refresh:function(){this._itemBinder.refresh()},reset:function(){this._itemBinder.reset()},setDataSource:function(e){var t=!e;this.dataSource=y.create(e),this.trigger("_dataSource",{dataSource:this.dataSource,empty:t}),this.options.autoBind&&!t&&(this.items().remove(),this.dataSource.fetch())},destroy:function(){k.fn.destroy.call(this),g.destroy(this.element),this._userEvents.destroy(),this._itemBinder&&this._itemBinder.destroy(),this._headerFixer&&this._headerFixer.destroy(),this.element.unwrap(),delete this.element,delete this.wrapper,delete this._userEvents},items:function(){return"group"===this.options.type?this.element.find(".km-list").children():this.element.children().not(".km-load-more")},scroller:function(){return this._scrollerInstance||(this._scrollerInstance=this.element.closest(".km-scroll-wrapper").data("kendoMobileScroller")),this._scrollerInstance},showLoading:function(){var e=this.view();e&&e.loader&&e.loader.show()},hideLoading:function(){var e=this.view();e&&e.loader&&e.loader.hide()},insertAt:function(e,t,i){var n=this;return n._renderItems(e,function(o){if(0===t?n.element.prepend(o):t===-1?n.element.append(o):n.items().eq(t-1).after(o),i)for(var r=0;r<o.length;r++)n.trigger(H,{item:o.eq(r),data:e[r],ns:b})})},append:function(e,t){return this.insertAt(e,-1,t)},prepend:function(e,t){return this.insertAt(e,0,t)},replace:function(e){return this.options.type="flat",this._angularItems("cleanup"),g.destroy(this.element.children()),this.element.empty(),this._userEvents.cancel(),this._style(),this.insertAt(e,0)},replaceGrouped:function(t){this.options.type="group",this._angularItems("cleanup"),this.element.empty();var i=e(g.render(this.groupTemplate,t));this._enhanceItems(i.children("ul").children("li")),this.element.append(i),_.init(i),this._style(),this._angularItems("compile")},remove:function(e){var t=this.findByDataItem(e);this.angular("cleanup",function(){return{elements:t}}),g.destroy(t),t.remove()},findByDataItem:function(e){var t,i,n=[];for(t=0,i=e.length;t<i;t++)n[t]="[data-"+g.ns+"uid="+e[t].uid+"]";return this.element.find(n.join(","))},setDataItem:function(t,i){var n=this,o=function(o){var r=e(o[0]);g.destroy(t),n.angular("cleanup",function(){return{elements:[e(t)]}}),e(t).replaceWith(r),n.trigger(H,{item:r,data:i,ns:b})};return this._renderItems([i],o)[0]},updateSize:function(){this._size=this.getSize()},_renderItems:function(t,i){var n=e(g.render(this.template,t));return i(n),this.angular("compile",function(){return{elements:n,data:t.map(function(e){return{dataItem:e}})}}),_.init(n),this._enhanceItems(n),n},_dim:function(e){this._toggle(e,!1)},_highlight:function(e){this._toggle(e,!0)},_toggle:function(t,i){if(!(t.which>1)){var n=e(t.currentTarget),o=n.parent(),r=D(n,"role")||"",s=!r.match(q),a=t.isDefaultPrevented();s&&o.toggleClass(E,i&&!a)}},_templates:function(){var e=this.options.template,t=this.options.headerTemplate,i=' data-uid="#=arguments[0].uid || ""#"',n={},o={};typeof e===W&&(n.template=e,e="#=this.template(data)#"),this.template=T(g.template("<li"+i+">"+e+"</li>"),n),o.template=this.template,typeof t===W&&(o._headerTemplate=t,t="#=this._headerTemplate(data)#"),o.headerTemplate=g.template(t),this.groupTemplate=T(M,o)},_click:function(t){if(!(t.event.which>1||t.event.isDefaultPrevented())){var i,n=t.target,o=e(t.event.target),r=o.closest(g.roleSelector("button","detailbutton","backbutton")),s=g.widgetInstance(r,b),a=n.attr(g.attr("uid"));a&&(i=this.dataSource.getByUid(a)),this.trigger(N,{target:o,item:n,dataItem:i,button:s})&&t.preventDefault()}},_styleGroups:function(){var t=this.element.children();t.children("ul").addClass("km-list"),t.each(function(){var t=e(this),i=t.contents().first();t.addClass("km-group-container"),i.is("ul")||i.is("div."+A)||i.wrap(I)})},_style:function(){var e=this.options,t="group"===e.type,i=this.element,n="inset"===e.style;i.addClass("km-listview").toggleClass("km-list",!t).toggleClass("km-virtual-list",this.virtual).toggleClass("km-listinset",!t&&n).toggleClass("km-listgroup",t&&!n).toggleClass("km-listgroupinset",t&&n),i.parents(".km-listview")[0]||i.closest(".km-content").toggleClass("km-insetcontent",n),t&&this._styleGroups(),this.trigger(z)},_enhanceItems:function(t){t.each(function(){var t,i=e(this),n=!1;i.children().each(function(){t=e(this),t.is("a")?(r(t),n=!0):t.is("label")&&(s(t),n=!0)}),n||o(i)})}}),b.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.navbar.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(t,i){var n=i.find("["+o.attr("align")+"="+t+"]");if(n[0])return e('<div class="km-'+t+'item" />').append(n).prependTo(i)}function n(t){var i=t.siblings(),n=!!t.children("ul")[0],r=!!i[0]&&""===e.trim(t.text()),s=!(!o.mobile.application||!o.mobile.application.element.is(".km-android"));t.prevAll().toggleClass("km-absolute",n),t.toggleClass("km-show-title",r),t.toggleClass("km-fill-title",r&&!e.trim(t.html())),t.toggleClass("km-no-title",n),t.toggleClass("km-hide-title",s&&!i.children().is(":visible"))}var o=window.kendo,r=o.mobile,s=r.ui,a=s.Widget,l=a.extend({init:function(t,n){var o=this;a.fn.init.call(o,t,n),t=o.element,o.container().bind("show",e.proxy(this,"refresh")),t.addClass("km-navbar").wrapInner(e('<div class="km-view-title km-show-title" />')),o.leftElement=i("left",t),o.rightElement=i("right",t),o.centerElement=t.find(".km-view-title")},options:{name:"NavBar"},title:function(e){this.element.find(o.roleSelector("view-title")).text(e),n(this.centerElement)},refresh:function(e){var t=e.view;this.title(t.options.title)},destroy:function(){a.fn.destroy.call(this),o.destroy(this.element)}});s.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.scrollview.min",["kendo.fx.min","kendo.data.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function i(e){return"k-"+e+" km-"+e}var n,o,r,s,a,l,c,d,u=window.kendo,h=u.mobile,p=h.ui,f=e.proxy,m=u.effects.Transition,g=u.ui.Pane,v=u.ui.PaneDimensions,_=p.DataBoundWidget,b=u.data.DataSource,w=u.data.Buffer,y=u.data.BatchBuffer,k=Math,x=k.abs,C=k.ceil,S=k.round,T=k.max,D=k.min,A=k.floor,E="change",I="changing",M="refresh",R="current-page",F="virtual-page",P="function",z="itemChange",B="cleanup",L=3,H=-1,N=0,O=1,V=-1,W=0,U=1,q=u.Class.extend({init:function(t){var n=this,o=e("<ol class='"+i("pages")+"'/>");t.element.append(o),this._changeProxy=f(n,"_change"),this._refreshProxy=f(n,"_refresh"),t.bind(E,this._changeProxy),t.bind(M,this._refreshProxy),e.extend(n,{element:o,scrollView:t})},items:function(){return this.element.children()},_refresh:function(e){var t,n="";for(t=0;t<e.pageCount;t++)n+="<li/>";this.element.html(n),this.items().eq(e.page).addClass(i(R))},_change:function(e){this.items().removeClass(i(R)).eq(e.page).addClass(i(R))},destroy:function(){this.scrollView.unbind(E,this._changeProxy),this.scrollView.unbind(M,this._refreshProxy),this.element.remove()}});u.mobile.ui.ScrollViewPager=q,n="transitionEnd",o="dragStart",r="dragEnd",s=u.Observable.extend({init:function(t,i){var s,a,l,c,d,h,p=this;u.Observable.fn.init.call(this),this.element=t,this.container=t.parent(),s=new u.ui.Movable(p.element),a=new m({axis:"x",movable:s,onEnd:function(){p.trigger(n)}}),l=new u.UserEvents(t,{fastTap:!0,start:function(e){2*x(e.x.velocity)>=x(e.y.velocity)?l.capture():l.cancel(),p.trigger(o,e),a.cancel()},allowSelection:!0,end:function(e){p.trigger(r,e)}}),c=new v({element:p.element,container:p.container}),d=c.x,d.bind(E,function(){p.trigger(E)}),h=new g({dimensions:c,userEvents:l,movable:s,elastic:!0}),e.extend(p,{duration:i&&i.duration||1,movable:s,transition:a,userEvents:l,dimensions:c,dimension:d,pane:h}),this.bind([n,o,r,E],i)},size:function(){return{width:this.dimensions.x.getSize(),height:this.dimensions.y.getSize()}},total:function(){return this.dimension.getTotal()},offset:function(){return-this.movable.x},updateDimension:function(){this.dimension.update(!0)},refresh:function(){this.dimensions.refresh()},moveTo:function(e){this.movable.moveAxis("x",-e)},transitionTo:function(e,t,i){i?this.moveTo(-e):this.transition.moveTo({location:e,duration:this.duration,ease:t})}}),u.mobile.ui.ScrollViewElasticPane=s,a=u.Observable.extend({init:function(e,t,i){var n=this;u.Observable.fn.init.call(this),n.element=e,n.pane=t,n._getPages(),this.page=0,this.pageSize=i.pageSize||1,this.contentHeight=i.contentHeight,this.enablePager=i.enablePager,this.pagerOverlay=i.pagerOverlay},scrollTo:function(e,t){this.page=e,this.pane.transitionTo(-e*this.pane.size().width,m.easeOutExpo,t)},paneMoved:function(e,t,i,n){var o,r,s=this,a=s.pane,l=a.size().width*s.pageSize,c=S,d=t?m.easeOutBack:m.easeOutExpo;e===V?c=C:e===U&&(c=A),r=c(a.offset()/l),o=T(s.minSnap,D(-r*l,s.maxSnap)),r!=s.page&&i&&i({currentPage:s.page,nextPage:r})&&(o=-s.page*a.size().width),a.transitionTo(o,d,n)},updatePage:function(){var e=this.pane,t=S(e.offset()/e.size().width);return t!=this.page&&(this.page=t,!0)},forcePageUpdate:function(){return this.updatePage()},resizeTo:function(e){var t,i,n=this.pane,o=e.width;this.pageElements.width(o),"100%"===this.contentHeight&&(t=this.element.parent().height(),this.enablePager===!0&&(i=this.element.parent().find("ol.km-pages"),!this.pagerOverlay&&i.length&&(t-=u._outerHeight(i,!0))),this.element.css("height",t),this.pageElements.css("height",t)),n.updateDimension(),this._paged||(this.page=A(n.offset()/o)),this.scrollTo(this.page,!0),this.pageCount=C(n.total()/o),this.minSnap=-(this.pageCount-1)*o,this.maxSnap=0},_getPages:function(){this.pageElements=this.element.find(u.roleSelector("page")),this._paged=this.pageElements.length>0}}),u.mobile.ui.ScrollViewContent=a,l=u.Observable.extend({init:function(e,t,i){var n=this;u.Observable.fn.init.call(this),n.element=e,n.pane=t,n.options=i,n._templates(),n.page=i.page||0,n.pages=[],n._initPages(),n.resizeTo(n.pane.size()),n.pane.dimension.forceEnabled()},setDataSource:function(e){this.dataSource=b.create(e),this._buffer(),this._pendingPageRefresh=!1,this._pendingWidgetRefresh=!1},_viewShow:function(){var e=this;e._pendingWidgetRefresh&&(setTimeout(function(){e._resetPages()},0),e._pendingWidgetRefresh=!1)},_buffer:function(){var e=this.options.itemsPerPage;this.buffer&&this.buffer.destroy(),this.buffer=e>1?new y(this.dataSource,e):new w(this.dataSource,3*e),this._resizeProxy=f(this,"_onResize"),this._resetProxy=f(this,"_onReset"),this._endReachedProxy=f(this,"_onEndReached"),this.buffer.bind({resize:this._resizeProxy,reset:this._resetProxy,endreached:this._endReachedProxy})},_templates:function(){var e=this.options.template,t=this.options.emptyTemplate,i={},n={};typeof e===P&&(i.template=e,e="#=this.template(data)#"),this.template=f(u.template(e),i),typeof t===P&&(n.emptyTemplate=t,t="#=this.emptyTemplate(data)#"),this.emptyTemplate=f(u.template(t),n)},_initPages:function(){var e,t,i=this.pages,n=this.element;for(t=0;t<L;t++)e=new c(n),i.push(e);this.pane.updateDimension()},resizeTo:function(e){var t,i,n,o=this.pages,r=this.pane;for(t=0;t<o.length;t++)o[t].setWidth(e.width);"auto"===this.options.contentHeight?this.element.css("height",this.pages[1].element.height()):"100%"===this.options.contentHeight&&(i=this.element.parent().height(),this.options.enablePager===!0&&(n=this.element.parent().find("ol.km-pages"),!this.options.pagerOverlay&&n.length&&(i-=u._outerHeight(n,!0))),this.element.css("height",i),o[0].element.css("height",i),o[1].element.css("height",i),o[2].element.css("height",i)),r.updateDimension(),this._repositionPages(),this.width=e.width},scrollTo:function(e){var t,i=this.buffer;i.syncDataSource(),t=i.at(e),t&&(this._updatePagesContent(e),this.page=e)},paneMoved:function(e,t,i,n){var o,r=this,s=r.pane,a=s.size().width,l=s.offset(),c=Math.abs(l)>=a/3,d=t?u.effects.Transition.easeOutBack:u.effects.Transition.easeOutExpo,h=r.page+2>r.buffer.total(),p=0;e===U?0!==r.page&&(p=-1):e!==V||h?l>0&&c&&!h?p=1:l<0&&c&&0!==r.page&&(p=-1):p=1,o=r.page,p&&(o=p>0?o+1:o-1),i&&i({currentPage:r.page,nextPage:o})&&(p=0),0===p?r._cancelMove(d,n):p===-1?r._moveBackward(n):1===p&&r._moveForward(n)},updatePage:function(){var e=this.pages;return 0!==this.pane.offset()&&(this.pane.offset()>0?(e.push(this.pages.shift()),this.page++,this.setPageContent(e[2],this.page+1)):(e.unshift(this.pages.pop()),this.page--,this.setPageContent(e[0],this.page-1)),this._repositionPages(),this._resetMovable(),!0)},forcePageUpdate:function(){var e=this.pane.offset(),t=3*this.pane.size().width/4;return x(e)>t&&this.updatePage()},_resetMovable:function(){this.pane.moveTo(0)},_moveForward:function(e){this.pane.transitionTo(-this.width,u.effects.Transition.easeOutExpo,e)},_moveBackward:function(e){this.pane.transitionTo(this.width,u.effects.Transition.easeOutExpo,e)},_cancelMove:function(e,t){this.pane.transitionTo(0,e,t)},_resetPages:function(){this.page=this.options.page||0,this._updatePagesContent(this.page),this._repositionPages(),this.trigger("reset")},_onResize:function(){this.pageCount=C(this.dataSource.total()/this.options.itemsPerPage),this._pendingPageRefresh&&(this._updatePagesContent(this.page),this._pendingPageRefresh=!1),this.trigger("resize")},_onReset:function(){this.pageCount=C(this.dataSource.total()/this.options.itemsPerPage),this._resetPages()},_onEndReached:function(){this._pendingPageRefresh=!0},_repositionPages:function(){var e=this.pages;e[0].position(H),e[1].position(N),e[2].position(O)},_updatePagesContent:function(e){var t=this.pages,i=e||0;this.setPageContent(t[0],i-1),this.setPageContent(t[1],i),this.setPageContent(t[2],i+1)},setPageContent:function(t,i){var n=this.buffer,o=this.template,r=this.emptyTemplate,s=null;i>=0&&(s=n.at(i),e.isArray(s)&&!s.length&&(s=null)),this.trigger(B,{item:t.element}),t.content(null!==s?o(s):r({})),u.mobile.init(t.element),this.trigger(z,{item:t.element,data:s,ns:u.mobile.ui})}}),u.mobile.ui.VirtualScrollViewContent=l,c=u.Class.extend({init:function(t){this.element=e("<div class='"+i(F)+"'></div>"),this.width=t.width(),this.element.width(this.width),t.append(this.element)},content:function(e){this.element.html(e)},position:function(e){this.element.css("transform","translate3d("+this.width*e+"px, 0, 0)")},setWidth:function(e){this.width=e,this.element.width(e)}}),u.mobile.ui.VirtualPage=c,d=_.extend({init:function(e,t){var n,o,r,c=this;_.fn.init.call(c,e,t),t=c.options,e=c.element,u.stripWhitespace(e[0]),e.wrapInner("<div/>").addClass("k-widget "+i("scrollview")),this.options.enablePager&&(this.pager=new q(this),this.options.pagerOverlay&&e.addClass(i("scrollview-overlay"))),c.inner=e.children().first(),c.page=0,c.inner.css("height",t.contentHeight),c.pane=new s(c.inner,{duration:this.options.duration,transitionEnd:f(this,"_transitionEnd"),dragStart:f(this,"_dragStart"),dragEnd:f(this,"_dragEnd"),change:f(this,M)}),c.bind("resize",function(){c.pane.refresh()}),c.page=t.page,n=0===this.inner.children().length,o=n?new l(c.inner,c.pane,t):new a(c.inner,c.pane,t),o.page=c.page,o.bind("reset",function(){this._pendingPageRefresh=!1,c._syncWithContent(),c.trigger(M,{pageCount:o.pageCount,page:o.page})}),o.bind("resize",function(){c.trigger(M,{pageCount:o.pageCount,page:o.page})}),o.bind(z,function(e){c.trigger(z,e),c.angular("compile",function(){return{elements:e.item,data:[{dataItem:e.data}]}})}),o.bind(B,function(e){c.angular("cleanup",function(){return{elements:e.item}})}),c._content=o,c.setDataSource(t.dataSource),r=c.container(),r.nullObject?(c.viewInit(),c.viewShow()):r.bind("show",f(this,"viewShow")).bind("init",f(this,"viewInit"))},options:{name:"ScrollView",page:0,duration:400,velocityThreshold:.8,contentHeight:"auto",pageSize:1,itemsPerPage:1,bounceVelocityThreshold:1.6,enablePager:!0,pagerOverlay:!1,autoBind:!0,template:"",emptyTemplate:""},events:[I,E,M],destroy:function(){_.fn.destroy.call(this),u.destroy(this.element)},viewInit:function(){this.options.autoBind&&this._content.scrollTo(this._content.page,!0)},viewShow:function(){this.pane.refresh()},refresh:function(){var e=this._content;e.resizeTo(this.pane.size()),this.page=e.page,this.trigger(M,{pageCount:e.pageCount,page:e.page})},content:function(e){this.element.children().first().html(e),this._content._getPages(),this.pane.refresh()},value:function(e){var i=this.dataSource;return e?(this.scrollTo(i.indexOf(e),!0),t):i.at(this.page)},scrollTo:function(e,t){this._content.scrollTo(e,t),this._syncWithContent()},prev:function(){var e=this,i=e.page-1;e._content instanceof l?e._content.paneMoved(U,t,function(t){return e.trigger(I,t)}):i>-1&&e.scrollTo(i)},next:function(){var e=this,i=e.page+1;e._content instanceof l?e._content.paneMoved(V,t,function(t){return e.trigger(I,t)}):i<e._content.pageCount&&e.scrollTo(i)},setDataSource:function(e){if(this._content instanceof l){var t=!e;this.dataSource=b.create(e),this._content.setDataSource(this.dataSource),this.options.autoBind&&!t&&this.dataSource.fetch()}},items:function(){return this.element.find(".km-"+F)},_syncWithContent:function(){var e,i,n=this._content.pages,o=this._content.buffer;this.page=this._content.page,e=o?o.at(this.page):t,e instanceof Array||(e=[e]),i=n?n[1].element:t,this.trigger(E,{page:this.page,element:i,data:e})},_dragStart:function(){this._content.forcePageUpdate()&&this._syncWithContent()},_dragEnd:function(e){var t=this,i=e.x.velocity,n=this.options.velocityThreshold,o=W,r=x(i)>this.options.bounceVelocityThreshold;i>n?o=U:i<-n&&(o=V),this._content.paneMoved(o,r,function(e){return t.trigger(I,e)})},_transitionEnd:function(){this._content.updatePage()&&this._syncWithContent()}}),p.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.switch.min",["kendo.fx.min","kendo.userevents.min"],e)}(function(){return function(e,t){function i(e){return"k-"+e+" km-"+e}function n(e,t,i){return Math.max(t,Math.min(i,e))}var o=window.kendo,r=o.mobile.ui,s=o._outerWidth,a=r.Widget,l=o.support,c="change",d="switch-on",u="switch-off",h="margin-left",p="state-active",f="state-disabled",m="disabled",g=l.transitions.css===t?"":l.transitions.css,v=g+"transform",_=e.proxy,b='<span class="'+i("switch")+" "+i("widget")+'">        <span class="'+i("switch-wrapper")+'">            <span class="'+i("switch-background")+'"></span>        </span>         <span class="'+i("switch-container")+'">            <span class="'+i("switch-handle")+'">                 <span class="'+i("switch-label-on")+'">{0}</span>                 <span class="'+i("switch-label-off")+'">{1}</span>             </span>         </span>    </span>',w=a.extend({init:function(t,i){var n,r=this;a.fn.init.call(r,t,i),i=r.options,r.wrapper=e(o.format(b,i.onLabel,i.offLabel)),r.handle=r.wrapper.find(".km-switch-handle"),r.background=r.wrapper.find(".km-switch-background"),r.wrapper.insertBefore(r.element).prepend(r.element),r._drag(),r.origin=parseInt(r.background.css(h),10),r.constrain=0,r.snapPoint=0,t=r.element[0],t.type="checkbox",r._animateBackground=!0,n=r.options.checked,null===n&&(n=t.checked),r.check(n),r.options.enable=r.options.enable&&!r.element.attr(m),r.enable(r.options.enable),r.refresh(),o.notify(r,o.mobile.ui)},refresh:function(){var e=this,t=s(e.handle,!0);e.width=e.wrapper.width(),e.constrain=e.width-t,e.snapPoint=e.constrain/2,"number"!=typeof e.origin&&(e.origin=parseInt(e.background.css(h),10)),e.background.data("origin",e.origin),e.check(e.element[0].checked)},events:[c],options:{name:"Switch",onLabel:"on",offLabel:"off",checked:null,enable:!0},check:function(e){var n=this,o=n.element[0];return e===t?o.checked:(n._position(e?n.constrain:0),o.checked=e,n.wrapper.toggleClass(i(d),e).toggleClass(i(u),!e),t)},value:function(){return this.check.apply(this,arguments)},destroy:function(){a.fn.destroy.call(this),this.userEvents.destroy()},toggle:function(){var e=this;e.check(!e.element[0].checked)},enable:function(e){var n=this.element,o=this.wrapper;t===e&&(e=!0),this.options.enable=e,e?n.removeAttr(m):n.attr(m,m),o.toggleClass(i(f),!e)},_resize:function(){this.refresh()},_move:function(e){var t=this;e.preventDefault(),t._position(n(t.position+e.x.delta,0,t.width-s(t.handle,!0)))},_position:function(e){var t=this;t.position=e,t.handle.css(v,"translatex("+e+"px)"),t._animateBackground&&t.background.css(h,t.origin+e)},_start:function(){this.options.enable?(this.userEvents.capture(),this.handle.addClass(i(p))):this.userEvents.cancel()},_stop:function(){var e=this;e.handle.removeClass(i(p)),e._toggle(e.position>e.snapPoint)},_toggle:function(e){var t,n=this,r=n.handle,s=n.element[0],a=s.checked,l=o.mobile.application&&o.mobile.application.os.wp?100:200;n.wrapper.toggleClass(i(d),e).toggleClass(i(u),!e),n.position=t=e*n.constrain,n._animateBackground&&n.background.kendoStop(!0,!0).kendoAnimate({effects:"slideMargin",offset:t,reset:!0,reverse:!e,axis:"left",duration:l}),r.kendoStop(!0,!0).kendoAnimate({effects:"slideTo",duration:l,offset:t+"px,0",reset:!0,complete:function(){a!==e&&(s.checked=e,n.trigger(c,{checked:e}))}})},_drag:function(){var e=this;e.userEvents=new o.UserEvents(e.wrapper,{fastTap:!0,tap:function(){e.options.enable&&e._toggle(!e.element[0].checked)},start:_(e._start,e),move:_(e._move,e),end:_(e._stop,e)})}});r.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.tabstrip.min",["kendo.core.min"],e)}(function(){return function(e,t){function i(t){return e('<span class="km-badge">'+t+"</span>")}var n=window.kendo,o=n.mobile.ui,r=o.Widget,s="km-state-active",a="select",l=r.extend({init:function(t,i){var n=this;r.fn.init.call(n,t,i),n.container().bind("show",e.proxy(this,"refresh")),n.element.addClass("km-tabstrip").find("a").each(n._buildButton).eq(n.options.selectedIndex).addClass(s),n.element.on("down","a","_release")},events:[a],switchTo:function(t){var i,n,o=this.element.find("a"),r=0,s=o.length;if(!isNaN(t))return this._setActiveItem(o.eq(t)),!0;for(;r<s;r++)if(i=o[r],n=i.href.replace(/(\#.+)(\?.+)$/,"$1"),n.indexOf(t,n.length-t.length)!==-1)return this._setActiveItem(e(i)),!0;return!1},switchByFullUrl:function(e){var t;t=this.element.find("a[href$='"+e+"']"),this._setActiveItem(t)},clear:function(){this.currentItem().removeClass(s)},currentItem:function(){return this.element.children("."+s)},badge:function(t,n){var o,r=this.element;return isNaN(t)||(t=r.children().get(t)),t=r.find(t),o=e(t.find(".km-badge")[0]||i(n).insertAfter(t.children(".km-icon"))),n||0===n?(o.html(n),this):n===!1?(o.empty().remove(),this):o.html()},_release:function(t){if(!(t.which>1)){var i=this,n=e(t.currentTarget);n[0]!==i.currentItem()[0]&&(i.trigger(a,{item:n})?t.preventDefault():i._setActiveItem(n))}},_setActiveItem:function(e){e[0]&&(this.clear(),e.addClass(s))},_buildButton:function(){var t=e(this),o=n.attrValue(t,"icon"),r=n.attrValue(t,"badge"),s=t.find("img"),a=e('<span class="km-icon"/>');t.addClass("km-button").attr(n.attr("role"),"tab").contents().not(s).wrapAll('<span class="km-text"/>'),s[0]?s.addClass("km-image").prependTo(t):(t.prepend(a),o&&(a.addClass("km-"+o),(r||0===r)&&i(r).insertAfter(a)))},refresh:function(e){var t=e.view.id;t&&!this.switchTo(e.view.id)&&this.switchTo(t)},options:{name:"TabStrip",selectedIndex:0,enable:!0}});o.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.mobile.min",["kendo.core.min","kendo.fx.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.data.signalr.min","kendo.binder.min","kendo.validator.min","kendo.router.min","kendo.view.min","kendo.userevents.min","kendo.draganddrop.min","kendo.popup.min","kendo.touch.min","kendo.mobile.popover.min","kendo.mobile.loader.min","kendo.mobile.scroller.min","kendo.mobile.shim.min","kendo.mobile.view.min","kendo.mobile.modalview.min","kendo.mobile.drawer.min","kendo.mobile.splitview.min","kendo.mobile.pane.min","kendo.mobile.application.min","kendo.mobile.actionsheet.min","kendo.mobile.button.min","kendo.mobile.buttongroup.min","kendo.mobile.collapsible.min","kendo.mobile.listview.min","kendo.mobile.navbar.min","kendo.mobile.scrollview.min","kendo.mobile.switch.min","kendo.mobile.tabstrip.min","kendo.angular.min"],e)}(function(){"bundle all";return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.all.min",["kendo.web.min","kendo.dataviz.min","kendo.mobile.min","kendo.drawing.min","kendo.dom.min"],e)}(function(){"bundle all";return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()});
//# sourceMappingURL=kendo.all.min.js.map

/** 
 * Kendo UI v2018.3.1017 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2018 Telerik EAD. 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(e,define){define("aspnetmvc/kendo.data.aspnetmvc.min",["kendo.data.min","kendo.combobox.min","kendo.multiselect.min","kendo.validator.min"],e)}(function(){!function(e,t){function n(t,n,r){var o,i={};return t.sort?(i[this.options.prefix+"sort"]=e.map(t.sort,function(e){return e.field+"-"+e.dir}).join("~"),delete t.sort):i[this.options.prefix+"sort"]="",t.page&&(i[this.options.prefix+"page"]=t.page,delete t.page),t.pageSize&&(i[this.options.prefix+"pageSize"]=t.pageSize,delete t.pageSize),t.group?(i[this.options.prefix+"group"]=e.map(t.group,function(e){return e.field+"-"+e.dir}).join("~"),delete t.group):i[this.options.prefix+"group"]="",t.aggregate&&(i[this.options.prefix+"aggregate"]=e.map(t.aggregate,function(e){return e.field+"-"+e.aggregate}).join("~"),delete t.aggregate),t.filter?(i[this.options.prefix+"filter"]=a(t.filter,r.encode),delete t.filter):(i[this.options.prefix+"filter"]="",delete t.filter),delete t.take,delete t.skip,o=new g(r),o.serialize(i,t,""),i}function a(n,o){return n.filters?e.map(n.filters,function(e){var t=e.filters&&e.filters.length>1,n=a(e,o);return n&&t&&(n="("+n+")"),n}).join("~"+n.logic+"~"):n.field?n.field+"~"+n.operator+"~"+r(n.value,o):t}function r(e,t){if("string"==typeof e){if(!(e.indexOf("Date(")>-1))return e=e.replace(f,"''"),t&&(e=encodeURIComponent(e)),"'"+e+"'";e=new Date(parseInt(e.replace(/^\/Date\((.*?)\)\/$/,"$1"),10))}return e&&e.getTime?"datetime'"+c.format("{0:yyyy-MM-ddTHH-mm-ss}",e)+"'":e}function o(e,n){return t!==e?e:n}function i(t){var n=t.HasSubgroups||t.hasSubgroups||!1,a=t.Items||t.items;return{value:o(t.Key,o(t.key,t.value)),field:t.Member||t.member||t.field,hasSubgroups:n,aggregates:d(t.Aggregates||t.aggregates),items:n?e.map(a,i):a}}function s(e){var t={};return t[e.AggregateMethodName.toLowerCase()]=e.Value,t}function d(e){var t,n,a,r={};for(t in e){r={},a=e[t];for(n in a)r[n.toLowerCase()]=a[n];e[t]=r}return e}function u(e){var t,n,a,r={};for(t=0,n=e.length;t<n;t++)a=e[t],r[a.Member]=l(!0,r[a.Member],s(a));return r}var c=window.kendo,f=/'/gi,l=e.extend,p=e.isArray,m=e.isPlainObject,v=".",g=function(e){e=e||{},this.culture=e.culture||c.culture(),this.stringifyDates=e.stringifyDates,this.decimalSeparator=this.culture.numberFormat[v]};g.prototype=g.fn={serialize:function(e,t,n){var a,r;for(r in t)a=n?n+"."+r:r,this.serializeField(e,t[r],t,r,a)},serializeField:function(e,n,a,r,o){p(n)?this.serializeArray(e,n,o):m(n)?this.serialize(e,n,o):e[o]===t&&(e[o]=a[r]=this.serializeValue(n))},serializeArray:function(e,t,n){var a,r,o,i,s;for(i=0,s=0;i<t.length;i++)a=t[i],r="["+s+"]",o=n+r,this.serializeField(e,a,t,r,o),s++},serializeValue:function(e){return e instanceof Date?e=this.stringifyDates?c.stringify(e).replace(/"/g,""):c.toString(e,"G",this.culture.name):"number"==typeof e&&(e=(""+e).replace(v,this.decimalSeparator)),e}},l(!0,c.data,{schemas:{"aspnetmvc-ajax":{groups:function(t){return e.map(this._dataAccessFunction(t),i)},aggregates:function(t){var n,a;if(t=t.d||t,n=t.AggregateResults||[],!e.isArray(n)){for(a in n)n[a]=u(n[a]);return n}return u(n)}}}}),l(!0,c.data,{transports:{"aspnetmvc-ajax":c.data.RemoteTransport.extend({init:function(e){var t=this,a=(e||{}).stringifyDates;c.data.RemoteTransport.fn.init.call(this,l(!0,{},this.options,e,{parameterMap:function(e,r){return n.call(t,e,r,{encode:!1,stringifyDates:a})}}))},read:function(e){var t=this.options.data,n=this.options.read.url;m(t)?(n&&(this.options.data=null),!t.Data.length&&n?c.data.RemoteTransport.fn.read.call(this,e):e.success(t)):c.data.RemoteTransport.fn.read.call(this,e)},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"},parameterMap:n,prefix:""}})}}),l(!0,c.data,{schemas:{webapi:c.data.schemas["aspnetmvc-ajax"]}}),l(!0,c.data,{transports:{webapi:c.data.RemoteTransport.extend({init:function(e){var t,a,r=this,o=(e||{}).stringifyDates;e.update&&(t="string"==typeof e.update?e.update:e.update.url,e.update=l(e.update,{url:function(n){return c.format(t,n[e.idField])}})),e.destroy&&(a="string"==typeof e.destroy?e.destroy:e.destroy.url,e.destroy=l(e.destroy,{url:function(t){return c.format(a,t[e.idField])}})),e.create&&"string"==typeof e.create&&(e.create={url:e.create}),c.data.RemoteTransport.fn.init.call(this,l(!0,{},this.options,e,{parameterMap:function(e,t){return n.call(r,e,t,{encode:!1,stringifyDates:o,culture:c.cultures["en-US"]})}}))},read:function(e){var t=this.options.data,n=this.options.read.url;m(t)?(n&&(this.options.data=null),!t.Data.length&&n?c.data.RemoteTransport.fn.read.call(this,e):e.success(t)):c.data.RemoteTransport.fn.read.call(this,e)},options:{read:{type:"GET"},update:{type:"PUT"},create:{type:"POST"},destroy:{type:"DELETE"},parameterMap:n,prefix:""}})}}),l(!0,c.data,{transports:{"aspnetmvc-server":c.data.RemoteTransport.extend({init:function(e){var t=this;c.data.RemoteTransport.fn.init.call(this,l(e,{parameterMap:function(e,a){return n.call(t,e,a,{encode:!0})}}))},read:function(t){var n,a,r=this.options.prefix,o=[r+"sort",r+"page",r+"pageSize",r+"group",r+"aggregate",r+"filter"],i=RegExp("("+o.join("|")+")=[^&]*&?","g");a=location.search.replace(i,"").replace("?",""),a.length&&!/&$/.test(a)&&(a+="&"),t=this.setup(t,"read"),n=t.url,n.indexOf("?")>=0?(a=a.replace(/(.*?=.*?)&/g,function(e){return n.indexOf(e.substr(0,e.indexOf("=")))>=0?"":e}),n+="&"+a):n+="?"+a,n+=e.map(t.data,function(e,t){return t+"="+e}).join("&"),location.href=n}})}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.combobox.aspnetmvc.min",["aspnetmvc/kendo.data.aspnetmvc.min"],e)}(function(){!function(e,t){var n=window.kendo,a=n.ui;a&&a.ComboBox&&(a.ComboBox.requestData=function(t){var n,a,r=e(t).data("kendoComboBox");if(r)return n=r.dataSource.filter(),a=r.input.val(),n&&n.filters.length||(a=""),{text:a}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.multicolumncombobox.aspnetmvc.min",["aspnetmvc/kendo.data.aspnetmvc.min"],e)}(function(){!function(e,t){var n=window.kendo,a=n.ui;a&&a.MultiColumnComboBox&&(a.MultiColumnComboBox.requestData=function(t){var n,a,r=e(t).data("kendoMultiColumnComboBox");if(r)return n=r.dataSource.filter(),a=r.input.val(),n&&n.filters.length||(a=""),{text:a}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.dropdownlist.aspnetmvc.min",["aspnetmvc/kendo.data.aspnetmvc.min"],e)}(function(){!function(e,t){var n=window.kendo,a=n.ui;a&&a.DropDownList&&(a.DropDownList.requestData=function(t){var n,a,r,o=e(t).data("kendoDropDownList");if(o)return n=o.dataSource.filter(),a=o.filterInput,r=a?a.val():"",n&&n.filters.length||(r=""),{text:r}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.dropdowntree.aspnetmvc.min",["aspnetmvc/kendo.data.aspnetmvc.min"],e)}(function(){!function(e,t){var n=window.kendo,a=n.ui;a&&a.DropDownTree&&(a.DropDownTree.requestData=function(t){var n,a,r,o=e(t).data("kendoDropDownTree");if(o)return n=o.dataSource.filter(),a=o.filterInput,r=a?a.val():"",n&&n.filters.length||(r=""),{text:r}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.multiselect.aspnetmvc.min",["aspnetmvc/kendo.combobox.aspnetmvc.min"],e)}(function(){!function(e,t){var n=window.kendo,a=n.ui;a&&a.MultiSelect&&(a.MultiSelect.requestData=function(t){var n,a=e(t).data("kendoMultiSelect");if(a)return n=a.input.val(),{text:n!==a.options.placeholder?n:""}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.imagebrowser.aspnetmvc.min",["aspnetmvc/kendo.multiselect.aspnetmvc.min"],e)}(function(){!function(e,t){var n=window.kendo,a=e.extend,r=e.isFunction;a(!0,n.data,{schemas:{"imagebrowser-aspnetmvc":{data:function(e){return e||[]},model:{id:"name",fields:{name:{field:"Name"},size:{field:"Size"},type:{field:"EntryType",parse:function(e){return 0==e?"f":"d"}}}}}}}),a(!0,n.data,{schemas:{"filebrowser-aspnetmvc":n.data.schemas["imagebrowser-aspnetmvc"]}}),a(!0,n.data,{transports:{"imagebrowser-aspnetmvc":n.data.RemoteTransport.extend({init:function(t){n.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,a){a.data=e.extend({},a.data,{path:this.options.path()}),r(this.options[t])?this.options[t].call(this,a):n.data.RemoteTransport.fn[t].call(this,a)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"},parameterMap:function(e,t){return"read"!=t&&(e.EntryType="f"===e.EntryType?0:1),e}}})}}),a(!0,n.data,{transports:{"filebrowser-aspnetmvc":n.data.transports["imagebrowser-aspnetmvc"]}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("aspnetmvc/kendo.validator.aspnetmvc.min",["aspnetmvc/kendo.imagebrowser.aspnetmvc.min"],e)}(function(){!function(e,t){function n(){var e,t={};for(e in p)t["mvc"+e]=s(e);return t}function a(){var e,t={};for(e in p)t["mvc"+e]=d(e);return t}function r(e,t){var n,a,r,o={},i=e.data(),s=t.length;for(r in i)a=r.toLowerCase(),n=a.indexOf(t),n>-1&&(a=a.substring(n+s,r.length),a&&(o[a]=i[r]));return o}function o(t){var n,a,r=t.Fields||[],o={};for(n=0,a=r.length;n<a;n++)e.extend(!0,o,i(r[n]));return o}function i(e){var t,n,a,r,o={},i={},s=e.FieldName,d=e.ValidationRules;for(a=0,r=d.length;a<r;a++)t=d[a].ValidationType,n=d[a].ValidationParameters,o[s+t]=c(s,t,n),i[s+t]=u(d[a].ErrorMessage);return{rules:o,messages:i}}function s(e){return function(t){return t.attr("data-val-"+e)}}function d(e){return function(t){return!t.filter("[data-val-"+e+"]").length||p[e](t,r(t,e))}}function u(e){return function(){return e}}function c(e,t,n){return function(a){return!a.filter("[name="+e+"]").length||p[t](a,n)}}function f(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)}var l=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,p={required:function(e){var t,n,a,r=e.val(),o=e.filter("[type=checkbox]");return o.length&&(t=o[0].name.replace(l,"\\$1"),n="input:hidden[name='"+t+"']",a=o.next(n),a.length||(a=o.next("label.k-checkbox-label").next(n)),r=a.length?a.val():"checked"===e.attr("checked")),!(""===r||!r||0===r.length)},number:function(e){return""===e.val()||null==e.val()||null!==kendo.parseFloat(e.val())},regex:function(e,t){return""===e.val()||f(e.val(),t.pattern)},range:function(e,t){return""===e.val()||this.min(e,t)&&this.max(e,t)},min:function(e,t){var n=parseFloat(t.min)||0,a=kendo.parseFloat(e.val());return n<=a},max:function(e,t){var n=parseFloat(t.max)||0,a=kendo.parseFloat(e.val());return a<=n},date:function(e){return""===e.val()||null!==kendo.parseDate(e.val())},length:function(t,n){if(""!==t.val()){var a=e.trim(t.val()).length;return(!n.min||a>=(n.min||0))&&(!n.max||a<=(n.max||0))}return!0}};e.extend(!0,kendo.ui.validator,{rules:a(),messages:n(),messageLocators:{mvcLocator:{locate:function(e,t){return t=t.replace(l,"\\$1"),e.find(".field-validation-valid[data-valmsg-for='"+t+"'], .field-validation-error[data-valmsg-for='"+t+"']")},decorate:function(e,t){e.addClass("field-validation-error").attr("data-valmsg-for",t||"")}},mvcMetadataLocator:{locate:function(e,t){return t=t.replace(l,"\\$1"),e.find("#"+t+"_validationMessage.field-validation-valid")},decorate:function(e,t){e.addClass("field-validation-error").attr("id",t+"_validationMessage")}}},ruleResolvers:{mvcMetaDataResolver:{resolve:function(t){var n,a=window.mvcClientValidationMetadata||[];if(a.length)for(t=e(t),n=0;n<a.length;n++)if(a[n].FormId==t.attr("id"))return o(a[n]);return{}}}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.aspnetmvc.min",["kendo.data.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.dropdowntree.min","kendo.multiselect.min","kendo.validator.min","aspnetmvc/kendo.data.aspnetmvc.min","aspnetmvc/kendo.combobox.aspnetmvc.min","aspnetmvc/kendo.multicolumncombobox.aspnetmvc.min","aspnetmvc/kendo.dropdownlist.aspnetmvc.min","aspnetmvc/kendo.dropdowntree.aspnetmvc.min","aspnetmvc/kendo.multiselect.aspnetmvc.min","aspnetmvc/kendo.imagebrowser.aspnetmvc.min","aspnetmvc/kendo.validator.aspnetmvc.min"],e)}(function(){!function(e,t){function n(t){kendo.__documentIsReady?t():e(t)}var a=e.extend;e(function(){kendo.__documentIsReady=!0}),a(kendo,{syncReady:n})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.aspnetmvc.min.js.map

/** 
 * Kendo UI v2018.3.1017 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2018 Telerik EAD. 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(a,define){define("kendo.timezones.min",["kendo.core.min"],a)}(function(){var a=window.kendo;return a.timezone.zones={"Africa/Algiers":[["-12.2","-","LMT","-2486678340000"],["-9.35","-","PMT","-1855958400000"],["0","Algeria","WE%sT","-942012000000"],["-60","Algeria","CE%sT","-733276800000"],["0","-","WET","-439430400000"],["-60","-","CET","-212025600000"],["0","Algeria","WE%sT","246240000000"],["-60","Algeria","CE%sT","309744000000"],["0","Algeria","WE%sT","357523200000"],["-60","-","CET"]],"Atlantic/Cape_Verde":[["94.06666666666668","-","LMT","-1956700800000"],["120","-","CVT","-862617600000"],["120","1:00","CVST","-764121600000"],["120","-","CVT","186112800000"],["60","-","CVT"]],"Africa/Ndjamena":[["-60.2","-","LMT","-1798848000000"],["-60","-","WAT","308707200000"],["-60","1:00","WAST","321321600000"],["-60","-","WAT"]],"Indian/Comoro":[["-173.06666666666666","-","LMT","-1846281600000"],["-180","-","EAT"]],"Africa/Abidjan":[["16.133333333333333","-","LMT","-1798848000000"],["0","-","GMT"]],"Africa/Bamako":"Africa/Abidjan","Africa/Banjul":"Africa/Abidjan","Africa/Conakry":"Africa/Abidjan","Africa/Dakar":"Africa/Abidjan","Africa/Freetown":"Africa/Abidjan","Africa/Lome":"Africa/Abidjan","Africa/Nouakchott":"Africa/Abidjan","Africa/Ouagadougou":"Africa/Abidjan","Africa/Sao_Tome":"Africa/Abidjan","Atlantic/St_Helena":"Africa/Abidjan","Africa/Djibouti":[["-172.6","-","LMT","-1846281600000"],["-180","-","EAT"]],"Africa/Cairo":[["-125.15","-","LMT","-2185401600000"],["-120","Egypt","EE%sT"]],"Africa/Asmara":[["-155.53333333333333","-","LMT","-3124224000000"],["-155.53333333333333","-","AMT","-2493072000000"],["-155.33333333333334","-","ADMT","-1062201600000"],["-180","-","EAT"]],"Africa/Addis_Ababa":[["-154.8","-","LMT","-3124224000000"],["-155.33333333333334","-","ADMT","-1062201600000"],["-180","-","EAT"]],"Africa/Accra":[["0.8666666666666666","-","LMT","-1609545600000"],["0","Ghana","%s"]],"Africa/Bissau":[["62.333333333333336","-","LMT","-1830384000000"],["60","-","WAT","189216000000"],["0","-","GMT"]],"Africa/Nairobi":[["-147.26666666666665","-","LMT","-1309737600000"],["-180","-","EAT","-1230854400000"],["-150","-","BEAT","-915235200000"],["-165","-","BEAUT","-284083200000"],["-180","-","EAT"]],"Africa/Monrovia":[["43.13333333333333","-","LMT","-2745532800000"],["43.13333333333333","-","MMT","-1604361600000"],["44.5","-","LRT","73526400000"],["0","-","GMT"]],"Africa/Tripoli":[["-52.733333333333334","-","LMT","-1546387200000"],["-60","Libya","CE%sT","-315705600000"],["-120","-","EET","410140800000"],["-60","Libya","CE%sT","641779200000"],["-120","-","EET","844041600000"],["-60","Libya","CE%sT","875923200000"],["-120","-","EET","1352512800000"],["-60","Libya","CE%sT","1382666400000"],["-120","-","EET"]],"Indian/Antananarivo":[["-190.06666666666666","-","LMT","-1846281600000"],["-180","-","EAT","-499914000000"],["-180","1:00","EAST","-492051600000"],["-180","-","EAT"]],"Indian/Mauritius":[["-230","-","LMT","-1956700800000"],["-240","Mauritius","MU%sT"]],"Indian/Mayotte":[["-180.93333333333334","-","LMT","-1846281600000"],["-180","-","EAT"]],"Africa/Casablanca":[["30.333333333333332","-","LMT","-1773014400000"],["0","Morocco","WE%sT","448243200000"],["-60","-","CET","536371200000"],["0","Morocco","WE%sT"]],"Africa/El_Aaiun":[["52.8","-","LMT","-1136073600000"],["60","-","WAT","198288000000"],["0","Morocco","WE%sT"]],"Africa/Maputo":[["-130.33333333333331","-","LMT","-2109283200000"],["-120","-","CAT"]],"Africa/Blantyre":"Africa/Maputo","Africa/Bujumbura":"Africa/Maputo","Africa/Gaborone":"Africa/Maputo","Africa/Harare":"Africa/Maputo","Africa/Kigali":"Africa/Maputo","Africa/Lubumbashi":"Africa/Maputo","Africa/Lusaka":"Africa/Maputo","Africa/Windhoek":[["-68.4","-","LMT","-2458166400000"],["-90","-","SWAT","-2109283200000"],["-120","-","SAST","-860968800000"],["-120","1:00","SAST","-845244000000"],["-120","-","SAST","637977600000"],["-120","-","CAT","765331200000"],["-60","Namibia","WA%sT"]],"Africa/Lagos":[["-13.6","-","LMT","-1588464000000"],["-60","-","WAT"]],"Africa/Bangui":"Africa/Lagos","Africa/Brazzaville":"Africa/Lagos","Africa/Douala":"Africa/Lagos","Africa/Kinshasa":"Africa/Lagos","Africa/Libreville":"Africa/Lagos","Africa/Luanda":"Africa/Lagos","Africa/Malabo":"Africa/Lagos","Africa/Niamey":"Africa/Lagos","Africa/Porto-Novo":"Africa/Lagos","Indian/Reunion":[["-221.86666666666665","-","LMT","-1848873600000"],["-240","-","RET"]],"Indian/Mahe":[["-221.8","-","LMT","-2006640000000"],["-240","-","SCT"]],"Africa/Mogadishu":[["-181.46666666666667","-","LMT","-2403561600000"],["-180","-","EAT","-1199318400000"],["-150","-","BEAT","-378777600000"],["-180","-","EAT"]],"Africa/Johannesburg":[["-112","-","LMT","-2458166400000"],["-90","-","SAST","-2109283200000"],["-120","SA","SAST"]],"Africa/Maseru":"Africa/Johannesburg","Africa/Mbabane":"Africa/Johannesburg","Africa/Khartoum":[["-130.13333333333333","-","LMT","-1199318400000"],["-120","Sudan","CA%sT","947937600000"],["-180","-","EAT"]],"Africa/Juba":"Africa/Khartoum","Africa/Dar_es_Salaam":[["-157.13333333333335","-","LMT","-1199318400000"],["-180","-","EAT","-662774400000"],["-165","-","BEAUT","-252547200000"],["-180","-","EAT"]],"Africa/Tunis":[["-40.733333333333334","-","LMT","-2797200000000"],["-9.35","-","PMT","-1855958400000"],["-60","Tunisia","CE%sT"]],"Africa/Kampala":[["-129.66666666666669","-","LMT","-1309737600000"],["-180","-","EAT","-1230854400000"],["-150","-","BEAT","-662774400000"],["-165","-","BEAUT","-378777600000"],["-180","-","EAT"]],"Antarctica/Casey":[["0","-","zzz","-86400000"],["-480","-","AWST","1255831200000"],["-660","-","CAST","1267754400000"],["-480","-","AWST","1319767200000"],["-660","-","CAST","1329843600000"],["-480","-","AWST"]],"Antarctica/Davis":[["0","-","zzz","-409190400000"],["-420","-","DAVT","-163036800000"],["0","-","zzz","-28857600000"],["-420","-","DAVT","1255831200000"],["-300","-","DAVT","1268251200000"],["-420","-","DAVT","1319767200000"],["-300","-","DAVT","1329854400000"],["-420","-","DAVT"]],"Antarctica/Mawson":[["0","-","zzz","-501206400000"],["-360","-","MAWT","1255831200000"],["-300","-","MAWT"]],"Indian/Kerguelen":[["0","-","zzz","-599702400000"],["-300","-","TFT"]],"Antarctica/DumontDUrville":[["0","-","zzz","-694396800000"],["-600","-","PMT","-566956800000"],["0","-","zzz","-415497600000"],["-600","-","DDUT"]],"Antarctica/Syowa":[["0","-","zzz","-407808000000"],["-180","-","SYOT"]],"Antarctica/Troll":[["0","-","zzz","1108166400000"],["0","Troll","%s"]],"Antarctica/Vostok":[["0","-","zzz","-380073600000"],["-360","-","VOST"]],"Antarctica/Rothera":[["0","-","zzz","218246400000"],["180","-","ROTT"]],"Antarctica/Palmer":[["0","-","zzz","-126316800000"],["240","ArgAQ","AR%sT","-7603200000"],["180","ArgAQ","AR%sT","389059200000"],["240","ChileAQ","CL%sT"]],"Asia/Kabul":[["-276.8","-","LMT","-2493072000000"],["-240","-","AFT","-757468800000"],["-270","-","AFT"]],"Asia/Yerevan":[["-178","-","LMT","-1441152000000"],["-180","-","YERT","-405129600000"],["-240","RussiaAsia","YER%sT","670384800000"],["-180","1:00","YERST","685584000000"],["-180","RussiaAsia","AM%sT","811908000000"],["-240","-","AMT","883526400000"],["-240","RussiaAsia","AM%sT","1332640800000"],["-240","-","AMT"]],"Asia/Baku":[["-199.4","-","LMT","-1441152000000"],["-180","-","BAKT","-405129600000"],["-240","RussiaAsia","BAK%sT","670384800000"],["-180","1:00","BAKST","683510400000"],["-180","RussiaAsia","AZ%sT","715388400000"],["-240","-","AZT","851990400000"],["-240","EUAsia","AZ%sT","883526400000"],["-240","Azer","AZ%sT"]],"Asia/Bahrain":[["-202.33333333333334","-","LMT","-1546387200000"],["-240","-","GST","76204800000"],["-180","-","AST"]],"Asia/Dhaka":[["-361.6666666666667","-","LMT","-2493072000000"],["-353.3333333333333","-","HMT","-891561600000"],["-390","-","BURT","-872035200000"],["-330","-","IST","-862617600000"],["-390","-","BURT","-576115200000"],["-360","-","DACT","38793600000"],["-360","-","BDT","1262217600000"],["-360","Dhaka","BD%sT"]],"Asia/Thimphu":[["-358.6","-","LMT","-706320000000"],["-330","-","IST","560044800000"],["-360","-","BTT"]],"Indian/Chagos":[["-289.6666666666667","-","LMT","-1956700800000"],["-300","-","IOT","851990400000"],["-360","-","IOT"]],"Asia/Brunei":[["-459.6666666666667","-","LMT","-1383436800000"],["-450","-","BNT","-1136160000000"],["-480","-","BNT"]],"Asia/Rangoon":[["-384.6666666666667","-","LMT","-2808604800000"],["-384.6666666666667","-","RMT","-1546387200000"],["-390","-","BURT","-873244800000"],["-540","-","JST","-778377600000"],["-390","-","MMT"]],"Asia/Phnom_Penh":[["-419.6666666666667","-","LMT","-2005948800000"],["-426.3333333333333","-","SMT","-1855958340000"],["-420","-","ICT","-1819929600000"],["-480","-","ICT","-1220400000000"],["-420","-","ICT"]],"Asia/Shanghai":[["-485.7166666666667","-","LMT","-2146003200000"],["-480","Shang","C%sT","-631238400000"],["-480","PRC","C%sT"]],"Asia/Urumqi":[["-350.3333333333333","-","LMT","-1293926400000"],["-360","-","XJT"]],"Asia/Hong_Kong":[["-456.7","-","LMT","-2056665600000"],["-480","HK","HK%sT","-884217600000"],["-540","-","JST","-766713600000"],["-480","HK","HK%sT"]],"Asia/Taipei":[["-486","-","LMT","-2335219200000"],["-480","-","JWST","-1017792000000"],["-540","-","JST","-766191600000"],["-480","Taiwan","C%sT"]],"Asia/Macau":[["-454.3333333333333","-","LMT","-1830384000000"],["-480","Macau","MO%sT","945648000000"],["-480","PRC","C%sT"]],"Asia/Nicosia":[["-133.46666666666667","-","LMT","-1518912000000"],["-120","Cyprus","EE%sT","904608000000"],["-120","EUAsia","EE%sT"]],"Europe/Nicosia":"Asia/Nicosia","Asia/Tbilisi":[["-179.18333333333334","-","LMT","-2808604800000"],["-179.18333333333334","-","TBMT","-1441152000000"],["-180","-","TBIT","-405129600000"],["-240","RussiaAsia","TBI%sT","670384800000"],["-180","1:00","TBIST","671155200000"],["-180","RussiaAsia","GE%sT","725760000000"],["-180","E-EurAsia","GE%sT","778377600000"],["-240","E-EurAsia","GE%sT","844128000000"],["-240","1:00","GEST","857174400000"],["-240","E-EurAsia","GE%sT","1088294400000"],["-180","RussiaAsia","GE%sT","1109642400000"],["-240","-","GET"]],"Asia/Dili":[["-502.3333333333333","-","LMT","-1830384000000"],["-480","-","TLT","-879123600000"],["-540","-","JST","-766022400000"],["-540","-","TLT","199929600000"],["-480","-","WITA","969148800000"],["-540","-","TLT"]],"Asia/Kolkata":[["-353.4666666666667","-","LMT","-2808604800000"],["-353.3333333333333","-","HMT","-891561600000"],["-390","-","BURT","-872035200000"],["-330","-","IST","-862617600000"],["-330","1:00","IST","-764121600000"],["-330","-","IST"]],"Asia/Jakarta":[["-427.2","-","LMT","-3231273600000"],["-427.2","-","BMT","-1451693568000"],["-440","-","JAVT","-1172880000000"],["-450","-","WIB","-876614400000"],["-540","-","JST","-766022400000"],["-450","-","WIB","-683856000000"],["-480","-","WIB","-620784000000"],["-450","-","WIB","-157852800000"],["-420","-","WIB"]],"Asia/Pontianak":[["-437.3333333333333","-","LMT","-1946160000000"],["-437.3333333333333","-","PMT","-1172880000000"],["-450","-","WIB","-881193600000"],["-540","-","JST","-766022400000"],["-450","-","WIB","-683856000000"],["-480","-","WIB","-620784000000"],["-450","-","WIB","-157852800000"],["-480","-","WITA","567993600000"],["-420","-","WIB"]],"Asia/Makassar":[["-477.6","-","LMT","-1546387200000"],["-477.6","-","MMT","-1172880000000"],["-480","-","WITA","-880243200000"],["-540","-","JST","-766022400000"],["-480","-","WITA"]],"Asia/Jayapura":[["-562.8","-","LMT","-1172880000000"],["-540","-","WIT","-799459200000"],["-570","-","ACST","-157852800000"],["-540","-","WIT"]],"Asia/Tehran":[["-205.73333333333335","-","LMT","-1672617600000"],["-205.73333333333335","-","TMT","-725932800000"],["-210","-","IRST","247190400000"],["-240","Iran","IR%sT","315446400000"],["-210","Iran","IR%sT"]],"Asia/Baghdad":[["-177.66666666666666","-","LMT","-2493072000000"],["-177.6","-","BMT","-1609545600000"],["-180","-","AST","389059200000"],["-180","Iraq","A%sT"]],"Asia/Jerusalem":[["-140.9","-","LMT","-2808604800000"],["-140.66666666666666","-","JMT","-1609545600000"],["-120","Zion","I%sT"]],"Asia/Tokyo":[["-558.9833333333333","-","LMT","-2587712400000"],["-540","-","JST","-2335219200000"],["-540","-","JCST","-1017792000000"],["-540","Japan","J%sT"]],"Asia/Amman":[["-143.73333333333335","-","LMT","-1199318400000"],["-120","Jordan","EE%sT"]],"Asia/Almaty":[["-307.8","-","LMT","-1441152000000"],["-300","-","ALMT","-1247529600000"],["-360","RussiaAsia","ALM%sT","694137600000"],["-360","-","ALMT","725760000000"],["-360","RussiaAsia","ALM%sT","1110844800000"],["-360","-","ALMT"]],"Asia/Qyzylorda":[["-261.8666666666667","-","LMT","-1441152000000"],["-240","-","KIZT","-1247529600000"],["-300","-","KIZT","354931200000"],["-300","1:00","KIZST","370742400000"],["-360","-","KIZT","386467200000"],["-300","RussiaAsia","KIZ%sT","694137600000"],["-300","-","KIZT","692841600000"],["-300","-","QYZT","695786400000"],["-360","RussiaAsia","QYZ%sT","1110844800000"],["-360","-","QYZT"]],"Asia/Aqtobe":[["-228.66666666666666","-","LMT","-1441152000000"],["-240","-","AKTT","-1247529600000"],["-300","-","AKTT","354931200000"],["-300","1:00","AKTST","370742400000"],["-360","-","AKTT","386467200000"],["-300","RussiaAsia","AKT%sT","694137600000"],["-300","-","AKTT","692841600000"],["-300","RussiaAsia","AQT%sT","1110844800000"],["-300","-","AQTT"]],"Asia/Aqtau":[["-201.06666666666666","-","LMT","-1441152000000"],["-240","-","FORT","-1247529600000"],["-300","-","FORT","-189475200000"],["-300","-","SHET","370742400000"],["-360","-","SHET","386467200000"],["-300","RussiaAsia","SHE%sT","694137600000"],["-300","-","SHET","692841600000"],["-300","RussiaAsia","AQT%sT","794023200000"],["-240","RussiaAsia","AQT%sT","1110844800000"],["-300","-","AQTT"]],"Asia/Oral":[["-205.4","-","LMT","-1441152000000"],["-240","-","URAT","-1247529600000"],["-300","-","URAT","354931200000"],["-300","1:00","URAST","370742400000"],["-360","-","URAT","386467200000"],["-300","RussiaAsia","URA%sT","606880800000"],["-240","RussiaAsia","URA%sT","694137600000"],["-240","-","URAT","692841600000"],["-240","RussiaAsia","ORA%sT","1110844800000"],["-300","-","ORAT"]],"Asia/Bishkek":[["-298.4","-","LMT","-1441152000000"],["-300","-","FRUT","-1247529600000"],["-360","RussiaAsia","FRU%sT","670384800000"],["-300","1:00","FRUST","683604000000"],["-300","Kyrgyz","KG%sT","1123804800000"],["-360","-","KGT"]],"Asia/Seoul":[["-507.8666666666667","-","LMT","-2493072000000"],["-510","-","KST","-2053900800000"],["-540","-","JCST","-1293926400000"],["-510","-","KST","-1167696000000"],["-540","-","JCST","-1017792000000"],["-540","-","JST","-767318400000"],["-540","-","KST","-498096000000"],["-480","ROK","K%sT","-264902400000"],["-510","-","KST","-39484800000"],["-540","ROK","K%sT"]],"Asia/Pyongyang":[["-503","-","LMT","-2493072000000"],["-510","-","KST","-2053900800000"],["-540","-","JCST","-1293926400000"],["-510","-","KST","-1167696000000"],["-540","-","JCST","-1017792000000"],["-540","-","JST","-768614400000"],["-540","-","KST","-498096000000"],["-480","-","KST","-264902400000"],["-540","-","KST"]],"Asia/Kuwait":[["-191.93333333333334","-","LMT","-599702400000"],["-180","-","AST"]],"Asia/Vientiane":[["-410.4","-","LMT","-2005948800000"],["-426.3333333333333","-","SMT","-1855958340000"],["-420","-","ICT","-1819929600000"],["-480","-","ICT","-1220400000000"],["-420","-","ICT"]],"Asia/Beirut":[["-142","-","LMT","-2808604800000"],["-120","Lebanon","EE%sT"]],"Asia/Kuala_Lumpur":[["-406.7666666666667","-","LMT","-2177452800000"],["-415.4166666666667","-","SMT","-2038176000000"],["-420","-","MALT","-1167609600000"],["-420","0:20","MALST","-1073001600000"],["-440","-","MALT","-894153600000"],["-450","-","MALT","-879638400000"],["-540","-","JST","-766972800000"],["-450","-","MALT","378691200000"],["-480","-","MYT"]],"Asia/Kuching":[["-441.3333333333333","-","LMT","-1383436800000"],["-450","-","BORT","-1136160000000"],["-480","NBorneo","BOR%sT","-879638400000"],["-540","-","JST","-766972800000"],["-480","-","BORT","378691200000"],["-480","-","MYT"]],"Indian/Maldives":[["-294","-","LMT","-2808604800000"],["-294","-","MMT","-284083200000"],["-300","-","MVT"]],"Asia/Hovd":[["-366.6","-","LMT","-2032905600000"],["-360","-","HOVT","283910400000"],["-420","Mongol","HOV%sT"]],"Asia/Ulaanbaatar":[["-427.5333333333333","-","LMT","-2032905600000"],["-420","-","ULAT","283910400000"],["-480","Mongol","ULA%sT"]],"Asia/Choibalsan":[["-458","-","LMT","-2032905600000"],["-420","-","ULAT","283910400000"],["-480","-","ULAT","418003200000"],["-540","Mongol","CHO%sT","1206921600000"],["-480","Mongol","CHO%sT"]],"Asia/Kathmandu":[["-341.2666666666667","-","LMT","-1546387200000"],["-330","-","IST","536371200000"],["-345","-","NPT"]],"Asia/Muscat":[["-234.4","-","LMT","-1546387200000"],["-240","-","GST"]],"Asia/Karachi":[["-268.2","-","LMT","-1956700800000"],["-330","-","IST","-862617600000"],["-330","1:00","IST","-764121600000"],["-330","-","IST","-576115200000"],["-300","-","KART","38793600000"],["-300","Pakistan","PK%sT"]],"Asia/Gaza":[["-137.86666666666665","-","LMT","-2185401600000"],["-120","Zion","EET","-682646400000"],["-120","EgyptAsia","EE%sT","-81302400000"],["-120","Zion","I%sT","851990400000"],["-120","Jordan","EE%sT","946598400000"],["-120","Palestine","EE%sT","1219968000000"],["-120","-","EET","1220227200000"],["-120","Palestine","EE%sT","1293753600000"],["-120","-","EET","1269648060000"],["-120","Palestine","EE%sT","1312156800000"],["-120","-","EET","1356912000000"],["-120","Palestine","EE%sT"]],"Asia/Hebron":[["-140.38333333333335","-","LMT","-2185401600000"],["-120","Zion","EET","-682646400000"],["-120","EgyptAsia","EE%sT","-81302400000"],["-120","Zion","I%sT","851990400000"],["-120","Jordan","EE%sT","946598400000"],["-120","Palestine","EE%sT"]],"Asia/Manila":[["956","-","LMT","-3944678400000"],["-484","-","LMT","-2229292800000"],["-480","Phil","PH%sT","-873244800000"],["-540","-","JST","-794188800000"],["-480","Phil","PH%sT"]],"Asia/Qatar":[["-206.13333333333335","-","LMT","-1546387200000"],["-240","-","GST","76204800000"],["-180","-","AST"]],"Asia/Riyadh":[["-186.86666666666665","-","LMT","-719625600000"],["-180","-","AST"]],"Asia/Singapore":[["-415.4166666666667","-","LMT","-2177452800000"],["-415.4166666666667","-","SMT","-2038176000000"],["-420","-","MALT","-1167609600000"],["-420","0:20","MALST","-1073001600000"],["-440","-","MALT","-894153600000"],["-450","-","MALT","-879638400000"],["-540","-","JST","-766972800000"],["-450","-","MALT","-138758400000"],["-450","-","SGT","378691200000"],["-480","-","SGT"]],"Asia/Colombo":[["-319.4","-","LMT","-2808604800000"],["-319.5333333333333","-","MMT","-1988236800000"],["-330","-","IST","-883267200000"],["-330","0:30","IHST","-862617600000"],["-330","1:00","IST","-764028000000"],["-330","-","IST","832982400000"],["-390","-","LKT","846289800000"],["-360","-","LKT","1145061000000"],["-330","-","IST"]],"Asia/Damascus":[["-145.2","-","LMT","-1546387200000"],["-120","Syria","EE%sT"]],"Asia/Dushanbe":[["-275.2","-","LMT","-1441152000000"],["-300","-","DUST","-1247529600000"],["-360","RussiaAsia","DUS%sT","670384800000"],["-300","1:00","DUSST","684381600000"],["-300","-","TJT"]],"Asia/Bangkok":[["-402.06666666666666","-","LMT","-2808604800000"],["-402.06666666666666","-","BMT","-1570060800000"],["-420","-","ICT"]],"Asia/Ashgabat":[["-233.53333333333333","-","LMT","-1441152000000"],["-240","-","ASHT","-1247529600000"],["-300","RussiaAsia","ASH%sT","670384800000"],["-240","RussiaAsia","ASH%sT","688521600000"],["-240","RussiaAsia","TM%sT","695786400000"],["-300","-","TMT"]],"Asia/Dubai":[["-221.2","-","LMT","-1546387200000"],["-240","-","GST"]],"Asia/Samarkand":[["-267.8833333333333","-","LMT","-1441152000000"],["-240","-","SAMT","-1247529600000"],["-300","-","SAMT","354931200000"],["-300","1:00","SAMST","370742400000"],["-360","-","TAST","386467200000"],["-300","RussiaAsia","SAM%sT","683683200000"],["-300","RussiaAsia","UZ%sT","725760000000"],["-300","-","UZT"]],"Asia/Tashkent":[["-277.18333333333334","-","LMT","-1441152000000"],["-300","-","TAST","-1247529600000"],["-360","RussiaAsia","TAS%sT","670384800000"],["-300","RussiaAsia","TAS%sT","683683200000"],["-300","RussiaAsia","UZ%sT","725760000000"],["-300","-","UZT"]],"Asia/Ho_Chi_Minh":[["-426.6666666666667","-","LMT","-2005948800000"],["-426.3333333333333","-","SMT","-1855958340000"],["-420","-","ICT","-1819929600000"],["-480","-","ICT","-1220400000000"],["-420","-","ICT"]],"Asia/Aden":[["-179.9","-","LMT","-599702400000"],["-180","-","AST"]],"Australia/Darwin":[["-523.3333333333333","-","LMT","-2364076800000"],["-540","-","ACST","-2230156800000"],["-570","Aus","AC%sT"]],"Australia/Perth":[["-463.4","-","LMT","-2337897600000"],["-480","Aus","AW%sT","-836438400000"],["-480","AW","AW%sT"]],"Australia/Eucla":[["-515.4666666666667","-","LMT","-2337897600000"],["-525","Aus","ACW%sT","-836438400000"],["-525","AW","ACW%sT"]],"Australia/Brisbane":[["-612.1333333333333","-","LMT","-2335305600000"],["-600","Aus","AE%sT","62985600000"],["-600","AQ","AE%sT"]],"Australia/Lindeman":[["-595.9333333333334","-","LMT","-2335305600000"],["-600","Aus","AE%sT","62985600000"],["-600","AQ","AE%sT","709948800000"],["-600","Holiday","AE%sT"]],"Australia/Adelaide":[["-554.3333333333334","-","LMT","-2364076800000"],["-540","-","ACST","-2230156800000"],["-570","Aus","AC%sT","62985600000"],["-570","AS","AC%sT"]],"Australia/Hobart":[["-589.2666666666667","-","LMT","-2345760000000"],["-600","-","AEST","-1680472800000"],["-600","1:00","AEDT","-1669852800000"],["-600","Aus","AE%sT","-63244800000"],["-600","AT","AE%sT"]],"Australia/Currie":[["-575.4666666666666","-","LMT","-2345760000000"],["-600","-","AEST","-1680472800000"],["-600","1:00","AEDT","-1669852800000"],["-600","Aus","AE%sT","47174400000"],["-600","AT","AE%sT"]],"Australia/Melbourne":[["-579.8666666666667","-","LMT","-2364076800000"],["-600","Aus","AE%sT","62985600000"],["-600","AV","AE%sT"]],"Australia/Sydney":[["-604.8666666666667","-","LMT","-2364076800000"],["-600","Aus","AE%sT","62985600000"],["-600","AN","AE%sT"]],"Australia/Broken_Hill":[["-565.8","-","LMT","-2364076800000"],["-600","-","AEST","-2314915200000"],["-540","-","ACST","-2230156800000"],["-570","Aus","AC%sT","62985600000"],["-570","AN","AC%sT","978220800000"],["-570","AS","AC%sT"]],"Australia/Lord_Howe":[["-636.3333333333334","-","LMT","-2364076800000"],["-600","-","AEST","352252800000"],["-630","LH","LH%sT"]],"Antarctica/Macquarie":[["0","-","zzz","-2214259200000"],["-600","-","AEST","-1680472800000"],["-600","1:00","AEDT","-1669852800000"],["-600","Aus","AE%sT","-1601683200000"],["0","-","zzz","-687052800000"],["-600","Aus","AE%sT","-63244800000"],["-600","AT","AE%sT","1270350000000"],["-660","-","MIST"]],"Indian/Christmas":[["-422.8666666666667","-","LMT","-2364076800000"],["-420","-","CXT"]],"Indian/Cocos":[["-387.6666666666667","-","LMT","-2177539200000"],["-390","-","CCT"]],"Pacific/Fiji":[["-715.7333333333333","-","LMT","-1709942400000"],["-720","Fiji","FJ%sT"]],"Pacific/Gambier":[["539.8","-","LMT","-1806710400000"],["540","-","GAMT"]],"Pacific/Marquesas":[["558","-","LMT","-1806710400000"],["570","-","MART"]],"Pacific/Tahiti":[["598.2666666666667","-","LMT","-1806710400000"],["600","-","TAHT"]],"Pacific/Guam":[["861","-","LMT","-3944678400000"],["-579","-","LMT","-2146003200000"],["-600","-","GST","977529600000"],["-600","-","ChST"]],"Pacific/Tarawa":[["-692.0666666666666","-","LMT","-2146003200000"],["-720","-","GILT"]],"Pacific/Enderbury":[["684.3333333333334","-","LMT","-2146003200000"],["720","-","PHOT","307584000000"],["660","-","PHOT","820368000000"],["-780","-","PHOT"]],"Pacific/Kiritimati":[["629.3333333333334","-","LMT","-2146003200000"],["640","-","LINT","307584000000"],["600","-","LINT","820368000000"],["-840","-","LINT"]],"Pacific/Saipan":[["857","-","LMT","-3944678400000"],["-583","-","LMT","-2146003200000"],["-540","-","MPT","-7948800000"],["-600","-","MPT","977529600000"],["-600","-","ChST"]],"Pacific/Majuro":[["-684.8","-","LMT","-2146003200000"],["-660","-","MHT","-7948800000"],["-720","-","MHT"]],"Pacific/Kwajalein":[["-669.3333333333334","-","LMT","-2146003200000"],["-660","-","MHT","-7948800000"],["720","-","KWAT","745804800000"],["-720","-","MHT"]],"Pacific/Chuuk":[["-607.1333333333333","-","LMT","-2146003200000"],["-600","-","CHUT"]],"Pacific/Pohnpei":[["-632.8666666666667","-","LMT","-2146003200000"],["-660","-","PONT"]],"Pacific/Kosrae":[["-651.9333333333334","-","LMT","-2146003200000"],["-660","-","KOST","-7948800000"],["-720","-","KOST","946598400000"],["-660","-","KOST"]],"Pacific/Nauru":[["-667.6666666666666","-","LMT","-1545091200000"],["-690","-","NRT","-877305600000"],["-540","-","JST","-800928000000"],["-690","-","NRT","294364800000"],["-720","-","NRT"]],"Pacific/Noumea":[["-665.8","-","LMT","-1829347200000"],["-660","NC","NC%sT"]],"Pacific/Auckland":[["-699.0666666666666","-","LMT","-3192393600000"],["-690","NZ","NZ%sT","-757382400000"],["-720","NZ","NZ%sT"]],"Pacific/Chatham":[["-733.8","-","LMT","-3192393600000"],["-735","-","CHAST","-757382400000"],["-765","Chatham","CHA%sT"]],"Antarctica/McMurdo":"Pacific/Auckland","Pacific/Rarotonga":[["639.0666666666666","-","LMT","-2146003200000"],["630","-","CKT","279676800000"],["600","Cook","CK%sT"]],"Pacific/Niue":[["679.6666666666666","-","LMT","-2146003200000"],["680","-","NUT","-568166400000"],["690","-","NUT","276048000000"],["660","-","NUT"]],"Pacific/Norfolk":[["-671.8666666666667","-","LMT","-2146003200000"],["-672","-","NMT","-568166400000"],["-690","-","NFT"]],"Pacific/Palau":[["-537.9333333333334","-","LMT","-2146003200000"],["-540","-","PWT"]],"Pacific/Port_Moresby":[["-588.6666666666666","-","LMT","-2808604800000"],["-588.5333333333334","-","PMMT","-2335305600000"],["-600","-","PGT"]],"Pacific/Pitcairn":[["520.3333333333333","-","LMT","-2146003200000"],["510","-","PNT","893635200000"],["480","-","PST"]],"Pacific/Pago_Pago":[["-757.2","-","LMT","-2855692800000"],["682.8","-","LMT","-1830470400000"],["660","-","NST","-86918400000"],["660","-","BST","438998400000"],["660","-","SST"]],"Pacific/Apia":[["-753.0666666666666","-","LMT","-2855692800000"],["686.9333333333334","-","LMT","-1830470400000"],["690","-","WSST","-599702400000"],["660","WS","S%sT","1325203200000"],["-780","WS","WS%sT"]],"Pacific/Guadalcanal":[["-639.8","-","LMT","-1806710400000"],["-660","-","SBT"]],"Pacific/Fakaofo":[["684.9333333333334","-","LMT","-2146003200000"],["660","-","TKT","1325203200000"],["-780","-","TKT"]],"Pacific/Tongatapu":[["-739.3333333333334","-","LMT","-2146003200000"],["-740","-","TOT","-883699200000"],["-780","-","TOT","946598400000"],["-780","Tonga","TO%sT"]],"Pacific/Funafuti":[["-716.8666666666667","-","LMT","-2146003200000"],["-720","-","TVT"]],"Pacific/Midway":[["709.4666666666666","-","LMT","-2146003200000"],["660","-","NST","-428544000000"],["660","1:00","NDT","-420681600000"],["660","-","NST","-86918400000"],["660","-","BST","438998400000"],["660","-","SST"]],"Pacific/Wake":[["-666.4666666666666","-","LMT","-2146003200000"],["-720","-","WAKT"]],"Pacific/Efate":[["-673.2666666666667","-","LMT","-1829347200000"],["-660","Vanuatu","VU%sT"]],"Pacific/Wallis":[["-735.3333333333334","-","LMT","-2146003200000"],["-720","-","WFT"]],"Africa/Asmera":"Africa/Asmara","Africa/Timbuktu":"Africa/Abidjan","America/Argentina/ComodRivadavia":"America/Argentina/Catamarca","America/Atka":"America/Adak","America/Buenos_Aires":"America/Argentina/Buenos_Aires","America/Catamarca":"America/Argentina/Catamarca","America/Coral_Harbour":"America/Atikokan","America/Cordoba":"America/Argentina/Cordoba","America/Ensenada":"America/Tijuana","America/Fort_Wayne":"America/Indiana/Indianapolis","America/Indianapolis":"America/Indiana/Indianapolis","America/Jujuy":"America/Argentina/Jujuy","America/Knox_IN":"America/Indiana/Knox","America/Louisville":"America/Kentucky/Louisville","America/Mendoza":"America/Argentina/Mendoza","America/Porto_Acre":"America/Rio_Branco","America/Rosario":"America/Argentina/Cordoba","America/Shiprock":"America/Denver","America/Virgin":"America/Port_of_Spain","Antarctica/South_Pole":"Pacific/Auckland","Asia/Ashkhabad":"Asia/Ashgabat","Asia/Calcutta":"Asia/Kolkata","Asia/Chongqing":"Asia/Shanghai","Asia/Chungking":"Asia/Shanghai","Asia/Dacca":"Asia/Dhaka","Asia/Harbin":"Asia/Shanghai","Asia/Kashgar":"Asia/Urumqi","Asia/Katmandu":"Asia/Kathmandu","Asia/Macao":"Asia/Macau","Asia/Saigon":"Asia/Ho_Chi_Minh","Asia/Tel_Aviv":"Asia/Jerusalem","Asia/Thimbu":"Asia/Thimphu","Asia/Ujung_Pandang":"Asia/Makassar","Asia/Ulan_Bator":"Asia/Ulaanbaatar","Atlantic/Faeroe":"Atlantic/Faroe","Atlantic/Jan_Mayen":"Europe/Oslo","Australia/ACT":"Australia/Sydney","Australia/Canberra":"Australia/Sydney","Australia/LHI":"Australia/Lord_Howe","Australia/NSW":"Australia/Sydney","Australia/North":"Australia/Darwin","Australia/Queensland":"Australia/Brisbane","Australia/South":"Australia/Adelaide","Australia/Tasmania":"Australia/Hobart","Australia/Victoria":"Australia/Melbourne","Australia/West":"Australia/Perth","Australia/Yancowinna":"Australia/Broken_Hill","Brazil/Acre":"America/Rio_Branco","Brazil/DeNoronha":"America/Noronha","Brazil/East":"America/Sao_Paulo","Brazil/West":"America/Manaus","Canada/Atlantic":"America/Halifax","Canada/Central":"America/Winnipeg","Canada/East-Saskatchewan":"America/Regina","Canada/Eastern":"America/Toronto","Canada/Mountain":"America/Edmonton","Canada/Newfoundland":"America/St_Johns","Canada/Pacific":"America/Vancouver","Canada/Saskatchewan":"America/Regina","Canada/Yukon":"America/Whitehorse","Chile/Continental":"America/Santiago","Chile/EasterIsland":"Pacific/Easter",Cuba:"America/Havana",Egypt:"Africa/Cairo",Eire:"Europe/Dublin","Europe/Belfast":"Europe/London","Europe/Tiraspol":"Europe/Chisinau",GB:"Europe/London","GB-Eire":"Europe/London","GMT+0":"Etc/GMT","GMT-0":"Etc/GMT",GMT0:"Etc/GMT",Greenwich:"Etc/GMT",Hongkong:"Asia/Hong_Kong",Iceland:"Atlantic/Reykjavik",Iran:"Asia/Tehran",Israel:"Asia/Jerusalem",Jamaica:"America/Jamaica",Japan:"Asia/Tokyo",Kwajalein:"Pacific/Kwajalein",Libya:"Africa/Tripoli","Mexico/BajaNorte":"America/Tijuana","Mexico/BajaSur":"America/Mazatlan","Mexico/General":"America/Mexico_City",NZ:"Pacific/Auckland","NZ-CHAT":"Pacific/Chatham",Navajo:"America/Denver",PRC:"Asia/Shanghai","Pacific/Ponape":"Pacific/Pohnpei","Pacific/Samoa":"Pacific/Pago_Pago","Pacific/Truk":"Pacific/Chuuk","Pacific/Yap":"Pacific/Chuuk",Poland:"Europe/Warsaw",Portugal:"Europe/Lisbon",ROC:"Asia/Taipei",ROK:"Asia/Seoul",Singapore:"Asia/Singapore",Turkey:"Europe/Istanbul",UCT:"Etc/UCT","US/Alaska":"America/Anchorage","US/Aleutian":"America/Adak","US/Arizona":"America/Phoenix","US/Central":"America/Chicago","US/East-Indiana":"America/Indiana/Indianapolis","US/Eastern":"America/New_York","US/Hawaii":"Pacific/Honolulu","US/Indiana-Starke":"America/Indiana/Knox","US/Michigan":"America/Detroit","US/Mountain":"America/Denver","US/Pacific":"America/Los_Angeles","US/Samoa":"Pacific/Pago_Pago",UTC:"Etc/UTC",Universal:"Etc/UTC","W-SU":"Europe/Moscow",Zulu:"Etc/UTC","Etc/GMT":[["0","-","GMT"]],"Etc/UTC":[["0","-","UTC"]],"Etc/UCT":[["0","-","UCT"]],GMT:"Etc/GMT","Etc/Universal":"Etc/UTC","Etc/Zulu":"Etc/UTC","Etc/Greenwich":"Etc/GMT","Etc/GMT-0":"Etc/GMT","Etc/GMT+0":"Etc/GMT","Etc/GMT0":"Etc/GMT","Etc/GMT-14":[["-840","-","GMT-14"]],"Etc/GMT-13":[["-780","-","GMT-13"]],"Etc/GMT-12":[["-720","-","GMT-12"]],"Etc/GMT-11":[["-660","-","GMT-11"]],"Etc/GMT-10":[["-600","-","GMT-10"]],"Etc/GMT-9":[["-540","-","GMT-9"]],"Etc/GMT-8":[["-480","-","GMT-8"]],"Etc/GMT-7":[["-420","-","GMT-7"]],"Etc/GMT-6":[["-360","-","GMT-6"]],"Etc/GMT-5":[["-300","-","GMT-5"]],"Etc/GMT-4":[["-240","-","GMT-4"]],"Etc/GMT-3":[["-180","-","GMT-3"]],"Etc/GMT-2":[["-120","-","GMT-2"]],"Etc/GMT-1":[["-60","-","GMT-1"]],"Etc/GMT+1":[["60","-","GMT+1"]],"Etc/GMT+2":[["120","-","GMT+2"]],"Etc/GMT+3":[["180","-","GMT+3"]],"Etc/GMT+4":[["240","-","GMT+4"]],"Etc/GMT+5":[["300","-","GMT+5"]],"Etc/GMT+6":[["360","-","GMT+6"]],"Etc/GMT+7":[["420","-","GMT+7"]],"Etc/GMT+8":[["480","-","GMT+8"]],"Etc/GMT+9":[["540","-","GMT+9"]],"Etc/GMT+10":[["600","-","GMT+10"]],
"Etc/GMT+11":[["660","-","GMT+11"]],"Etc/GMT+12":[["720","-","GMT+12"]],"Europe/London":[["1.25","-","LMT","-3852662400000"],["0","GB-Eire","%s","-37238400000"],["-60","-","BST","57722400000"],["0","GB-Eire","%s","851990400000"],["0","EU","GMT/BST"]],"Europe/Jersey":"Europe/London","Europe/Guernsey":"Europe/London","Europe/Isle_of_Man":"Europe/London","Europe/Dublin":[["25","-","LMT","-2821651200000"],["25.35","-","DMT","-1691964000000"],["25.35","1:00","IST","-1680472800000"],["0","GB-Eire","%s","-1517011200000"],["0","GB-Eire","GMT/IST","-942012000000"],["0","1:00","IST","-733356000000"],["0","-","GMT","-719445600000"],["0","1:00","IST","-699487200000"],["0","-","GMT","-684972000000"],["0","GB-Eire","GMT/IST","-37238400000"],["-60","-","IST","57722400000"],["0","GB-Eire","GMT/IST","851990400000"],["0","EU","GMT/IST"]],WET:[["0","EU","WE%sT"]],CET:[["-60","C-Eur","CE%sT"]],MET:[["-60","C-Eur","ME%sT"]],EET:[["-120","EU","EE%sT"]],"Europe/Tirane":[["-79.33333333333333","-","LMT","-1735776000000"],["-60","-","CET","-932342400000"],["-60","Albania","CE%sT","457488000000"],["-60","EU","CE%sT"]],"Europe/Andorra":[["-6.066666666666667","-","LMT","-2146003200000"],["0","-","WET","-733881600000"],["-60","-","CET","481082400000"],["-60","EU","CE%sT"]],"Europe/Vienna":[["-65.35","-","LMT","-2422051200000"],["-60","C-Eur","CE%sT","-1546387200000"],["-60","Austria","CE%sT","-938901600000"],["-60","C-Eur","CE%sT","-781048800000"],["-60","1:00","CEST","-780184800000"],["-60","-","CET","-725932800000"],["-60","Austria","CE%sT","378604800000"],["-60","EU","CE%sT"]],"Europe/Minsk":[["-110.26666666666667","-","LMT","-2808604800000"],["-110","-","MMT","-1441152000000"],["-120","-","EET","-1247529600000"],["-180","-","MSK","-899769600000"],["-60","C-Eur","CE%sT","-804643200000"],["-180","Russia","MSK/MSD","662601600000"],["-180","-","MSK","670384800000"],["-120","1:00","EEST","686109600000"],["-120","-","EET","701827200000"],["-120","1:00","EEST","717552000000"],["-120","Russia","EE%sT","1301191200000"],["-180","-","FET"]],"Europe/Brussels":[["-17.5","-","LMT","-2808604800000"],["-17.5","-","BMT","-2450952000000"],["0","-","WET","-1740355200000"],["-60","-","CET","-1693699200000"],["-60","C-Eur","CE%sT","-1613826000000"],["0","Belgium","WE%sT","-934668000000"],["-60","C-Eur","CE%sT","-799286400000"],["-60","Belgium","CE%sT","252374400000"],["-60","EU","CE%sT"]],"Europe/Sofia":[["-93.26666666666667","-","LMT","-2808604800000"],["-116.93333333333332","-","IMT","-2369520000000"],["-120","-","EET","-857250000000"],["-60","C-Eur","CE%sT","-757468800000"],["-60","-","CET","-781045200000"],["-120","-","EET","291769200000"],["-120","Bulg","EE%sT","401853600000"],["-120","C-Eur","EE%sT","694137600000"],["-120","E-Eur","EE%sT","883526400000"],["-120","EU","EE%sT"]],"Europe/Prague":[["-57.733333333333334","-","LMT","-3755376000000"],["-57.733333333333334","-","PMT","-2469398400000"],["-60","C-Eur","CE%sT","-798069600000"],["-60","Czech","CE%sT","315446400000"],["-60","EU","CE%sT"]],"Europe/Copenhagen":[["-50.333333333333336","-","LMT","-2493072000000"],["-50.333333333333336","-","CMT","-2398291200000"],["-60","Denmark","CE%sT","-857253600000"],["-60","C-Eur","CE%sT","-781048800000"],["-60","Denmark","CE%sT","347068800000"],["-60","EU","CE%sT"]],"Atlantic/Faroe":[["27.066666666666666","-","LMT","-1955750400000"],["0","-","WET","378604800000"],["0","EU","WE%sT"]],"America/Danmarkshavn":[["74.66666666666667","-","LMT","-1686096000000"],["180","-","WGT","323834400000"],["180","EU","WG%sT","851990400000"],["0","-","GMT"]],"America/Scoresbysund":[["87.86666666666667","-","LMT","-1686096000000"],["120","-","CGT","323834400000"],["120","C-Eur","CG%sT","354672000000"],["60","EU","EG%sT"]],"America/Godthab":[["206.93333333333334","-","LMT","-1686096000000"],["180","-","WGT","323834400000"],["180","EU","WG%sT"]],"America/Thule":[["275.1333333333333","-","LMT","-1686096000000"],["240","Thule","A%sT"]],"Europe/Tallinn":[["-99","-","LMT","-2808604800000"],["-99","-","TMT","-1638316800000"],["-60","C-Eur","CE%sT","-1593820800000"],["-99","-","TMT","-1535932800000"],["-120","-","EET","-927936000000"],["-180","-","MSK","-892944000000"],["-60","C-Eur","CE%sT","-797644800000"],["-180","Russia","MSK/MSD","606880800000"],["-120","1:00","EEST","622605600000"],["-120","C-Eur","EE%sT","906422400000"],["-120","EU","EE%sT","941414400000"],["-120","-","EET","1014249600000"],["-120","EU","EE%sT"]],"Europe/Helsinki":[["-99.81666666666668","-","LMT","-2890252800000"],["-99.81666666666668","-","HMT","-1535932800000"],["-120","Finland","EE%sT","441676800000"],["-120","EU","EE%sT"]],"Europe/Mariehamn":"Europe/Helsinki","Europe/Paris":[["-9.35","-","LMT","-2486678340000"],["-9.35","-","PMT","-1855958340000"],["0","France","WE%sT","-932432400000"],["-60","C-Eur","CE%sT","-800064000000"],["0","France","WE%sT","-766616400000"],["-60","France","CE%sT","252374400000"],["-60","EU","CE%sT"]],"Europe/Berlin":[["-53.46666666666666","-","LMT","-2422051200000"],["-60","C-Eur","CE%sT","-776556000000"],["-60","SovietZone","CE%sT","-725932800000"],["-60","Germany","CE%sT","347068800000"],["-60","EU","CE%sT"]],"Europe/Busingen":"Europe/Zurich","Europe/Gibraltar":[["21.4","-","LMT","-2821651200000"],["0","GB-Eire","%s","-401320800000"],["-60","-","CET","410140800000"],["-60","EU","CE%sT"]],"Europe/Athens":[["-94.86666666666667","-","LMT","-2344636800000"],["-94.86666666666667","-","AMT","-1686095940000"],["-120","Greece","EE%sT","-904867200000"],["-60","Greece","CE%sT","-812419200000"],["-120","Greece","EE%sT","378604800000"],["-120","EU","EE%sT"]],"Europe/Budapest":[["-76.33333333333333","-","LMT","-2500934400000"],["-60","C-Eur","CE%sT","-1609545600000"],["-60","Hungary","CE%sT","-906768000000"],["-60","C-Eur","CE%sT","-757468800000"],["-60","Hungary","CE%sT","338954400000"],["-60","EU","CE%sT"]],"Atlantic/Reykjavik":[["87.4","-","LMT","-4165603200000"],["87.8","-","RMT","-1925078400000"],["60","Iceland","IS%sT","-54774000000"],["0","-","GMT"]],"Europe/Rome":[["-49.93333333333334","-","LMT","-3259094400000"],["-49.93333333333334","-","RMT","-2403561600000"],["-60","Italy","CE%sT","-857253600000"],["-60","C-Eur","CE%sT","-804816000000"],["-60","Italy","CE%sT","347068800000"],["-60","EU","CE%sT"]],"Europe/Vatican":"Europe/Rome","Europe/San_Marino":"Europe/Rome","Europe/Riga":[["-96.56666666666668","-","LMT","-2808604800000"],["-96.56666666666668","-","RMT","-1632002400000"],["-96.56666666666668","1:00","LST","-1618693200000"],["-96.56666666666668","-","RMT","-1601676000000"],["-96.56666666666668","1:00","LST","-1597266000000"],["-96.56666666666668","-","RMT","-1377302400000"],["-120","-","EET","-928022400000"],["-180","-","MSK","-899510400000"],["-60","C-Eur","CE%sT","-795830400000"],["-180","Russia","MSK/MSD","604720800000"],["-120","1:00","EEST","620618400000"],["-120","Latvia","EE%sT","853804800000"],["-120","EU","EE%sT","951782400000"],["-120","-","EET","978393600000"],["-120","EU","EE%sT"]],"Europe/Vaduz":"Europe/Zurich","Europe/Vilnius":[["-101.26666666666667","-","LMT","-2808604800000"],["-84","-","WMT","-1641081600000"],["-95.6","-","KMT","-1585094400000"],["-60","-","CET","-1561248000000"],["-120","-","EET","-1553558400000"],["-60","-","CET","-928195200000"],["-180","-","MSK","-900115200000"],["-60","C-Eur","CE%sT","-802137600000"],["-180","Russia","MSK/MSD","670384800000"],["-120","1:00","EEST","686109600000"],["-120","C-Eur","EE%sT","915062400000"],["-120","-","EET","891133200000"],["-60","EU","CE%sT","941331600000"],["-120","-","EET","1041379200000"],["-120","EU","EE%sT"]],"Europe/Luxembourg":[["-24.6","-","LMT","-2069712000000"],["-60","Lux","CE%sT","-1612656000000"],["0","Lux","WE%sT","-1269813600000"],["0","Belgium","WE%sT","-935182800000"],["-60","C-Eur","WE%sT","-797979600000"],["-60","Belgium","CE%sT","252374400000"],["-60","EU","CE%sT"]],"Europe/Malta":[["-58.06666666666666","-","LMT","-2403475200000"],["-60","Italy","CE%sT","-857253600000"],["-60","C-Eur","CE%sT","-781048800000"],["-60","Italy","CE%sT","102384000000"],["-60","Malta","CE%sT","378604800000"],["-60","EU","CE%sT"]],"Europe/Chisinau":[["-115.33333333333333","-","LMT","-2808604800000"],["-115","-","CMT","-1637107200000"],["-104.4","-","BMT","-1213142400000"],["-120","Romania","EE%sT","-927158400000"],["-120","1:00","EEST","-898128000000"],["-60","C-Eur","CE%sT","-800150400000"],["-180","Russia","MSK/MSD","662601600000"],["-180","-","MSK","641952000000"],["-120","-","EET","694137600000"],["-120","Russia","EE%sT","725760000000"],["-120","E-Eur","EE%sT","883526400000"],["-120","EU","EE%sT"]],"Europe/Monaco":[["-29.53333333333333","-","LMT","-2486678400000"],["-9.35","-","PMT","-1855958400000"],["0","France","WE%sT","-766616400000"],["-60","France","CE%sT","252374400000"],["-60","EU","CE%sT"]],"Europe/Amsterdam":[["-19.53333333333333","-","LMT","-4228761600000"],["-19.53333333333333","Neth","%s","-1025740800000"],["-20","Neth","NE%sT","-935020800000"],["-60","C-Eur","CE%sT","-781048800000"],["-60","Neth","CE%sT","252374400000"],["-60","EU","CE%sT"]],"Europe/Oslo":[["-43","-","LMT","-2366755200000"],["-60","Norway","CE%sT","-927507600000"],["-60","C-Eur","CE%sT","-781048800000"],["-60","Norway","CE%sT","347068800000"],["-60","EU","CE%sT"]],"Arctic/Longyearbyen":"Europe/Oslo","Europe/Warsaw":[["-84","-","LMT","-2808604800000"],["-84","-","WMT","-1717027200000"],["-60","C-Eur","CE%sT","-1618693200000"],["-120","Poland","EE%sT","-1501718400000"],["-60","Poland","CE%sT","-931730400000"],["-60","C-Eur","CE%sT","-796867200000"],["-60","Poland","CE%sT","252374400000"],["-60","W-Eur","CE%sT","599529600000"],["-60","EU","CE%sT"]],"Europe/Lisbon":[["36.75","-","LMT","-2682374400000"],["36.75","-","LMT","-1830384000000"],["0","Port","WE%sT","-118274400000"],["-60","-","CET","212547600000"],["0","Port","WE%sT","433299600000"],["0","W-Eur","WE%sT","717555600000"],["-60","EU","CE%sT","828234000000"],["0","EU","WE%sT"]],"Atlantic/Azores":[["102.66666666666667","-","LMT","-2682374400000"],["114.53333333333333","-","HMT","-1830384000000"],["120","Port","AZO%sT","-118274400000"],["60","Port","AZO%sT","433299600000"],["60","W-Eur","AZO%sT","717555600000"],["0","EU","WE%sT","733280400000"],["60","EU","AZO%sT"]],"Atlantic/Madeira":[["67.6","-","LMT","-2682374400000"],["67.6","-","FMT","-1830384000000"],["60","Port","MAD%sT","-118274400000"],["0","Port","WE%sT","433299600000"],["0","EU","WE%sT"]],"Europe/Bucharest":[["-104.4","-","LMT","-2469398400000"],["-104.4","-","BMT","-1213142400000"],["-120","Romania","EE%sT","354679200000"],["-120","C-Eur","EE%sT","694137600000"],["-120","Romania","EE%sT","788832000000"],["-120","E-Eur","EE%sT","883526400000"],["-120","EU","EE%sT"]],"Europe/Kaliningrad":[["-82","-","LMT","-2422051200000"],["-60","C-Eur","CE%sT","-757468800000"],["-120","Poland","CE%sT","-725932800000"],["-180","Russia","MSK/MSD","670384800000"],["-120","Russia","EE%sT","1301191200000"],["-180","-","FET","1414288800000"],["-120","-","EET"]],"Europe/Moscow":[["-150.28333333333333","-","LMT","-2808604800000"],["-150.28333333333333","-","MMT","-1688256000000"],["-151.31666666666666","Russia","%s","-1593813600000"],["-180","Russia","%s","-1522713600000"],["-180","Russia","MSK/MSD","-1491177600000"],["-120","-","EET","-1247529600000"],["-180","Russia","MSK/MSD","670384800000"],["-120","Russia","EE%sT","695786400000"],["-180","Russia","MSK/MSD","1301191200000"],["-240","-","MSK","1414288800000"],["-180","-","MSK"]],"Europe/Simferopol":[["-136.4","-","LMT","-2808604800000"],["-136","-","SMT","-1441152000000"],["-120","-","EET","-1247529600000"],["-180","-","MSK","-888883200000"],["-60","C-Eur","CE%sT","-811641600000"],["-180","Russia","MSK/MSD","662601600000"],["-180","-","MSK","646797600000"],["-120","-","EET","725760000000"],["-120","E-Eur","EE%sT","767750400000"],["-180","E-Eur","MSK/MSD","828241200000"],["-180","1:00","MSD","846385200000"],["-180","Russia","MSK/MSD","883526400000"],["-180","-","MSK","857178000000"],["-120","EU","EE%sT","1396144800000"],["-240","-","MSK","1414288800000"],["-180","-","MSK"]],"Europe/Volgograd":[["-177.66666666666666","-","LMT","-1577750400000"],["-180","-","TSAT","-1411862400000"],["-180","-","STAT","-1247529600000"],["-240","-","STAT","-256867200000"],["-240","Russia","VOL%sT","606880800000"],["-180","Russia","VOL%sT","670384800000"],["-240","-","VOLT","701834400000"],["-180","Russia","MSK","1301191200000"],["-240","-","MSK","1414288800000"],["-180","-","MSK"]],"Europe/Samara":[["-200.33333333333334","-","LMT","-1593813600000"],["-180","-","SAMT","-1247529600000"],["-240","-","SAMT","-1102291200000"],["-240","Russia","KUY%sT","606880800000"],["-180","Russia","MSK/MSD","670384800000"],["-120","Russia","EE%sT","686109600000"],["-180","-","KUYT","687927600000"],["-240","Russia","SAM%sT","1269741600000"],["-180","Russia","SAM%sT","1301191200000"],["-240","-","SAMT"]],"Asia/Yekaterinburg":[["-242.55","-","LMT","-1688256000000"],["-225.08333333333334","-","PMT","-1592596800000"],["-240","-","SVET","-1247529600000"],["-300","Russia","SVE%sT","670384800000"],["-240","Russia","SVE%sT","695786400000"],["-300","Russia","YEK%sT","1301191200000"],["-360","-","YEKT","1414288800000"],["-300","-","YEKT"]],"Asia/Omsk":[["-293.5","-","LMT","-1582070400000"],["-300","-","OMST","-1247529600000"],["-360","Russia","OMS%sT","670384800000"],["-300","Russia","OMS%sT","695786400000"],["-360","Russia","OMS%sT","1301191200000"],["-420","-","OMST","1414288800000"],["-360","-","OMST"]],"Asia/Novosibirsk":[["-331.6666666666667","-","LMT","-1579456800000"],["-360","-","NOVT","-1247529600000"],["-420","Russia","NOV%sT","670384800000"],["-360","Russia","NOV%sT","695786400000"],["-420","Russia","NOV%sT","738115200000"],["-360","Russia","NOV%sT","1301191200000"],["-420","-","NOVT","1414288800000"],["-360","-","NOVT"]],"Asia/Novokuznetsk":[["-348.8","-","LMT","-1441238400000"],["-360","-","KRAT","-1247529600000"],["-420","Russia","KRA%sT","670384800000"],["-360","Russia","KRA%sT","695786400000"],["-420","Russia","KRA%sT","1269741600000"],["-360","Russia","NOV%sT","1301191200000"],["-420","-","NOVT","1414288800000"],["-420","-","KRAT"]],"Asia/Krasnoyarsk":[["-371.43333333333334","-","LMT","-1577491200000"],["-360","-","KRAT","-1247529600000"],["-420","Russia","KRA%sT","670384800000"],["-360","Russia","KRA%sT","695786400000"],["-420","Russia","KRA%sT","1301191200000"],["-480","-","KRAT","1414288800000"],["-420","-","KRAT"]],"Asia/Irkutsk":[["-417.0833333333333","-","LMT","-2808604800000"],["-417.0833333333333","-","IMT","-1575849600000"],["-420","-","IRKT","-1247529600000"],["-480","Russia","IRK%sT","670384800000"],["-420","Russia","IRK%sT","695786400000"],["-480","Russia","IRK%sT","1301191200000"],["-540","-","IRKT","1414288800000"],["-480","-","IRKT"]],"Asia/Chita":[["-453.8666666666667","-","LMT","-1579392000000"],["-480","-","YAKT","-1247529600000"],["-540","Russia","YAK%sT","670384800000"],["-480","Russia","YAK%sT","695786400000"],["-540","Russia","YAK%sT","1301191200000"],["-600","-","YAKT","1414288800000"],["-480","-","IRKT"]],"Asia/Yakutsk":[["-518.9666666666667","-","LMT","-1579392000000"],["-480","-","YAKT","-1247529600000"],["-540","Russia","YAK%sT","670384800000"],["-480","Russia","YAK%sT","695786400000"],["-540","Russia","YAK%sT","1301191200000"],["-600","-","YAKT","1414288800000"],["-540","-","YAKT"]],"Asia/Vladivostok":[["-527.5166666666667","-","LMT","-1487289600000"],["-540","-","VLAT","-1247529600000"],["-600","Russia","VLA%sT","670384800000"],["-540","Russia","VLA%sT","695786400000"],["-600","Russia","VLA%sT","1301191200000"],["-660","-","VLAT","1414288800000"],["-600","-","VLAT"]],"Asia/Khandyga":[["-542.2166666666666","-","LMT","-1579392000000"],["-480","-","YAKT","-1247529600000"],["-540","Russia","YAK%sT","670384800000"],["-480","Russia","YAK%sT","695786400000"],["-540","Russia","YAK%sT","1104451200000"],["-600","Russia","VLA%sT","1301191200000"],["-660","-","VLAT","1315872000000"],["-600","-","YAKT","1414288800000"],["-540","-","YAKT"]],"Asia/Sakhalin":[["-570.8","-","LMT","-2031004800000"],["-540","-","JCST","-1017792000000"],["-540","-","JST","-768528000000"],["-660","Russia","SAK%sT","670384800000"],["-600","Russia","SAK%sT","695786400000"],["-660","Russia","SAK%sT","857181600000"],["-600","Russia","SAK%sT","1301191200000"],["-660","-","SAKT","1414288800000"],["-600","-","SAKT"]],"Asia/Magadan":[["-603.2","-","LMT","-1441152000000"],["-600","-","MAGT","-1247529600000"],["-660","Russia","MAG%sT","670384800000"],["-600","Russia","MAG%sT","695786400000"],["-660","Russia","MAG%sT","1301191200000"],["-720","-","MAGT","1414288800000"],["-600","-","MAGT"]],"Asia/Srednekolymsk":[["-614.8666666666667","-","LMT","-1441152000000"],["-600","-","MAGT","-1247529600000"],["-660","Russia","MAG%sT","670384800000"],["-600","Russia","MAG%sT","695786400000"],["-660","Russia","MAG%sT","1301191200000"],["-720","-","MAGT","1414288800000"],["-660","-","SRET"]],"Asia/Ust-Nera":[["-572.9","-","LMT","-1579392000000"],["-480","-","YAKT","-1247529600000"],["-540","Russia","YAKT","354931200000"],["-660","Russia","MAG%sT","670384800000"],["-600","Russia","MAG%sT","695786400000"],["-660","Russia","MAG%sT","1301191200000"],["-720","-","MAGT","1315872000000"],["-660","-","VLAT","1414288800000"],["-600","-","VLAT"]],"Asia/Kamchatka":[["-634.6","-","LMT","-1487721600000"],["-660","-","PETT","-1247529600000"],["-720","Russia","PET%sT","670384800000"],["-660","Russia","PET%sT","695786400000"],["-720","Russia","PET%sT","1269741600000"],["-660","Russia","PET%sT","1301191200000"],["-720","-","PETT"]],"Asia/Anadyr":[["-709.9333333333334","-","LMT","-1441152000000"],["-720","-","ANAT","-1247529600000"],["-780","Russia","ANA%sT","386467200000"],["-720","Russia","ANA%sT","670384800000"],["-660","Russia","ANA%sT","695786400000"],["-720","Russia","ANA%sT","1269741600000"],["-660","Russia","ANA%sT","1301191200000"],["-720","-","ANAT"]],"Europe/Belgrade":[["-82","-","LMT","-2682374400000"],["-60","-","CET","-905821200000"],["-60","C-Eur","CE%sT","-757468800000"],["-60","-","CET","-777938400000"],["-60","1:00","CEST","-766620000000"],["-60","-","CET","407203200000"],["-60","EU","CE%sT"]],"Europe/Ljubljana":"Europe/Belgrade","Europe/Podgorica":"Europe/Belgrade","Europe/Sarajevo":"Europe/Belgrade","Europe/Skopje":"Europe/Belgrade","Europe/Zagreb":"Europe/Belgrade","Europe/Bratislava":"Europe/Prague","Europe/Madrid":[["14.733333333333334","-","LMT","-2177452800000"],["0","Spain","WE%sT","-733881600000"],["-60","Spain","CE%sT","315446400000"],["-60","EU","CE%sT"]],"Africa/Ceuta":[["21.26666666666667","-","LMT","-2146003200000"],["0","-","WET","-1630112400000"],["0","1:00","WEST","-1616806800000"],["0","-","WET","-1420156800000"],["0","Spain","WE%sT","-1262390400000"],["0","SpainAfrica","WE%sT","448243200000"],["-60","-","CET","536371200000"],["-60","EU","CE%sT"]],"Atlantic/Canary":[["61.6","-","LMT","-1509667200000"],["60","-","CANT","-733878000000"],["0","-","WET","323827200000"],["0","1:00","WEST","338947200000"],["0","EU","WE%sT"]],"Europe/Stockholm":[["-72.2","-","LMT","-2871676800000"],["-60.233333333333334","-","SET","-2208988800000"],["-60","-","CET","-1692493200000"],["-60","1:00","CEST","-1680476400000"],["-60","-","CET","347068800000"],["-60","EU","CE%sT"]],"Europe/Zurich":[["-34.13333333333333","-","LMT","-3675196800000"],["-29.76666666666667","-","BMT","-2385244800000"],["-60","Swiss","CE%sT","378604800000"],["-60","EU","CE%sT"]],"Europe/Istanbul":[["-115.86666666666667","-","LMT","-2808604800000"],["-116.93333333333332","-","IMT","-1869868800000"],["-120","Turkey","EE%sT","277257600000"],["-180","Turkey","TR%sT","482803200000"],["-120","Turkey","EE%sT","1199059200000"],["-120","EU","EE%sT","1301187600000"],["-120","-","EET","1301274000000"],["-120","EU","EE%sT","1396141200000"],["-120","-","EET","1396227600000"],["-120","EU","EE%sT"]],"Asia/Istanbul":"Europe/Istanbul","Europe/Kiev":[["-122.06666666666668","-","LMT","-2808604800000"],["-122.06666666666668","-","KMT","-1441152000000"],["-120","-","EET","-1247529600000"],["-180","-","MSK","-892512000000"],["-60","C-Eur","CE%sT","-825379200000"],["-180","Russia","MSK/MSD","646797600000"],["-120","1:00","EEST","686113200000"],["-120","E-Eur","EE%sT","820368000000"],["-120","EU","EE%sT"]],"Europe/Uzhgorod":[["-89.2","-","LMT","-2500934400000"],["-60","-","CET","-915235200000"],["-60","C-Eur","CE%sT","-796867200000"],["-60","1:00","CEST","-794707200000"],["-60","-","CET","-773452800000"],["-180","Russia","MSK/MSD","662601600000"],["-180","-","MSK","646797600000"],["-60","-","CET","670388400000"],["-120","-","EET","725760000000"],["-120","E-Eur","EE%sT","820368000000"],["-120","EU","EE%sT"]],"Europe/Zaporozhye":[["-140.66666666666666","-","LMT","-2808604800000"],["-140","-","CUT","-1441152000000"],["-120","-","EET","-1247529600000"],["-180","-","MSK","-894758400000"],["-60","C-Eur","CE%sT","-826416000000"],["-180","Russia","MSK/MSD","670384800000"],["-120","E-Eur","EE%sT","820368000000"],["-120","EU","EE%sT"]],EST:[["300","-","EST"]],MST:[["420","-","MST"]],HST:[["600","-","HST"]],EST5EDT:[["300","US","E%sT"]],CST6CDT:[["360","US","C%sT"]],MST7MDT:[["420","US","M%sT"]],PST8PDT:[["480","US","P%sT"]],"America/New_York":[["296.0333333333333","-","LMT","-2717668562000"],["300","US","E%sT","-1546387200000"],["300","NYC","E%sT","-852163200000"],["300","US","E%sT","-725932800000"],["300","NYC","E%sT","-63244800000"],["300","US","E%sT"]],"America/Chicago":[["350.6","-","LMT","-2717668236000"],["360","US","C%sT","-1546387200000"],["360","Chicago","C%sT","-1067810400000"],["300","-","EST","-1045432800000"],["360","Chicago","C%sT","-852163200000"],["360","US","C%sT","-725932800000"],["360","Chicago","C%sT","-63244800000"],["360","US","C%sT"]],"America/North_Dakota/Center":[["405.2","-","LMT","-2717667912000"],["420","US","M%sT","719978400000"],["360","US","C%sT"]],"America/North_Dakota/New_Salem":[["405.65","-","LMT","-2717667939000"],["420","US","M%sT","1067133600000"],["360","US","C%sT"]],"America/North_Dakota/Beulah":[["407.1166666666667","-","LMT","-2717668027000"],["420","US","M%sT","1289095200000"],["360","US","C%sT"]],"America/Denver":[["419.93333333333334","-","LMT","-2717668796000"],["420","US","M%sT","-1546387200000"],["420","Denver","M%sT","-852163200000"],["420","US","M%sT","-725932800000"],["420","Denver","M%sT","-63244800000"],["420","US","M%sT"]],"America/Los_Angeles":[["472.9666666666667","-","LMT","-2717668378000"],["480","US","P%sT","-725932800000"],["480","CA","P%sT","-63244800000"],["480","US","P%sT"]],"America/Juneau":[["-902.3166666666666","-","LMT","-3225312000000"],["537.6833333333334","-","LMT","-2188987200000"],["480","-","PST","-852163200000"],["480","US","P%sT","-725932800000"],["480","-","PST","-86400000"],["480","US","P%sT","325648800000"],["540","US","Y%sT","341373600000"],["480","US","P%sT","436327200000"],["540","US","Y%sT","438998400000"],["540","US","AK%sT"]],"America/Sitka":[["-898.7833333333334","-","LMT","-3225312000000"],["541.2166666666666","-","LMT","-2188987200000"],["480","-","PST","-852163200000"],["480","US","P%sT","-725932800000"],["480","-","PST","-86400000"],["480","US","P%sT","436327200000"],["540","US","Y%sT","438998400000"],["540","US","AK%sT"]],"America/Metlakatla":[["-913.7","-","LMT","-3225312000000"],["526.3","-","LMT","-2188987200000"],["480","-","PST","-852163200000"],["480","US","P%sT","-725932800000"],["480","-","PST","-86400000"],["480","US","P%sT","436327200000"],["480","-","PST"]],"America/Yakutat":[["-881.0833333333334","-","LMT","-3225312000000"],["558.9166666666666","-","LMT","-2188987200000"],["540","-","YST","-852163200000"],["540","US","Y%sT","-725932800000"],["540","-","YST","-86400000"],["540","US","Y%sT","438998400000"],["540","US","AK%sT"]],"America/Anchorage":[["-840.4","-","LMT","-3225312000000"],["599.6","-","LMT","-2188987200000"],["600","-","CAT","-852163200000"],["600","US","CAT/CAWT","-769395600000"],["600","US","CAT/CAPT","-725932800000"],["600","-","CAT","-86918400000"],["600","-","AHST","-86400000"],["600","US","AH%sT","436327200000"],["540","US","Y%sT","438998400000"],["540","US","AK%sT"]],"America/Nome":[["-778.35","-","LMT","-3225312000000"],["661.6333333333333","-","LMT","-2188987200000"],["660","-","NST","-852163200000"],["660","US","N%sT","-725932800000"],["660","-","NST","-86918400000"],["660","-","BST","-86400000"],["660","US","B%sT","436327200000"],["540","US","Y%sT","438998400000"],["540","US","AK%sT"]],"America/Adak":[["-733.35","-","LMT","-3225312000000"],["706.6333333333333","-","LMT","-2188987200000"],["660","-","NST","-852163200000"],["660","US","N%sT","-725932800000"],["660","-","NST","-86918400000"],["660","-","BST","-86400000"],["660","US","B%sT","436327200000"],["600","US","AH%sT","438998400000"],["600","US","HA%sT"]],"Pacific/Honolulu":[["631.4333333333334","-","LMT","-2334139200000"],["630","-","HST","-1157320800000"],["630","1:00","HDT","-1155470400000"],["630","-","HST","-880236000000"],["630","1:00","HDT","-765410400000"],["630","-","HST","-712188000000"],["600","-","HST"]],"Pacific/Johnston":"Pacific/Honolulu","America/Phoenix":[["448.3","-","LMT","-2717670498000"],["420","US","M%sT","-820540740000"],["420","-","MST","-812678340000"],["420","US","M%sT","-796867140000"],["420","-","MST","-63244800000"],["420","US","M%sT","-56246400000"],["420","-","MST"]],"America/Boise":[["464.81666666666666","-","LMT","-2717667889000"],["480","US","P%sT","-1471816800000"],["420","US","M%sT","157680000000"],["420","-","MST","129088800000"],["420","US","M%sT"]],"America/Indiana/Indianapolis":[["344.6333333333333","-","LMT","-2717667878000"],["360","US","C%sT","-1546387200000"],["360","Indianapolis","C%sT","-852163200000"],["360","US","C%sT","-725932800000"],["360","Indianapolis","C%sT","-463615200000"],["300","-","EST","-386805600000"],["360","-","CST","-368661600000"],["300","-","EST","-86400000"],["300","US","E%sT","62985600000"],["300","-","EST","1167523200000"],["300","US","E%sT"]],"America/Indiana/Marengo":[["345.3833333333333","-","LMT","-2717667923000"],["360","US","C%sT","-568166400000"],["360","Marengo","C%sT","-273708000000"],["300","-","EST","-86400000"],["300","US","E%sT","126669600000"],["360","1:00","CDT","152071200000"],["300","US","E%sT","220838400000"],["300","-","EST","1167523200000"],["300","US","E%sT"]],"America/Indiana/Vincennes":[["350.1166666666667","-","LMT","-2717668207000"],["360","US","C%sT","-725932800000"],["360","Vincennes","C%sT","-179359200000"],["300","-","EST","-86400000"],["300","US","E%sT","62985600000"],["300","-","EST","1143943200000"],["360","US","C%sT","1194141600000"],["300","US","E%sT"]],"America/Indiana/Tell_City":[["347.05","-","LMT","-2717668023000"],["360","US","C%sT","-725932800000"],["360","Perry","C%sT","-179359200000"],["300","-","EST","-86400000"],["300","US","E%sT","62985600000"],["300","-","EST","1143943200000"],["360","US","C%sT"]],"America/Indiana/Petersburg":[["349.1166666666667","-","LMT","-2717668147000"],["360","US","C%sT","-441936000000"],["360","Pike","C%sT","-147909600000"],["300","-","EST","-100130400000"],["360","US","C%sT","247024800000"],["300","-","EST","1143943200000"],["360","US","C%sT","1194141600000"],["300","US","E%sT"]],"America/Indiana/Knox":[["346.5","-","LMT","-2717667990000"],["360","US","C%sT","-694396800000"],["360","Starke","C%sT","-242258400000"],["300","-","EST","-195084000000"],["360","US","C%sT","688528800000"],["300","-","EST","1143943200000"],["360","US","C%sT"]],"America/Indiana/Winamac":[["346.4166666666667","-","LMT","-2717667985000"],["360","US","C%sT","-725932800000"],["360","Pulaski","C%sT","-273708000000"],["300","-","EST","-86400000"],["300","US","E%sT","62985600000"],["300","-","EST","1143943200000"],["360","US","C%sT","1173578400000"],["300","US","E%sT"]],"America/Indiana/Vevay":[["340.2666666666667","-","LMT","-2717667616000"],["360","US","C%sT","-495064800000"],["300","-","EST","-86400000"],["300","US","E%sT","126144000000"],["300","-","EST","1167523200000"],["300","US","E%sT"]],"America/Kentucky/Louisville":[["343.0333333333333","-","LMT","-2717667782000"],["360","US","C%sT","-1514851200000"],["360","Louisville","C%sT","-852163200000"],["360","US","C%sT","-725932800000"],["360","Louisville","C%sT","-266450400000"],["300","-","EST","-31622400000"],["300","US","E%sT","126669600000"],["360","1:00","CDT","152071200000"],["300","US","E%sT"]],"America/Kentucky/Monticello":[["339.4","-","LMT","-2717667564000"],["360","US","C%sT","-725932800000"],["360","-","CST","-31622400000"],["360","US","C%sT","972784800000"],["300","US","E%sT"]],"America/Detroit":[["332.18333333333334","-","LMT","-2019772800000"],["360","-","CST","-1724104800000"],["300","-","EST","-852163200000"],["300","US","E%sT","-725932800000"],["300","Detroit","E%sT","126144000000"],["300","US","E%sT","189216000000"],["300","-","EST","167796000000"],["300","US","E%sT"]],"America/Menominee":[["350.45","-","LMT","-2659780800000"],["360","US","C%sT","-725932800000"],["360","Menominee","C%sT","-21506400000"],["300","-","EST","104896800000"],["360","US","C%sT"]],"America/St_Johns":[["210.86666666666665","-","LMT","-2682374400000"],["210.86666666666665","StJohns","N%sT","-1609545600000"],["210.86666666666665","Canada","N%sT","-1578009600000"],["210.86666666666665","StJohns","N%sT","-1096934400000"],["210","StJohns","N%sT","-872380800000"],["210","Canada","N%sT","-725932800000"],["210","StJohns","N%sT","1320105600000"],["210","Canada","N%sT"]],"America/Goose_Bay":[["241.66666666666666","-","LMT","-2682374400000"],["210.86666666666665","-","NST","-1609545600000"],["210.86666666666665","Canada","N%sT","-1578009600000"],["210.86666666666665","-","NST","-1096934400000"],["210","-","NST","-1041465600000"],["210","StJohns","N%sT","-872380800000"],["210","Canada","N%sT","-725932800000"],["210","StJohns","N%sT","-119916000000"],["240","StJohns","A%sT","1320105600000"],["240","Canada","A%sT"]],"America/Halifax":[["254.4","-","LMT","-2131660800000"],["240","Halifax","A%sT","-1609545600000"],["240","Canada","A%sT","-1578009600000"],["240","Halifax","A%sT","-880236000000"],["240","Canada","A%sT","-725932800000"],["240","Halifax","A%sT","157680000000"],["240","Canada","A%sT"]],"America/Glace_Bay":[["239.8","-","LMT","-2131660800000"],["240","Canada","A%sT","-505008000000"],["240","Halifax","A%sT","-473472000000"],["240","-","AST","94608000000"],["240","Halifax","A%sT","157680000000"],["240","Canada","A%sT"]],"America/Moncton":[["259.1333333333333","-","LMT","-2715897600000"],["300","-","EST","-2131660800000"],["240","Canada","A%sT","-1136160000000"],["240","Moncton","A%sT","-852163200000"],["240","Canada","A%sT","-725932800000"],["240","Moncton","A%sT","126144000000"],["240","Canada","A%sT","757296000000"],["240","Moncton","A%sT","1199059200000"],["240","Canada","A%sT"]],"America/Blanc-Sablon":[["228.46666666666667","-","LMT","-2682374400000"],["240","Canada","A%sT","31449600000"],["240","-","AST"]],"America/Montreal":[["294.2666666666667","-","LMT","-2682374400000"],["300","Mont","E%sT","-1609545600000"],["300","Canada","E%sT","-1578009600000"],["300","Mont","E%sT","-880236000000"],["300","Canada","E%sT","-725932800000"],["300","Mont","E%sT","157680000000"],["300","Canada","E%sT"]],"America/Toronto":[["317.5333333333333","-","LMT","-2335305600000"],["300","Canada","E%sT","-1578009600000"],["300","Toronto","E%sT","-880236000000"],["300","Canada","E%sT","-725932800000"],["300","Toronto","E%sT","157680000000"],["300","Canada","E%sT"]],"America/Thunder_Bay":[["357","-","LMT","-2335305600000"],["360","-","CST","-1862006400000"],["300","-","EST","-852163200000"],["300","Canada","E%sT","31449600000"],["300","Toronto","E%sT","126144000000"],["300","-","EST","157680000000"],["300","Canada","E%sT"]],"America/Nipigon":[["353.06666666666666","-","LMT","-2335305600000"],["300","Canada","E%sT","-923270400000"],["300","1:00","EDT","-880236000000"],["300","Canada","E%sT"]],"America/Rainy_River":[["378.2666666666667","-","LMT","-2335305600000"],["360","Canada","C%sT","-923270400000"],["360","1:00","CDT","-880236000000"],["360","Canada","C%sT"]],"America/Atikokan":[["366.4666666666667","-","LMT","-2335305600000"],["360","Canada","C%sT","-923270400000"],["360","1:00","CDT","-880236000000"],["360","Canada","C%sT","-765410400000"],["300","-","EST"]],
"America/Winnipeg":[["388.6","-","LMT","-2602281600000"],["360","Winn","C%sT","1167523200000"],["360","Canada","C%sT"]],"America/Regina":[["418.6","-","LMT","-2030227200000"],["420","Regina","M%sT","-307749600000"],["360","-","CST"]],"America/Swift_Current":[["431.3333333333333","-","LMT","-2030227200000"],["420","Canada","M%sT","-749599200000"],["420","Regina","M%sT","-599702400000"],["420","Swift","M%sT","70941600000"],["360","-","CST"]],"America/Edmonton":[["453.8666666666667","-","LMT","-1998691200000"],["420","Edm","M%sT","567907200000"],["420","Canada","M%sT"]],"America/Vancouver":[["492.4666666666667","-","LMT","-2682374400000"],["480","Vanc","P%sT","567907200000"],["480","Canada","P%sT"]],"America/Dawson_Creek":[["480.93333333333334","-","LMT","-2682374400000"],["480","Canada","P%sT","-694396800000"],["480","Vanc","P%sT","83988000000"],["420","-","MST"]],"America/Creston":[["466.06666666666666","-","LMT","-2682374400000"],["420","-","MST","-1680480000000"],["480","-","PST","-1627862400000"],["420","-","MST"]],"America/Pangnirtung":[["0","-","zzz","-1514851200000"],["240","NT_YK","A%sT","796701600000"],["300","Canada","E%sT","941335200000"],["360","Canada","C%sT","972784800000"],["300","Canada","E%sT"]],"America/Iqaluit":[["0","-","zzz","-865296000000"],["300","NT_YK","E%sT","941335200000"],["360","Canada","C%sT","972784800000"],["300","Canada","E%sT"]],"America/Resolute":[["0","-","zzz","-704937600000"],["360","NT_YK","C%sT","972784800000"],["300","-","EST","986094000000"],["360","Canada","C%sT","1162087200000"],["300","-","EST","1173582000000"],["360","Canada","C%sT"]],"America/Rankin_Inlet":[["0","-","zzz","-378777600000"],["360","NT_YK","C%sT","972784800000"],["300","-","EST","986094000000"],["360","Canada","C%sT"]],"America/Cambridge_Bay":[["0","-","zzz","-1546387200000"],["420","NT_YK","M%sT","941335200000"],["360","Canada","C%sT","972784800000"],["300","-","EST","973382400000"],["360","-","CST","986094000000"],["420","Canada","M%sT"]],"America/Yellowknife":[["0","-","zzz","-1073088000000"],["420","NT_YK","M%sT","347068800000"],["420","Canada","M%sT"]],"America/Inuvik":[["0","-","zzz","-505008000000"],["480","NT_YK","P%sT","291780000000"],["420","NT_YK","M%sT","347068800000"],["420","Canada","M%sT"]],"America/Whitehorse":[["540.2","-","LMT","-2189030400000"],["540","NT_YK","Y%sT","-110584800000"],["480","NT_YK","P%sT","347068800000"],["480","Canada","P%sT"]],"America/Dawson":[["557.6666666666666","-","LMT","-2189030400000"],["540","NT_YK","Y%sT","120614400000"],["480","NT_YK","P%sT","347068800000"],["480","Canada","P%sT"]],"America/Cancun":[["347.06666666666666","-","LMT","-1514764024000"],["360","-","CST","377913600000"],["300","Mexico","E%sT","902023200000"],["360","Mexico","C%sT"]],"America/Merida":[["358.4666666666667","-","LMT","-1514764708000"],["360","-","CST","377913600000"],["300","-","EST","407635200000"],["360","Mexico","C%sT"]],"America/Matamoros":[["400","-","LMT","-1514767200000"],["360","-","CST","599529600000"],["360","US","C%sT","631065600000"],["360","Mexico","C%sT","1293753600000"],["360","US","C%sT"]],"America/Monterrey":[["401.2666666666667","-","LMT","-1514767276000"],["360","-","CST","599529600000"],["360","US","C%sT","631065600000"],["360","Mexico","C%sT"]],"America/Mexico_City":[["396.6","-","LMT","-1514763396000"],["420","-","MST","-1343091600000"],["360","-","CST","-1234828800000"],["420","-","MST","-1220317200000"],["360","-","CST","-1207180800000"],["420","-","MST","-1191369600000"],["360","Mexico","C%sT","1001815200000"],["360","-","CST","1014163200000"],["360","Mexico","C%sT"]],"America/Ojinaga":[["417.6666666666667","-","LMT","-1514764660000"],["420","-","MST","-1343091600000"],["360","-","CST","-1234828800000"],["420","-","MST","-1220317200000"],["360","-","CST","-1207180800000"],["420","-","MST","-1191369600000"],["360","-","CST","851990400000"],["360","Mexico","C%sT","915062400000"],["360","-","CST","891399600000"],["420","Mexico","M%sT","1293753600000"],["420","US","M%sT"]],"America/Chihuahua":[["424.3333333333333","-","LMT","-1514765060000"],["420","-","MST","-1343091600000"],["360","-","CST","-1234828800000"],["420","-","MST","-1220317200000"],["360","-","CST","-1207180800000"],["420","-","MST","-1191369600000"],["360","-","CST","851990400000"],["360","Mexico","C%sT","915062400000"],["360","-","CST","891399600000"],["420","Mexico","M%sT"]],"America/Hermosillo":[["443.8666666666667","-","LMT","-1514766232000"],["420","-","MST","-1343091600000"],["360","-","CST","-1234828800000"],["420","-","MST","-1220317200000"],["360","-","CST","-1207180800000"],["420","-","MST","-1191369600000"],["360","-","CST","-873849600000"],["420","-","MST","-661564800000"],["480","-","PST","31449600000"],["420","Mexico","M%sT","946598400000"],["420","-","MST"]],"America/Mazatlan":[["425.6666666666667","-","LMT","-1514765140000"],["420","-","MST","-1343091600000"],["360","-","CST","-1234828800000"],["420","-","MST","-1220317200000"],["360","-","CST","-1207180800000"],["420","-","MST","-1191369600000"],["360","-","CST","-873849600000"],["420","-","MST","-661564800000"],["480","-","PST","31449600000"],["420","Mexico","M%sT"]],"America/Bahia_Banderas":[["421","-","LMT","-1514764860000"],["420","-","MST","-1343091600000"],["360","-","CST","-1234828800000"],["420","-","MST","-1220317200000"],["360","-","CST","-1207180800000"],["420","-","MST","-1191369600000"],["360","-","CST","-873849600000"],["420","-","MST","-661564800000"],["480","-","PST","31449600000"],["420","Mexico","M%sT","1270346400000"],["360","Mexico","C%sT"]],"America/Tijuana":[["468.06666666666666","-","LMT","-1514764084000"],["420","-","MST","-1420156800000"],["480","-","PST","-1343091600000"],["420","-","MST","-1234828800000"],["480","-","PST","-1222992000000"],["480","1:00","PDT","-1207267200000"],["480","-","PST","-873849600000"],["480","1:00","PWT","-769395600000"],["480","1:00","PPT","-761702400000"],["480","-","PST","-686102400000"],["480","1:00","PDT","-661564800000"],["480","-","PST","-473472000000"],["480","CA","P%sT","-252547200000"],["480","-","PST","220838400000"],["480","US","P%sT","851990400000"],["480","Mexico","P%sT","1009756800000"],["480","US","P%sT","1014163200000"],["480","Mexico","P%sT","1293753600000"],["480","US","P%sT"]],"America/Santa_Isabel":[["459.4666666666667","-","LMT","-1514763568000"],["420","-","MST","-1420156800000"],["480","-","PST","-1343091600000"],["420","-","MST","-1234828800000"],["480","-","PST","-1222992000000"],["480","1:00","PDT","-1207267200000"],["480","-","PST","-873849600000"],["480","1:00","PWT","-769395600000"],["480","1:00","PPT","-761702400000"],["480","-","PST","-686102400000"],["480","1:00","PDT","-661564800000"],["480","-","PST","-473472000000"],["480","CA","P%sT","-252547200000"],["480","-","PST","220838400000"],["480","US","P%sT","851990400000"],["480","Mexico","P%sT","1009756800000"],["480","US","P%sT","1014163200000"],["480","Mexico","P%sT"]],"America/Antigua":[["247.2","-","LMT","-1825113600000"],["300","-","EST","-568166400000"],["240","-","AST"]],"America/Nassau":[["309.5","-","LMT","-1825113600000"],["300","Bahamas","E%sT","220838400000"],["300","US","E%sT"]],"America/Barbados":[["238.48333333333335","-","LMT","-1420156800000"],["238.48333333333335","-","BMT","-1167696000000"],["240","Barb","A%sT"]],"America/Belize":[["352.8","-","LMT","-1822521600000"],["360","Belize","C%sT"]],"Atlantic/Bermuda":[["259.3","-","LMT","-1262296800000"],["240","-","AST","136346400000"],["240","Canada","A%sT","220838400000"],["240","US","A%sT"]],"America/Cayman":[["325.5333333333333","-","LMT","-2493072000000"],["307.18333333333334","-","KMT","-1827705600000"],["300","-","EST"]],"America/Costa_Rica":[["336.2166666666667","-","LMT","-2493072000000"],["336.2166666666667","-","SJMT","-1545091200000"],["360","CR","C%sT"]],"America/Havana":[["329.4666666666667","-","LMT","-2493072000000"],["329.6","-","HMT","-1402833600000"],["300","Cuba","C%sT"]],"America/Santo_Domingo":[["279.6","-","LMT","-2493072000000"],["280","-","SDMT","-1159790400000"],["300","DR","E%sT","152064000000"],["240","-","AST","972784800000"],["300","US","E%sT","975805200000"],["240","-","AST"]],"America/El_Salvador":[["356.8","-","LMT","-1514851200000"],["360","Salv","C%sT"]],"America/Guatemala":[["362.06666666666666","-","LMT","-1617062400000"],["360","Guat","C%sT"]],"America/Port-au-Prince":[["289.3333333333333","-","LMT","-2493072000000"],["289","-","PPMT","-1670500800000"],["300","Haiti","E%sT"]],"America/Tegucigalpa":[["348.8666666666667","-","LMT","-1538524800000"],["360","Hond","C%sT"]],"America/Jamaica":[["307.18333333333334","-","LMT","-2493072000000"],["307.18333333333334","-","KMT","-1827705600000"],["300","-","EST","157680000000"],["300","US","E%sT","473299200000"],["300","-","EST"]],"America/Martinique":[["244.33333333333334","-","LMT","-2493072000000"],["244.33333333333334","-","FFMT","-1851552000000"],["240","-","AST","323827200000"],["240","1:00","ADT","338947200000"],["240","-","AST"]],"America/Managua":[["345.1333333333333","-","LMT","-2493072000000"],["345.2","-","MMT","-1121126400000"],["360","-","CST","105062400000"],["300","-","EST","161740800000"],["360","Nic","C%sT","694238400000"],["300","-","EST","717292800000"],["360","-","CST","757296000000"],["300","-","EST","883526400000"],["360","Nic","C%sT"]],"America/Panama":[["318.1333333333333","-","LMT","-2493072000000"],["319.6","-","CMT","-1946937600000"],["300","-","EST"]],"America/Puerto_Rico":[["264.4166666666667","-","LMT","-2233051200000"],["240","-","AST","-873072000000"],["240","US","A%sT","-725932800000"],["240","-","AST"]],"America/Miquelon":[["224.66666666666666","-","LMT","-1850342400000"],["240","-","AST","325987200000"],["180","-","PMST","567907200000"],["180","Canada","PM%sT"]],"America/Grand_Turk":[["284.5333333333333","-","LMT","-2493072000000"],["307.18333333333334","-","KMT","-1827705600000"],["300","-","EST","315446400000"],["300","US","E%sT","1414893600000"],["240","-","AST"]],"US/Pacific-New":"America/Los_Angeles","America/Argentina/Buenos_Aires":[["233.8","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","Arg","AR%sT"]],"America/Argentina/Cordoba":[["256.8","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","667958400000"],["240","-","WART","687916800000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","Arg","AR%sT"]],"America/Argentina/Salta":[["261.66666666666663","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","667958400000"],["240","-","WART","687916800000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/Tucuman":[["260.8666666666667","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","667958400000"],["240","-","WART","687916800000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1086048000000"],["240","-","WART","1087084800000"],["180","Arg","AR%sT"]],"America/Argentina/La_Rioja":[["267.4","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","667785600000"],["240","-","WART","673574400000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1086048000000"],["240","-","WART","1087689600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/San_Juan":[["274.06666666666666","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","667785600000"],["240","-","WART","673574400000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1085961600000"],["240","-","WART","1090713600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/Jujuy":[["261.2","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","636508800000"],["240","-","WART","657072000000"],["240","1:00","WARST","669168000000"],["240","-","WART","686707200000"],["180","1:00","ARST","725760000000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/Catamarca":[["263.1333333333333","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","667958400000"],["240","-","WART","687916800000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1086048000000"],["240","-","WART","1087689600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/Mendoza":[["275.2666666666667","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","636508800000"],["240","-","WART","655948800000"],["240","1:00","WARST","667785600000"],["240","-","WART","687484800000"],["240","1:00","WARST","699408000000"],["240","-","WART","719366400000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1085270400000"],["240","-","WART","1096156800000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/San_Luis":[["265.4","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","662601600000"],["180","1:00","ARST","637372800000"],["240","-","WART","655948800000"],["240","1:00","WARST","667785600000"],["240","-","WART","675734400000"],["180","-","ART","938908800000"],["240","1:00","WARST","952041600000"],["180","-","ART","1085961600000"],["240","-","WART","1090713600000"],["180","Arg","AR%sT","1200873600000"],["240","SanLuis","WAR%sT","1255219200000"],["180","-","ART"]],"America/Argentina/Rio_Gallegos":[["276.8666666666667","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1086048000000"],["240","-","WART","1087689600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Argentina/Ushuaia":[["273.2","-","LMT","-2372112000000"],["256.8","-","CMT","-1567468800000"],["240","-","ART","-1233446400000"],["240","Arg","AR%sT","-7603200000"],["180","Arg","AR%sT","938908800000"],["240","Arg","AR%sT","952041600000"],["180","-","ART","1085875200000"],["240","-","WART","1087689600000"],["180","Arg","AR%sT","1224288000000"],["180","-","ART"]],"America/Aruba":"America/Curacao","America/La_Paz":[["272.6","-","LMT","-2493072000000"],["272.6","-","CMT","-1205971200000"],["272.6","1:00","BOST","-1192320000000"],["240","-","BOT"]],"America/Noronha":[["129.66666666666669","-","LMT","-1735776000000"],["120","Brazil","FN%sT","653529600000"],["120","-","FNT","938649600000"],["120","Brazil","FN%sT","971568000000"],["120","-","FNT","1000339200000"],["120","Brazil","FN%sT","1033430400000"],["120","-","FNT"]],"America/Belem":[["193.93333333333334","-","LMT","-1735776000000"],["180","Brazil","BR%sT","590025600000"],["180","-","BRT"]],"America/Santarem":[["218.8","-","LMT","-1735776000000"],["240","Brazil","AM%sT","590025600000"],["240","-","AMT","1214265600000"],["180","-","BRT"]],"America/Fortaleza":[["154","-","LMT","-1735776000000"],["180","Brazil","BR%sT","653529600000"],["180","-","BRT","938649600000"],["180","Brazil","BR%sT","972172800000"],["180","-","BRT","1000339200000"],["180","Brazil","BR%sT","1033430400000"],["180","-","BRT"]],"America/Recife":[["139.6","-","LMT","-1735776000000"],["180","Brazil","BR%sT","653529600000"],["180","-","BRT","938649600000"],["180","Brazil","BR%sT","971568000000"],["180","-","BRT","1000339200000"],["180","Brazil","BR%sT","1033430400000"],["180","-","BRT"]],"America/Araguaina":[["192.8","-","LMT","-1735776000000"],["180","Brazil","BR%sT","653529600000"],["180","-","BRT","811036800000"],["180","Brazil","BR%sT","1064361600000"],["180","-","BRT","1350777600000"],["180","Brazil","BR%sT","1377993600000"],["180","-","BRT"]],"America/Maceio":[["142.86666666666665","-","LMT","-1735776000000"],["180","Brazil","BR%sT","653529600000"],["180","-","BRT","813542400000"],["180","Brazil","BR%sT","841795200000"],["180","-","BRT","938649600000"],["180","Brazil","BR%sT","972172800000"],["180","-","BRT","1000339200000"],["180","Brazil","BR%sT","1033430400000"],["180","-","BRT"]],"America/Bahia":[["154.06666666666666","-","LMT","-1735776000000"],["180","Brazil","BR%sT","1064361600000"],["180","-","BRT","1318723200000"],["180","Brazil","BR%sT","1350777600000"],["180","-","BRT"]],"America/Sao_Paulo":[["186.46666666666667","-","LMT","-1735776000000"],["180","Brazil","BR%sT","-195436800000"],["180","1:00","BRST","-157852800000"],["180","Brazil","BR%sT"]],"America/Campo_Grande":[["218.46666666666667","-","LMT","-1735776000000"],["240","Brazil","AM%sT"]],"America/Cuiaba":[["224.33333333333334","-","LMT","-1735776000000"],["240","Brazil","AM%sT","1064361600000"],["240","-","AMT","1096588800000"],["240","Brazil","AM%sT"]],"America/Porto_Velho":[["255.6","-","LMT","-1735776000000"],["240","Brazil","AM%sT","590025600000"],["240","-","AMT"]],"America/Boa_Vista":[["242.66666666666666","-","LMT","-1735776000000"],["240","Brazil","AM%sT","590025600000"],["240","-","AMT","938649600000"],["240","Brazil","AM%sT","971568000000"],["240","-","AMT"]],"America/Manaus":[["240.06666666666666","-","LMT","-1735776000000"],["240","Brazil","AM%sT","590025600000"],["240","-","AMT","749174400000"],["240","Brazil","AM%sT","780192000000"],["240","-","AMT"]],"America/Eirunepe":[["279.4666666666667","-","LMT","-1735776000000"],["300","Brazil","AC%sT","590025600000"],["300","-","ACT","749174400000"],["300","Brazil","AC%sT","780192000000"],["300","-","ACT","1214265600000"],["240","-","AMT","1384041600000"],["300","-","ACT"]],"America/Rio_Branco":[["271.2","-","LMT","-1735776000000"],["300","Brazil","AC%sT","590025600000"],["300","-","ACT","1214265600000"],["240","-","AMT","1384041600000"],["300","-","ACT"]],"America/Santiago":[["282.7666666666667","-","LMT","-2493072000000"],["282.7666666666667","-","SMT","-1862006400000"],["300","-","CLT","-1688428800000"],["282.7666666666667","-","SMT","-1620000000000"],["240","-","CLT","-1593820800000"],["282.7666666666667","-","SMT","-1336003200000"],["300","Chile","CL%sT","-713664000000"],["240","Chile","CL%sT"]],"Pacific/Easter":[["437.7333333333333","-","LMT","-2493072000000"],["437.4666666666667","-","EMT","-1178150400000"],["420","Chile","EAS%sT","384901200000"],["360","Chile","EAS%sT"]],"America/Bogota":[["296.2666666666667","-","LMT","-2707689600000"],["296.2666666666667","-","BMT","-1739059200000"],["300","CO","CO%sT"]],"America/Curacao":[["275.7833333333333","-","LMT","-1826755200000"],["270","-","ANT","-126316800000"],["240","-","AST"]],"America/Lower_Princes":"America/Curacao","America/Kralendijk":"America/Curacao","America/Guayaquil":[["319.3333333333333","-","LMT","-2493072000000"],["314","-","QMT","-1199318400000"],["300","-","ECT"]],"Pacific/Galapagos":[["358.4","-","LMT","-1199318400000"],["300","-","ECT","536371200000"],["360","-","GALT"]],"Atlantic/Stanley":[["231.4","-","LMT","-2493072000000"],["231.4","-","SMT","-1824249600000"],["240","Falk","FK%sT","420595200000"],["180","Falk","FK%sT","495590400000"],["240","Falk","FK%sT","1283652000000"],["180","-","FKST"]],"America/Cayenne":[["209.33333333333334","-","LMT","-1846281600000"],["240","-","GFT","-71107200000"],["180","-","GFT"]],"America/Guyana":[["232.66666666666666","-","LMT","-1730592000000"],["225","-","GBGT","-113702400000"],["225","-","GYT","175996800000"],["180","-","GYT","694137600000"],["240","-","GYT"]],"America/Asuncion":[["230.66666666666666","-","LMT","-2493072000000"],["230.66666666666666","-","AMT","-1206403200000"],["240","-","PYT","86745600000"],["180","-","PYT","134006400000"],["240","Para","PY%sT"]],"America/Lima":[["308.2","-","LMT","-2493072000000"],["308.6","-","LMT","-1938556800000"],["300","Peru","PE%sT"]],"Atlantic/South_Georgia":[["146.13333333333335","-","LMT","-2493072000000"],["120","-","GST"]],"America/Paramaribo":[["220.66666666666666","-","LMT","-1830470400000"],["220.86666666666665","-","PMT","-1073088000000"],["220.6","-","PMT","-765331200000"],["210","-","NEGT","185673600000"],["210","-","SRT","465436800000"],["180","-","SRT"]],"America/Port_of_Spain":[["246.06666666666666","-","LMT","-1825113600000"],["240","-","AST"]],"America/Anguilla":"America/Port_of_Spain","America/Dominica":"America/Port_of_Spain","America/Grenada":"America/Port_of_Spain","America/Guadeloupe":"America/Port_of_Spain","America/Marigot":"America/Port_of_Spain","America/Montserrat":"America/Port_of_Spain","America/St_Barthelemy":"America/Port_of_Spain","America/St_Kitts":"America/Port_of_Spain","America/St_Lucia":"America/Port_of_Spain","America/St_Thomas":"America/Port_of_Spain","America/St_Vincent":"America/Port_of_Spain","America/Tortola":"America/Port_of_Spain","America/Montevideo":[["224.73333333333335","-","LMT","-2256681600000"],["224.73333333333335","-","MMT","-1567468800000"],["210","Uruguay","UY%sT","-853632000000"],["180","Uruguay","UY%sT"]],"America/Caracas":[["267.7333333333333","-","LMT","-2493072000000"],["267.6666666666667","-","CMT","-1826755200000"],["270","-","VET","-126316800000"],["240","-","VET","1197169200000"],["270","-","VET"]]},a.timezone.rules={Algeria:[["1916","only","-","Jun","14",["23","0","0","s"],"60","S"],["1916","1919","-","Oct","Sun>=1",["23","0","0","s"],"0","-"],["1917","only","-","Mar","24",["23","0","0","s"],"60","S"],["1918","only","-","Mar","9",["23","0","0","s"],"60","S"],["1919","only","-","Mar","1",["23","0","0","s"],"60","S"],["1920","only","-","Feb","14",["23","0","0","s"],"60","S"],["1920","only","-","Oct","23",["23","0","0","s"],"0","-"],["1921","only","-","Mar","14",["23","0","0","s"],"60","S"],["1921","only","-","Jun","21",["23","0","0","s"],"0","-"],["1939","only","-","Sep","11",["23","0","0","s"],"60","S"],["1939","only","-","Nov","19",["1","0","0"],"0","-"],["1944","1945","-","Apr","Mon>=1",["2","0","0"],"60","S"],["1944","only","-","Oct","8",["2","0","0"],"0","-"],["1945","only","-","Sep","16",["1","0","0"],"0","-"],["1971","only","-","Apr","25",["23","0","0","s"],"60","S"],["1971","only","-","Sep","26",["23","0","0","s"],"0","-"],["1977","only","-","May","6",["0","0","0"],"60","S"],["1977","only","-","Oct","21",["0","0","0"],"0","-"],["1978","only","-","Mar","24",["1","0","0"],"60","S"],["1978","only","-","Sep","22",["3","0","0"],"0","-"],["1980","only","-","Apr","25",["0","0","0"],"60","S"],["1980","only","-","Oct","31",["2","0","0"],"0","-"]],Egypt:[["1940","only","-","Jul","15",["0","0","0"],"60","S"],["1940","only","-","Oct","1",["0","0","0"],"0","-"],["1941","only","-","Apr","15",["0","0","0"],"60","S"],["1941","only","-","Sep","16",["0","0","0"],"0","-"],["1942","1944","-","Apr","1",["0","0","0"],"60","S"],["1942","only","-","Oct","27",["0","0","0"],"0","-"],["1943","1945","-","Nov","1",["0","0","0"],"0","-"],["1945","only","-","Apr","16",["0","0","0"],"60","S"],["1957","only","-","May","10",["0","0","0"],"60","S"],["1957","1958","-","Oct","1",["0","0","0"],"0","-"],["1958","only","-","May","1",["0","0","0"],"60","S"],["1959","1981","-","May","1",["1","0","0"],"60","S"],["1959","1965","-","Sep","30",["3","0","0"],"0","-"],["1966","1994","-","Oct","1",["3","0","0"],"0","-"],["1982","only","-","Jul","25",["1","0","0"],"60","S"],["1983","only","-","Jul","12",["1","0","0"],"60","S"],["1984","1988","-","May","1",["1","0","0"],"60","S"],["1989","only","-","May","6",["1","0","0"],"60","S"],["1990","1994","-","May","1",["1","0","0"],"60","S"],["1995","2010","-","Apr","lastFri",["0","0","0","s"],"60","S"],["1995","2005","-","Sep","lastThu",["24","0","0"],"0","-"],["2006","only","-","Sep","21",["24","0","0"],"0","-"],["2007","only","-","Sep","Thu>=1",["24","0","0"],"0","-"],["2008","only","-","Aug","lastThu",["24","0","0"],"0","-"],["2009","only","-","Aug","20",["24","0","0"],"0","-"],["2010","only","-","Aug","10",["24","0","0"],"0","-"],["2010","only","-","Sep","9",["24","0","0"],"60","S"],["2010","only","-","Sep","lastThu",["24","0","0"],"0","-"],["2014","only","-","May","15",["24","0","0"],"60","S"],["2014","only","-","Jun","26",["24","0","0"],"0","-"],["2014","only","-","Jul","31",["24","0","0"],"60","S"],["2014","max","-","Sep","lastThu",["24","0","0"],"0","-"],["2015","2019","-","Apr","lastFri",["0","0","0","s"],"60","S"],["2015","only","-","Jun","11",["24","0","0"],"0","-"],["2015","only","-","Jul","23",["24","0","0"],"60","S"],["2016","only","-","Jun","2",["24","0","0"],"0","-"],["2016","only","-","Jul","7",["24","0","0"],"60","S"],["2017","only","-","May","25",["24","0","0"],"0","-"],["2017","only","-","Jun","29",["24","0","0"],"60","S"],["2018","only","-","May","10",["24","0","0"],"0","-"],["2018","only","-","Jun","14",["24","0","0"],"60","S"],["2019","only","-","May","2",["24","0","0"],"0","-"],["2019","only","-","Jun","6",["24","0","0"],"60","S"],["2020","only","-","May","28",["24","0","0"],"60","S"],["2021","only","-","May","13",["24","0","0"],"60","S"],["2022","only","-","May","5",["24","0","0"],"60","S"],["2023","max","-","Apr","lastFri",["0","0","0","s"],"60","S"]],Ghana:[["1920","1942","-","Sep","1",["0","0","0"],"20","GHST"],["1920","1942","-","Dec","31",["0","0","0"],"0","GMT"]],Libya:[["1951","only","-","Oct","14",["2","0","0"],"60","S"],["1952","only","-","Jan","1",["0","0","0"],"0","-"],["1953","only","-","Oct","9",["2","0","0"],"60","S"],["1954","only","-","Jan","1",["0","0","0"],"0","-"],["1955","only","-","Sep","30",["0","0","0"],"60","S"],["1956","only","-","Jan","1",["0","0","0"],"0","-"],["1982","1984","-","Apr","1",["0","0","0"],"60","S"],["1982","1985","-","Oct","1",["0","0","0"],"0","-"],["1985","only","-","Apr","6",["0","0","0"],"60","S"],["1986","only","-","Apr","4",["0","0","0"],"60","S"],["1986","only","-","Oct","3",["0","0","0"],"0","-"],["1987","1989","-","Apr","1",["0","0","0"],"60","S"],["1987","1989","-","Oct","1",["0","0","0"],"0","-"],["1997","only","-","Apr","4",["0","0","0"],"60","S"],["1997","only","-","Oct","4",["0","0","0"],"0","-"],["2013","only","-","Mar","lastFri",["1","0","0"],"60","S"],["2013","only","-","Oct","lastFri",["2","0","0"],"0","-"]],Mauritius:[["1982","only","-","Oct","10",["0","0","0"],"60","S"],["1983","only","-","Mar","21",["0","0","0"],"0","-"],["2008","only","-","Oct","lastSun",["2","0","0"],"60","S"],["2009","only","-","Mar","lastSun",["2","0","0"],"0","-"]],Morocco:[["1939","only","-","Sep","12",["0","0","0"],"60","S"],["1939","only","-","Nov","19",["0","0","0"],"0","-"],["1940","only","-","Feb","25",["0","0","0"],"60","S"],["1945","only","-","Nov","18",["0","0","0"],"0","-"],["1950","only","-","Jun","11",["0","0","0"],"60","S"],["1950","only","-","Oct","29",["0","0","0"],"0","-"],["1967","only","-","Jun","3",["12","0","0"],"60","S"],["1967","only","-","Oct","1",["0","0","0"],"0","-"],["1974","only","-","Jun","24",["0","0","0"],"60","S"],["1974","only","-","Sep","1",["0","0","0"],"0","-"],["1976","1977","-","May","1",["0","0","0"],"60","S"],["1976","only","-","Aug","1",["0","0","0"],"0","-"],["1977","only","-","Sep","28",["0","0","0"],"0","-"],["1978","only","-","Jun","1",["0","0","0"],"60","S"],["1978","only","-","Aug","4",["0","0","0"],"0","-"],["2008","only","-","Jun","1",["0","0","0"],"60","S"],["2008","only","-","Sep","1",["0","0","0"],"0","-"],["2009","only","-","Jun","1",["0","0","0"],"60","S"],["2009","only","-","Aug","21",["0","0","0"],"0","-"],["2010","only","-","May","2",["0","0","0"],"60","S"],["2010","only","-","Aug","8",["0","0","0"],"0","-"],["2011","only","-","Apr","3",["0","0","0"],"60","S"],["2011","only","-","Jul","31",["0","0","0"],"0","-"],["2012","2013","-","Apr","lastSun",["2","0","0"],"60","S"],["2012","only","-","Sep","30",["3","0","0"],"0","-"],["2012","only","-","Jul","20",["3","0","0"],"0","-"],["2012","only","-","Aug","20",["2","0","0"],"60","S"],["2013","only","-","Jul","7",["3","0","0"],"0","-"],["2013","only","-","Aug","10",["2","0","0"],"60","S"],["2013","max","-","Oct","lastSun",["3","0","0"],"0","-"],["2014","2022","-","Mar","lastSun",["2","0","0"],"60","S"],["2014","only","-","Jun","28",["3","0","0"],"0","-"],["2014","only","-","Aug","2",["2","0","0"],"60","S"],["2015","only","-","Jun","13",["3","0","0"],"0","-"],["2015","only","-","Jul","18",["2","0","0"],"60","S"],["2016","only","-","Jun","4",["3","0","0"],"0","-"],["2016","only","-","Jul","9",["2","0","0"],"60","S"],["2017","only","-","May","20",["3","0","0"],"0","-"],["2017","only","-","Jul","1",["2","0","0"],"60","S"],["2018","only","-","May","12",["3","0","0"],"0","-"],["2018","only","-","Jun","16",["2","0","0"],"60","S"],["2019","only","-","May","4",["3","0","0"],"0","-"],["2019","only","-","Jun","8",["2","0","0"],"60","S"],["2020","only","-","Apr","18",["3","0","0"],"0","-"],["2020","only","-","May","30",["2","0","0"],"60","S"],["2021","only","-","Apr","10",["3","0","0"],"0","-"],["2021","only","-","May","15",["2","0","0"],"60","S"],["2022","only","-","Apr","2",["3","0","0"],"0","-"],["2022","only","-","May","7",["2","0","0"],"60","S"],["2023","only","-","Apr","22",["2","0","0"],"60","S"],["2024","only","-","Apr","13",["2","0","0"],"60","S"],["2025","only","-","Apr","5",["2","0","0"],"60","S"],["2026","max","-","Mar","lastSun",["2","0","0"],"60","S"],["2035","only","-","Oct","27",["3","0","0"],"0","-"],["2036","only","-","Oct","18",["3","0","0"],"0","-"],["2037","only","-","Oct","10",["3","0","0"],"0","-"]],Namibia:[["1994","max","-","Sep","Sun>=1",["2","0","0"],"60","S"],["1995","max","-","Apr","Sun>=1",["2","0","0"],"0","-"]],SA:[["1942","1943","-","Sep","Sun>=15",["2","0","0"],"60","-"],["1943","1944","-","Mar","Sun>=15",["2","0","0"],"0","-"]],Sudan:[["1970","only","-","May","1",["0","0","0"],"60","S"],["1970","1985","-","Oct","15",["0","0","0"],"0","-"],["1971","only","-","Apr","30",["0","0","0"],"60","S"],["1972","1985","-","Apr","lastSun",["0","0","0"],"60","S"]],Tunisia:[["1939","only","-","Apr","15",["23","0","0","s"],"60","S"],["1939","only","-","Nov","18",["23","0","0","s"],"0","-"],["1940","only","-","Feb","25",["23","0","0","s"],"60","S"],["1941","only","-","Oct","6",["0","0","0"],"0","-"],["1942","only","-","Mar","9",["0","0","0"],"60","S"],["1942","only","-","Nov","2",["3","0","0"],"0","-"],["1943","only","-","Mar","29",["2","0","0"],"60","S"],["1943","only","-","Apr","17",["2","0","0"],"0","-"],["1943","only","-","Apr","25",["2","0","0"],"60","S"],["1943","only","-","Oct","4",["2","0","0"],"0","-"],["1944","1945","-","Apr","Mon>=1",["2","0","0"],"60","S"],["1944","only","-","Oct","8",["0","0","0"],"0","-"],["1945","only","-","Sep","16",["0","0","0"],"0","-"],["1977","only","-","Apr","30",["0","0","0","s"],"60","S"],["1977","only","-","Sep","24",["0","0","0","s"],"0","-"],["1978","only","-","May","1",["0","0","0","s"],"60","S"],["1978","only","-","Oct","1",["0","0","0","s"],"0","-"],["1988","only","-","Jun","1",["0","0","0","s"],"60","S"],["1988","1990","-","Sep","lastSun",["0","0","0","s"],"0","-"],["1989","only","-","Mar","26",["0","0","0","s"],"60","S"],["1990","only","-","May","1",["0","0","0","s"],"60","S"],["2005","only","-","May","1",["0","0","0","s"],"60","S"],["2005","only","-","Sep","30",["1","0","0","s"],"0","-"],["2006","2008","-","Mar","lastSun",["2","0","0","s"],"60","S"],["2006","2008","-","Oct","lastSun",["2","0","0","s"],"0","-"]],
ArgAQ:[["1964","1966","-","Mar","1",["0","0","0"],"0","-"],["1964","1966","-","Oct","15",["0","0","0"],"60","S"],["1967","only","-","Apr","2",["0","0","0"],"0","-"],["1967","1968","-","Oct","Sun>=1",["0","0","0"],"60","S"],["1968","1969","-","Apr","Sun>=1",["0","0","0"],"0","-"],["1974","only","-","Jan","23",["0","0","0"],"60","S"],["1974","only","-","May","1",["0","0","0"],"0","-"]],ChileAQ:[["1972","1986","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1974","1987","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1987","only","-","Apr","12",["3","0","0","u"],"0","-"],["1988","1989","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1988","only","-","Oct","Sun>=1",["4","0","0","u"],"60","S"],["1989","only","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1990","only","-","Mar","18",["3","0","0","u"],"0","-"],["1990","only","-","Sep","16",["4","0","0","u"],"60","S"],["1991","1996","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1991","1997","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1997","only","-","Mar","30",["3","0","0","u"],"0","-"],["1998","only","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1998","only","-","Sep","27",["4","0","0","u"],"60","S"],["1999","only","-","Apr","4",["3","0","0","u"],"0","-"],["1999","2010","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["2000","2007","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["2008","only","-","Mar","30",["3","0","0","u"],"0","-"],["2009","only","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["2010","only","-","Apr","Sun>=1",["3","0","0","u"],"0","-"],["2011","only","-","May","Sun>=2",["3","0","0","u"],"0","-"],["2011","only","-","Aug","Sun>=16",["4","0","0","u"],"60","S"],["2012","max","-","Apr","Sun>=23",["3","0","0","u"],"0","-"],["2012","max","-","Sep","Sun>=2",["4","0","0","u"],"60","S"]],Troll:[["2005","max","-","Mar","lastSun",["1","0","0","u"],"120","CEST"],["2004","max","-","Oct","lastSun",["1","0","0","u"],"0","UTC"]],EUAsia:[["1981","max","-","Mar","lastSun",["1","0","0","u"],"60","S"],["1979","1995","-","Sep","lastSun",["1","0","0","u"],"0","-"],["1996","max","-","Oct","lastSun",["1","0","0","u"],"0","-"]],"E-EurAsia":[["1981","max","-","Mar","lastSun",["0","0","0"],"60","S"],["1979","1995","-","Sep","lastSun",["0","0","0"],"0","-"],["1996","max","-","Oct","lastSun",["0","0","0"],"0","-"]],RussiaAsia:[["1981","1984","-","Apr","1",["0","0","0"],"60","S"],["1981","1983","-","Oct","1",["0","0","0"],"0","-"],["1984","1991","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1985","1991","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1992","only","-","Mar","lastSat",["23","0","0"],"60","S"],["1992","only","-","Sep","lastSat",["23","0","0"],"0","-"],["1993","max","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1993","1995","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1996","max","-","Oct","lastSun",["2","0","0","s"],"0","-"]],Azer:[["1997","max","-","Mar","lastSun",["4","0","0"],"60","S"],["1997","max","-","Oct","lastSun",["5","0","0"],"0","-"]],Dhaka:[["2009","only","-","Jun","19",["23","0","0"],"60","S"],["2009","only","-","Dec","31",["24","0","0"],"0","-"]],Shang:[["1940","only","-","Jun","3",["0","0","0"],"60","D"],["1940","1941","-","Oct","1",["0","0","0"],"0","S"],["1941","only","-","Mar","16",["0","0","0"],"60","D"]],PRC:[["1986","only","-","May","4",["0","0","0"],"60","D"],["1986","1991","-","Sep","Sun>=11",["0","0","0"],"0","S"],["1987","1991","-","Apr","Sun>=10",["0","0","0"],"60","D"]],HK:[["1941","only","-","Apr","1",["3","30","0"],"60","S"],["1941","only","-","Sep","30",["3","30","0"],"0","-"],["1946","only","-","Apr","20",["3","30","0"],"60","S"],["1946","only","-","Dec","1",["3","30","0"],"0","-"],["1947","only","-","Apr","13",["3","30","0"],"60","S"],["1947","only","-","Dec","30",["3","30","0"],"0","-"],["1948","only","-","May","2",["3","30","0"],"60","S"],["1948","1951","-","Oct","lastSun",["3","30","0"],"0","-"],["1952","only","-","Oct","25",["3","30","0"],"0","-"],["1949","1953","-","Apr","Sun>=1",["3","30","0"],"60","S"],["1953","only","-","Nov","1",["3","30","0"],"0","-"],["1954","1964","-","Mar","Sun>=18",["3","30","0"],"60","S"],["1954","only","-","Oct","31",["3","30","0"],"0","-"],["1955","1964","-","Nov","Sun>=1",["3","30","0"],"0","-"],["1965","1976","-","Apr","Sun>=16",["3","30","0"],"60","S"],["1965","1976","-","Oct","Sun>=16",["3","30","0"],"0","-"],["1973","only","-","Dec","30",["3","30","0"],"60","S"],["1979","only","-","May","Sun>=8",["3","30","0"],"60","S"],["1979","only","-","Oct","Sun>=16",["3","30","0"],"0","-"]],Taiwan:[["1946","only","-","May","15",["0","0","0"],"60","D"],["1946","only","-","Oct","1",["0","0","0"],"0","S"],["1947","only","-","Apr","15",["0","0","0"],"60","D"],["1947","only","-","Nov","1",["0","0","0"],"0","S"],["1948","1951","-","May","1",["0","0","0"],"60","D"],["1948","1951","-","Oct","1",["0","0","0"],"0","S"],["1952","only","-","Mar","1",["0","0","0"],"60","D"],["1952","1954","-","Nov","1",["0","0","0"],"0","S"],["1953","1959","-","Apr","1",["0","0","0"],"60","D"],["1955","1961","-","Oct","1",["0","0","0"],"0","S"],["1960","1961","-","Jun","1",["0","0","0"],"60","D"],["1974","1975","-","Apr","1",["0","0","0"],"60","D"],["1974","1975","-","Oct","1",["0","0","0"],"0","S"],["1979","only","-","Jul","1",["0","0","0"],"60","D"],["1979","only","-","Oct","1",["0","0","0"],"0","S"]],Macau:[["1961","1962","-","Mar","Sun>=16",["3","30","0"],"60","S"],["1961","1964","-","Nov","Sun>=1",["3","30","0"],"0","-"],["1963","only","-","Mar","Sun>=16",["0","0","0"],"60","S"],["1964","only","-","Mar","Sun>=16",["3","30","0"],"60","S"],["1965","only","-","Mar","Sun>=16",["0","0","0"],"60","S"],["1965","only","-","Oct","31",["0","0","0"],"0","-"],["1966","1971","-","Apr","Sun>=16",["3","30","0"],"60","S"],["1966","1971","-","Oct","Sun>=16",["3","30","0"],"0","-"],["1972","1974","-","Apr","Sun>=15",["0","0","0"],"60","S"],["1972","1973","-","Oct","Sun>=15",["0","0","0"],"0","-"],["1974","1977","-","Oct","Sun>=15",["3","30","0"],"0","-"],["1975","1977","-","Apr","Sun>=15",["3","30","0"],"60","S"],["1978","1980","-","Apr","Sun>=15",["0","0","0"],"60","S"],["1978","1980","-","Oct","Sun>=15",["0","0","0"],"0","-"]],Cyprus:[["1975","only","-","Apr","13",["0","0","0"],"60","S"],["1975","only","-","Oct","12",["0","0","0"],"0","-"],["1976","only","-","May","15",["0","0","0"],"60","S"],["1976","only","-","Oct","11",["0","0","0"],"0","-"],["1977","1980","-","Apr","Sun>=1",["0","0","0"],"60","S"],["1977","only","-","Sep","25",["0","0","0"],"0","-"],["1978","only","-","Oct","2",["0","0","0"],"0","-"],["1979","1997","-","Sep","lastSun",["0","0","0"],"0","-"],["1981","1998","-","Mar","lastSun",["0","0","0"],"60","S"]],Iran:[["1978","1980","-","Mar","21",["0","0","0"],"60","D"],["1978","only","-","Oct","21",["0","0","0"],"0","S"],["1979","only","-","Sep","19",["0","0","0"],"0","S"],["1980","only","-","Sep","23",["0","0","0"],"0","S"],["1991","only","-","May","3",["0","0","0"],"60","D"],["1992","1995","-","Mar","22",["0","0","0"],"60","D"],["1991","1995","-","Sep","22",["0","0","0"],"0","S"],["1996","only","-","Mar","21",["0","0","0"],"60","D"],["1996","only","-","Sep","21",["0","0","0"],"0","S"],["1997","1999","-","Mar","22",["0","0","0"],"60","D"],["1997","1999","-","Sep","22",["0","0","0"],"0","S"],["2000","only","-","Mar","21",["0","0","0"],"60","D"],["2000","only","-","Sep","21",["0","0","0"],"0","S"],["2001","2003","-","Mar","22",["0","0","0"],"60","D"],["2001","2003","-","Sep","22",["0","0","0"],"0","S"],["2004","only","-","Mar","21",["0","0","0"],"60","D"],["2004","only","-","Sep","21",["0","0","0"],"0","S"],["2005","only","-","Mar","22",["0","0","0"],"60","D"],["2005","only","-","Sep","22",["0","0","0"],"0","S"],["2008","only","-","Mar","21",["0","0","0"],"60","D"],["2008","only","-","Sep","21",["0","0","0"],"0","S"],["2009","2011","-","Mar","22",["0","0","0"],"60","D"],["2009","2011","-","Sep","22",["0","0","0"],"0","S"],["2012","only","-","Mar","21",["0","0","0"],"60","D"],["2012","only","-","Sep","21",["0","0","0"],"0","S"],["2013","2015","-","Mar","22",["0","0","0"],"60","D"],["2013","2015","-","Sep","22",["0","0","0"],"0","S"],["2016","only","-","Mar","21",["0","0","0"],"60","D"],["2016","only","-","Sep","21",["0","0","0"],"0","S"],["2017","2019","-","Mar","22",["0","0","0"],"60","D"],["2017","2019","-","Sep","22",["0","0","0"],"0","S"],["2020","only","-","Mar","21",["0","0","0"],"60","D"],["2020","only","-","Sep","21",["0","0","0"],"0","S"],["2021","2023","-","Mar","22",["0","0","0"],"60","D"],["2021","2023","-","Sep","22",["0","0","0"],"0","S"],["2024","only","-","Mar","21",["0","0","0"],"60","D"],["2024","only","-","Sep","21",["0","0","0"],"0","S"],["2025","2027","-","Mar","22",["0","0","0"],"60","D"],["2025","2027","-","Sep","22",["0","0","0"],"0","S"],["2028","2029","-","Mar","21",["0","0","0"],"60","D"],["2028","2029","-","Sep","21",["0","0","0"],"0","S"],["2030","2031","-","Mar","22",["0","0","0"],"60","D"],["2030","2031","-","Sep","22",["0","0","0"],"0","S"],["2032","2033","-","Mar","21",["0","0","0"],"60","D"],["2032","2033","-","Sep","21",["0","0","0"],"0","S"],["2034","2035","-","Mar","22",["0","0","0"],"60","D"],["2034","2035","-","Sep","22",["0","0","0"],"0","S"],["2036","2037","-","Mar","21",["0","0","0"],"60","D"],["2036","2037","-","Sep","21",["0","0","0"],"0","S"]],Iraq:[["1982","only","-","May","1",["0","0","0"],"60","D"],["1982","1984","-","Oct","1",["0","0","0"],"0","S"],["1983","only","-","Mar","31",["0","0","0"],"60","D"],["1984","1985","-","Apr","1",["0","0","0"],"60","D"],["1985","1990","-","Sep","lastSun",["1","0","0","s"],"0","S"],["1986","1990","-","Mar","lastSun",["1","0","0","s"],"60","D"],["1991","2007","-","Apr","1",["3","0","0","s"],"60","D"],["1991","2007","-","Oct","1",["3","0","0","s"],"0","S"]],Zion:[["1940","only","-","Jun","1",["0","0","0"],"60","D"],["1942","1944","-","Nov","1",["0","0","0"],"0","S"],["1943","only","-","Apr","1",["2","0","0"],"60","D"],["1944","only","-","Apr","1",["0","0","0"],"60","D"],["1945","only","-","Apr","16",["0","0","0"],"60","D"],["1945","only","-","Nov","1",["2","0","0"],"0","S"],["1946","only","-","Apr","16",["2","0","0"],"60","D"],["1946","only","-","Nov","1",["0","0","0"],"0","S"],["1948","only","-","May","23",["0","0","0"],"120","DD"],["1948","only","-","Sep","1",["0","0","0"],"60","D"],["1948","1949","-","Nov","1",["2","0","0"],"0","S"],["1949","only","-","May","1",["0","0","0"],"60","D"],["1950","only","-","Apr","16",["0","0","0"],"60","D"],["1950","only","-","Sep","15",["3","0","0"],"0","S"],["1951","only","-","Apr","1",["0","0","0"],"60","D"],["1951","only","-","Nov","11",["3","0","0"],"0","S"],["1952","only","-","Apr","20",["2","0","0"],"60","D"],["1952","only","-","Oct","19",["3","0","0"],"0","S"],["1953","only","-","Apr","12",["2","0","0"],"60","D"],["1953","only","-","Sep","13",["3","0","0"],"0","S"],["1954","only","-","Jun","13",["0","0","0"],"60","D"],["1954","only","-","Sep","12",["0","0","0"],"0","S"],["1955","only","-","Jun","11",["2","0","0"],"60","D"],["1955","only","-","Sep","11",["0","0","0"],"0","S"],["1956","only","-","Jun","3",["0","0","0"],"60","D"],["1956","only","-","Sep","30",["3","0","0"],"0","S"],["1957","only","-","Apr","29",["2","0","0"],"60","D"],["1957","only","-","Sep","22",["0","0","0"],"0","S"],["1974","only","-","Jul","7",["0","0","0"],"60","D"],["1974","only","-","Oct","13",["0","0","0"],"0","S"],["1975","only","-","Apr","20",["0","0","0"],"60","D"],["1975","only","-","Aug","31",["0","0","0"],"0","S"],["1985","only","-","Apr","14",["0","0","0"],"60","D"],["1985","only","-","Sep","15",["0","0","0"],"0","S"],["1986","only","-","May","18",["0","0","0"],"60","D"],["1986","only","-","Sep","7",["0","0","0"],"0","S"],["1987","only","-","Apr","15",["0","0","0"],"60","D"],["1987","only","-","Sep","13",["0","0","0"],"0","S"],["1988","only","-","Apr","10",["0","0","0"],"60","D"],["1988","only","-","Sep","4",["0","0","0"],"0","S"],["1989","only","-","Apr","30",["0","0","0"],"60","D"],["1989","only","-","Sep","3",["0","0","0"],"0","S"],["1990","only","-","Mar","25",["0","0","0"],"60","D"],["1990","only","-","Aug","26",["0","0","0"],"0","S"],["1991","only","-","Mar","24",["0","0","0"],"60","D"],["1991","only","-","Sep","1",["0","0","0"],"0","S"],["1992","only","-","Mar","29",["0","0","0"],"60","D"],["1992","only","-","Sep","6",["0","0","0"],"0","S"],["1993","only","-","Apr","2",["0","0","0"],"60","D"],["1993","only","-","Sep","5",["0","0","0"],"0","S"],["1994","only","-","Apr","1",["0","0","0"],"60","D"],["1994","only","-","Aug","28",["0","0","0"],"0","S"],["1995","only","-","Mar","31",["0","0","0"],"60","D"],["1995","only","-","Sep","3",["0","0","0"],"0","S"],["1996","only","-","Mar","15",["0","0","0"],"60","D"],["1996","only","-","Sep","16",["0","0","0"],"0","S"],["1997","only","-","Mar","21",["0","0","0"],"60","D"],["1997","only","-","Sep","14",["0","0","0"],"0","S"],["1998","only","-","Mar","20",["0","0","0"],"60","D"],["1998","only","-","Sep","6",["0","0","0"],"0","S"],["1999","only","-","Apr","2",["2","0","0"],"60","D"],["1999","only","-","Sep","3",["2","0","0"],"0","S"],["2000","only","-","Apr","14",["2","0","0"],"60","D"],["2000","only","-","Oct","6",["1","0","0"],"0","S"],["2001","only","-","Apr","9",["1","0","0"],"60","D"],["2001","only","-","Sep","24",["1","0","0"],"0","S"],["2002","only","-","Mar","29",["1","0","0"],"60","D"],["2002","only","-","Oct","7",["1","0","0"],"0","S"],["2003","only","-","Mar","28",["1","0","0"],"60","D"],["2003","only","-","Oct","3",["1","0","0"],"0","S"],["2004","only","-","Apr","7",["1","0","0"],"60","D"],["2004","only","-","Sep","22",["1","0","0"],"0","S"],["2005","only","-","Apr","1",["2","0","0"],"60","D"],["2005","only","-","Oct","9",["2","0","0"],"0","S"],["2006","2010","-","Mar","Fri>=26",["2","0","0"],"60","D"],["2006","only","-","Oct","1",["2","0","0"],"0","S"],["2007","only","-","Sep","16",["2","0","0"],"0","S"],["2008","only","-","Oct","5",["2","0","0"],"0","S"],["2009","only","-","Sep","27",["2","0","0"],"0","S"],["2010","only","-","Sep","12",["2","0","0"],"0","S"],["2011","only","-","Apr","1",["2","0","0"],"60","D"],["2011","only","-","Oct","2",["2","0","0"],"0","S"],["2012","only","-","Mar","Fri>=26",["2","0","0"],"60","D"],["2012","only","-","Sep","23",["2","0","0"],"0","S"],["2013","max","-","Mar","Fri>=23",["2","0","0"],"60","D"],["2013","max","-","Oct","lastSun",["2","0","0"],"0","S"]],Japan:[["1948","only","-","May","Sun>=1",["2","0","0"],"60","D"],["1948","1951","-","Sep","Sat>=8",["2","0","0"],"0","S"],["1949","only","-","Apr","Sun>=1",["2","0","0"],"60","D"],["1950","1951","-","May","Sun>=1",["2","0","0"],"60","D"]],Jordan:[["1973","only","-","Jun","6",["0","0","0"],"60","S"],["1973","1975","-","Oct","1",["0","0","0"],"0","-"],["1974","1977","-","May","1",["0","0","0"],"60","S"],["1976","only","-","Nov","1",["0","0","0"],"0","-"],["1977","only","-","Oct","1",["0","0","0"],"0","-"],["1978","only","-","Apr","30",["0","0","0"],"60","S"],["1978","only","-","Sep","30",["0","0","0"],"0","-"],["1985","only","-","Apr","1",["0","0","0"],"60","S"],["1985","only","-","Oct","1",["0","0","0"],"0","-"],["1986","1988","-","Apr","Fri>=1",["0","0","0"],"60","S"],["1986","1990","-","Oct","Fri>=1",["0","0","0"],"0","-"],["1989","only","-","May","8",["0","0","0"],"60","S"],["1990","only","-","Apr","27",["0","0","0"],"60","S"],["1991","only","-","Apr","17",["0","0","0"],"60","S"],["1991","only","-","Sep","27",["0","0","0"],"0","-"],["1992","only","-","Apr","10",["0","0","0"],"60","S"],["1992","1993","-","Oct","Fri>=1",["0","0","0"],"0","-"],["1993","1998","-","Apr","Fri>=1",["0","0","0"],"60","S"],["1994","only","-","Sep","Fri>=15",["0","0","0"],"0","-"],["1995","1998","-","Sep","Fri>=15",["0","0","0","s"],"0","-"],["1999","only","-","Jul","1",["0","0","0","s"],"60","S"],["1999","2002","-","Sep","lastFri",["0","0","0","s"],"0","-"],["2000","2001","-","Mar","lastThu",["0","0","0","s"],"60","S"],["2002","2012","-","Mar","lastThu",["24","0","0"],"60","S"],["2003","only","-","Oct","24",["0","0","0","s"],"0","-"],["2004","only","-","Oct","15",["0","0","0","s"],"0","-"],["2005","only","-","Sep","lastFri",["0","0","0","s"],"0","-"],["2006","2011","-","Oct","lastFri",["0","0","0","s"],"0","-"],["2013","only","-","Dec","20",["0","0","0"],"0","-"],["2014","max","-","Mar","lastThu",["24","0","0"],"60","S"],["2014","max","-","Oct","lastFri",["0","0","0","s"],"0","-"]],Kyrgyz:[["1992","1996","-","Apr","Sun>=7",["0","0","0","s"],"60","S"],["1992","1996","-","Sep","lastSun",["0","0","0"],"0","-"],["1997","2005","-","Mar","lastSun",["2","30","0"],"60","S"],["1997","2004","-","Oct","lastSun",["2","30","0"],"0","-"]],ROK:[["1960","only","-","May","15",["0","0","0"],"60","D"],["1960","only","-","Sep","13",["0","0","0"],"0","S"],["1987","1988","-","May","Sun>=8",["0","0","0"],"60","D"],["1987","1988","-","Oct","Sun>=8",["0","0","0"],"0","S"]],Lebanon:[["1920","only","-","Mar","28",["0","0","0"],"60","S"],["1920","only","-","Oct","25",["0","0","0"],"0","-"],["1921","only","-","Apr","3",["0","0","0"],"60","S"],["1921","only","-","Oct","3",["0","0","0"],"0","-"],["1922","only","-","Mar","26",["0","0","0"],"60","S"],["1922","only","-","Oct","8",["0","0","0"],"0","-"],["1923","only","-","Apr","22",["0","0","0"],"60","S"],["1923","only","-","Sep","16",["0","0","0"],"0","-"],["1957","1961","-","May","1",["0","0","0"],"60","S"],["1957","1961","-","Oct","1",["0","0","0"],"0","-"],["1972","only","-","Jun","22",["0","0","0"],"60","S"],["1972","1977","-","Oct","1",["0","0","0"],"0","-"],["1973","1977","-","May","1",["0","0","0"],"60","S"],["1978","only","-","Apr","30",["0","0","0"],"60","S"],["1978","only","-","Sep","30",["0","0","0"],"0","-"],["1984","1987","-","May","1",["0","0","0"],"60","S"],["1984","1991","-","Oct","16",["0","0","0"],"0","-"],["1988","only","-","Jun","1",["0","0","0"],"60","S"],["1989","only","-","May","10",["0","0","0"],"60","S"],["1990","1992","-","May","1",["0","0","0"],"60","S"],["1992","only","-","Oct","4",["0","0","0"],"0","-"],["1993","max","-","Mar","lastSun",["0","0","0"],"60","S"],["1993","1998","-","Sep","lastSun",["0","0","0"],"0","-"],["1999","max","-","Oct","lastSun",["0","0","0"],"0","-"]],NBorneo:[["1935","1941","-","Sep","14",["0","0","0"],"20","TS",""],["1935","1941","-","Dec","14",["0","0","0"],"0","-"]],Mongol:[["1983","1984","-","Apr","1",["0","0","0"],"60","S"],["1983","only","-","Oct","1",["0","0","0"],"0","-"],["1985","1998","-","Mar","lastSun",["0","0","0"],"60","S"],["1984","1998","-","Sep","lastSun",["0","0","0"],"0","-"],["2001","only","-","Apr","lastSat",["2","0","0"],"60","S"],["2001","2006","-","Sep","lastSat",["2","0","0"],"0","-"],["2002","2006","-","Mar","lastSat",["2","0","0"],"60","S"]],Pakistan:[["2002","only","-","Apr","Sun>=2",["0","1","0"],"60","S"],["2002","only","-","Oct","Sun>=2",["0","1","0"],"0","-"],["2008","only","-","Jun","1",["0","0","0"],"60","S"],["2008","2009","-","Nov","1",["0","0","0"],"0","-"],["2009","only","-","Apr","15",["0","0","0"],"60","S"]],EgyptAsia:[["1957","only","-","May","10",["0","0","0"],"60","S"],["1957","1958","-","Oct","1",["0","0","0"],"0","-"],["1958","only","-","May","1",["0","0","0"],"60","S"],["1959","1967","-","May","1",["1","0","0"],"60","S"],["1959","1965","-","Sep","30",["3","0","0"],"0","-"],["1966","only","-","Oct","1",["3","0","0"],"0","-"]],Palestine:[["1999","2005","-","Apr","Fri>=15",["0","0","0"],"60","S"],["1999","2003","-","Oct","Fri>=15",["0","0","0"],"0","-"],["2004","only","-","Oct","1",["1","0","0"],"0","-"],["2005","only","-","Oct","4",["2","0","0"],"0","-"],["2006","2007","-","Apr","1",["0","0","0"],"60","S"],["2006","only","-","Sep","22",["0","0","0"],"0","-"],["2007","only","-","Sep","Thu>=8",["2","0","0"],"0","-"],["2008","2009","-","Mar","lastFri",["0","0","0"],"60","S"],["2008","only","-","Sep","1",["0","0","0"],"0","-"],["2009","only","-","Sep","Fri>=1",["1","0","0"],"0","-"],["2010","only","-","Mar","26",["0","0","0"],"60","S"],["2010","only","-","Aug","11",["0","0","0"],"0","-"],["2011","only","-","Apr","1",["0","1","0"],"60","S"],["2011","only","-","Aug","1",["0","0","0"],"0","-"],["2011","only","-","Aug","30",["0","0","0"],"60","S"],["2011","only","-","Sep","30",["0","0","0"],"0","-"],["2012","max","-","Mar","lastThu",["24","0","0"],"60","S"],["2012","only","-","Sep","21",["1","0","0"],"0","-"],["2013","max","-","Sep","Fri>=21",["0","0","0"],"0","-"]],Phil:[["1936","only","-","Nov","1",["0","0","0"],"60","S"],["1937","only","-","Feb","1",["0","0","0"],"0","-"],["1954","only","-","Apr","12",["0","0","0"],"60","S"],["1954","only","-","Jul","1",["0","0","0"],"0","-"],["1978","only","-","Mar","22",["0","0","0"],"60","S"],["1978","only","-","Sep","21",["0","0","0"],"0","-"]],Syria:[["1920","1923","-","Apr","Sun>=15",["2","0","0"],"60","S"],["1920","1923","-","Oct","Sun>=1",["2","0","0"],"0","-"],["1962","only","-","Apr","29",["2","0","0"],"60","S"],["1962","only","-","Oct","1",["2","0","0"],"0","-"],["1963","1965","-","May","1",["2","0","0"],"60","S"],["1963","only","-","Sep","30",["2","0","0"],"0","-"],["1964","only","-","Oct","1",["2","0","0"],"0","-"],["1965","only","-","Sep","30",["2","0","0"],"0","-"],["1966","only","-","Apr","24",["2","0","0"],"60","S"],["1966","1976","-","Oct","1",["2","0","0"],"0","-"],["1967","1978","-","May","1",["2","0","0"],"60","S"],["1977","1978","-","Sep","1",["2","0","0"],"0","-"],["1983","1984","-","Apr","9",["2","0","0"],"60","S"],["1983","1984","-","Oct","1",["2","0","0"],"0","-"],["1986","only","-","Feb","16",["2","0","0"],"60","S"],["1986","only","-","Oct","9",["2","0","0"],"0","-"],["1987","only","-","Mar","1",["2","0","0"],"60","S"],["1987","1988","-","Oct","31",["2","0","0"],"0","-"],["1988","only","-","Mar","15",["2","0","0"],"60","S"],["1989","only","-","Mar","31",["2","0","0"],"60","S"],["1989","only","-","Oct","1",["2","0","0"],"0","-"],["1990","only","-","Apr","1",["2","0","0"],"60","S"],["1990","only","-","Sep","30",["2","0","0"],"0","-"],["1991","only","-","Apr","1",["0","0","0"],"60","S"],["1991","1992","-","Oct","1",["0","0","0"],"0","-"],["1992","only","-","Apr","8",["0","0","0"],"60","S"],["1993","only","-","Mar","26",["0","0","0"],"60","S"],["1993","only","-","Sep","25",["0","0","0"],"0","-"],["1994","1996","-","Apr","1",["0","0","0"],"60","S"],["1994","2005","-","Oct","1",["0","0","0"],"0","-"],["1997","1998","-","Mar","lastMon",["0","0","0"],"60","S"],["1999","2006","-","Apr","1",["0","0","0"],"60","S"],["2006","only","-","Sep","22",["0","0","0"],"0","-"],["2007","only","-","Mar","lastFri",["0","0","0"],"60","S"],["2007","only","-","Nov","Fri>=1",["0","0","0"],"0","-"],["2008","only","-","Apr","Fri>=1",["0","0","0"],"60","S"],["2008","only","-","Nov","1",["0","0","0"],"0","-"],["2009","only","-","Mar","lastFri",["0","0","0"],"60","S"],["2010","2011","-","Apr","Fri>=1",["0","0","0"],"60","S"],["2012","max","-","Mar","lastFri",["0","0","0"],"60","S"],["2009","max","-","Oct","lastFri",["0","0","0"],"0","-"]],Aus:[["1917","only","-","Jan","1",["0","1","0"],"60","D"],["1917","only","-","Mar","25",["2","0","0"],"0","S"],["1942","only","-","Jan","1",["2","0","0"],"60","D"],["1942","only","-","Mar","29",["2","0","0"],"0","S"],["1942","only","-","Sep","27",["2","0","0"],"60","D"],["1943","1944","-","Mar","lastSun",["2","0","0"],"0","S"],["1943","only","-","Oct","3",["2","0","0"],"60","D"]],AW:[["1974","only","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1975","only","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1983","only","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1984","only","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1991","only","-","Nov","17",["2","0","0","s"],"60","D"],["1992","only","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["2006","only","-","Dec","3",["2","0","0","s"],"60","D"],["2007","2009","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2007","2008","-","Oct","lastSun",["2","0","0","s"],"60","D"]],AQ:[["1971","only","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1972","only","-","Feb","lastSun",["2","0","0","s"],"0","S"],["1989","1991","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1990","1992","-","Mar","Sun>=1",["2","0","0","s"],"0","S"]],Holiday:[["1992","1993","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1993","1994","-","Mar","Sun>=1",["2","0","0","s"],"0","S"]],AS:[["1971","1985","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1986","only","-","Oct","19",["2","0","0","s"],"60","D"],["1987","2007","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1972","only","-","Feb","27",["2","0","0","s"],"0","S"],["1973","1985","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1986","1990","-","Mar","Sun>=15",["2","0","0","s"],"0","S"],["1991","only","-","Mar","3",["2","0","0","s"],"0","S"],["1992","only","-","Mar","22",["2","0","0","s"],"0","S"],["1993","only","-","Mar","7",["2","0","0","s"],"0","S"],["1994","only","-","Mar","20",["2","0","0","s"],"0","S"],["1995","2005","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2006","only","-","Apr","2",["2","0","0","s"],"0","S"],["2007","only","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2008","max","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["2008","max","-","Oct","Sun>=1",["2","0","0","s"],"60","D"]],AT:[["1967","only","-","Oct","Sun>=1",["2","0","0","s"],"60","D"],["1968","only","-","Mar","lastSun",["2","0","0","s"],"0","S"],["1968","1985","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1969","1971","-","Mar","Sun>=8",["2","0","0","s"],"0","S"],["1972","only","-","Feb","lastSun",["2","0","0","s"],"0","S"],["1973","1981","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1982","1983","-","Mar","lastSun",["2","0","0","s"],"0","S"],["1984","1986","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1986","only","-","Oct","Sun>=15",["2","0","0","s"],"60","D"],["1987","1990","-","Mar","Sun>=15",["2","0","0","s"],"0","S"],["1987","only","-","Oct","Sun>=22",["2","0","0","s"],"60","D"],["1988","1990","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1991","1999","-","Oct","Sun>=1",["2","0","0","s"],"60","D"],["1991","2005","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2000","only","-","Aug","lastSun",["2","0","0","s"],"60","D"],["2001","max","-","Oct","Sun>=1",["2","0","0","s"],"60","D"],["2006","only","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["2007","only","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2008","max","-","Apr","Sun>=1",["2","0","0","s"],"0","S"]],AV:[["1971","1985","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1972","only","-","Feb","lastSun",["2","0","0","s"],"0","S"],["1973","1985","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1986","1990","-","Mar","Sun>=15",["2","0","0","s"],"0","S"],["1986","1987","-","Oct","Sun>=15",["2","0","0","s"],"60","D"],["1988","1999","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1991","1994","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1995","2005","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2000","only","-","Aug","lastSun",["2","0","0","s"],"60","D"],["2001","2007","-","Oct","lastSun",["2","0","0","s"],"60","D"],["2006","only","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["2007","only","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2008","max","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["2008","max","-","Oct","Sun>=1",["2","0","0","s"],"60","D"]],AN:[["1971","1985","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1972","only","-","Feb","27",["2","0","0","s"],"0","S"],["1973","1981","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1982","only","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["1983","1985","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1986","1989","-","Mar","Sun>=15",["2","0","0","s"],"0","S"],["1986","only","-","Oct","19",["2","0","0","s"],"60","D"],["1987","1999","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1990","1995","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1996","2005","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2000","only","-","Aug","lastSun",["2","0","0","s"],"60","D"],["2001","2007","-","Oct","lastSun",["2","0","0","s"],"60","D"],["2006","only","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["2007","only","-","Mar","lastSun",["2","0","0","s"],"0","S"],["2008","max","-","Apr","Sun>=1",["2","0","0","s"],"0","S"],["2008","max","-","Oct","Sun>=1",["2","0","0","s"],"60","D"]],LH:[["1981","1984","-","Oct","lastSun",["2","0","0"],"60","D"],["1982","1985","-","Mar","Sun>=1",["2","0","0"],"0","S"],["1985","only","-","Oct","lastSun",["2","0","0"],"30","D"],["1986","1989","-","Mar","Sun>=15",["2","0","0"],"0","S"],["1986","only","-","Oct","19",["2","0","0"],"30","D"],["1987","1999","-","Oct","lastSun",["2","0","0"],"30","D"],["1990","1995","-","Mar","Sun>=1",["2","0","0"],"0","S"],["1996","2005","-","Mar","lastSun",["2","0","0"],"0","S"],["2000","only","-","Aug","lastSun",["2","0","0"],"30","D"],["2001","2007","-","Oct","lastSun",["2","0","0"],"30","D"],["2006","only","-","Apr","Sun>=1",["2","0","0"],"0","S"],["2007","only","-","Mar","lastSun",["2","0","0"],"0","S"],["2008","max","-","Apr","Sun>=1",["2","0","0"],"0","S"],["2008","max","-","Oct","Sun>=1",["2","0","0"],"30","D"]],Fiji:[["1998","1999","-","Nov","Sun>=1",["2","0","0"],"60","S"],["1999","2000","-","Feb","lastSun",["3","0","0"],"0","-"],["2009","only","-","Nov","29",["2","0","0"],"60","S"],["2010","only","-","Mar","lastSun",["3","0","0"],"0","-"],["2010","max","-","Oct","Sun>=21",["2","0","0"],"60","S"],["2011","only","-","Mar","Sun>=1",["3","0","0"],"0","-"],["2012","2013","-","Jan","Sun>=18",["3","0","0"],"0","-"],["2014","max","-","Jan","Sun>=18",["2","0","0"],"0","-"]],NC:[["1977","1978","-","Dec","Sun>=1",["0","0","0"],"60","S"],["1978","1979","-","Feb","27",["0","0","0"],"0","-"],["1996","only","-","Dec","1",["2","0","0","s"],"60","S"],["1997","only","-","Mar","2",["2","0","0","s"],"0","-"]],NZ:[["1927","only","-","Nov","6",["2","0","0"],"60","S"],["1928","only","-","Mar","4",["2","0","0"],"0","M"],["1928","1933","-","Oct","Sun>=8",["2","0","0"],"30","S"],["1929","1933","-","Mar","Sun>=15",["2","0","0"],"0","M"],["1934","1940","-","Apr","lastSun",["2","0","0"],"0","M"],["1934","1940","-","Sep","lastSun",["2","0","0"],"30","S"],["1946","only","-","Jan","1",["0","0","0"],"0","S"],["1974","only","-","Nov","Sun>=1",["2","0","0","s"],"60","D"],["1975","only","-","Feb","lastSun",["2","0","0","s"],"0","S"],["1975","1988","-","Oct","lastSun",["2","0","0","s"],"60","D"],["1976","1989","-","Mar","Sun>=1",["2","0","0","s"],"0","S"],["1989","only","-","Oct","Sun>=8",["2","0","0","s"],"60","D"],["1990","2006","-","Oct","Sun>=1",["2","0","0","s"],"60","D"],["1990","2007","-","Mar","Sun>=15",["2","0","0","s"],"0","S"],["2007","max","-","Sep","lastSun",["2","0","0","s"],"60","D"],["2008","max","-","Apr","Sun>=1",["2","0","0","s"],"0","S"]],Chatham:[["1974","only","-","Nov","Sun>=1",["2","45","0","s"],"60","D"],["1975","only","-","Feb","lastSun",["2","45","0","s"],"0","S"],["1975","1988","-","Oct","lastSun",["2","45","0","s"],"60","D"],["1976","1989","-","Mar","Sun>=1",["2","45","0","s"],"0","S"],["1989","only","-","Oct","Sun>=8",["2","45","0","s"],"60","D"],["1990","2006","-","Oct","Sun>=1",["2","45","0","s"],"60","D"],["1990","2007","-","Mar","Sun>=15",["2","45","0","s"],"0","S"],["2007","max","-","Sep","lastSun",["2","45","0","s"],"60","D"],["2008","max","-","Apr","Sun>=1",["2","45","0","s"],"0","S"]],Cook:[["1978","only","-","Nov","12",["0","0","0"],"30","HS"],["1979","1991","-","Mar","Sun>=1",["0","0","0"],"0","-"],["1979","1990","-","Oct","lastSun",["0","0","0"],"30","HS"]],WS:[["2010","only","-","Sep","lastSun",["0","0","0"],"60","D"],["2011","only","-","Apr","Sat>=1",["4","0","0"],"0","S"],["2011","only","-","Sep","lastSat",["3","0","0"],"60","D"],["2012","max","-","Apr","Sun>=1",["4","0","0"],"0","S"],["2012","max","-","Sep","lastSun",["3","0","0"],"60","D"]],Tonga:[["1999","only","-","Oct","7",["2","0","0","s"],"60","S"],["2000","only","-","Mar","19",["2","0","0","s"],"0","-"],["2000","2001","-","Nov","Sun>=1",["2","0","0"],"60","S"],["2001","2002","-","Jan","lastSun",["2","0","0"],"0","-"]],Vanuatu:[["1983","only","-","Sep","25",["0","0","0"],"60","S"],["1984","1991","-","Mar","Sun>=23",["0","0","0"],"0","-"],["1984","only","-","Oct","23",["0","0","0"],"60","S"],["1985","1991","-","Sep","Sun>=23",["0","0","0"],"60","S"],["1992","1993","-","Jan","Sun>=23",["0","0","0"],"0","-"],["1992","only","-","Oct","Sun>=23",["0","0","0"],"60","S"]],
"GB-Eire":[["1916","only","-","May","21",["2","0","0","s"],"60","BST"],["1916","only","-","Oct","1",["2","0","0","s"],"0","GMT"],["1917","only","-","Apr","8",["2","0","0","s"],"60","BST"],["1917","only","-","Sep","17",["2","0","0","s"],"0","GMT"],["1918","only","-","Mar","24",["2","0","0","s"],"60","BST"],["1918","only","-","Sep","30",["2","0","0","s"],"0","GMT"],["1919","only","-","Mar","30",["2","0","0","s"],"60","BST"],["1919","only","-","Sep","29",["2","0","0","s"],"0","GMT"],["1920","only","-","Mar","28",["2","0","0","s"],"60","BST"],["1920","only","-","Oct","25",["2","0","0","s"],"0","GMT"],["1921","only","-","Apr","3",["2","0","0","s"],"60","BST"],["1921","only","-","Oct","3",["2","0","0","s"],"0","GMT"],["1922","only","-","Mar","26",["2","0","0","s"],"60","BST"],["1922","only","-","Oct","8",["2","0","0","s"],"0","GMT"],["1923","only","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1923","1924","-","Sep","Sun>=16",["2","0","0","s"],"0","GMT"],["1924","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1925","1926","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1925","1938","-","Oct","Sun>=2",["2","0","0","s"],"0","GMT"],["1927","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1928","1929","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1930","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1931","1932","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1933","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1934","only","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1935","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1936","1937","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1938","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1939","only","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1939","only","-","Nov","Sun>=16",["2","0","0","s"],"0","GMT"],["1940","only","-","Feb","Sun>=23",["2","0","0","s"],"60","BST"],["1941","only","-","May","Sun>=2",["1","0","0","s"],"120","BDST"],["1941","1943","-","Aug","Sun>=9",["1","0","0","s"],"60","BST"],["1942","1944","-","Apr","Sun>=2",["1","0","0","s"],"120","BDST"],["1944","only","-","Sep","Sun>=16",["1","0","0","s"],"60","BST"],["1945","only","-","Apr","Mon>=2",["1","0","0","s"],"120","BDST"],["1945","only","-","Jul","Sun>=9",["1","0","0","s"],"60","BST"],["1945","1946","-","Oct","Sun>=2",["2","0","0","s"],"0","GMT"],["1946","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1947","only","-","Mar","16",["2","0","0","s"],"60","BST"],["1947","only","-","Apr","13",["1","0","0","s"],"120","BDST"],["1947","only","-","Aug","10",["1","0","0","s"],"60","BST"],["1947","only","-","Nov","2",["2","0","0","s"],"0","GMT"],["1948","only","-","Mar","14",["2","0","0","s"],"60","BST"],["1948","only","-","Oct","31",["2","0","0","s"],"0","GMT"],["1949","only","-","Apr","3",["2","0","0","s"],"60","BST"],["1949","only","-","Oct","30",["2","0","0","s"],"0","GMT"],["1950","1952","-","Apr","Sun>=14",["2","0","0","s"],"60","BST"],["1950","1952","-","Oct","Sun>=21",["2","0","0","s"],"0","GMT"],["1953","only","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1953","1960","-","Oct","Sun>=2",["2","0","0","s"],"0","GMT"],["1954","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1955","1956","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1957","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1958","1959","-","Apr","Sun>=16",["2","0","0","s"],"60","BST"],["1960","only","-","Apr","Sun>=9",["2","0","0","s"],"60","BST"],["1961","1963","-","Mar","lastSun",["2","0","0","s"],"60","BST"],["1961","1968","-","Oct","Sun>=23",["2","0","0","s"],"0","GMT"],["1964","1967","-","Mar","Sun>=19",["2","0","0","s"],"60","BST"],["1968","only","-","Feb","18",["2","0","0","s"],"60","BST"],["1972","1980","-","Mar","Sun>=16",["2","0","0","s"],"60","BST"],["1972","1980","-","Oct","Sun>=23",["2","0","0","s"],"0","GMT"],["1981","1995","-","Mar","lastSun",["1","0","0","u"],"60","BST"],["1981","1989","-","Oct","Sun>=23",["1","0","0","u"],"0","GMT"],["1990","1995","-","Oct","Sun>=22",["1","0","0","u"],"0","GMT"]],EU:[["1977","1980","-","Apr","Sun>=1",["1","0","0","u"],"60","S"],["1977","only","-","Sep","lastSun",["1","0","0","u"],"0","-"],["1978","only","-","Oct","1",["1","0","0","u"],"0","-"],["1979","1995","-","Sep","lastSun",["1","0","0","u"],"0","-"],["1981","max","-","Mar","lastSun",["1","0","0","u"],"60","S"],["1996","max","-","Oct","lastSun",["1","0","0","u"],"0","-"]],"W-Eur":[["1977","1980","-","Apr","Sun>=1",["1","0","0","s"],"60","S"],["1977","only","-","Sep","lastSun",["1","0","0","s"],"0","-"],["1978","only","-","Oct","1",["1","0","0","s"],"0","-"],["1979","1995","-","Sep","lastSun",["1","0","0","s"],"0","-"],["1981","max","-","Mar","lastSun",["1","0","0","s"],"60","S"],["1996","max","-","Oct","lastSun",["1","0","0","s"],"0","-"]],"C-Eur":[["1916","only","-","Apr","30",["23","0","0"],"60","S"],["1916","only","-","Oct","1",["1","0","0"],"0","-"],["1917","1918","-","Apr","Mon>=15",["2","0","0","s"],"60","S"],["1917","1918","-","Sep","Mon>=15",["2","0","0","s"],"0","-"],["1940","only","-","Apr","1",["2","0","0","s"],"60","S"],["1942","only","-","Nov","2",["2","0","0","s"],"0","-"],["1943","only","-","Mar","29",["2","0","0","s"],"60","S"],["1943","only","-","Oct","4",["2","0","0","s"],"0","-"],["1944","1945","-","Apr","Mon>=1",["2","0","0","s"],"60","S"],["1944","only","-","Oct","2",["2","0","0","s"],"0","-"],["1945","only","-","Sep","16",["2","0","0","s"],"0","-"],["1977","1980","-","Apr","Sun>=1",["2","0","0","s"],"60","S"],["1977","only","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1978","only","-","Oct","1",["2","0","0","s"],"0","-"],["1979","1995","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1981","max","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1996","max","-","Oct","lastSun",["2","0","0","s"],"0","-"]],"E-Eur":[["1977","1980","-","Apr","Sun>=1",["0","0","0"],"60","S"],["1977","only","-","Sep","lastSun",["0","0","0"],"0","-"],["1978","only","-","Oct","1",["0","0","0"],"0","-"],["1979","1995","-","Sep","lastSun",["0","0","0"],"0","-"],["1981","max","-","Mar","lastSun",["0","0","0"],"60","S"],["1996","max","-","Oct","lastSun",["0","0","0"],"0","-"]],Russia:[["1917","only","-","Jul","1",["23","0","0"],"60","MST",""],["1917","only","-","Dec","28",["0","0","0"],"0","MMT",""],["1918","only","-","May","31",["22","0","0"],"120","MDST",""],["1918","only","-","Sep","16",["1","0","0"],"60","MST"],["1919","only","-","May","31",["23","0","0"],"120","MDST"],["1919","only","-","Jul","1",["2","0","0"],"60","MSD"],["1919","only","-","Aug","16",["0","0","0"],"0","MSK"],["1921","only","-","Feb","14",["23","0","0"],"60","MSD"],["1921","only","-","Mar","20",["23","0","0"],"120","MSM",""],["1921","only","-","Sep","1",["0","0","0"],"60","MSD"],["1921","only","-","Oct","1",["0","0","0"],"0","-"],["1981","1984","-","Apr","1",["0","0","0"],"60","S"],["1981","1983","-","Oct","1",["0","0","0"],"0","-"],["1984","1991","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1985","1991","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1992","only","-","Mar","lastSat",["23","0","0"],"60","S"],["1992","only","-","Sep","lastSat",["23","0","0"],"0","-"],["1993","2010","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1993","1995","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1996","2010","-","Oct","lastSun",["2","0","0","s"],"0","-"]],Albania:[["1940","only","-","Jun","16",["0","0","0"],"60","S"],["1942","only","-","Nov","2",["3","0","0"],"0","-"],["1943","only","-","Mar","29",["2","0","0"],"60","S"],["1943","only","-","Apr","10",["3","0","0"],"0","-"],["1974","only","-","May","4",["0","0","0"],"60","S"],["1974","only","-","Oct","2",["0","0","0"],"0","-"],["1975","only","-","May","1",["0","0","0"],"60","S"],["1975","only","-","Oct","2",["0","0","0"],"0","-"],["1976","only","-","May","2",["0","0","0"],"60","S"],["1976","only","-","Oct","3",["0","0","0"],"0","-"],["1977","only","-","May","8",["0","0","0"],"60","S"],["1977","only","-","Oct","2",["0","0","0"],"0","-"],["1978","only","-","May","6",["0","0","0"],"60","S"],["1978","only","-","Oct","1",["0","0","0"],"0","-"],["1979","only","-","May","5",["0","0","0"],"60","S"],["1979","only","-","Sep","30",["0","0","0"],"0","-"],["1980","only","-","May","3",["0","0","0"],"60","S"],["1980","only","-","Oct","4",["0","0","0"],"0","-"],["1981","only","-","Apr","26",["0","0","0"],"60","S"],["1981","only","-","Sep","27",["0","0","0"],"0","-"],["1982","only","-","May","2",["0","0","0"],"60","S"],["1982","only","-","Oct","3",["0","0","0"],"0","-"],["1983","only","-","Apr","18",["0","0","0"],"60","S"],["1983","only","-","Oct","1",["0","0","0"],"0","-"],["1984","only","-","Apr","1",["0","0","0"],"60","S"]],Austria:[["1920","only","-","Apr","5",["2","0","0","s"],"60","S"],["1920","only","-","Sep","13",["2","0","0","s"],"0","-"],["1946","only","-","Apr","14",["2","0","0","s"],"60","S"],["1946","1948","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1947","only","-","Apr","6",["2","0","0","s"],"60","S"],["1948","only","-","Apr","18",["2","0","0","s"],"60","S"],["1980","only","-","Apr","6",["0","0","0"],"60","S"],["1980","only","-","Sep","28",["0","0","0"],"0","-"]],Belgium:[["1918","only","-","Mar","9",["0","0","0","s"],"60","S"],["1918","1919","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1919","only","-","Mar","1",["23","0","0","s"],"60","S"],["1920","only","-","Feb","14",["23","0","0","s"],"60","S"],["1920","only","-","Oct","23",["23","0","0","s"],"0","-"],["1921","only","-","Mar","14",["23","0","0","s"],"60","S"],["1921","only","-","Oct","25",["23","0","0","s"],"0","-"],["1922","only","-","Mar","25",["23","0","0","s"],"60","S"],["1922","1927","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1923","only","-","Apr","21",["23","0","0","s"],"60","S"],["1924","only","-","Mar","29",["23","0","0","s"],"60","S"],["1925","only","-","Apr","4",["23","0","0","s"],"60","S"],["1926","only","-","Apr","17",["23","0","0","s"],"60","S"],["1927","only","-","Apr","9",["23","0","0","s"],"60","S"],["1928","only","-","Apr","14",["23","0","0","s"],"60","S"],["1928","1938","-","Oct","Sun>=2",["2","0","0","s"],"0","-"],["1929","only","-","Apr","21",["2","0","0","s"],"60","S"],["1930","only","-","Apr","13",["2","0","0","s"],"60","S"],["1931","only","-","Apr","19",["2","0","0","s"],"60","S"],["1932","only","-","Apr","3",["2","0","0","s"],"60","S"],["1933","only","-","Mar","26",["2","0","0","s"],"60","S"],["1934","only","-","Apr","8",["2","0","0","s"],"60","S"],["1935","only","-","Mar","31",["2","0","0","s"],"60","S"],["1936","only","-","Apr","19",["2","0","0","s"],"60","S"],["1937","only","-","Apr","4",["2","0","0","s"],"60","S"],["1938","only","-","Mar","27",["2","0","0","s"],"60","S"],["1939","only","-","Apr","16",["2","0","0","s"],"60","S"],["1939","only","-","Nov","19",["2","0","0","s"],"0","-"],["1940","only","-","Feb","25",["2","0","0","s"],"60","S"],["1944","only","-","Sep","17",["2","0","0","s"],"0","-"],["1945","only","-","Apr","2",["2","0","0","s"],"60","S"],["1945","only","-","Sep","16",["2","0","0","s"],"0","-"],["1946","only","-","May","19",["2","0","0","s"],"60","S"],["1946","only","-","Oct","7",["2","0","0","s"],"0","-"]],Bulg:[["1979","only","-","Mar","31",["23","0","0"],"60","S"],["1979","only","-","Oct","1",["1","0","0"],"0","-"],["1980","1982","-","Apr","Sat>=1",["23","0","0"],"60","S"],["1980","only","-","Sep","29",["1","0","0"],"0","-"],["1981","only","-","Sep","27",["2","0","0"],"0","-"]],Czech:[["1945","only","-","Apr","8",["2","0","0","s"],"60","S"],["1945","only","-","Nov","18",["2","0","0","s"],"0","-"],["1946","only","-","May","6",["2","0","0","s"],"60","S"],["1946","1949","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1947","only","-","Apr","20",["2","0","0","s"],"60","S"],["1948","only","-","Apr","18",["2","0","0","s"],"60","S"],["1949","only","-","Apr","9",["2","0","0","s"],"60","S"]],Denmark:[["1916","only","-","May","14",["23","0","0"],"60","S"],["1916","only","-","Sep","30",["23","0","0"],"0","-"],["1940","only","-","May","15",["0","0","0"],"60","S"],["1945","only","-","Apr","2",["2","0","0","s"],"60","S"],["1945","only","-","Aug","15",["2","0","0","s"],"0","-"],["1946","only","-","May","1",["2","0","0","s"],"60","S"],["1946","only","-","Sep","1",["2","0","0","s"],"0","-"],["1947","only","-","May","4",["2","0","0","s"],"60","S"],["1947","only","-","Aug","10",["2","0","0","s"],"0","-"],["1948","only","-","May","9",["2","0","0","s"],"60","S"],["1948","only","-","Aug","8",["2","0","0","s"],"0","-"]],Thule:[["1991","1992","-","Mar","lastSun",["2","0","0"],"60","D"],["1991","1992","-","Sep","lastSun",["2","0","0"],"0","S"],["1993","2006","-","Apr","Sun>=1",["2","0","0"],"60","D"],["1993","2006","-","Oct","lastSun",["2","0","0"],"0","S"],["2007","max","-","Mar","Sun>=8",["2","0","0"],"60","D"],["2007","max","-","Nov","Sun>=1",["2","0","0"],"0","S"]],Finland:[["1942","only","-","Apr","2",["24","0","0"],"60","S"],["1942","only","-","Oct","4",["1","0","0"],"0","-"],["1981","1982","-","Mar","lastSun",["2","0","0"],"60","S"],["1981","1982","-","Sep","lastSun",["3","0","0"],"0","-"]],France:[["1916","only","-","Jun","14",["23","0","0","s"],"60","S"],["1916","1919","-","Oct","Sun>=1",["23","0","0","s"],"0","-"],["1917","only","-","Mar","24",["23","0","0","s"],"60","S"],["1918","only","-","Mar","9",["23","0","0","s"],"60","S"],["1919","only","-","Mar","1",["23","0","0","s"],"60","S"],["1920","only","-","Feb","14",["23","0","0","s"],"60","S"],["1920","only","-","Oct","23",["23","0","0","s"],"0","-"],["1921","only","-","Mar","14",["23","0","0","s"],"60","S"],["1921","only","-","Oct","25",["23","0","0","s"],"0","-"],["1922","only","-","Mar","25",["23","0","0","s"],"60","S"],["1922","1938","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1923","only","-","May","26",["23","0","0","s"],"60","S"],["1924","only","-","Mar","29",["23","0","0","s"],"60","S"],["1925","only","-","Apr","4",["23","0","0","s"],"60","S"],["1926","only","-","Apr","17",["23","0","0","s"],"60","S"],["1927","only","-","Apr","9",["23","0","0","s"],"60","S"],["1928","only","-","Apr","14",["23","0","0","s"],"60","S"],["1929","only","-","Apr","20",["23","0","0","s"],"60","S"],["1930","only","-","Apr","12",["23","0","0","s"],"60","S"],["1931","only","-","Apr","18",["23","0","0","s"],"60","S"],["1932","only","-","Apr","2",["23","0","0","s"],"60","S"],["1933","only","-","Mar","25",["23","0","0","s"],"60","S"],["1934","only","-","Apr","7",["23","0","0","s"],"60","S"],["1935","only","-","Mar","30",["23","0","0","s"],"60","S"],["1936","only","-","Apr","18",["23","0","0","s"],"60","S"],["1937","only","-","Apr","3",["23","0","0","s"],"60","S"],["1938","only","-","Mar","26",["23","0","0","s"],"60","S"],["1939","only","-","Apr","15",["23","0","0","s"],"60","S"],["1939","only","-","Nov","18",["23","0","0","s"],"0","-"],["1940","only","-","Feb","25",["2","0","0"],"60","S"],["1941","only","-","May","5",["0","0","0"],"120","M",""],["1941","only","-","Oct","6",["0","0","0"],"60","S"],["1942","only","-","Mar","9",["0","0","0"],"120","M"],["1942","only","-","Nov","2",["3","0","0"],"60","S"],["1943","only","-","Mar","29",["2","0","0"],"120","M"],["1943","only","-","Oct","4",["3","0","0"],"60","S"],["1944","only","-","Apr","3",["2","0","0"],"120","M"],["1944","only","-","Oct","8",["1","0","0"],"60","S"],["1945","only","-","Apr","2",["2","0","0"],"120","M"],["1945","only","-","Sep","16",["3","0","0"],"0","-"],["1976","only","-","Mar","28",["1","0","0"],"60","S"],["1976","only","-","Sep","26",["1","0","0"],"0","-"]],Germany:[["1946","only","-","Apr","14",["2","0","0","s"],"60","S"],["1946","only","-","Oct","7",["2","0","0","s"],"0","-"],["1947","1949","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1947","only","-","Apr","6",["3","0","0","s"],"60","S"],["1947","only","-","May","11",["2","0","0","s"],"120","M"],["1947","only","-","Jun","29",["3","0","0"],"60","S"],["1948","only","-","Apr","18",["2","0","0","s"],"60","S"],["1949","only","-","Apr","10",["2","0","0","s"],"60","S"]],SovietZone:[["1945","only","-","May","24",["2","0","0"],"120","M",""],["1945","only","-","Sep","24",["3","0","0"],"60","S"],["1945","only","-","Nov","18",["2","0","0","s"],"0","-"]],Greece:[["1932","only","-","Jul","7",["0","0","0"],"60","S"],["1932","only","-","Sep","1",["0","0","0"],"0","-"],["1941","only","-","Apr","7",["0","0","0"],"60","S"],["1942","only","-","Nov","2",["3","0","0"],"0","-"],["1943","only","-","Mar","30",["0","0","0"],"60","S"],["1943","only","-","Oct","4",["0","0","0"],"0","-"],["1952","only","-","Jul","1",["0","0","0"],"60","S"],["1952","only","-","Nov","2",["0","0","0"],"0","-"],["1975","only","-","Apr","12",["0","0","0","s"],"60","S"],["1975","only","-","Nov","26",["0","0","0","s"],"0","-"],["1976","only","-","Apr","11",["2","0","0","s"],"60","S"],["1976","only","-","Oct","10",["2","0","0","s"],"0","-"],["1977","1978","-","Apr","Sun>=1",["2","0","0","s"],"60","S"],["1977","only","-","Sep","26",["2","0","0","s"],"0","-"],["1978","only","-","Sep","24",["4","0","0"],"0","-"],["1979","only","-","Apr","1",["9","0","0"],"60","S"],["1979","only","-","Sep","29",["2","0","0"],"0","-"],["1980","only","-","Apr","1",["0","0","0"],"60","S"],["1980","only","-","Sep","28",["0","0","0"],"0","-"]],Hungary:[["1918","only","-","Apr","1",["3","0","0"],"60","S"],["1918","only","-","Sep","16",["3","0","0"],"0","-"],["1919","only","-","Apr","15",["3","0","0"],"60","S"],["1919","only","-","Nov","24",["3","0","0"],"0","-"],["1945","only","-","May","1",["23","0","0"],"60","S"],["1945","only","-","Nov","1",["0","0","0"],"0","-"],["1946","only","-","Mar","31",["2","0","0","s"],"60","S"],["1946","1949","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1947","1949","-","Apr","Sun>=4",["2","0","0","s"],"60","S"],["1950","only","-","Apr","17",["2","0","0","s"],"60","S"],["1950","only","-","Oct","23",["2","0","0","s"],"0","-"],["1954","1955","-","May","23",["0","0","0"],"60","S"],["1954","1955","-","Oct","3",["0","0","0"],"0","-"],["1956","only","-","Jun","Sun>=1",["0","0","0"],"60","S"],["1956","only","-","Sep","lastSun",["0","0","0"],"0","-"],["1957","only","-","Jun","Sun>=1",["1","0","0"],"60","S"],["1957","only","-","Sep","lastSun",["3","0","0"],"0","-"],["1980","only","-","Apr","6",["1","0","0"],"60","S"]],Iceland:[["1917","1918","-","Feb","19",["23","0","0"],"60","S"],["1917","only","-","Oct","21",["1","0","0"],"0","-"],["1918","only","-","Nov","16",["1","0","0"],"0","-"],["1939","only","-","Apr","29",["23","0","0"],"60","S"],["1939","only","-","Nov","29",["2","0","0"],"0","-"],["1940","only","-","Feb","25",["2","0","0"],"60","S"],["1940","only","-","Nov","3",["2","0","0"],"0","-"],["1941","only","-","Mar","2",["1","0","0","s"],"60","S"],["1941","only","-","Nov","2",["1","0","0","s"],"0","-"],["1942","only","-","Mar","8",["1","0","0","s"],"60","S"],["1942","only","-","Oct","25",["1","0","0","s"],"0","-"],["1943","1946","-","Mar","Sun>=1",["1","0","0","s"],"60","S"],["1943","1948","-","Oct","Sun>=22",["1","0","0","s"],"0","-"],["1947","1967","-","Apr","Sun>=1",["1","0","0","s"],"60","S"],["1949","only","-","Oct","30",["1","0","0","s"],"0","-"],["1950","1966","-","Oct","Sun>=22",["1","0","0","s"],"0","-"],["1967","only","-","Oct","29",["1","0","0","s"],"0","-"]],Italy:[["1916","only","-","Jun","3",["0","0","0","s"],"60","S"],["1916","only","-","Oct","1",["0","0","0","s"],"0","-"],["1917","only","-","Apr","1",["0","0","0","s"],"60","S"],["1917","only","-","Sep","30",["0","0","0","s"],"0","-"],["1918","only","-","Mar","10",["0","0","0","s"],"60","S"],["1918","1919","-","Oct","Sun>=1",["0","0","0","s"],"0","-"],["1919","only","-","Mar","2",["0","0","0","s"],"60","S"],["1920","only","-","Mar","21",["0","0","0","s"],"60","S"],["1920","only","-","Sep","19",["0","0","0","s"],"0","-"],["1940","only","-","Jun","15",["0","0","0","s"],"60","S"],["1944","only","-","Sep","17",["0","0","0","s"],"0","-"],["1945","only","-","Apr","2",["2","0","0"],"60","S"],["1945","only","-","Sep","15",["0","0","0","s"],"0","-"],["1946","only","-","Mar","17",["2","0","0","s"],"60","S"],["1946","only","-","Oct","6",["2","0","0","s"],"0","-"],["1947","only","-","Mar","16",["0","0","0","s"],"60","S"],["1947","only","-","Oct","5",["0","0","0","s"],"0","-"],["1948","only","-","Feb","29",["2","0","0","s"],"60","S"],["1948","only","-","Oct","3",["2","0","0","s"],"0","-"],["1966","1968","-","May","Sun>=22",["0","0","0"],"60","S"],["1966","1969","-","Sep","Sun>=22",["0","0","0"],"0","-"],["1969","only","-","Jun","1",["0","0","0"],"60","S"],["1970","only","-","May","31",["0","0","0"],"60","S"],["1970","only","-","Sep","lastSun",["0","0","0"],"0","-"],["1971","1972","-","May","Sun>=22",["0","0","0"],"60","S"],["1971","only","-","Sep","lastSun",["1","0","0"],"0","-"],["1972","only","-","Oct","1",["0","0","0"],"0","-"],["1973","only","-","Jun","3",["0","0","0"],"60","S"],["1973","1974","-","Sep","lastSun",["0","0","0"],"0","-"],["1974","only","-","May","26",["0","0","0"],"60","S"],["1975","only","-","Jun","1",["0","0","0","s"],"60","S"],["1975","1977","-","Sep","lastSun",["0","0","0","s"],"0","-"],["1976","only","-","May","30",["0","0","0","s"],"60","S"],["1977","1979","-","May","Sun>=22",["0","0","0","s"],"60","S"],["1978","only","-","Oct","1",["0","0","0","s"],"0","-"],["1979","only","-","Sep","30",["0","0","0","s"],"0","-"]],Latvia:[["1989","1996","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1989","1996","-","Sep","lastSun",["2","0","0","s"],"0","-"]],Lux:[["1916","only","-","May","14",["23","0","0"],"60","S"],["1916","only","-","Oct","1",["1","0","0"],"0","-"],["1917","only","-","Apr","28",["23","0","0"],"60","S"],["1917","only","-","Sep","17",["1","0","0"],"0","-"],["1918","only","-","Apr","Mon>=15",["2","0","0","s"],"60","S"],["1918","only","-","Sep","Mon>=15",["2","0","0","s"],"0","-"],["1919","only","-","Mar","1",["23","0","0"],"60","S"],["1919","only","-","Oct","5",["3","0","0"],"0","-"],["1920","only","-","Feb","14",["23","0","0"],"60","S"],["1920","only","-","Oct","24",["2","0","0"],"0","-"],["1921","only","-","Mar","14",["23","0","0"],"60","S"],["1921","only","-","Oct","26",["2","0","0"],"0","-"],["1922","only","-","Mar","25",["23","0","0"],"60","S"],["1922","only","-","Oct","Sun>=2",["1","0","0"],"0","-"],["1923","only","-","Apr","21",["23","0","0"],"60","S"],["1923","only","-","Oct","Sun>=2",["2","0","0"],"0","-"],["1924","only","-","Mar","29",["23","0","0"],"60","S"],["1924","1928","-","Oct","Sun>=2",["1","0","0"],"0","-"],["1925","only","-","Apr","5",["23","0","0"],"60","S"],["1926","only","-","Apr","17",["23","0","0"],"60","S"],["1927","only","-","Apr","9",["23","0","0"],"60","S"],["1928","only","-","Apr","14",["23","0","0"],"60","S"],["1929","only","-","Apr","20",["23","0","0"],"60","S"]],Malta:[["1973","only","-","Mar","31",["0","0","0","s"],"60","S"],["1973","only","-","Sep","29",["0","0","0","s"],"0","-"],["1974","only","-","Apr","21",["0","0","0","s"],"60","S"],["1974","only","-","Sep","16",["0","0","0","s"],"0","-"],["1975","1979","-","Apr","Sun>=15",["2","0","0"],"60","S"],["1975","1980","-","Sep","Sun>=15",["2","0","0"],"0","-"],["1980","only","-","Mar","31",["2","0","0"],"60","S"]],Neth:[["1916","only","-","May","1",["0","0","0"],"60","NST",""],["1916","only","-","Oct","1",["0","0","0"],"0","AMT",""],["1917","only","-","Apr","16",["2","0","0","s"],"60","NST"],["1917","only","-","Sep","17",["2","0","0","s"],"0","AMT"],["1918","1921","-","Apr","Mon>=1",["2","0","0","s"],"60","NST"],["1918","1921","-","Sep","lastMon",["2","0","0","s"],"0","AMT"],["1922","only","-","Mar","lastSun",["2","0","0","s"],"60","NST"],["1922","1936","-","Oct","Sun>=2",["2","0","0","s"],"0","AMT"],["1923","only","-","Jun","Fri>=1",["2","0","0","s"],"60","NST"],["1924","only","-","Mar","lastSun",["2","0","0","s"],"60","NST"],["1925","only","-","Jun","Fri>=1",["2","0","0","s"],"60","NST"],["1926","1931","-","May","15",["2","0","0","s"],"60","NST"],["1932","only","-","May","22",["2","0","0","s"],"60","NST"],["1933","1936","-","May","15",["2","0","0","s"],"60","NST"],["1937","only","-","May","22",["2","0","0","s"],"60","NST"],["1937","only","-","Jul","1",["0","0","0"],"60","S"],["1937","1939","-","Oct","Sun>=2",["2","0","0","s"],"0","-"],["1938","1939","-","May","15",["2","0","0","s"],"60","S"],["1945","only","-","Apr","2",["2","0","0","s"],"60","S"],["1945","only","-","Sep","16",["2","0","0","s"],"0","-"]],Norway:[["1916","only","-","May","22",["1","0","0"],"60","S"],["1916","only","-","Sep","30",["0","0","0"],"0","-"],["1945","only","-","Apr","2",["2","0","0","s"],"60","S"],["1945","only","-","Oct","1",["2","0","0","s"],"0","-"],["1959","1964","-","Mar","Sun>=15",["2","0","0","s"],"60","S"],["1959","1965","-","Sep","Sun>=15",["2","0","0","s"],"0","-"],["1965","only","-","Apr","25",["2","0","0","s"],"60","S"]],Poland:[["1918","1919","-","Sep","16",["2","0","0","s"],"0","-"],["1919","only","-","Apr","15",["2","0","0","s"],"60","S"],["1944","only","-","Apr","3",["2","0","0","s"],"60","S"],["1944","only","-","Oct","4",["2","0","0"],"0","-"],["1945","only","-","Apr","29",["0","0","0"],"60","S"],["1945","only","-","Nov","1",["0","0","0"],"0","-"],["1946","only","-","Apr","14",["0","0","0","s"],"60","S"],["1946","only","-","Oct","7",["2","0","0","s"],"0","-"],["1947","only","-","May","4",["2","0","0","s"],"60","S"],["1947","1949","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1948","only","-","Apr","18",["2","0","0","s"],"60","S"],["1949","only","-","Apr","10",["2","0","0","s"],"60","S"],["1957","only","-","Jun","2",["1","0","0","s"],"60","S"],["1957","1958","-","Sep","lastSun",["1","0","0","s"],"0","-"],["1958","only","-","Mar","30",["1","0","0","s"],"60","S"],["1959","only","-","May","31",["1","0","0","s"],"60","S"],["1959","1961","-","Oct","Sun>=1",["1","0","0","s"],"0","-"],["1960","only","-","Apr","3",["1","0","0","s"],"60","S"],["1961","1964","-","May","lastSun",["1","0","0","s"],"60","S"],["1962","1964","-","Sep","lastSun",["1","0","0","s"],"0","-"]],Port:[["1916","only","-","Jun","17",["23","0","0"],"60","S"],["1916","only","-","Nov","1",["1","0","0"],"0","-"],["1917","only","-","Feb","28",["23","0","0","s"],"60","S"],["1917","1921","-","Oct","14",["23","0","0","s"],"0","-"],["1918","only","-","Mar","1",["23","0","0","s"],"60","S"],["1919","only","-","Feb","28",["23","0","0","s"],"60","S"],["1920","only","-","Feb","29",["23","0","0","s"],"60","S"],["1921","only","-","Feb","28",["23","0","0","s"],"60","S"],["1924","only","-","Apr","16",["23","0","0","s"],"60","S"],["1924","only","-","Oct","14",["23","0","0","s"],"0","-"],["1926","only","-","Apr","17",["23","0","0","s"],"60","S"],["1926","1929","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1927","only","-","Apr","9",["23","0","0","s"],"60","S"],["1928","only","-","Apr","14",["23","0","0","s"],"60","S"],["1929","only","-","Apr","20",["23","0","0","s"],"60","S"],["1931","only","-","Apr","18",["23","0","0","s"],"60","S"],["1931","1932","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1932","only","-","Apr","2",["23","0","0","s"],"60","S"],["1934","only","-","Apr","7",["23","0","0","s"],"60","S"],["1934","1938","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1935","only","-","Mar","30",["23","0","0","s"],"60","S"],["1936","only","-","Apr","18",["23","0","0","s"],"60","S"],["1937","only","-","Apr","3",["23","0","0","s"],"60","S"],["1938","only","-","Mar","26",["23","0","0","s"],"60","S"],["1939","only","-","Apr","15",["23","0","0","s"],"60","S"],["1939","only","-","Nov","18",["23","0","0","s"],"0","-"],["1940","only","-","Feb","24",["23","0","0","s"],"60","S"],["1940","1941","-","Oct","5",["23","0","0","s"],"0","-"],["1941","only","-","Apr","5",["23","0","0","s"],"60","S"],["1942","1945","-","Mar","Sat>=8",["23","0","0","s"],"60","S"],["1942","only","-","Apr","25",["22","0","0","s"],"120","M",""],["1942","only","-","Aug","15",["22","0","0","s"],"60","S"],["1942","1945","-","Oct","Sat>=24",["23","0","0","s"],"0","-"],["1943","only","-","Apr","17",["22","0","0","s"],"120","M"],["1943","1945","-","Aug","Sat>=25",["22","0","0","s"],"60","S"],["1944","1945","-","Apr","Sat>=21",["22","0","0","s"],"120","M"],["1946","only","-","Apr","Sat>=1",["23","0","0","s"],"60","S"],["1946","only","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1947","1949","-","Apr","Sun>=1",["2","0","0","s"],"60","S"],["1947","1949","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1951","1965","-","Apr","Sun>=1",["2","0","0","s"],"60","S"],["1951","1965","-","Oct","Sun>=1",["2","0","0","s"],"0","-"],["1977","only","-","Mar","27",["0","0","0","s"],"60","S"],["1977","only","-","Sep","25",["0","0","0","s"],"0","-"],["1978","1979","-","Apr","Sun>=1",["0","0","0","s"],"60","S"],["1978","only","-","Oct","1",["0","0","0","s"],"0","-"],["1979","1982","-","Sep","lastSun",["1","0","0","s"],"0","-"],["1980","only","-","Mar","lastSun",["0","0","0","s"],"60","S"],["1981","1982","-","Mar","lastSun",["1","0","0","s"],"60","S"],["1983","only","-","Mar","lastSun",["2","0","0","s"],"60","S"]],Romania:[["1932","only","-","May","21",["0","0","0","s"],"60","S"],["1932","1939","-","Oct","Sun>=1",["0","0","0","s"],"0","-"],["1933","1939","-","Apr","Sun>=2",["0","0","0","s"],"60","S"],["1979","only","-","May","27",["0","0","0"],"60","S"],["1979","only","-","Sep","lastSun",["0","0","0"],"0","-"],["1980","only","-","Apr","5",["23","0","0"],"60","S"],["1980","only","-","Sep","lastSun",["1","0","0"],"0","-"],["1991","1993","-","Mar","lastSun",["0","0","0","s"],"60","S"],["1991","1993","-","Sep","lastSun",["0","0","0","s"],"0","-"]],Spain:[["1917","only","-","May","5",["23","0","0","s"],"60","S"],["1917","1919","-","Oct","6",["23","0","0","s"],"0","-"],["1918","only","-","Apr","15",["23","0","0","s"],"60","S"],["1919","only","-","Apr","5",["23","0","0","s"],"60","S"],["1924","only","-","Apr","16",["23","0","0","s"],"60","S"],["1924","only","-","Oct","4",["23","0","0","s"],"0","-"],["1926","only","-","Apr","17",["23","0","0","s"],"60","S"],["1926","1929","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1927","only","-","Apr","9",["23","0","0","s"],"60","S"],["1928","only","-","Apr","14",["23","0","0","s"],"60","S"],["1929","only","-","Apr","20",["23","0","0","s"],"60","S"],["1937","only","-","May","22",["23","0","0","s"],"60","S"],["1937","1939","-","Oct","Sat>=1",["23","0","0","s"],"0","-"],["1938","only","-","Mar","22",["23","0","0","s"],"60","S"],["1939","only","-","Apr","15",["23","0","0","s"],"60","S"],["1940","only","-","Mar","16",["23","0","0","s"],"60","S"],["1942","only","-","May","2",["22","0","0","s"],"120","M",""],["1942","only","-","Sep","1",["22","0","0","s"],"60","S"],["1943","1946","-","Apr","Sat>=13",["22","0","0","s"],"120","M"],["1943","only","-","Oct","3",["22","0","0","s"],"60","S"],["1944","only","-","Oct","10",["22","0","0","s"],"60","S"],["1945","only","-","Sep","30",["1","0","0"],"60","S"],["1946","only","-","Sep","30",["0","0","0"],"0","-"],["1949","only","-","Apr","30",["23","0","0"],"60","S"],["1949","only","-","Sep","30",["1","0","0"],"0","-"],["1974","1975","-","Apr","Sat>=13",["23","0","0"],"60","S"],["1974","1975","-","Oct","Sun>=1",["1","0","0"],"0","-"],["1976","only","-","Mar","27",["23","0","0"],"60","S"],["1976","1977","-","Sep","lastSun",["1","0","0"],"0","-"],["1977","1978","-","Apr","2",["23","0","0"],"60","S"],["1978","only","-","Oct","1",["1","0","0"],"0","-"]],SpainAfrica:[["1967","only","-","Jun","3",["12","0","0"],"60","S"],["1967","only","-","Oct","1",["0","0","0"],"0","-"],["1974","only","-","Jun","24",["0","0","0"],"60","S"],["1974","only","-","Sep","1",["0","0","0"],"0","-"],["1976","1977","-","May","1",["0","0","0"],"60","S"],["1976","only","-","Aug","1",["0","0","0"],"0","-"],["1977","only","-","Sep","28",["0","0","0"],"0","-"],["1978","only","-","Jun","1",["0","0","0"],"60","S"],["1978","only","-","Aug","4",["0","0","0"],"0","-"]],Swiss:[["1941","1942","-","May","Mon>=1",["1","0","0"],"60","S"],["1941","1942","-","Oct","Mon>=1",["2","0","0"],"0","-"]],Turkey:[["1916","only","-","May","1",["0","0","0"],"60","S"],["1916","only","-","Oct","1",["0","0","0"],"0","-"],["1920","only","-","Mar","28",["0","0","0"],"60","S"],["1920","only","-","Oct","25",["0","0","0"],"0","-"],["1921","only","-","Apr","3",["0","0","0"],"60","S"],["1921","only","-","Oct","3",["0","0","0"],"0","-"],["1922","only","-","Mar","26",["0","0","0"],"60","S"],["1922","only","-","Oct","8",["0","0","0"],"0","-"],["1924","only","-","May","13",["0","0","0"],"60","S"],["1924","1925","-","Oct","1",["0","0","0"],"0","-"],["1925","only","-","May","1",["0","0","0"],"60","S"],["1940","only","-","Jun","30",["0","0","0"],"60","S"],["1940","only","-","Oct","5",["0","0","0"],"0","-"],["1940","only","-","Dec","1",["0","0","0"],"60","S"],["1941","only","-","Sep","21",["0","0","0"],"0","-"],["1942","only","-","Apr","1",["0","0","0"],"60","S"],["1942","only","-","Nov","1",["0","0","0"],"0","-"],["1945","only","-","Apr","2",["0","0","0"],"60","S"],["1945","only","-","Oct","8",["0","0","0"],"0","-"],["1946","only","-","Jun","1",["0","0","0"],"60","S"],["1946","only","-","Oct","1",["0","0","0"],"0","-"],["1947","1948","-","Apr","Sun>=16",["0","0","0"],"60","S"],["1947","1950","-","Oct","Sun>=2",["0","0","0"],"0","-"],["1949","only","-","Apr","10",["0","0","0"],"60","S"],["1950","only","-","Apr","19",["0","0","0"],"60","S"],["1951","only","-","Apr","22",["0","0","0"],"60","S"],["1951","only","-","Oct","8",["0","0","0"],"0","-"],["1962","only","-","Jul","15",["0","0","0"],"60","S"],["1962","only","-","Oct","8",["0","0","0"],"0","-"],["1964","only","-","May","15",["0","0","0"],"60","S"],["1964","only","-","Oct","1",["0","0","0"],"0","-"],["1970","1972","-","May","Sun>=2",["0","0","0"],"60","S"],["1970","1972","-","Oct","Sun>=2",["0","0","0"],"0","-"],["1973","only","-","Jun","3",["1","0","0"],"60","S"],["1973","only","-","Nov","4",["3","0","0"],"0","-"],["1974","only","-","Mar","31",["2","0","0"],"60","S"],["1974","only","-","Nov","3",["5","0","0"],"0","-"],["1975","only","-","Mar","30",["0","0","0"],"60","S"],["1975","1976","-","Oct","lastSun",["0","0","0"],"0","-"],["1976","only","-","Jun","1",["0","0","0"],"60","S"],["1977","1978","-","Apr","Sun>=1",["0","0","0"],"60","S"],["1977","only","-","Oct","16",["0","0","0"],"0","-"],["1979","1980","-","Apr","Sun>=1",["3","0","0"],"60","S"],["1979","1982","-","Oct","Mon>=11",["0","0","0"],"0","-"],["1981","1982","-","Mar","lastSun",["3","0","0"],"60","S"],["1983","only","-","Jul","31",["0","0","0"],"60","S"],["1983","only","-","Oct","2",["0","0","0"],"0","-"],["1985","only","-","Apr","20",["0","0","0"],"60","S"],["1985","only","-","Sep","28",["0","0","0"],"0","-"],["1986","1990","-","Mar","lastSun",["2","0","0","s"],"60","S"],["1986","1990","-","Sep","lastSun",["2","0","0","s"],"0","-"],["1991","2006","-","Mar","lastSun",["1","0","0","s"],"60","S"],["1991","1995","-","Sep","lastSun",["1","0","0","s"],"0","-"],["1996","2006","-","Oct","lastSun",["1","0","0","s"],"0","-"]],
US:[["1918","1919","-","Mar","lastSun",["2","0","0"],"60","D"],["1918","1919","-","Oct","lastSun",["2","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","30",["2","0","0"],"0","S"],["1967","2006","-","Oct","lastSun",["2","0","0"],"0","S"],["1967","1973","-","Apr","lastSun",["2","0","0"],"60","D"],["1974","only","-","Jan","6",["2","0","0"],"60","D"],["1975","only","-","Feb","23",["2","0","0"],"60","D"],["1976","1986","-","Apr","lastSun",["2","0","0"],"60","D"],["1987","2006","-","Apr","Sun>=1",["2","0","0"],"60","D"],["2007","max","-","Mar","Sun>=8",["2","0","0"],"60","D"],["2007","max","-","Nov","Sun>=1",["2","0","0"],"0","S"]],NYC:[["1920","only","-","Mar","lastSun",["2","0","0"],"60","D"],["1920","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1921","1966","-","Apr","lastSun",["2","0","0"],"60","D"],["1921","1954","-","Sep","lastSun",["2","0","0"],"0","S"],["1955","1966","-","Oct","lastSun",["2","0","0"],"0","S"]],Chicago:[["1920","only","-","Jun","13",["2","0","0"],"60","D"],["1920","1921","-","Oct","lastSun",["2","0","0"],"0","S"],["1921","only","-","Mar","lastSun",["2","0","0"],"60","D"],["1922","1966","-","Apr","lastSun",["2","0","0"],"60","D"],["1922","1954","-","Sep","lastSun",["2","0","0"],"0","S"],["1955","1966","-","Oct","lastSun",["2","0","0"],"0","S"]],Denver:[["1920","1921","-","Mar","lastSun",["2","0","0"],"60","D"],["1920","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1921","only","-","May","22",["2","0","0"],"0","S"],["1965","1966","-","Apr","lastSun",["2","0","0"],"60","D"],["1965","1966","-","Oct","lastSun",["2","0","0"],"0","S"]],CA:[["1948","only","-","Mar","14",["2","0","0"],"60","D"],["1949","only","-","Jan","1",["2","0","0"],"0","S"],["1950","1966","-","Apr","lastSun",["2","0","0"],"60","D"],["1950","1961","-","Sep","lastSun",["2","0","0"],"0","S"],["1962","1966","-","Oct","lastSun",["2","0","0"],"0","S"]],Indianapolis:[["1941","only","-","Jun","22",["2","0","0"],"60","D"],["1941","1954","-","Sep","lastSun",["2","0","0"],"0","S"],["1946","1954","-","Apr","lastSun",["2","0","0"],"60","D"]],Marengo:[["1951","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1951","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1954","1960","-","Apr","lastSun",["2","0","0"],"60","D"],["1954","1960","-","Sep","lastSun",["2","0","0"],"0","S"]],Vincennes:[["1946","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1953","1954","-","Apr","lastSun",["2","0","0"],"60","D"],["1953","1959","-","Sep","lastSun",["2","0","0"],"0","S"],["1955","only","-","May","1",["0","0","0"],"60","D"],["1956","1963","-","Apr","lastSun",["2","0","0"],"60","D"],["1960","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1961","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1962","1963","-","Oct","lastSun",["2","0","0"],"0","S"]],Perry:[["1946","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1953","1954","-","Apr","lastSun",["2","0","0"],"60","D"],["1953","1959","-","Sep","lastSun",["2","0","0"],"0","S"],["1955","only","-","May","1",["0","0","0"],"60","D"],["1956","1963","-","Apr","lastSun",["2","0","0"],"60","D"],["1960","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1961","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1962","1963","-","Oct","lastSun",["2","0","0"],"0","S"]],Pike:[["1955","only","-","May","1",["0","0","0"],"60","D"],["1955","1960","-","Sep","lastSun",["2","0","0"],"0","S"],["1956","1964","-","Apr","lastSun",["2","0","0"],"60","D"],["1961","1964","-","Oct","lastSun",["2","0","0"],"0","S"]],Starke:[["1947","1961","-","Apr","lastSun",["2","0","0"],"60","D"],["1947","1954","-","Sep","lastSun",["2","0","0"],"0","S"],["1955","1956","-","Oct","lastSun",["2","0","0"],"0","S"],["1957","1958","-","Sep","lastSun",["2","0","0"],"0","S"],["1959","1961","-","Oct","lastSun",["2","0","0"],"0","S"]],Pulaski:[["1946","1960","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","1954","-","Sep","lastSun",["2","0","0"],"0","S"],["1955","1956","-","Oct","lastSun",["2","0","0"],"0","S"],["1957","1960","-","Sep","lastSun",["2","0","0"],"0","S"]],Louisville:[["1921","only","-","May","1",["2","0","0"],"60","D"],["1921","only","-","Sep","1",["2","0","0"],"0","S"],["1941","1961","-","Apr","lastSun",["2","0","0"],"60","D"],["1941","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1946","only","-","Jun","2",["2","0","0"],"0","S"],["1950","1955","-","Sep","lastSun",["2","0","0"],"0","S"],["1956","1960","-","Oct","lastSun",["2","0","0"],"0","S"]],Detroit:[["1948","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1948","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1967","only","-","Jun","14",["2","0","0"],"60","D"],["1967","only","-","Oct","lastSun",["2","0","0"],"0","S"]],Menominee:[["1946","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1966","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1966","only","-","Oct","lastSun",["2","0","0"],"0","S"]],Canada:[["1918","only","-","Apr","14",["2","0","0"],"60","D"],["1918","only","-","Oct","27",["2","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","30",["2","0","0"],"0","S"],["1974","1986","-","Apr","lastSun",["2","0","0"],"60","D"],["1974","2006","-","Oct","lastSun",["2","0","0"],"0","S"],["1987","2006","-","Apr","Sun>=1",["2","0","0"],"60","D"],["2007","max","-","Mar","Sun>=8",["2","0","0"],"60","D"],["2007","max","-","Nov","Sun>=1",["2","0","0"],"0","S"]],StJohns:[["1917","only","-","Apr","8",["2","0","0"],"60","D"],["1917","only","-","Sep","17",["2","0","0"],"0","S"],["1919","only","-","May","5",["23","0","0"],"60","D"],["1919","only","-","Aug","12",["23","0","0"],"0","S"],["1920","1935","-","May","Sun>=1",["23","0","0"],"60","D"],["1920","1935","-","Oct","lastSun",["23","0","0"],"0","S"],["1936","1941","-","May","Mon>=9",["0","0","0"],"60","D"],["1936","1941","-","Oct","Mon>=2",["0","0","0"],"0","S"],["1946","1950","-","May","Sun>=8",["2","0","0"],"60","D"],["1946","1950","-","Oct","Sun>=2",["2","0","0"],"0","S"],["1951","1986","-","Apr","lastSun",["2","0","0"],"60","D"],["1951","1959","-","Sep","lastSun",["2","0","0"],"0","S"],["1960","1986","-","Oct","lastSun",["2","0","0"],"0","S"],["1987","only","-","Apr","Sun>=1",["0","1","0"],"60","D"],["1987","2006","-","Oct","lastSun",["0","1","0"],"0","S"],["1988","only","-","Apr","Sun>=1",["0","1","0"],"120","DD"],["1989","2006","-","Apr","Sun>=1",["0","1","0"],"60","D"],["2007","2011","-","Mar","Sun>=8",["0","1","0"],"60","D"],["2007","2010","-","Nov","Sun>=1",["0","1","0"],"0","S"]],Halifax:[["1916","only","-","Apr","1",["0","0","0"],"60","D"],["1916","only","-","Oct","1",["0","0","0"],"0","S"],["1920","only","-","May","9",["0","0","0"],"60","D"],["1920","only","-","Aug","29",["0","0","0"],"0","S"],["1921","only","-","May","6",["0","0","0"],"60","D"],["1921","1922","-","Sep","5",["0","0","0"],"0","S"],["1922","only","-","Apr","30",["0","0","0"],"60","D"],["1923","1925","-","May","Sun>=1",["0","0","0"],"60","D"],["1923","only","-","Sep","4",["0","0","0"],"0","S"],["1924","only","-","Sep","15",["0","0","0"],"0","S"],["1925","only","-","Sep","28",["0","0","0"],"0","S"],["1926","only","-","May","16",["0","0","0"],"60","D"],["1926","only","-","Sep","13",["0","0","0"],"0","S"],["1927","only","-","May","1",["0","0","0"],"60","D"],["1927","only","-","Sep","26",["0","0","0"],"0","S"],["1928","1931","-","May","Sun>=8",["0","0","0"],"60","D"],["1928","only","-","Sep","9",["0","0","0"],"0","S"],["1929","only","-","Sep","3",["0","0","0"],"0","S"],["1930","only","-","Sep","15",["0","0","0"],"0","S"],["1931","1932","-","Sep","Mon>=24",["0","0","0"],"0","S"],["1932","only","-","May","1",["0","0","0"],"60","D"],["1933","only","-","Apr","30",["0","0","0"],"60","D"],["1933","only","-","Oct","2",["0","0","0"],"0","S"],["1934","only","-","May","20",["0","0","0"],"60","D"],["1934","only","-","Sep","16",["0","0","0"],"0","S"],["1935","only","-","Jun","2",["0","0","0"],"60","D"],["1935","only","-","Sep","30",["0","0","0"],"0","S"],["1936","only","-","Jun","1",["0","0","0"],"60","D"],["1936","only","-","Sep","14",["0","0","0"],"0","S"],["1937","1938","-","May","Sun>=1",["0","0","0"],"60","D"],["1937","1941","-","Sep","Mon>=24",["0","0","0"],"0","S"],["1939","only","-","May","28",["0","0","0"],"60","D"],["1940","1941","-","May","Sun>=1",["0","0","0"],"60","D"],["1946","1949","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","1949","-","Sep","lastSun",["2","0","0"],"0","S"],["1951","1954","-","Apr","lastSun",["2","0","0"],"60","D"],["1951","1954","-","Sep","lastSun",["2","0","0"],"0","S"],["1956","1959","-","Apr","lastSun",["2","0","0"],"60","D"],["1956","1959","-","Sep","lastSun",["2","0","0"],"0","S"],["1962","1973","-","Apr","lastSun",["2","0","0"],"60","D"],["1962","1973","-","Oct","lastSun",["2","0","0"],"0","S"]],Moncton:[["1933","1935","-","Jun","Sun>=8",["1","0","0"],"60","D"],["1933","1935","-","Sep","Sun>=8",["1","0","0"],"0","S"],["1936","1938","-","Jun","Sun>=1",["1","0","0"],"60","D"],["1936","1938","-","Sep","Sun>=1",["1","0","0"],"0","S"],["1939","only","-","May","27",["1","0","0"],"60","D"],["1939","1941","-","Sep","Sat>=21",["1","0","0"],"0","S"],["1940","only","-","May","19",["1","0","0"],"60","D"],["1941","only","-","May","4",["1","0","0"],"60","D"],["1946","1972","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","1956","-","Sep","lastSun",["2","0","0"],"0","S"],["1957","1972","-","Oct","lastSun",["2","0","0"],"0","S"],["1993","2006","-","Apr","Sun>=1",["0","1","0"],"60","D"],["1993","2006","-","Oct","lastSun",["0","1","0"],"0","S"]],Mont:[["1917","only","-","Mar","25",["2","0","0"],"60","D"],["1917","only","-","Apr","24",["0","0","0"],"0","S"],["1919","only","-","Mar","31",["2","30","0"],"60","D"],["1919","only","-","Oct","25",["2","30","0"],"0","S"],["1920","only","-","May","2",["2","30","0"],"60","D"],["1920","1922","-","Oct","Sun>=1",["2","30","0"],"0","S"],["1921","only","-","May","1",["2","0","0"],"60","D"],["1922","only","-","Apr","30",["2","0","0"],"60","D"],["1924","only","-","May","17",["2","0","0"],"60","D"],["1924","1926","-","Sep","lastSun",["2","30","0"],"0","S"],["1925","1926","-","May","Sun>=1",["2","0","0"],"60","D"],["1927","1937","-","Apr","lastSat",["24","0","0"],"60","D"],["1927","1937","-","Sep","lastSat",["24","0","0"],"0","S"],["1938","1940","-","Apr","lastSun",["0","0","0"],"60","D"],["1938","1939","-","Sep","lastSun",["0","0","0"],"0","S"],["1946","1973","-","Apr","lastSun",["2","0","0"],"60","D"],["1945","1948","-","Sep","lastSun",["2","0","0"],"0","S"],["1949","1950","-","Oct","lastSun",["2","0","0"],"0","S"],["1951","1956","-","Sep","lastSun",["2","0","0"],"0","S"],["1957","1973","-","Oct","lastSun",["2","0","0"],"0","S"]],Toronto:[["1919","only","-","Mar","30",["23","30","0"],"60","D"],["1919","only","-","Oct","26",["0","0","0"],"0","S"],["1920","only","-","May","2",["2","0","0"],"60","D"],["1920","only","-","Sep","26",["0","0","0"],"0","S"],["1921","only","-","May","15",["2","0","0"],"60","D"],["1921","only","-","Sep","15",["2","0","0"],"0","S"],["1922","1923","-","May","Sun>=8",["2","0","0"],"60","D"],["1922","1926","-","Sep","Sun>=15",["2","0","0"],"0","S"],["1924","1927","-","May","Sun>=1",["2","0","0"],"60","D"],["1927","1932","-","Sep","lastSun",["2","0","0"],"0","S"],["1928","1931","-","Apr","lastSun",["2","0","0"],"60","D"],["1932","only","-","May","1",["2","0","0"],"60","D"],["1933","1940","-","Apr","lastSun",["2","0","0"],"60","D"],["1933","only","-","Oct","1",["2","0","0"],"0","S"],["1934","1939","-","Sep","lastSun",["2","0","0"],"0","S"],["1945","1946","-","Sep","lastSun",["2","0","0"],"0","S"],["1946","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1947","1949","-","Apr","lastSun",["0","0","0"],"60","D"],["1947","1948","-","Sep","lastSun",["0","0","0"],"0","S"],["1949","only","-","Nov","lastSun",["0","0","0"],"0","S"],["1950","1973","-","Apr","lastSun",["2","0","0"],"60","D"],["1950","only","-","Nov","lastSun",["2","0","0"],"0","S"],["1951","1956","-","Sep","lastSun",["2","0","0"],"0","S"],["1957","1973","-","Oct","lastSun",["2","0","0"],"0","S"]],Winn:[["1916","only","-","Apr","23",["0","0","0"],"60","D"],["1916","only","-","Sep","17",["0","0","0"],"0","S"],["1918","only","-","Apr","14",["2","0","0"],"60","D"],["1918","only","-","Oct","27",["2","0","0"],"0","S"],["1937","only","-","May","16",["2","0","0"],"60","D"],["1937","only","-","Sep","26",["2","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1946","only","-","May","12",["2","0","0"],"60","D"],["1946","only","-","Oct","13",["2","0","0"],"0","S"],["1947","1949","-","Apr","lastSun",["2","0","0"],"60","D"],["1947","1949","-","Sep","lastSun",["2","0","0"],"0","S"],["1950","only","-","May","1",["2","0","0"],"60","D"],["1950","only","-","Sep","30",["2","0","0"],"0","S"],["1951","1960","-","Apr","lastSun",["2","0","0"],"60","D"],["1951","1958","-","Sep","lastSun",["2","0","0"],"0","S"],["1959","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1960","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1963","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1963","only","-","Sep","22",["2","0","0"],"0","S"],["1966","1986","-","Apr","lastSun",["2","0","0","s"],"60","D"],["1966","2005","-","Oct","lastSun",["2","0","0","s"],"0","S"],["1987","2005","-","Apr","Sun>=1",["2","0","0","s"],"60","D"]],Regina:[["1918","only","-","Apr","14",["2","0","0"],"60","D"],["1918","only","-","Oct","27",["2","0","0"],"0","S"],["1930","1934","-","May","Sun>=1",["0","0","0"],"60","D"],["1930","1934","-","Oct","Sun>=1",["0","0","0"],"0","S"],["1937","1941","-","Apr","Sun>=8",["0","0","0"],"60","D"],["1937","only","-","Oct","Sun>=8",["0","0","0"],"0","S"],["1938","only","-","Oct","Sun>=1",["0","0","0"],"0","S"],["1939","1941","-","Oct","Sun>=8",["0","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1946","only","-","Apr","Sun>=8",["2","0","0"],"60","D"],["1946","only","-","Oct","Sun>=8",["2","0","0"],"0","S"],["1947","1957","-","Apr","lastSun",["2","0","0"],"60","D"],["1947","1957","-","Sep","lastSun",["2","0","0"],"0","S"],["1959","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1959","only","-","Oct","lastSun",["2","0","0"],"0","S"]],Swift:[["1957","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1957","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1959","1961","-","Apr","lastSun",["2","0","0"],"60","D"],["1959","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1960","1961","-","Sep","lastSun",["2","0","0"],"0","S"]],Edm:[["1918","1919","-","Apr","Sun>=8",["2","0","0"],"60","D"],["1918","only","-","Oct","27",["2","0","0"],"0","S"],["1919","only","-","May","27",["2","0","0"],"0","S"],["1920","1923","-","Apr","lastSun",["2","0","0"],"60","D"],["1920","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1921","1923","-","Sep","lastSun",["2","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1947","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1947","only","-","Sep","lastSun",["2","0","0"],"0","S"],["1967","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1967","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1969","only","-","Apr","lastSun",["2","0","0"],"60","D"],["1969","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1972","1986","-","Apr","lastSun",["2","0","0"],"60","D"],["1972","2006","-","Oct","lastSun",["2","0","0"],"0","S"]],Vanc:[["1918","only","-","Apr","14",["2","0","0"],"60","D"],["1918","only","-","Oct","27",["2","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","30",["2","0","0"],"0","S"],["1946","1986","-","Apr","lastSun",["2","0","0"],"60","D"],["1946","only","-","Oct","13",["2","0","0"],"0","S"],["1947","1961","-","Sep","lastSun",["2","0","0"],"0","S"],["1962","2006","-","Oct","lastSun",["2","0","0"],"0","S"]],NT_YK:[["1918","only","-","Apr","14",["2","0","0"],"60","D"],["1918","only","-","Oct","27",["2","0","0"],"0","S"],["1919","only","-","May","25",["2","0","0"],"60","D"],["1919","only","-","Nov","1",["0","0","0"],"0","S"],["1942","only","-","Feb","9",["2","0","0"],"60","W",""],["1945","only","-","Aug","14",["23","0","0","u"],"60","P",""],["1945","only","-","Sep","30",["2","0","0"],"0","S"],["1965","only","-","Apr","lastSun",["0","0","0"],"120","DD"],["1965","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1980","1986","-","Apr","lastSun",["2","0","0"],"60","D"],["1980","2006","-","Oct","lastSun",["2","0","0"],"0","S"],["1987","2006","-","Apr","Sun>=1",["2","0","0"],"60","D"]],Mexico:[["1939","only","-","Feb","5",["0","0","0"],"60","D"],["1939","only","-","Jun","25",["0","0","0"],"0","S"],["1940","only","-","Dec","9",["0","0","0"],"60","D"],["1941","only","-","Apr","1",["0","0","0"],"0","S"],["1943","only","-","Dec","16",["0","0","0"],"60","W",""],["1944","only","-","May","1",["0","0","0"],"0","S"],["1950","only","-","Feb","12",["0","0","0"],"60","D"],["1950","only","-","Jul","30",["0","0","0"],"0","S"],["1996","2000","-","Apr","Sun>=1",["2","0","0"],"60","D"],["1996","2000","-","Oct","lastSun",["2","0","0"],"0","S"],["2001","only","-","May","Sun>=1",["2","0","0"],"60","D"],["2001","only","-","Sep","lastSun",["2","0","0"],"0","S"],["2002","max","-","Apr","Sun>=1",["2","0","0"],"60","D"],["2002","max","-","Oct","lastSun",["2","0","0"],"0","S"]],Bahamas:[["1964","1975","-","Oct","lastSun",["2","0","0"],"0","S"],["1964","1975","-","Apr","lastSun",["2","0","0"],"60","D"]],Barb:[["1977","only","-","Jun","12",["2","0","0"],"60","D"],["1977","1978","-","Oct","Sun>=1",["2","0","0"],"0","S"],["1978","1980","-","Apr","Sun>=15",["2","0","0"],"60","D"],["1979","only","-","Sep","30",["2","0","0"],"0","S"],["1980","only","-","Sep","25",["2","0","0"],"0","S"]],Belize:[["1918","1942","-","Oct","Sun>=2",["0","0","0"],"30","HD"],["1919","1943","-","Feb","Sun>=9",["0","0","0"],"0","S"],["1973","only","-","Dec","5",["0","0","0"],"60","D"],["1974","only","-","Feb","9",["0","0","0"],"0","S"],["1982","only","-","Dec","18",["0","0","0"],"60","D"],["1983","only","-","Feb","12",["0","0","0"],"0","S"]],CR:[["1979","1980","-","Feb","lastSun",["0","0","0"],"60","D"],["1979","1980","-","Jun","Sun>=1",["0","0","0"],"0","S"],["1991","1992","-","Jan","Sat>=15",["0","0","0"],"60","D"],["1991","only","-","Jul","1",["0","0","0"],"0","S"],["1992","only","-","Mar","15",["0","0","0"],"0","S"]],Cuba:[["1928","only","-","Jun","10",["0","0","0"],"60","D"],["1928","only","-","Oct","10",["0","0","0"],"0","S"],["1940","1942","-","Jun","Sun>=1",["0","0","0"],"60","D"],["1940","1942","-","Sep","Sun>=1",["0","0","0"],"0","S"],["1945","1946","-","Jun","Sun>=1",["0","0","0"],"60","D"],["1945","1946","-","Sep","Sun>=1",["0","0","0"],"0","S"],["1965","only","-","Jun","1",["0","0","0"],"60","D"],["1965","only","-","Sep","30",["0","0","0"],"0","S"],["1966","only","-","May","29",["0","0","0"],"60","D"],["1966","only","-","Oct","2",["0","0","0"],"0","S"],["1967","only","-","Apr","8",["0","0","0"],"60","D"],["1967","1968","-","Sep","Sun>=8",["0","0","0"],"0","S"],["1968","only","-","Apr","14",["0","0","0"],"60","D"],["1969","1977","-","Apr","lastSun",["0","0","0"],"60","D"],["1969","1971","-","Oct","lastSun",["0","0","0"],"0","S"],["1972","1974","-","Oct","8",["0","0","0"],"0","S"],["1975","1977","-","Oct","lastSun",["0","0","0"],"0","S"],["1978","only","-","May","7",["0","0","0"],"60","D"],["1978","1990","-","Oct","Sun>=8",["0","0","0"],"0","S"],["1979","1980","-","Mar","Sun>=15",["0","0","0"],"60","D"],["1981","1985","-","May","Sun>=5",["0","0","0"],"60","D"],["1986","1989","-","Mar","Sun>=14",["0","0","0"],"60","D"],["1990","1997","-","Apr","Sun>=1",["0","0","0"],"60","D"],["1991","1995","-","Oct","Sun>=8",["0","0","0","s"],"0","S"],["1996","only","-","Oct","6",["0","0","0","s"],"0","S"],["1997","only","-","Oct","12",["0","0","0","s"],"0","S"],["1998","1999","-","Mar","lastSun",["0","0","0","s"],"60","D"],["1998","2003","-","Oct","lastSun",["0","0","0","s"],"0","S"],["2000","2003","-","Apr","Sun>=1",["0","0","0","s"],"60","D"],["2004","only","-","Mar","lastSun",["0","0","0","s"],"60","D"],["2006","2010","-","Oct","lastSun",["0","0","0","s"],"0","S"],["2007","only","-","Mar","Sun>=8",["0","0","0","s"],"60","D"],["2008","only","-","Mar","Sun>=15",["0","0","0","s"],"60","D"],["2009","2010","-","Mar","Sun>=8",["0","0","0","s"],"60","D"],["2011","only","-","Mar","Sun>=15",["0","0","0","s"],"60","D"],["2011","only","-","Nov","13",["0","0","0","s"],"0","S"],["2012","only","-","Apr","1",["0","0","0","s"],"60","D"],["2012","max","-","Nov","Sun>=1",["0","0","0","s"],"0","S"],["2013","max","-","Mar","Sun>=8",["0","0","0","s"],"60","D"]],DR:[["1966","only","-","Oct","30",["0","0","0"],"60","D"],["1967","only","-","Feb","28",["0","0","0"],"0","S"],["1969","1973","-","Oct","lastSun",["0","0","0"],"30","HD"],["1970","only","-","Feb","21",["0","0","0"],"0","S"],["1971","only","-","Jan","20",["0","0","0"],"0","S"],["1972","1974","-","Jan","21",["0","0","0"],"0","S"]],Salv:[["1987","1988","-","May","Sun>=1",["0","0","0"],"60","D"],["1987","1988","-","Sep","lastSun",["0","0","0"],"0","S"]],Guat:[["1973","only","-","Nov","25",["0","0","0"],"60","D"],["1974","only","-","Feb","24",["0","0","0"],"0","S"],["1983","only","-","May","21",["0","0","0"],"60","D"],["1983","only","-","Sep","22",["0","0","0"],"0","S"],["1991","only","-","Mar","23",["0","0","0"],"60","D"],["1991","only","-","Sep","7",["0","0","0"],"0","S"],["2006","only","-","Apr","30",["0","0","0"],"60","D"],["2006","only","-","Oct","1",["0","0","0"],"0","S"]],Haiti:[["1983","only","-","May","8",["0","0","0"],"60","D"],["1984","1987","-","Apr","lastSun",["0","0","0"],"60","D"],["1983","1987","-","Oct","lastSun",["0","0","0"],"0","S"],["1988","1997","-","Apr","Sun>=1",["1","0","0","s"],"60","D"],["1988","1997","-","Oct","lastSun",["1","0","0","s"],"0","S"],["2005","2006","-","Apr","Sun>=1",["0","0","0"],"60","D"],["2005","2006","-","Oct","lastSun",["0","0","0"],"0","S"],["2012","max","-","Mar","Sun>=8",["2","0","0"],"60","D"],["2012","max","-","Nov","Sun>=1",["2","0","0"],"0","S"]],Hond:[["1987","1988","-","May","Sun>=1",["0","0","0"],"60","D"],["1987","1988","-","Sep","lastSun",["0","0","0"],"0","S"],["2006","only","-","May","Sun>=1",["0","0","0"],"60","D"],["2006","only","-","Aug","Mon>=1",["0","0","0"],"0","S"]],Nic:[["1979","1980","-","Mar","Sun>=16",["0","0","0"],"60","D"],["1979","1980","-","Jun","Mon>=23",["0","0","0"],"0","S"],["2005","only","-","Apr","10",["0","0","0"],"60","D"],["2005","only","-","Oct","Sun>=1",["0","0","0"],"0","S"],["2006","only","-","Apr","30",["2","0","0"],"60","D"],["2006","only","-","Oct","Sun>=1",["1","0","0"],"0","S"]],Arg:[["1930","only","-","Dec","1",["0","0","0"],"60","S"],["1931","only","-","Apr","1",["0","0","0"],"0","-"],["1931","only","-","Oct","15",["0","0","0"],"60","S"],["1932","1940","-","Mar","1",["0","0","0"],"0","-"],["1932","1939","-","Nov","1",["0","0","0"],"60","S"],["1940","only","-","Jul","1",["0","0","0"],"60","S"],["1941","only","-","Jun","15",["0","0","0"],"0","-"],["1941","only","-","Oct","15",["0","0","0"],"60","S"],["1943","only","-","Aug","1",["0","0","0"],"0","-"],["1943","only","-","Oct","15",["0","0","0"],"60","S"],["1946","only","-","Mar","1",["0","0","0"],"0","-"],["1946","only","-","Oct","1",["0","0","0"],"60","S"],["1963","only","-","Oct","1",["0","0","0"],"0","-"],["1963","only","-","Dec","15",["0","0","0"],"60","S"],["1964","1966","-","Mar","1",["0","0","0"],"0","-"],["1964","1966","-","Oct","15",["0","0","0"],"60","S"],["1967","only","-","Apr","2",["0","0","0"],"0","-"],["1967","1968","-","Oct","Sun>=1",["0","0","0"],"60","S"],["1968","1969","-","Apr","Sun>=1",["0","0","0"],"0","-"],["1974","only","-","Jan","23",["0","0","0"],"60","S"],["1974","only","-","May","1",["0","0","0"],"0","-"],["1988","only","-","Dec","1",["0","0","0"],"60","S"],["1989","1993","-","Mar","Sun>=1",["0","0","0"],"0","-"],["1989","1992","-","Oct","Sun>=15",["0","0","0"],"60","S"],["1999","only","-","Oct","Sun>=1",["0","0","0"],"60","S"],["2000","only","-","Mar","3",["0","0","0"],"0","-"],["2007","only","-","Dec","30",["0","0","0"],"60","S"],["2008","2009","-","Mar","Sun>=15",["0","0","0"],"0","-"],["2008","only","-","Oct","Sun>=15",["0","0","0"],"60","S"]],SanLuis:[["2008","2009","-","Mar","Sun>=8",["0","0","0"],"0","-"],["2007","2008","-","Oct","Sun>=8",["0","0","0"],"60","S"]],Brazil:[["1931","only","-","Oct","3",["11","0","0"],"60","S"],["1932","1933","-","Apr","1",["0","0","0"],"0","-"],["1932","only","-","Oct","3",["0","0","0"],"60","S"],["1949","1952","-","Dec","1",["0","0","0"],"60","S"],["1950","only","-","Apr","16",["1","0","0"],"0","-"],["1951","1952","-","Apr","1",["0","0","0"],"0","-"],["1953","only","-","Mar","1",["0","0","0"],"0","-"],["1963","only","-","Dec","9",["0","0","0"],"60","S"],["1964","only","-","Mar","1",["0","0","0"],"0","-"],["1965","only","-","Jan","31",["0","0","0"],"60","S"],["1965","only","-","Mar","31",["0","0","0"],"0","-"],["1965","only","-","Dec","1",["0","0","0"],"60","S"],["1966","1968","-","Mar","1",["0","0","0"],"0","-"],["1966","1967","-","Nov","1",["0","0","0"],"60","S"],["1985","only","-","Nov","2",["0","0","0"],"60","S"],["1986","only","-","Mar","15",["0","0","0"],"0","-"],["1986","only","-","Oct","25",["0","0","0"],"60","S"],["1987","only","-","Feb","14",["0","0","0"],"0","-"],["1987","only","-","Oct","25",["0","0","0"],"60","S"],["1988","only","-","Feb","7",["0","0","0"],"0","-"],["1988","only","-","Oct","16",["0","0","0"],"60","S"],["1989","only","-","Jan","29",["0","0","0"],"0","-"],["1989","only","-","Oct","15",["0","0","0"],"60","S"],["1990","only","-","Feb","11",["0","0","0"],"0","-"],["1990","only","-","Oct","21",["0","0","0"],"60","S"],["1991","only","-","Feb","17",["0","0","0"],"0","-"],["1991","only","-","Oct","20",["0","0","0"],"60","S"],["1992","only","-","Feb","9",["0","0","0"],"0","-"],["1992","only","-","Oct","25",["0","0","0"],"60","S"],["1993","only","-","Jan","31",["0","0","0"],"0","-"],["1993","1995","-","Oct","Sun>=11",["0","0","0"],"60","S"],["1994","1995","-","Feb","Sun>=15",["0","0","0"],"0","-"],["1996","only","-","Feb","11",["0","0","0"],"0","-"],["1996","only","-","Oct","6",["0","0","0"],"60","S"],["1997","only","-","Feb","16",["0","0","0"],"0","-"],["1997","only","-","Oct","6",["0","0","0"],"60","S"],["1998","only","-","Mar","1",["0","0","0"],"0","-"],["1998","only","-","Oct","11",["0","0","0"],"60","S"],["1999","only","-","Feb","21",["0","0","0"],"0","-"],["1999","only","-","Oct","3",["0","0","0"],"60","S"],["2000","only","-","Feb","27",["0","0","0"],"0","-"],["2000","2001","-","Oct","Sun>=8",["0","0","0"],"60","S"],["2001","2006","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2002","only","-","Nov","3",["0","0","0"],"60","S"],["2003","only","-","Oct","19",["0","0","0"],"60","S"],["2004","only","-","Nov","2",["0","0","0"],"60","S"],["2005","only","-","Oct","16",["0","0","0"],"60","S"],["2006","only","-","Nov","5",["0","0","0"],"60","S"],["2007","only","-","Feb","25",["0","0","0"],"0","-"],["2007","only","-","Oct","Sun>=8",["0","0","0"],"60","S"],["2008","max","-","Oct","Sun>=15",["0","0","0"],"60","S"],["2008","2011","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2012","only","-","Feb","Sun>=22",["0","0","0"],"0","-"],["2013","2014","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2015","only","-","Feb","Sun>=22",["0","0","0"],"0","-"],["2016","2022","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2023","only","-","Feb","Sun>=22",["0","0","0"],"0","-"],["2024","2025","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2026","only","-","Feb","Sun>=22",["0","0","0"],"0","-"],["2027","2033","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2034","only","-","Feb","Sun>=22",["0","0","0"],"0","-"],["2035","2036","-","Feb","Sun>=15",["0","0","0"],"0","-"],["2037","only","-","Feb","Sun>=22",["0","0","0"],"0","-"],["2038","max","-","Feb","Sun>=15",["0","0","0"],"0","-"]],Chile:[["1927","1932","-","Sep","1",["0","0","0"],"60","S"],["1928","1932","-","Apr","1",["0","0","0"],"0","-"],["1942","only","-","Jun","1",["4","0","0","u"],"0","-"],["1942","only","-","Aug","1",["5","0","0","u"],"60","S"],["1946","only","-","Jul","15",["4","0","0","u"],"60","S"],["1946","only","-","Sep","1",["3","0","0","u"],"0","-"],["1947","only","-","Apr","1",["4","0","0","u"],"0","-"],["1968","only","-","Nov","3",["4","0","0","u"],"60","S"],["1969","only","-","Mar","30",["3","0","0","u"],"0","-"],["1969","only","-","Nov","23",["4","0","0","u"],"60","S"],["1970","only","-","Mar","29",["3","0","0","u"],"0","-"],["1971","only","-","Mar","14",["3","0","0","u"],"0","-"],["1970","1972","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1972","1986","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1973","only","-","Sep","30",["4","0","0","u"],"60","S"],["1974","1987","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1987","only","-","Apr","12",["3","0","0","u"],"0","-"],["1988","1989","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1988","only","-","Oct","Sun>=1",["4","0","0","u"],"60","S"],["1989","only","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1990","only","-","Mar","18",["3","0","0","u"],"0","-"],["1990","only","-","Sep","16",["4","0","0","u"],"60","S"],["1991","1996","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1991","1997","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["1997","only","-","Mar","30",["3","0","0","u"],"0","-"],["1998","only","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["1998","only","-","Sep","27",["4","0","0","u"],"60","S"],["1999","only","-","Apr","4",["3","0","0","u"],"0","-"],["1999","2010","-","Oct","Sun>=9",["4","0","0","u"],"60","S"],["2000","2007","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["2008","only","-","Mar","30",["3","0","0","u"],"0","-"],["2009","only","-","Mar","Sun>=9",["3","0","0","u"],"0","-"],["2010","only","-","Apr","Sun>=1",["3","0","0","u"],"0","-"],["2011","only","-","May","Sun>=2",["3","0","0","u"],"0","-"],["2011","only","-","Aug","Sun>=16",["4","0","0","u"],"60","S"],["2012","max","-","Apr","Sun>=23",["3","0","0","u"],"0","-"],["2012","max","-","Sep","Sun>=2",["4","0","0","u"],"60","S"]],CO:[["1992","only","-","May","3",["0","0","0"],"60","S"],["1993","only","-","Apr","4",["0","0","0"],"0","-"]],Falk:[["1937","1938","-","Sep","lastSun",["0","0","0"],"60","S"],["1938","1942","-","Mar","Sun>=19",["0","0","0"],"0","-"],["1939","only","-","Oct","1",["0","0","0"],"60","S"],["1940","1942","-","Sep","lastSun",["0","0","0"],"60","S"],["1943","only","-","Jan","1",["0","0","0"],"0","-"],["1983","only","-","Sep","lastSun",["0","0","0"],"60","S"],["1984","1985","-","Apr","lastSun",["0","0","0"],"0","-"],["1984","only","-","Sep","16",["0","0","0"],"60","S"],["1985","2000","-","Sep","Sun>=9",["0","0","0"],"60","S"],["1986","2000","-","Apr","Sun>=16",["0","0","0"],"0","-"],["2001","2010","-","Apr","Sun>=15",["2","0","0"],"0","-"],["2001","2010","-","Sep","Sun>=1",["2","0","0"],"60","S"]],Para:[["1975","1988","-","Oct","1",["0","0","0"],"60","S"],["1975","1978","-","Mar","1",["0","0","0"],"0","-"],["1979","1991","-","Apr","1",["0","0","0"],"0","-"],["1989","only","-","Oct","22",["0","0","0"],"60","S"],["1990","only","-","Oct","1",["0","0","0"],"60","S"],["1991","only","-","Oct","6",["0","0","0"],"60","S"],["1992","only","-","Mar","1",["0","0","0"],"0","-"],["1992","only","-","Oct","5",["0","0","0"],"60","S"],["1993","only","-","Mar","31",["0","0","0"],"0","-"],["1993","1995","-","Oct","1",["0","0","0"],"60","S"],["1994","1995","-","Feb","lastSun",["0","0","0"],"0","-"],["1996","only","-","Mar","1",["0","0","0"],"0","-"],["1996","2001","-","Oct","Sun>=1",["0","0","0"],"60","S"],["1997","only","-","Feb","lastSun",["0","0","0"],"0","-"],["1998","2001","-","Mar","Sun>=1",["0","0","0"],"0","-"],["2002","2004","-","Apr","Sun>=1",["0","0","0"],"0","-"],["2002","2003","-","Sep","Sun>=1",["0","0","0"],"60","S"],["2004","2009","-","Oct","Sun>=15",["0","0","0"],"60","S"],["2005","2009","-","Mar","Sun>=8",["0","0","0"],"0","-"],["2010","max","-","Oct","Sun>=1",["0","0","0"],"60","S"],["2010","2012","-","Apr","Sun>=8",["0","0","0"],"0","-"],["2013","max","-","Mar","Sun>=22",["0","0","0"],"0","-"]],
Peru:[["1938","only","-","Jan","1",["0","0","0"],"60","S"],["1938","only","-","Apr","1",["0","0","0"],"0","-"],["1938","1939","-","Sep","lastSun",["0","0","0"],"60","S"],["1939","1940","-","Mar","Sun>=24",["0","0","0"],"0","-"],["1986","1987","-","Jan","1",["0","0","0"],"60","S"],["1986","1987","-","Apr","1",["0","0","0"],"0","-"],["1990","only","-","Jan","1",["0","0","0"],"60","S"],["1990","only","-","Apr","1",["0","0","0"],"0","-"],["1994","only","-","Jan","1",["0","0","0"],"60","S"],["1994","only","-","Apr","1",["0","0","0"],"0","-"]],Uruguay:[["1923","only","-","Oct","2",["0","0","0"],"30","HS"],["1924","1926","-","Apr","1",["0","0","0"],"0","-"],["1924","1925","-","Oct","1",["0","0","0"],"30","HS"],["1933","1935","-","Oct","lastSun",["0","0","0"],"30","HS"],["1934","1936","-","Mar","Sat>=25",["23","30","0","s"],"0","-"],["1936","only","-","Nov","1",["0","0","0"],"30","HS"],["1937","1941","-","Mar","lastSun",["0","0","0"],"0","-"],["1937","1940","-","Oct","lastSun",["0","0","0"],"30","HS"],["1941","only","-","Aug","1",["0","0","0"],"30","HS"],["1942","only","-","Jan","1",["0","0","0"],"0","-"],["1942","only","-","Dec","14",["0","0","0"],"60","S"],["1943","only","-","Mar","14",["0","0","0"],"0","-"],["1959","only","-","May","24",["0","0","0"],"60","S"],["1959","only","-","Nov","15",["0","0","0"],"0","-"],["1960","only","-","Jan","17",["0","0","0"],"60","S"],["1960","only","-","Mar","6",["0","0","0"],"0","-"],["1965","1967","-","Apr","Sun>=1",["0","0","0"],"60","S"],["1965","only","-","Sep","26",["0","0","0"],"0","-"],["1966","1967","-","Oct","31",["0","0","0"],"0","-"],["1968","1970","-","May","27",["0","0","0"],"30","HS"],["1968","1970","-","Dec","2",["0","0","0"],"0","-"],["1972","only","-","Apr","24",["0","0","0"],"60","S"],["1972","only","-","Aug","15",["0","0","0"],"0","-"],["1974","only","-","Mar","10",["0","0","0"],"30","HS"],["1974","only","-","Dec","22",["0","0","0"],"60","S"],["1976","only","-","Oct","1",["0","0","0"],"0","-"],["1977","only","-","Dec","4",["0","0","0"],"60","S"],["1978","only","-","Apr","1",["0","0","0"],"0","-"],["1979","only","-","Oct","1",["0","0","0"],"60","S"],["1980","only","-","May","1",["0","0","0"],"0","-"],["1987","only","-","Dec","14",["0","0","0"],"60","S"],["1988","only","-","Mar","14",["0","0","0"],"0","-"],["1988","only","-","Dec","11",["0","0","0"],"60","S"],["1989","only","-","Mar","12",["0","0","0"],"0","-"],["1989","only","-","Oct","29",["0","0","0"],"60","S"],["1990","1992","-","Mar","Sun>=1",["0","0","0"],"0","-"],["1990","1991","-","Oct","Sun>=21",["0","0","0"],"60","S"],["1992","only","-","Oct","18",["0","0","0"],"60","S"],["1993","only","-","Feb","28",["0","0","0"],"0","-"],["2004","only","-","Sep","19",["0","0","0"],"60","S"],["2005","only","-","Mar","27",["2","0","0"],"0","-"],["2005","only","-","Oct","9",["2","0","0"],"60","S"],["2006","only","-","Mar","12",["2","0","0"],"0","-"],["2006","max","-","Oct","Sun>=1",["2","0","0"],"60","S"],["2007","max","-","Mar","Sun>=8",["2","0","0"],"0","-"]],SystemV:[["NaN","1973","-","Apr","lastSun",["2","0","0"],"60","D"],["NaN","1973","-","Oct","lastSun",["2","0","0"],"0","S"],["1974","only","-","Jan","6",["2","0","0"],"60","D"],["1974","only","-","Nov","lastSun",["2","0","0"],"0","S"],["1975","only","-","Feb","23",["2","0","0"],"60","D"],["1975","only","-","Oct","lastSun",["2","0","0"],"0","S"],["1976","max","-","Apr","lastSun",["2","0","0"],"60","D"],["1976","max","-","Oct","lastSun",["2","0","0"],"0","S"]]},a.timezone.zones_titles=[{name:"(GMT) Casablanca",other_zone:"Morocco Standard Time"},{name:"(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London",other_zone:"GMT Standard Time"},{name:"(GMT) Monrovia, Reykjavik",other_zone:"Greenwich Standard Time"},{name:"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",other_zone:"W. Europe Standard Time"},{name:"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",other_zone:"Central Europe Standard Time"},{name:"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris",other_zone:"Romance Standard Time"},{name:"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb",other_zone:"Central European Standard Time"},{name:"(GMT+01:00) West Central Africa",other_zone:"W. Central Africa Standard Time"},{name:"(GMT+02:00) Amman",other_zone:"Jordan Standard Time"},{name:"(GMT+02:00) Athens, Bucharest, Istanbul",other_zone:"GTB Standard Time"},{name:"(GMT+02:00) Beirut",other_zone:"Middle East Standard Time"},{name:"(GMT+02:00) Cairo",other_zone:"Egypt Standard Time"},{name:"(GMT+02:00) Harare, Pretoria",other_zone:"South Africa Standard Time"},{name:"(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",other_zone:"FLE Standard Time"},{name:"(GMT+02:00) Jerusalem",other_zone:"Israel Standard Time"},{name:"(GMT+02:00) Minsk",other_zone:"E. Europe Standard Time"},{name:"(GMT+02:00) Windhoek",other_zone:"Namibia Standard Time"},{name:"(GMT+03:00) Baghdad",other_zone:"Arabic Standard Time"},{name:"(GMT+03:00) Kuwait, Riyadh",other_zone:"Arab Standard Time"},{name:"(GMT+03:00) Moscow, St. Petersburg, Volgograd",other_zone:"Russian Standard Time"},{name:"(GMT+03:00) Nairobi",other_zone:"E. Africa Standard Time"},{name:"(GMT+03:00) Tbilisi",other_zone:"Georgian Standard Time"},{name:"(GMT+03:30) Tehran",other_zone:"Iran Standard Time"},{name:"(GMT+04:00) Abu Dhabi, Muscat",other_zone:"Arabian Standard Time"},{name:"(GMT+04:00) Baku",other_zone:"Azerbaijan Standard Time"},{name:"(GMT+04:00) Port Louis",other_zone:"Mauritius Standard Time"},{name:"(GMT+04:00) Yerevan",other_zone:"Caucasus Standard Time"},{name:"(GMT+04:30) Kabul",other_zone:"Afghanistan Standard Time"},{name:"(GMT+05:00) Ekaterinburg",other_zone:"Ekaterinburg Standard Time"},{name:"(GMT+05:00) Islamabad, Karachi",other_zone:"Pakistan Standard Time"},{name:"(GMT+05:00) Tashkent",other_zone:"West Asia Standard Time"},{name:"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi",other_zone:"India Standard Time"},{name:"(GMT+05:30) Sri Jayawardenepura",other_zone:"Sri Lanka Standard Time"},{name:"(GMT+05:45) Kathmandu",other_zone:"Nepal Standard Time"},{name:"(GMT+06:00) Almaty, Novosibirsk",other_zone:"N. Central Asia Standard Time"},{name:"(GMT+06:00) Astana, Dhaka",other_zone:"Central Asia Standard Time"},{name:"(GMT+06:30) Yangon (Rangoon)",other_zone:"Myanmar Standard Time"},{name:"(GMT+07:00) Bangkok, Hanoi, Jakarta",other_zone:"SE Asia Standard Time"},{name:"(GMT+07:00) Krasnoyarsk",other_zone:"North Asia Standard Time"},{name:"(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi",other_zone:"China Standard Time"},{name:"(GMT+08:00) Irkutsk, Ulaan Bataar",other_zone:"North Asia East Standard Time"},{name:"(GMT+08:00) Kuala Lumpur, Singapore",other_zone:"Singapore Standard Time"},{name:"(GMT+08:00) Perth",other_zone:"W. Australia Standard Time"},{name:"(GMT+08:00) Taipei",other_zone:"Taipei Standard Time"},{name:"(GMT+09:00) Osaka, Sapporo, Tokyo",other_zone:"Tokyo Standard Time"},{name:"(GMT+09:00) Seoul",other_zone:"Korea Standard Time"},{name:"(GMT+09:00) Yakutsk",other_zone:"Yakutsk Standard Time"},{name:"(GMT+09:30) Adelaide",other_zone:"Cen. Australia Standard Time"},{name:"(GMT+09:30) Darwin",other_zone:"AUS Central Standard Time"},{name:"(GMT+10:00) Brisbane",other_zone:"E. Australia Standard Time"},{name:"(GMT+10:00) Canberra, Melbourne, Sydney",other_zone:"AUS Eastern Standard Time"},{name:"(GMT+10:00) Guam, Port Moresby",other_zone:"West Pacific Standard Time"},{name:"(GMT+10:00) Hobart",other_zone:"Tasmania Standard Time"},{name:"(GMT+10:00) Vladivostok",other_zone:"Vladivostok Standard Time"},{name:"(GMT+11:00) Magadan, Solomon Is., New Caledonia",other_zone:"Central Pacific Standard Time"},{name:"(GMT+12:00) Auckland, Wellington",other_zone:"New Zealand Standard Time"},{name:"(GMT+12:00) Fiji, Kamchatka, Marshall Is.",other_zone:"Fiji Standard Time"},{name:"(GMT+13:00) Nuku'alofa",other_zone:"Tonga Standard Time"},{name:"(GMT-01:00) Azores",other_zone:"Azores Standard Time"},{name:"(GMT-01:00) Cape Verde Is.",other_zone:"Cape Verde Standard Time"},{name:"(GMT-03:00) Brasilia",other_zone:"E. South America Standard Time"},{name:"(GMT-03:00) Buenos Aires",other_zone:"Argentina Standard Time"},{name:"(GMT-03:00) Georgetown",other_zone:"SA Eastern Standard Time"},{name:"(GMT-03:00) Greenland",other_zone:"Greenland Standard Time"},{name:"(GMT-03:00) Montevideo",other_zone:"Montevideo Standard Time"},{name:"(GMT-03:30) Newfoundland",other_zone:"Newfoundland Standard Time"},{name:"(GMT-04:00) Atlantic Time (Canada)",other_zone:"Atlantic Standard Time"},{name:"(GMT-04:00) La Paz",other_zone:"SA Western Standard Time"},{name:"(GMT-04:00) Manaus",other_zone:"Central Brazilian Standard Time"},{name:"(GMT-04:00) Santiago",other_zone:"Pacific SA Standard Time"},{name:"(GMT-04:30) Caracas",other_zone:"Venezuela Standard Time"},{name:"(GMT-05:00) Bogota, Lima, Quito, Rio Branco",other_zone:"SA Pacific Standard Time"},{name:"(GMT-05:00) Eastern Time (US & Canada)",other_zone:"Eastern Standard Time"},{name:"(GMT-05:00) Indiana (East)",other_zone:"US Eastern Standard Time"},{name:"(GMT-06:00) Central America",other_zone:"Central America Standard Time"},{name:"(GMT-06:00) Central Time (US & Canada)",other_zone:"Central Standard Time"},{name:"(GMT-06:00) Guadalajara, Mexico City, Monterrey",other_zone:"Central Standard Time (Mexico)"},{name:"(GMT-06:00) Saskatchewan",other_zone:"Canada Central Standard Time"},{name:"(GMT-07:00) Arizona",other_zone:"US Mountain Standard Time"},{name:"(GMT-07:00) Chihuahua, La Paz, Mazatlan",other_zone:"Mountain Standard Time (Mexico)"},{name:"(GMT-07:00) Mountain Time (US & Canada)",other_zone:"Mountain Standard Time"},{name:"(GMT-08:00) Pacific Time (US & Canada)",other_zone:"Pacific Standard Time"},{name:"(GMT-08:00) Tijuana, Baja California",other_zone:"Pacific Standard Time (Mexico)"},{name:"(GMT-09:00) Alaska",other_zone:"Alaskan Standard Time"},{name:"(GMT-10:00) Hawaii",other_zone:"Hawaiian Standard Time"},{name:"(GMT-11:00) Midway Island, Samoa",other_zone:"Samoa Standard Time"},{name:"(GMT-12:00) International Date Line West",other_zone:"Dateline Standard Time"}],a.timezone.windows_zones=[{other_zone:"Dateline Standard Time",zone:"Etc/GMT+12",territory:"GMT+12"},{other_zone:"UTC-11",zone:"Etc/GMT+11",territory:"GMT+11"},{other_zone:"UTC-11",zone:"Pacific/Pago_Pago",territory:"Pago Pago"},{other_zone:"UTC-11",zone:"Pacific/Niue",territory:"Niue"},{other_zone:"UTC-11",zone:"Pacific/Midway",territory:"Midway"},{other_zone:"Hawaiian Standard Time",zone:"Pacific/Honolulu",territory:"Honolulu"},{other_zone:"Hawaiian Standard Time",zone:"Pacific/Rarotonga",territory:"Rarotonga"},{other_zone:"Hawaiian Standard Time",zone:"Pacific/Tahiti",territory:"Tahiti"},{other_zone:"Hawaiian Standard Time",zone:"Pacific/Johnston",territory:"Johnston"},{other_zone:"Hawaiian Standard Time",zone:"Etc/GMT+10",territory:"GMT+10"},{other_zone:"Alaskan Standard Time",zone:"America/Anchorage",territory:"Anchorage"},{other_zone:"Alaskan Standard Time",zone:"America/Juneau",territory:"Juneau"},{other_zone:"Alaskan Standard Time",zone:"America/Nome",territory:"Nome"},{other_zone:"Alaskan Standard Time",zone:"America/Sitka",territory:"Sitka"},{other_zone:"Alaskan Standard Time",zone:"America/Yakutat",territory:"Yakutat"},{other_zone:"Pacific Standard Time (Mexico)",zone:"America/Santa_Isabel",territory:"Santa Isabel"},{other_zone:"Pacific Standard Time",zone:"America/Los_Angeles",territory:"Los Angeles"},{other_zone:"Pacific Standard Time",zone:"America/Vancouver",territory:"Vancouver"},{other_zone:"Pacific Standard Time",zone:"America/Dawson",territory:"Dawson"},{other_zone:"Pacific Standard Time",zone:"America/Whitehorse",territory:"Whitehorse"},{other_zone:"Pacific Standard Time",zone:"America/Tijuana",territory:"Tijuana"},{other_zone:"US Mountain Standard Time",zone:"America/Phoenix",territory:"Phoenix"},{other_zone:"US Mountain Standard Time",zone:"America/Dawson_Creek",territory:"Dawson Creek"},{other_zone:"US Mountain Standard Time",zone:"America/Creston",territory:"Creston"},{other_zone:"US Mountain Standard Time",zone:"America/Hermosillo",territory:"Hermosillo"},{other_zone:"US Mountain Standard Time",zone:"Etc/GMT+7",territory:"GMT+7"},{other_zone:"Mountain Standard Time (Mexico)",zone:"America/Chihuahua",territory:"Chihuahua"},{other_zone:"Mountain Standard Time (Mexico)",zone:"America/Mazatlan",territory:"Mazatlan"},{other_zone:"Mountain Standard Time",zone:"America/Denver",territory:"Denver"},{other_zone:"Mountain Standard Time",zone:"America/Edmonton",territory:"Edmonton"},{other_zone:"Mountain Standard Time",zone:"America/Cambridge_Bay",territory:"Cambridge Bay"},{other_zone:"Mountain Standard Time",zone:"America/Inuvik",territory:"Inuvik"},{other_zone:"Mountain Standard Time",zone:"America/Yellowknife",territory:"Yellowknife"},{other_zone:"Mountain Standard Time",zone:"America/Ojinaga",territory:"Ojinaga"},{other_zone:"Mountain Standard Time",zone:"America/Boise",territory:"Boise"},{other_zone:"Mountain Standard Time",zone:"America/Shiprock",territory:"Shiprock"},{other_zone:"Central America Standard Time",zone:"America/Guatemala",territory:"Guatemala"},{other_zone:"Central America Standard Time",zone:"America/Belize",territory:"Belize"},{other_zone:"Central America Standard Time",zone:"America/Costa_Rica",territory:"Costa Rica"},{other_zone:"Central America Standard Time",zone:"Pacific/Galapagos",territory:"Galapagos"},{other_zone:"Central America Standard Time",zone:"America/Tegucigalpa",territory:"Tegucigalpa"},{other_zone:"Central America Standard Time",zone:"America/Managua",territory:"Managua"},{other_zone:"Central America Standard Time",zone:"America/El_Salvador",territory:"El Salvador"},{other_zone:"Central America Standard Time",zone:"Etc/GMT+6",territory:"GMT+6"},{other_zone:"Central Standard Time",zone:"America/Chicago",territory:"Chicago"},{other_zone:"Central Standard Time",zone:"America/Winnipeg",territory:"Winnipeg"},{other_zone:"Central Standard Time",zone:"America/Rainy_River",territory:"Rainy River"},{other_zone:"Central Standard Time",zone:"America/Rankin_Inlet",territory:"Rankin Inlet"},{other_zone:"Central Standard Time",zone:"America/Resolute",territory:"Resolute"},{other_zone:"Central Standard Time",zone:"America/Matamoros",territory:"Matamoros"},{other_zone:"Central Standard Time",zone:"America/Indiana/Knox",territory:"Indiana"},{other_zone:"Central Standard Time",zone:"America/Indiana/Tell_City",territory:"Indiana"},{other_zone:"Central Standard Time",zone:"America/Menominee",territory:"Menominee"},{other_zone:"Central Standard Time",zone:"America/North_Dakota/Beulah",territory:"North Dakota"},{other_zone:"Central Standard Time",zone:"America/North_Dakota/Center",territory:"North Dakota"},{other_zone:"Central Standard Time",zone:"America/North_Dakota/New_Salem",territory:"North Dakota"},{other_zone:"Central Standard Time (Mexico)",zone:"America/Mexico_City",territory:"Mexico City"},{other_zone:"Central Standard Time (Mexico)",zone:"America/Bahia_Banderas",territory:"Bahia Banderas"},{other_zone:"Central Standard Time (Mexico)",zone:"America/Cancun",territory:"Cancun"},{other_zone:"Central Standard Time (Mexico)",zone:"America/Merida",territory:"Merida"},{other_zone:"Central Standard Time (Mexico)",zone:"America/Monterrey",territory:"Monterrey"},{other_zone:"Canada Central Standard Time",zone:"America/Regina",territory:"Regina"},{other_zone:"Canada Central Standard Time",zone:"America/Swift_Current",territory:"Swift Current"},{other_zone:"SA Pacific Standard Time",zone:"America/Bogota",territory:"Bogota"},{other_zone:"SA Pacific Standard Time",zone:"America/Coral_Harbour",territory:"Coral Harbour"},{other_zone:"SA Pacific Standard Time",zone:"America/Guayaquil",territory:"Guayaquil"},{other_zone:"SA Pacific Standard Time",zone:"America/Port-au-Prince",territory:"Port-au-Prince"},{other_zone:"SA Pacific Standard Time",zone:"America/Jamaica",territory:"Jamaica"},{other_zone:"SA Pacific Standard Time",zone:"America/Cayman",territory:"Cayman"},{other_zone:"SA Pacific Standard Time",zone:"America/Panama",territory:"Panama"},{other_zone:"SA Pacific Standard Time",zone:"America/Lima",territory:"Lima"},{other_zone:"SA Pacific Standard Time",zone:"Etc/GMT+5",territory:"GMT+5"},{other_zone:"Eastern Standard Time",zone:"America/New_York",territory:"New York"},{other_zone:"Eastern Standard Time",zone:"America/Nassau",territory:"Nassau"},{other_zone:"Eastern Standard Time",zone:"America/Toronto",territory:"Toronto"},{other_zone:"Eastern Standard Time",zone:"America/Iqaluit",territory:"Iqaluit"},{other_zone:"Eastern Standard Time",zone:"America/Montreal",territory:"Montreal"},{other_zone:"Eastern Standard Time",zone:"America/Nipigon",territory:"Nipigon"},{other_zone:"Eastern Standard Time",zone:"America/Pangnirtung",territory:"Pangnirtung"},{other_zone:"Eastern Standard Time",zone:"America/Thunder_Bay",territory:"Thunder Bay"},{other_zone:"Eastern Standard Time",zone:"America/Grand_Turk",territory:"Grand Turk"},{other_zone:"Eastern Standard Time",zone:"America/Detroit",territory:"Detroit"},{other_zone:"Eastern Standard Time",zone:"America/Indiana/Petersburg",territory:"Indiana"},{other_zone:"Eastern Standard Time",zone:"America/Indiana/Vincennes",territory:"Indiana"},{other_zone:"Eastern Standard Time",zone:"America/Indiana/Winamac",territory:"Indiana"},{other_zone:"Eastern Standard Time",zone:"America/Kentucky/Monticello",territory:"Kentucky"},{other_zone:"Eastern Standard Time",zone:"America/Louisville",territory:"Louisville"},{other_zone:"US Eastern Standard Time",zone:"America/Indianapolis",territory:"Indianapolis"},{other_zone:"US Eastern Standard Time",zone:"America/Indiana/Marengo",territory:"Indiana"},{other_zone:"US Eastern Standard Time",zone:"America/Indiana/Vevay",territory:"Indiana"},{other_zone:"Venezuela Standard Time",zone:"America/Caracas",territory:"Caracas"},{other_zone:"Paraguay Standard Time",zone:"America/Asuncion",territory:"Asuncion"},{other_zone:"Atlantic Standard Time",zone:"America/Halifax",territory:"Halifax"},{other_zone:"Atlantic Standard Time",zone:"Atlantic/Bermuda",territory:"Bermuda"},{other_zone:"Atlantic Standard Time",zone:"America/Glace_Bay",territory:"Glace Bay"},{other_zone:"Atlantic Standard Time",zone:"America/Goose_Bay",territory:"Goose Bay"},{other_zone:"Atlantic Standard Time",zone:"America/Moncton",territory:"Moncton"},{other_zone:"Atlantic Standard Time",zone:"America/Thule",territory:"Thule"},{other_zone:"Central Brazilian Standard Time",zone:"America/Cuiaba",territory:"Cuiaba"},{other_zone:"Central Brazilian Standard Time",zone:"America/Campo_Grande",territory:"Campo Grande"},{other_zone:"SA Western Standard Time",zone:"America/La_Paz",territory:"La Paz"},{other_zone:"SA Western Standard Time",zone:"America/Antigua",territory:"Antigua"},{other_zone:"SA Western Standard Time",zone:"America/Anguilla",territory:"Anguilla"},{other_zone:"SA Western Standard Time",zone:"America/Aruba",territory:"Aruba"},{other_zone:"SA Western Standard Time",zone:"America/Barbados",territory:"Barbados"},{other_zone:"SA Western Standard Time",zone:"America/St_Barthelemy",territory:"St Barthelemy"},{other_zone:"SA Western Standard Time",zone:"America/Kralendijk",territory:"Kralendijk"},{other_zone:"SA Western Standard Time",zone:"America/Manaus",territory:"Manaus"},{other_zone:"SA Western Standard Time",zone:"America/Boa_Vista",territory:"Boa Vista"},{other_zone:"SA Western Standard Time",zone:"America/Eirunepe",territory:"Eirunepe"},{other_zone:"SA Western Standard Time",zone:"America/Porto_Velho",territory:"Porto Velho"},{other_zone:"SA Western Standard Time",zone:"America/Rio_Branco",territory:"Rio Branco"},{other_zone:"SA Western Standard Time",zone:"America/Blanc-Sablon",territory:"Blanc-Sablon"},{other_zone:"SA Western Standard Time",zone:"America/Curacao",territory:"Curacao"},{other_zone:"SA Western Standard Time",zone:"America/Dominica",territory:"Dominica"},{other_zone:"SA Western Standard Time",zone:"America/Santo_Domingo",territory:"Santo Domingo"},{other_zone:"SA Western Standard Time",zone:"America/Grenada",territory:"Grenada"},{other_zone:"SA Western Standard Time",zone:"America/Guadeloupe",territory:"Guadeloupe"},{other_zone:"SA Western Standard Time",zone:"America/Guyana",territory:"Guyana"},{other_zone:"SA Western Standard Time",zone:"America/St_Kitts",territory:"St Kitts"},{other_zone:"SA Western Standard Time",zone:"America/St_Lucia",territory:"St Lucia"},{other_zone:"SA Western Standard Time",zone:"America/Marigot",territory:"Marigot"},{other_zone:"SA Western Standard Time",zone:"America/Martinique",territory:"Martinique"},{other_zone:"SA Western Standard Time",zone:"America/Montserrat",territory:"Montserrat"},{other_zone:"SA Western Standard Time",zone:"America/Puerto_Rico",territory:"Puerto Rico"},{other_zone:"SA Western Standard Time",zone:"America/Lower_Princes",territory:"Lower Princes"},{other_zone:"SA Western Standard Time",zone:"America/Port_of_Spain",territory:"Port of Spain"},{other_zone:"SA Western Standard Time",zone:"America/St_Vincent",territory:"St Vincent"},{other_zone:"SA Western Standard Time",zone:"America/Tortola",territory:"Tortola"},{other_zone:"SA Western Standard Time",zone:"America/St_Thomas",territory:"St Thomas"},{other_zone:"SA Western Standard Time",zone:"Etc/GMT+4",territory:"GMT+4"},{other_zone:"Pacific SA Standard Time",zone:"America/Santiago",territory:"Santiago"},{other_zone:"Pacific SA Standard Time",zone:"Antarctica/Palmer",territory:"Palmer"},{other_zone:"Newfoundland Standard Time",zone:"America/St_Johns",territory:"St Johns"},{other_zone:"E. South America Standard Time",zone:"America/Sao_Paulo",territory:"Sao Paulo"},{other_zone:"E. South America Standard Time",zone:"America/Araguaina",territory:"Araguaina"},{other_zone:"Argentina Standard Time",zone:"America/Buenos_Aires",territory:"Buenos Aires"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/La_Rioja",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/Rio_Gallegos",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/Salta",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/San_Juan",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/San_Luis",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/Tucuman",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Argentina/Ushuaia",territory:"Argentina"},{other_zone:"Argentina Standard Time",zone:"America/Catamarca",territory:"Catamarca"},{other_zone:"Argentina Standard Time",zone:"America/Cordoba",territory:"Cordoba"},{other_zone:"Argentina Standard Time",zone:"America/Jujuy",territory:"Jujuy"},{other_zone:"Argentina Standard Time",zone:"America/Mendoza",territory:"Mendoza"},{other_zone:"SA Eastern Standard Time",zone:"America/Cayenne",territory:"Cayenne"},{other_zone:"SA Eastern Standard Time",zone:"Antarctica/Rothera",territory:"Rothera"},{other_zone:"SA Eastern Standard Time",zone:"America/Fortaleza",territory:"Fortaleza"},{other_zone:"SA Eastern Standard Time",zone:"America/Belem",territory:"Belem"},{other_zone:"SA Eastern Standard Time",zone:"America/Maceio",territory:"Maceio"},{other_zone:"SA Eastern Standard Time",zone:"America/Recife",territory:"Recife"},{other_zone:"SA Eastern Standard Time",zone:"America/Santarem",territory:"Santarem"},{other_zone:"SA Eastern Standard Time",zone:"Atlantic/Stanley",territory:"Stanley"},{other_zone:"SA Eastern Standard Time",zone:"America/Paramaribo",territory:"Paramaribo"},{other_zone:"SA Eastern Standard Time",zone:"Etc/GMT+3",territory:"GMT+3"},{other_zone:"Greenland Standard Time",zone:"America/Godthab",territory:"Godthab"},{other_zone:"Montevideo Standard Time",zone:"America/Montevideo",territory:"Montevideo"},{other_zone:"Bahia Standard Time",zone:"America/Bahia",territory:"Bahia"},{other_zone:"UTC-02",zone:"Etc/GMT+2",territory:"GMT+2"},{other_zone:"UTC-02",zone:"America/Noronha",territory:"Noronha"},{other_zone:"UTC-02",zone:"Atlantic/South_Georgia",territory:"South Georgia"},{other_zone:"Azores Standard Time",zone:"Atlantic/Azores",territory:"Azores"},{other_zone:"Azores Standard Time",zone:"America/Scoresbysund",territory:"Scoresbysund"},{other_zone:"Cape Verde Standard Time",zone:"Atlantic/Cape_Verde",territory:"Cape Verde"},{other_zone:"Cape Verde Standard Time",zone:"Etc/GMT+1",territory:"GMT+1"},{other_zone:"Morocco Standard Time",zone:"Africa/Casablanca",territory:"Casablanca"},{other_zone:"UTC",zone:"Etc/GMT",territory:"GMT"},{other_zone:"UTC",zone:"America/Danmarkshavn",territory:"Danmarkshavn"},{other_zone:"GMT Standard Time",zone:"Europe/London",territory:"London"},{other_zone:"GMT Standard Time",zone:"Atlantic/Canary",territory:"Canary"},{other_zone:"GMT Standard Time",zone:"Atlantic/Faeroe",territory:"Faeroe"},{other_zone:"GMT Standard Time",zone:"Europe/Guernsey",territory:"Guernsey"},{other_zone:"GMT Standard Time",zone:"Europe/Dublin",territory:"Dublin"},{other_zone:"GMT Standard Time",zone:"Europe/Isle_of_Man",territory:"Isle of Man"},{other_zone:"GMT Standard Time",zone:"Europe/Jersey",territory:"Jersey"},{other_zone:"GMT Standard Time",zone:"Europe/Lisbon",territory:"Lisbon"},{other_zone:"GMT Standard Time",zone:"Atlantic/Madeira",territory:"Madeira"},{other_zone:"Greenwich Standard Time",zone:"Atlantic/Reykjavik",territory:"Reykjavik"},{other_zone:"Greenwich Standard Time",zone:"Africa/Ouagadougou",territory:"Ouagadougou"},{other_zone:"Greenwich Standard Time",zone:"Africa/Abidjan",territory:"Abidjan"},{other_zone:"Greenwich Standard Time",zone:"Africa/El_Aaiun",territory:"El Aaiun"},{other_zone:"Greenwich Standard Time",zone:"Africa/Accra",territory:"Accra"},{other_zone:"Greenwich Standard Time",zone:"Africa/Banjul",territory:"Banjul"},{other_zone:"Greenwich Standard Time",zone:"Africa/Conakry",territory:"Conakry"},{other_zone:"Greenwich Standard Time",zone:"Africa/Bissau",territory:"Bissau"},{other_zone:"Greenwich Standard Time",zone:"Africa/Monrovia",territory:"Monrovia"},{other_zone:"Greenwich Standard Time",zone:"Africa/Bamako",territory:"Bamako"},{other_zone:"Greenwich Standard Time",zone:"Africa/Nouakchott",territory:"Nouakchott"},{other_zone:"Greenwich Standard Time",zone:"Atlantic/St_Helena",territory:"St Helena"},{other_zone:"Greenwich Standard Time",zone:"Africa/Freetown",territory:"Freetown"},{other_zone:"Greenwich Standard Time",zone:"Africa/Dakar",territory:"Dakar"},{other_zone:"Greenwich Standard Time",zone:"Africa/Sao_Tome",territory:"Sao Tome"},{other_zone:"Greenwich Standard Time",zone:"Africa/Lome",territory:"Lome"},{other_zone:"W. Europe Standard Time",zone:"Europe/Berlin",territory:"Berlin"},{other_zone:"W. Europe Standard Time",zone:"Europe/Andorra",territory:"Andorra"},{other_zone:"W. Europe Standard Time",zone:"Europe/Vienna",territory:"Vienna"},{other_zone:"W. Europe Standard Time",zone:"Europe/Zurich",territory:"Zurich"},{other_zone:"W. Europe Standard Time",zone:"Europe/Busingen",territory:"Busingen"},{other_zone:"W. Europe Standard Time",zone:"Europe/Gibraltar",territory:"Gibraltar"},{other_zone:"W. Europe Standard Time",zone:"Europe/Rome",territory:"Rome"},{other_zone:"W. Europe Standard Time",zone:"Europe/Vaduz",territory:"Vaduz"},{other_zone:"W. Europe Standard Time",zone:"Europe/Luxembourg",territory:"Luxembourg"},{other_zone:"W. Europe Standard Time",zone:"Africa/Tripoli",territory:"Tripoli"},{other_zone:"W. Europe Standard Time",zone:"Europe/Monaco",territory:"Monaco"},{other_zone:"W. Europe Standard Time",zone:"Europe/Malta",territory:"Malta"},{other_zone:"W. Europe Standard Time",zone:"Europe/Amsterdam",territory:"Amsterdam"},{other_zone:"W. Europe Standard Time",zone:"Europe/Oslo",territory:"Oslo"},{other_zone:"W. Europe Standard Time",zone:"Europe/Stockholm",territory:"Stockholm"},{other_zone:"W. Europe Standard Time",zone:"Arctic/Longyearbyen",territory:"Longyearbyen"},{other_zone:"W. Europe Standard Time",zone:"Europe/San_Marino",territory:"San Marino"},{other_zone:"W. Europe Standard Time",zone:"Europe/Vatican",territory:"Vatican"},{other_zone:"Central Europe Standard Time",zone:"Europe/Budapest",territory:"Budapest"},{other_zone:"Central Europe Standard Time",zone:"Europe/Tirane",territory:"Tirane"},{other_zone:"Central Europe Standard Time",zone:"Europe/Prague",territory:"Prague"},{other_zone:"Central Europe Standard Time",zone:"Europe/Podgorica",territory:"Podgorica"},{other_zone:"Central Europe Standard Time",zone:"Europe/Belgrade",territory:"Belgrade"},{other_zone:"Central Europe Standard Time",zone:"Europe/Ljubljana",territory:"Ljubljana"},{other_zone:"Central Europe Standard Time",zone:"Europe/Bratislava",territory:"Bratislava"},{other_zone:"Romance Standard Time",zone:"Europe/Paris",territory:"Paris"},{other_zone:"Romance Standard Time",zone:"Europe/Brussels",territory:"Brussels"},{other_zone:"Romance Standard Time",zone:"Europe/Copenhagen",territory:"Copenhagen"},{other_zone:"Romance Standard Time",zone:"Europe/Madrid",territory:"Madrid"},{other_zone:"Romance Standard Time",zone:"Africa/Ceuta",territory:"Ceuta"},{other_zone:"Central European Standard Time",zone:"Europe/Warsaw",territory:"Warsaw"},{other_zone:"Central European Standard Time",zone:"Europe/Sarajevo",territory:"Sarajevo"},{other_zone:"Central European Standard Time",zone:"Europe/Zagreb",territory:"Zagreb"},{other_zone:"Central European Standard Time",zone:"Europe/Skopje",territory:"Skopje"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Lagos",territory:"Lagos"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Luanda",territory:"Luanda"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Porto-Novo",territory:"Porto-Novo"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Kinshasa",territory:"Kinshasa"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Bangui",territory:"Bangui"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Brazzaville",territory:"Brazzaville"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Douala",territory:"Douala"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Algiers",territory:"Algiers"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Libreville",territory:"Libreville"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Malabo",territory:"Malabo"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Niamey",territory:"Niamey"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Ndjamena",territory:"Ndjamena"},{other_zone:"W. Central Africa Standard Time",zone:"Africa/Tunis",territory:"Tunis"},{other_zone:"W. Central Africa Standard Time",zone:"Etc/GMT-1",territory:"GMT-1"},{other_zone:"Namibia Standard Time",zone:"Africa/Windhoek",territory:"Windhoek"},{other_zone:"GTB Standard Time",zone:"Europe/Bucharest",territory:"Bucharest"},{other_zone:"GTB Standard Time",zone:"Europe/Athens",territory:"Athens"},{other_zone:"GTB Standard Time",zone:"Europe/Chisinau",territory:"Chisinau"},{other_zone:"Middle East Standard Time",zone:"Asia/Beirut",territory:"Beirut"},{other_zone:"Egypt Standard Time",zone:"Africa/Cairo",territory:"Cairo"},{other_zone:"Egypt Standard Time",zone:"Asia/Gaza",territory:"Gaza"},{other_zone:"Egypt Standard Time",zone:"Asia/Hebron",territory:"Hebron"},{other_zone:"Syria Standard Time",zone:"Asia/Damascus",territory:"Damascus"},{other_zone:"E. Europe Standard Time",zone:"Asia/Nicosia",territory:"Nicosia"},{other_zone:"South Africa Standard Time",zone:"Africa/Johannesburg",territory:"Johannesburg"},{other_zone:"South Africa Standard Time",zone:"Africa/Bujumbura",territory:"Bujumbura"},{other_zone:"South Africa Standard Time",zone:"Africa/Gaborone",territory:"Gaborone"},{other_zone:"South Africa Standard Time",zone:"Africa/Lubumbashi",territory:"Lubumbashi"},{other_zone:"South Africa Standard Time",zone:"Africa/Maseru",territory:"Maseru"},{other_zone:"South Africa Standard Time",zone:"Africa/Blantyre",territory:"Blantyre"},{other_zone:"South Africa Standard Time",
zone:"Africa/Maputo",territory:"Maputo"},{other_zone:"South Africa Standard Time",zone:"Africa/Kigali",territory:"Kigali"},{other_zone:"South Africa Standard Time",zone:"Africa/Mbabane",territory:"Mbabane"},{other_zone:"South Africa Standard Time",zone:"Africa/Lusaka",territory:"Lusaka"},{other_zone:"South Africa Standard Time",zone:"Africa/Harare",territory:"Harare"},{other_zone:"South Africa Standard Time",zone:"Etc/GMT-2",territory:"GMT-2"},{other_zone:"FLE Standard Time",zone:"Europe/Kiev",territory:"Kiev"},{other_zone:"FLE Standard Time",zone:"Europe/Mariehamn",territory:"Mariehamn"},{other_zone:"FLE Standard Time",zone:"Europe/Sofia",territory:"Sofia"},{other_zone:"FLE Standard Time",zone:"Europe/Tallinn",territory:"Tallinn"},{other_zone:"FLE Standard Time",zone:"Europe/Helsinki",territory:"Helsinki"},{other_zone:"FLE Standard Time",zone:"Europe/Vilnius",territory:"Vilnius"},{other_zone:"FLE Standard Time",zone:"Europe/Riga",territory:"Riga"},{other_zone:"FLE Standard Time",zone:"Europe/Simferopol",territory:"Simferopol"},{other_zone:"FLE Standard Time",zone:"Europe/Uzhgorod",territory:"Uzhgorod"},{other_zone:"FLE Standard Time",zone:"Europe/Zaporozhye",territory:"Zaporozhye"},{other_zone:"Turkey Standard Time",zone:"Europe/Istanbul",territory:"Istanbul"},{other_zone:"Israel Standard Time",zone:"Asia/Jerusalem",territory:"Jerusalem"},{other_zone:"Jordan Standard Time",zone:"Asia/Amman",territory:"Amman"},{other_zone:"Arabic Standard Time",zone:"Asia/Baghdad",territory:"Baghdad"},{other_zone:"Kaliningrad Standard Time",zone:"Europe/Kaliningrad",territory:"Kaliningrad"},{other_zone:"Kaliningrad Standard Time",zone:"Europe/Minsk",territory:"Minsk"},{other_zone:"Arab Standard Time",zone:"Asia/Riyadh",territory:"Riyadh"},{other_zone:"Arab Standard Time",zone:"Asia/Bahrain",territory:"Bahrain"},{other_zone:"Arab Standard Time",zone:"Asia/Kuwait",territory:"Kuwait"},{other_zone:"Arab Standard Time",zone:"Asia/Qatar",territory:"Qatar"},{other_zone:"Arab Standard Time",zone:"Asia/Aden",territory:"Aden"},{other_zone:"E. Africa Standard Time",zone:"Africa/Nairobi",territory:"Nairobi"},{other_zone:"E. Africa Standard Time",zone:"Antarctica/Syowa",territory:"Syowa"},{other_zone:"E. Africa Standard Time",zone:"Africa/Djibouti",territory:"Djibouti"},{other_zone:"E. Africa Standard Time",zone:"Africa/Asmera",territory:"Asmera"},{other_zone:"E. Africa Standard Time",zone:"Africa/Addis_Ababa",territory:"Addis Ababa"},{other_zone:"E. Africa Standard Time",zone:"Indian/Comoro",territory:"Comoro"},{other_zone:"E. Africa Standard Time",zone:"Indian/Antananarivo",territory:"Antananarivo"},{other_zone:"E. Africa Standard Time",zone:"Africa/Khartoum",territory:"Khartoum"},{other_zone:"E. Africa Standard Time",zone:"Africa/Mogadishu",territory:"Mogadishu"},{other_zone:"E. Africa Standard Time",zone:"Africa/Juba",territory:"Juba"},{other_zone:"E. Africa Standard Time",zone:"Africa/Dar_es_Salaam",territory:"Dar es Salaam"},{other_zone:"E. Africa Standard Time",zone:"Africa/Kampala",territory:"Kampala"},{other_zone:"E. Africa Standard Time",zone:"Indian/Mayotte",territory:"Mayotte"},{other_zone:"E. Africa Standard Time",zone:"Etc/GMT-3",territory:"GMT-3"},{other_zone:"Iran Standard Time",zone:"Asia/Tehran",territory:"Tehran"},{other_zone:"Arabian Standard Time",zone:"Asia/Dubai",territory:"Dubai"},{other_zone:"Arabian Standard Time",zone:"Asia/Muscat",territory:"Muscat"},{other_zone:"Arabian Standard Time",zone:"Etc/GMT-4",territory:"GMT-4"},{other_zone:"Azerbaijan Standard Time",zone:"Asia/Baku",territory:"Baku"},{other_zone:"Russian Standard Time",zone:"Europe/Moscow",territory:"Moscow"},{other_zone:"Russian Standard Time",zone:"Europe/Samara",territory:"Samara"},{other_zone:"Russian Standard Time",zone:"Europe/Volgograd",territory:"Volgograd"},{other_zone:"Mauritius Standard Time",zone:"Indian/Mauritius",territory:"Mauritius"},{other_zone:"Mauritius Standard Time",zone:"Indian/Reunion",territory:"Reunion"},{other_zone:"Mauritius Standard Time",zone:"Indian/Mahe",territory:"Mahe"},{other_zone:"Georgian Standard Time",zone:"Asia/Tbilisi",territory:"Tbilisi"},{other_zone:"Caucasus Standard Time",zone:"Asia/Yerevan",territory:"Yerevan"},{other_zone:"Afghanistan Standard Time",zone:"Asia/Kabul",territory:"Kabul"},{other_zone:"Pakistan Standard Time",zone:"Asia/Karachi",territory:"Karachi"},{other_zone:"West Asia Standard Time",zone:"Asia/Tashkent",territory:"Tashkent"},{other_zone:"West Asia Standard Time",zone:"Antarctica/Mawson",territory:"Mawson"},{other_zone:"West Asia Standard Time",zone:"Asia/Oral",territory:"Oral"},{other_zone:"West Asia Standard Time",zone:"Asia/Aqtau",territory:"Aqtau"},{other_zone:"West Asia Standard Time",zone:"Asia/Aqtobe",territory:"Aqtobe"},{other_zone:"West Asia Standard Time",zone:"Indian/Maldives",territory:"Maldives"},{other_zone:"West Asia Standard Time",zone:"Indian/Kerguelen",territory:"Kerguelen"},{other_zone:"West Asia Standard Time",zone:"Asia/Dushanbe",territory:"Dushanbe"},{other_zone:"West Asia Standard Time",zone:"Asia/Ashgabat",territory:"Ashgabat"},{other_zone:"West Asia Standard Time",zone:"Asia/Samarkand",territory:"Samarkand"},{other_zone:"West Asia Standard Time",zone:"Etc/GMT-5",territory:"GMT-5"},{other_zone:"India Standard Time",zone:"Asia/Calcutta",territory:"Calcutta"},{other_zone:"Sri Lanka Standard Time",zone:"Asia/Colombo",territory:"Colombo"},{other_zone:"Nepal Standard Time",zone:"Asia/Katmandu",territory:"Katmandu"},{other_zone:"Central Asia Standard Time",zone:"Asia/Almaty",territory:"Almaty"},{other_zone:"Central Asia Standard Time",zone:"Antarctica/Vostok",territory:"Vostok"},{other_zone:"Central Asia Standard Time",zone:"Indian/Chagos",territory:"Chagos"},{other_zone:"Central Asia Standard Time",zone:"Asia/Bishkek",territory:"Bishkek"},{other_zone:"Central Asia Standard Time",zone:"Asia/Qyzylorda",territory:"Qyzylorda"},{other_zone:"Central Asia Standard Time",zone:"Etc/GMT-6",territory:"GMT-6"},{other_zone:"Bangladesh Standard Time",zone:"Asia/Dhaka",territory:"Dhaka"},{other_zone:"Bangladesh Standard Time",zone:"Asia/Thimphu",territory:"Thimphu"},{other_zone:"Ekaterinburg Standard Time",zone:"Asia/Yekaterinburg",territory:"Yekaterinburg"},{other_zone:"Myanmar Standard Time",zone:"Asia/Rangoon",territory:"Rangoon"},{other_zone:"Myanmar Standard Time",zone:"Indian/Cocos",territory:"Cocos"},{other_zone:"SE Asia Standard Time",zone:"Asia/Bangkok",territory:"Bangkok"},{other_zone:"SE Asia Standard Time",zone:"Antarctica/Davis",territory:"Davis"},{other_zone:"SE Asia Standard Time",zone:"Indian/Christmas",territory:"Christmas"},{other_zone:"SE Asia Standard Time",zone:"Asia/Jakarta",territory:"Jakarta"},{other_zone:"SE Asia Standard Time",zone:"Asia/Pontianak",territory:"Pontianak"},{other_zone:"SE Asia Standard Time",zone:"Asia/Phnom_Penh",territory:"Phnom Penh"},{other_zone:"SE Asia Standard Time",zone:"Asia/Vientiane",territory:"Vientiane"},{other_zone:"SE Asia Standard Time",zone:"Asia/Hovd",territory:"Hovd"},{other_zone:"SE Asia Standard Time",zone:"Asia/Saigon",territory:"Saigon"},{other_zone:"SE Asia Standard Time",zone:"Etc/GMT-7",territory:"GMT-7"},{other_zone:"N. Central Asia Standard Time",zone:"Asia/Novosibirsk",territory:"Novosibirsk"},{other_zone:"N. Central Asia Standard Time",zone:"Asia/Novokuznetsk",territory:"Novokuznetsk"},{other_zone:"N. Central Asia Standard Time",zone:"Asia/Omsk",territory:"Omsk"},{other_zone:"China Standard Time",zone:"Asia/Shanghai",territory:"Shanghai"},{other_zone:"China Standard Time",zone:"Asia/Chongqing",territory:"Chongqing"},{other_zone:"China Standard Time",zone:"Asia/Harbin",territory:"Harbin"},{other_zone:"China Standard Time",zone:"Asia/Kashgar",territory:"Kashgar"},{other_zone:"China Standard Time",zone:"Asia/Urumqi",territory:"Urumqi"},{other_zone:"China Standard Time",zone:"Asia/Hong_Kong",territory:"Hong Kong"},{other_zone:"China Standard Time",zone:"Asia/Macau",territory:"Macau"},{other_zone:"North Asia Standard Time",zone:"Asia/Krasnoyarsk",territory:"Krasnoyarsk"},{other_zone:"Singapore Standard Time",zone:"Asia/Singapore",territory:"Singapore"},{other_zone:"Singapore Standard Time",zone:"Asia/Brunei",territory:"Brunei"},{other_zone:"Singapore Standard Time",zone:"Asia/Makassar",territory:"Makassar"},{other_zone:"Singapore Standard Time",zone:"Asia/Kuala_Lumpur",territory:"Kuala Lumpur"},{other_zone:"Singapore Standard Time",zone:"Asia/Kuching",territory:"Kuching"},{other_zone:"Singapore Standard Time",zone:"Asia/Manila",territory:"Manila"},{other_zone:"Singapore Standard Time",zone:"Etc/GMT-8",territory:"GMT-8"},{other_zone:"W. Australia Standard Time",zone:"Australia/Perth",territory:"Perth"},{other_zone:"W. Australia Standard Time",zone:"Antarctica/Casey",territory:"Casey"},{other_zone:"Taipei Standard Time",zone:"Asia/Taipei",territory:"Taipei"},{other_zone:"Ulaanbaatar Standard Time",zone:"Asia/Ulaanbaatar",territory:"Ulaanbaatar"},{other_zone:"Ulaanbaatar Standard Time",zone:"Asia/Choibalsan",territory:"Choibalsan"},{other_zone:"North Asia East Standard Time",zone:"Asia/Irkutsk",territory:"Irkutsk"},{other_zone:"Tokyo Standard Time",zone:"Asia/Tokyo",territory:"Tokyo"},{other_zone:"Tokyo Standard Time",zone:"Asia/Jayapura",territory:"Jayapura"},{other_zone:"Tokyo Standard Time",zone:"Pacific/Palau",territory:"Palau"},{other_zone:"Tokyo Standard Time",zone:"Asia/Dili",territory:"Dili"},{other_zone:"Tokyo Standard Time",zone:"Etc/GMT-9",territory:"GMT-9"},{other_zone:"Korea Standard Time",zone:"Asia/Seoul",territory:"Seoul"},{other_zone:"Korea Standard Time",zone:"Asia/Pyongyang",territory:"Pyongyang"},{other_zone:"Cen. Australia Standard Time",zone:"Australia/Adelaide",territory:"Adelaide"},{other_zone:"Cen. Australia Standard Time",zone:"Australia/Broken_Hill",territory:"Broken Hill"},{other_zone:"AUS Central Standard Time",zone:"Australia/Darwin",territory:"Darwin"},{other_zone:"E. Australia Standard Time",zone:"Australia/Brisbane",territory:"Brisbane"},{other_zone:"E. Australia Standard Time",zone:"Australia/Lindeman",territory:"Lindeman"},{other_zone:"AUS Eastern Standard Time",zone:"Australia/Sydney",territory:"Sydney"},{other_zone:"AUS Eastern Standard Time",zone:"Australia/Melbourne",territory:"Melbourne"},{other_zone:"West Pacific Standard Time",zone:"Pacific/Port_Moresby",territory:"Port Moresby"},{other_zone:"West Pacific Standard Time",zone:"Antarctica/DumontDUrville",territory:"DumontDUrville"},{other_zone:"West Pacific Standard Time",zone:"Pacific/Truk",territory:"Truk"},{other_zone:"West Pacific Standard Time",zone:"Pacific/Guam",territory:"Guam"},{other_zone:"West Pacific Standard Time",zone:"Pacific/Saipan",territory:"Saipan"},{other_zone:"West Pacific Standard Time",zone:"Etc/GMT-10",territory:"GMT-10"},{other_zone:"Tasmania Standard Time",zone:"Australia/Hobart",territory:"Hobart"},{other_zone:"Tasmania Standard Time",zone:"Australia/Currie",territory:"Currie"},{other_zone:"Yakutsk Standard Time",zone:"Asia/Yakutsk",territory:"Yakutsk"},{other_zone:"Yakutsk Standard Time",zone:"Asia/Khandyga",territory:"Khandyga"},{other_zone:"Central Pacific Standard Time",zone:"Pacific/Guadalcanal",territory:"Guadalcanal"},{other_zone:"Central Pacific Standard Time",zone:"Antarctica/Macquarie",territory:"Macquarie"},{other_zone:"Central Pacific Standard Time",zone:"Pacific/Ponape",territory:"Ponape"},{other_zone:"Central Pacific Standard Time",zone:"Pacific/Kosrae",territory:"Kosrae"},{other_zone:"Central Pacific Standard Time",zone:"Pacific/Noumea",territory:"Noumea"},{other_zone:"Central Pacific Standard Time",zone:"Pacific/Efate",territory:"Efate"},{other_zone:"Central Pacific Standard Time",zone:"Etc/GMT-11",territory:"GMT-11"},{other_zone:"Vladivostok Standard Time",zone:"Asia/Vladivostok",territory:"Vladivostok"},{other_zone:"Vladivostok Standard Time",zone:"Asia/Sakhalin",territory:"Sakhalin"},{other_zone:"Vladivostok Standard Time",zone:"Asia/Ust-Nera",territory:"Ust-Nera"},{other_zone:"New Zealand Standard Time",zone:"Pacific/Auckland",territory:"Auckland"},{other_zone:"New Zealand Standard Time",zone:"Antarctica/South_Pole",territory:"South Pole"},{other_zone:"New Zealand Standard Time",zone:"Antarctica/McMurdo",territory:"McMurdo"},{other_zone:"UTC+12",zone:"Etc/GMT-12",territory:"GMT-12"},{other_zone:"UTC+12",zone:"Pacific/Tarawa",territory:"Tarawa"},{other_zone:"UTC+12",zone:"Pacific/Majuro",territory:"Majuro"},{other_zone:"UTC+12",zone:"Pacific/Kwajalein",territory:"Kwajalein"},{other_zone:"UTC+12",zone:"Pacific/Nauru",territory:"Nauru"},{other_zone:"UTC+12",zone:"Pacific/Funafuti",territory:"Funafuti"},{other_zone:"UTC+12",zone:"Pacific/Wake",territory:"Wake"},{other_zone:"UTC+12",zone:"Pacific/Wallis",territory:"Wallis"},{other_zone:"Fiji Standard Time",zone:"Pacific/Fiji",territory:"Fiji"},{other_zone:"Magadan Standard Time",zone:"Asia/Magadan",territory:"Magadan"},{other_zone:"Magadan Standard Time",zone:"Asia/Anadyr",territory:"Anadyr"},{other_zone:"Magadan Standard Time",zone:"Asia/Kamchatka",territory:"Kamchatka"},{other_zone:"Tonga Standard Time",zone:"Pacific/Tongatapu",territory:"Tongatapu"},{other_zone:"Tonga Standard Time",zone:"Pacific/Enderbury",territory:"Enderbury"},{other_zone:"Tonga Standard Time",zone:"Pacific/Fakaofo",territory:"Fakaofo"},{other_zone:"Tonga Standard Time",zone:"Etc/GMT-13",territory:"GMT-13"},{other_zone:"Samoa Standard Time",zone:"Pacific/Apia",territory:"Apia"}],a},"function"==typeof define&&define.amd?define:function(a,n,r){(r||n)()});
//# sourceMappingURL=kendo.timezones.min.js.map

