/*! jQuery v1.12.3 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ra(b),i=l.boxSizing&&"border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Sa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Oa.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+eb(b,c,e||(i?"border":"content"),f,h)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){
return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0;
})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});

/*!

JSZip - A Javascript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/master/LICENSE
*/
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a){if(a){this.data=a,this.length=this.data.length,this.index=0,this.zero=0;for(var b=0;b<this.data.length;b++)a[b]=255&a[b]}}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[this.zero+a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f-this.zero;return-1},d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":6}],2:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a,b){for(var c,e,f,g,h,i,j,k="",l=0;l<a.length;)c=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=c>>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)g=d.indexOf(a.charAt(l++)),h=d.indexOf(a.charAt(l++)),i=d.indexOf(a.charAt(l++)),j=d.indexOf(a.charAt(l++)),c=g<<2|h>>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],3:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],4:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a,b){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":9}],5:[function(a,b,c){"use strict";var d=a("./utils"),e=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==d.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),f=e[g],b=b>>>8^f;return-1^b}},{"./utils":22}],6:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0,this.zero=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||0>a)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":22}],7:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],8:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":22}],9:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a,b){return e.deflateRaw(a,{level:b.level||-1})},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:25}],10:[function(a,b,c){"use strict";function d(a,b){return this instanceof d?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new d(a,b)}var e=a("./base64");d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./deprecatedPublicUtils"),d.base64={encode:function(a){return e.encode(a)},decode:function(a){return e.decode(a)}},d.compressions=a("./compressions"),b.exports=d},{"./base64":2,"./compressions":4,"./defaults":7,"./deprecatedPublicUtils":8,"./load":11,"./object":14,"./support":18}],11:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./utf8"),f=a("./utils"),g=a("./zipEntries");b.exports=function(a,b){var c,h,i,j;for(b=f.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:e.utf8decode}),b.base64&&(a=d.decode(a)),h=new g(a,b),c=h.files,i=0;i<c.length;i++)j=c[i],this.file(j.fileNameStr,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:b.createFolders});return h.zipComment.length&&(this.comment=h.zipComment),this}},{"./base64":2,"./utf8":21,"./utils":22,"./zipEntries":23}],12:[function(a,b,c){(function(a){"use strict";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],13:[function(a,b,c){"use strict";function d(a){this.data=a,this.length=this.data.length,this.index=0,this.zero=0}var e=a("./uint8ArrayReader");d.prototype=new e,d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"./uint8ArrayReader":19}],14:[function(a,b,c){"use strict";var d=a("./support"),e=a("./utils"),f=a("./crc32"),g=a("./signature"),h=a("./defaults"),i=a("./base64"),j=a("./compressions"),k=a("./compressedObject"),l=a("./nodeBuffer"),m=a("./utf8"),n=a("./stringWriter"),o=a("./uint8ArrayWriter"),p=function(a){if(a._data instanceof k&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,"uint8array"===e.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},q=function(a){var b=p(a),c=e.getTypeOf(b);return"string"===c?!a.options.binary&&d.nodebuffer?l(b,"utf-8"):a.asBinary():b},r=function(a){var b=p(this);return null===b||"undefined"==typeof b?"":(this.options.base64&&(b=i.decode(b)),b=a&&this.options.binary?D.utf8decode(b):e.transformTo("string",b),a||this.options.binary||(b=e.transformTo("string",D.utf8encode(b))),b)},s=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this.unixPermissions=c.unixPermissions,this.dosPermissions=c.dosPermissions,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};s.prototype={asText:function(){return r.call(this,!0)},asBinary:function(){return r.call(this,!1)},asNodeBuffer:function(){var a=q(this);return e.transformTo("nodebuffer",a)},asUint8Array:function(){var a=q(this);return e.transformTo("uint8array",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var t=function(a,b){var c,d="";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=e.extend(a,h),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var d,f=e.getTypeOf(b);if(c=u(c),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(a=x(a)),c.createFolders&&(d=w(a))&&y.call(this,d,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null,f=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=e.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof k))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=e.transformTo("uint8array",b))}var g=new s(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a){return"/"!=a.slice(-1)&&(a+="/"),a},y=function(a,b){return b="undefined"!=typeof b?b:!1,a=x(a),this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},z=function(a,b,c){var d,g=new k;return a._data instanceof k?(g.uncompressedSize=a._data.uncompressedSize,g.crc32=a._data.crc32,0===g.uncompressedSize||a.dir?(b=j.STORE,g.compressedContent="",g.crc32=0):a._data.compressionMethod===b.magic?g.compressedContent=a._data.getCompressedContent():(d=a._data.getContent(),g.compressedContent=b.compress(e.transformTo(b.compressInputType,d),c))):(d=q(a),d&&0!==d.length&&!a.dir||(b=j.STORE,d=""),g.uncompressedSize=d.length,g.crc32=f(d),g.compressedContent=b.compress(e.transformTo(b.compressInputType,d),c)),g.compressedSize=g.compressedContent.length,g.compressionMethod=b.magic,g},A=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},B=function(a,b){return 63&(a||0)},C=function(a,b,c,d,h,i){var j,k,l,n,o=(c.compressedContent,i!==m.utf8encode),p=e.transformTo("string",i(b.name)),q=e.transformTo("string",m.utf8encode(b.name)),r=b.comment||"",s=e.transformTo("string",i(r)),u=e.transformTo("string",m.utf8encode(r)),v=q.length!==b.name.length,w=u.length!==r.length,x=b.options,y="",z="",C="";l=b._initialMetadata.dir!==b.dir?b.dir:x.dir,n=b._initialMetadata.date!==b.date?b.date:x.date;var D=0,E=0;l&&(D|=16),"UNIX"===h?(E=798,D|=A(b.unixPermissions,l)):(E=20,D|=B(b.dosPermissions,l)),j=n.getHours(),j<<=6,j|=n.getMinutes(),j<<=5,j|=n.getSeconds()/2,k=n.getFullYear()-1980,k<<=4,k|=n.getMonth()+1,k<<=5,k|=n.getDate(),v&&(z=t(1,1)+t(f(p),4)+q,y+="up"+t(z.length,2)+z),w&&(C=t(1,1)+t(this.crc32(s),4)+u,y+="uc"+t(C.length,2)+C);var F="";F+="\n\x00",F+=o||!v&&!w?"\x00\x00":"\x00\b",F+=c.compressionMethod,F+=t(j,2),F+=t(k,2),F+=t(c.crc32,4),F+=t(c.compressedSize,4),F+=t(c.uncompressedSize,4),F+=t(p.length,2),F+=t(y.length,2);var G=g.LOCAL_FILE_HEADER+F+p+y,H=g.CENTRAL_FILE_HEADER+t(E,2)+F+t(s.length,2)+"\x00\x00\x00\x00"+t(D,4)+t(d,4)+p+y+s;return{fileRecord:G,dirRecord:H,compressedObject:c}},D={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,f,g=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],f=new s(d.name,d._data,e.extend(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,f)&&g.push(f));return g},file:function(a,b,c){if(1===arguments.length){if(e.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.dir&&d.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(e.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=y.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=e.extend(a||{},{base64:!0,compression:"STORE",compressionOptions:null,type:"base64",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode}),e.checkSupport(a.type),"darwin"!==a.platform&&"freebsd"!==a.platform&&"linux"!==a.platform&&"sunos"!==a.platform||(a.platform="UNIX"),"win32"===a.platform&&(a.platform="DOS");var b,c,d=[],f=0,h=0,k=e.transformTo("string",a.encodeFileName(a.comment||this.comment||""));for(var l in this.files)if(this.files.hasOwnProperty(l)){var p=this.files[l],q=p.options.compression||a.compression.toUpperCase(),r=j[q];if(!r)throw new Error(q+" is not a valid compression method !");var s=p.options.compressionOptions||a.compressionOptions||{},u=z.call(this,p,r,s),v=C.call(this,l,p,u,f,a.platform,a.encodeFileName);f+=v.fileRecord.length+u.compressedSize,h+=v.dirRecord.length,d.push(v)}var w="";w=g.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+t(d.length,2)+t(d.length,2)+t(h,4)+t(f,4)+t(k.length,2)+k;var x=a.type.toLowerCase();for(b="uint8array"===x||"arraybuffer"===x||"blob"===x||"nodebuffer"===x?new o(f+h+w.length):new n(f+h+w.length),c=0;c<d.length;c++)b.append(d[c].fileRecord),b.append(d[c].compressedObject.compressedContent);for(c=0;c<d.length;c++)b.append(d[c].dirRecord);b.append(w);var y=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return e.transformTo(a.type.toLowerCase(),y);case"blob":return e.arrayBuffer2Blob(e.transformTo("arraybuffer",y),a.mimeType);case"base64":return a.base64?i.encode(y):y;default:return y}},crc32:function(a,b){return f(a,b)},utf8encode:function(a){return e.transformTo("string",m.utf8encode(a))},utf8decode:function(a){return m.utf8decode(a)}};b.exports=D},{"./base64":2,"./compressedObject":3,"./compressions":4,"./crc32":5,"./defaults":7,"./nodeBuffer":12,"./signature":15,"./stringWriter":17,"./support":18,"./uint8ArrayWriter":20,"./utf8":21,"./utils":22}],15:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],16:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0,this.zero=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":6,"./utils":22}],17:[function(a,b,c){"use strict";var d=a("./utils"),e=function(){this.data=[]};e.prototype={append:function(a){a=d.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}},b.exports=e},{"./utils":22}],18:[function(a,b,c){(function(a){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof a,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:"application/zip"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob("application/zip").size}catch(d){c.blob=!1}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],19:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0,this.zero=0)}var e=a("./arrayReader");d.prototype=new e,d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"./arrayReader":1}],20:[function(a,b,c){"use strict";var d=a("./utils"),e=function(a){this.data=new Uint8Array(a),this.index=0};e.prototype={append:function(a){0!==a.length&&(a=d.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=e},{"./utils":22}],21:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));e.uint8array?b.push(k(a.subarray(c,h))):b.push(k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":12,"./support":18,"./utils":22}],22:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k="",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a("./support"),i=a("./compressions"),j=a("./nodeBuffer");c.string2binary=function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a,b){c.checkSupport("blob"),b=b||"application/zip";try{return new Blob([a],{type:b})}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;return f.append(a),f.getBlob(b)}catch(d){throw new Error("Bug : can't construct the Blob.")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":h.nodebuffer&&j.test(a)?"nodebuffer":h.uint8array&&a instanceof Uint8Array?"uint8array":h.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this browser")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(16>b?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)},c.extend=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c}},{"./compressions":4,"./nodeBuffer":12,"./support":18}],23:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./arrayReader"),i=a("./utils"),j=a("./signature"),k=a("./zipEntry"),l=a("./support");a("./object");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+i.pretty(b)+", expected "+i.pretty(a)+")")},isSignature:function(a,b){var c=this.reader.index;this.reader.setIndex(a);var d=this.reader.readString(4),e=d===b;return this.reader.setIndex(c),e},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var a=this.reader.readData(this.zipCommentLength),b=l.uint8array?"uint8array":"array",c=i.transformTo(b,a);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(j.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===j.CENTRAL_FILE_HEADER;)a=new k({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(j.CENTRAL_DIRECTORY_END);if(0>a){var b=!this.isSignature(0,j.LOCAL_FILE_HEADER);throw b?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(a);var c=a;if(this.checkSignature(j.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(j.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(a),this.checkSignature(j.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,j.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(j.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip : can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(j.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var e=c-d;if(e>0)this.isSignature(c,j.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(0>e)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(a){var b=i.getTypeOf(a);if(i.checkSupport(b),"string"!==b||l.uint8array)if("nodebuffer"===b)this.reader=new f(a);else if(l.uint8array)this.reader=new g(i.transformTo("uint8array",a));else{if(!l.array)throw new Error("Unexpected error: unsupported type '"+b+"'");this.reader=new h(i.transformTo("array",a))}else this.reader=new e(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=d},{"./arrayReader":1,"./nodeBufferReader":13,"./object":14,"./signature":15,"./stringReader":16,"./support":18,"./uint8ArrayReader":19,"./utils":22,"./zipEntry":24}],24:[function(a,b,c){"use strict";function d(a,b){this.options=a,this.loadOptions=b}var e=a("./stringReader"),f=a("./utils"),g=a("./compressedObject"),h=a("./object"),i=a("./support"),j=0,k=3;d.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,e){return function(){var a=f.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==e)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=f.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");if(this.decompressed=new g,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=f.transformTo("string",this.decompressed.getContent()),
h.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readInt(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readData(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),a===j&&(this.dosPermissions=63&this.externalFileAttributes),a===k&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(a){if(this.extraFields[1]){var b=new e(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){var a=i.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(null!==b)this.fileNameStr=b;else{var c=f.transformTo(a,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var d=this.findExtraFieldUnicodeComment();if(null!==d)this.fileCommentStr=d;else{var e=f.transformTo(a,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(e)}}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new e(a.value);return 1!==b.readInt(1)?null:h.crc32(this.fileName)!==b.readInt(4)?null:h.utf8decode(b.readString(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new e(a.value);return 1!==b.readInt(1)?null:h.crc32(this.fileComment)!==b.readInt(4)?null:h.utf8decode(b.readString(a.length-5))}return null}},b.exports=d},{"./compressedObject":3,"./object":14,"./stringReader":16,"./support":18,"./utils":22}],25:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":26,"./lib/inflate":27,"./lib/utils/common":28,"./lib/zlib/constants":31}],26:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=i.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:t,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);b.header&&h.deflateSetHeader(this.strm,b.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d===r?(this.onEnd(p),e.avail_out=0,!0):!0},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":28,"./utils/strings":29,"./zlib/deflate":33,"./zlib/messages":38,"./zlib/zstream":40}],27:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l=this.strm,m=this.options.chunkSize,o=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?l.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?l.input=new Uint8Array(a):l.input=a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new h.Buf8(m),l.next_out=0,l.avail_out=m),c=g.inflate(l,j.Z_NO_FLUSH),c===j.Z_BUF_ERROR&&o===!0&&(c=j.Z_OK,o=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&c!==j.Z_STREAM_END&&(0!==l.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(l.output,l.next_out),f=l.next_out-e,k=i.buf2string(l.output,e),l.next_out=f,l.avail_out=m-f,f&&h.arraySet(l.output,l.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(o=!0)}while((l.avail_in>0||0===l.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d===j.Z_SYNC_FLUSH?(this.onEnd(j.Z_OK),l.avail_out=0,!0):!0},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":28,"./utils/strings":29,"./zlib/constants":31,"./zlib/gzheader":34,"./zlib/inflate":36,"./zlib/messages":38,"./zlib/zstream":40}],28:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],29:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":28}],30:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],31:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],32:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;g>h;h++)a=a>>>8^e[255&(a^b[h])];return-1^a}var f=d();b.exports=e},{}],33:[function(a,b,c){"use strict";function d(a,b){return a.msg=H[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(D.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){E._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,D.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=F(a.adler,b,e,c):2===a.state.wrap&&(a.adler=G(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ka?a.strstart-(a.w_size-ka):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ja,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ja-(m-f),f=m-ja,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ka)){D.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ia)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ia-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ia)););}while(a.lookahead<ka&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===I)return ta;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ta;if(a.strstart-a.block_start>=a.w_size-ka&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ta:ta}function o(a,b){for(var c,d;;){if(a.lookahead<ka){if(m(a),a.lookahead<ka&&b===I)return ta;if(0===a.lookahead)break}if(c=0,a.lookahead>=ia&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-ka&&(a.match_length=l(a,c)),a.match_length>=ia)if(d=E._tr_tally(a,a.strstart-a.match_start,a.match_length-ia),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ia){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=a.strstart<ia-1?a.strstart:ia-1,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function p(a,b){for(var c,d,e;;){if(a.lookahead<ka){if(m(a),a.lookahead<ka&&b===I)return ta;if(0===a.lookahead)break}if(c=0,a.lookahead>=ia&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ia-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-ka&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===T||a.match_length===ia&&a.strstart-a.match_start>4096)&&(a.match_length=ia-1)),a.prev_length>=ia&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ia,d=E._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ia),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ia-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return ta}else if(a.match_available){if(d=E._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return ta}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=E._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ia-1?a.strstart:ia-1,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ja){if(m(a),a.lookahead<=ja&&b===I)return ta;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ia&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ja;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ja-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ia?(c=E._tr_tally(a,1,a.match_length-ia),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===I)return ta;break}if(a.match_length=0,c=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=C[a.level].max_lazy,a.good_match=C[a.level].good_length,a.nice_match=C[a.level].nice_length,a.max_chain_length=C[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ia-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new D.Buf16(2*ga),this.dyn_dtree=new D.Buf16(2*(2*ea+1)),this.bl_tree=new D.Buf16(2*(2*fa+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new D.Buf16(ha+1),this.heap=new D.Buf16(2*da+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new D.Buf16(2*da+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Y,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?ma:ra,a.adler=2===b.wrap?0:1,b.last_flush=I,E._tr_init(b),N):d(a,P)}function w(a){var b=v(a);return b===N&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?P:(a.state.gzhead=b,N):P}function y(a,b,c,e,f,g){if(!a)return P;var h=1;if(b===S&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>$||c!==Z||8>e||e>15||0>b||b>9||0>g||g>W)return d(a,P);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ia-1)/ia),i.window=new D.Buf8(2*i.w_size),i.head=new D.Buf16(i.hash_size),i.prev=new D.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new D.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,Z,_,aa,X)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>M||0>b)return a?d(a,P):P;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===sa&&b!==L)return d(a,0===a.avail_out?R:P);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===ma)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=U||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=G(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=na):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=U||h.level<2?4:0),i(h,xa),h.status=ra);else{var m=Z+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=U||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=la),m+=31-m%31,h.status=ra,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===na)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=qa)}else h.status=qa;if(h.status===qa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=ra)):h.status=ra),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,N}else if(0===a.avail_in&&e(b)<=e(c)&&b!==L)return d(a,R);if(h.status===sa&&0!==a.avail_in)return d(a,R);if(0!==a.avail_in||0!==h.lookahead||b!==I&&h.status!==sa){var o=h.strategy===U?r(h,b):h.strategy===V?q(h,b):C[h.level].func(h,b);if(o!==va&&o!==wa||(h.status=sa),o===ta||o===va)return 0===a.avail_out&&(h.last_flush=-1),N;if(o===ua&&(b===J?E._tr_align(h):b!==M&&(E._tr_stored_block(h,0,0,!1),b===K&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,N}return b!==L?N:h.wrap<=0?O:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?N:O)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa?d(a,P):(a.state=null,b===ra?d(a,Q):N)):P}var C,D=a("../utils/common"),E=a("./trees"),F=a("./adler32"),G=a("./crc32"),H=a("./messages"),I=0,J=1,K=3,L=4,M=5,N=0,O=1,P=-2,Q=-3,R=-5,S=-1,T=1,U=2,V=3,W=4,X=0,Y=2,Z=8,$=9,_=15,aa=8,ba=29,ca=256,da=ca+1+ba,ea=30,fa=19,ga=2*da+1,ha=15,ia=3,ja=258,ka=ja+ia+1,la=32,ma=42,na=69,oa=73,pa=91,qa=103,ra=113,sa=666,ta=1,ua=2,va=3,wa=4,xa=3;C=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":28,"./adler32":30,"./crc32":32,"./messages":38,"./trees":39}],34:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],35:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],36:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new r.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=la;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=la;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){
if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=la;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=la;break}m=0,n=0}c.mode=ja;case ja:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=la;break}m=0,n=0}c.mode=ka;case ka:xa=D;break a;case la:xa=G;break a;case ma:return H;case na:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<la&&(c.mode<ia||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=ma,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===ba||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xa===C&&(xa=I),xa)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,aa=19,ba=20,ca=21,da=22,ea=23,fa=24,ga=25,ha=26,ia=27,ja=28,ka=29,la=30,ma=31,na=32,oa=852,pa=592,qa=15,ra=qa,sa=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":28,"./adler32":30,"./crc32":32,"./inffast":35,"./inftrees":37}],37:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":28}],38:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],39:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return 256>a?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function j(a,b,c){i(a,c[2*b],c[2*b+1])}function k(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;W>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;V>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0;for(d=1;W>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;Q-1>d;d++)for(ka[d]=c,a=0;a<1<<ba[d];a++)ja[c++]=d;for(ja[c-1]=d,f=0,d=0;16>d;d++)for(la[d]=f,a=0;a<1<<ca[d];a++)ia[f++]=d;for(f>>=7;T>d;d++)for(la[d]=f<<7,a=0;a<1<<ca[d]-7;a++)ia[256+f++]=d;for(b=0;W>=b;b++)g[b]=0;for(a=0;143>=a;)ga[2*a+1]=8,a++,g[8]++;for(;255>=a;)ga[2*a+1]=9,a++,g[9]++;for(;279>=a;)ga[2*a+1]=7,a++,g[7]++;for(;287>=a;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;T>a;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;S>b;b++)a.dyn_ltree[2*b]=0;for(b=0;T>b;b++)a.dyn_dtree[2*b]=0;for(b=0;U>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function t(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&s(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!s(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function u(a,b,c){var d,e,f,h,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],e=a.pending_buf[a.l_buf+k],k++,0===d?j(a,e,b):(f=ja[e],j(a,f+R+1,b),h=ba[f],0!==h&&(e-=ka[f],i(a,e,h)),d--,f=g(d),j(a,f,c),h=ca[f],0!==h&&(d-=la[f],i(a,d,h)));while(k<a.last_lit);j(a,Z,b)}function v(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=V,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):10>=h?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;c>=d;d++)if(e=g,g=b[2*(d+1)+1],!(++h<k&&e===g)){if(l>h){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):10>=h?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;d>e;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;R>b;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":28}],40:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}]},{},[10])(10)});
/** 
 * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2017 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.core.min",["jquery"],e)}(function(){return function(e,t,n){function i(){}function o(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+e+";$kendoOutput+="}function r(e,t,n){return e+="",t=t||2,n=t-e.length,n?U[t].substring(0,n)+e:e}function s(e){var t=e.css(ve.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Ae)||[0,0,0,0,0]:[0,0,0,0,0],i=xe.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function a(t,n){var i,o,r,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.show(),i=Te.test(c.width)||Te.test(c.height),i||l.css({width: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),i=s||a,!s&&(!n||n&&o)&&(o=u(t)),!a&&(!n||n&&r)&&(r=h(t)),t.wrap(e("<div/>").addClass("k-animation-container").css({width:o,height:r})),i&&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,n=arguments.length;for(t=1;t<n;t++)c(e,arguments[t]);return e}function c(e,t){var n,i,o,r,s,a=ve.data.ObservableArray,l=ve.data.LazyObservableArray,d=ve.data.DataSource,u=ve.data.HierarchicalDataSource;for(n in t)i=t[n],o=typeof i,r=o===Fe&&null!==i?i.constructor:null,r&&r!==Array&&r!==a&&r!==l&&r!==d&&r!==u&&r!==RegExp?i instanceof Date?e[n]=new Date(i.getTime()):I(i.clone)?e[n]=i.clone():(s=e[n],e[n]=typeof s===Fe?s||{}:{},c(e[n],i)):o!==Be&&(e[n]=i);return e}function d(e,t,i){for(var o in t)if(t.hasOwnProperty(o)&&t[o].test(e))return o;return i!==n?i: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 f(t,n){var i,o={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){o[t]=i.getPropertyValue(t)})):(i=t.currentStyle,n&&e.each(n,function(e,t){o[t]=i[h(t)]})),ve.size(o)||(o=i),o}function p(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=f(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function m(t,i){var o,r=Se.browser.webkit,s=Se.browser.mozilla,a=t instanceof e?t[0]:t;if(t)return o=Se.isRtl(t),i===n?o&&r?a.scrollWidth-a.clientWidth-a.scrollLeft:Math.abs(a.scrollLeft):(a.scrollLeft=o&&r?a.scrollWidth-a.clientWidth-i:o&&s?-i:i,n)}function g(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function v(e,n,i){var o,r,s;return n||(n="offset"),o=e[n](),r={top:o.top,right:o.right,bottom:o.bottom,left:o.left},Se.browser.msie&&(Se.pointers||Se.msPointers)&&!i&&(s=Se.isRtl(e)?1:-1,r.top-=t.pageYOffset+s*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,n,i){return typeof e===Re&&(I(t)&&(i=t,t=400,n=!1),I(n)&&(i=n,n=!1),typeof t===Pe&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),_e({effects:{},duration:400,reverse:!1,init:ke,teardown:ke,hide:!1},e,{completeCallback:e.complete,complete:ke})}function y(t,n,i,o,r){for(var s,a=0,l=t.length;a<l;a++)s=e(t[a]),s.queue(function(){j.promise(s,w(n,i,o,r))});return t}function k(e,t,n,i){return t&&(t=t.split(" "),be(t,function(t,n){e.toggleClass(n,i)})),e}function x(e){return(""+e).replace(q,"&amp;").replace(G,"&lt;").replace(K,"&gt;").replace($,"&quot;").replace(Y,"&#39;")}function C(e,t){var i;return 0===t.indexOf("data")&&(t=t.substring(4),t=t.charAt(0).toLowerCase()+t.substring(1)),t=t.replace(oe,"-$1"),i=e.getAttribute("data-"+ve.ns+t),null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:Ee.test(i)?i=parseFloat(i):ne.test(i)&&!ie.test(i)&&(i=Function("return ("+i+")")()),i}function S(t,i){var o,r,s={};for(o in i)r=C(t,o),r!==n&&(te.test(o)&&(r="string"==typeof r?ve.template(e("#"+r).html()):t.getAttribute(o)),s[o]=r);return s}function T(t,n){return e.contains(t,n)?-1:1}function D(){var t=e(this);return e.inArray(t.attr("data-"+ve.ns+"role"),["slider","rangeslider"])>-1||t.is(":visible")}function A(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&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 M(e,t){return new M.fn.init(e,t)}var R,I,F,z,P,B,L,H,N,O,V,U,W,j,q,G,$,Y,K,Q,X,Z,J,ee,te,ne,ie,oe,re,se,ae,le,ce,de,ue,he,fe,pe,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*$/,Me="function",Re="string",Ie="number",Fe="object",ze="null",Pe="boolean",Be="undefined",Le={},He={},Ne=[].slice;ve.version="2017.1.223".replace(/^\s+|\s+$/g,""),i.extend=function(e){var t,n,i=function(){},o=this,r=e&&e.init?e.init:function(){o.apply(this,arguments)};i.prototype=o.prototype,n=r.fn=r.prototype=new i;for(t in e)n[t]=null!=e[t]&&e[t].constructor===Object?_e(!0,{},i.prototype[t],e[t]):e[t];return n.constructor=r,r.extend=o.extend,r},i.prototype._initOptions=function(e){this.options=l({},this.options,e)},I=ve.isFunction=function(e){return"function"==typeof e},F=function(){this._defaultPrevented=!0},z=function(){return this._defaultPrevented===!0},P=i.extend({init:function(){this._events={}},bind:function(e,t,i){var o,r,s,a,l,c=this,d=typeof e===Re?[e]:e,u=typeof t===Me;if(t===n){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&&(i&&(s=a,a=function(){c.unbind(e,a),s.apply(c,arguments)},a.original=s),l=c._events[e]=c._events[e]||[],l.push(a));return c},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,o,r,s=this,a=typeof e===Re?[e]:e,l=typeof t===Me;for(n=0,i=a.length;n<i;n++)e=a[n],o=l?t:t[e],o&&(r=s._events[e]=s._events[e]||[],r.unshift(o));return s},trigger:function(e,t){var n,i,o=this,r=o._events[e];if(r){for(t=t||{},t.sender=o,t._defaultPrevented=!1,t.preventDefault=F,t.isDefaultPrevented=z,r=r.slice(),n=0,i=r.length;n<i;n++)r[n].call(o,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,o=this,r=o._events[e];if(e===n)o._events={};else if(r)if(t)for(i=r.length-1;i>=0;i--)r[i]!==t&&r[i].original!==t||r.splice(i,1);else o._events[e]=[];return o}}),B=/^\w+/,L=/\$\{([^}]*)\}/g,H=/\\\}/g,N=/__CURLY__/g,O=/\\#/g,V=/__SHARP__/g,U=["","0","00","000","0000"],R={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,o="";for(n=0,i=t.length;n<i;n++)o+=e(t[n]);return o},compile:function(e,t){var n,i,r,s=_e({},this,t),a=s.paramName,l=a.match(B)[0],c=s.useWithBlock,d="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(I(e))return e;for(d+=c?"with("+a+"){":"",d+="$kendoOutput=",i=e.replace(H,"__CURLY__").replace(L,"#=$kendoHtmlEncode($1)#").replace(N,"}").replace(O,"__SHARP__").split("#"),r=0;r<i.length;r++)d+=o(i[r],r%2===0);d+=c?";}":";",d+="return $kendoOutput;",d=d.replace(V,"#");try{return n=Function(l,d),n._slotCount=Math.floor(i.length/2),n}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===Re?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(r,s){var a,c,d,u,h,f,p=n,m=s[r];if(m&&typeof m===Fe&&typeof m.toJSON===Me&&(m=m.toJSON(r)),typeof o===Me&&(m=o.call(s,r,m)),f=typeof m,f===Re)return e(m);if(f===Ie)return isFinite(m)?m+"":ze;if(f===Pe||f===ze)return m+"";if(f===Fe){if(!m)return ze;if(n+=i,h=[],"[object Array]"===l.apply(m)){for(u=m.length,a=0;a<u;a++)h[a]=t(a,m)||ze;return d=0===h.length?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+p+"]":"["+h.join(",")+"]",n=p,d}if(o&&typeof o===Fe)for(u=o.length,a=0;a<u;a++)typeof o[a]===Re&&(c=o[a],d=t(c,m),d&&h.push(e(c)+(n?": ":":")+d));else for(c in m)Object.hasOwnProperty.call(m,c)&&(d=t(c,m),d&&h.push(e(c)+(n?": ":":")+d));return d=0===h.length?"{}":n?"{\n"+n+h.join(",\n"+n)+"\n"+p+"}":"{"+h.join(",")+"}",n=p,d}}var n,i,o,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==Me&&(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!==Me&&(Ce.stringify=function(e,r,s){var a;if(n="",i="",typeof s===Ie)for(a=0;a<s;a+=1)i+=" ";else typeof s===Re&&(i=s);if(o=r,r&&typeof r!==Me&&(typeof r!==Fe||typeof r.length!==Ie))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function t(e){if(e){if(e.numberFormat)return e;if(typeof e===Re){var t=ve.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function i(e){return e&&(e=t(e)),e||ve.cultures.current}function o(e,t,o){o=i(o);var s=o.calendars.standard,a=s.days,l=s.months;return t=s.patterns[t]||t,t.replace(d,function(t){var i,o,c;return"d"===t?o=e.getDate():"dd"===t?o=r(e.getDate()):"ddd"===t?o=a.namesAbbr[e.getDay()]:"dddd"===t?o=a.names[e.getDay()]:"M"===t?o=e.getMonth()+1:"MM"===t?o=r(e.getMonth()+1):"MMM"===t?o=l.namesAbbr[e.getMonth()]:"MMMM"===t?o=l.names[e.getMonth()]:"yy"===t?o=r(e.getFullYear()%100):"yyyy"===t?o=r(e.getFullYear(),4):"h"===t?o=e.getHours()%12||12:"hh"===t?o=r(e.getHours()%12||12):"H"===t?o=e.getHours():"HH"===t?o=r(e.getHours()):"m"===t?o=e.getMinutes():"mm"===t?o=r(e.getMinutes()):"s"===t?o=e.getSeconds():"ss"===t?o=r(e.getSeconds()):"f"===t?o=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?(i=e.getTimezoneOffset(),c=i<0,o=(""+xe.abs(i/60)).split(".")[0],i=xe.abs(i)-60*o,o=(c?"+":"-")+r(o),o+=":"+r(i)):"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!==n?o:t.slice(1,t.length-1)})}function s(e,t,o){o=i(o);var r,s,c,d,w,y,k,x,C,S,T,D,A,E,M,R,I,F,z,P,B,L,H,N=o.numberFormat,O=N[m],V=N.decimals,U=N.pattern[0],W=[],j=e<0,q=p,G=p,$=-1;if(e===n)return p;if(!isFinite(e))return e;if(!t)return o.name.length?e.toLocaleString():""+e;if(w=u.exec(t)){if(t=w[1].toLowerCase(),s="c"===t,c="p"===t,(s||c)&&(N=s?N.currency:N.percent,O=N[m],V=N.decimals,r=N.symbol,U=N.pattern[j?0:1]),d=w[2],d&&(V=+d),"e"===t)return d?e.toExponential(V):e.toExponential();if(c&&(e*=100),e=l(e,V),j=e<0,e=e.split(m),y=e[0],k=e[1],j&&(y=y.substring(1)),G=a(y,0,y.length,N),k&&(G+=O+k),"n"===t&&!j)return G;for(e=p,S=0,T=U.length;S<T;S++)D=U.charAt(S),e+="n"===D?G:"$"===D||"%"===D?r:D;return e}if(j&&(e=-e),(t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(h,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return W.push(n),b})),t=t.split(";"),j&&t[1])t=t[1],E=!0;else if(0===e){if(t=t[2]||t[0],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(P=t.indexOf("%"),B=t.indexOf("$"),c=P!=-1,s=B!=-1,c&&(e*=100),s&&"\\"===t[B-1]&&(t=t.split("\\").join(""),s=!1),(s||c)&&(N=s?N.currency:N.percent,O=N[m],V=N.decimals,r=N.symbol),A=t.indexOf(g)>-1,A&&(t=t.replace(f,p)),M=t.indexOf(m),T=t.length,M!=-1?(k=(""+e).split("e"),k=k[1]?l(e,Math.abs(k[1])):k[0],k=k.split(m)[1]||p,I=t.lastIndexOf(_)-M,R=t.lastIndexOf(v)-M,F=I>-1,z=R>-1,S=k.length,F||z||(t=t.substring(0,M)+t.substring(M+1),T=t.length,M=-1,S=0),F&&I>R?S=I:R>I&&(z&&S>R?S=R:F&&S<I&&(S=I)),S>-1&&(e=l(e,S))):e=l(e),R=t.indexOf(v),L=I=t.indexOf(_),$=R==-1&&I!=-1?I:R!=-1&&I==-1?R:R>I?I:R,R=t.lastIndexOf(v),I=t.lastIndexOf(_),H=R==-1&&I!=-1?I:R!=-1&&I==-1?R:R>I?R:I,$==T&&(H=$),$!=-1){for(G=(""+e).split(m),y=G[0],k=G[1]||p,x=y.length,C=k.length,j&&e*-1>=0&&(j=!1),e=t.substring(0,$),j&&!E&&(e+="-"),S=$;S<T;S++){if(D=t.charAt(S),M==-1){if(H-S<x){e+=y;break}}else if(I!=-1&&I<S&&(q=p),M-S<=x&&M-S>-1&&(e+=y,S=M),M===S){e+=(k?O:p)+k,S+=H-M+1;continue}D===_?(e+=D,q=D):D===v&&(e+=q)}if(A&&(e=a(e,$+(j&&!E?1:0),Math.max(H,x+$),N)),H>=$&&(e+=t.substring(H+1)),s||c){for(G=p,S=0,T=e.length;S<T;S++)D=e.charAt(S),G+="$"===D||"%"===D?r:D;e=G}if(T=W.length)for(S=0;S<T;S++)e=e.replace(b,W[S])}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,f=/\,/g,p="",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 i,o=ve.cultures;return e===n?o.current:(i=t(e)||o[w],i.calendar=i.calendars.standard,o.current=i,n)},ve.findCulture=t,ve.getCulture=i,ve.culture(w),a=function(e,t,i,o){var r,s,a,l,c,d,u=e.indexOf(o[m]),h=o.groupSize.slice(),f=h.shift();if(i=u!==-1?u:i+1,r=e.substring(t,i),s=r.length,s>=f){for(a=s,l=[];a>-1;)if(c=r.substring(a-f,a),c&&l.push(c),a-=f,d=h.shift(),f=d!==n?d:f,0===f){l.push(r.substring(0,a));break}r=l.reverse().join(o[g]),e=e.substring(0,t)+r+e.substring(i)}return e},l=function(e,t){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},c=function(e,t,i){if(t){if("[object Date]"===y.call(e))return o(e,t,i);if(typeof e===Ie)return s(e,t,i)}return e!==n?e:""},ve.format=function(e){var t=arguments;return e.replace(De,function(e,n,i){var o=t[parseInt(n,10)+1];return c(o,i?i.substring(1):"")})},ve._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ve._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ve._round=l,ve._outerWidth=function(t,n){return e(t).outerWidth(n||!1)||0},ve._outerHeight=function(t,n){return e(t).outerHeight(n||!1)||0},ve.toString=c}(),function(){function t(e,t,n){return!(e>=t&&e<=n)}function i(e){return e.charAt(0)}function o(t){return e.map(t,i)}function r(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function s(e){for(var t=0,n=e.length,i=[];t<n;t++)i[t]=(e[t]+"").toLowerCase();return i}function a(e){var t,n={};for(t in e)n[t]=s(e[t]);return n}function l(e,i,s){if(!e)return null;var l,c,d,u,h,m,g,v,_,w,y,k,x,C=function(e){for(var t=0;i[B]===e;)t++,B++;return t>0&&(B-=1),t},S=function(t){var n=b[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(L,t).match(n);return i?(i=i[0],L+=i.length,parseInt(i,10)):null},T=function(t,n){for(var i,o,r,s=0,a=t.length,l=0,c=0;s<a;s++)i=t[s],o=i.length,r=e.substr(L,o),n&&(r=r.toLowerCase()),r==i&&o>l&&(l=o,c=s);return l?(L+=l,c+1):null},D=function(){var t=!1;return e.charAt(L)===i[B]&&(L++,t=!0),t},A=s.calendars.standard,E=null,M=null,R=null,I=null,F=null,z=null,P=null,B=0,L=0,H=!1,N=new Date,O=A.twoDigitYearMax||2029,V=N.getFullYear();for(i||(i="d"),u=A.patterns[i],u&&(i=u),i=i.split(""),d=i.length;B<d;B++)if(l=i[B],H)"'"===l?H=!1:D();else if("d"===l){if(c=C("d"),A._lowerDays||(A._lowerDays=a(A.days)),null!==R&&c>2)continue;if(R=c<3?S(2):T(A._lowerDays[3==c?"namesAbbr":"names"],!0),null===R||t(R,1,31))return null}else if("M"===l){if(c=C("M"),A._lowerMonths||(A._lowerMonths=a(A.months)),M=c<3?S(2):T(A._lowerMonths[3==c?"namesAbbr":"names"],!0),null===M||t(M,1,12))return null;M-=1}else if("y"===l){if(c=C("y"),E=S(c),null===E)return null;2==c&&("string"==typeof O&&(O=V+parseInt(O,10)),E=V-V%100+E,E>O&&(E-=100))}else if("h"===l){if(C("h"),I=S(2),12==I&&(I=0),null===I||t(I,0,11))return null}else if("H"===l){if(C("H"),I=S(2),null===I||t(I,0,23))return null}else if("m"===l){if(C("m"),F=S(2),null===F||t(F,0,59))return null}else if("s"===l){if(C("s"),z=S(2),null===z||t(z,0,59))return null}else if("f"===l){if(c=C("f"),x=e.substr(L,c).match(b[3]),P=S(c),null!==P&&(P=parseFloat("0."+x[0],10),P=ve._round(P,3),P*=1e3),null===P||t(P,0,999))return null}else if("t"===l){if(c=C("t"),v=A.AM,_=A.PM,1===c&&(v=o(v),_=o(_)),h=T(_),!h&&!T(v))return null}else if("z"===l){if(m=!0,c=C("z"),"Z"===e.substr(L,1)){D();continue}if(g=e.substr(L,6).match(c>2?p:f),!g)return null;if(g=g[0].split(":"),w=g[0],y=g[1],!y&&w.length>3&&(L=w.length-2,y=w.substring(L),w=w.substring(0,L)),w=parseInt(w,10),t(w,-12,13))return null;if(c>2&&(y=parseInt(y,10),isNaN(y)||t(y,0,59)))return null}else if("'"===l)H=!0,D();else if(!D())return null;return k=null!==I||null!==F||z||null,null===E&&null===M&&null===R&&k?(E=V,M=N.getMonth(),R=N.getDate()):(null===E&&(E=V),null===R&&(R=1)),h&&I<12&&(I+=12),m?(w&&(I+=-w),y&&(F+=-y),e=new Date(Date.UTC(E,M,R,I,F,z,P))):(e=new Date(E,M,R,I,F,z,P),r(e,I)),E<100&&e.setFullYear(E),e.getDate()!==R&&m===n?null:e}function c(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),e=60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10),t*e}function d(e){var t,n,i,o=xe.max(v.length,_.length),r=e.calendar.patterns,s=[];for(i=0;i<o;i++){for(t=v[i],n=0;n<t.length;n++)s.push(r[t[n]]);s=s.concat(_[i])}return s}var u=/\u00A0/g,h=/[eE][\-+]?[0-9]+/,f=/[+|\-]\d{1,2}/,p=/[+|\-]\d{1,2}:?\d{2}/,m=/^\/Date\((.*?)\)\/$/,g=/[+-]\d*/,v=[[],["G","g","F"],["D","d","y","m","T","t"]],_=[["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"]],b={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},w={}.toString;ve.parseDate=function(e,t,n){var i,o,r,s;if("[object Date]"===w.call(e))return e;if(i=0,o=null,e&&0===e.indexOf("/D")&&(o=m.exec(e)))return o=o[1],s=g.exec(o.substring(1)),o=new Date(parseInt(o,10)),s&&(s=c(s[0]),o=ve.timezone.apply(o,0),o=ve.timezone.convert(o,0,-1*s)),o;for(n=ve.getCulture(n),t||(t=d(n)),t=we(t)?t:[t],r=t.length;i<r;i++)if(o=l(e,t[i],n))return o;return o},ve.parseInt=function(e,t){var n=ve.parseFloat(e,t);return n&&(n=0|n),n},ve.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Ie)return e;e=""+e,t=ve.getCulture(t);var i,o,r=t.numberFormat,s=r.percent,a=r.currency,l=a.symbol,c=s.symbol,d=e.indexOf("-");return h.test(e)?(e=parseFloat(e.replace(r["."],".")),isNaN(e)&&(e=null),e):d>0?null:(d=d>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(r=a,i=r.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),d=!0)):e.indexOf(c)>-1&&(o=!0,r=s,l=c),e=e.replace("-","").replace(l,"").replace(u," ").split(r[","].replace(u," ")).join("").replace(r["."],"."),e=parseFloat(e),isNaN(e)?e=null:d&&(e*=-1),e&&o&&(e/=100),e)}}(),function(){var i,o,r,s,a,l,c,u,h;Se._scrollbar=n,Se.scrollbar=function(e){if(isNaN(Se._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML="&nbsp;",document.body.appendChild(n),Se._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return Se._scrollbar},Se.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="<tr><td></td></tr>",Se.tbodyInnerHtml=!0}catch(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,n=typeof i.style[t+"Transition"]===Re;if(n||typeof i.style[t+"Transform"]===Re)return e=t.toLowerCase(),s={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},n&&(r=s,r.event=r.event?r.event+"TransitionEnd":"transitionend"),!1}),i=null,Se.transforms=s,Se.transitions=r,Se.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{Se.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,Se.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(f){Se.screenWidth=t.screen.availWidth,Se.screenHeight=t.screen.availHeight}Se.detectOS=function(e){var n,i,o=!1,r=[],s=!/mobile safari/i.test(e),a={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},l={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},c={tablet:/playbook|ipad|fire/i},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(i in a)if(a.hasOwnProperty(i)&&(r=e.match(a[i]))){if("windows"==i&&"plugins"in navigator)return!1;o={},o.device=i,o.tablet=d(i,c,!1),o.browser=d(e,u,"default"),o.name=d(i,l),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=r[3].replace("_","."),n=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+n+Array(3-(n.length<3?n.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=i);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,n=!1,i=[],o={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in o)if(o.hasOwnProperty(t)&&(i=e.match(o[t]))){n={},n[t]=!0,n[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},Se.browser=Se.detectBrowser(navigator.userAgent),Se.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),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,n,i;try{return e=Se.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!Se.touch&&(n=Se.scrollbar()),Se.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(o){return 1}},Se.cssBorderSpacing=n!==o.borderSpacing&&!(Se.browser.msie&&Se.browser.version<8),function(t){var n="",i=e(document.documentElement),o=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera?n="opera":t.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+o),Se.mobileOS&&(n+=" k-mobile"),Se.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(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"],n=t.length,i="test",o={},r=0;r<n;r++)e=t[r],c.setAttribute("type",e),c.value=i,o[e.replace("-","")]="text"!==c.type&&c.value!==i;return o}(),c.style.cssText="float:left;",Se.cssFloat=!!c.style.cssFloat,c=null,Se.stableSort=function(){var e,t=513,n=[{index:0,field:"b"}];for(e=1;e<t;e++)n.push({index:e,field:"a"});return n.sort(function(e,t){return e.field>t.field?1:e.field<t.field?-1:0}),1===n[0].index}(),Se.matchesSelector=a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.matchesSelector||a.matches||function(t){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),i=n.length;i--;)if(n[i]==this)return!0;return!1},Se.pushState=t.history&&t.history.pushState,u=document.documentMode,Se.hashChange="onhashchange"in t&&!(Se.browser.msie&&(!u||u<=8)),Se.customElements="registerElement"in t.document,h=Se.browser.chrome,Se.msPointers=!h&&t.MSPointerEvent,Se.pointers=!h&&t.PointerEvent,Se.kineticScrollNeeded=l&&(Se.touch||Se.msPointers||Se.pointers)}(),W={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},j={},e.extend(j,{enabled:!0,Element:function(t){this.element=e(t)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),j.promiseShim=j.promise,"kendoAnimate"in e.fn||_e(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return y(this,e,t,n,i)},kendoAddClass:function(e,t){return ve.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return ve.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return ve.toggleClass(this,e,t,n)}}),q=/&/g,G=/</g,$=/"/g,Y=/'/g,K=/>/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,n){e.fn[n]=function(e){return this.bind(n,e)}})),Se.touch?Se.mobileOS?(Se.mousedown="touchstart",Se.mouseup="touchend",Se.mousemove="touchmove",Se.mousecancel="touchcancel",Se.click="touchend",Se.resize="orientationchange"):(Se.mousedown="mousedown touchstart",Se.mouseup="mouseup touchend",Se.mousemove="mousemove touchmove",Se.mousecancel="mouseleave touchcancel",Se.click="click",Se.resize="resize"):Se.pointers?(Se.mousemove="pointermove",Se.mousedown="pointerdown",Se.mouseup="pointerup",Se.mousecancel="pointercancel",Se.click="pointerup",Se.resize="orientationchange resize"):Se.msPointers?(Se.mousemove="MSPointerMove",Se.mousedown="MSPointerDown",Se.mouseup="MSPointerUp",Se.mousecancel="MSPointerCancel",Se.click="MSPointerUp",Se.resize="orientationchange resize"):(Se.mousemove="mousemove",Se.mousedown="mousedown",Se.mouseup="mouseup",Se.mousecancel="mouseleave",Se.click="click",Se.resize="resize"),X=function(e,t){var n,i,o,r,s=t||"d",a=1;for(i=0,o=e.length;i<o;i++)r=e[i],""!==r&&(n=r.indexOf("["),0!==n&&(n==-1?r="."+r:(a++,r="."+r.substring(0,n)+" || {})"+r.substring(n))),a++,s+=r+(i<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||j,mobile:ve.mobile||{},data:ve.data||{},dataviz:ve.dataviz||{},drawing:ve.drawing||{},spreadsheet:{messages:{}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:ve.support||Se,animate:ve.animate||y,ns:"",attr:function(e){return"data-"+ve.ns+e},getShadows:s,wrap:a,deepExtend:l,getComputedStyles:f,webComponents:ve.webComponents||[],isScrollable:p,scrollLeft:m,size:g,toCamelCase:h,toHyphens:u,getOffset:ve.getOffset||v,parseEffects:ve.parseEffects||_,toggleClass:ve.toggleClass||k,directions:ve.directions||W,Observable:P,Class:i,Template:R,template:ye(R.compile,R),render:ye(R.render,R),stringify:ye(Ce.stringify,Ce),eventTarget:Q,htmlEncode:x,isLocalUrl:function(e){return e&&!Z.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Re&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),t?(e=e.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),e=e.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),e=X(e.split("."),n),e=e.replace(/_\$DOT\$_/g,".")):e=n+e,e},getter:function(e,t){var n=e+t;return Le[n]=Le[n]||Function("d","return "+ve.expr(e,t))},setter:function(e){return 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,n="";for(e=0;e<32;e++)t=16*xe.random()|0,8!=e&&12!=e&&16!=e&&20!=e||(n+="-"),n+=(12==e?4:16==e?3&t|8:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+ve.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(e){var t,n=e.split(" ");if(n)for(t=0;t<n.length;t++)"view"!=n[t]&&(n[t]=n[t].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return n.join(" ").replace(/(\S+)/g,"kendo-mobile-$1,").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},onWidgetRegistered:function(e){for(var t=0,n=ve.widgets.length;t<n;t++)e(ve.widgets[t]);ve._widgetRegisteredCallbacks.push(e)},logToConsole:function(e,i){var o=t.console;!ve.suppressLog&&n!==o&&o.log&&o[i||"log"](e)}}),J=P.extend({init:function(e,t){var n,i=this;i.element=ve.jQuery(e).handler(i),i.angular("init",t),
P.fn.init.call(i),n=t?t.dataSource:null,n&&(t=_e({},t,{dataSource:{}})),t=i.options=_e(!0,{},i.options,t),n&&(t.dataSource=n),i.element.attr(ve.attr("role"))||i.element.attr(ve.attr("role"),(t.name||"").toLowerCase()),i.element.data("kendo"+t.prefix+t.name,i),i.bind(i.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",i=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(i)?0:i)},setOptions:function(t){this._setEvents(t),e.extend(this.options,t)},_setEvents:function(e){for(var t,n=this,i=0,o=n.events.length;i<o;i++)t=n.events[i],n.options[t]&&e[t]&&n.unbind(t,n.options[t]);n.bind(n.events,e)},resize:function(e){var t=this.getSize(),n=this._size;(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},getSize:function(){return ve.dimensions(this.element)},size:function(e){return e?(this.setSize(e),n):this.getSize()},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(e){this._muteRebind=!0,e.call(this),this._muteRebind=!1}}),ee=J.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(t){var n=this;n.angular(t,function(){return{elements:n.items(),data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})}}),ve.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ve.notify=ke,te=/template$/i,ne=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ie=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/,oe=/([A-Z])/g,ve.initWidget=function(i,o,r){var s,a,l,c,d,u,h,f,p,m,g,v,_;if(r?r.roles&&(r=r.roles):r=ve.ui.roles,i=i.nodeType?i:i[0],u=i.getAttribute("data-"+ve.ns+"role")){p=u.indexOf(".")===-1,l=p?r[u]:ve.getter(u)(t),g=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",m=p?RegExp("^kendo.*"+u+"$","i"):RegExp("^"+v+"$","i");for(_ in g)if(_.match(m)){if(_!==v)return g[_];s=g[_]}if(l){for(f=C(i,"dataSource"),o=e.extend({},S(i,l.fn.options),o),f&&(o.dataSource=typeof f===Re?ve.getter(f)(t):f),c=0,d=l.fn.events.length;c<d;c++)a=l.fn.events[c],h=C(i,a),h!==n&&(o[a]=ve.getter(h)(t));return s?e.isEmptyObject(o)||s.setOptions(o):s=new l(i,o),s}}},ve.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[ve.ui,ve.dataviz.ui]),t=0,n=e.length;t<n;t++)i[t]=e[t].roles;return _e.apply(null,[{}].concat(i.reverse()))},ve.init=function(t){var n=ve.rolesFromNamespaces(Ne.call(arguments,1));e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){ve.initWidget(this,{},n)})},ve.destroy=function(t){e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){var t,n=e(this).data();for(t in n)0===t.indexOf("kendo")&&typeof n[t].destroy===Me&&n[t].destroy()})},ve.resize=function(t,n){var i,o=e(t).find("[data-"+ve.ns+"role]").addBack().filter(D);o.length&&(i=e.makeArray(o),i.sort(T),e.each(i,function(){var t=ve.widgetInstance(e(this));t&&t.resize(n)}))},ve.parseOptions=S,_e(ve.ui,{Widget:J,DataBoundWidget:ee,roles:{},progress:function(t,n){var i,o,r,s,a=t.find(".k-loading-mask"),l=ve.support,c=l.browser;n?a.length||(i=l.isRtl(t),o=i?"right":"left",s=t.scrollLeft(),r=c.webkit&&i?t[0].scrollWidth-t.width()-2*s:0,a=e("<div class='k-loading-mask'><span class='k-loading-text'>"+ve.ui.progress.messages.loading+"</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top",t.scrollTop()).css(o,Math.abs(s)+r).prependTo(t)):a&&a.remove()},plugin:function(t,i,o){var r,s,a,l,c=t.fn.options.name;for(i=i||ve.ui,o=o||"",i[c]=t,i.roles[c.toLowerCase()]=t,r="getKendo"+o+c,c="kendo"+o+c,s={name:c,widget:t,prefix:o||""},ve.widgets.push(s),a=0,l=ve._widgetRegisteredCallbacks.length;a<l;a++)ve._widgetRegisteredCallbacks[a](s);e.fn[c]=function(i){var o,r=this;return typeof i===Re?(o=Ne.call(arguments,1),this.each(function(){var t,s,a=e.data(this,c);if(!a)throw Error(ve.format("Cannot call method '{0}' of {1} before it is initialized",i,c));if(t=a[i],typeof t!==Me)throw Error(ve.format("Cannot find method '{0}' of {1}",i,c));if(s=t.apply(a,o),s!==n)return r=s,!1})):this.each(function(){return new t(this,i)}),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,n){return n||(n={}),n.useNative=!0,e(t).map(function(t,i){return i=e(i),!(!Se.kineticScrollNeeded||!ve.mobile.ui.Scroller||i.data("kendoMobileScroller"))&&(i.kendoMobileScroller(n),i.data("kendoMobileScroller"))})[0]},ve.preventDefault=function(e){e.preventDefault()},ve.widgetInstance=function(e,n){var i,o,r,s,a=e.data(ve.ns+"role"),l=[];if(a){if("content"===a&&(a="scroller"),n)if(n[0])for(i=0,o=n.length;i<o;i++)l.push(n[i].roles[a]);else l.push(n.roles[a]);else l=[ve.ui.roles[a],ve.dataviz.ui.roles[a],ve.mobile.ui.roles[a]];for(a.indexOf(".")>=0&&(l=[ve.getter(a)(t)]),i=0,o=l.length;i<o;i++)if(r=l[i],r&&(s=e.data("kendo"+r.fn.options.prefix+r.fn.options.name)))return s}},ve.onResize=function(n){var i=n;return Se.mobileOS.android&&(i=function(){setTimeout(n,600)}),e(t).on(Se.resize,i),i},ve.unbindResize=function(n){e(t).off(Se.resize,n)},ve.attrValue=function(e,t){return e.data(ve.ns+t)},ve.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return A(t,!isNaN(n)&&n>-1)}}),ae=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],le="label, input, [data-rel=external]",ce={setupMouseMute:function(){var t,n=0,i=ae.length,o=document.documentElement;if(!ce.mouseTrap&&Se.eventCapture)for(ce.mouseTrap=!0,ce.bustClick=!1,ce.captureMouse=!1,t=function(t){ce.captureMouse&&("click"===t.type?ce.bustClick&&!e(t.target).is(le)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};n<i;n++)o.addEventListener(ae[n],t,!0)},muteMouse:function(e){ce.captureMouse=!0,e.data.bustClick&&(ce.bustClick=!0),clearTimeout(ce.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(ce.mouseTrapTimeoutID),ce.mouseTrapTimeoutID=setTimeout(function(){ce.captureMouse=!1,ce.bustClick=!1},400)}},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,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,o=this,r=t.relatedTarget,s=t.handleObj;return r&&(r===o||e.contains(o,r))||(t.type=s.origType,i=s.handler.apply(this,arguments),t.type=n),i}}}),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},fe=e.fn.on,_e(!0,M,e),M.fn=M.prototype=new e,M.fn.constructor=M,M.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof M)&&(n=M(n)),e.fn.init.call(this,t,n,pe)},M.fn.init.prototype=M.fn,pe=M(document),_e(M.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||ve.guid()),this},on:function(){var e,t,n,i,o,r,s=this,a=s.data("kendoNS");return 1===arguments.length?fe.call(s,arguments[0]):(e=s,t=Ne.call(arguments),typeof t[t.length-1]===Be&&t.pop(),n=t[t.length-1],i=ve.applyEventMap(t[0],a),Se.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(ce.setupMouseMute(),o=2===t.length?null:t[1],r=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,fe.call(this,{touchstart:ce.muteMouse,touchend:ce.unMuteMouse},o,{bustClick:r})),typeof n===Re&&(e=s.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,fe.apply(s,t),s)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ve.jQuery=M,ve.eventMap=de,ve.timezone=function(){function e(e,t){var n,i,o,r=t[3],s=t[4],a=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(s)?0===s.indexOf("last")?(n=new Date(Date.UTC(e,d[r]+1,1,a[0]-24,a[1],a[2],0)),i=u[s.substr(4,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o-(i>o?7:0))):s.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,d[r],s.substr(5),a[0],a[1],a[2],0)),i=u[s.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o+(i<o?7:0))):n=new Date(Date.UTC(e,d[r],s,a[0],a[1],a[2],0)),l[e]=n)}function t(t,n,i){var o,r,s,a;return(n=n[i])?(s=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return t<=s&&(n>=s||t==s&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(s,t)),"number"!=typeof n&&(n=+e(s,n)),t-n}),a=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(a)?a:null):(o=i.split(":"),r=0,o.length>1&&(r=60*o[0]+ +o[1]),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"])}function n(e,t,n){var i,o,r,s=t[n];if("string"==typeof s&&(s=t[s]),!s)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=s.length-1;i>=0&&(o=s[i][3],!(o&&e>o));i--);if(r=s[i+1],!r)throw Error('Timezone "'+n+'" not found on '+e+".");return r}function i(e,i,o,r){typeof e!=Ie&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var s=n(e,i,r);return{zone:s,rule:t(e,o,s[1])}}function o(e,t){var n,o,r;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),o=n.zone,r=n.rule,ve.parseFloat(r?o[0]-r[6]:o[0]))}function r(e,t){var n=i(e,this.zones,this.rules,t),o=n.zone,r=n.rule,s=o[2];return s.indexOf("/")>=0?s.split("/")[r&&+r[6]?1:0]:s.indexOf("%s")>=0?s.replace("%s",r&&"-"!=r[7]?r[7]:""):s}function s(e,t,n){var i,o;return typeof t==Re&&(t=this.offset(e,t)),typeof n==Re&&(n=this.offset(e,n)),i=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),o=e.getTimezoneOffset(),new Date(e.getTime()+6e4*(o-i))}function a(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}function c(e){return this.apply(new Date(e),"Etc/UTC")}var 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,n,i){var o=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,o)}function i(e,n,i){return e=new Date(e),t(e,n,i),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),n=o(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t}function s(i,o){var r,s;return i=new Date(i.getFullYear(),i.getMonth(),i.getDate()),e(i,0),r=i.getFullYear(),o!==n?(t(i,o,-1),i.setDate(i.getDate()+4)):i.setDate(i.getDate()+(4-(i.getDay()||7))),e(i,0),s=Math.floor((i.getTime()-new Date(r,0,1,(-6)))/864e5),1+Math.floor(s/7)}function a(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function l(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function c(e){return e.getTime()-a(e)}function d(e,t,n){var i,o=c(t),r=c(n);return!e||o==r||(t>=n&&(n+=b),i=c(e),o>i&&(i+=b),r<o&&(r+=b),i>=o&&i<=r)}function u(e,t,n){var i,o=t.getTime(),r=n.getTime();return o>=r&&(r+=b),i=e.getTime(),i>=o&&i<=r}function h(t,n){var i=t.getHours();return t=new Date(t),f(t,n*b),e(t,i),t}function f(e,t,n){var i,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-o,e.setTime(e.getTime()+i*_))}function p(t,n){return t=new Date(ve.date.getDate(t).getTime()+ve.date.getMilliseconds(n)),e(t,n.getHours()),t}function m(){return a(new Date)}function g(e){return a(e).getTime()==m().getTime()}function v(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 _=6e4,b=864e5;return{adjustDST:e,dayOfWeek:i,setDayOfWeek:t,getDate:a,isInDateRange:u,isInTimeRange:d,isToday:g,nextDay:function(e){return h(e,1)},previousDay:function(e){return h(e,-1)},toUtcTime:l,MS_PER_DAY:b,MS_PER_HOUR:60*_,MS_PER_MINUTE:_,setTime:f,setHours:p,addDays:h,today:m,toInvariantTime:v,firstDayOfMonth:o,lastDayOfMonth:r,weekInYear:s,getMilliseconds:c}}(),ve.stripWhitespace=function(e){var t,n,i;if(document.createNodeIterator)for(t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(n=0;n<e.childNodes.length;n++)i=e.childNodes[n],3!=i.nodeType||/\S/.test(i.nodeValue)||(e.removeChild(i),n--),1==i.nodeType&&ve.stripWhitespace(i)},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]||"",n={},i=t.split(/&|=/),o=i.length,r=0;r<o;r+=2)""!==i[r]&&(n[decodeURIComponent(i[r])]=decodeURIComponent(i[r+1]));return n},ve.elementUnderCursor=function(e){if(n!==e.x.client)return document.elementFromPoint(e.x.client,e.y.client)},ve.wheelDeltaY=function(e){var t,i=e.originalEvent,o=i.wheelDeltaY;return i.wheelDelta?(o===n||o)&&(t=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(t=10*-i.detail),t},ve.throttle=function(e,t){var i,o,r=0;return!t||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?(i&&clearTimeout(i),a>t?o():i=setTimeout(o,t-a),n):o()},o.cancel=function(){clearTimeout(i)},o)},ve.caret=function(t,i,o){var r,s,a,l,c=i!==n;if(o===n&&(o=i),t[0]&&(t=t[0]),!c||!t.disabled){try{t.selectionStart!==n?c?(t.focus(),t.setSelectionRange(i,o)):i=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),r=t.createTextRange(),c?(r.collapse(!0),r.moveStart("character",i),r.moveEnd("character",o-i),r.select()):(s=r.duplicate(),r.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",r),a=s.text.length,l=a+r.text.length,i=[a,l]))}catch(d){i=[]}return i}},ve.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+ve.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(e).injector().invoke(["$compile",function(t){t(e)(n),/^\$(digest|apply)$/.test(n.$$phase)||n.$digest()}]),ve.widgetInstance(e,ve.mobile.ui)},ve.antiForgeryTokens=function(){var t={},i=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),o=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),o!==n&&i!==n&&(t[o]=i),t},ve.cycleForm=function(e){function t(e){var t=ve.widgetInstance(e);t&&t.focus?t.focus():e.focus()}var n=e.find("input, .k-widget").first(),i=e.find("button, .k-button").last();i.on("keydown",function(e){e.keyCode!=ve.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==ve.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},function(){function n(t,n,i,o){var r,s,a=e("<form>").attr({action:i,method:"POST",target:o}),l=ve.antiForgeryTokens();l.fileName=n,r=t.split(";base64,"),l.contentType=r[0].replace("data:",""),l.base64=r[1];for(s in l)l.hasOwnProperty(s)&&e("<input>").attr({value:l[s],name:s,type:"hidden"}).appendTo(a);a.appendTo("body").submit().remove()}function i(e,t){var n,i,o,r,s,a=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],o=atob(n[1]),r=new Uint8Array(o.length),s=0;s<o.length;s++)r[s]=o.charCodeAt(s);a=new Blob([r.buffer],{type:i})}navigator.msSaveBlob(a,t)}function o(e,n){t.Blob&&e instanceof Blob&&(e=URL.createObjectURL(e)),r.download=n,r.href=e;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(i),setTimeout(function(){URL.revokeObjectURL(e)})}var r=document.createElement("a"),s="download"in r&&!ve.support.browser.edge;ve.saveAs=function(e){var t=n;e.forceProxy||(s?t=o:navigator.msSaveBlob&&(t=i)),t(e.dataURI,e.fileName,e.proxyURL,e.proxyTarget)}}(),ve.proxyModelSetters=function(e){var t={};return Object.keys(e||{}).forEach(function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t,e.dirty=!0}})}),t}}(jQuery,window),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.router.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t){if(!t)return e;e+"/"===t&&(e=t);var n=RegExp("^"+t,"i");return n.test(e)||(e=t+"/"+e),f.protocol+"//"+(f.host+"/"+e).replace(/\/\/+/g,"/")}function i(e){return e?"#!":"#"}function o(e){var t=f.href;return"#!"===e&&t.indexOf("#")>-1&&t.indexOf("#!")<0?null:t.split(e)[1]||""}function r(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):t}function s(e){return e.replace(/^(#)?/,"#")}function a(e){return e.replace(/^(#(!)?)?/,"#!")}var l=window.kendo,c="change",d="back",u="same",h=l.support,f=window.location,p=window.history,m=50,g=l.support.browser.msie,v=/^#*/,_=window.document,b=l.Class.extend({back:function(){g?setTimeout(function(){p.back()}):p.back()},forward:function(){g?setTimeout(function(){p.forward()}):p.forward()},length:function(){return p.length},replaceLocation:function(e){f.replace(e)}}),w=b.extend({init:function(e){this.root=e},navigate:function(e){p.pushState({},_.title,n(e,this.root))},replace:function(e){p.replaceState({},_.title,n(e,this.root))},normalize:function(e){return r(this.root,e)},current:function(){var e=f.pathname;return f.search&&(e+=f.search),r(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,r=e.root,s=f.pathname,a=o(i(e.hashBang));r===s+"/"&&(t=r),r===s&&a&&(t=n(a.replace(v,""),r)),t&&p.pushState({},_.title,t)}}),y=b.extend({init:function(e){this._id=l.guid(),this.prefix=i(e),this.fix=e?a:s},navigate:function(e){f.hash=this.fix(e)},replace:function(e){this.replaceLocation(this.fix(e))},normalize:function(e){return e.indexOf(this.prefix)<0?e:e.split(this.prefix)[1]},change:function(t){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=f.pathname,n=e.root;return!(!e.pushState||n===t)&&(this.replaceLocation(n+this.prefix+r(n,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 n,i=this.createAdapter(t);i.normalizeCurrent(t)||(n=i.current(),e.extend(this,{adapter:i,root:t.root,historyLength:i.length(),current:n,locations:[n]}),i.change(e.proxy(this,"_checkUrl")))}},createAdapter:function(e){return 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,n){return"#:back"===e?(this.backCalled=!0,this.adapter.back(),t):(this._navigate(e,n,function(t){t.navigate(e),this.locations.push(this.current)}),t)},_navigate:function(e,n,i){var o=this.adapter;return e=o.normalize(e),this.current===e||this.current===decodeURIComponent(e)?(this.trigger(u),t):(!n&&this.trigger(c,{url:e,decode:!1})||(this.current=e,i.call(this,o),this.historyLength=o.length()),t)},_checkUrl:function(){var e=this.adapter,n=e.current(),i=e.length(),o=this.historyLength===i,r=n===this.locations[this.locations.length-2]&&o,s=this.backCalled,a=this.current;return null===n||this.current===n||this.current===decodeURIComponent(n)||(this.historyLength=i,this.backCalled=!1,this.current=n,r&&this.trigger("back",{url:a,to:n})?(e.forward(),this.current=a,t):this.trigger(c,{url:n,backButtonPressed:!s})?(r?e.forward():(e.back(),this.historyLength--),this.current=a,t):(r?this.locations.pop():this.locations.push(n),t))}});l.History=k,l.History.HistoryAdapter=b,l.History.HashAdapter=y,l.History.PushStateAdapter=w,l.absoluteURL=n,l.history=new k}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t,n){return RegExp("^"+t.replace(p,"\\$&").replace(u,"(?:$1)?").replace(h,e).replace(f,"(.*?)")+"$",n?"i":"")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,o=i.history,r=i.Observable,s="init",a="routeMissing",l="change",c="back",d="same",u=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,f=/\*\w+/g,p=/[\-{}\[\]+?.,\\\^$|#\s]/g,m=i.Class.extend({init:function(e,n,i){e instanceof RegExp||(e=t(e,i)),this.route=e,this._callback=n},callback:function(e,t,o){var r,s,a=0,l=i.parseQueryStringParams(e);if(l._back=t,e=n(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,i){return!!this.route.test(n(e))&&(this.callback(e,t,i),!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,n=function(){t._same()},i=function(e){t._back(e)},r=function(e){t._urlChanged(e)};o.start({same:n,change:r,back:i,pushState:t.pushState,hashBang:t.hashBang,root:t.root}),e={url:o.current||"/",preventDefault:$.noop},t.trigger(s,e)||t._urlChanged(e),this._urlChangedProxy=r,this._backProxy=i},route:function(e,t){this.routes.push(new m(e,t,this.ignoreCase))},navigate:function(e,t){i.history.navigate(e,t)},replace:function(e,t){i.history.replace(e,t)},_back:function(e){this.trigger(c,{url:e.url,to:e.to})&&e.preventDefault()},_same:function(){this.trigger(d)},_urlChanged:function(e){var t,n,o,r,s=e.url,c=void 0===e.decode,d=e.backButtonPressed;if(s||(s="/"),this.trigger(l,{url:e.url,params:i.parseQueryStringParams(e.url),backButtonPressed:d}))return void e.preventDefault();for(t=0,n=this.routes,r=n.length;t<r;t++)if(o=n[t],o.worksWith(s,d,c))return;this.trigger(a,{url:s,params:i.parseQueryStringParams(s),backButtonPressed:d})&&e.preventDefault()}});i.Router=g}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.odata.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(i,r){var l,c,d,u,h,f,p,m,g=[],v=i.logic||"and",_=i.filters;for(l=0,c=_.length;l<c;l++)i=_[l],d=i.field,p=i.value,f=i.operator,i.filters?i=n(i,r):(m=i.ignoreCase,d=d.replace(/\./g,"/"),i=s[f],r&&(i=a[f]),"isnull"===f||"isnotnull"===f?i=o.format("{0} {1} null",d,i):"isempty"===f||"isnotempty"===f?i=o.format("{0} {1} ''",d,i):i&&p!==t&&(u=e.type(p),"string"===u?(h="'{1}'",p=p.replace(/'/g,"''"),m===!0&&(d="tolower("+d+")")):"date"===u?r?(h="{1:yyyy-MM-ddTHH:mm:ss+00:00}",p=o.timezone.apply(p,"Etc/UTC")):h="datetime'{1:yyyy-MM-ddTHH:mm:ss}'":h="{1}",i.length>3?"substringof"!==i?h="{0}({2},"+h+")":(h="{0}("+h+",{2})","doesnotcontain"===f&&(r?(h="{0}({2},'{1}') eq -1",i="indexof"):h+=" eq false")):h="{2} {0} "+h,i=o.format(h,i,p,d))),g.push(i);return i=g.join(" "+v+" "),g.length>1&&(i="("+i+")"),i}function i(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}var o=window.kendo,r=e.extend,s={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isempty:"eq",isnotempty:"ne"},a=r({},s,{contains:"contains"}),l={pageSize:e.noop,page:e.noop,filter:function(e,t,i){t&&(t=n(t,i),t&&(e.$filter=t))},sort:function(t,n){var i=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");i&&(t.$orderby=i)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},c={read:{dataType:"jsonp"}};r(!0,o.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t,n){var i,r,s,a;if(e=e||{},t=t||"read",a=(this.options||c)[t],a=a?a.dataType:"json","read"===t){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(s in e)l[s]?l[s](i,e[s],n):i[s]=e[s]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(s in e)r=e[s],"number"==typeof r&&(e[s]=r+"");i=o.stringify(e)}}return i}}}}),r(!0,o.data,{schemas:{"odata-v4":{type:"json",data:function(t){return t=e.extend({},t),i(t),t.value?t.value:[t]},total:function(e){return e["@odata.count"]}}},transports:{"odata-v4":{read:{cache:!0,dataType:"json"},update:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t){var n=o.data.transports.odata.parameterMap(e,t,!0);return"read"==t&&(n.$count=!0,delete n.$inlinecount),n}}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.xml.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.isArray,o=e.isPlainObject,r=e.map,s=e.each,a=e.extend,l=n.getter,c=n.Class,d=c.extend({init:function(t){var l,c,d,u,h=this,f=t.total,p=t.model,m=t.parse,g=t.errors,v=t.serialize,_=t.data;p&&(o(p)&&(l=t.modelBase||n.data.Model,p.fields&&s(p.fields,function(t,n){o(n)&&n.field?e.isFunction(n.field)||(n=a(n,{field:h.getter(n.field)})):n={field:h.getter(n)},p.fields[t]=n}),c=p.id,c&&(d={},d[h.xpathToMember(c,!0)]={field:h.getter(c)},p.fields=a(d,p.fields),p.id=h.xpathToMember(c)),p=l.define(p)),h.model=p),f&&("string"==typeof f?(f=h.getter(f),h.total=function(e){return parseInt(f(e),10)}):"function"==typeof f&&(h.total=f)),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,n=h.evaluate(e,_);return n=i(n)?n:[n],h.model&&p.fields?(t=new h.model,r(n,function(e){if(e){var n,i={};for(n in p.fields)i[n]=t._parse(n,p.fields[n].field(e));return i}})):n}):"function"==typeof _&&(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 n,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&&(n=this.parseDOM(o),s=o.nodeName,a=d[s],i(a)?a.push(n):a=a!==t?[a,n]:n,d[s]=a);return d},evaluate:function(e,t){for(var n,o,r,s,a,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(o=[],t=l.join("."),a=0,r=e.length;a<r;a++)s=this.evaluate(e[a],t),s=i(s)?s:[s],o.push.apply(o,s);return o}return e},parse:function(t){var n,i,o={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),o[n.nodeName]=i,o},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:d,readers:{xml:d}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,t,n,i){return function(o){var r,s={};for(r in o)s[r]=o[r];s.field=i?n+"."+o.field:n,t==Ae&&e._notifyChange&&e._notifyChange(s),e.trigger(t,s)}}function i(t,n){if(t===n)return!0;var o,r=e.type(t),s=e.type(n);if(r!==s)return!1;if("date"===r)return t.getTime()===n.getTime();if("object"!==r&&"array"!==r)return!1;for(o in t)if(!i(t[o],n[o]))return!1;return!0}function o(e,t){var n,i;for(i in e){if(n=e[i],ue(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function r(e){this.data=e||[]}function s(e,n){if(e){var i=typeof e===ke?{field:e,dir:n}:e,o=fe(i)?i:i!==t?[i]:[];return pe(o,function(e){return!!e.dir})}}function a(e){var t,n,i,o,r=e.filters;if(r)for(t=0,n=r.length;t<n;t++)i=r[t],o=i.operator,o&&typeof o===ke&&(i.operator=X[o.toLowerCase()]||o),a(i)}function l(e){if(e&&!he(e))return!fe(e)&&e.filters||(e={logic:"and",filters:fe(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||{},he(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 n,i,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(n=o[s],i=r[s],n.logic&&i.logic){if(!h(n,i))return!1}else if(!c(n,i))return!1;return!0}function f(e){return fe(e)?e:[e]}function p(e,n){var i=typeof e===ke?{field:e,dir:n}:e,o=fe(i)?i:i!==t?[i]:[];return U(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,n,i,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]=Z[l.toLowerCase()](e[d][l],n,_e.accessor(d),i,o,r[d][l])}function v(e){return"number"==typeof e&&!isNaN(e)}function _(e){return e&&e.getTime}function b(e){var t,n=e.length,i=Array(n);for(t=0;t<n;t++)i[t]=e[t].toJSON();return i}function w(e,t,n,i,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]=_e.setter(a)),d[a](r,t[s](r)),delete r[s])}}function y(e,t,n,i,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]=n._parse(s,t[s](r)),a=o[s],a&&a!==s&&delete r[a]}}function k(e,t,n,i,o){var r,s,a,l;for(s=0,l=e.length;s<l;s++)r=e[s],a=i[r.field],a&&a!=r.field&&(r.field=a),r.value=n._parse(r.field,r.value),r.hasSubgroups?k(r.items,t,n,i,o):y(r.items,t,n,i,o)}function x(e,t,n,i,o,r){return function(s){return s=e(s),s&&!he(i)&&("[object Array]"===$e.call(s)||s instanceof Qe||(s=[s]),n(s,i,new t,o,r)),s||[]}}function C(e,t,n,i){for(var o,r,s,a=0;t.length&&i&&(o=t[a],r=o.items,s=r.length,e&&e.field===o.field&&e.value===o.value?(e.hasSubgroups&&e.items.length?C(e.items[e.items.length-1],o.items,n,i):(r=r.slice(n,n+i),e.items=e.items.concat(r)),t.splice(a--,1)):o.hasSubgroups&&r.length?(C(o,r,n,i),o.items.length||t.splice(a--,1)):(r=r.slice(n,n+i),o.items=r,o.items.length||t.splice(a--,1)),0===r.length?n-=s:(n=0,i-=r.length),!(++a>=t.length)););a<t.length&&t.splice(a,t.length-a)}function S(e){var t,n,i,o,r,s=[];for(t=0,n=e.length;t<n;t++)if(r=e.at(t),r.hasSubgroups)s=s.concat(S(r.items));else for(i=r.items,o=0;o<i.length;o++)s.push(i.at(o));return s}function T(e,t){var n,i,o;if(t)for(n=0,i=e.length;n<i;n++)o=e.at(n),o.hasSubgroups?T(o.items,t):o.items=new W(o.items,t)}function D(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n].hasSubgroups){if(D(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function A(e,t,n,i){for(var o=0;o<e.length&&e[o].data!==t&&!E(e[o].data,n,i);o++);}function E(e,t,n){for(var i=0,o=e.length;i<o;i++){if(e[i]&&e[i].hasSubgroups)return E(e[i].items,t,n);if(e[i]===t||e[i]===n)return e[i]=n,!0}}function M(e,n,i,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<n.length;c++)if(n[c]===l){e[s]=n.at(c),A(i,n,l,e[s]);break}}else M(l.items,n,i,o,r)}function R(e,t){var n,i,o;for(n=0,i=e.length;n<i;n++)if(o=e.at(n),o.uid==t.uid)return e.splice(n,1),o}function I(e,t){return t?z(e,function(e){return e.uid&&e.uid==t.uid||e[t.idField]===t.id&&t.id!==t._defaultId}):-1}function F(e,t){return t?z(e,function(e){return e.uid==t.uid}):-1}function z(e,t){var n,i;for(n=0,i=e.length;n<i;n++)if(t(e[n]))return n;return-1}function P(e,t){var n,i;return e&&!he(e)?(n=e[t],i=ue(n)?n.from||n.field||t:e[t]||t,be(i)?t:i):t}function B(e,t){var n,i,o,r={};for(o in e)"filters"!==o&&(r[o]=e[o]);if(e.filters)for(r.filters=[],n=0,i=e.filters.length;n<i;n++)r.filters[n]=B(e.filters[n],t);else r.field=P(t.fields,r.field);return r}function L(e,t){var n,i,o,r,s,a=[];for(n=0,i=e.length;n<i;n++){o={},r=e[n];for(s in r)o[s]=r[s];o.field=P(t.fields,o.field),o.aggregates&&fe(o.aggregates)&&(o.aggregates=L(o.aggregates,t)),a.push(o)}return a}function H(t,n){var i,o,r,s,a,l,c,d,u,h;for(t=e(t)[0],i=t.options,o=n[0],r=n[1],s=[],a=0,l=i.length;a<l;a++)u={},d=i[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 N(t,n){var i,o,r,s,a,l,c,d=e(t)[0].tBodies[0],u=d?d.rows:[],h=n.length,f=[];for(i=0,o=u.length;i<o;i++){for(a={},c=!0,s=u[i].cells,r=0;r<h;r++)l=s[r],"th"!==l.nodeName.toLowerCase()&&(c=!1,a[n[r].field]=l.innerHTML);c||f.push(a)}return f}function O(e){return function(){var t=this._data,n=ie.fn[e].apply(this,qe.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function V(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var o,r,s,a,l,c,d,u,h=e(t).children(),f=[],p=n[0].field,m=n[1]&&n[1].field,g=n[2]&&n[2].field,v=n[3]&&n[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[p]=3==c.nodeType?c.nodeValue:u.text()),m&&(s[m]=i(u,"a").attr("href")),v&&(s[v]=i(u,"img").attr("src")),g&&(d=i(u,".k-sprite").prop("className"),s[g]=d&&e.trim(d.replace("k-sprite",""))),t.length&&(s.items=V(t.eq(0),n)),"true"==a.attr("data-hasChildren")&&(s.hasChildren=!0),f.push(s);return f}var U,W,j,q,G,$,Y,K,Q,X,Z,J,ee,te,ne,ie,oe,re,se,ae,le,ce=e.extend,de=e.proxy,ue=e.isPlainObject,he=e.isEmptyObject,fe=e.isArray,pe=e.grep,me=e.ajax,ge=e.each,ve=e.noop,_e=window.kendo,be=_e.isFunction,we=_e.Observable,ye=_e.Class,ke="string",xe="function",Ce="create",Se="read",Te="update",De="destroy",Ae="change",Ee="sync",Me="get",Re="error",Ie="requestStart",Fe="progress",ze="requestEnd",Pe=[Ce,Se,Te,De],Be=function(e){return e},Le=_e.getter,He=_e.stringify,Ne=Math,Oe=[].push,Ve=[].join,Ue=[].pop,We=[].splice,je=[].shift,qe=[].slice,Ge=[].unshift,$e={}.toString,Ye=_e.support.stableSort,Ke=/^\/Date\((.*?)\)\/$/,Qe=we.extend({init:function(e,t){var n=this;n.type=t||j,we.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},at:function(e){return this[e]},toJSON:function(){var e,t,n=this.length,i=Array(n);for(e=0;e<n;e++)t=this[e],t instanceof j&&(t=t.toJSON()),i[e]=t;return i},parent:ve,wrapAll:function(e,t){var n,i,o=this,r=function(){return o};for(t=t||[],n=0,i=e.length;n<i;n++)t[n]=o.wrap(e[n],r);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===$e.call(e)&&(n=e instanceof i.type||e instanceof $,n||(e=e instanceof j?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(Ae,function(e){i.trigger(Ae,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemloaded":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Oe.apply(this,n),this.trigger(Ae,{action:"add",index:t,items:n}),e},slice:qe,sort:[].sort,join:Ve,pop:function(){var e=this.length,t=Ue.apply(this);return e&&this.trigger(Ae,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,o,r,s=this.wrapAll(qe.call(arguments,2));if(i=We.apply(this,[e,t].concat(s)),i.length)for(this.trigger(Ae,{action:"remove",index:e,items:i}),o=0,r=i.length;o<r;o++)i[o]&&i[o].children&&i[o].unbind(Ae);return n&&this.trigger(Ae,{action:"add",index:e,items:s}),i},shift:function(){var e=this.length,t=je.apply(this);return e&&this.trigger(Ae,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Ge.apply(this,t),this.trigger(Ae,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1},forEach:function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this)},map:function(e){for(var t=0,n=[],i=this.length;t<i;t++)n[t]=e(this[t],t,this);return n},reduce:function(e){var t,n=0,i=this.length;for(2==arguments.length?t=arguments[1]:n<i&&(t=this[n++]);n<i;n++)t=e(t,this[n],n,this);return t},reduceRight:function(e){var t,n=this.length-1;for(2==arguments.length?t=arguments[1]:n>0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e){for(var t,n=0,i=[],o=this.length;n<o;n++)t=this[n],e(t,n,this)&&(i[i.length]=t);return i},find:function(e){for(var t,n=0,i=this.length;n<i;n++)if(t=this[n],e(t,n,this))return t},every:function(e){for(var t,n=0,i=this.length;n<i;n++)if(t=this[n],!e(t,n,this))return!1;return!0},some:function(e){for(var t,n=0,i=this.length;n<i;n++)if(t=this[n],e(t,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&&!Qe.prototype[Symbol.iterator]&&(Qe.prototype[Symbol.iterator]=[][Symbol.iterator]),W=Qe.extend({init:function(e,t){we.fn.init.call(this),this.type=t||j;for(var n=0;n<e.length;n++)this[n]=e[n];this.length=n,this._parent=de(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}}),j=we.extend({init:function(e){var t,n,i=this,o=function(){return i};we.fn.init.call(this),this._handlers={};for(n in e)t=e[n],"object"==typeof t&&t&&!t.getTime&&"_"!=n.charAt(0)&&(t=i.wrap(t,n,o)),i[n]=t;i.uid=_e.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_handlers"!==e&&"_events"!==e&&typeof this[e]!==xe&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(){var e,t,n={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof j||e instanceof Qe)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(Me,{field:e}),t="this"===e?n:_e.getter(e,!0)(n)},_set:function(e,t){var n,i,o,r=this,s=e.indexOf(".")>=0;if(s)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),o=_e.getter(i,!0)(r),o instanceof j)return o.set(n.join("."),t),s;i+="."}return _e.setter(e)(r,t),s},set:function(e,t){var n=this,i=!1,o=e.indexOf(".")>=0,r=_e.getter(e,!0)(n);return r!==t&&(r instanceof we&&this._handlers[e]&&(this._handlers[e].get&&r.unbind(Me,this._handlers[e].get),r.unbind(Ae,this._handlers[e].change)),i=n.trigger("set",{field:e,value:t}),i||(o||(t=n.wrap(t,e,function(){return n})),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(Ae,{field:e}))),i},parent:ve,wrap:function(e,t,i){var o,r,s,a,l=this,c=$e.call(e);return null==e||"[object Object]"!==c&&"[object Array]"!==c||(s=e instanceof Qe,a=e instanceof ie,"[object Object]"!==c||a||s?("[object Array]"===c||s||a)&&(s||a||(e=new Qe(e)),r=n(l,Ae,t,!1),e.bind(Ae,r),l._handlers[t]={change:r}):(e instanceof j||(e=new j(e)),o=n(l,Me,t,!0),e.bind(Me,o),r=n(l,Ae,t,!0),e.bind(Ae,r),l._handlers[t]={get:o,change:r}),e.parent=i),e}}),q={number:function(e){return _e.parseFloat(e)},date:function(e){return _e.parseDate(e)},"boolean":function(e){return typeof e===ke?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},G={string:"",number:0,date:new Date,"boolean":!1,"default":""},$=j.extend({init:function(n){var i,o,r=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},r.defaults,n),r._initializers))for(i=0;i<r._initializers.length;i++)o=r._initializers[i],n[o]=r.defaults[o]();j.fn.init.call(r,n),r.dirty=!1,r.idField&&(r.id=r.get(r.idField),r.id===t&&(r.id=r._defaultId))},shouldSerialize:function(e){return j.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,r=e,s=i.fields||{};return e=s[e],e||(e=o(s,r)),e&&(n=e.parse,!n&&e.type&&(n=q[e.type.toLowerCase()])),n?n(t):t},_notifyChange:function(e){var t=e.action;"add"!=t&&"remove"!=t||(this.dirty=!0)},editable:function(e){return e=(this.fields||{})[e],!e||e.editable!==!1},set:function(e,t,n){var o=this,r=o.dirty;o.editable(e)&&(t=o._parse(e,t),i(t,o.get(e))||(o.dirty=!0,j.fn.set.call(o,e,t,n)&&!r&&(o.dirty=r)))},accept:function(e){var t,n,i=this,o=function(){return i};for(t in e)n=e[t],"_"!=t.charAt(0)&&(n=i.wrap(e[t],t,o)),i._set(t,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1},isNew:function(){return this.id===this._defaultId}}),$.define=function(e,n){n===t&&(n=e,e=$);var i,o,r,s,a,l,c,d,u=ce({defaults:{}},n),h={},f=u.id,p=[];if(f&&(u.idField=f),u.id&&delete u.id,f&&(u.defaults[f]=u._defaultId=""),"[object Array]"===$e.call(u.fields)){for(l=0,c=u.fields.length;l<c;l++)r=u.fields[l],typeof r===ke?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===ke?r.field:o,r.nullable||(a=u.defaults[d!==o?d:o]=r.defaultValue!==t?r.defaultValue:G[s.toLowerCase()],"function"==typeof a&&p.push(o)),n.id===o&&(u._defaultId=a),u.defaults[d!==o?d:o]=a,r.parse=r.parse||q[s];return p.length>0&&(u._initializers=p),i=e.extend(u),i.define=function(e){return $.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},Y={selector:function(e){return be(e)?e:Le(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:e<n?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,o,r=e[0](t,n);for(i=1,o=e.length;i<o;i++)r=r||e[i](t,n);return r}}},K=ce({},Y,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),o=t(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?e.__position-n.__position:null==i?-1:null==o?1:i.localeCompare?i.localeCompare(o):i>o?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),o=t(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?e.__position-n.__position:null==i?1:null==o?-1:o.localeCompare?o.localeCompare(i):i<o?1:-1}},create:function(e){return this[e.dir](e.field)}}),U=function(e,t){var n,i=e.length,o=Array(i);for(n=0;n<i;n++)o[n]=t(e[n],n,e);return o},Q=function(){function e(e){return"string"==typeof e&&(e=e.replace(/[\r\n]+/g,"")),JSON.stringify(e)}function t(t){return function(n,i,o){return i+="",o&&(n="("+n+" || '').toLowerCase()",i=i.toLowerCase()),t(n,e(i),o)}}function n(t,n,i,o){if(null!=i){if(typeof i===ke){var r=Ke.exec(i);r?i=new Date((+r[1])):o?(i=e(i.toLowerCase()),n="(("+n+" || '')+'').toLowerCase()"):i=e(i)}i.getTime&&(n="("+n+"&&"+n+".getTime?"+n+".getTime():"+n+")",i=i.getTime())}return n+" "+t+" "+i}function i(e){var t,n,i,o;for(t="/^",n=!1,i=0;i<e.length;++i){if(o=e.charAt(i),n)t+="\\"+o;else{if("~"==o){n=!0;continue}t+="*"==o?".*":"?"==o?".":".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(o)>=0?"\\"+o:o}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i){return n("==",e,t,i)},neq:function(e,t,i){return n("!=",e,t,i)},gt:function(e,t,i){return n(">",e,t,i)},gte:function(e,t,i){return n(">=",e,t,i)},lt:function(e,t,i){return n("<",e,t,i)},lte:function(e,t,i){return n("<=",e,t,i)},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 n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") >= 0"}),doesnotendwith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") < 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),i(t)+".test("+e+")"}),doesnotmatch:t(function(e,t){return t=t.substring(1,t.length-1),"!"+i(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)"}}}(),r.filterExpr=function(e){var n,i,o,s,a,l,c=[],d={and:" && ",or:" || "},u=[],h=[],f=e.filters;for(n=0,i=f.length;n<i;n++)o=f[n],a=o.field,l=o.operator,o.filters?(s=r.filterExpr(o),o=s.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(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===xe?(s="__f["+u.length+"](d)",u.push(a)):s=_e.expr(a),typeof l===xe?(o="__o["+h.length+"]("+s+", "+Q.quote(o.value)+")",h.push(l)):o=Q[(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}},X={"==":"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(U(this.data,e))},order:function(e,t){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new r(this.data.slice(0).sort(Y.create(n)))},orderBy:function(e){return this.order(e,"asc")},orderByDescending:function(e){return this.order(e,"desc")},sort:function(e,t,n){var i,o,r=s(e,t),a=[];if(n=n||Y,r.length){for(i=0,o=r.length;i<o;i++)a.push(n.create(r[i]));return this.orderBy({compare:n.combine(a)})}return this},filter:function(e){var t,n,i,o,s,a,c,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,i=u.length;t<i;t++)n=u[t],d(n)&&h.push(n);return new r(h)},group:function(e,t){e=p(e||[]),t=t||this.data;var n,i=this,o=new r(i.data);return e.length>0&&(n=e[0],o=o.groupBy(n).select(function(i){var o=new r(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new r(i.items).group(e.slice(1),o.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:o.aggregate(n.aggregates)}})),o},groupBy:function(e){if(he(e)||!this.data.length)return new r([]);var t,n,i,o,s=e.field,a=this._sortForGrouping(s,e.dir||"asc"),l=_e.accessor(s),c=l.get(a[0],s),d={field:s,value:c,items:[]},u=[d];for(i=0,o=a.length;i<o;i++)t=a[i],n=l.get(t,s),m(c,n)||(c=n,d={field:s,value:c,items:[]},u.push(d)),d.items.push(t);return new r(u)},_sortForGrouping:function(e,t){var n,i,o=this.data;if(!Ye){for(n=0,i=o.length;n<i;n++)o[n].__position=n;for(o=new r(o).sort(e,t,K).toArray(),n=0,i=o.length;n<i;n++)delete o[n].__position;return o}return this.sort(e,t).toArray()},aggregate:function(e){var t,n,i={},o={};if(e&&e.length)for(t=0,n=this.data.length;t<n;t++)g(i,e,this.data[t],t,n,o);return i}},Z={sum:function(e,t,n){var i=n.get(t);return v(e)?v(i)&&(e+=i):e=i,e},count:function(e){return(e||0)+1},average:function(e,n,i,o,r,s){var a=i.get(n);return s.count===t&&(s.count=0),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,n){var i=n.get(t);return v(e)||_(e)||(e=i),e<i&&(v(i)||_(i))&&(e=i),e},min:function(e,t,n){var i=n.get(t);return v(e)||_(e)||(e=i),e>i&&(v(i)||_(i))&&(e=i),e}},r.process=function(e,n){n=n||{};var i,o=new r(e),a=n.group,l=p(a||[]).concat(s(n.sort||[])),c=n.filterCallback,d=n.filter,u=n.skip,h=n.take;return d&&(o=o.filter(d),c&&(o=c(o)),i=o.toArray().length),l&&(o=o.sort(l),a&&(e=o.toArray())),u!==t&&h!==t&&(o=o.range(u,h)),a&&(o=o.group(a,e)),{total:i,data:o.toArray()}},J=ye.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)}}),ee=ye.extend({init:function(e){var t,n=this;e=n.options=ce({},n.options,e),ge(Pe,function(t,n){typeof e[n]===ke&&(e[n]={url:e[n]})}),n.cache=e.cache?te.create(e.cache):{find:ve,add:ve},t=e.parameterMap,be(e.push)&&(n.push=e.push),n.push||(n.push=Be),n.parameterMap=be(t)?t:function(e){var n={};return ge(e,function(e,i){e in t&&(e=t[e],ue(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Be},create:function(e){return me(this.setup(e,Ce))},read:function(n){var i,o,r,s=this,a=s.cache;n=s.setup(n,Se),i=n.success||ve,o=n.error||ve,r=a.find(n.data),r!==t?i(r):(n.success=function(e){a.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return me(this.setup(e,Te))},destroy:function(e){return me(this.setup(e,De))},setup:function(e,t){e=e||{};var n,i=this,o=i.options[t],r=be(o.data)?o.data(e.data):o.data;return e=ce(!0,{},o,e),n=ce(!0,{},r,e.data),e.data=i.parameterMap(n,t),be(e.url)&&(e.url=e.url(n)),e}}),te=ye.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[He(e)]=n)},find:function(e){return this._store[He(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[He(e)]}}),te.create=function(e){var t={inmemory:function(){return new te}};return ue(e)&&be(e.find)?e:e===!0?new te:t[e]()},ne=ye.extend({init:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f,p=this;e=e||{};for(t in e)n=e[t],p[t]=typeof n===ke?Le(n):n;o=e.modelBase||$,ue(p.model)&&(p.model=i=o.define(p.model)),r=de(p.data,p),p._dataAccessFunction=r,p.model&&(s=de(p.groups,p),a=de(p.serialize,p),l={},c={},d={},u={},h=!1,i=p.model,i.fields&&(ge(i.fields,function(e,t){var n;f=e,ue(t)&&t.field?f=t.field:typeof t===ke&&(f=t),ue(t)&&t.from&&(n=t.from),h=h||n&&n!==e||f!==e,c[e]=Le(n||f),d[e]=Le(e),l[n||f]=e,u[e]=n||f}),!e.serialize&&h&&(p.serialize=x(a,i,w,d,l,u))),p._dataAccessFunction=r,p.data=x(r,i,y,c,l,u),p.groups=x(s,i,k,c,l,u))},errors:function(e){return e?e.errors:null},parse:Be,data:Be,total:function(e){return e.length},groups:Be,aggregates:function(){return{}},serialize:function(e){return e}}),ie=we.extend({init:function(e){var n,i,o,r=this;e&&(i=e.data),e=r.options=ce({},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=p(e.group),r._aggregate=e.aggregate,r._total=e.total,r._shouldDetachObservableParents=!0,we.fn.init.call(r),r.transport=oe.create(e,i,r),be(r.transport.push)&&r.transport.push({pushCreate:de(r._pushCreate,r),pushUpdate:de(r._pushUpdate,r),pushDestroy:de(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,He(r.reader.serialize(e)))}}):r._storage=e.offlineStorage),r.reader=new _e.data.readers[e.schema.type||"json"](e.schema),n=r.reader.model||{},r._detachObservableParents(),r._data=r._observe(r._data),r._online=!0,r.bind(["push",Re,Ae,Ie,Ee,ze,Fe],e)},options:{data:null,schema:{modelBase:$},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},clone:function(){return this},online:function(n){return n!==t?this._online!=n&&(this._online=n,n)?this.sync():e.Deferred().resolve().promise():this._online},offlineData:function(e){return null==this.options.offlineStorage?null:e!==t?this._storage.setItem(e):this._storage.getItem()||[]},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_pushCreate:function(e){this._push(e,"pushCreate")},_pushUpdate:function(e){this._push(e,"pushUpdate")},_pushDestroy:function(e){this._push(e,"pushDestroy")},_push:function(e,t){var n=this._readData(e);n||(n=e),this[t](n)},_flatData:function(e,t){if(e){if(this._isServerGrouped())return S(e);if(!t)for(var n=0;n<e.length;n++)e.at(n)}return e},parent:ve,get:function(e){var t,n,i=this._flatData(this._data);for(t=0,n=i.length;t<n;t++)if(i[t].id==e)return i[t]},getByUid:function(e){var t,n,i=this._flatData(this._data);if(i)for(t=0,n=i.length;t<n;t++)if(i[t].uid==e)return i[t]},indexOf:function(e){return F(this._data,e)},at:function(e){return this._data.at(e)},data:function(e){var n,i=this;if(e===t){if(i._data)for(n=0;n<i._data.length;n++)i._data.at(n);return i._data}i._detachObservableParents(),i._data=this._observe(e),i._pristineData=e.slice(0),i._storeData(),i._ranges=[],i.trigger("reset"),i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data)},view:function(e){return e===t?this._view:(this._view=this._observeView(e),t)},_observeView:function(e){var t,n=this;return M(e,n._data,n._ranges,n.reader.model||j,n._isServerGrouped()),t=new W(e,n.reader.model),t.parent=function(){return n.parent()},t},flatView:function(){var e=this.group()||[];return e.length?S(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 j?e:new j(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof $||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,this._wrapInEmptyGroup(t)):this._data.splice(e,0,t),t},pushCreate:function(e){var t,n,i,o,r,s;fe(e)||(e=[e]),t=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;i<e.length;i++)o=e[i],r=this.add(o),t.push(r),s=r.toJSON(),this._isServerGrouped()&&(s=this._wrapInEmptyGroup(s)),this._pristineData.push(s)}finally{this.options.autoSync=n}t.length&&this.trigger("push",{type:"create",items:t})},pushUpdate:function(e){var t,n,i,o,r;for(fe(e)||(e=[e]),t=[],n=0;n<e.length;n++)i=e[n],o=this._createNewModel(i),r=this.get(o.id),r?(t.push(r),r.accept(i),r.trigger(Ae),this._updatePristineForModel(r,i)):this.pushCreate(i);t.length&&this.trigger("push",{type:"update",items:t})},pushDestroy:function(e){var t=this._removeItems(e);t.length&&this.trigger("push",{type:"destroy",items:t})},_removeItems:function(e){var t,n,i,o,r,s;fe(e)||(e=[e]),t=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;i<e.length;i++)o=e[i],r=this._createNewModel(o),s=!1,this._eachItem(this._data,function(e){var n,i;for(n=0;n<e.length;n++)if(i=e.at(n),i.id===r.id){t.push(i),e.splice(n,1),s=!0;break}}),s&&(this._removePristineForModel(r),this._destroyed.pop())}finally{this.options.autoSync=n}return t},remove:function(e){var t,n=this,i=n._isServerGrouped();return this._eachItem(n._data,function(o){if(t=R(o,e),t&&i)return t.isNew&&t.isNew()||n._destroyed.push(t),!0}),this._removeModelFromRanges(e),this._updateRangesLength(),e},destroyed:function(){return this._destroyed},created:function(){var e,t,n=[],i=this._flatData(this._data);for(e=0,t=i.length;e<t;e++)i[e].isNew&&i[e].isNew()&&n.push(i[e]);return n},updated:function(){var e,t,n=[],i=this._flatData(this._data);for(e=0,t=i.length;e<t;e++)i[e].isNew&&!i[e].isNew()&&i[e].dirty&&n.push(i[e]);return n},sync:function(){var t,n=this,i=[],o=[],r=n._destroyed,s=e.Deferred().resolve().promise();if(n.online()){if(!n.reader.model)return s;i=n.created(),o=n.updated(),t=[],n.options.batch&&n.transport.submit?t=n._sendSubmit(i,o,r):(t.push.apply(t,n._send("create",i)),t.push.apply(t,n._send("update",o)),t.push.apply(t,n._send("destroy",r))),s=e.when.apply(null,t).then(function(){var e,t;for(e=0,t=arguments.length;e<t;e++)arguments[e]&&n._accept(arguments[e]);n._storeData(!0),n._change({action:"sync"}),n.trigger(Ee)})}else n._storeData(!0),n._change({action:"sync"});return s},cancelChanges:function(e){var t=this;e instanceof _e.data.Model?t._cancelModel(e):(t._destroyed=[],t._detachObservableParents(),t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t._pristineTotal),t._ranges=[],t._addRange(t._data),t._change(),t._markOfflineUpdatesAsDirty())},_markOfflineUpdatesAsDirty:function(){var e=this;null!=e.options.offlineStorage&&e._eachItem(e._data,function(e){var t,n;for(t=0;t<e.length;t++)n=e.at(t),"update"!=n.__state__&&"create"!=n.__state__||(n.dirty=!0)})},hasChanges:function(){var e,t,n=this._flatData(this._data);if(this._destroyed.length)return!0;for(e=0,t=n.length;e<t;e++)if(n[e].isNew&&n[e].isNew()||n[e].dirty)return!0;return!1},_accept:function(t){var n,i=this,o=t.models,r=t.response,s=0,a=i._isServerGrouped(),l=i._pristineData,c=t.type;if(i.trigger(ze,{response:r,type:c}),r&&!he(r)){if(r=i.reader.parse(r),i._handleCustomErrors(r))return;r=i.reader.data(r),fe(r)||(r=[r])}else r=e.map(o,function(e){return e.toJSON()});for("destroy"===c&&(i._destroyed=[]),s=0,n=o.length;s<n;s++)"destroy"!==c?(o[s].accept(r[s]),"create"===c?l.push(a?i._wrapInEmptyGroup(o[s]):r[s]):"update"===c&&i._updatePristineForModel(o[s],r[s])):i._removePristineForModel(o[s])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,n){_e.deepExtend(n[e],t)})},_executeOnPristineForModel:function(e,t){this._eachPristineItem(function(n){var i=I(n,e);if(i>-1)return t(i,n),!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){this._eachItem(this._pristineData,e)},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?D(e,t):t(e))},_pristineForModel:function(e){var t,n,i=function(i){if(n=I(i,e),n>-1)return t=i[n],!0};return this._eachPristineItem(i),t},_cancelModel:function(e){var t=this._pristineForModel(e);this._eachItem(this._data,function(n){var i=F(n,e);i>=0&&(!t||e.isNew()&&!t.__state__?n.splice(i,1):(n[i].accept(t),"update"==t.__state__&&(n[i].dirty=!0)))})},_submit:function(t,n){var i=this;i.trigger(Ie,{type:"submit"}),i.transport.submit(ce({success:function(n,i){var o=e.grep(t,function(e){return e.type==i})[0];o&&o.resolve({response:n,models:o.models,type:i})},error:function(e,n,o){for(var r=0;r<t.length;r++)t[r].reject(e);i.error(e,n,o)}},n))},_sendSubmit:function(t,n,i){var o=this,r=[];return o.options.batch&&(t.length&&r.push(e.Deferred(function(e){e.type="create",e.models=t})),n.length&&r.push(e.Deferred(function(e){e.type="update",e.models=n})),i.length&&r.push(e.Deferred(function(e){e.type="destroy",e.models=i})),o._submit(r,{data:{created:o.reader.serialize(b(t)),updated:o.reader.serialize(b(n)),destroyed:o.reader.serialize(b(i))}})),r},_promise:function(t,n,i){var o=this;return e.Deferred(function(e){o.trigger(Ie,{type:i}),o.transport[i].call(o.transport,ce({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),o.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,o=this,r=[],s=o.reader.serialize(b(t));if(o.options.batch)t.length&&r.push(o._promise({data:{models:s}},t,e));else for(n=0,i=t.length;n<i;n++)r.push(o._promise({data:s[n]},[t[n]],e));return r},read:function(t){var n=this,i=n._params(t),o=e.Deferred();return n._queueRequest(i,function(){var e=n.trigger(Ie,{type:"read"});e?(n._dequeueRequest(),o.resolve(e)):(n.trigger(Fe),n._ranges=[],n.trigger("reset"),n.online()?n.transport.read({data:i,success:function(e){n._ranges=[],n.success(e,i),o.resolve()},error:function(){var e=qe.call(arguments);n.error.apply(n,e),o.reject.apply(o,e)}}):null!=n.options.offlineStorage&&(n.success(n.offlineData(),i),o.resolve()))}),o.promise()},_readAggregates:function(e){return this.reader.aggregates(e)},success:function(e){var n,i,o,r,s,a,l,c,d=this,u=d.options;if(d.trigger(ze,{response:e,type:"read"}),d.online()){if(e=d.reader.parse(e),d._handleCustomErrors(e))return d._dequeueRequest(),t;d._total=d.reader.total(e),d._aggregate&&u.serverAggregates&&(d._aggregateResult=d._readAggregates(e)),e=d._readData(e),d._destroyed=[]}else{for(e=d._readData(e),n=[],i={},o=d.reader.model,r=o?o.idField:"id",s=0;s<this._destroyed.length;s++)a=this._destroyed[s][r],i[a]=a;for(s=0;s<e.length;s++)l=e[s],c=l.__state__,"destroy"==c?i[l[r]]||this._destroyed.push(this._createNewModel(l)):n.push(l);e=n,d._total=e.length}d._pristineTotal=d._total,d._pristineData=e.slice(0),d._detachObservableParents(),d._data=d._observe(e),d._markOfflineUpdatesAsDirty(),d._storeData(),d._addRange(d._data),d._process(d._data),d._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=ve)},_storeData:function(e){function t(e){var n,i,o,r=[];for(n=0;n<e.length;n++)i=e.at(n),o=i.toJSON(),s&&i.items?o.items=t(i.items):(o.uid=i.uid,a&&(i.isNew()?o.__state__="create":i.dirty&&(o.__state__="update"))),r.push(o);return r}var n,i,o,r,s=this._isServerGrouped(),a=this.reader.model;if(null!=this.options.offlineStorage){for(n=t(this._data),
i=[],o=0;o<this._destroyed.length;o++)r=this._destroyed[o].toJSON(),r.__state__="destroy",i.push(r);this.offlineData(n.concat(i)),e&&(this._pristineData=this._readData(n))}},_addRange:function(e){var t=this,n=t._skip||0,i=n+t._flatData(e,!0).length;t._ranges.push({start:n,end:i,data:e,timestamp:(new Date).getTime()}),t._ranges.sort(function(e,t){return e.start-t.start})},error:function(e,t,n){this._dequeueRequest(),this.trigger(ze,{}),this.trigger(Re,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=ce({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},e);return t.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),t.options.serverGrouping?t.reader.model&&n.group&&(n.group=L(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=B(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=L(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=L(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:de(n,i),options:e}:(i._requestInProgress=!0,i._pending=t,n())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(Re,{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,n=this,i=n.reader.model;return n._shouldDetachObservableParents=!0,e instanceof Qe?(n._shouldDetachObservableParents=!1,n._shouldWrap(e)&&(e.type=n.reader.model,e.wrapAll(e,e))):(t=n.pageSize()&&!n.options.serverPaging?W:Qe,e=new t(e,n.reader.model),e.parent=function(){return n.parent()}),n._isServerGrouped()&&T(e,i),n._changeHandler&&n._data&&n._data instanceof Qe?n._data.unbind(Ae,n._changeHandler):n._changeHandler=de(n._change,n),e.bind(Ae,n._changeHandler)},_updateTotalForAction:function(e,t){var n=this,i=parseInt(n._total,10);v(n._total)||(i=parseInt(n._pristineTotal,10)),"add"===e?i+=t.length:"remove"===e?i-=t.length:"itemchange"===e||"sync"===e||n.options.serverPaging?"sync"===e&&(i=n._pristineTotal=parseInt(n._total,10)):i=n._pristineTotal,n._total=i},_change:function(e){var t,n,i,o=this,r=e?e.action:"";if("remove"===r)for(t=0,n=e.items.length;t<n;t++)e.items[t].isNew&&e.items[t].isNew()||o._destroyed.push(e.items[t]);!o.options.autoSync||"add"!==r&&"remove"!==r&&"itemchange"!==r?(o._updateTotalForAction(r,e?e.items:[]),o._process(o._data,e)):(i=function(t){"sync"===t.action&&(o.unbind("change",i),o._updateTotalForAction(r,e.items))},o.first("change",i),o.sync())},_calculateAggregates:function(e,t){t=t||{};var n=new r(e),i=t.aggregate,o=t.filter;return o&&(n=n.filter(o)),n.aggregate(i)},_process:function(e,n){var i,o=this,r={};o.options.serverPaging!==!0&&(r.skip=o._skip,r.take=o._take||o._pageSize,r.skip===t&&o._page!==t&&o._pageSize!==t&&(r.skip=(o._page-1)*o._pageSize)),o.options.serverSorting!==!0&&(r.sort=o._sort),o.options.serverFiltering!==!0&&(r.filter=o._filter),o.options.serverGrouping!==!0&&(r.group=o._group),o.options.serverAggregates!==!0&&(r.aggregate=o._aggregate,o._aggregateResult=o._calculateAggregates(e,r)),i=o._queryProcess(e,r),o.view(i.data),i.total===t||o.options.serverFiltering||(o._total=i.total),n=n||{},n.items=n.items||o._view,o.trigger(Ae,n)},_queryProcess:function(e,t){return r.process(e,t)},_mergeState:function(e){var n=this;return e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=n._currentRangeStart=e.skip,n._take=e.take,n._skip===t&&(n._skip=n._currentRangeStart=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=s(e.sort)),e.filter&&(n._filter=e.filter=l(e.filter)),e.group&&(n._group=e.group=p(e.group)),e.aggregate&&(n._aggregate=e.aggregate=f(e.aggregate))),e},query:function(n){var i,o,r=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return r||(this._data===t||0===this._data.length)&&!this._destroyed.length?this.read(this._mergeState(n)):(o=this.trigger(Ie,{type:"read"}),o||(this.trigger(Fe),i=this._queryProcess(this._data,this._mergeState(n)),this.options.serverFiltering||(this._total=i.total!==t?i.total:this._data.length),this._aggregateResult=this._calculateAggregates(this._data,n),this.view(i.data),this.trigger(ze,{type:"read"}),this.trigger(Ae,{items:i.data})),e.Deferred().resolve(o).promise())},fetch:function(e){var t=this,n=function(n){n!==!0&&be(e)&&e.call(t)};return this._query().then(n)},_query:function(e){var t=this;return t.query(ce({},{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,n=t.page(),i=t.total();if(e=e||{},n&&!(i&&n+1>t.totalPages()))return t._skip=t._currentRangeStart=n*t.take(),n+=1,e.page=n,t._query(e),n},prev:function(e){var t=this,n=t.page();if(e=e||{},n&&1!==n)return t._skip=t._currentRangeStart=t._skip-t.take(),n-=1,e.page=n,t._query(e),n},page:function(e){var n,i=this;return e!==t?(e=Ne.max(Ne.min(Ne.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Ne.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n.trigger("reset"),n._query({filter:e,page:1}),t)},group:function(e){var n=this;return e!==t?(n._query({group:e}),t):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){var e=this._aggregateResult;return he(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!he(e))for(t={},fe(e)||(e=[e]),n=0;n<e.length;n++)t[e[n].aggregate]=0,i[e[n].field]=t;return i},_wrapInEmptyGroup:function(e){var t,n,i,o,r=this.group();for(i=r.length-1,o=0;i>=o;i--)n=r[i],t={value:e.get(n.field),field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Ne.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Ne.min(e+t,n.total());return!n.options.serverPaging&&n._data.length>0||n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(e,n){var i,o,r,s,a,l,c,d;if(this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=Ne.min(e||0,this.total()),i=this,o=Ne.max(Ne.floor(e/n),0)*n,r=Ne.min(o+n,i.total()),s=i._findRange(e,Ne.min(e+n,i.total())),s.length){i._pending=t,i._skip=e>i.skip()?Ne.min(r,(i.totalPages()-1)*i.take()):o,i._currentRangeStart=e,i._take=n,a=i.options.serverPaging,l=i.options.serverSorting,c=i.options.serverFiltering,d=i.options.serverAggregates;try{i.options.serverPaging=!0,i._isServerGrouped()||i.group()&&i.group().length||(i.options.serverSorting=!0),i.options.serverFiltering=!0,i.options.serverPaging=!0,i.options.serverAggregates=!0,a&&(i._detachObservableParents(),i._data=s=i._observe(s)),i._process(s)}finally{i.options.serverPaging=a,i.options.serverSorting=l,i.options.serverFiltering=c,i.options.serverAggregates=d}}else n!==t&&(i._rangeExists(o,r)?o<e&&i.prefetch(r,n,function(){i.range(e,n)}):i.prefetch(o,n,function(){e>o&&r<i.total()&&!i._rangeExists(r,Ne.min(r+n,i.total()))?i.prefetch(r,n,function(){i.range(e,n)}):i.range(e,n)}))},_findRange:function(e,n){var i,o,r,a,l,c,d,u,h,f,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(i=_[o],e>=i.start&&e<=i.end){for(f=0,r=o;r<m;r++)if(i=_[r],h=v._flatData(i.data,!0),h.length&&e+f>=i.start&&(c=i.data,d=i.end,y||(g=p(v.group()||[]).concat(s(v.sort()||[])),u=v._queryProcess(i.data,{sort:g,filter:v.filter()}),h=c=u.data,u.total!==t&&(d=u.total)),a=0,e+f>i.start&&(a=e+f-i.start),l=h.length,d>n&&(l-=d-n),f+=l-a,b=v._mergeGroups(b,c,a,l),n<=i.end&&f==n-e))return b;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var o,r=t.toJSON();return e.length&&(o=e[e.length-1]),C(o,r,n,i),e.concat(r)}return e.concat(t.slice(n,i))},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var o=this,r=o._timeStamp();return function(s){var a,l,c,d=!1,u={start:e,end:t,data:[],timestamp:o._timeStamp()};if(o._dequeueRequest(),o.trigger(ze,{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];break}d||o._ranges.push(u)}u.data=o._observe(c),u.end=u.start+o._flatData(u.data,!0).length,o._ranges.sort(function(e,t){return e.start-t.start}),o._total=o.reader.total(s),(i||r>=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&(n&&c.length?n():o.trigger(Ae,{}))}},prefetch:function(e,t,n){var i=this,o=Ne.min(e+t,i.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,o)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(r,function(){i.trigger(Ie,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n),error:function(){var e=qe.call(arguments);i.error.apply(i,e)}})})},100))},_multiplePrefetch:function(e,t,n){var i=this,o=Ne.min(e+t,i.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,o)?n&&n():i.trigger(Ie,{type:"read"})||i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n,!0)})},_rangeExists:function(e,t){var n,i,o=this,r=o._ranges;for(n=0,i=r.length;n<i;n++)if(r[n].start<=e&&r[n].end>=t)return!0;return!1},_removeModelFromRanges:function(e){var t,n,i,o,r;for(o=0,r=this._ranges.length;o<r&&(i=this._ranges[o],this._eachItem(i.data,function(i){t=R(i,e),t&&(n=!0)}),!n);o++);},_updateRangesLength:function(){var e,t,n,i,o=0;for(n=0,i=this._ranges.length;n<i;n++)e=this._ranges[n],e.start=e.start-o,t=this._flatData(e.data,!0).length,o=e.end-t,e.end=e.start+t}}),oe={},oe.create=function(t,n,i){var o,r=t.transport?e.extend({},t.transport):null;return r?(r.read=typeof r.read===ke?{url:r.read}:r.read,"jsdo"===t.type&&(r.dataSource=i),t.type&&(_e.data.transports=_e.data.transports||{},_e.data.schemas=_e.data.schemas||{},_e.data.transports[t.type]?ue(_e.data.transports[t.type])?r=ce(!0,{},_e.data.transports[t.type],r):o=new _e.data.transports[t.type](ce(r,{data:n})):_e.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=ce(!0,{},_e.data.schemas[t.type],t.schema)),o||(o=be(r.read)?r:new ee(r))):o=new J({data:t.data||[]}),o},ie.create=function(e){(fe(e)||e instanceof Qe)&&(e={data:e});var n,i,o,r=e||{},s=r.data,a=r.fields,l=r.table,c=r.select,d={};if(s||!a||r.transport||(l?s=N(l,a):c&&(s=H(c,a),r.group===t&&s[0]&&s[0].optgroup!==t&&(r.group="optgroup"))),_e.data.Model&&a&&(!r.schema||!r.schema.model)){for(n=0,i=a.length;n<i;n++)o=a[n],o.type&&(d[o.field]=o);he(d)||(r.schema=ce(!0,r.schema,{model:{fields:d}}))}return r.data=s,c=null,r.select=null,l=null,r.table=null,r instanceof ie?r:new ie(r)},re=$.define({idField:"id",init:function(e){var t=this,n=t.hasChildren||e&&e.hasChildren,i="items",o={};_e.data.Model.fn.init.call(t,e),typeof t.children===ke&&(i=t.children),o={schema:{data:i,model:{hasChildren:n,id:t.idField,fields:t.fields}}},typeof t.children!==ke&&ce(o,t.children),o.data=e,n||(n=o.schema.data),typeof n===ke&&(n=_e.getter(n)),be(n)&&(t.hasChildren=!!n.call(t,t)),t._childrenOptions=o,t.hasChildren&&t._initChildren(),t._loaded=!(!e||!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof se||(e=i.children=new se(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e,t){return e[i.idField||"id"]=i.id,n&&(e=n(e,t)),e},e.parent=function(){return i},e.bind(Ae,function(e){e.node=e.node||i,i.trigger(Ae,e)}),e.bind(Re,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(Re,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var n,i,o={},r="_query";return this.hasChildren?(this._initChildren(),n=this.children,o[this.idField||"id"]=this.id,this._loaded||(n._data=t,r="read"),n.one(Ae,de(this._childrenLoaded,this)),i=n[r](o)):this.loaded(!0),i||e.Deferred().resolve().promise()},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return $.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),se=ie.extend({init:function(e){var t=re.define({children:e});ie.fn.init.call(this,ce(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(Re,function(t){e.trigger(Re,t)})},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=ie.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:O("success"),data:O("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),ie.fn.insert.call(this,e,t)},_find:function(e,t){var n,i,o,r,s=this._data;if(s){if(o=ie.fn[e].call(this,t))return o;for(s=this._flatData(this._data),n=0,i=s.length;n<i;n++)if(r=s[n].children,r instanceof se&&(o=r[e](t)))return o}},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),se.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,o=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||o&&(n=V(o,i)),t.data=n,t instanceof se?t:new se(t))},ae=_e.Observable.extend({init:function(e,t,n){_e.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!n;var i=this;e.bind("change",function(){i._change()}),e.bind("reset",function(){i._reset()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var n=this.pageSize,i=!0;return e>=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e<this.dataOffset||e>=this.skip+n)&&(i=this.range(Math.floor(e/n)*n)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),i?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):t:this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize+t,i=Ne.max(Ne.floor(n/t),0)*t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e,t){if(this.offset===e)return!0;var n=this,i=this.pageSize,o=Ne.max(Ne.floor(e/i),0)*i,r=this.dataSource;return t&&(o+=i),r.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(r.prefetch(o,i,function(){n.offset=e,n._recalculate(),n._goToRange(e,!0)}),!1)},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var e=this.dataSource;this.length=this.useRanges?e.lastRange().end:e.view().length,this._syncPending&&(this._syncWithDataSource(),this._recalculate(),this._syncPending=!1,this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),le=_e.Observable.extend({init:function(e,t){var n=this;_e.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new ae(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,n,i=this.buffer,o=e*this.batchSize,r=this.batchSize,s=[];for(i.offset>o&&i.at(i.offset-1),n=0;n<r&&(t=i.at(o+n),null!==t);n++)s.push(t);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),ce(!0,_e.data,{readers:{json:ne},Query:r,DataSource:ie,HierarchicalDataSource:se,Node:re,ObservableObject:j,ObservableArray:Qe,LazyObservableArray:W,LocalTransport:J,RemoteTransport:ee,Cache:te,DataReader:ne,Model:$,Buffer:ae,BatchBuffer:le})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.binder.min",["kendo.core.min","kendo.data.min"],e)}(function(){return function(e,t){function n(t,n,i){return v.extend({init:function(e,t,n){var i=this;v.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=R(i.dataBinding,i),i._dataBound=R(i.dataBound,i),i._itemChange=R(i.itemChange,i)},itemChange:function(e){s(e.item[0],e.data,this._ns(e.ns),[e.data].concat(this.bindings[t]._parents()))},dataBinding:function(e){var t,n,i=this.widget,o=e.removedItems||i.items();for(t=0,n=o.length;t<n;t++)c(o[t],!1)},_ns:function(t){t=t||C.ui;var n=[C.ui,C.dataviz.ui,C.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),C.rolesFromNamespaces(n)},dataBound:function(e){var i,o,r,a,l=this.widget,c=e.addedItems||l.items(),d=l[n],u=C.data.HierarchicalDataSource;if(!(u&&d instanceof u)&&c.length)for(r=e.addedDataItems||d.flatView(),a=this.bindings[t]._parents(),i=0,o=r.length;i<o;i++)s(c[i],r[i],this._ns(e.ns),[r[i]].concat(a))},refresh:function(e){var o,r,s,a=this,l=a.widget;e=e||{},e.action||(a.destroy(),l.bind("dataBinding",a._dataBinding),l.bind("dataBound",a._dataBound),l.bind("itemChange",a._itemChange),o=a.bindings[t].get(),l[n]instanceof C.data.DataSource&&l[n]!=o&&(o instanceof C.data.DataSource?l[i](o):o&&o._dataSource?l[i](o._dataSource):(l[n].data(o),r=C.ui.Select&&l instanceof C.ui.Select,s=C.ui.MultiSelect&&l instanceof C.ui.MultiSelect,a.bindings.value&&(r||s)&&l.value(f(a.bindings.value.get(),l.options.dataValueField)))))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}})}function i(e,t){var n=C.initWidget(e,{},t);if(n)return new y(n)}function o(e){var t,n,i,r,s,a,l,c={};for(l=e.match(k),t=0,n=l.length;t<n;t++)i=l[t],r=i.indexOf(":"),s=i.substring(0,r),a=i.substring(r+1),"{"==a.charAt(0)&&(a=o(a)),c[s]=a;return c}function r(e,t,n){var i,o={};for(i in e)o[i]=new n(t,e[i]);return o}function s(e,t,n,a){var c,d,u,h,f=e.getAttribute("data-"+C.ns+"role"),v=e.getAttribute("data-"+C.ns+"bind"),_=[],b=!0,y={};if(a=a||[t],(f||v)&&l(e,!1),f&&(u=i(e,n)),v&&(v=o(v.replace(x,"")),u||(y=C.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:N,valuePrimitive:!1,autoBind:!0}),y.roles=n,u=new w(e,y)),u.source=t,d=r(v,a,p),y.template&&(d.template=new g(a,"",y.template)),d.click&&(v.events=v.events||{},v.events.click=v.click,d.click.destroy(),delete d.click),d.source&&(b=!1),v.attr&&(d.attr=r(v.attr,a,p)),v.style&&(d.style=r(v.style,a,p)),v.events&&(d.events=r(v.events,a,m)),v.css&&(d.css=r(v.css,a,p)),u.bind(d)),u&&(e.kendoBindingTarget=u),h=e.children,b&&h){for(c=0;c<h.length;c++)_[c]=h[c];for(c=0;c<_.length;c++)s(_[c],t,n,a)}}function a(t,n){var i,o,r,a=C.rolesFromNamespaces([].slice.call(arguments,2));for(n=C.observable(n),t=e(t),i=0,o=t.length;i<o;i++)r=t[i],1===r.nodeType&&s(r,n,a)}function l(t,n){var i,o=t.kendoBindingTarget;o&&(o.destroy(),L?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),n&&(i=C.widgetInstance(e(t)),i&&typeof i.destroy===H&&i.destroy())}function c(e,t){l(e,t),d(e,t)}function d(e,t){var n,i,o=e.children;if(o)for(n=0,i=o.length;n<i;n++)c(o[n],t)}function u(t){var n,i;for(t=e(t),n=0,i=t.length;n<i;n++)c(t[n],!1)}function h(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&a(n,i.source,t)}function f(e,t){var n,i,o=[],r=0;if(!t)return e;if(e instanceof D){for(n=e.length;r<n;r++)i=e[r],o[r]=i.get?i.get(t):i[t];e=o}else e instanceof T&&(e=e.get(t));return e}var p,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={},M=C.Class,R=e.proxy,I="value",F="source",z="events",P="checked",B="css",L=!0,H="function",N="change";!function(){var e=document.createElement("a");try{delete e.test}catch(t){L=!1}}(),p=S.extend({init:function(e,t){var n=this;S.fn.init.call(n),n.source=e[0],n.parents=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof S,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(N,n._change))},_parents:function(){var t,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(t=i.parent(),e.inArray(t,n)<0&&(n=[t].concat(n))),n},change:function(e){var t,n,i=e.field,o=this;if("this"===o.path)o.trigger(N,e);else for(t in o.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){o.trigger(N,e);break}},start:function(e){e.bind("get",this._access)},stop:function(e){e.unbind("get",this._access)},get:function(){var e=this,n=e.source,i=0,o=e.path,r=n;if(!e.observable)return r;for(e.start(e.source),r=n.get(o);r===t&&n;)n=e.parents[++i],n instanceof T&&(r=n.get(o));if(r===t)for(n=e.source;r===t&&n;)n=n.parent(),n instanceof T&&(r=n.get(o));return"function"==typeof r&&(i=o.lastIndexOf("."),i>0&&(n=n.get(o.substring(0,i))),e.start(n),r=n!==e.source?r.call(n,e.source):r.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(N,e._change).bind(N,e._change)),e.stop(e.source),r},set:function(e){var t=this.currentSource||this.source,n=C.getter(this.path)(t);"function"==typeof n?t!==this.source?n.call(t,this.source,e):n.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(N,this._change),this.currentSource&&this.currentSource.unbind(N,this._change)),this.unbind()}}),m=p.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof T&&(e=t.get(n));return R(e,t)}}),g=p.extend({init:function(e,t,n){var i=this;p.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=M.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(N,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),_=v.extend({dataType:function(){var e=this.element.getAttribute("data-type")||this.element.type||"text";return e.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=C.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=C.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=C.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==C.parseFloat(e)?!!C.parseFloat(e):"true"===e.toLowerCase()),e}}),E.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),E.css=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.classes={}},refresh:function(t){var n=e(this.element),i=this.bindings.css[t],o=this.classes[t]=i.get();o?n.addClass(t):n.removeClass(t)}}),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,n){v.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],o=this.handlers[t];o&&n.off(t,o),o=this.handlers[t]=i.get(),n.on(t,i.source,o)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),E.text=v.extend({refresh:function(){var t=this.bindings.text.get(),n=this.element.getAttribute("data-format")||"";null==t&&(t=""),e(this.element).text(C.toString(t,n))}}),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,n,i){_.fn.init.call(this,t,n,i),this._change=R(this.change,this),this.eventName=i.valueUpdate||N,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=N,this.bindings[I].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[I].get(),null==e&&(e=""),t=this.dataType(),"date"==t?e=C.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=C.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),E.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof C.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof D||n instanceof C.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?C.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==n?"<tr><td>#:data#</td></tr>":"ul"==n||"ol"==n?"<li>#:data#</li>":"#:data#",t=C.template(t)),t},add:function(t,n){var i,o,r,a,l=this.container(),c=l.cloneNode(!1),d=l.children[t];if(e(c).html(C.render(this.template(),n)),c.children.length)for(i=this.bindings.source._parents(),o=0,r=n.length;o<r;o++)a=c.children[0],l.insertBefore(a,d||null),s(a,n[o],this.options.roles,[n[o]].concat(i))},remove:function(e,t){var n,i,o=this.container();for(n=0;n<t.length;n++)i=o.children[e],c(i,!0),i.parentNode==o&&o.removeChild(i)},render:function(){var t,n,i,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(),n=0,i=o.length;n<i;n++)s(r.children[n],o[n],this.options.roles,[o[n]].concat(t))}else e(r).html(C.render(a,o))}}),E.input={checked:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=R(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i=this.element,o=this.value();if("radio"==i.type)o=this.parsedValue(),this.bindings[P].set(o);else if("checkbox"==i.type)if(e=this.bindings[P].get(),e instanceof D){if(o=this.parsedValue(),o instanceof Date){for(n=0;n<e.length;n++)if(e[n]instanceof Date&&+e[n]===+o){t=n;break}}else t=e.indexOf(o);t>-1?e.splice(t,1):e.push(o)}else this.bindings[P].set(o)},refresh:function(){var e,t,n=this.bindings[P].get(),i=n,o=this.dataType(),r=this.element;if("checkbox"==r.type)if(i instanceof D){if(e=-1,n=this.parsedValue(),n instanceof Date){for(t=0;t<i.length;t++)if(i[t]instanceof Date&&+i[t]===+n){e=t;break}}else e=i.indexOf(n);r.checked=e>=0}else r.checked=i;else"radio"==r.type&&null!=n&&("date"==o?n=C.toString(n,"yyyy-MM-dd"):"datetime-local"==o&&(n=C.toString(n,"yyyy-MM-ddTHH:mm:ss")),r.checked=r.value===""+n)},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(n){var i,o=this,r=o.bindings.source.get();r instanceof D||r instanceof C.data.DataSource?(n=n||{},"add"==n.action?o.add(n.index,n.items):"remove"==n.action?o.remove(n.index,n.items):"itemchange"!=n.action&&n.action!==t||(o.render(),o.bindings.value&&o.bindings.value&&(i=f(o.bindings.value.get(),e(o.element).data("valueField")),null===i?o.element.selectedIndex=-1:o.element.value=i))):o.render()}}),value:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=R(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,o=this.dataType(),r=[];for(n=0,i=this.element.options.length;n<i;n++)t=this.element.options[n],t.selected&&(e=t.attributes.value,e=e&&e.specified?t.value:t.text,r.push(this._parseValue(e,o)));return r},change:function(){var e,n,i,o,r,s,a,l,c=[],d=this.element,u=this.options.valueField||this.options.textField,h=this.options.valuePrimitive;
for(r=0,s=d.options.length;r<s;r++)n=d.options[r],n.selected&&(o=n.attributes.value,o=o&&o.specified?n.value:n.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()),i=0;i<c.length;i++)for(r=0,s=e.length;r<s;r++)if(a=e[r].get(u),l=a+""===c[i]){c[i]=e[r];break}o=this.bindings[I].get(),o instanceof D?o.splice.apply(o,[0,o.length].concat(c)):this.bindings[I].set(h||!(o instanceof T||null===o||o===t)&&u?c[0].get(u):c[0])},refresh:function(){var e,t,n,i=this.element,o=i.options,r=this.bindings[I].get(),s=r,a=this.options.valueField||this.options.textField,l=!1,c=this.dataType();for(s instanceof D||(s=new D([r])),i.selectedIndex=-1,n=0;n<s.length;n++)for(r=s[n],a&&r instanceof T&&(r=r.get(a)),"date"==c?r=C.toString(s[n],"yyyy-MM-dd"):"datetime-local"==c&&(r=C.toString(s[n],"yyyy-MM-ddTHH:mm:ss")),e=0;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,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this.handlers={}},refresh:function(e){var t=this.bindings.events[e],n=this.handlers[e];n&&this.widget.unbind(e,n),n=t.get(),this.handlers[e]=function(e){e.data=t.source,n(e),e.data===t.source&&delete e.data},this.widget.bind(e,this.handlers[e])},destroy:function(){var e;for(e in this.handlers)this.widget.unbind(e,this.handlers[e])}}),checked:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=R(this.change,this),this.widget.bind(N,this._change)},change:function(){this.bindings[P].set(this.value())},refresh:function(){this.widget.check(this.bindings[P].get()===!0)},value:function(){var e=this.element,t=e.value;return"on"!=t&&"off"!=t||(t=e.checked),t},destroy:function(){this.widget.unbind(N,this._change)}}),visible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.visible.get();this.widget.wrapper[0].style.display=e?"":"none"}}),invisible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.invisible.get();this.widget.wrapper[0].style.display=e?"none":""}}),enabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:n("source","dataSource","setDataSource"),value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change);var o=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==o||o instanceof T),this._valueIsObservableArray=o instanceof D,this._initChange=!1},_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,n,i,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(n=s[o],i=n.get(l),c){for(e=0;e<t;e++)if(i==u[e]){u[e]=n;break}}else if(i==a){a=d?n:i;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,n,i,o,r,s,a,l,c;if(!this._initChange){if(e=this.widget,n=e.options,i=n.dataTextField,o=n.dataValueField||i,r=this.bindings.value.get(),s=n.text||"",a=0,c=[],r===t&&(r=null),o)if(r instanceof D){for(l=r.length;a<l;a++)c[a]=r[a].get(o);r=c}else r instanceof T&&(s=r.get(i),r=r.get(o));n.autoBind!==!1||n.cascadeFrom||!e.listView||e.listView.bound()?e.value(r):(i!==o||s||(s=r),s||!r&&0!==r||!n.valuePrimitive?e._preselect(r,s):e.value(r))}this._initChange=!1},destroy:function(){this.widget.unbind(N,this._change)}}),gantt:{dependencies:n("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(N,this._change),this._initChange=!1},change:function(){var e,n,i,o,r,s,a,l,c,d=this,u=d.bindings[I].get(),h=d.options.valuePrimitive,f=h?d.widget.value():d.widget.dataItems(),p=this.options.dataValueField||this.options.dataTextField;if(f=f.slice(0),d._initChange=!0,u instanceof D){for(e=[],n=f.length,i=0,o=0,r=u[i],s=!1;r!==t;){for(c=!1,o=0;o<n;o++)if(h?s=f[o]==r:(l=f[o],l=l.get?l.get(p):l,s=l==(r.get?r.get(p):r)),s){f.splice(o,1),n-=1,c=!0;break}c?i+=1:(e.push(r),b(u,i,1),a=i),r=u[i]}b(u,u.length,0,f),e.length&&u.trigger("change",{action:"remove",items:e,index:a}),f.length&&u.trigger("change",{action:"add",items:f,index:u.length-1})}else d.bindings[I].set(f);d._initChange=!1},refresh:function(){if(!this._initChange){var e,n,i=this.options,o=this.widget,r=i.dataValueField||i.dataTextField,s=this.bindings.value.get(),a=s,l=0,c=[];if(s===t&&(s=null),r)if(s instanceof D){for(e=s.length;l<e;l++)n=s[l],c[l]=n.get?n.get(r):n;s=c}else s instanceof T&&(s=s.get(r));i.autoBind!==!1||i.valuePrimitive===!0||o._isBound()?o.value(s):o._preselect(a,s)}},destroy:function(){this.widget.unbind(N,this._change)}})},scheduler:{source:n("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,o,r=this.widget,a=e.addedItems||r.items();if(a.length)for(i=e.addedDataItems||r.dataItems(),o=this.bindings.source._parents(),t=0,n=i.length;t<n;t++)s(a[t],i[t],this._ns(e.ns),[i[t]].concat(o))}})}},b=function(e,t,n,i){var o,r,s,a,l;if(i=i||[],n=n||0,o=i.length,r=e.length,s=[].slice.call(e,t+n),a=s.length,o){for(o=t+o,l=0;t<o;t++)e[t]=i[l],l++;e.length=o}else if(n)for(e.length=t,n+=t;t<n;)delete e[--n];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=M.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,o,r,s,a=this instanceof y,l=this.binders();for(t in e)t==I?n=!0:t==F?i=!0:t!=z||a?t==P?r=!0:t==B?s=!0:this.applyBinding(t,e,l):o=!0;i&&this.applyBinding(F,e,l),n&&this.applyBinding(I,e,l),r&&this.applyBinding(P,e,l),o&&!a&&this.applyBinding(z,e,l),s&&!a&&this.applyBinding(B,e,l)},binders:function(){return E[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,o=n[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 p)o.bind(s),r.push(s);else for(i in s)o.bind(s,i),r.push(s[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;e<t;e++)n[e].destroy()}}),y=w.extend({binders:function(){return E.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,o=n[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 p)o.bind(s),r.push(s);else for(i in s)o.bind(s,i),r.push(s[i])}}),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 n,i;for(n=0;n<e.length;n++)e[n]._initChildren(),i=e[n].children,i.fetch(),e[n].items=i.data(),t(e[n].items)}var n=C.data.HierarchicalDataSource.create(e);return n.fetch(),t(n.data()),n._data._dataSource=n,n._data}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.fx.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function o(e){var t,n=[];for(t in e)n.push(t);return n}function r(e){for(var t in e)U.indexOf(t)!=-1&&W.indexOf(t)==-1&&delete e[t];return e}function s(e,t){var n,i,o,r,s=[],a={};for(i in t)n=i.toLowerCase(),r=R&&U.indexOf(n)!=-1,!E.hasHW3D&&r&&W.indexOf(n)==-1?delete t[i]:(o=t[i],r?s.push(i+"("+o+")"):a[i]=o);return s.length&&(a[ae]=s.join(" ")),a}function a(e,t){var i,o,r;return R?(i=e.css(ae),i==K?"scale"==t?1:0:(o=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),r=0,o?r=n(o[1]):(o=i.match(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 n=p.extend(t),i=n.prototype.directions;S[l(e)]=n,S.Element.prototype[e]=function(e,t,i,o){return new n(this.element,e,t,i,o)},T(i,function(t,i){S.Element.prototype[e+l(i)]=function(e,t,o){return new n(this.element,i,e,t,o)}})}function d(e,n,i,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(n),u=!(isNaN(d)||d==i);s=u?d:t!==this._startValue?this._startValue:c?i:o,a=t!==this._endValue?this._endValue:c?o:i,this._reverse?(e[n]=a,r[n]=s):(e[n]=s,r[n]=a),l._shouldHide=r[n]===o}})}function u(e,t){var n=C.directions[t].vertical,i=e[n?Z:X]()/2+"px";return _[t].replace("$size",i)}var h,f,p,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,M=E.browser,R=E.transforms,I=E.transitions,F={scale:0,scalex:0,scaley:0,scale3d:0},z={translate:0,translatex:0,translatey:0,translate3d:0},P=t!==document.documentElement.style.zoom&&!R,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,U=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],W=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],j={rotate:"deg",scale:"",skew:"px",translate:"px"},q=R.css,G=Math.round,$="",Y="px",K="none",Q="auto",X="width",Z="height",J="hidden",ee="origin",te="abortId",ne="overflow",ie="translate",oe="position",re="completeCallback",se=q+"transition",ae=q+"transform",le=q+"backface-visibility",ce=q+"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 I?S.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),R&&!I&&(T(W,function(n,i){e.fn[i]=function(n){if(t===n)return a(this,i);var o=e(this)[0],r=i+"("+n+j[i.replace(V,"")]+")";return o.style.cssText.indexOf(ae)==-1?e(this).css(ae,r):o.style.cssText=o.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),r),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),h=e.fx.prototype.cur,e.fx.prototype.cur=function(){return W.indexOf(this.prop)!=-1?parseFloat(e(this.elem)[this.prop]()):h.apply(this,arguments)}),C.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),I&&(n=D({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(se,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(se,"").css(Z)},n.duration)),T(t,function(t,n){e.toggleClass(n,i)})),e},C.parseEffects=function(e,t){var n={};return"string"==typeof e?T(e.split(" "),function(e,i){var o=!O.test(i),r=i.replace(N,function(e,t,n){return t+":"+n.toLowerCase()}),s=r.split(":"),a=s[1],l={};s.length>1&&(l.direction=t&&o?he[a].reverse:a),n[s[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!O.test(e)&&(this.direction=he[i].reverse),n[e]=this}),n},I&&D(S,{transition:function(t,n,i){var r,a,l,c,d=0,u=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,c=function(){l||(l=!0,a&&(clearTimeout(a),a=null),t.removeData(te).dequeue().css(se,"").css(se),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=s(t,n),e.merge(u,o(r)),t.data("keys",e.unique(u)).height(),t.css(se,i.exclusive+" "+i.duration+"ms "+i.ease).css(se),t.css(r).css(ae),I.event&&(t.one(I.event,c),0!==i.duration&&(d=500)),a=setTimeout(c,i.duration+d),t.data(te,a),t.data(re,c)},stopQueue:function(e,t,n){var i,o=e.data("keys"),r=!n&&o,s=e.data(re);return r&&(i=C.getComputedStyles(e[0],o)),s&&s(),r&&e.css(i),e.removeData("keys").stop(t)}}),f=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,o,a,l,c,d,u=this,h=t.length,f=u.element,p=u.options,m=e.Deferred(),g={},v={};for(u.effects=t,m.then(e.proxy(u,"complete")),f.data("animating",!0),i=0;i<h;i++)for(n=t[i],n.setReverse(p.reverse),n.setOptions(p),u.addRestoreProperties(n.restore),n.prepare(g,v),l=n.children(),o=0,c=l.length;o<c;o++)l[o].duration(p.duration).run();for(d in p.effects)D(v,p.effects[d].properties);for(f.is(":visible")||D(g,{display:f.data("olddisplay")||"block"}),R&&!p.reset&&(a=f.data("targetTransform"),a&&(g=D(a,g))),g=s(f,g),R&&!I&&(g=r(g)),f.css(g).css(ae),i=0;i<h;i++)t[i].setup();return p.init&&p.init(),f.data("targetTransform",v),S.animate(f,v,D({},p,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,o=e.length;i<o;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;e<t;e++)n=this.restore[e],i.css(n,i.data(n))},complete:function(){var t=this,n=0,i=t.element,o=t.options,r=t.effects,s=r.length;for(i.removeData("animating").dequeue(),o.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),P&&!R&&setTimeout(e.proxy(this,"restoreCallback"),0);n<s;n++)r[n].teardown();o.completeCallback&&o.completeCallback(i)}}),S.promise=function(e,t){var n,i,o,r=[],s=new f(e,t),a=C.parseEffects(t.effects);t.effects=a;for(o in a)n=S[l(o)],n&&(i=new n(e,a[o].direction),r.push(i));r[0]?s.run(r):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),s.complete())},D(S,{animate:function(n,o,s){var a=s.transition!==!1;delete s.transition,I&&"transition"in S&&a?S.transition(n,o,s):R?n.animate(r(o),{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete}):n.each(function(){var n=e(this),r={};T(U,function(e,s){var a,l,c,d,u,h,f,p=o?o[s]+" ":null;p&&(l=o,s in F&&o[s]!==t?(a=p.match(L),R&&D(l,{scale:+a[0]})):s in z&&o[s]!==t&&(c=n.css(oe),d="absolute"==c||"fixed"==c,n.data(ie)||(d?n.data(ie,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(ie,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(ie),a=p.match(L),a&&(h=s==ie+"y"?0:+a[1],f=s==ie+"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(f)||D(l,{top:u.top+f}):isNaN(f)||D(l,{bottom:u.bottom-f})):(isNaN(h)||D(l,{marginLeft:u.left+h}),isNaN(f)||D(l,{marginTop:u.top+f})))),!R&&"scale"!=s&&s in l&&delete l[s],l&&D(r,l))}),M.msie&&delete r.scale,n.animate(r,{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete})})}}),S.animatedPromise=S.promise,p=C.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new f(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,o=i.element,a=0,l=i.restore,c=l.length,d=e.Deferred(),u={},h={},f=i.children(),p=f.length;for(d.then(e.proxy(i,"_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<p;a++)f[a].duration(i._duration).run();return i.prepare(u,h),o.is(":visible")||D(u,{display:o.data("olddisplay")||"block"}),R&&(n=o.data("targetTransform"),n&&(u=D(n,u))),u=s(o,u),R&&!I&&(u=r(u)),o.css(u).css(ae),i.setup(),o.data("targetTransform",h),S.animate(o,h,{duration:i._duration,complete:d.resolve}),d.promise()},stop:function(){var t=0,n=this.children(),i=n.length;for(t=0;t<i;t++)n[t].stop();return e(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;e<t;e++)n=this.restore[e],i.css(n,i.data(n))},_complete:function(){var t=this,n=t.element;n.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&n.data("olddisplay",n.css("display")).hide(),P&&!R&&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 n,i=this,o=i.element,r=C._outerWidth,s=C._outerHeight,a=he[i._direction],l=-a.modifier*(a.vertical?s(o):r(o)),c=l/(i.options&&i.options.divisor||1)+Y,d="0px";i._reverse&&(n=e,e=t,t=n),R?(e[a.transition]=c,t[a.transition]=d):(e[a.property]=c,t[a.property]=d)}}),c("tile",{directions:m,init:function(e,t,n){p.prototype.init.call(this,e,t),this.options={previous:n}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e.options.previousDivisor||1,o=e._direction,r=[C.fx(e.element).slideIn(o).setReverse(t)];return n&&r.push(C.fx(n).slideIn(he[o].reverse).divisor(i).setReverse(!t)),r}}),d("fade","opacity",1,0),d("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var n,i=this,o=i.element,r=i.options,s=o.data(ee),a=r.offset,l=i._reverse;l||null!==s||o.data(ee,parseFloat(o.css("margin-"+r.axis))),n=o.data(ee)||0,t["margin-"+r.axis]=l?n:n+a}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,o=n.options,r=o.offset.split(","),s=n._reverse;R?(t.translatex=s?0:r[0],t.translatey=s?0:r[1]):(t.left=s?0:r[0],t.top=s?0:r[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[ne],prepare:function(e,n){var i=this,o=i.element,r=i.options,s=i._reverse,a="vertical"===i._direction?Z: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,n[a]=(s?0:d)+Y,e[a]=(s?d:0)+Y,c===t&&o.data(a,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?Z:X,i=t.data(n);i!=Q&&i!==$||setTimeout(function(){t.css(n,Q).css(n)},0)}}),v={position:"absolute",marginLeft:0,marginTop:0,scale:1},c("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var n=this,i=n.element,o=S.box(i),r=S.box(n.options.target),s=a(i,"scale"),l=S.fillScale(r,o),c=S.transformOrigin(r,o);D(e,v),t.scale=1,i.css(ae,"scale(1)").css(ae),i.css(ae,"scale("+s+")"),e.top=o.top,e.left=o.left,e.transformOrigin=c.x+Y+" "+c.y+Y,n._reverse?e.scale=l:t.scale=l}}),_={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},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,n){p.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,o=i?he[n._direction].reverse:n._direction,r=b[o];e.zIndex=1,n._clipInHalf&&(e.clip=u(n._container,C.directions[o].reverse)),e[le]=J,t[ae]=ue+(i?r.start:r.end),e[ae]=ue+(i?r.end:r.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:m,init:function(e,t,n){p.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?he[n._direction].reverse:n._direction;e.clip=u(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){p.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",o=C.directions[i].reverse,r=t._reverse,s=n.face.clone(!0).removeAttr("id"),a=n.back.clone(!0).removeAttr("id"),l=t.element;return r&&(e=i,i=o,o=e),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(r),C.fx(n.back).staticPage(o,l).setReverse(r),C.fx(s).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(r),C.fx(a).turningPage(o,l).clipInHalf(!0).temporary().setReverse(r)]},prepare:function(e,t){e[ce]=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,n,i){p.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",o=C.directions[i].reverse,r=t._reverse,s=t.element;return r&&(e=i,i=o,o=e),[C.fx(n.face).turningPage(i,s).face(!0).setReverse(r),C.fx(n.back).turningPage(o,s).setReverse(r)]},prepare:function(e){e[ce]=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,n,i){p.prototype.init.call(this,t),this._previous=e(n),this._transitionClass=i},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")},beforeTransition:function(e){return this._before=e,this},afterTransition:function(e){return this._after=e,this},_both:function(){return e().add(this._element).add(this._previous)},_containerClass:function(){var e=this._direction,t="k-fx k-fx-start k-fx-"+this._transitionClass;return e&&(t+=" k-fx-"+e),this._reverse&&(t+=" k-fx-reverse"),t},complete:function(t){if(!(!this.deferred||t&&e(t.target).is(y))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(I.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),w&&n.css(ne,""),this.isAbsolute||this._both().css(oe,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n=this,i=n.element,o=n._previous,r=i.parents().filter(o.parents()).first(),s=n._both(),a=e.Deferred(),l=i.css(oe);return r.length||(r=i.parent()),this.container=r,this.deferred=a,this.isAbsolute="absolute"==l,this.isAbsolute||s.css(oe,"absolute"),w&&(t=r.css(ne),r.css(ne,"hidden")),I?(i.addClass("k-fx-hidden"),r.addClass(this._containerClass()),this.completeProxy=e.proxy(this,"complete"),r.on(I.event,this.completeProxy),C.animationFrame(function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),o.css("display","").addClass("k-fx-current"),n._before(o,i),C.animationFrame(function(){r.removeClass("k-fx-start").addClass("k-fx-end"),n._after(o,i)})})):this.complete(),a.promise()},stop:function(){this.complete()}}),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,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),D(x,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,o){return o=1.70158,n*((e=e/i-1)*e*((o+1)*e+o)+1)+t}}),S.Animation=k,S.Transition=x,S.createEffect=c,S.box=function(t){t=e(t);var n=t.offset();return n.width=C._outerWidth(t),n.height=C._outerHeight(t),n},S.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},S.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},S.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],e)}(function(){return function(e,t){function n(e){if(!e)return{};var t=e.match(_)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var i=window.kendo,o=i.Observable,r="SCRIPT",s="init",a="show",l="hide",c="transitionStart",d="transitionEnd",u="attach",h="detach",f=/unrecognized expression/,p=o.extend({init:function(e,t){var n=this;t=t||{},o.fn.init.call(n),n.content=e,n.id=i.guid(),n.tagName=t.tagName||"div",n.model=t.model,n._wrap=t.wrap!==!1,this._evalTemplate=t.evalTemplate||!1,n._fragments={},n.bind([s,a,l,c,d],t)},render:function(t){var n=this,o=!n.element;return o&&(n.element=n._createElement()),t&&e(t).append(n.element),o&&(i.bind(n.element,n.model),n.trigger(s)),t&&(n._eachFragment(u),n.trigger(a)),n.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&&(i.unbind(e),i.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,n,o,s=this,a="<"+s.tagName+" />";try{n=e(document.getElementById(s.content)||s.content),n[0].tagName===r&&(n=n.html())}catch(l){f.test(l.message)&&(n=s.content)}return"string"==typeof n?(n=n.replace(/^\s+|\s+$/g,""),s._evalTemplate&&(n=i.template(n)(s.model||{})),t=e(a).append(n),s._wrap||(t=t.contents())):(t=n,s._evalTemplate&&(o=e(i.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=i.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=p.extend({init:function(e,t){p.fn.init.call(this,e,t),this.containers={}},container:function(e){var t=this.containers[e];return t||(t=this._createContainer(e),this.containers[e]=t),t},showIn:function(e,t,n){this.container(e).show(t,n)},_createContainer:function(e){var t,n=this.render(),i=n.find(e);if(!i.length&&n.is(e)){if(!n.is(e))throw Error("can't find a container with the specified "+e+" selector");i=n}return t=new b(i),t.bind("accepted",function(e){e.view.render(i)}),t}}),v=p.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=n(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&&i.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),c&&!t&&(u.reverse=!u.reverse),r.effect=i.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)}});i.ViewContainer=b,i.Fragment=v,i.Layout=g,i.View=p,i.ViewClone=m}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dom.min",["kendo.core.min"],e)}(function(){return function(e){function t(){this.node=null}function n(){}function i(e,t,n){this.nodeName=e,this.attr=t||{},this.children=n||[]}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,n){return new i(e,t,n)}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""}},n.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}},u=new n,i.prototype=new t,i.prototype.appendTo=function(e){var t,n=document.createElement(this.nodeName),i=this.children;for(t=0;t<i.length;t++)i[t].render(n,u);return e.appendChild(n),n},i.prototype.render=function(e,t){var n,i,o,r,s,a;if(t.nodeName!==this.nodeName)t.remove(),n=this.appendTo(e);else{if(n=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(n){e.replaceChild(n,t.node)}},u);for(i=0;i<r;i++)o[i].render(n,s[i]||u);for(i=r;i<a;i++)s[i].remove()}this.node=n,this.syncAttributes(t.attr),this.removeAttributes(t.attr)},i.prototype.syncAttributes=function(e){var t,n,i,o=this.attr;for(t in o)n=o[t],i=e[t],"style"===t?this.setStyle(n,i):n!==i&&this.setAttribute(t,n,i)},i.prototype.setStyle=function(e,t){var n,i=this.node;if(t)for(n in e)e[n]!==t[n]&&(i.style[n]=e[n]);else for(n in e)i.style[n]=e[n]},i.prototype.removeStyle=function(e){var t,n=this.attr.style||{},i=this.node;for(t in e)void 0===n[t]&&(i.style[t]="")},i.prototype.removeAttributes=function(e){var t,n=this.attr;for(t in e)"style"===t?this.removeStyle(e.style):void 0===n[t]&&this.removeAttribute(t)},i.prototype.removeAttribute=function(e){var t=this.node;"style"===e?t.style.cssText="":"className"===e?t.className="":t.removeAttribute(e)},i.prototype.setAttribute=function(e,t){var n=this.node;void 0!==n[e]?n[e]=t:n.setAttribute(e,t)},i.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 n;t.nodeName!==this.nodeName?(t.remove(),n=document.createTextNode(this.nodeValue),e.appendChild(n)):(n=t.node,this.nodeValue!==t.nodeValue&&n.parentNode&&(n.nodeValue=this.nodeValue)),this.node=n},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 n,i;if(t.nodeName!==this.nodeName||t.html!==this.html)for(t.remove(),n=e.lastChild,s(e,this.html),this.nodes=[],i=n?n.nextSibling:e.firstChild;i;i=i.nextSibling)this.nodes.push(i);else this.nodes=t.nodes.slice(0)}},h=document.createElement("div"),d.prototype={html:a,element:l,text:c,render:function(e){var t,n,i,o=this.children;for(t=0,n=e.length;t<n;t++)i=o[t],i?i.node&&i.node.parentNode||(i.remove(),i=u):i=u,e[t].render(this.root,i);for(t=n;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,n){(n||t)()}),function(e,define){define("kendo.ooxml.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){var t=Math.floor(e/26)-1;return(t>=0?n(t):"")+String.fromCharCode(65+e%26)}function i(e,t){return n(t)+(e+1)}function o(e,t){return n(t)+"$"+(e+1)}function r(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function s(e){return(e/7*100+.5)/100}function a(e){return.75*e}function l(e){return(e+"").replace(/[\x00-\x08]/g,"").replace(/\n/g,"\r\n")}function c(e){return e.length<6&&(e=e.replace(/(\w)/g,function(e,t){return t+t})),e=e.substring(1).toUpperCase(),e.length<8&&(e="FF"+e),e}function d(e){var t="thin";return 2===e?t="medium":3===e&&(t="thick"),t}function u(e,t){var n="";return t&&(n+="<"+e+' style="'+d(t.size)+'">',t.color&&(n+='<color rgb="'+c(t.color)+'"/>'),n+="</"+e+">"),n}function h(e){return"<border>"+u("left",e.left)+u("right",e.right)+u("top",e.top)+u("bottom",e.bottom)+"</border>"}function f(e,t){var n,i,o,r=[],s=[];for(p(e,function(e,t){var n={_source:e,index:t,height:e.height,cells:[]};r.push(n),s[t]=n}),n=m(r).slice(0),i={rowData:r,rowsByIndex:s,mergedCells:t},o=0;o<n.length;o++)g(n[o],i),delete n[o]._source;return m(r)}function p(e,t){var n,i,o;for(n=0;n<e.length;n++)i=e[n],i&&(o=i.index,"number"!=typeof o&&(o=n),t(i,o))}function m(e){return e.sort(function(e,t){return e.index-t.index})}function g(e,t){var n,o,r,s,a,l,c,d=e._source,u=e.index,h=d.cells,f=e.cells;if(h)for(n=0;n<h.length;n++)if(o=h[n]||H,r=o.rowSpan||1,s=o.colSpan||1,a=v(f,o),w(o,f,a,s),(r>1||s>1)&&t.mergedCells.push(i(u,a)+":"+i(u+r-1,a+s-1)),r>1)for(l=u+1;l<u+r;l++)c=t.rowsByIndex[l],c||(c=t.rowsByIndex[l]={index:l,cells:[]},t.rowData.push(c)),w(o,c.cells,a-1,s+1)}function v(e,t){var n;return"number"==typeof t.index?(n=t.index,_(e,t,t.index)):n=b(e,t),n}function _(e,t,n){e[n]=t}function b(e,t){var n,i=e.length;for(n=0;n<e.length+1;n++)if(!e[n]){e[n]=t,i=n;break}return i}function w(e,t,n,i){var o,r;for(o=1;o<i;o++)r={borderTop:e.borderTop,borderRight:e.borderRight,borderBottom:e.borderBottom,borderLeft:e.borderLeft},_(t,r,n+o)}function y(e){return N({ref:e.ref,columns:e.columns,generators:{custom:O,dynamic:V,top:U,value:W}})}var k='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',x=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${creator}</dc:creator><cp:lastModifiedBy>${lastModifiedBy}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${created}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${modified}</dcterms:modified></cp:coreProperties>'),C=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>${sheets.length}</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="${sheets.length}" baseType="lpstr"># for (var idx = 0; idx < sheets.length; idx++) { ## if (sheets[idx].options.title) { #<vt:lpstr>${sheets[idx].options.title}</vt:lpstr># } else { #<vt:lpstr>Sheet${idx+1}</vt:lpstr># } ## } #</vt:vector></TitlesOfParts><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>14.0300</AppVersion></Properties>'),S=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="xml" ContentType="application/xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/># for (var idx = 1; idx <= count; idx++) { #<Override PartName="/xl/worksheets/sheet${idx}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /># } #<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /></Types>'),T=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" /><workbookPr defaultThemeVersion="124226" /><bookViews><workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" /></bookViews><sheets># for (var idx = 0; idx < sheets.length; idx++) { ## var options = sheets[idx].options; ## var name = options.name || options.title ## if (name) { #<sheet name="${name}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } else { #<sheet name="Sheet${idx+1}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } ## } #</sheets># if (filterNames.length || userNames.length) { #<definedNames> # for (var di = 0; di < filterNames.length; di++) { #<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="${filterNames[di].localSheetId}">${filterNames[di].name}!$${filterNames[di].from}:$${filterNames[di].to}</definedName> # } # # for (var i = 0; i < userNames.length; ++i) { #<definedName name="${userNames[i].name}" hidden="${userNames[i].hidden ? 1 : 0}" # if (userNames[i].localSheetId != null) { # localSheetId="${userNames[i].localSheetId}" # } #>${userNames[i].value}</definedName> # } #</definedNames># } #<calcPr fullCalcOnLoad="1" calcId="145621" /></workbook>'),D=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\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"><dimension ref="A1" /><sheetViews><sheetView #if(index==0) {# tabSelected="1" #}# workbookViewId="0" #if (showGridLines === false) {# showGridLines="0" #}#># if (frozenRows || frozenColumns) { #<pane state="frozen"# if (frozenColumns) { # xSplit="${frozenColumns}"# } ## if (frozenRows) { # ySplit="${frozenRows}"# } # topLeftCell="${String.fromCharCode(65 + (frozenColumns || 0))}${(frozenRows || 0)+1}"/># } #</sheetView></sheetViews><sheetFormatPr x14ac:dyDescent="0.25" defaultRowHeight="#= defaults.rowHeight ? defaults.rowHeight * 0.75 : 15 #" # if (defaults.columnWidth) { # defaultColWidth="#= kendo.ooxml.toWidth(defaults.columnWidth) #" # } # /># if (defaultCellStyleId != null || (columns && columns.length > 0)) { #<cols># if (!columns || !columns.length) { #<col min="1" max="16384" style="${defaultCellStyleId}" # if (defaults.columnWidth) { # width="#= kendo.ooxml.toWidth(defaults.columnWidth) #" # } # /># } ## for (var ci = 0; ci < columns.length; ci++) { ## var column = columns[ci]; ## var columnIndex = typeof column.index === "number" ? column.index + 1 : (ci + 1); ## if (column.width === 0) { #<col #if(defaultCellStyleId!=null){# style="${defaultCellStyleId}" #}#min="${columnIndex}" max="${columnIndex}" hidden="1" customWidth="1" /># } else if (column.width) { #<col #if(defaultCellStyleId!=null){# style="${defaultCellStyleId}" #}#min="${columnIndex}" max="${columnIndex}" customWidth="1"# if (column.autoWidth) { # width="${((column.width*7+5)/7*256)/256}" bestFit="1"# } else { # width="#= kendo.ooxml.toWidth(column.width) #" # } #/># } ## } #</cols># } #<sheetData># for (var ri = 0; ri < data.length; ri++) { ## var row = data[ri]; ## var rowIndex = typeof row.index === "number" ? row.index + 1 : (ri + 1); #<row r="${rowIndex}" x14ac:dyDescent="0.25" # if (row.height === 0) { # hidden="1" # }   else if (row.height) { # ht="#= kendo.ooxml.toHeight(row.height) #" customHeight="1" # } # ># for (var ci = 0; ci < row.data.length; ci++) { ## var cell = row.data[ci];#<c r="#=cell.ref#"# if (cell.style) { # s="#=cell.style#" # } ## if (cell.type) { # t="#=cell.type#"# } #># if (cell.formula != null) { #<f>${cell.formula}</f># } ## if (cell.value != null) { #<v>${cell.value}</v># } #</c># } #</row># } #</sheetData># if (autoFilter) { #<autoFilter ref="${autoFilter.from}:${autoFilter.to}"/># } else if (filter) { ##= kendo.ooxml.spreadsheetFilters(filter) ## } ## if (mergeCells.length) { #<mergeCells count="${mergeCells.length}"># for (var ci = 0; ci < mergeCells.length; ci++) { #<mergeCell ref="${mergeCells[ci]}"/># } #</mergeCells># } ## if (validations.length) { #<dataValidations># for (var vi = 0; vi < validations.length; vi++) { ## var val = validations[vi]; #<dataValidation sqref="#= val.sqref.join(" ") #" showErrorMessage="#= val.showErrorMessage #" type="#= val.type #"# if (val.type != "list") {# operator="#= val.operator #" # } # allowBlank="#= val.allowBlank #" showDropDown="#= val.showDropDown #"# if (val.error) {# error="#= val.error #" # } ## if (val.errorTitle) {# errorTitle="#= val.errorTitle #" # } #># if (val.formula1) { #<formula1>#= val.formula1 #</formula1># } ## if (val.formula2) { #<formula2>#= val.formula2 #</formula2># } #</dataValidation># } #</dataValidations># } ## if (hyperlinks.length) { #<hyperlinks># for (var hi = 0; hi < hyperlinks.length; hi++) { #<hyperlink ref="${hyperlinks[hi].ref}" r:id="rId${hi}"/># } #</hyperlinks># } #<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" /></worksheet>'),A=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"># for (var idx = 1; idx <= count; idx++) { #<Relationship Id="rId${idx}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${idx}.xml" /># } #<Relationship Id="rId${count+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" /><Relationship Id="rId${count+2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" /></Relationships>'),E=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"># for (var i = 0; i < hyperlinks.length; i++) { #<Relationship Id="rId${i}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="${hyperlinks[i].target}" TargetMode="External" /># } #</Relationships>'),M=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${count}" uniqueCount="${uniqueCount}"># for (var index in indexes) { #<si><t>${index.substring(1)}</t></si># } #</sst>'),R=t.template('<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="${formats.length}"># for (var fi = 0; fi < formats.length; fi++) { ## var format = formats[fi]; #<numFmt formatCode="${format.format}" numFmtId="${165+fi}" /># } #</numFmts><fonts count="${fonts.length+1}" x14ac:knownFonts="1"><font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><scheme val="minor" /></font># for (var fi = 0; fi < fonts.length; fi++) { ## var font = fonts[fi]; #<font># if (font.fontSize) { #<sz val="${font.fontSize}" /># } else { #<sz val="11" /># } ## if (font.bold) { #<b/># } ## if (font.italic) { #<i/># } ## if (font.underline) { #<u/># } ## if (font.color) { #<color rgb="${font.color}" /># } else { #<color theme="1" /># } ## if (font.fontFamily) { #<name val="${font.fontFamily}" /><family val="2" /># } else { #<name val="Calibri" /><family val="2" /><scheme val="minor" /># } #</font># } #</fonts><fills count="${fills.length+2}"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill># for (var fi = 0; fi < fills.length; fi++) { ## var fill = fills[fi]; ## if (fill.background) { #<fill><patternFill patternType="solid"><fgColor rgb="${fill.background}"/></patternFill></fill># } ## } #</fills><borders count="${borders.length+1}"><border><left/><right/><top/><bottom/><diagonal/></border># for (var bi = 0; bi < borders.length; bi++) { ##= kendo.ooxml.borderTemplate(borders[bi]) ## } #</borders><cellStyleXfs count="1"><xf borderId="0" fillId="0" fontId="0" /></cellStyleXfs><cellXfs count="${styles.length+1}"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/># for (var si = 0; si < styles.length; si++) { ## var style = styles[si]; #<xf xfId="0"# if (style.fontId) { # fontId="${style.fontId}" applyFont="1"# } ## if (style.fillId) { # fillId="${style.fillId}" applyFill="1"# } ## if (style.numFmtId) { # numFmtId="${style.numFmtId}" applyNumberFormat="1"# } ## if (style.textAlign || style.verticalAlign || style.wrap) { # applyAlignment="1"# } ## if (style.borderId) { # borderId="${style.borderId}" applyBorder="1"# } #># if (style.textAlign || style.verticalAlign || style.wrap) { #<alignment# if (style.textAlign) { # horizontal="${style.textAlign}"# } ## if (style.verticalAlign) { # vertical="${style.verticalAlign}"# } ## if (style.wrap) { # wrapText="1"# } #/># } #</xf># } #</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" /></styleSheet>'),I=new Date(1900,0,0),F=t.Class.extend({init:function(e,t,n,i){this.options=e,this._strings=t,this._styles=n,this._borders=i,this._validations={}},relsToXML:function(){var e=this.options.hyperlinks||[];return e.length?E({hyperlinks:e}):""},toXML:function(e){var t,n,o,s,a,l,c=this.options.mergedCells||[],d=this.options.rows||[],u=f(d,c);this._readCells(u),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:i(r(this.options),t.from),to:i(r(this.options),t.to)}:t&&t.ref&&t.columns&&(n=t,t=null),o=[];for(s in this._validations)Object.prototype.hasOwnProperty.call(this._validations,s)&&o.push(this._validations[s]);return a=null,this.options.defaultCellStyle&&(a=this._lookupStyle(this.options.defaultCellStyle)),l=this.options.freezePane||{},D({frozenColumns:this.options.frozenColumns||l.colSplit,frozenRows:this.options.frozenRows||l.rowSplit,columns:this.options.columns,defaults:this.options.defaults||{},data:u,index:e,mergeCells:c,autoFilter:t,filter:n,showGridLines:this.options.showGridLines,hyperlinks:this.options.hyperlinks||[],validations:o,defaultCellStyleId:a})},_lookupString:function(e){var t="$"+e,n=this._strings.indexes[t];return void 0!==n?e=n:(e=this._strings.indexes[t]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,e},_lookupStyle:function(n){var i,o=t.stringify(n);return"{}"==o?0:(i=e.inArray(o,this._styles),i<0&&(i=this._styles.push(o)-1),i+1)},_lookupBorder:function(n){var i,o=t.stringify(n);if("{}"!=o)return i=e.inArray(o,this._borders),i<0&&(i=this._borders.push(o)-1),i+1},_readCells:function(e){var t,n,i,o,r;for(t=0;t<e.length;t++)for(n=e[t],i=n.cells,n.data=[],o=0;o<i.length;o++)r=this._cell(i[o],n.index,o),r&&n.data.push(r)},_cell:function(e,n,o){var r,s,a,c,d,u,h,f,p,m;return e&&e!==H?(r=e.value,s={},e.borderLeft&&(s.left=e.borderLeft),e.borderRight&&(s.right=e.borderRight),e.borderTop&&(s.top=e.borderTop),e.borderBottom&&(s.bottom=e.borderBottom),s=this._lookupBorder(s),a=this.options.defaultCellStyle||{},c={borderId:s},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,n){var i=e[t];if(void 0===i&&(i=a[t]),void 0!==i)return c[n||t]=i,!0}),d=this.options.columns||[],u=d[o],h=typeof r,u&&u.autoWidth&&(f=r,"number"===h&&(f=t.toString(r,e.format)),u.width=Math.max(u.width||0,(f+"").length)),"string"===h?(r=l(r),r=this._lookupString(r),h="s"):"number"===h?h="n":"boolean"===h?(h="b",r=+r):r&&r.getTime?(h=null,p=(r.getTimezoneOffset()-I.getTimezoneOffset())*t.date.MS_PER_MINUTE,r=(r-I-p)/t.date.MS_PER_DAY+1,c.format||(c.format="mm-dd-yy")):(h=null,r=null),c=this._lookupStyle(c),m=i(n,o),e.validation&&this._addValidation(e.validation,m),{value:r,formula:e.formula,type:h,style:c,ref:m}):null},_addValidation:function(e,t){var n={showErrorMessage:"reject"==e.type?1:0,formula1:e.from,formula2:e.to,type:P[e.dataType]||e.dataType,operator:z[e.comparerType]||e.comparerType,allowBlank:e.allowNulls?1:0,showDropDown:e.showButton?0:1,error:e.messageTemplate,errorTitle:e.titleTemplate},i=JSON.stringify(n);this._validations[i]||(this._validations[i]=n,n.sqref=[]),this._validations[i].sqref.push(t)}}),z={greaterThanOrEqualTo:"greaterThanOrEqual",lessThanOrEqualTo:"lessThanOrEqual"},P={number:"decimal"},B={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},L=t.Class.extend({init:function(t){this.options=t||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._borders=[],this._sheets=e.map(this.options.sheets||[],e.proxy(function(e){return e.defaults=this.options,new F(e,this._strings,this._styles,this._borders)},this))},toDataURL:function(){var n,i,s,a,l,d,u,h,f,p,m,g,v,_,b,w,y,D,E;if("undefined"==typeof JSZip)throw Error("JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.");for(n=new JSZip,i=n.folder("docProps"),i.file("core.xml",x({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()})),s=this._sheets.length,i.file("app.xml",C({sheets:this._sheets})),a=n.folder("_rels"),a.file(".rels",k),l=n.folder("xl"),d=l.folder("_rels"),d.file("workbook.xml.rels",A({count:s})),u={},l.file("workbook.xml",T({sheets:this._sheets,filterNames:e.map(this._sheets,function(e,t){var n,i=e.options,s=i.name||i.title||"Sheet"+(t+1);if(u[s.toLowerCase()]=t,n=i.filter,n&&void 0!==n.from&&void 0!==n.to)return{localSheetId:t,name:s,from:o(r(i),n.from),to:o(r(i),n.to)}}),userNames:e.map(this.options.names||[],function(e){return{name:e.localName,localSheetId:e.sheet?u[e.sheet.toLowerCase()]:null,value:e.value,hidden:e.hidden}})})),h=l.folder("worksheets"),f=h.folder("_rels"),p=0;p<s;p++)m=this._sheets[p],g=t.format("sheet{0}.xml",p+1),v=m.relsToXML(),v&&f.file(g+".rels",v),h.file(g,m.toXML(p));return _=e.map(this._borders,e.parseJSON),b=e.map(this._styles,e.parseJSON),w=function(e){return e.underline||e.bold||e.italic||e.color||e.fontFamily||e.fontSize},y=e.map(b,function(e){if(e.color&&(e.color=c(e.color)),w(e))return e}),D=e.map(b,function(e){if(e.format&&void 0===B[e.format])return e}),E=e.map(b,function(e){if(e.background)return e.background=c(e.background),e}),l.file("styles.xml",R({fonts:y,fills:E,formats:D,borders:_,styles:e.map(b,function(t){var n={};return w(t)&&(n.fontId=e.inArray(t,y)+1),t.background&&(n.fillId=e.inArray(t,E)+2),n.textAlign=t.textAlign,n.verticalAlign=t.verticalAlign,n.wrap=t.wrap,n.borderId=t.borderId,t.format&&(n.numFmtId=void 0!==B[t.format]?B[t.format]:165+e.inArray(t,D)),n})})),l.file("sharedStrings.xml",M(this._strings)),n.file("[Content_Types].xml",S({count:s})),"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"+n.generate({compression:"DEFLATE"})}}),H={},N=t.template('<autoFilter ref="${ref}"># for (var i = 0; i < columns.length; ++i) { ## var col = columns[i]; #<filterColumn colId="${col.index}">#= generators[col.filter](col) #</filterColumn># } #</autoFilter>'),O=t.template('<customFilters# if (logic == "and") {# and="1"# } #># for (var i = 0; i < criteria.length; ++i) { ## var f = criteria[i]; ## var op = kendo.ooxml.spreadsheetFilters.customOperator(f); ## var val = kendo.ooxml.spreadsheetFilters.customValue(f); #<customFilter# if (op) {# operator="${op}"#}# val="${val}"/># } #</customFilters>'),V=t.template('<dynamicFilter type="${kendo.ooxml.spreadsheetFilters.dynamicFilterType(type)}" />'),U=t.template('<top10 percent="#= /percent$/i.test(type) ? 1 : 0 #" top="#= /^top/i.test(type) ? 1 : 0 #"  val="#: value #" />'),W=t.template('<filters# if (blanks) {# blank="1"#}#># for (var i = 0; i < values.length; ++i) { #<filter val="${values[i]}" /># } #</filters>');y.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()]},y.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)+"*"}return e.value},y.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},t.ooxml={Workbook:L,Worksheet:F,toWidth:s,toHeight:a,borderTemplate:h,spreadsheetFilters:y}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.excel.min",["kendo.core.min","kendo.data.min","kendo.ooxml.min"],e)}(function(){return function(e,t){t.ExcelExporter=t.Class.extend({init:function(n){var i,o,r;n.columns=this._trimColumns(n.columns||[]),this.allColumns=e.map(this._leafColumns(n.columns||[]),this._prepareColumn),this.columns=e.grep(this.allColumns,function(e){return!e.hidden}),this.options=n,i=n.dataSource,i instanceof t.data.DataSource?(this.dataSource=new i.constructor(e.extend({},i.options,{page:n.allPages?0:i.page(),filter:i.filter(),pageSize:n.allPages?i.total():i.pageSize(),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)},_trimColumns:function(t){var n=this;return e.grep(t,function(e){var t=!!e.field;return!t&&e.columns&&(t=n._trimColumns(e.columns).length>0),t})},_leafColumns:function(e){var t,n=[];for(t=0;t<e.length;t++)e[t].columns?n=n.concat(this._leafColumns(e[t].columns)):n.push(e[t]);return n},workbook:function(){return e.Deferred(e.proxy(function(t){this.dataSource.fetch().then(e.proxy(function(){var e={sheets:[{columns:this._columns(),rows:this._rows(),freezePane:this._freezePane(),filter:this._filter()}]};t.resolve(e,this.dataSource.view())},this))},this)).promise()},_prepareColumn:function(n){var i,o;if(n.field)return i=function(e){return e.get(n.field)},o=null,n.values&&(o={},e.each(n.values,function(){o[this.value]=this.text}),i=function(e){return o[e.get(n.field)]}),e.extend({},n,{value:i,values:o,groupHeaderTemplate:t.template(n.groupHeaderTemplate||"#= title #: #= value #"),groupFooterTemplate:n.groupFooterTemplate?t.template(n.groupFooterTemplate):null,footerTemplate:n.footerTemplate?t.template(n.footerTemplate):null})},_filter:function(){if(!this.options.filterable)return null;var e=this._depth();return{from:e,to:e+this.columns.length-1}},_dataRow:function(t,n,i){var o,r,s,a,l,c,d,u,h,f;for(this._hierarchical()&&(n=this.dataSource.level(t)+1),o=[],r=0;r<n;r++)o[r]={background:"#dfdfdf",color:"#333"};if(i&&t.items)return s=e.grep(this.allColumns,function(e){return e.field==t.field})[0],a=s&&s.title?s.title:t.field,l=s?s.groupHeaderTemplate:null,c=a+": "+t.value,d=e.extend({title:a,field:t.field,value:s&&s.values?s.values[t.value]:t.value,aggregates:t.aggregates},t.aggregates[t.field]),l&&(c=l(d)),o.push({value:c,background:"#dfdfdf",color:"#333",colSpan:this.columns.length+i-n}),u=this._dataRows(t.items,n+1),u.unshift({type:"group-header",cells:o}),u.concat(this._footer(t));for(h=[],f=0;f<this.columns.length;f++)h[f]=this._cell(t,this.columns[f]);return this._hierarchical()&&(h[0].colSpan=i-n+1),[{type:"data",cells:o.concat(h)}]},_dataRows:function(e,t){var n,i=this._depth(),o=[];for(n=0;n<e.length;n++)o.push.apply(o,this._dataRow(e[n],t,i));return o},_footer:function(t){var n=[],i=!1,o=e.map(this.columns,e.proxy(function(n){return n.groupFooterTemplate?(i=!0,{background:"#dfdfdf",color:"#333",value:n.groupFooterTemplate(e.extend({},this.dataSource.aggregates(),t.aggregates,t.aggregates[n.field]))}):{background:"#dfdfdf",color:"#333"}},this));return i&&n.push({type:"group-footer",cells:e.map(Array(this.dataSource.group().length),function(){return{background:"#dfdfdf",color:"#333"}}).concat(o)}),n},_isColumnVisible:function(e){return this._visibleColumns([e]).length>0&&(e.field||e.columns)},_visibleColumns:function(t){var n=this;return e.grep(t,function(e){var t=!e.hidden;return t&&e.columns&&(t=n._visibleColumns(e.columns).length>0),t})},_headerRow:function(t,n){var i=e.map(t.cells,function(e){return{background:"#7a7a7a",color:"#fff",value:e.title,colSpan:e.colSpan>1?e.colSpan:1,rowSpan:t.rowSpan>1&&!e.colSpan?t.rowSpan:1}});return this._hierarchical()&&(i[0].colSpan=this._depth()+1),{type:"header",cells:e.map(Array(n.length),function(){return{background:"#7a7a7a",color:"#fff"}}).concat(i)}},_prependHeaderRows:function(e){var t,n=this.dataSource.group(),i=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(i,this.options.columns),t=i.length-1;t>=0;t--)e.unshift(this._headerRow(i[t],n))},_prepareHeaderRows:function(e,t,n,i){var o,r,s,a=i||e[e.length-1],l=e[a.index+1],c=0;for(s=0;s<t.length;s++)o=t[s],this._isColumnVisible(o)&&(r={title:o.title||o.field,colSpan:0},a.cells.push(r),o.columns&&o.columns.length&&(l||(l={rowSpan:0,cells:[],index:e.length},e.push(l)),r.colSpan=this._trimColumns(this._visibleColumns(o.columns)).length,this._prepareHeaderRows(e,o.columns,r,l),c+=r.colSpan-1,a.rowSpan=e.length-a.index));n&&(n.colSpan+=c)},_rows:function(){var t,n,i=this.dataSource.group(),o=this._dataRows(this.dataSource.view(),0);return this.columns.length&&(this._prependHeaderRows(o),t=!1,n=e.map(this.columns,e.proxy(function(n){if(n.footerTemplate){t=!0;var i=this.dataSource.aggregates();return{background:"#dfdfdf",color:"#333",value:n.footerTemplate(e.extend({},i,i[n.field]))}}return{background:"#dfdfdf",color:"#333"}},this)),t&&o.push({type:"footer",cells:e.map(Array(i.length),function(){return{background:"#dfdfdf",color:"#333"}}).concat(n)})),o},_headerDepth:function(e){var t,n,i=1,o=0;for(t=0;t<e.length;t++)e[t].columns&&(n=this._headerDepth(e[t].columns),n>o&&(o=n));return i+o},_freezePane:function(){var t=this._visibleColumns(this.options.columns||[]),n=this._visibleColumns(this._trimColumns(this._leafColumns(e.grep(t,function(e){return e.locked})))).length;return{rowSplit:this._headerDepth(t),colSplit:n?n+this.dataSource.group().length:0}},_cell:function(e,t){return{value:t.value(e)}},_hierarchical:function(){return this.options.hierarchy&&this.dataSource.level},_depth:function(){var e,t,n,i=this.dataSource,o=0;if(this._hierarchical()){for(e=i.view(),t=0;t<e.length;t++)n=i.level(e[t]),n>o&&(o=n);o++}else o=i.group().length;return o},_columns:function(){var t=this._depth(),n=e.map(Array(t),function(){return{width:20}});return n.concat(e.map(this.columns,function(e){return{width:parseInt(e.width,10),autoWidth:!e.width}}))}}),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 n=this.options.excel||{},i=new t.ExcelExporter({columns:this.columns,dataSource:this.dataSource,allPages:n.allPages,filterable:n.filterable,hierarchy:n.hierarchy});i.workbook().then(e.proxy(function(e,i){if(!this.trigger("excelExport",{workbook:e,data:i})){var o=new t.ooxml.Workbook(e);t.saveAs({dataURI:o.toDataURL(),fileName:e.fileName||n.fileName,proxyURL:n.proxyURL,forceProxy:n.forceProxy})}},this))}}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.signalr.min",["kendo.data.min"],e)}(function(){return function(e){var t=kendo.data.RemoteTransport.extend({init:function(e){var t,n=e&&e.signalr?e.signalr:{},i=n.promise;if(!i)throw Error('The "promise" option must be set.');if("function"!=typeof i.done||"function"!=typeof i.fail)throw Error('The "promise" option must be a Promise.');if(this.promise=i,t=n.hub,!t)throw Error('The "hub" option must be set.');if("function"!=typeof t.on||"function"!=typeof t.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=t,kendo.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(t,n){var i,o,r=this.hub,s=this.options.signalr.server;if(!s||!s[n])throw Error(kendo.format('The "server.{0}" option must be set.',n));i=[s[n]],o=this.parameterMap(t.data,n),e.isEmptyObject(o)||i.push(o),this.promise.done(function(){r.invoke.apply(r,i).done(t.success).fail(t.error)})},read:function(e){this._crud(e,"read")},create:function(e){this._crud(e,"create")},update:function(e){this._crud(e,"update")},destroy:function(e){this._crud(e,"destroy")}});e.extend(!0,kendo.data,{transports:{signalr:t}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/util.min",["kendo.core.min"],e)}(function(){return function(e){function t(){return e.Deferred()}function n(t){return e.when.apply(e,t)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:t,promiseAll:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.color.min",["kendo.core.min"],e)}(function(){function e(e,t,n){void 0===n&&(n="0");for(var i=e.toString(16);t>i.length;)i=n+i;return i}function t(e,t,n){var i=n;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function n(e,t){var i,o,s;if(null==e||"none"===e)return null;if(e instanceof c)return e;if(s=e.toLowerCase(),i=a.exec(s))return s="transparent"===i[1]?new d(1,1,1,0):n(r[i[1]],t),s.match=[i[1]],s;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(s))?o=new u(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),1):(i=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(s))?o=new u(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),1):(i=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(s))?o=new u(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),1):(i=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(s))?o=new u(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])):(i=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(s))?o=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,1):(i=/^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 d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),o)o.match=i;else if(!t)throw Error("Cannot parse color: "+s);return o}var i,o,r,s,a,l,c,d,u,h,f,p;window.kendo=window.kendo||{},i=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=["transparent"];for(l in r)r.hasOwnProperty(l)&&a.push(l);a=RegExp("^("+a.join("|")+")(\\W|$)","i"),c=i.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()===n(e).toCssRgba()},diff:function(e){var t,n;return null===e?NaN:(t=this.toBytes(),n=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-n.r),2)+Math.pow(.59*(t.g-n.g),2)+Math.pow(.11*(t.b-n.b),2)))},clone:function(){var e=this.toBytes();return e===this&&(e=new u(e.r,e.g,e.b,e.a)),e}}),d=c.extend({init:function(e,t,n,i){c.fn.init.call(this),this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this,i=n.r,o=n.g,r=n.b,s=Math.min(i,o,r),a=Math.max(i,o,r),l=a-s,c=a;return 0===l?new h(0,0,c,this.a):(0!==a?(t=l/a,e=i===a?(o-r)/l:o===a?2+(r-i)/l:4+(i-o)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new h(e,t,c,this.a))},toHSL:function(){var e,t,n,i=this,o=i.r,r=i.g,s=i.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(n=a-l,t=c>.5?n/(2-a-l):n/(a+l),a){case o:e=(r-s)/n+(r<s?6:0);break;case r:e=(s-o)/n+2;break;case s:e=(o-r)/n+4}e*=60,t*=100,c*=100}return new f(e,t,c,this.a)},toBytes:function(){return new u(255*this.r,255*this.g,255*this.b,this.a)}}),u=d.extend({init:function(e,t,n,i){d.fn.init.call(this,Math.round(e),Math.round(t),Math.round(n),i)},toRGB:function(){return new d(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}}),h=c.extend({init:function(e,t,n,i){c.fn.init.call(this),this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,o,r,s,a,l=this,c=l.h,u=l.s,h=l.v;if(0===u)e=t=n=h;else switch(c/=60,i=Math.floor(c),o=c-i,r=h*(1-u),s=h*(1-u*o),a=h*(1-u*(1-o)),i){case 0:e=h,t=a,n=r;break;case 1:e=s,t=h,n=r;break;case 2:e=r,t=h,n=a;break;case 3:e=r,t=s,n=h;break;case 4:e=a,t=r,n=h;break;default:e=h,t=r,n=s}return new d(e,t,n,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),f=c.extend({init:function(e,t,n,i){c.fn.init.call(this),this.h=e,this.s=t,this.l=n,this.a=i},toRGB:function(){var e,n,i,o,r,s=this,a=s.h,l=s.s,c=s.l;return 0===l?e=n=i=c:(a/=360,l/=100,c/=100,o=c<.5?c*(1+l):c+l-c*l,r=2*c-o,e=t(r,o,a+1/3),n=t(r,o,a),i=t(r,o,a-1/3)),new d(e,n,i,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}}),p=i.extend({init:function(e){var t,n,i,o,r,s,a,l=this;if(1===arguments.length)for(t=p.formats,n=this.resolveColor(e),i=0;i<t.length;i++)o=t[i].re,r=t[i].process,s=o.exec(n),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),n=this.g.toString(16),i=this.b.toString(16);return"#"+e(t)+e(n)+e(i)},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,n,i){return new u(e,t,n,null!=i?i:1)},p.fromRGB=function(e,t,n,i){return new d(e,t,n,null!=i?i:1)},p.fromHSV=function(e,t,n,i){return new h(e,t,n,null!=i?i:1)},p.fromHSL=function(e,t,n,i){return new f(e,t,n,null!=i?i: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:n,Color:p})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/text-metrics.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){var t,n=[];for(t in e)n.push(t+e[t]);return n.sort().join("")}function n(e){var t,n=2166136261;for(t=0;t<e.length;++t)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=e.charCodeAt(t);return n>>>0}function i(){return{width:0,height:0,baseline:0}}function o(e,t,n){return l.current.measure(e,t,n)}var r,s,a,l;window.kendo.util=window.kendo.util||{},r=kendo.Class.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var n=this._map,i={key:e,value:t};n[e]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(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}}),s={baselineMarkerSize:1},"undefined"!=typeof document&&(a=document.createElement("div"),a.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;"),l=kendo.Class.extend({init:function(t){this._cache=new r(1e3),this.options=e.extend({},s,t)},measure:function(e,o,r){var s,l,c,d,u,h,f,p;if(!e)return i();if(s=t(o),l=n(e+s),c=this._cache.get(l))return c;d=i(),u=r||a,h=this._baselineMarker().cloneNode(!1);for(f in o)p=o[f],void 0!==p&&(u.style[f]=p);return u.textContent=e,u.appendChild(h),document.body.appendChild(u),(e+"").length&&(d.width=u.offsetWidth-this.options.baselineMarkerSize,d.height=u.offsetHeight,d.baseline=h.offsetTop+this.options.baselineMarkerSize),d.width>0&&d.height>0&&this._cache.put(l,d),u.parentNode.removeChild(u),d},_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}}),l.current=new l,kendo.deepExtend(kendo.util,{LRUCache:r,TextMetrics:l,measureText:o,objectKey:t,hashKey:n})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(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],n="";e>0;)e<t[0]?t.shift():(n+=Kt[t[0]],e-=t[0]);return n}function i(e){return typeof e!==Qt}function o(){return"kdef"+Xt++}function r(e){return e/Zt}function s(e){var t,n,i="";for(t=0;t<e.length;t++)n=e.charCodeAt(t),n<128?i+=nn(n):n<2048?(i+=nn(192|n>>>6),i+=nn(128|63&n)):n<65536&&(i+=nn(224|n>>>12),i+=nn(128|n>>>6&63),i+=nn(128|63&n));return i}function a(e){for(var t,n,i,o,r,a,l,c="",d=0,u=s(e);d<u.length;)t=u.charCodeAt(d++),n=u.charCodeAt(d++),i=u.charCodeAt(d++),o=t>>2,r=(3&t)<<4|n>>4,a=(15&n)<<2|i>>6,l=63&i,isNaN(n)?a=l=64:isNaN(i)&&(l=64),c=c+tn.charAt(o)+tn.charAt(r)+tn.charAt(a)+tn.charAt(l);return c}function l(e){return i((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||!i(e)}function u(e){if(e)return e[e.length-1]}function h(e,t,n){return Math.max(Math.min(e,n),t)}function f(e,t){function n(e,n){for(var i=[],o=0,r=0,s=0;o<e.length&&r<n.length;)t(e[o],n[r])<=0?i[s++]=e[o++]:i[s++]=n[r++];return o<e.length&&i.push.apply(i,e.slice(o)),r<n.length&&i.push.apply(i,n.slice(r)),i}return e.length<2?e.slice():function i(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=i(o),r=i(r),n(o,r))}(e)}function p(e){return e*Zt}function m(e){return e?Math.pow(10,e):1}function g(e,t){var n=m(t);return Math.round(e*n)/n}function v(e,t){return i(e)?e:t}function _(e,t){var n,i,o;for(n in t)for(i=n.trim().split(" "),o=0;o<i.length;o++)e.addEventListener(i[o],t[n],!1)}function b(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}function w(e,t){var n,i,o={},r=window.getComputedStyle(e),s=Array.isArray(t)?t:[t];for(n=0;n<s.length;n++)i=s[n],o[i]=r[i];return o}function y(e){return isNaN(e)?e:e+"px"}function k(e,t){var n,o,r;return t?(n=t.width,o=t.height,i(n)&&(e.style.width=y(n)),i(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 n,i,o;void 0===t&&(t={});for(n in t)for(i=n.trim().split(" "),o=0;o<i.length;o++)e.removeEventListener(i[o],t[n],!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 n,i,o;for(n=0;n<t.length;n++)i=t[n],o=i.charAt(0).toUpperCase()+i.substring(1,i.length),e["set"+o]=C(i),e["get"+o]=S(i)}function D(e){return e&&"function"==typeof e.matrix?e.matrix():e}function A(e){return null===e?null:e instanceof un?e:new un(e)}function E(e,t,n,i){var o=0,r=0;return i&&(o=Math.atan2(i.c*n,i.a*t),0!==i.b&&(r=Math.atan2(i.d*n,i.b*t))),{x:o,y:r}}function M(e){var t="_"+e;return function(e){return i(e)?(this._observerField(t,e),this.geometryChange(),this):this[t]}}function R(e,t){for(var n=0;n<t.length;n++)e[t[n]]=M(t[n])}function I(e,t,n){return void 0===n&&(n=yn),0===g(Math.abs(e-t),n)}function F(e,t,n){return e<t||I(e,t,n)}function z(e,t,n,i){var o=t.x-e.x,r=i.x-n.x,s=t.y-e.y,a=i.y-n.y,l=e.x-n.x,c=e.y-n.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 ln(e.x+h*o,e.y+h*s)}function P(e,t,n){var i,o=t;return e>o&&(o+=360),i=Math.abs(o-e),n||(i=360-i),i}function B(e,t,n,i,o,s){var a=g((o-e)/n,3),l=g((s-t)/i,3);return g(r(Math.atan2(l,a)))}function L(e){var t,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b=e.x1,w=e.y1,y=e.x2,k=e.y2,x=e.rx,C=e.ry,S=e.largeArc,T=e.swipe;if(w!==k)c=y-b,d=k-w,u=xn(x,2),h=xn(C,2),f=(h*c*(b+y)+u*d*(w+k))/(2*u*d),p=f-k,m=-(c*h)/(u*d),r=1/u+xn(m,2)/h,s=2*(m*p/h-y/u),a=xn(y,2)/u+xn(p,2)/h-1,l=Math.sqrt(xn(s,2)-4*r*a),t=(-s-l)/(2*r),n=f+m*t,i=(-s+l)/(2*r),o=f+m*i;else{if(b===y)return!1;s=-2*k,a=xn((y-b)*C/(2*x),2)+xn(k,2)-xn(C,2),l=Math.sqrt(xn(s,2)-4*a),t=i=(b+y)/2,n=(-s-l)/2,o=(-s+l)/2}return g=B(t,n,x,C,b,w),v=B(t,n,x,C,y,k),_=P(g,v,T),(S&&_<=180||!S&&_>180)&&(t=i,n=o,g=B(t,n,x,C,b,w),v=B(t,n,x,C,y,k)),{center:new ln(t,n),startAngle:g,endAngle:v}}function H(e,t){for(var n=e;n<t;)n+=90;return n}function N(e){var t="_"+e;return function(e){return i(e)?(this._observerField(t,ln.create(e)),this.geometryChange(),this):this[t]}}function O(e,t){for(var n=0;n<t.length;n++)e[t[n]]=N(t[n])}function V(e,t,n){var i=r(Math.atan2(t.y-e.y,t.x-e.x)),o=n.transformCopy(A().rotate(-i,e));return o.x<e.x}function U(e,t,n){var i=1-e;return Math.pow(i,3)*n[0][t]+3*Math.pow(i,2)*e*n[1][t]+3*Math.pow(e,2)*i*n[2][t]+Math.pow(e,3)*n[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 j(e){return e<0?-1:1}function q(e,t,n){var i=Math.sqrt(Math.pow(t,2)-4*e*n);return[(-t+i)/(2*e),(-t-i)/(2*e)]}function G(e,t,n,i){var o,r,s,a,l,c,d,u,h,f,p,m,v;return 0===e?q(t,n,i):(o=(3*e*n-Math.pow(t,2))/(3*Math.pow(e,2)),r=(2*Math.pow(t,3)-9*e*t*n+27*Math.pow(e,2)*i)/(27*Math.pow(e,3)),s=Math.pow(o/3,3)+Math.pow(r/2,2),a=new Fn(0,1),l=-t/(3*e),s<0?(c=new Fn(-r/2,Math.sqrt(-s)).nthRoot(3),d=new Fn(-r/2,(-Math.sqrt(-s))).nthRoot(3)):(c=-r/2+Math.sqrt(s),c=new Fn(j(c)*Math.pow(Math.abs(c),1/3)),d=-r/2-Math.sqrt(s),d=new Fn(j(d)*Math.pow(Math.abs(d),1/3))),u=c.add(d),p=c.add(d).multiplyConstant(-.5),m=c.add(d.negate()).multiplyConstant(Math.sqrt(3)/2),h=p.add(a.multiply(m)),f=p.add(a.negate().multiply(m)),v=[],u.isReal()&&v.push(g(u.real+l,yn)),h.isReal()&&v.push(g(h.real+l,yn)),f.isReal()&&v.push(g(f.real+l,yn)),v)}function $(e,t,n,i,o){var r,s,a=W(e,i),l=G(a[0],a[1],a[2],a[3]-t[i]);for(s=0;s<l.length;s++)if(0<=l[s]&&l[s]<=1&&(r=U(l[s],n,e),Math.abs(r-t[n])<=o))return!0}function Y(e,t,n){var i,o,r,s=W(e,"x"),a=G(s[0],s[1],s[2],s[3]-t.x),l=0;for(r=0;r<a.length;r++)i=U(a[r],"y",e),o=I(i,t.y)||i>t.y,o&&((0===a[r]||1===a[r])&&n.bottomRight().x>t.x||0<a[r]&&a[r]<1)&&l++;return l}function K(e,t,n){var i,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<=n.x&&n.x<r,i=s===a?n.y<=s&&l:l&&(a-s)*((e.x-t.x)*(e.y-t.y)>0?n.x-o:r-n.x)/(r-o)+s-n.y>=0),i?1:0}function Q(e){var t,n=e.length,i=Jt,o=en;for(t=0;t<n;t++)o=Math.max(o,e[t]),i=Math.min(i,e[t]);return{min:i,max:o}}function X(e,t,n){var i,o,r,s;for(o=0;o<e.length;o++)r=e[o],r.visible()&&(s=t?r.bbox(n):r.rawBBox(),s&&(i=i?dn.union(i,s):s));return i}function Z(e,t){var n,i,o,r;for(i=0;i<e.length;i++)o=e[i],o.visible()&&(r=o.clippedBBox(t),r&&(n=n?dn.union(n,r):r));return n}function J(e,t,n){var i=n.transform()||A(),o=i.matrix();o.e+=e.x-t.origin.x,o.f+=e.y-t.origin.y,i.matrix(o),n.transform(i)}function ee(e,t,n,i,o){var r;return r="start"===n?t.origin[i]:"end"===n?t.origin[i]+t.size[o]-e:t.origin[i]+(t.size[o]-e)/2}function te(e,t,n,i,o){var r,s,a;for(r=0;r<e.length;r++)s=e[r].clippedBBox(),s&&(a=s.origin.clone(),a[i]=ee(s.size[o],t,n||"start",i,o),J(a,s,e[r]))}function ne(e,t,n){te(e,t,n,"x","width")}function ie(e,t,n){te(e,t,n,"y","height")}function oe(e,t,n,i){var o,r,s,a,l;if(e.length>1)for(o=new ln,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[i],o[n]=l.origin[n],J(o,l,a),l.origin[t]=o[t],r=l}function re(e){var t,n,i,o=[];for(t=0;t<e.length;t++)n=e[t],i=n.clippedBBox(),i&&o.push({element:n,bbox:i});return o}function se(e){oe(re(e),"x","y","width")}function ae(e){oe(re(e),"y","x","height")}function le(e,t,n){var i,o,r,s,a=t.size[n],l=[],c=[],d=0,u=function(){c.push({element:i,bbox:o})};for(r=0;r<e.length;r++)i=e[r],o=i.clippedBBox(),o&&(s=o.size[n],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 ce(e,t,n,i,o){var r,s,a,l,c=le(e,t,o),d=t.origin.clone(),u=[];for(r=0;r<c.length;r++)for(s=c[r],a=s[0],d[i]=a.bbox.origin[i],J(d,a.bbox,a.element),a.bbox.origin[n]=d[n],oe(s,n,i,o),u.push([]),l=0;l<s.length;l++)u[r].push(s[l].element);return u}function de(e,t){return ce(e,t,"x","y","width")}function ue(e,t){return ce(e,t,"y","x","height")}function he(e,t){var n,i,o,r,s=e.clippedBBox();s&&(n=s.size,i=t.size,(i.width<n.width||i.height<n.height)&&(o=Math.min(i.width/n.width,i.height/n.height),r=e.transform()||A(),r.scale(o,o),e.transform(r)))}function fe(e){return function(t){return i(t)?(this.options.set(e,t),this):this.options.get(e)}}function pe(e,t){for(var n=0;n<t.length;n++)e[t[n]]=fe(t[n])}function me(e){return.5-Math.cos(e*Math.PI)/2}function ge(e){return e}function ve(e,t,n,i){var o=1.70158,r=0,s=i;return 0===e?n:1===e?n+i:(r||(r=.5),s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((+e-o)*(1.1*Math.PI)/r)+i+n)}function _e(e,t,n){var i,o=t?0:1;for(i=0;i<e.length;i+=2)e.splice(i+o,0,n)}function be(e,t){if(e&&t)return t.scaleCopy(2).translate(-e.x,-e.y)}function we(e,t,n){var i=t.clone().scale(2/3);return{controlOut:i.clone().translateWith(e.scaleCopy(oi)),controlIn:i.translateWith(n.scaleCopy(oi))}}function ye(e){var t=[];return e.replace(si,function(e,n){t.push(parseFloat(n))}),t}function ke(e,t){return i(t)&&null!==t?" "+e+"='"+t+"' ":""}function xe(e){var t,n="";for(t=0;t<e.length;t++)n+=ke(e[t][0],e[t][1]);return n}function Ce(e){var t,n,o="";for(t=0;t<e.length;t++)n=e[t][1],i(n)&&(o+=e[t][0]+":"+n+";");if(""!==o)return o}function Se(e,t){return"clip"===e||"fill"===e&&(!t||"Gradient"===t.nodeType)}function Te(){var e=document.getElementsByTagName("base")[0],t=document.location.href,n=t.indexOf("#"),i="";return e&&!qt.browser.msie&&(n!==-1&&(t=t.substring(0,n)),i=t),i}function De(e){return"url("+Te()+"#"+e+")"}function Ae(e){var t,n,i,o;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(r){}t&&(n=-t.e%1,i=-t.f%1,o=e.style,0===n&&0===i||(o.left=n+"px",o.top=i+"px"))}function Ee(e){if(!e||!e.indexOf||e.indexOf("&")<0)return e;var t=Ee._element;return t.innerHTML=e,t.textContent||t.innerText}function Me(e){var t,n,i,o=new Ri,r=e.clippedBBox(),s=e;return r&&(t=r.getOrigin(),n=new jn,n.transform(A().translate(-t.x,-t.y)),n.children.push(e),s=n),o.load([s]),i="<?xml version='1.0' ?><svg xmlns='"+mi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+o.render()+"</svg>",o.destroy(),i}function Re(e,t){var n,i,o,r,s,a,l=t.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),e.moveTo(i.x,i.y),o=1;o<l.length;o++)n=l[o],i=n.anchor(),r=l[o-1],s=r.controlOut(),a=n.controlIn(),s&&a?e.bezierCurveTo(s.x,s.y,a.x,a.y,i.x,i.y):e.lineTo(i.x,i.y);t.options.closed&&e.closePath()}}function Ie(e,t){return e._zIndex<t._zIndex?1:e._zIndex>t._zIndex?-1:0}function Fe(e,t){var n,i,o;for(n=0;n<t.length;n++)i=t[n],o=kendo.parseColor(i.color()),o.a*=i.opacity(),e.addColorStop(i.offset(),o.toCssRgba())}function ze(t,n){var i,o,r,s,a,l,c,d,u={width:"800px",height:"600px",cors:"Anonymous"},h=t,f=t.clippedBBox();return f&&(i=f.getOrigin(),h=new jn,h.transform(A().translate(-i.x,-i.y)),h.children.push(t),o=f.getSize(),u.width=o.width+"px",u.height=o.height+"px"),r=e.extend(u,n),s=document.createElement("div"),a=s.style,a.display="none",a.width=r.width,a.height=r.height,document.body.appendChild(s),l=new ro(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 n=Me(e);return t&&t.raw||(n="data:image/svg+xml;base64,"+a(n)),Gt().resolve(n)}function Be(e){return Array.prototype.slice.call(e)}function Le(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function He(e,t){e.classList?e.classList.remove(t):e.className=e.className.split(/\s+/).reduce(function(e,n){return n!=t&&e.push(n),e},[]).join(" ")}function Ne(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function Oe(e,t){if(e.closest)return e.closest(t);for(;e&&e!==document;){if(wo(e,t))return e;e=e.parentNode}}function Ve(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 Ue(e,t){function n(e){var n=new jn,i=e.getBoundingClientRect();return gt(n,[s.x,0,0,s.y,-i.left*s.x,-i.top*s.y]),_o._clipbox=!1,_o._matrix=an.unit(),_o._stackingContext={element:e,group:n},_o._avoidLinks=t.avoidLinks===!0?"a":t.avoidLinks,Le(e,"k-pdf-export"),Nt(e,n),He(e,"k-pdf-export"),n}function i(e){if(null!=e)return"string"==typeof e&&(e=kendo.template(e.replace(/^\s+|\s+$/g,""))),"function"==typeof e?function(t){var n,i=e(t);return i&&"string"==typeof i&&(n=document.createElement("div"),n.innerHTML=i,i=n.firstElementChild),i}:function(){return e.cloneNode(!0)}}function o(e,t,n,o,r,s,a){function l(){function t(){Xe(b,function(){e({pages:b,container:y})})}var i,o;("-"!=n||r)&&d(w),i=f(),w.parentNode.insertBefore(i,w),i.appendChild(w),v?(o=b.length,b.forEach(function(e,n){var i=v({element:e,pageNum:n+1,totalPages:b.length});i&&(e.appendChild(i),Ze(i,function(){0===--o&&t()}))})):t()}function c(e){if(a.keepTogether&&wo(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,i,o,s=rt(e),a=parseFloat(st(s,"padding-bottom")),l=parseFloat(st(s,"border-bottom-width")),u=k;for(k+=a+l,t=!0,i=e.firstChild;i;i=i.nextSibling)if(1==i.nodeType){if(t=!1,wo(i,n)){h(i);continue}if(!r){d(i);continue}if(!/^(?:static|relative)$/.test(st(rt(i),"position")))continue;o=p(i),1==o?h(i):o&&c(i)?h(i):d(i)}else 3==i.nodeType&&r&&(m(i,t),t=!1);k=u}function u(e){var t=e.parentNode,n=t.firstChild;if(e===n)return!0;if(e===t.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function h(e){var t,n,i,o,r,s,l;return 1==e.nodeType&&e!==w&&u(e)?h(e.parentNode):(t=Oe(e,"table"),n=t&&t.querySelector("colgroup"),a.repeatHeaders&&(i=t&&t.querySelector("thead"),o=Oe(e,'.k-grid[data-role="grid"]'),o&&o.querySelector(".k-auto-scrollable")&&(r=o.querySelector(".k-grid-header"))),s=f(),l=_.createRange(),l.setStartBefore(w),l.setEndBefore(e),s.appendChild(l.extractContents()),w.parentNode.insertBefore(s,w),g(e.parentNode),t&&(t=Oe(e,"table"),a.repeatHeaders&&i&&t.insertBefore(i.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),void(a.repeatHeaders&&r&&(o=Oe(e,'.k-grid[data-role="grid"]'),o.insertBefore(r.cloneNode(!0),o.firstChild))))}function f(){var e=_.createElement("KENDO-PDF-PAGE");return Ne(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 p(e){var t,n,i=e.getBoundingClientRect();return 0===i.width||0===i.height?0:(t=w.getBoundingClientRect().top,n=r-k,i.height>n?3:i.top-t>n?1:i.bottom-t>n?2:0)}function m(e,t){var n,i,o,r,s;/\S/.test(e.data)&&(n=e.data.length,i=_.createRange(),i.selectNodeContents(e),o=p(i),o&&(r=e,1==o?h(t?e.parentNode:e):(!function a(t,n,o){return i.setEnd(e,n),t==n||n==o?n:p(i)?a(t,t+n>>1,n):a(n,n+o>>1,o)}(0,n>>1,n),!/\S/.test(""+i)&&t?h(e.parentNode):(r=e.splitText(i.endOffset),s=f(),i.setStartBefore(w),s.appendChild(i.extractContents()),w.parentNode.insertBefore(s,w),g(r.parentNode))),m(r)))}function g(e){var t=Oe(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),g(t.parentNode))}var v=i(a.template),_=t.ownerDocument,b=[],w=a._destructive?t:yo(t),y=_.createElement("KENDO-PDF-DOCUMENT"),k=0;Be(w.querySelectorAll("tfoot")).forEach(function(e){e.parentNode.appendChild(e)}),Be(w.querySelectorAll("ol")).forEach(function(e){Be(e.children).forEach(function(e,t){e.setAttribute("kendo-split-index",t)})}),Ne(y,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),o&&(Ne(y,{width:o+"px",paddingLeft:s.left+"px",paddingRight:s.right+"px"}),Ne(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=Gt(),!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=Ve(t.scale||1),Ze(e,function(){var i,a=t&&t.forcePageBreak,l=t&&t.paperSize&&"auto"!=t.paperSize,c=kendo.pdf.getPaperOptions(function(e,n){return"paperSize"==e?l?t[e]:"A4":e in t?t[e]:n}),d=l&&c.paperSize[0],u=l&&c.paperSize[1],h=t.margin&&c.margin,f=!!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,i=new jn({pdf:{multiPage:!0,paperSize:l?c.paperSize:"auto",_ignoreMargin:f}}),o(function(e){if(t.progress){var o=!1,s=0;!function a(){if(s<e.pages.length){var l=n(e.pages[s]);i.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(i)}()}else e.pages.forEach(function(e){i.append(n(e))}),e.container.parentNode.removeChild(e.container),r.resolve(i)},e,a,d?d-h.left-h.right:null,u?u-h.top-h.bottom:null,h,t)):r.resolve(n(e))}),r}function We(e){function t(e){if(e){var t=null;try{t=e.cssRules}catch(n){}t&&i(e,t)}}function n(e){var t,n=st(e.style,"src");return n?xo(n).reduce(function(e,t){var n=Co(t);return n&&e.push(n),e},[]):(t=Co(e.cssText),t?[t]:[])}function i(e,i){var r,s,a,l,c,d,u;for(r=0;r<i.length;++r)switch(s=i[r],s.type){case 3:t(s.styleSheet);break;case 5:a=s.style,l=xo(st(a,"font-family")),c=/^([56789]00|bold)$/i.test(st(a,"font-weight")),d="italic"==st(a,"font-style"),u=n(s),u.length>0&&o(e,l,c,d,u[0])}}function o(e,t,n,i,o){/^data:/i.test(o)||/^[^\/:]+:\/\//.test(o)||/^\//.test(o)||(o=(e.href+"").replace(/[^\/]*$/,"")+o),t.forEach(function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),
n&&(e+="|bold"),i&&(e+="|italic"),r[e]=o})}var r,s;for(null==e&&(e=document),r={},s=0;s<e.styleSheets.length;++s)t(e.styleSheets[s]);return r}function je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qe(e){return e="_counter_"+e,_o[e]}function Ge(e){var t=[],n=_o;for(e="_counter_"+e;n;)je(n,e)&&t.push(n[e]),n=Object.getPrototypeOf(n);return t.reverse()}function $e(e,t){var n=_o;for(e="_counter_"+e;n&&!je(n,e);)n=Object.getPrototypeOf(n);n||(n=_o._root),n[e]=(n[e]||0)+(null==t?1:t)}function Ye(e,t){e="_counter_"+e,_o[e]=null==t?0:t}function Ke(e,t,n){var i,o,r;for(i=0;i<e.length;)o=e[i++],r=parseFloat(e[i]),isNaN(r)?t(o,n):(t(o,r),++i)}function Qe(e,t){var n=kendo.parseColor(e,!0);return n&&(n=n.toRGB(),t?n=n.toCssRgba():0===n.a&&(n=null)),n}function Xe(e,t){function n(){--i<=0&&t()}var i=0;e.forEach(function(e){var t,o,r=e.querySelectorAll("img");for(t=0;t<r.length;++t)o=r[t],o.complete||(i++,o.onload=o.onerror=n)}),i||n()}function Ze(e,t){function n(e){vo[e]||(vo[e]=!0,r.push(e))}function i(){--o<=0&&t()}var o,r=[];!function s(e){/^img$/i.test(e.tagName)&&n(e.src),ko(st(rt(e),"background-image")).forEach(function(e){"url"==e.type&&n(e.url)}),e.children&&Be(e.children).forEach(s)}(e),o=r.length,0===o&&i(),r.forEach(function(e){var t=vo[e]=new window.Image;/^data:/i.test(e)||(t.crossOrigin="Anonymous"),t.src=e,t.complete?i():(t.onload=i,t.onerror=function(){vo[e]=null,i()})})}function Je(e){var t,n="";do t=e%26,n=String.fromCharCode(97+t)+n,e=Math.floor(e/26);while(e>0);return n}function et(e,t,n){var i,o;_o=Object.create(_o),_o[e.tagName.toLowerCase()]={element:e,style:t},i=st(t,"text-decoration"),i&&"none"!=i&&(o=st(t,"color"),i.split(/\s+/g).forEach(function(e){_o[e]||(_o[e]=o)})),ot(t)&&(_o._stackingContext={element:e,group:n})}function tt(){_o=Object.getPrototypeOf(_o)}function nt(e){if(null!=_o._clipbox){var t=e.bbox(_o._matrix);_o._clipbox=_o._clipbox?dn.intersect(_o._clipbox,t):t}}function it(){var e=_o._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){var n=e.getPropertyValue(t);return null!=n&&""!==n||(mo.webkit?n=e.getPropertyValue("-webkit-"+t):mo.mozilla?n=e.getPropertyValue("-moz-"+t):mo.opera?n=e.getPropertyValue("-o-"+t):mo.msie&&(n=e.getPropertyValue("-ms-"+t))),n}function at(e,t,n,i){e.setProperty(t,n,i),mo.webkit?e.setProperty("-webkit-"+t,n,i):mo.mozilla?e.setProperty("-moz-"+t,n,i):mo.opera?e.setProperty("-o-"+t,n,i):mo.msie&&(e.setProperty("-ms-"+t,n,i),t="ms"+t.replace(/(^|-)([a-z])/g,function(e,t,n){return t+n.toUpperCase()}),e[t]=n)}function 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 n=e.style.cssText,i=t();return e.style.cssText=n,i}function dt(e,t){var n=st(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),bt({x:n[0],y:n[1]})}function ut(e){var t=e.getBoundingClientRect();return t=ht(t,"border-*-width",e),t=ht(t,"padding-*",e)}function ht(e,t,n){var i,o,r,s,a;return"string"==typeof t?(i=rt(n),o=parseFloat(st(i,t.replace("*","top"))),r=parseFloat(st(i,t.replace("*","right"))),s=parseFloat(st(i,t.replace("*","bottom"))),a=parseFloat(st(i,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 ft(e){var t,n,i=st(e,"transform");return"none"==i?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),t?(n=st(e,"transform-origin"),t=t[1].split(/\s*,\s*/g).map(parseFloat),n=n.split(/\s+/g).map(parseFloat),{matrix:t,origin:n}):void 0)}function pt(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 an(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,n,i){for(var o=new Cn([t,n],i).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,n,i,o){var r=Math.max(0,t.x),s=Math.max(0,t.y),a=Math.max(0,n.x),l=Math.max(0,n.y),c=Math.max(0,i.x),d=Math.max(0,i.y),u=Math.max(0,o.x),h=Math.max(0,o.y),f=Math.min(e.width/(r+a),e.height/(l+d),e.width/(c+u),e.height/(h+s));return f<1&&(r*=f,s*=f,a*=f,l*=f,c*=f,d*=f,u*=f,h*=f),{tl:{x:r,y:s},tr:{x:a,y:l},br:{x:c,y:d},bl:{x:u,y:h}}}function yt(e,t,n){var i,o,r,s,a,l,c,d,u=rt(e),h=dt(u,"top-left"),f=dt(u,"top-right"),p=dt(u,"bottom-left"),m=dt(u,"bottom-right");return"padding"!=n&&"content"!=n||(i=lt(u,"top"),o=lt(u,"right"),r=lt(u,"bottom"),s=lt(u,"left"),h.x-=s.width,h.y-=i.width,f.x-=o.width,f.y-=i.width,m.x-=o.width,m.y-=r.width,p.x-=s.width,p.y-=r.width,"content"==n&&(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,f.x-=l,f.y-=a,m.x-=l,m.y-=c,p.x-=d,p.y-=c)),"number"==typeof n&&(h.x-=n,h.y-=n,f.x-=n,f.y-=n,m.x-=n,m.y-=n,p.x-=n,p.y-=n),kt(t,h,f,m,p)}function kt(e,t,n,i,o){var r=wt(e,t,n,i,o),s=r.tl,a=r.tr,l=r.br,c=r.bl,d=new Pn({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 i=parseFloat(e)+"";switch(t){case"decimal-leading-zero":return i.length<2&&(i="0"+i),i;case"lower-roman":return n(e).toLowerCase();case"upper-roman":return n(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 i}}function Ct(e,t){function n(e,t,n){return n?(n=n.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),Ge(e).map(function(e){return xt(e,t)}).join(n)):xt(qe(e)||0,t)}var i,o=xo(t,/^\s+/),r=[];return o.forEach(function(t){var o;(i=/^\s*(["'])(.*)\1\s*$/.exec(t))?r.push(i[2].replace(/\\([0-9a-f]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})):(i=/^\s*counter\((.*?)\)\s*$/.exec(t))?(o=xo(i[1]),r.push(n(o[0],o[1]))):(i=/^\s*counters\((.*?)\)\s*$/.exec(t))?(o=xo(i[1]),r.push(n(o[0],o[2],o[1]))):r.push((i=/^\s*attr\((.*?)\)\s*$/.exec(t))?e.getAttribute(i[1])||"":t)}),r.join("")}function St(e){var t,n;if(e.cssText)return e.cssText;for(t=[],n=0;n<e.length;++n)t.push(e[n]+": "+st(e,e[n]));return t.join(";\n")}function Tt(e,t){function n(t,n){var o,r=rt(e,t);r.content&&"normal"!=r.content&&"none"!=r.content&&"0px"!=r.width&&(o=e.ownerDocument.createElement(go),o.style.cssText=St(r),o.textContent=Ct(e,r.content),e.insertBefore(o,n),i.push(o))}var i,o;return e.tagName==go?void Dt(e,t):(i=[],n(":before",e.firstChild),n(":after",null),o=e.className,e.className+=" kendo-pdf-hide-pseudo-elements",Dt(e,t),e.className=o,void i.forEach(function(t){e.removeChild(t)}))}function Dt(e,t){function i(t){var n,i,o,r,s,a;if(/^td$/i.test(e.tagName)&&(n=_o.table,n&&"collapse"==st(n.style,"border-collapse"))){if(i=lt(n.style,"left").width,o=lt(n.style,"top").width,0===i&&0===o)return t;if(r=n.element.getBoundingClientRect(),s=n.element.rows[0].cells[0],a=s.getBoundingClientRect(),a.top==r.top||a.left==r.left)return Be(t).map(function(e){return{left:e.left+i,top:e.top+o,right:e.right+i,bottom:e.bottom+o,height:e.height,width:e.width}})}return t}function o(e,n,i,o,r,s,a,l){function c(t,n,o){var r=Math.PI/2*t/(t+i),s={x:n.x-t,y:n.y-i},a=new Pn({fill:{color:e},stroke:null}).moveTo(0,0);gt(a,o),_t(a,0,n.y,{startAngle:-90,endAngle:-pt(r),radiusX:n.x,radiusY:n.y}),s.x>0&&s.y>0?(a.lineTo(s.x*Math.cos(r),n.y-s.y*Math.sin(r)),_t(a,0,n.y,{startAngle:-pt(r),endAngle:-90,radiusX:s.x,radiusY:s.y,anticlockwise:!0})):s.x>0?a.lineTo(s.x,i).lineTo(0,i):a.lineTo(s.x,i).lineTo(s.x,0),u.append(a.close())}if(!(i<=0)){var d,u=new jn;gt(u,l),t.append(u),bt(s),bt(a),d=new Pn({fill:{color:e},stroke:null}),u.append(d),d.moveTo(s.x?Math.max(s.x,o):0,0).lineTo(n-(a.x?Math.max(a.x,r):0),0).lineTo(n-Math.max(a.x,r),i).lineTo(Math.max(s.x,o),i).close(),s.x&&c(o,s,[-1,0,0,1,s.x,0]),a.x&&c(r,a,[1,0,0,1,n-a.x,0])}}function r(n){var i,o,r=new jn;for(vt(r,kt(n,C,S,D,T)),t.append(r),"A"==e.tagName&&e.href&&!/^#?$/.test(e.getAttribute("href"))&&(_o._avoidLinks&&wo(e,_o._avoidLinks)||(r._pdfLink={url:e.href,top:n.top,right:n.right,bottom:n.bottom,left:n.left})),E&&(i=new Pn({fill:{color:E.toCssRgba()},stroke:null}),i.moveTo(n.left,n.top).lineTo(n.right,n.top).lineTo(n.right,n.bottom).lineTo(n.left,n.bottom).close(),r.append(i)),o=c.length;--o>=0;)s(r,n,c[o],d[o%d.length],u[o%u.length],h[o%h.length],f[o%f.length])}function s(t,n,i,o,r,s,a){function l(t,n,i,l,c){function d(){for(;g.origin.x>n.left;)g.origin.x-=i}function u(){for(;g.origin.y>n.top;)g.origin.y-=l}function h(){for(;g.origin.x<n.right;)c(t,g.clone()),g.origin.x+=i}var f,p,m,g,v,_=i/l,b=n;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?(f=Math.min(b.width/i,b.height/l),i*=f,l*=f):"cover"==a?(f=Math.max(b.width/i,b.height/l),i*=f,l*=f):(p=a.split(/\s+/g),i=/%$/.test(p[0])?b.width*parseFloat(p[0])/100:parseFloat(p[0]),l=1==p.length||"auto"==p[1]?i/_:/%$/.test(p[1])?b.height*parseFloat(p[1])/100:parseFloat(p[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-i):parseFloat(m[0]),m[1]=/%$/.test(m[1])?parseFloat(m[1])/100*(b.height-l):parseFloat(m[1]),g=new dn([b.left+m[0],b.top+m[1]],[i,l]),"no-repeat"==o)c(t,g);else if("repeat-x"==o)d(),h();else if("repeat-y"==o)for(u();g.origin.y<n.bottom;)c(t,g.clone()),g.origin.y+=l;else if("repeat"==o)for(d(),u(),v=g.origin.clone();g.origin.y<n.bottom;)g.origin.x=v.x,h(),g.origin.y+=l}if(i&&"none"!=i)if("url"==i.type){if(/^url\(\"data:image\/svg/i.test(i.url))return;var c=vo[i.url];c&&c.width>0&&c.height>0&&l(t,n,c.width,c.height,function(e,t){e.append(new Un(i.url,t))})}else{if("linear"!=i.type)return;l(t,n,n.width,n.height,At(i))}}function a(){function i(n){ct(e,function(){e.style.position="relative";var i=e.ownerDocument.createElement(go);i.style.position="absolute",i.style.boxSizing="border-box","outside"==r?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",n(i),e.insertBefore(i,e.firstChild),Nt(i,t),e.removeChild(i)})}function o(t){var n,i=e.parentNode.children,o=e.getAttribute("kendo-split-index");if(null!=o)return t(0|o,i.length);for(n=0;n<i.length;++n)if(i[n]===e)return t(n,i.length)}var r,s=st(b,"list-style-type");if("none"!=s)switch(r=st(b,"list-style-position"),s){case"circle":case"disc":case"square":i(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":i(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":i(function(e){o(function(t){t=n(t+1),"upper-roman"==s&&(t=t.toUpperCase()),e.innerHTML=t+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":i(function(e){o(function(t){t=Je(t),/^upper/i.test(s)&&(t=t.toUpperCase()),e.innerHTML=t+"."})})}}function l(n,i,s){function a(e){return{x:e.y,y:e.x}}var l,c,d,u,h,f,p,m;if(0!==n.width&&0!==n.height&&(r(n),l=x.width>0&&(i&&"ltr"==A||s&&"rtl"==A),c=y.width>0&&(s&&"ltr"==A||i&&"rtl"==A),0!==w.width||0!==x.width||0!==y.width||0!==k.width)){if(w.color==y.color&&w.color==k.color&&w.color==x.color&&w.width==y.width&&w.width==k.width&&w.width==x.width&&l&&c)return n=ht(n,w.width/2),d=yt(e,n,w.width/2),d.options.stroke={color:w.color,width:w.width},void t.append(d);if(0===C.x&&0===S.x&&0===D.x&&0===T.x&&w.width<2&&x.width<2&&y.width<2&&k.width<2)return w.width>0&&t.append(new Pn({stroke:{width:w.width,color:w.color}}).moveTo(n.left,n.top+w.width/2).lineTo(n.right,n.top+w.width/2)),k.width>0&&t.append(new Pn({stroke:{width:k.width,color:k.color}}).moveTo(n.left,n.bottom-k.width/2).lineTo(n.right,n.bottom-k.width/2)),l&&t.append(new Pn({stroke:{width:x.width,color:x.color}}).moveTo(n.left+x.width/2,n.top).lineTo(n.left+x.width/2,n.bottom)),void(c&&t.append(new Pn({stroke:{width:y.width,color:y.color}}).moveTo(n.right-y.width/2,n.top).lineTo(n.right-y.width/2,n.bottom)));u=wt(n,C,S,D,T),h=u.tl,f=u.tr,p=u.br,m=u.bl,o(w.color,n.width,w.width,x.width,y.width,h,f,[1,0,0,1,n.left,n.top]),o(k.color,n.width,k.width,y.width,x.width,p,m,[-1,0,0,-1,n.right,n.bottom]),o(x.color,n.height,x.width,k.width,w.width,a(m),a(h),[0,-1,1,0,n.left,n.bottom]),o(y.color,n.height,y.width,w.width,k.width,a(f),a(p),[0,1,-1,0,n.right,n.top])}}var c,d,u,h,f,p,m,g,v,_,b=rt(e),w=lt(b,"top"),y=lt(b,"right"),k=lt(b,"bottom"),x=lt(b,"left"),C=dt(b,"top-left"),S=dt(b,"top-right"),T=dt(b,"bottom-left"),D=dt(b,"bottom-right"),A=st(b,"direction"),E=st(b,"background-color");if(E=Qe(E),c=ko(st(b,"background-image")),d=xo(st(b,"background-repeat")),u=xo(st(b,"background-position")),h=xo(st(b,"background-origin")),f=xo(st(b,"background-size")),mo.msie&&mo.version<10&&(u=xo(e.currentStyle.backgroundPosition)),p=ht(e.getBoundingClientRect(),"border-*-width",e),function(){var e,n,i,o,r,s,a,l=st(b,"clip"),c=/^\s*rect\((.*)\)\s*$/.exec(l);c&&(e=c[1].split(/[ ,]+/g),n="auto"==e[0]?p.top:parseFloat(e[0])+p.top,i="auto"==e[1]?p.right:parseFloat(e[1])+p.left,o="auto"==e[2]?p.bottom:parseFloat(e[2])+p.top,r="auto"==e[3]?p.left:parseFloat(e[3])+p.left,s=new jn,a=(new Pn).moveTo(r,n).lineTo(i,n).lineTo(i,o).lineTo(r,o).close(),vt(s,a),t.append(s),t=s,nt(a))}(),_=st(b,"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=i(m),g=0;g<m.length;++g)l(m[g],0===g,g==m.length-1);return m.length>0&&"list-item"==_&&!e.getAttribute("kendo-no-bullet")&&a(m[0]),function(){function n(){var n=yt(e,p,"padding"),i=new jn;vt(i,n),t.append(i),t=i,nt(n)}It(e)?n():/^(hidden|auto|scroll)/.test(st(b,"overflow"))?n():/^(hidden|auto|scroll)/.test(st(b,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(st(b,"overflow-y"))&&n()}(),Et(e,t)||Bt(e,t),t}function At(e){return function(t,n){var i,o,r,s,a,l,c,d,u,h,f,p,m,g=n.width(),v=n.height();switch(e.type){case"linear":switch(i=null!=e.angle?e.angle:Math.PI,e.to){case"top":i=0;break;case"left":i=-Math.PI/2;break;case"bottom":i=Math.PI;break;case"right":i=Math.PI/2;break;case"top left":case"left top":i=-Math.atan2(v,g);break;case"top right":case"right top":i=Math.atan2(v,g);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,g);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,g)}e.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),o=Math.abs(g*Math.sin(i))+Math.abs(v*Math.cos(i)),r=Math.atan(g*Math.tan(i)/v),s=Math.sin(r),a=Math.cos(r),l=Math.abs(s)+Math.abs(a),c=l/2*s,d=l/2*a,i>Math.PI/2&&i<=3*Math.PI/2&&(c=-c,d=-d),u=[],h=0,f=e.stops.map(function(t,n){var i,r=t.percent;return r?r=parseFloat(r)/100:t.length?r=parseFloat(t.length)/o:0===n?r=0:n==e.stops.length-1&&(r=1),i={color:t.color.toCssRgba(),offset:r},null!=r?(h=r,u.forEach(function(e,t){var n=e.stop;n.offset=e.left+(h-e.left)*(t+1)/(u.length+1)}),u=[]):u.push({left:h,stop:i}),i}),p=[.5-c,.5+d],m=[.5+c,.5-d],t.append(Pn.fromRect(n).stroke(null).fill(new Xn({start:p,end:m,stops:f,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function Et(e,t){var n,i,o,r;if(window.kendo&&window.kendo.jQuery&&e.getAttribute(window.kendo.attr("role"))&&(n=window.kendo.widgetInstance(window.kendo.jQuery(e)),n&&(n.exportDOMVisual||n.exportVisual)))return!!(i=n.exportDOMVisual?n.exportDOMVisual():n.exportVisual())&&(o=new jn,o.children.push(i),r=e.getBoundingClientRect(),o.transform(A().translate(r.left,r.top)),t.append(o),!0)}function Mt(e,t,n){var i=ut(e),o=new dn([i.left,i.top],[i.width,i.height]),r=new Un(t,o);vt(r,yt(e,i,"content")),n.append(r)}function Rt(e,t){var n=rt(e),i=rt(t),o=parseFloat(st(n,"z-index")),r=parseFloat(st(i,"z-index")),s=st(n,"position"),a=st(i,"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 It(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 zt(e,t){var n=rt(e),i=st(n,"color"),o=e.getBoundingClientRect();"checkbox"==e.type?(t.append(Pn.fromRect(new dn([o.left+1,o.top+1],[o.width-2,o.height-2])).stroke(i,1)),e.checked&&t.append((new Pn).stroke(i,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 wn(new pn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-2,o.height-2)/2)).stroke(i,1)),e.checked&&t.append(new wn(new pn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-8,o.height-8)/2)).fill(i).stroke(null)))}function Pt(e,t){var n,i,o,r,s,a=e.tagName.toLowerCase();if("input"==a&&("checkbox"==e.type||"radio"==e.type))return zt(e,t);if(n=e.parentNode,i=e.ownerDocument,o=i.createElement(go),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=i.createElement(go),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;n.insertBefore(o,e),o.scrollLeft=e.scrollLeft,o.scrollTop=e.scrollTop,e.style.display="none",Bt(o,t),e.style.display="",n.removeChild(o)}function Bt(e,t){var n,i,o,r,s,a,l,c,d;switch(_o._stackingContext.element===e&&(_o._stackingContext.group=t),e.tagName.toLowerCase()){case"img":Mt(e,e.src,t);break;case"canvas":try{Mt(e,e.toDataURL("image/png"),t)}catch(u){}break;case"textarea":case"input":case"select":Pt(e,t);break;default:for(n=[],i=[],o=[],r=[],s=e.firstChild;s;s=s.nextSibling)switch(s.nodeType){case 3:/\S/.test(s.data)&&Lt(e,s,t);break;case 1:a=rt(s),l=st(a,"display"),c=st(a,"float"),d=st(a,"position"),"static"!=d?r.push(s):"inline"!=l?"none"!=c?i.push(s):n.push(s):o.push(s)}f(n,Rt).forEach(function(e){Nt(e,t)}),f(i,Rt).forEach(function(e){Nt(e,t)}),f(o,Rt).forEach(function(e){Nt(e,t)}),f(r,Rt).forEach(function(e){Nt(e,t)})}}function Lt(e,t,n){function i(e){var t,n,i,o;if(mo.msie||mo.chrome){for(t=e.getClientRects(),n={top:1/0,right:-(1/0),bottom:-(1/0),left:1/0},i=0;i<t.length;++i)o=t[i],o.width<=1||o.bottom===k||(n.left=Math.min(o.left,n.left),n.top=Math.min(o.top,n.top),n.right=Math.max(o.right,n.right),n.bottom=Math.max(o.bottom,n.bottom));return n.width=n.right-n.left,n.height=n.bottom-n.top,n}return e.getBoundingClientRect()}function o(){var e,n,o,s,a,u,h,f=c,p=l.substr(c).search(/\S/);if(c+=p,p<0||c>=d)return!0;if(m.setStart(t,c),m.setEnd(t,c+1),e=i(m),n=!1,v&&(p=l.substr(c).search(/\s/),p>=0&&(m.setEnd(t,c+p),o=i(m),o.bottom==e.bottom&&(e=o,n=!0,c+=p))),!n){if(p=function g(n,o,r){m.setEnd(t,o);var s=i(m);return s.bottom!=e.bottom&&n<o?g(n,n+o>>1,o):s.right!=e.right?(e=s,o<r?g(o,o+r>>1,r):o):o}(c,Math.min(d,c+y),d),p==c)return!0;if(c=p,p=(""+m).search(/\s+$/),0===p)return!1;p>0&&(m.setEnd(t,m.startOffset+p),e=i(m))}if(mo.msie&&(e=m.getClientRects()[0]),s=""+m,/^(?:pre|pre-wrap)$/i.test(_)){if(/\t/.test(s)){for(a=0,p=f;p<m.startOffset;++p)u=l.charCodeAt(p),9==u?a+=8-a%8:10==u||13==u?a=0:a++;for(;(p=s.search("\t"))>=0;)h="        ".substr(0,8-(a+p)%8),s=s.substr(0,p)+h+s.substr(p+1)}}else s=s.replace(/\s+/g," ");n||(k=e.bottom),r(s,e)}function r(e,t){var i,o,r;mo.msie&&!isNaN(h)&&(i=So(f),o=(t.top+t.bottom-i)/2,t={top:o,right:t.right,bottom:o+i,left:t.left,height:i,width:t.right-t.left}),r=new bo(e,new dn([t.left,t.top],[t.width,t.height]),{font:f,fill:{color:p}}),n.append(r)}function s(e){function t(t,i){var o,r;t&&(o=u/12,r=new Pn({stroke:{width:o,color:t}}),i-=o,r.moveTo(e.left,i).lineTo(e.right,i),n.append(r))}t(x,e.bottom),t(C,e.bottom-e.height/2.7),t(S,e.top)}var a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k,x,C,S,T;if(!it()&&(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"),f=[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(p=st(a,"color"),m=e.ownerDocument.createRange(),g=st(a,"text-align"),v="justify"==g,_=st(a,"white-space"),mo.msie&&(b=a.textOverflow,"ellipsis"==b&&(w=e.style.textOverflow,e.style.textOverflow="clip")),y=e.getBoundingClientRect().width/u*5,0===y&&(y=500),k=null,x=_o.underline,C=_o["line-through"],S=_o.overline,T=x||C||S;!o(););mo.msie&&"ellipsis"==b&&(e.style.textOverflow=w),T&&(m.selectNode(t),Be(m.getClientRects()).forEach(s))}}function Ht(e,t,n){var i,o,r,s,a,l;for("auto"!=n?(i=_o._stackingContext.group,n=parseFloat(n)):(i=t,n=0),o=i.children,r=0;r<o.length&&!(null!=o[r]._dom_zIndex&&o[r]._dom_zIndex>n);++r);return s=new jn,i.insert(r,s),s._dom_zIndex=n,i!==t&&_o._clipbox&&(a=_o._matrix.invert(),l=_o._clipbox.transformCopy(a),vt(s,Pn.fromRect(l))),s}function Nt(e,t){var n,i,o,r,s,a,l,c=rt(e),d=st(c,"counter-reset");d&&Ke(xo(d,/^\s+/),Ye,0),n=st(c,"counter-increment"),n&&Ke(xo(n,/^\s+/),$e,1),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=_o._clipbox&&(i=parseFloat(st(c,"opacity")),o=st(c,"visibility"),r=st(c,"display"),0!==i&&"hidden"!=o&&"none"!=r&&(s=ft(c),l=st(c,"z-index"),(s||i<1)&&"auto"==l&&(l=0),a=Ht(e,t,l),i<1&&a.opacity(i*a.opacity()),et(e,c,a),s?ct(e,function(){var t,n,i,o;at(e.style,"transform","none","important"),at(e.style,"transition","none","important"),"static"==st(c,"position")&&at(e.style,"position","relative","important"),t=e.getBoundingClientRect(),n=t.left+s.origin[0],i=t.top+s.origin[1],o=[1,0,0,1,-n,-i],o=Ot(o,s.matrix),o=Ot(o,[1,0,0,1,n,i]),o=gt(a,o),_o._matrix=_o._matrix.multiplyCopy(o),Tt(e,a)}):Tt(e,a),tt()))}function Ot(e,t){var n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=t[0],c=t[1],d=t[2],u=t[3],h=t[4],f=t[5];return[n*l+i*d,n*c+i*u,o*l+r*d,o*c+r*u,s*l+a*d+h,s*c+a*u+f]}var Vt,Ut,Wt,jt,qt,Gt,$t,Yt,Kt,Qt,Xt,Zt,Jt,en,tn,nn,on,rn,sn,an,ln,cn,dn,un,hn,fn,pn,mn,gn,vn,_n,bn,wn,yn,kn,xn,Cn,Sn,Tn,Dn,An,En,Mn,Rn,In,Fn,zn,Pn,Bn,Ln,Hn,Nn,On,Vn,Un,Wn,jn,qn,Gn,$n,Yn,Kn,Qn,Xn,Zn,Jn,ei,ti,ni,ii,oi,ri,si,ai,li,ci,di,ui,hi,fi,pi,mi,gi,vi,_i,bi,wi,yi,ki,xi,Ci,Si,Ti,Di,Ai,Ei,Mi,Ri,Ii,Fi,zi,Pi,Bi,Li,Hi,Ni,Oi,Vi,Ui,Wi,ji,qi,Gi,$i,Yi,Ki,Qi,Xi,Zi,Ji,eo,to,no,io,oo,ro,so,ao,lo,co,uo,ho,fo,po,mo,go,vo,_o,bo,wo,yo,ko,xo,Co,So,To;window.kendo=window.kendo||{},Vt=kendo.drawing,Ut=Vt.util,Wt=kendo.Class,jt=kendo.util,qt=kendo.support,Gt=Ut.createPromise,$t=Ut.promiseAll,Yt={extend:function(e){var t,n=this;for(t in this)"extend"!==t&&(e[t]=n[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(),n=t.indexOf(e);return n!==-1&&t.splice(n,1),this},trigger:function(e,t){var n,i,o=this._observers;if(o&&!this._suspended)for(n=0;n<o.length;n++)i=o[n],i[e]&&i[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)}},Kt={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"},Qt="undefined",Xt=1,Zt=Math.PI/180,Jt=Number.MAX_VALUE,en=-Number.MAX_VALUE,tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",nn=String.fromCharCode,on={append:t,arabicToRoman:n,createPromise:Gt,defined:i,definitionId:o,deg:r,encodeBase64:a,eventCoordinates:l,eventElement:c,isTransparent:d,last:u,limitValue:h,mergeSort:f,promiseAll:$t,rad:p,round:g,valueOrDefault:v,bindEvents:_,elementOffset:b,elementSize:k,elementStyles:w,unbindEvents:x,DEG_TO_RAD:Zt,MAX_NUM:Jt,MIN_NUM:en},rn={}.toString,sn=Wt.extend({init:function(e,t){var n,i,o=this;void 0===t&&(t=""),this.prefix=t;for(n in e)i=e[n],i=o._wrap(i,n),o[n]=i},get:function(e){for(var t,n=e.split("."),i=this;n.length&&i;)t=n.shift(),i=i[t];return i},set:function(e,t){var n=this.get(e);n!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))},_set:function(e,t){var n,i,o,r=this,s=e.indexOf(".")>=0,a=this,l=e;if(s){for(n=l.split("."),i=this.prefix;n.length>1;)l=n.shift(),i+=l+".",o=a[l],o||(o=new sn({},i),o.addObserver(r),a[l]=o),a=o;l=n[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 n=rn.call(e),o=e;return null!==o&&i(o)&&"[object Object]"===n&&(e instanceof sn||e instanceof Wt||(o=new sn(o,this.prefix+t+".")),o.addObserver(this)),o}}),Yt.extend(sn.prototype),an=Wt.extend({init:function(e,t,n,i,o,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),this.a=e,this.b=t,this.c=n,this.d=i,this.e=o,this.f=r},multiplyCopy:function(e){return new an(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,n=e.b,i=e.c,o=e.d,r=e.e,s=e.f,a=t*o-n*i;return 0===a?null:new an(o/a,-n/a,-i/a,t/a,(i*s-o*r)/a,(n*r-t*s)/a)},clone:function(){return new an(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,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(i(e))for(t=0;t<n.length;t++)n[t]=g(n[t],e);return n},toString:function(e,t){return void 0===t&&(t=","),this.toArray(e).join(t)}}),an.translate=function(e,t){return new an(1,0,0,1,e,t)},an.unit=function(){return new an(1,0,0,1,0,0)},an.rotate=function(e,t,n){var i=new an;return i.a=Math.cos(p(e)),i.b=Math.sin(p(e)),i.c=-i.b,i.d=i.a,i.e=t-t*i.a+n*i.b||0,i.f=n-n*i.a-t*i.b||0,i},an.scale=function(e,t){return new an(e,0,0,t,0,0)},an.IDENTITY=an.unit(),ln=Wt.extend({init:function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t},equals:function(e){return e&&e.x===this.x&&e.y===this.y},clone:function(){return new ln(this.x,this.y)},rotate:function(e,t){var n=ln.create(t)||ln.ZERO;return this.transform(an.rotate(e,n.x,n.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),n=this,i=n.x,o=n.y;return this.x=t.a*i+t.c*o+t.e,this.y=t.b*i+t.d*o+t.f,this.geometryChange(),this},transformCopy:function(e){var t=this.clone();return e&&t.transform(e),t},distanceTo:function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},round:function(e){return this.x=g(this.x,e),this.y=g(this.y,e),this.geometryChange(),this},toArray:function(e){var t=i(e),n=t?g(this.x,e):this.x,o=t?g(this.y,e):this.y;return[n,o]},toString:function(e,t){var n,o,r;return void 0===t&&(t=" "),n=this,o=n.x,r=n.y,i(e)&&(o=g(o,e),r=g(r,e)),o+t+r}}),ln.create=function(e,t){if(i(e))return e instanceof ln?e:1===arguments.length&&2===e.length?new ln(e[0],e[1]):new ln(e,t)},ln.min=function(){var e,t,n=arguments,i=Jt,o=Jt;for(e=0;e<arguments.length;e++)t=n[e],i=Math.min(t.x,i),o=Math.min(t.y,o);return new ln(i,o)},ln.max=function(){var e,t,n=arguments,i=en,o=en;for(e=0;e<arguments.length;e++)t=n[e],i=Math.max(t.x,i),o=Math.max(t.y,o);return new ln(i,o)},ln.minPoint=function(){return new ln(en,en)},ln.maxPoint=function(){return new ln(Jt,Jt)},Object.defineProperties&&Object.defineProperties(ln,{ZERO:{get:function(){return new ln(0,0)}}}),T(ln.prototype,["x","y"]),Yt.extend(ln.prototype),cn=Wt.extend({init:function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.width=e,this.height=t},equals:function(e){return e&&e.width===this.width&&e.height===this.height},clone:function(){return new cn(this.width,this.height)},toArray:function(e){var t=i(e),n=t?g(this.width,e):this.width,o=t?g(this.height,e):this.height;return[n,o]}}),cn.create=function(e,t){if(i(e))return e instanceof cn?e:1===arguments.length&&2===e.length?new cn(e[0],e[1]):new cn(e,t)},Object.defineProperties&&Object.defineProperties(cn,{ZERO:{get:function(){return new cn(0,0)}}}),T(cn.prototype,["width","height"]),Yt.extend(cn.prototype),dn=Wt.extend({init:function(e,t){void 0===e&&(e=new ln),void 0===t&&(t=new cn),this.setOrigin(e),this.setSize(t)},clone:function(){return new dn(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",ln.create(e)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(e){return this._observerField("size",cn.create(e)),this.geometryChange(),this},getSize:function(){return this.size},width:function(){return this.size.width},height:function(){return this.size.height},topLeft:function(){return this.origin.clone()},bottomRight:function(){return this.origin.clone().translate(this.width(),this.height())},topRight:function(){return this.origin.clone().translate(this.width(),0)},bottomLeft:function(){return this.origin.clone().translate(0,this.height())},center:function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},bbox:function(e){var t=this.topLeft().transformCopy(e),n=this.topRight().transformCopy(e),i=this.bottomRight().transformCopy(e),o=this.bottomLeft().transformCopy(e);return dn.fromPoints(t,n,i,o)},transformCopy:function(e){return dn.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,n=this.bottomRight();return!(e.x<t.x||e.y<t.y||n.x<e.x||n.y<e.y)},_isOnPath:function(e,t){var n=this.expandCopy(t,t),i=this.expandCopy(-t,-t);return n.containsPoint(e)&&!i.containsPoint(e)}}),dn.fromPoints=function(){var e=ln.min.apply(null,arguments),t=ln.max.apply(null,arguments),n=new cn(t.x-e.x,t.y-e.y);return new dn(e,n)},dn.union=function(e,t){return dn.fromPoints(ln.min(e.topLeft(),t.topLeft()),ln.max(e.bottomRight(),t.bottomRight()))},dn.intersect=function(e,t){var n={left:e.topLeft().x,top:e.topLeft().y,right:e.bottomRight().x,bottom:e.bottomRight().y
},i={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y};if(n.left<=i.right&&i.left<=n.right&&n.top<=i.bottom&&i.top<=n.bottom)return dn.fromPoints(new ln(Math.max(n.left,i.left),Math.max(n.top,i.top)),new ln(Math.min(n.right,i.right),Math.min(n.bottom,i.bottom)))},Yt.extend(dn.prototype),un=Wt.extend({init:function(e){void 0===e&&(e=an.unit()),this._matrix=e},clone:function(){return new un(this._matrix.clone())},equals:function(e){return e&&e._matrix.equals(this._matrix)},translate:function(e,t){return this._matrix=this._matrix.multiplyCopy(an.translate(e,t)),this._optionsChange(),this},scale:function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=null);var i=n;return i&&(i=ln.create(i),this._matrix=this._matrix.multiplyCopy(an.translate(i.x,i.y))),this._matrix=this._matrix.multiplyCopy(an.scale(e,t)),i&&(this._matrix=this._matrix.multiplyCopy(an.translate(-i.x,-i.y))),this._optionsChange(),this},rotate:function(e,t){var n=ln.create(t)||ln.ZERO;return this._matrix=this._matrix.multiplyCopy(an.rotate(e,n.x,n.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(un.prototype),hn=Wt.extend({init:function(e){this._initOptions(e)},_initOptions:function(e){var t,n;void 0===e&&(e={}),t=e.clip,n=e.transform,n&&(e.transform=A(n)),t&&!t.id&&(t.id=o()),this.options=new sn(e),this.options.addObserver(this)},transform:function(e){return i(e)?void this.options.set("transform",A(e)):this.options.get("transform")},parentTransform:function(){for(var e,t,n=this;n.parent;)n=n.parent,t=n.transform(),t&&(e=t.matrix().multiplyCopy(e||an.unit()));if(e)return A(e)},currentTransform:function(e){var t,n,i,o;if(void 0===e&&(e=this.parentTransform()),t=this.transform(),n=D(t),i=D(e),o=n&&i?i.multiplyCopy(n):n||i)return A(o)},visible:function(e){return i(e)?(this.options.set("visible",e),this):this.options.get("visible")!==!1},clip:function(e){var t=this.options;return i(e)?(e&&!e.id&&(e.id=o()),t.set("clip",e),this):t.get("clip")},opacity:function(e){return i(e)?(this.options.set("opacity",e),this):v(this.options.get("opacity"),1)},clippedBBox:function(e){var t,n=this._clippedBBox(e);if(n)return t=this.clip(),t?dn.intersect(n,t.bbox(e)):n},containsPoint:function(e,t){var n,i;return!!this.visible()&&(n=this.currentTransform(t),i=e,n&&(i=e.transformCopy(n.matrix().invert())),this._hasFill()&&this._containsPoint(i)||this._isOnPath&&this._hasStroke()&&this._isOnPath(i))},_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)}}),hn.prototype.nodeType="Element",Yt.extend(hn.prototype),fn=Math.PI/2,pn=Wt.extend({init:function(e,t){void 0===e&&(e=new ln),void 0===t&&(t=0),this.setCenter(e),this.setRadius(t)},setCenter:function(e){return this._observerField("center",ln.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 pn(this.center.clone(),this.radius)},pointAt:function(e){return this._pointAt(p(e))},bbox:function(e){var t,n,i,o,r=this,s=E(this.center,this.radius,this.radius,e),a=ln.maxPoint(),l=ln.minPoint();for(t=0;t<4;t++)n=r._pointAt(s.x+t*fn).transformCopy(e),i=r._pointAt(s.y+t*fn).transformCopy(e),o=new ln(n.x,i.y),a=ln.min(a,o),l=ln.max(l,o);return dn.fromPoints(a,l)},_pointAt:function(e){var t=this,n=t.center,i=t.radius;return new ln(n.x+i*Math.cos(e),n.y+i*Math.sin(e))},containsPoint:function(e){var t=this,n=t.center,i=t.radius,o=Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)<=Math.pow(i,2);return o},_isOnPath:function(e,t){var n=this,i=n.center,o=n.radius,r=i.distanceTo(e);return o-t<=r&&r<=o+t}}),T(pn.prototype,["radius"]),Yt.extend(pn.prototype),mn="Gradient",gn={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var n,o=this.options;return i(e)?(e&&e.nodeType!==mn?(n={color:e},i(t)&&(n.opacity=t),o.set("fill",n)):o.set("fill",e),this):o.get("fill")},stroke:function(e,t,n){return i(e)?(this.options.set("stroke.color",e),i(t)&&this.options.set("stroke.width",t),i(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")}},vn=""+an.IDENTITY,_n={extend:function(e){e.bbox=this.bbox,e.geometryChange=this.geometryChange},bbox:function(e){var t,n,i=D(this.currentTransform(e)),o=i?""+i:vn;return this._bboxCache&&this._matrixHash===o?t=this._bboxCache.clone():(t=this._bbox(i),this._bboxCache=t?t.clone():null,this._matrixHash=o),n=this.options.get("stroke.width"),n&&t&&t.expand(n/2),t},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},bn="#000",wn=hn.extend({init:function(e,t){void 0===e&&(e=new pn),void 0===t&&(t={}),hn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke(bn)},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)}}),wn.prototype.nodeType="Circle",gn.extend(wn.prototype),_n.extend(wn.prototype),R(wn.prototype,["geometry"]),yn=10,kn=45,xn=Math.pow,Cn=Wt.extend({init:function(e,t){void 0===e&&(e=new ln),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},clone:function(){return new Cn(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(e){return this._observerField("center",ln.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(e){var t=this.center,n=p(e);return new ln(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))},curvePoints:function(){var e,t,n,i=this,o=this.startAngle,r=this.anticlockwise?-1:1,s=[this.pointAt(o)],a=this._arcInterval(),l=a.endAngle-a.startAngle,c=Math.ceil(l/kn),d=l/c,u=o;for(e=1;e<=c;e++)t=u+r*d,n=i._intervalCurvePoints(u,t),s.push(n.cp1,n.cp2,n.p2),u=t;return s},bbox:function(e){for(var t,n,i=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=H(c,s),f=H(d,s),p=this.pointAt(s).transformCopy(e),m=ln.min(p,u),g=ln.max(p,u);h<a||f<a;)t=void 0,h<a&&(t=i.pointAt(h).transformCopy(e),h+=90),n=void 0,f<a&&(n=i.pointAt(f).transformCopy(e),f+=90),p=new ln(t.x,n.y),m=ln.min(m,p),g=ln.max(g,p);return dn.fromPoints(m,g)},_arcInterval:function(){var e,t=this,n=t.startAngle,i=t.endAngle,o=t.anticlockwise;return o&&(e=n,n=i,i=e),(n>i||o&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(e,t){var n=this.pointAt(e),i=this.pointAt(t),o=this._derivativeAt(e),r=this._derivativeAt(t),s=(p(t)-p(e))/3,a=new ln(n.x+s*o.x,n.y+s*o.y),l=new ln(i.x-s*r.x,i.y-s*r.y);return{p1:n,cp1:a,cp2:l,p2:i}},_derivativeAt:function(e){var t=p(e);return new ln(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},containsPoint:function(e){var t,n,i,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(xn(l,2)*xn(Math.sin(u),2)+xn(c,2)*xn(Math.cos(u),2)),f=this.pointAt(this.startAngle).round(yn),p=this.pointAt(this.endAngle).round(yn),m=z(a,e.round(yn),f,p);return r<180?t=m&&F(a.distanceTo(m),d)&&F(d,h):(n=B(a.x,a.y,l,c,e.x,e.y),360!==n&&(n=(360+n)%360),i=o.startAngle<=n&&n<=o.endAngle,t=i&&F(d,h)||!i&&(!m||m.equals(e))),t},_isOnPath:function(e,t){var n,i=this._arcInterval(),o=this.center,r=B(o.x,o.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==r&&(r=(360+r)%360),n=i.startAngle<=r&&r<=i.endAngle,n&&this.pointAt(r).distanceTo(e)<=t}}),Cn.fromPoints=function(e,t,n,i,o,r){var s=L({x1:e.x,y1:e.y,x2:t.x,y2:t.y,rx:n,ry:i,largeArc:o,swipe:r});return new Cn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:n,radiusY:i,anticlockwise:0===r})},T(Cn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Yt.extend(Cn.prototype),Sn=[].push,Tn=[].pop,Dn=[].splice,An=[].shift,En=[].slice,Mn=[].unshift,Rn=Wt.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=Sn.apply(this,e);return this._add(e),t},slice:function(){return En.call(this)},pop:function(){var e=this.length,t=Tn.apply(this);return e&&this._remove([t]),t},splice:function(e,t){var n=En.call(arguments,2),i=this._splice(e,t,n);return this._change(),i},shift:function(){var e=this.length,t=An.apply(this);return e&&this._remove([t]),t},unshift:function(){var e=arguments,t=Mn.apply(this,e);return this._add(e),t},indexOf:function(e){var t,n=this,i=this.length;for(t=0;t<i;t++)if(n[t]===e)return t;return-1},_splice:function(e,t,n){var i=Dn.apply(this,[e,t].concat(n));return this._clearObserver(i),this._setObserver(n),i},_add:function(e){this._setObserver(e),this._change()},_remove:function(e){this._clearObserver(e),this._change()},_setObserver:function(e){var t,n=this;for(t=0;t<e.length;t++)e[t].addObserver(n)},_clearObserver:function(e){var t,n=this;for(t=0;t<e.length;t++)e[t].removeObserver(n)},_change:function(){}}),Yt.extend(Rn.prototype),In=Rn.extend({_change:function(){this.geometryChange()}}),Fn=Wt.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 Fn(g(this.real+e.real,yn),g(this.img+e.img,yn))},addConstant:function(e){return new Fn(this.real+e,this.img)},negate:function(){return new Fn((-this.real),(-this.img))},multiply:function(e){return new Fn(this.real*e.real-this.img*e.img,this.real*e.img+this.img*e.real)},multiplyConstant:function(e){return new Fn(this.real*e,this.img*e)},nthRoot:function(e){var t=Math.atan2(this.img,this.real),n=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),i=Math.pow(n,1/e);return new Fn(i*Math.cos(t/e),i*Math.sin(t/e))},equals:function(e){return this.real===e.real&&this.img===e.img},isReal:function(){return 0===this.img}}),zn=Wt.extend({init:function(e,t,n){this.anchor(e||new ln),this.controlIn(t),this.controlOut(n)},bboxTo:function(e,t){var n,i=this.anchor().transformCopy(t),o=e.anchor().transformCopy(t);return n=this.controlOut()&&e.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),o):this._lineBoundingBox(i,o)},_lineBoundingBox:function(e,t){return dn.fromPoints(e,t)},_curveBoundingBox:function(e,t,n,i){var o=[e,t,n,i],r=this._curveExtremesFor(o,"x"),s=this._curveExtremesFor(o,"y"),a=Q([r.min,r.max,e.x,i.x]),l=Q([s.min,s.max,e.y,i.y]);return dn.fromPoints(new ln(a.min,l.min),new ln(a.max,l.max))},_curveExtremesFor:function(e,t){var n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:U(n.min,t,e),max:U(n.max,t,e)}},_curveExtremes:function(e,t,n,i){var o,r,s=e-3*t+3*n-i,a=-2*(e-2*t+n),l=e-t,c=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 n;return n=this.controlOut()&&e.controlIn()?Y([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):K(this.anchor(),e.anchor(),t)},_isOnCurveTo:function(e,t,n,i){var o,r,s,a,l,c,d,u=this.bboxTo(e).expand(n,n);if(u.containsPoint(t))return o=this.anchor(),r=this.controlOut(),s=e.controlIn(),a=e.anchor(),"start"===i&&o.distanceTo(t)<=n?!V(o,r,t):"end"===i&&a.distanceTo(t)<=n?!V(a,s,t):(l=[o,r,s,a],!(!$(l,t,"x","y",n)&&!$(l,t,"y","x",n))||(c=A().rotate(45,t),d=[o.transformCopy(c),r.transformCopy(c),s.transformCopy(c),a.transformCopy(c)],$(d,t,"x","y",n)||$(d,t,"y","x",n)))},_isOnLineTo:function(e,t,n){var i=this.anchor(),o=e.anchor(),s=r(Math.atan2(o.y-i.y,o.x-i.x)),a=new dn([i.x,i.y-n/2],[i.distanceTo(o),n]);return a.containsPoint(t.transformCopy(A().rotate(-s,i)))},_isOnPathTo:function(e,t,n,i){var o;return o=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,i):this._isOnLineTo(e,t,n)}}),O(zn.prototype,["anchor","controlIn","controlOut"]),Yt.extend(zn.prototype),Pn=hn.extend({init:function(e){hn.fn.init.call(this,e),this.segments=new In,this.segments.addObserver(this),i(this.options.stroke)||(this.stroke("#000"),i(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this},lineTo:function(e,t){var n=i(t)?new ln(e,t):e,o=new zn(n);return this.segments.push(o),this},curveTo:function(e,t,n){var i,o;return this.segments.length>0&&(i=u(this.segments),o=new zn(n,t),this.suspend(),i.controlOut(e),this.resume(),this.segments.push(o)),this},arc:function(e,t,n,i,o){var r,s,a,l,c;return this.segments.length>0&&(r=u(this.segments),s=r.anchor(),a=p(e),l=new ln(s.x-n*Math.cos(a),s.y-i*Math.sin(a)),c=new Cn(l,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:o}),this._addArcSegments(c)),this},arcTo:function(e,t,n,i,o){var r,s,a;return this.segments.length>0&&(r=u(this.segments),s=r.anchor(),a=Cn.fromPoints(s,e,t,n,i,o),this._addArcSegments(a)),this},_addArcSegments:function(e){var t,n,i=this;for(this.suspend(),t=e.curvePoints(),n=1;n<t.length;n+=3)i.curveTo(t[n],t[n+1],t[n+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,n,i,o=this.segments,r=o.length,s=0;for(i=1;i<r;i++)t=o[i-1],n=o[i],s+=t._intersectionsTo(n,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 n,i=this.segments,o=i.length,r=t||this.options.stroke.width;if(o>1){if(i[0]._isOnPathTo(i[1],e,r,"start"))return!0;for(n=2;n<=o-2;n++)if(i[n-1]._isOnPathTo(i[n],e,r))return!0;if(i[o-2]._isOnPathTo(i[o-1],e,r,"end"))return!0}return!1},_bbox:function(e){var t,n,i,o,r=this.segments,s=r.length;if(1===s)n=r[0].anchor().transformCopy(e),t=new dn(n,cn.ZERO);else if(s>0)for(i=1;i<s;i++)o=r[i-1].bboxTo(r[i],e),t=t?dn.union(t,o):o;return t}}),Pn.fromRect=function(e,t){return new Pn(t).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close()},Pn.fromPoints=function(e,t){var n,i,o;if(e){for(n=new Pn(t),i=0;i<e.length;i++)o=ln.create(e[i]),o&&(0===i?n.moveTo(o):n.lineTo(o));return n}},Pn.fromArc=function(e,t){var n=new Pn(t),i=e.startAngle,o=e.pointAt(i);return n.moveTo(o.x,o.y),n.arc(i,e.endAngle,e.radiusX,e.radiusY,e.anticlockwise),n},Pn.prototype.nodeType="Path",gn.extend(Pn.prototype),_n.extend(Pn.prototype),Bn="#000",Ln=hn.extend({init:function(e,t){void 0===e&&(e=new Cn),void 0===t&&(t={}),hn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke(Bn)},_bbox:function(e){return this._geometry.bbox(e)},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var e,t=new Pn,n=this.geometry().curvePoints();if(n.length>0)for(t.moveTo(n[0].x,n[0].y),e=1;e<n.length;e+=3)t.curveTo(n[e],n[e+1],n[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)}}),Ln.prototype.nodeType="Arc",gn.extend(Ln.prototype),_n.extend(Ln.prototype),R(Ln.prototype,["geometry"]),Hn=hn.extend({init:function(e){hn.fn.init.call(this,e),this.paths=new In,this.paths.addObserver(this),i(this.options.stroke)||this.stroke("#000")},moveTo:function(e,t){var n=new Pn;return n.moveTo(e,t),this.paths.push(n),this},lineTo:function(e,t){return this.paths.length>0&&u(this.paths).lineTo(e,t),this},curveTo:function(e,t,n){return this.paths.length>0&&u(this.paths).curveTo(e,t,n),this},arc:function(e,t,n,i,o){return this.paths.length>0&&u(this.paths).arc(e,t,n,i,o),this},arcTo:function(e,t,n,i,o){return this.paths.length>0&&u(this.paths).arcTo(e,t,n,i,o),this},close:function(){return this.paths.length>0&&u(this.paths).close(),this},_bbox:function(e){return X(this.paths,!0,e)},rawBBox:function(){return X(this.paths,!1)},_containsPoint:function(e){var t,n=this.paths;for(t=0;t<n.length;t++)if(n[t]._containsPoint(e))return!0;return!1},_isOnPath:function(e){var t,n=this.paths,i=this.options.stroke.width;for(t=0;t<n.length;t++)if(n[t]._isOnPath(e,i))return!0;return!1},_clippedBBox:function(e){return Z(this.paths,this.currentTransform(e))}}),Hn.prototype.nodeType="MultiPath",gn.extend(Hn.prototype),_n.extend(Hn.prototype),Nn="12px sans-serif",On="#000",Vn=hn.extend({init:function(e,t,n){void 0===t&&(t=new ln),void 0===n&&(n={}),hn.fn.init.call(this,n),this.content(e),this.position(t),this.options.font||(this.options.font=Nn),i(this.options.fill)||this.fill(On)},content:function(e){return i(e)?(this.options.set("content",e),this):this.options.get("content")},measure:function(){var e=jt.measureText(this.content(),{font:this.options.get("font")});return e},rect:function(){var e=this.measure(),t=this.position().clone();return new dn(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)}}),Vn.prototype.nodeType="Text",gn.extend(Vn.prototype),O(Vn.prototype,["position"]),Un=hn.extend({init:function(e,t,n){void 0===t&&(t=new dn),void 0===n&&(n={}),hn.fn.init.call(this,n),this.src(e),this.rect(t)},src:function(e){return i(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()}}),Un.prototype.nodeType="Image",R(Un.prototype,["rect"]),Wn={extend:function(e,t){e.traverse=function(e){var n,i,o=this[t];for(n=0;n<o.length;n++)i=o[n],i.traverse?i.traverse(e):e(i);return this}}},jn=hn.extend({init:function(e){hn.fn.init.call(this,e),this.children=[]},childrenChange:function(e,t,n){this.trigger("childrenChange",{action:e,items:t,index:n})},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 X(this.children,!0,this.currentTransform(e))},rawBBox:function(){return X(this.children,!1)},_clippedBBox:function(e){return Z(this.children,this.currentTransform(e))},currentTransform:function(e){return hn.prototype.currentTransform.call(this,e)||null},containsPoint:function(e,t){var n,i,o;if(this.visible())for(n=this.children,i=this.currentTransform(t),o=0;o<n.length;o++)if(n[o].containsPoint(e,i))return!0;return!1},_reparent:function(e,t){var n,i,o,r=this;for(n=0;n<e.length;n++)i=e[n],o=i.parent,o&&o!==r&&o.remove&&o.remove(i),i.parent=t}}),jn.prototype.nodeType="Group",Wn.extend(jn.prototype,"children"),qn={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0},Gn=jn.extend({init:function(t,n){jn.fn.init.call(this,e.extend({},qn,n)),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")},reflow:function(){var e,t,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k,x,C,S;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),e=this.options,t=this._rect,n=this._initGroups(),i=n.groups,o=n.groupsSize,r=this._fieldMap,s=r.sizeField,a=r.groupsSizeField,l=r.groupAxis,c=r.groupsAxis,d=new ln,u=new ln,h=new cn,f=ee(o,t,e.alignContent,c,a),b=0;b<i.length;b++){for(v=i[b],d[l]=p=ee(v.size,t,e.justifyContent,l,s),d[c]=f,h[s]=v.size,h[a]=v.lineSize,_=new dn(d,h),w=0;w<v.bboxes.length;w++)g=v.elements[w],m=v.bboxes[w],u[l]=p,u[c]=ee(m.size[a],_,e.alignItems,c,a),J(u,m,g),p+=m.size[s]+e.spacing;f+=v.lineSize+e.lineSpacing}!e.wrap&&v.size>t.size[s]&&(y=t.size[s]/_.size[s],k=_.topLeft().scale(y,y),x=_.size[a]*y,C=ee(x,t,e.alignContent,c,a),S=A(),"x"===l?S.translate(t.origin.x-k.x,C-k.y):S.translate(C-k.x,t.origin.y-k.y),S.scale(y,y),this.transform(S))}},_initGroups:function(){var e,t,n,i=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=[],f=function(){h.push(u),p+=u.lineSize+a},p=-a;for(e=0;e<s.length;e++)t=s[e],n=s[e].clippedBBox(),t.visible()&&n&&(l&&u.size+n.size[d]+c>i._rect.size[d]?0===u.bboxes.length?(i._addToGroup(u,n,t),f(),u=i._newGroup()):(f(),u=i._newGroup(),i._addToGroup(u,n,t)):i._addToGroup(u,n,t));return u.bboxes.length&&f(),{groups:h,groupsSize:p}},_addToGroup:function(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),$n=hn.extend({init:function(e,t){void 0===e&&(e=new dn),void 0===t&&(t={}),hn.fn.init.call(this,t),this.geometry(e),i(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)}}),$n.prototype.nodeType="Rect",gn.extend($n.prototype),_n.extend($n.prototype),R($n.prototype,["geometry"]),Yn=Rn.extend({_change:function(){this.optionsChange({field:"stops"})}}),Kn=Wt.extend({init:function(e,t,n){this.options=new sn({offset:e,color:t,opacity:i(n)?n:1}),this.options.addObserver(this)}}),Kn.create=function(e){if(i(e)){var t;return t=e instanceof Kn?e:e.length>1?new Kn(e[0],e[1],e[2]):new Kn(e.offset,e.color,e.opacity)}},pe(Kn.prototype,["offset","color","opacity"]),Yt.extend(Kn.prototype),Qn=Wt.extend({init:function(e){void 0===e&&(e={}),this.stops=new Yn(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=o()},userSpace:function(e){return i(e)?(this._userSpace=e,this.optionsChange(),this):this._userSpace},_createStops:function(e){var t,n;for(void 0===e&&(e=[]),t=[],n=0;n<e.length;n++)t.push(Kn.create(e[n]));return t},addStop:function(e,t,n){this.stops.push(new Kn(e,t,n))},removeStop:function(e){var t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}}),Qn.prototype.nodeType="Gradient",Yt.extend(Qn.prototype),e.extend(Qn.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),Xn=Qn.extend({init:function(e){void 0===e&&(e={}),Qn.fn.init.call(this,e),this.start(e.start||new ln),this.end(e.end||new ln(1,0))}}),O(Xn.prototype,["start","end"]),Zn=Qn.extend({init:function(e){void 0===e&&(e={}),Qn.fn.init.call(this,e),this.center(e.center||new ln),this._radius=i(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill},radius:function(e){return i(e)?(this._radius=e,this.geometryChange(),this):this._radius},fallbackFill:function(e){return i(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill}}),O(Zn.prototype,["center"]),Jn={swing:me,linear:ge,easeOutElastic:ve},ei=Date.now||function(){return(new Date).getTime()},ti=Wt.extend({init:function(t,n){this.options=e.extend({},this.options,n),this.element=t},setup:function(){},step:function(){},play:function(){var e,t,n,i=this,o=this.options,r=o.duration,s=o.delay;void 0===s&&(s=0),e=Jn[o.easing],t=ei()+s,n=t+r,0===r?(this.step(1),this.abort()):setTimeout(function(){var o=function(){var s,a,l,c;i._stopped||(s=ei(),a=h(s-t,0,r),l=a/r,c=e(l,a,0,1,r),i.step(c),s<n?kendo.animationFrame(o):i.abort())};o()},s)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),ti.prototype.options={duration:500,easing:"swing"},ni=Wt.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e,t){var n,i,o,r=this._items;if(t&&t.type)for(i=t.type.toLowerCase(),o=0;o<r.length;o++)if(r[o].name.toLowerCase()===i){n=r[o];break}if(n)return new n.type(e,t)}}),ni.current=new ni,ti.create=function(e,t,n){return ni.current.create(e,t,n)},ii={l:function(e,t){var n,i,o=t.parameters,r=t.position;for(n=0;n<o.length;n+=2)i=new ln(o[n],o[n+1]),t.isRelative&&i.translateWith(r),e.lineTo(i.x,i.y),r.x=i.x,r.y=i.y},c:function(e,t){var n,i,o,r,s=t.parameters,a=t.position;for(n=0;n<s.length;n+=6)i=new ln(s[n],s[n+1]),o=new ln(s[n+2],s[n+3]),r=new ln(s[n+4],s[n+5]),t.isRelative&&(o.translateWith(a),i.translateWith(a),r.translateWith(a)),e.curveTo(i,o,r),a.x=r.x,a.y=r.y},v:function(e,t){var n=t.isRelative?0:t.position.x;_e(t.parameters,!0,n),this.l(e,t)},h:function(e,t){var n=t.isRelative?0:t.position.y;_e(t.parameters,!1,n),this.l(e,t)},a:function(e,t){var n,i,o,r,s,a,l=t.parameters,c=t.position;for(n=0;n<l.length;n+=7)i=l[n],o=l[n+1],r=l[n+3],s=l[n+4],a=new ln(l[n+5],l[n+6]),t.isRelative&&a.translateWith(c),e.arcTo(a,i,o,r,s),c.x=a.x,c.y=a.y},s:function(e,t){var n,i,o,r,s,a=t.parameters,l=t.position,c=t.previousCommand;for("s"!==c&&"c"!==c||(n=u(u(e.paths).segments).controlIn()),i=0;i<a.length;i+=4)o=new ln(a[i],a[i+1]),r=new ln(a[i+2],a[i+3]),s=void 0,t.isRelative&&(o.translateWith(l),r.translateWith(l)),s=n?be(n,l):l.clone(),n=o,e.curveTo(s,o,r),l.x=r.x,l.y=r.y},q:function(e,t){var n,i,o,r,s=t.parameters,a=t.position;for(n=0;n<s.length;n+=4)i=new ln(s[n],s[n+1]),o=new ln(s[n+2],s[n+3]),t.isRelative&&(i.translateWith(a),o.translateWith(a)),r=we(a,i,o),e.curveTo(r.controlOut,r.controlIn,o),a.x=o.x,a.y=o.y},t:function(e,t){var n,i,o,r,s,a=t.parameters,l=t.position,c=t.previousCommand;for("q"!==c&&"t"!==c||(i=u(u(e.paths).segments),n=i.controlIn().clone().translateWith(l.scaleCopy(-1/3)).scale(1.5)),o=0;o<a.length;o+=2)r=new ln(a[o],a[o+1]),t.isRelative&&r.translateWith(l),n=n?be(n,l):l.clone(),s=we(l,n,r),e.curveTo(s.controlOut,s.controlIn,r),l.x=r.x,l.y=r.y}},oi=1/3,ri=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,si=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,ai="m",li="z",ci=Wt.extend({parse:function(e,t){var n,i=new Hn(t),o=new ln;return e.replace(ri,function(e,t,r,s){var a=t.toLowerCase(),l=a===t,c=ye(r.trim());if(a===ai&&(l?(o.x+=c[0],o.y+=c[1]):(o.x=c[0],o.y=c[1]),i.moveTo(o.x,o.y),c.length>2&&(a="l",c.splice(0,2))),ii[a])ii[a](i,{parameters:c,position:o,isRelative:l,previousCommand:n}),s&&s.toLowerCase()===li&&i.close();else if(a!==ai)throw Error("Error while parsing SVG path. Unsupported command: "+a);n=a}),i}}),ci.current=new ci,Pn.parse=function(e,t){return ci.current.parse(e,t)},di=Wt.extend({init:function(){this._items=[]},register:function(e,t,n){var i=this._items,o=i[0],r={name:e,type:t,order:n};!o||n<o.order?i.unshift(r):i.push(r)},create:function(e,t){var n,i,o=this._items,r=o[0];if(t&&t.type)for(n=t.type.toLowerCase(),i=0;i<o.length;i++)if(o[i].name===n){r=o[i];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)}}),di.current=new di,ui=["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],hi=kendo.Observable.extend({init:function(t,n){kendo.Observable.fn.init.call(this),this.options=e.extend({},n),this.element=t,this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new jn,k(t,this.options),this.bind(ui,this.options),this._enableTracking()},draw:function(e){this._visual.children.push(e)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,this.unbind()},eventTarget:function(e){for(var t,n=this,i=c(e);!t&&i&&(t=i._kendoNode,i!==n.element);)i=i.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(),n=this.currentSize();(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.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(n){var i=t.eventTarget(n);i&&!t._suspendedTracking&&t.trigger(e,{element:i,originalEvent:n,type:e})}},_elementOffset:function(){var e=this.element,t=w(e,["paddingLeft","paddingTop"]),n=t.paddingLeft,i=t.paddingTop,o=b(e),r=o.left,s=o.top;return{left:r+parseInt(n,10),top:s+parseInt(i,10)}},_surfacePoint:function(e){var t=this._elementOffset(),n=l(e),i=n.x-t.left,o=n.y-t.top;return new ln(i,o)}}),hi.create=function(e,t){return di.current.create(e,t)},hi.support={},fi=Wt.extend({init:function(e){this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())},destroy:function(){var e,t,n=this;for(this.srcElement&&this.srcElement.removeObserver(this),e=this.childNodes,t=0;t<e.length;t++)n.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 n,i=this,o=e+t;for(n=e;n<o;n++)i.childNodes[n].removeSelf();this.childNodes.splice(e,t)},removeSelf:function(){this.clear(),this.destroy()},clear:function(){this.remove(0,this.childNodes.length)},invalidate:function(){this.parent&&this.parent.invalidate()},geometryChange:function(){this.invalidate()},optionsChange:function(){this.invalidate()},childrenChange:function(e){"add"===e.action?this.load(e.items,e.index):"remove"===e.action&&this.remove(e.index,e.items.length),this.invalidate()}}),pi={},mi="http://www.w3.org/2000/svg",gi="none",vi=function(e,t){e.innerHTML=t},"undefined"!=typeof document&&(_i="<svg xmlns='"+mi+"'></svg>",bi=document.createElement("div"),wi="undefined"!=typeof DOMParser,bi.innerHTML=_i,wi&&bi.firstChild.namespaceURI!==mi&&(vi=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),o=document.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(o)})),yi=vi,ki="transform",xi={clip:"clip-path",fill:"fill"},Ci=fi.extend({init:function(e){fi.fn.init.call(this,e),this.definitions={}},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),fi.fn.destroy.call(this)},load:function(e,t){var n,o,r,s,a,l=this;for(n=0;n<e.length;n++)o=e[n],r=o.children,s=new pi[o.nodeType](o),
i(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 n,o=document.createElement("div");yi(o,"<svg xmlns='"+mi+"' version='1.1'>"+this.render()+"</svg>"),n=o.firstChild.firstChild,n&&(i(t)?e.insertBefore(n,e.childNodes[t]||null):e.appendChild(n),this.setElement(n))},setElement:function(e){var t,n,i;for(this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this,t=this.childNodes,n=0;n<t.length;n++)i=e.childNodes[n],t[n].setElement(i)},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}fi.fn.removeSelf.call(this)},template:function(){return this.renderChildren()},render:function(){return this.template()},renderChildren:function(){var e,t=this.childNodes,n="";for(e=0;e<t.length;e++)n+=t[e].render();return n},optionsChange:function(e){var t=e.field,n=e.value;"visible"===t?this.css("display",n?"":gi):xi[t]&&Se(t,n)?this.updateDefinition(t,n):"opacity"===t&&this.attr("opacity",n),fi.fn.optionsChange.call(this,e)},attr:function(e,t){this.element&&this.element.setAttribute(e,t)},allAttr:function(e){var t,n=this;for(t=0;t<e.length;t++)n.attr(e[t][0],e[t][1])},css:function(e,t){this.element&&(this.element.style[e]=t)},allCss:function(e){var t,n=this;for(t=0;t<e.length;t++)n.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([ki,"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(ki)},mapStyle:function(){var e=this.srcElement.options,t=[["cursor",e.cursor]];return e.visible===!1&&t.push(["display",gi]),t},renderStyle:function(){return ke("style",Ce(this.mapStyle(!0)))},renderOpacity:function(){return ke("opacity",this.srcElement.options.opacity)},createDefinitions:function(){var e,t,n,i,o=this.srcElement,r=this.definitions;if(o){e=o.options;for(n in xi)i=e.get(n),i&&Se(n,i)&&(r[n]=i,t=!0);t&&this.definitionChange({action:"add",definitions:r})}},definitionChange:function(e){this.parent&&this.parent.definitionChange(e)},updateDefinition:function(e,t){var n=this.definitions,i=n[e],o=xi[e],r={};i&&(r[e]=i,this.definitionChange({action:"remove",definitions:r}),delete n[e]),t?(r[e]=t,this.definitionChange({action:"add",definitions:r}),n[e]=t,this.attr(o,De(t.id))):i&&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.definitions,n=[];for(e in t)n.push([xi[e],De(t[e].id)]);return n}}),Si=Ci.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)}}),Ti=Ci.extend({init:function(e){Ci.fn.init.call(this,e),this.id=e.id,this.loadStops()},loadStops:function(){var e,t,n=this,i=this.srcElement.stops,o=this.element;for(e=0;e<i.length;e++)t=new Si(i[e]),n.append(t),o&&t.attachTo(o)},optionsChange:function(e){"gradient.stops"===e.field?(fi.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"]}}),Di=Ti.extend({template:function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},mapCoordinates:function(){var e=this.srcElement,t=e.start(),n=e.end(),i=[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()];return i}}),Ai=Ti.extend({template:function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},mapCoordinates:function(){var e=this.srcElement,t=e.center(),n=e.radius(),i=[["cx",t.x],["cy",t.y],["r",n],this.mapSpace()];return i}}),Ei=Ci.extend({init:function(e){Ci.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"}}),Mi=Ci.extend({init:function(){Ci.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,n=e.action;"add"===n?this.addDefinitions(t):"remove"===n&&this.removeDefinitions(t)},createDefinition:function(e,t){var n;return"clip"===e?n=Ei:"fill"===e&&(t instanceof Xn?n=Di:t instanceof Zn&&(n=Ai)),new n(t)},addDefinitions:function(e){var t,n=this;for(t in e)n.addDefinition(t,e[t])},addDefinition:function(e,t){var n,i=this,o=i.element,r=i.definitionMap,s=t.id,a=r[s];a?a.count++:(n=this.createDefinition(e,t),r[s]={element:n,count:1},this.append(n),o&&n.attachTo(this.element))},removeDefinitions:function(e){var t,n=this;for(t in e)n.removeDefinition(e[t])},removeDefinition:function(e){var t=this.definitionMap,n=e.id,i=t[n];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete t[n]))}}),Ri=Ci.extend({init:function(e){Ci.fn.init.call(this),this.options=e,this.defs=new Mi},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){fi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(e){this.defs.definitionChange(e)}}),Ii=hi.extend({init:function(e,t){hi.fn.init.call(this,e,t),this._root=new Ri(this.options),yi(this.element,this._template()),this._rootElement=this.element.firstElementChild,Ae(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})),hi.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){hi.fn.draw.call(this,e),this._root.load([e])},clear:function(){hi.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template()},exportVisual:function(){var e,t=this,n=t._visual,i=t._offset;return i&&(e=new jn,e.children.push(n),e.transform(A().translate(-i.x,-i.y)),n=e),n},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+mi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"}}),Ii.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(hi.support.svg=!0,di.current.register("svg",Ii,10)),Fi=Ci.extend({template:function(){return"<g"+(this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},optionsChange:function(e){"transform"===e.field&&this.transformChange(e.value),Ci.fn.optionsChange.call(this,e)}}),pi.Group=Fi,zi={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]},Pi="solid",Bi="butt",Li={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Hi=" ",Ni=Ci.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=Li[e.field];t&&this.attr(t,e.value)}Ci.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,n,i,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!==i&&(i=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 n="M"+this.printPoints(a[0].anchor())+Hi+t.join(Hi),e.options.closed&&(n+="Z"),n}},printPoints:function(){var e,t=arguments,n=t.length,i=[];for(e=0;e<n;e++)i.push(t[e].toString(3));return i.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]),i(e.opacity)&&t.push(["stroke-opacity",e.opacity]),i(e.dashType)&&t.push(["stroke-dasharray",this.renderDashType(e)])):t.push(["stroke",gi]),t},renderStroke:function(){return xe(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(e){var t,n,i,o=e.dashType,r=e.width;if(void 0===r&&(r=1),o&&o!==Pi){for(t=zi[o.toLowerCase()],n=[],i=0;i<t.length;i++)n.push(t[i]*r);return n.join(" ")}},renderLinecap:function(e){var t=e.dashType,n=e.lineCap;return t&&"solid"!==t?Bi:n},mapFill:function(e){var t=[];return e&&"Gradient"===e.nodeType||(e&&!d(e.color)?(t.push(["fill",e.color]),i(e.opacity)&&t.push(["fill-opacity",e.opacity])):t.push(["fill",gi])),t},renderFill:function(){return xe(this.mapFill(this.srcElement.options.fill))},template:function(){return"<path "+this.renderStyle()+" "+this.renderOpacity()+" "+ke("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"}}),pi.Path=Ni,Oi=Ni.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),pi.Arc=Oi,Vi=Ni.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.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"}}),pi.Circle=Vi,Ui=Ni.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.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()+" />"}}),pi.Rect=Ui,Wi=Ni.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),Ni.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.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"}}),pi.Image=Wi,"undefined"!=typeof document&&(Ee._element=document.createElement("span")),ji=Ni.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&&Ni.fn.content.call(this,this.srcElement.content()),Ni.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=Ni.fn.mapStyle.call(this,e),n=this.srcElement.options.font;return e&&(n=kendo.htmlEncode(n)),t.push(["font",n]),t},pos:function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},renderContent:function(){var e=this.srcElement.content();return e=Ee(e),e=kendo.htmlEncode(e)},template:function(){return"<text "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.pos().x+"' y='"+this.pos().y+"'"+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"}}),pi.Text=ji,qi=Ni.extend({renderData:function(){var e,t,n=this,i=this.srcElement.paths;if(i.length>0){for(e=[],t=0;t<i.length;t++)e.push(n.printPath(i[t]));return e.join(" ")}}}),pi.MultiPath=qi,Gi={Circle:pn,Arc:Cn,Rect:dn,Point:ln,Segment:zn,Matrix:an,Size:cn,toMatrix:D,Transformation:un,transform:A},$i={Surface:Ii,RootNode:Ri,Node:Ci,GroupNode:Fi,ArcNode:Oi,CircleNode:Vi,RectNode:Ui,ImageNode:Wi,TextNode:ji,PathNode:Ni,MultiPathNode:qi,DefinitionNode:Mi,ClipNode:Ei,GradientStopNode:Si,LinearGradientNode:Di,RadialGradientNode:Ai,exportGroup:Me},Yi={},Ki=fi.extend({init:function(e){fi.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(),fi.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(e){this.clip&&(e.beginPath(),Re(e,this.clip),e.clip())},optionsChange:function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),fi.fn.optionsChange.call(this,e)},setTransform:function(e){if(this.srcElement){var t=this.srcElement.transform();t&&e.transform.apply(e,t.matrix().toArray(6))}},loadElements:function(e,t,n){var o,r,s,a,l=this;for(o=0;o<e.length;o++)r=e[o],s=r.children,a=new Yi[r.nodeType](r,n),s&&s.length>0&&a.load(s,t,n),i(t)?l.insertAt(a,t):l.append(a)},load:function(e,t,n){this.loadElements(e,t,n),this.invalidate()},setOpacity:function(e){if(this.srcElement){var t=this.srcElement.opacity();i(t)&&this.globalAlpha(e,t)}},globalAlpha:function(e,t){var n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n},visible:function(){var e=this.srcElement;return!e||e&&e.options.visible!==!1}}),Qi=Ki.extend({renderTo:function(e){var t,n,i;if(this.visible()){for(e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),t=this.childNodes,n=0;n<t.length;n++)i=t[n],i.visible()&&i.renderTo(e);e.restore()}}}),Wn.extend(Qi.prototype,"childNodes"),Yi.Group=Qi,Xi=1e3/60,Zi=Qi.extend({init:function(e){Qi.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)},Xi)},destroy:function(){Qi.fn.destroy.call(this),this.canvas=null,this.ctx=null},load:function(e,t,n){this.loadElements(e,t,n),this._invalidate()},_invalidate:function(){this.ctx&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx))}}),Wn.extend(Zi.prototype,"childNodes"),Ji=Wt.extend({init:function(){this.shapes=[]},_add:function(e,t){this.shapes.push({bbox:t,shape:e}),e._quadNode=this},pointShapes:function(e){var t,n=this.shapes,i=n.length,o=[];for(t=0;t<i;t++)n[t].bbox.containsPoint(e)&&o.push(n[t].shape);return o},insert:function(e,t){this._add(e,t)},remove:function(e){var t,n=this.shapes,i=n.length;for(t=0;t<i;t++)if(n[t].shape===e){n.splice(t,1);break}}}),eo=Ji.extend({init:function(e){Ji.fn.init.call(this),this.children=[],this.rect=e},inBounds:function(e){var t=this.rect,n=t.bottomRight(),i=e.bottomRight(),o=t.origin.x<=e.origin.x&&t.origin.y<=e.origin.y&&i.x<=n.x&&i.y<=n.y;return o},pointShapes:function(e){var n,i=this.children,o=i.length,r=Ji.fn.pointShapes.call(this,e);for(n=0;n<o;n++)t(r,i[n].pointShapes(e));return r},insert:function(e,t){var n,i=this.children,o=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(e,t);else{for(i.length||this._initChildren(),n=0;n<i.length;n++)if(i[n].insert(e,t)){o=!0;break}o||this._add(e,t)}o=!0}return o},_initChildren:function(){var e=this,t=e.rect,n=e.children,i=t.center(),o=t.width()/2,r=t.height()/2;n.push(new eo(new dn([t.origin.x,t.origin.y],[o,r])),new eo(new dn([i.x,t.origin.y],[o,r])),new eo(new dn([t.origin.x,i.y],[o,r])),new eo(new dn([i.x,i.y],[o,r])))}}),to=3e3,no=1e4,io=75,oo=Wt.extend({init:function(){this.initRoots()},initRoots:function(){this.rootMap={},this.root=new Ji,this.rootElements=[]},clear:function(){var e,t=this,n=this.rootElements;for(e=0;e<n.length;e++)t.remove(n[e]);this.initRoots()},pointShape:function(e){var t,n=(this.rootMap[Math.floor(e.x/to)]||{})[Math.floor(e.y/to)],i=this.root.pointShapes(e);for(n&&(i=i.concat(n.pointShapes(e))),this.assignZindex(i),i.sort(Ie),t=0;t<i.length;t++)if(i[t].containsPoint(e))return i[t]},assignZindex:function(e){var t,n,i,o,r,s=this;for(t=0;t<e.length;t++){for(n=e[t],i=0,o=Math.pow(no,io),r=[];n;)r.push(n),n=n.parent;for(;r.length;)n=r.pop(),i+=((n.parent?n.parent.children:s.rootElements).indexOf(n)+1)*o,o/=no;e[t]._zIndex=i}},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,n=this;if("Group"===e.nodeType)for(t=0;t<e.children.length;t++)n.bboxChange(e.children[t]);else e._quadNode&&e._quadNode.remove(e),this._insertShape(e)},add:function(e){var n=Array.isArray(e)?e.slice(0):[e];t(this.rootElements,n),this._insert(n)},childrenChange:function(e){var t,n=this;if("remove"===e.action)for(t=0;t<e.items.length;t++)n.remove(e.items[t]);else this._insert(Array.prototype.slice.call(e.items,0))},_insert:function(e){for(var n,i=this;e.length>0;)n=e.pop(),n.addObserver(i),"Group"===n.nodeType?t(e,n.children):i._insertShape(n)},_insertShape:function(e){var t,n,i,o,r=e.bbox();r&&(t=this.getSectors(r),n=t[0][0],i=t[1][0],this.inRoot(t)?this.root.insert(e,r):(o=this.rootMap,o[n]||(o[n]={}),o[n][i]||(o[n][i]=new eo(new dn([n*to,i*to],[to,to]))),o[n][i].insert(e,r)))},remove:function(e){var t,n,i=this;if(e.removeObserver(this),"Group"===e.nodeType)for(t=e.children,n=0;n<t.length;n++)i.remove(t[n]);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,n,i=e.bottomRight(),o=Math.floor(i.x/to),r=Math.floor(i.y/to),s=[[],[]];for(t=Math.floor(e.origin.x/to);t<=o;t++)s[0].push(t);for(n=Math.floor(e.origin.y/to);n<=r;n++)s[1].push(n);return s}}),ro=hi.extend({init:function(e,t){var n,i;hi.fn.init.call(this,e,t),this.element.innerHTML=this._template(this),n=this.element.firstElementChild,i=k(e),n.width=i.width,n.height=i.height,this._rootElement=n,this._root=new Zi(n),this._mouseTrackHandler=this._trackMouse.bind(this),_(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){hi.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(e){hi.fn.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},clear:function(){hi.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear()},eventTarget:function(e){var t,n;if(this._searchTree)return t=this._surfacePoint(e),n=this._searchTree.pointShape(t)},image:function(){var e,t=this,n=t._root,i=t._rootElement,o=[];return n.traverse(function(e){e.loading&&o.push(e.loading)}),e=Gt(),$t(o).then(function(){n._invalidate();try{var t=i.toDataURL();e.resolve(t)}catch(o){e.reject(o)}},function(t){e.reject(t)}),e},suspendTracking:function(){hi.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var e,t,n;if(hi.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new oo,e=this._root.childNodes,t=[],n=0;n<e.length;n++)t.push(e[n].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 oo,hi.fn._enableTracking.call(this)},_trackMouse:function(e){var t,n;this._suspendedTracking||(t=this.eventTarget(e),"click"!==e.type?(n=this._currentShape,n&&n!==t&&this.trigger("mouseleave",{element:n,originalEvent:e,type:"mouseleave"}),t&&n!==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"}))}}),ro.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(hi.support.canvas=!0,di.current.register("canvas",ro,20)),so=Ki.extend({renderTo:function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},setFill:function(e){var t=this.srcElement.options.fill,n=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),n=!0):d(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n},setGradientFill:function(e,t){var n,i,o,r,s=this.srcElement.rawBBox();t instanceof Xn?(i=t.start(),o=t.end(),n=e.createLinearGradient(i.x,i.y,o.x,o.y)):t instanceof Zn&&(r=t.center(),n=e.createRadialGradient(r.x,r.y,0,r.x,r.y,t.radius())),Fe(n,t.stops),e.save(),t.userSpace()||e.transform(s.width(),0,0,s.height(),s.origin.x,s.origin.y),e.fillStyle=n,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,n=this.dashType();n&&n!==Pi&&(t=zi[n],e.setLineDash?e.setLineDash(t):(e.mozDash=t,e.webkitLineDash=t))},setLineCap:function(e){var t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==Pi?e.lineCap=Bi:n&&n.lineCap&&(e.lineCap=n.lineCap)},setLineJoin:function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},renderPoints:function(e,t){Re(e,t)}}),Yi.Path=so,ao=so.extend({renderPoints:function(e){var t=this.srcElement.toPath();Re(e,t)}}),Yi.Arc=ao,lo=so.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.center,i=t.radius;e.arc(n.x,n.y,i,0,2*Math.PI)}}),Yi.Circle=lo,co=so.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.origin,i=t.size;e.rect(n.x,n.y,i.width,i.height)}}),Yi.Rect=co,uo=so.extend({init:function(e,t){so.fn.init.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Gt();var n=this.img=new Image;t&&!/^data:/i.test(e.src())&&(n.crossOrigin=t),n.src=e.src(),n.complete?this.onLoad():(n.onload=this.onLoad,n.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=Gt(),this.img.src=this.srcElement.src()):so.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(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}}),Yi.Image=uo,ho=so.extend({renderTo:function(e){var t=this.srcElement,n=t.position(),i=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,this.setFill(e)&&e.fillText(t.content(),n.x,n.y+i.baseline),this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+i.baseline)),e.restore()}}),Yi.Text=ho,fo=so.extend({renderPoints:function(e){var t,n=this.srcElement.paths;for(t=0;t<n.length;t++)Re(e,n[t])}}),Yi.MultiPath=fo,po={Surface:ro,RootNode:Zi,Node:Ki,GroupNode:Qi,ArcNode:ao,CircleNode:lo,RectNode:co,ImageNode:uo,TextNode:ho,PathNode:so,MultiPathNode:fo},mo=qt.browser,go="KENDO-PSEUDO-ELEMENT",vo={},_o={},_o._root=_o,bo=Vn.extend({init:function(e,t,n){Vn.fn.init.call(this,e,t.getOrigin(),n),this._pdfRect=t},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),wo="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),yo=function(e){return e?function t(n){var i,o,r,s,a=n.cloneNode(!1);if(1==n.nodeType){i=e(n),o=e(a),s=i.data();for(r in s)o.data(r,s[r]);if(/^canvas$/i.test(n.tagName))a.getContext("2d").drawImage(n,0,0);else if(/^input$/i.test(n.tagName))n.removeAttribute("name");else for(r=n.firstChild;r;r=r.nextSibling)a.appendChild(t(r))}return a}:function(e){var t=e.cloneNode(!0),n=e.querySelectorAll("canvas");return n.length&&Be(t.querySelectorAll("canvas")).forEach(function(e,t){e.getContext("2d").drawImage(n[t],0,0)}),Be(t.querySelectorAll("input")).forEach(function(e){e.removeAttribute("name")}),t}}("undefined"!=typeof window&&window.kendo&&window.kendo.jQuery),Ue.getFontFaces=We,Ue.drawText=function(e){var t=new jn;return _o._clipbox=!1,_o._matrix=an.unit(),_o._stackingContext={element:e,group:t},et(e,rt(e),t),3==e.firstChild.nodeType?Lt(e,e.firstChild,t):Dt(e,t),tt(),t},ko=function(){function e(e){function f(){var t=s.exec(e);t&&(e=e.substr(t[1].length))}function p(t){f();var n=t.exec(e);if(n)return e=e.substr(n[1].length),n[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=p(i))||(o=p(n)),{color:s,length:t,percent:o}}function g(t){var i,s,d,u,h,f,g=[],v=!1;if(p(a)){for(i=p(r),i?(i=mt(i),p(c)):(s=p(o),"to"==s?s=p(o):s&&/^-/.test(t)&&(v=!0),d=p(o),p(c)),/-moz-/.test(t)&&null==i&&null==s&&(u=p(n),h=p(n),v=!0,"0%"==u?s="left":"100%"==u&&(s="right"),"0%"==h?d="top":"100%"==h&&(d="bottom"),p(c));e&&!p(l)&&(f=m());)g.push(f),p(c);return{type:"linear",angle:i,to:s&&d?s+" "+d:s?s:d?d:null,stops:g,reverse:v}}}function v(){if(p(a)){var e=p(u);return e=e.replace(/^['"]+|["']+$/g,""),p(l),{type:"url",url:e}}}var _,b=e;return je(h,b)?h[b]:((_=p(t))?_=g(_):(_=p(d))&&(_=v()),h[b]=_||{type:"none"})}var t=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,n=/^([-0-9.]+%)/,i=/^([-0-9.]+px)/,o=/^(left|right|top|bottom|to|center)\W/,r=/^([-0-9.]+(deg|grad|rad|turn))/,s=/^(\s+)/,a=/^(\()/,l=/^(\))/,c=/^(,)/,d=/^(url)\(/,u=/^(.*?)\)/,h={},f={};return function(t){return je(f,t)?f[t]:f[t]=xo(t).map(e)}}(),xo=function(){var e={};return function(t,n){function i(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(n||(n=/^\s*,\s*/),r=t+n,je(e,r))return e[r];for(s=[],a=0,l=0,c=0,d=!1;l<t.length;)!d&&i(/^[\(\[\{]/)?(c++,l++):!d&&i(/^[\)\]\}]/)?(c--,l++):!d&&i(/^[\"\']/)?(d=u[0],l++):"'"==d&&i(/^\\\'/)?l+=2:'"'==d&&i(/^\\\"/)?l+=2:"'"==d&&i(/^\'/)?(d=!1,l++):'"'==d&&i(/^\"/)?(d=!1,l++):i(n)?(!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}}(),Co=function(e){return function(t){var n,i=e[t];return i||((n=/url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(t))?i=e[t]=n[2]:(n=/url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t))&&(i=e[t]=n[2])),i}}(Object.create?Object.create(null):{}),So=function(e){return function(t){var n=e[t];return null==n&&(n=e[t]=jt.measureText("Mapq",{font:t}).height),n}}(Object.create?Object.create(null):{}),To={svg:$i,canvas:po,util:on,PathParser:ci,Surface:hi,BaseNode:fi,SurfaceFactory:di,OptionsStore:sn,exportImage:ze,exportSVG:Pe,QuadNode:eo,ShapesQuadTree:oo,ObserversMixin:Yt,Element:hn,Circle:wn,Arc:Ln,Path:Pn,MultiPath:Hn,Text:Vn,Image:Un,Group:jn,Layout:Gn,Rect:$n,align:ne,vAlign:ie,stack:se,vStack:ae,wrap:de,vWrap:ue,fit:he,LinearGradient:Xn,RadialGradient:Zn,GradientStop:Kn,Gradient:Qn,Animation:ti,AnimationFactory:ni,drawDOM:Ue},kendo.deepExtend(kendo,{drawing:To,geometry:Gi}),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,n){(n||t)()}),function(e,define){define("kendo.popup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t,n){return!(!t||!n)&&(t===n||e.contains(t,n))}var i=window.kendo,o=i.ui,r=o.Widget,s=i.support,a=i.getOffset,l=i._outerWidth,c=i._outerHeight,d="open",u="close",h="deactivate",f="activate",p="center",m="left",g="right",v="top",_="bottom",b="absolute",w="hidden",y="body",k="location",x="position",C="visible",S="effects",T="k-state-active",D="k-state-border",A=/k-state-border-(\w+)/,E=".k-picker-wrap, .k-dropdown-wrap, .k-link",M="down",R=e(document.documentElement),I=e(window),F="scroll",z=s.transitions.css,P=z+"transform",B=e.extend,L=".kendoPopup",H=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],N=r.extend({init:function(t,n){var o,a=this;n=n||{},n.isRtl&&(n.origin=n.origin||_+" "+g,n.position=n.position||v+" "+g),r.fn.init.call(a,t,n),t=a.element,n=a.options,a.collisions=n.collision?n.collision.split(" "):[],a.downEvent=i.applyEventMap(M,i.guid()),1===a.collisions.length&&a.collisions.push(a.collisions[0]),o=e(a.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),n.appendTo=e(e(n.appendTo)[0]||o[0]||document.body),a.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!n.isRtl).css({position:b}).appendTo(n.appendTo).on("mouseenter"+L,function(){a._hovered=!0}).on("mouseleave"+L,function(){a._hovered=!1}),a.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),B(n.animation.open,{complete:function(){a.wrapper.css({overflow:C}),a._activated=!0,a._trigger(f)}}),B(n.animation.close,{complete:function(){a._animationClose()}}),a._mousedownProxy=function(e){
a._mousedown(e)},a._resizeProxy=s.mobileOS.android?function(e){setTimeout(function(){a._resize(e)},600)}:function(e){a._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+L,e.proxy(a.toggle,a))},events:[d,f,u,h],options:{name:"Popup",toggleEvent:"click",origin:_+" "+m,position:v+" "+m,anchor:y,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var e=this,t=e.wrapper.data(k);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=y&&e._hideDirClass(),e._closing=!1,e._trigger(h)},destroy:function(){var t,n=this,o=n.options,s=n.element.off(L);r.fn.destroy.call(n),o.toggleTarget&&e(o.toggleTarget).off(L),o.modal||(R.unbind(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),i.destroy(n.element.children()),s.removeData(),o.appendTo[0]===document.body&&(t=s.parent(".k-animation-container"),t[0]?t.remove():s.remove())},open:function(t,n){var o,r,a=this,l={isFixed:!isNaN(parseInt(n,10)),x:t,y:n},c=a.element,u=a.options,h=e(u.anchor),f=c[0]&&c.hasClass("km-widget");if(!a.visible()){if(u.copyAnchorStyles&&(f&&"font-size"==H[0]&&H.shift(),c.css(i.getComputedStyles(h[0],H))),c.data("animating")||a._trigger(d))return;a._activated=!1,u.modal||(R.unbind(a.downEvent,a._mousedownProxy).bind(a.downEvent,a._mousedownProxy),a._toggleResize(!1),a._toggleResize(!0)),a.wrapper=r=i.wrap(c,u.autosize).css({overflow:w,display:"block",position:b}),s.mobileOS.android&&r.css(P,"translatez(0)"),r.css(x),e(u.appendTo)[0]==document.body&&r.css(v,"-10000px"),a.flipped=a._position(l),o=a._openAnimation(),u.anchor!=y&&a._showDirClass(o),c.data(S,o.effects).kendoStop(!0).kendoAnimate(o)}},_openAnimation:function(){var e=B(!0,{},this.options.animation.open);return e.effects=i.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),n=((t.attr("class")||"").match(A)||["","down"])[1],o=D+"-"+n;t.removeClass(o).children(E).removeClass(T).removeClass(o),this.element.removeClass(D+"-"+i.directions[n].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",o=D+"-"+n;e(this.options.anchor).addClass(o).children(E).addClass(T).addClass(o),this.element.addClass(D+"-"+i.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?u:d]()},visible:function(){return this.element.is(":"+C)},close:function(n){var o,r,s,a,l=this,c=l.options;if(l.visible()){if(o=l.wrapper[0]?l.wrapper:i.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(u))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),R.unbind(l.downEvent,l._mousedownProxy),n?r={hide:!0,effects:{}}:(r=B(!0,{},c.animation.close),s=l.element.data(S),a=r.effects,!a&&!i.size(a)&&s&&i.size(s)&&(r.effects=s,r.reverse=!0),l._closing=!0),l.element.kendoStop(!0),o.css({overflow:w}),l.element.kendoAnimate(r),n&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;s.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",n=s.resize;s.mobileOS.ios||s.mobileOS.android||(n+=" "+F),this._scrollableParents()[t](F,this._resizeProxy),I[t](n,this._resizeProxy)},_mousedown:function(t){var o=this,r=o.element[0],s=o.options,a=e(s.anchor)[0],l=s.toggleTarget,c=i.eventTarget(t),d=e(c).closest(".k-popup"),u=d.parent().parent(".km-shim").length;d=d[0],!u&&d&&d!==o.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(n(r,c)||n(a,c)||l&&n(e(l)[0],c)||o.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i,o,r,s){var a=0;return s=s||t,r!==o&&r!==p&&o!==p&&(e+s>i&&(a+=-(n+t)),e+a<0&&(a+=n+t)),a},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return i.isScrollable(t)})},_position:function(t){var n,o,r,d,u,h,f,p,m,g,v,_,w,y,C,S,T=this,D=T.element,A=T.wrapper,E=T.options,M=e(E.viewport),R=s.zoomLevel(),I=!!(M[0]==window&&window.innerWidth&&R<=1.02),F=e(E.anchor),z=E.origin.toLowerCase().split(" "),P=E.position.toLowerCase().split(" "),L=T.collisions,H=10002,N=0,O=document.documentElement;if(u=E.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:M.offset(),I?(h=window.innerWidth,f=window.innerHeight):(h=M.width(),f=M.height()),I&&O.scrollHeight-O.clientHeight>0&&(h-=i.support.scrollbar()),n=F.parents().filter(A.siblings()),n[0])if(r=Math.max(+n.css("zIndex"),0))H=r+10;else for(o=F.parentsUntil(n),d=o.length;N<d;N++)r=+e(o[N]).css("zIndex"),r&&H<r&&(H=r+10);return A.css("zIndex",H),A.css(t&&t.isFixed?{left:t.x,top:t.y}:T._align(z,P)),p=a(A,x,F[0]===A.offsetParent()[0]),m=a(A),g=F.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),g.length&&(p=a(A,x,!0),m=a(A)),m.top-=u.top,m.left-=u.left,T.wrapper.data(k)||A.data(k,B({},p)),v=B({},m),_=B({},p),w=E.adjustSize,"fit"===L[0]&&(_.top+=T._fit(v.top,c(A)+w.height,f/R)),"fit"===L[1]&&(_.left+=T._fit(v.left,l(A)+w.width,h/R)),y=B({},_),C=c(D),S=c(A),!A.height()&&C&&(S+=C),"flip"===L[0]&&(_.top+=T._flip(v.top,C,c(F),f/R,z[0],P[0],S)),"flip"===L[1]&&(_.left+=T._flip(v.left,l(D),l(F),h/R,z[1],P[1],l(A))),D.css(x,b),A.css(_),_.left!=y.left||_.top!=y.top},_align:function(t,n){var i,o=this,r=o.wrapper,s=e(o.options.anchor),d=t[0],u=t[1],h=n[0],f=n[1],m=a(s),v=e(o.options.appendTo),b=l(r),w=c(r),y=l(s),k=c(s),x=m.top,C=m.left,S=Math.round;return v[0]!=document.body&&(i=a(v),x-=i.top,C-=i.left),d===_&&(x+=k),d===p&&(x+=S(k/2)),h===_&&(x-=w),h===p&&(x-=S(w/2)),u===g&&(C+=y),u===p&&(C+=S(y/2)),f===g&&(C-=b),f===p&&(C-=S(b/2)),{top:x,left:C}}});o.plugin(N)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/surface-tooltip.min",["kendo.popup.min","drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=".kendo",n=window.kendo,i=n.deepExtend,o=n.drawing.util,r=o.defined,s=o.limitValue,a=o.eventCoordinates,l=n._outerWidth,c=n._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>',f=n.Class.extend({init:function(t,n){this.element=e(u),this.content=this.element.children(".k-tooltip-content"),n=n||{},this.options=i({},this.options,this._tooltipOptions(n)),this.popupOptions={appendTo:n.appendTo,animation:n.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=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 n.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,i){var o=i.content;if(n.isFunction(o)&&(o=o({element:t,target:e})),o)return this.content.html(o),!0},_position:function(e,t,n,i){var o,r=t.position,l=t.offset||0,c=this.surface,d=c._instance._elementOffset(),u=c.getSize(),h=c._instance._offset,f=e.bbox(),p=n.width,m=n.height,g=0,v=0;return f.origin.translate(d.left,d.top),h&&f.origin.translate(-h.x,-h.y),"cursor"==r&&i?(o=a(i),g=o.x-p/2,v=o.y-m-l):"left"==r?(g=f.origin.x-p-l,v=f.center().y-m/2):"right"==r?(g=f.bottomRight().x+l,v=f.center().y-m/2):"bottom"==r?(g=f.center().x-p/2,v=f.bottomRight().y+l):(g=f.center().x-p/2,v=f.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,i({},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,n,i,o){var r,s,a=this._current;clearTimeout(this._timeout),a&&(a.shape===t&&n.shared||a.target===e)||(clearTimeout(this._showTimeout),r=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:t,target:e,popup:r})&&this._updateContent(e,t,n)&&(this._autoHide(n),s=this._measure(n),r.visible()&&r.close(!0),this._current={options:n,elementSize:s,shape:t,target:e,position:this._position(n.shared?t:e,n,s,i)},o?this._showTimeout=setTimeout(this._openPopupHandler,n.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,n=this._tooltipShape(e.element);n&&(t=i({},this.options,this._tooltipOptions(n.options.tooltip)),t&&t.showOn==e.type&&this._show(e.element,n,t,e.originalEvent,!0))},_measure:function(e){var t,n,i,o=this.getPopup();return this.element.css({width:"auto",height:"auto"}),i=o.visible(),i||o.wrapper.show(),this.element.css({width:r(e.width)?e.width:"auto",height:r(e.height)?e.height:"auto"}),t=l(this.element),n=c(this.element),i||o.wrapper.hide(),{width:t,height:n}},_mouseleave:function(e){var t,n;this.popup&&!this._popupRelatedTarget(e.originalEvent)&&(t=this,n=t._current,n&&n.options.autoHide&&(t._timeout=setTimeout(function(){clearTimeout(t._showTimeout),t.hide()},n.options.hideDelay||0)))},_mousemove:function(e){var t,n,i=this._current;i&&e.element&&(t=i.options,"cursor"==t.position&&(n=this._position(e.element,t,i.elementSize,e.originalEvent),i.position=n,this.getPopup().wrapper.css({left:n.left,top:n.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}});n.drawing.SurfaceTooltip=f}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n,i=window.kendo,o=i.drawing,r=o.Surface,s=i.ui.Widget,a=i.deepExtend,l=e.proxy;i.support.svg=r.support.svg,i.support.canvas=r.support.canvas,n=s.extend({init:function(e,n){this.options=a({},this.options,n),s.fn.init.call(this,e,this.options),this._instance=r.create(this.element[0],n),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(){i.ui.Popup&&(this._tooltip=new o.SurfaceTooltip(this,this.options.tooltip||{}))}}),i.ui.plugin(n),n.create=function(e,t){return new n(e,t)},i.drawing.Surface=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/html.min",["drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=window.kendo,n=t.drawing,i=n.drawDOM;n.drawDOM=function(t,n){return i(e(t)[0],n)},n.drawDOM.drawText=i.drawText,n.drawDOM.getFontFaces=i.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||t)()}),function(e,define){define("kendo.validator.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){var n,i=l.ui.validator.ruleResolvers||{},o={};for(n in i)e.extend(!0,o,i[n].resolve(t));return o}function i(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,n){var i,o,r,s,a=e();for(r=0,s=t.length;r<s;r++)i=t[r],h.test(i.className)&&(o=i.getAttribute(l.attr("for")),o===n&&(a=a.add(i)));return a}var a,l=window.kendo,c=l.ui.Widget,d=".kendoValidator",u="k-invalid-msg",h=RegExp(u,"i"),f="k-invalid",p="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,n){var i=e.val();return!e.filter(t).length||""===i||A(i,n)},M=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,i){var o=this,r=n(t),s="["+l.attr("validate")+"!=false]";i=i||{},i.rules=e.extend({},l.ui.validator.rules,r.rules,i.rules),i.messages=e.extend({},l.ui.validator.messages,r.messages,i.messages),c.fn.init.call(o,t,i),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"),n=e.val();return!(M(e,"required")&&(!n||""===n||0===n.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,n=l.parseFloat(e.val());return t<=n}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,n=l.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,i=parseFloat(e.attr("step"))||1,r=parseFloat(e.val()),s=o(i);return s?(t=Math.pow(10,s),Math.floor((r-n)*t)%(i*t)/Math.pow(100,s)===0):(r-n)%i===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,n,i,o=!1,r=this.value();if(this._errors={},this.element.is(v))o=this.validateInput(this.element);else{for(i=!1,e=this.element.find(this._inputSelector),t=0,n=e.length;t<n;t++)this.validateInput(e.eq(t))||(i=!0);o=!i}return this.trigger(C,{valid:o}),r!==o&&this.trigger(S),o},validateInput:function(t){var n,o,s,a,c,d,h,m,g,v,_;return t=e(t),this._isValidated=!0,n=this,o=n._errorTemplate,s=n._checkValidity(t),a=s.valid,c="."+u,d=t.attr(y)||"",h=n._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 n._errors[d]:(m=n._extractMessage(t,s.key),n._errors[d]=m,v=r(o({message:i(m)})),_=h.attr("id"),n._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(f,!a),t.toggleClass(p,a),a},hideMessages:function(){var e=this,t="."+u,n=e.element;n.is(v)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){var n,i,o,r=l.ui.validator.messageLocators,a=e();for(i=0,o=this.element.length;i<o;i++)a=a.add(s(this.element[i].getElementsByTagName("*"),t));for(n in r)a=a.add(r[n].locate(this.element,t));return a},_decorateMessageContainer:function(e,t){var n,i=l.ui.validator.messageLocators;e.addClass(u).attr(l.attr("for"),t||"");for(n in i)i[n].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var n=this,i=n.options.messages[t],o=e.attr(y);return i=l.isFunction(i)?i(e):i,l.format(e.attr(l.attr(t+"-msg"))||e.attr("validationMessage")||e.attr("title")||i||"",o,e.attr(t)||e.attr(l.attr(t)))},_checkValidity:function(e){var t,n=this.options.rules;for(t in n)if(!n[t].call(this,e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],n=this._errors;for(e in n)t.push(n[e]);return t}}),l.ui.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.userevents.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t){var n=e.x.location,i=e.y.location,o=t.x.location,r=t.y.location,s=n-o,a=i-r;return{center:{x:(n+o)/2,y:(i+r)/2},distance:Math.sqrt(s*s+a*a)}}function i(e){var t,n,i,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(n=r?r.changedTouches:[],t=n.length;l<t;l++)i=n[l],o.push({location:i,event:e,target:i.target,currentTarget:a,id:i.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(" "),n=0,i=t.length;n<i;n++)e(t[n])}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,f=800,p=s.browser.msie?5:0,m="press",g="hold",v="select",_="start",b="move",w="end",y="cancel",k="tap",x="release",C="gesturestart",S="gesturechange",T="gestureend",D="gesturetap",A={api:0,touch:0,mouse:9,pointer:9},E=!s.touch||s.mouseAndTouchPresent,M=a.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=c()},move:function(e){var t=this,n=e["page"+t.axis],i=c(),o=i-t.timeStamp||1;!n&&h||(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/o,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),R=a.extend({init:function(e,t,n){d(this,{x:new M("X",n.location),y:new M("Y",n.location),type:n.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||A[n.type],userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(e.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(m,this.pressEvent)},_hold:function(){this._trigger(g,this.pressEvent)},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(I.current&&I.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(b,e)}},end:function(e){this.endTime=c(),this._finished||(this._finished=!0,this._trigger(x,e),this._moved?this._trigger(w,e):this.useClickAsTap||this._trigger(k,e),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var t=this.userEvents,n=t.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),n.splice(e.inArray(this,n),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=c(),this._moved=!0,this._trigger(_,e)},_trigger:function(e,t){var n=this,i=t.event,o={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,o)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}}),I=l.extend({init:function(t,n){var i,a,c,u=this,h=r.guid();n=n||{},i=u.filter=n.filter,u.threshold=n.threshold||p,u.minHold=n.minHold||f,u.touches=[],u._maxTouches=n.multiTouch?2:1,u.allowSelection=n.allowSelection,u.captureUpIfMoved=n.captureUpIfMoved,u.useClickAsTap=!n.fastTap&&!s.delayedClick(),u.eventNS=h,t=e(t).handler(u),l.fn.init.call(u),d(u,{element:t,surface:e(n.global&&E?t[0].ownerDocument.documentElement:n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),u.surface.handler(u).on(r.applyEventMap("move",h),"_move").on(r.applyEventMap("up cancel",h),"_end"),t.on(r.applyEventMap("down",h),i,"_start"),u.useClickAsTap&&t.on(r.applyEventMap("click",h),i,"_click"),(s.pointers||s.msPointers)&&(s.browser.version<11?t.css("-ms-touch-action","pinch-zoom double-tap-zoom"):t.css("touch-action",n.touchAction||"none")),n.preventDragEvent&&t.on(r.applyEventMap("dragstart",h),r.preventDefault),t.on(r.applyEventMap("mousedown",h),i,{root:t},"_select"),u.captureUpIfMoved&&s.eventCapture&&(a=u.surface[0],c=e.proxy(u.preventIfMoving,u),o(function(e){a.addEventListener(e,c,!0)})),u.bind([m,g,k,_,b,w,x,y,C,S,T,D,v],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&s.eventCapture&&(e=t.surface[0],o(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget)},capture:function(){I.current=this},cancel:function(){this._disposeAll(),this.trigger(y)},notify:function(e,t){var i=this,o=i.touches;if(this._isMultiTouch()){switch(e){case b:e=S;break;case w:e=T;break;case k:e=D}d(t,{touches:o},n(o[0],o[1]))}return this.trigger(e,d(t,{type:e}))},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){this.allowSelection&&!this.trigger(v,{event:e})||e.preventDefault()},_start:function(t){var n,o,r=this,s=0,a=r.filter,l=i(t),c=l.length,d=t.which;if(!(d&&d>1||r._maxTouchesReached()))for(I.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();s<c&&!r._maxTouchesReached();s++)o=l[s],n=a?e(o.currentTarget):r.element,n.length&&(o=new R(r,n,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 n={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",n)&&t.preventDefault()},_eachTouch:function(e,t){var n,o,r,s,a=this,l={},c=i(t),d=a.touches;for(n=0;n<d.length;n++)o=d[n],l[o.id]=o;for(n=0;n<c.length;n++)r=c[n],s=l[r.id],s&&s[e](r)},_apiCall:function(t,n,i,o){this[t]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:e(o||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});I.defaultThreshold=function(e){p=e},I.minHold=function(e){f=e},r.getTouches=i,r.touchDelta=n,r.UserEvents=I}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.draganddrop.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(i){return!1}}function i(e,t){return parseInt(e.css(t),10)||0}function o(e,t){return Math.min(Math.max(e,t.min),t.max)}function r(e,t){var n=A(e),o=_._outerWidth,r=_._outerHeight,s=n.left+i(e,"borderLeftWidth")+i(e,"paddingLeft"),a=n.top+i(e,"borderTopWidth")+i(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(n,i,o){for(var r,s,a=0,l=i&&i.length,c=o&&o.length;n&&n.parentNode;){for(a=0;a<l;a++)if(r=i[a],r.element[0]===n)return{target:r,targetElement:n};for(a=0;a<c;a++)if(s=o[a],e.contains(s.element[0],n)&&b.matchesSelector.call(n,s.options.filter))return{target:s,targetElement:n};n=n.parentNode}return t}function a(e,t){var n,i=t.options.group,o=e[i];if(x.fn.destroy.call(t),o.length>1){for(n=0;n<o.length;n++)if(o[n]==t){o.splice(n,1);break}}else o.length=0,delete e[i]}function l(e){var t,n,i,o=c()[0];return e[0]===o?(n=o.scrollTop,i=o.scrollLeft,{top:n,left:i,bottom:n+y.height(),right:i+y.width()}):(t=e.offset(),t.bottom=t.top+e.height(),t.right=t.left+e.width(),t)}function c(){return e(_.support.browser.chrome?w.body:w.documentElement)}function d(t){var n,i=c();if(!t||t===w.body||t===w.documentElement)return i;for(n=e(t)[0];n&&!_.isScrollable(n)&&n!==w.body;)n=n.parentNode;return n===w.body?i:e(n)}function u(e,t,n){var i={x:0,y:0},o=50;return e-n.left<o?i.x=-(o-(e-n.left)):n.right-e<o&&(i.x=o-(n.right-e)),t-n.top<o?i.y=-(o-(t-n.top)):n.bottom-t<o&&(i.y=o-(n.bottom-t)),i}var h,f,p,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={},M={},R={},I=_.elementUnderCursor,F="keyup",z="change",P="dragstart",B="hold",L="drag",H="dragend",N="dragcancel",O="hintDestroyed",V="dragenter",U="dragleave",W="drop",j=C.extend({init:function(t,n){var i=this,o=t[0];i.capture=!1,o.addEventListener?(e.each(_.eventMap.down.split(" "),function(){o.addEventListener(this,T(i._press,i),!0)}),e.each(_.eventMap.up.split(" "),function(){o.addEventListener(this,T(i._release,i),!0)})):(e.each(_.eventMap.down.split(" "),function(){o.attachEvent(this,T(i._press,i))}),e.each(_.eventMap.up.split(" "),function(){o.attachEvent(this,T(i._release,i))})),C.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),q=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.horizontal?(n.measure="offsetWidth",
n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){e.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(e,t){this._virtualMin===e&&this._virtualMax===t||(this._virtualMin=e,this._virtualMax=t,this.update())},outOfBounds:function(e){return e>this.max||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,n=t.virtual?t._virtualMax:t.getTotal(),i=n*t.scale,o=t.getSize();(0!==n||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=o,t.total=i,t.min=Math.min(t.max,o-i),t.minScale=o/n,t.centerOffset=(i-o)/2,t.enabled=t.forcedEnabled||i>o,e||t.trigger(z,t))}}),G=C.extend({init:function(e){var t=this;C.fn.init.call(t),t.x=new q(D({horizontal:!0},e)),t.y=new q(D({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(z,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(z)}}),$=C.extend({init:function(e){var t=this;D(t,e),C.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,o=t.movable,r=o[i]+e;n.enabled&&((r<n.min&&e<0||r>n.max&&e>0)&&(e*=t.resistance),o.translateAxis(i,e),t.trigger(z,t))}}),Y=k.extend({init:function(t){var n,i,o,r,s=this;D(s,{elastic:!0},t),o=s.elastic?.5:0,r=s.movable,s.x=n=new $({axis:"x",dimension:s.dimensions.x,resistance:o,movable:r}),s.y=i=new $({axis:"y",dimension:s.dimensions.y,resistance:o,movable:r}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){s.gesture=e,s.offset=s.dimensions.container.offset()},press:function(t){e(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(e){var t,o,a,l=s.gesture,c=l.center,d=e.center,u=e.distance/l.distance,h=s.dimensions.minScale,f=s.dimensions.maxScale;r.scale<=h&&u<1&&(u+=.8*(1-u)),r.scale*u>=f&&(u=f/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),n.dragMove(t.x),i.dragMove(t.y),s.dimensions.rescale(r.scale),s.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(e.x.delta),i.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),K=b.transitions.prefix+"Transform";f=b.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"},p=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(f(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){D(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=f(n,i,t.scale),e!=t.coordinates&&(_.support.browser.msie&&_.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[K]=e,t._saveCoordinates(e),t.trigger(z))},_saveCoordinates:function(e){this.coordinates=e}}),m=x.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in M?M[n].push(i):M[n]=[i]},events:[V,U,W],options:{name:"DropTarget",group:"default"},destroy:function(){a(M,this)},_trigger:function(e,t){var n=this,i=E[n.options.group];if(i)return n.trigger(e,D({},t.event,{draggable:i,dropTarget:t.dropTarget}))},_over:function(e){this._trigger(V,e)},_out:function(e){this._trigger(U,e)},_drop:function(e){var t=this,n=E[t.options.group];n&&(n.dropped=!t._trigger(W,e))}}),m.destroyGroup=function(e){var t,n=M[e]||R[e];if(n){for(t=0;t<n.length;t++)x.fn.destroy.call(n[t]);n.length=0,delete M[e],delete R[e]}},m._cache=M,g=m.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in R?R[n].push(i):R[n]=[i]},destroy:function(){a(R,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),v=x.extend({init:function(e,t){var n=this;x.fn.init.call(n,e,t),n._activated=!1,n.userEvents=new S(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,threshold:n.options.distance,start:T(n._start,n),hold:T(n._hold,n),move:T(n._drag,n),end:T(n._end,n),cancel:T(n._cancel,n),select:T(n._select,n)}),n._afterEndHandler=T(n._afterEnd,n),n._captureEscape=T(n._captureEscape,n)},events:[B,P,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 n,i=this,r=i.options,s=i.boundaries,a=r.axis,l=i.options.cursorOffset;l?n={left:t.x.location+l.left,top:t.y.location+l.top}:(i.hintOffset.left+=t.x.delta,i.hintOffset.top+=t.y.delta,n=e.extend({},i.hintOffset)),s&&(n.top=o(n.top,s.y),n.left=o(n.left,s.x)),"x"===a?delete n.top:"y"===a&&delete n.left,i.hint.css(n)},_shouldIgnoreTarget:function(t){var n=this.options.ignore;return n&&e(t).is(n)},_select:function(e){this._shouldIgnoreTarget(e.event.target)||e.preventDefault()},_start:function(n){var i,o=this,s=o.options,a=s.container,l=s.hint;return this._shouldIgnoreTarget(n.touch.initialTouch)||s.holdToDrag&&!o._activated?(o.userEvents.cancel(),t):(o.currentTarget=n.target,o.currentTargetOffset=A(o.currentTarget),l&&(o.hint&&o.hint.stop(!0,!0).remove(),o.hint=_.isFunction(l)?e(l.call(o,o.currentTarget)):l,i=A(o.currentTarget),o.hintOffset=i,o.hint.css({position:"absolute",zIndex:2e4,left:i.left,top:i.top}).appendTo(w.body),o.angular("compile",function(){o.hint.removeAttr("ng-repeat");for(var t=e(n.target);!t.data("$$kendoScope")&&t.length;)t=t.parent();return{elements:o.hint.get(),scopeFrom:t.data("$$kendoScope")}})),E[s.group]=o,o.dropped=!1,a&&(o.boundaries=r(a,o.hint)),e(w).on(F,o._captureEscape),o._trigger(P,n)&&(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 n,i;t.preventDefault(),n=this._elementUnderCursor(t),this.options.autoScroll&&this._cursorElement!==n&&(this._scrollableParent=d(n),this._cursorElement=n),this._lastEvent=t,this._processMovement(t,n),this.options.autoScroll&&this._scrollableParent[0]&&(i=u(t.x.location,t.y.location,l(this._scrollableParent)),this._scrollCompenstation=e.extend({},this.hintOffset),this._scrollVelocity=i,0===i.y&&0===i.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(e.proxy(this,"_autoScroll"),50))),this.hint&&this._updateHint(t)},_processMovement:function(n,i){this._withDropTarget(i,function(i,o){if(!i)return h&&(h._trigger(U,D(n,{dropTarget:e(h.targetElement)})),h=null),t;if(h){if(o===h.targetElement)return;h._trigger(U,D(n,{dropTarget:e(h.targetElement)}))}i._trigger(V,D(n,{dropTarget:e(o)})),h=D(i,{targetElement:o})}),this._trigger(L,D(n,{dropTarget:h,elementUnderCursor:i}))},_autoScroll:function(){var e,t,n,i,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),i=l===c()[0],i?(t=w.body.scrollHeight>y.height(),n=w.body.scrollWidth>y.width()):(t=l.offsetHeight<=l.scrollHeight,n=l.offsetWidth<=l.scrollWidth),o=l.scrollTop+d.y,r=t&&o>0&&o<l.scrollHeight,s=l.scrollLeft+d.x,a=n&&s>0&&s<l.scrollWidth,r&&(l.scrollTop+=d.y),a&&(l.scrollLeft+=d.x),i&&(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(n,i){n&&(n._drop(D({},t,{dropTarget:e(i)})),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 n=this;return n.trigger(e,D({},t.event,{x:t.x,y:t.y,currentTarget:n.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(e){var t=I(e),i=this.hint;return i&&n(i[0],t)&&(i.hide(),t=I(e),t||(t=I(e)),i.show()),t},_withDropTarget:function(e,t){var n,i=this.options.group,o=M[i],r=R[i];(o&&o.length||r&&r.length)&&(n=s(e,o,r),n?t(n.target,n.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=j,_.containerBoundaries=r,D(_.ui,{Pane:Y,PaneDimensions:G,Movable:p}),_.ui.Draggable.utils={autoScrollVelocity:u,scrollableViewPort:l,findScrollableParent:d}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.scroller.min",["kendo.fx.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,o=n.effects,r=i.ui,s=e.proxy,a=e.extend,l=r.Widget,c=n.Class,d=n.ui.Movable,u=n.ui.Pane,h=n.ui.PaneDimensions,f=o.Transition,p=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,M=p.extend({init:function(e){var t=this;p.fn.init.call(t),a(t,e),t.userEvents.bind("gestureend",s(t.start,t)),t.tapCapture.bind("press",s(t.cancel,t))},enabled:function(){return this.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)}}),R=p.extend({init:function(e){var t=this;p.fn.init.call(t),a(t,e,{transition:new f({axis:e.axis,movable:e.movable,onEnd:function(){t._end()}})}),t.tapCapture.bind("press",function(){t.cancel()}),t.userEvents.bind("end",s(t.start,t)),t.userEvents.bind("gestureend",s(t.start,t)),t.userEvents.bind("tap",s(t.onEnd,t))},onCancel:function(){this.transition.cancel()},freeze:function(e){var t=this;t.cancel(),t._moveTo(e)},onEnd:function(){var e=this;e.paneAxis.outOfBounds()?e._snapBack():e._end()},done:function(){return m(this.velocity)<1},start:function(e){var t,n=this;n.dimension.enabled&&(n.paneAxis.outOfBounds()?n._snapBack():(t=e.touch.id===E?0:e.touch[n.axis].velocity,n.velocity=Math.max(Math.min(t*n.velocityMultiplier,w),-w),n.tapCapture.captureNext(),p.fn.start.call(n)))},tick:function(){var e=this,t=e.dimension,n=e.paneAxis.outOfBounds()?y:e.friction,i=e.velocity*=n,o=e.movable[e.axis]+i;!e.elastic&&t.outOfBounds(o)&&(o=Math.max(Math.min(o,t.max),t.min),e.velocity=0),e.movable.moveAxis(e.axis,o)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_snapBack:function(){var e=this,t=e.dimension,n=e.movable[e.axis]>t.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:g,ease:f.easeOutExpo})}}),I=p.extend({init:function(e){var t=this;n.effects.Animation.fn.init.call(this),a(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return 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&&n.isFunction(e)?this.callback=e:e=t},_updateCoordinates:function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}}}),F=c.extend({init:function(t){var n=this,i="x"===t.axis,o=e('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');a(n,t,{element:o,elementSize:0,movable:new d(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(T,s(n.refresh,n)),n.container.append(o),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,o=e.scrollMovable,r=i/n.total,s=Math.round(-o[t]*r),a=Math.round(i*r);r>=1?this.element.css("display","none"):this.element.css("display",""),s+a>i?a=i-s: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})}}),z=l.extend({init:function(i,o){var r,c,f,p,g,v,_,b,w,y=this;return l.fn.init.call(y,i,o),i=y.element,(y._native=y.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),a(y,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),r=i.children().eq(1),c=new n.TapCapture(i),f=new d(r),p=new h({element:r,container:i,forcedEnabled:y.options.zoom}),g=this.options.avoidScrolling,v=new n.UserEvents(i,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:y.options.zoom,start:function(t){p.refresh();var n=m(t.x.velocity),i=m(t.y.velocity),o=2*n>=i,r=e.contains(y.fixedContainer[0],t.event.target),s=2*i>=n;!r&&!g(t)&&y.enabled&&(p.x.enabled&&o||p.y.enabled&&s)?v.capture():v.cancel()}}),_=new u({movable:f,dimensions:p,userEvents:v,elastic:y.options.elastic}),b=new M({movable:f,dimensions:p,userEvents:v,tapCapture:c}),w=new I({moveTo:function(e){y.scrollTo(e.x,e.y)}}),f.bind(T,function(){y.scrollTop=-f.y,y.scrollLeft=-f.x,y.trigger(A,{scrollTop:y.scrollTop,scrollLeft:y.scrollLeft})}),y.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",s(this,"_wheelScroll")),a(y,{movable:f,dimensions:p,zoomSnapBack:b,animatedScroller:w,userEvents:v,pane:_,tapCapture:c,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),y._initAxis("x"),y._initAxis("y"),y._wheelEnd=function(){y._wheel=!1,y.userEvents.end(0,y._wheelY)},p.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=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[S,A,D],_resize:function(){this._native||this.contentResized()},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(this.scrollElement.scrollLeft(m(e)),this.scrollElement.scrollTop(m(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,o;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},o={x:e,y:t},this.animatedScroller.setCoordinates(i,o),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(C),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">'+e.pullTemplate({})+"</span></span>"),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",s(e._paneChange,e)),e.userEvents.bind("end",s(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(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,n=t.movable,i=t.dimensions[e],o=t.tapCapture,r=t.pane[e],s=new F({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(T,function(){s.refresh()}),r.bind(T,function(){s.show()}),t[e+"inertia"]=new R({axis:e,paneAxis:r,movable:n,tapCapture:o,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||_,velocityMultiplier:t.options.velocityMultiplier||b,end:function(){s.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});r.plugin(z)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.groupable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return e.position().top+3}var i=window.kendo,o=i.ui.Widget,r=i._outerWidth,s=e.proxy,a=!1,l=".kendoGroupable",c="change",d=i.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-button-bare"><span class="k-icon k-i-close"></span></a></div>',{useWithBlock:!1}),u=function(t){var n=t.attr(i.attr("title"));return n&&(n=i.htmlEncode(n)),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(n||t.attr(i.attr("field"))).prepend('<span class="k-icon k-drag-status k-i-cancel" />')},h=e('<div class="k-grouping-dropclue"/>'),f=o.extend({init:function(d,f){var p,m,g=this,v=i.guid(),_=s(g._intializePositions,g),b=g._dropCuePositions=[];o.fn.init.call(g,d,f),a=i.support.isRtl(d),m=a?"right":"left",g.draggable=p=g.options.draggable||new i.ui.Draggable(g.element,{filter:g.options.draggableElements,hint:u,group:v}),g.groupContainer=e(g.options.groupContainer,g.element).kendoDropTarget({group:p.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",n(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 n,o=t.draggable.currentTarget,r=o.attr(i.attr("field")),s=o.attr(i.attr("title")),l=g.indicator(r),c=g._dropCuePositions,d=c[c.length-1];(o.hasClass("k-group-indicator")||g._canDrag(o))&&(d?(n=g._dropCuePosition(i.getOffset(h).left+parseInt(d.element.css("marginLeft"),10)*(a?-1:1)+parseInt(d.element.css("marginRight"),10)),n&&g._canDrop(e(l),n.element,n.left)&&(n.before?n.element.before(l||g.buildIndicator(r,s)):n.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:p.options.group,dragcancel:s(g._dragCancel,g),dragstart:function(e){var t=e.currentTarget,i=parseInt(t.css("marginLeft"),10),o=t.position(),s=a?o.left-i:o.left+r(t);_(),h.css({top:n(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 n=e(this).parent(),o=g.buildIndicator(n.attr(i.attr("field")),n.attr(i.attr("title")),"asc"==n.attr(i.attr("dir"))?"desc":"asc");n.before(o).remove(),g._change(),t.preventDefault()}),p.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){g._dragEnd(this)},dragcancel:s(g._dragCancel,g),dragstart:function(e){var n,i,o;return g.options.allowDrag||g._canDrag(e.currentTarget)?(_(),b.length?(n=b[b.length-1].element,i=parseInt(n.css("marginRight"),10),o=n.position().left+r(n)+i):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,n=t.dataSource;t.groupContainer&&t.groupContainer.empty().append(e.map(n.group()||[],function(n){var o=n.field,r=i.attr("field"),s=t.element.find(t.options.filter).filter(function(){return e(this).attr(r)===o});return t.buildIndicator(n.field,s.attr(i.attr("title")),n.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 n=e(".k-group-indicator",this.groupContainer);return e.grep(n,function(n){return e(n).attr(i.attr("field"))===t})[0]},buildIndicator:function(e,t,n){return d({field:e.replace(/"/g,"'"),dir:n,title:t,ns:i.ns})},descriptors:function(){var t,n,o,r,s,a=this,l=e(".k-group-indicator",a.groupContainer);return t=a.element.find(a.options.filter).map(function(){var t=e(this),o=t.attr(i.attr("aggregates")),a=t.attr(i.attr("field"));if(o&&""!==o)for(n=o.split(","),o=[],r=0,s=n.length;r<s;r++)o.push({field:a,aggregate:n[r]});return o}).toArray(),e.map(l,function(n){return n=e(n),o=n.attr(i.attr("field")),{field:o,dir:n.attr(i.attr("dir")),aggregates:t||[]}})},_removeIndicator:function(e){var t=this;e.remove(),t._invalidateGroupContainer(),t._change()},_change:function(){var e,n=this;if(n.dataSource){if(e=n.descriptors(),n.trigger("change",{groups:e}))return n.refresh(),t;n.dataSource.group(e)}},_dropCuePosition:function(t){var n,i,o,s,l,c=this._dropCuePositions;if(h.is(":visible")&&0!==c.length)return t=Math.ceil(t),n=c[c.length-1],i=n.left,o=n.right,s=parseInt(n.element.css("marginLeft"),10),l=parseInt(n.element.css("marginRight"),10),t>=o&&!a||t<i&&a?t={left:n.element.position().left+(a?-s:r(n.element)+l),element:n.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(i.attr("field"));return"false"!=e.attr(i.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next(),o=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!a&&n>i.position().left||a&&n<i.position().left);return o},_dragEnd:function(t){var n=this,o=t.currentTarget.attr(i.attr("field")),r=n.indicator(o);t!==n.options.draggable&&!t.dropped&&r&&n._removeIndicator(e(r)),n._dragCancel()},_dragCancel:function(){h.remove(),this._dropCuePositions=[]},_intializePositions:function(){var t,n=this,o=e(".k-group-indicator",n.groupContainer);n._dropCuePositions=e.map(o,function(n){return n=e(n),t=i.getOffset(n).left,{left:parseInt(t,10),right:parseInt(t+r(n),10),element:n}})},_invalidateGroupContainer:function(){var e=this.groupContainer;e&&e.is(":empty")&&e.html(this.options.messages.empty)}});i.ui.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.reorderable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(t,n){t=e(t),n?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 i=window.kendo,o=i._outerWidth,r=i._outerHeight,s=i.getOffset,a=i.ui.Widget,l="change",c="k-reorderable",d=a.extend({init:function(t,d){var u,h=this,f=i.guid()+"-reorderable";a.fn.init.call(h,t,d),t=h.element.addClass(c),d=h.options,h.draggable=u=d.draggable||new i.ui.Draggable(t,{group:f,autoScroll:!0,filter:d.filter,hint:d.hint}),h.reorderDropCue=e('<div class="k-reorder-cue"><div class="k-icon k-i-arrow-60-down"></div><div class="k-icon k-i-arrow-60-up"></div></div>'),t.find(u.options.filter).kendoDropTarget({group:u.options.group,dragenter:function(e){var t,i,a,l;h._draggable&&(t=this.element,a=!h._dropTargetAllowed(t)||h._isLastDraggable(),n(e.draggable.hint,a),a||(i=s(t),l=i.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:i.top,left:l}).appendTo(document.body)))},dragleave:function(e){n(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,n;h._dropTarget&&!this.hint.find(".k-drag-status").hasClass("k-i-cancel")&&(t=s(h._dropTarget).left,n=o(h._dropTarget),h.reorderDropCue.css(e.pageX>t+n/2?{left:t+n}:{left:t}))}})},options:{name:"Reorderable",filter:"*"},events:[l],_isLastDraggable:function(){var e,t=this.options.inSameContainer,n=this._draggable[0],i=this._elements.get(),o=!1;if(!t)return!1;for(;!o&&i.length>0;)e=i.pop(),o=n!==e&&t({source:n,target:e,sourceIndex:this._index(n),targetIndex:this._index(e)});return!o},_dropTargetAllowed:function(e){var t=this.options.inSameContainer,n=this.options.dragOverContainers,i=this._draggable;return i[0]!==e[0]&&(!t||!n||(!!t({source:i,target:e,sourceIndex:this._index(i),targetIndex:this._index(e)})||n(this._index(i),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}});i.ui.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.resizable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.Widget,r=e.proxy,s=n.isFunction,a=e.extend,l="horizontal",c="vertical",d="start",u="resize",h="resizeend",f=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=c?l:c,n._positionMouse=n.orientation==l?"x":"y",n._position=n.orientation==l?"left":"top",n._sizingDom=n.orientation==l?"outerWidth":"outerHeight",n.draggable=new i.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:r(n._resize,n),dragcancel:r(n._cancel,n),dragstart:r(n._start,n),dragend:r(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[u,h,d],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,o=n.options.max;return s(o)?o(e):o!==t?n._initialElementPosition+o-i:o},_min:function(e){var n=this,i=n.options.min;return s(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,o=e(t.currentTarget);n._initialElementPosition=o.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=s(i)?e(i(o)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(d,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",o.css("cursor"))},_resize:function(e){var n,i=this,o=i._maxPosition,r=i._minPosition,s=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=r!==t?Math.max(r,s):s,i.position=n=o!==t?Math.min(o,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==o||n==r).css(i._position,n),i.resizing=!0,i.trigger(u,a(e,{position:n
}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(h,a(t,{position:n.position})),e(document.body).css("cursor","")},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._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(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,i=n._position,o=n.targetPosition,r=n.position;r===t&&(r=o[i]),o[i]=r+e,n.userEvents.move(o.left,o.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.sortable.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(i){return!1}}function i(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",f="change",p="cancel",m="sort",g="remove",v="receive",_=">*",b=-1,w=s.extend({init:function(e,t){var n=this;s.fn.init.call(n,e,t),n.options.placeholder||(n.options.placeholder=o),n.options.hint||(n.options.hint=i),n.draggable=n._createDraggable()},events:[c,d,u,h,f,p],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,n=t.element,i=t.options;return new r.ui.Draggable(n,{filter:i.filter,hint:r.isFunction(i.hint)?i.hint:e(i.hint),holdToDrag:i.holdToDrag,container:i.container?e(i.container):null,cursorOffset:i.cursorOffset,axis:i.axis,ignore:i.ignore,autoScroll:i.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 n=this.draggedElement=t.currentTarget,i=this.options.disabled,o=this.options.handler,s=this.options.placeholder,a=this.placeholder=e(r.isFunction(s)?s.call(this,n):s);i&&n.is(i)?t.preventDefault():o&&!e(t.initialTarget).is(o)?t.preventDefault():this.trigger(c,{item:n,draggableEvent:t})?t.preventDefault():(n.css("display","none"),n.before(a),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(p,{item:this.draggedElement}),this._resetCursor()},_drag:function(n){var i,o,r,s,a,l=this.draggedElement,c=this._findTarget(n),d={left:n.x.location,top:n.y.location},u={x:n.x.delta,y:n.y.delta},h=this.options.axis,f=this.options.moveOnDragEnter,p={item:l,list:this,draggableEvent:n};if("x"===h||"y"===h)return this._movementByAxis(h,d,u[h],p),t;if(c){if(i=this._getElementCenter(c.element),o={left:Math.round(d.left-i.left),top:Math.round(d.top-i.top)},e.extend(p,{target:c.element}),c.appendToBottom)return this._movePlaceholder(c,null,p),t;if(c.appendAfterHidden&&this._movePlaceholder(c,"next",p),this._isFloating(c.element)?u.x<0&&f||!f&&o.left<0?r="prev":(u.x>0&&f||!f&&o.left>0)&&(r="next"):u.y<0&&f||!f&&o.top<0?r="prev":(u.y>0&&f||!f&&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,p)}}},_dragend:function(n){var i,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:n},d>=0?o=this.trigger(h,r):(i=a.parents(u).getKendoSortable(),r.action=g,s=e.extend({},r,{action:v,oldIndex:b,newIndex:i.indexOf(a)}),o=!(!this.trigger(h,r)&&!i.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:n},this.trigger(f,r),i&&(s=e.extend({},r,{action:v,oldIndex:b,newIndex:i.indexOf(l)}),i.trigger(f,s)),t)},_findTarget:function(n){var i,o,r=this._findElementUnderCursor(n),s=this.options.connectWith;return e.contains(this.element[0],r)?(i=this.items(),o=i.filter(r)[0]||i.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,n):t},_findElementUnderCursor:function(e){var t=r.elementUnderCursor(e),i=e.sender;return n(i.hint[0],t)&&(i.hint.hide(),t=r.elementUnderCursor(e),t||(t=r.elementUnderCursor(e)),i.hint.show()),t},_searchConnectedTargets:function(t,n){var i,o,r,s,a=e(this.options.connectWith);for(s=0;s<a.length;s++)if(i=a.eq(s).getKendoSortable(),e.contains(a[s],t)){if(i)return o=i.items(),r=o.filter(t)[0]||o.has(t)[0],r?(i.placeholder=this.placeholder,{element:e(r),sortable:i}):null}else if(a[s]==t){if(i&&i._isEmpty())return{element:a.eq(s),sortable:i,appendToBottom:!0};if(this._isCursorAfterLast(i,n))return r=i.items().last(),{element:r,sortable:i}}},_isCursorAfterLast:function(e,t){var n,i,o=e.items().last(),s={left:t.x.location,top:t.y.location};return n=r.getOffset(o),n.top+=l(o),n.left+=a(o),i=this._isFloating(o)?n.left-s.left:n.top-s.top,i<0},_movementByAxis:function(t,n,i,o){var r,s="x"===t?n.left:n.top,a=i<0?this.placeholder.prev():this.placeholder.next();a.length&&!a.is(":visible")&&(a=i<0?a.prev():a.next()),e.extend(o,{target:a}),r=this._getElementCenter(a),r&&(r="x"===t?r.left:r.top),a.length&&i<0&&s-r<0?this._movePlaceholder({element:a,sortable:this},"prev",o):a.length&&i>0&&s-r>0&&this._movePlaceholder({element:a,sortable:this},"next",o)},_movePlaceholder:function(e,t,n){var i=this.placeholder;e.sortable.trigger(d,n)||(t?"prev"===t?e.element.before(i):"next"===t&&e.element.after(i):e.element.append(i),e.sortable.trigger(u,n))},_setCursor:function(){var t,n=this.options.cursor;n&&"auto"!==n&&(t=e(document.body),this._originalCursorType=t.css("cursor"),t.css({cursor:n}),this._cursorStylesheet||(this._cursorStylesheet=e("<style>* { cursor: "+n+" !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(),n=this.placeholder,i=this.draggedElement;return n&&e[0]==n[0]?t.not(i).index(e):t.not(n).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,n){(n||t)()}),function(e,define){define("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){if(!e.is(":visible"))return!1;var n=o.getOffset(e),i=t.left+t.width,r=t.top+t.height;return n.right=n.left+o._outerWidth(e),n.bottom=n.top+o._outerHeight(e),!(n.left>i||n.right<t.left||n.top>r||n.bottom<t.top)}var i,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",f=".kendoSelectable",p="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),i=r.extend({init:function(t,n){var i,a=this;r.fn.init.call(a,t,n),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,i=a.options.multiple,this.options.aria&&i&&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)}),i&&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:">*",multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,o=!1;for(e=e[0],t=0;t<i;t++)if(n[t]===e){o=!0;break}return o},_tap:function(t){var n,i=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(i.closest("."+u))||l&&3==l||d&&2==d||this._allowSelection(t.event.target)&&(n=i.hasClass(c),s&&r||o.clear(),i=i.add(o.relatedTarget(i)),a?o.selectRange(o._firstSelectee(),i):(n&&r?(o._unselect(i),o._notify(h)):o.value(i),o._lastActive=o._downTarget=i))},_start:function(n){var i,o=this,r=e(n.target),s=r.hasClass(c),a=n.event.ctrlKey||n.event.metaKey;if(this._allowSelection(n.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):(i=r.closest(o.element),o._items=i.find(o.options.filter)),n.sender.capture(),o._marquee.appendTo(document.body).css({left:n.x.client+1,top:n.y.client+1,width:0,height:0}),a||o.clear(),r=r.add(o.relatedTarget(r)),s&&(o._selectElement(r,!0),a&&r.addClass(p))}},_move:function(e){var t=this,n={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(n),t._invalidateSelectables(n,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(){var e,t=this;t._marquee.remove(),t._unselect(t.element.find(t.options.filter+"."+p)).removeClass(p),e=t.element.find(t.options.filter+"."+d),e=e.add(t.relatedTarget(e)),t.value(e),t._lastActive=t._downTarget,t._items=null},_invalidateSelectables:function(e,t){var i,o,r,s,a=this._downTarget[0],l=this._items;for(i=0,o=l.length;i<o;i++)s=l.eq(i),r=s.add(this.relatedTarget(s)),n(s,e)?s.hasClass(c)?t&&a!==s[0]&&r.removeClass(c).addClass(p):s.hasClass(d)||s.hasClass(p)||r.addClass(d):s.hasClass(d)?r.removeClass(d):t&&s.hasClass(p)&&r.removeClass(p).addClass(c)},value:function(e){var n=this,i=s(n._selectElement,n);return e?(e.each(function(){i(this)}),n._notify(h),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,n){var i=e(t),o=!n&&this._notify("select",{element:t});i.removeClass(d),o||(i.addClass(c),this.options.aria&&i.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(m))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(m)||(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,n){var i,o,r,s=this;for(s.clear(),s.element.length>1&&(r=s.options.continuousItems()),r&&r.length||(r=s.element.find(s.options.filter)),t=e.inArray(e(t)[0],r),n=e.inArray(e(n)[0],r),t>n&&(o=t,t=n,n=o),s.options.useAllItems||(n+=s.element.length-1),i=t;i<=n;i++)s._selectElement(r[i]);s._notify(h)},destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(f),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),i.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(i)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.button.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=e.proxy,r=n.keys,s="click",a="k-button",l="k-button-icon",c="k-button-icontext",d=".kendoButton",u="disabled",h="k-state-disabled",f="k-state-focused",p="k-state-selected",m=i.extend({init:function(e,t){var r=this;i.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),r._tabindex(),r._graphics(),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)),n.notify(r)},destroy:function(){var e=this;e.wrapper.off(d),i.fn.destroy.call(e)},events:[s],options:{name:"Button",icon:"",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(f)},_blur:function(){this.element.removeClass(f)},_keydown:function(e){var t=this;t._isNativeButton()||e.keyCode!=r.ENTER&&e.keyCode!=r.SPACEBAR||(e.keyCode==r.SPACEBAR&&(e.preventDefault(),t.options.enable&&t.element.addClass(p)),t._click(e))},_keyup:function(){this.element.removeClass(p)},_graphics:function(){var t,n,i,o=this,r=o.element,s=o.options,a=s.icon,d=s.spriteCssClass,u=s.imageUrl;(d||u||a)&&(i=!0,r.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(t,n){(1==n.nodeType||3==n.nodeType&&e.trim(n.nodeValue).length>0)&&(i=!1)}),r.addClass(i?l:c)),a?(t=r.children("span.k-icon").first(),t[0]||(t=e('<span class="k-icon"></span>').prependTo(r)),t.addClass("k-i-"+a)):d?(t=r.children("span.k-sprite").first(),t[0]||(t=e('<span class="k-sprite"></span>').prependTo(r)),t.addClass(d)):u&&(n=r.children("img.k-image").first(),n[0]||(n=e('<img alt="icon" class="k-image" />').prependTo(r)),n.attr("src",u))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(h,!e).attr("aria-disabled",!e).attr(u,!e);try{i.blur()}catch(o){}}});n.ui.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pager.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e,t,n,i,o){return e({idx:t,text:n,ns:c.ns,numeric:i,title:o||""})}function i(e,t,n){return k({className:e.substring(1),text:t,wrapClassName:n||""})}function o(e,t,n,i){e.find(t).parent().attr(c.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function r(e,t){o(e,f,1,t<=1)}function s(e,t){o(e,m,Math.max(1,t-1),t<=1)}function a(e,t,n){o(e,g,Math.min(n,t+1),t>=n)}function l(e,t,n){o(e,p,n,t>=n)}var c=window.kendo,d=c.ui,u=d.Widget,h=e.proxy,f=".k-i-seek-w",p=".k-i-seek-e",m=".k-i-arrow-w",g=".k-i-arrow-e",v="change",_=".kendoPager",b="click",w="keydown",y="disabled",k=c.template('<a href="\\#" aria-label="#=text#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>'),x=u.extend({init:function(t,n){var o,d,y,k,x=this;u.fn.init.call(x,t,n),n=x.options,x.dataSource=c.data.DataSource.create(n.dataSource),x.linkTemplate=c.template(x.options.linkTemplate),x.selectTemplate=c.template(x.options.selectTemplate),x.currentPageTemplate=c.template(x.options.currentPageTemplate),o=x.page(),d=x.totalPages(),x._refreshHandler=h(x.refresh,x),x.dataSource.bind(v,x._refreshHandler),n.previousNext&&(x.element.find(f).length||(x.element.append(i(f,n.messages.first,"k-pager-first")),r(x.element,o,d)),x.element.find(m).length||(x.element.append(i(m,n.messages.previous)),s(x.element,o,d))),n.numeric&&(x.list=x.element.find(".k-pager-numbers"),x.list.length||(x.list=e('<ul class="k-pager-numbers k-reset" />').appendTo(x.element))),n.input&&(x.element.find(".k-pager-input").length||x.element.append('<span class="k-pager-input k-label">'+n.messages.page+'<input class="k-textbox">'+c.format(n.messages.of,d)+"</span>"),x.element.on(w+_,".k-pager-input input",h(x._keydown,x))),n.previousNext&&(x.element.find(g).length||(x.element.append(i(g,n.messages.next)),a(x.element,o,d)),x.element.find(p).length||(x.element.append(i(p,n.messages.last,"k-pager-last")),l(x.element,o,d))),n.pageSizes&&(x.element.find(".k-pager-sizes").length||(y=n.pageSizes.length?n.pageSizes:["all",5,10,20],k=e.map(y,function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"<option value='all'>"+n.messages.allPages+"</option>":"<option>"+e+"</option>"}),e('<span class="k-pager-sizes k-label"><select/>'+n.messages.itemsPerPage+"</span>").appendTo(x.element).find("select").html(k.join("")).end().appendTo(x.element)),x.element.find(".k-pager-sizes select").val(x.pageSize()),c.ui.DropDownList&&x.element.find(".k-pager-sizes select").show().kendoDropDownList(),x.element.on(v+_,".k-pager-sizes select",h(x._change,x))),n.refresh&&(x.element.find(".k-pager-refresh").length||x.element.append('<a href="#" class="k-pager-refresh k-link" title="'+n.messages.refresh+'"><span class="k-icon k-i-reload"></span></a>'),x.element.on(b+_,".k-pager-refresh",h(x._refreshClick,x))),n.info&&(x.element.find(".k-pager-info").length||x.element.append('<span class="k-pager-info k-label" />')),x.element.on(b+_,"a",h(x._click,x)).addClass("k-pager-wrap k-widget k-floatwrap"),x.element.on(b+_,".k-current-page",h(x._toggleActive,x)),n.autoBind&&x.refresh(),c.notify(x)},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()},refresh:function(e){var t,i,o,d,u,h,f=this,p=1,m=f.page(),g="",v=f.options,_=f.pageSize(),b=f.dataSource.total(),w=f.totalPages(),k=f.linkTemplate,x=v.buttonCount;if(!e||"itemchange"!=e.action){if(v.numeric){for(m>x&&(o=m%x,p=0===o?m-x+1:m-o+1),i=Math.min(p+x-1,w),p>1&&(g+=n(k,p-1,"...",!1,v.messages.morePages)),t=p;t<=i;t++)g+=n(t==m?f.selectTemplate:k,t,t,!0);i<w&&(g+=n(k,t,"...",!1,v.messages.morePages)),""===g&&(g=f.selectTemplate({text:0})),g=this.currentPageTemplate({text:m})+g,f.list.removeClass("k-state-expanded").html(g)}v.info&&(g=b>0?c.format(v.messages.display,Math.min((m-1)*_+1,b),Math.min(m*_,b),b):v.messages.empty,f.element.find(".k-pager-info").html(g)),v.input&&f.element.find(".k-pager-input").html(f.options.messages.page+'<input class="k-textbox">'+c.format(v.messages.of,w)).find("input").val(m).attr(y,b<1).toggleClass("k-state-disabled",b<1),v.previousNext&&(r(f.element,m,w),s(f.element,m,w),a(f.element,m,w),l(f.element,m,w)),v.pageSizes&&(d=f.element.find(".k-pager-sizes option[value='all']").length>0,u=d&&_===this.dataSource.total(),h=_,u&&(_="all",h=v.messages.allPages),f.element.find(".k-pager-sizes select").val(_).filter("["+c.attr("role")+"=dropdownlist]").kendoDropDownList("value",_).kendoDropDownList("text",h))}},_keydown:function(e){if(e.keyCode===c.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),n=parseInt(t.val(),10);(isNaN(n)||n<1||n>this.totalPages())&&(n=this.page()),t.val(n),this.page(n)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var t=e.currentTarget.value,n=parseInt(t,10),i=this.dataSource;isNaN(n)?"all"==(t+"").toLowerCase()&&i.pageSize(i.total()):i.pageSize(n)},_toggleActive:function(){this.list.toggleClass("k-state-expanded")},_click:function(t){var n=e(t.currentTarget);t.preventDefault(),n.is(".k-state-disabled")||this.page(n.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(x)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.notification.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.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",f="info",p="success",m="warning",g="error",v="top",_="left",b="bottom",w="right",y="up",k=".kendoNotification",x='<div class="k-widget 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=i.extend({init:function(t,o){var r=this;i.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="_"+n.guid(),r._isRtl=n.support.isRtl(t),r._compileStacking(o.stacking,o.position.top,o.position.left),n.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 i=this,o=n.template;i._compiled={},e.each(t,function(t,n){i._compiled[n.type]=o(n.template||e("#"+n.templateId).html())}),i._defaultCompiled=o(C),i._safeCompiled=o(S)},_getCompiled:function(e,t){var n=t?this._safeCompiled:this._defaultCompiled;return e?this._compiled[e]||n:n},_compileStacking:function(e,t,n){var i,o,r=this,s={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},a=null!==n?_:w;switch(e){case"down":i=b+" "+a,o=v+" "+a,delete s.paddingBottom;break;case w:i=v+" "+w,o=v+" "+_,delete s.paddingRight;break;case _:i=v+" "+_,o=v+" "+w,delete s.paddingLeft;break;case y:i=v+" "+a,o=b+" "+a,delete s.paddingTop;break;default:null!==t?(i=b+" "+a,o=v+" "+a,delete s.paddingBottom):(i=v+" "+a,o=b+" "+a,delete s.paddingTop)}r._popupOrigin=i,r._popupPosition=o,r._popupPaddings=s},_attachPopupEvents:function(e,t){function n(e){e.on(a+k,function(){o._hidePopup(t)})}var i,o=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?t.bind("activate",function(){l?s(function(){n(t.element)},r):n(t.element)}):e.button&&(i=t.element.find(u),l?s(function(){n(i)},r):n(i))},_showPopup:function(t,i){var o,a,l=this,c=i.autoHideAfter,d=i.position.left,f=i.position.top;a=e("."+l._guid+":not(."+h+")").last(),o=new n.ui.Popup(t,{anchor:a[0]?a:document.body,origin:l._popupOrigin,position:l._popupPosition,animation:i.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(i,o),a[0]?o.open():(null===d&&(d=e(window).width()-t.width()-i.position.right),null===f&&(f=e(window).height()-t.height()-i.position.bottom),o.open(d,f)),o.wrapper.addClass(l._guid).css(r({margin:0,zIndex:10050},l._popupPaddings)),i.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,n){var i=e(window),o=n?-1:1;t.css({top:parseInt(t.css(v),10)+o*i.scrollTop(),left:parseInt(t.css(_),10)+o*i.scrollLeft()})},_attachStaticEvents:function(e,t){function n(e){e.on(a+k,o(i._hideStatic,i,t))}var i=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?l?s(function(){n(t)},r):n(t):e.button&&(l?s(function(){n(t.find(u))},r):n(t.find(u)))},_showStatic:function(e,t){var n=this,i=t.autoHideAfter,o=t.animation,r=t.stacking==y||t.stacking==_?"prependTo":"appendTo";e.addClass(n._guid)[r](t.appendTo).hide().kendoAnimate(o.open||!1),n._attachStaticEvents(t,e),i>0&&s(function(){n._hideStatic(e)},i)},_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(i,o,s){var a,c,u=this,h=u.options,p=e(x);return o||(o=f),null!==i&&i!==t&&""!==i&&(n.isFunction(i)&&(i=i()),c={typeIcon:o,content:""},a=e.isPlainObject(i)?r(c,i):r(c,{content:i}),p.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:p,data:[{dataItem:a}]}}),e(h.appendTo)[0]?u._showStatic(p,h):u._showPopup(p,h),u.trigger(l,{element:p})),u},showText:function(e,t){this.show(e,t,!0)},info:function(e){return this.show(e,f)},success:function(e){return this.show(e,p)},warning:function(e){return this.show(e,m)},error:function(e){return this.show(e,g)},hide:function(){var t=this,n=t.getNotifications();return n.each(t.options.appendTo?function(n,i){t._hideStatic(e(i))}:function(n,i){var o=e(i).data("kendoPopup");o&&t._hidePopup(o)}),t},getNotifications:function(){var t=this,n=e("."+t._guid+":not(."+h+")");return t.options.appendTo?n:n.children("."+d)},setOptions:function(e){var n,o=this;i.fn.setOptions.call(o,e),n=o.options,e.templates!==t&&o._compileTemplates(n.templates),e.stacking===t&&e.position===t||o._compileStacking(n.stacking,n.position.top,n.position.left)},destroy:function(){i.fn.destroy.call(this),this.getNotifications().off(k).find(u).off(k)}});n.ui.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tooltip.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){for(;e.length;)i(e),e=e.parent()}function i(e){var t=e.data(s.ns+"title");t&&(e.attr("title",t),e.removeData(s.ns+"title"))}function o(e){var t=e.attr("title");t&&(e.data(s.ns+"title",t),e.attr("title",""))}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,f=e(document),p=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"}},M=function(e){return e.target.data(s.ns+"title")},R=a.extend({init:function(e,t){var n,i=this;a.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=E[n],i._documentKeyDownHandler=h(i._documentKeyDown,i),i.element.on(i.options.showOn+S,i.options.filter,h(i._showOn,i)).on("mouseenter"+S,i.options.filter,h(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+S,i.options.filter,h(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:M,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[v,_,w,b,y],_mouseenter:function(t){r(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n.options.showOn&&n.options.showOn.match(/click|focus/)?n._show(i):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,o=n.content,r=n.options.iframe;d(i)&&i.url?("iframe"in n.options||(r=!p(i.url)),n.trigger(y,{options:i,target:e}),r?(o.hide(),t=o.find("."+k)[0],t?t.src=i.url||t.src:o.html(C({content:i})),o.find("."+k).off("load"+S).on("load"+S,function(){n.trigger(w),o.show()})):(o.empty(),s.ui.progress(o,!0),n._ajaxRequest(i))):i&&c(i)?(i=i({sender:this,target:e}),o.html(i||"")):o.html(i),n.angular("compile",function(){return{elements:o}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(u({type:"GET",dataType:"html",cache:!1,error:function(e,n){s.ui.progress(t.content,!1),t.trigger(b,{status:n,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,i=t.target();t.popup||t._initPopup(),i&&i[0]!=e[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),i&&i[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",function(){n(e),e.removeAttr(g),this.element.removeAttr("id").attr("aria-hidden",!0),f.off("keydown"+S,t._documentKeyDownHandler)}),t.popup.open()},_initPopup:function(){var t=this,n=t.options,i=e(s.template(x)({callout:n.callout&&"center"!==n.position,dir:A[n.position],autoHide:n.autoHide}));t.popup=new l(i,u({activate:function(){var e=this.options.anchor,i=e[0].id||t.element[0].id;i&&(e.attr(g,i+m),this.element.attr("id",i+m)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),f.on("keydown"+S,t._documentKeyDownHandler),t.trigger(v)},close:function(){t.trigger(_)},copyAnchorStyles:!1,animation:n.animation},T[n.position])),i.css({width:n.width,height:n.height}),t.content=i.find(".k-tooltip-content"),t.arrow=i.find(".k-callout"),n.autoHide?i.on("mouseleave"+S,h(t._mouseleave,t)):i.on("click"+S,".k-tooltip-button",h(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(t){if(this.popup){
var i=e(t.currentTarget),o=i.offset(),r=t.pageX,a=t.pageY;if(o.right=o.left+s._outerWidth(i),o.bottom=o.top+s._outerHeight(i),r>o.left&&r<o.right&&a>o.top&&a<o.bottom)return;this.popup.close()}else n(e(t.currentTarget));clearTimeout(this.timeout)},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,o=i.offset,r=t.popup,s=r.options.anchor,a=e(s).offset(),l=parseInt(t.arrow.css("border-top-width"),10),c=e(r.element).offset(),d=A[r.flipped?D[n]:n],u=a[o]-c[o]+e(s)[i.size]()/2-l;t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+d).css(o,u)},target:function(){return this.popup?this.popup.options.anchor:null},destroy:function(){var e=this.popup;e&&(e.element.off(S),e.destroy()),clearTimeout(this.timeout),this.element.off(S),f.off("keydown"+S,this._documentKeyDownHandler),a.fn.destroy.call(this)}});s.ui.plugin(R)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.list.min",["kendo.data.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&""!==e&&null!==e&&("boolean"===n?e=!!e:"number"===n?e=+e:"string"===n&&(e=""+e)),e}function i(e){return e[e.length-1]}function o(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function r(e,t){var n,i,o,r,s=t.length,a=e.length,l=[],c=[];if(a)for(o=0;o<a;o++){for(n=e[o],i=!1,r=0;r<s;r++)if(n===t[r]){i=!0,l.push({index:o,item:n});break}i||c.push(n)}return{changed:l,unchanged:c}}function s(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function a(t,n){var i,o=!1;return t.filters&&(i=e.grep(t.filters,function(e){return o=a(e,n),e.filters?e.filters.length:e.field!=n}),o||t.filters.length===i.length||(o=!0),t.filters=i),o}var l,c,d=window.kendo,u=d.ui,h=d._outerWidth,f=d._outerHeight,p=u.Widget,m=d.keys,g=d.support,v=d.htmlEncode,_=d._activeElement,b=d.data.ObservableArray,w="id",y="change",k="k-state-focused",x="k-state-hover",C="k-i-loading",S="k-loading-hidden",T="open",D="close",A="cascade",E="select",M="selected",R="requestStart",I="requestEnd",F="width",z=e.extend,P=e.proxy,B=e.isArray,L=g.browser,H=L.msie,N=H&&L.version<9,O=/"/g,V={ComboBox:"DropDownList",DropDownList:"ComboBox"},U=d.ui.DataBoundWidget.extend({init:function(t,n){var i,o=this,r=o.ns;p.fn.init.call(o,t,n),t=o.element,n=o.options,o._isSelect=t.is(E),o._isSelect&&o.element[0].length&&(n.dataSource||(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value")),o.ul=e('<ul unselectable="on" class="k-list k-reset"/>').attr({tabIndex:-1,"aria-hidden":!0}),o.list=e("<div class='k-list-container'/>").append(o.ul).on("mousedown"+r,P(o._listMousedown,o)),i=t.attr(w),i&&(o.list.attr(w,i+"-list"),o.ul.attr(w,i+"_listbox")),o._header(),o._noData(),o._footer(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:"No data found."},setOptions:function(e){p.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),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)})},_listOptions:function(t){var n=this,i=n.options,o=i.virtual,r=P(n._listBound,n);return o="object"==typeof o?o:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:P(n._click,n),change:P(n._listChange,n),activate:P(n._activateItem,n),deactivate:P(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding")},dataBound:r,height:i.height,dataValueField:i.dataValueField,dataTextField:i.dataTextField,groupTemplate:i.groupTemplate,fixedGroupTemplate:i.fixedGroupTemplate,template:i.template},t,o),t.template||(t.template="#:"+d.expr(t.dataTextField,"data")+"#"),i.$angular&&(t.$angular=i.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:P(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",P(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(P(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&&this._clear.addClass(S)},_showClear:function(){var e=this;e._clear&&this._clear.removeClass(S)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isFilterEnabled()&&this._filter({word:"",open:!1}),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(e,t){var n,i,o=this,r=o.options,l=o.dataSource,c=z({},l.filter()||{}),d=e||c.filters&&c.filters.length&&!e,u=a(c,r.dataTextField);(e||u)&&o.trigger("filtering",{filter:e})||(n={filters:[],logic:"and"},s(e)&&n.filters.push(e),s(c)&&n.filters.push(c),o._cascading&&this.listView.setDSFilter(n),i=z({},{page:d?1:l.page(),pageSize:d?l.options.pageSize:l.pageSize(),sort:l.sort(),filter:l.filter(),group:l.group(),aggregate:l.aggregate()},{filter:n}),l[t?"read":"query"](l._mergeState(i)))},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_noData:function(){var n=e(this.noData),i=this.options.noDataTemplate;return this.angular("cleanup",function(){return{elements:n}}),d.destroy(n),n.remove(),i?(this.noData=e('<div class="k-nodata" style="display:none"><div></div></div>').appendTo(this.list),this.noDataTemplate="function"!=typeof i?d.template(i):i,t):(this.noData=null,t)},_renderNoData:function(){var e=this.noData;e&&(this._angularElement(e,"cleanup"),e.children(":first").html(this.noDataTemplate({instance:this})),this._angularElement(e,"compile"))},_toggleNoData:function(t){e(this.noData).toggle(t)},_footer:function(){var n=e(this.footer),i=this.options.footerTemplate;return this._angularElement(n,"cleanup"),d.destroy(n),n.remove(),i?(this.footer=e('<div class="k-footer"></div>').appendTo(this.list),this.footerTemplate="function"!=typeof i?d.template(i):i,t):(this.footer=null,t)},_renderFooter:function(){var e=this.footer;e&&(this._angularElement(e,"cleanup"),e.html(this.footerTemplate({instance:this})),this._angularElement(e,"compile"))},_header:function(){var n,i=e(this.header),o=this.options.headerTemplate;return this._angularElement(i,"cleanup"),d.destroy(i),i.remove(),o?(n="function"!=typeof o?d.template(o):o,i=e(n({})),this.header=i[0]?i:null,this.list.prepend(i),this._angularElement(this.header,"compile"),t):(this.header=null,t)},_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,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t=this,n=t.options,i=n.ignoreCase,o=n.dataTextField,r={value:i?e.word.toLowerCase():e.word,field:o,operator:n.filter,ignoreCase:i};t._open=e.open,t._filterSource(r)},search:function(e){var t=this.options;e="string"==typeof e?e:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!e.length||e.length>=t.minLength)&&(this._state="filter",this._isFilterEnabled()?this._filter({word:e,open:!0}):this._searchByWord(e))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;p.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(n){var i=this;if(n===t)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=e(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var e=this.listView.focus();e&&this._focused.add(this.filterInput).attr("aria-activedescendant",e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var e=this,t=e.element,n=e.options,i=d.getter,o=t.attr(d.attr("text-field")),r=t.attr(d.attr("value-field"));!n.dataTextField&&o&&(n.dataTextField=o),!n.dataValueField&&r&&(n.dataValueField=r),e._text=i(n.dataTextField),e._value=i(n.dataValueField)},_aria:function(e){var n=this,i=n.options,o=n._focused.add(n.filterInput);i.suggest!==t&&o.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,o.attr("aria-owns",e),n.ul.attr("aria-live",n._isFilterEnabled()?"polite":"off")},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,i=this,o=i.selectedIndex,r=i.options.value,s=i.value();i._isSelect&&!i.listView.bound()&&r&&(s=r),s!==n(i._old,typeof s)?e=!0:o!==t&&o!==i._oldIndex&&(e=!0),e&&(i._old=s,i._oldIndex=o,i._typing||i.element.trigger(y),i.trigger(y)),i.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_offsetHeight:function(){var t=0,n=this.listView.content.prevAll(":visible");return n.each(function(){var n=e(this);t+=f(n.hasClass("k-list-filter")?n.children():n)}),t},_height:function(n){var i,o,r,s=this,a=s.list,l=s.options.height,c=s.popup.visible();if(n||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&&(i=s._offsetHeight(),r=f(e(s.footer))||0,l=l-i-r),s.listView.content.height(l),c||o.hide()}return l},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,o=this.wrapper;if(n.data(F)||!i)return e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=parseFloat(e&&e.width)||h(o),e&&L.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i="border-box"!==n.css("box-sizing")?t-(h(n)-n.width()):t,n.css({fontFamily:o.css("font-family"),width:this.options.autoWidth?"auto":i,minWidth:i}).data(F,i),!0},_openHandler:function(e){this._adjustListWidth(),this.trigger(T)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger(D)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,n=!e.focus(),o=i(e.select());o===t&&this.options.highlightFirst&&n&&(o=0),o!==t?e.focus(o):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),n=this.listView.content.prev(".k-group-header"),i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=d.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("padding-right"),10),n.css("padding-right",i))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t)},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):this.popup.one("open",function(e){return P(function(){this._calculatePopupHeight(e)},this)}.call(this,e)))},_popup:function(){var e=this;e.popup=new u.Popup(e.list,z({},e.options.popup,{anchor:e.wrapper,open:P(e._openHandler,e),close:P(e._closeHandler,e),animation:e.options.animation,isRtl:g.isRtl(e.wrapper)}))},_makeUnselectable:function(){N&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,o=g.mobileOS&&(g.touch||g.MSPointers||g.pointers);e=e!==t?e:!i.popup.visible(),n||o||i._focused[0]===_()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?T:D]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e._old===e.value()&&e._oldIndex===e.selectedIndex||(e._cascadeTriggered=!0,e.trigger(A,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(y)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(R,e._requestStartHandler).unbind(I,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){var n=(e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t);if(n&&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")}});z(U,{inArray:function(e,t){var n,i,o=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=o.length;n<i;n++)if(e===o[n])return n;return-1},unifyType:n}),d.ui.List=U,u.Select=U.extend({init:function(e,t){U.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){var t,n=this;n.options.dataSource=e,n._dataSource(),n.listView.bound()&&(n._initialIndex=null),n.listView.setDataSource(n.dataSource),n.options.autoBind&&n.dataSource.fetch(),t=n._parentWidget(),t&&n._cascadeSelect(t)},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:n._select(e).done(function(){n._old=n._accessor(),n._oldIndex=n.selectedIndex})},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var n=this.element[0];return e===t?n.value:(null===e&&(e=""),n.value=e,t)},_accessorSelect:function(e,n){var i,r=this.element[0];return e===t?o(r).value||"":(o(r).selected=!1,n===t&&(n=-1),i=null!==e&&""!==e,i&&n==-1?this._custom(e):e?r.value=e:r.selectedIndex=n,t)},_custom:function(t){var n=this,i=n.element,o=n._customOption;o||(o=e("<option/>"),n._customOption=o,i.append(o)),o.text(t),o[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(C),e._focused.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(function(){e._arrowIcon&&(e._focused.attr("aria-busy",!0),e._arrowIcon.addClass(C),e._hideClear())},100))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,n=this,i=n.element,o=n.options,r=o.dataSource||{};r=e.isArray(r)?{data:r}:r,n._isSelect&&(t=i[0].selectedIndex,t>-1&&(o.index=t),r.select=i,r.fields=[{field:o.dataTextField},{field:o.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=P(n._showBusy,n),n._requestEndHandler=P(n._requestEnd,n),n._errorHandler=P(n._hideBusy,n)),n.dataSource=d.data.DataSource.create(r).bind(R,n._requestStartHandler).bind(I,n._requestEndHandler).bind("error",n._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){this.listView.focusNext()},_prevItem:function(){this.listView.focusPrev()},_move:function(e){var n,i,o,r,s,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())return l._fetch||(l.dataSource.one(y,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())),n=c.dataItemByIndex(c.getElementIndex(l._focus())),l.trigger(E,{dataItem:n,item:l._focus()}))return l._focus(o),t;l._select(l._focus(),!0).done(function(){l.popup.visible()||l._blur()})}e.preventDefault(),i=!0}else if(d===m.ENTER||d===m.TAB){if(l.popup.visible()&&e.preventDefault(),o=l._focus(),n=l.dataItem(),l.popup.visible()||n&&l.text()===l._text(n)||(o=null),r=l.filterInput&&l.filterInput[0]===_(),o){if(n=c.dataItemByIndex(c.getElementIndex(o)),s=l._value(n)!==U.unifyType(l.value(),typeof l._value(n)),s&&l.trigger(E,{dataItem:n,item:o}))return;l._select(o)}else l.input&&(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(),i=!0}else d===m.ESC?(l.popup.visible()&&e.preventDefault(),l.close(),i=!0):!l.popup.visible()||d!==m.PAGEDOWN&&d!==m.PAGEUP||(e.preventDefault(),a=d===m.PAGEDOWN?1:-1,c.scrollWith(a*c.screenHeight()),i=!0);return i},_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,n,i){var r,s,a,l,c=this,d=c.element,u=d[0],h=e.length,f="",p=0;for(n&&(f=n);p<h;p++)r="<option",s=e[p],a=c._text(s),l=c._value(s),l!==t&&(l+="",l.indexOf('"')!==-1&&(l=l.replace(O,"&quot;")),r+=' value="'+l+'"'),r+=">",a!==t&&(r+=v(a)),r+="</option>",f+=r;d.html(f),i!==t&&(u.value=i,u.value&&!i&&(u.selectedIndex=-1)),u.selectedIndex!==-1&&(r=o(u),r&&r.setAttribute(M,M))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=o.on("reset",t._resetHandler))},_parentWidget:function(){var t,n,i=this.options.name;if(this.options.cascadeFrom)return t=e("#"+this.options.cascadeFrom),n=t.data("kendo"+i),n||(n=t.data("kendo"+V[i])),n},_cascade:function(){var e,t=this,n=t.options,i=n.cascadeFrom;if(i){if(e=t._parentWidget(),!e)return;t._cascadeHandlerProxy=P(t._cascadeHandler,t),t._cascadeFilterRequests=[],n.autoBind=!1,e.bind("set",function(){t.one("set",function(e){t._selectedValue=e.value})}),e.first(A,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one("dataBound",function(){t._toggleCascadeOnFocus()}),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),n=H?"blur":"focusout";t._focused.add(t.filterInput).bind("focus",function(){t.unbind(A,e._cascadeHandlerProxy),t.first(y,e._cascadeHandlerProxy)}),t._focused.add(t.filterInput).bind(n,function(){t.unbind(y,e._cascadeHandlerProxy),t.first(A,e._cascadeHandlerProxy)})},_cascadeHandler:function(e){var t=this._parentWidget(),n=this.value();this._userTriggered=e.userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,n)},_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!==t.listView.value()[0]&&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,n){var i,o,r=this,s=e.dataItem(),l=s?e._value(s):null,c=r.options.cascadeFromField||e.options.dataValueField;r._valueBeforeCascade=n!==t?n:r.value(),l||0===l?(i=r.dataSource.filter()||{},a(i,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,n){p.fn.init.call(this,t,n),this.element.attr("role","listbox").on("click"+l,"li",P(this._click,this)).on("mouseenter"+l,"li",function(){e(this).addClass(x)}).on("mouseleave"+l,"li",function(){e(this).removeClass(x)}),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 i=this.options.value;i&&(this._values=e.isArray(i)?i.slice(0):[i]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=P(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",y,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=d.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(y,i._refreshHandler),n=i.value(),i.value([]),i.bound(!1),i.value(n)):i._refreshHandler=P(i.refresh,i),i.setDSFilter(o.filter()),i.dataSource=o.bind(y,i._refreshHandler),i._fixedHeader()},skip:function(){return this.dataSource.skip()},setOptions:function(e){p.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(y,this._refreshHandler),clearTimeout(this._scrollId),p.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],n=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=n+i;o>n?o=n:s>o+r&&(o=s-r),t.scrollTop=o}},selectedDataItems:function(e){return e===t?this._dataItems.slice():(this._dataItems=e,this._values=this._getValues(e),t)},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(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(i(this.element[0].children))},focus:function(n){var o,r=this,s=r._optionID;return n===t?r._current:(n=i(r._get(n)),n=e(this.element[0].children[n]),r._current&&(r._current.removeClass(k).removeAttr("aria-selected").removeAttr(w),r.trigger("deactivate")),o=!!n[0],o&&(n.addClass(k),r.scroll(n),n.attr("id",s)),r._current=o?n:null,r.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var o,r,s,a=this,l=a.options.selectable,c="multiple"!==l&&l!==!1,d=a._selectedIndices,u=[],h=[];return n===t?d.slice():(n=a._get(n),1===n.length&&n[0]===-1&&(n=[]),r=e.Deferred().resolve(),s=a.isFiltered(),s&&!c&&a._deselectFiltered(n)?r:c&&!s&&e.inArray(i(n),d)!==-1?(a._dataItems.length&&a._view.length&&(a._dataItems=[a._view[d[0]].item]),r):(o=a._deselect(n),h=o.removed,n=o.indices,n.length&&(c&&(n=[i(n)]),u=a._select(n)),(u.length||h.length)&&(a._valueComparer=null,a.trigger(y,{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 b?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(n){var i,o=this,r=o._valueDeferred;return n===t?o._values.slice():(o.setValue(n),r&&"resolved"!==r.state()||(o._valueDeferred=r=e.Deferred()),o.bound()&&(i=o._valueIndices(o._values),"multiple"===o.options.selectable&&o.select(-1),o.select(i),r.resolve()),o._skipUpdate=!1,r)},items:function(){return this.element.children(".k-item")},_click:function(t){t.isDefaultPrevented()||this.trigger("click",{item:e(t.currentTarget)})||this.select(t.currentTarget)},_valueExpr:function(e,t){var i,o,r=this,s=0,a=[];if(!r._valueComparer||r._valueType!==e){for(r._valueType=e;s<t.length;s++)a.push(n(t[s],e));i="for (var idx = 0; idx < "+a.length+"; idx++) { if (current === values[idx]) {   return idx; }} return -1;",o=Function("current","values",i),r._valueComparer=function(e){return o(e,a)}}return r._valueComparer},_dataItemPosition:function(e,t){var n=this._valueGetter(e),i=this._valueExpr(typeof n,t);return i(n)},_getter:function(){this._valueGetter=d.getter(this.options.dataValueField)},_deselect:function(t){var n,i,o,r=this,s=r.element[0].children,a=r.options.selectable,l=r._selectedIndices,c=r._dataItems,d=r._values,u=[],h=0,f=0;if(t=t.slice(),a!==!0&&t.length){if("multiple"===a)for(;h<t.length;h++)if(i=t[h],e(s[i]).hasClass("k-state-selected"))for(n=0;n<l.length;n++)if(o=l[n],o===i){e(s[o]).removeClass("k-state-selected"),u.push({position:n+f,dataItem:c.splice(n,1)[0]}),l.splice(n,1),t.splice(h,1),d.splice(n,1),f+=1,h-=1,n-=1;break}}else{for(;h<l.length;h++)e(s[l[h]]).removeClass("k-state-selected"),u.push({position:h,dataItem:c[h]});r._values=[],r._dataItems=[],r._selectedIndices=[]}return{indices:t,removed:u}},_deselectFiltered:function(t){for(var n,i,o,r=this.element[0].children,s=[],a=0;a<t.length;a++)i=t[a],n=this._view[i].item,o=this._dataItemPosition(n,this._values),o>-1&&(s.push(this.removeAt(o)),e(r[i]).removeClass("k-state-selected"));return!!s.length&&(this.trigger(y,{added:[],removed:s}),!0)},_select:function(t){var n,o,r=this,s=r.element[0].children,a=r._view,l=[],c=0;for(i(t)!==-1&&r.focus(t);c<t.length;c++)o=t[c],n=a[o],o!==-1&&n&&(n=n.item,r._selectedIndices.push(o),r._dataItems.push(n),r._values.push(r._valueGetter(n)),e(s[o]).addClass("k-state-selected").attr("aria-selected",!0),l.push({dataItem:n}));return l},getElementIndex:function(t){return e(t).data("offset-index")},_get:function(e){return"number"==typeof e?e=[e]:B(e)||(e=this.getElementIndex(e),e=[e!==t?e:-1]),e},_template:function(){var e=this,t=e.options,n=t.template;return n?(n=d.template(n),n=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+n(e)+"</li>"}):n=d.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+d.expr(t.dataTextField,"data")+"}</li>",{useWithBlock:!1}),n},_templates:function(){var e,t,n=this.options,i={template:n.template,groupTemplate:n.groupTemplate,fixedGroupTemplate:n.fixedGroupTemplate};for(t in i)e=i[t],e&&"function"!=typeof e&&(i[t]=d.template(e));this.templates=i},_normalizeIndices:function(e){for(var n=[],i=0;i<e.length;i++)e[i]!==t&&n.push(e[i]);return n},_valueIndices:function(e,t){var n,i=this._view,o=0;if(t=t?t.slice():[],!e.length)return[];for(;o<i.length;o++)n=this._dataItemPosition(i[o].item,e),n!==-1&&(t[n]=o);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var t=this.element[0],n=this.content[0],i=n.scrollTop,o=e(t.children[0]).height(),r=Math.floor(i/o)||0,s=t.children[r]||t.lastChild,a=s.offsetTop<i;s;)if(a){if(s.offsetTop+o>i||!s.nextSibling)break;s=s.nextSibling}else{if(s.offsetTop<=i||!s.previousSibling)break;s=s.previousSibling}return this._view[e(s).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e,t=this.templates.fixedGroupTemplate;t&&(e=this._firstVisibleItem(),e&&this.header.html(t(e.group)))},_renderItem:function(e){var t='<li tabindex="-1" role="option" unselectable="on" class="k-item',n=e.item,i=0!==e.index,o=e.selected;return i&&e.newGroup&&(t+=" k-first"),o&&(t+=" k-state-selected"),t+='"'+(o?' aria-selected="true"':"")+' data-offset-index="'+e.index+'">',t+=this.templates.template(n),i&&e.newGroup&&(t+='<div class="k-group">'+this.templates.groupTemplate(e.group)+"</div>"),t+"</li>"},_render:function(){var e,t,n,i,o="",r=0,s=0,a=[],l=this.dataSource.view(),c=this.value(),d=this.isGrouped();if(d)for(r=0;r<l.length;r++)for(t=l[r],n=!0,i=0;i<t.items.length;i++)e={selected:this._selected(t.items[i],c),item:t.items[i],group:t.value,newGroup:n,index:s},a[s]=e,s+=1,o+=this._renderItem(e),n=!1;else for(r=0;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 n=!this.isFiltered()||"multiple"===this.options.selectable;return n&&this._dataItemPosition(e,t)!==-1},setDSFilter:function(e){this._lastDSFilter=z({},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,n=this,i=e&&e.action,o=n.options.skipUpdateOnBind,s="itemchange"===i;n.trigger("dataBinding"),n._angularItems("cleanup"),n._fixedHeader(),n._render(),n.bound(!0),s||"remove"===i?(t=r(n._dataItems,e.items),t.changed.length&&(s?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))):n.isFiltered()||n._skipUpdate?(n.focus(0),n._skipUpdate&&(n._skipUpdate=!1,n._selectedIndices=n._valueIndices(n._values,n._selectedIndices))):o||i&&"add"!==i||n.value(n._values),n._valueDeferred&&n._valueDeferred.resolve(),n._angularItems("compile"),n.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,n){(n||t)()}),function(e,define){define("kendo.calendar.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var o,r=e.getFullYear(),s=t.getFullYear(),a=n.getFullYear();return r-=r%i,o=r+(i-1),r<s&&(r=s),o>a&&(o=a),r+"-"+o}function i(e){var t,n=0,i=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,f=e.weekNumber||N,p=e.content||L,m=e.empty||H,g=e.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';for(u&&(g+=f(c(r)));n<d;n++)n>0&&n%h===0&&(g+='</tr><tr role="row">',u&&(g+=f(c(r)))),r=new xe(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0),M(r,0),t=l(r,n,e.disableDates),g+=a(r,i,o)?p(t):m(t),s(r,1);return g+"</tr></tbody></table>"}function o(e,t,n){var i=e.getFullYear(),o=t.getFullYear(),r=o,s=0;return n&&(o-=o%n,r=o-o%n+n-1),i>r?s=1:i<o&&(s=-1),s}function r(){var e=new xe;return new xe(e.getFullYear(),e.getMonth(),e.getDate())}function s(e,t,n){var i=r();return e&&(i=new xe((+e))),t>i?i=new xe((+t)):n<i&&(i=new xe((+n))),i}function a(e,t,n){return+e>=+t&&+e<=+n}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function c(e,t,n){t=t instanceof xe?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function d(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(ne,he.indexOf(t.type)>-1||t.type==de)}function u(e){e.preventDefault()}function h(e){return z(e).calendars.standard}function f(e){var n=Ce[e.start],i=Ce[e.depth],o=z(e.culture);e.format=I(e.format||o.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=X),(i===t||i>n)&&(e.depth=X),null===e.dates&&(e.dates=[])}function p(e){V&&e.find("*").attr("unselectable","on")}function m(e,t){e.addClass("k-"+t)}function g(e,t){for(var n=0,i=t.length;n<i;n++)if(e===+t[n])return!0;return!1}function v(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}function _(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}function b(t){return C.isFunction(t)?t:e.isArray(t)?y(t):e.noop}function w(e){var t,n=[];for(t=0;t<e.length;t++)n.push(e[t].setHours(0,0,0,0));return n}function y(t){
var n,i,o,r,s,a=[],l=["su","mo","tu","we","th","fr","sa"],c="if (found) { return true } else {return false}";if(t[0]instanceof xe)a=w(t),n="var found = date && $.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);n="var found = date && $.inArray(date.getDay(),["+a+"]) > -1;"+c}return i=Function("date",n)}function k(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}var x,C=window.kendo,S=C.support,T=C.ui,D=T.Widget,A=C.keys,E=C.parseDate,M=C.date.adjustDST,R=C.date.weekInYear,I=C._extractFormat,F=C.template,z=C.getCulture,P=C.support.transitions,B=P?P.css+"transform-origin":"",L=F('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),H=F('<td role="gridcell">&nbsp;</td>',{useWithBlock:!1}),N=F('<td class="k-alt">#= data.weekNumber #</td>',{useWithBlock:!1}),O=C.support.browser,V=O.msie&&O.version<9,U=C._outerHeight,W=C._outerWidth,j=".kendoCalendar",q="click"+j,G="keydown"+j,$="id",Y="min",K="left",Q="slideIn",X="month",Z="century",J="change",ee="navigate",te="value",ne="k-state-hover",ie="k-state-disabled",oe="k-state-focused",re="k-other-month",se=' class="'+re+'"',ae="k-nav-today",le="td:has(.k-link)",ce="blur"+j,de="focus",ue=de+j,he=S.touch?"touchstart":"mouseenter",fe=S.touch?"touchstart"+j:"mouseenter"+j,pe=S.touch?"touchend"+j+" touchmove"+j:"mouseleave"+j,me=6e4,ge=864e5,ve="_prevArrow",_e="_nextArrow",be="aria-disabled",we="aria-selected",ye=e.proxy,ke=e.extend,xe=Date,Ce={month:0,year:1,decade:2,century:3},Se=D.extend({init:function(t,n){var i,o,a=this;D.fn.init.call(a,t,n),t=a.wrapper=a.element,n=a.options,n.url=window.unescape(n.url),a.options.disableDates=b(a.options.disableDates),a._templates(),a._header(),a._footer(a.footer),o=t.addClass("k-widget k-calendar "+(n.weekNumber?" k-week-number":"")).on(fe+" "+pe,le,d).on(G,"table.k-content",ye(a._move,a)).on(q,le,function(t){var n=t.currentTarget.firstChild,i=a._toDateObject(n);n.href.indexOf("#")!=-1&&t.preventDefault(),"month"==a._view.name&&a.options.disableDates(i)||a._click(e(n))}).on("mouseup"+j,"table.k-content, .k-footer",function(){a._focusView(a.options.focusOnNav!==!1)}).attr($),o&&(a._cellID=o+"_cell_selected"),f(n),i=E(n.value,n.format,n.culture),a._index=Ce[n.start],a._current=new xe((+s(i,n.min,n.max))),a._addClassProxy=function(){if(a._active=!0,a._cell.hasClass(ie)){var e=a._view.toDateString(r());a._cell=a._cellByDate(e)}a._cell.addClass(oe)},a._removeClassProxy=function(){a._active=!1,a._cell.removeClass(oe)},a.value(i),C.notify(a)},options:{name:"Calendar",value:null,min:new xe(1900,0,1),max:new xe(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,start:X,depth:X,animation:{horizontal:{effects:Q,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[J,ee],setOptions:function(e){var t=this;f(e),e.disableDates=b(e.disableDates),D.fn.setOptions.call(t,e),t._templates(),t._footer(t.footer),t._index=Ce[t.options.start],t.navigate()},destroy:function(){var e=this,t=e._today;e.element.off(j),e._title.off(j),e[ve].off(j),e[_e].off(j),C.destroy(e._table),t&&C.destroy(t.off(j)),D.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(Y,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(ve,-1)},navigateToFuture:function(){this._navigate(_e,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(ie)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,o=n.options.depth;if(e)return i===Ce[o]?(k(n._value,n._current)&&k(n._value,e)||(n.value(e),n.trigger(J)),t):(n.navigate(e,--i),t)},navigate:function(n,i){var o,r,a,l,c,d,u,h,f,g,v,_,b,w,y,k,C;i=isNaN(i)?Ce[i]:i,o=this,r=o.options,a=r.culture,l=r.min,c=r.max,d=o._title,u=o._table,h=o._oldTable,f=o._value,g=o._current,v=n&&+n>+g,_=i!==t&&i!==o._index,n||(n=g),o._current=n=new xe((+s(n,l,c))),i===t?i=o._index:o._index=i,o._view=w=x.views[i],y=w.compare,k=i===Ce[Z],d.toggleClass(ie,k).attr(be,k),k=y(n,l)<1,o[ve].toggleClass(ie,k).attr(be,k),k=y(n,c)>-1,o[_e].toggleClass(ie,k).attr(be,k),u&&h&&h.data("animating")&&(h.kendoStop(!0,!0),u.kendoStop(!0,!0)),o._oldTable=u,u&&!o._changeView||(d.html(w.title(n,l,c,a)),o._table=b=e(w.content(ke({min:l,max:c,date:n,url:r.url,dates:r.dates,format:r.format,culture:a,disableDates:r.disableDates,isWeekColumnVisible:r.weekNumber},o[w.name]))),m(b,w.name),p(b),C=u&&u.data("start")===b.data("start"),o._animate({from:u,to:b,vertical:_,future:v,replace:C}),o.trigger(ee),o._focus(n)),i===Ce[r.depth]&&f&&!o.options.disableDates(f)&&o._class("k-state-selected",f),o._class(oe,n),!u&&o._cell&&o._cell.removeClass(oe),o._changeView=!0},value:function(e){var n=this,i=n._view,o=n.options,r=n._view,s=o.min,l=o.max;return e===t?n._value:(null===e&&(n._current=new Date(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),e=E(e,o.format,o.culture),null!==e&&(e=new xe((+e)),a(e,s,l)||(e=null)),null!==e&&n.options.disableDates(e)?n._value===t&&(n._value=null):n._value=e,r&&null===e&&n._cell?n._cell.removeClass("k-state-selected"):(n._changeView=!e||i&&0!==i.compare(e,n._current),n.navigate(e)),t)},_move:function(t){var n,i,o,r,l=this,c=l.options,d=t.keyCode,u=l._view,h=l._index,f=l.options.min,p=l.options.max,m=new xe((+l._current)),g=C.support.isRtl(l.wrapper),v=l.options.disableDates;return t.target===l._table[0]&&(l._active=!0),t.ctrlKey?d==A.RIGHT&&!g||d==A.LEFT&&g?(l.navigateToFuture(),i=!0):d==A.LEFT&&!g||d==A.RIGHT&&g?(l.navigateToPast(),i=!0):d==A.UP?(l.navigateUp(),i=!0):d==A.DOWN&&(l._click(e(l._cell[0].firstChild)),i=!0):(d==A.RIGHT&&!g||d==A.LEFT&&g?(n=1,i=!0):d==A.LEFT&&!g||d==A.RIGHT&&g?(n=-1,i=!0):d==A.UP?(n=0===h?-7:-4,i=!0):d==A.DOWN?(n=0===h?7:4,i=!0):d==A.ENTER?(l._click(e(l._cell[0].firstChild)),i=!0):d==A.HOME||d==A.END?(o=d==A.HOME?"first":"last",r=u[o](m),m=new xe(r.getFullYear(),r.getMonth(),r.getDate(),m.getHours(),m.getMinutes(),m.getSeconds(),m.getMilliseconds()),i=!0):d==A.PAGEUP?(i=!0,l.navigateToPast()):d==A.PAGEDOWN&&(i=!0,l.navigateToFuture()),(n||o)&&(o||u.setDate(m,n),v(m)&&(m=l._nextNavigatable(m,n)),a(m,f,p)&&l._focus(s(m,c.min,c.max)))),i&&t.preventDefault(),l._current},_nextNavigatable:function(e,t){var n=this,i=!0,o=n._view,r=n.options.min,s=n.options.max,l=n.options.disableDates,c=new Date(e.getTime());for(o.setDate(c,-t);i;){if(o.setDate(e,t),!a(e,r,s)){e=c;break}i=l(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,o=t._active;n?n.parent().data("animating")?(n.off(j),n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(o)):!n.is(":visible")||t.options.animation===!1||e.replace?(i.insertAfter(n),n.off(j).remove(),t._focusView(o)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,o=i._active,r=i.options.animation.horizontal,s=r.effects,a=W(e);s&&s.indexOf(Q)!=-1&&(e.add(t).css({width:a}),e.wrap("<div/>"),i._focusView(o,e),e.parent().css({position:"relative",width:2*a,"float":K,"margin-left":n?0:-a}),t[n?"insertAfter":"insertBefore"](e),ke(r,{effects:Q+":"+(n?"right":K),complete:function(){e.off(j).remove(),i._oldTable=null,t.unwrap(),i._focusView(o)}}),e.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(e,t){var n,i,o=this,r=o.options.animation.vertical,s=r.effects,a=o._active;s&&s.indexOf("zoom")!=-1&&(t.css({position:"absolute",top:U(e.prev()),left:0}).insertBefore(e),B&&(n=o._cellByDate(o._view.toDateString(o._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),t.css(B,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(j).remove(),o._oldTable=null,t.css({position:"static",top:0,left:0}),o._focusView(a)}}),t.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(t){return this._table.find("td:not(."+re+")").filter(function(){return e(this.firstChild).attr(C.attr(te))===t})},_class:function(t,n){var i,o=this,r=o._cellID,s=o._cell,a=o._view.toDateString(n);s&&s.removeAttr(we).removeAttr("aria-label").removeAttr($),n&&"month"==o._view.name&&(i=o.options.disableDates(n)),s=o._table.find("td:not(."+re+")").removeClass(t).filter(function(){return e(this.firstChild).attr(C.attr(te))===a}).attr(we,!0),(t===oe&&!o._active&&o.options.focusOnNav!==!1||i)&&(t=""),s.addClass(t),s[0]&&(o._cell=s),r&&(s.attr($,r),o._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(e){e.on(ue,this._addClassProxy).on(ce,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date((+t._current)),o=t._toDateObject(e);M(o,0),"month"==t._view.name&&t.options.disableDates(o)&&(o=t._value),t._view.setDate(i,o),t.navigateDown(s(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(oe,e))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,o=r(),s=i.element,a=s.find(".k-footer");return n?(a[0]||(a=e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(s)),i._today=a.show().find(".k-link").html(n(o)).attr("title",C.toString(o,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),a.hide(),t)},_header:function(){var e,t=this,n=t.element;n.find(".k-header")[0]||n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-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"><span class="k-icon k-i-arrow-60-right"></span></a></div>'),e=n.find(".k-link").on(fe+" "+pe+" "+ue+" "+ce,d).click(!1),t._title=e.eq(1).on(q,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[ve]=e.eq(0).on(q,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[_e]=e.eq(2).on(q,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var n=this,i=n._index+1,o=new xe((+n._current));e=n[e],e.hasClass(ie)||(i>3?o.setFullYear(o.getFullYear()+100*t):x.views[i].setDate(o,t),n.navigate(o))},_option:function(e,n){var i,o=this,r=o.options,s=o._value||o._current;return n===t?r[e]:(n=E(n,r.format,r.culture),n&&(r[e]=new xe((+n)),i=e===Y?n>s:s>n,(i||_(s,n))&&(i&&(o._value=null),o._changeView=!0),o._changeView||(o._changeView=!(!r.month.content&&!r.month.empty)),o.navigate(o._value),o._toggle()),t)},_toggle:function(e){var n=this,i=n.options,o=n.options.disableDates(r()),s=n._today;e===t&&(e=a(r(),i.min,i.max)),s&&(s.off(q),e&&!o?s.addClass(ae).removeClass(ie).on(q,ye(n._todayClick,n)):s.removeClass(ae).addClass(ie).on(q,u))},_todayClick:function(e){var t=this,n=Ce[t.options.depth],i=t.options.disableDates,o=r();e.preventDefault(),i(o)||(0===t._view.compare(t._current,o)&&t._index==n&&(t._changeView=!1),t._value=o,t.navigate(o,n),t.trigger(J))},_toDateObject:function(t){var n=e(t).attr(C.attr(te)).split("/");return n=new xe(n[0],n[1],n[2])},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,o=i.content,r=i.weekNumber,s=i.empty;e.month={content:F('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+C.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(o||"#=data.value#")+"</a></td>",{useWithBlock:!!o}),empty:F('<td role="gridcell">'+(s||"&nbsp;")+"</td>",{useWithBlock:!!s}),weekNumber:F('<td class="k-alt">'+(r||"#= data.weekNumber #")+"</td>",{useWithBlock:!!r})},e.footer=n!==!1?F(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}):null}});T.plugin(Se),x={firstDayOfMonth:function(e){return new xe(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||C.culture().calendar;for(var n=t.firstDay,i=new xe(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)x.setTime(i,-1*ge);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new xe(e.getTime()+t),o=i.getTimezoneOffset()-n;e.setTime(i.getTime()+o*me)},views:[{name:X,title:function(e,t,n,i){return h(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,n=0,o=e.min,r=e.max,s=e.date,a=e.dates,c=e.format,d=e.culture,u=e.url,f=e.isWeekColumnVisible,p=u&&a[0],m=h(d),v=m.firstDay,_=m.days,b=l(_.names,v),w=l(_.namesShort,v),y=x.firstVisibleDay(s,m),k=t.first(s),S=t.last(s),T=t.toDateString,D=new xe,A='<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="'+T(y)+'"><thead><tr role="row">';for(f&&(A+='<th scope="col" class="k-alt"></th>');n<7;n++)A+='<th scope="col" title="'+b[n]+'">'+w[n]+"</th>";return D=new xe(D.getFullYear(),D.getMonth(),D.getDate()),M(D,0),D=+D,i({cells:42,perRow:7,html:A+='</tr></thead><tbody><tr role="row">',start:y,isWeekColumnVisible:f,weekNumber:e.weekNumber,min:new xe(o.getFullYear(),o.getMonth(),o.getDate()),max:new xe(r.getFullYear(),r.getMonth(),r.getDate()),content:e.content,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,n){var i=[],o=e.getDay(),r="",s="#";return(e<k||e>S)&&i.push(re),n(e)&&i.push(ie),+e===D&&i.push("k-today"),0!==o&&6!==o||i.push("k-weekend"),p&&g(+e,a)&&(s=u.replace("{0}",C.toString(e,c,d)),r=" k-action-link"),{date:e,dates:a,ns:C.ns,title:C.toString(e,"D",d),value:e.getDate(),dateString:T(e),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:r,url:s}},weekNumberBuild:function(e){return{weekNumber:R(e,e),currentDate:e}}})},first:function(e){return x.firstDayOfMonth(e)},last:function(e){var t=new xe(e.getFullYear(),e.getMonth()+1,0),n=x.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),o=e.getFullYear(),r=t.getMonth(),s=t.getFullYear();return n=o>s?1:o<s?-1:i==r?0:i>r?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof xe?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):x.setTime(e,t*ge),M(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=h(e.culture).months.namesAbbr,n=this.toDateString,o=e.min,r=e.max;return i({min:new xe(o.getFullYear(),o.getMonth(),1),max:new xe(r.getFullYear(),r.getMonth(),1),start:new xe(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:C.ns,dateString:n(e),cssClass:""}}})},first:function(e){return new xe(e.getFullYear(),0,e.getDate())},last:function(e){return new xe(e.getFullYear(),11,e.getDate())},compare:function(e,t){return o(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof xe?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),M(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:new xe(t-t%10-1,0,1),min:new xe(e.min.getFullYear(),0,1),max:new xe(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:C.ns,dateString:n(e),cssClass:0===t||11==t?se:""}}})},first:function(e){var t=e.getFullYear();return new xe(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new xe(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:Z,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),o=e.max.getFullYear(),r=this.toDateString,s=n,a=o;return s-=s%10,a-=a%10,a-s<10&&(a=s+9),i({start:new xe(t-t%100-10,0,1),min:new xe(s,0,1),max:new xe(a,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),s=i+9;return i<n&&(i=n),s>o&&(s=o),{ns:C.ns,value:i+" - "+s,dateString:r(e),cssClass:0===t||11==t?se:""}}})},first:function(e){var t=e.getFullYear();return new xe(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new xe(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"}}]},x.isEqualDatePart=v,x.isEqualDate=k,x.makeUnselectable=p,x.restrictValue=s,x.isInRange=a,x.addClassToViewContainer=m,x.normalize=f,x.viewsEnum=Ce,x.disabled=b,C.calendar=x}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.datepicker.min",["kendo.calendar.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(t){var n=t.parseFormats,i=t.format;P.normalize(t),n=e.isArray(n)?n:[n],n.length||n.push("yyyy-MM-dd"),e.inArray(i,n)===-1&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var o,r=window.kendo,s=r.ui,a=s.Widget,l=r.parseDate,c=r.keys,d=r.template,u=r._activeElement,h="<div />",f="<span />",p=".kendoDatePicker",m="click"+p,g="open",v="close",_="change",b="disabled",w="readonly",y="k-state-default",k="k-state-focused",x="k-state-selected",C="k-state-disabled",S="k-state-hover",T="mouseenter"+p+" mouseleave"+p,D="mousedown"+p,A="id",E="min",M="max",R="month",I="aria-disabled",F="aria-expanded",z="aria-hidden",P=r.calendar,B=P.isInRange,L=P.restrictValue,H=P.isEqualDatePart,N=e.extend,O=e.proxy,V=Date,U=function(t){var n,i=this,o=document.body,a=e(h).attr(z,"true").addClass("k-calendar-container").appendTo(o);i.options=t=t||{},n=t.id,n&&(n+="_dateview",a.attr(A,n),i._dateViewID=n),i.popup=new s.Popup(a,N(t.popup,t,{name:"Popup",isRtl:r.support.isRtl(t.anchor)})),i.div=a,i.value(t.value)};U.prototype={_calendar:function(){var t,n=this,o=n.calendar,a=n.options;o||(t=e(h).attr(A,r.guid()).appendTo(n.popup.element).on(D,i).on(m,"td:has(.k-link)",O(n._click,n)),n.calendar=o=new s.Calendar(t),n._setOptions(a),r.calendar.makeUnselectable(o.element),o.navigate(n._value||n._current,a.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,disableDates:e.disableDates})},setOptions:function(e){var t=this.options,n=e.disableDates;n&&(e.disableDates=P.disabled(n)),this.options=N(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(E,e)},max:function(e){this._option(M,e)},toggle:function(){var e=this;e[e.popup.visible()?v:g]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,o=e.ctrlKey&&n==c.DOWN||n==c.ENTER,r=!1;if(e.altKey)n==c.DOWN?(t.open(),e.preventDefault(),r=!0):n==c.UP&&(t.close(),e.preventDefault(),r=!0);else if(t.popup.visible()){if(n==c.ESC||o&&i._cell.hasClass(x))return t.close(),e.preventDefault(),!0;t._current=i._move(e),r=!0}return r},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,o=i.disableDates;o&&o(e)&&(e=null),t._value=e,t._current=new V((+L(e,i.min,i.max))),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(x)!==-1&&this.close()},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},U.normalize=n,r.DateView=U,o=a.extend({init:function(t,i){var o,s,c=this;a.fn.init.call(c,t,i),t=c.element,i=c.options,i.disableDates=r.calendar.disabled(i.disableDates),i.min=l(t.attr("min"))||l(i.min),i.max=l(t.attr("max"))||l(i.max),n(i),c._initialOptions=N({},i),c._wrapper(),c.dateView=new U(N({},i,{id:t.attr(A),anchor:c.wrapper,change:function(){c._change(this.value()),c.close()},close:function(e){c.trigger(v)?e.preventDefault():(t.attr(F,!1),s.attr(z,!0))},open:function(e){var n,i=c.options;c.trigger(g)?e.preventDefault():(c.element.val()!==c._oldText&&(n=l(t.val(),i.parseFormats,i.culture),c.dateView[n?"current":"value"](n)),t.attr(F,!0),s.attr(z,!1),c._updateARIA(n))}})),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}),c._reset(),c._template(),o=t.is("[disabled]")||e(c.element).parents("fieldset").is(":disabled"),o?c.enable(!1):c.readonly(t.is("[readonly]")),c._old=c._update(i.value||c.element.val()),c._oldText=t.val(),r.notify(c)},events:[g,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:R,depth:R,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,i=t._value;a.fn.setOptions.call(t,e),e=t.options,e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),i&&(t.element.val(r.toString(i,e.format,e.culture)),t._updateARIA(i))},_editable:function(e){var t=this,n=t._dateIcon.off(p),o=t.element.off(p),r=t._inputWrapper.off(p),s=e.readonly,a=e.disable;s||a?(r.addClass(a?C:y).removeClass(a?y:C),o.attr(b,a).attr(w,s).attr(I,a)):(r.addClass(y).removeClass(C).on(T,t._toggleHover),o.removeAttr(b).removeAttr(w).attr(I,!1).on("keydown"+p,O(t._keydown,t)).on("focusout"+p,O(t._blur,t)).on("focus"+p,function(){t._inputWrapper.addClass(k)}),n.on(m,O(t._click,t)).on(D,i))},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(p),e._dateIcon.off(p),e._inputWrapper.off(p),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(E,e)},max:function(e){return this._option(M,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(k)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),r.support.touch||t[0]===u()||t.focus()},_change:function(e){var t,n,i,o=this,s=o.element.val();e=o._update(e),t=!r.calendar.isEqualDate(o._old,e),n=t&&!o._typing,i=s!==o.element.val(),(n||i)&&o.element.trigger(_),t&&(o._old=e,o._oldText=o.element.val(),o.trigger(_)),o._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),o=!1;n.popup.visible()||e.keyCode!=c.ENTER||i===t._oldText?(o=n.move(e),t._updateARIA(n._current),o||(t._typing=!0)):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-calendar"></span></span>').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,o=i.options;return n===t?o[e]:(n=l(n,o.parseFormats,o.culture),n&&(o[e]=new V((+n)),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,o=i.min,s=i.max,a=n._value,c=l(e,i.parseFormats,i.culture),d=null===c&&null===a||c instanceof Date&&a instanceof Date;return i.disableDates(c)&&(c=null,n._old||n.element.val()||(e=null)),+c===+a&&d?(t=r.toString(c,i.format,i.culture),t!==e&&n.element.val(null===c?e:t),c):(null!==c&&H(c,o)?c=L(c,o,s):B(c,o,s)||(c=null),n._value=c,n.dateView.value(c),n.element.val(r.toString(c||e,i.format,i.culture)),n._updateARIA(c),c)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(f).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(f).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=d(this.options.ARIATemplate)},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),s.plugin(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.autocomplete.min",["kendo.list.min","kendo.mobile.scroller.min"],e)}(function(){return function(e,t){function n(e,t,n){return n?t.substring(0,e).split(n).length-1:0}function i(e,t,i){return t.split(i)[n(e,t,i)]}function o(e,t,i,o,r){var s=t.split(o);return s.splice(n(e,t,o),1,i),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,f=r.data.DataSource,p="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,n){var i,o,s=this;s.ns=C,n=e.isArray(n)?{dataSource:n}:n,u.fn.init.call(s,t,n),t=s.element,n=s.options,n.placeholder=n.placeholder||t.attr("placeholder"),c&&t.attr("placeholder",n.placeholder),s._wrapper(),s._loader(),s._clearButton(),s._dataSource(),s._ignoreCase(),t[0].type="text",i=s.wrapper,s._popup(),t.addClass("k-input").on("keydown"+C,T(s._keydown,s)).on("keypress"+C,T(s._keypress,s)).on("paste"+C,T(s._search,s)).on("focus"+C,function(){s._prev=s._accessor(),s._oldText=s._prev,s._placeholder(!1),i.addClass(w)}).on("focusout"+C,function(){s._change(),s._placeholder(),i.removeClass(w)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),s._clear.on("click"+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)},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},_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=f.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()},_listOptions:function(t){var n=u.fn._listOptions.call(this,e.extend(t,{skipUpdateOnBind:!0}));return n.dataValueField=n.dataTextField,n.selectedItemChange=null,n},_editable:function(e){var t=this,n=t.element,i=t.wrapper.off(C),o=e.readonly,r=e.disable;o||r?(i.addClass(r?k:v).removeClass(r?v:k),n.attr(_,r).attr(b,o).attr(p,r).attr(m,o)):(i.addClass(v).removeClass(k).on(S,t._toggleHover),n.removeAttr(_).removeAttr(b).attr(p,!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 n,o=this,r=o.options,s=r.ignoreCase,l=o._separator();t=t||o._accessor(),clearTimeout(o._typingTimeout),l&&(t=i(a(o.element)[0],t,l)),n=t.length,(!r.enforceMinLength&&!n||n>=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)))},suggest:function(e){var i,o=this,r=o._last,s=o._accessor(),c=o.element[0],d=a(c)[0],f=o._separator(),p=s.split(f),m=n(d,s,f),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),i=s.substring(0,d).lastIndexOf(f),i=i>-1?d-(i+f.length):d,s=p[m].substring(0,i),e&&(e=""+e,i=e.toLowerCase().indexOf(s.toLowerCase()),i>-1&&(e=e.substring(i+s.length),g=d+e.length,s+=e),f&&""!==p[p.length-1]&&p.push("")),p[m]=s,o._accessor(p.join(f||"")),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(),t)},_click:function(e){var n=e.item,i=this,o=i.element,r=i.listView.dataItemByIndex(i.listView.getElementIndex(n));return e.preventDefault(),i._active=!0,i.trigger("select",{dataItem:r,item:n})?(i.close(),t):(i._oldText=o.val(),i._select(n).done(function(){i._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,n=this,i=n.popup,o=n.options,r=n.dataSource.flatView(),s=r.length,a=n.element[0]===l();n._renderFooter(),n._renderNoData(),n._toggleNoData(!r.length),n._resizePopup(),i.position(),s&&o.suggest&&a&&n.suggest(r[0]),n._open&&(n._open=!1,e=n._allowOpening()?"open":"close",n._typingTimeout&&!a&&(e="close"),s&&(n._resetFocusItem(),o.virtual&&n.popup.unbind("activate",n._resetFocusItemHandler).one("activate",n._resetFocusItemHandler)),i[e](),n._typingTimeout=t),n._touchScroller&&n._touchScroller.reset(),n._hideBusy(),n._makeUnselectable(),n.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(),n="";e&&(n=this._text(e)),null===n&&(n=""),t&&(n=o(a(this.element)[0],this._accessor(),n,t,this._defaultSeparator())),this._prev=n,this._accessor(n),this._placeholder()},_unifySeparators:function(){return this._accessor(this.value().split(this._separator()).join(this._defaultSeparator())),this},_change:function(){var e=this,t=e._unifySeparators().value(),n=t!==u.unifyType(e._old,typeof t),i=n&&!e._typing,o=e._oldText!==t;e._old=t,e._oldText=t,(i||o)&&e.element.trigger(g),n&&e.trigger(g),e.typing=!1},_accessor:function(e){var n=this,i=n.element[0];return e===t?(e=i.value,i.className.indexOf("k-readonly")>-1&&e===n.options.placeholder?"":e):(i.value=null===e?"":e,n._placeholder(),t)},_keydown:function(e){var t,n,i=this,o=e.keyCode,r=i.listView,s=i.popup.visible(),a=r.focus();if(i._last=o,o===h.DOWN)s&&this._move(a?"focusNext":"focusFirst"),e.preventDefault();else if(o===h.UP)s&&this._move(a?"focusPrev":"focusLast"),e.preventDefault();else if(o===h.ENTER||o===h.TAB){
if(o===h.ENTER&&s&&e.preventDefault(),s&&a){if(t=r.dataItemByIndex(r.getElementIndex(a)),i.trigger("select",{dataItem:t,item:a}))return;this._select(a)}this._blur()}else o===h.ESC?(s&&e.preventDefault(),i.close()):!i.popup.visible()||o!==h.PAGEDOWN&&o!==h.PAGEUP?i._search():(e.preventDefault(),n=o===h.PAGEDOWN?1:-1,r.scrollWith(n*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 n,i=this,o=i.element,r=i.options.placeholder;if(r){if(n=o.val(),e===t&&(e=!n),e||(r=n!==r?n:""),n===i._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(){this._clear=e('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&this._clear.insertAfter(this.element)},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=i.style.cssText,n.css({width:"100%",height:i.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(i.className)}});d.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min"],e)}(function(){return function(e,t){function n(e,t,n){for(var i,o=0,r=t.length-1;o<r;++o)i=t[o],i in e||(e[i]={}),e=e[i];e[t[r]]=n}function i(e,t){return e>=t&&(e-=t),e}function o(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==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,f=".kendoDropDownList",p="disabled",m="readonly",g="change",v="k-state-focused",_="k-state-default",b="k-state-disabled",w="aria-disabled",y="mouseenter"+f+" mouseleave"+f,k="tabindex",x="filter",C="accept",S="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",T=e.proxy,D=l.extend({init:function(n,i){var o,s,a,c=this,d=i&&i.index;c.ns=f,i=e.isArray(i)?{dataSource:i}:i,l.fn.init.call(c,n,i),i=c.options,n=c.element.on("focus"+f,T(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(k,c.wrapper.attr(k)),c._span(),c._popup(),c._mobile(),c._dataSource(),c._ignoreCase(),c._filterHeader(),c._aria(),c._enable(),c._oldIndex=c.selectedIndex=-1,d!==t&&(i.index=d),c._initialIndex=i.index,c.requireValueMapper(c.options),c._initList(),c._cascade(),i.autoBind?c.dataSource.fetch():c.selectedIndex===-1&&(s=i.text||"",s||(o=i.optionLabel,o&&0===i.index?s=o:c._isSelect&&(s=n.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:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#"},events:["open","close",g,"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(f),e.element.off(f),e._inputWrapper.off(f),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off()},open:function(){var e=this;e.popup.visible()||(e.listView.bound()&&e._state!==C?e._allowOpening()&&(e.popup.one("activate",e._focusInputHandler),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?(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,n=this.filterInput,i=this._prevent;n&&(e=this.filterInput[0]===d(),t=r.caret(this.filterInput[0])[0],this._prevent=!0,n.css("display","none").css("width",this.popup.element.css("width")).css("display","inline-block"),e&&(n.focus(),r.caret(n[0],t)),this._prevent=i)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||l.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;return e===t?(n=this.listView.focus(),!n&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n):(this._focus(e),t)},dataItem:function(n){var i=this,o=null;if(null===n)return n;if(n===t)o=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:e(i.items()).index(n)}else i.hasOptionLabel()&&(n-=1);o=i.dataSource.flatView()[n]}return o||(o=i._optionLabelDataItem()),o},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,o=i.options.ignoreCase;return e=null===e?"":e,e===t?i._textAccessor():"string"!=typeof e?(i._textAccessor(e),t):(n=o?e.toLowerCase():e,i._select(function(e){return e=i._text(e),o&&(e=(e+"").toLowerCase()),e===n}).done(function(){i._textAccessor(i.dataItem()||e)}),t)},_clearFilter:function(){e(this.filterInput).val(""),l.fn._clearFilter.call(this)},value:function(e){var n=this,i=n.listView,o=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),!e&&n.hasOptionLabel()||(n._initialIndex=null),this.trigger("set",{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()?(n._valueSetter&&o.unbind(g,n._valueSetter),n._valueSetter=T(function(){n.value(e)},n),o.one(g,n._valueSetter),t):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),i.value(e).done(function(){n._old=n._accessor(),n._oldIndex=n.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var n=this,i=n.options,o=i.optionLabel,s=i.optionLabelTemplate;return o?(s||(s="#:",s+="string"==typeof o?"data":r.expr(i.dataTextField,"data"),s+="#"),"function"!=typeof s&&(s=r.template(s)),n.optionLabelTemplate=s,n.hasOptionLabel()||(n.optionLabel=e('<div class="k-list-optionlabel"></div>').prependTo(n.list)),n.optionLabel.html(s(o)).off().click(T(n._click,n)).on(y,n._toggleHover),n.angular("compile",function(){return{elements:n.optionLabel,data:[{dataItem:n._optionLabelDataItem()}]}}),t):(n.optionLabel.off().remove(),n.optionLabel=e(),t)},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_optionLabelDataItem:function(){var t=this,n=t.options.optionLabel;return t.hasOptionLabel()?e.isPlainObject(n)?new u(n):t._assignInstance(t._optionLabelText(),""):null},_buildOptions:function(e){var n,i,o,r=this;r._isSelect&&(n=r.listView.value()[0],i=r._optionLabelDataItem(),o=i&&r._value(i),n!==t&&null!==n||(n=""),i&&(o!==t&&null!==o||(o=""),i='<option value="'+o+'">'+r._text(i)+"</option>"),r._options(e,i,n),n!==a.unifyType(r._accessor(),typeof n)&&(r._customOption=null,r._custom(n)))},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===x,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(),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(o.length?(!t.listView.value().length&&n>-1&&null!==n&&t.select(n),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()},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(v),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(v),e._prevent=!0,e._open=!1,e.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._toggle()},_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t.wrapper.add(t.filterInput).off(f),s=t._inputWrapper.off(y);o||i?i?(r.removeAttr(k),s.addClass(b).removeClass(_)):(s.addClass(_).removeClass(b),r.on("focusin"+f,T(t._focusinHandler,t)).on("focusout"+f,T(t._focusoutHandler,t))):(n.removeAttr(p).removeAttr(m),s.addClass(_).removeClass(b).on(y,t._toggleHover),r.attr(k,r.data(k)).attr(w,!1).on("keydown"+f,T(t._keydown,t)).on("focusin"+f,T(t._focusinHandler,t)).on("focusout"+f,T(t._focusoutHandler,t)).on("mousedown"+f,T(t._wrapperMousedown,t)).on("paste"+f,T(t._filterPaste,t)),t.wrapper.on("click"+f,T(t._wrapperClick,t)),t.filterInput||r.on("keypress"+f,T(t._keypress,t))),n.attr(p,i).attr(m,o),r.attr(w,i)},_keydown:function(e){var n,i,o,r=this,s=e.keyCode,a=e.altKey,l=r.popup.visible();if(r.filterInput&&(n=r.filterInput[0]===d()),s===h.LEFT?(s=h.UP,i=!0):s===h.RIGHT&&(s=h.DOWN,i=!0),!i||!n){if(e.keyCode=s,(a&&s===h.UP||s===h.ESC)&&r._focusElement(r.wrapper),r._state===x&&s===h.ESC&&r._clearFilter(),s===h.ENTER&&r._typingTimeout&&r.filterInput&&l)return e.preventDefault(),t;if(i=r._move(e),!i){if((!l||!r.filterInput)&&(o=r._focus(),s===h.HOME?(i=!0,r._firstItem()):s===h.END&&(i=!0,r._lastItem()),i)){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()})}a||i||!r.filterInput||r._search()}}},_matchText:function(e,n){var i=this.options.ignoreCase;return e!==t&&null!==e&&(e+="",i&&(e=e.toLowerCase()),0===e.indexOf(n))},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e,t,n,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=i(c,a)),s=s.toJSON?s.toJSON():s.slice(),s=r._shuffleData(s,c),n=0;n<a&&(t=r._text(s[n]),!l||!r._matchText(t,r._last))&&!r._matchText(t,r._word);n++);n!==a&&(e=r._focus(),r._select(i(c+n,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,n=this;0!==e.which&&e.keyCode!==r.keys.ENTER&&(t=String.fromCharCode(e.charCode||e.keyCode),n.options.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n._word+=t,n._last=t,n._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",T(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(n){var i=this,o=n.item||e(n.currentTarget);return n.preventDefault(),i.trigger("select",{dataItem:i._getElementDataItem(o),item:o})?(i.close(),t):(i._userTriggered=!0,i._select(o).done(function(){i._focusElement(i.wrapper),i._blur()}),t)},_focusElement:function(e){var t=d(),n=this.wrapper,i=this.filterInput,o=e===i?n:i,r=c.mobileOS&&(c.touch||c.MSPointers||c.pointers);i&&i[0]===e[0]&&r||i&&o[0]===t&&(this._prevent=!0,this._focused=e.focus())},_searchByWord:function(e){var t,n;e&&(t=this,n=t.options.ignoreCase,n&&(e=e.toLowerCase()),t._select(function(n){return t._matchText(t._text(n),e)}))},_inputValue:function(){return this.text()},_search:function(){var e=this,n=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 n.fetch().done(function(){e._selectNext()}),t;e._selectNext()}},_get:function(t){var n,i,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(n=this.dataSource.flatView(),o=0;o<n.length;o++)if(t(n[o])){t=o,i=!0;break}i||(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.listView,n=e.focus(),i=e.select();i=i[i.length-1],i===t&&this.options.highlightFirst&&!n&&(i=0),i!==t?e.focus(i):this.options.optionLabel?(this._focus(this.optionLabel),this._select(this.optionLabel)):e.scrollToIndex(0)},_resetOptionLabel:function(e){this.optionLabel.removeClass("k-state-focused"+(e||"")).removeAttr("id")},_focus:function(e){var n=this.listView,i=this.optionLabel;return e===t?(e=n.focus(),!e&&i.hasClass("k-state-focused")&&(e=i),e):(this._resetOptionLabel(),e=this._get(e),n.focus(e),e===-1&&(i.addClass("k-state-focused").attr("id",n._optionID),this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant",n._optionID)),t)},_select:function(e,t){var n=this;return e=n._get(e),n.listView.select(e).done(function(){t||n._state!==x||(n._state=C),e===-1&&n._selectValue(null)})},_selectValue:function(e){var n=this,i=n.options.optionLabel,o=n.listView.select(),r="",s="";o=o[o.length-1],o===t&&(o=-1),this._resetOptionLabel(" k-state-selected"),e?(s=e,r=n._dataValue(e),i&&(o+=1)):i&&(n._focus(n.optionLabel.addClass("k-state-selected")),s=n._optionLabelText(),r="string"==typeof i?"":n._value(i),o=0),n.selectedIndex=o,null===r&&(r=""),n._textAccessor(s),n._accessor(r,o),n._triggerCascade()},_mobile:function(){var e=this,t=e.popup,n=c.mobileOS,i=t.element.parents(".km-root").eq(0);i.length&&n&&(t.options.animation.open.effects=n.android||n.meego?"fadeIn":n.ios||n.wp?"slideIn:up":t.options.animation.open.effects)},_filterHeader:function(){var t;this.filterInput&&(this.filterInput.off(f).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,n=this,i=n.wrapper,o="span.k-input";t=i.find(o),t[0]||(i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><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=i.find(o)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-select"),n._arrowIcon=n._arrow.find(".k-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),n.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;if(n=n?r.template(n):e.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=n,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(i){throw Error(S)}},_textAccessor:function(n){var i,o=null,r=this.valueTemplate,s=this._optionLabelText(),a=this.span;if(n===t)return a.text();e.isPlainObject(n)||n instanceof u?o=n:s&&s===n&&(o=this.options.optionLabel),o||(o=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(o!==s&&this._text(o)!==s||(r=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(o=s))),i=function(){return{elements:a.get(),data:[{dataItem:o}]}},this.angular("cleanup",i);try{a.html(r(o))}catch(l){a.html("")}this.angular("compile",i)},_preselect:function(e,t){e||t||(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var i=this.options.dataTextField,o={};return i?(n(o,i.split("."),e),n(o,this.options.dataValueField.split("."),t),o=new u(o)):o=e,o}});s.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.List,r=i.Select,s=n.caret,a=n.support,l=a.placeholder,c=n._activeElement,d=n.keys,u=".kendoComboBox",h="click"+u,f="mousedown"+u,p="disabled",m="readonly",g="change",v="k-state-default",_="k-state-focused",b="k-state-disabled",w="aria-disabled",y="filter",k="accept",x="rebind",C="mouseenter"+u+" mouseleave"+u,S=e.proxy,T=r.extend({init:function(t,i){var o,s,a=this;a.ns=u,i=e.isArray(i)?{dataSource:i}:i,r.fn.init.call(a,t,i),i=a.options,t=a.element.on("focus"+u,S(a._focusHandler,a)),i.placeholder=i.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._oldIndex=a.selectedIndex=-1,a._aria(),a._initialIndex=i.index,a.requireValueMapper(a.options),a._initList(),a._cascade(),i.autoBind?a._filterSource():(o=i.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),n.notify(a)},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:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){r.fn.setOptions.call(this,e),this.listView.setOptions(e),this._accessors(),this._aria()},destroy:function(){var e=this;e.input.off(u),e.element.off(u),e._inputWrapper.off(u),clearTimeout(e._pasteTimeout),e._arrow.off(h+" "+f),e._clear.off(h+" "+f),r.fn.destroy.call(e)},_change:function(){var e=this,n=e.text(),i=n&&n!==e._oldText&&n!==e.options.placeholder,o=e.selectedIndex,s=o===-1;return!e.options.syncValueAndText&&!e.value()&&s&&i?(e._old="",e._oldIndex=o,e._oldText=n,e._typing||e.element.trigger(g),e.trigger(g),e._typing=!1,t):(r.fn._change.call(e),t)},_focusHandler:function(){this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(_),this._placeholder(!1)},_inputFocusout:function(){var e,n,i=this,o=i.value();return i._inputWrapper.removeClass(_),clearTimeout(i._typingTimeout),i._typingTimeout=null,i.text(i.text()),e=i._focus(),n=this.listView.dataItemByIndex(this.listView.getElementIndex(e)),o!==i.value()&&i.trigger("select",{dataItem:n,item:e})?(i.value(o),t):(i._placeholder(),i._blur(),i.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,n=e.disable,i=e.readonly,o=t._inputWrapper.off(u),r=t.element.add(t.input.off(u)),s=t._arrow.off(h+" "+f),a=t._clear;i||n?(o.addClass(n?b:v).removeClass(n?v:b),r.attr(p,n).attr(m,i).attr(w,n)):(o.addClass(v).removeClass(b).on(C,t._toggleHover),r.removeAttr(p).removeAttr(m).attr(w,!1),s.on(h,S(t._arrowClick,t)).on(f,function(e){e.preventDefault()}),a.on(h,S(t._clearValue,t)).on(f,function(e){e.preventDefault()}),t.input.on("keydown"+u,S(t._keydown,t)).on("focus"+u,S(t._inputFocus,t)).on("focusout"+u,S(t._inputFocusout,t)).on("paste"+u,S(t._inputPaste,t)))},open:function(){var e=this,t=e._state;e.popup.visible()||(!e.listView.bound()&&t!==y||t===k?(e._open=!0,e._state=x,1!==e.options.minLength?(e.refresh(),e._openPopup()):e._filterSource()):e._allowOpening()&&(e._openPopup(),e._focusItem()))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",S(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var e=this,n=e.options.text,i=e.options.value;e.listView.isFiltered()||(e.selectedIndex===-1?(n!==t&&null!==n||(n=i),e._accessor(i),e.input.val(n||e.input.val()),e._placeholder()):e._oldIndex===-1&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var n,i=this;i._isSelect&&(n=i._customOption,i._state===x&&(i._state=""),i._customOption=t,i._options(e,"",i.value()),n&&n[0].selected&&i._custom(n.val()))},_updateSelection:function(){var n,i=this,o=i.listView,r=i._initialIndex,s=null!==r&&r>-1,a=i._state===y;return a?(e(o.focus()).removeClass("k-state-selected"),t):(i._fetch||(o.value().length||(s?i.select(r):i._accessor()&&o.value(i._accessor())),i._initialIndex=null,n=o.selectedDataItems()[0],n&&(i._value(n)!==i.value()&&i._custom(i._value(n)),i.text()&&i.text()!==i._text(n)&&i._selectValue(n))),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,n=e.input[0]===c(),i=e.dataSource.flatView(),o=e.listView.skip(),r=o===t||0===o;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!i.length),e._resizePopup(),e.popup.position(),e._buildOptions(i),e._makeUnselectable(),e._updateSelection(),i.length&&r&&(e._updateItemFocus(),e.options.suggest&&n&&e.input.val()&&e.suggest(i[0])),e._open&&(e._open=!1,e._typingTimeout&&!n?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,n,i;if("function"==typeof e){for(t=this.dataSource.flatView(),i=0;i<t.length;i++)if(e(t[i])){e=i,n=!0;break}n||(e=-1)}return e},_select:function(e,t){var n=this;return e=n._get(e),e===-1&&(n.input[0].value="",n._accessor("")),n.listView.select(e).done(function(){t||n._state!==y||(n._state=k)})},_selectValue:function(e){var n=this.listView.select(),i="",o="";n=n[n.length-1],n===t&&(n=-1),this.selectedIndex=n,n!==-1||e?(e&&(i=this._dataValue(e),o=this._text(e)),null===i&&(i="")):(o=this.input[0].value,this.options.syncValueAndText&&(i=o),this.listView.focus(-1)),this._prev=this.input[0].value=o,this._accessor(i!==t?i:o,n),this._placeholder(),this._triggerCascade()},refresh:function(){this.listView.refresh()},suggest:function(e){var n,i=this,r=i.input[0],a=i.text(),l=s(r)[0],u=i._last;return u==d.BACKSPACE||u==d.DELETE?(i._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=i.dataSource.view()[o.inArray(e[0],i.ul[0])]),e=e?i._text(e):""),l<=0&&(l=a.toLowerCase().indexOf(e.toLowerCase())+1),e?(e=""+e,n=e.toLowerCase().indexOf(a.toLowerCase()),n>-1&&(a+=e.substring(n+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 n,i,r,s,a,l;return e=null===e?"":e,n=this,i=n.input[0],r=n.options.ignoreCase,s=e,e===t?i.value:n.options.autoBind!==!1||n.listView.bound()?(a=n.dataItem(),a&&n._text(a)===e&&(l=n._value(a),l===o.unifyType(n._old,typeof l))?(n._triggerCascade(),t):(r&&(s=s.toLowerCase()),n._select(function(e){return e=n._text(e),r&&(e=(e+"").toLowerCase()),e===s}).done(function(){n.selectedIndex<0&&(i.value=e,n.options.syncValueAndText&&n._accessor(e),n._triggerCascade()),n._prev=i.value}),t)):(n._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,o=n.listView;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),e===i.value&&n.input.val()===i.text||(n._accessor(e),n._isFilterEnabled()&&o.bound()&&o.isFiltered()?n._clearFilter():n._fetchData(),o.value(e).done(function(){n.selectedIndex===-1&&(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._old=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n.input.val(),n._state===y&&(n._state=k)})),t)},_click:function(e){var n=this,i=e.item,o=n.listView.dataItemByIndex(n.listView.getElementIndex(i));return e.preventDefault(),n.trigger("select",{dataItem:o,item:i})?(n.close(),t):(n._userTriggered=!0,n._select(i).done(function(){n._blur()}),t)},_inputValue:function(){return this.text()},_searchByWord:function(e){var n,i=this,o=i.options,r=i.dataSource,s=o.ignoreCase,a=function(n){var o=i._text(n);if(o!==t)return o+="",(""===o||""!==e)&&(s&&(o=o.toLowerCase()),0===o.indexOf(e))};return s&&(e=e.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(a)),n=this.listView.focus(),n&&(o.suggest&&i.suggest(n),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(r.one(g,function(){r.view()[0]&&i.search(e)}).fetch(),t)},_input:function(){var t,n,i=this,o=i.element.removeClass("k-input")[0],r=o.accessKey,s=i.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(i.element),t=s.find(a)),t[0].style.cssText=o.style.cssText,t[0].title=o.title,n=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),n>-1&&(t[0].maxLength=n),t.addClass(o.className).css({width:"100%",height:o.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),l&&t.attr("placeholder",i.options.placeholder),r&&(o.accessKey="",t[0].accessKey=r),i._focused=i.input=t,i._inputWrapper=e(s[0].firstChild),i._arrow=s.find(".k-select").attr({role:"button",tabIndex:-1}),i._arrowIcon=i._arrow.find(".k-icon"),o.id&&i._arrow.attr("aria-controls",i.ul[0].id)},_clearButton:function(){this._clear=e('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t=this,n=e.keyCode;t._last=n,clearTimeout(t._typingTimeout),t._typingTimeout=null,n==d.TAB||t._move(e)||t._search()},_placeholder:function(e){if(!l){var n,i=this,o=i.input,r=i.options.placeholder;if(r){if(n=i.value(),e===t&&(e=!n),o.toggleClass("k-readonly",e),!e){if(n)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.listView.select(-1),e.search(t)),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("<span />").parent(),n[0].style.cssText=t[0].style.cssText),e.wrapper=n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")},_clearSelection:function(e,t){var n=this,i=e.value(),o=i&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!i||o)&&(n.options.value="",n.value(""))},_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}});i.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multiselect.min",["kendo.list.min","kendo.mobile.scroller.min"],e)}(function(){return function(e,t){function n(e,t){var n;if(null===e&&null!==t||null!==e&&null===t)return!1;if(n=e.length,n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0}var i=window.kendo,o=i.ui,r=o.List,s=i.keys,a=i._activeElement,l=i.data.ObservableArray,c=e.proxy,d="id",u="li",h="accept",f="filter",p="rebind",m="open",g="close",v="change",_="progress",b="select",w="deselect",y="aria-disabled",k="k-state-focused",x="k-loading-hidden",C="k-state-hover",S="k-state-disabled",T="disabled",D="readonly",A=".kendoMultiSelect",E="click"+A,M="keydown"+A,R="mouseenter"+A,I="mouseleave"+A,F=R+" "+I,z=/"/g,P=e.isArray,B=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],L=r.extend({init:function(t,n){var o,s,a=this;a.ns=A,r.fn.init.call(a,t,n),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(),n=a.options,n.placeholder||(n.placeholder=t.data("placeholder")),o=t.attr(d),o&&(a._tagID=o+"_tag_active",o+="_taglist",a.tagList.attr(d,o)),a._aria(o),a._dataSource(),a._ignoreCase(),a._popup(),a._tagTemplate(),a.requireValueMapper(a.options),a._initList(),a._reset(),a._enable(),a._placeholder(),n.autoBind?a.dataSource.fetch():n.value&&a._preselect(n.value),s=e(a.element).parents("fieldset").is(":disabled"),
s&&a.enable(!1),i.notify(a)},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},events:[m,g,v,b,w,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),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()},currentTag:function(e){var n=this;return e===t?n._currentTag:(n._currentTag&&(n._currentTag.removeClass(k).removeAttr(d),n.input.removeAttr("aria-activedescendant")),e&&(e.addClass(k).attr(d,n._tagID),n.input.attr("aria-activedescendant",n._tagID)),n._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(){r.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var n=this,o=r.fn._listOptions.call(n,e.extend(t,{selectedItemChange:c(n._selectedItemChange,n),selectable:"multiple"})),s=this.options.itemTemplate||this.options.template,a=o.itemTemplate||s||o.template;return a||(a="#:"+i.expr(o.dataTextField,"data")+"#"),o.template=a,o},_setListValue:function(){r.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n,i=this.dataSource.flatView(),o=this._optionsMap,r=this._value;for(this._state===p&&(this._state=""),n=0;n<e.added.length;n++)if(o[r(e.added[n].dataItem)]===t){this._render(i);break}this._selectValue(e.added,e.removed)},_selectedItemChange:function(e){var t,n,i=e.items;for(n=0;n<i.length;n++)t=i[n],this.tagList.children().eq(t.index).children("span:first").html(this.tagTextTemplate(t.item))},_wrapperMousedown:function(t){var n=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&&i.support.mobileOS||t.preventDefault(),s||(n.input[0]!==a()&&o&&n.input.focus(),1===n.options.minLength&&n.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===f&&(e._state=h,e.listView.skipUpdate(!0)),e.element.blur()},_removeTag:function(e){var n,i,o=this,r=o._state,s=e.index(),a=o.listView,l=a.value()[s],c=o.listView.selectedDataItems()[s],d=o._customOptions[l];return o.trigger(w,{dataItem:c,item:e})?(o._close(),t):(d!==t||r!==h&&r!==f||(d=o._optionsMap[l]),i=function(){o.currentTag(null),o._change(),o._close()},d===t?a.select(a.select()[s]).done(i):(n=o.element[0].children[d],n.selected=!1,a.removeAt(s),e.remove(),i()),t)},_tagListClick:function(t){var n=e(t.currentTarget);n.children(".k-i-arrow-60-down").length||this._removeTag(n.closest(u))},_clearClick:function(){this.value(null),this.trigger("change")},_editable:function(t){var n=this,i=t.disable,o=t.readonly,r=n.wrapper.off(A),s=n.tagList.off(A),a=n.element.add(n.input.off(A));o||i?(i?r.addClass(S):r.removeClass(S),a.attr(T,i).attr(D,o).attr(y,i)):(r.removeClass(S).on(F,n._toggleHover).on("mousedown"+A+" touchend"+A,c(n._wrapperMousedown,n)),n.input.on(M,c(n._keydown,n)).on("paste"+A,c(n._search,n)).on("focus"+A,c(n._inputFocus,n)).on("focusout"+A,c(n._inputFocusout,n)),n._clear.on("click"+A,c(n._clearClick,n)),a.removeAttr(T).removeAttr(D).attr(y,!1),s.on(R,u,function(){e(this).addClass(C)}).on(I,u,function(){e(this).removeClass(C)}).on(E,"li.k-button .k-select",c(n._tagListClick,n)))},_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.popup.close()},open:function(){var e=this;e._request&&(e._retrieveData=!1),e._retrieveData||!e.listView.bound()||e._state===h?(e._open=!0,e._state=p,e.listView.skipUpdate(!0),e._filterSource()):e._allowOpening()&&(e.popup.open(),e._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,n=e.dataSource.flatView(),i=e.listView.skip();e._render(n),e._renderFooter(),e._renderNoData(),e._toggleNoData(!n.length),e._resizePopup(),e._open&&(e._open=!1,e.toggle(e._allowOpening())),e.popup.position(),!e.options.highlightFirst||i!==t&&0!==i||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 n=this,i=n.listView,o=i.value().slice(),r=n.options.maxSelectedItems,s=i.bound()&&i.isFiltered();return e===t?o:(n.requireValueMapper(n.options,e),e=n._normalizeValues(e),null!==r&&e.length>r&&(e=e.slice(0,r)),s&&n._clearFilter(),i.value(e),n._old=i.value(),s||n._fetchData(),t)},_preselect:function(t,n){var o=this;P(t)||t instanceof i.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof i.data.ObservableObject||!o.options.dataValueField)&&(o.dataSource.data(t),o.value(n||o._initialValues),o._retrieveData=!0)},_setOption:function(e,t){var n=this.element[0].children[this._optionsMap[e]];n&&(n.selected=t)},_fetchData:function(){var e=this,t=!!e.dataSource.view().length,n=0===e.listView.value().length;n||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,n=e.options,o=n.dataSource||{};o=P(o)?{data:o}:o,o.select=t,o.fields=[{field:n.dataTextField},{field:n.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=c(e._showBusy,e),e._errorHandler=c(e._hideBusy,e)),e.dataSource=i.data.DataSource.create(o).bind(_,e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._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 n=this;return null===t?t=[]:t&&e.isPlainObject(t)?t=[n._value(t)]:t&&e.isPlainObject(t[0])?t=e.map(t,function(e){return n._value(e)}):P(t)||t instanceof l?P(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();n(t,e._old)||(e._old=t.slice(),e.trigger(v),e.element.trigger(v))},_click:function(e){var t=this,n=e.item;e.preventDefault(),t._select(n).done(function(){t._change(),t._close()})},_keydown:function(n){var o,r=this,a=n.keyCode,l=r._currentTag,c=r.listView,d=c.focus(),u=r.input.val(),h=i.support.isRtl(r.wrapper),f=r.popup.visible();if(a===s.DOWN){if(n.preventDefault(),!f)return r.open(),d||c.focusFirst(),t;d?(c.focusNext(),c.focus()||c.focusLast()):c.focusFirst()}else if(a===s.UP)f&&(d&&c.focusPrev(),c.focus()||r.close()),n.preventDefault();else if(a===s.LEFT&&!h||a===s.RIGHT&&h)u||(l=l?l.prev():e(r.tagList[0].lastChild),l[0]&&r.currentTag(l));else if(a===s.RIGHT&&!h||a===s.LEFT&&h)!u&&l&&(l=l.next(),r.currentTag(l[0]?l:null));else if(a===s.ENTER&&f)r._select(d).done(function(){r._change(),r._close()}),n.preventDefault();else if(a===s.ESC)f?n.preventDefault():r.currentTag(null),r.close();else if(a===s.HOME)f?c.focusFirst():u||(l=r.tagList[0].firstChild,l&&r.currentTag(e(l)));else if(a===s.END)f?c.focusLast():u||(l=r.tagList[0].lastChild,l&&r.currentTag(e(l)));else if(a!==s.DELETE&&a!==s.BACKSPACE||u)!r.popup.visible()||a!==s.PAGEDOWN&&a!==s.PAGEUP?(clearTimeout(r._typingTimeout),setTimeout(function(){r._scale()}),r._search()):(n.preventDefault(),o=a===s.PAGEDOWN?1:-1,c.scrollWith(o*c.screenHeight()));else{if("single"===r.options.tagMode)return c.value([]),r._change(),r._close(),t;a!==s.BACKSPACE||l||(l=e(r.tagList[0].lastChild)),l&&l[0]&&r._removeTag(l)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr("aria-busy",!1),e._loading.addClass(x),e._request=!1,e._busy=null,e._showClear()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(x),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(c(e._showBusyHandler,e),100))},_placeholder:function(e,n){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&&!n&&i.caret(r[0],u,u),o._scale()},_scale:function(){var e,t=this,n=t.wrapper,i=n.width(),o=t._span.text(t.input.val());n.is(":visible")?e=o.width()+25:(o.appendTo(document.documentElement),i=e=o.width()+25,o.appendTo(n)),t.input.width(e>i?i:e)},_option:function(e,n,o){var r="<option";return e!==t&&(e+="",e.indexOf('"')!==-1&&(e=e.replace(z,"&quot;")),r+=' value="'+e+'"'),o&&(r+=" selected"),r+=">",n!==t&&(r+=i.htmlEncode(n)),r+="</option>"},_render:function(e){var t,n,i,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++)n=e[o],i=this._value(n),t=this._selectedItemIndex(i,a),t!==-1&&a.splice(t,1),s[i]=o,d+=this._option(i,this._text(n),t!==-1);if(a.length)for(o=0;o<a.length;o++)n=a[o],i=this._value(n),r[i]=c,s[i]=c,c+=1,d+=this._option(i,this._text(n),!0);this._customOptions=r,this._optionsMap=s,this.element.html(d)},_buildSelectedItems:function(e){var t,n,i=this.options.dataValueField,o=this.options.dataTextField,r=[];for(n=0;n<e.length;n++)t={},t[i]=e[n],t[o]=e[n],r.push(t);return r},_selectedItemIndex:function(e,t){for(var n=this._value,i=0;i<t.length;i++)if(e===n(t[i]))return i;return-1},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e.input.val();e._prev!==t&&(e._prev=t,e.search(t))},e.options.delay)},_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 n=this;n.angular(t,function(){return{elements:n.tagList[0].children,data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})},_selectValue:function(e,t){var n,i,o,r=this,s=r.value(),a=r.dataSource.total(),l=r.tagList,c=r._value;if(r._angularTagItems("cleanup"),"multiple"===r.options.tagMode){for(o=t.length-1;o>-1;o--)n=t[o],l[0].removeChild(l[0].children[n.position]),r._setOption(c(n.dataItem),!1);for(o=0;o<e.length;o++)i=e[o],l.append(r.tagTemplate(i.dataItem)),r._setOption(c(i.dataItem),!0)}else{for((!r._maxTotal||r._maxTotal<a)&&(r._maxTotal=a),l.html(""),s.length&&l.append(r.tagTemplate({values:s,dataItems:r.dataItems(),maxTotal:r._maxTotal,currentTotal:a})),o=t.length-1;o>-1;o--)r._setOption(c(t[o].dataItem),!1);for(o=0;o<e.length;o++)r._setOption(c(e[o].dataItem),!0)}r._angularTagItems("compile"),r._placeholder()},_select:function(t){var n,i,o,r,s=e.Deferred().resolve();return t?(n=this,i=n.listView,o=i.dataItemByIndex(i.getElementIndex(t)),r=t.hasClass("k-state-selected"),n._state===p&&(n._state=""),n._allowSelection()?n.trigger(r?w:b,{dataItem:o,item:t})?(n._close(),s):i.select(t).done(function(){n._placeholder(),n._state===f&&(n._state=h,i.skipUpdate(!0))}):s):s},_input:function(){var t=this,n=t.element,i=n[0].accessKey,o=t._innerWrapper.children("input.k-input");o[0]||(o=e('<input class="k-input" style="width: 25px" />').appendTo(t._innerWrapper)),n.removeAttr("accesskey"),t._focused=t.input=o.attr({accesskey:i,autocomplete:"off",role:"listbox",title:n[0].title,"aria-expanded":!1})},_tagList:function(){var t=this,n=t._innerWrapper.children("ul");n[0]||(n=e('<ul role="listbox" deselectable="on" class="k-reset"/>').appendTo(t._innerWrapper)),t.tagList=n},_tagTemplate:function(){var e,t=this,n=t.options,o=n.tagTemplate,r=n.dataSource,s="multiple"===n.tagMode;t.element[0].length&&!r&&(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"),e=s?i.template("#:"+i.expr(n.dataTextField,"data")+"#",{useWithBlock:!1}):i.template("#:values.length# item(s) selected"),t.tagTextTemplate=o=o?i.template(o):e,t.tagTemplate=function(e){return'<li class="k-button" deselectable="on"><span deselectable="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 '+x+'"></span>').insertAfter(this.input)},_clearButton:function(){this._clear=e('<span deselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&this._clear.insertAfter(this.input)},_textContainer:function(){var t=i.getComputedStyles(this.input[0],B);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,n=t.element,i=n.parent("span.k-multiselect");i[0]||(i=n.wrap('<div class="k-widget k-multiselect k-header" deselectable="on" />').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('<div class="k-multiselect-wrap k-floatwrap" deselectable="on" />').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display",""),t._innerWrapper=e(i[0].firstChild)}});o.plugin(L)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.slider.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e,t,n){var i=n?" 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"+i+r+"'"+o+"><div class='k-slider-wrap"+(e.showButtons?" k-slider-buttons":"")+s+"'></div></div>"}function i(e,t,n,i){var o="";return o=n?!i&&"increase"==t||i&&"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 n,i="<ul class='k-reset k-slider-items'>",o=S.floor(d(t/e.smallStep))+1;for(n=0;n<o;n++)i+="<li class='k-tick' role='presentation'>&nbsp;</li>";return i+="</ul>"}function r(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return"<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='"+i+"' role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(n>1?e.selectionStart||e.min:e.value||e.min)+"'>Drag</a>"+(n>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,n=0;return t=t.split("."),t[1]&&(n=t[1].length),n=n>10?10:n}function d(e){var t,n;return e=parseFloat(e,10),t=c(e),n=S.pow(10,t||0),S.round(e*n)/n}function u(e,n){var i=k(e.getAttribute(n));return null===i&&(i=t),i}function h(e){return typeof e!==Q}function f(e){return 1e4*e}var p,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",M="slide",R=".slider",I="touchstart"+R+" mousedown"+R,F=D?"pointerdown"+R:A?"MSPointerDown"+R:I,z="touchend"+R+" mouseup"+R,P=D?"pointerup":A?"MSPointerUp"+R:z,B="moveSelection",L="keydown"+R,H="click"+R,N="mouseover"+R,O="focus"+R,V="blur"+R,U=".k-draghandle",W=".k-slider-track",j=".k-tick",q="k-state-selected",G="k-state-focused",$="k-state-default",Y="k-state-disabled",K="disabled",Q="undefined",X="tabindex",Z=m.getTouches,J=g.extend({init:function(e,t){var n,i=this;if(g.fn.init.call(i,e,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&m.support.isRtl(e),i._position=i._isHorizontal?"left":"bottom",i._sizeFn=i._isHorizontal?"width":"height",i._outerSize=i._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.");i._createHtml(),i.wrapper=i.element.closest(".k-slider"),i._trackDiv=i.wrapper.find(W),i._setTrackDivWidth(),i._maxSelection=i._trackDiv[i._sizeFn](),i._sliderItemsInit(),i._reset(),i._tabindex(i.wrapper.find(U)),i[t.enabled?"enable":"disable"](),n=m.support.isRtl(i.wrapper)?-1:1,i._keyMap={37:s(-1*n*t.smallStep),40:s(-t.smallStep),39:s(1*n*t.smallStep),38:s(+t.smallStep),35:a(t.max),36:a(t.min),33:s(+t.largeStep),34:s(-t.largeStep)},m.notify(i)},events:[E,M],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,n=t.options,i=t._maxSelection/((n.max-n.min)/n.smallStep),r=t._calculateItemsWidth(S.floor(t._distance()/n.smallStep));"none"!=n.tickPlacement&&i>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(o(n,t._distance())),t._setItemsWidth(r),t._setItemsTitle()),t._calculateSteps(r),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.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 n,i=this,o=i.options,r=0,s=t.length-1,a=i.wrapper.find(j),l=0,c=2,d=a.length,u=0;for(n=0;n<d-2;n++)e(a[n+1])[i._sizeFn](t[n]);if(i._isHorizontal?(e(a[r]).addClass("k-first")[i._sizeFn](t[s-1]),e(a[s]).addClass("k-last")[i._sizeFn](t[s])):(e(a[s]).addClass("k-first")[i._sizeFn](t[s]),e(a[r]).addClass("k-last")[i._sizeFn](t[s-1])),i._distance()%o.smallStep!==0&&!i._isHorizontal){for(n=0;n<t.length;n++)u+=t[n];l=i._maxSelection-u,l+=parseFloat(i._trackDiv.css(i._position),10)+c,i.wrapper.find(".k-slider-items").css("padding-top",l)}},_setItemsTitle:function(){for(var t=this,n=t.options,i=t.wrapper.find(j),o=n.min,r=i.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(i[s]).attr("title",y(n.tooltip.format,d(o))),o+=n.smallStep},_setItemsLargeTick:function(){var t,n,i,o=this,r=o.options,s=o.wrapper.find(j),a=0;if(f(r.largeStep)%f(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]),n=o._values[a],i=d(f(n-this.options.min)),i%f(r.smallStep)===0&&i%f(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,n,i,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,n=[],i=0;i<e-1;i++)n[i]=t;return n[e-1]=n[e]=t/2,o._roundWidths(n)},_roundWidths:function(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=e[t]-S.floor(e[t]),e[t]=S.floor(e[t]);return n=S.round(n),this._addAdditionalSize(n,e)},_addAdditionalSize:function(e,t){if(0===e)return t;var n,i=parseFloat(t.length-1)/parseFloat(1==e?e:e-1);for(n=0;n<e;n++)t[parseInt(S.round(i*n),10)]+=1;return t},_calculateSteps:function(e){var t,n=this,i=n.options,o=i.min,r=0,s=n._distance(),a=S.ceil(s/i.smallStep),l=1;if(a+=s/i.smallStep%1===0?1:0,e.splice(0,0,2*e[a-2]),e.splice(a-1,1,2*e.pop()),n._pixelSteps=[r],n._values=[o],0!==a){for(;l<a;)r+=(e[l-1]+e[l])/2,n._pixelSteps[l]=r,o+=i.smallStep,n._values[l]=d(o),l++;t=s%i.smallStep===0?a-1:a,n._pixelSteps[t]=n._maxSelection,n._values[t]=i.max,n._isRtl&&(n._pixelSteps.reverse(),n._values.reverse())}},_getValueFromPosition:function(e,t){var n,i=this,o=i.options,r=S.max(o.smallStep*(i._maxSelection/i._distance()),0),s=0,a=r/2;if(i._isHorizontal?(s=e-t.startPoint,i._isRtl&&(s=i._maxSelection-s)):s=t.startPoint-e,i._maxSelection-(parseInt(i._maxSelection%r,10)-3)/2<s)return o.max;for(n=0;n<i._pixelSteps.length;n++)if(S.abs(i._pixelSteps[n]-s)-1<=a)return d(i._values[n])},_getFormattedValue:function(e,t){var n,i,o,r=this,s="",a=r.options.tooltip;return C(e)?(i=e[0],o=e[1]):t&&t.type&&(i=t.selectionStart,o=t.selectionEnd),t&&(n=t.tooltipTemplate),!n&&a.template&&(n=m.template(a.template)),C(e)||t&&t.type?n?s=n({selectionStart:i,selectionEnd:o}):(i=y(a.format,i),o=y(a.format,o),s=i+" - "+o):(t&&(t.val=e),s=n?n({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(n(o,t,e._isHorizontal)).hide(),o.showButtons&&t.before(i(o,"increase",e._isHorizontal,e._isRtl)).before(i(o,"decrease",e._isHorizontal,e._isRtl)),t.before(r(o,t))},_focus:function(t){var n=this,i=t.target,o=n.value(),r=n._drag;r||(i==n.wrapper.find(U).eq(0)[0]?(r=n._firstHandleDrag,n._activeHandle=0):(r=n._lastHandleDrag,n._activeHandle=1),o=o[n._activeHandle]),e(i).addClass(G+" "+q),r&&(n._activeHandleDrag=r,r.selectionStart=n.options.selectionStart,r.selectionEnd=n.options.selectionEnd,r._updateTooltip(o))},_focusWithMouse:function(t){t=e(t);var n=this,i=t.is(U)?t.index():0;window.setTimeout(function(){n.wrapper.find(U)[2==i?1:0].focus()},1),n._setTooltipTimeout()},_blur:function(t){var n=this,i=n._activeHandleDrag;e(t.target).removeClass(G+" "+q),i&&(i._removeTooltip(),delete n._activeHandleDrag,delete n._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,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.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(n,i){var o,r=this;n.type="text",i=w({},{value:u(n,"value"),min:u(n,"min"),max:u(n,"max"),smallStep:u(n,"step")},i),n=e(n),i&&i.enabled===t&&(i.enabled=!n.is("[disabled]")),J.fn.init.call(r,n,i),i=r.options,h(i.value)&&null!==i.value||(i.value=i.min,n.prop("value",l(i.min))),i.value=S.max(S.min(i.value,i.max),i.min),o=r.wrapper.find(U),this._selection=new ee.Selection(o,r,i),r._drag=new ee.Drag(o,"",r,i)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(n){var i,o,r,s=this,a=s.options;s.disable(),n!==!1&&(s.wrapper.removeClass(Y).addClass($),s.wrapper.find("input").removeAttr(K),i=function(n){var i,o,r,a=Z(n)[0];if(a){if(i=s._isHorizontal?a.location.pageX:a.location.pageY,o=s._getDraggableArea(),r=e(n.target),r.hasClass("k-draghandle"))return r.addClass(G+" "+q),t;s._update(s._getValueFromPosition(i,o)),s._focusWithMouse(n.target),s._drag.dragstart(n),n.preventDefault()}},s.wrapper.find(j+", "+W).on(F,i).end().on(F,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(P,function(){s._drag._end()}),s.wrapper.find(U).attr(X,0).on(z,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(z,x(function(e){this._clearTimer(),s._focusWithMouse(e.target)},s)).on(N,function(t){e(t.currentTarget).addClass("k-state-hover")}).on("mouseout"+R,x(function(t){e(t.currentTarget).removeClass("k-state-hover"),this._clearTimer()},s)).eq(0).on(I,x(function(e){r(e,1)},s)).click(!1).end().eq(1).on(I,x(function(e){r(e,-1)},s)).click(m.preventDefault)),s.wrapper.find(U).off(L,!1).on(L,x(this._keydown,s)),a.enabled=!0)},disable:function(){var t=this;t.wrapper.removeClass($).addClass(Y),e(t.element).prop(K,K),t.wrapper.find(".k-button").off(I).on(I,m.preventDefault).off(z).on(z,m.preventDefault).off("mouseleave"+R).on("mouseleave"+R,m.preventDefault).off(N).on(N,m.preventDefault),t.wrapper.find(j+", "+W).off(F).off(P),t.wrapper.find(U).attr(X,-1).off(z).off(L).off(H).off(O).off(V),t.options.enabled=!1},_update:function(e){var t=this,n=t.value()!=e;t.value(e),n&&t.trigger(E,{value:t.options.value})},value:function(e){var n=this,i=n.options;return e=d(e),isNaN(e)?i.value:(e>=i.min&&e<=i.max&&i.value!=e&&(n.element.prop("value",l(e)),i.value=e,n._refreshAriaAttr(e),n._refresh()),t)},_refresh:function(){this.trigger(B,{value:this.options.value})},_refreshAriaAttr:function(e){var t,n=this,i=n._drag;t=i&&i._tooltipDiv?i._tooltipDiv.text():n._getFormattedValue(e,null),this.wrapper.find(U).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 n=this,i=n.options;return e=d(e),isNaN(e)?(n._update(i.min),t):(e=S.max(S.min(e,i.max),i.min),n._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 n=e.element[0].value;e.value(""===n||isNaN(n)?t:n)})},destroy:function(){var e=this;J.fn.destroy.call(e),e.wrapper.off(R).find(".k-button").off(R).end().find(U).off(R).end().find(j+", "+W).off(R).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});ee.Selection=function(e,t,n){function i(i){var o=i-n.min,r=t._valueIndex=S.ceil(d(o/n.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)}i(n.value),t.bind([M,B],function(e){i(parseFloat(e.value,10))}),t.bind(E,function(e){i(parseFloat(e.sender.value(),10))})},ee.Drag=function(e,t,n,i){var o=this;o.owner=n,o.options=i,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)},ee.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(n){var i=this,o=i.owner,r=i.options;return r.enabled?(this.owner._activeDragHandle=this,o.element.off(N),o.wrapper.find("."+G).removeClass(G+" "+q),i.element.addClass(G+" "+q),e(document.documentElement).css("cursor","pointer"),i.dragableArea=o._getDraggableArea(),i.step=S.max(r.smallStep*(o._maxSelection/o._distance()),0),i.type?(i.selectionStart=r.selectionStart,i.selectionEnd=r.selectionEnd,o._setZIndex(i.type)):i.oldVal=i.val=r.value,i._removeTooltip(!0),i._createTooltip(),t):(n.preventDefault(),t)},_createTooltip:function(){var t,n,i=this,o=i.owner,r=i.options.tooltip,s="",a=e(window);r.enabled&&(r.template&&(t=i.tooltipTemplate=m.template(r.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body),s=o._getFormattedValue(i.val||o.value(),i),i.type||(n="k-callout-"+(o._isHorizontal?"s":"e"),i.tooltipInnerDiv="<div class='k-callout "+n+"'><!-- --></div>",s+=i.tooltipInnerDiv),i.tooltipDiv.html(s),i._scrollOffset={top:a.scrollTop(),left:a.scrollLeft()},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,o=e.x.location,r=e.y.location,s=n.dragableArea.startPoint,a=n.dragableArea.endPoint;e.preventDefault(),n.val=i._isHorizontal?i._isRtl?n.constrainValue(o,s,a,o<a):n.constrainValue(o,s,a,o>=a):n.constrainValue(r,a,s,r<=a),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.selectionStart=n.val<n.selectionEnd?n.val:n.selectionEnd=n.val:n.val>n.selectionStart?n.selectionEnd=n.val:n.selectionStart=n.selectionEnd=n.val,t={values:[n.selectionStart,n.selectionEnd],value:[n.selectionStart,n.selectionEnd]}):t={value:n.val},i.trigger(M,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n=t.options,i=n.tooltip,o="";i.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,n=t.owner;return e(document.documentElement).css("cursor",""),t.type?n._update(t.selectionStart,t.selectionEnd):(n._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 n=this,i=n.owner;n.tooltipDiv&&i.options.tooltip.enabled&&i.options.enabled&&(t?(n.tooltipDiv.remove(),n.tooltipDiv=null):n.tooltipDiv.fadeOut("slow",function(){e(this).remove(),n.tooltipDiv=null}))},moveTooltip:function(){var t,n,i,o,r=this,s=r.owner,a=0,l=0,c=r.element,d=m.getOffset(c),u=8,h=e(window),f=r.tooltipDiv.find(".k-callout"),p=_(r.tooltipDiv),g=b(r.tooltipDiv);r.type?(t=s.wrapper.find(U),d=m.getOffset(t.eq(0)),n=m.getOffset(t.eq(1)),s._isHorizontal?(a=n.top,l=d.left+(n.left-d.left)/2):(a=d.top+(n.top-d.top)/2,l=n.left),o=_(t.eq(0))+2*u):(a=d.top,l=d.left,o=_(c)+2*u),s._isHorizontal?(l-=parseInt((p-s._outerSize(c))/2,10),a-=g+f.height()+u):(a-=parseInt((g-s._outerSize(c))/2,10),l-=p+f.width()+u),s._isHorizontal?(i=r._flip(a,g,o,b(h)+r._scrollOffset.top),a+=i,l+=r._fit(l,p,_(h)+r._scrollOffset.left)):(i=r._flip(l,p,o,_(h)+r._scrollOffset.left),
a+=r._fit(a,g,b(h)+r._scrollOffset.top),l+=i),i>0&&f&&(f.removeClass(),f.addClass("k-callout k-callout-"+(s._isHorizontal?"n":"w"))),r.tooltipDiv.css({top:a,left:l})},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i){var o=0;return e+t>i&&(o+=-(n+t)),e+o<0&&(o+=n+t),o},constrainValue:function(e,t,n,i){var o=this,r=0;return r=t<e&&e<n?o.owner._getValueFromPosition(e,o.dragableArea):i?o.options.max:o.options.min}},m.ui.plugin(ee),p=J.extend({init:function(n,i){var o,r=this,s=e(n).find("input"),a=s.eq(0)[0],c=s.eq(1)[0];a.type="text",c.type="text",i&&i.showButtons&&(window.console&&window.console.warn("showbuttons option is not supported for the range slider, ignoring"),i.showButtons=!1),i=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")},i),i&&i.enabled===t&&(i.enabled=!s.is("[disabled]")),J.fn.init.call(r,n,i),i=r.options,h(i.selectionStart)&&null!==i.selectionStart||(i.selectionStart=i.min,s.eq(0).prop("value",l(i.min))),h(i.selectionEnd)&&null!==i.selectionEnd||(i.selectionEnd=i.max,s.eq(1).prop("value",l(i.max))),o=r.wrapper.find(U),this._selection=new p.Selection(o,r,i),r._firstHandleDrag=new ee.Drag(o.eq(0),"firstHandle",r,i),r._lastHandleDrag=new ee.Drag(o.eq(1),"lastHandle",r,i)},options:{name:"RangeSlider",leftDragHandleTitle:"drag",rightDragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},selectionStart:null,selectionEnd:null},enable:function(n){var i,o=this,r=o.options;o.disable(),n!==!1&&(o.wrapper.removeClass(Y).addClass($),o.wrapper.find("input").removeAttr(K),i=function(n){var i,s,a,l,c,d,u,h=Z(n)[0];if(h){if(i=o._isHorizontal?h.location.pageX:h.location.pageY,s=o._getDraggableArea(),a=o._getValueFromPosition(i,s),l=e(n.target),l.hasClass("k-draghandle"))return o.wrapper.find("."+G).removeClass(G+" "+q),l.addClass(G+" "+q),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(n),o._setValueInRange(c,d),o._focusWithMouse(u.element)}},o.wrapper.find(j+", "+W).on(F,i).end().on(F,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(P,function(){o._activeDragHandle&&o._activeDragHandle._end()}),o.wrapper.find(U).attr(X,0).on(z,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(U).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(Y),e.wrapper.find("input").prop(K,K),e.wrapper.find(j+", "+W).off(F).off(P),e.wrapper.find(U).attr(X,-1).off(z).off(L).off(H).off(O).off(V),e.options.enabled=!1},_keydown:function(e,t){var n,i,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)),n=Math.max(s,r.options.selectionStart),i=Math.min(a,r.options.selectionEnd),o.selectionEnd=Math.max(i,r.options.selectionStart),o.selectionStart=Math.min(n,r.options.selectionEnd),o._updateTooltip(r.value()[r._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),o=i[0]!=e||i[1]!=t;n.value([e,t]),o&&n.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,n){var i=this,o=i.options,r=o.selectionStart,s=o.selectionEnd;return isNaN(e)&&isNaN(n)?[r,s]:(e=d(e),n=d(n),e>=o.min&&e<=o.max&&n>=o.min&&n<=o.max&&e<=n&&(r==e&&s==n||(i.element.find("input").eq(0).prop("value",l(e)).end().eq(1).prop("value",l(n)),o.selectionStart=e,o.selectionEnd=n,i._refresh(),i._refreshAriaAttr(e,n))),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 n,i=this,o=i.wrapper.find(U),r=i._activeHandleDrag;n=i._getFormattedValue([e,t],r),o.eq(0).attr("aria-valuenow",e),o.eq(1).attr("aria-valuenow",t),o.attr("aria-valuetext",n)},_setValueInRange:function(e,t){var n=this.options;e=S.max(S.min(e,n.max),n.min),t=S.max(S.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(S.min(e,t),S.max(e,t))},_setZIndex:function(t){this.wrapper.find(U).each(function(n){e(this).css("z-index","firstHandle"==t?1-n:n)})},_formResetHandler:function(){var e=this,t=e.options;setTimeout(function(){var n=e.element.find("input"),i=n[0].value,o=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===o||isNaN(o)?t.max:o)})},destroy:function(){var e=this;J.fn.destroy.call(e),e.wrapper.off(R).find(j+", "+W).off(R).end().find(U).off(R),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),p.Selection=function(e,t,n){function i(i){i=i||[];var r=i[0]-n.min,s=i[1]-n.min,a=S.ceil(d(r/n.smallStep)),l=S.ceil(d(s/n.smallStep)),c=t._pixelSteps[a],u=t._pixelSteps[l],h=parseInt(t._outerSize(e.eq(0))/2,10),f=t._isRtl?2:0;e.eq(0).css(t._position,c-h-f).end().eq(1).css(t._position,u-h-f),o(c,u)}function o(e,n){var i,o,r=t._trackDiv.find(".k-slider-selection");i=S.abs(e-n),r[t._sizeFn](i),t._isRtl?(o=S.max(e,n),r.css("right",t._maxSelection-o-1)):(o=S.min(e,n),r.css(t._position,o-1))}i(t.value()),t.bind([E,M,B],function(e){i(e.values)})},m.ui.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){function i(e,t,n){n=d(n),n&&!n.equals(e.color())&&("change"==t&&(e._value=n),n=1!=n.a?n.toCssRgba():n.toCss(),e.trigger(t,{value:n}))}function o(e,t,n){var i,o;return e=Array.prototype.slice.call(e),i=e.length,o=e.indexOf(t),o<0?n<0?e[i-1]:e[0]:(o+=n,o<0?o+=i:o%=i,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,f="background-color",p="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"},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 n,i=this;c.fn.init.call(i,e,t),e=i.element,t=i.options,i._value=t.value=d(t.value),i._tabIndex=e.attr("tabIndex")||0,n=i._ariaId=t.ariaId,n&&e.attr("aria-labelledby",n),t._standalone&&(i._triggerSelect=i._triggerChange)},options:{name:"ColorSelector",value:null,_standalone:!0},events:["change","select","cancel"],color:function(e){return e!==n&&(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 n=this._value;e=this.color(e),t||(this.element.trigger("change"),e.equals(n)?this._standalone||this.trigger("cancel"):this.trigger("change",{value:this.value()}))},_triggerSelect:function(e){i(this,"select",e)},_triggerChange:function(e){i(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,n){var i,o,r,l,c=this;if(C.fn.init.call(c,t,n),t=c.wrapper=c.element,n=c.options,i=n.palette,"websafe"==i?(i=g,n.columns=18):"basic"==i&&(i=m),"string"==typeof i&&(i=i.split(",")),e.isArray(i)&&(i=e.map(i,function(e){return d(e)})),c._selectedID=(n.ariaId||a.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(c._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:c._value,id:n.ariaId}))).on(w,".k-item",function(t){c._select(e(t.currentTarget).css(f))}).attr("tabIndex",c._tabIndex).on(y,s(c._keydown,c)),o=n.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.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 n,i,s=this.wrapper,a=s.find(".k-item"),l=a.filter("."+p).get(0),c=t.keyCode;if(c==h.LEFT?n=o(a,l,-1):c==h.RIGHT?n=o(a,l,1):c==h.DOWN?n=o(a,l,this.options.columns):c==h.UP?n=o(a,l,-this.options.columns):c==h.ENTER?(r(t),l&&this._select(e(l).css(f))):c==h.ESC&&this._cancel(),n){r(t),this._current(n);try{i=d(n.css(f)),this._triggerSelect(i)}catch(u){}}},_current:function(t){this.wrapper.find("."+p).removeClass(p).attr("aria-selected",!1).removeAttr("id"),e(t).addClass(p).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var n=null;this.wrapper.find(".k-item").each(function(){var i=d(e(this).css(f));if(i&&i.equals(t))return n=this,!1}),this._current(n)},_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 ? " '+p+'" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>')}),T=C.extend({init:function(t,n){var i=this;C.fn.init.call(i,t,n),n=i.options,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||d("#f00")),t.find("input.k-color-value").on(y,function(t){var n,o,r=this;if(t.keyCode==h.ENTER)try{n=d(r.value),o=i.color(),i._select(n,n.equals(o))}catch(s){e(r).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=d(r.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(w,".k-controls button.apply",function(){i.options._clearedColor?i.trigger("change"):i._select(i._getHSV())}).on(w,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),x&&i._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){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element;n._hueSlider=i.find(".k-hue-slider").kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),n._opacitySlider=i.find(".k-transparency-slider").kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,o=e-i.left,r=n-i.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,n=t.element,i=n.find(".k-hsv-rectangle"),o=i.find(".k-draghandle").attr("tabIndex",0).on(y,s(t._keydown,t));t._hsvEvents=new a.UserEvents(i,{global:!0,press:function(t){this.offset=a.getOffset(i),this.width=i.width(),this.height=i.height(),o.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),o.focus()},move:function(t){t.preventDefault(),e.call(this,t.x.location,t.y.location)},end:function(){i.removeClass("k-dragging")}}),t._hsvRect=i,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,n){var o=i._getHSV();o[t]+=n*(e.shiftKey?.01:.05),o[t]<0&&(o[t]=0),o[t]>1&&(o[t]=1),i._updateUI(o),r(e)}function n(t){var n=i._getHSV();n.h+=t*(e.shiftKey?1:5),n.h<0&&(n.h=0),n.h>359&&(n.h=359),i._updateUI(n),r(e)}var i=this;switch(e.keyCode){case h.LEFT:e.ctrlKey?n(-1):t("s",-1);break;case h.RIGHT:e.ctrlKey?n(1):t("s",1);break;case h.UP:t(e.ctrlKey&&i._opacitySlider?"a":"v",1);break;case h.DOWN:t(e.ctrlKey&&i._opacitySlider?"a":"v",-1);break;case h.ENTER:i._select(i._getHSV());break;case h.F2:i.wrapper.find("input.k-color-value").focus().select();break;case h.ESC:i._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,n,i){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==n&&(n=1-a.top/s),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),u.fromHSV(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(f,e.toDisplay()),t||n._colorAsText.val(n._opacitySlider?e.toCssRgba():e.toCss()),n._triggerSelect(e),e=e.toHSV(),n._hsvHandle.css({left:e.s*i.width()+"px",top:(1-e.v)*i.height()+"px"}),n._hueElements.css(f,u.fromHSV(e.h,1,1,1).toCss()),n._hueSlider.value(e.h),n._opacitySlider&&n._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-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-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,n){var i,o,r,s,a,l=this;c.fn.init.call(l,t,n),n=l.options,t=l.element,i=t.attr("value")||t.val(),i=i?d(i,!0):d(n.value,!0),l._value=n.value=i,o=l.wrapper=e(l._template(n)),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(i)},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,n=t.wrapper,i=n.children(".k-picker-wrap"),o=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),o.off(b).on("mousedown"+b,r),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(b),e?n.removeClass("k-state-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+b,function(){i.addClass("k-state-hover")}).on("mouseleave"+b,function(){i.removeClass("k-state-hover")}).on("focus"+b,function(){i.addClass("k-state-focused")}).on("blur"+b,function(){i.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(f,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,i,o,r,s=this,l=s._popup;return l||(t=s.options,i=t.palette?S:T,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,o=a.guid(),r=s._selector=new i(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._updateUI(null),r._colorAsText.val(""),r._hsvHandle.css({top:"0px",left:"0px"}),r._selectedColor.css(f,v),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,i,o,a;return s.trigger("close")?(e.preventDefault(),n):(s.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=r._selectOnHide(),i=r.value(),o=s.value(),a=r.options,t?a._clearedColor&&!o||s._select(t):(setTimeout(function(){s.wrapper&&s.wrapper.focus()}),!a._closing&&a._clearedColor&&!o&&i?s._select(i,!0):s._updateUI(s.color())),n)},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,n){(n||t)()}),function(e,define){define("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){var n="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="k-icon '+n+'"></span></span>'}function i(e,t){var n=(""+parseFloat(e,10)).split(D);return n[1]&&(n[1]=n[1].substring(0,t)),n.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,f=o.getCulture,p="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-state-selected",E="k-state-disabled",M="aria-disabled",R=/^(-)?(\d*)$/,I=null,F=e.proxy,z=e.extend,P=l.extend({init:function(n,i){var r,s,a,c,u,h=this,f=i&&i.step!==t;l.fn.init.call(h,n,i),i=h.options,n=h.element.on("focusout"+b,F(h._focusout,h)).attr("role","spinbutton"),i.placeholder=i.placeholder||n.attr("placeholder"),h._initialOptions=z({},i),r=h.min(n.attr("min")),s=h.max(n.attr("max")),a=h._parse(n.attr("step")),i.min===I&&r!==I&&(i.min=r),i.max===I&&s!==I&&(i.max=s),f||a===I||(i.step=a),h._reset(),h._wrapper(),h._arrows(),h._input(),o.support.mobileOS?h._text.on(w+b+" "+T+b,function(){o.support.browser.edge?h._text.one(T+b,function(){h._toggleText(!1),n.focus()}):(h._toggleText(!1),n.focus())}):h._text.on(T+b,F(h._click,h)),n.attr("aria-valuemin",i.min!==I?i.min*i.factor:i.min).attr("aria-valuemax",i.max!==I?i.max*i.factor:i.max),i.format=d(i.format),c=i.value,h.value(c!==I?c:n.val()),u=n.is("[disabled]")||e(h.element).parents("fieldset").is(":disabled"),u?h.enable(!1):h.readonly(n.is("[readonly]")),o.notify(h)},options:{name:"NumericTextBox",decimals:I,restrictDecimals:!1,min:I,max:I,value:I,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value"},events:[p,_],_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t._text.add(n),s=t._inputWrapper.off(k);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("keypress"+b).off("paste"+b),o||i?(s.addClass(i?E:x).removeClass(i?x:E),r.attr(m,i).attr(g,o).attr(M,i)):(s.addClass(x).removeClass(E).on(k,t._toggleHover),r.removeAttr(m).removeAttr(g).attr(M,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(A)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(A)}),t.element.on("keydown"+b,F(t._keydown,t)).on("keypress"+b,F(t._keypress,t)).on("paste"+b,F(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)})},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 n,i=this;return e===t?i._value:(e=i._parse(e),n=i._adjust(e),e===n&&(i._update(e),i._old=i._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,i=n.min,o=n.max;return e===I?e:(i!==I&&e<i?e=i:o!==I&&e>o&&(e=o),e)},_arrows:function(){var t,i=this,r=function(){clearTimeout(i._spinning),t.removeClass(A)},s=i.options,a=s.spinners,l=i.element;t=l.siblings(".k-icon"),t[0]||(t=e(n("increase",s.upArrowText)+n("decrease",s.downArrowText)).insertAfter(l),t.wrapAll('<span class="k-select"/>')),a||(t.parent().toggle(a),i._inputWrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),i._upArrowEventHandler=new o.UserEvents(i._upArrow,{release:r}),i._downArrow=t.eq(1),i._downArrowEventHandler=new o.UserEvents(i._downArrow,{release:r})},_blur:function(){var e=this,t=e.options.factor,n=e.element.val();e._toggleText(!0),t&&1!==t&&(n=parseFloat(n),null!==n&&(n/=t)),e._change(n)},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,i,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&&(i=RegExp("\\"+d,"g"),o=RegExp("([\\d\\"+d+"]+)(\\"+c[D]+")?(\\d+)?")),o&&(n=o.exec(l)),n&&(u=n[0].replace(i,"").length,l.indexOf("(")!=-1&&t._value<0&&u++),t._focusin(),r(t.element[0],u)})},_change:function(e){var t=this;t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(p),t.trigger(p)),t._typing=!1},_culture:function(e){return e||f(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(C),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(C).removeClass(S),e._blur()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,i=n.options,o="k-formatted-value",r=n.element.addClass(v).show()[0],s=r.accessKey,a=n.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"}n._initialTitle=r.title,t[0].title=r.title,t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",i.placeholder),s&&(t.attr("accesskey",s),r.accessKey=""),n._text=t.addClass(r.className).attr({role:"spinbutton","aria-valuemin":i.min!==I?i.min*i.factor:i.min,"aria-valuemax":i.max!==I?i.max*i.factor:i.max})},_keydown:function(e){var t=this,n=e.keyCode;t._key=n,n==s.DOWN?t._step(-1):n==s.UP?t._step(1):n==s.ENTER?t._change(t.element.val()):t._typing=!0},_keypress:function(e){var t,n,i,o,a,l,c,d,u,h,f;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===s.BACKSPACE||e.keyCode===s.ENTER||(t=this,n=t.options.min,i=t.element,o=r(i),a=o[0],l=o[1],c=String.fromCharCode(e.which),d=t._format(t.options.format),u=t._key===s.NUMPAD_DOT,h=i.val(),u&&(c=d[D]),h=h.substring(0,a)+c+h.substring(l),f=t._numericRegex(d).test(h),f&&u?(i.val(h),r(i,a+c.length),e.preventDefault()):(null!==n&&n>=0&&"-"===h.charAt(0)||!f)&&e.preventDefault(),t._key=0)},_numericRegex:function(e){var t=this,n=e[D],i=t.options.decimals,o="*";return n===D&&(n="\\"+n),i===I&&(i=e.decimals),0===i?R:(t.options.restrictDecimals&&(o="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d"+o+")?)|("+n+"\\d"+o+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,o=t._format(t.options.format);setTimeout(function(){var e=t._parse(n.value),r=t._numericRegex(o).test(n.value);e!==I&&t._adjust(e)===e&&r||t._update(i)})},_option:function(e,n){var i=this,o=i.element,r=i.options;return n===t?r[e]:(n=i._parse(n),(n||"step"!==e)&&(r[e]=n,o.add(i._text).attr("aria-value"+e,n),o.attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._parse(n.val())||0;c()!=n[0]&&t._focusin(),t.options.factor&&i&&(i/=t.options.factor),i+=t.options.step*e,t._update(t._adjust(i)),t._typing=!1,t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return u(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?o._round:i;return n(e,t)},_update:function(e){var t,n=this,i=n.options,r=i.factor,s=i.format,a=i.decimals,l=n._culture(),c=n._format(s,l);a===I&&(a=c.decimals),e=n._parse(e,l),t=e!==I,t&&(e=parseFloat(n._round(e,a),10)),n._value=e=n._adjust(e),n._placeholder(o.toString(e,s,l)),t?(r&&(e=parseFloat(n._round(e*r,a),10)),e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,a)),e=e.replace(D,c[D])):e=null,n.element.val(e),n.element.add(n._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,n=this,i=n.element,o=i[0];t=i.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=o.style.cssText,o.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(o.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=o.on("reset",t._resetHandler))}});a.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(t,i){t.filters&&(t.filters=e.grep(t.filters,function(e){return n(e,i),e.filters?e.filters.length:e.field!=i;
}))}function i(e){var t,n,i,o,r,s;if(e&&e.length)for(s=[],t=0,n=e.length;t<n;t++)i=e[t],r=""!==i.text?i.text||i.value||i:i.text,o=null==i.value?i.text||i:i.value,s[t]={text:r,value:o};return s}function o(t,n){return e.grep(t,function(t){return t.filters?(t.filters=e.grep(t.filters,function(e){return e.field!=n}),t.filters.length):t.field!=n})}function r(t,n){t.filters&&(t.filters=e.grep(t.filters,function(e){return r(e,n),e.filters?e.filters.length:e.field==n&&"eq"==e.operator}))}function s(n){return"and"==n.logic&&n.filters.length>1?[]:n.filters?e.map(n.filters,function(e){return s(e)}):null!==n.value&&n.value!==t?[n.value]:[]}function a(e,n){for(var i,o,r=c.getter(n,!0),s=[],a=0,l={};a<e.length;)i=e[a++],o=r(i),o===t||null===o||l.hasOwnProperty(o)||(s.push(i),l[o]=!0);return s}function l(e,t){return function(n){var i=e(n);return a(i,t)}}var c=window.kendo,d=c.ui,u=e.proxy,h="kendoPopup",f="init",p="refresh",m="change",g=".kendoFilterMenu",v="Is equal to",_="Is not equal to",b={number:"numerictextbox",date:"datepicker"},w={string:"text",number:"number",date:"date"},y=c.isFunction,k=d.Widget,x='<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>',C='<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>',S='<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.info#" 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>',T='<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.info#" 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>',D=k.extend({init:function(t,n){var i,o,r,s,a=this,l="string";k.fn.init.call(a,t,n),i=a.operators=n.operators||{},t=a.element,n=a.options,n.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="'+n.messages.filter+'"><span class="k-icon k-i-filter"></span></a>').find(".k-grid-filter")),r.attr("tabindex",-1).on("click"+g,u(a._click,a))),a.link=r||e(),a.dataSource=E.create(n.dataSource),a.field=n.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)))),n.values&&(l="enums"),a.type=l,i=i[l]||n.operators[l];for(o in i)break;a._defaultFilter=function(){return{field:a.field,operator:o||"eq",value:""}},a._refreshHandler=u(a.refresh,a),a.dataSource.bind(m,a._refreshHandler),n.appendToElement?a._init():a.refresh()},_init:function(){var t,n=this,i=n.options.ui,o=y(i);n.pane=n.options.pane,n.pane&&(n._isMobile=!0),o||(t=i||b[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+g,u(n._submit,n)).on("reset"+g,u(n._reset,n)),o&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.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"),n.refresh(),n.trigger(f,{field:n.field,container:n.form}),c.cycleForm(n.form)},_createForm:function(t){var n=this,o=n.options,r=n.operators||{},s=n.type;r=r[s]||o.operators[s],n.form=e('<form title="'+n.options.messages.info+'" class="k-filter-menu"/>').html(c.template("boolean"===s?x:C)({field:n.field,format:o.format,ns:c.ns,messages:o.messages,extra:o.extra,operators:r,type:s,role:t,values:i(o.values)})),o.appendToElement?(n.element.append(n.form),n.popup=n.element.closest(".k-popup").data(h)):n.popup=n.form[h]({anchor:n.link,open:u(n._open,n),activate:u(n._activate,n),close:function(){n.options.closeCallback&&n.options.closeCallback(n.element)}}).data(h),n.form.on("keydown"+g,u(n._keydown,n))},_createMobileForm:function(t){var n=this,o=n.options,r=n.operators||{},s=n.type;r=r[s]||o.operators[s],n.form=e("<div />").html(c.template("boolean"===s?T:S)({field:n.field,title:o.title||n.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:w[s],values:i(o.values)})),n.view=n.pane.append(n.form.html()),n.form=n.view.element.find("form"),n.view.element.on("click",".k-submit",function(e){n.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){n._closeForm(),e.preventDefault()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},n=[e._defaultFilter()],i=e._defaultFilter().operator;(e.options.extra||"isnull"!==i&&"isnotnull"!==i)&&n.push(e._defaultFilter()),e.filterModel=c.observable({logic:"and",filters:n}),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;k.fn.destroy.call(e),e.form&&(c.unbind(e.form),c.destroy(e.form),e.form.unbind(g),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.unbind(g),e._refreshHandler&&(e.dataSource.unbind(m,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,n,i,o,r=this,s=e.filters,a=!1,l=0,c=r.filterModel;for(t=0,n=s.length;t<n;t++)o=s[t],o.field==r.field?(c.set("logic",e.logic),i=c.filters[l],i||(c.filters.push({field:r.field}),i=c.filters[l]),i.set("value",r._parse(o.value)),i.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})},_merge:function(e){var t,i,o,r=this,s=e.logic||"and",a=this._stripFilters(e.filters),l=r.dataSource.filter()||{filters:[],logic:"and"};for(n(l,r.field),i=0,o=a.length;i<o;i++)t=a[i],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 t=this,n=t.dataSource.filter()||{filters:[]};this.trigger("change",{filter:null,field:t.field})||(n.filters=e.grep(n.filters,function(e){return e.filters?(e.filters=o(e.filters,t.field),e.filters.length):e.field!=t.field}),n.filters.length||(n=null),t.dataSource.filter(n))},_submit:function(e){e.preventDefault(),e.stopPropagation(),this.filter(this.filterModel.toJSON()),this._closeForm()},_reset:function(){this.clear(),this.options.search&&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()},_keydown:function(e){e.keyCode==c.keys.ESC&&this.popup.close()},events:[f,"change"],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:v,neq:_,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"},number:{eq:v,neq:_,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:v,neq:_,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:v,neq:_,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"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"}}}),A=".kendoFilterMultiCheck",E=c.data.DataSource,M='<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>',R=k.extend({init:function(t,n){var i,o;k.fn.init.call(this,t,n),n=this.options,this.element=e(t),i=this.field=this.options.field||this.element.attr(c.attr("field")),o=n.checkSource,this._foreignKeyValues()?(this.checkSource=E.create(n.values),this.checkSource.fetch()):n.forceUnique?(o=n.dataSource.options,delete o.pageSize,this.checkSource=E.create(o),this.checkSource.reader.data=l(this.checkSource.reader.data,this.field)):this.checkSource=E.create(o),this.dataSource=n.dataSource,this.model=this.dataSource.reader.model,this._parse=function(e){return e+""},this.model&&this.model.fields&&(i=this.model.fields[this.field],i&&("number"==i.type?this._parse=parseFloat:i.parse&&(this._parse=u(i.parse,i)),this.type=i.type||"string")),n.appendToElement?this._init():this._createLink(),this._refreshHandler=u(this.refresh,this),this.dataSource.bind(m,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="#"><span class="k-icon k-i-filter"/></a>').find(".k-grid-filter")),this._link=t.attr("tabindex",-1).on("click"+g,u(this._click,this))},_init:function(){var e=this,t=this.options.forceUnique,n=this.options;this.pane=n.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(m,this.checkChangeHandler)),this.form.on("keydown"+A,u(this._keydown,this)).on("submit"+A,u(this._filter,this)).on("reset"+A,u(this._reset,this)),this.trigger(f,{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,n,i=this.options.ignoreCase,o=this.searchTextBox[0].value,r=this.container.find("label");for(i&&(o=o.toLowerCase()),e=0,this.options.checkAll&&r.length&&(r[0].parentNode.style.display=o?"none":"",e++);e<r.length;)t=r[e],n=t.textContent||t.innerText,i&&(n=n.toLowerCase()),t.parentNode.style.display=n.indexOf(o)>=0?"":"none",e++},_activate:function(){this.form.find(":kendoFocusable:first").focus()},_createForm:function(){var t,n,i=this.options,o="";this._isMobile||(i.search&&(o+="<div class='k-textbox k-space-right'><input placeholder='"+i.messages.search+"'/><span class='k-icon k-i-zoom' /></div>"),o+="<ul class='k-reset k-multicheck-wrap'></ul>",i.messages.selectedItemsFormat&&(o+="<div class='k-filter-selected-items'>"+c.format(i.messages.selectedItemsFormat,0)+"</div>"),o+="<button type='submit' class='k-button k-primary'>"+i.messages.filter+"</button>",o+="<button type='reset' class='k-button'>"+i.messages.clear+"</button>",this.form=e('<form class="k-filter-menu"/>').html(o),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(t=this,t.form=e("<div />").html(c.template(M)({field:t.field,title:i.title||t.field,ns:c.ns,messages:i.messages,search:i.search})),t.view=t.pane.append(t.form.html()),t.form=t.view.element.find("form"),n=this.view.element,this.container=n.find(".k-multicheck-wrap"),n.on("click",".k-submit",function(e){t.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){t._closeForm(),e.preventDefault()})):i.appendToElement?(this.popup=this.element.closest(".k-popup").data(h),this.element.append(this.form)):this.popup=this.form.kendoPopup({anchor:this._link,activate:u(this._activate,this)}).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,n=c.template(t.itemTemplate({field:"all",mobile:this._isMobile})),i=e(n({all:t.messages.checkAll}));this.container.prepend(i),this.checkBoxAll=i.find(":checkbox").eq(0).addClass("k-check-all"),this.checkAllHandler=u(this.checkAll,this),this.checkBoxAll.on(m+A,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,n=this.dataSource,i=this.getFilterArray();this._link&&this._link.toggleClass("k-state-active",0!==i.length),this.form&&(e&&t&&e.sender===n&&!n.options.serverPaging&&("itemchange"==e.action||"add"==e.action||"remove"==e.action||n.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(i),this.trigger(p))},getFilterArray:function(){var t,n=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return r(n,this.field),t=s(n)},createCheckBoxes:function(){var e,t,n,i=this.options,o={field:this.field,format:i.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(i.itemTemplate(o)),n=c.render(t,e),i.checkAll&&this.createCheckAllItem(),this.container.on(m+A,":checkbox",u(this.updateCheckAllState,this)),this.container.append(n)},checkAll:function(){var e=this.checkBoxAll.is(":checked");this.container.find(":checkbox").prop("checked",e)},checkValues:function(t){var n=this;e(e.grep(this.container.find(":checkbox").prop("checked",!1),function(i){var o,r,s=!1;if(!e(i).is(".k-check-all"))for(o=n._parse(e(i).val()),r=0;r<t.length;r++)if(s="date"==n.type?t[r].getTime()==o.getTime():t[r]==o)return s})).prop("checked",!0),this.updateCheckAllState()},_filter:function(t){var n,i;t.preventDefault(),t.stopPropagation(),n={logic:"or"},i=this,n.filters=e.map(this.form.find(":checkbox:checked:not(.k-check-all)"),function(t){return{value:e(t).val(),operator:"eq",field:i.field}}),n.filters.length&&this.trigger("change",{filter:n,field:i.field})||(n=this._merge(n),n.filters.length&&this.dataSource.filter(n),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;k.fn.destroy.call(e),e.form&&(c.unbind(e.form),c.destroy(e.form),e.form.unbind(A),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null,e.container&&(e.container.unbind(A),e.container=null),e.checkBoxAll&&e.checkBoxAll.unbind(A)),e.view&&(e.view.purge(),e.view=null),e._link&&e._link.unbind(g),e._refreshHandler&&(e.dataSource.unbind(m,e._refreshHandler),e.dataSource=null),e.checkChangeHandler&&e.checkSource.unbind(m,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 n=e.field,i=e.format,o=e.valueField,r=e.mobile,s="";return o===t&&(o=n),"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('"+(i?i:"{0}")+"', "+n+")#</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:[f,p,"change"]});e.extend(R.fn,{_click:D.fn._click,_keydown:D.fn._keydown,_reset:D.fn._reset,_closeForm:D.fn._closeForm,clear:D.fn.clear,_merge:D.fn._merge}),d.plugin(D),d.plugin(R)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.menu.min",["kendo.popup.min"],e)}(function(){return function(e,t){function n(e,t){return e=e.split(" ")[!t+0]||e,e.replace("top","up").replace("bottom","down")}function i(e,t,n){e=e.split(" ")[!t+0]||e;var i={origin:["bottom",n?"right":"left"],position:["top",n?"right":"left"]},o=/left|right/.test(e);return o?(i.origin=["top",e],i.position[1]=f.directions[e].reverse):(i.origin[0]=e,i.position[0]=f.directions[e].reverse),i.origin=i.origin.join(" "),i.position=i.position.join(" "),i}function o(t,n){try{return e.contains(t,n)}catch(i){return!1}}function r(t){t=e(t),t.addClass("k-item").children(D).addClass(P),t.children("a").addClass(M).children(D).addClass(P),t.filter(":not([disabled])").addClass(K),t.filter(".k-separator").empty().append("&nbsp;"),t.filter("li[disabled]").addClass(Z).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+M).length||t.contents().filter(function(){return!(this.nodeName.match(S)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll("<span class='"+M+"'/>"),s(t),l(t)}function s(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow]: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),n=a(t);t.append("<span class='k-icon "+n+"'/>")})}function a(e){var t,n=e.parent().parent(),i=f.support.isRtl(n);return t=n.hasClass(E+"-horizontal")?" k-i-arrow-60-down":i?" k-i-arrow-60-left":" k-i-arrow-60-right"}function l(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(z),t.filter(".k-last:not(:last-child)").removeClass(R),t.filter(":first-child").addClass(z),t.filter(":last-child").addClass(R)}function c(t,n){var i=u(n);i&&d(t,i),n.items&&e(t).children("ul").children("li").each(function(e){c(this,n.items[e])})}function d(t,n){e(t).children(".k-link").data({selectHandler:n})}function u(e){var t=e.select,n=f.isFunction;return t&&n(t)?t:null}var h,f=window.kendo,p=f.ui,m=f._activeElement,g=f.support.touch&&f.support.mobileOS,v="mousedown",_="click",b=e.extend,w=e.proxy,y=e.each,k=f.template,x=f.keys,C=p.Widget,S=/^(ul|a|div)$/i,T=".kendoMenu",D="img",A="open",E="k-menu",M="k-link",R="k-last",I="close",F="timer",z="k-first",P="k-image",B="select",L="zIndex",H="activate",N="deactivate",O="touchstart"+T+" MSPointerDown"+T+" pointerdown"+T,V=f.support.pointers,U=f.support.msPointers,W=U||V,j=V?"pointerover":U?"MSPointerOver":"mouseenter",q=V?"pointerout":U?"MSPointerOut":"mouseleave",G=g||W,$=e(document.documentElement),Y="kendoPopup",K="k-state-default",Q="k-state-hover",X="k-state-focused",Z="k-state-disabled",J="k-state-selected",ee=".k-menu",te=".k-menu-group",ne=te+",.k-animation-container",ie=":not(.k-list) > .k-item",oe=".k-item.k-state-disabled",re=".k-item:not(.k-state-disabled)",se=".k-item:not(.k-state-disabled) > .k-link",ae=":not(.k-item.k-separator)",le=ae+":eq(0)",ce=ae+":last",de="div:not(.k-animation-container,.k-list-container)",ue={2:1,touch:1},he={content:k("<div #= contentCssAttributes(item) # tabindex='-1'>#= content(item) #</div>"),group:k("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:k("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(data) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),item:k("<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>"),image:k("<img #= imageCssAttributes(item) # alt='' src='#= item.imageUrl #' />"),arrow:k("<span class='#= arrowClass(item, group) #'></span>"),sprite:k("<span class='k-sprite #= spriteCssClass #'></span>"),empty:k("")},fe={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(n+=" "+t.attr["class"]),t.selected&&(n+=" "+J),n},itemCssAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},imageCssAttributes:function(e){var t,n="",i=e.imageAttr||{};i["class"]?i["class"]+=" "+P:i["class"]=P;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},contentCssAttributes:function(e){var t,n="",i=e.contentAttr||{},o="k-content k-group k-menu-group";i["class"]?i["class"]+=" "+o:i["class"]=o;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},textClass:function(){return M},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},text:function(e){return e.encoded===!1?e.text:f.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;"}},pe=C.extend({init:function(t,n){var i=this;C.fn.init.call(i,t,n),t=i.wrapper=i.element,n=i.options,i._initData(n),i._updateClasses(),i._animations(n),i.nextItemZIndex=100,i._tabindex(),i._focusProxy=w(i._focusHandler,i),t.on(O,re,i._focusProxy).on(_+T,oe,!1).on(_+T,re,w(i._click,i)).on("keydown"+T,w(i._keydown,i)).on("focus"+T,w(i._focus,i)).on("focus"+T,".k-content",w(i._focus,i)).on(O+" "+v+T,".k-content",w(i._preventClose,i)).on("blur"+T,w(i._removeHoverItem,i)).on("blur"+T,"[tabindex]",w(i._checkActiveElement,i)).on(j+T,re,w(i._mouseenter,i)).on(q+T,re,w(i._mouseleave,i)).on(j+T+" "+q+T+" "+v+T+" "+_+T,se,w(i._toggleHover,i)),n.openOnClick&&(i.clicked=!1,i._documentClickHandler=w(i._documentClick,i),e(document).click(i._documentClickHandler)),t.attr("role","menubar"),t[0].id&&(i._ariaId=f.format("{0}_mn_active",t[0].id)),f.notify(i)},events:[A,I,H,N,B],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,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()}}))},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=b(!0,t,e.animation),"dataSource"in e&&this._initData(e),this._updateClasses(),C.fn.setOptions.call(this,e)},destroy:function(){var t=this;C.fn.destroy.call(t),t.element.off(T),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler),f.destroy(t.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 n=this._insert(e,t,t.length?t.find("> .k-menu-group, > .k-animation-container > .k-menu-group"):null);return y(n.items,function(t){n.group.append(this),s(this),c(this,e[t]||e)}),s(t),l(n.group.find(".k-first, .k-last").add(n.items)),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return y(n.items,function(n){t.before(this),s(this),l(this),c(this,e[n]||e)}),l(t),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return y(n.items,function(n){t.after(this),s(this),l(this),c(this,e[n]||e)}),l(t),this},_insert:function(t,n,i){var o,s,a,l,c=this;return n&&n.length||(i=c.element),a=e.isPlainObject(t),l={firstLevel:i.hasClass(E),horizontal:i.hasClass(E+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(pe.renderGroup({group:l})).appendTo(n)),a||e.isArray(t)?o=e(e.map(a?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(pe.renderItem({group:l,item:b(t,{index:n})})).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:i}},remove:function(e){var t,n,i,o;return e=this.element.find(e),t=this,n=e.parentsUntil(t.element,ie),i=e.parent("ul:not(.k-menu)"),e.remove(),i&&!i.children(ie).length&&(o=i.parent(".k-animation-container"),o.length?o.remove():i.remove()),n.length&&(n=n.eq(0),s(n),l(n)),t},open:function(o){var r=this,s=r.options,a="horizontal"==s.orientation,l=s.direction,c=f.support.isRtl(r.wrapper);
return o=r.element.find(o),/^(top|bottom|default)$/.test(l)&&(l=c?a?(l+" left").replace("default","bottom"):"left":a?(l+" right").replace("default","bottom"):"right"),o.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function(){var t=e(this).data("kendoPopup");t&&t.close(!0)}),o.each(function(){var o=e(this);clearTimeout(o.data(F)),o.data(F,setTimeout(function(){var d,u,h,p,m,v,_,w,y=o.find(".k-menu-group:first:hidden");y[0]&&r._triggerEvent({item:o[0],type:A})===!1&&(!y.find(".k-menu-group")[0]&&y.children(".k-item").length>1?(u=e(window).height(),h=function(){y.css({maxHeight:u-(f._outerHeight(y)-y.height())-f.getShadows(y).bottom,overflow:"auto"})},f.support.browser.msie&&f.support.browser.version<=7?setTimeout(h,0):h()):y.css({maxHeight:"",overflow:""}),o.data(L,o.css(L)),o.css(L,r.nextItemZIndex++),d=y.data(Y),p=o.parent().hasClass(E),m=p&&a,v=i(l,p,c),_=s.animation.open.effects,w=_!==t?_:"slideIn:"+n(l,p),d?(d=y.data(Y),d.options.origin=v.origin,d.options.position=v.position,d.options.animation.open.effects=w):d=y.kendoPopup({activate:function(){r._triggerEvent({item:this.wrapper.parent(),type:H})},deactivate:function(e){e.sender.element.removeData("targetTransform").css({opacity:""}),r._triggerEvent({item:this.wrapper.parent(),type:N})},origin:v.origin,position:v.position,collision:s.popupCollision!==t?s.popupCollision:m?"fit":"fit flip",anchor:o,appendTo:o,animation:{open:b(!0,{effects:w},s.animation.open),close:s.animation.close},close:function(e){var t=e.sender.wrapper.parent();r._triggerEvent({item:t[0],type:I})?e.preventDefault():(t.css(L,t.data(L)),t.removeData(L),g&&(t.removeClass(Q),r._removeHoverItem()))}}).data(Y),y.removeAttr("aria-hidden"),d.open())},r.options.hoverDelay))}),r},close:function(t,n){var i=this,o=i.element;return t=o.find(t),t.length||(t=o.find(">.k-item")),t.each(function(){var t=e(this);!n&&i._isRootItem(t)&&(i.clicked=!1),clearTimeout(t.data(F)),t.data(F,setTimeout(function(){var e=t.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(Y);e&&(e.close(),e.element.attr("aria-hidden",!0))},i.options.hoverDelay))}),i},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(K,n).toggleClass(Z,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(f.eventTarget(t)||t.target).closest(ie),i=t.type==j||v.indexOf(t.type)!==-1;n.parents("li."+Z).length||n.toggleClass(Q,i||"mousedown"==t.type||"click"==t.type),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var n=this,i=e(t?t.currentTarget:this._hoverItem()),r=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(o(r,f._activeElement())||!t||o(r,t.currentTarget))||n.close(r)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(X)&&(e.removeClass(X),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element,n=".k-menu-init div ul";t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-header k-menu-init "+E).addClass(E+"-"+this.options.orientation),t.find("li > ul").filter(function(){return!f.support.matchesSelector.call(this,n)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).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 n=this,i=e(t.currentTarget),r=i.children(".k-animation-container").length||i.children(te).length;t.delegateTarget==i.parents(ee)[0]&&(n.options.openOnClick&&!n.clicked||g||(V||U)&&t.originalEvent.pointerType in ue&&n._isRootItem(i.closest(ie))||!o(t.currentTarget,t.relatedTarget)&&r&&n.open(i),(n.options.openOnClick&&n.clicked||G)&&i.siblings().each(w(function(e,t){n.close(t,!0)},n)))},_mouseleave:function(n){var i=this,r=e(n.currentTarget),s=r.children(".k-animation-container").length||r.children(te).length;return r.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):(i.options.openOnClick||g||(V||U)&&n.originalEvent.pointerType in ue||o(n.currentTarget,n.relatedTarget||n.target)||!s||o(n.currentTarget,f._activeElement())||i.close(r),t)},_click:function(n){for(var i,o,r,s=this,a=s.options,l=e(f.eventTarget(n)),c=l[0],d=l[0]?l[0].nodeName.toUpperCase():"",u="INPUT"==d||"SELECT"==d||"BUTTON"==d||"LABEL"==d,h=l.closest("."+M),p=l.closest(ie),m=p[0],g=h.attr("href"),v=l.attr("href"),_=e("<a href='#' />").attr("href"),b=!!g&&g!==_,w=b&&!!g.match(/^#/),y=!!v&&v!==_,k=a.openOnClick&&r&&s._isRootItem(p);c&&c.parentNode!=m;)c=c.parentNode;if(!e(c).is(de)){if(p.hasClass(Z))return n.preventDefault(),t;if(n.handled||!s._triggerSelect(l,m)||u||n.preventDefault(),n.handled=!0,o=p.children(ne),r=o.is(":visible"),a.closeOnClick&&(!b||w)&&(!o.length||k))return p.removeClass(Q).css("height"),s._oldHoverItem=s._findRootParent(p),s.close(h.parentsUntil(s.element,ie)),s.clicked=!1,"MSPointerUp".indexOf(n.type)!=-1&&n.preventDefault(),t;b&&n.enterKey&&h[0].click(),(s._isRootItem(p)&&a.openOnClick||f.support.touch||(V||U)&&s._isRootItem(p.closest(ie)))&&(b||u||y||n.preventDefault(),s.clicked=!0,i=o.is(":visible")?I:A,(a.closeOnClick||i!=I)&&s[i](p))}},_triggerSelect:function(e,t){var n,i,o,r=e.data("selectHandler");return r&&(n=this._getEventData(e),r.call(this,n)),i=n&&n.isDefaultPrevented(),o=this._triggerEvent({item:t,type:B}),i||o},_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){o(this.element[0],e.target)||(this.clicked=!1)},_focus:function(n){var i=this,o=n.target,r=i._hoverItem(),s=m();return o==i.wrapper[0]||e(o).is(":kendoFocusable")?(s===n.currentTarget&&(r.length?i._moveHover([],r):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(o).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(X),i.wrapper.focus(),t)},_keydown:function(e){var n,i,o,r=this,s=e.keyCode,a=r._oldHoverItem,l=f.support.isRtl(r.wrapper);if(e.target==e.currentTarget||s==x.ESC){if(a||(a=r._oldHoverItem=r._hoverItem()),i=r._itemBelongsToVertival(a),o=r._itemHasChildren(a),s==x.RIGHT)n=r[l?"_itemLeft":"_itemRight"](a,i,o);else if(s==x.LEFT)n=r[l?"_itemRight":"_itemLeft"](a,i,o);else if(s==x.DOWN)n=r._itemDown(a,i,o);else if(s==x.UP)n=r._itemUp(a,i,o);else if(s==x.ESC)n=r._itemEsc(a,i);else if(s==x.ENTER||s==x.SPACEBAR)n=a.children(".k-link"),n.length>0&&(r._click({target:n[0],preventDefault:function(){},enterKey:!0}),r._moveHover(a,r._findRootParent(a)));else if(s==x.TAB)return n=r._findRootParent(a),r._moveHover(a,n),r._checkActiveElement(),t;n&&n[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.length&&e.children("ul.k-menu-group, div.k-animation-container").length>0},_moveHover:function(t,n){var i=this,o=i._ariaId;t.length&&n.length&&t.removeClass(X),n.length&&(n[0].id&&(o=n[0].id),n.addClass(X),i._oldHoverItem=n,o&&(i.element.removeAttr("aria-activedescendant"),e("#"+o).removeAttr("id"),n.attr("id",o),i.element.attr("aria-activedescendant",o)))},_findRootParent:function(e){return this._isRootItem(e)?e:e.parentsUntil(ee,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(E)},_itemRight:function(e,t,n){var i,o,r=this;if(!e.hasClass(Z))return t?n?(r.open(e),i=e.find(".k-menu-group").children().first()):"horizontal"==r.options.orientation&&(o=r._findRootParent(e),r.close(o),i=o.nextAll(le)):(i=e.nextAll(le),i.length||(i=e.prevAll(ce))),i&&!i.length?i=r.wrapper.children(".k-item").first():i||(i=[]),r._moveHover(e,i),i},_itemLeft:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._isRootItem(n)&&"horizontal"==i.options.orientation&&(n=n.prevAll(le))):(n=e.prevAll(le),n.length||(n=e.nextAll(ce))),n.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemDown:function(e,t,n){var i,o=this;if(t)i=e.nextAll(le);else{if(!n||e.hasClass(Z))return;o.open(e),i=e.find(".k-menu-group").children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=o.wrapper.children(".k-item").first()),o._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(le),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e},_triggerEvent:function(e){var t=this;return t.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var n=this,i=e(f.eventTarget(t)).closest(ie);i.hasClass(Z)||setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(X)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});b(pe,{renderItem:function(e){e=b({menu:{},group:{}},e);var t=he.empty,n=e.item;return he.item(b(e,{image:n.imageUrl?he.image:t,sprite:n.spriteCssClass?he.sprite:t,itemWrapper:he.itemWrapper,renderContent:pe.renderContent,arrow:n.items||n.content?he.arrow:t,subGroup:pe.renderGroup},fe))},renderGroup:function(e){return he.group(b({renderItems:function(e){for(var t="",n=0,i=e.items,o=i?i.length:0,r=b({length:o},e.group);n<o;n++)t+=pe.renderItem(b(e,{group:r,item:b({index:n},i[n])}));return t}},e,fe))},renderContent:function(e){return he.content(b(e,fe))}}),h=pe.extend({init:function(t,n){var i=this;pe.fn.init.call(i,t,n),i._marker=f.guid().substring(0,8),i.target=e(i.options.target),i._popup(),i._wire()},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,target:"body"},events:[A,I,H,N,B],setOptions:function(t){var n=this;pe.fn.setOptions.call(n,t),n.target.off(n.showOn+T+n._marker,n._showProxy),n.userEvents&&n.userEvents.destroy(),n.target=e(n.options.target),t.orientation&&n.popup.wrapper[0]&&n.popup.element.unwrap(),n._wire(),pe.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+T+e._marker),$.off(f.support.mousedown+T+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),pe.fn.destroy.call(e)},open:function(n,i){var r=this;return n=e(n)[0],o(r.element[0],e(n)[0])?pe.fn.open.call(r,n):r._triggerEvent({item:r.element,type:A})===!1&&(r.popup.visible()&&r.options.filter&&(r.popup.close(!0),r.popup.element.kendoStop(!0)),i!==t?(r.popup.wrapper.hide(),r.popup.open(n,i)):(r.popup.options.anchor=(n?n:r.popup.anchor)||r.target,r.popup.element.kendoStop(!0),r.popup.open()),$.off(r.popup.downEvent,r.popup._mousedownProxy),$.on(f.support.mousedown+T+r._marker,r._closeProxy)),r},close:function(){var t=this;o(t.element[0],e(arguments[0])[0])?pe.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:I})===!1&&(t.popup.close(),$.off(f.support.mousedown+T,t._closeProxy),t.unbind(B,t._closeTimeoutProxy))},_showHandler:function(e){var t,n=e,i=this,r=i.options;e.event&&(n=e.event,n.pageX=e.x.location,n.pageY=e.y.location),o(i.element[0],e.relatedTarget||e.target)||(i._eventOrigin=n,n.preventDefault(),n.stopImmediatePropagation(),i.element.find("."+X).removeClass(X),(r.filter&&f.support.matchesSelector.call(n.currentTarget,r.filter)||!r.filter)&&(r.alignToAnchor?(i.popup.options.anchor=n.currentTarget,i.open(n.currentTarget)):(i.popup.options.anchor=n.currentTarget,i._targetChild?(t=i.target.offset(),i.open(n.pageX-t.left,n.pageY-t.top)):i.open(n.pageX,n.pageY))))},_closeHandler:function(t){var n,i=this,r=e(t.relatedTarget||t.target),s=r.closest(i.target.selector)[0]==i.target[0],a=r.closest(re).children(ne),l=o(i.element[0],r[0]);i._eventOrigin=t,n=3!==t.which,i.popup.visible()&&(n&&s||!s)&&(i.options.closeOnClick&&!a[0]&&l||!l)&&(l?(this.unbind(B,this._closeTimeoutProxy),i.bind(B,i._closeTimeoutProxy)):i.close())},_wire:function(){var e=this,t=e.options,n=e.target;e._showProxy=w(e._showHandler,e),e._closeProxy=w(e._closeHandler,e),e._closeTimeoutProxy=w(e.close,e),n[0]&&(f.support.mobileOS&&"contextmenu"==t.showOn?(e.userEvents=new f.UserEvents(n,{filter:t.filter,allowSelection:!1}),n.on(t.showOn+T+e._marker,!1),e.userEvents.bind("hold",e._showProxy)):t.filter?n.on(t.showOn+T+e._marker,t.filter,e._showProxy):n.on(t.showOn+T+e._marker,e._showProxy))},_triggerEvent:function(n){var i=this,o=e(i.popup.options.anchor)[0],r=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,b({type:n.type,item:n.item||this.element[0],target:o},r?{event:r}:{}))},_popup:function(){var e=this;e._triggerProxy=w(e._triggerEvent,e),e.popup=e.element.addClass("k-context-menu").kendoPopup({anchor:e.target||"body",copyAnchorStyles:e.options.copyAnchorStyles,collision:e.options.popupCollision||"fit",animation:e.options.animation,activate:e._triggerProxy,deactivate:e._triggerProxy,appendTo:e.options.appendTo}).data("kendoPopup"),e._targetChild=o(e.target[0],e.popup.element[0])}}),p.plugin(pe),p.plugin(h)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.columnmenu.min",["kendo.popup.min","kendo.filtermenu.min","kendo.menu.min"],e)}(function(){return function(e,t){function n(t){return e.trim(t).replace(/&nbsp;/gi,"")}function i(e,t){var n,i,o,r={};for(n=0,i=e.length;n<i;n++)o=e[n],r[o[t]]=o;return r}function o(e){var t,n=[];for(t=0;t<e.length;t++)e[t].columns?n=n.concat(o(e[t].columns)):n.push(e[t]);return n}var r=window.kendo,s=r.ui,a=e.proxy,l=e.extend,c=e.grep,d=e.map,u=e.inArray,h="k-state-selected",f="asc",p="desc",m="change",g="init",v="select",_="kendoPopup",b="kendoFilterMenu",w="kendoMenu",y=".kendoColumnMenu",k=s.Widget,x=k.extend({init:function(t,n){var i,o=this;k.fn.init.call(o,t,n),t=o.element,n=o.options,o.owner=n.owner,o.dataSource=n.dataSource,o.field=t.attr(r.attr("field")),o.title=t.attr(r.attr("title")),i=t.find(".k-header-column-menu"),i[0]||(i=t.addClass("k-with-icon").prepend('<a class="k-header-column-menu" href="#" title="'+n.messages.settings+'"><span class="k-icon k-i-more-vertical"></span></a>').find(".k-header-column-menu")),o.link=i.attr("tabindex",-1).on("click"+y,a(o._click,o)),o.wrapper=e('<div class="k-column-menu"/>'),o._refreshHandler=a(o.refresh,o),o.dataSource.bind(m,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(g,{field:e.field,container:e.wrapper})},events:[g,"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(r.template(C)({uid:r.guid(),ns:r.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns})),e.popup=e.wrapper[_]({anchor:e.link,open:a(e._open,e),activate:a(e._activate,e),close:function(){e.options.closeCallback&&e.options.closeCallback(e.element)}}).data(_),e.menu=e.wrapper.children()[w]({orientation:"vertical",closeOnClick:!1}).data(w)},_createMobileMenu:function(){var e=this,t=e.options,n=r.template(S)({ns:r.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(n),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new T(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 n=this;n.angular(t,function(){var t=n.wrapper.find(".k-columns-item input["+r.attr("field")+"]").map(function(){return e(this).closest("li")}),i=d(n._ownerColumns(),function(e){return{column:e._originalObject}});return{elements:t,data:i}})},destroy:function(){var e=this;e._angularItems("cleanup"),k.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(m,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(y),e.menu.destroy()),e.wrapper.off(y),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(y),e.owner=null,e.wrapper=null,e.element=null},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+y))},_click:function(e){e.preventDefault(),e.stopPropagation();var t=this.options;t.filter&&this.element.is(!t.filter)||(this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_open:function(){var t=this;e(".k-column-menu").not(t.wrapper).each(function(){e(this).data(_).close()}),t.popup.element.on("keydown"+y,function(e){e.keyCode==r.keys.ESC&&t.close()}),t.options.lockedColumns&&t._updateLockedColumns()},_activate:function(){this.menu.element.focus()},_ownerColumns:function(){var e=o(this.owner.columns),t=c(e,function(e){var t=!0,i=n(e.title||"");return e.menu!==!1&&(e.field||i.length)||(t=!1),t});return d(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,index:u(t,e),locked:!!t.locked,_originalObject:t}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t.menu.bind(v,function(n){var i,o=e(n.item);o.hasClass("k-sort-asc")?i=f:o.hasClass("k-sort-desc")&&(i=p),i&&(o.parent().find(".k-sort-"+(i==f?p:f)).removeClass(h),t._sortDataSource(o,i),t.close())}))},_sortDataSource:function(e,n){var i,o,r=this,s=r.options.sortable,a=null===s.compare?t:s.compare,l=r.dataSource,c=l.sort()||[],d=e.hasClass(h)&&s&&s.allowUnsort!==!1;if(n=d?t:n,!r.trigger("sort",{sort:{field:r.field,dir:n,compare:a}})){if(d?e.removeClass(h):e.addClass(h),"multiple"===s.mode){for(i=0,o=c.length;i<o;i++)if(c[i].field===r.field){c.splice(i,1);break}c.push({field:r.field,dir:n,compare:a})}else c=[{field:r.field,dir:n,compare:a}];l.sort(c)}},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=a(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t._updateColumnsLockedStateHandler=a(t._updateColumnsLockedState,t),t.owner.bind(["columnUnlock","columnLock"],t._updateColumnsLockedStateHandler),t.menu.bind(v,function(n){var i,s,a,l=e(n.item),d=o(t.owner.columns);t._isMobile&&n.preventDefault(),l.parent().closest("li.k-columns-item")[0]&&(i=l.find(":checkbox"),i.attr("disabled")||(a=i.attr(r.attr("field")),s=c(d,function(e){return e.field==a||e.title==a})[0],s.hidden===!0?t.owner.showColumn(s):t.owner.hideColumn(s)))}))},_updateColumnsMenu:function(){var e,t,n,i,o,s,a=r.attr("field"),l=r.attr("locked"),h=c(this._ownerColumns(),function(e){return!e.hidden}),f=c(h,function(e){return e.originalField}),p=c(f,function(e){return e.locked===!0}).length,m=c(f,function(e){return e.locked!==!0}).length;for(h=d(h,function(e){return e.field}),this.wrapper.find("[role='menuitemcheckbox']").attr("aria-checked",!1),s=this.wrapper.find(".k-columns-item input["+a+"]").prop("disabled",!1).prop("checked",!1),e=0,t=s.length;e<t;e++)n=s.eq(e),o="true"===n.attr(l),i=!1,u(n.attr(a),h)>-1&&(i=!0,n.prop("checked",i)),n.closest("[role='menuitemcheckbox']").attr("aria-checked",i),i&&(1==p&&o&&n.prop("disabled",!0),1!=m||o||n.prop("disabled",!0))},_updateColumnsLockedState:function(){var e,t,n,o,s=r.attr("field"),a=r.attr("locked"),l=i(this._ownerColumns(),"field"),c=this.wrapper.find(".k-columns-item input[type=checkbox]");for(e=0,t=c.length;e<t;e++)n=c.eq(e),o=l[n.attr(s)],o&&n.attr(a,o.locked);this._updateColumnsMenu()},_filter:function(){var t=this,n=b,i=t.options;i.filterable!==!1&&(i.filterable.multi&&(n="kendoFilterMultiCheck",i.filterable.dataSource&&(i.filterable.checkSource=i.filterable.dataSource,delete i.filterable.dataSource)),t.filterMenu=t.wrapper.find(".k-filterable")[n](l(!0,{},{appendToElement:!0,dataSource:i.dataSource,values:i.values,field:t.field,title:t.title,change:function(e){t.trigger("filtering",{filter:e.filter,field:e.field})&&e.preventDefault()}},i.filterable)).data(n),t._isMobile&&t.menu.bind(v,function(n){var i=e(n.item);i.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},_lockColumns:function(){var t=this;t.menu.bind(v,function(n){var i=e(n.item);i.hasClass("k-lock")?(t.owner.lockColumn(t.field),t.close()):i.hasClass("k-unlock")&&(t.owner.unlockColumn(t.field),t.close())})},_updateLockedColumns:function(){var e,t,n,i,o=this.field,r=this.owner.columns,s=c(r,function(e){return e.field==o||e.title==o})[0];s&&(e=s.locked===!0,t=c(r,function(t){return!t.hidden&&(t.locked&&e||!t.locked&&!e)}).length,n=this.wrapper.find(".k-lock").removeClass("k-state-disabled"),i=this.wrapper.find(".k-unlock").removeClass("k-state-disabled"),(e||1==t)&&n.addClass("k-state-disabled"),e&&1!=t||i.addClass("k-state-disabled"),this._updateColumnsLockedState())},refresh:function(){var e,t,n,i=this,o=i.options.dataSource.sort()||[],r=i.field;for(i.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(h),t=0,n=o.length;t<n;t++)e=o[t],r==e.field&&i.wrapper.find(".k-sort-"+e.dir).addClass(h);i.link[i._filterExist(i.dataSource.filter())?"addClass":"removeClass"]("k-state-active")},_filterExist:function(e){var t,n,i,o=!1;if(e){for(e=e.filters,n=0,i=e.length;n<i;n++)t=e[n],t.field==this.field?o=!0:t.filters&&(o=o||this._filterExist(t));return o}}}),C='<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"><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>',S='<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>',T=k.extend({init:function(e,t){k.fn.init.call(this,e,t),this.element.on("click"+y,"li.k-item:not(.k-separator):not(.k-state-disabled)","_click")},events:[v],_click:function(t){e(t.target).is("[type=checkbox]")||t.preventDefault(),this.trigger(v,{item:t.currentTarget})},close:function(){this.options.pane.navigate("")},destroy:function(){k.fn.destroy.call(this),this.element.off(y)}});s.plugin(x)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.columnsorter.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.Widget,r="dir",s="asc",a="single",l="field",c="desc",d=".kendoColumnSorter",u=".k-link",h="aria-sort",f=e.proxy,p=o.extend({init:function(e,t){var n,i=this;o.fn.init.call(i,e,t),i._refreshHandler=f(i.refresh,i),i.dataSource=i.options.dataSource.bind("change",i._refreshHandler),i.directions=i.options.initialDirection===s?[s,c]:[c,s],n=i.element.find(u),n[0]||(n=i.element.wrapInner('<a class="k-link" href="#"/>').find(u)),i.link=n,i.element.on("click"+d,f(i._click,i))},options:{name:"ColumnSorter",mode:a,allowUnsort:!0,compare:null,filter:"",initialDirection:s},events:["change"],destroy:function(){var e=this;o.fn.destroy.call(e),e.element.off(d),e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=e.element=e.link=e.dataSource=null},refresh:function(){var t,i,o,a,d=this,u=d.dataSource.sort()||[],f=d.element,p=f.attr(n.attr(l));for(f.removeAttr(n.attr(r)),f.removeAttr(h),t=0,i=u.length;t<i;t++)o=u[t],p==o.field&&f.attr(n.attr(r),o.dir);a=f.attr(n.attr(r)),f.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm").remove(),a===s?(e('<span class="k-icon k-i-sort-asc-sm" />').appendTo(d.link),f.attr(h,"ascending")):a===c&&(e('<span class="k-icon k-i-sort-desc-sm" />').appendTo(d.link),f.attr(h,"descending"))},_toggleSortDirection:function(e){var n=this.directions;return e===n[n.length-1]&&this.options.allowUnsort?t:n[0]===e?n[1]:n[0]},_click:function(e){var i,o,s=this,c=s.element,d=c.attr(n.attr(l)),u=c.attr(n.attr(r)),h=s.options,f=null===s.options.compare?t:s.options.compare,p=s.dataSource.sort()||[];if(e.preventDefault(),(!h.filter||c.is(h.filter))&&(u=this._toggleSortDirection(u),!this.trigger("change",{sort:{field:d,dir:u,compare:f}}))){if(h.mode===a)p=[{field:d,dir:u,compare:f}];else if("multiple"===h.mode){for(i=0,o=p.length;i<o;i++)if(p[i].field===d){p.splice(i,1);break}p.push({field:d,dir:u,compare:f})}this.dataSource.sort(p)}}});i.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function i(t){t.find(":input:not(:button, ["+a.attr("role")+"=upload], ["+a.attr("skip")+"], [type=file]), select").each(function(){var t=a.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",o=this.name;n.indexOf(i)===-1&&o&&(n+=(n.length?",":"")+i+o,e(this).attr(t,n))})}function o(e){var t,i,o=(e.model.fields||e.model)[e.field],r=n(o),s=o?o.validation:{},l=a.attr("type"),c=a.attr("bind"),d={name:e.field};for(t in s)i=s[t],p(t,_)>=0?d[l]=t:h(i)||(d[t]=f(i)?i.value||t:i),d[a.attr(t+"-msg")]=i.message;return p(r,_)>=0&&(d[l]=r),d[c]=("boolean"===r?"checked:":"value:")+e.field,d}function r(e){var t,n,i,o,r,s;if(e&&e.length)for(s=[],t=0,n=e.length;t<n;t++)i=e[t],r=i.text||i.value||i,o=null==i.value?i.text||i:i.value,s[t]={text:r,value:o};return s}function s(e,t){var n,i,o=e?e.validation||{}:{};for(n in o)i=o[n],f(i)&&i.value&&(i=i.value),h(i)&&(t[n]=i)}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,f=e.isPlainObject,p=e.inArray,m=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,g='<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>',v="change",_=["url","email","number","date","boolean"],b={number:function(t,n){var i=o(n);e('<input type="text"/>').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},date:function(t,n){var i=o(n),r=n.format;r&&(r=a._extractFormat(r)),i[a.attr("format")]=r,e('<input type="text"/>').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},string:function(t,n){var i=o(n);e('<input type="text" class="k-input k-textbox"/>').attr(i).appendTo(t)},"boolean":function(t,n){var i=o(n);e('<input type="checkbox" />').attr(i).appendTo(t)},values:function(t,n){var i=o(n),s=a.stringify(r(n.values));e("<select "+a.attr("text-field")+'="text"'+a.attr("value-field")+'="value"'+a.attr("source")+"='"+(s?s.replace(/\'/g,"&apos;"):s)+"'"+a.attr("role")+'="dropdownlist"/>').attr(i).appendTo(t),e("<span "+a.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)}},w=c.extend({init:function(t,n){var i=this;n.target&&(n.$angular=n.target.options.$angular),c.fn.init.call(i,t,n),i._validateProxy=e.proxy(i._validate,i),i.refresh()},events:[v],options:{name:"Editable",editors:b,clearContainer:!0,errorTemplate:g},editor:function(e,t){var i=this,o=i.options.editors,r=f(e),s=r?e.field:e,l=i.options.model||{},c=r&&e.values,u=c?"values":n(t),h=r&&e.editor,p=h?e.editor:o[u],g=i.element.find("["+a.attr("container-for")+"="+s.replace(m,"\\$1")+"]");p=p?p:o.string,h&&"string"==typeof e.editor&&(p=function(t){t.append(e.editor)}),g=g.length?g:i.element,p(g,d(!0,{},r?e:{field:s},{model:l}))},_validate:function(t){var n,i=this,o=t.value,r=i._validationEventInProgress,s={},l=a.attr("bind"),c=t.field.replace(m,"\\$1"),d=RegExp("(value|checked)\\s*:\\s*"+c+"\\s*(,|$)");s[t.field]=t.value,n=e(":input["+l+'*="'+c+'"]',i.element).filter("["+a.attr("validate")+"!='false']").filter(function(){return d.test(e(this).attr(l))}),n.length>1&&(n=n.filter(function(){var t=e(this);return!t.is(":radio")||t.val()==o}));try{i._validationEventInProgress=!0,(!i.validatable.validateInput(n)||!r&&i.trigger(v,{values:s}))&&t.preventDefault()}finally{i._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var e=this;e.angular("cleanup",function(){
return{elements:e.element}}),c.fn.destroy.call(e),e.options.model.unbind("set",e._validateProxy),a.unbind(e.element),e.validatable&&e.validatable.destroy(),a.destroy(e.element),e.element.removeData("kendoValidator"),e.element.is("["+a.attr("role")+"=editable]")&&e.element.removeAttr(a.attr("role"))},refresh:function(){var n,o,r,l,c,d,h,p,m=this,g=m.options.fields||[],v=m.options.clearContainer?m.element.empty():m.element,_=m.options.model||{},b={};for(e.isArray(g)||(g=[g]),n=0,o=g.length;n<o;n++)r=g[n],l=f(r),c=l?r.field:r,d=(_.fields||_)[c],s(d,b),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],b)}i(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.validatable=new a.ui.Validator(v,{validateOnBlur:!1,errorTemplate:m.options.errorTemplate||t,rules:b}),p=v.find(":kendoFocusable").eq(0).focus(),u&&p.focus()}});l.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.window.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return t!==e}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),parseInt(t,10))}function o(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function r(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new c(e.wrapper,{filter:">"+C,group:e.wrapper.id+"-resizing",dragstart:p(t.dragstart,t),drag:p(t.drag,t),dragend:p(t.dragend,t)}),t._draggable.userEvents.bind("press",p(t.addOverlay,t)),t._draggable.userEvents.bind("release",p(t.removeOverlay,t))}function s(e,t){var n=this;n.owner=e,n._preventDragging=!1,n._draggable=new c(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:p(n.dragstart,n),drag:p(n.drag,n),dragend:p(n.dragend,n),dragcancel:p(n.dragcancel,n)}),n._draggable.userEvents.stopPropagation=!1}var a=window.kendo,l=a.ui.Widget,c=a.ui.Draggable,d=e.isPlainObject,u=a._activeElement,h=a._outerWidth,f=a._outerHeight,p=e.proxy,m=e.extend,g=e.each,v=a.template,_="body",b=".kendoWindow",w=".k-window",y=".k-window-title",k=y+"bar",x=".k-window-content",C=".k-resize-handle",S=".k-overlay",T="k-content-frame",D="k-i-loading",A="k-state-hover",E="k-state-focused",M="k-window-maximized",R=":visible",I="hidden",F="cursor",z="open",P="activate",B="deactivate",L="close",H="refresh",N="minimize",O="maximize",V="resizeStart",U="resize",W="resizeEnd",j="dragstart",q="dragend",G="error",$="overflow",Y="zIndex",K=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",Q=".k-i-pin",X=".k-i-unpin",Z=Q+","+X,J=".k-window-titlebar .k-window-action",ee=".k-window-titlebar .k-i-refresh",te=a.isLocalUrl,ne=l.extend({init:function(i,r){var s,c,u,h,f,m,g,v=this,_={},C=!1,S=r&&r.actions&&!r.actions.length;l.fn.init.call(v,i,r),r=v.options,h=r.position,i=v.element,f=r.content,S&&(r.actions=[]),v.appendTo=e(r.appendTo),f&&!d(f)&&(f=r.content={url:f}),i.find("script").filter(o).remove(),i.parent().is(v.appendTo)||h.top!==t&&h.left!==t||(i.is(R)?(_=i.offset(),C=!0):(c=i.css("visibility"),u=i.css("display"),i.css({visibility:I,display:""}),_=i.offset(),i.css({visibility:c,display:u})),h.top===t&&(h.top=_.top),h.left===t&&(h.left=_.left)),n(r.visible)&&null!==r.visible||(r.visible=i.is(R)),s=v.wrapper=i.closest(w),i.is(".k-content")&&s[0]||(i.addClass("k-window-content k-content"),v._createWindow(i,r),s=v.wrapper=i.closest(w),v._dimensions()),v._position(),r.pinned&&v.pin(!0),f&&v.refresh(f),r.visible&&v.toFront(),m=s.children(x),v._tabindex(m),r.visible&&r.modal&&v._overlay(s.is(R)).css({opacity:.5}),s.on("mouseenter"+b,J,p(v._buttonEnter,v)).on("mouseleave"+b,J,p(v._buttonLeave,v)).on("click"+b,"> "+J,p(v._windowActionHandler,v)),m.on("keydown"+b,p(v._keydown,v)).on("focus"+b,p(v._focus,v)).on("blur"+b,p(v._blur,v)),this._resizable(),this._draggable(),g=i.attr("id"),g&&(g+="_wnd_title",s.children(k).children(y).attr("id",g),m.attr({role:"dialog","aria-labelledby":g})),s.add(s.children(".k-resize-handle,"+k)).on("mousedown"+b,p(v.toFront,v)),v.touchScroller=a.touchScroller(i),v._resizeHandler=p(v._onDocumentResize,v),v._marker=a.guid().substring(0,8),e(window).on("resize"+b+v._marker,v._resizeHandler),r.visible&&(v.trigger(z),v.trigger(P)),a.notify(v)},_buttonEnter:function(t){e(t.currentTarget).addClass(A)},_buttonLeave:function(t){e(t.currentTarget).removeClass(A)},_focus:function(){this.wrapper.addClass(E)},_blur:function(){this.wrapper.removeClass(E)},_dimensions:function(){var e,t,n=this.wrapper,o=this.options,r=o.width,s=o.height,a=o.maxHeight,l=["minWidth","minHeight","maxWidth","maxHeight"];for(this.title(o.title),e=0;e<l.length;e++)t=o[l[e]]||"",t!=1/0&&n.css(l[e],t);a!=1/0&&this.element.css("maxHeight",a),n.width(r?(""+r).indexOf("%")>0?r:i(r,o.minWidth,o.maxWidth):""),n.height(s?(""+s).indexOf("%")>0?s:i(s,o.minHeight,o.maxHeight):""),o.visible||n.hide()},_position:function(){var e=this.wrapper,t=this.options.position;0===t.top&&(t.top=""+t.top),0===t.left&&(t.left=""+t.left),e.css({top:t.top||"",left:t.left||""})},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_resize:function(){a.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&(n.off("dblclick"+b).children(C).remove(),this.resizing.destroy(),this.resizing=null),t&&(n.on("dblclick"+b,k,p(function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),g("n e s w se sw ne nw".split(" "),function(e,t){n.append(ie.resizeHandle(t))}),this.resizing=new r(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new s(this,e.dragHandle||k))},_actions:function(){var t=this.options.actions,n=this.wrapper.children(k),i=n.find(".k-window-actions"),o=["maximize","minimize"];t=e.map(t,function(e){return{name:o.indexOf(e.toLowerCase())>-1?"window-"+e:e}}),i.html(a.render(ie.action,t))},setOptions:function(e){var n,i;l.fn.setOptions.call(this,e),n=this.options.scrollable!==!1,this.restore(),this._dimensions(),this._position(),this._resizable(),this._draggable(),this._actions(),t!==e.modal&&(i=this.options.visible!==!1,this._overlay(e.modal&&i)),this.element.css($,n?"":"hidden")},events:[z,P,B,L,N,O,H,V,U,W,j,q,G],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,n,o,r,s,l,c=this,d=c.options,u=a.keys,h=e.keyCode,f=c.wrapper,p=10,m=c.options.isMaximized;e.target!=e.currentTarget||c._closing||(h==u.ESC&&c._closable()&&c._close(!1),!d.draggable||e.ctrlKey||m||(t=a.getOffset(f),h==u.UP?n=f.css("top",t.top-p):h==u.DOWN?n=f.css("top",t.top+p):h==u.LEFT?n=f.css("left",t.left-p):h==u.RIGHT&&(n=f.css("left",t.left+p))),d.resizable&&e.ctrlKey&&!m&&(h==u.UP?(n=!0,r=f.height()-p):h==u.DOWN&&(n=!0,r=f.height()+p),h==u.LEFT?(n=!0,o=f.width()-p):h==u.RIGHT&&(n=!0,o=f.width()+p),n&&(s=i(o,d.minWidth,d.maxWidth),l=i(r,d.minHeight,d.maxHeight),isNaN(s)||(f.width(s),c.options.width=s+"px"),isNaN(l)||(f.height(l),c.options.height=l+"px"),c.resize())),n&&e.preventDefault())},_overlay:function(t){var n=this.appendTo.children(S),i=this.wrapper;return n.length||(n=e("<div class='k-overlay' />")),n.insertBefore(i[0]).toggle(t).css(Y,parseInt(i.css(Y),10)-1),n},_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(n){var i,o;if(!this._closing)return i=e(n.target).closest(".k-window-action").find(".k-icon"),o=this._actionForIcon(i),o?(n.preventDefault(),this[o](),!1):t},_modals:function(){var t=this,n=e(w).filter(function(){var n=e(this),i=t._object(n),o=i&&i.options;return o&&o.modal&&o.visible&&o.appendTo===t.options.appendTo&&n.is(R)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(x),i=a.widgetInstance(n);return i instanceof ne?i:t},center:function(){var t,n,i=this,o=i.options.position,r=i.wrapper,s=e(window),a=0,l=0;return i.options.isMaximized?i:(i.options.pinned||(a=s.scrollTop(),l=s.scrollLeft()),n=l+Math.max(0,(s.width()-r.width())/2),t=a+Math.max(0,(s.height()-r.height()-parseInt(r.css("paddingTop"),10))/2),r.css({left:n,top:t}),o.top=t,o.left=n,i)},title:function(e){var t,n=this,i=n.wrapper,o=n.options,r=i.children(k),s=r.children(y);return arguments.length?(e===!1?(i.addClass("k-window-titleless"),r.remove()):(r.length?s.html(e):(i.prepend(ie.titlebar(o)),n._actions(),r=i.children(k)),t=parseInt(f(r),10),i.css("padding-top",t),r.css("margin-top",-t)),n.options.title=e,n):s.html()},content:function(e,t){var i=this.wrapper.children(x),o=i.children(".km-scroll-container");return i=o[0]?o:i,n(e)?(this.angular("cleanup",function(){return{elements:i.children()}}),a.destroy(this.element.children()),i.empty().html(e),this.angular("compile",function(){var e,n=[];for(e=i.length;--e>=0;)n.push({dataItem:t});return{elements:i.children(),data:n}}),this):i.html()},open:function(){var t,n,i,o=this,r=o.wrapper,s=o.options,l=this._animationOptions("open"),c=r.children(x),d=e(document);return o.trigger(z)||(o._closing&&r.kendoStop(!0,!0),o._closing=!1,o.toFront(),s.autoFocus&&o.element.focus(),s.visible=!0,s.modal&&(n=!!o._modals().length,t=o._overlay(n),t.kendoStop(!0,!0),l.duration&&a.effects.Fade&&!n?(i=a.fx(t).fadeIn(),i.duration(l.duration||0),i.endValue(.5),i.play()):t.css("opacity",.5),t.show()),r.is(R)||(c.css($,I),r.show().kendoStop().kendoAnimate({effects:l.effects,duration:l.duration,complete:p(this._activate,this)}))),s.isMaximized&&(o._documentScrollTop=d.scrollTop(),o._documentScrollLeft=d.scrollLeft(),e("html, body").css($,I)),o},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css($,e?"":"hidden"),a.resize(this.element.children()),this.trigger(P)},_removeOverlay:function(n){var i,o=this._modals(),r=this.options,s=r.modal&&!o.length,l=r.modal?this._overlay(!0):e(t),c=this._animationOptions("close");s?!n&&c.duration&&a.effects.Fade?(i=a.fx(l).fadeOut(),i.duration(c.duration||0),i.startValue(.5),i.play()):this._overlay(!1).remove():o.length&&this._object(o.last())._overlay(!0)},_close:function(t){var n=this,i=n.wrapper,o=n.options,r=this._animationOptions("open"),s=this._animationOptions("close"),a=e(document);if(i.is(R)&&!n.trigger(L,{userTriggered:!t})){if(n._closing)return;n._closing=!0,o.visible=!1,e(w).each(function(t,n){var o=e(n).children(x);n!=i&&o.find("> ."+T).length>0&&o.children(S).remove()}),this._removeOverlay(),i.kendoStop().kendoAnimate({effects:s.effects||r.effects,reverse:s.reverse===!0,duration:s.duration,complete:p(this._deactivate,this)})}n.options.isMaximized&&(e("html, body").css($,""),n._documentScrollTop&&n._documentScrollTop>0&&a.scrollTop(n._documentScrollTop),n._documentScrollLeft&&n._documentScrollLeft>0&&a.scrollLeft(n._documentScrollLeft))},_deactivate:function(){var e,t=this;t.wrapper.hide().css("opacity",""),t.trigger(B),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(J+","+J+" .k-icon,:input,a")},_shouldFocus:function(t){var n=u(),i=this.element;return this.options.autoFocus&&!e(n).is(i)&&!this._actionable(t)&&(!i.find(n).length||!i.find(t).length)},toFront:function(t){var n,i,o=this,r=o.wrapper,s=r[0],a=+r.css(Y),l=a,c=t&&t.target||null;return e(w).each(function(t,n){var i=e(n),o=i.css(Y),r=i.children(x);isNaN(o)||(a=Math.max(+o,a)),n!=s&&r.find("> ."+T).length>0&&r.append(ie.overlay)}),(!r[0].style.zIndex||l<a)&&r.css(Y,a+2),o.element.find("> .k-overlay").remove(),o._shouldFocus(c)&&(o.element.focus(),n=e(window).scrollTop(),i=parseInt(r.position().top,10),!o.options.pinned&&i>0&&i<n&&(n>0?e(window).scrollTop(i):r.css("top",n))),r=null,o},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,n=t.options,i=n.minHeight,o=t.restoreOptions,r=e(document);return n.isMaximized||n.isMinimized?(i&&i!=1/0&&t.wrapper.css("min-height",i),t.wrapper.css({position:n.pinned?"fixed":"absolute",left:o.left,top:o.top,width:o.width,height:o.height}).removeClass(M).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(K).parent().show().end().end().find(Z).parent().show(),t.options.width=o.width,t.options.height=o.height,e("html, body").css($,""),this._documentScrollTop&&this._documentScrollTop>0&&r.scrollTop(this._documentScrollTop),this._documentScrollLeft&&this._documentScrollLeft>0&&r.scrollLeft(this._documentScrollLeft),n.isMaximized=n.isMinimized=!1,t.resize(),t):t},_sizingAction:function(e,t){var n=this,i=n.wrapper,o=i[0].style,r=n.options;return r.isMaximized||r.isMinimized?n:(n.restoreOptions={width:o.width,height:o.height},i.children(C).hide().end().children(k).find(K).parent().hide().eq(0).before(ie.action({name:"window-restore"})),t.call(n),n.wrapper.children(k).find(Z).parent().toggle("maximize"!==e),n.trigger(e),n)},maximize:function(){return this._sizingAction("maximize",function(){var t=this,n=t.wrapper,i=n.position(),o=e(document);m(t.restoreOptions,{left:i.left,top:i.top}),n.css({left:0,top:0,position:"fixed"}).addClass(M),this._documentScrollTop=o.scrollTop(),this._documentScrollLeft=o.scrollLeft(),e("html, body").css($,I),t.options.isMaximized=!0,t._onDocumentResize()}),this},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},isMinimized:function(){return this.options.isMinimized},pin:function(t){var n=this,i=e(window),o=n.wrapper,r=parseInt(o.css("top"),10),s=parseInt(o.css("left"),10);(t||!n.options.pinned&&!n.options.isMaximized)&&(o.css({position:"fixed",top:r-i.scrollTop(),left:s-i.scrollLeft()}),o.children(k).find(Q).addClass("k-i-unpin").removeClass("k-i-pin"),n.options.pinned=!0)},unpin:function(){var t=this,n=e(window),i=t.wrapper,o=parseInt(i.css("top"),10),r=parseInt(i.css("left"),10);t.options.pinned&&!t.options.isMaximized&&(i.css({position:"",top:o+n.scrollTop(),left:r+n.scrollLeft()}),i.children(k).find(X).addClass("k-i-pin").removeClass("k-i-unpin"),t.options.pinned=!1)},_onDocumentResize:function(){var t,n,i=this,o=i.wrapper,r=e(window),s=a.support.zoomLevel();i.options.isMaximized&&(t=r.width()/s,n=r.height()/s-parseInt(o.css("padding-top"),10),o.css({width:t,height:n}),i.options.width=t,i.options.height=n,i.resize())},refresh:function(t){var i,o,r,s=this,a=s.options,l=e(s.element);return d(t)||(t={url:t}),t=m({},a.content,t),o=n(a.iframe)?a.iframe:t.iframe,r=t.url,r?(n(o)||(o=!te(r)),o?(i=l.find("."+T)[0],i?i.src=r||i.src:l.html(ie.contentFrame(m({},a,{content:t}))),l.find("."+T).unbind("load"+b).on("load"+b,p(this._triggerRefresh,this))):s._ajaxRequest(t)):(t.template&&s.content(v(t.template)({})),s.trigger(H)),l.toggleClass("k-window-iframecontent",!!o),s},_triggerRefresh:function(){this.trigger(H)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(ee).removeClass(D)},_ajaxError:function(e,t){this.trigger(G,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=v(e)(t||{})),this.content(n,t),this.element.prop("scrollTop",0),this.trigger(H)}},_showLoading:function(){this.wrapper.find(ee).addClass(D)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(p(this._showLoading,this),100),e.ajax(m({type:"GET",dataType:"html",cache:!1,error:p(this._ajaxError,this),complete:p(this._ajaxComplete,this),success:p(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(b).children(x).off(b).end().find(".k-resize-handle,.k-window-titlebar").off(b),e(window).off("resize"+b+this._marker),clearTimeout(this._loadingIconTimeout),l.fn.destroy.call(this),this.unbind(t),a.destroy(this.wrapper),this._removeOverlay(!0)},destroy:function(){this._destroy(),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t,n,i=this.element,o=this.options,r=a.support.isRtl(i);o.scrollable===!1&&i.css("overflow","hidden"),n=e(ie.wrapper(o)),t=i.find("iframe:not(.k-content)").map(function(){var e=this.getAttribute("src");return this.src="",e}),n.toggleClass("k-rtl",r).appendTo(this.appendTo).append(i).find("iframe:not(.k-content)").each(function(e){this.src=t[e]}),n.find(".k-window-title").css(r?"left":"right",h(n.find(".k-window-actions"))+10),i.css("visibility","").show(),i.find("[data-role=editor]").each(function(){var t=e(this).data("kendoEditor");t&&t.refresh()}),n=i=null}}),ie={wrapper:v("<div class='k-widget k-window' />"),action:v("<a role='button' href='\\#' class='k-window-action k-link' aria-label='#= name #'><span class='k-icon k-i-#= name.toLowerCase() #'></span></a>"),titlebar:v("<div class='k-window-titlebar k-header'>&nbsp;<span class='k-window-title'>#= title #</span><div class='k-window-actions' /></div>"),overlay:"<div class='k-overlay' />",contentFrame:v("<iframe frameborder='0' title='#= title #' class='"+T+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:v("<div class='k-resize-handle k-resize-#= data #'></div>")};r.prototype={addOverlay:function(){this.owner.wrapper.append(ie.overlay)},removeOverlay:function(){this.owner.wrapper.find(S).remove()},dragstart:function(t){var n=this,i=n.owner,o=i.wrapper;n._preventDragging=i.trigger(V),n._preventDragging||(n.elementPadding=parseInt(o.css("padding-top"),10),n.initialPosition=a.getOffset(o,"position"),n.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),n.initialSize={width:o.width(),height:o.height()},n.containerOffset=a.getOffset(i.appendTo,"position"),o.children(C).not(t.currentTarget).hide(),e(_).css(F,t.currentTarget.css(F)))},drag:function(t){var n,o,r,s,a,l,c,d,u,h,f,p,m,g,v;this._preventDragging||(n=this,o=n.owner,r=o.wrapper,s=o.options,a=n.resizeDirection,l=n.containerOffset,c=n.initialPosition,d=n.initialSize,m=Math.max(t.x.location,0),g=Math.max(t.y.location,0),a.indexOf("e")>=0?(u=m-c.left-l.left,r.width(i(u,s.minWidth,s.maxWidth))):a.indexOf("w")>=0&&(p=c.left+d.width+l.left,u=i(p-m,s.minWidth,s.maxWidth),r.css({left:p-u-l.left,width:u})),v=g,o.options.pinned&&(v-=e(window).scrollTop()),a.indexOf("s")>=0?(h=v-c.top-n.elementPadding-l.top,r.height(i(h,s.minHeight,s.maxHeight))):a.indexOf("n")>=0&&(f=c.top+d.height+l.top,h=i(f-v,s.minHeight,s.maxHeight),r.css({top:f-h-l.top,height:h})),u&&(o.options.width=u+"px"),h&&(o.options.height=h+"px"),o.resize())},dragend:function(t){if(!this._preventDragging){var n=this,i=n.owner,o=i.wrapper;return o.children(C).not(t.currentTarget).show(),e(_).css(F,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&o.css(n.initialPosition).css(n.initialSize),i.trigger(W),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},s.prototype={dragstart:function(t){var n=this.owner,i=n.element,o=i.find(".k-window-actions"),r=a.getOffset(n.appendTo);this._preventDragging=n.trigger(j),this._preventDragging||(n.initialWindowPosition=a.getOffset(n.wrapper,"position"),n.initialPointerPosition={left:t.x.client,top:t.y.client},n.startPosition={left:t.x.client-n.initialWindowPosition.left,top:t.y.client-n.initialWindowPosition.top},n.minLeftPosition=o.length>0?h(o)+parseInt(o.css("right"),10)-h(i):20-h(i),n.minLeftPosition-=r.left,n.minTopPosition=-r.top,n.wrapper.append(ie.overlay).children(C).hide(),e(_).css(F,t.currentTarget.css(F)))},drag:function(t){var n,i;this._preventDragging||(n=this.owner,i=n.options.position,i.top=Math.max(t.y.client-n.startPosition.top,n.minTopPosition),i.left=Math.max(t.x.client-n.startPosition.left,n.minLeftPosition),a.support.transforms?e(n.wrapper).css("transform","translate("+(t.x.client-n.initialPointerPosition.left)+"px, "+(t.y.client-n.initialPointerPosition.top)+"px)"):e(n.wrapper).css(i))},_finishDrag:function(){var t=this.owner;t.wrapper.children(C).toggle(!t.options.isMinimized).end().find(S).remove(),e(_).css(F,"")},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(w).css(this.owner.initialWindowPosition))},dragend:function(){if(!this._preventDragging)return e(this.owner.wrapper).css(this.owner.options.position).css("transform",""),this._finishDrag(),this.owner.trigger(q),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},a.ui.plugin(ne)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e){var t,n,i=e.find(k("popover")),o=a.roles;for(t=0,n=i.length;t<n;t++)r.initWidget(i[t],{},o)}function i(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" />',f="beforeShow",p="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,n){c.fn.init.call(this,t,n),this.params={},e.extend(this,n),this.transition=this.transition||this.defaultTransition,this._id(),this.options.$angular?this._overlay():(this._layout(),this._overlay(),this._scroller(),this._model())},events:[u,f,p,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(f,{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(p,{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()||"",n=s.application.os.android||t.indexOf("android")>-1,i="flat"===t||t.indexOf("material")>-1,o=!e&&!n||i?"header":"footer",a=!e&&!n||i?"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",i),t.options.useNativeScrolling||t.options.stretch||e(t.element).on("touchmove",".km-content",i)))},_model:function(){var e=this,t=e.element,i=e.options.model;"string"==typeof i&&(i=r.getter(i)(e.options.modelScope)),e.model=i,n(t),e.element.css("display",""),e.options.initWidgets&&(i?r.bind(t,i,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,n,i;this.options.$angular&&(t=this.element.controller(),n=this.options.$angular[0],t&&(i=e.proxy(this,"_callController",t,n),/^\$(digest|apply)$/.test(n.$$phase)?i():n.$apply(i)))},_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),n(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,p,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,n=t.currentView;n&&t.detach(n),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(p,{layout:t,view:e}),t.currentView=e}}),D=r.Observable,A=/<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,E="loadStart",M="loadComplete",R="showStart",I="sameViewRequested",F="viewShow",z="viewTypeDetermined",P="after",B=D.extend({init:function(t){var n,i,s,a,l=this;if(D.fn.init.call(l),e.extend(l,t),l.sandbox=e("<div />"),s=l.container,n=l._hideViews(s),l.rootView=n.first(),!l.rootView[0]&&t.rootNeeded)throw i=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(i);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(P,function(){l.trigger(P)}),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(n,i){C(e(i),t.$angular[0])})):o(a),this.bind(this.events,t)},events:[R,P,F,E,M,I,z],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,n){if(e=e.replace(RegExp("^"+this.remoteViewURLPrefix),""),""===e&&this.remoteViewURLPrefix&&(e="/"),e.replace(/^#/,"")===this.url)return this.trigger(I),!1;this.trigger(R);var i=this,o=function(n){return i.viewContainer.show(n,t,e)},s=i._findViewElement(e),a=r.widgetInstance(s);return i.url=e.replace(/^#/,""),i.params=n,a&&a.reload&&(a.purge(),s=[]),this.trigger(z,{remote:0===s.length,url:e}),s[0]?(a||(a=i._createView(s)),o(a)):(this.serverNavigation?location.href=e:i._loadView(e,o),!0)},append:function(e,t){var n,i,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")),n=this._hideViews(s),r=n.first(),r.length||(n=r=s.wrapInner("<div data-role=view />").children()),a&&r.hide().attr(l("url"),a),this._setupLayouts(s),i=s.children(this._locate("modalview drawer")),c.append(s.children(this._locate("layout modalview drawer")).add(n)),o(i),this._createView(r)},_locate:function(e){return this.$angular?x(e):k(e)},_findViewElement:function(e){var t,n=e.split("?")[0];return n?(t=this.container.children("["+l("url")+"='"+n+"']"),t[0]||n.indexOf("/")!==-1||(t=this.container.children("#"===n.charAt(0)?n:"#"+n)),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,n){this._xhr&&this._xhr.abort(),this.trigger(E),this._xhr=e.get(r.absoluteURL(t,this.remoteViewURLPrefix),"html").always(e.proxy(this,"_xhrComplete",n,t))},_xhrComplete:function(e,t,n){var i=!0;if("object"==typeof n&&0===n.status){if(!(n.responseText&&n.responseText.length>0))return;i=!0,n=n.responseText}this.trigger(M),i&&e(this.append(n,t))},_hideViews:function(e){return e.children(this._locate("view splitview")).hide()},_setupLayouts:function(t){var n,i=this;t.children(i._locate("layout")).each(function(){n=i.$angular?C(e(this),i.$angular[0]):r.initWidget(e(this),{},a.roles);var t=n.options.platform;t&&t!==s.application.os.name?n.destroy():i.layouts[n.options.id]=n})}});r.mobile.ViewEngine=B,a.plugin(S),a.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.loader.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,o=i.Widget,r=e.map(n.eventMap,function(e){return e}).join(" ").split(" "),s=o.extend({init:function(t,n){var i=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(i,r,n),i.container=t,i.captureEvents=!1,i._attachCapture(),r.append(i.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){n.captureEvents&&e.preventDefault()}var t,n=this;for(n.captureEvents=!1,t=0;t<r.length;t++)n.container[0].addEventListener(r[t],e,!0)}});i.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.pane.min",["kendo.mobile.view.min","kendo.mobile.loader.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,o=n.roleSelector,r=i.ui,s=r.Widget,a=i.ViewEngine,l=r.View,c=i.ui.Loader,d="external",u="href",h="#!",f="navigate",p="viewShow",m="sameViewRequested",g=n.support.mobileOS,v=g.ios&&!g.appMode&&g.flatVersion>=700,_=/popover|actionsheet|modalview|drawer/,b="#:back",w=n.attrValue,y=s.extend({init:function(e,t){var i=this;s.fn.init.call(i,e,t),t=i.options,e=i.element,e.addClass("km-pane"),i.options.collapsible&&e.addClass("km-collapsible-pane"),this.history=[],this.historyCallback=function(e,t,n){var o=i.transition;return i.transition=null,v&&n&&(o="none"),i.viewEngine.showView(e,o,t)},this._historyNavigate=function(e){if(e===b){if(1===i.history.length)return;i.history.pop(),e=i.history[i.history.length-1]}else i.history.push(e);i.historyCallback(e,n.parseQueryStringParams(e))},this._historyReplace=function(e){var t=n.parseQueryStringParams(e);i.history[i.history.length-1]=e,i.historyCallback(e,t)},i.loader=new c(e,{loading:i.options.loading}),i.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:i.loader,showStart:function(){i.loader.transition(),i.closeActiveDialogs()},after:function(){i.loader.transitionDone()},viewShow:function(e){i.trigger(p,e)},loadStart:function(){i.loader.show()},loadComplete:function(){i.loader.hide()},sameViewRequested:function(){i.trigger(m)},viewTypeDetermined:function(e){e.remote&&i.options.serverNavigation||i.trigger(f,{url:e.url})}}),this._setPortraitWidth(),n.onResize(function(){i._setPortraitWidth()}),i._setupAppLinks()},closeActiveDialogs:function(){var t=this.element.find(o("actionsheet popover modalview")).filter(":visible");t.each(function(){n.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:[f,p,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,i=this.history,o=this.viewEngine;e.bind("init",function(t){var r,s=t.url,a=e.pushState?s:"/";o.rootView.attr(n.attr("url"),a),r=i.length,"/"===s&&r&&(e.navigate(i[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=n.mobile.application.element.is(".km-vertical")?t:"auto",this.element.css("width",e))},_setupAppLinks:function(){var t=this,i="tab",r="[data-"+n.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(i)+","+r,"_mouseup").on("click",o(i)+","+s+","+r,"_appLinkClick"),this.userEvents=new n.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 n=e(t.currentTarget).attr("href"),i=n&&"#"!==n[0]&&this.options.serverNavigation;i||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")||"",f=w(a,"target"),p=a.attr(u),m=v&&0===a[0].offsetHeight,g=p&&"#"!==p[0]&&this.options.serverNavigation;m||g||c===d||t===p||p===h||(a.attr(u,h),setTimeout(function(){a.attr(u,p)}),c.match(_)?(n.widgetInstance(e(p),r).openFor(a),"actionsheet"!==c&&"drawer"!==c||o.stopPropagation()):("_top"===f?s=i.application.pane:f&&(s=e("#"+f).data("kendoMobilePane")),s.navigate(p,l)),o.preventDefault())}}});y.wrap=function(e){e.is(o("view"))||(e=e.wrap("<div data-"+n.ns+'role="view" data-stretch="true"></div>').parent());var t=e.wrap('<div class="km-pane-wrapper"><div></div></div>').parent(),i=new y(t);return i.navigate(""),i},r.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.popover.min",["kendo.popup.min","kendo.mobile.pane.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,o=i.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,f={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"}},p={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,i){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;i.viewport?g=i.viewport:g[0]||(g=window),i.container?v=i.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,i),t=a.element,i=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:i.width,height:i.height}).addClass("km-popup-wrapper km-"+i.direction).hide(),a.arrow=e(c).prependTo(a.wrapper).hide(),a.overlay=e(d).appendTo(v).hide(),o.appendTo=a.overlay,i.className&&a.overlay.addClass(i.className),a.popup=new n.ui.Popup(a.wrapper,e.extend(!0,o,p,f[i.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,n=t.options.direction,i=t.dimensions,o=i.offset,r=t.popup,s=r.options.anchor,a=e(s).offset(),l=e(r.element).offset(),c=r.flipped?g[n]:n,d=2*t.arrow[i.size](),h=t.element[i.size]()-t.arrow[i.size](),f=e(s)[i.size](),p=a[o]-l[o]+f/2;p<d&&(p=d),p>h&&(p=h),t.wrapper.removeClass(u).addClass("km-"+c),t.arrow.css(o,p).show()}}),_=h.extend({init:function(t,i){var r,s=this;s.initialOpen=!1,h.fn.init.call(s,t,i),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})),n.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(),n.destroy(this.element)}});o.plugin(v),o.plugin(_)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.shim.min",["kendo.popup.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,o=n.ui.Popup,r='<div class="km-shim"/>',s="hide",a=i.Widget,l=a.extend({init:function(t,i){var l=this,c=n.mobile.application,d=n.support.mobileOS,u=c?c.os.name:d?d.name:"ios",h="ios"===u||"wp"===u||!!c&&c.os.skin,f="blackberry"===u,p=i.align||(h?"bottom center":f?"center right":"center center"),m=i.position||(h?"bottom center":f?"center right":"center center"),g=i.effect||(h?"slideIn:up":f?"slideIn:left":"fade:in"),v=e(r).handler(l).hide();a.fn.init.call(l,t,i),l.shim=v,t=l.element,i=l.options,i.className&&l.shim.addClass(i.className),i.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:p,position:m,animation:{open:{effects:g,duration:i.duration},close:{duration:i.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()}}),n.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()}});i.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.actionsheet.min",["kendo.mobile.popover.min","kendo.mobile.shim.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.support,o=n.mobile.ui,r=o.Shim,s=o.Popup,a=o.Widget,l="open",c="close",d="command",u="li>a",h="actionsheetContext",f='<div class="km-actionsheet-wrapper" />',p=n.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=i.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&&(p=n.template(l.cancelTemplate)),t.addClass("km-actionsheet").append(p({cancel:m.options.cancel})).wrap(f).on("up",u,"_click").on("click",u,n.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&&n.onResize(m._closeProxy),n.notify(m,o)},events:[l,c,d],options:{name:"ActionSheet",cancel:"Cancel",type:"auto",popup:{height:"auto"}},open:function(t,n){var i=this;i.target=e(t),i.context=n,i.shim.show(t)},close:function(){this.context=this.target=null,this.shim.hide()},openFor:function(e){var t=this,n=e.data(h);t.open(e,n),t.trigger(l,{target:e,context:n})},destroy:function(){a.fn.destroy.call(this),n.unbindResize(this._closeProxy),this.shim.destroy()},_click:function(t){var i,o,r,s;t.isDefaultPrevented()||(i=e(t.currentTarget),o=i.data("action"),o&&(r={target:this.target,context:this.context},s=this.options.$angular,s?this.element.injector().get("$parse")(o)(s[0])(r):n.getter(o)(window)(r)),this.trigger(d,{target:this.target,context:this.context,currentTarget:i}),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,n){(n||t)()}),function(e,define){define("kendo.progressbar.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.Widget,r="horizontal",s="vertical",a=0,l=100,c=0,d=5,u="k-progressbar",h="k-progressbar-reverse",f="k-progressbar-indeterminate",p="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,M={progressStatus:"<span class='k-progress-status-wrap'><span class='k-progress-status'></span></span>"},R=o.extend({init:function(e,t){var n=this;o.fn.init.call(this,e,t),t=n.options,n._progressProperty=t.orientation===r?"width":"height",n._fields(),t.value=n._validateValue(t.value),n._validateType(t.type),n._wrapper(),n._progressAnimation(),t.value!==t.min&&t.value!==!1&&n._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 i=!1;if(e.each(w,function(e,n){if(n===t)return i=!0,!1}),!i)throw Error(n.format("Invalid ProgressBar type '{0}'",t))},_wrapper:function(){var e,t=this,n=t.wrapper=t.element,i=t.options,o=i.orientation;n.addClass("k-widget "+u),n.addClass(u+"-"+(o===r?r:s)),i.enable===!1&&n.addClass(b),i.reverse&&n.addClass(h),i.value===!1&&n.addClass(f),i.type===w.CHUNK?t._addChunkProgressWrapper():i.showStatus&&(t.progressStatus=t.wrapper.prepend(M.progressStatus).find("."+g),e=i.value!==!1?i.value:i.min,t.progressStatus.text(i.type===w.VALUE?e:t._calculatePercentage(e).toFixed()+"%"))},value:function(e){return this._value(e)},_value:function(e){var n,i=this,o=i.options;return e===t?o.value:(typeof e!==x?(e=i._roundValue(e),isNaN(e)||(n=i._validateValue(e),n!==o.value&&(i.wrapper.removeClass(f),o.value=n,i._isStarted=!0,i._updateProgress()))):e||(i.wrapper.addClass(f),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,n=t.options;if(e!==!1){if(e<=n.min||e===!0)return n.min;if(e>=n.max)return n.max}else if(e===!1)return!1;return isNaN(t._roundValue(e))?n.min:e},_updateProgress:function(){var e=this,t=e.options,n=e._calculatePercentage();t.type===w.CHUNK?(e._updateChunks(n),e._onProgressUpdateAlways(t.value)):e._updateProgressWrapper(n)},_updateChunks:function(e){var t,n=this,i=n.options,o=i.chunkCount,a=parseInt(D/o*100,10)/100,l=parseInt(100*e,10)/100,c=C.floor(l/a);t=n.wrapper.find(i.orientation===r&&!i.reverse||i.orientation===s&&i.reverse?"li.k-item:lt("+c+")":"li.k-item:gt(-"+(c+1)+")"),n.wrapper.find("."+v).removeClass(v).addClass(_),t.removeClass(_).addClass(v)},_updateProgressWrapper:function(e){var t=this,n=t.options,i=t.wrapper.find("."+m),o=t._isStarted?t._animation.duration:0,r={};0===i.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,n.value),always:T(t._onProgressUpdateAlways,t,n.value)})},_onProgressAnimateStart:function(){this.progressWrapper.show()},_onProgressAnimate:function(e){var t,n=this,i=n.options,o=parseFloat(e.elem.style[n._progressProperty],10);i.showStatus&&(t=1e4/parseFloat(n.progressWrapper[0].style[n._progressProperty]),n.progressWrapper.find(".k-progress-status-wrap").css(n._progressProperty,t+"%")),i.type!==w.CHUNK&&o<=98&&n.progressWrapper.removeClass(p)},_onProgressAnimateComplete:function(e){var t,n=this,i=n.options,o=parseFloat(n.progressWrapper[0].style[n._progressProperty]);i.type!==w.CHUNK&&o>98&&n.progressWrapper.addClass(p),i.showStatus&&(t=i.type===w.VALUE?e:i.type==w.PERCENT?n._calculatePercentage(e).toFixed()+"%":C.floor(n._calculatePercentage(e))+"%",n.progressStatus.text(t)),e===i.min&&n.progressWrapper.hide()},_onProgressUpdateAlways:function(e){var t=this,n=t.options;t._isStarted&&t.trigger(y,{value:e}),e===n.max&&t._isStarted&&t.trigger(k,{value:n.max})},enable:function(e){var n=this,i=n.options;i.enable=t===e||e,n.wrapper.toggleClass(b,!i.enable)},destroy:function(){var e=this;o.fn.destroy.call(e)},_addChunkProgressWrapper:function(){var e,t=this,n=t.options,i=t.wrapper,o=D/n.chunkCount,r="";for(n.chunkCount<=1&&(n.chunkCount=1),r+="<ul class='k-reset'>",e=n.chunkCount-1;e>=0;e--)r+="<li class='k-item k-state-default'></li>";r+="</ul>",i.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,n=e.wrapper.find(".k-item:last"),i=parseFloat(n[0].style[e._progressProperty]),o=D-t.chunkCount*i;o>0&&n.css(e._progressProperty,i+o+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=e("<div class='"+m+"'></div>").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(M.progressStatus),t.progressStatus=t.wrapper.find("."+g))},_calculateChunkSize:function(){var e=this,t=e.options.chunkCount,n=e.wrapper.find("ul.k-reset");return(parseInt(n.css(e._progressProperty),10)-(t-1))/t},_calculatePercentage:function(e){var n=this,i=n.options,o=e!==t?e:i.value,r=i.min,s=i.max;return n._onePercent=C.abs((s-r)/100),C.abs((o-r)/n._onePercent)},_progressAnimation:function(){var e=this,t=e.options,n=t.animation;e._animation=n===!1?{duration:0}:S({duration:A},t.animation)}});n.ui.plugin(R)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdf/core.min",["kendo.core.min","kendo.color.min","kendo.drawing.min"],e)}(function(){return function(e){function t(e){function t(){return S>=T}function n(){return S<T?e[S++]:0}function i(t){w(S),e[S++]=255&t,S>T&&(T=S)}function o(){return n()<<8|n()}function r(e){i(e>>8),i(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 f(e){c(Math.round(65536*e))}function p(){return d()/65536}function m(e){u(Math.round(65536*e))}function g(e){return b(e,n)}function v(e){return String.fromCharCode.apply(String,g(e))}function _(e){for(var t=0;t<e.length;++t)i(e.charCodeAt(t))}function b(e,t){for(var n=Array(e),i=0;i<e;++i)n[i]=t();return n}var w,y,k,x,C,S=0,T=0;return null==e?e=Ce?new Uint8Array(256):[]:T=e.length,w=Ce?function(t){if(t>=e.length){var n=new Uint8Array(Math.max(t+256,2*e.length));n.set(e,0),e=n}}:function(){},y=Ce?function(){return new Uint8Array(e.buffer,0,T)}:function(){return e},k=Ce?function(t){if("string"==typeof t)return _(t);var n=t.length;w(S+n),e.set(t,S),S+=n,S>T&&(T=S)}:function(e){if("string"==typeof e)return _(e);for(var t=0;t<e.length;++t)i(e[t])},x=Ce?function(t,n){if(e.buffer.slice)return new Uint8Array(e.buffer.slice(t,t+n));var i=new Uint8Array(n);return i.set(new Uint8Array(e.buffer,t,n)),i}:function(t,n){return e.slice(t,t+n)},C={eof:t,readByte:n,writeByte:i,readShort:o,writeShort:r,readLong:l,writeLong:c,readFixed:h,writeFixed:f,readShort_:s,writeShort_:a,readLong_:d,writeLong_:u,readFixed_:p,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(Se.decode(e))},base64:function(){return Se.encode(y())}}}function n(e){for(var t,n,i=[],o=0,r=e.length;o<r;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<r?(n=e.charCodeAt(o++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--)):i.push(t);return i}function i(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,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort(function(e,t){return e-t}).map(parseFloat)}function s(e){var t,n,i;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={},n=0;n<this.tableCount;++n)i={tag:e.readString(4),checksum:e.readLong(),offset:e.readLong(),length:e.readLong()},t[i.tag]=i}function a(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 n in e)o(e,n)&&(t[n]=t.prototype[n]=e[n]);return t}function l(){var e,t="",n=Be+"";for(e=0;e<n.length;++e)t+=String.fromCharCode(n.charCodeAt(e)-48+65);return++Be,t}function c(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=l()+"+"+this.font.psName}function d(e,n){var i,o,r,s,a=this,l=a.contents=t(e);if("ttcf"==l.readString(4)){if(o=function(){l.offset(i),a.parse()},!n)throw Error("Must specify a name for TTC files");for(l.readLong(),r=l.readLong(),s=0;s<r;++s)if(i=l.readLong(),l.saveExcursion(o),a.psName==n)return;throw Error("Font "+n+" not found in collection")}l.offset(0),a.parse()}function u(){function e(){var t,n,o,r=arguments;for(t=0;t<arguments.length;++t){if(n=r[t],void 0===n)throw Error("Cannot output undefined to PDF");if(n instanceof E)n.beforeRender(e),n.render(e);else if(Ge(n))x(n,e);else if(k(n))C(n,e);else if("number"==typeof n){if(isNaN(n))throw Error("Cannot output NaN to PDF");o=n.toFixed(7),o.indexOf(".")>=0&&(o=o.replace(/\.?0+$/,"")),"-0"==o&&(o="0"),i.writeString(o)}else/string|boolean/.test(typeof n)?i.writeString(n+""):"function"==typeof n.get?i.write(n.get()):"object"==typeof n&&(n?e(new Xe(n)):i.writeString("null"))}}var n=0,i=t();return e.writeData=function(e){i.write(e)},e.withIndent=function(t){++n,t(e),--n},e.indent=function(){e(Ne,b("",2*n,"  ")),e.apply(null,arguments)},e.offset=function(){return i.offset()},e.toString=function(){throw Error("FIX CALLER")},e.get=function(){return i.get()},e.stream=function(){return i},e}function h(e,t){var n=e.beforeRender,i=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 "),n.call(e,o),i.call(e,o),o(" endobj")}}function f(e){var t,n,i;if("function"!=typeof e&&(t=e,e=function(e,n){return e in t?t[e]:n}),n=e("paperSize",Ve.a4),!n)return{};if("string"==typeof n&&(n=Ve[n.toLowerCase()],null==n))throw Error("Unknown paper size");return n[0]=A(n[0]),n[1]=A(n[1]),e("landscape",!1)&&(n=[Math.max(n[0],n[1]),Math.min(n[0],n[1])]),i=e("margin"),i&&("string"==typeof i||"number"==typeof i?(i=A(i,0),i={left:i,top:i,right:i,bottom:i}):i={left:A(i.left,0),top:A(i.top,0),right:A(i.right,0),bottom:A(i.bottom,0)},e("addMargin")&&(n[0]+=i.left+i.right,n[1]+=i.top+i.bottom)),{paperSize:n,margin:i}}function p(e){function t(t,n){return e&&null!=e[t]?e[t]:n}var n,i,o=this,r=u(),s=0,a=[];o.getOption=t,o.attach=function(e){return a.indexOf(e)<0&&(h(e,++s),a.push(e)),e},o.pages=[],o.FONTS={},o.IMAGES={},o.GRAD_COL_FUNCTIONS={},o.GRAD_OPC_FUNCTIONS={},o.GRAD_COL={},o.GRAD_OPC={},n=o.attach(new Je),i=o.attach(new et),n.setPages(i),o.addPage=function(e){var t,n,r,s=f(function(t,n){return e&&null!=e[t]?e[t]:n}),a=s.paperSize,l=s.margin,c=a[0],d=a[1];return l&&(c-=l.left+l.right,d-=l.top+l.bottom),t=new Ze(u(),null,(!0)),n={Contents:o.attach(t),Parent:i,MediaBox:[0,0,a[0],a[1]]},r=new ot(o,n),r._content=t,i.addPage(o.attach(r)),r.transform(1,0,0,-1,0,a[1]),l&&(r.translate(l.left,l.top),r.rect(0,0,c,d),r.clip()),o.pages.push(r),r},o.render=function(){var e,i;for(r("%PDF-1.4",Ne,"%ÂÁÚÏÎ",Ne,Ne),e=0;e<a.length;++e)a[e].renderFull(r),r(Ne,Ne);for(i=r.offset(),r("xref",Ne,0," ",a.length+1,Ne),r("0000000000 65535 f ",Ne),e=0;e<a.length;++e)r(w(a[e]._offset,10)," 00000 n ",Ne);return r(Ne),r("trailer",Ne),r(new Xe({Size:a.length+1,Root:n,Info:new Xe({Producer:new $e(t("producer","Kendo UI PDF Generator")),Title:new $e(t("title","")),Author:new $e(t("author","")),Subject:new $e(t("subject","")),Keywords:new $e(t("keywords","")),Creator:new $e(t("creator","Kendo UI PDF Generator")),CreationDate:t("date",new Date)})}),Ne,Ne),r("startxref",Ne,i,Ne),r("%%EOF",Ne),r.stream().offset(0)}}function m(e,t){function n(){window.console&&(window.console.error?window.console.error("Cannot load URL: %s",e):window.console.log("Cannot load URL: %s",e)),t(null)}var i=new XMLHttpRequest;i.open("GET",e,!0),He&&(i.responseType="arraybuffer"),i.onload=function(){200==i.status||304==i.status?t(He?new Uint8Array(i.response):new window.VBArray(i.responseBody).toArray()):n()},i.onerror=n,i.send(null)}function g(e,t){var n=Ue[e];n?t(n):m(e,function(n){if(null==n)throw Error("Cannot load font from "+e);var i=new d(n);Ue[e]=i,t(i)})}function v(e,n){function i(e){c.src=e,c.complete&&!Le.msie?r():(c.onload=r,c.onerror=o)}function o(){n(We[e]="TAINTED")}function r(){var i,r,l,d,u,h,f,p,m,g,v,_;if(a&&/^image\/jpe?g$/i.test(a.type))return i=new FileReader,i.onload=function(){c=new I(c.width,c.height,t(new Uint8Array(this.result))),URL.revokeObjectURL(s),n(We[e]=c)},void i.readAsArrayBuffer(a);r=document.createElement("canvas"),r.width=c.width,r.height=c.height,l=r.getContext("2d"),l.drawImage(c,0,0);try{d=l.getImageData(0,0,c.width,c.height)}catch(b){return void o()}finally{s&&URL.revokeObjectURL(s)}for(u=!1,h=t(),f=t(),p=d.data,m=0;m<p.length;)h.writeByte(p[m++]),h.writeByte(p[m++]),h.writeByte(p[m++]),g=p[m++],g<255&&(u=!0),f.writeByte(g);u?c=new F(c.width,c.height,h,f):(v=r.toDataURL("image/jpeg"),v=v.substr(v.indexOf(";base64,")+8),_=t(),_.writeBase64(v),_.offset(0),c=new I(c.width,c.height,_)),n(We[e]=c)}var s,a,l,c=We[e];c?n(c):(c=new Image,/^data:/i.test(e)||(c.crossOrigin="Anonymous"),He&&!/^data:/i.test(e)?(l=new XMLHttpRequest,l.onload=function(){a=l.response,s=URL.createObjectURL(a),i(s)},l.onerror=o,l.open("GET",e,!0),l.responseType="blob",l.send()):i(e))}function _(e){return function(t,n){function i(){0===--o&&n()}var o=t.length,r=o;if(0===o)return n();for(;r-- >0;)e(t[r],i)}}function b(e,t,n){for(;e.length<t;)e=n+e;return e}function w(e,t){return b(e+"",t,"0")}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function k(e){return e instanceof Date}function x(e,t){t("["),e.length>0&&t.withIndent(function(){for(var n=0;n<e.length;++n)n>0&&n%8===0?t.indent(e[n]):t(" ",e[n])}),t(" ]")}function C(e,t){t("(D:",w(e.getUTCFullYear(),4),w(e.getUTCMonth()+1,2),w(e.getUTCDate(),2),w(e.getUTCHours(),2),w(e.getUTCMinutes(),2),w(e.getUTCSeconds(),2),"Z)")}function S(e){return e*(72/25.4)}function T(e){return S(10*e)}function D(e){return 72*e}function A(e,t){var n,i;if("number"==typeof e)return e;if("string"==typeof e&&(n=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(e),n&&(i=parseFloat(n[1]),!isNaN(i))))return"pt"==n[2]?i:{mm:S,cm:T,"in":D}[n[2]](i);if(null!=t)return t;throw Error("Can't parse unit: "+e)}function E(){}function M(e,t,n){n||(n=E),e.prototype=new n;for(var i in t)y(t,i)&&(e.prototype[i]=t[i]);return e}function R(e){return y(Qe,e)?Qe[e]:Qe[e]=new Ke(e)}function I(e,t,n){this.asStream=function(){var i=new Ze(n,{Type:R("XObject"),Subtype:R("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:R("DeviceRGB"),Filter:R("DCTDecode")});return i._resourceName=R("I"+ ++Oe),i}}function F(e,t,n,i){this.asStream=function(o){var r=new Ze(i,{Type:R("XObject"),Subtype:R("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:R("DeviceGray")},(!0)),s=new Ze(n,{Type:R("XObject"),Subtype:R("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:R("DeviceRGB"),SMask:o.attach(r)},(!0));return s._resourceName=R("I"+ ++Oe),s}}function z(e){return e.map(function(e){return Ge(e)?z(e):"number"==typeof e?(Math.round(1e3*e)/1e3).toFixed(3):e}).join(" ")}function P(e,t,n,i,o,r,s){var a=z([t,n,i,o,r,s]),l=e.GRAD_COL_FUNCTIONS[a];return l||(l=e.GRAD_COL_FUNCTIONS[a]=e.attach(new Xe({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,n,i],C1:[o,r,s]}))),l}function B(e,t,n){var i=z([t,n]),o=e.GRAD_OPC_FUNCTIONS[i];return o||(o=e.GRAD_OPC_FUNCTIONS[i]=e.attach(new Xe({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[n]}))),o}function L(e,t){function n(e){return 1==e.length?e[0]:{FunctionType:3,Functions:e,Domain:[0,1],Bounds:u,Encode:h}}var i,o,r,s,a,l=!1,c=[],d=[],u=[],h=[];for(i=1;i<t.length;++i)o=t[i-1],r=t[i],s=o.color,a=r.color,d.push(P(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(i=1;i<t.length;++i)o=t[i-1],r=t[i],s=o.color,a=r.color,c.push(B(e,s.a,a.a));return u.pop(),{hasAlpha:l,colors:n(d),opacities:l?n(c):null}}function H(e,t,n,i,o,r){var s,a,l;return r||(l=[t].concat(i),n.forEach(function(e){l.push(e.offset,e.color.r,e.color.g,e.color.b)}),a=z(l),s=e.GRAD_COL[a]),s||(s=new Xe({Type:R("Shading"),ShadingType:t?3:2,ColorSpace:R("DeviceRGB"),Coords:i,Domain:[0,1],Function:o,Extend:[!0,!0]}),e.attach(s),s._resourceName="S"+ ++Oe,a&&(e.GRAD_COL[a]=s)),s}function N(e,t,n,i,o,r){var s,a,l;return r||(l=[t].concat(i),n.forEach(function(e){l.push(e.offset,e.color.a)}),a=z(l),s=e.GRAD_OPC[a]),s||(s=new Xe({Type:R("ExtGState"),AIS:!1,CA:1,ca:1,SMask:{Type:R("Mask"),S:R("Luminosity"),G:e.attach(new Ze("/a0 gs /s0 sh",{Type:R("XObject"),Subtype:R("Form"),FormType:1,BBox:r?[r.left,r.top+r.height,r.left+r.width,r.top]:[0,1,1,0],Group:{Type:R("Group"),S:R("Transparency"),CS:R("DeviceGray"),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:R("DeviceGray"),Coords:i,Domain:[0,1],ShadingType:t?3:2,Function:o,Extend:[!0,!0]}}}}))}}),e.attach(s),s._resourceName="O"+ ++Oe,a&&(e.GRAD_OPC[a]=s)),s}function O(e,t,n){var i="radial"==t.type,o=L(e,t.stops),r=i?[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=H(e,i,t.stops,r,o.colors,t.userSpace&&n),a=o.hasAlpha?N(e,i,t.stops,r,o.opacities,t.userSpace&&n):null;return{hasAlpha:o.hasAlpha,shading:s,opacity:a}}function V(e){return e.replace(/^\s*(['"])(.*)\1\s*$/,"$2")}function U(e){var t,n=/^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,i=n.exec(e);return i?(t=i[8]?parseInt(i[8],10):12,{italic:i[2]&&"italic"==i[2].toLowerCase(),variant:i[4],bold:i[6]&&/bold|700/i.test(i[6]),fontSize:t,lineHeight:i[12]?"normal"==i[12]?t:parseInt(i[12],10):null,fontFamily:i[14].split(/\s*,\s*/g).map(V)}):{fontSize:12,fontFamily:"sans-serif"}}function W(e){function t(t){return e.bold&&(t+="|bold"),e.italic&&(t+="|italic"),t.toLowerCase()}var n,i,o,r=e.fontFamily;if(r instanceof Array)for(o=0;o<r.length&&(n=t(r[o]),
!(i=rt[n]));++o);else i=rt[r.toLowerCase()];for(;"function"==typeof i;)i=i();return i||(i="Times-Roman"),i}function j(e,t){e=e.toLowerCase(),rt[e]=function(){return rt[t]},rt[e+"|bold"]=function(){return rt[t+"|bold"]},rt[e+"|italic"]=function(){return rt[t+"|italic"]},rt[e+"|bold|italic"]=function(){return rt[t+"|bold|italic"]}}function q(e,t){if(1==arguments.length)for(var n in e)y(e,n)&&q(n,e[n]);else switch(e=e.toLowerCase(),rt[e]=t,e){case"dejavu sans":rt["sans-serif"]=t;break;case"dejavu sans|bold":rt["sans-serif|bold"]=t;break;case"dejavu sans|italic":rt["sans-serif|italic"]=t;break;case"dejavu sans|bold|italic":rt["sans-serif|bold|italic"]=t;break;case"dejavu serif":rt.serif=t;break;case"dejavu serif|bold":rt["serif|bold"]=t;break;case"dejavu serif|italic":rt["serif|italic"]=t;break;case"dejavu serif|bold|italic":rt["serif|bold|italic"]=t;break;case"dejavu mono":rt.monospace=t;break;case"dejavu mono|bold":rt["monospace|bold"]=t;break;case"dejavu mono|italic":rt["monospace|italic"]=t;break;case"dejavu mono|bold|italic":rt["monospace|bold|italic"]=t}}function G(e,t){var n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=t[0],c=t[1],d=t[2],u=t[3],h=t[4],f=t[5];return[n*l+i*d,n*c+i*u,o*l+r*d,o*c+r*u,s*l+a*d+h,s*c+a*u+f]}function $(e){return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}function Y(e,t){function n(e,t,n){return n||(n=a),n.pdf&&null!=n.pdf[e]?n.pdf[e]:t}function i(){function i(e){var t,i,o,s,a,l=e.options,c=ve(e),d=c.bbox;e=c.root,t=n("paperSize",n("paperSize","auto"),l),i=!1,"auto"==t&&(d?(o=d.getSize(),t=[o.width,o.height],i=!0,s=d.getOrigin(),c=new ye.Group,c.transform(new xe.Matrix(1,0,0,1,(-s.x),(-s.y))),c.append(e),e=c):t="A4"),a=r.addPage({paperSize:t,margin:n("margin",n("margin"),l),addMargin:i,landscape:n("landscape",n("landscape",!1),l)}),J(e,a,r)}if(!(--o>0)){var r=new p({producer:n("producer"),title:n("title"),author:n("author"),subject:n("subject"),keywords:n("keywords"),creator:n("creator"),date:n("date")});l?e.children.forEach(i):i(e),t(r.render(),r)}}var o,r=[],s=[],a=e.options,l=n("multiPage");e.traverse(function(e){Z({Image:function(e){s.indexOf(e.src())<0&&s.push(e.src())},Text:function(e){var t=U(e.options.font),n=W(t);r.indexOf(n)<0&&r.push(n)}},e)}),o=2,je(r,i),qe(s,i)}function K(e,t){Y(e,function(e){t("data:application/pdf;base64,"+e.base64())})}function Q(e,t){Y(e,function(e){t(new window.Blob([e.get()],{type:"application/pdf"}))})}function X(t,n,i,o){window.Blob&&!we.safari?Q(t,function(t){e.saveAs({dataURI:t,fileName:n}),o&&o(t)}):K(t,function(t){e.saveAs({dataURI:t,fileName:n,proxyURL:i}),o&&o(t)})}function Z(e,t){var n=e[t.nodeType];return n?n.call.apply(n,arguments):t}function J(e,t,n){var i,o,r;e.options._pdfDebug&&t.comment("BEGIN: "+e.options._pdfDebug),i=e.transform(),o=e.opacity(),t.save(),null!=o&&o<1&&t.setOpacity(o),ee(e,t,n),te(e,t,n),i&&(r=i.matrix(),t.transform(r.a,r.b,r.c,r.d,r.e,r.f)),ne(e,t,n),Z({Path:le,MultiPath:ce,Circle:de,Arc:ue,Text:he,Image:pe,Group:fe,Rect:me},e,t,n),t.restore(),e.options._pdfDebug&&t.comment("END: "+e.options._pdfDebug)}function ee(e,t){var n,i,o,r,s,a,l=e.stroke&&e.stroke();if(l){if(n=l.color){if(n=ge(n),null==n)return;t.setStrokeColor(n.r,n.g,n.b),1!=n.a&&t.setStrokeOpacity(n.a)}if(i=l.width,null!=i){if(0===i)return;t.setLineWidth(i)}o=l.dashType,o&&t.setDashPattern(lt[o],0),r=l.lineCap,r&&t.setLineCap(ct[r]),s=l.lineJoin,s&&t.setLineJoin(dt[s]),a=l.opacity,null!=a&&t.setStrokeOpacity(a)}}function te(e,t){var n,i,o=e.fill&&e.fill();if(o&&!(o instanceof ye.Gradient)){if(n=o.color){if(n=ge(n),null==n)return;t.setFillColor(n.r,n.g,n.b),1!=n.a&&t.setFillOpacity(n.a)}i=o.opacity,null!=i&&t.setFillOpacity(i)}}function ne(e,t,n){var i=e.clip();i&&(ae(i,t,n),t.clip())}function ie(e){return e&&(e instanceof ye.Gradient||e.color&&!/^(none|transparent)$/i.test(e.color)&&(null==e.width||e.width>0)&&(null==e.opacity||e.opacity>0))}function oe(e,t,n,i){var o,r,s,a,l,c,d,u,h=e.fill();if(h instanceof ye.Gradient)return i?t.clipStroke():t.clip(),o=h instanceof ye.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,n=e.offset();return n=/%$/.test(n)?parseFloat(n)/100:parseFloat(n),t=ge(e.color()),t.a*=e.opacity(),{offset:n,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 re(e,t,n){ie(e.fill())&&ie(e.stroke())?oe(e,t,n,!0)||t.fillStroke():ie(e.fill())?oe(e,t,n,!1)||t.fill():ie(e.stroke())?t.stroke():t.nop()}function se(e,t){var n,i,o,r=e.segments;if(4==r.length&&e.options.closed){for(n=[],i=0;i<r.length;++i){if(r[i].controlIn())return!1;n[i]=r[i].anchor()}if(o=n[0].y==n[1].y&&n[1].x==n[2].x&&n[2].y==n[3].y&&n[3].x==n[0].x||n[0].x==n[1].x&&n[1].y==n[2].y&&n[2].x==n[3].x&&n[3].y==n[0].y)return t.rect(n[0].x,n[0].y,n[2].x-n[0].x,n[2].y-n[0].y),!0}}function ae(e,t,n){var i,o,r,s,a,l,c=e.segments;if(0!==c.length&&!se(e,t,n)){for(o=0;o<c.length;++o)r=c[o],s=r.anchor(),i?(a=i.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),i=r;e.options.closed&&t.close()}}function le(e,t,n){ae(e,t,n),re(e,t,n)}function ce(e,t,n){var i,o=e.paths;for(i=0;i<o.length;++i)ae(o[i],t,n);re(e,t,n)}function de(e,t,n){var i=e.geometry();t.circle(i.center.x,i.center.y,i.radius),re(e,t,n)}function ue(e,t,n){var i,o=e.geometry().curvePoints();for(t.moveTo(o[0].x,o[0].y),i=1;i<o.length;)t.bezier(o[i].x,o[i++].y,o[i].x,o[i++].y,o[i].x,o[i++].y);re(e,t,n)}function he(e,t){var n,i=U(e.options.font),o=e._position;e.fill()&&e.stroke()?n=at.fillAndStroke:e.fill()?n=at.fill:e.stroke()&&(n=at.stroke),t.transform(1,0,0,-1,o.x,o.y+i.fontSize),t.beginText(),t.setFont(W(i),i.fontSize),t.setTextRenderingMode(n),t.showText(e.content(),e._pdfRect?e._pdfRect.width():null),t.endText()}function fe(e,t,n){var i,o;for(e._pdfLink&&t.addLink(e._pdfLink.url,e._pdfLink),i=e.children,o=0;o<i.length;++o)J(i[o],t,n)}function pe(e,t){var n,i,o,r=e.src();r&&(n=e.rect(),i=n.getOrigin(),o=n.getSize(),t.transform(o.width,0,0,-o.height,i.x,i.y+o.height),t.drawImage(r))}function me(e,t,n){var i=e.geometry();t.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),re(e,t,n)}function ge(t){var n=e.parseColor(t,!0);return n?n.toRGB():null}function ve(e){function t(e){return a=!0,e}function n(e){return e.visible()&&e.opacity()>0&&(ie(e.fill())||ie(e.stroke()))}function i(e){var t,n,i=[];for(t=0;t<e.length;++t)n=s(e[t]),null!=n&&i.push(n);return i}function o(e,t){var n,i=l,o=c;e.transform()&&(c=c.multiplyCopy(e.transform().matrix())),n=e.clip(),n&&(n=n.bbox(),n&&(n=n.bbox(c),l=l?xe.Rect.intersect(l,n):n));try{return t()}finally{l=i,c=o}}function r(e){if(null==l)return!1;var t=e.rawBBox().bbox(c);return l&&t&&(t=xe.Rect.intersect(t,l)),t}function s(s){return o(s,function(){if(!(s instanceof ye.Group||s instanceof ye.MultiPath)){var o=r(s);if(!o)return t(null);d=d?xe.Rect.union(d,o):o}return Z({Path:function(e){return 0!==e.segments.length&&n(e)?e:t(null)},MultiPath:function(e){if(!n(e))return t(null);var o=new ye.MultiPath(e.options);return o.paths=i(e.paths),0===o.paths.length?t(null):o},Circle:function(e){return n(e)?e:t(null)},Arc:function(e){return n(e)?e:t(null)},Text:function(e){return/\S/.test(e.content())&&n(e)?e:t(null)},Image:function(e){return e.visible()&&e.opacity()>0?e:t(null)},Group:function(n){var o=new ye.Group(n.options);return o.children=i(n.children),o._pdfLink=n._pdfLink,n===e||0!==o.children.length||n._pdfLink?o:t(null)},Rect:function(e){return n(e)?e:t(null)}},s)})}var a,l=!1,c=xe.Matrix.unit(),d=null;do a=!1,e=s(e);while(e&&a);return{root:e,bbox:d}}function _e(e,t){var n,i=ke.createPromise();for(n in t)"margin"==n&&e.options.pdf&&e.options.pdf._ignoreMargin||e.options.set("pdf."+n,t[n]);return K(e,i.resolve),i}var be,we,ye,ke,xe,Ce,Se,Te,De,Ae,Ee,Me,Re,Ie,Fe,ze,Pe,Be,Le,He,Ne,Oe,Ve,Ue,We,je,qe,Ge,$e,Ye,Ke,Qe,Xe,Ze,Je,et,tt,nt,it,ot,rt,st,at,lt,ct,dt;window.kendo.pdf=window.kendo.pdf||{},be=e.support,we=be.browser,ye=e.drawing,ke=ye.util,xe=e.geometry,Ce="undefined"!=typeof Uint8Array,Se=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var n,i,o,r,s,a,l,c=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),d=0,u=c.length,h=[];d<u;)n=e.indexOf(c.charAt(d++)),i=e.indexOf(c.charAt(d++)),o=e.indexOf(c.charAt(d++)),r=e.indexOf(c.charAt(d++)),s=n<<2|i>>>4,a=(15&i)<<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 n,i,o,r,s,a,l,c=0,d=t.length,u="";c<d;)n=t[c++],i=t[c++],o=t[c++],r=n>>>2,s=(3&n)<<4|i>>>4,a=(15&i)<<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}}}(),s.prototype={readTable:function(e,t){var n=this.tables[e];if(!n)throw Error("Table "+e+" not found in directory");return this[e]=n.table=new t(this,n)},render:function(e){var n,i,r,s,a,l,c,d,u=this,h=Object.keys(e).length,f=Math.pow(2,Math.floor(Math.log(h)/Math.LN2)),p=16*f,m=Math.floor(Math.log(f)/Math.LN2),g=16*h-p,v=t();v.writeLong(this.scalerType),v.writeShort(h),v.writeShort(p),v.writeShort(m),v.writeShort(g),n=16*h,i=v.offset()+n,r=null,s=t();for(a in e)if(o(e,a))for(l=e[a],v.writeString(a),v.writeLong(u.checksum(l)),v.writeLong(i),v.writeLong(l.length),s.write(l),"head"==a&&(r=i),i+=l.length;i%4;)s.writeByte(0),i++;return v.write(s.get()),c=this.checksum(v.get()),d=2981146554-c,v.offset(r+8),v.writeLong(d),v.get()},checksum:function(e){e=t(e);for(var n=0;!e.eof();)n+=e.readLong();return 4294967295&n}},Te=a({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 n=t();return n.writeLong(this.version),n.writeLong(this.revision),n.writeLong(0),n.writeLong(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.write(this.created),n.write(this.modified),n.writeShort_(this.xMin),n.writeShort_(this.yMin),n.writeShort_(this.xMax),n.writeShort_(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort_(this.fontDirectionHint),n.writeShort_(e),n.writeShort_(this.glyphDataFormat),n.get()}}),De=a({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 n,i=t(),o=e[e.length-1]>65535;for(n=0;n<e.length;++n)o?i.writeLong(e[n]):i.writeShort(e[n]/2);return{format:o?1:0,table:i.get()}}}),Ae=a({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 n=t();return n.writeLong(this.version),n.writeShort_(this.ascent),n.writeShort_(this.descent),n.writeShort_(this.lineGap),n.writeShort(this.advanceWidthMax),n.writeShort_(this.minLeftSideBearing),n.writeShort_(this.minRightSideBearing),n.writeShort_(this.xMaxExtent),n.writeShort_(this.caretSlopeRise),n.writeShort_(this.caretSlopeRun),n.writeShort_(this.caretOffset),n.write([0,0,0,0,0,0,0,0]),n.writeShort_(this.metricDataFormat),n.writeShort(e.length),n.get()}}),Ee=a({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 n=t();return n.writeLong(this.version),n.writeShort(e.length),n.writeShort(this.maxPoints),n.writeShort(this.maxContours),n.writeShort(this.maxComponentPoints),n.writeShort(this.maxComponentContours),n.writeShort(this.maxZones),n.writeShort(this.maxTwilightPoints),n.writeShort(this.maxStorage),n.writeShort(this.maxFunctionDefs),n.writeShort(this.maxInstructionDefs),n.writeShort(this.maxStackElements),n.writeShort(this.maxSizeOfInstructions),n.writeShort(this.maxComponentElements),n.writeShort(this.maxComponentDepth),n.get()}}),Me=a({parse:function(e){var t,n,i;e.offset(this.offset),t=this.file,n=t.hhea,this.metrics=e.times(n.numOfLongHorMetrics,function(){return{advance:e.readShort(),lsb:e.readShort_()}}),i=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics,this.leftSideBearings=e.times(i,e.readShort_)},forGlyph:function(e){var t=this.metrics,n=t.length;return e<n?t[e]:{advance:t[n-1].advance,lsb:this.leftSideBearings[e-n]}},render:function(e){var n,i,o=this,r=t();for(n=0;n<e.length;++n)i=o.forGlyph(e[n]),r.writeShort(i.advance),r.writeShort_(i.lsb);return r.get()}}),Re=function(){function e(e){this.raw=e}function n(e){var t,n,o;for(this.raw=e,t=this.glyphIds=[],n=this.idOffsets=[];;){if(o=e.readShort(),n.push(e.offset()),t.push(e.readShort()),!(o&s))break;e.skip(o&i?4:2),o&c?e.skip(8):o&l?e.skip(4):o&r&&e.skip(2)}}var i,r,s,l,c;return e.prototype={compound:!1,render:function(){return this.raw.get()}},i=1,r=8,s=32,l=64,c=128,n.prototype={compound:!0,render:function(e){var n,i,o=this,r=t(this.raw.get());for(n=0;n<this.glyphIds.length;++n)i=o.glyphIds[n],r.offset(o.idOffsets[n]),r.writeShort(e[i]);return r.get()}},a({parse:function(){this.cache={}},glyphFor:function(i){var r,s,a,l,c,d,u,h,f,p,m,g=this.cache;return o(g,i)?g[i]:(r=this.file.loca,s=r.lengthOf(i),0===s?g[i]=null:(a=this.rawData,l=this.offset+r.offsetOf(i),c=t(a.slice(l,s)),d=c.readShort_(),u=c.readShort_(),h=c.readShort_(),f=c.readShort_(),p=c.readShort_(),m=g[i]=d==-1?new n(c):new e(c),m.numberOfContours=d,m.xMin=u,m.yMin=h,m.xMax=f,m.yMax=p,m))},render:function(e,n,i){var o,r,s,a=t(),l=[];for(o=0;o<n.length;++o)r=n[o],s=e[r],l.push(a.offset()),s&&a.write(s.render(i));return l.push(a.offset()),{table:a.get(),offsets:l}}})}(),Ie=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 a({parse:function(t){var n,i,o,r,s,a,l;for(t.offset(this.offset),t.readShort(),n=t.readShort(),i=this.offset+t.readShort(),o=t.times(n,function(){return{platformID:t.readShort(),platformSpecificID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:t.readShort()+i}}),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(n){var i,r,s,a,l,c,d=this,u=this.strings,h=0;for(i in u)o(u,i)&&(h+=u[i].length);r=t(),s=t(),r.writeShort(0),r.writeShort(h),r.writeShort(6+12*h);for(i in u)if(o(u,i))for(a=6==i?[new e(n,d.postscriptEntry)]:u[i],l=0;l<a.length;++l)c=a[l],r.writeShort(c.platformID),r.writeShort(c.platformSpecificID),r.writeShort(c.languageID),r.writeShort(c.nameID),r.writeShort(c.length),r.writeShort(s.offset()),s.writeString(c.text);return r.write(s.get()),r.get()}})}(),Fe=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 a({parse:function(e){var t,n,i=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=[],n=this.offset+this.length;e.offset()<n;)i.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 n=this.glyphNameIndex[t];return n<e.length?e[n]:this.names[n-e.length]||".notdef";case 151552:case 196608:return".notdef";case 262144:return this.map[t]||65535}},render:function(n){var i,o,r,s,a,l,c,d=this;if(196608==this.format)return this.raw();for(i=t(this.rawData.slice(this.offset,32)),i.writeLong(131072),i.offset(32),o=[],r=[],s=0;s<n.length;++s)a=n[s],l=d.glyphFor(a),c=e.indexOf(l),c>=0?o.push(c):(o.push(e.length+r.length),r.push(l));for(i.writeShort(n.length),s=0;s<o.length;++s)i.writeShort(o[s]);for(s=0;s<r.length;++s)i.writeByte(r[s].length),i.writeString(r[s]);return i.get()}})}(),ze=function(){function e(e,t,n){var i=this;i.platformID=e.readShort(),i.platformSpecificID=e.readShort(),i.offset=t+e.readLong(),e.saveExcursion(function(){var t,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b;switch(e.offset(i.offset),i.format=e.readShort()){case 0:for(i.length=e.readShort(),i.language=e.readShort(),o=0;o<256;++o)n[o]=e.readByte();break;case 4:for(i.length=e.readShort(),i.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=(i.length+i.offset-e.offset())/2,u=e.times(d,e.readShort),o=0;o<r;++o)for(h=a[o],f=s[o],t=h;t<=f;++t)0===c[o]?p=t+l[o]:(m=c[o]/2-(r-o)+(t-h),p=u[m]||0,0!==p&&(p+=l[o])),n[t]=65535&p;break;case 6:for(i.length=e.readShort(),i.language=e.readShort(),t=e.readShort(),g=e.readShort();g-- >0;)n[t++]=e.readShort();break;case 12:for(e.readShort(),i.length=e.readLong(),i.language=e.readLong(),v=e.readLong();v-- >0;)for(t=e.readLong(),_=e.readLong(),b=e.readLong();t<=_;)n[t++]=b++;break;default:window.console&&window.console.error("Unhandled CMAP format: "+i.format)}})}function n(e,n){function i(t){return n[e[t]]}var o,s,a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k=r(e),x=[],C=[],S=null,T=null;for(o=0;o<k.length;++o)s=k[o],a=i(s),l=a-s,null!=S&&l===T||(S&&C.push(S),x.push(s),T=l),S=s;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,f=d-u,p=[],m=[],g=[],o=0;o<c;++o){if(v=x[o],_=C[o],65535==v){p.push(0),m.push(0);break}if(b=i(v),v-b>=32768)for(p.push(0),m.push(2*(g.length+c-o)),w=v;w<=_;++w)g.push(i(w));else p.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(f),C.forEach(y.writeShort),y.writeShort(0),x.forEach(y.writeShort),p.forEach(y.writeShort_),m.forEach(y.writeShort),g.forEach(y.writeShort),y.get()}return a({parse:function(t){var n,i=this,o=i.offset;t.offset(o),i.codeMap={},i.version=t.readShort(),n=t.readShort(),i.tables=t.times(n,function(){return new e(t,o,i.codeMap)})},render:function(e,i){var o=t();return o.writeShort(0),o.writeShort(1),o.write(n(e,i)),o.get()}})}(),Pe=a({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()}}),Be=1e5,c.prototype={use:function(e){var t,i,o,r=this;return"string"==typeof e?n(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,i=r.font.cmap.codeMap[e],i&&(r.ncid2ogid[t]=i,null==r.ogid2ngid[i]&&(o=r.nextGid++,r.ogid2ngid[i]=o,r.ngid2ogid[o]=i))),t)},encodeText:function(e){return this.use(e)},glyphIds:function(){return r(this.ogid2ngid)},glyphsFor:function(e,t){var n,i,o,r=this;for(t||(t={}),n=0;n<e.length;++n)i=e[n],t[i]||(o=t[i]=r.font.glyf.glyphFor(i),o&&o.compound&&r.glyphsFor(o.glyphIds,t));return t},render:function(){var e,t,n,i,s,a,l,c,d=this,u=this.glyphsFor(this.glyphIds());for(e in u)o(u,e)&&(e=parseInt(e,10),null==d.ogid2ngid[e]&&(t=d.nextGid++,d.ogid2ngid[e]=t,d.ngid2ogid[t]=e));return n=r(this.ngid2ogid),i=n.map(function(e){return this.ngid2ogid[e]},this),s=this.font,a=s.glyf.render(u,i,this.ogid2ngid),l=s.loca.render(a.offsets),this.lastChar=this.next-1,c={cmap:ze.render(this.ncid2ogid,this.ogid2ngid),glyf:a.table,loca:l.table,hmtx:s.hmtx.render(i),hhea:s.hhea.render(i),maxp:s.maxp.render(i),post:s.post.render(i),name:s.name.render(this.psName),head:s.head.render(l.format),"OS/2":s.os2.render()},this.font.directory.render(c)},cidToGidMap:function(){var e,n,i,o=this,r=t(),s=0;for(e=this.firstChar;e<this.next;++e){for(;s<e;)r.writeShort(0),s++;n=o.ncid2ogid[e],n?(i=o.ogid2ngid[n],r.writeShort(i)):r.writeShort(0),s++}return r.get()}},d.prototype={parse:function(){var e=this.directory=new s(this.contents);this.head=e.readTable("head",Te),this.loca=e.readTable("loca",De),this.hhea=e.readTable("hhea",Ae),this.maxp=e.readTable("maxp",Ee),this.hmtx=e.readTable("hmtx",Me),this.glyf=e.readTable("glyf",Re),this.name=e.readTable("name",Ie),this.post=e.readTable("post",Fe),this.cmap=e.readTable("cmap",ze),this.os2=e.readTable("OS/2",Pe),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 c(this)}},Le=e.support.browser,He="undefined"!=typeof Uint8Array,Ne="\n",Oe=0,Ve={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]},Ue={"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},We={},je=_(g),qe=_(v),p.prototype={loadFonts:je,loadImages:qe,getFont:function(e){var t=this.FONTS[e];if(!t){if(t=Ue[e],!t)throw Error("Font "+e+" has not been loaded");t=this.attach(t===!0?new tt(e):new nt(this,t)),this.FONTS[e]=t}return t},getImage:function(e){var t=this.IMAGES[e];if(!t){if(t=We[e],!t)throw Error("Image "+e+" has not been loaded");if("TAINTED"===t)return null;t=this.IMAGES[e]=this.attach(t.asStream(this))}return t},getOpacityGS:function(e,t){var n,i,o,r=parseFloat(e).toFixed(3);return e=parseFloat(r),r+=t?"S":"F",n=this._opacityGSCache||(this._opacityGSCache={}),i=n[r],i||(o={Type:R("ExtGState")},t?o.CA=e:o.ca=e,i=this.attach(new Xe(o)),i._resourceName=R("GS"+ ++Oe),n[r]=i),i},dict:function(e){return new Xe(e)},name:function(e){return R(e)},stream:function(e,t){return new Ze(t,e)}},Ge=Array.isArray||function(e){return e instanceof Array},E.prototype.beforeRender=function(){},$e=M(function(e){this.value=e},{render:function(e){var t,n="",i=this.value;for(t=0;t<i.length;++t)n+=String.fromCharCode(255&i.charCodeAt(t));e("(",n.replace(/([\(\)\\])/g,"\\$1"),")")},toString:function(){return this.value}}),Ye=M(function(e){this.value=e},{render:function(e){var t,n=this;for(e("<"),t=0;t<this.value.length;++t)e(w(n.value.charCodeAt(t).toString(16),4));e(">")}},$e),Ke=M(function(e){this.name=e},{render:function(e){e("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return"#"+w(e.charCodeAt(0).toString(16),2)})},toString:function(){return this.name}}),Qe={},Ke.get=R,Xe=M(function(e){this.props=e},{render:function(e){var t=this.props,n=!0;e("<<"),e.withIndent(function(){for(var i in t)y(t,i)&&!/^_/.test(i)&&(n=!1,e.indent(R(i)," ",t[i]))}),n||e.indent(),e(">>")}}),Ze=M(function(e,n,i){if("string"==typeof e){var o=t();o.write(e),e=o}this.data=e,this.props=n||{},this.compress=i},{render:function(e){var t=this.data.get(),n=this.props;this.compress&&window.pako&&"function"==typeof window.pako.deflate&&(n.Filter?n.Filter instanceof Array||(n.Filter=[n.Filter]):n.Filter=[],n.Filter.unshift(R("FlateDecode")),t=window.pako.deflate(t)),n.Length=t.length,e(new Xe(n)," stream",Ne),e.writeData(t),e(Ne,"endstream")}}),Je=M(function(e){e=this.props=e||{},e.Type=R("Catalog")},{setPages:function(e){this.props.Pages=e}},Xe),et=M(function(){this.props={Type:R("Pages"),Kids:[],Count:0}},{addPage:function(e){this.props.Kids.push(e),this.props.Count++}},Xe),tt=M(function(e){this.props={Type:R("Font"),Subtype:R("Type1"),BaseFont:R(e)},this._resourceName=R("F"+ ++Oe)},{encodeText:function(e){return new $e(e+"")}},Xe),nt=M(function(e,t,n){var i,o;n=this.props=n||{},n.Type=R("Font"),n.Subtype=R("Type0"),n.Encoding=R("Identity-H"),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=R("F"+ ++Oe),i=t.head,this.name=t.psName,o=this.scale=t.scale,this.bbox=[i.xMin*o,i.yMin*o,i.xMax*o,i.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 Ye(this._sub.encodeText(e+""))},getTextWidth:function(e,t){var n,i,o=this,r=0,s=this._font.cmap.codeMap;for(n=0;n<t.length;++n)i=s[t.charCodeAt(n)],r+=o._font.widthOfGlyph(i||0);return r*e/1e3},beforeRender:function(){var e,n,i,o,r=this,s=r._sub,a=s.render(),l=new Ze(t(a),{Length1:a.length},(!0)),c=r._pdf.attach(new Xe({Type:R("FontDescriptor"),FontName:R(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,h=s.firstChar,f=s.lastChar,p=[];!function m(e,t){if(e<=f){var n=d[e];null==n?m(e+1):(t||p.push(e,t=[]),t.push(r._font.widthOfGlyph(n)),m(e+1,t))}}(h),e=new Xe({Type:R("Font"),Subtype:R("CIDFontType2"),BaseFont:R(r._sub.psName),CIDSystemInfo:new Xe({Registry:new $e("Adobe"),Ordering:new $e("Identity"),Supplement:0}),FontDescriptor:c,FirstChar:h,LastChar:f,DW:Math.round(r._font.widthOfGlyph(0)),W:p,CIDToGIDMap:r._pdf.attach(r._makeCidToGidMap())}),n=r.props,n.BaseFont=R(r._sub.psName),n.DescendantFonts=[r._pdf.attach(e)],i=new it(h,f,s.subset),o=new Ze(u(),null,(!0)),o.data(i),n.ToUnicode=r._pdf.attach(o)},_makeCidToGidMap:function(){return new Ze(t(this._sub.cidToGidMap()),null,(!0))}},Xe),it=M(function(e,t,n){this.firstChar=e,this.lastChar=t,this.map=n},{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 n,o,r,s;for(n=t.firstChar;n<=t.lastChar;++n){for(o=t.map[n],r=i([o]),e.indent("<",w(n.toString(16),4),">","<"),s=0;s<r.length;++s)e(w(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")}}),ot=M(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=R("Page"),t.ProcSet=[R("PDF"),R("Text"),R("ImageB"),R("ImageC"),R("ImageI")],t.Resources=new Xe({Font:new Xe(this._fontResources),ExtGState:new Xe(this._gsResources),XObject:new Xe(this._xResources),Pattern:new Xe(this._patResources),Shading:new Xe(this._shResources)}),t.Annots=this._annotations},{_out:function(){this._content.data.apply(null,arguments)},transform:function(e,t,n,i,o,r){$(arguments)||(this._matrix=G(arguments,this._matrix),this._out(e," ",t," ",n," ",i," ",o," ",r," cm"),this._out(Ne))},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),n=Math.sin(e);this.transform(t,n,-n,t,0,0)},beginText:function(){this._textMode=!0,this._out("BT",Ne)},endText:function(){this._textMode=!1,this._out("ET",Ne)},_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 nt||(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",Ne)},setTextLeading:function(e){this._requireTextMode(),this._out(e," TL",Ne)},setTextRenderingMode:function(e){this._requireTextMode(),this._out(e," Tr",Ne)},showText:function(e,t){var n,i;this._requireFont(),e.length>1&&t&&this._font instanceof nt&&(n=this._font.getTextWidth(this._fontSize,e),i=t/n*100,this._out(i," Tz ")),this._out(this._font.encodeText(e)," Tj",Ne)},showTextNL:function(e){this._requireFont(),this._out(this._font.encodeText(e)," '",Ne)},addLink:function(e,t){var n=this._toPage({x:t.left,y:t.bottom}),i=this._toPage({x:t.right,y:t.top});this._annotations.push(new Xe({Type:R("Annot"),Subtype:R("Link"),Rect:[n.x,n.y,i.x,i.y],Border:[0,0,0],A:new Xe({Type:R("Action"),S:R("URI"),URI:new $e(e)})}))},setStrokeColor:function(e,t,n){this._out(e," ",t," ",n," RG",Ne)},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",Ne)}},setFillColor:function(e,t,n){this._out(e," ",t," ",n," rg",Ne)},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",Ne)}},gradient:function(e,t){var n,i,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),n=O(this._pdf,e,t),i=n.shading._resourceName,this._shResources[i]=n.shading,n.hasAlpha&&(o=n.opacity._resourceName,this._gsResources[o]=n.opacity,this._out("/"+o+" gs ")),this._out("/"+i+" sh",Ne),this.restore()},setDashPattern:function(e,t){this._out(e," ",t," d",Ne)},setLineWidth:function(e){this._out(e," w",Ne)},setLineCap:function(e){this._out(e," J",Ne)},setLineJoin:function(e){this._out(e," j",Ne)},setMitterLimit:function(e){this._out(e," M",Ne)},save:function(){this._contextStack.push(this._context()),this._out("q",Ne)},restore:function(){this._out("Q",Ne),this._context(this._contextStack.pop())},moveTo:function(e,t){this._out(e," ",t," m",Ne)},lineTo:function(e,t){this._out(e," ",t," l",Ne)},bezier:function(e,t,n,i,o,r){this._out(e," ",t," ",n," ",i," ",o," ",r," c",Ne)},bezier1:function(e,t,n,i){this._out(e," ",t," ",n," ",i," y",Ne)},bezier2:function(e,t,n,i){this._out(e," ",t," ",n," ",i," v",Ne)},close:function(){this._out("h",Ne)},rect:function(e,t,n,i){this._out(e," ",t," ",n," ",i," re",Ne)},ellipse:function(e,t,n,i){function o(t){return e+t}function r(e){return t+e}var s=.5522847498307936;this.moveTo(o(0),r(i)),this.bezier(o(n*s),r(i),o(n),r(i*s),o(n),r(0)),this.bezier(o(n),r(-i*s),o(n*s),r(-i),o(0),r(-i)),this.bezier(o(-n*s),r(-i),o(-n),r(-i*s),o(-n),r(0)),this.bezier(o(-n),r(i*s),o(-n*s),r(i),o(0),r(i))},circle:function(e,t,n){this.ellipse(e,t,n,n)},stroke:function(){this._out("S",Ne)},nop:function(){this._out("n",Ne)},clip:function(){this._out("W n",Ne)},clipStroke:function(){this._out("W S",Ne)},closeStroke:function(){this._out("s",Ne)},fill:function(){this._out("f",Ne)},fillStroke:function(){this._out("B",Ne)},drawImage:function(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",Ne))},comment:function(e){var t=this;e.split(/\r?\n/g).forEach(function(e){t._out("% ",e,Ne)})},_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,n=t[0],i=t[1],o=t[2],r=t[3],s=t[4],a=t[5];return{x:n*e.x+o*e.y+s,y:i*e.x+r*e.y+a}}},Xe),rt={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"},j("Times New Roman","serif"),j("Courier New","monospace"),j("Arial","sans-serif"),j("Helvetica","sans-serif"),j("Verdana","sans-serif"),j("Tahoma","sans-serif"),j("Georgia","sans-serif"),j("Monaco","monospace"),j("Andale Mono","monospace"),st={fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7},at=st,lt={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:[]},ct={butt:0,round:1,square:2},dt={miter:0,round:1,bevel:2},e.deepExtend(e.pdf,{Document:p,BinaryStream:t,defineFont:q,parseFontDef:U,getFontURL:W,loadFonts:je,loadImages:qe,getPaperOptions:f,TEXT_RENDERING_MODE:st,exportPDF:_e,saveAs:X,toDataURL:K,toBlob:Q,render:Y}),e.drawing.exportPDF=e.pdf.exportPDF,e.drawing.pdf=e.pdf}(kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n=new e.Deferred,i=n.promise(),o={promise:i};if(!this.trigger("pdfExport",o))return t=this.options.pdf,t.multiPage=t.multiPage||t.allPages,this._drawPDF(n).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}),n.resolve()}).fail(function(e){n.reject(e)}),i},_drawPDF:function(t){var n=new e.Deferred;return kendo.drawing.drawDOM(this.wrapper).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)}),n},_drawPDFShadow:function(t,n){var i,o,r;return t=t||{},i=this.wrapper,o=e("<div class='k-pdf-export-shadow'>"),t.width&&o.css({width:t.width,overflow:"visible"}),i.before(o),o.append(t.content||i.clone(!0,!0)),r=e.Deferred(),setTimeout(function(){var e=kendo.drawing.drawDOM(o,n);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,n){(n||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,n){(n||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 n(e){return Array(e+1).join('<td class="k-group-cell">&nbsp;</td>')}function i(e){var t,n=" ";if(e){if(typeof e===ht)return e;for(t in e)n+=t+'="'+e[t]+'"'}return n}function o(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function r(t,n,i,o,r){var s,a=n;for(n=e(),r=r||1,s=0;s<r;s++)n=n.add(t.eq(a+s));"number"==typeof i?n[o?"insertBefore":"insertAfter"](t.eq(i)):n.appendTo(i)}function s(t,n,i){return e(t).add(n).find(i)}function a(e,t,n){var i,o,r,s;for(n=Se(n)?n:[n],i=0,o=n.length;i<o;i++)r=n[i],ye(r)&&r.click&&(s=r.name||r.text,t.on(lt+Oe,"a.k-grid-"+(s||"").replace(/\s/g,""),{commandName:s},Ae(r.click,e)))}function l(e,t,n){return xe(e,function(e){var i,o;return e=typeof e===ht?{field:e}:e,f(e)&&!n||(e.attributes=W(e.attributes),e.footerAttributes=W(e.footerAttributes),e.headerAttributes=W(e.headerAttributes),i=!0),e.columns&&(e.columns=l(e.columns,t,i)),o=he.guid(),e.headerAttributes=ke({id:o},e.headerAttributes),ke({encoded:t,hidden:i},e)})}function c(e,t){var n=[];return d(e,t,n),n[n.length-1]}function d(e,t,n){var i,o;for(n=n||[],i=0;i<t.length;i++){if(e===t[i])return!0;if(t[i].columns){if(o=n.length,n.push(t[i]),d(e,t[i].columns,n))return!0;n.splice(o,n.length-o)}}return!1}function u(e,t){var n=t?j:W;e.hidden=!t,e.attributes=n(e.attributes),e.footerAttributes=n(e.footerAttributes),e.headerAttributes=n(e.headerAttributes)}function h(){return"none"!==this.style.display}function f(e){return p([e]).length>0}function p(e){return Ce(e,function(e){var t=!e.hidden;return t&&e.columns&&(t=p(e.columns).length>0),t})}function m(t){return e(t).map(function(){return this.toArray()})}function g(e,t,n){var i=b(F(t)),o=b(z(t)),r=e.rowSpan;e.rowSpan=n?i>o?r-(i-o)||1:r+(o-i):i>o?r+(i-o):r-(o-i)||1}function v(t,n,i,o,r,s,a){var l,c,d=b(t),u=b([n]);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())),M(s,d-u),w(i,o,r,s)}function _(t,n,i){var o,r,s,a,l,c,d,u;for(i=i||0,s=n,n=H(n),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=n.length;d<u;d++)o=y(n[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(he.attr("index"),i+d);return n.length}function b(e){var t,n,i=1,o=0;for(t=0;t<e.length;t++)e[t].columns&&(n=b(e[t].columns),n>o&&(o=n));return i+o}function w(t,n,i,o){var r,s,a=C(t[0],n),l=i.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&&w(s,n,i,o)}function y(e,t,n,i){var o,r;for(n=n||0,i=i||{},i[n]=i[n]||0,r=0;r<t.length;r++){if(t[r]==e){o={cell:i[n],row:n};break}if(t[r].columns&&(o=y(e,t[r].columns,n+1,i)))break;i[n]++}return o}function k(e,t,n,i){var o,r=n.locked;do o=e[t],t+=i?1:-1;while(o&&t>-1&&t<e.length&&o!=n&&!o.columns&&o.locked==r);return o}function x(e,t,n,i){var o,r,s,a;return t.columns?(t=t.columns,t[i?0:t.length-1]):(o=c(t,e),r=o?o.columns:e,s=Te(t,r),0===s&&i?s++:s!=r.length-1||i?(s>0||0===s&&!i)&&(s+=i?-1:1):s--,a=Te(n,r),t=k(r,s,n,a>s),t&&t!=n&&t.columns?x(e,t,n,i):null)}function C(e,t,n,i){var o,r;for(n=n||0,i=i||{},i[n]=i[n]||0,r=0;r<t.length;r++){if(t[r]==e){o={cell:i[n],row:n};break}if(t[r].columns&&(o=C(e,t[r].columns,n+1,i)))break;t[r].hidden||i[n]++}return o}function S(e){var t=T(F(e));return t.concat(T(z(e)))}function T(e){var t,n=[],i=[];for(t=0;t<e.length;t++)n.push(e[t]),e[t].columns&&(i=i.concat(e[t].columns));return i.length&&(n=n.concat(T(i))),n}function D(e){var t,n,i=0;for(n=0;n<e.length;n++)t=e[n],t.columns?i+=D(t.columns):t.hidden&&i++;return i}function A(e){var t,n,i,o=0;for(n=0,i=e.length;n<i;n++)t=e[n].style.width,t&&t.indexOf("%")==-1&&(o+=parseInt(t,10));return o}function E(e,t){var n,i,o=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(i=0;i<o.length;i++)n=o[i].rowSpan,n>1&&(o[i].rowSpan=n-t||1)}function M(e,t){var n,i=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n<i.length;n++)i[n].rowSpan+=t}function R(t){var n,i=t.find("tr:not(.k-filter-row)"),o=i.filter(function(){return!e(this).children().length}).remove().length,r=i.find("th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n<r.length;n++)r[n].rowSpan>1&&(r[n].rowSpan-=o);return i.length-o}function I(e,t,n,i,o){var r,s,a,l=[];for(r=0,a=e.length;r<a;r++)s=n[i]||[],s.push(t.eq(o+r)),n[i]=s,e[r].columns&&(l=l.concat(e[r].columns));l.length&&I(l,t,n,i+1,o+e.length)}function F(e){return Ce(e,function(e){return e.locked})}function z(e){return Ce(e,function(e){return!e.locked})}function P(e){return Ce(e,function(e){return!e.locked&&f(e)})}function B(e){return Ce(e,function(e){return e.locked&&f(e)})}function L(e){var t,n=[];for(t=0;t<e.length;t++)e[t].hidden||(e[t].columns?n=n.concat(L(e[t].columns)):n.push(e[t]));return n}function H(e){var t,n=[];for(t=0;t<e.length;t++)e[t].columns?n=n.concat(H(e[t].columns)):n.push(e[t]);return n}function N(n){var i,o=n.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)),i=he.attr("index"),s.sort(function(n,o){var r,s;return n=e(n),o=e(o),r=n.attr(i),s=o.attr(i),r===t&&(r=e(n).index()),s===t&&(s=e(o).index()),r=parseInt(r,10),s=parseInt(s,10),r>s?1:r<s?-1:0}),s}function O(t){var n,i,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)"),f=h.index(u);if(f>0){for(n=h.eq(f-1),i=n.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<i.length;a++)if(l=i.eq(a),o+=l.attr("colSpan")?l[0].colSpan:1,r>=a&&r<o){d=O(l).add(d);break}}return d}function V(t){var n,i,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)"),f=h.index(u)+t[0].rowSpan,p=he.attr("colspan");if(f<=h.length-1){for(n=u.next(),i=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),i=i.filter(function(){return!this.rowSpan||1===this.rowSpan}),r=0,o=0;o<i.length;o++)r+=parseInt(i.eq(o).attr(p),10)||1;for(s=n.find("th:not(.k-group-cell,.k-hierarchy-cell)"),a=parseInt(t.attr(p),10)||1,o=0;o<a;)n=s.eq(o+r),d=d.add(V(n)),l=parseInt(n.attr(p),10),l>1&&(a-=l-1),o++}return d}function U(t,n,i,o){var r,s=t;return o&&t.empty(),me?t[0].innerHTML=i:(r=document.createElement("div"),r.innerHTML="<table><tbody>"+i+"</tbody></table>",t=r.firstChild.firstChild,n[0].replaceChild(t,s[0]),t=e(t)),t}function W(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",ke({},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 q(t,n,i,o){var r,s=t.find(">colgroup"),a=xe(n,function(e){return r=e.width,r&&0!==parseInt(r,10)?he.format('<col style="width:{0}"/>',typeof r===ht?r:r+"px"):"<col />"});(i||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),Ct.msie&&8==Ct.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function G(e,t){var n,i,o=0,r=e.find("th:not(.k-group-cell)");for(n=0,i=t.length;n<i;n++)t[n].locked&&(r.eq(n).insertBefore(r.eq(o)),r=e.find("th:not(.k-group-cell)"),o++)}function $(e){var t,n,i,o={};for(n=0,i=e.length;n<i;n++)t=e[n],o[t.value]=t.text;return o}function Y(e,t,n,i){var o=n&&n.length&&ye(n[0])&&"value"in n[0],r=o?$(n)[e]:e;return r=null!=r?r:"",t?he.format(t,r):i===!1?r:he.htmlEncode(r)}function K(e,t,n){for(var i,o=0,r=e[o];r;){if(i=!!n||"none"!==r.style.display,i&&!wt.test(r.className)&&--t<0){r.style.display=n?"":"none";break}r=e[++o]}}function Q(t,n){for(var i,o,r=0,s=t.length;r<s;r+=1)o=t.eq(r),o.is(".k-grouping-row,.k-detail-row")?(i=o.children(":not(.k-group-cell):first,.k-detail-cell").last(),i.attr("colspan",parseInt(i.attr("colspan"),10)-1)):(o.hasClass("k-grid-edit-row")&&(i=o.children(".k-edit-container")[0])&&(i=e(i),i.attr("colspan",parseInt(i.attr("colspan"),10)-1),i.find("col").eq(n).remove(),o=i.find("tr:first")),K(o[0].cells,n,!1))}function X(e){var t,n,i=[];for(n=0;n<e.length&&(t=e[n],"field"in t&&"value"in t&&"items"in t);n++)i.push(t),t.hasSubgroups&&(i=i.concat(X(t.items)));return i}function Z(e){var t,n,i=[];for(n=0;n<e.length&&(t=e[n],"field"in t&&"value"in t&&"items"in t);n++)t.hasSubgroups&&(i=i.concat(Z(t.items))),i.push(t.aggregates);return i}function J(t,n){for(var i,o,r,s=0,a=t.length;s<a;s+=1)o=t.eq(s),o.is(".k-grouping-row,.k-detail-row")?(i=o.children(":not(.k-group-cell):first,.k-detail-cell").last(),i.attr("colspan",parseInt(i.attr("colspan"),10)+1)):(o.hasClass("k-grid-edit-row")&&(i=o.children(".k-edit-container")[0])&&(i=e(i),i.attr("colspan",parseInt(i.attr("colspan"),10)+1),q(i.find(">form>table"),p(r),!1,0),o=i.find("tr:first")),K(o[0].cells,n,!0))}function ee(e,t,n){n=n||1;var i,o,r;for(o=0,r=e.length;o<r;o++)i=e.eq(o).children().last(),i.attr("colspan",parseInt(i.attr("colspan"),10)+n),i=t.eq(o).children().last(),i.attr("colspan",parseInt(i.attr("colspan"),10)-n)}function te(e){var t,n,i=0,o=e.find(">colgroup>col");for(t=0,n=o.length;t<n;t+=1)i+=parseInt(o[t].style.width,10);return i}function ne(e,t){var n,i,o,r;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(n=e.offsetHeight,i=t.offsetHeight,n>i?(o=t.rows[t.rows.length-1],yt.test(o.className)&&(o=t.rows[t.rows.length-2]),r=n-i):(o=e.rows[e.rows.length-1],yt.test(o.className)&&(o=e.rows[e.rows.length-2]),r=i-n),o.style.height=o.offsetHeight+r+"px")}function ie(e,t){var n,i=e.offsetHeight,o=t.offsetHeight;i>o?n=i+"px":i<o&&(n=o+"px"),n&&(e.style.height=t.style.height=n)}function oe(e,t){var n,i,o;if(typeof e===ht&&e===t)return e;if(ye(e)&&e.name===t)return e;if(Se(e))for(n=0,i=e.length;n<i;n++)if(o=e[n],typeof o===ht&&o===t||o.name===t)return o;return null}function re(t,n){var i,o,r=Ct.msie||Ct.edge;if(n===!0){if(t=e(t),i=t.parent().scrollTop(),o=t.parent().scrollLeft(),r)try{t[0].setActive()}catch(s){t[0].focus()}else t[0].focus();t.parent().scrollTop(i).scrollLeft(o)}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function se(e,t){return!!e.field&&(!(t.editable&&!t.editable(e.field))&&!(e.editable&&!e.editable(t)))}function ae(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 le(n){var i=e(n.currentTarget),o=i.is("th"),r=this.table.add(this.lockedTable),s=this.thead.parent().add(e(">table",this.lockedHeader)),a=ae(n.target),l=i.closest("table")[0];if(!he.support.touch)return a&&i.find(he.roleSelector("filtercell")).length?(this._setCurrent(i),t):(l!==r[0]&&l!==r[1]&&l!==s[0]&&l!==s[1]||e(n.target).is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(i),!o&&a||setTimeout(function(){Tt&&e(he._activeElement()).hasClass("k-widget")||ae(he._activeElement())||re(l,!0)}),o&&n.preventDefault()),t)}function ce(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function de(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"></a>'+i+"</p></td></tr>"}function ue(e){return'<tr role="row" class="k-grouping-row"><td colspan="'+e+'" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'}var he=window.kendo,fe=he.ui,pe=he.data.DataSource,me=he.support.tbodyInnerHtml,ge=he._activeElement,ve=fe.Widget,_e=he._outerWidth,be=he._outerHeight,we=he.keys,ye=e.isPlainObject,ke=e.extend,xe=e.map,Ce=e.grep,Se=e.isArray,Te=e.inArray,De=Array.prototype.push,Ae=e.proxy,Ee=he.isFunction,Me=e.isEmptyObject,Re=Math,Ie="progress",Fe="error",ze=":not(.k-group-cell):not(.k-hierarchy-cell):visible",Pe="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",Be="tr:not(.k-footer-template):visible",Le=":not(.k-group-cell):not(.k-hierarchy-cell):visible",He=Be+":first>"+Le+":first",Ne="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",Oe=".kendoGrid",Ve="edit",Ue="save",We="remove",je="detailInit",qe="filterMenuInit",Ge="columnMenuInit",$e="change",Ye="columnHide",Ke="columnShow",Qe="saveChanges",Xe="dataBound",Ze="detailExpand",Je="detailCollapse",et="k-state-focused",tt="k-state-selected",nt="k-grid-norecords",it="columnResize",ot="columnReorder",rt="columnLock",st="columnUnlock",at="navigate",lt="click",ct="height",dt="tabIndex",ut="function",ht="string",ft="Are you sure you want to delete this record?",pt="No records available.",mt="Delete",gt="Cancel",vt=/(\}|\#)/gi,_t=/#/gi,bt="[\\x20\\t\\r\\n\\f]",wt=RegExp("(^|"+bt+")(k-group-cell|k-hierarchy-cell)("+bt+"|$)"),yt=RegExp("(^|"+bt+")(k-filter-row)("+bt+"|$)"),kt='<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',xt=!1,Ct=he.support.browser,St=Ct.msie&&7==Ct.version,Tt=Ct.msie&&8==Ct.version,Dt=ve.extend({init:function(e,t){var n=this;ve.fn.init.call(n,e,t),n._refreshHandler=Ae(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind($e,t._refreshHandler),t.dataSource=e,t.dataSource.bind($e,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0},destroy:function(){var e=this;ve.fn.destroy.call(e),e.dataSource.unbind($e,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(Oe),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,n=this,i=he.support.scrollbar()+1,o=n.element;o.css({width:"auto",overflow:"hidden"}).css(xt?"padding-left":"padding-right",i),n.content=o.children().first(),t=n.wrapper=n.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll"+Oe+" mousewheel"+Oe,Ae(n._wheelScroll,n)),he.support.kineticScrollNeeded&&(n.drag=new he.UserEvents(n.wrapper,{global:!0,start:function(e){e.sender.capture()},move:function(e){n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),n.verticalScrollbar=e('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:i}).appendTo(o).bind("scroll"+Oe,Ae(n._scroll,n))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,n=t.scrollTop(),i=he.wheelDeltaY(e);!i||i>0&&0===n||i<0&&n+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(n+-i))}},_scroll:function(e){var t=this,n=!t.options.prefetch,i=e.currentTarget.scrollTop,o=t.dataSource,r=t.itemHeight,s=o.skip()||0,a=t._rangeStart||s,l=t.element.innerHeight(),c=!!(t._scrollbarTop&&t._scrollbarTop>i),d=Re.max(Re.floor(i/r),0),u=Re.max(d+Re.floor(l/r),0);t._scrollTop=i-a*r,t._scrollbarTop=i,t._scrolling=n,t._fetch(d,u,c)||(t.wrapper[0].scrollTop=t._scrollTop),n&&(t._scrollingTimeout&&clearTimeout(t._scrollingTimeout),t._scrollingTimeout=setTimeout(function(){t._scrolling=!1,t._page(t._rangeStart,t.dataSource.take())},100))},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},position:function(e){var t,n=this._rangeStart||this.dataSource.skip()||0,i=this.dataSource.pageSize();return t=e>n?e-n+1:n-e-1,t>i?i:t},scrollIntoView:function(e){var t=this.wrapper[0],n=t.clientHeight,i=this._scrollTop||t.scrollTop,o=e[0].offsetTop,r=e[0].offsetHeight;i>o?this.verticalScrollbar[0].scrollTop-=n/2:o+r>=i+n&&(this.verticalScrollbar[0].scrollTop+=n/2)},_fetch:function(t,n,i){var o=this,r=o.dataSource,s=o.itemHeight,a=r.take(),l=o._rangeStart||r.skip()||0,c=Re.floor(t/a)*a,d=!1,u=.33;return t<l?(d=!0,l=Re.max(0,n-a),o._scrollTop=(t-l)*s,o._page(l,a)):n>=l+a&&!i?(d=!0,l=t,o._scrollTop=s,o._page(l,a)):!o._fetching&&o.options.prefetch&&(t<c+a-a*u&&t>a&&r.prefetch(c-a,a,e.noop),n>c+a*u&&r.prefetch(c+a,a,e.noop)),d},fetching:function(){return this._fetching},_page:function(e,t){var n=this,i=!n.options.prefetch,o=n.dataSource;clearTimeout(n._timeout),n._fetching=!0,n._rangeStart=e,o.inRange(e,t)?o.range(e,t):(i||he.ui.progress(n.wrapper.parent(),!0),n._timeout=setTimeout(function(){n._scrolling||(i&&he.ui.progress(n.wrapper.parent(),!0),o.range(e,t))},100))},repaintScrollbar:function(){var e,t=this,n="",i=25e4,o=t.dataSource,r=he.support.kineticScrollNeeded?0:he.support.scrollbar(),s=t.wrapper[0],a=t.itemHeight=t.options.itemHeight()||0,l=s.scrollWidth>s.offsetWidth?r:0,c=o.total()*a+l;for(e=0;e<Re.floor(c/i);e++)n+='<div style="width:1px;height:'+i+'px"></div>';c%i&&(n+='<div style="width:1px;height:'+c%i+'px"></div>'),t.verticalScrollbar.html(n),s.scrollTop=t._scrollTop},refresh:function(){var e=this,t=e.dataSource,n=e._rangeStart;he.ui.progress(e.wrapper.parent(),!1),clearTimeout(e._timeout),e.repaintScrollbar(),e.drag&&e.drag.cancel(),n&&!e._fetching&&(e._rangeStart=t.skip(),1===t.page()&&(e.verticalScrollbar[0].scrollTop=0)),e._fetching=!1}}),At={create:{text:"Add new record",imageClass:"k-i-plus",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-i-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-i-check",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-i-close",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-i-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-i-check",className:"k-primary k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-i-cancel",className:"k-grid-cancel",iconClass:"k-icon"},excel:{text:"Export to Excel",imageClass:"k-i-file-excel",className:"k-grid-excel",iconClass:"k-icon"},pdf:{text:"Export to PDF",imageClass:"k-i-file-pdf",className:"k-grid-pdf",iconClass:"k-icon"}},Et=he.ui.DataBoundWidget.extend({init:function(t,n,i){var o=this;n=Se(n)?{dataSource:n}:n,ve.fn.init.call(o,t,n),i&&(o._events=i),xt=he.support.isRtl(t),o._element(),o._aria(),o._columns(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._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"+Oe,o._resizeHandler)),he.notify(o)},events:[$e,"dataBinding","cancel",Xe,Ze,Je,je,qe,Ge,Ve,Ue,We,Qe,it,ot,Ke,Ye,rt,st,at,"page","sort","filter","group"],setDataSource:function(e){var t=this,n=t.options.scrollable;t.options.dataSource=e,t._dataSource(),t._pageable(),t._thead(),n&&(n.virtual?t.content.find(">.k-virtual-scrollable-wrap").scrollLeft(0):t.content.scrollLeft(0)),t.options.groupable&&t._groupable(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.navigatable&&t._navigatable(),t.options.selectable&&t._selectable(),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!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:gt,confirmation:ft,confirmDelete:mt},commands:{create:At.create.text,cancel:At.cancel.text,save:At.save.text,destroy:At.destroy.text,edit:At.edit.text,update:At.update.text,canceledit:At.canceledit.text,excel:At.excel.text,pdf:At.pdf.text},noRecords:pt}},destroy:function(){var t,n=this;n._angularItems("cleanup"),n._destroyColumnAttachments(),ve.fn.destroy.call(n),this._navigatableTables=null,n._resizeHandler&&e(window).off("resize"+Oe,n._resizeHandler),n.pager&&n.pager.element&&n.pager.destroy(),n.pager=null,n.groupable&&n.groupable.element&&n.groupable.element.kendoGroupable("destroy"),n.groupable=null,n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.selectable&&n.selectable.element&&(n.selectable.destroy(),n.clearArea(),n.copyHandler&&(n.wrapper.off("keydown",n.copyHandler),n.unbind(n.copyHandler)),n.updateClipBoardState&&(n.unbind(n.updateClipBoardState),n.updateClipBoardState=null),n.clearAreaHandler&&n.wrapper.off("keyup",n.clearAreaHandler)),n.selectable=null,n.resizable&&(n.resizable.destroy(),n._resizeUserEvents&&(n._resizeHandleDocumentClickHandler&&e(document).off("click",n._resizeHandleDocumentClickHandler),n._resizeUserEvents.destroy(),n._resizeUserEvents=null),n.resizable=null),n.virtualScrollable&&n.virtualScrollable.element&&n.virtualScrollable.destroy(),n.virtualScrollable=null,n._destroyEditable(),n.dataSource&&(n.dataSource.unbind($e,n._refreshHandler).unbind(Ie,n._progressHandler).unbind(Fe,n._errorHandler),n._refreshHandler=n._progressHandler=n._errorHandler=null),t=n.element.add(n.wrapper).add(n.table).add(n.thead).add(n.wrapper.find(">.k-grid-toolbar")),n.content&&(t=t.add(n.content).add(n.content.find(">.k-virtual-scrollable-wrap"))),n.lockedHeader&&n._removeLockedContainers(),n.pane&&n.pane.destroy(),n.minScreenResizeHandler&&e(window).off("resize",n.minScreenResizeHandler),n._draggableInstance&&n._draggableInstance.element&&n._draggableInstance.destroy(),n._draggableInstance=null,t.off(Oe),he.destroy(n.wrapper),n.rowTemplate=n.altRowTemplate=n.lockedRowTemplate=n.lockedAltRowTemplate=n.detailTemplate=n.footerTemplate=n.groupFooterTemplate=n.lockedGroupFooterTemplate=n.noRecordsTemplate=null,n.scrollables=n.thead=n.tbody=n.element=n.table=n.content=n.footer=n.wrapper=n.lockedTable=n.lockedContent=n.lockedHeader=n.lockedFooter=n._groupableClickHandler=n._setContentWidthHandler=null},getOptions:function(){var n,i,o,r=this.options;return r.dataSource=null,n=ke(!0,{},this.options),n.columns=he.deepExtend([],this.columns),i=this.dataSource,o=i.options.data&&i._data,i.options.data=null,n.dataSource=e.extend(!0,{},i.options),i.options.data=o,n.dataSource.data=o,n.dataSource.page=i.page(),n.dataSource.filter=i.filter(),n.dataSource.pageSize=i.pageSize(),n.dataSource.sort=i.sort(),n.dataSource.group=i.group(),n.dataSource.aggregate=i.aggregate(),n.dataSource.transport&&(n.dataSource.transport.dataSource=null),n.pageable&&n.pageable.pageSize&&(n.pageable.pageSize=i.pageSize()),n.$angular=t,n},setOptions:function(e){var t,n,i,o,r=this.getOptions();he.deepExtend(r,e),e.dataSource||(r.dataSource=this.dataSource),t=this.wrapper,n=this._events,i=this.element,this.destroy(),this.options=null,this._isMobile&&(o=t.closest(he.roleSelector("pane")).parent(),o.after(t),o.remove(),t.removeClass("k-grid-mobile")),t[0]!==i[0]&&(t.before(i),
t.remove()),i.empty(),this.init(i,r,n),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,n,i=he.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(e=i.length,t=Array(2*e),n=e;--n>=0;)t[n]=t[n+e]=i[n];i=t}return i},_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),n=t.data("kendoFilterMenu"),i=t.data("kendoColumnSorter"),o=t.data("kendoColumnMenu");n&&n.destroy(),i&&i.destroy(),o&&o.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,n,i=this,o=H(i.columns||[]);for(t=0,n=o.length;t<n;t++)e=o[t].command,e&&a(i,i.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,n=t.element;n.is("table")||(n=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),n.length||(n=e("<table />").appendTo(t.element))),St&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,o,r,s,a,l,c,d=this,u=d.options.columnResizeHandleWidth,h=d.options.scrollable,f=d.resizeHandle,p=this._groups();if(f&&d.lockedContent&&f.data("th")[0]!==n[0]&&(f.off(Oe).remove(),f=null),f||(f=d.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'),t.append(f)),xt)i=n.position().left,h&&(s=n.closest(".k-grid-header-wrap, .k-grid-header-locked"),a=Ct.msie?s.scrollLeft():0,l=Ct.webkit?s[0].scrollWidth-s[0].offsetWidth-s.scrollLeft():0,c=Ct.mozilla?s[0].scrollWidth-s[0].offsetWidth-(s[0].scrollWidth-s[0].offsetWidth-s.scrollLeft()):0,i-=l-c+a);else{for(i=n[0].offsetWidth,o=N(n.closest("thead")).filter(":visible"),r=0;r<o.length&&o[r]!=n[0];r++)i+=o[r].offsetWidth;p>0&&(i+=_e(t.find(".k-group-cell:first"))*p),d._hasDetails()&&(i+=_e(t.find(".k-hierarchy-cell:first")))}f.css({top:n.position().top,left:i-u,height:be(n),width:3*u}).data("th",n).show(),f.off("dblclick"+Oe).on("dblclick"+Oe,function(){d._autoFitLeafColumn(n.data("index"))})},_positionColumnResizeHandle:function(){var t=this,n=t.options.columnResizeHandleWidth,i=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t.thead.add(i).on("mousemove"+Oe,"th",function(i){function r(){var t,n=parseFloat(e(document.documentElement).css("zoom"));return isNaN(n)&&(n=1),t=parseFloat(e(document.body).css("zoom")),isNaN(t)&&(t=1),n*t}var s,a,l,c=e(this);c.hasClass("k-group-cell")||c.hasClass("k-hierarchy-cell")||(s=i.clientX/r(),a=e(window).scrollLeft(),l=c.offset().left+(xt?0:this.offsetWidth),s+a>l-n&&s+a<l+n?t._createResizeHandle(c.closest("div"),c):t.resizeHandle?t.resizeHandle.hide():o(t.wrapper,""))})},_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(Oe).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,n=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new he.UserEvents(n.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,hold:function(n){var i=e(n.target);n.preventDefault(),i.addClass("k-column-active"),t._createResizeHandle(i.closest("div"),i),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=Ae(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},_resizable:function(){var t,n,i,r,s,a,l,c,d=this,u=d.options,h=this._isMobile,f=he.support.mobileOS?0:he.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 fe.Resizable(t.add(d.lockedHeader),{handle:(u.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('<div class="k-grid-resize-indicator" />').css({height:be(t.data("th"))+d.tbody.attr("clientHeight")})},start:function(t){var f,p,m,g;c=e(t.currentTarget).data("th"),h&&d._hideResizeHandle(),f=c.closest("table"),p=e.inArray(c[0],N(c.closest("thead")).filter(":visible")),a=f.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")),o(d.wrapper,"col-resize"),l=u.scrollable?f.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")").add(m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")):m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")"),n=t.x.location,i=_e(c),r=H(d.columns)[p].minResizableWidth||10,s=_e(a?m.children("tbody"):d.tbody),Ct.webkit&&d.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var o,h,p,m,g,v,_=xt?-1:1,b=i+t.x.location*_-n*_;u.scrollable?(a&&d.lockedFooter?o=d.lockedFooter.children("table"):d.footer&&(o=d.footer.find(">.k-grid-footer-wrap>table")),o&&o[0]||(o=e()),h=c.closest("table"),p=a?d.lockedTable:d.table,m=!1,g=d.wrapper.width()-f,v=b,a&&s-i+v>g&&(v=i+(g-s-2*f),v<0&&(v=b),m=!0),v>10&&v>=r&&(l.css("width",v),s&&(v=m?g-2*f:s+t.x.location*_-n*_,p.add(h).add(o).css("width",v),a||(d._footerWidth=v)))):b>10&&b>=r&&l.css("width",b)},resizeend:function(){var e,t,n,r=_e(c);o(d.wrapper,""),Ct.webkit&&d.wrapper.removeClass("k-grid-column-resizing"),i!=r&&(t=d.lockedHeader?d.lockedHeader.find("thead:first tr:first").add(d.thead.find("tr:first")):c.parent(),n=c.attr(he.attr("index")),n||(n=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(c)),e=H(d.columns)[n],e.width=r,d.trigger(it,{column:e,oldWidth:i,newWidth:r}),d._applyLockedContainersWidth(),d._syncLockedContentHeight(),d._syncLockedHeaderHeight()),d._hideResizeHandle(),c=null}}))},_draggable:function(){var t,n=this;n.options.reorderable&&(n._draggableInstance&&n._draggableInstance.destroy(),t=n.wrapper.children(".k-grid-header"),n._draggableInstance=n.wrapper.kendoDraggable({group:he.guid(),autoScroll:!0,filter:n.content?".k-grid-header:first "+Ne:"table:first>.k-grid-header "+Ne,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+Oe+"scrolling").bind("scroll"+Oe+"scrolling",function(e){n.virtualScrollable?n.content.find(">.k-virtual-scrollable-wrap").scrollLeft(this.scrollLeft):n.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)})},dragend:function(){t.children(".k-grid-header-wrap").unbind("scroll"+Oe+"scrolling")},drag:function(){n._hideResizeHandle()},hint:function(t){var n=t.attr(he.attr("title"));return n&&(n=he.htmlEncode(n)),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(n||t.attr(he.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}).data("kendoDraggable"))},_reorderable:function(){var t,n=this;n.options.reorderable&&(n.wrapper.data("kendoReorderable")&&n.wrapper.data("kendoReorderable").destroy(),t=function(e,t,i){var o=e[t],r=e[i],s=c(o,n.columns);return e=s?s.columns:n.columns,Te(r,e)},n.wrapper.kendoReorderable({draggable:n._draggableInstance,dragOverContainers:function(e,i){var o=S(n.columns);return o[e].lockable!==!1&&t(o,e,i)>-1},inSameContainer:function(i){return e(i.source).parent()[0]===e(i.target).parent()[0]&&t(S(n.columns),i.sourceIndex,i.targetIndex)>-1},change:function(e){var i=S(n.columns),o=i[e.oldIndex],r=t(i,e.oldIndex,e.newIndex);n.trigger(ot,{newIndex:r,oldIndex:Te(o,i),column:o}),n.reorderColumn(r,o,"before"===e.position)}}))},_reorderHeader:function(e,t,n){var i,o,a,l,c=this,d=y(e[0],c.columns),u=y(t,c.columns),h=[];for(i=0;i<e.length;i++)e[i].columns&&(h=h.concat(e[i].columns));o=s(c.lockedHeader,c.thead,"tr:eq("+d.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),a=F(e).length,l=F([t]).length,h.length?(a>0&&0===l?v(e,t,h,c.columns,c.lockedHeader.find("thead"),c.thead,this._groups()):0===a&&l>0&&v(e,t,h,c.columns,c.thead,c.lockedHeader.find("thead"),this._groups()),(t.columns||d.cell-u.cell>1||u.cell-d.cell>1)&&(t=x(c.columns,t,e[0],n),t&&c._reorderHeader(h,t,n))):a!==l&&g(o[d.cell],c.columns,a),r(o,d.cell,u.cell,n,e.length)},_reorderContent:function(t,n,i){var o,a,l,c,d=this,u=e(),h=t[0],f=p(t),m=Te(h,H(d.columns)),g=Te(n,H(d.columns)),v=Te(h,L(d.columns)),_=Te(n,L(d.columns)),b=F(d.columns).length,w=!!n.locked,y=d.footer||d.wrapper.find(".k-grid-footer"),k=o=_;for(n.hidden&&(w?(_=d.lockedTable.find("colgroup"),k=d.lockedHeader.find("colgroup"),o=e(d.lockedFooter).find(">table>colgroup")):(_=d.tbody.prev(),k=d.thead.prev(),o=y.find(".k-grid-footer-wrap").find(">table>colgroup"))),d._hasFilterRow()&&r(d.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),m,g,i,t.length),r(s(d.lockedHeader,d.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),v,k,i,f.length),d.options.scrollable&&r(s(d.lockedTable,d.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),v,_,i,f.length),y&&y.length&&(r(s(d.lockedFooter,y.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),v,o,i,f.length),r(y.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),m,g,i,t.length)),a=d.tbody.children(":not(.k-grouping-row,.k-detail-row)"),d.lockedTable&&(b>g?b<=m&&ee(d.lockedTable.find(">tbody>tr.k-grouping-row"),d.table.find(">tbody>tr.k-grouping-row"),t.length):b>m&&ee(d.table.find(">tbody>tr.k-grouping-row"),d.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),u=d.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),l=0,c=a.length;l<c;l+=1)r(s(u[l],a[l],">td:not(.k-group-cell,.k-hierarchy-cell)"),m,g,i,t.length)},_autoFitLeafColumn:function(e){this.autoFitColumn(H(this.columns)[e])},autoFitColumn:function(t){var n,i,o,r,s,a,l,c,d,u,p,m,g,v,_,b,w,y,k,x=this,C=x.options,S=x.columns,D=x.lockedHeader?N(x.lockedHeader.find(">table>thead")).filter(h).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?S[t]:ye(t)?Ce(T(S),function(e){return e===t})[0]:Ce(T(S),function(e){return e.field===t})[0],t&&f(t)){for(n=Te(t,H(S)),r=t.locked,o=r?x.lockedHeader.children("table"):x.thead.parent(),i=o.find("[data-index='"+n+"']"),c=r?x.lockedTable:x.table,d=x.footer||e(),x.footer&&x.lockedContent&&(d=x.footer.children(r?".k-grid-footer-locked":".k-grid-footer-wrap")),u=d.find("table").first(),x.lockedHeader&&!r&&(n-=D),p=0;p<S.length&&S[p]!==t;p++)S[p].hidden&&n--;if(C.scrollable?(s=o.find(A).eq(n).add(c.children("colgroup").find(A).eq(n)).add(u.find("colgroup").find(A).eq(n)),r||(a=c.parent(),l=a.scrollLeft())):s=c.children("colgroup").find(A).eq(n),m=o.add(c).add(u),g=_e(i),s.width(""),m.css("table-layout","fixed"),s.width("auto"),m.addClass("k-autofitting"),m.css("table-layout",""),v=Math.ceil(Math.max(_e(i),_e(c.find("tr:not(.k-grouping-row)").eq(0).children(E).eq(n)),_e(u.find("tr").eq(0).children(E).eq(n))))+1,s.width(v),t.width=v,C.scrollable){for(_=o.find("col"),w=0,y=0,k=_.length;y<k;y+=1){if(b=_[y].style.width,!b||b.indexOf("%")!=-1){w=0;break}w+=parseInt(b,10)}w&&m.each(function(){this.style.width=w+"px"})}Ct.msie&&8==Ct.version&&(m.css("display","inline-table"),setTimeout(function(){m.css("display","table")},1)),m.removeClass("k-autofitting"),l&&a.scrollLeft(l),x.trigger(it,{column:t,oldWidth:g,newWidth:v}),x._applyLockedContainersWidth(),x._syncLockedContentHeight(),x._syncLockedHeaderHeight()}},reorderColumn:function(e,n,i){var o,r,s=this,a=c(n,s.columns),l=a?a.columns:s.columns,d=Te(n,l),u=l[e],h=!!u.locked,f=F(s.columns).length;d!==e&&(!n.locked&&h&&1==z(s.columns).length||n.locked&&!h&&1==f||(s._hideResizeHandle(),i===t&&(i=e<d),r=[n],s._reorderHeader(r,u,i),s.lockedHeader&&(R(s.thead),R(s.lockedHeader)),u.columns&&(u=H(u.columns),u=u[i?0:u.length-1]),n.columns&&(r=H(n.columns)),s._reorderContent(r,u,i),o=!!n.locked,o=o!=h,n.locked=h,l.splice(i?e:e+1,0,n),l.splice(d<e?d:d+1,1),s._templates(),s._updateColumnCellIndex(),s._updateTablesWidth(),s._applyLockedContainersWidth(),s._syncLockedHeaderHeight(),s._syncLockedContentHeight(),s._updateFirstColumnClass(),o&&(h?s.trigger(rt,{column:n}):s.trigger(st,{column:n}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=_(e,F(this.columns))),_(this.thead,z(this.columns),t)},lockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:Ce(n,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(t=F(n).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:Ce(n,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=F(n).length,this.reorderColumn(t,e,!0))},cellIndex:function(t){var n=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(n=H(F(this.columns)).length),e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)+n},_modelForContainer:function(t){t=e(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var n=t.attr(he.attr("uid"));return this.dataSource.getByUid(n)},_editable:function(){var t,n=this,i=n.selectable&&n.selectable.options.multiple,o=n.options.editable,r=function(){var t=ge(),i=n._editContainer;!i||e.contains(i[0],t)||i[0]===t||e(t).closest(".k-animation-container").length||n.editable.end()&&n.closeCell()};o&&(this.wrapper.addClass("k-editable"),t=n._editMode(),"incell"===t?o.update!==!1&&n.wrapper.on(lt+Oe,"tr:not(.k-grouping-row) > td",function(t){var o=e(this),r=n.lockedTable&&o.closest("table")[0]===n.lockedTable[0];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]!==n.tbody[0]&&!r||e(t.target).is(":input")||(n.editable?n.editable.end()&&(i&&e(ge()).blur(),n.closeCell(),n.editCell(o)):n.editCell(o))}).on("focusin"+Oe,function(){e.contains(this,ge())||(clearTimeout(n.timer),n.timer=null)}).on("focusout"+Oe,function(){n.timer=setTimeout(r,1)}):o.update!==!1&&n.wrapper.on(lt+Oe,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),o.destroy!==!1?n.wrapper.on(lt+Oe,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(t){t.preventDefault(),t.stopPropagation(),n.removeRow(e(this).closest("tr"))}):n.wrapper.on(lt+Oe,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){e.stopPropagation(),n._confirmation()||e.preventDefault()}))},editCell:function(t){var n,i,o,r;t=e(t),n=this,i=H(n.columns)[n.cellIndex(t)],o=n._modelForContainer(t),n.closeCell(),o&&se(i,o)&&!i.command&&(n._attachModelChange(o),n._editContainer=t,n.editable=t.addClass("k-edit-cell").kendoEditable({fields:{field:i.field,format:i.format,editor:i.editor,values:i.values},model:o,target:n,change:function(e){n.trigger(Ue,{values:e.values,container:t,model:o})&&e.preventDefault()}}).data("kendoEditable"),r=t.parent().addClass("k-grid-edit-row"),n.lockedContent&&ie(r[0],n._relatedRow(r).addClass("k-grid-edit-row")[0]),n.trigger(Ve,{container:t,model:o}))},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?he.support.scrollbar():0;this.lockedContent.height(t.height()-n)},_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),ne(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(lt+Oe,"a.k-grid-cancel",e._editCancelClickHandler),t.off(lt+Oe,"a.k-grid-update",e._editUpdateClickHandler)),e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView()}};e.editable&&("popup"!==e._editMode()||e._isMobile?t():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,n=e._modelForContainer(t);n&&n.unbind($e,e._modelChangeHandler)},closeCell:function(t){var n,i,o,r,s=this,a=s._editContainer;a&&(n=a.closest("tr").attr(he.attr("uid")),r=s.dataSource.getByUid(n),t&&s.trigger("cancel",{container:a,model:r})||(a.removeClass("k-edit-cell"),i=H(s.columns)[s.cellIndex(a)],o=a.parent().removeClass("k-grid-edit-row"),s._destroyEditable(),s._displayCell(a,i,r),a.hasClass("k-dirty-cell")&&e('<span class="k-dirty"/>').prependTo(a),s.trigger("itemChange",{item:o,data:r,ns:fe}),s.lockedContent&&ie(o.css("height","")[0],s._relatedRow(o).css("height","")[0])))},_displayCell:function(e,t,n){var i=this,o={storage:{},count:0},r=ke({},he.Template,i.options.templateSettings),s=he.template(i._cellTmpl(t,o),r);o.count>0&&(s=Ae(s,o.storage)),e.empty().html(s(n)),i.angular("compile",function(){return{elements:e,data:[{dataItem:n}]}})},removeRow:function(e){this._confirmation(e)&&this._removeRow(e)},_removeRow:function(t){var n,i=this,o=i._editMode();"incell"!==o&&i.cancelRow(),t=e(t),i.lockedContent&&(t=t.add(i._relatedRow(t))),t=t.hide(),n=i._modelForContainer(t),n&&!i.trigger(We,{row:t,model:n})?(i.dataSource.remove(n),"inline"!==o&&"popup"!==o||i.dataSource.sync()):"incell"===o&&i._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 n,i,o,r=this;t instanceof he.data.ObservableObject?n=t:(t=e(t),n=r._modelForContainer(t)),i=r._editMode(),r.cancelRow(),n&&(t=r.tbody.children("["+he.attr("uid")+"="+n.uid+"]"),r._attachModelChange(n),"popup"===i?r._createPopupEditor(n):"inline"===i?r._createInlineEditor(t,n):"incell"===i&&e(t).children(ze).each(function(){var t=e(this),i=H(r.columns)[r.cellIndex(t)];if(n=r._modelForContainer(t),n&&(!n.editable||n.editable(i.field))&&i.field)return r.editCell(t),!1}),o=r.editView?r.editView.element:r._editContainer,o&&(this._editCancelClickHandler||(this._editCancelClickHandler=Ae(this._editCancelClick,this)),o.on(lt+Oe,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=Ae(this._editUpdateClick,this)),o.on(lt+Oe,"a.k-grid-update",this._editUpdateClickHandler)))},_editUpdateClick:function(e){e.preventDefault(),e.stopPropagation(),this.saveRow()},_editCancelClick:function(t){var n,i=this,o=i.options.navigatable,r=i.editable.options.model,s=i.editView?i.editView.element:i._editContainer;t.preventDefault(),t.stopPropagation(),i.trigger("cancel",{container:s,model:r})||(n=i.items().index(e(i.current()).parent()),i.cancelRow(),o&&(i._setCurrent(i.items().eq(n).children().filter(Le).first()),re(i.table,!0)))},_createPopupEditor:function(n){var i,o,r,s,a,l,c,d,u,h,f,p=this,m="<div "+he.attr("uid")+'="'+n.uid+'" class="k-popup-edit-form'+(p._isMobile?" k-mobile-list":"")+'"><div class="k-edit-form-container">',g=[],v=H(p.columns),_=p.options.editable,b=_.template,w=ye(_)?_.window:{},y=ke({},he.Template,p.options.templateSettings);if(w=w||{},b)for(typeof b===ht&&(b=window.unescape(b)),m+=he.template(b,y)(n),r=0,s=v.length;r<s;r++)i=v[r],i.command&&(d=oe(i.command,"edit"),d&&(o=d));else for(r=0,s=v.length;r<s;r++)i=v[r],i.command?i.command&&(d=oe(i.command,"edit"),d&&(o=d)):(m+='<div class="k-edit-label"><label for="'+i.field+'">'+(i.title||i.field||"")+"</label></div>",se(i,n)?(g.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),m+="<div "+he.attr("container-for")+'="'+i.field+'" class="k-edit-field"></div>'):(h={storage:{},count:0},a=he.template(p._cellTmpl(i,h),y),h.count>0&&(a=Ae(a,h.storage)),m+='<div class="k-edit-field">'+a(n)+"</div>"));o&&ye(o)&&(o.text&&ye(o.text)&&(l=o.text.update,c=o.text.cancel),o.attr&&(u=o.attr)),p._isMobile?(m+="</div></div>",p.editView=p.pane.append("<div data-"+he.ns+'role="view" data-'+he.ns+'use-native-scrolling="true" data-'+he.ns+'init-widgets="false" class="k-grid-edit-form"><div data-'+he.ns+'role="header" class="k-header">'+p._createButton({name:"update",text:l,attr:u})+(w.title||"Edit")+p._createButton({name:"canceledit",text:c,attr:u})+"</div>"+m+"</div>"),f=p._editContainer=p.editView.element.find(".k-popup-edit-form")):(m+='<div class="k-edit-buttons k-state-default">',m+=p._createButton({name:"update",text:l,attr:u})+p._createButton({name:"canceledit",text:c,attr:u}),m+="</div></div></div>",f=p._editContainer=e(m).appendTo(p.wrapper).eq(0).kendoWindow(ke({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),p.trigger("cancel",{container:f,model:n}))return i.preventDefault(),t;var o=p.items().index(e(p.current()).parent());p.cancelRow(),p.options.navigatable&&(p._setCurrent(p.items().eq(o).children().filter(Le).first()),re(p.table,!0))}}},w))),p.editable=p._editContainer.kendoEditable({fields:g,model:n,clearContainer:!1,target:p}).data("kendoEditable"),p._isMobile&&f.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()}),p._openPopUpEditor(),p.trigger(Ve,{container:f,model:n})},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,n){var i,o,r,s=this,a=[];s.lockedContent&&(t=t.add(s._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(o=e(this),i=H(s.columns)[s.cellIndex(o)],!i.command&&se(i,n))a.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),o.attr(he.attr("container-for"),i.field),o.empty();else if(i.command&&(r=oe(i.command,"edit"))){o.empty();var t,l,c;ye(r)&&(r.text&&ye(r.text)&&(t=r.text.update,l=r.text.cancel),r.attr&&(c=r.attr)),e(s._createButton({name:"update",text:t,attr:c})+s._createButton({name:"canceledit",text:l,attr:c})).appendTo(o)}}),s._editContainer=t,s.editable=new he.ui.Editable(t.addClass("k-grid-edit-row"),{target:s,fields:a,model:n,clearContainer:!1}),t.length>1&&(ie(t[0],t[1]),s._applyLockedContainersWidth()),s.trigger(Ve,{container:t,model:n})},cancelRow:function(e){var t,n=this,i=n._editContainer;if(i){if(t=n._modelForContainer(i),e&&n.trigger("cancel",{container:i,model:t}))return;n._destroyEditable(),n.dataSource.cancelChanges(t),n._displayRow("popup"!==n._editMode()?i:n.tbody.find("["+he.attr("uid")+"="+t.uid+"]"))}},saveRow:function(){var t=this._editContainer,n=this._modelForContainer(t),i=e.Deferred();return t&&this.editable?!this.editable.end()||this.trigger(Ue,{container:t,model:n})?i.reject().promise():this.dataSource.sync():i.resolve().promise()},_displayRow:function(t){var n,i,o,r,s,a=this,l=a._modelForContainer(t),c=t.hasClass("k-state-selected"),d=t.hasClass("k-alt");l&&(a.lockedContent&&(n=e((d?a.lockedAltRowTemplate:a.lockedRowTemplate)(l)),a._relatedRow(t.last()).replaceWith(n)),a.angular("cleanup",function(){return{elements:t.get()}}),i=e((d?a.altRowTemplate:a.rowTemplate)(l)),t.replaceWith(i),a.trigger("itemChange",{item:i,data:l,ns:fe}),n&&n.length&&a.trigger("itemChange",{item:n,data:l,ns:fe}),r=i,s=[{dataItem:l}],n&&n.length&&(r=i.add(n),s.push({dataItem:l})),a.angular("compile",function(){return{elements:r.get(),data:s}}),c&&a.options.selectable&&a.select(i.add(n)),n&&ie(i[0],n[0]),o=i.next(),o.hasClass("k-detail-row")&&o.is(":visible")&&i.find(".k-hierarchy-cell .k-icon").removeClass("k-i-expand").addClass("k-i-collapse"))},_showMessage:function(t,n){var i,o,r,s=this;return s._isMobile?(i=he.template('<ul><li class="km-actionsheet-title">#:title#</li><li><a href="\\#" class="k-button k-grid-delete">#:confirmDelete#</a></li></ul>'),o=e(i(t)).appendTo(s.view.element),r=s._actionSheet=new he.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 i=e(t.currentTarget).parent();i.hasClass("km-actionsheet-cancel")||s._removeRow(n)},popup:s._actionSheetPopupOptions}),r.open(n),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===ht?t.options.messages.editable.confirmation:n.confirmation;return ye(n)&&typeof n.mode===ht&&typeof i!==ht&&i!==!1&&(i=t.options.messages.editable.confirmation),i===!1||null==i||(typeof i===ut&&(i=i(t._modelForContainer(e))),t._showMessage({confirmDelete:n.confirmDelete||t.options.messages.editable.confirmDelete,cancelDelete:n.cancelDelete||t.options.messages.editable.cancelDelete,title:i===!0?t.options.messages.editable.confirmation:i},e))},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this;(e.editable&&e.editable.end()||!e.editable)&&!e.trigger(Qe)&&e.dataSource.sync()},addRow:function(){var e,t,n,i,o,r,s=this,a=s.dataSource,l=s._editMode(),c=s.options.editable.createAt||"",d=a.pageSize(),u=a.view()||[];(s.editable&&s.editable.end()||!s.editable)&&("incell"!=l&&s.cancelRow(),e=a.indexOf(u[0]),"bottom"==c.toLowerCase()&&(e+=u.length,d&&!a.options.serverPaging&&d<=u.length&&(e-=1)),e<0&&(e=a.page()>a.totalPages()?(a.page()-1)*d:0),t=a.insert(e,{}),n=t.uid,i=s.lockedContent?s.lockedTable:s.table,o=i.find("tr["+he.attr("uid")+"="+n+"]"),r=o.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(s._firstEditableColumnIndex(o)),"inline"===l&&o.length?s.editRow(o):"popup"===l?s.editRow(t):r.length&&s.editCell(r),"bottom"==c.toLowerCase()&&s.lockedContent&&(s.lockedContent[0].scrollTop=s.content[0].scrollTop=s.table[0].offsetHeight))},_firstEditableColumnIndex:function(e){var t,n,i,o=this,r=H(o.columns),s=o._modelForContainer(e);for(n=0,i=r.length;n<i;n++)if(t=r[n],s&&(!s.editable||s.editable(t.field))&&!t.command&&t.field&&t.hidden!==!0)return n;return-1},_toolbar:function(){var t,n=this,i=n.wrapper,o=n.options.toolbar,r=n.options.editable;o&&(t=n.wrapper.find(".k-grid-toolbar"),t.length||(Ee(o)||(o=typeof o===ht?o:n._toolbarTmpl(o).replace(_t,"\\#"),o=Ae(he.template(o),n)),t=e('<div class="k-header k-grid-toolbar" />').html(o({})).prependTo(i),n.angular("compile",function(){return{elements:t.get()}})),r&&r.create!==!1&&t.on(lt+Oe,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(lt+Oe,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(lt+Oe,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}),t.on(lt+Oe,".k-grid-excel",function(e){e.preventDefault(),n.saveAsExcel()}),t.on(lt+Oe,".k-grid-pdf",function(e){e.preventDefault(),n.saveAsPDF()}))},_toolbarTmpl:function(e){var t,n,i=this,o="";if(Se(e))for(t=0,n=e.length;t<n;t++)o+=i._createButton(e[t]);return o},_createButton:function(e){var n,o=e.template||kt,r=typeof e===ht?e:e.name||e.text,s=At[r]?At[r].className:"k-grid-"+(r||"").replace(/\s/g,""),a={className:s,text:r,imageClass:"",attr:"",iconClass:""},l=this.options.messages.commands;if(!(r||ye(e)&&e.template))throw Error("Custom commands should have name specified");return ye(e)?(e=ke(!0,{},e),e.className&&Te(a.className,e.className.split(" "))<0?e.className+=" "+a.className:e.className===t&&(e.className=a.className),"edit"===r&&ye(e.text)&&(e=ke(!0,{},e),e.text=e.text.edit),e.attr&&(ye(e.attr)&&(e.attr=i(e.attr)),typeof e.attr===ht&&(n=e.attr.match(/class="(.+?)"/),n&&Te(n[1],e.className.split(" "))<0&&(e.className+=" "+n[1]))),a=ke(!0,a,At[r],{text:l[r]},e)):a=ke(!0,a,At[r],{text:l[r]}),he.template(o)(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(lt+Oe,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),o=i.closest("tr");i.hasClass("k-i-collapse")?t.collapseGroup(o):t.expandGroup(o),n.preventDefault(),n.stopPropagation()},t._isLocked()?t.lockedTable.on(lt+Oe,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(lt+Oe,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,n=t.wrapper,i=t.options.groupable,o=Ne+"["+he.attr("field")+"]",r=t.content?".k-grid-header:first "+o:"table:first>.k-grid-header "+o;i&&i.enabled!==!1&&(n.has("div.k-grouping-header")[0]||e("<div>&nbsp;</div>").addClass("k-grouping-header").prependTo(n),t.groupable&&t.groupable.destroy(),t.groupable=new fe.Groupable(n,ke({},i,{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()}})))},_continuousItems:function(t,n){var i,o,r,s,a,l,c,d;if(this.lockedContent){for(i=this,o=i.table.add(i.lockedTable),r=e(t,o[0]),s=e(t,o[1]),a=n?F(i.columns).length:1,l=n?i.columns.length-a:1,c=[],d=0;d<r.length;d+=a)De.apply(c,r.slice(d,d+a)),De.apply(c,s.splice(0,l));return c}},_selectable:function(){var n,i,o,r,s=this,a=[],l=s._isLocked(),c=s.options.selectable;c&&(s.selectable&&s.selectable.destroy(),c=he.ui.Selectable.parseOptions(c),n=c.multiple,i=c.cell,s._hasDetails()&&(a[a.length]=".k-detail-row"),(s.options.groupable||s._hasFooters())&&(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=">"+(i?Pe:"tbody>tr"+a),s.selectable=new he.ui.Selectable(o,{filter:r,aria:!0,multiple:n,change:function(){s.trigger($e)},useAllItems:l&&n&&i,relatedTarget:function(t){var n,o,r,a;if(!i&&l){for(o=e(),r=0,a=t.length;r<a;r++)n=s._relatedRow(t[r]),Te(n[0],t)<0&&(o=o.add(n));return o}},continuousItems:function(){return s._continuousItems(r,i)}}),s.options.navigatable&&o.on("keydown"+Oe,function(r){var a=s.current(),c=r.target;if(r.keyCode===we.SPACEBAR&&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=i?a:a.parent(),l&&!i&&(a=a.add(s._relatedRow(a))),n)if(r.ctrlKey){if(a.hasClass(tt))return a.removeClass(tt),s.trigger($e),t}else s.selectable.clear();else s.selectable.clear();s.selectable.value(a)}}))},_clipboard:function(){var e,t=this.options,n=t.selectable;n&&t.allowCopy&&(e=this,t.navigatable||e.table.add(e.lockedTable).attr("tabindex",0).on("mousedown"+Oe+" keydown"+Oe,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}).on("mousedown"+Oe,Be+">"+Le,Ae(le,e)),e.copyHandler=Ae(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=Ae(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,n,i,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"),n=[],i=this.columns.length,o=a._isLocked()&&F(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,i>d&&(i=d),h=s.text(),n[c]||(n[c]=[]),n[c][d]=h}),s=n.length,n=e.each(n,function(e,t){t&&(n[e]=t.slice(i),s>e&&(s=e))}),e.each(n.slice(s),function(e,n){t+=n?n.join(c)+"\r\n":"\r\n"})),t},clearArea:function(t){var n;this.areaClipBoard&&t&&t.target===this.areaClipBoard[0]&&(n=this.options.navigatable?e(this.current()).closest("table"):this.table,re(n,!0)),this.areaClipBoard&&(this.areaClipBoard.remove(),this.areaClipBoard=null)},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=Ae(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,n){var i,o,r,s=!1;for(i=0;i<e.length;i++)o=e[i],r=o.minScreenWidth,r!==t&&null!==r&&(s=!0,r>n?this.hideColumn(o):this.showColumn(o)),!o.hidden&&o.columns&&(s=this._iterateMinScreenCols(o.columns,n)||s);return s},_relatedRow:function(t){var n,i,o=this.lockedTable;return t=e(t),o?(n=t.closest(this.table.add(this.lockedTable)),i=n.find(">tbody>tr").index(t),n=n[0]===this.table[0]?o:this.table,n.find(">tbody>tr").eq(i)):t},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger($e)},select:function(e){var n=this,i=n.selectable;return e=n.table.add(n.lockedTable).find(e),e.length?(i.options.multiple||(i.clear(),e=e.first()),n._isLocked()&&(e=e.add(e.map(function(){return n._relatedRow(this)}))),i.value(e),t):i.value()},_updateCurrentAttr:function(t,n){var i=e(t).data("headerId");e(t).removeClass(et).closest("table").removeAttr("aria-activedescendant"),i?(i=i.replace(this._cellId,""),e(t).attr("id",i)):e(t).removeAttr("id"),n.data("headerId",n.attr("id")).attr("id",this._cellId).addClass(et).closest("table").attr("aria-activedescendant",this._cellId),this._current=n},_scrollCurrent:function(){var t,n,i,o,r,s,a=this._current,l=this.options.scrollable;a&&l&&(t=a.parent(),n=t.closest("table").parent(),i=n.is(".k-grid-content-locked,.k-grid-header-locked"),o=n.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(Te(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),i||this._scrollTo(a[0],r))},current:function(e){return this._setCurrent(e,!0)},_setCurrent:function(t,n){var i=this._current;return t=e(t),t.length&&(i&&i[0]===t[0]||(this._updateCurrentAttr(i,t),this._scrollCurrent(),n||this.trigger(at,{element:t}))),this._current},_removeCurrent:function(){this._current&&(this._current.removeClass(et),this._current=null)},_scrollTo:function(t,n){var i,o=t.tagName.toLowerCase(),r="td"===o||"th"===o,s=t[r?"offsetLeft":"offsetTop"],a=t[r?"offsetWidth":"offsetHeight"],l=n[r?"scrollLeft":"scrollTop"],c=n[r?"clientWidth":"clientHeight"],d=s+a,u=0,h=0,f=0;xt&&r&&(i=e(t).closest("table")[0],Ct.msie?h=i.offsetLeft:Ct.mozilla&&(f=i.offsetLeft-he.support.scrollbar())),l=Math.abs(l+h-f),u=l>s?s:d>l+c?a<=c?d-c:s:l,u=Math.abs(u+h)+f,n[r?"scrollLeft":"scrollTop"]=u},_navigatable:function(){var t,n,i,o=this;o.options.navigatable&&(t=o.table.add(o.lockedTable),n=o.thead.parent().add(e(">table",o.lockedHeader)),i=t,o.options.scrollable&&(i=i.add(n),n.attr(dt,-1)),this._navigatableTables=i,i.off("mousedown"+Oe+" focus"+Oe+" focusout"+Oe+" keydown"+Oe),n.on("keydown"+Oe,Ae(o._openHeaderMenu,o)).find("a.k-link").attr("tabIndex",-1),t.attr(dt,Re.max(t.attr(dt)||0,0)).on("mousedown"+Oe+" keydown"+Oe,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),i.on(he.support.touch?"touchstart"+Oe:"mousedown"+Oe,Be+">"+Le,Ae(le,o)).on("focus"+Oe,Ae(o._tableFocus,o)).on("focusout"+Oe,Ae(o._tableBlur,o)).on("keydown"+Oe,Ae(o._tableKeyDown,o)))},_openHeaderMenu:function(e){e.altKey&&e.keyCode==we.DOWN&&(this.current().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())},_setTabIndex:function(e){this._navigatableTables.attr(dt,-1),e.attr(dt,0)},_tableFocus:function(t){var n,i;he.support.touch||(n=this.current(),i=e(t.currentTarget),n&&n.is(":visible")?n.addClass(et):this._setCurrent(i.find(He)),this._setTabIndex(i))},_tableBlur:function(){var e=this.current();e&&e.removeClass(et)},_tableKeyDown:function(n){var i,o=this.current(),r=this.virtualScrollable&&this.virtualScrollable.fetching(),s=e(n.target),a=!n.isDefaultPrevented()&&!s.is(":button,a,:input,a>.k-icon");return r?(n.preventDefault(),t):(o=o?o:e(this.lockedTable).add(this.table).find(He),o.length&&(i=!1,a&&n.keyCode==we.UP&&(i=this._moveUp(o)),a&&n.keyCode==we.DOWN&&(i=this._moveDown(o)),a&&n.keyCode==(xt?we.LEFT:we.RIGHT)&&(i=this._moveRight(o,n.altKey)),a&&n.keyCode==(xt?we.RIGHT:we.LEFT)&&(i=this._moveLeft(o,n.altKey)),a&&n.keyCode==we.PAGEDOWN&&(i=this._handlePageDown()),a&&n.keyCode==we.PAGEUP&&(i=this._handlePageUp()),n.keyCode!=we.ENTER&&n.keyCode!=we.F2||(i=this._handleEnterKey(o,n.currentTarget,s)),n.keyCode==we.ESC&&(i=this._handleEscKey(o,n.currentTarget)),n.keyCode==we.TAB&&(i=this._handleTabKey(o,n.currentTarget,n.shiftKey)),i&&(n.preventDefault(),n.stopPropagation())),t)},_moveLeft:function(e,t){var n,i,o=e.parent(),r=o.parent();return t?this.collapseRow(o):(i=r.find(Be).index(o),n=this._prevHorizontalCell(r,e,i),n[0]||(r=this._horizontalContainer(r),n=this._prevHorizontalCell(r,e,i),n[0]!==e[0]&&re(r.parent(),!0)),this._setCurrent(n)),!0},_moveRight:function(e,t){var n,i,o=e.parent(),r=o.parent();return t?this.expandRow(o):(i=r.find(Be).index(o),n=this._nextHorizontalCell(r,e,i),n[0]||(r=this._horizontalContainer(r,!0),n=this._nextHorizontalCell(r,e,i),n[0]!==e[0]&&re(r.parent(),!0)),this._setCurrent(n)),!0},_moveUp:function(e){var t=e.parent().parent(),n=this._prevVerticalCell(t,e);return n[0]||(t=this._verticalContainer(t,!0),n=this._prevVerticalCell(t,e),n[0]&&re(t.parent(),!0)),this._setCurrent(n),!0},_moveDown:function(e){var t=e.parent().parent(),n=this._nextVerticalCell(t,e);return n[0]||(t=this._verticalContainer(t),n=this._nextVerticalCell(t,e),n[0]&&re(t.parent(),!0)),this._setCurrent(n),!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,n,i){var o,r=this.options.editable&&"incell"==this._editMode();return!(!r||t.is("th"))&&(o=e(ge()).closest(".k-edit-cell"),o[0]&&o[0]!==t[0]&&(t=o),o=this._tabNext(t,n,i),!!o.length&&(this._handleEditing(t,o,o.closest("table")),!0))},_handleEscKey:function(t,n){var i,o=ge(),r="incell"==this._editMode();return ce(t)?(r?this.closeCell(!0):(i=e(t).parent().index(),o&&o.blur(),this.cancelRow(!0),i>=0&&this._setCurrent(this.items().eq(i).children(Le).first())),Ct.msie&&Ct.version<9&&document.body.focus(),re(n,!0),!0):!!t.has(o).length&&(re(n,!0),!0)},_toggleCurrent:function(e,t){var n=e.parent();return n.is(".k-grouping-row")?(n.find(".k-icon:first").click(),!0):!(t||!n.is(".k-master-row"))&&(n.find(".k-icon:first").click(),!0)},_handleEnterKey:function(t,n,i){var o,r=this.options.editable&&this.options.editable.update!==!1,s=i.closest("[role=gridcell]");return i.is("table")||e.contains(t[0],i[0])||(t=s),t.is("th")?(t.find(".k-link").click(),!0):!!this._toggleCurrent(t,r)||(o=t.find(":kendoFocusable:first"),o[0]&&!t.hasClass("k-edit-cell")&&t.hasClass("k-state-focused")?(o.focus(),!0):!(!r||i.is(":button,.k-button,textarea"))&&(s[0]||(s=t),this._handleEditing(s,!1,n),!0))},_nextHorizontalCell:function(e,t,n){var i,o,r,s=t.nextAll(ze);return s.length||(i=e.find(Be),o=i.index(t.parent()),o!=-1)?s.first():t.hasClass("k-header")?(r=[],I([F(this.columns)[0]],V(i.eq(0).children().first()),r,0,0),r[n]?r[n][0]:t):t.parent().hasClass("k-filter-row")?i.last().children(ze).first():i.eq(n).children(ze).first()},_prevHorizontalCell:function(e,t,n){var i,o,r,s,a=t.prevAll(ze);return a.length||(i=e.find(Be),o=i.index(t.parent()),o!=-1)?a.first():t.hasClass("k-header")?(r=[],s=F(this.columns),I([s[s.length-1]],V(i.eq(0).children().last()),r,0,0),r[n]?r[n][0]:t):t.parent().hasClass("k-filter-row")?i.last().children(ze).last():i.eq(n).children(ze).last()},_currentDataIndex:function(e,n){var i,o=n.attr("data-index");return o?(i=F(this.columns).length,i&&!e.closest("div").hasClass("k-grid-content-locked")[0]?o-i:o):t},_prevVerticalCell:function(t,n){var i,o=n.parent(),r=t.children(Be),s=r.index(o),a=this._currentDataIndex(t,n);if(a||n.hasClass("k-header"))return i=O(n),i.eq(i.length-2);if(a=o.children(ze).index(n),o.hasClass("k-filter-row"))return N(t).eq(a);if(s==-1){if(o=t.find(".k-filter-row"),!o[0])return N(t).eq(a)}else o=0===s?e():r.eq(s-1);return i=o.children(ze),i.eq(i.length>a?a:0)},_nextVerticalCell:function(e,n){var i,o=n.parent(),r=e.children(Be),s=r.index(o),a=this._currentDataIndex(e,n);return s!=-1&&a===t&&n.hasClass("k-header")?V(n).eq(1):(a=a?parseInt(a,10):o.children(ze).index(n),o=r.eq(s==-1?0:s+n[0].rowSpan),i=o.children(ze),i.eq(i.length>a?a:0))},_verticalContainer:function(e,t){var n=e.parent(),i=this._navigatableTables.length,o=Math.floor(i/2),r=Te(n[0],this._navigatableTables);return t&&(o*=-1),r+=o,(r>=0||r<i)&&(n=this._navigatableTables.eq(r)),n.find(t?"thead":"tbody")},_horizontalContainer:function(e,t){var n,i,o=this._navigatableTables.length;return o<=2?e:(n=e.parent(),i=Te(n[0],this._navigatableTables),i+=t?1:-1,!t||2!=i&&i!=o?!t&&(1==i||i<0)?e:this._navigatableTables.eq(i).find("thead, tbody"):e)},_tabNext:function(e,t,n){var i=!0,o=n?e.prevAll(ze+":first"):e.nextAll(":visible:first");return o.length||(o=e.parent(),this.lockedTable&&(i=n&&t==this.lockedTable[0]||!n&&t==this.table[0],o=this._relatedRow(o)),i&&(o=o[n?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")),o=o.children(ze+(n?":last":":first"))),o},_handleEditing:function(n,i,o){var r,s,a=this,l=e(ge()),c=a._editMode(),d=Ct.msie,u=d&&Ct.version<9,h=a._editContainer,f=a.options.editable&&a.options.editable.update!==!1;if(o=e(o),s="incell"==c?n.hasClass("k-edit-cell"):n.parent().hasClass("k-grid-edit-row"),a.editable){if(e.contains(h[0],l[0])&&(Ct.opera||u?l.blur().change().triggerHandler("blur"):(l.blur(),d&&l.blur())),!a.editable)return re(o),t;if(!a.editable.end())return a._setCurrent("incell"==c?h:h.children().filter(ze).first()),r=h.find(":kendoFocusable:first")[0],r&&r.focus(),t;"incell"==c?a.closeCell():(a.saveRow(),s=!0)}i&&a._setCurrent(i),u&&document.body.focus(),re(o,!0),f&&(!s&&!i||i)&&("incell"==c?a.editCell(a.current()):a.editRow(a.current().parent()))},_wrapper:function(){var e=this,t=e.table,n=e.options.height,i=e.element;i.is("div")||(i=i.wrap("<div/>").parent()),e.wrapper=i.addClass("k-grid k-widget"),n&&(e.wrapper.css(ct,n),t.css(ct,"auto")),e._initMobile()},_initMobile:function(){var t,n=this.options,i=this;this._isMobile=n.mobile===!0&&he.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile,this._isMobile&&(t=this.wrapper.addClass("k-grid-mobile").wrap("<div data-"+he.ns+'stretch="true" data-'+he.ns+'role="view" data-'+he.ns+'init-widgets="false"></div>').parent(),this.pane=he.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"},n.height&&this.pane.element.parent().css(ct,n.height),this._editAnimation="slide",this.view.bind("show",function(){i._isLocked()&&(i._updateTablesWidth(),i._applyLockedContainersWidth(),i._syncLockedContentHeight(),i._syncLockedHeaderHeight(),i._syncLockedFooterHeight())}))},_tbody:function(){var t,n=this,i=n.table;t=i.find(">tbody"),t.length||(t=e("<tbody/>").appendTo(i)),n.tbody=t.attr("role","rowgroup")},_scrollable:function(){var t,n,i,o,r=this,s=r.options,a=s.scrollable,l=a!==!0&&a.virtual&&!r.virtualScrollable,c=!he.support.kineticScrollNeeded||l?he.support.scrollbar():0;a&&(t=r.wrapper.children(".k-grid-header"),t[0]||(t=e('<div class="k-grid-header" />').insertBefore(r.table)),t.css(xt?"padding-left":"padding-right",a.virtual?c+1:c),n=e('<table role="grid" />'),St&&n.attr("cellspacing",0),n.width(r.table[0].style.width),n.append(r.thead),t.empty().append(e('<div class="k-grid-header-wrap k-auto-scrollable" />').append(n)),r.content=r.table.parent(),r.content.is(".k-virtual-scrollable-wrap, .km-scroll-container")&&(r.content=r.content.parent()),r.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(r.content=r.table.wrap('<div class="k-grid-content k-auto-scrollable" />').parent()),l&&(r.virtualScrollable=new Dt(r.content,{dataSource:r.dataSource,itemHeight:function(){return r._averageRowHeight()}})),r.scrollables=t.children(".k-grid-header-wrap").add(r.content),i=r.wrapper.find(".k-grid-footer"),i.length&&(r.scrollables=r.scrollables.add(i.children(".k-grid-footer-wrap"))),a.virtual?r.content.find(">.k-virtual-scrollable-wrap").unbind("scroll"+Oe).bind("scroll"+Oe,function(){r.scrollables.scrollLeft(this.scrollLeft),r.lockedContent&&(r.lockedContent[0].scrollTop=this.scrollTop)}):(r.content.unbind("scroll"+Oe).bind("scroll"+Oe,function(e){r.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft),r.lockedContent&&e.currentTarget==r.content[0]&&(r.lockedContent[0].scrollTop=this.scrollTop)}),o=r.content.data("kendoTouchScroller"),o&&o.destroy(),o=he.touchScroller(r.content),o&&o.movable&&(r.touchScroller=o,o.movable.bind("change",function(e){r.scrollables.scrollLeft(-e.sender.x),r.lockedContent&&r.lockedContent.scrollTop(-e.sender.y)}),r.one(Xe,function(e){e.sender.wrapper.addClass("k-grid-backface")}))))},_renderNoRecordsContent:function(){var t,n=this;n.options.noRecords&&(t=n.table.parent().children("."+nt),t.length&&(n.angular("cleanup",function(){return{elements:t.get()}}),t.remove()),n.dataSource&&n.dataSource.view().length||(t=e(n.noRecordsTemplate({})).insertAfter(n.table),n.angular("compile",function(){return{elements:t.get(),data:[{}]}})))},_setContentWidth:function(t){var n,i=this,o="k-grid-content-expander",r='<div class="'+o+'"></div>',s=i.resizable;i.options.scrollable&&i.wrapper.is(":visible")&&(n=i.table.parent().children("."+o),i._setContentWidthHandler=Ae(i._setContentWidth,i),i.dataSource&&i.dataSource.view().length?n[0]&&(n.remove(),s&&s.unbind("resize",i._setContentWidthHandler)):(n[0]||(n=e(r).appendTo(i.table.parent()),s&&s.bind("resize",i._setContentWidthHandler)),i.thead&&(n.width(i.thead.width()),isNaN(parseFloat(t,10))||i.content.scrollLeft(t))),i._applyLockedContainersWidth(),i.lockedHeader&&0===i.table[0].clientWidth&&(i.table[0].style.width="1px"))},_applyLockedContainersWidth:function(){if(this.options.scrollable&&this.lockedHeader){var e,t=this.thead.parent(),n=t.parent(),i=this.wrapper[0].clientWidth,o=this._groups(),r=he.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=A(s),c=A(a);o>0&&(l+=_e(this.lockedHeader.find(".k-group-cell:first"))*o),l>=i&&(l=i-3*r),this.lockedHeader.add(this.lockedContent).width(l),n[0].style.width=n.parent().width()-l-2+"px",t.add(this.table).width(c),this.virtualScrollable&&(i-=r),this.content[0].style.width=i-l-2+"px",this.lockedFooter&&this.lockedFooter.length&&(this.lockedFooter.width(l),e=this.footer.find(".k-grid-footer-wrap"),e[0].style.width=n[0].clientWidth+"px",e.children().first().width(c))}},_setContentHeight:function(){var e,t=this,n=t.options,i=t.wrapper.innerHeight(),o=t.wrapper.children(".k-grid-header"),r=he.support.scrollbar();n.scrollable&&t.wrapper.is(":visible")&&(i-=be(o),t.pager&&(i-=be(t.pager.element)),n.groupable&&(i-=be(t.wrapper.children(".k-grouping-header"))),n.toolbar&&(i-=be(t.wrapper.children(".k-grid-toolbar"))),t.footerTemplate&&(i-=be(t.wrapper.children(".k-grid-footer"))),e=function(e){var t,n;return!!e[0].style.height||(t=e.height(),e.height("auto"),n=e.height(),t!=n?(e.height(""),!0):(e.height(""),!1))},e(t.wrapper)&&(i>2*r?(t.lockedContent&&(r=t.table[0].offsetWidth>t.table.parent()[0].clientWidth?r:0,t.lockedContent.height(i-r)),t.content.height(i)):t.content.height(2*r+1)))},_averageRowHeight:function(){var e,t=this,n=t._items(t.tbody).length,i=t._rowHeight;return 0===n?i:(t._rowHeight||(t._rowHeight=i=be(t.table)/n,t._sum=i,t._measures=1),e=be(t.table)/n,i!==e&&(t._measures++,t._sum+=e,t._rowHeight=t._sum/t._measures),i)},_dataSource:function(){var e,n=this,i=n.options,o=i.dataSource;o=Se(o)?{data:o}:o,ye(o)&&(ke(o,{table:n.table,fields:n.columns}),e=i.pageable,ye(e)&&e.pageSize!==t&&(o.pageSize=e.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind($e,n._refreshHandler).unbind(Ie,n._progressHandler).unbind(Fe,n._errorHandler):(n._refreshHandler=Ae(n.refresh,n),n._progressHandler=Ae(n._requestStart,n),n._errorHandler=Ae(n._error,n)),n.dataSource=pe.create(o).bind($e,n._refreshHandler).bind(Ie,n._progressHandler).bind(Fe,n._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var n,i,o,r,s,a,l,c,d,u,h=this,f=h.tbody,p=t.model,m=h.tbody.find("tr["+he.attr("uid")+"="+p.uid+"]"),g=m.hasClass("k-alt"),v=h._items(f).index(m),_=h.lockedContent;if(_&&(n=h._relatedRow(m)),m.add(n).children(".k-edit-cell").length&&!h.options.rowTemplate)m.add(n).children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){i=e(this),o=H(h.columns)[h.cellIndex(i)],o.field===t.field&&(i.hasClass("k-edit-cell")?i.addClass("k-dirty-cell"):(h._displayCell(i,o,p),e('<span class="k-dirty"/>').prependTo(i)))});else if(!m.hasClass("k-grid-edit-row")){for(a=e().add(m),_&&(r=(g?h.lockedAltRowTemplate:h.lockedRowTemplate)(p),a=a.add(n),n.replaceWith(r)),h.angular("cleanup",function(){return{elements:a.get()}}),r=(g?h.altRowTemplate:h.rowTemplate)(p),m.replaceWith(r),r=h._items(f).eq(v),u=[{dataItem:p}],_&&(m=m.add(n),n=h._relatedRow(r)[0],ie(r[0],n),r=r.add(n),u.push({dataItem:p})),h.angular("compile",function(){return{elements:r.get(),data:u}}),s=h.options.selectable,s&&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],i=l.eq(v),s&&c.eq(v).hasClass("k-state-selected")&&i.addClass("k-state-selected"),o.field===t.field&&e('<span class="k-dirty"/>').prependTo(i);h.trigger("itemChange",{item:r,data:p,ns:fe})}},_pageable:function(){var t,n=this,i=n.options.pageable;i&&(t=n.wrapper.children("div.k-grid-pager"),t.length||(t=e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(n.wrapper)),n.pager&&n.pager.destroy(),n.pager="object"==typeof i&&i instanceof he.ui.Pager?i:new he.ui.Pager(t,ke({},i,{dataSource:n.dataSource})),n.pager.bind("pageChange",function(e){n.trigger("page",{page:e.index})&&e.preventDefault()}))},_footer:function(){var t,n,i,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?(n=s,o.angular("cleanup",function(){return{elements:c.get()}}),c.replaceWith(n),c=o.footer=n):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:xe(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&&(i=o.content.scrollLeft(),l.scrollable!==!0&&l.scrollable.virtual&&(i=o.wrapper.find(".k-virtual-scrollable-wrap").scrollLeft()),t.scrollLeft(i))),o.lockedContent&&(o._appendLockedColumnFooter(),o._applyLockedContainersWidth(),o._syncLockedFooterHeight())},_wrapFooter:function(t){var n=this,i="",o=he.support.mobileOS?0:he.support.scrollbar();return n.options.scrollable?(i=e('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table'+(St?' cellspacing="0"':"")+"><tbody>"+t+"</tbody></table></div></div>"),n._appendCols(i.find("table")),i.css(xt?"padding-left":"padding-right",o),i):'<tfoot class="k-grid-footer">'+t+"</tfoot>"},_columnMenu:function(){var e,n,i,o,r,s,a,l,c,d=this,u=H(d.columns),h=d.options,f=h.columnMenu,p=Ce(d.columns,function(e){return e.columns!==t}).length>0,m=this._isMobile,g=function(e){d.trigger(Ge,{field:e.field,container:e.container})},v=function(e){re(e.closest("table"),!0)},_=function(e){d.trigger("sort",{sort:e.sort})&&e.preventDefault()},b=function(e){d.trigger("filter",{filter:e.filter,field:e.field})&&e.preventDefault()},w=h.$angular;if(f)for("boolean"==typeof f&&(f={}),s=N(d.thead),a=0,l=s.length;a<l;a++)n=u[a],c=s.eq(a),n.command||!n.field&&!c.attr("data-"+he.ns+"field")||(e=c.data("kendoColumnMenu"),e&&e.destroy(),o=n.sortable!==!1&&f.sortable!==!1&&h.sortable!==!1&&ke({},h.sortable,{compare:(n.sortable||{}).compare}),r=!(!h.filterable||n.filterable===!1||f.filterable===!1)&&ke({pane:d.pane},h.filterable,n.filterable),n.filterable&&n.filterable.dataSource&&(r.forceUnique=!1,r.checkSource=n.filterable.dataSource),r&&(r.format=n.format),i={dataSource:d.dataSource,values:n.values,columns:f.columns,sortable:o,filterable:r,messages:f.messages,owner:d,closeCallback:v,init:g,pane:d.pane,sort:_,filtering:b,filter:m?":not(.k-column-active)":"",lockedColumns:!p&&n.lockable!==!1&&F(u).length>0},w&&(i.$angular=w),c.kendoColumnMenu(i))},_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,n,i,o,r,s,a=this,l=H(a.columns),c=function(e){a.trigger(qe,{field:e.field,container:e.container})},d=function(e){re(e.closest("table"),!0)},u=function(e){a.trigger("filter",{filter:e.filter,field:e.field})&&e.preventDefault()},h=a.options.filterable;if(h&&typeof h.mode==ht&&h.mode.indexOf("menu")==-1&&(h=!1),h&&!a.options.columnMenu)for(t=N(a.thead),i=0,o=t.length;i<o;i++)n=t.eq(i),l[i].filterable===!1||l[i].command||!l[i].field&&!n.attr("data-"+he.ns+"field")||(e=n.data("kendoFilterMenu"),e&&e.destroy(),e=n.data("kendoFilterMultiCheck"),e&&e.destroy(),r=l[i].filterable,s=ke({},h,r,{dataSource:a.dataSource,values:l[i].values,format:l[i].format,closeCallback:d,title:l[i].title||l[i].field,init:c,pane:a.pane,change:u}),r&&r.messages&&(s.messages=ke(!0,{},h.messages,r.messages)),r&&r.dataSource&&(s.forceUnique=!1,s.checkSource=r.dataSource),r&&r.multi?n.kendoFilterMultiCheck(s):n.kendoFilterMenu(s))},_filterRow:function(){var t,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g=this;if(g._hasFilterRow())for(n=g.options.$angular,i=H(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()},this._updateHeader(this.dataSource.group().length),a=0;a<i.length;a++)if(c=i[a],d=g.options.filterable.operators,u=!1,h=e("<th/>"),f=c.field,c.hidden&&h.hide(),r.append(h),f&&c.filterable!==!1){if(p=c.filterable&&c.filterable.cell||{},l=g.options.dataSource,l instanceof pe&&(l=g.options.dataSource.options),m=ke(!0,{},o.messages),c.filterable&&ke(!0,m,c.filterable.messages),p.enabled===!1){h.html("&nbsp;");continue}p.dataSource&&(l=p.dataSource,u=!0),c.filterable&&c.filterable.operators&&(d=c.filterable.operators),t={column:c,dataSource:g.dataSource,suggestDataSource:l,customDataSource:u,field:f,messages:m,values:c.values,template:p.template,delay:p.delay,inputWidth:p.inputWidth,suggestionOperator:p.suggestionOperator,minLength:p.minLength,dataTextField:p.dataTextField,operator:p.operator,operators:d,showOperators:p.showOperators,change:s},n&&(t.$angular=n),e("<span/>").attr(he.attr("field"),f).appendTo(h).kendoFilterCell(t)}else h.html("&nbsp;")},_sortable:function(){var e,t,n,i,o,r,s=this,a=H(s.columns),l=s.options.sortable,c=function(e){s.trigger("sort",{sort:e.sort})&&e.preventDefault()};if(l){for(i=N(s.thead),o=0,r=i.length;o<r;o++)e=a[o],e.sortable!==!1&&!e.command&&e.field&&(n=i.eq(o),t=n.data("kendoColumnSorter"),t&&t.destroy(),n.attr("data-"+he.ns+"field",e.field).kendoColumnSorter(ke({},l,e.sortable,{dataSource:s.dataSource,aria:!0,filter:":not(.k-column-active)",change:c})));i=null}},_columns:function(t){var n,i,o,r=this,s=r.table,a=s.find("col"),c=r.options.dataSource;if(t=t.length?t:xe(s.find("th"),function(t,n){t=e(t);var i=t.attr(he.attr("sortable")),o=t.attr(he.attr("filterable")),r=t.attr(he.attr("type")),s=t.attr(he.attr("groupable")),l=t.attr(he.attr("field")),c=t.attr(he.attr("title")),d=t.attr(he.attr("menu"));return l||(l=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:l,type:r,title:c,sortable:"false"!==i,filterable:"false"!==o,groupable:"false"!==s,menu:d,template:t.attr(he.attr("template")),width:a.eq(n).css("width")}}),n=!(r.table.find("tbody tr").length>0&&(!c||!c.transport)),r.options.scrollable){if(o=t,i=F(t),t=z(t),i.length>0&&0===t.length)throw Error("There should be at least one non locked column");G(r.element.find("tr:has(th):first"),o),t=i.concat(t)}r.columns=l(t,n)},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,t,o,r){var s,a,l,c,d=this,u=ke({},he.Template,d.options.templateSettings),h=t.length,f={storage:{},count:0},p=d._hasDetails(),m=[],g=d._groups(),v=d.options.navigatable;if(!e){for(e="<tr",o&&m.push("k-alt"),p&&m.push("k-master-row"),m.length&&(e+=' class="'+m.join(" ")+'"'),h&&(e+=" "+he.attr("uid")+'="#='+he.expr("uid",u.paramName)+'#"'),e+=" role='row'>",g>0&&!r&&(e+=n(g)),p&&(e+='<td class="k-hierarchy-cell"><a class="k-icon k-i-expand" href="\\#" tabindex="-1"></a></td>'),s=0;s<h;s++)l=t[s],a=l.template,c=typeof a,e+="<td"+i(l.attributes),v&&(e+=" aria-describedby='"+l.headerAttributes.id+"'"),e+=" role='gridcell'>",e+=d._cellTmpl(l,f),e+="</td>";e+="</tr>"}return e=he.template(e,u),f.count>0?Ae(e,f.storage):e},_headerCellText:function(e){var t=this,n=ke({},he.Template,t.options.templateSettings),i=e.headerTemplate,o=typeof i,r=e.title||e.field||"";return o===ut?r=he.template(i,n)({}):o===ht&&(r=i),r},_cellTmpl:function(e,t){var n,i,o=this,r=ke({},he.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(Se(e.command)){for(n=0,i=e.command.length;n<i;n++)c+=e.command[n].visible?he.format("#= {0}(data)? '{1}':'' #",e.command[n].visible,o._createButton(e.command[n]).replace(_t,"\\#")):o._createButton(e.command[n]).replace(_t,"\\#");return c}return o._createButton(e.command).replace(_t,"\\#")}return u===ut?(t.storage["tmpl"+t.count]=s,c+="#=this.tmpl"+t.count+"("+a+")#",t.count++):u===ht?c+=s:h&&h.length&&ye(h[0])&&"value"in h[0]&&l?(c+="#var v ="+he.stringify($(h)).replace(_t,"\\#")+"#",c+="#var f = v[",r.useWithBlock||(c+=a+"."),c+=l+"]#",c+="${f != null ? f : ''}"):(c+=e.encoded?"#:":"#=",d&&(c+='kendo.format("'+d.replace(vt,"\\$1")+'",'),l?(l=he.expr(l,a),c+=l+"==null?'':"+l):c+="''",d&&(c+=")"),c+="#"),c},_templates:function(){var t=this,n=t.options,i=t.dataSource,o=i.group(),r=t.footer||t.wrapper.find(".k-grid-footer"),s=i.aggregate(),a=H(t.columns),l=H(F(t.columns)),c=n.scrollable?H(z(t.columns)):a;if(n.scrollable&&l.length){if(n.rowTemplate||n.altRowTemplate)throw Error("Having both row template and locked columns is not supported");t.rowTemplate=t._tmpl(n.rowTemplate,c,!1,!0),t.altRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,c,!0,!0),t.lockedRowTemplate=t._tmpl(n.rowTemplate,l),t.lockedAltRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,l,!0)}else t.rowTemplate=t._tmpl(n.rowTemplate,c),t.altRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,c,!0);t._hasDetails()&&(t.detailTemplate=t._detailTmpl(n.detailTemplate||"")),(t._group&&!Me(s)||!Me(s)&&!r.length||Ce(a,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(a,s,"footerTemplate","k-footer-template")),o&&Ce(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),n.scrollable&&l.length&&(t.lockedGroupFooterTemplate=t._footerTmpl(l,s,"groupFooterTemplate","k-group-footer"))),t.options.noRecords&&(t.noRecordsTemplate=t._noRecordsTmpl())},_noRecordsTmpl:function(){var t,n,i,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({},he.Template,this.options.templateSettings),c=l.paramName,d="";return t=this.options.noRecords.template?this.options.noRecords.template:he.format(r,this.options.messages.noRecords,s),n=typeof t,"function"===n?(a.storage["tmpl"+a.count]=t,d+="#=this.tmpl"+a.count+"("+c+")#",a.count++):"string"===n&&(d+=t),i=he.template(he.format(o,nt,d),l),a.count>0&&(i=e.proxy(i,a.storage)),i},_footerTmpl:function(e,t,o,r,s){var a,l,c,d,u,h=this,f=ke({},he.Template,h.options.templateSettings),p=f.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[o],d=typeof c,m+="<td"+i(u.footerAttributes)+">",c?(d!==ut&&(_=w[u.field]?ke({},f,{paramName:p+"['"+u.field+"']"}):{},c=he.template(c,_)),g["tmpl"+v]=c,m+="#=this.tmpl"+v+"("+p+")#",v++):m+="&nbsp;",m+="</td>";return m+="</tr>",m=he.template(m,f),v>0?Ae(m,g):m},_detailTmpl:function(e){var t=this,i="",o=ke({},he.Template,t.options.templateSettings),r=o.paramName,s={},a=0,l=t._groups(),c=p(H(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===ut?(s["tmpl"+a]=e,i+="#=this.tmpl"+a+"("+r+")#",a++):i+=e,i+="</td></tr>",i=he.template(i,o),a>0?Ae(i,s):i},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[je]||[]).length},_hasFilterRow:function(){var t=this.options.filterable,n=t&&typeof t.mode==ht&&t.mode.indexOf("row")!=-1,i=this.columns,o=e.grep(i,function(e){return e.filterable===!1});return i.length&&o.length==i.length&&(n=!1),n},_details:function(){var t=this;if(t.options.scrollable&&t._hasDetails()&&F(t.columns).length)throw Error("Having both detail template and locked columns is not supported");t.table.on(lt+Oe,".k-hierarchy-cell .k-i-expand, .k-hierarchy-cell .k-i-collapse",function(n){var i,o,r=e(this),s=r.hasClass("k-i-expand"),a=r.closest("tr.k-master-row"),l=t.detailTemplate,c=t._hasDetails();
return r.toggleClass("k-i-expand",!s).toggleClass("k-i-collapse",s),i=a.next(),c&&!i.hasClass("k-detail-row")&&(o=t.dataItem(a),i=e(l(o)).addClass(a.hasClass("k-alt")?"k-alt":"").insertAfter(a),t.angular("compile",function(){return{elements:i.get(),data:[{dataItem:o}]}}),t.trigger(je,{masterRow:a,detailRow:i,data:o,detailCell:i.find(".k-detail-cell")})),t.trigger(s?Ze:Je,{masterRow:a,detailRow:i}),i.toggle(s),t._current&&t._current.attr("aria-expanded",s),n.preventDefault(),!1})},dataItem:function(t){if(t=e(t)[0],!t)return null;var n,i,o=this.tbody.children(),r=/k-grouping-row|k-detail-row|k-group-footer/,s=t.sectionRowIndex;for(i=s,n=0;n<s;n++)r.test(o[n].className)&&i--;return this._data[i]},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,n){var o,r,s,a,l,c,d=this,u="",h=H(d.columns);for(o=0,a=e.length;o<a;o++)r=e[o].column||e[o],s=d._headerCellText(r),l="",c=Te(r,h),r.command?(u+="<th scope='col'"+i(r.headerAttributes),n&&!e[o].colSpan&&(u+=" rowspan='"+n+"'"),c>-1&&(u+=he.attr("index")+"='"+c+"'"),u+=">"+s+"</th>"):(r.field&&(l=he.attr("field")+"='"+r.field+"' "),u+="<th scope='col' role='columnheader' "+l,u+=" aria-haspopup='true'",n&&!e[o].colSpan&&(u+=" rowspan='"+n+"'"),e[o].colSpan>1&&(u+='colspan="'+(e[o].colSpan-D(r.columns))+'" ',u+=he.attr("colspan")+"='"+e[o].colSpan+"'"),r.title&&(u+=he.attr("title")+'="'+r.title.replace('"',"&quot;").replace(/'/g,"'")+'" '),r.groupable!==t&&(u+=he.attr("groupable")+"='"+r.groupable+"' "),r.aggregates&&r.aggregates.length&&(u+=he.attr("aggregates")+"='"+r.aggregates+"'"),c>-1&&(u+=he.attr("index")+"='"+c+"'"),u+=i(r.headerAttributes),u+=">"+s+"</th>");return u},_appendLockedColumnContent:function(){var t,n,i,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,n=s.length;t<n;t++)if(s[t].locked)if(f(s[t])){for(o=1,s[t].columns&&(o=H(s[t].columns).length-D(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++;i=e('<div class="k-grid-content-locked"><table'+(St?' cellspacing="0"':"")+"><colgroup/><tbody></tbody></table></div>"),a.detach(),i.find("colgroup").append(c),a.insertBefore(this.table.find("tbody")),this.lockedContent=i.insertBefore(this.content),this.lockedTable=i.children("table")},_appendLockedColumnFooter:function(){var t,n,i=this,o=i.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=i._groups(),c=e(),d=e();for(c=c.add(r.filter(".k-group-cell")),t=0,n=H(F(i.columns)).length;t<n;t++)c=c.add(r.eq(t+l));for(d=d.add(s.filter(".k-group-col")),t=0,n=p(H(B(i.columns))).length;t<n;t++)d=d.add(s.eq(t+l));c.appendTo(a.find("tr")),d.appendTo(a.find("colgroup")),i.lockedFooter=a.prependTo(o)},_appendLockedColumnHeader:function(t){var n,i,o,r,s,a,l,c,d,u,h,p=this,g=this.columns,v=[],_=0,b=e(),w=p._hasFilterRow(),y=0,k=e(),x=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)"),A=p.thead.find(".k-filter-row").find("th:not(.k-group-cell,.k-hierarchy-cell)"),M=0;for(n=0,o=g.length;n<o;n++){if(g[n].locked){if(l=T.eq(n),x=H(g[n].columns||[]).length,f(g[n])){for(c=null,g[n].columns&&(c=x-D(g[n].columns)),c=c||1,d=0;d<c;d++)b=b.add(S.eq(n+M+d-_));M+=c-1}for(I([g[n]],V(l),v,0,0),x=x||1,u=0;u<x;u++)k=k.add(A.eq(y+u));y+=x}g[n].columns&&(_+=D(g[n].columns)),f(g[n])||_++}if(v.length){for(i='<div class="k-grid-header-locked" style="width:1px"><table'+(St?' cellspacing="0"':"")+"><colgroup/><thead>",i+=Array(v.length+1).join("<tr></tr>"),i+=(w?'<tr class="k-filter-row" />':"")+"</thead></table></div>",a=e(i),S=a.find("colgroup"),S.append(p.thead.prev().find("col.k-group-col").add(b)),r=a.find("thead tr:not(.k-filter-row)"),n=0,o=v.length;n<o;n++)C=m(v[n]),r.eq(n).append(p.thead.find("tr:eq("+n+") .k-group-cell").add(C));return h=R(this.thead),v.length<h&&E(a,h-v.length),s=a.find(".k-filter-row"),s.append(p.thead.find(".k-filter-row .k-group-cell").add(k)),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);he.destroy(e),e.off(Oe).remove(),this.lockedHeader=this.lockedContent=this.lockedFooter=null,this.selectable=null},_thead:function(){var t,n,i,o,r,s,a,l=this,c=l.columns,d=l._hasDetails()&&c.length,u=l._hasFilterRow(),h="",f=l.table.find(">thead"),p=l.element.find("thead:first").length>0;if(f.length||(f=e("<thead/>").insertBefore(l.tbody)),l.lockedHeader&&l.thead?(n=l.thead.find("tr:has(th):not(.k-filter-row)").html(""),n.remove(),n=e(),l._removeLockedContainers()):n=l.element.find(p?"thead:first tr:has(th):not(.k-filter-row)":"tr:has(th):first"),!n.length&&(n=f.children().first(),!n.length)){for(i=[{rowSpan:1,cells:[],index:0}],l._prepareColumns(i,c),t=0;t<i.length;t++)h+="<tr>",d&&(h+='<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),h+=l._createHeaderCells(i[t].cells,i[t].rowSpan),h+="</tr>";n=e(h)}u&&(o=e("<tr/>"),o.addClass("k-filter-row"),(d||n.find(".k-hierarchy-cell").length)&&o.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),r=(l.thead||f).find(".k-filter-row"),r.length&&(he.destroy(r),r.remove()),f.append(o)),n.children().length?d&&!n.find(".k-hierarchy-cell")[0]&&n.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'):(h="",d&&(h+='<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),h+=l._createHeaderCells(c),n.html(h)),n.attr("role","row").find("th").addClass("k-header"),l.options.scrollable||f.addClass("k-grid-header"),n.find("script").remove().end().prependTo(f),l.thead&&l._destroyColumnAttachments(),this.angular("cleanup",function(){return{elements:f.find("th").get()}}),this.angular("compile",function(){return{elements:f.find("th").get(),data:xe(c,function(e){return{column:e}})}}),l.thead=f.attr("role","rowgroup"),l._sortable(),l._filterable(),l._filterRow(),l._scrollable(),l._updateCols(),l._columnMenu(),a=this.options.scrollable&&F(this.columns).length,a&&(s=l._appendLockedColumnHeader(l.thead.closest(".k-grid-header")),l._appendLockedColumnContent(),l.lockedContent.bind("DOMMouseScroll"+Oe+" mousewheel"+Oe,Ae(l._wheelScroll,l))),l._updateColumnCellIndex(),l._updateFirstColumnClass(),l._resizable(),l._draggable(),l._reorderable(),l._updateHeader(l._groups()),a&&(s&&l._syncLockedHeaderHeight(),l._applyLockedContainersWidth()),l.groupable&&l._attachGroupable()},_retrieveFirstColumn:function(t,n){var i,o=e();if(n.length&&t[0]){for(i=t[0];i.columns&&i.columns.length;)i=i.columns[0],n=n.filter(":not(:first())");o=o.add(n)}return o},_updateFirstColumnClass:function(){var t,n,i=this,o=i.columns||[],r=i._hasDetails()&&o.length;r||i._groups()||(t=i.thead.find(">tr:not(.k-filter-row):not(:first)"),o=z(o),n=i._retrieveFirstColumn(o,t),i._isLocked()&&(t=i.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),o=F(i.columns),n=n.add(i._retrieveFirstColumn(o,t))),n.each(function(){var t=e(this).find("th");t.removeClass("k-first"),t.eq(0).addClass("k-first")}))},_prepareColumns:function(e,t,n,i){var o,r,s=i||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);n&&(n.colSpan+=l)},_wheelScroll:function(e){var t,n,i;e.ctrlKey||(t=this.content,this.options.scrollable.virtual&&(t=this.virtualScrollable.verticalScrollbar),n=t.scrollTop(),i=he.wheelDeltaY(e),i&&(t[0].scrollHeight>t[0].clientHeight&&(t[0].scrollTop<t[0].scrollHeight-t[0].clientHeight&&i<0||t[0].scrollTop>0&&i>0)&&e.preventDefault(),t.scrollTop(n+-i)))},_isLocked:function(){return null!=this.lockedHeader},_updateHeaderCols:function(){var e=this.thead.parent().add(this.table);this._isLocked()?q(e,L(P(this.columns)),this._hasDetails(),0):q(e,L(p(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),q(e,L(B(this.columns)),this._hasDetails(),this._groups()))},_appendCols:function(e,t){t?q(e,L(P(this.columns)),this._hasDetails(),0):q(e,L(p(this.columns)),this._hasDetails(),this._groups())},_autoColumns:function(e){if(e&&e.toJSON){var t,n,i=this;e=e.toJSON(),n=!(i.table.find("tbody tr").length>0&&(!i.dataSource||!i.dataSource.transport));for(t in e)i.columns.push({field:t,encoded:n,headerAttributes:{id:he.guid()}});i._thead(),i._templates()}},_rowsHtml:function(e,t){var n,i,o=this,r="",s=t.rowTemplate,a=t.altRowTemplate;for(n=0,i=e.length;n<i;n++)r+=n%2?a(e[n]):s(e[n]),o._data.push(e[n]);return r},_groupRowHtml:function(e,t,n,i,o,r){var s,a,l,c,d=this,u="",h=e.field,f=Ce(H(d.columns),function(e){return e.field==h})[0]||{},p=f.groupHeaderTemplate,m=(f.title||h)+": "+Y(e.value,f.format,f.values,f.encoded),g=d._groupAggregatesDefaultObject||{},v=ke({},g,e.aggregates),_=ke({},{field:e.field,value:e.value,aggregates:v},e.aggregates[e.field]),b=o.groupFooterTemplate,w=e.items;if(p&&(m=typeof p===ut?p(_):he.template(p)(_)),u+=i(t,n,m),e.hasSubgroups)for(s=0,a=w.length;s<a;s++)u+=d._groupRowHtml(w[s],r?t:t-1,n+1,i,o,r);else u+=d._rowsHtml(w,o);if(b){l={};for(c in v)l[c]=ke({},v[c],{group:{field:e.field,value:e.value}});u+=b(l)}return u},collapseGroup:function(t){var n,i,o,r,s,a,l,c,d,u;for(t=e(t),i=this.options.groupable,o=i.showFooter,r=o?0:1,a=e(),this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?a=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(a=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),n=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),t=t.nextAll("tr"),u=[],l=0,c=t.length;l<c&&(d=t.eq(l),s=d.find(".k-group-cell").length,d.hasClass("k-grouping-row")?r++:d.hasClass("k-group-footer")&&r--,!(s<=n||d.hasClass("k-group-footer")&&r<0));l++)a.length&&u.push(a[l]),u.push(d[0]);e(u).hide()},expandGroup:function(t){t=e(t);var n,i,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()+")"))),n=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),t=t.nextAll("tr"),r=0,s=t.length;r<s&&(i=t.eq(r),o=i.find(".k-group-cell").length,!(o<=n));r++)o!=n+1||i.hasClass("k-detail-row")||(i.show(),c.eq(r).show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&a.expandGroup(i),i.hasClass("k-master-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&(i.next().show(),c.eq(r+1).show())),i.hasClass("k-grouping-row")&&(l&&d.push(i.is(":visible")),u++),i.hasClass("k-group-footer")&&(l&&i.toggle(d.pop()),1==u?(i.show(),c.eq(r).show()):u--)},_updateHeader:function(t){var n=this,i=n._isLocked()?n.lockedHeader.find("thead"):n.thead,o=i.find("tr.k-filter-row").find("th.k-group-cell").length,r=i.find("tr:first").find("th.k-group-cell").length,s=i.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">&nbsp;</th>')).prependTo(i.children("tr:not(.k-filter-row)")),n.element.is(":visible")&&s.find("th.k-group-cell").hide()):t<r&&i.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(i.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,n=this;n._isLocked()&&(t=e(">.k-grid-footer>.k-grid-footer-wrap>table",n.wrapper).add(n.thead.parent()).add(n.table),n._footerWidth=te(t.eq(0)),t.width(n._footerWidth),t=e(">.k-grid-footer>.k-grid-footer-locked>table",n.wrapper).add(n.lockedHeader.find(">table")).add(n.lockedTable),t.width(te(t.eq(0))))},hideColumn:function(n){var i,o,r,a,l,c,d,m,g,v,_=this,b=0,w=_.footer||_.wrapper.find(".k-grid-footer"),y=_.columns,k=_.lockedHeader?N(_.lockedHeader.find(">table>thead")).filter(h).length:0;if(n="number"==typeof n?y[n]:ye(n)?Ce(T(y),function(e){return e===n})[0]:Ce(T(y),function(e){return e.field===n})[0],n&&f(n)){if(n.columns&&n.columns.length){for(c=C(n,y),u(n,!1),K(s(e(">table>thead",_.lockedHeader),_.thead,">tr:eq("+c.row+")>th"),c.cell,!1),r=0;r<n.columns.length;r++)this.hideColumn(n.columns[r]);return _.trigger(Ye,{column:n}),t}if(g=Te(n,p(H(y))),u(n,!1),_._setParentsVisibility(n,!1),_._templates(),_._updateCols(),_._updateLockedCols(),v=_.thead,d=g,_.lockedHeader&&k>g?v=_.lockedHeader.find(">table>thead"):d-=k,i=N(v).filter(h).eq(d),i[0].style.display="none",K(s(e(">table>thead",_.lockedHeader),_.thead,">tr.k-filter-row>th"),g,!1),w[0]&&(_._updateCols(w.find(">.k-grid-footer-wrap>table")),_._updateLockedCols(w.find(">.k-grid-footer-locked>table")),K(w.find(".k-footer-template>td"),g,!1)),_.lockedTable&&k>g?Q(_.lockedTable.find(">tbody>tr"),g):Q(_.tbody.children(),g-k),_.lockedTable)_._updateTablesWidth(),_._applyLockedContainersWidth(),_._syncLockedContentHeight(),_._syncLockedHeaderHeight(),_._syncLockedFooterHeight();else{for(a=_.thead.prev().find("col"),r=0,m=a.length;r<m;r+=1){if(l=a[r].style.width,!l||l.indexOf("%")!=-1){b=0;break}b+=parseInt(l,10)}o=e(">.k-grid-header table:first,>.k-grid-footer table:first",_.wrapper).add(_.table),_._footerWidth=null,b&&(o.each(function(){this.style.width=b+"px"}),_._footerWidth=b),Ct.msie&&8==Ct.version&&(o.css("display","inline-table"),setTimeout(function(){o.css("display","table")},1))}_._updateFirstColumnClass(),_.trigger(Ye,{column:n})}},_setParentsVisibility:function(t,n){var i,o,r,a,l,c=this.columns,h=[],f=n?function(e){return p(e.columns).length&&e.hidden}:function(e){return!p(e.columns).length&&!e.hidden};if(d(t,c,h)&&h.length)for(i=h.length-1;i>=0;i--)o=h[i],r=y(o,c),a=s(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)&&(u(o,n),a[0].style.display=n?"":"none"),a.filter("["+he.attr("colspan")+"]").length&&(l=parseInt(a.attr(he.attr("colspan")),10),a[0].colSpan=l-D(o.columns)||1)},showColumn:function(n){var i,o,r,a,l,c,d,h,p,m,g,v=this,_=v.columns,b=v.footer||v.wrapper.find(".k-grid-footer"),w=v.lockedHeader?N(v.lockedHeader.find(">table>thead")).length:0;if(n="number"==typeof n?_[n]:ye(n)?Ce(T(_),function(e){return e===n})[0]:Ce(T(_),function(e){return e.field===n})[0],n&&!f(n)){if(n.columns&&n.columns.length){for(d=y(n,_),u(n,!0),K(s(e(">table>thead",v.lockedHeader),v.thead,">tr:eq("+d.row+")>th"),d.cell,!0),i=0;i<n.columns.length;i++)this.showColumn(n.columns[i]);return v.trigger(Ke,{column:n}),t}if(m=Te(n,H(_)),u(n,!0),v._setParentsVisibility(n,!0),v._templates(),v._updateCols(),v._updateLockedCols(),g=v.thead,c=m,v.lockedHeader&&w>m?g=v.lockedHeader.find(">table>thead"):c-=w,r=N(g).eq(c),r[0].style.display="",K(s(e(">table>thead",v.lockedHeader),v.thead,">tr.k-filter-row>th"),m,!0),b[0]&&(v._updateCols(b.find(">.k-grid-footer-wrap>table")),v._updateLockedCols(b.find(">.k-grid-footer-locked>table")),K(b.find(".k-footer-template>td"),m,!0)),v.lockedTable&&w>m?J(v.lockedTable.find(">tbody>tr"),m):J(v.tbody.children(),m-w),v.lockedTable)v._updateTablesWidth(),v._applyLockedContainersWidth(),v._syncLockedContentHeight(),v._syncLockedHeaderHeight();else if(a=e(">.k-grid-header table:first,>.k-grid-footer table:first",v.wrapper).add(v.table),n.width){for(l=0,p=v.thead.prev().find("col"),i=0,o=p.length;i<o;i+=1){if(h=p[i].style.width,h.indexOf("%")>-1){l=0;break}l+=parseInt(h,10)}v._footerWidth=null,l&&(a.each(function(){this.style.width=l+"px"}),v._footerWidth=l)}else a.width("");v._updateFirstColumnClass(),v.trigger(Ke,{column:n})}},_progress:function(e){var t=this.element;this.lockedContent?t=this.wrapper:this.element.is("table")?t=this.element.parent():this.content&&this.content.length&&(t=this.content),he.ui.progress(t,e)},_resize:function(e,t){this._syncLockedContentHeight(),this._syncLockedHeaderHeight(),this.content&&(this._setContentWidth(),this._setContentHeight()),this.virtualScrollable&&(t||this._rowHeight)&&(t&&(this._rowHeight=null),this.virtualScrollable.repaintScrollbar())},_isActiveInTable:function(){var t=ge();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 n,i=this,o=i.dataSource.view(),r=i.options.navigatable,s=e(i.current()),a=!1,l=(i.dataSource.group()||[]).length,c=l+L(p(i.columns)).length;t&&"itemchange"===t.action&&i.editable||(t&&"remove"===t.action&&i.editable&&i.editable.options.model&&Te(i.editable.options.model,t.items)>-1&&i.editable.options.model.unbind($e,i._modelChangeHandler),t=t||{},i.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})||(i._angularItems("cleanup"),r&&(i._isActiveInTable()||i._editContainer&&i._editContainer.data("kendoWindow"))&&(a=s.is("th"),n=Math.max(i.cellIndex(s),0)),i._destroyEditable(),i._progress(!1),i._hideResizeHandle(),i._data=[],i.columns.length||(i._autoColumns(i._firstDataItem(o[0],l)),c=l+i.columns.length),i._group=l>0||i._group,i._group&&(i._templates(),i._updateCols(),i._updateLockedCols(),i._updateHeader(l),i._group=l>0),i._renderContent(o,c,l),i._renderLockedContent(o,c,l),i._footer(),i._renderNoRecordsContent(),i._setContentHeight(),i._setContentWidth(i.content&&i.content.scrollLeft()),i.lockedTable&&(i.options.scrollable.virtual?i.content.find(">.k-virtual-scrollable-wrap").trigger("scroll"):i.touchScroller?i.touchScroller.movable.trigger("change"):(i.wrapper.one("scroll",function(e){e.stopPropagation()}),i.content.trigger("scroll"))),i._restoreCurrent(n,a),i.touchScroller&&i.touchScroller.contentResized(),i.selectable&&i.selectable.resetTouchEvents(),i._muteAngularRebind(function(){i._angularItems("compile")}),i.trigger(Xe)))},_restoreCurrent:function(n,i){var o,r,s;n===t||n<0||(this._removeCurrent(),i?this._setCurrent(this.thead.find("th:not(.k-group-cell)").eq(n)):(o=0,this._rowVirtualIndex?o=this.virtualScrollable.position(this._rowVirtualIndex):n=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(n),this._setCurrent(s)),this._current&&re(this._current.closest("table")[0],!0))},_angularItems:function(e){he.ui.DataBoundWidget.fn._angularItems.call(this,e),"cleanup"===e&&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 n=this,i=n.tbody;n.lockedContent&&(i=n.lockedTable.find("tbody")),n._group&&n.angular(t,function(){return{elements:i.children(".k-grouping-row"),data:e.map(X(n.dataSource.view()),function(e){return{dataItem:e}})}})},_angularGroupFooterItems:function(t){var n=this,i=n.tbody;n.lockedContent&&(i=n.element),n._group&&n.groupFooterTemplate&&n.angular(t,function(){return{elements:i.find(".k-group-footer"),data:e.map(Z(n.dataSource.view()),function(e){return{dataItem:e}})}})},_renderContent:function(e,t,n){var i,o,r=this,s="",a=null!=r.lockedContent,l={rowTemplate:r.rowTemplate,altRowTemplate:r.altRowTemplate,groupFooterTemplate:r.groupFooterTemplate};if(t=a?t-L(B(r.columns)).length:t,n>0)for(t=a?t-n:t,r.detailTemplate&&t++,r.groupFooterTemplate&&(r._groupAggregatesDefaultObject=r.dataSource.aggregates()),i=0,o=e.length;i<o;i++)s+=r._groupRowHtml(e[i],t,0,a?ue:de,l,a);else s+=r._rowsHtml(e,l);r.tbody=U(r.tbody,r.table,s,this.options.$angular)},_renderLockedContent:function(e,t,n){var i,o,r,s="",a={rowTemplate:this.lockedRowTemplate,altRowTemplate:this.lockedAltRowTemplate,groupFooterTemplate:this.lockedGroupFooterTemplate};if(this.lockedContent){if(r=this.lockedTable,n>0)for(t-=p(H(z(this.columns))).length,i=0,o=e.length;i<o;i++)s+=this._groupRowHtml(e[i],t,0,de,a);else s=this._rowsHtml(e,a);U(r.children("tbody"),r,s,this.options.$angular),this._syncLockedContentHeight()}},_adjustRowsHeight:function(e,t){var n,i,o,r,s=e[0].rows,a=s.length,l=t[0].rows,c=e.add(t),d=c.length,u=[];for(n=0;n<a&&l[n];n++)s[n].style.height&&(s[n].style.height=l[n].style.height="");for(n=0;n<a&&l[n];n++)i=s[n].offsetHeight,o=l[n].offsetHeight,r=0,i>o?r=i:i<o&&(r=o),u.push(r);for(n=0;n<d;n++)c[n].style.display="none";for(n=0;n<a;n++)u[n]&&(s[n].style.height=l[n].style.height=u[n]+1+"px");for(n=0;n<d;n++)c[n].style.display=""}});he.ExcelMixin&&he.ExcelMixin.extend(Et.prototype),he.PDFMixin&&(he.PDFMixin.extend(Et.prototype),Et.prototype._drawPDF_autoPageBreak=function(n){function i(){u&&a!==t?(d.one("change",o),d.page(a)):(l.refresh(),o())}function o(){f.appendTo(document.body);var t=e.extend({},l.options.pdf,{_destructive:!0,progress:function(e){n.notify({page:e.page,pageNumber:e.pageNum,progress:.5+e.pageNum/e.totalPages/2,totalPages:e.totalPages})}});he.drawing.drawDOM(p,t).always(function(){f.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),i())}var s,a,l=this,c=new e.Deferred,d=l.dataSource,u=l.options.pdf.allPages,h=l.wrapper.find(".k-grid-content tbody"),f=e("<div>").css({position:"absolute",left:-1e4,top:-1e4}),p=l.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(f);return p.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),p.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),p.find(".k-grid-header").css({paddingRight:0}),this._initPDFProgress(n),s=p.find(".k-grid-content tbody").empty(),a=d.page(),u?(d.bind("change",r),d.page(1)):r(),c.promise()},Et.prototype._drawPDF=function(n){function i(){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};n.notify(r),l.append(r.page),t<o?s.page(t+1):i()}).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(n):(r=new e.Deferred,s=d.dataSource,a=d.options.pdf.allPages,this._initPDFProgress(n),l=new he.drawing.Group,c=s.page(),a?(s.bind("change",o),s.page(1)):o(),r.promise())},Et.prototype._initPDFProgress=function(t){var n,i=e("<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>");i.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(i),n=e("<div class='k-loading-pdf-progress'>").appendTo(i).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar"),t.progress(function(e){n.value(e.progress)}).always(function(){he.destroy(i),i.remove()})}),fe.plugin(Et),fe.plugin(Dt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.listview.min",["kendo.data.min","kendo.editable.min","kendo.selectable.min"],e)}(function(){return function(e,t){var n=window.kendo,i="change",o="cancel",r="dataBound",s="dataBinding",a=n.ui.Widget,l=n.keys,c=">*:not(.k-loading-mask)",d="progress",u="error",h="k-state-focused",f="k-state-selected",p="k-edit-item",m="edit",g="remove",v="save",_="click",b=".kendoListView",w=e.proxy,y=n._activeElement,k=n.ui.progress,x=n.data.DataSource,C=n.ui.DataBoundWidget.extend({init:function(t,i){var o=this;i=e.isArray(i)?{dataSource:i}:i,a.fn.init.call(o,t,i),i=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(),n.notify(o)},events:[i,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=n.template(e.template||""),this.altTemplate=n.template(e.altTemplate||e.template),this.editTemplate=n.template(e.editTemplate||"")},_item:function(e){return this.element.children()[e]()},items:function(){return this.element.children()},dataItem:function(t){var i=n.attr("uid"),o=e(t).closest("["+i+"]").attr(i);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(i,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(i,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 i,o,a,l,c,d=this,u=d.dataSource.view(),h="",f=d.template,p=d.altTemplate,m=y();if(e=e||{},"itemchange"===e.action)return d._hasBindingTarget()||d.editable||(i=e.items[0],a=d.items().filter("["+n.attr("uid")+"="+i.uid+"]"),a.length>0&&(l=a.index(),d.angular("cleanup",function(){return{elements:[a]}}),a.replaceWith(f(i)),a=d.items().eq(l),a.attr(n.attr("uid"),i.uid),d.angular("compile",function(){return{elements:[a],data:[{dataItem:i}]}}),d.trigger("itemChange",{item:a,data:i}))),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?p(u[l]):f(u[l]);for(d.element.html(h),o=d.items(),l=0,c=u.length;l<c;l++)o.eq(l).attr(n.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)}},_pageable:function(){var t,i,o=this,r=o.options.pageable;e.isPlainObject(r)&&(i=r.pagerId,t=e.extend({},r,{dataSource:o.dataSource,pagerId:null}),o.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,o,r=this,s=r.options.selectable,a=r.options.navigatable;s&&(e=n.ui.Selectable.parseOptions(s).multiple,r.selectable=new n.ui.Selectable(r.element,{aria:!0,multiple:e,filter:c,change:function(){r.trigger(i)}}),a&&r.element.on("keydown"+b,function(n){if(n.keyCode===l.SPACEBAR){if(o=r.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(o&&o.hasClass(f))return o.removeClass(f),t}else r.selectable.clear();else r.selectable.clear();r.selectable.value(o)}}))},current:function(e){var n=this,i=n.element,o=n._current,r=n._itemId;return e===t?o:(o&&o[0]&&(o[0].id===r&&o.removeAttr("id"),o.removeClass(h),i.removeAttr("aria-activedescendant")),e&&e[0]&&(r=e[0].id||r,n._scrollTo(e[0]),i.attr("aria-activedescendant",r),e.addClass(h).attr("id",r)),n._current=e,t)},_scrollTo:function(t){var n,i,o=this,r=!1,s="scroll";"auto"==o.wrapper.css("overflow")||o.wrapper.css("overflow")==s?n=o.wrapper[0]:(n=window,r=!0),i=function(i,o){var a=r?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+o],c=e(n)[s+i](),d=e(n)[o.toLowerCase()]();a+l>c+d?e(n)[s+i](a+l-d):a<c&&e(n)[s+i](a)},i("Top","Height"),i("Left","Width")},_navigatable:function(){var t=this,i=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")||o.focus()};i&&(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(i){var r,s,a=i.keyCode,c=t.current(),d=e(i.target),u=!d.is(":button,textarea,a,a>.t-icon,input"),h=d.is(":text,:password"),f=n.preventDefault,m=o.find("."+p),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")),f(i);else if(l.DOWN===a||l.RIGHT===a)c&&(c=c.next()),t.current(c&&c[0]?c:t._item("first")),f(i);else if(l.PAGEUP===a)t.current(null),t.dataSource.page(t.dataSource.page()-1),f(i);else if(l.PAGEDOWN===a)t.current(null),t.dataSource.page(t.dataSource.page()+1),f(i);else if(l.HOME===a)t.current(t._item("first")),f(i);else if(l.END===a)t.current(t._item("last")),f(i);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("."+p),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(i)},select:function(n){var i=this,o=i.selectable;return n=e(n),n.length?(o.options.multiple||(o.clear(),n=n.first()),o.value(n),t):o.value()},_destroyEditable:function(){var e=this;e.editable&&(e.editable.destroy(),delete e.editable)},_modelFromElement:function(e){var t=e.attr(n.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(){var e,t,i,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(),i=r.element.index(),r.element.replaceWith(s(e)),t=o.items().eq(i),t.attr(n.attr("uid"),e.uid),o._hasBindingTarget()&&n.bind(t,e),o.angular("compile",function(){return{elements:[t],data:[{dataItem:e}]}})),!0},edit:function(e){var t,i,o=this,r=o._modelFromElement(e),s=r.uid;o.cancel(),e=o.items().filter("["+n.attr("uid")+"="+s+"]"),i=e.index(),e.replaceWith(o.editTemplate(r)),t=o.items().eq(i).addClass(p).attr(n.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,n=this,i=n.editable;i&&(t=i.element,e=n._modelFromElement(t),i.end()&&!n.trigger(v,{model:e,item:t})&&(n._closeEditable(),n.dataSource.sync()))},remove:function(e){var t=this,n=t.dataSource,i=t._modelFromElement(e);t.editable&&(n.cancelChanges(t._modelFromElement(t.editable.element)),t._closeEditable()),t.trigger(g,{model:i,item:e})||(e.hide(),n.remove(i),n.sync())},add:function(){var e,t=this,n=t.dataSource,i=n.indexOf((n.view()||[])[0]);i<0&&(i=0),t.cancel(),e=n.insert(i,{}),t.edit(t.element.find("[data-uid='"+e.uid+"']"))},cancel:function(){var e,t,n=this,i=n.dataSource;n.editable&&(e=n.editable.element,t=n._modelFromElement(e),n.trigger(o,{model:t,container:e})||(i.cancelChanges(t),n._closeEditable()))},_crudHandlers:function(){var t=this,i=_+b;t.element.on(i,".k-edit-button",function(i){var o=e(this).closest("["+n.attr("uid")+"]");t.edit(o),i.preventDefault()}),t.element.on(i,".k-delete-button",function(i){var o=e(this).closest("["+n.attr("uid")+"]");t.remove(o),i.preventDefault()}),t.element.on(i,".k-update-button",function(e){
t.save(),e.preventDefault()}),t.element.on(i,".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(),n.destroy(e.element)}});n.ui.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.upload.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){return e.map(i(t),function(e){return e.name}).join(", ")}function i(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,n){var i=C.guid();return e.map(t,function(e){return e.uid=n?C.guid():i,e})}function c(e,t){var n,i=d(t.allowedExtensions),o=t.maxFileSize,r=t.minFileSize;for(n=0;n<e.length;n++)u(e[n],i),h(e[n],r,o)}function d(t){var n=e.map(t,function(e){var t="."===e.substring(0,1)?e:"."+e;return t.toLowerCase()});return n}function u(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],e.inArray(U,t.validationErrors)===-1&&t.validationErrors.push(U))}function h(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],e.inArray(V,t.validationErrors)===-1&&t.validationErrors.push(V)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],e.inArray(O,t.validationErrors)===-1&&t.validationErrors.push(O))}function f(e){var t,n=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(n+=e[t].size);return n/=1024,n<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"}function p(t){return!t.multiple&&e(".k-file",t.wrapper).length>1}function m(n,i,o,r){var s,a;return i._supportsRemove()?(s=n.data("fileNames"),a=e.map(s,function(e){return e.name}),r===!1?(i._removeFileEntry(n),t):(i._submitRemove(a,o,function(e,t,o){var r=i.trigger(I,{operation:"remove",files:s,response:e,XMLHttpRequest:o});r||i._removeFileEntry(n)},function(e){p(i)&&i._removeFileEntry(n),i.trigger(F,{operation:"remove",files:s,XMLHttpRequest:e}),D("Server response: "+e.responseText)}),t)):(!p(i)&&r||i._removeFileEntry(n),t)}function g(t,n,i){var o=!1,r="";try{r=e.parseJSON(v(t)),o=!0}catch(s){i()}o&&n(r)}function v(e){return t!==e&&""!==e||(e="{}"),e}function _(e){e.stopPropagation(),e.preventDefault()}function b(e,t,n,i){var o,r;e.on("dragenter"+t,function(e){n(e),r=new Date,o||(o=setInterval(function(){var e=new Date-r;e>100&&(i(),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",M="select",R="upload",I="success",F="error",z="complete",P="cancel",B="clear",L="progress",H="remove",N="validationErrors",O="invalidMaxFileSize",V="invalidMinFileSize",U="invalidFileExtension",W=1e3,j=2e3,q={loading:"k-i-loading",warning:"k-i-warning",success:"k-i-check"},G=S.extend({init:function(t,n){var i,o,r,s=this;S.fn.init.call(s,t,n),s.name=t.name,s.multiple=s.options.multiple,s.localization=s.options.localization,i=s.element,s.wrapper=i.closest(".k-upload"),0===s.wrapper.length&&(s.wrapper=s._wrapInput(i)),s._activeInput(i),s.toggle(s.options.enabled),o=s._ns=E+"-"+C.guid(),i.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 $(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:[M,R,I,F,z,P,B,L,H],options:{name:"Upload",enabled:!0,multiple:!0,showFileList:!0,template:"",files:[],async:{removeVerb:"POST",autoUpload:!0,withCredentials:!0,accept:"*/*; q=0.5, application/json"},localization:{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",clearSelectedFiles:"Clear",uploadSelectedFiles:"Upload",dropFilesHere:"drop files here to upload",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",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,n=t.element;S.fn.setOptions.call(t,e),t.multiple=t.options.multiple,n.attr("multiple",!!t._supportsMultiple()&&t.multiple),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,n=e(t.options.dropZone);e(document).add(e(".k-dropzone",t.wrapper)).add(t.wrapper.closest("form")).off(t._ns),n.length>0&&n.off(t._ns),e(t.element).off(E),S.fn.destroy.call(t)},upload:function(){var e=this;e._module.onSaveSelected()},getFiles:function(){var t,n,i,o=this,r=[],s=o.wrapper.find(".k-file");for(n=0;n<s.length;n++)if(t=e(s[n]).data("fileNames"))for(i=0;i<t.length;i++)r.push(t[i]);return r},clearAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,n){e._removeFileByDomElement(n,!1)})},removeAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,n){e._removeFileByDomElement(n,!0)})},removeFileByUid:function(e){this._removeFileByUid(e,!0)},clearFileByUid:function(e){this._removeFileByUid(e,!1)},_removeFileByUid:function(t,n){var i,o=this;"string"==typeof t&&(i=e(".k-file["+C.attr("uid")+'="'+t+'"]',o.wrapper),i.length>0&&o._removeFileByDomElement(i,n))},clearFile:function(e){this._removeFile(e,!1)},removeFile:function(e){this._removeFile(e,!0)},_removeFile:function(t,n){var i,o=this,r=o.wrapper.find(".k-file");"function"==typeof t&&r.each(function(r,s){i=e(s).data("fileNames"),t(i)&&o._removeFileByDomElement(s,n)})},_removeFileByDomElement:function(t,n){var i,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,{},n),i=e(".k-file",o.wrapper),0===i.length?o._hideHeaderUploadstatus():o._updateHeaderUploadStatus()):o._module.onRemove(r,{},n)},_addInput:function(t){if(t[0].nodeType){var n=this,i=t.clone().val("");i.insertAfter(n.element).data("kendoUpload",n),e(n.element).hide().attr("tabindex","-1").removeAttr("id").off(E),n._activeInput(i),n.element.focus()}},_activeInput:function(t){var n=this,i=n.wrapper;n.element=t,t.attr("multiple",!!n._supportsMultiple()&&n.multiple).attr("autocomplete","off").on("click"+E,function(e){i.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(n._onInputChange,n)).on("keydown"+E,e.proxy(n._onInputKeyDown,n))},_onInputKeyDown:function(e){var t=this,n=t.wrapper.find(".k-upload-action:visible:first");e.keyCode===C.keys.TAB&&n.length>0&&(e.preventDefault(),n.focus())},_onInputChange:function(t){var n,i=this,o=e(t.target),r=l(i._inputFiles(o),i._isAsyncNonBatch());c(r,i.options.validation),n=i.trigger(M,{files:r}),n?(i._addInput(o),o.remove()):i._module.onSelect({target:o},r)},_onDrop:function(t){var n,i=t.originalEvent.dataTransfer,r=this,s=i.files,a=l(o(s),r._isAsyncNonBatch());_(t),s.length>0&&!r.wrapper.hasClass("k-state-disabled")&&(!r.multiple&&a.length>1&&a.splice(1,a.length-1),c(a,r.options.validation),n=r.trigger(M,{files:a}),n||r._module.onSelect({target:e(".k-dropzone",r.wrapper)},a))},_filesContainValidationErrors:function(t){var n=!1;return e(t).each(function(e,t){if(t[N]&&t[N].length>0)return n=!0,!1}),n},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(t){var n,i,o=this,r=0;for(t=l(t,!0),r=0;r<t.length;r++)n=t[r],i=o._enqueueFile(n.name,{fileNames:[n]}),i.addClass("k-file-success").data("files",[t[r]]),o.options.template||e(".k-upload-status",i).prepend("<span class='k-upload-pct'>100%</span>"),o._supportsRemove()&&o._fileAction(i,H)},_prepareTemplateData:function(e,t){var n=t.fileNames,i={},o=0,r=0;for(r=0;r<n.length;r++)o+=n[r].size;return i.name=e,i.size=o,i.files=t.fileNames,i},_prepareDefaultSingleFileEntryTemplate:function(t){var n=this,i=t.fileNames[0],o=f(t.fileNames),r=i[N],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='"+i.name+"'>"+i.name+"</span><span class='k-file-validation-message'>"+n.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'>"+i.extension.substring(1)+"</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name' title='"+i.name+"'>"+i.name+"</span><span class='k-file-size'>"+o+"</span></span>",s+="<strong class='k-upload-status'></strong>",e(s)},_prepareDefaultMultipleFileEntriesTemplate:function(t){var n,i,o=this,r=t.fileNames,s=o._filesContainValidationErrors(r),a=f(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[N]?-1:t[N]?1:0}),l+="<span class='k-file-name-size-wrapper'>",n=0;n<r.length;n++)i=r[n],l+=i[N]&&i[N].length>0?"<span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span>":"<span class='k-file-name' title='"+i.name+"'>"+i.name+"</span>";return l+=s?"<span class='k-file-validation-message'>Invalid file(s). Please check file upload requirements.</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,n){var i,o,r,s,a=this,l=n.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")),i=e(".k-file",c),u?(r=a._prepareTemplateData(t,n),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===n.fileNames.length?a._prepareDefaultSingleFileEntryTemplate(n):a._prepareDefaultMultipleFileEntriesTemplate(n),o.attr(C.attr("uid"),l).appendTo(c).data(n),a._async||e(".k-progress",o).width("100%"),!a.multiple&&i.length>0&&(s={files:i.data("fileNames"),headers:{}},a.trigger(H,s)||a._module.onRemove({target:e(i,a.wrapper)},s)),o},_removeFileEntry:function(t){var n,i,o,r=this,s=t.closest(".k-upload-files");t.remove(),n=e(".k-file",s),i=e(".k-file-success, .k-file-error",s),o=e(".k-file-invalid",s),i.length!==n.length&&o.length!==n.length||this._hideUploadButton(),0===n.length?(s.remove(),r.wrapper.addClass("k-upload-empty"),r._hideHeaderUploadstatus()):r._updateHeaderUploadStatus()},_fileAction:function(e,t){var n={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry"},i={remove:"k-i-close",cancel:"k-i-close",retry:"k-i-reload"};n.hasOwnProperty(t)&&(this._clearFileAction(e),this.options.template?e.find(".k-upload-action").addClass("k-button").append("<span class='k-icon "+i[t]+" "+n[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show():(e.find(".k-upload-status .k-upload-action").remove(),e.find(".k-upload-status").append(this._renderAction(n[t],this.localization[t],i[t]))))},_fileState:function(t,n){var i=this.localization,o={uploading:{text:i.statusUploading},uploaded:{text:i.statusUploaded},failed:{text:i.statusFailed}},r=o[n];r&&e("span.k-file-state",t).text(r.text)},_renderAction:function(t,n,i){return""!==t?e("<button type='button' class='k-button k-upload-action'><span class='k-icon "+i+" "+t+"' title='"+n+"' aria-label='"+n+"'></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'>"+n+"</button>")},_clearFileAction:function(t){e(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var n,i,o,r,s,a,l=this;return l.wrapper.hasClass("k-state-disabled")||(n=e(t.target).closest(".k-upload-action"),i=n.find(".k-icon"),o=n.closest(".k-file"),r=o.data("fileNames"),s=l._filesContainValidationErrors(r),a={files:r,headers:{}},i.hasClass("k-i-x")?l.trigger(H,a)||l._module.onRemove({target:e(o,l.wrapper)},a,!s):i.hasClass("k-i-cancel")?(l.trigger(P,a),l._module.onCancel({target:e(o,l.wrapper)}),l._checkAllComplete(),l._updateHeaderUploadStatus()):i.hasClass("k-i-retry")&&(e(".k-i-warning",o).remove(),e(".k-progress",o).finish().show(),l._module.onRetry({target:e(o,l.wrapper)}))),!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,n={};return t.hasClass("k-state-disabled")||e.trigger(B,n)||e.clearAllFiles(),!1},_onFileProgress:function(t,n){var i;n>100&&(n=100),this.options.template?e(".k-progress",t.target).width(n+"%"):(i=e(".k-upload-pct",t.target),0===i.length&&e(".k-upload-status",t.target).prepend("<span class='k-upload-pct'></span>"),e(".k-upload-pct",t.target).text(n+"%"),e(".k-progress",t.target).width(n+"%")),this.trigger(L,{files:y(t).data("fileNames"),percentComplete:n})},_onUploadSuccess:function(e,t,n){var i=this,o=y(e),r=i.trigger(I,{files:o.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:n});r?i._setUploadErrorState(o):(i._fileState(o,"uploaded"),o.removeClass("k-file-progress").addClass("k-file-success"),i._updateHeaderUploadStatus(),i._supportsRemove()?i._fileAction(o,H):i._clearFileAction(o)),i._hideUploadProgress(o),i._checkAllComplete()},_onUploadError:function(e,t){var n=this,i=y(e);n._setUploadErrorState(i),n.trigger(F,{operation:"upload",files:i.data("fileNames"),XMLHttpRequest:t}),D("Server response: "+t.responseText),n._hideUploadProgress(i),n._checkAllComplete()},_setUploadErrorState:function(t){var n=this,i=e(".k-upload-pct",t);n._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),e(".k-progress",t).width("100%"),i.length>0?i.empty().removeClass("k-upload-pct").addClass("k-icon k-i-warning"):e(".k-upload-status",t).prepend("<span class='k-icon k-i-warning'></span>"),this._updateHeaderUploadStatus(),this._fileAction(t,"retry")},_hideUploadProgress:function(t){e(".k-progress",t).delay(W).fadeOut(j,function(){e(this).css("width","0%")})},_showUploadButton:function(){var t=this,n=e(".k-upload-selected",t.wrapper),i=e(".k-clear-selected",t.wrapper);0===n.length&&(n=t._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected"),i=t._renderAction("",this.localization.clearSelectedFiles).addClass("k-clear-selected")),this.wrapper.append(i,n)},_hideUploadButton:function(){e(".k-upload-selected, .k-clear-selected",this.wrapper).remove()},_showHeaderUploadStatus:function(t){var n=this,i=n.localization,o=e(".k-dropzone",n.wrapper),r=e(".k-upload-status-total",n.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(i.headerStatusUploading),r.find(".k-icon").addClass(q.loading)):(r=e(r).append(i.headerStatusUploaded),r.find(".k-icon").addClass(q.warning)),o.length>0?o.append(r):e(".k-upload-button",n.wrapper).after(r)},_updateHeaderUploadStatus:function(){var t,n,i=this,o=e(".k-upload-status-total",this.wrapper),r=e(".k-file",i.wrapper).not(".k-file-success, .k-file-error, .k-file-invalid"),s=e(".k-file-invalid",i.wrapper);(0===r.length||s.length>0)&&(t=e(".k-file.k-file-error, .k-file.k-file-invalid",i.wrapper),o=e(".k-upload-status-total",i.wrapper),n=e(".k-icon",o).removeClass().addClass("k-icon").addClass(0!==t.length?q.warning:q.success),o.html(n).append(i.localization.headerStatusUploaded))},_hideHeaderUploadstatus:function(){e(".k-upload-status-total",this.wrapper).remove()},_onParentFormSubmit:function(){var n,i=this,o=i.element;t!==this._module.onAbort&&this._module.onAbort(),o.value||(n=e(o),n.attr("disabled","disabled"),window.setTimeout(function(){n.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),n=!t&&/safari/.test(e),i=n&&/windows/.test(e);return!i&&this._supportsFormData()&&this.options.async.saveUrl},_userAgent:function(){return navigator.userAgent},_setupDropZone:function(){var t,n,i=this;e(".k-upload-button",i.wrapper).wrap("<div class='k-dropzone'></div>"),t=i._ns,n=e(".k-dropzone",i.wrapper).append(e("<em>"+i.localization.dropFilesHere+"</em>")).on("dragenter"+t,_).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(i._onDrop,i)),b(n,t,function(){n.closest(".k-upload").hasClass("k-state-disabled")||n.addClass("k-dropzone-hovered")},function(){n.removeClass("k-dropzone-hovered")}),i._bindDocumentDragEventWrappers(n)},_setupCustomDropZone:function(){var t,n=this,i=e(n.options.dropZone);e(".k-upload-button",n.wrapper).wrap("<div class='k-dropzone'></div>"),t=n._ns,i.on("dragenter"+t,_).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(n._onDrop,n)),b(i,t,function(t){n.wrapper.hasClass("k-state-disabled")||(i.removeClass("k-dropzone-hovered"),e(t.target).addClass("k-dropzone-hovered"))},function(){i.removeClass("k-dropzone-hovered")}),n._bindDocumentDragEventWrappers(i)},_bindDocumentDragEventWrappers:function(t){var n=this,i=n._ns;b(e(document),i,function(){n.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,n,i,o){var r=this,s=r.options.async.removeField||"fileNames",a=e.extend(n.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:n.headers,success:i,error:o,xhrFields:{withCredentials:this.options.async.withCredentials}})},_wrapInput:function(e){var t=this,n=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>"),n.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(z)},_inputFiles:function(e){return i(e)}}),$=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")};$.prototype={onSelect:function(t,i){var o,r,s=this.upload,a=e(t.target),l=s._filesContainValidationErrors(i);s._addInput(a),o={fileNames:i},l?a.remove():o.relatedInput=a,r=s._enqueueFile(n(a),o),l&&s._hideUploadProgress(r),s._fileAction(r,H)},onRemove:function(e){var t=y(e),n=t.data("relatedInput");n&&n.remove(),this.upload._removeFileEntry(t)}},k=function(e){this.name="iframeUploadModule",this.element=e.wrapper,this.upload=e,this.iframes=[]},G._frameId=0,k.prototype={onSelect:function(t,n){var i=this.upload,o=e(t.target),r=i._filesContainValidationErrors(n),s=this.prepareUpload(o,n,r);i.options.async.autoUpload?r?(i._fileAction(s,H),i._showHeaderUploadStatus(!1)):this.performUpload(s):(i._fileAction(s,H),r?i._updateHeaderUploadStatus():i._showUploadButton()),r&&i._hideUploadProgress(s)},prepareUpload:function(t,i,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:i}):(a=this.createFrame(c.name+"_"+G._frameId++),this.registerFrame(a),l=this.createForm(c.options.async.saveUrl,a.attr("name")).append(d),s={frame:a,relatedInput:d,fileNames:i}),r=c._enqueueFile(n(t),s),a&&a.data({form:l,file:r}),r},performUpload:function(t){var n,i,o,r={files:t.data("fileNames")},s=t.data("frame"),a=this.upload;if(a.trigger(R,r))a._removeFileEntry(s.data("file")),this.cleanupFrame(s),this.unregisterFrame(s);else{a._hideUploadButton(),a._showHeaderUploadStatus(!0),s.appendTo(document.body),n=s.data("form").attr("action",a.options.async.saveUrl).appendTo(document.body),r.data=e.extend({},r.data,T());for(i in r.data)o=n.find("input[name='"+i+"']"),0===o.length&&(o=e("<input>",{type:"hidden",name:i}).prependTo(n)),o.val(r.data[i]);a._fileAction(t,P),a._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),s.one("load",e.proxy(this.onIframeLoad,this)),n[0].submit()}},onSaveSelected:function(){var t=this,n=t.upload;e(".k-file",this.element).each(function(){var i=e(this),o=w(i),r=n._filesContainValidationErrors(i.data("fileNames"));o||r||t.performUpload(i)})},onIframeLoad:function(t){var n,i=e(t.target);try{n=i.contents().text()}catch(o){n="Error trying to get server response: "+o}this.processResponse(i,n)},processResponse:function(t,n){var i=t.data("file"),o=this,r={responseText:n};g(n,function(n){e.extend(r,{statusText:"OK",status:"200"}),o.upload._onFileProgress({target:e(i,o.upload.wrapper)},100),o.upload._onUploadSuccess({target:e(i,o.upload.wrapper)},n,r),o.cleanupFrame(t),o.unregisterFrame(t)},function(){e.extend(r,{statusText:"error",status:"500"}),o.upload._onUploadError({target:e(i,o.upload.wrapper)},r)})},onCancel:function(t){var n=e(t.target).data("frame");this.stopFrameSubmit(n),this.cleanupFrame(n),this.unregisterFrame(n),this.upload._removeFileEntry(n.data("file"))},onRetry:function(e){var t=y(e);this.performUpload(t)},onRemove:function(e,t,n){var i=this,o=i.upload,r=y(e),s=r.data("frame");s?(i.unregisterFrame(s),o._removeFileEntry(r),i.cleanupFrame(s)):r.hasClass("k-file-success")?m(r,o,t,n):o._removeFileEntry(r)},onAbort:function(){var t=this.element,n=this;e.each(this.iframes,function(){e("input",this.data("form")).appendTo(t),n.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,n){return e("<form enctype='multipart/form-data' method='POST' action='"+t+"' target='"+n+"'/>")},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},x.prototype={onSelect:function(t,n){var i,o=this.upload,r=this,s=e(t.target),a=this.prepareUpload(s,n);e.each(a,function(){i=o._filesContainValidationErrors(e(this.data("fileNames"))),o.options.async.autoUpload?i?(o._fileAction(this,H),o._showHeaderUploadStatus(!1)):r.performUpload(this):(o._fileAction(this,H),i?o._updateHeaderUploadStatus():o._showUploadButton()),i&&o._hideUploadProgress(this)})},prepareUpload:function(t,n){var i=this.enqueueFiles(n);return t.is("input")&&(e.each(i,function(){e(this).data("relatedInput",t)}),t.data("relatedFileEntries",i),this.upload._addInput(t)),i},enqueueFiles:function(t){var n,i,o,r,s=this.upload,a=t.length,l=[];if(s.options.async.batch===!0)n=e.map(t,function(e){return e.name}).join(", "),r=s._enqueueFile(n,{fileNames:t}),r.data("files",t),l.push(r);else for(i=0;i<a;i++)o=t[i],n=o.name,r=s._enqueueFile(n,{fileNames:[o]}),r.data("files",[o]),l.push(r);return l},performUpload:function(t){var n,i=this.upload,o=this.createFormData(),r=this.createXHR(),s={files:t.data("fileNames"),XMLHttpRequest:r};if(i.trigger(R,s))this.removeFileEntry(t);else{if(i._fileAction(t,P),i._hideUploadButton(),i._showHeaderUploadStatus(!0),s.formData)o=s.formData;else{s.data=e.extend({},s.data,T());for(n in s.data)o.append(n,s.data[n]);this.populateFormData(o,t.data("files"))}i._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),this.postFormData(i.options.async.saveUrl,o,t,r)}},onSaveSelected:function(){var t=this,n=t.upload;e(".k-file",this.element).each(function(){var i=e(this),o=w(i),r=n._filesContainValidationErrors(i.data("fileNames"));o||r||t.performUpload(i)})},onCancel:function(e){var t=y(e);this.stopUploadRequest(t),this.removeFileEntry(t)},onRetry:function(e){var t=y(e);this.performUpload(t)},onRemove:function(e,t,n){var i=this,o=i.upload,r=y(e);r.hasClass("k-file-success")?m(r,o,t,n):i.removeFileEntry(r)},createXHR:function(){return new XMLHttpRequest},postFormData:function(e,t,n,i){var o,r=this;n.data("request",i),i.addEventListener("load",function(e){r.onRequestSuccess.call(r,e,n)},!1),i.addEventListener(F,function(e){r.onRequestError.call(r,e,n)},!1),i.upload.addEventListener("progress",function(e){r.onRequestProgress.call(r,e,n)},!1),i.open("POST",e,!0),i.withCredentials=this.upload.options.async.withCredentials,o=this.upload.options.async.accept,o&&i.setRequestHeader("Accept",o),i.send(t)},createFormData:function(){return new FormData},populateFormData:function(e,t){var n,i=this.upload,o=t.length;for(n=0;n<o;n++)e.append(i.options.async.saveField||i.name,t[n].rawFile);return e},onRequestSuccess:function(t,n){function i(){r.upload._onUploadError({target:e(n,r.upload.wrapper)},o)}var o=t.target,r=this;o.status>=200&&o.status<=299?g(o.responseText,function(t){r.upload._onFileProgress({target:e(n,r.upload.wrapper)},100),r.upload._onUploadSuccess({target:e(n,r.upload.wrapper)},t,o),r.cleanupFileEntry(n)},i):i()},onRequestError:function(t,n){var i=t.target;this.upload._onUploadError({target:e(n,this.upload.wrapper)},i)},cleanupFileEntry:function(t){var n=t.data("relatedInput"),i=!0;n&&(e.each(n.data("relatedFileEntries")||[],function(){this.parent().length>0&&this[0]!=t[0]&&(i=i&&this.hasClass("k-file-success"))}),i&&n.remove())},removeFileEntry:function(e){this.cleanupFileEntry(e),this.upload._removeFileEntry(e)},onRequestProgress:function(t,n){var i=Math.round(100*t.loaded/t.total);this.upload._onFileProgress({target:e(n,this.upload.wrapper)},i)},stopUploadRequest:function(e){e.data("request").abort()}},C.ui.plugin(G)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filebrowser.min",["kendo.listview.min","kendo.dropdownlist.min","kendo.upload.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,o;e.on("dragenter"+x,function(){t(),o=new Date,i||(i=setInterval(function(){var e=new Date-o;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+x,function(){o=new Date})}function i(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}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 n=e[t];return h(n)?n.from||n.field||t:n}var s,a,l,c,d=window.kendo,u=d.ui.Widget,h=e.isPlainObject,f=e.proxy,p=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"},M=d.template('<li class="k-tile-empty"><strong>${text}</strong></li>'),R='<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>';p(!0,d.data,{schemas:{filebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),p(!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,n){n.data=e.extend({},n.data,{path:this.options.path()}),v(this.options[t])?this.options[t].call(this,n):d.data.RemoteTransport.fn[t].call(this,n)},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 n=this;t=t||{},u.fn.init.call(n,e,t),n.element.addClass("k-filebrowser"),n.element.on(k+x,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",f(n._deleteClick,n)).on(k+x,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",f(n._addClick,n)).on("keydown"+x,"li.k-state-selected input",f(n._directoryKeyDown,n)).on("blur"+x,"li.k-state-selected input",f(n._directoryBlur,n)),n._dataSource(),n.refresh(),n.path(n.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,n=t._selectedItem(),o=t.options.transport.fileUrl;if(n&&"f"===n.get(A))return e=i(t.path(),n.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,n=d.template(R),i=t.options.messages,o=[{text:i.orderByName,value:"name"},{text:i.orderBySize,value:"size"}];t.toolbar=e(n({messages:i,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:i.dropFilesHere},async:{saveUrl:t.options.transport.uploadUrl,autoUpload:!0},upload:f(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&&(n(e(document.documentElement),e.proxy(t._dropEnter,t),e.proxy(t._dropLeave,t)),t._scrollHandler=f(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,n=t.offset();e.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(n).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(),n=d.format(e.options.messages.deleteFile,t.find("strong").text());t.length&&e._showMessage(n,"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,n=this,i=n.options,o=i.fileTypes,r=RegExp(("("+o.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),s=e.files[0].name,a=T,l=D;r.test(s)?(e.data={path:n.path()},t=n._createFile(s),t?n.upload.one("success",function(e){var i=n._insertFileToList(t);i.set(a,e.response[n._getFieldName(a)]),i.set(l,e.response[n._getFieldName(l)]),n._tiles=n.listView.items().filter("["+d.attr("type")+"=f]")}):e.preventDefault()):(e.preventDefault(),n._showMessage(d.format(i.messages.invalidFileType,s,o)))},_findFile:function(e){var t,n,i,o=this.dataSource.data(),r=A,s=T;for(e=e.toLowerCase(),t=0,i=o.length;t<i;t++)if("f"===o[t].get(r)&&o[t].get(s).toLowerCase()===e){n=o[t];break}return n},_createFile:function(e){var t=this,n={},i=A,o=t._findFile(e);return o?t._showMessage(d.format(t.options.messages.overwriteFile,e),"confirm")?(o._override=!0,o):null:(n[i]="f",n[T]=e,n[D]=0,n)},_insertFileToList:function(e){var t,n,i,o,r;if(e._override)return e;for(n=this.dataSource,i=n.view(),o=0,r=i.length;o<r;o++)if("f"===i[o].get(A)){t=o;break}return n.insert(++t,e)},createDirectory:function(){var e,t,n=this,i=0,o=A,r=T,s=n.dataSource.data(),a=n._nameDirectory(),l=new n.dataSource.reader.model;for(e=0,t=s.length;e<t;e++)"d"===s[e].get(o)&&(i=e);l.set(o,"d"),l.set(r,a),n.listView.one("dataBound",function(){var e=n.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,n._nameExists(t,l.uid)?n._nameDirectory():t):e.model.set(r,a)}),n.dataSource.insert(++i,l)},_directoryKeyDown:function(e){13==e.keyCode&&e.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(e,t){var n,i,o=this.dataSource.data(),r=A,s=T;for(n=0,i=o.length;n<i;n++)if("d"===o[n].get(r)&&o[n].get(s).toLowerCase()===e.toLowerCase()&&o[n].uid!==t)return!0;return!1},_nameDirectory:function(){var t,n,i,o="New folder",r=this.dataSource.data(),s=[],a=A,l=T;for(n=0,i=r.length;n<i;n++)"d"===r[n].get(a)&&r[n].get(l).toLowerCase().indexOf(o.toLowerCase())>-1&&s.push(r[n].get(l));if(e.inArray(o,s)>-1){n=2;do t=o+" ("+n+")",n++;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",f(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()},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+d.attr("type")+"=f]"):this.wrapper.append(M({text:t.options.messages.emptyFolder}))},change:f(t._listViewChange,t)})},_dblClick:function(t){var n,o=this,r=e(t.currentTarget);r.hasClass("k-edit-item")&&o._directoryBlur(),r.filter("["+d.attr("type")+"=d]").length?(n=o.dataSource.getByUid(r.attr(d.attr("uid"))),n&&(o.path(i(o.path(),n.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,n=t.options,i=n.transport,o=p({},E),r={field:T,dir:"asc"},s={type:i.type||"filebrowser",sort:[o,r]};h(i)&&(i.path=f(t.path,t),s.transport=i),h(n.schema)?s.schema=n.schema:i.type&&h(d.data.schemas[i.type])&&(e=d.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(y,t._errorHandler):t._errorHandler=f(t._error,t),t.dataSource=d.data.DataSource.create(s).bind(y,t._errorHandler)},_navigation:function(){var t=this,n=e('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element);t.breadcrumbs=n.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=n.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,n,i=this;i.trigger(y,e)||(t=e.xhr.status,"error"==e.status?"404"==t?i._showMessage(i.options.messages.directoryNotFound):"0"!=t&&i._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&i._showMessage("Error! Server timeout."),n=i.dataSource,n.hasChanges()&&n.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>",f(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>",f(d.template(e),{sizeFormatter:o})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(_,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(_,"")),"/"===i||""===i?"":i+"/")}}),l=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),m&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+S,f(n._keydown,n)).on("change"+S,f(n._updateValue,n)),n.wrapper.on(k+S,"a",f(n._click,n)),m||n.element.on("focus"+S,f(n._focus,n)).on("blur"+S,f(n._blur,n))},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,n=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),n.length||(n=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(n)),this.wrapper=n,this.label=n.find(">label")},value:function(e){var n=this;return e!==t?(n.options.value=e,n.element.val(e),n._toggleLabel(),t):n.options.value}}),c=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+C,"input",f(n._focus,n)).on("blur"+C,"input",f(n._blur,n)).on("keydown"+C,"input",f(n._keydown,n)).on(k+C,"a.k-i-arrow-60-up:first",f(n._rootClick,n)).on(k+C,"a:not(.k-i-arrow-60-up)",f(n._click,n)),n.value(n.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,n=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(n)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,n=this.element,i=n.parents(".k-breadcrumbs");n[0].style.width="",n.addClass("k-input"),i.length||(i=n.wrap(e('<div class="k-widget k-breadcrumbs k-textbox"/>')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('<div class="k-breadcrumbs-wrap"/>').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var n,i,o,r,s="",a=this.value();for(a!==t&&a.match(/^\//)||(a="/"+(a||"")),n=a.split("/"),o=0,r=n.length;o<r;o++)i=n[o],i&&(s||(s+='<a href="#" class="k-icon k-i-arrow-60-up" title="Go to parent folder"></a>'),s+='<a class="k-link" href="#">'+n[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,n=this,i=n.wrapper,o=i.width()-n.options.gap,r=n.overlay.find("a");r.each(function(n){t=e(this),t.parent().width()>o&&(n==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,n){(n||t)()}),function(e,define){define("kendo.imagebrowser.min",["kendo.filebrowser.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function i(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,f=/(^\/|\/$)/g,p="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,n){n.data=e.extend({},n.data,{path:this.options.path()}),h(this.options[t])?this.options[t].call(this,n):s.data.RemoteTransport.fn[t].call(this,n)},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 n=this;t=t||{},a.fn.init.call(n,e,t),n.element.addClass("k-imagebrowser")},options:{name:"ImageBrowser",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},value:function(){var e,t=this,i=t._selectedItem(),o=t.options.transport.imageUrl;if(i&&"f"===i.get(_))return e=n(t.path(),i.get(g)).replace(f,""),o&&(e=h(o)?o(e):s.format(o,encodeURIComponent(e))),e},_fileUpload:function(e){var t,n=this,i=n.options,o=i.fileTypes,r=RegExp(("("+o.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),a=e.files[0].name,l=g,c=v;r.test(a)?(e.data={path:n.path()},t=n._createFile(a),t?(t._uploading=!0,n.upload.one("success",function(e){delete t._uploading;var i=n._insertFileToList(t);i.set(l,e.response[n._getFieldName(l)]),i.set(c,e.response[n._getFieldName(c)]),n._tiles=n.listView.items().filter("["+s.attr("type")+"=f]"),n._scroll()})):e.preventDefault()):(e.preventDefault(),n._showMessage(s.format(i.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()},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,n=t.options,i=n.transport,o=d({},b),r={field:g,dir:"asc"},a={type:i.type||"imagebrowser",sort:[o,r]};l(i)&&(i.path=c(t.path,t),a.transport=i),l(n.schema)?a.schema=n.schema:i.type&&l(s.data.schemas[i.type])&&(e=s.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(p,t._errorHandler):t._errorHandler=c(t._error,t),t.dataSource=s.data.DataSource.create(a).bind(p,t._errorHandler)},_loadImage:function(t){var n=this,i=e(t),o=n.dataSource.getByUid(i.attr(s.attr("uid"))),r=o.get(g),a=n.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()}),i.find(".k-i-loading").after(l),h(a)?a=a(n.path(),encodeURIComponent(r)):(a.indexOf("?")>=0&&(c="&"),a=a+c+"path="+encodeURIComponent(n.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),n=e.list.scrollTop(),i=n+t;e._tiles.each(function(){var t=o(this),r=t+this.offsetHeight;if((t>=n&&t<i||r>=n&&r<i)&&e._loadImage(this),t>i)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:i})}}),s.ui.plugin(r)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tabstrip.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(t){t.children(b).addClass(A),t.children("a").addClass(x).children(b).addClass(A),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(H),t.filter("li[disabled]").addClass(L).removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(N+" "+U),t.attr("role","tab"),t.filter("."+N).attr("aria-selected",!0),t.each(function(){var t=e(this);t.children("."+x).length||t.contents().filter(function(){return!(this.nodeName.match(v)||3==this.nodeType&&!d(this.nodeValue))}).wrapAll("<span UNSELECTABLE='on' class='"+x+"'/>")})}function i(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(E),t.filter(".k-last:not(:last-child)").removeClass(C),t.filter(":first-child").addClass(E),t.filter(":last-child").addClass(C)}function o(e,t){return"<span class='k-button k-button-icon k-button-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,f=r.template,p=r._outerWidth,m=r._outerHeight,g=s.Widget,v=/^(a|div)$/i,_=".kendoTabStrip",b="img",w="href",y="prev",k="show",x="k-link",C="k-last",S="click",T="error",D=":empty",A="k-image",E="k-first",M="select",R="activate",I="k-content",F="contentUrl",z="mouseenter",P="mouseleave",B="contentLoad",L="k-state-disabled",H="k-state-default",N="k-state-active",O="k-state-focused",V="k-state-hover",U="k-tab-on-top",W=".k-item:not(."+L+")",j=".k-tabstrip-items > "+W+":not(."+N+")",q={content:f("<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= content(item) #</div>"),itemWrapper:f("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),item:f("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),image:f("<img class='k-image' alt='' src='#= imageUrl #' />"),sprite:f("<span class='k-sprite #= spriteCssClass #'></span>"),empty:f("")},G={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},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+'"':""}},$=g.extend({init:function(t,n){var i,o,s,a=this;g.fn.init.call(a,t,n),a._animations(a.options),n=a.options,a._contentUrls=n.contentUrls||[],a._wrapper(),a._isRtl=r.support.isRtl(a.wrapper),a._tabindex(),a._updateClasses(),a._dataSource(),n.dataSource&&a.dataSource.fetch(),a._tabPosition(),a._scrollable(),a._contentUrls.length?a.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,n){var i=a._contentUrls[t];"string"==typeof i&&e(n).find(">."+x).data(F,i)}):a._contentUrls.length=a.tabGroup.find("li.k-item").length,a.wrapper.on(z+_+" "+P+_,j,a._toggleHover).on("focus"+_,e.proxy(a._active,a)).on("blur"+_,function(){a._current(null)}),a._keyDownProxy=e.proxy(a._keydown,a),n.navigatable&&a.wrapper.on("keydown"+_,a._keyDownProxy),a.options.value&&(i=a.options.value),a.wrapper.children(".k-tabstrip-items").on(S+_,".k-state-disabled .k-link",!1).on(S+_," > "+W,function(t){var n,i=a.wrapper[0];if(i!==document.activeElement)if(n=r.support.browser.msie)try{i.setActive()}catch(o){i.focus()}else i.focus();a._click(e(t.currentTarget))&&t.preventDefault()}),o=a.tabGroup.children("li."+N),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(i),r.notify(a)},_active:function(){var e=this.tabGroup.children().filter("."+N);e=e[0]?e:this._endItem("first"),e[0]&&this._current(e)},_endItem:function(e){return this.tabGroup.children(W)[e]()},_item:function(e,t){var n;return n=t===y?"last":"first",e?(e=e[t](),e[0]||(e=this._endItem(n)),e.hasClass(L)&&(e=this._item(e,t)),e):this._endItem(n)},_current:function(e){var n=this,i=n._focused,o=n._ariaId;return e===t?i:(i&&(i[0].id===o&&i.removeAttr("id"),i.removeClass(O)),e&&(e.hasClass(N)||e.addClass(O),n.element.removeAttr("aria-activedescendant"),o=e[0].id||o,o&&(e.attr("id",o),n.element.attr("aria-activedescendant",o))),n._focused=e,t)},_keydown:function(e){var n,i=this,o=e.keyCode,r=i._current(),s=i._isRtl;if(e.target==e.currentTarget){if(o==a.DOWN||o==a.RIGHT)n=s?y:"next";else if(o==a.UP||o==a.LEFT)n=s?"next":y;else if(o==a.ENTER||o==a.SPACEBAR)i._click(r),e.preventDefault();else{if(o==a.HOME)return i._click(i._endItem("first")),e.preventDefault(),t;if(o==a.END)return i._click(i._endItem("last")),e.preventDefault(),t}n&&(i._click(i._item(r,n)),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,n,i,o,s=this,a=s.options,l=r.getter(a.dataTextField),c=r.getter(a.dataContentField),d=r.getter(a.dataContentUrlField),u=r.getter(a.dataImageUrlField),h=r.getter(a.dataUrlField),f=r.getter(a.dataSpriteCssClass),p=[],m=s.dataSource.view();for(e=e||{},i=e.action,i&&(m=e.items),t=0,o=m.length;t<o;t++)n={text:l(m[t])},a.dataContentField&&(n.content=c(m[t])),a.dataContentUrlField&&(n.contentUrl=d(m[t])),a.dataUrlField&&(n.url=h(m[t])),a.dataImageUrlField&&(n.imageUrl=u(m[t])),a.dataSpriteCssClass&&(n.spriteCssClass=f(m[t])),p[t]=n;if("add"==e.action)e.index<s.tabGroup.children().length?s.insertBefore(p,s.tabGroup.children().eq(e.index)):s.append(p);else if("remove"==e.action)for(t=0;t<m.length;t++)s.remove(e.index);else"itemchange"==e.action?(t=s.dataSource.view().indexOf(m[0]),e.field===a.dataTextField&&s.tabGroup.children().eq(t).find(".k-link").text(m[0].get(e.field)),e.field===a.dataUrlField&&(s._contentUrls[t]=m[0].get(e.field))):(s.trigger("dataBinding"),s.remove("li"),s._contentUrls=[],s.append(p),s.trigger("dataBound"))},value:function(n){var i=this;return n===t?i.select().text():(n!=i.value()&&i.tabGroup.children().each(function(){e.trim(e(this).text())==n&&i.select(this)}),t)},items:function(){return this.tabGroup[0].children},setOptions:function(e){var t=this,n=t.options.animation;t._animations(e),e.contentUrls&&(t._contentUrls=e.contentUrls),e.animation=u(!0,n,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,k,T,B,"change","dataBinding","dataBound"],options:{name:"TabStrip",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:200}},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 n=this;return 0===arguments.length?n.tabGroup.children("li."+N):(isNaN(t)||(t=n.tabGroup.children().get(t)),t=n.tabGroup.find(t),e(t).each(function(t,i){i=e(i),i.hasClass(N)||n.trigger(M,{item:i[0],contentElement:n.contentHolder(i.index())[0]})||n.activateTab(i)}),n)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},reload:function(t){var n,i;return t=this.tabGroup.find(t),n=this,i=n._contentUrls,t.each(function(){var t=e(this),o=t.find("."+x).data(F)||i[t.index()],r=n.contentHolder(t.index());o&&n.ajaxRequest(t,r,null,o)}),n},append:function(e){var t=this,n=t._create(e);return c(n.tabs,function(e){var i=n.contents[e];t.tabGroup.append(this),"bottom"==t.options.tabPosition?t.tabGroup.before(i):t._scrollableModeActive?t._scrollPrevButton.before(i):t.wrapper.append(i),t.angular("compile",function(){return{elements:[i]}})}),i(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,n){n=e(t).is(e(n))?this.tabGroup.find(n).next():this.tabGroup.find(n);var o=this,r=o._create(t),s=o.element.find("#"+n.attr("aria-controls"));return c(r.tabs,function(t){var i=r.contents[t],a=r.newTabsCreated?o._contentUrls.length-(r.tabs.length-t):e(i).index()-1;n.before(this),s.before(i),o._moveUrlItem(a,e(this).index()),o.angular("compile",function(){return{elements:[i]}})}),i(o.tabGroup),o._updateContentElements(r.newTabsCreated),o.resize(!0),o},insertAfter:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).prev():this.tabGroup.find(n);var o=this,r=o._create(t),s=o.element.find("#"+n.attr("aria-controls"));return c(r.tabs,function(t){var i=r.contents[t],a=r.newTabsCreated?o._contentUrls.length-(r.tabs.length-t):e(i).index()-1;n.after(this),s.after(i),o._moveUrlItem(a,e(this).index()),o.angular("compile",function(){return{elements:[i]}})}),i(o.tabGroup),o._updateContentElements(r.newTabsCreated),o.resize(!0),o},remove:function(t){var n,i=this,o=typeof t;return"string"===o?t=i.tabGroup.find(t):"number"===o&&(t=i.tabGroup.children().eq(t)),n=t.map(function(){var t=e(this).index(),n=i.contentElement(t);return r.destroy(n),i._removeUrlItem(t),n}),t.remove(),n.empty(),n.remove(),i._updateContentElements(),i.resize(!0),i},_create:function(t){var i,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,i=l(t,function(n,i){return a._appendUrlItem(t[i].contentUrl||null),e($.renderItem({group:a.tabGroup,item:u(n,{index:i})}))}),o=l(t,function(t,n){if("string"==typeof t.content||t.contentUrl)return e($.renderContent({item:u(t,{index:n})}))})):(i="string"==typeof t&&"<"!=t[0]?a.element.find(t):e(t),o=e(),i.each(function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=a.element.find("#"+this.getAttribute("aria-controls"));s=t}else s=e("<div class='"+I+"'/>");o=o.add(s)}),n(i)),{tabs:i,contents:o,newTabsCreated:c}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(H,n).toggleClass(L,!n)})},_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("."+N).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(I).eq(s).addClass(N).css({display:"block"}),o.length&&(n(o),i(a.tabGroup),a._updateContentElements(!0))},_elementId:function(e,t){var n,i=e.attr("id"),o=this.element.attr("id");return!i||i.indexOf(o+"-")>-1?(n=(o||r.guid())+"-",n+(t+1)):i},_updateContentElements:function(t){var n=this,i=n._contentUrls,o=n.tabGroup.find(".k-item"),s=n.wrapper.children("div"),a=n._elementId.bind(n);s.length&&o.length>s.length?s.each(function(n){var i=a(e(this),n),r=o.filter("[aria-controls="+(this.id||0)+"]")[0];!r&&t&&(r=o[n]),r&&r.setAttribute("aria-controls",i),this.setAttribute("id",i)}):o.each(function(t){var o=s.eq(t),r=a(o,t);this.setAttribute("aria-controls",r),!o.length&&i[t]?e("<div class='"+I+"'/>").appendTo(n.wrapper).attr("id",r):(o.attr("id",r),e(this).children(".k-loading")[0]||i[t]||e("<span class='k-loading k-complete'/>").prependTo(this)),o.attr("role","tabpanel"),o.filter(":not(."+N+")").attr("aria-hidden",!0).attr("aria-expanded",!1),o.filter("."+N).attr("aria-expanded",!0)}),n.contentElements=n.contentAnimators=n.wrapper.children("div"),n.tabsHeight=m(n.tabGroup)+parseInt(n.wrapper.css("border-top-width"),10)+parseInt(n.wrapper.css("border-bottom-width"),10),r.kineticScrollNeeded&&r.mobile.ui.Scroller&&(r.touchScroller(n.contentElements),n.contentElements=n.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,n,i,o,r,s=this,a=s.options.tabPosition;"left"!=a&&"right"!=a||(e=s.wrapper.children(".k-content"),t=e.filter(":visible"),n="margin-"+a,i=s.tabGroup,o=p(i),r=Math.ceil(i.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(n,o).css("min-height",r)}))},_resize:function(){this._setContentElementsDimensions(),this._scrollable()},_sizeScrollWrap:function(e){var t,n;e.is(":visible")&&(t=this.options.tabPosition,n=Math.floor(m(e,!0))+("left"===t||"right"===t?2:this.tabsHeight),this.scrollWrap.css("height",n).css("height"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(V,t.type==z)},_click:function(e){var t,n,i=this,o=e.find("."+x),r=o.attr(w),s=i.options.collapsible,a=e.index(),l=i.contentHolder(a);if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+L+(s?"":",."+N)))return!0;if(n=o.data(F)||i._contentUrls[a]||r&&("#"==r.charAt(r.length-1)||r.indexOf("#"+i.element[0].id+"-")!=-1),t=!r||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(M,{item:e[0],contentElement:l[0]}))return!0;if(t!==!1)return s&&e.is("."+N)?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},_scrollable:function(){var e,t,n,i,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")),n=l._scrollPrevButton=l.wrapper.children(".k-tabstrip-prev"),i=l._scrollNextButton=l.wrapper.children(".k-tabstrip-next"),l.tabGroup.css({marginLeft:p(n)+9,marginRight:p(i)+12}),n.on(s+_,function(){l._nowScrollingTabs=!0,l._scrollTabsByDelta(c.scrollable.distance*(l._isRtl?1:-1))}),i.on(s+_,function(){l._nowScrollingTabs=!0,l._scrollTabsByDelta(c.scrollable.distance*(l._isRtl?-1:1))}),n.add(i).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&&!isNaN(e.scrollable.distance)&&("top"==e.tabPosition||"bottom"==e.tabPosition)},_scrollTabsToItem:function(e){var t,n=this,i=n.tabGroup,o=i.scrollLeft(),r=p(e),s=n._isRtl?e.position().left:e.position().left-i.children().first().position().left,a=i[0].offsetWidth,l=Math.ceil(parseFloat(i.css("padding-left")));n._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),i.finish().animate({scrollLeft:t},"fast","linear",function(){n._toggleScrollButtons()})},_scrollTabsByDelta:function(e){var t=this,n=t.tabGroup,i=n.scrollLeft();n.finish().animate({scrollLeft:i+e},"fast","linear",function(){t._nowScrollingTabs?t._scrollTabsByDelta(e):t._toggleScrollButtons()})},_toggleScrollButtons:function(){var e=this,t=e.tabGroup,n=t.scrollLeft();e._scrollPrevButton.toggle(e._isRtl?n<t[0].scrollWidth-t[0].offsetWidth-1:0!==n),e._scrollNextButton.toggle(e._isRtl?0!==n:n<t[0].scrollWidth-t[0].offsetWidth-1)},deactivateTab:function(e){var t=this,n=t.options.animation,i=n.open,o=u({},n.close),s=o&&"effects"in o;e=t.tabGroup.find(e),o=u(s?o:u({reverse:!0},i),{hide:!0}),r.size(i.effects)?(e.kendoAddClass(H,{duration:i.duration}),e.kendoRemoveClass(N,{duration:i.duration})):(e.addClass(H),e.removeClass(N)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+N).kendoStop(!0,!0).kendoAnimate(o).removeClass(N).attr("aria-hidden",!0)},activateTab:function(e){var t,n,i,o,s,a,l,c,d,h,f,p,g,v,_;if(!this.tabGroup.children("[data-animating]").length)return e=this.tabGroup.find(e),t=this,n=t.options.animation,i=n.open,o=u({},n.close),s=o&&"effects"in o,a=e.parent().children(),l=a.filter("."+N),c=a.index(e),o=u(s?o:u({reverse:!0},i),{hide:!0}),r.size(i.effects)?(l.kendoRemoveClass(N,{duration:o.duration}),e.kendoRemoveClass(V,{duration:o.duration})):(l.removeClass(N),e.removeClass(V)),d=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===d.length?(t.tabGroup.find("."+U).removeClass(U),e.addClass(U).css("z-index"),e.addClass(N),t._current(e),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(e),!1):(h=d.filter("."+N),f=t.contentHolder(c),p=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(h),0===f.length?(h.removeClass(N).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(o),!1):(e.attr("data-animating",!0),g=(e.children("."+x).data(F)||t._contentUrls[c]||!1)&&f.is(D),v=function(){t.tabGroup.find("."+U).removeClass(U),e.addClass(U).css("z-index"),r.size(i.effects)?(l.kendoAddClass(H,{duration:i.duration}),e.kendoAddClass(N,{duration:i.duration})):(l.addClass(H),e.addClass(N)),l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),t._sizeScrollWrap(p),p.addClass(N).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(u({init:function(){t.trigger(k,{item:e[0],contentElement:f[0]}),r.resize(f)}},i,{complete:function(){e.removeAttr("data-animating"),t.trigger(R,{item:e[0],contentElement:f[0]}),r.resize(f),t.scrollWrap.css("height","").css("height")}}))},_=function(){g?(e.removeAttr("data-animating"),t.ajaxRequest(e,f,function(){e.attr("data-animating",!0),v(),t.trigger("change")})):(v(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(e)},h.removeClass(N),h.attr("aria-hidden",!0),h.attr("aria-expanded",!1),h.length?h.kendoStop(!0,!0).kendoAnimate(u({complete:_},o)):_(),!0))},contentElement:function(n){var i,o,s,a;if(isNaN(n-0))return t;if(i=this.contentElements&&this.contentElements[0]&&!r.kineticScrollNeeded?this.contentElements:this.contentAnimators,o=e(this.tabGroup.children()[n]).attr("aria-controls"),i)for(s=0,a=i.length;s<a;s++)if(i.eq(s).closest(".k-content")[0].id==o)return i[s];return t},contentHolder:function(t){var n=e(this.contentElement(t)),i=n.children(".km-scroll-container");return r.support.touch&&i[0]?i:n},ajaxRequest:function(t,n,i,o){var s,a,l,c,d,u,f,p,m,g;t=this.tabGroup.find(t),s=this,a=e.ajaxSettings.xhr,l=t.find("."+x),c={},d=t.width()/2,u=!1,f=t.find(".k-loading").removeClass("k-complete"),f[0]||(f=e("<span class='k-loading'/>").prependTo(t)),p=2*d-f.width(),m=function(){f.animate({marginLeft:(parseInt(f.css("marginLeft"),10)||0)<d?p:0},500,m)},r.support.browser.msie&&r.support.browser.version<10&&setTimeout(m,40),o=o||l.data(F)||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,n=a(),i=t.progressUpload?"progressUpload":!!t.progress&&"progress";return n&&e.each([n,n.upload],function(){this.addEventListener&&this.addEventListener("progress",function(e){i&&t[i](e)},!1)}),t.noProgress=!(window.XMLHttpRequest&&"upload"in new XMLHttpRequest),n},progress:function(e){if(e.lengthComputable){var t=parseInt(e.loaded/e.total*100,10)+"%";f.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),f.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&&f.remove()},success:function(e){var a,l,c;f.addClass("k-complete");try{a=this,l=10,a.noProgress&&(f.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:n.get()}}),r.destroy(n),n.html(e)}catch(d){c=window.console,c&&c.error&&c.error(d.name+": "+d.message+" in "+o),this.error(this.xhr,"error")}i&&i.call(s,n),s.angular("compile",function(){return{elements:n.get()}}),s.trigger(B,{item:t[0],contentElement:n[0]})}},"object"==typeof o&&(g=e.extend(!0,{},g,o),h(g.url)&&(g.url=g.url())),s.xhr=e.ajax(g)}});u($,{renderItem:function(e){e=u({tabStrip:{},group:{}},e);var t=q.empty,n=e.item;return q.item(u(e,{image:n.imageUrl?q.image:t,sprite:n.spriteCssClass?q.sprite:t,itemWrapper:q.itemWrapper},G))},renderContent:function(e){return q.content(u(e,G))}}),r.ui.plugin($)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||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 n,i,o,r,s,a=window.kendo,l=a.Class,c=a.ui.Widget,d=a.support.mobileOS,u=a.support.browser,h=e.extend,f=e.proxy,p=a.deepExtend,m=a.keys,g="select",v="select.k-select-overlay",_=l.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),b={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 href="" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on"><span unselectable="on" class="k-icon k-i-more-vertical"></span></a>',formatByName:function(t,n){for(var i=0;i<n.length;i++)if(e.inArray(t,n[i].tags)>=0)return n[i]},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"},n=t[e];return n?n:e},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+b.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),x.defaultTools[e]=t},registerFormat:function(e,t){x.fn.options.formats[e]=t}},w={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",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",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 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",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"},y=!d||d.ios&&d.flatVersion>=500||!d.ios&&t!==document.documentElement.contentEditable,k={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"]},x=c.extend({init:function(n,i){var o,r,s,l,d,u=this,m=a.ui.editor,g=m.Dom;y&&(c.fn.init.call(u,n,i),u.options=p({},u.options,i),u.options.tools=u.options.tools.slice(),n=u.element,d=n[0],l=g.name(d),this._registerHandler(n.closest("form"),"submit",f(u.update,u,t)),s=h({},u.options),s.editor=u,"textarea"==l?(u._wrapTextarea(),r=u.wrapper.find(".k-editor-toolbar"),d.id&&r.attr("aria-controls",d.id)):(u.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),s.popup=!0,r=e('<ul class="k-editor-toolbar" role="toolbar" />').insertBefore(n)),u.toolbar=new m.Toolbar(r[0],s),u.toolbar.bindTo(u),"textarea"==l&&setTimeout(function(){var e=u.wrapper[0].style.height,t=parseInt(e,10),n=u.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&n>t&&u.wrapper.height(t-(n-t))}),u._resizable(),u._initializeContentElement(u),u.keyboard=new m.Keyboard([new m.BackspaceHandler(u),new m.TypingHandler(u),new m.SystemHandler(u),new m.SelectAllHandler(u)]),u.clipboard=new m.Clipboard(this),u.undoRedoStack=new a.util.UndoRedoStack,i&&i.value?o=i.value:u.textarea?(o=d.value,u.options.encoded&&e.trim(d.defaultValue).length&&(o=d.defaultValue),o=o.replace(/[\r\n\v\f\t ]+/gi," ")):o=d.innerHTML,u.value(o||a.ui.editor.emptyElementContent),this._registerHandler(document,{mousedown:function(){u._endTyping()},mouseup:function(e){u._mouseup(e)}}),u._initializeImmutables(),u.toolbar.resize(),a.notify(u))},setOptions:function(e){var t=this;c.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 n,i=this.options.resizable,o=e.isPlainObject(i)?i.content===t||i.content===!0:i;o&&this.textarea&&(e("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right' /></div>").insertAfter(this.textarea),this.wrapper.kendoResizable(h({},this.options.resizable,{start:function(t){var n=this.editor=e(t.currentTarget).closest(".k-editor");this.initialSize=n.height(),n.find("td:last").append("<div class='k-overlay' />")},resize:function(e){var t=e.y.initialDelta,n=this.initialSize+t,i=this.options.min||0,o=this.options.max||1/0;n=Math.min(o,Math.max(i,n)),this.editor.height(n)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),a.support.mobileOS.ios&&(n=this.wrapper.getKendoResizable(),n.draggable.options.ignore=v))},_initializeTableResizing:function(){var e=this;a.ui.editor.TableResizing.create(e),e._showTableResizeHandlesProxy=f(e._showTableResizeHandles,e),e.bind(g,e._showTableResizeHandlesProxy)},_destroyTableResizing:function(){var e=this,t=e.tableResizing;t&&(t.destroy(),e.tableResizing=null),e._showTableResizeHandlesProxy&&e.unbind(g,e._showTableResizeHandlesProxy)},_showTableResizeHandles:function(){var e=this,t=e.tableResizing;t&&t.showResizeHandles()},_initializeColumnResizing:function(){a.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var e=this;e.columnResizing&&(e.columnResizing.destroy(),e.columnResizing=null)},_initializeRowResizing:function(){a.ui.editor.RowResizing.create(this)},_destroyRowResizing:function(){var e=this;e.rowResizing&&(e.rowResizing.destroy(),e.rowResizing=null)},_wrapTextarea:function(){var t=this,n=t.element,i=n[0].style.width,o=n[0].style.height,r=b.editorWrapperTemplate,s=e(r).insertBefore(n).width(i).height(o),a=s.find(".k-editable-area");n.attr("autocomplete","off").appendTo(a).addClass("k-content k-raw-content").css("display","none"),t.textarea=n,t.wrapper=s},_createContentElement:function(t){var n,i,o,r=this,s=r.textarea,l=r.options.domain,c=l||document.domain,h="",f='javascript:""';return(l||c!=location.hostname)&&(h='<script>document.domain="'+c+'"</script>',f="javascript:document.write('"+h+"')"),s.hide(),n=e("<iframe />",{title:r.options.messages.editAreaTitle,frameBorder:"0"})[0],e(n).css("display","").addClass("k-content").attr("tabindex",s[0].tabIndex).insertBefore(s),n.src=f,i=n.contentWindow||n,o=i.document||n.contentDocument,e(n).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;"+(a.support.isRtl(s)?"direction:rtl;":"")+(u.msie||u.edge?"height:auto;":"")+(d.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+"<script>(function(d,c){d[c]('header'),d[c]('article'),d[c]('nav'),d[c]('section'),d[c]('footer');})(document, 'createElement');</script>"+e.map(t,function(e){return"<link rel='stylesheet' href='"+e+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),o.close(),i},_blur:function(){var e=this.textarea,t=e?e.val():this._oldValue,n=this.options.encoded?this.encodedValue():this.value();this.update(),e&&e.trigger("blur"),n!=t&&this.trigger("change")},_spellCorrect:function(e){var n,i=!1;this._registerHandler(e.body,{contextmenu:function(){e.one("select",function(){n=null}),e._spellCorrectTimeout=setTimeout(function(){n=new a.ui.editor.RestorePoint(e.getRange(),e.body),i=!1},10)},input:function(){if(n)return a.support.browser.mozilla&&!i?(i=!0,t):(a.ui.editor._finishUpdate(e,n),t)}})},_registerHandler:function(t,n,i){var o,r,s,l=this,c=".kendoEditor";if(t=e(t),this._handlers||(this._handlers=[]),t.length)if(e.isPlainObject(n))for(s in n)n.hasOwnProperty(s)&&this._registerHandler(t,s,n[s]);else for(o=a.applyEventMap(n).split(" "),r=0;r<o.length;r++)l._handlers.push({element:t,type:o[r]+c,handler:i}),t.on(o[r]+c,i)},_deregisterHandlers:function(){var e,t,n=this._handlers;for(e=0;e<n.length;e++)t=n[e],t.element.off(t.type,t.handler);this._handlers=[]},_initializeContentElement:function(){var n,i,o,r=this;r.textarea?(r.window=r._createContentElement(r.options.stylesheets),n=r.document=r.window.contentDocument||r.window.document,r.body=n.body,i=r.window,o=n,this._registerHandler(n,"mouseup",f(this._mouseup,this))):(r.window=window,n=r.document=document,r.body=r.element[0],i=r.body,o=r.body,r.toolbar.decorateFrom(r.body)),this._registerHandler(i,"blur",f(this._blur,this)),r._registerHandler(o,"down",f(r._mousedown,r));try{n.execCommand("enableInlineTableEditing",null,!1)}catch(s){}a.support.touch&&this._registerHandler(n,{keydown:function(){a._activeElement()!=n.body&&r.window.focus()}}),this._spellCorrect(r),this._registerHandler(r.body,{keydown:function(e){var n,i,o,s,a,l,c,d,u,h;return(e.keyCode!==m.BACKSPACE&&e.keyCode!==m.DELETE||"true"===r.body.getAttribute("contenteditable"))&&(e.keyCode===m.F10?(setTimeout(f(r.toolbar.focus,r.toolbar),100),e.preventDefault(),t):(e.keyCode!=m.LEFT&&e.keyCode!=m.RIGHT||(n=r.getRange(),i=e.keyCode==m.LEFT,o=n[i?"startContainer":"endContainer"],s=n[i?"startOffset":"endOffset"],a=i?-1:1,l=s+a,c=i?l:s,3==o.nodeType&&"\ufeff"==o.nodeValue[c]&&(n.setStart(o,l),n.collapse(!0),r.selectRange(n))),d=r.toolbar.tools,u=r.keyboard.toolFromShortcut(d,e),h=u?d[u].options:{},u&&!h.keyPressCommand?(e.preventDefault(),/^(undo|redo)$/.test(u)||r.keyboard.endTyping(!0),r.trigger("keydown",e),r.exec(u),r._runPostContentKeyCommands(e),!1):(r.keyboard.clearTimeout(),r.keyboard.keydown(e),t)))},keypress:function(e){setTimeout(function(){r._runPostContentKeyCommands(e),r._showTableResizeHandles()},0)},keyup:function(t){var n=[m.BACKSPACE,m.TAB,m.PAGEUP,m.PAGEDOWN,m.END,m.HOME,m.LEFT,m.UP,m.RIGHT,m.DOWN,m.INSERT,m.DELETE];(e.inArray(t.keyCode,n)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&r._selectionChange(),r.keyboard.keyup(t)},click:function(e){var t,n=a.ui.editor.Dom;"img"===n.name(e.target)&&(t=r.createRange(),t.selectNode(e.target),r.selectRange(t))},"cut copy paste":function(e){r.clipboard["on"+e.type](e)},focusin:function(){r.body.hasAttribute("contenteditable")&&(e(this).addClass("k-state-active"),r.toolbar.show())},focusout:function(){setTimeout(function(){var t,n=a._activeElement(),i=r.body,o=r.toolbar;o.options.popup&&(t=o.window.element.get(0),t&&!e.contains(t,n)&&t!=n&&(o.preventPopupHide=!1)),n==i||e.contains(i,n)||e(n).is(".k-editortoolbar-dragHandle")||o.focused()||(e(i).removeClass("k-state-active"),o.hide())},10)}}),r._initializeColumnResizing(),r._initializeRowResizing(),r._initializeTableResizing()},_initializeImmutables:function(){var e=this,t=a.ui.editor;e.options.immutables&&(e.immutables=new t.Immutables(e))},_mousedown:function(t){var n,i=this;i._selectionStarted=!0,u.gecko||(n=e(t.target),(2==t.which||1==t.which&&t.ctrlKey)&&n.is("a[href]")&&window.open(n.attr("href"),"_new"))},_mouseup:function(t){var n=this;a.support.mobileOS.ios&&t&&e(t.target).is(v)||n._selectionStarted&&setTimeout(function(){n._selectionChange()},1)},_runPostContentKeyCommands:function(e){var t,n,i,o,r=this.getRange(),s=this.keyboard.toolsFromShortcut(this.toolbar.tools,e);for(t=0;t<s.length;t++)n=s[t],i=n.options,i.keyPressCommand&&(o=new i.command({range:r}),o.changesContent()&&(this.keyboard.endTyping(!0),this.exec(n.name)))},refresh:function(){var e=this;e.textarea&&(e._destroyResizings(),e.textarea.val(e.value()),e.wrapper.find("iframe").remove(),e._initializeContentElement(e),e.value(e.textarea.val()))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:w,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"],k.basic,k.alignment,k.lists,k.indenting,k.links,["insertImage"],k.tables)},destroy:function(){var e=this;c.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),e._destroyUploadWidget(),e._destroyResizings(),a.destroy(this.wrapper)},_destroyResizings:function(){var e=this;e._destroyTableResizing(),a.ui.editor.TableResizing.dispose(e),e._destroyRowResizing(),a.ui.editor.RowResizing.dispose(e),e._destroyColumnResizing(),a.ui.editor.ColumnResizing.dispose(e)},_focusOutside:function(){if(a.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,n,i=x.defaultTools[e],o=i&&(i.options.finder||i.finder),r=a.ui.editor.RangeUtils;return!!o&&(t=this.getRange(),n=r.textNodes(t),!n.length&&t.collapsed&&(n=[t.startContainer]),o.getFormat?o.getFormat(n):o.isFormatted(n))},value:function(e){var n=this.body,i=a.ui.editor,o=this.options,r=i.Serializer.domToXhtml(n,o.serialization);return e===t?r:(e!=r&&(i.Serializer.htmlToDom(e,n,o.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools()),t)},saveSelection:function(t){t=t||this.getRange();var n=t.commonAncestorContainer,i=this.body;(n==i||e.contains(i,n))&&(this.selectionRestorePoint=new a.ui.editor.RestorePoint(t,i))},_focusBody:function(){var e,t=this.body,n=this.wrapper&&this.wrapper.find("iframe")[0],i=this.document.documentElement,o=a._activeElement();n?o!=t&&o!=n&&(e=i.scrollTop,t.focus(),i.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 a.ui.editor.Dom.encode(this.value())},createRange:function(e){return a.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return a.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(),n=this.document;return t.startContainer!=n||t.endContainer!=n||t.startOffset||t.endOffset||(t.setStart(this.body,0),t.collapse(!0)),t},_containsRange:function(e){var t=a.ui.editor.Dom,n=this.body;return e&&t.isAncestorOrSelf(n,e.startContainer)&&t.isAncestorOrSelf(n,e.endContainer)},selectedHtml:function(){return a.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,n){this.focus();var i=new a.ui.editor.InsertHtmlCommand(e.extend({range:this.getRange(),html:t},n));i.editor=this,i.exec()},exec:function(e,n){var i,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)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 x.defaultTools)if(s.toLowerCase()==e){o=x.defaultTools[s];break}if(o){if(i=a.getRange(),o.command&&(l=o.command(h({range:i,body:a.body,immutables:!!a.immutables},n))),r=a.trigger("execute",{name:e,command:l}))return;if(/^(undo|redo)$/i.test(e))a.undoRedoStack[e]();else if(l&&(l.managesUndoRedo||a.undoRedoStack.push(l),l.editor=a,l.exec(),l.async))return l.change=f(a._selectionChange,a),t;a._selectionChange()}}});x.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},a.ui.plugin(x),n=l.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}),n.exec=function(e,t,n){e.exec(t,{value:n})},i=n.extend({init:function(e){n.fn.init.call(this,e)},command:function(e){var t=this;return new a.ui.editor.FormatCommand(h(e,{formatter:t.options.formatter}))},update:function(e,t){var n=this.options.finder.isFormatted(t);e.toggleClass("k-state-selected",n),e.attr("aria-pressed",n)}}),b.registerTool("separator",new n({template:new _({template:b.separatorTemplate})})),o=u.msie&&u.version<9?"\ufeff":"",r="\ufeff",s=r,u.msie&&10==u.version&&(s="&nbsp;"),h(a.ui,{editor:{ToolTemplate:_,EditorUtils:b,Tool:n,FormatTool:i,_bomFill:o,emptyElementContent:r,
emptyTableCellContent:s}}),a.PDFMixin&&(a.PDFMixin.extend(x.prototype),x.prototype._drawPDF=function(){return a.drawing.drawDOM(this.body,this.options.pdf)},x.prototype.saveAsPDF=function(){var t,n=new e.Deferred,i=n.promise(),o={promise:i};if(!this.trigger("pdfExport",o))return t=this.options.pdf,this._drawPDF(n).then(function(e){return a.drawing.exportPDF(e,t)}).done(function(e){a.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy}),n.resolve()}).fail(function(e){n.reject(e)}),i})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/dom.min",["editor/main.min"],e)}(function(){!function(e){function t(e){var t,n,i={};for(t=0,n=e.length;t<n;t++)i[e[t]]=!0;return i}var n,i,o,r,s,a,l,c,d,u,h,f=window.kendo,p=e.map,m=e.extend,g=f.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="div,p,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="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(","),A=t(D),E=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,n=t;;){if(n=n.nextSibling,!n)break;3==n.nodeType&&3==t.nodeType&&(n.nodeValue=t.nodeValue+n.nodeValue,h.remove(t)),t=n}}),n=/^\s+$/,i=/^[\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:A,findNodeIndex:function(e,t){var n=0;if(!e)return-1;for(;;){if(e=e.previousSibling,!e)break;t&&3==e.nodeType||n++}return n},isDataNode:function(e){return e&&null!==e.nodeValue&&null!==e.data},isAncestorOf:function(t,n){try{return!h.isDataNode(t)&&(e.contains(t,h.isDataNode(n)?n.parentNode:n)||n.parentNode==t)}catch(i){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},getNodeLength:function(e){return h.isDataNode(e)?e.length:e.childNodes.length},splitDataNode:function(e,t){for(var n,i=e.cloneNode(!1),o="",r=e.nextSibling;r&&3==r.nodeType&&r.nodeValue;)o+=r.nodeValue,n=r,r=r.nextSibling,h.remove(n);e.deleteData(t,e.length),i.deleteData(0,t),i.nodeValue+=o,h.insertAfter(i,e)},attrEquals:function(e,t){var n,i;for(n in t)if(i=e[n],n==_&&(i=e[f.support.cssFloat?b:w]),"object"==typeof i){if(!h.attrEquals(i,t[n]))return!1}else if(i!=t[n])return!1;return!0},blockParentOrBody:function(e){return h.parentOfType(e,S)||e.ownerDocument.body},blockParents:function(t){var n,i,o,r=[];for(n=0,i=t.length;n<i;n++)o=h.parentOfType(t[n],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:D,empty:x,fillAttrs:E,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?"#"+p(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 n=!t||t.entities?d:c;return e.replace(n,function(e){var t=e.charCodeAt(0),n=u[t];return n?"&"+n+";":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,n=null;if(3==e.nodeType)return e;for(t=e.lastChild;t;t=t.previousSibling)if(n=h.lastTextNode(t))return n;return n},is:function(e,t){return e&&h.name(e)==t},isMarker:function(e){return e.className==k},isWhitespace:function(e){return n.test(e.nodeValue)},allWhitespaceContent:function(e){for(var t=e.firstChild;t&&h.isWhitespace(t);)t=t.nextSibling;return!t},isEmptyspace:function(e){return i.test(e.nodeValue)},htmlIndentSpace:function(t){var n,o,s,a,l,c;return!(!h.isDataNode(t)||!h.isWhitespace(t))&&(!!i.test(t.nodeValue)||(n=function(e,t){for(;e[t];)if(e=e[t],h.significantNodes([e]).length>0)return e},o=t.parentNode,s=n(t,"previousSibling"),a=n(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)]},isEmpty:function(e){return x[h.name(e)]},isInline:function(e){return A[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),n=(t.contentWindow||t).document||t.ownerDocument||t;return n=f.support.browser.webkit||"BackCompat"==n.compatMode?n.body:n.documentElement},scrollTo:function(t){var n,i,o=e(h.isDataNode(t)?t.parentNode:t),r=h.windowFromDocument(t.ownerDocument),s=r.innerHeight,a=h.scrollContainer(t.ownerDocument);n=o.offset().top,i=o[0].offsetHeight,i||(i=parseInt(o.css("line-height"),10)||Math.ceil(1.2*parseInt(o.css("font-size"),10))||15),i+n>a.scrollTop+s&&(a.scrollTop=i+n-s)},persistScrollTop:function(e){a=h.scrollContainer(e).scrollTop},offset:function(e,t){for(var n={top:e.offsetTop,left:e.offsetLeft},i=e.offsetParent;i&&(!t||h.isAncestorOf(t,i));)n.top+=i.offsetTop,n.left+=i.offsetLeft,i=i.offsetParent;return n},restoreScrollTop:function(e){"number"==typeof a&&(h.scrollContainer(e).scrollTop=a)},insertAt:function(e,t,n){e.insertBefore(t,e.childNodes[n]||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.removeChild(e)},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,n;for(t=e.childNodes.length-1;t>=0;t--)n=e.childNodes[t],h.isDataNode(n)?h.stripBom(n.nodeValue).length||h.remove(n):n.className!=k&&(h.trim(n),(0===n.childNodes.length||h.allWhitespaceContent(n)&&h.isBlock(n)&&!h.isEmpty(n))&&h.remove(n));return e},closest:function(e,t){for(;e&&h.name(e)!=t;)e=e.parentNode;return e},closestBy:function(e,t,n){for(;e&&!t(e);){if(n&&n(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,n){return e.inArray(h.name(t),n)>=0},changeTag:function(e,t,n){var i,o,r,s,a,l=h.create(e.ownerDocument,t),c=e.attributes;if(!n)for(i=0,o=c.length;i<o;i++)a=c[i],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 n=h.closestBy(t,function(e){return e.parentNode&&h.significantNodes(e.parentNode.childNodes).length>1});return e(n).is("body,.k-editor")?void 0:n},create:function(e,t,n){return h.attr(e.createElement(t),n)},attr:function(e,t){t=m({},t),t&&v in t&&(h.style(e,t.style),delete t.style);for(var n in t)null===t[n]?(e.removeAttribute(n),delete t[n]):"className"==n&&(e[n]=t[n]);return m(e,t)},style:function(t,n){e(t).css(n||{})},unstyle:function(e,t){for(var n in t)n==_&&(n=f.support.cssFloat?b:w),e.style[n]="";""===e.style.cssText&&e.removeAttribute(v)},inlineStyle:function(t,n,i){var o,r=e(h.create(t.ownerDocument,n,i));return t.appendChild(r[0]),o=p(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,n){var i,o,r=" "+t.className+" ",s=n.split(" ");for(i=0,o=s.length;i<o;i++)r=r.replace(" "+s[i]+" "," ");r=e.trim(r),r.length?t.className=r:t.removeAttribute(y)},commonAncestor:function(){var e,t,n,i,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=[],n=arguments[e];n;)t.push(n),n=n.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(i=s[0][e],o=1;o<r;o++)if(i!=s[o][e])return l;l=i}return l},closestSplittableParent:function(t){var n,i,o;return n=1==t.length?h.parentOfType(t[0],["ul","ol"]):h.commonAncestor.apply(null,t),n||(n=h.parentOfType(t[0],["p","td"])||t[0].ownerDocument.body),h.isInline(n)&&(n=h.blockParentOrBody(n)),i=p(t,h.editableParent),o=h.commonAncestor(i)[0],e.contains(n,o)&&(n=o),n},closestEditable:function(t,n){var i,o=h.editableParent(t);return i=h.ofType(t,n)?t:h.parentOfType(t,n),i&&o&&e.contains(i,o)?i=o:!i&&o&&(i=o),i},closestEditableOfType:function(e,t){var n=h.closestEditable(e,t);if(n&&h.ofType(n,t))return n},filter:function(e,t,n){var i=function(t){return h.name(t)==e};return h.filterBy(t,i,n)},filterBy:function(e,t,n){for(var i,o=0,r=e.length,s=[];o<r;o++)i=t(e[o]),(i&&!n||!i&&n)&&s.push(e[o]);return s},ensureTrailingBreaks:function(t){var n=e(t).find("p,td,th"),i=n.length,o=0;if(i)for(;o<i;o++)h.ensureTrailingBreak(n[o]);else h.ensureTrailingBreak(t)},removeTrailingBreak:function(t){e(t).find("br[type=_moz],.k-br").remove()},ensureTrailingBreak:function(e){var t,n,i;h.removeTrailingBreak(e),t=e.lastChild,n=t&&h.name(t),(!n||"br"!=n&&"img"!=n||"br"==n&&"k-br"!=t.className)&&(i=e.ownerDocument.createElement("br"),i.className="k-br",e.appendChild(i))}},f.ui.editor.Dom=h}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/serializer.min",["editor/dom.min"],e)}(function(){!function(e,t){var n,i,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,f=/^\d+(\.\d*)?(px)?$/i,p=/<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>",n=3===w.firstChild.nodeType,w=null,i=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 n=a.Immutables.immutable,i=l.emptyTextNode,o=t.firstChild,r=t.lastChild;i(o);)o=o.nextSibling;for(;i(r);)r=r.previousSibling;o&&n(o)&&e(b).prependTo(t),r&&n(r)&&e(b).appendTo(t)},_fillEmptyElements:function(t){e(t).find("p,td").each(function(){var t,n=e(this);if(/^\s*$/g.test(n.text())&&!n.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,n,i,o=e.getElementsByTagName("ol");for(t=0;t<o.length;t++)n=o[t],i=n.getAttribute("start"),n.setAttribute("start",1),i?n.setAttribute("start",i):n.removeAttribute(i)},_preventScriptExecution:function(t){e(t).find("*").each(function(){var e,t,n,i,o=this.attributes;for(t=0,n=o.length;t<n;t++)e=o[t],i=e.nodeName,e.specified&&/^on/i.test(i)&&(this.setAttribute("k-script-"+i,e.value),this.removeAttribute(i))})},htmlToDom:function(t,n,o){var a=s.support.browser,c=a.msie,d=c&&a.version<9,u="originalsrc",h="originalhref",f=o||{},p=f.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"')),i(f.custom)&&(t=f.custom(t)||t),n.innerHTML=t,p&&p.deserialize(n),d?(l.remove(n.firstChild),e(n).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(n),r._resetOrderedLists(n)),r._preventScriptExecution(n),r._fillEmptyElements(n),r._removeSystemElements(n),r._toEditableImmutables(n),e("table",n).addClass("k-table"),n},domToXhtml:function(i,r){function c(t){return e.grep(t,function(e){return"style"!=e.name})}function _(t){var n,i,o,r=e.trim,s=r(t),a=[];for(m.lastIndex=0;;){if(n=m.exec(s),!n)break;i=r(n[1].toLowerCase()),o=r(n[2]),"font-size-adjust"!=i&&"font-stretch"!=i&&(i.indexOf("color")>=0?o=l.toHex(o):i.indexOf("font")>=0?o=o.replace(u,"'"):/\burl\(/g.test(o)&&(o=o.replace(u,"")),a.push({property:i,value:o}))}return a}function b(e){var t,n=_(e);for(t=0;t<n.length;t++)A.push(n[t].property),A.push(":"),A.push(n[t].value),A.push(";")}function w(e){var t,n,i,o,s,a,c=[],d=e.attributes;for(n=0,i=d.length;n<i;n++)t=d[n],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 y(n,i){var o,r,a,c,d,u,h,p;if(i=i||w(n),l.is(n,"img")&&(u=n.style.width,h=n.style.height,p=e(n),u&&f.test(u)&&(p.attr("width",parseInt(u,10)),l.unstyle(n,{width:t})),h&&f.test(h)&&(p.attr("height",parseInt(h,10)),l.unstyle(n,{height:t}))),i.length)for(i.sort(function(e,t){return e.nodeName>t.nodeName?1:e.nodeName<t.nodeName?-1:0}),o=0,r=i.length;o<r;o++)a=i[o],c=a.nodeName,d=a.value,"class"==c&&"k-table"==d||(c=c.replace(v,""),A.push(" "),A.push(c),A.push('="'),"style"==c?b(d||n.style.cssText):A.push("src"==c||"href"==c?s.htmlEncode(n.getAttribute(c,2)):l.fillAttrs[c]?c:d),A.push('"'))}function k(e,t,n){for(var i=e.firstChild;i;i=i.nextSibling)S(i,t,n)}function x(e){return e.nodeValue.replace(/\ufeff/g,"")}function C(e){if("\ufeff"===e.nodeValue){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 S(i,o,s){var c,d,u,h,f,p,m=i.nodeType;if(E&&a.Immutables.immutable(i))A.push(E.serialize(i));else if(1==m){if(c=l.name(i),p=e(i),p.hasClass("k-table-resize-handle-wrapper")||p.hasClass("k-column-resize-handle-wrapper")||p.hasClass("k-row-resize-handle-wrapper"))return;if(!c||l.insignificant(i))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(i),k(i,!1,d.skipEncoding),d.end(i),t;A.push("<"),A.push(c),y(i),l.empty[c]?A.push(" />"):(A.push(">"),k(i,o||l.is(i,"pre")),A.push("</"),A.push(c),A.push(">"))}else if(3==m){if(C(i))return A.push("&nbsp;"),t;h=x(i),!o&&n&&(u=i.parentNode,f=i.previousSibling,f||(f=(l.isInline(u)?u:i).previousSibling),f&&""!==f.innerHTML&&!l.isBlock(f)||(h=h.replace(/^[\r\n\v\f\t ]+/,"")),h=h.replace(/ +/," ")),A.push(s?h:l.encode(h,r))}else 4==m?(A.push("<![CDATA["),A.push(i.data),A.push("]]>")):8==m&&(i.data.indexOf("[CDATA[")<0?(A.push("<!--"),A.push(i.data),A.push("-->")):(A.push("<!"),A.push(i.data),A.push(">")))}function T(e){var t=e.childNodes.length,n=t&&3==e.firstChild.nodeType;return n&&(1==t||2==t&&l.insignificant(e.lastChild))}function D(){e.isFunction(r.custom)&&(A=r.custom(A)||A)}var A=[],E=r&&r.immutables,M={iframe:{start:function(e){A.push("<iframe"),y(e),A.push(">")},end:function(){A.push("</iframe>")}},"k:script":{start:function(e){A.push("<script"),y(e),A.push(">")},end:function(){A.push("</script>")},skipEncoding:!0},span:{semantic:!0,start:function(t){var n,i,o=t.style,r=w(t),s=c(r);s.length&&(A.push("<span"),y(t,s),A.push(">")),"underline"==o.textDecoration&&A.push("<u>"),n=[],o.color&&n.push('color="'+l.toHex(o.color)+'"'),o.fontFamily&&n.push('face="'+o.fontFamily+'"'),o.fontSize&&(i=e.inArray(o.fontSize,d),n.push('size="'+i+'"')),n.length&&A.push("<font "+n.join(" ")+">")},end:function(e){var t=e.style;(t.color||t.fontFamily||t.fontSize)&&A.push("</font>"),"underline"==t.textDecoration&&A.push("</u>"),c(w(e)).length&&A.push("</span>")}},strong:{semantic:!0,start:function(){A.push("<b>")},end:function(){A.push("</b>")}},em:{semantic:!0,start:function(){A.push("<i>")},end:function(){A.push("</i>")}},b:{semantic:!1,start:function(){A.push("<strong>")},end:function(){A.push("</strong>")}},i:{semantic:!1,start:function(){A.push("<em>")},end:function(){A.push("</em>")}},u:{semantic:!1,start:function(){A.push('<span style="text-decoration:underline;">')},end:function(){A.push("</span>")}},font:{semantic:!1,start:function(e){var t,n,i;A.push('<span style="'),t=e.getAttribute("color"),n=d[e.getAttribute("size")],i=e.getAttribute("face"),t&&(A.push("color:"),A.push(l.toHex(t)),A.push(";")),i&&(A.push("font-family:"),A.push(i),A.push(";")),n&&(A.push("font-size:"),A.push(n),A.push(";")),A.push('">')},end:function(){A.push("</span>")}}};return M.script=M["k:script"],r=r||{},t===r.semantic&&(r.semantic=!0),T(i)?(A=l.encode(x(i.firstChild).replace(/[\r\n\v\f\t ]+/," "),r),D(),A):(k(i),A=A.join(""),D(),""===A.replace(h,"").replace(p,"")?"":A)}},c(a,{Serializer:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/range.min",["editor/serializer.min"],e)}(function(){!function(e){function t(e,t,n,i){var o,r,s,a;if(e==t)return i-n;for(o=t;o&&o.parentNode!=e;)o=o.parentNode;if(o)return k(o)-n;for(o=e;o&&o.parentNode!=t;)o=o.parentNode;if(o)return i-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 n(e,n){function i(e){try{return t(e.startContainer,e.endContainer,e.startOffset,e.endOffset)<0}catch(n){return!0}}i(e)&&(n?(e.commonAncestorContainer=e.endContainer=e.startContainer,e.endOffset=e.startOffset):(e.commonAncestorContainer=e.startContainer=e.endContainer,e.startOffset=e.endOffset),e.collapsed=!0)}function i(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(),n=e.duplicate();return t.collapse(!0),n.collapse(!1),y.commonAncestor(e.parentElement(),t.parentElement(),n.parentElement())}function r(e,t,n){var i,o=t[n?"startContainer":"endContainer"],r=t[n?"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(n?"StartToStart":"EndToStart",u)):(i=c.insertBefore(y.create(d,"a"),l),u.moveToElementText(i),y.remove(i),u[n?"moveStart":"moveEnd"]("character",s),u.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",u))}function s(e,t,n,i){var o,r,s,a,l,c,d,u=y.create(t.ownerDocument,"a"),h=e.duplicate(),f=i?"StartToStart":"StartToEnd",p=!1;u.innerHTML="\ufeff",h.collapse(i),r=h.parentElement(),y.isAncestorOrSelf(n,r)||(r=n);do p?r.insertBefore(u,u.previousSibling):(r.appendChild(u),p=!0),h.moveToElementText(u);while((o=h.compareEndPoints(f,e))>0&&u.previousSibling);s=u.nextSibling,o==-1&&x(s)?(h.setEndPoint(i?"EndToStart":"EndToEnd",e),y.remove(u),c=[s,h.text.length]):(a=!i&&u.previousSibling,l=i&&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[i?"setStart":"setEnd"].apply(t,c)}var a,l,c,d,u,h,f,p,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,i(this),n(this,!0)},setEnd:function(e,t){this.endContainer=e,this.endOffset=t,i(this),n(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 n(e){for(;e.next();)e.hasPartialSubtree()?n(e.getSubtreeIterator()):e.remove()}(new a(t))},cloneContents:function(){var e=m.documentFromRange(this);return function t(n){for(var i,o=e.createDocumentFragment();i=n.next();)i=i.cloneNode(!n.hasPartialSubtree()),n.hasPartialSubtree()&&i.appendChild(t(n.getSubtreeIterator())),o.appendChild(i);return o}(new a(this))},extractContents:function(){var e,t=this,n=t.cloneRange();return t.startContainer!=t.commonAncestorContainer&&t.setStartAfter(C(t.commonAncestorContainer,t.startContainer)),t.collapse(!0),e=m.documentFromRange(t),function i(n){for(var o,r=e.createDocumentFragment();o=n.next();)n.hasPartialSubtree()?(o=o.cloneNode(!1),o.appendChild(i(n.getSubtreeIterator()))):n.remove(t.originalRange),r.appendChild(o);return r}(new a(n))},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 n=t.commonAncestorContainer;this._next=t.startContainer!=n||x(t.startContainer)?C(n,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=n||x(t.endContainer)?C(n,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 i._current=i._next,i._next=i._current&&i._current.nextSibling!=i._end?i._current.nextSibling:null,i._current}for(var n,i=this;n=t();)i.hasPartialSubtree()?i.getSubtreeIterator().traverse(e):e(n);return n},remove:function(e){var t,n,i,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,n=l?s.range.endOffset:s._current.length,i=n-t,e&&(a||l)&&(s._current==e.startContainer&&t<=e.startOffset&&(e.startOffset-=i),s._current==e.endContainer&&n<=e.endOffset&&(e.endOffset-=i)),s._current.deleteData(t,i)):(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,n,i,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(n=o(e),s(e,d,n,!0),s(e,d,n,!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),i=d.startContainer,r=d.endContainer,a=this.ownerDocument.body,!(d.collapsed||0!==d.startOffset||d.endOffset!=S(d.endContainer)||i==r&&x(i)&&i.parentNode==a)){for(l=!1,c=!1;0===k(i)&&i==i.parentNode.firstChild&&i!=a;)i=i.parentNode,l=!0;for(;k(r)==S(r.parentNode)-1&&r==r.parentNode.lastChild&&r!=a;)r=r.parentNode,c=!0;i==a&&r==a&&l&&c&&(d.setStart(i,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))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[];return new a(e).traverse(t),
n}}}),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(i&&!i(e))if(y.is(e,"img")||3==e.nodeType&&(!y.isEmptyspace(e)||"\ufeff"==e.nodeValue))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[],i=b.Immutables&&b.Immutables.immutable;return new d(e).traverse(t),n}}}),h=v.extend({init:function(e,t,n){var i=this;i.range=e,i.rootNode=m.documentFromRange(e),i.body=t||i.getEditable(e),"body"!=y.name(i.body)&&(i.rootNode=i.body),i.startContainer=i.nodeToPath(e.startContainer),i.endContainer=i.nodeToPath(e.endContainer),i.startOffset=i.offset(e.startContainer,e.startOffset),i.endOffset=i.offset(e.endContainer,e.endOffset),i.immutables=n&&n.immutables,i.immutables&&(i.serializedImmutables=b.Immutables.removeImmutables(i.body)),i.html=i.body.innerHTML,i.immutables&&!i.serializedImmutables.empty&&b.Immutables.restoreImmutables(i.body,i.serializedImmutables)},index:function(e){for(var t,n=0,i=e.nodeType;e=e.previousSibling;)t=e.nodeType,3==t&&i==t||n++,i=t;return n},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;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,n,i){for(var o=this.rootNode,r=n.length,s=i;r--;)o=o.childNodes[n[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}}),f=v.extend({init:function(){this.caret=null},addCaret:function(e){var t=this,n=t.caret=y.create(m.documentFromRange(e),"span",{className:"k-marker"});return e.insertNode(n),y.stripBomNode(n.previousSibling),y.stripBomNode(n.nextSibling),e.selectNode(n),n},removeCaret:function(e){var t,n,i,o,r=this,s=r.caret.previousSibling,a=0;s&&(a=x(s)?s.nodeValue.length:k(s)),t=r.caret.parentNode,n=s?k(s):0,y.remove(r.caret),T(t),i=t.childNodes[n],x(i)?e.setStart(i,a):i?(o=y.lastTextNode(i),o?e.setStart(o,o.nodeValue.length):e[s?"setStartAfter":"setStartBefore"](i)):(w.msie||t.innerHTML||(t.innerHTML='<br _moz_dirty="" />'),e.selectNodeContents(t)),e.collapse(!0)},add:function(e,t){var n,i,o=this,r=e.collapsed&&!m.isExpandable(e),s=m.documentFromRange(e);return t&&e.collapsed&&(o.addCaret(e),e=m.expand(e)),n=e.cloneRange(),n.collapse(!1),o.end=y.create(s,"span",{className:"k-marker"}),n.insertNode(o.end),n=e.cloneRange(),n.collapse(!0),o.start=o.end.cloneNode(!0),n.insertNode(o.start),o._removeDeadMarkers(o.start,o.end),r&&(i=s.createTextNode("\ufeff"),y.insertAfter(i.cloneNode(),o.start),y.insertBefore(i,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),n=e;n.previousSibling;)3==n.nodeType&&3==n.previousSibling.nodeType&&t--,n=n.previousSibling;return t},remove:function(e){var t,n,i,o,r,s,a,l,c,d,u,h=this,f=h.start,p=h.end;for(T(e.commonAncestorContainer);!f.nextSibling&&f.parentNode;)f=f.parentNode;for(;!p.previousSibling&&p.parentNode;)p=p.parentNode;if(t=f.previousSibling&&3==f.previousSibling.nodeType&&f.nextSibling&&3==f.nextSibling.nodeType,n=p.previousSibling&&3==p.previousSibling.nodeType&&p.nextSibling&&3==p.nextSibling.nodeType,i=t&&n,f=f.nextSibling,p=p.previousSibling,o=!1,r=!1,f==h.end&&(r=!!h.start.previousSibling,f=p=h.start.previousSibling||h.end.nextSibling,o=!0),y.remove(h.start),y.remove(h.end),!f||!p)return e.selectNodeContents(e.commonAncestorContainer),void e.collapse(!0);if(s=o?x(f)?f.nodeValue.length:f.childNodes.length:0,a=x(p)?p.nodeValue.length:p.childNodes.length,3==f.nodeType)for(;f.previousSibling&&3==f.previousSibling.nodeType;)f=f.previousSibling,s+=f.nodeValue.length;if(3==p.nodeType)for(;p.previousSibling&&3==p.previousSibling.nodeType;)p=p.previousSibling,a+=p.nodeValue.length;l=f.parentNode,c=p.parentNode,d=this._normalizedIndex(f),u=this._normalizedIndex(p),T(l),3==f.nodeType&&(f=l.childNodes[d]),T(c),3==p.nodeType&&(p=c.childNodes[u]),o?(3==f.nodeType?e.setStart(f,s):e[r?"setStartAfter":"setStartBefore"](f),e.collapse(!0)):(3==f.nodeType?e.setStart(f,s):e.setStartBefore(f),3==p.nodeType?e.setEnd(p,a):e.setEndAfter(p)),h.caret&&h.removeCaret(e)}}),p=/[\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=[],n=b.Immutables&&b.Immutables.immutableParent;return n&&!n(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,n=m.image(e);n&&(e.setStartAfter(n),e.setEndAfter(n)),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,n){function i(i){var o,r=e.cloneRange();r.collapse(i),r[i?"setStartBefore":"setEndAfter"](t),o=r.extractContents(),n&&(o=y.trim(o)),y[i?"insertBefore":"insertAfter"](o,t)}i(!0),i(!1)},mapAll:function(t,n){var i=[];return new a(t).traverse(function(t){var o=n(t);o&&e.inArray(o,i)<0&&i.push(o)}),i},getAll:function(e,t){var n=t;return"string"==typeof t&&(t=function(e){return y.is(e,n)}),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 n,i,o;if(0!==e.startOffset)return!1;for(n=e.cloneRange();0===n.startOffset&&n.startContainer!=t;){for(i=y.findNodeIndex(n.startContainer),o=n.startContainer.parentNode;i>0&&o[i-1]&&y.insignificant(o[i-1]);)i--;n.setStart(o,i)}return 0===n.startOffset&&n.startContainer==t},isEndOf:function(e,t){function n(e){y.insignificant(e)||o.push(e)}var i,o,r=e.cloneRange();return r.collapse(!1),i=r.startContainer,y.isDataNode(i)&&r.startOffset==y.getNodeLength(i)&&(r.setStart(i.parentNode,y.findNodeIndex(i)+1),r.collapse(!0)),r.setEnd(t,y.getNodeLength(t)),o=[],new a(r).traverse(n),!o.length},wrapSelectedElements:function(e){function t(e,t){var n,i=y.getNodeLength(t);if(e==i)return!0;for(n=e;n<i;n++)if(!y.insignificant(t.childNodes[n]))return!1;return!0}for(var n=y.editableParent(e.startContainer),i=y.editableParent(e.endContainer);0===e.startOffset&&e.startContainer!=n;)e.setStart(e.startContainer.parentNode,y.findNodeIndex(e.startContainer));for(;t(e.endOffset,e.endContainer)&&e.endContainer!=i;)e.setEnd(e.endContainer.parentNode,y.findNodeIndex(e.endContainer)+1);return e},expand:function(e){var t,n,i,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,n=a.nodeValue,t&&n?(i=t.split("").reverse().join("").search(p),o=n.search(p),i&&o?(o=o==-1?n.length:o,i=i==-1?0:t.length-i,r.setStart(s,i),r.setEnd(a,o),r):r):r):r},isExpandable:function(e){var t,n,i,o,r,s,a=e.startContainer,l=m.documentFromRange(e);return a!=l&&a!=l.body&&(t=e.cloneRange(),!!(n=a.nodeValue)&&(i=n.substring(0,t.startOffset),o=n.substring(t.startOffset),r=0,s=0,i&&(r=i.split("").reverse().join("").search(p)),o&&(s=o.search(p)),r&&s))}},_(b,{SelectionUtils:D,W3CRange:A,RangeIterator:a,W3CSelection:l,RangeEnumerator:c,RestorePoint:h,Marker:f,RangeUtils:m})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/system.min",["editor/range.min"],e)}(function(){!function(e){function t(e,t){var n=e.selectionRestorePoint=new f(e.getRange(),e.body),i=new y(t,n);return i.editor=e,e.undoRedoStack.push(i),n}function n(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}function i(e,t,n){for(var i=e?e[t]:null;i&&!n(i);)i=i[t];return i}var o=window.kendo,r=o.Class,s=o.ui.editor,a=s.EditorUtils,l=s.RangeUtils,c=a.registerTool,d=s.Dom,u=s.Tool,h=s.ToolTemplate,f=s.RestorePoint,p=s.Marker,m=o.support.browser,g='<br class="k-br">',v=e.extend,_=d.nodeTypes,b="previousSibling",w=r.extend({init:function(e){this.options=e,this.restorePoint=new f(e.range,e.body,{immutables:e.immutables}),this.marker=new p,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 i=this.editor;return e(t).appendTo(document.body).kendoWindow(v({},i.options.dialogOptions,n)).closest(".k-window").toggleClass("k-rtl",o.support.isRtl(i.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()&&(o.ui.editor.Immutables.expandImmutablesIn(e),this.restorePoint=new f(e,this.editor.body))}}),y=r.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}}),k=w.extend({init:function(e){w.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e,t=this.editor,n=this.options,i=n.range,o=t.body,r=new f(i,o),s=n.html||n.value||"";t.selectRange(i),t.clipboard.paste(s,n),n.postProcess&&n.postProcess(t,t.getRange()),e=new y(r,new f(t.getRange(),o)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),x=u.extend({initialize:function(e,t){var n=t.editor,i=this.options,o=i.items?i.items:n.options.insertHtml;this._selectBox=new s.SelectBox(e,{dataSource:o,dataTextField:"text",dataValueField:"value",change:function(){u.exec(n,"insertHtml",this.value())},title:n.options.messages.insertHtml,highlightFirst:!1})},command:function(e){return new k(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}}),C="td,th,caption",S="table,tbody,thead,tfoot,tr",T=S+","+C,D=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(S)},A=r.extend({remove:function(t){var n,i,o,r,s,a,c,u=this,h=new p;h.add(t,!1),n=l.getAll(t,function(t){return e(t).is(T)}),i=l.documentFromRange(t),o=h.start,r=h.end,s=C.split(","),a=d.parentOfType(o,s),c=d.parentOfType(r,s),u._removeContent(o,a,!0),u._removeContent(r,c,!1),e(n).each(function(t,n){n=e(n),(n.is(C)?n:n.find(C)).each(function(e,t){t.innerHTML="&#65279;"})}),a&&!o.previousSibling&&d.insertBefore(i.createTextNode("\ufeff"),o),c&&!r.nextSibling&&d.insertAfter(i.createTextNode("\ufeff"),r),a?t.setStartBefore(o):n[0]&&(a=e(n[0]),a=a.is(C)?a:a.find(C).first(),a.length&&t.setStart(a.get(0),0)),t.collapse(!0),d.remove(o),d.remove(r)},_removeContent:function(t,n,i){if(n){var o,r=i?"nextSibling":"previousSibling",s=function(t){for(;t&&!t[r];)t=t.parentNode;return t&&e.contains(n,t)?t[r]:null};for(t=s(t);t;)o=s(t),d.remove(t),t=o}}}),E=r.extend({init:function(e){this.editor=e},keydown:function(i){var o,r,a,l,c=this,d=c.editor,u=d.keyboard,h=u.isTypingKey(i),p=v(e.Event(),i);return c.editor.trigger("keydown",p),p.isDefaultPrevented()?(i.preventDefault(),!0):!(p.isDefaultPrevented()||!h||u.isTypingInProgress())&&(o=d.getRange(),r=d.body,c.startRestorePoint=new f(o,r),D(o)&&(a=new A(d),a.remove(o),d.selectRange(o)),m.webkit&&!o.collapsed&&n(r,o)&&(r.innerHTML=""),d.immutables&&s.Immutables.immutablesContext(o)&&(l=new s.BackspaceHandler(d),l.deleteSelection(o)),u.startTyping(function(){c.endRestorePoint=t(d,c.startRestorePoint)}),!0)},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),M=r.extend({init:function(e){this.editor=e},_addCaret:function(e){var t=d.create(this.editor.document,"a");return d.insertAt(e,t,0),d.stripBomNode(t.previousSibling),d.stripBomNode(t.nextSibling),t},_restoreCaret:function(e){var t=this.editor.createRange();t.setStartAfter(e),t.collapse(!0),this.editor.selectRange(t),d.remove(e)},_handleDelete:function(e){var t,n,i=e.endContainer,o=d.closestEditableOfType(i,d.blockElements);return!(!o||!s.RangeUtils.isEndOf(e,o))&&(t=d.next(o),!(!t||"p"!=d.name(t))&&(n=this._addCaret(t),this._merge(o,t),this._restoreCaret(n),!0))},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,o=0;t-o>=0&&"\ufeff"==i[t-o-1];)o++;o>0&&(n.deleteData(t-o,o),e.setStart(n,Math.max(0,t-o)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(e){var t,n,o,r,a=e.startContainer,l=d.closestEditableOfType(a,["li"]),c=d.closestEditableOfType(a,"p,h1,h2,h3,h4,h5,h6".split(","));return d.isDataNode(a)&&this._cleanBomBefore(e),t=i(c,b,function(e){return!d.htmlIndentSpace(e)}),e.collapsed&&e.startOffset!==e.endOffset&&e.startOffset<0&&(e.startOffset=0,e.endOffset=0,this.editor.selectRange(e)),c&&t&&s.RangeUtils.isStartOf(e,c)?(n=this._addCaret(c),this._merge(t,c),this._restoreCaret(n),!0):!(!l||!s.RangeUtils.isStartOf(e,l))&&(o=l.firstChild,o||(l.innerHTML=s.emptyElementContent,o=l.firstChild),r=new s.ListFormatter(d.name(l.parentNode),"p"),e.selectNodeContents(l),r.toggle(e),d.insignificant(o)?e.setStartBefore(o):e.setStart(o,0),this.editor.selectRange(e),!0)},_handleSelection:function(t){var n,i,o,r,a=t.commonAncestorContainer,l=d.closest(a,"table"),c=s.emptyElementContent,u=this.editor;return D(t)?(n=new A(u),n.remove(t),u.selectRange(t),!0):(i=new p,i.add(t,!1),u.immutables&&this._handleImmutables(i),this._surroundFullySelectedAnchor(i),t.setStartAfter(i.start),t.setEndBefore(i.end),o=t.startContainer,r=t.endContainer,t.deleteContents(),l&&""===e(l).text()&&(t.selectNode(l),t.deleteContents()),a=t.commonAncestorContainer,"p"===d.name(a)&&""===a.innerHTML&&(a.innerHTML=c,t.setStart(a,0)),this._join(o,r),d.insertAfter(u.document.createTextNode("\ufeff"),i.start),i.remove(t),o=t.startContainer,"tr"==d.name(o)&&(o=o.childNodes[Math.max(0,t.startOffset-1)],t.setStart(o,d.getNodeLength(o))),t.collapse(!0),u.selectRange(t),!0)},_handleImmutables:function(e){var t=s.Immutables.immutableParent,n=t(e.start),i=t(e.start);n&&d.insertBefore(e.start,n),i&&d.insertAfter(e.end,i),n&&d.remove(n),i&&i.parentNode&&d.remove(i)},_surroundFullySelectedAnchor:function(e){var t,n=e.start,i=n.parentNode,o=e.end,r=d.is(i,"a")&&i===o.parentNode&&i;r&&n===r.firstChild&&o===r.lastChild&&(t=r.parentNode,t.insertBefore(n,r),t.insertBefore(o,r.nextSibling))},_root:function(e){for(;e&&e.parentNode&&"body"!=d.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){e=this._root(e),t=this._root(t),e!=t&&d.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(d.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=d.list(e)?e.children[e.children.length-1]:e,e&&e.appendChild(t.firstChild)):e.nodeType===_.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);d.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===_.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?d.insertAfter(t,e.nextSibling):d.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var n,i,r=this.editor,s=r.getRange(),a=e.keyCode,l=o.keys,c=a===l.BACKSPACE,d=a==l.DELETE;r.immutables&&r.immutables.keydown(e,s)||(!c&&!d||s.collapsed?c?n="_handleBackspace":d&&(n="_handleDelete"):n="_handleSelection",n&&(i=new f(s,r.body),this[n](s)&&(e.preventDefault(),t(r,i))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),R=r.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=t(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML},keydown:function(e){var t=this,n=t.editor,i=n.keyboard;return i.isModifierKey(e)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new f(n.getRange(),n.body),!0):!!i.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)}}),I=r.extend({init:function(e){this.editor=e},keydown:function(e){!m.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,n=t.body,i=s.Immutables.immutable,o=d.emptyTextNode,r=n.firstChild,a=n.lastChild;o(r);)r=r.nextSibling;for(;o(a);)a=a.previousSibling;r&&i(r)&&e(g).prependTo(n),a&&i(a)&&e(g).appendTo(n)},keyup:e.noop}),F=r.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,n){var i,o,r=String.fromCharCode(n.keyCode),s=this._getShortcutModifier(n,navigator.platform);for(i in t)if(o=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(o.key==r||o.key==n.keyCode)&&o.ctrl==s&&o.alt==n.altKey&&o.shift==n.shiftKey)return i},_getShortcutModifier:function(e,t){var n=t.toUpperCase().indexOf("MAC")>=0;return n?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,n){var i,o,r,s=String.fromCharCode(n.keyCode),a=[],l=function(e){return e==s||e==n.keyCode};for(i in t)o=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),r=e.isArray(o.key)?e.grep(o.key,l).length>0:l(o.key),r&&o.ctrl==n.ctrlKey&&o.alt==n.altKey&&o.shift==n.shiftKey&&a.push(t[i]);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 n=this;n.clearTimeout(),t?n.stopTyping():n.timeout=window.setTimeout(e.proxy(n.stopTyping,n),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var n,i=this.handlers;for(n=0;n<i.length&&!i[n][t](e);n++);},keydown:function(e){this.notify(e,"keydown")},keyup:function(e){this.notify(e,"keyup")}}),z=r.extend({init:function(e){this.editor=e;var t=e.options.pasteCleanup;this.cleaners=[new B(t),new L(t),new H(t),new N(t),new V(t),new U(t),new G(t),new $(t)]},htmlToFragment:function(e){var t=this.editor,n=t.document,i=d.create(n,"div"),o=n.createDocumentFragment();for(i.innerHTML=e;i.firstChild;)o.appendChild(i.firstChild);return o},isBlock:function(e){return/<(div|p|ul|ol|table|h[1-6])/i.test(e)},_startModification:function(){var e,t,n=this.editor;if(!this._inProgress)return this._inProgress=!0,e=n.getRange(),t=new f(e,n.body),d.persistScrollTop(n.document),{range:e,restorePoint:t}},_endModification:function(e){t(this.editor,e.restorePoint),this.editor._selectionChange(),this._inProgress=!1},_contentModification:function(e,t){var n=this,i=n.editor,o=n._startModification();o&&(e.call(n,i,o.range),setTimeout(function(){t.call(n,i,o.range),n._endModification(o)}))},_removeBomNodes:function(e){var t,n=s.RangeUtils.textNodes(e);for(t=0;t<n.length;t++)n[t].nodeValue=d.stripBom(n[t].nodeValue)},_onBeforeCopy:function(e){var t=new p;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 n=e.Deferred(),i=new FileReader;return t instanceof window.File||!t.getAsFile||(t=t.getAsFile()),i.onload=e.proxy(n.resolve,n),i.readAsDataURL(t),n.promise()},_triggerPaste:function(e,t){var n={html:e||""};n.html=n.html.replace(/\ufeff/g,""),this.editor.trigger("paste",n),this.paste(n.html,t||{})},_handleImagePaste:function(t){var n,i,o,r,s;if("FileReader"in window&&!(m.msie&&m.version>10)&&(n=t.clipboardData||t.originalEvent.clipboardData||window.clipboardData||{},i=n.items||n.files,i&&(o=e.grep(i,function(e){return/^image\//i.test(e.type)}),r=e.grep(i,function(e){return/^text\/html/i.test(e.type)}),!r.length&&o.length&&(s=this._startModification()))))return e.when.apply(e,e.map(o,this._fileToDataURL)).done(e.proxy(function(){var t=Array.prototype.slice.call(arguments),n=e.map(t,function(e){return'<img src="'+e.target.result+'" />'}).join("");this._triggerPaste(n),this._endModification(s)},this)),!0},onpaste:function(t){return this._handleImagePaste(t)?void t.preventDefault():(this.expandImmutablesIn(),void this._contentModification(function(n,i){var r,s,a,l=d.create(n.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),c=o.support.browser,u=n.body;this._decoreateClipboardNode(l,u),u.appendChild(l),c.webkit&&this._moveToCaretPosition(l,i),c.msie&&c.version<11?(t.preventDefault(),r=n.createRange(),r.selectNodeContents(l),n.selectRange(r),s=n.document.body.createTextRange(),s.moveToElementText(l),e(u).unbind("paste"),s.execCommand("Paste"),e(u).bind("paste",e.proxy(this.onpaste,this))):(a=n.createRange(),a.selectNodeContents(l),n.selectRange(a)),i.deleteContents()},function(t,n){var i,o="";t.selectRange(n),i=e(t.body).children(".k-paste-container"),i.each(function(){var e=this.lastChild;e&&d.is(e,"br")&&d.remove(e),o+=this.innerHTML}),i.remove(),this._triggerPaste(o,{clean:!0})}))},_decoreateClipboardNode:function(t,n){var i,o,r,s;(m.msie||m.webkit)&&(t=e(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),m.msie&&(i=e(n.ownerDocument.documentElement),t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"}),o=i.css("color"),o&&t.css("color",o),r=i.css("fontFamily"),r&&t.css("fontFamily",r),s=i.css("fontSize"),s&&t.css("fontSize",s)))},_moveToCaretPosition:function(t,n){var i=this,o=i.editor.body,r=d.offset(t,o),s=i._caretOffset(n,o),a=s.left-r.left,l=s.top-r.top,c="translate("+a+"px,"+l+"px)";e(t).css({"-webkit-transform":c,transform:c})},_caretOffset:function(e,t){var n,i,o,r,s,a,l=this.editor,c=d.create(l.document,"span",{innerHTML:"\ufeff"}),u=e.startContainer;return e.collapsed?(i=d.isDataNode(u),i&&(d.isBom(u)||0===e.startOffset)?d.insertBefore(c,u):i&&e.startOffset===u.length?d.insertAfter(c,u):(e.insertNode(c),n=!0)):(u=u===t?u.childNodes[e.startOffset]:u,d.insertBefore(c,u)),o=d.offset(c,t),r=c.previousSibling,s=c.nextSibling,d.remove(c),n&&d.isDataNode(r)&&d.isDataNode(s)&&!d.isBom(r)&&!d.isBom(s)&&(a=r.length,s.data=r.data+s.data,e.setStart(s,a),d.remove(r),e.collapse(!0),l.selectRange(e)),o},expandImmutablesIn:function(e){var t,n,i,r=this.editor;r&&r.options.immutables&&(t=r.body,e=e||r.getRange(),o.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===t&&0===e.startOffset&&(n=t.ownerDocument,i=n.createTextNode("\ufeff"),t.insertBefore(i,t.childNodes[0]),e.setStartBefore(i)),r.selectRange(e))},splittableParent:function(e,t){var n,i;if(e)return d.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,d.isInline(n))for(;n.parentNode!=i&&!d.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,o,r,a,l,c,u,h,f,m,g,_,b=this.editor;if(this.expandImmutablesIn(),n=v({clean:!1,split:!0},n),!n.skipCleaners)for(i=0,o=this.cleaners.length;i<o;i++)this.cleaners[i].applicable(t)&&(t=this.cleaners[i].clean(t));if(n.clean&&(t=t.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi,"$3"),t=t.replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=t.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>"),r=this.isBlock(t),b.focus(),a=b.getRange(),a.deleteContents(),a.startContainer==b.document&&a.selectNodeContents(b.body),l=new p,c=l.addCaret(a),u=this.splittableParent(r,c),h=!1,f=u!=b.body&&!d.is(u,"td"),n.split&&f&&(r||d.isInline(u))&&(a.selectNode(c),s.RangeUtils.split(a,u,!0),h=!0),m=this.htmlToFragment(t),m.firstChild&&"k-paste-container"===m.firstChild.className){for(g=[],i=0,o=m.childNodes.length;i<o;i++)g.push(m.childNodes[i].innerHTML);m=this.htmlToFragment(g.join("<br />"))}if(e(m.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),a.insertNode(m),u=this.splittableParent(r,c),h){for(;c.parentNode!=u;)d.unwrap(c.parentNode);d.unwrap(c.parentNode)}d.normalize(a.commonAncestorContainer),c.style.display="inline",d.restoreScrollTop(b.document),d.scrollTo(c),l.removeCaret(a),_=a.commonAncestorContainer.parentNode,a.collapsed&&"tbody"==d.name(_)&&(a.setStartAfter(e(_).closest("table")[0]),a.collapse(!0)),b.selectRange(a)}}),P=r.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,o=this,r=t||o.replacements;for(n=0,i=r.length;n<i;n+=2)e=e.replace(r[n],r[n+1]);return e}}),B=P.extend({init:function(e){P.fn.init.call(this,e),this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/<script[^>]*>/i.test(e)}}),L=P.extend({init:function(e){P.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)}}),H=P.extend({init:function(e){P.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,n){var i=/face=['"]([^'"]+)['"]/i,o=i.exec(n),r=n&&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 n,i=e.innerHTML,o=d.innerText(e),r=i.match(/^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=r&&r[1],a=/^[a-z\d]/i.test(s),l=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return r&&(n=!0),i=i.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),!n&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(i)||n&&/^.\u00a0+/.test(i)||s&&!a&&t?{tag:"ul",style:this._guessUnorderedListStyle(l(o))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(l(o))}:void 0},_convertToLi:function(e){var t;return 1==e.childNodes.length?t=e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(d.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&d.remove(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&d.remove(e.firstChild),t=e.innerHTML),d.remove(e),d.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 t=/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;return e=e.replace(t,function(e,t,n){return o.format('data-list="{0}" data-level="{1}" {2}',t,n,e)})},lists:function(t){var n,i,o,r,s,a,l,c,u,h,f,p,m=e(t).find(d.blockElements.join(",")),g=-1,v={},_=t;for(r=0;r<m.length;r++)s=m[r],u=e(s).data(),h=u.list,n=d.name(s),"td"!=n&&(f=this.listType(s,u),a=f&&f.tag,a&&"p"==n?(l=parseFloat(s.style.marginLeft||0),void 0===i&&(i=l),p=a+h,v[l]||(v[l]={}),c=v[l][p],(l>g||!c)&&(c=d.create(document,a,{style:{listStyleType:f.style}}),_==t||l<=g?(o&&i!==l?o.appendChild(c):d.insertBefore(c,s),v[l]={}):(o=_,_.appendChild(c)),v[l][p]=c),_=this._convertToLi(s),c.appendChild(_),g=l):s.innerHTML?(g=-1,_=t):d.remove(s))},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=d.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(t){var n=t.cells,i=e(t).closest("table"),r=i.children("colgroup");n.length<2||(r.length&&(n=r.children(),r[0].parentNode.removeChild(r[0])),r=e(e.map(n,function(e){var t=e.width;return t&&0!==parseInt(t,10)?o.format('<col style="width:{0}px;"/>',t):"<col />"}).join("")),r.is("colgroup")||(r=e("<colgroup/>").append(r)),r.prependTo(i))},convertHeaders:function(t){var n,i=t.cells,o=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==d.name(n))return n});if(o.length==i.length){for(n=0;n<o.length;n++)d.unwrap(o[n]);for(e(t).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(t),n=0;n<i.length;n++)d.changeTag(i[n],"th")}},removeParagraphs:function(t){var n,i,o,r,s;for(n=0;n<t.length;n++)for(this.removeAttributes(t[n]),r=e(t[n]),s=r.children("p"),i=0,o=s.length;i<o;i++)i<o-1&&d.insertAfter(d.create(document,"br"),s[i]),d.unwrap(s[i])},removeDefaultColors:function(e){for(var t=0;t<e.length;t++)/^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText)&&d.unwrap(e[t])},tables:function(t){var n,i,o,r,s,a=e(t).find("table"),l=this;for(r=0;r<a.length;r++){for(n=a[r].rows,o=i=n[0],s=1;s<n.length;s++)n[s].cells.length>o.cells.length&&(o=n[s]);l.createColGroup(o),l.convertHeaders(i),l.removeAttributes(a[r]),l.removeParagraphs(a.eq(r).find("td,th")),l.removeDefaultColors(a.eq(r).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;n<i.length;n++)d.changeTag(i[n],"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,n=this,i=this.options;return i.none?(e=P.fn.clean.call(n,e,this.junkReplacements),e=n.stripEmptyAnchors(e)):(e=this.extractListLevels(e),e=P.fn.clean.call(n,e),e=n.stripEmptyAnchors(e),t=d.create(document,"div",{innerHTML:e}),n.headers(t),i.msConvertLists&&n.lists(t),n.tables(t),i.msAllFormatting&&n.removeFormatting(t),e=t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),N=P.extend({init:function(e){P.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)}}),O=P.extend({clean:function(e){var t=d.create(document,"div",{innerHTML:e});return t=this.cleanDom(t),t.innerHTML},cleanDom:function(e){return e}}),V=O.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each(function(){d.unwrap(this)}),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),U=O.extend({cleanDom:function(t){var n=this.collectAttr(),i=e(t).find("["+n.join("],[")+"]");return i.removeAttr(n.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),W=function(){this.text="",this.add=function(e){this.text+=e}},j=r.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,n,i,o,r,s,a,l=this.separators,c="",d=this.lines;for(this.flashInlineBlockText(),e=0,t=d.length,n=t-1;e<t;e++){for(i=d[e],o=0,r=i.length,s=r-1;o<r;o++)a=i[o].text,c+=a,o!==s&&(c+=l.text);e!==n&&(c+=l.line)}return c},resetLine:function(){this.textContainer=new W,this.line=[],this.line.push(this.textContainer),this.lines.push(this.line)}}),q=r.extend({init:function(e){this.callback=e},enumerate:function(e){var t,n;e&&(t=this.callback(e),n=e.firstChild,!t&&n&&this.enumerate(n),this.enumerate(e.nextSibling))}}),G=P.extend({init:function(t){P.fn.init.call(this,t),this.hasText=!1,this.enumerator=new q(e.proxy(this.buildText,this))},clean:function(e){var t=d.create(document,"div",{innerHTML:e});return this.cleanDom(t)},cleanDom:function(e){return this.separators=this.getDefaultSeparators(),this.htmlLines=new j(this.separators),this.enumerator.enumerate(e.firstChild),this.hasText=!1,this.htmlLines.html()},buildText:function(e){if(d.isDataNode(e)){if(d.isEmptyspace(e))return;this.htmlLines.appendText(e.nodeValue.replace("\n",this.separators.line)),this.hasText=!0}else if(d.isBlock(e)&&this.hasText){var t=this.actions[d.name(e)]||this.actions.block;return t(this,e)}},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 n=new G({all:!0}),i=n.cleanDom(t);return e.htmlLines.appendInlineBlockText(i),!0},block:function(e){e.htmlLines.endLine()}}}),$=P.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}}),Y=w.extend({init:function(e){w.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor;o.support.browser.msie?e.document.execCommand("print",!1,null):e.window.print&&e.window.print()}}),K=w.extend({init:function(e){this.async=!0,w.fn.init.call(this,e)},exec:function(){var e=this,t=this.lockRange(!0);this.editor.saveAsPDF().then(function(){e.releaseRange(t)})}});v(s,{_finishUpdate:t,Command:w,GenericCommand:y,InsertHtmlCommand:k,InsertHtmlTool:x,TypingHandler:E,SystemHandler:R,BackspaceHandler:M,SelectAllHandler:I,Keyboard:F,Clipboard:z,Cleaner:P,ScriptCleaner:B,TabCleaner:L,MSWordFormatCleaner:H,WebkitFormatCleaner:N,HtmlTagsCleaner:V,HtmlAttrCleaner:U,HtmlContentCleaner:G,HtmlTextLines:j,CustomCleaner:$,PrintCommand:Y,ExportPdfCommand:K}),c("insertHtml",new x({template:new h({template:a.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})})),c("print",new u({command:Y,template:new h({template:a.buttonTemplate,title:"Print"})})),c("pdf",new u({command:K,template:new h({template:a.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/inlineformat.min",["editor/system.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,o=t.ui.Editor.fn.options.formats,r=i.EditorUtils,s=i.Tool,a=i.ToolTemplate,l=i.FormatTool,c=i.Dom,d=i.RangeUtils,u=e.extend,h=i.EditorUtils.registerTool,f=i.EditorUtils.registerFormat,p=function(e){e.preventDefault()},m="mousedown.kendoEditor",g="keydown.kendoEditor",v="k-marker",_=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,o=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==v?o++:3==t.nodeType?n++:i++);return o>1&&r.firstChild.className==v&&r.lastChild.className==v?0:i+n},findSuitable:function(e,t){var n,i;if(!t&&this.numberOfSiblings(e)>0)return null;for(n=e.parentNode,i=this.format[0].tags;!c.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,o,r,s=this.format,a=c.attrEquals;for(t=0,n=s.length;t<n;t++){if(i=e,o=s[t].tags,r=s[t].attr,i&&c.ofType(i,o)&&a(i,r))return i;for(;i;)if(i=c.parentOfType(i,o),i&&a(i,r))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;t<n;t++)if(this.findFormat(e[t]))return!0;return!1}}),b=n.extend({init:function(e,t){this.finder=new _(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,n=t(e);n.length>0&&this.activate(e,n)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,o,r=[],s=this.attributes,a=s?s.style||{}:{};for(t=0,n=e.length;t<n;t++){if(i=e[t],o=this.finder.findSuitable(i))c.is(o,"font")&&(a.color&&o.removeAttribute("color"),a.fontName&&o.removeAttribute("face"),a.fontSize&&o.removeAttribute("size")),c.attr(o,s);else{for(;!c.isBlock(i.parentNode)&&1==i.parentNode.childNodes.length&&"true"!==i.parentNode.contentEditable;)i=i.parentNode;o=this.wrap(i)}r.push(o)}this.consolidate(r)},remove:function(e){var t,n,i;for(t=0,n=e.length;t<n;t++)i=this.finder.findFormat(e[t]),i&&(this.attributes&&this.attributes.style?(c.unstyle(i,this.attributes.style),i.style.cssText||i.attributes["class"]||c.unwrap(i)):c.unwrap(i))},split:function(e){var t,n,i=d.textNodes(e),o=i.length;if(o>0)for(t=0;t<o;t++)n=this.finder.findFormat(i[t]),n&&d.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==v&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);c.remove(t)}}}),w=_.extend({init:function(e,t){this.format=e,this.greedyProperty=t,_.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,o,r,s,a,l,d,u,h,f,p,m=t.attributes,g=e.trim;if(m)for(n=0,i=m.length;n<i;n++)if(o=m[n],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(":"),f=g(h[0].toLowerCase()),p=g(h[1]),f!=this.greedyProperty)continue;return f.indexOf("color")>=0?c.toHex(p):p}},getFormatInner:function(t){var n,i,o,r=e(c.isDataNode(t)?t.parentNode:t),s=r.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=s.length;n<i;n++)if(o="className"==this.greedyProperty?s[n].className:this.getInlineCssValue(s[n]))return o;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;t<n;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),y=b.extend({init:function(e,n,i){b.fn.init.call(this,e,n),this.values=n,this.finder=new w(e,i),i&&(this.greedyProperty=t.toCamelCase(i))},activate:function(e,t){var n=this.greedyProperty,i="apply";this.split(e),n&&"inherit"==this.values.style[n]&&(i="remove"),this[i](t)}}),k=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new _(e.format),formatter:function(){return new b(e.format)}}))}}),x=s.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),C=x.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 w(this.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,o={};return new i.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new y(n,{style:o},t.cssAttr)}}))},initialize:function(e,n){var i,o,r,a=n.editor,l=this.options,c=l.name,d=[];l.defaultValue&&(d=[{text:a.options.messages[l.defaultValue[0].text],value:l.defaultValue[0].value}]),i=d.concat(l.items?l.items:a.options[c]||[]),e.attr({title:n.title}),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:i,change:function(){a._range=o,s.exec(a,c,this.value())},close:function(){setTimeout(function(){"_range"in a&&delete a._range},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(m,".k-select,.k-input",function(){var e=a.getRange();o=a._containsRange(e)?e:o}).on(g,function(e){e.keyCode===t.keys.ENTER&&e.preventDefault()})}}),S=s.extend({init:function(e){s.fn.init.call(this,e),this.format=[{tags:["span","font"]}],this.finder=new w(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,o={};return new i.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new y(n,{style:o},t.cssAttr)}}))},initialize:function(e,n){var i=n.editor,o=this.name,a=u({},S.fn.options,this.options),l=a.palette;e=this._widget=new t.ui.ColorPicker(e,{toolIcon:"k-icon k-i-"+r.getToolCssClass(a.name),palette:l,change:function(){var t=e.value();t&&s.exec(i,o,t),i.focus()},open:function(e){var t=e.sender;t.value(null),t._popup.element.on(m,p)},close:function(e){e.sender._popup.element.off(m)},activate:function(t){t.preventDefault(),e.trigger("change")}}),e.wrapper.attr({title:n.title,unselectable:"on"}).find("*").attr("unselectable","on")}});u(i,{InlineFormatFinder:_,InlineFormatter:b,DelayedExecutionTool:x,GreedyInlineFormatFinder:w,GreedyInlineFormatter:y,InlineFormatTool:k,FontTool:C,ColorTool:S}),f("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),h("bold",new k({key:"B",ctrl:!0,format:o.bold,template:new a({template:r.buttonTemplate,title:"Bold"})})),f("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),h("italic",new k({key:"I",ctrl:!0,format:o.italic,template:new a({template:r.buttonTemplate,title:"Italic"})})),f("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),h("underline",new k({key:"U",ctrl:!0,format:o.underline,template:new a({template:r.buttonTemplate,title:"Underline"})})),f("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),h("strikethrough",new k({format:o.strikethrough,template:new a({template:r.buttonTemplate,title:"Strikethrough"})})),f("superscript",[{tags:["sup"]}]),h("superscript",new k({format:o.superscript,template:new a({template:r.buttonTemplate,title:"Superscript"})})),f("subscript",[{tags:["sub"]}]),h("subscript",new k({format:o.subscript,template:new a({template:r.buttonTemplate,title:"Subscript"})})),h("foreColor",new S({cssAttr:"color",domAttr:"color",name:"foreColor",template:new a({template:r.colorPickerTemplate,title:"Color"})})),h("backColor",new S({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new a({template:r.colorPickerTemplate,title:"Background Color"})})),h("fontName",new C({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new a({template:r.comboBoxTemplate,title:"Font Name"})})),h("fontSize",new C({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,n){(n||t)()}),function(e,define){define("editor/formatblock.min",["editor/inlineformat.min"],e)}(function(){!function(e){var t,n=window.kendo,i=n.Class,o=e.extend,r=n.ui.editor,s=n.ui.Editor.fn.options.formats,a=r.Dom,l=r.Command,c=r.ToolTemplate,d=r.FormatTool,u=r.EditorUtils,h=u.registerTool,f=u.registerFormat,p=r.RangeUtils,m=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,o;for(n=0,i=t.length;n<i;n++)if(o=t[n],!o||!a.isAncestorOrSelf(e,o))return!1;return!0},findSuitable:function(t){var n,i,o,r,s=this.format,l=[];for(n=0,i=t.length;n<i;n++){for(r=s.length-1;r>=0&&!(o=a.ofType(t[n],s[r].tags)?t[n]:a.closestEditableOfType(t[n],s[r].tags));r--);if(!o||"true"===o.contentEditable)return[];e.inArray(o,l)<0&&l.push(o)}for(this._resolveListsItems(l),n=0,i=l.length;n<i;n++)if(this.contains(l[n],l))return[l[n]];return l},_resolveListsItems:function(e){var t,n,i;for(t=0;t<e.length;t++)n=e[t],i=a.is(n,"li")?n:a.wrapper(n),i=i&&a.list(i)?i.children[0]:i,a.is(i,"li")&&(n=e[t]=i)},findFormat:function(e){var t,n,i,o,s,l,c=this.format,d=a.editableParent(e),u=this.options&&this.options.immutables,h=r.Immutables;for(t=0,n=c.length;t<n;t++){if(i=e,o=c[t].tags,s=c[t].attr,u&&o&&"immutable"==o[0]&&(l=h.immutableParent(i),l&&a.attrEquals(l,s)))return i;for(;i&&a.isAncestorOf(d,i);){if(a.ofType(i,o)&&a.attrEquals(i,s))return i;i=i.parentNode}}return null},getFormat:function(e){var t,n,i=this,o=function(e){return i.findFormat(a.isDataNode(e)?e.parentNode:e)},r=o(e[0]);if(!r)return"";for(t=1,n=e.length;t<n;t++)if(r!=o(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;t<n;t++)if(!this.findFormat(e[t]))return!1;return!0}}),g=i.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new m(e)},wrap:function(e,t,n){var i,o,r,s,l,c=1==n.length?a.blockParentOrBody(n[0]):a.commonAncestor.apply(null,n);for(a.isInline(c)&&(c=a.blockParentOrBody(c)),i=a.significantChildNodes(c),o=a.findNodeIndex(i[0]),r=a.create(c.ownerDocument,e,t),s=0;s<i.length;s++)l=i[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 n(e){return o({},e&&e.attr,p)}var i,r,s,l,c,d,h,f,p=this.values;if(this._handleImmutables(t,!0),r=a.filter("img",t),s=u.formatByName("img",this.format),l=n(s),e.each(r,function(){a.attr(this,l)}),r.length!=t.length)if(c=a.filter("img",t,!0),d=this.finder.findSuitable(c),d.length)for(h=0,f=d.length;h<f;h++)i=u.formatByName(a.name(d[h]),this.format),a.attr(d[h],n(i));else i=this.format[0],this.wrap(i.tags[0],n(i),c)},_handleImmutables:function(e,t){var n,i,o,s,l;if(this.immutables()&&(n=u.formatByName("immutable",this.format)))for(i=r.Immutables,o=e.length-1,s=o;s>=0;s--)l=i.immutableParent(e[s]),l&&(l!==e[s+1]&&(t?a.attr(l,n.attr):a.unstyle(l,n.attr.style)),e.splice(s,1))},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,n,i,o,r;for(this._handleImmutables(e,!1),t=0,n=e.length;t<n;t++)i=this.finder.findFormat(e[t]),i&&(r=a.name(i),"div"!=r||i.getAttribute("class")?(o=u.formatByName(r,this.format),o.attr.style&&a.unstyle(i,o.attr.style),o.attr.className&&a.removeClass(i,o.attr.className)):a.unwrap(i))},toggle:function(e){var t=this,n=a.filterBy(p.nodes(e),a.htmlIndentSpace,!0);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),v=i.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new m(e)},apply:function(e){var t,n,i,o,s,l,c,d,u,h,f=this.format,p=a.blockParents(e),m=f[0].tags[0];if(p.length)for(t=0,n=p.length;t<n;t++)d=p[t],u=this.immutables()&&r.Immutables.immutableParent(d),u||(c=a.name(d),"li"==c?(i=d.parentNode,o=new r.ListFormatter(i.nodeName.toLowerCase(),m),s=this.editor.createRange(),s.selectNode(p[t]),o.toggle(s)):m&&("td"==c||d.attributes.contentEditable)?new g(f,this.values).apply(d.childNodes):(l=a.changeTag(d,m),a.attr(l,f[0].attr)));else h=new g(f,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}}),_=l.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&u.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),l.fn.init.call(this,e)}}),b=d.extend({init:function(e){d.fn.init.call(this,o(e,{finder:new m(e.format),formatter:function(){return new g(e.format)}}))}});o(r,{BlockFormatFinder:m,BlockFormatter:g,GreedyBlockFormatter:v,FormatCommand:_,BlockFormatTool:b}),t=["ul","ol","li"],f("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:""}}}]),h("justifyLeft",new b({format:s.justifyLeft,template:new c({template:u.buttonTemplate,title:"Justify Left"})})),f("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"}}}]),h("justifyCenter",new b({format:s.justifyCenter,template:new c({template:u.buttonTemplate,title:"Justify Center"})})),f("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"}}}]),h("justifyRight",new b({format:s.justifyRight,template:new c({template:u.buttonTemplate,title:"Justify Right"})})),f("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:""}}}]),h("justifyFull",new b({format:s.justifyFull,template:new c({template:u.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/linebreak.min",["editor/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Dom,r=i.Command,s=i.Tool,a=i.BlockFormatter,l=o.normalize,c=i.RangeUtils,d=i.EditorUtils.registerTool,u=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=o.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){if(o.isEmpty(t))e.setStartBefore(t);else{e.selectNodeContents(t);var n=c.textNodes(e)[0];if(!n){for(;t.childNodes.length&&!o.is(t.firstChild,"br");)t=t.firstChild;n=t}o.isEmpty(n)?e.setStartBefore(n):(o.emptyNode(n)&&(n.innerHTML="\ufeff"),e.setStartBefore(n.firstChild||n))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=o.parentOfType(e.startContainer,t),i=o.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(o.isMarker(e)||""===o.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,r,s,d,u,h,f,p,m,g,v,_,b=this.getRange(),w=c.documentFromRange(b),y=i.emptyElementContent;this.expandImmutablesIn(b),p=this.shouldTrim(b),b.deleteContents(),d=this._insertMarker(w,b),o.stripBomNode(d.previousSibling),o.stripBomNode(d.nextSibling),u=o.closestEditableOfType(d,["li"]),h=o.closestEditableOfType(d,"h1,h2,h3,h4,h5,h6".split(",")),u?o.emptyNode(u)&&(s=o.create(w,"p"),o.next(u)&&(f=b.cloneRange(),f.selectNode(u),c.split(f,u.parentNode)),m=e("br",u),1==m.length&&m.remove(),g=u.parentNode,v=u.parentNode.children.length,_=v>1&&1==u.childNodes.length&&u.children[0],o.insertAfter(s,g),o.remove(1==v?u.parentNode:u),_&&_!==d?(s.appendChild(_),s.appendChild(d)):s.innerHTML=y,r=s):h&&this._blankAfter(d)&&(s=o.create(w,"p"),o.insertAfter(s,h),s.innerHTML=y,o.remove(d),r=s),r||(u||h||new a([{tags:["p"]}]).apply([d]),b.selectNode(d),t=o.parentOfType(d,[u?"li":h?o.name(h):"p"]),c.split(b,t,p),n=t.previousSibling,o.is(n,"li")&&n.firstChild&&!o.is(n.firstChild,"br")&&(n=n.firstChild),r=t.nextSibling,this.clean(n),this.clean(r,{links:!0}),o.is(r,"li")&&r.firstChild&&!o.is(r.firstChild,"br")&&(r=r.firstChild),o.remove(t),l(n)),l(r),this._moveFocus(b,r),b.collapse(!0),o.scrollTo(r),c.selectRange(b)},clean:function(t,n){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=i.emptyElementContent),n&&n.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,n,i,r,s=this.getRange();this.expandImmutablesIn(s),e=o.create(c.documentFromRange(s),"br"),i=t.support.browser,r=i.msie&&i.version<11,s.deleteContents(),s.insertNode(e),l(e.parentNode),r||e.nextSibling&&!o.isWhitespace(e.nextSibling)||(n=e.cloneNode(!0),n.className="k-br",o.insertAfter(n,e)),s.setStartAfter(e),s.collapse(!0),o.scrollTo(e.nextSibling||e),c.selectRange(s)}});n(i,{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,n){(n||t)()}),function(e,define){define("editor/lists.min",["editor/linebreak.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=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,f=o.EditorUtils.registerTool,p=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,n,i=[];for(n=0;n<e.length;n++)t=this.findFormat(e[n]),t&&r.name(t)==this.tag&&i.push(t);if(i.length<1)return!1;if(i.length!=e.length)return!1;for(n=0;n<i.length&&i[n].parentNode==t.parentNode;n++)if(i[n]!=t)return!1;return!0},findSuitable:function(e){var t=this.findFormat(e[0]);return t&&r.name(t)==this.tag?t:null}}),m=n.extend({init:function(e,t){var n=this;n.finder=new p(e),n.tag=e,n.unwrapTag=t},isList:function(e){return r.list(e)},immutables:function(){return this.editor&&!!this.editor.options.immutables},wrap:function(t,n){var i,s,a=r.create(t.ownerDocument,"li"),l=this.immutables()?o.Immutables.immutable:e.noop;for(i=0;i<n.length;i++)if(s=n[i],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 n=0;n<t.length;n++)if(r.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&r.isBlock(n))return!1;if(n=e.previousSibling,n&&r.isBlock(n))return!1}return this.containsAny(e,t)||r.isInline(e)||3==e.nodeType},_parentLists:function(t){var n=r.closestEditable(t);return e(t).parentsUntil(n,"ul,ol")},split:function(e){var t,n,i,o,a,l,c=h(e);if(c.length)for(t=r.parentOfType(c[0],["li"]),n=r.parentOfType(c[c.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(n),o=0,a=c.length;o<a;o++)l=this.finder.findFormat(c[o]),l&&(i=this._parentLists(l),i.length?s.split(e,i.last()[0],!0):s.split(e,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.previousSibling;if(i&&r.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);r.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.nextSibling;if(n&&r.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.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,n){function i(){u.push(this)}var o,s,a,l,c=this.tag,d=r.closestSplittableParent(n),u=[],h=this.finder.findSuitable(n);for(h||(h=new p("ul"==c?"ol":"ul").findSuitable(n)),/table|tbody/.test(r.name(d))?o=e.map(n,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,n)},this))),o.length||(o=n)),s=0;s<o.length;s++)a=o[s],l=(!h||!r.isAncestorOrSelf(h,a))&&this.suitable(a,n),l&&(h&&this.isList(a)?(e.each(a.children,i),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 n(){i&&d.push({section:i,nodes:s})}var i,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"]),i&&a==i?s.push(l):(n(),s=[l],i=a);for(n(),c=0;c<d.length;c++)this.applyOnSection(d[c].section,d[c].nodes)},unwrap:function(e){var t,n,i,o,s=e.ownerDocument.createDocumentFragment(),a=this.unwrapTag;for(n=e.firstChild;n;n=n.nextSibling){for(i=r.create(e.ownerDocument,a||"p");n.firstChild;)o=n.firstChild,r.isBlock(o)?(i.firstChild&&(s.appendChild(i),i=r.create(e.ownerDocument,a||"p")),s.appendChild(o)):i.appendChild(o);i.firstChild&&s.appendChild(i)}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,n,i;for(n=0,i=e.length;n<i;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=h(e),o=e.commonAncestorContainer;i.length||(e.selectNodeContents(o),i=h(e),i.length||(t=o.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),i=[t],e.selectNode(t.parentNode))),i=r.filterBy(i,r.htmlIndentSpace,!0),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),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,i(e,{finder:new p(e.tag)}))},command:function(e){return new g(i(e,{tag:this.options.tag}))}});i(o,{ListFormatFinder:p,ListFormatter:m,ListCommand:g,ListTool:v}),f("insertUnorderedList",new v({tag:"ul",template:new c({template:a.buttonTemplate,title:"Insert unordered list"})})),f("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,n){(n||t)()}),function(e,define){define("editor/link.min",["editor/lists.min"],e)}(function(){!function(e,t){function n(e,t){for(var n=e.length;n--&&!t.test(e[n]););return n}function i(e,t){var n=t.exec(e);return n?n.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,f=l.Tool,p=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 n,i,o,r,s,a,l,u=this.immutables?_(e):v(e);if(t.innerHTML){for(i=d.documentFromRange(e),n=d.getMarkers(e),e.deleteContents(),r=c.create(i,"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<n.length;l++)c.insertAfter(n[l],a),a=n[l];n.length&&(c.insertBefore(i.createTextNode("\ufeff"),n[1]),c.insertAfter(i.createTextNode("\ufeff"),n[1]),e.setStartBefore(n[0]),e.setEndAfter(n[n.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 n=t.immutables()?_(e):v(e);new m([{tags:["a"]}]).remove(n)}},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,innerHTML: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 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>")({messages:this.editor.options.messages})},exec:function(){var t,n,i,o,r=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables(),t=v(this._range),n=t.length?this.formatter.finder.findSuitable(t[0]):null,i=t.length&&"img"==c.name(t[0]),o=this.createDialog(this._dialogTemplate(),{title:r.createLink,close:a(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),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(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n?n.title:"").end().find("#k-editor-link-target").attr("checked",!!n&&"_blank"==n.target).end().find(".k-editor-link-text-row").toggle(!i),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 n,i,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},n=e("#k-editor-link-title",r).val(),n&&(this.attributes.title=n),a.is(":visible")&&(i=a.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerHTML=c.stripBom(i)):this.attributes.innerHTML=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,n="";for(t=0;t<e.length;t++)n+=e[t].nodeValue;return c.stripBom(n||"")},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,n,i=this.detectLink();i&&(e=this.getRange(),t=new o.ui.editor.Marker,n=e.cloneRange(),n.setStart(i.start.node,i.start.offset),n.setEnd(i.end.node,i.end.offset),e=this.lockRange(),t.add(n),this.formatter.apply(n,{href:this._ensureWebProtocol(i.text)}),t.remove(n),this.releaseRange(e))},detectLink:function(){var e=this.getRange(),t=new F({node:e.startContainer,offset:e.startOffset,cancelAtNode:function(e){return e&&"a"===c.name(e)}}),n=new M(t);return n.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=f.extend({init:function(t){this.options=t,this.finder=new g([{tags:["a"]}]),f.fn.init.call(this,e.extend(t,{command:T}))},initialize:function(e,t){f.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")}}),M=r.extend({init:function(e){this.traverser=e,this.start=R(),this.end=R(),this.text=""},detectLink:function(){var t,n,i,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&&(n=c.closestEditableOfType(r,c.blockElements),n&&n.previousSibling&&this.traverser.init({node:n.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()||(i=this.traverser.extendOptions(this.start),o=new z(i),o.traverse(e.proxy(this._skipStartPuntuation,this)),this._isLinkDetected()||(this.start=R()))),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 i=n(e,x);if(i>-1)return this.end.node=t,this.end.offset=i+1,!1},_detectStart:function(e,t){var i=n(e,/\s/),o=i+1;if(this.text=e.substring(o)+this.text,this.start.node=t,this.start.offset=o,i>-1)return!1},_skipStartPuntuation:function(e,t,n){var o=i(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|n),o>-1)return!1}}),R=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},I=r.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?c.isDataNode(this.node)&&this.node.length||0:n.offset,this.cancelAtNode=n.cancelAtNode||this.cancelAtNode||e.noop},traverse:function(e){e&&(this.cancel=!1,this._traverse(e,this.node,this.offset))},_traverse:function(e,n,i){var o,r,s,a;if(n&&!this.cancel){if(3!==n.nodeType)return r=this.edgeNode(n),this.cancel=this.cancel||this.cancelAtNode(r),this._traverse(e,r);if(o=n.data,i!==t&&(o=this.subText(o,i)),this.cancel=e(o,n,i)===!1,s=this.next(n),!s)for(a=n.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=I.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)}}),z=I.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 z(t)}});s(o.ui.editor,{LinkFormatFinder:C,LinkFormatter:S,UnlinkCommand:T,LinkCommand:D,AutoLinkCommand:A,UnlinkTool:E,DomTextLinkDetection:M,LeftDomTextTraverser:F,RightDomTextTraverser:z}),b("createLink",new f({key:"K",ctrl:!0,command:D,template:new p({template:u.buttonTemplate,title:"Create Link"})})),b("unlink",new E({key:"K",ctrl:!0,shift:!0,template:new p({template:u.buttonTemplate,title:"Remove Link"})})),b("autoLink",new f({key:[w.ENTER,w.SPACEBAR],keyPressCommand:!0,command:A}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/file.min",["kendo.filebrowser.min","editor/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.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,f=n.keys,p="#k-editor-file-url",m="#k-editor-file-title",g=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 n=this.attributes,i=c.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=s.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;s.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog k-popup-edit-form k-edit-form-container"># 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-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 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>')({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,n=t.find(p).val().replace(/ /g,"%20"),i=t.find(m).val();l.attributes={href:n,innerHTML:""!==i?i:n},g=l.insertFile(v,d),o(e),l.change&&l.change()}function o(e){e.preventDefault(),a.destroy(),s.windowFromDocument(c.documentFromRange(d)).focus(),g||l.releaseRange(d)}function r(t){t.keyCode==f.ENTER?e(t):t.keyCode==f.ESC&&o(t)}var a,l=this,d=l.lockRange(),u=h(d),g=!1,v=u.length?this.formatter.finder.findSuitable(u[0]):null,_=l.editor.options,b=_.messages,w=_.fileBrowser,y=!!(n.ui.FileBrowser&&w&&w.transport&&w.transport.read!==t),k={title:b.insertFile,visible:!1,resizable:y};this.expandImmutablesIn(d),k.close=o,y&&(k.width=750),a=this.createDialog(l._dialogTemplate(y),k).toggleClass("k-filebrowser-dialog",y).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(p).val(v?v.getAttribute("href",2):"http://").end().find(m).val(v?v.title:"").end().data("kendoWindow"),y&&(l._fileBrowser=new n.ui.FileBrowser(a.element.find(".k-filebrowser"),i({},w)),l._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&a.element.find(p).val(this.value())}),l._fileBrowser.bind("apply",e)),a.center().open(),a.element.find(p).focus().select()}});n.ui.editor.FileCommand=g,a("insertFile",new o.Tool({command:g,template:new l({template:r.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/image.min",["kendo.imagebrowser.min","editor/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,s=o.Dom,a=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,d=o.Command,u=n.keys,h="#k-editor-image-url",f="#k-editor-image-title",p="#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 n,i=this.attributes,o=c.documentFromRange(t);if(i.src&&"http://"!=i.src){if(n=function(){setTimeout(function(){i.width||e.removeAttribute("width"),i.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=s.create(o,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(o.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;e.onload=e.onerror=n,s.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog k-popup-edit-form k-edit-form-container"># 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 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>')({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,n=parseInt(t.find(p).val(),10),i=parseInt(t.find(m).val(),10);l.attributes={src:t.find(h).val().replace(/ /g,"%20"),alt:t.find(f).val()},l.attributes.width=null,l.attributes.height=null,!isNaN(n)&&n>0&&(l.attributes.width=n),!isNaN(i)&&i>0&&(l.attributes.height=i),g=l.insertImage(v,d),o(e),l.change&&l.change()}function o(e){e.preventDefault(),a.destroy(),s.windowFromDocument(c.documentFromRange(d)).focus(),g||l.releaseRange(d)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&o(t)}var a,l=this,d=l.lockRange(),g=!1,v=c.image(d),_=v&&v.getAttribute("width")||"",b=v&&v.getAttribute("height")||"",w=l.editor.options,y=w.messages,k=w.imageBrowser,x=!!(n.ui.ImageBrowser&&k&&k.transport&&k.transport.read!==t),C={title:y.insertImage,visible:!1,resizable:x};this.expandImmutablesIn(d),C.close=o,x&&(C.width=750),a=this.createDialog(l._dialogTemplate(x),C).toggleClass("k-filebrowser-dialog",x).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(v?v.getAttribute("src",2):"http://").end().find(f).val(v?v.alt:"").end().find(p).val(_).end().find(m).val(b).end().data("kendoWindow"),x&&(this._imageBrowser=new n.ui.ImageBrowser(a.element.find(".k-imagebrowser"),i({},k)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&a.element.find(h).val(this.value())}),this._imageBrowser.bind("apply",e)),a.center().open(),a.element.find(h).focus().select()}});n.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,n){(n||t)()}),function(e,define){define("editor/components.min",["editor/image.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.DropDownList,o=n.ui.editor.Dom,r=i.extend({init:function(t,o){var r=this;i.fn.init.call(r,t,o),n.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",e.proxy(this._initSelectOverlay,this))),r.text(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?e+=20:e=r._listWidth,t.css("width",e+n.support.scrollbar()),r._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,i,o,r,s=this,a=s.value(),l=this.dataSource.view(),c="",d=n.htmlEncode;for(i=0;i<l.length;i++)t=l[i],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 n=this,o=i.fn.value.call(n,e);return e===t?o:(i.fn.value.call(n)||n.text(n.options.title),t)},decorate:function(t){var n,i,r,s,a=this,l=a.dataSource,c=l.data();for(t&&a.list.css("background-color",o.getEffectiveBackground(e(t))),n=0;n<c.length;n++)i=c[n].tag||"span",r=c[n].className,s=o.inlineStyle(t,i,{className:r}),s=s.replace(/"/g,"'"),c[n].style=s+";display:inline-block";l.trigger("change")}});n.ui.plugin(r),n.ui.editor.SelectBox=r}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/indent.min",["editor/components.min"],e)}(function(){!function(e,t){function n(n,i){var o="rtl"==e(n).css("direction"),r=o?"Right":"Left",s="td"!=a.name(n)?"margin"+r:"padding"+r;return i===t?n.style[s]||0:(i>0?n.style[s]=i+"px":(n.style[s]="",n.style.cssText||n.removeAttribute("style")),t)}var i=window.kendo,o=i.Class,r=e.extend,s=i.ui.editor,a=s.Dom,l=s.EditorUtils,c=l.registerTool,d=s.Command,u=s.Tool,h=s.ToolTemplate,f=s.RangeUtils,p=a.blockElements,m=s.BlockFormatFinder,g=s.BlockFormatter,v=o.extend({init:function(){this.finder=new m([{tags:a.blockElements}])},apply:function(t){var i,o,r,s,l,c,d,u,h,f,p,m;if(t=a.filterBy(t,a.htmlIndentSpace,!0),i=this.finder.findSuitable(t),o=[],i=this.mapImmutables(i),i.length){for(r=0,s=i.length;r<s;r++)a.is(i[r],"li")?e(i[r]).index()?e.inArray(i[r].parentNode,o)<0&&o.push(i[r]):o.push(i[r].parentNode):o.push(i[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(f=parseInt(n(l),10)+30,n(l,f),p=0;p<o.length;p++)e.contains(l,o[p])&&o.splice(p,1)}else m=new g([{tags:["p"]}],{style:{marginLeft:30}}),m.apply(t)},mapImmutables:function(t){if(this.immutables){var n=[];return e.map(t,function(t){var i=s.Immutables.immutableParent(t);if(i){if(e.inArray(i,n)!==-1)return null;n.push(i)}return i||t})}return t},remove:function(t){t=a.filterBy(t,a.htmlIndentSpace,!0);var i,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")&&!n(s[0])){if(i&&e.contains(i,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(i==s[0])continue;i=s[0]}else i=h[o];u=parseInt(n(i),10)-30,n(i,u)}}}),_=d.extend({init:function(t){var n=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.apply(f.nodes(e))},n)},d.fn.init.call(this,t)}}),b=d.extend({init:function(t){var n=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.remove(f.nodes(e))},n)},d.fn.init.call(this,t)}}),w=u.extend({init:function(e){u.fn.init.call(this,e),this.finder=new m([{tags:p}])},initialize:function(t,n){u.fn.initialize.call(this,t,n),e.extend(this.options,{immutables:n.editor&&n.editor.options.immutables}),t.addClass("k-state-disabled")},update:function(i,o){var r,l,c,d,u,h,f=this.finder.findSuitable(o);for(c=0,d=f.length;c<d;c++)if(u=f[c],this.options.immutables&&(h=s.Immutables.immutableParent(u),h&&(u=h)),r=n(u),r||(l=e(u).parents("ul,ol").length,r=a.is(u,"li")&&(l>1||n(u.parentNode))||a.ofType(u,["ul","ol"])&&l>0),r)return i.removeClass("k-state-disabled"),t;i.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,n){(n||t)()}),function(e,define){define("editor/viewhtml.min",["editor/indent.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,s=o.Command,a=o.Tool,l=o.ToolTemplate,c=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 i(e){l.deserialization.immutables=a.immutables,a.value(u.find(h).val()),l.deserialization.immutables=t,o(e),s.change&&s.change(),a.trigger("change")}function o(e){e.preventDefault(),u.data("kendoWindow").destroy(),a.immutables&&(a.immutables.serializedImmutables={}),a.focus()}var r,s=this,a=s.editor,l=a.options,d=a.options.messages,u=e(n.template(c.template)(d)).appendTo(document.body),h=".k-editor-textarea";l.serialization.immutables=a.immutables,r=c.indent(a.value()),l.serialization.immutables=t,this.createDialog(u,{title:d.viewHtml,close:o,visible:!1}).find(h).val(r).end().find(".k-dialog-update").click(i).end().find(".k-dialog-close").click(o).end().data("kendoWindow").center().open(),u.find(h).focus()}});i(c,{template:"<div class='k-editor-dialog k-popup-edit-form k-edit-form-container k-viewhtml-dialog'><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>",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$/,"")}}),n.ui.editor.ViewHtmlCommand=c,o.EditorUtils.registerTool("viewHtml",new a({command:c,template:new l({template:r.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/formatting.min",["editor/viewhtml.min"],e)}(function(){!function(e){function t(e){var t,o,r=l.closestEditableOfType(e,["li"]);r&&(t=new i.ListFormatter(l.name(r.parentNode)),o=n.ui.editor.W3CRange.fromNode(e),o.selectNode(r),t.toggle(o))}var n=window.kendo,i=n.ui.editor,o=i.Tool,r=i.ToolTemplate,s=i.DelayedExecutionTool,a=i.Command,l=i.Dom,c=i.EditorUtils,d=i.RangeUtils,u=c.registerTool,h=s.extend({init:function(e){var t=this;o.fn.init.call(t,n.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,n=e.value;return n?e.tag||e.className?e:(t=n.indexOf("."),0===t?e.className=n.substring(1):t==-1?e.tag=n:(e.tag=n.substring(0,t),e.className=n.substring(t+1)),e):e},command:function(t){var n=this,o=t.value;return o=this.toFormattingItem(o),new i.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 i.GreedyInlineFormatter(s):new i.GreedyBlockFormatter(s),t.editor=n.editor,t}})},initialize:function(e,t){var i=t.editor,r=this.options,s=r.name,a=this;a.editor=i,e.width(r.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:r.items||i.options[s],title:i.options.messages[s],autoSize:!0,change:function(){var e=this.dataItem();e&&o.exec(i,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:n.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,n){var i,o,r,s,a,l,c;for(i=0;i<t.length;i++)if(o=t[i],r=o.tag||o.context||"",s=o.className?"."+o.className:"",a=r+s,l=e(n[0]).closest(a)[0]){if(1==n.length)return o.value;for(c=1;c<n.length&&e(n[c]).closest(a)[0];c++)if(c==n.length-1)return o.value}return""},update:function(t,n){var i,o,r,a,c,d=e(t).data(this.type);if(d&&(i=d.dataSource,o=i.data(),c=l.commonAncestor.apply(null,n),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;i.filter([{field:"visible",operator:"eq",value:!0}]),s.fn.update.call(this,t,n),d.value(this.getFormattingValue(i.view(),n)),d.wrapper.toggleClass("k-state-disabled",!i.view().length)}},destroy:function(){this._ancestor=null}}),f=a.extend({exec:function(){var e,t,n,i=this.lockRange(!0);for(this.tagsToClean=this.options.remove||"strong,em,span,sup,sub,del,b,i,u,font".split(","),d.wrapSelectedElements(i),e=d.mapAll(i,function(e){return e}),t=e.length-1;t>=0;t--)n=e[t],this.immutableParent(n)||this.clean(n);this.releaseRange(i)},clean:function(n){var o,r,s,a,c;if(n&&!l.isMarker(n)){if(o=l.name(n),"ul"==o||"ol"==o)for(r=new i.ListFormatter(o),s=n.previousSibling,a=n.nextSibling,r.unwrap(n);s&&s!=a;s=s.nextSibling)this.clean(s);else if("blockquote"==o)l.changeTag(n,"p");else if(1!=n.nodeType||l.insignificant(n))t(n);else{for(c=n.childNodes.length-1;c>=0;c--)this.clean(n.childNodes[c]);n.removeAttribute("style"),n.removeAttribute("class")}e.inArray(o,this.tagsToClean)>-1&&l.unwrap(n)}},immutableParent:function(e){return this.immutables()&&i.Immutables.immutableParent(e)}});e.extend(i,{FormattingTool:h,CleanFormatCommand:f}),u("formatting",new h({template:new r({template:c.dropDownListTemplate,title:"Format"})})),u("cleanFormatting",new o({command:f,template:new r({template:c.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/toolbar.min",["editor/formatting.min"],e)}(function(){!function(e,t){var n,i=window.kendo,o=i.ui,r=o.editor,s=o.Widget,a=e.extend,l=e.proxy,c=i.keys,d=".kendoEditor",u=i.ui.editor.EditorUtils,h=i.ui.editor.ToolTemplate,f=i.ui.editor.Tool,p=i._outerWidth,m=i._outerHeight,g="overflowAnchor",v=".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor,.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=f.extend({initialize:function(t,n){t.attr({unselectable:"on"});var i=n.editor.toolbar;t.on("click",e.proxy(function(){this.overflowPopup.toggle()},i))},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})})),n=s.extend({init:function(e,t){var n=this;t=a({},t,{name:"EditorToolbar"}),s.fn.init.call(n,e,t),t.popup&&n._initPopup(),t.resizable&&t.resizable.toolbar&&(n._resizeHandler=i.onResize(function(){n.resize()}),n.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-button-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(n){e(n.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 n=this,i="<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>";n.overflowPopup=e(i).appendTo("body").kendoPopup({anchor:t,origin:"bottom right",position:"top right",copyAnchorStyles:!1,open:function(e){this.element.is(":empty")&&e.preventDefault(),n._toggleOverflowStyles(this.element,!0)},activate:l(n.focusOverflowPopup,n)}).data("kendoPopup")},items:function(){var e,t,n=this.options.resizable&&this.options.resizable.toolbar;return t=this.element.children().find("> *, select"),n&&(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,n=this.tools;for(t in n)if(t.toLowerCase()==e)return n[t]},toolGroupFor:function(t){var n,i=this.groups;if(this.isCustomTool(t))return"custom";for(n in i)if(e.inArray(t,i[n])>=0)return n},bindTo:function(t){var n=this,i=n.window;n._editor&&n._editor.unbind("select",l(n.resize,n)),n._editor=t,n.options.resizable&&n.options.resizable.toolbar&&t.options.tools.push(g),n.tools=n.expandTools(t.options.tools),n.render(),n.element.find(".k-combobox .k-input").keydown(function(t){var n=e(this).closest(".k-combobox").data("kendoComboBox"),i=t.keyCode;i==c.RIGHT||i==c.LEFT?n.close():i==c.DOWN&&(n.dropDown.isOpened()||(t.stopImmediatePropagation(),n.open()))}),n._attachEvents(),n.items().each(function(){var i,o=n._toolName(this),r="moreVertical"!==o?n.tools[o]:n.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||(i=a[o+"Inherit"],c.find("input").val(i).end().find("span.k-input").text(i).end()),r.initialize(c,{title:n._appendShortcutSequence(l,r),editor:n._editor}),c.closest(".k-widget",n.element).addClass("k-editor-widget"),c.closest(".k-colorpicker",n.element).next(".k-colorpicker").addClass("k-editor-widget"))}),t.bind("select",l(n.resize,n)),n.update(),i&&i.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,n,o=this,r=o.window,s=o.options.editor,a=i.support.browser;r&&(e=r.wrapper,t=s.element,e.is(":visible")&&o.window.options.visible||(e[0].style.width||e.width(p(t)-parseInt(e.css("border-left-width"),10)-parseInt(e.css("border-right-width"),10)),r._moved||(n=t.offset(),e.css({top:Math.max(0,parseInt(n.top,10)-m(e)-parseInt(o.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(n.left,10))})),(a.msie||a.edge)&&o._overlaps(t)?setTimeout(function(){r.open()},0):r.open()))},_overlaps:function(e){var t=this.window.wrapper,n=t.offset(),i=n.left,o=n.top,r=e.offset(),s=r.left,a=r.top;return!(s+e.width()<i||s>i+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,n=this._editor.element.attr(e);t.attr(e,n||0).focus().find(v).first().focus(),n||0===n||t.removeAttr(e)},focusOverflowPopup:function(){var e="tabIndex",t=this.overflowPopup.element,n=this._editor.element.attr(e);t.closest(".k-animation-container").addClass("k-overflow-wrapper"),t.attr(e,n||0).find(v).first().focus(),n||0===n||t.removeAttr(e)},_appendShortcutSequence:function(e,t){if(!t.key)return e;var n=e+" (";return t.ctrl&&(n+="Ctrl + "),t.shift&&(n+="Shift + "),t.alt&&(n+="Alt + "),n+=t.key+")"},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","autoLink"],tools:{},isCustomTool:function(e){return!(e in i.ui.Editor.defaultTools)},expandTools:function(t){var n,o,s,l,c=this._nativeTools,d=i.deepExtend({},i.ui.Editor.defaultTools),u={};for(o=0;o<t.length;o++)n=t[o],l=n.name,e.isPlainObject(n)?l&&d[l]?(u[l]=a({},d[l]),a(u[l].options,n)):(s=a({cssClass:"k-i-gear",type:"button",title:""},n),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[n]&&(u[n]=d[n]);for(o=0;o<c.length;o++)u[c[o]]||(u[c[o]]=d[c[o]]);return u},render:function(){function t(t){var n;return t.getHtml?n=t.getHtml():(e.isFunction(t)||(t=i.template(t)),
n=t(r)),e.trim(n)}function n(){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,f,p=this,m=p.tools,v=p._editor.element,_=p.element.empty(),b=p._editor.options.tools,w=i.support.browser,y=0,k=p.options.resizable&&p.options.resizable.toolbar,x=this.overflowFlaseTools;for(_.empty(),b.length&&(c=b[0].name||b[0]),o(c,x),f=0;f<b.length;f++)c=b[f].name||b[f],r=m[c]&&m[c].options,!r&&e.isPlainObject(c)&&(r=c),s=r&&r.template,"break"==c&&(n(),e("<li class='k-row-break' />").appendTo(p.element),o(c,x)),s&&(u=p.toolGroupFor(c),d==u&&c!=g||(n(),o(c,x),d=u),s=t(s),a=e(s).appendTo(h),"custom"==u&&(n(),o(c,x)),r.exec&&a.hasClass("k-tool")&&a.click(l(r.exec,v[0])));n(),e(p.element).children(":has(> .k-tool)").addClass("k-button-group"),p.options.popup&&w.msie&&w.version<9&&p.window.wrapper.find("*").attr("unselectable","on"),p.updateGroups(),k&&p._initOverflowPopup(p.element.find(".k-overflow-anchor")),p.angular("compile",function(){return{elements:p.element}})},updateGroups:function(){e(this.element).children().each(function(){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()})},decorateFrom:function(t){this.items().filter(".k-decorated").each(function(){var n=e(this).data("kendoSelectBox");n&&n.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&&i.unbindResize(this._resizeHandler),this.overflowPopup&&this.overflowPopup.destroy()},_attachEvents:function(){var t=this,n=t.overflowPopup?t.overflowPopup.element:e([]);t.attachToolsEvents(t.element.add(n))},attachToolsEvents:function(t){var n=this,i="[role=button].k-tool",o=i+":not(.k-state-disabled)",r=i+".k-state-disabled",s=".k-dropdown",a=".k-colorpicker",l=[i,s,a].join(",");t.off(d).on("mouseenter"+d,o,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+d,o,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+d,l,function(e){e.preventDefault()}).on("keydown"+d,v,function(t){function i(e,t,n){var i=t.find(v),o=i.index(s)+e;return n&&(o=Math.max(0,Math.min(i.length-1,o))),i[o]}var o,r,s=this,a=n.options.resizable&&n.options.resizable.toolbar,l=t.keyCode;l==c.RIGHT||l==c.LEFT?e(s).hasClass(".k-dropdown")||(o=i(l==c.RIGHT?1:-1,n.element,!0)):!a||l!=c.UP&&l!=c.DOWN?l==c.ESC?(n.overflowPopup&&n.overflowPopup.visible()&&n.overflowPopup.close(),o=n._editor):l!=c.TAB||t.ctrlKey||t.altKey||(r=a&&e(s.parentElement).hasClass("k-overflow-tool-group")?n.overflowPopup.element:n.element,t.shiftKey?o=i(-1,r):(o=i(1,r),o||(o=n._editor))):o=i(l==c.DOWN?1:-1,n.overflowPopup.element,!0),o&&(t.preventDefault(),o.focus()),l===c.ENTER&&e(s).is("a")&&!e(s).attr("href")&&n._executeToolCommand(s,t)}).on("click"+d,o,function(e){n._executeToolCommand(this,e)}).on("click"+d,r,function(e){e.preventDefault()})},_executeToolCommand:function(t,n){var i=this,o=e(t);n.preventDefault(),n.stopPropagation(),o.removeClass("k-state-hover"),o.is("[data-popup]")||i._editor.exec(i._toolName(t))},_toolName:function(t){var n,o,r;if(t)return n=t.className,/k-tool\b/i.test(n)&&(n=t.firstChild.className),o=e.grep(n.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?i.toCamelCase(r.substring(r.indexOf("k-i-")+4)):r.substring(r.lastIndexOf("-")+1)):"custom"},refreshTools:function(){var t=this,n=i.ui.editor,o=t._editor,r=o.getRange(),s=n.RangeUtils.textNodes(r),a=o.options.immutables,l=t._immutablesContext(r);s=n.Dom.filterBy(s,n.Dom.htmlIndentSpace,!0),s.length||(s=[r.startContainer]),t.items().each(function(){var n,i=t.tools[t._toolName(this)];i&&(n=e(this),i.update&&i.update(n,s),a&&t._updateImmutablesState(i,n,l))}),this.update()},_immutablesContext:function(e){if(this._editor.options.immutables){var t=i.ui.editor;return e.collapsed?t.Immutables.immutablesContext(e):0===t.RangeUtils.editableTextNodes(e).length}},_updateImmutablesState:function(n,i,o){var s,a,l,c,d,u=n.name,h=i,f=n.options.trackImmutables;if(f===t&&(f=e.inArray(u,r.Immutables.toolsToBeUpdated)>-1),f){if(s=o?"none":"",!i.is(".k-tool")){a=i.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,n=this.options.resizable&&this.options.resizable.toolbar,i=this.overflowPopup;this.refreshTools(),n&&(i.visible()&&i.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",i.element.is(":empty")?"hidden":"visible"))},_refreshWidths:function(){this.element.children("li").each(function(t,n){var i=e(n);i.data("outerWidth",p(i,!0))})},_shrink:function(e){var t,n,i;if(e<this._groupsWidth())for(n=this._visibleGroups().filter(":not(.k-overflow-tools)"),i=n.length-1;i>=0&&(t=n.eq(i),!(e>this._groupsWidth()));i--)this._hideGroup(t)},_stretch:function(e){var t,n,i;if(e>this._groupsWidth())for(n=this._hiddenGroups(),i=0;i<n.length&&(t=n.eq(i),!(e<this._groupsWidth())&&this._showGroup(t,e));i++);},_hiddenGroups:function(){var t=this.overflowPopup,n=this.element.children("li.k-tool-group").filter(":hidden");return n=n.add(t.element.children("li")),n.sort(function(t,n){return e(t).data("position")>e(n).data("position")?1:-1}),n},_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,n){var i,o;return!!(t.length&&n>this._groupsWidth()+t.data("outerWidth"))&&(t.hasClass("k-overflow-tool-group")?(i=t.data("position"),0===i?t.detach().prependTo(this.element):(o=this.element.children().filter(function(t,n){return e(n).data("position")===i-1}),t.detach().insertAfter(o)),t.removeClass("k-overflow-tool-group")):t.show(),!0)}}),e.extend(r,{Toolbar:n})}(window.jQuery||window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/tables.min",["editor/toolbar.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.ui.editor,s=r.Dom,a=r.EditorUtils,l=r.RangeUtils,c=r.Command,d="kendoEditor",u="k-state-active",h="k-state-selected",f=r.Tool,p=r.ToolTemplate,m=r.InsertHtmlCommand,g=r.BlockFormatFinder,v=r.EditorUtils.registerTool,_=n.getTouches,b=n.template,w="<td style='width:#=width#%;'>#=content#</td>",y=new g([{tags:["table"]}]),k=m.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});m.fn.init.call(this,n)},_tableHtml:function(e,t){var n,i;return e=e||1,t=t||1,n=b(w)({width:100/t,content:r.emptyTableCellContent}),i=100/e,"<table class='k-table' data-last>"+Array(e+1).join("<tr style='height:"+i+"%;'>"+Array(t+1).join(n)+"</tr>")+"</table>"},postProcess:function(t,n){var i=e("table[data-last]",t.document).removeAttr("data-last");n.setStart(i.find("td")[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),m.fn.exec.call(this)}}),x=f.extend({initialize:function(t,n){var i,s,l,c;f.fn.initialize.call(this,t,n),i=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=n.editor,this._popup=i,l=new r.TableWizardTool({template:new p({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(i.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=n.keys,i=e.keyCode;i==t.DOWN&&e.altKey?this._popup.open():i==t.ESC&&this._popup.close()},_toggle:function(t){var n=e(t.target).closest(".k-tool");n.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 n=e(window);return{row:Math.floor((t.clientY+n.scrollTop()-u.top)/o)+1,col:Math.floor((t.clientX+n.scrollLeft()-u.left)/i)+1}}var i,o,r=this,s=r._popup.element,a=s.find(".k-ct-cell"),l=a.eq(0),c=a.eq(a.length-1),u=n.getOffset(l),h=n.getOffset(c),f=r.cols,p=r.rows;s.find("*").addBack().attr("unselectable","on"),h.left+=c[0].offsetWidth,h.top+=c[0].offsetHeight,i=(h.left-u.left)/f,o=(h.top-u.top)/p,s.autoApplyNS(d).on("mousemove",function(e){r._setTableSize(t(e))}).on("mouseleave",function(){r._setTableSize()}).on("down",function(e){e.preventDefault();var n=_(e)[0];r._exec(t(n.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 i=this._popup.element,o=i.find(".k-status"),r=i.find(".k-ct-cell"),s=this.cols,a=this._editor.options.messages;this._valid(t)?(o.text(n.format(a.createTableHint,t.row,t.col)),r.each(function(n){e(this).toggleClass(h,n%s<t.col&&n/s<t.row)})):(o.text(a.dialogCancel),r.removeClass(h))},_keydown:function(e){var t,i,o,r,s,a,l,c;x.fn._keydown.call(this,e),this._popup.visible()&&(t=n.keys,i=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,i!=t.DOWN||e.altKey?i==t.UP?(l=!0,s--):i==t.RIGHT?(l=!0,a++):i==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))},i==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.dialogCancel).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,n,i,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,n=t.cloneNode(!0),i=0;i<t.cells.length;i++)n.cells[i].innerHTML=r.emptyTableCellContent;"before"==this.options.position?s.insertBefore(n,t):s.insertAfter(n,t),this.releaseRange(o)}}}),T=c.extend({exec:function(){var e,t,n,i,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++)n=c[t].cells[e],i=n.cloneNode(),i.innerHTML=r.emptyTableCellContent,"before"==d?s.insertBefore(i,n):s.insertAfter(i,n);this.releaseRange(o)}}}),D=c.extend({exec:function(){var t,n,i,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)n=s.next(t),n&&!s.insignificant(n)||(n=s.prev(t)),s.remove(t);else for(i=0;i<a.length;i++)c=a[i],s.removeTextSiblings(c),n=s.next(c)||s.prev(c),n=n.cells[0],s.remove(c);n&&(o.setStart(n,0),o.collapse(!0),this.editor.selectRange(o))}}}),A=c.extend({exec:function(){var e,t,n=this.lockRange(),i=s.closest(n.endContainer,"td"),o=s.closest(i,"table"),a=o.rows,l=s.findNodeIndex(i,!0),c=a[0].cells.length;if(!this.immutables()||!r.Immutables.immutableParent(i)){if(1==c)e=s.next(o),e&&!s.insignificant(e)||(e=s.prev(o)),s.remove(o);else for(s.removeTextSiblings(i),e=s.next(i)||s.prev(i),t=0;t<a.length;t++)s.remove(a[t].cells[l]);e&&(n.setStart(e,0),n.collapse(!0),this.editor.selectRange(n))}}}),E=f.extend({command:function(e){return e=i(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){f.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){var n=!y.isFormatted(t);e.toggleClass("k-state-disabled",n)}});i(n.ui.editor,{PopupTool:x,TableCommand:k,InsertTableTool:C,TableModificationTool:E,InsertRowCommand:S,InsertColumnCommand:T,DeleteRowCommand:D,DeleteColumnCommand:A}),v("createTable",new C({template:new p({template:a.buttonTemplate,popup:!0,title:"Create table"})})),v("addColumnLeft",new E({type:"column",position:"before",template:new p({template:a.buttonTemplate,title:"Add column on the left"})})),v("addColumnRight",new E({type:"column",template:new p({template:a.buttonTemplate,title:"Add column on the right"})})),v("addRowAbove",new E({type:"row",position:"before",template:new p({template:a.buttonTemplate,title:"Add row above"})})),v("addRowBelow",new E({type:"row",template:new p({template:a.buttonTemplate,title:"Add row below"})})),v("deleteRow",new E({type:"row",action:"delete",template:new p({template:a.buttonTemplate,title:"Delete row"})})),v("deleteColumn",new E({type:"column",action:"delete",template:new p({template:a.buttonTemplate,title:"Delete column"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/export.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.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,n=t.editor.options.exportAs,i=e("<form>").attr({action:n&&n.proxyURL||"",method:"POST"});return i.append([t.valueInput(),t.exportTypeInput(),t.fileNameInput()]),i},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,n=t.options.exportAs,i=n&&n.fileName||t.element.attr("id")||"editor";return e("<input>").attr({value:i,name:"fileName",type:"hidden"})}}),f=l.extend({init:function(e){var t=this;l.fn.init.call(t,n.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 i=this,r=t.editor,s=i.options,a=s.name,l=o(i.changeHandler,i),c=s.items||r.options[a];c.unshift({text:r.options.messages[a],value:""}),i.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:n.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,n=t.dataItem(),i=n&&n.value;this._exec(i),t.value("")},_exec:function(e){e&&l.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});i(r,{ExportAsTool:f,ExportAsCommand:h}),c("exportAs",new f({template:new d({template:s.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/import.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.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,n=t.editor,i=n.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:i.proxyUrl,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return n._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 n=this.editor,i=n.options["import"];"function"==typeof i[e]&&i[e].call(n,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),n.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){n.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});i(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,n){(n||t)()}),function(e,define){define("editor/resizing/resizing-utils.min",["editor/main.min"],e)}(function(){!function(e,t){function n(e){var t=e.value,n=e.min,i=e.max;return h(u(f(t),f(i)),f(n))}function i(t){return t&&!p(t).is("body")&&t.scrollHeight>t.clientHeight?e.support.scrollbar():0}function o(e,t){return r(e)?f(e):f(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 f(e)+v}function l(e){return f(e)+_}var c=window,d=c.Math,u=d.min,h=d.max,f=c.parseFloat,p=e.jQuery,m=p.extend,g=e.ui.editor,v="%",_="px",b=/(\d+)(\.?)(\d*)%/,w=/(\d+)(\.?)(\d*)px/,y="string",k={constrain:n,getScrollBarWidth:i,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,n){(n||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 n=e.jQuery,i=n.extend,o=n.noop,r=n.proxy,s=e.ui.editor,a=e.Class,l="keydown",c="mousedown",d="mouseenter",u="mouseleave",h="mousemove",f="mouseup",p=",",m=".",g=":last-child",v="table",_=a.extend({init:function(e,t){var o=this;o.options=i({},o.options,t),o.options.tags=n.isArray(o.options.tags)?o.options.tags:[o.options.tags],n(e).is(v)&&(o.element=e,o._attachEventHandlers())},destroy:function(){var e=this,t=e.options.eventNamespace;e.element&&(n(e.element).off(t),e.element=null),n(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;n(e.element).on(h+t.eventNamespace,t.tags.join(p),r(e.detectElementBorderHovering,e))},resizingInProgress:function(){var e=this,t=e._resizable;return!!t&&!!t.resizing},resize:o,detectElementBorderHovering:function(e){var t=this,i=t.options,o=i.handle,r=n(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 n=this;0===t.buttons&&(n._initResizeHandle(),n.setResizeHandlePosition(e),n.setResizeHandleDimensions(),n.setResizeHandleDataAttributes(e[0]),n._attachResizeHandleEventHandlers(),n._initResizable(e),n._hideResizeMarker(),n.resizeHandle.show())},_initResizeHandle:function(){var e=this,t=e.options;e._destroyResizeHandle(),e.resizeHandle=n(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,n=t.eventNamespace,i=t.handle.classNames.marker,o=e.resizeHandle;e.resizeHandle.on(c+n,function(){o.find(m+i).show()}).on(f+n,function(){o.find(m+i).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 n=this;n.resizeHandle&&(n._destroyResizable(),n._resizable=new e.ui.Resizable(t,{draggableElement:n.resizeHandle[0],start:r(n.onResizeStart,n),resize:r(n.onResize,n),resizeend:r(n.onResizeEnd,n)}))},_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;n(e.rootElement).off(l+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;n(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 i=this,o=t.name,r=t.eventNamespace;n(e.body).on(d+r,v,function(n){var r=n.currentTarget,s=e[o];n.stopPropagation(),s?s.element===r||s.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,r,t)):i._initResizing(e,r,t)}).on(u+r,v,function(r){var s,a=e[o];r.stopPropagation(),!a||a.resizingInProgress()||a.resizeHandle||(s=n(a.element).parents(v)[0],s&&(i._destroyResizing(e,t),i._initResizing(e,s,t)))}).on(u+r,function(){var n=e[o];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)}).on(f+r,function(r){var s,a=e[o];a&&a.resizingInProgress()&&(s=n(r.target).parents(v)[0],s&&(a._forceResizing(r),i._destroyResizing(e,t),i._initResizing(e,s,t)))})},dispose:function(e,t){n(e.body).off(t.eventNamespace)},_initResizing:function(t,n,i){var o=i.name,r=i.type;t[o]=new r(n,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var n=t.name;e[n]&&(e[n].destroy(),e[n]=null)}});b.current=new b,_.create=function(e,t){b.current.create(e,t)},_.dispose=function(e,t){b.current.dispose(e,t)},i(s,{TableElementResizing:_})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=window,i=n.Math,o=i.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,f=c.inPercentages,p=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 n=this,i=n.options,o=i.handle.width,s=e.offset().left+(i.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,n=r(t.element).children(y),i=t.options,o=i.rtl,s=i.handle.width,a=r(i.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;t.resizeHandle.css({top:n.position().top+l,left:e.position().left+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,n=r(r(e.currentTarget).data(t.options.handle.dataAttribute)),i=t.options,o=i.handle?i.handle.width:0,s=i.min,a=i.rtl,l=g(n),c=n.position().left,u=g(n.next()),f=r(t.resizeHandle),p=r(i.rootElement),m=p.is(w)?0:p.scrollLeft(),v=a?h(p[0]):0,_=d({value:f.position().left+(m-v)+e.x.delta,min:c+(m-v)-(a?u:0)+s,max:c+l+(m-v)+(a?0:u)-o-s});f.css({left:_})},resize:function(e){var t,n,i,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(),i=g(s),n=g(s.next()),t=d({value:i+u,min:c,max:i+n-c}),o._resizeColumn(s[0],t),o._resizeTopAndBottomColumns(s[0],t),o._resizeAdjacentColumns(s.index(),n,i,i-t)},_setTableComputedWidth:function(){var e=this.element;""===e.style[T]&&(e.style[T]=m(g(r(e))))},_setColumnsComputedWidth:function(){var e,t=this,n=r(t.element).children(y),i=g(n),o=n.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]=f(o[e].style[T])?p(u(a[e],i)):m(a[e])},_resizeTopAndBottomColumns:function(e,t){var n,i=this,o=r(e).index(),s=r(i.element).children(y).children(C).children(i.options.tags.join(S)).filter(function(){var t=this;return r(t).index()===o&&t!==e}),a=s.length;for(n=0;n<a;n++)i._resizeColumn(s[n],t)},_resizeColumn:function(e,t){e.style[T]=f(e.style[T])?p(u(t,g(r(this.element).children(y)))):m(t)},_resizeAdjacentColumns:function(e,t,n,i){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,n,i)},_resizeAdjacentColumn:function(e,t,n,i){var r=this,s=r.options.min,a=d({value:t+i,min:s,max:o(n+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,n){(n||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 n=window.Math,i=n.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,f=l.toPercentages,p=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 n=this,i=n.options.handle[x],r=e.offset().top+m(e),s=t.clientY+o(e[0].ownerDocument).scrollTop();return s>r-i&&s<r+i},setResizeHandlePosition:function(e){var t=this,n=t.options,i=n.handle[x],r=e.position(),s=o(n.rootElement),a=s.is(w)?0:s.scrollTop(),l=s.is(w)?0:s.scrollLeft(),d=n.rtl?c(s[0]):0;t.resizeHandle.css({top:r.top+m(e)+a-i/2,left:r.left+(l-d),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,n=t.options,i=n.min,r=o(t.element).children(k),s=r.position().top,a=o(t.resizeHandle),l=o(e.currentTarget).data(n.handle.dataAttribute),c=o(n.rootElement),u=c.is(w)?0:c.scrollTop(),h=d({value:a.position().top+u+e.y.delta,min:o(l).position().top+u+i,max:s+m(r)+u-n.handle[x]-i});a.css({top:h})},resize:function(e){var t=this,n=t.options,r=o(e.currentTarget).data(n.handle.dataAttribute),s=m(o(r)),a=o(t.element),l=m(a),c=a.children(k),u=c.height(),f=r.style[x],g=d({value:s+e.y.initialDelta,min:n.min,max:i(u-n.min)});t._setRowsHeightInPixels(),r.style[x]=p(g),t._setTableHeight(l+(g-s)),h(f)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){var e,t=this,n=o(t.element).children(k).children(y),i=n.length,r=n.map(function(){return m(o(this))});for(e=0;e<i;e++)n[e].style[x]=p(r[e])},_setRowsHeightInPercentages:function(){var e,t=this,n=o(t.element).children(k),i=n.height(),r=n.children(y),s=r.length,a=r.map(function(){return m(o(this))});for(e=0;e<s;e++)r[e].style[x]=f(u(a[e],i))},_setTableHeight:function(e){var t=this.element;t.style[x]=h(t.style[x])?f(u(e,o(t).parent().height())):p(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,n){(n||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 n,i,o,r,s,a,l,c,d,u,h,f,p,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,M=e.ui.Draggable,R=e.Observable,I=A.ResizingUtils.getScrollBarWidth,F=e._outerWidth,z=e._outerHeight,P=".kendoEditorTableResizeHandle",B="k-table-resize-handle",L="dragStart",H="drag",N="dragEnd",O="halfInside",V="mouseover",U="mouseout",W="body",j="table",q="east",G="north",$="northeast",Y="northwest",K="south",Q="southeast",X="southwest",Z="west",J=".",ee=R.extend({init:function(e){var t=this;R.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(j,t.options.resizableElement)},destroy:function(){var e=this;C(e.element).off(P).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,U],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+P,D(e._onMouseOver,e)).on(U+P,D(e._onMouseOut,e))},_onMouseOver:function(){this.trigger(V)},_onMouseOut:function(){this.trigger(U)},_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=n.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 M(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,n,i,o=this._items,r=o.length,s=e.name?e.name.toLowerCase():"";for(i=0;i<r;i++)if(n=o[i],n.name.toLowerCase()===s){t=n;break}if(t)return new t.type(e)}}),ne=te.extend({});ne.current=new ne,n=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(),n=e.applyHandleOffset(t),i=e.applyScrollOffset(n);return i},calculatePosition:T,applyHandleOffset:function(e){var t=this.options,n=C(t.handle);return t.offset===O?{top:e.top-z(n)/2,left:e.left-F(n)/2}:e},applyScrollOffset:function(e){var t=this.options,n=C(t.rootElement),i=t.rtl?I(n[0]):0;return n.is(W)?e:{top:e.top+(n.scrollTop()||0),left:e.left+(n.scrollLeft()||0)-i}}}),n.create=function(e){return ne.current.create(e)},i=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e)/2,left:t.left+F(e)}}}),ne.current.register(q,i),o=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+F(e)/2}}}),ne.current.register(G,o),r=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+F(e)}}}),ne.current.register($,r),s=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left}}}),ne.current.register(Y,s),a=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e),left:t.left+F(e)/2}}}),ne.current.register(K,a),l=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e),left:t.left+F(e)}}}),ne.current.register(Q,l),c=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e),left:t.left}}}),ne.current.register(X,c),d=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e)/2,left:t.left}}}),ne.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,n=t.deltaX.adjustment*t.deltaX.modifier,i=t.deltaY.adjustment*t.deltaY.modifier;return{deltaX:e.deltaX*n,deltaY:e.deltaY*i,initialDeltaX:e.initialDeltaX*n,initialDeltaY:e.initialDeltaY*i}}}),h.create=function(e){return u.current.create(e)},f=h.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),p=f.extend({options:{deltaX:{modifier:1}}}),u.current.register(q,p),m=f.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(K,_),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(Y,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,n){(n||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 n(e){return t===e}var i=window,o=i.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,f=e.Class,p=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",M="dragEnd",R="keydown",I="mousedown",F="mouseover",z="mouseout",P="td",B="tr",L="tbody",H="table",N="width",O="height",V="east",U="north",W="northeast",j="northwest",q="south",G="southeast",$="southwest",Y="west",K=".",Q=f.extend({init:function(e,t){var n=this;n.options=c({},n.options,t),n.handles=[],a(e).is(H)&&(n.element=e)},destroy:function(){var e=this;a(e.element).off(C),e.element=null,a(e.options.rootElement).off(R+C),e._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:j},{direction:U},{direction:W},{direction:V},{direction:G},{direction:q},{direction:$},{direction:Y}]},resize:function(e){var t=this,n=c({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},e);t._resizeWidth(n.deltaX,n.initialDeltaX),t._resizeHeight(n.deltaY,n.initialDeltaY),t.showResizeHandles()},_resizeWidth:function(e,t){var i,o,l,c,d=this,u=a(d.element),h=u[0].style[N],f=k(u),p=u.parent().width(),m=d._getMaxDimensionValue(N);0!==e&&(n(d._initialElementWidth)&&(d._initialElementWidth=f),c=v({value:d._initialElementWidth+t,min:d.options.minWidth,max:m}),_(h)?(f+e>p?(o=s(c,p),l=r(c,p)):(o=r(c,p),l=s(c,p)),i=w(g(o,l))):i=y(c),d._setColumnsWidth(),u[0].style[N]=i)},_resizeHeight:function(e,t){var i,o,l,c,d=this,u=a(d.element),h=u[0].style[O],f=x(u),p=u.parent(),m=p.height(),b=d._getMaxDimensionValue(O),k=d.options.minHeight,C=d._hasRowsInPixels();0!==e&&(n(d._initialElementHeight)&&(d._initialElementHeight=f),c=v({value:d._initialElementHeight+t,min:k,max:b}),C&&e<0&&d._setRowsHeightInPercentages(),_(h)?(f+e>m?(o=s(c,m),l=r(c,m)):(o=r(c,m),l=s(c,m)),i=w(g(o,l))):i=y(c),u[0].style[O]=i,C&&e<0&&d._setRowsHeightInPixels())},_getMaxDimensionValue:function(e){var t=this,n=a(t.element),i=e.toLowerCase(),o=t.options.rtl?-1:1,r=a(t.element).parent(),s=r[0],l=r[i](),c=o*(e===N?r.scrollLeft():r.scrollTop());return s===n.closest(P)[0]?""!==s.style[i]||_(t.element.style[i])?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,n=this,i=a(n.element),o=i.parent()[0],r=i.closest(P),s=r.closest(B).children(),l=s.length;if(e(i[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,n=a(t.element).children(L).children(B);for(e=0;e<n.length;e++)if(""===n[e].style.height||b(n[e].style.height))return!0;return!1},_setRowsHeightInPercentages:function(){var e,t=this,n=a(t.element).children(L),i=n.height(),o=n.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],i))},_setRowsHeightInPixels:function(){var e,t=this,n=a(t.element).children(L).children(B),i=n.length,o=n.map(function(){return x(a(this))});for(e=0;e<i;e++)n[e].style[O]=y(o[e])},showResizeHandles:function(){var e=this;e._initResizeHandles(),e._showResizeHandles()},_initResizeHandles:function(){var e,t=this,n=t.handles,i=t.options,o=t.options.handles,r=o.length;if(!(n&&n.length>0)){for(e=0;e<r;e++)t.handles.push(new p(c({appendTo:i.appendHandlesTo,resizableElement:t.element,rootElement:i.rootElement,rtl:i.rtl},o[e])));t._bindToResizeHandlesEvents()}},_destroyResizeHandles:function(){var e,t=this,n=t.handles?t.handles.length:0;for(e=0;e<n;e++)t.handles[e].destroy()},_showResizeHandles:function(){var e,t=this,n=t.handles||[],i=n.length;for(e=0;e<i;e++)t.handles[e].show()},_bindToResizeHandlesEvents:function(){var e,t,n=this,i=n.handles||[],o=i.length;for(e=0;e<o;e++)t=i[e],t.bind(A,d(n._onResizeHandleDragStart,n)),t.bind(E,d(n._onResizeHandleDrag,n)),t.bind(M,d(n._onResizeHandleDragEnd,n)),t.bind(F,d(n._onResizeHandleMouseOver,n)),t.bind(z,d(n._onResizeHandleMouseOut,n))},_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(R+C)},_disableKeyboard:function(){a(this.options.rootElement).on(R+C,function(e){e.preventDefault()})}}),X=f.extend({create:function(e){var t=this;a(e.body).on(I+C,H,function(n){var i=n.target,o=n.currentTarget,r=e.tableResizing,s=r?r.element:null;if(r){if(s&&o!==s){if(l(o,s)&&s!==i&&l(s,i))return;s!==i&&(e._destroyTableResizing(),t._initResizing(e,o))}}else t._initResizing(e,o);e._showTableResizeHandles()}).on(I+C,function(t){var n=e.tableResizing,i=n?n.element:null,o=t.target,r=a(o).hasClass(S)||a(o).parents(K+S).length>0;!n||i===o||l(i,o)||r||e._destroyTableResizing()})},dispose:function(e){a(e.body).off(C)},_initResizing:function(t,n){u.msie||u.mozilla||(t.tableResizing=new Q(n,{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,n){(n||t)()}),function(e,define){define("editor/immutables.min",["editor/tables.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.Class,o=n.ui.editor,r=o.Dom,s=n.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']",f=function(t){return e(t).is("body,.k-editor")},p=function(e){return e.getAttribute&&"false"==e.getAttribute("contenteditable")},m=function(e){return r.closestBy(e,p,f)},g=function(e){var t=m(e.startContainer),n=m(e.endContainer);(t||n)&&(t&&e.setStartBefore(t),n&&e.setEndAfter(n))},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,n="",i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(t=e||10;t>0;--t)n+=i.charAt(Math.round(Math.random()*(i.length-1)));return n},b=function(t){var n,i,o,s={empty:!0};return e(t).find(h).each(function(t,a){n=r.name(a),i=_(),o="<"+n+" "+d+"='"+i+"'></"+n+">",s[i]={node:a,style:e(a).attr("style")},s.empty=!1,e(a).replaceWith(o)}),s},w=function(t,n){var i,o;e(t).find(u).each(function(t,r){i=r.getAttribute(d),o=n[i],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=n.keys;return e===t.BACKSPACE||e==t.DELETE},k=function(e){var n=e?e.options:t;n&&n.finder&&n.finder._initOptions({immutables:!0})},x=i.extend({init:function(t){this.editor=t,this.serializedImmutables={},this.options=e.extend({},t&&t.options&&t.options.immutables);var n=t.toolbar.tools;k(n.justifyLeft),k(n.justifyCenter),k(n.justifyRight),k(n.justifyFull)},serialize:function(e){var t,n=this._toHtml(e);return n.indexOf(d)===-1?(t=this.randomId(),n=n.replace(/>/," "+d+'="'+t+'">')):t=n.match(/k-immutable\s*=\s*['"](.*)['"]/)[1],this.serializedImmutables[t]=e,n},_toHtml:function(e){var t,n=this.options.serialization,i=typeof n;switch(i){case"string":return s(n)(e);case"function":return n(e);default:return t=r.name(e),"<"+t+"></"+t+">"}},deserialize:function(t){var i=this,o=this.options.deserialization;e(u,t).each(function(){var t=this.getAttribute(d),r=i.serializedImmutables[t];n.isFunction(o)&&o(this,r),e(this).replaceWith(r)}),i.serializedImmutables={}},randomId:function(e){return _(e)},keydown:function(e,t){var n=y(e.keyCode),i=n&&this._cancelDeleting(e,t)||!n&&this._cancelTyping(e,t);if(i)return e.preventDefault(),!0},_cancelTyping:function(e,t){var n=this.editor,i=n.keyboard;return t.collapsed&&!i.typingInProgress&&i.isTypingKey(e)&&v(t)},_cancelDeleting:function(e,t){var i,o,s,a,c=n.keys,d=e.keyCode===c.BACKSPACE,u=e.keyCode==c.DELETE;if(!d&&!u)return!1;if(i=!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 i;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 i;this._removeImmutable(o,t)}i=!0}}return i},nextImmutable:function(e,t){var n,i=e.commonAncestorContainer;if(r.isBom(i)||t&&a.isEndOf(e,i)||!t&&a.isStartOf(e,i)){if(n=this._nextNode(i,t),n&&r.isBlock(n)&&!m(n))for(;n&&n.children&&n.children[t?0:n.children.length-1];)n=n.children[t?0:n.children.length-1];return m(n)}},_removeImmutable:function(e,t){var n=this.editor,i=new o.RestorePoint(t,n.body);r.remove(e),o._finishUpdate(n,i)},_nextNode:function(e,t){for(var n,i=t?"nextSibling":"previousSibling",o=e;o&&!n;)n=o[i],n&&r.isDataNode(n)&&/^\s|[\ufeff]$/.test(n.nodeValue)&&(o=n,n=o[i]),n||(o=o.parentNode);return n}});x.immutable=p,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,n){(n||t)()}),function(e,define){define("editor/table-wizard/table-wizard-command.min",["editor/tables.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.editor,o=i.EditorUtils,r=i.RangeUtils,s=i.Dom,a=o.registerTool,l=i.ToolTemplate,c=i.Command,d=new i.BlockFormatFinder([{tags:["table"]}]),u=new i.BlockFormatFinder([{tags:["td","th"]}]),h=/([a-z]+|%)$/i,f=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:n.support.isRtl(r.wrapper)},d=new i.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,n=t.editor.document;s.windowFromDocument(n).focus(),c.fn.releaseRange.call(t,e)},insertTable:function(e){var t=this.range;t.insertNode(e),t.collapse(!0),this.editor.selectRange(t)},updateTable:function(t,n,i){for(var o,r,a,l,c,d,u,h,f=this,p=e(n.rows).toArray(),m=t.tableProperties,g=m.rows,v=m.columns,_=function(e){return e[e.length-1]};i.length>1;)i.pop();if(o=i.length?_(i).parentNode:_(p),f._deleteTableRows(p,p.length-g),p.length<g)for(l=e(o).index(),c=o.cells.length,d=g-p.length,a=o.parentNode;d;)r=a.insertRow(l+1),f._insertCells(c-r.cells.length,r),d--;p[0].cells.length>v&&e(p).each(function(e,t){for(;t.cells.length>v;)t.deleteCell(-1)}),p[0].cells.length<v&&(u=e(_(i)||_(o.cells)).index(),e(p).each(function(e,t){f._insertCells(v-t.cells.length,t,u+1)})),f._updateTableProperties(n,m),h=t.cellProperties,i[0]&&s.attr(i[0],{id:h.id||null}),(h.selectAllCells?e(p).children():e(i)).each(function(e,t){f._updateCellProperties(t,h)}),f._updateCaption(n,m),m.cellsWithHeaders=m.cellsWithHeaders||!1,f.cellsWithHeadersAssociated(n)!=m.cellsWithHeaders&&f.associateCellsWithHeader(n,m.cellsWithHeaders)},_isHeadingRow:function(e){return s.is(e.parentNode,"thead")||s.is(e.cells[0],"th")},associateCellsWithHeader:function(t,n){var i,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,i){e(i)[n?"attr":"removeAttr"]("id",a[t])},u=function(t,i){e(i)[n?"attr":"removeAttr"]("headers",a[t])},h=this._isHeadingRow;e(t.rows).each(function(n,s){if(h(s))for(i=n,o=t.rows[++i],r=o&&!h(o),r&&(c(),e(s.cells).each(d));r;)e(o.cells).each(u),o=t.rows[++i],r=o&&!h(o)})},cellsWithHeadersAssociated:function(t){var n,i=e(t.rows).children(),o=this._isHeadingRow,r=[];return i.each(function(e,t){t.id&&o(t.parentNode)&&r.push(t.id)}),n=i.filter(function(t,n){var i=n.getAttribute("headers");return i&&!o(n.parentNode)&&e.inArray(i,r)>-1}),!!n.length},_insertCells:function(e,t,n){n=isNaN(n)?-1:n;for(var i,o=0;o<e;o++)i=t.insertCell(n),i.innerHTML="&nbsp;"},_deleteTableRows:function(e,t){for(var n,i,o=0;o<t;o++)n=e.pop(),i=n.parentNode,i.removeChild(n),i.rows.length||s.remove(i)},createNewTable:function(e){var t,n,i,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(),n=0;n<c.rows;n++)for(i=t.insertRow(),o=0;o<c.columns;o++)r=i.insertCell(),r.innerHTML="&nbsp;",0===n&&0===o&&d.id&&(r.id=d.id),a._updateCellProperties(r,u||0===n&&0===o?d:{});return c.cellsWithHeaders&&a.associateCellsWithHeader(h,c.cellsWithHeaders),h},_updateTableProperties:function(t,n){var i=this._getStylesData(n);s.attr(t,{cellSpacing:n.cellSpacing||null,cellPadding:n.cellPadding||null,className:n.className||null,id:n.id||null,summary:n.summary||null,style:i||null}),e(t).addClass("k-table")},_updateCellProperties:function(e,t){var n=this._getStylesData(t);n.padding=t.cellPadding||null,n.margin=t.cellMargin||null,s.attr(e,{style:n||null,className:t.className||null})},_updateCaption:function(e,t){var n,i;e.caption&&!t.captionContent?e.deleteCaption():t.captionContent&&(n=e.createCaption(),n.innerHTML=t.captionContent,i=this._getAlignmentData(t.captionAlignment),s.attr(n,{style:{textAlign:i.textAlign,verticalAlign:i.verticalAlign}}))},_getStylesData:function(e){var t=this._getAlignmentData(e.alignment),n="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||null,borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderColor:e.borderColor,borderCollapse:e.collapseBorders?"collapse":null,whiteSpace:n}},_getAlignmentData:function(e){var t,n="",i=n;return e&&(e.indexOf(" ")!=-1?(t=e.split(" "),n=t[0],i=t[1]):n=e),{textAlign:n,verticalAlign:i}},parseTable:function(n,i){var o,r,s,a,l,c,d,u,h,f;return n?(o=this,r=n.style,s=n.rows,a=n.caption,l=e(a?a.cloneNode(!0):t),l.find(".k-marker").remove(),c=n.className,c=c.replace(/^k-table\s|\sk-table$/,""),c=c.replace(/\sk-table\s/," "),c=c.replace(/^k-table$/,""),d=o._getAlignment(n,!0),u=a?o._getAlignment(a):t,h=o.cellsWithHeadersAssociated(n),f={tableProperties:{width:r.width||n.width?parseFloat(r.width||n.width):null,height:r.height||n.height?parseFloat(r.height||n.height):null,columns:s[0]?s[0].children.length:0,rows:s.length,widthUnit:o._getUnit(r.width),heightUnit:o._getUnit(r.height),cellSpacing:n.cellSpacing,cellPadding:n.cellPadding,alignment:d.textAlign,bgColor:r.backgroundColor||n.bgColor,className:c,id:n.id,borderWidth:r.borderWidth||n.border,borderColor:r.borderColor,borderStyle:r.borderStyle||"",collapseBorders:!!r.borderCollapse,summary:n.summary,captionContent:a?l.html():"",captionAlignment:a&&u.textAlign?u.textAlign+" "+u.verticalAlign:"",cellsWithHeaders:h},selectedCells:[]},f.rows=o.parseTableRows(s,i,f),f):{tableProperties:{},selectedCells:[]}},parseTableRows:function(t,n,i){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,n)!=-1&&i.selectedCells.push(l),r.cells.push(l);return h},parseCell:function(e){var t,n=this,i=e.style,o=n._getAlignment(e);return o=o.textAlign?o.textAlign+" "+o.verticalAlign:"",t={width:i.width||e.width?parseFloat(i.width||e.width):null,height:i.height||e.height?parseFloat(i.height||e.height):null,widthUnit:n._getUnit(i.width),heightUnit:n._getUnit(i.height),cellMargin:i.margin,cellPadding:i.padding,alignment:o,bgColor:i.backgroundColor||e.bgColor,className:e.className,id:e.id,borderWidth:i.borderWidth||e.border,borderColor:i.borderColor,borderStyle:i.borderStyle,wrapText:"nowrap"!=i.whiteSpace}},_getAlignment:function(e,t){var n,i=e.style,o=i.textAlign||e.align||"";return t?{textAlign:o}:(n=i.verticalAlign||e.vAlign||"",o&&n?{textAlign:o,verticalAlign:n}:!o&&n?{textAlign:"left",verticalAlign:n}:o&&!n?{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)}}),p=i.Tool.extend({command:function(e){return e.insertNewTable=this.options.insertNewTable,new f(e)}}),m=p.extend({update:function(e,t){var n=!d.isFormatted(t);e.toggleClass("k-state-disabled",n)}});n.ui.editor.TableWizardTool=p,n.ui.editor.TableWizardCommand=f,a("tableWizard",new m({command:f,insertNewTable:!1,template:new l({template:o.buttonTemplate,title:"Table Wizard"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=window.kendo,i={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-edit-form-container k-popup-edit-form"><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" /></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" /></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" /></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" /></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>',d=n.Class.extend({init:function(e){this.options=e},open:function(){function t(e){e.preventDefault(),s.destroy(),o.destroy()}function n(e){s.collectDialogValues(c),t(e),s.change&&s.change(),a.closeCallback(c)}function i(e){t(e),a.closeCallback()}var o,r,s=this,a=s.options,l=a.dialogOptions,c=a.table,d=a.messages;l.close=i,l.title=d.tableWizard,l.visible=a.visible,o=e(s._dialogTemplate(d)).appendTo(document.body).kendoWindow(l).closest(".k-window").toggleClass("k-rtl",a.isRtl).end().find(".k-dialog-ok").click(n).end().find(".k-dialog-close").click(i).end().data("kendoWindow"),
r=o.element,s._initTabStripComponent(r),s._initTableViewComponents(r,c),s._initCellViewComponents(r,c),s._initAccessibilityViewComponents(r,c),o.center(),o.open()},_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,n=e.tableProperties;n.width=t.width.value(),n.widthUnit=t.widthUnit.value(),n.height=t.height.value(),n.columns=t.columns.value(),n.rows=t.rows.value(),n.heightUnit=t.heightUnit.value(),n.cellSpacing=t.cellSpacing.value(),n.cellPadding=t.cellPadding.value(),n.alignment=t.alignment.value(),n.bgColor=t.bgColor.value(),n.className=t.className.value,n.id=t.id.value,n.borderWidth=t.borderWidth.value(),n.borderColor=t.borderColor.value(),n.borderStyle=t.borderStyle.value(),n.collapseBorders=t.collapseBorders.checked},_collectCellViewValues:function(e){var t=e.cellProperties={},n=this.components.cellView;t.selectAllCells=n.selectAllCells.checked,t.width=n.width.value(),t.widthUnit=n.widthUnit.value(),t.height=n.height.value(),t.heightUnit=n.heightUnit.value(),t.cellMargin=n.cellMargin.value(),t.cellPadding=n.cellPadding.value(),t.alignment=n.alignment.value(),t.bgColor=n.bgColor.value(),t.className=n.className.value,t.id=n.id.value,t.borderWidth=n.borderWidth.value(),t.borderColor=n.borderColor.value(),t.borderStyle=n.borderStyle.value(),t.wrapText=n.wrapText.checked},_collectAccessibilityViewValues:function(e){var t=e.tableProperties,n=this.components.accessibilityView;t.captionContent=n.captionContent.value,t.captionAlignment=n.captionAlignment.value(),t.summary=n.summary.value,t.cellsWithHeaders=n.cellsWithHeaders.checked},_addUnit:function(t,n){n&&e.inArray(n,t)==-1&&t.push(n)},_initTableViewComponents:function(e,t){var n=this.components,i=n.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,i),this._initNumericTextbox(e.find("#k-editor-table-height"),"height",s,i),this._initNumericTextbox(e.find("#k-editor-table-columns"),"columns",s,i,{min:1,value:4}),this._initNumericTextbox(e.find("#k-editor-table-rows"),"rows",s,i,{min:1,value:4}),this._initDropDownList(e.find("#k-editor-table-width-type"),"widthUnit",s,i,o),this._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",s,i,o),this._initNumericTextbox(e.find("#k-editor-table-cell-spacing"),"cellSpacing",s,i),this._initNumericTextbox(e.find("#k-editor-table-cell-padding"),"cellPadding",s,i),this._initTableAlignmentDropDown(e.find("#k-editor-table-alignment"),s),this._initColorPicker(e.find("#k-editor-table-bg"),"bgColor",s,i),this._initInput(e.find("#k-editor-css-class"),"className",s,i),this._initInput(e.find("#k-editor-id"),"id",s,i),this._initNumericTextbox(e.find("#k-editor-border-width"),"borderWidth",s,i),this._initColorPicker(e.find("#k-editor-border-color"),"borderColor",s,i),this._initDropDownList(e.find("#k-editor-border-style"),"borderStyle",s,i,r),this._initCheckbox(e.find("#k-editor-collapse-borders"),"collapseBorders",s,i)},_initCellViewComponents:function(e,t){var n,i=this.components,s=i.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[],n=t.selectedCells[0]||{borderStyle:"",wrapText:!0},this._addUnit(o,n.widthUnit),this._addUnit(o,n.heightUnit),this._initCheckbox(e.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,s),this._initNumericTextbox(e.find("#k-editor-cell-width"),"width",n,s),this._initNumericTextbox(e.find("#k-editor-cell-height"),"height",n,s),this._initDropDownList(e.find("#k-editor-cell-width-type"),"widthUnit",n,s,o),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",n,s,o),this._initNumericTextbox(e.find("#k-editor-table-cell-margin"),"cellMargin",n,s),this._initNumericTextbox(e.find("#k-editor-table-cells-padding"),"cellPadding",n,s),this._initCellAlignmentDropDown(e.find("#k-editor-cell-alignment"),n),this._initColorPicker(e.find("#k-editor-cell-bg"),"bgColor",n,s),this._initInput(e.find("#k-editor-cell-css-class"),"className",n,s),this._initInput(e.find("#k-editor-cell-id"),"id",n,s),this._initNumericTextbox(e.find("#k-editor-cell-border-width"),"borderWidth",n,s),this._initColorPicker(e.find("#k-editor-cell-border-color"),"borderColor",n,s),this._initDropDownList(e.find("#k-editor-cell-border-style"),"borderStyle",n,s,r),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",n,s)},_initAccessibilityViewComponents:function(e,t){var n=this.components,i=n.accessibilityView={},o=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",o,i),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),o),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",o,i),this._initCheckbox(e.find("#k-editor-cells-headers"),"cellsWithHeaders",o,i)},_initNumericTextbox:function(t,n,o,r,s){var a=r[n]=t.kendoNumericTextBox(s?e.extend({},i,s):i).data("kendoNumericTextBox");n in o&&a.value(parseInt(o[n],10))},_initDropDownList:function(e,t,n,i,o){var r=i[t]=e.kendoDropDownList({dataSource:o}).data("kendoDropDownList");this._setComponentValue(r,n,t)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,o=s.dataSource;o[0].tooltip=n.alignLeft,o[1].tooltip=n.alignCenter,o[2].tooltip=n.alignRight,o[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,o=a.dataSource;o[0].tooltip=n.alignLeftTop,o[1].tooltip=n.alignCenterTop,o[2].tooltip=n.alignRightTop,o[3].tooltip=n.alignLeftMiddle,o[4].tooltip=n.alignCenterMiddle,o[5].tooltip=n.alignRightMiddle,o[6].tooltip=n.alignLeftBottom,o[7].tooltip=n.alignCenterBottom,o[8].tooltip=n.alignRightBottom,o[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,a,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,o=l.dataSource;o[0].tooltip=n.alignLeftTop,o[1].tooltip=n.alignCenterTop,o[2].tooltip=n.alignRightTop,o[3].tooltip=n.alignLeftBottom,o[4].tooltip=n.alignCenterBottom,o[5].tooltip=n.alignRightBottom,o[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,l,"captionAlignment",t,i)},_initAlignmentDropDown:function(e,t,n,i,o){var r=o[n]=e.kendoDropDownList(t).data("kendoDropDownList");r.list.addClass("k-align").css("width","110px"),this._setComponentValue(r,i,n)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var o=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&o.value(n[t])},_initInput:function(e,t,n,i){var o=i[t]=e.get(0);t in n&&(o.value=n[t])},_initCheckbox:function(e,t,n,i){var o=i[t]=e.get(0);t in n&&(o.checked=n[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 n.template(c)({messages:e})}});n.ui.editor.TableWizardDialog=d}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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/system.min","editor/inlineformat.min","editor/formatblock.min","editor/linebreak.min","editor/lists.min","editor/link.min","editor/file.min","editor/image.min","editor/components.min","editor/indent.min","editor/viewhtml.min","editor/formatting.min","editor/toolbar.min","editor/tables.min","editor/export.min","editor/import.min","editor/resizing/column-resizing.min","editor/resizing/row-resizing.min","editor/resizing/table-resizing.min","editor/resizing/table-resize-handle.min","editor/immutables.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,n){(n||t)()}),function(e,define){define("kendo.maskedtextbox.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.caret,o=n.keys,r=n.ui,s=r.Widget,a=".kendoMaskedTextBox",l=e.proxy,c=(n.support.propertyChangeEvent?"propertychange":"input")+a,d="k-state-disabled",u="disabled",h="readonly",f="change",p=s.extend({init:function(t,o){var r,l,c=this;s.fn.init.call(c,t,o),c._rules=e.extend({},c.rules,c.options.rules),t=c.element,r=t[0],c.wrapper=t,c._tokenize(),c._form(),c.element.addClass("k-textbox").attr("autocomplete","off").on("focus"+a,function(){var e=r.value;e?c._togglePrompt(!0):r.value=c._old=c._emptyMask,c._oldValue=e,c._timeoutId=setTimeout(function(){i(t,0,e?c._maskLength:0)})}).on("focusout"+a,function(){var e=t.val();clearTimeout(c._timeoutId),r.value=c._old="",e!==c._emptyMask&&(r.value=c._old=e),c._change(),c._togglePrompt()}),l=t.is("[disabled]")||e(c.element).parents("fieldset").is(":disabled"),l?c.enable(!1):c.readonly(t.is("[readonly]")),c.value(c.options.value||t.val()),n.notify(c)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:""},events:[f],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 n=this;s.fn.setOptions.call(n,t),n._rules=e.extend({},n.rules,n.options.rules),n._tokenize(),this._unbindInput(),this._bindInput(),n.value(n.element.val())},destroy:function(){var e=this;e.element.off(a),e._formElement&&(e._formElement.off("reset",e._resetHandler),e._formElement.off("submit",e._submitHandler)),s.fn.destroy.call(e)},raw:function(){var e=this._unmask(this.element.val(),0);return e.replace(RegExp(this.options.promptChar,"g"),"")},value:function(e){var i=this.element,o=this._emptyMask;return e===t?this.element.val():(null===e&&(e=""),o?(e=this._unmask(e+""),i.val(e?o:""),this._mask(0,this._maskLength,e),e=i.val(),this._oldValue=e,n._activeElement()!==i&&(e===o?i.val(""):this._togglePrompt()),t):(i.val(e),t))},_togglePrompt:function(e){var t=this.element[0],n=t.value;this.options.clearPromptChar&&(n=e?this._oldValue:n.replace(RegExp(this.options.promptChar,"g")," "),t.value=this._old=n)},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._maskLength&&e.element.on("keydown"+a,l(e._keydown,e)).on("keypress"+a,l(e._keypress,e)).on("paste"+a,l(e._paste,e)).on(c,l(e._propertyChange,e))},_unbindInput:function(){this.element.off("keydown"+a).off("keypress"+a).off("paste"+a).off(c)},_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly;t._unbindInput(),o||i?n.attr(u,i).attr(h,o).toggleClass(d,i):(n.removeAttr(u).removeAttr(h).removeClass(d),t._bindInput())},_change:function(){var e=this,t=e.value();t!==e._oldValue&&(e._oldValue=t,e.trigger(f),e.element.trigger(f))},_propertyChange:function(){var e,t,o=this,r=o.element[0],s=r.value;n._activeElement()===r&&(s===o._old||o._pasting||(t=i(r)[0],e=o._unmask(s.substring(t),t),r.value=o._old=s.substring(0,t)+o._emptyMask.substring(t),o._mask(t,t,e),i(r,t)))},_paste:function(e){var t=this,n=e.target,o=i(n),r=o[0],s=o[1],a=t._unmask(n.value.substring(s),s);t._pasting=!0,setTimeout(function(){var e=n.value,o=e.substring(r,i(n)[0]);n.value=t._old=e.substring(0,r)+t._emptyMask.substring(r),t._mask(r,r,o),r=i(n)[0],t._mask(r,r,a),i(n,r),t._pasting=!1})},_form:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value)})},t._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 n,r=e.keyCode,s=this.element[0],a=i(s),l=a[0],c=a[1],d=r===o.BACKSPACE;d||r===o.DELETE?(l===c&&(d?l-=1:c+=1,n=this._find(l,d)),n!==t&&n!==l?(d&&(n+=1),i(s,n)):l>-1&&this._mask(l,c,"",d),e.preventDefault()):r===o.ENTER&&this._change()},_keypress:function(e){var t,n;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===o.ENTER||(t=String.fromCharCode(e.which),n=i(this.element),this._mask(n[0],n[1],t),(e.keyCode===o.BACKSPACE||t)&&e.preventDefault())},_find:function(e,t){var n=this.element.val()||this._emptyMask,i=1;for(t===!0&&(i=-1);e>-1||e<=this._maskLength;){if(n.charAt(e)!==this.tokens[e])return e;e+=i}return-1},_mask:function(e,o,r,s){var a,l,c,d,u=this.element[0],h=u.value||this._emptyMask,f=this.options.promptChar,p=0;for(e=this._find(e,s),e>o&&(o=e),l=this._unmask(h.substring(o),o),r=this._unmask(r,e),a=r.length,r&&(l=l.replace(RegExp("^_{0,"+a+"}"),"")),r+=l,h=h.split(""),c=r.charAt(p);e<this._maskLength;)h[e]=c||f,c=r.charAt(++p),d===t&&p>a&&(d=e),e=this._find(e+1);u.value=this._old=h.join(""),n._activeElement()===u&&(d===t&&(d=this._maskLength),i(u,d))},_unmask:function(t,n){var i,o,r,s,a,l,c,d;if(!t)return"";for(t=(t+"").split(""),r=0,s=n||0,a=this.options.promptChar,l=t.length,c=this.tokens.length,d="";s<c&&(i=t[r],o=this.tokens[s],i===o||i===a?(d+=i===a?a:"",r+=1,s+=1):"string"!=typeof o?((o.test&&o.test(i)||e.isFunction(o)&&o(i))&&(d+=i,s+=1),r+=1):s+=1,!(r>=l)););return d},_tokenize:function(){for(var e,t,i,o,r=[],s=0,a=this.options.mask||"",l=a.split(""),c=l.length,d=0,u="",h=this.options.promptChar,f=n.getCulture(this.options.culture).numberFormat,p=this._rules;d<c;d++)if(e=l[d],t=p[e])r[s]=t,u+=h,s+=1;else for("."===e||","===e?e=f[e]:"$"===e?e=f.currency.symbol:"\\"===e&&(d+=1,e=l[d]),e=e.split(""),i=0,o=e.length;i<o;i++)r[s]=e[i],u+=e[i],s+=1;this.tokens=r,this._emptyMask=u,this._maskLength=u.length}});r.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(){var e,t=this.options.anchor,n=E(t);x.wrap(this.element).addClass("k-split-wrapper"),e="border-box"!==this.element.css("box-sizing")?n-(E(this.element)-this.element.width()):n,this.element.css({fontFamily:t.css("font-family"),"min-width":e})}function i(e){e.target.is(".k-toggle-button")||e.target.toggleClass(N,"press"==e.type)}function o(t){return t=e(t),t.hasClass("km-actionsheet")?t.closest(".km-popup-wrapper"):t.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function r(e){e.preventDefault()}function s(t,n){var i="next"===n?e.fn.next:e.fn.prev,o="next"===n?e.fn.first:e.fn.last,r=i.call(t);return r.is(":kendoFocusable")||!r.length?r:r.find(":kendoFocusable").length?o.call(r.find(":kendoFocusable")):s(r,n)}var a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k,x=window.kendo,C=x.Class,S=x.ui.Widget,T=e.proxy,D=x.isFunction,A=x.keys,E=x._outerWidth,M="k-toolbar",R="k-button",I="k-overflow-button",F="k-toggle-button",z="k-button-group",P="k-split-button",B="k-separator",L="k-popup",H="k-toolbar-resizable",N="k-state-active",O="k-state-disabled",V="k-state-hidden",U="k-group-start",W="k-group-end",j="k-primary",q="k-icon",G="k-i-",$="k-button-icon",Y="k-button-icontext",K="k-list-container k-split-container",Q="k-split-button-arrow",X="k-overflow-anchor",Z="k-overflow-container",J="k-toolbar-first-visible",ee="k-toolbar-last-visible",te="click",ne="toggle",ie="open",oe="close",re="overflowOpen",se="overflowClose",ae="never",le="auto",ce="always",de="k-overflow-hidden",ue=x.attr("uid");x.toolbar={},a={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},x.toolbar.registerComponent=function(e,t,n){a[e]={toolbar:t,overflow:n}},l=x.Class.extend({addOverflowAttr:function(){this.element.attr(x.attr("overflow"),this.options.overflow||le)},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(V).show(),this.options.hidden=!1},hide:function(){this.element.addClass(V).hide(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(e){e===t&&(e=!0),this.element.toggleClass(O,!e),this.options.enable=e},twin:function(){var e=this.element.attr(ue);return this.overflow?this.toolbar.element.find("["+ue+"='"+e+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ue+"='"+e+"']").data(this.options.type):t}}),x.toolbar.Item=l,c=l.extend({init:function(n,i){var o=e(n.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=o,this.options=n,this.toolbar=i,this.attributes(),n.primary&&o.addClass(j),n.togglable&&(o.addClass(F),this.toggle(n.selected)),n.url===t||n.useButtonTag||(o.attr("href",n.url),n.mobile&&o.attr(x.attr("role"),"button")),n.group&&(o.attr(x.attr("group"),n.group),this.group=this.toolbar.addToGroup(this,n.group)),!n.togglable&&n.click&&D(n.click)&&(this.clickHandler=n.click),n.togglable&&n.toggle&&D(n.toggle)&&(this.toggleHandler=n.toggle)},toggle:function(e,t){e=!!e,this.group&&e?this.group.select(this):this.group||this.select(e),t&&this.twin()&&this.twin().toggle(e)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+z).data("buttonGroup")},_addGraphics:function(){var t,n,i,o=this.element,r=this.options.icon,s=this.options.spriteCssClass,a=this.options.imageUrl;(s||a||r)&&(t=!0,o.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass(q)&&!e(this).hasClass("k-image")}).each(function(n,i){(1==i.nodeType||3==i.nodeType&&e.trim(i.nodeValue).length>0)&&(t=!1)}),o.addClass(t?$:Y)),r?(n=o.children("span."+q).first(),n[0]||(n=e('<span class="'+q+'"></span>').prependTo(o)),n.addClass(G+r)):s?(n=o.children("span.k-sprite").first(),n[0]||(n=e('<span class="k-sprite '+q+'"></span>').prependTo(o)),n.addClass(s)):a&&(i=o.children("img.k-image").first(),i[0]||(i=e('<img alt="icon" class="k-image" />').prependTo(o)),i.attr("src",a))}}),x.toolbar.Button=c,d=c.extend({init:function(e,t){c.fn.init.call(this,e,t);var n=this.element;n.addClass(R),this.addIdAttr(),e.align&&n.addClass("k-align-"+e.align),"overflow"!=e.showText&&e.text&&n.html(e.mobile?'<span class="km-text">'+e.text+"</span>":e.text),e.hasIcon="overflow"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),e.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(e){e===t&&(e=!1),this.element.toggleClass(N,e),this.options.selected=e}}),x.toolbar.ToolBarButton=d,u=c.extend({init:function(e,t){this.overflow=!0,c.fn.init.call(this,e,t);var n=this.element;"toolbar"!=e.showText&&e.text&&n.html(e.mobile?'<span class="km-text">'+e.text+"</span>":'<span class="k-text">'+e.text+"</span>"),e.hasIcon="toolbar"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),e.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),n.addClass(I+" "+R),e.hidden&&this.hide(),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(de)},select:function(e){e===t&&(e=!1),this.options.isChild?this.element.toggleClass(N,e):this.element.find(".k-button").toggleClass(N,e),this.options.selected=e}}),x.toolbar.OverflowButton=u,x.toolbar.registerComponent("button",d,u),h=l.extend({createButtons:function(t){var n,i,o=this.options,r=o.buttons||[];for(i=0;i<r.length;i++)r[i].uid||(r[i].uid=x.guid()),n=new t(e.extend({mobile:o.mobile,isChild:!0,type:"button"},r[i]),this.toolbar),n.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+V+"'):first").addClass(U),this.element.children().filter(":not('."+V+"'):last").addClass(W)}}),x.toolbar.ButtonGroup=h,f=h.extend({init:function(t,n){var i=this.element=e("<div></div>");this.options=t,this.toolbar=n,this.addIdAttr(),t.align&&i.addClass("k-align-"+t.align),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(z),this.element.data({type:"buttonGroup",buttonGroup:this})}}),x.toolbar.ToolBarButtonGroup=f,p=h.extend({init:function(t,n){var i=this.element=e("<li></li>");this.options=t,this.toolbar=n,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(u),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((t.mobile?"":z)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(de)}}),x.toolbar.OverflowButtonGroup=p,x.toolbar.registerComponent("buttonGroup",f,p),m=l.extend({init:function(t,n){var i=this.element=e('<div class="'+P+'" tabindex="0"></div>');this.options=t,this.toolbar=n,this.mainButton=new d(e.extend({},t,{hidden:!1}),n),this.arrowButton=e('<a class="'+R+" "+Q+'"><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(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),t.align&&i.addClass("k-align-"+t.align),t.id||(t.id=t.uid),i.attr("id",t.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(t.enable),t.hidden&&this.hide(),i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var t=this;t.popupElement.on("keydown","."+R,function(n){var i=e(n.target).parent();n.preventDefault(),n.keyCode===A.ESC||n.keyCode===A.TAB||n.altKey&&n.keyCode===A.UP?(t.toggle(),t.focus()):n.keyCode===A.DOWN?s(i,"next").focus():n.keyCode===A.UP?s(i,"prev").focus():n.keyCode!==A.SPACEBAR&&n.keyCode!==A.ENTER||t.toolbar.userEvents.trigger("tap",{target:e(n.target)})})},createMenuButtons:function(){var t,n,i=this.options,o=i.menuButtons;for(n=0;n<o.length;n++)t=new d(e.extend({mobile:i.mobile,type:"button",click:i.click},o[n]),this.toolbar),t.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var t=this.options,i=this.element;this.popupElement.attr("id",t.id+"_optionlist").attr(ue,t.rootUid),t.mobile&&(this.popupElement=o(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:t.mobile?e(t.mobile).children(".km-pane"):null,anchor:i,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:t.animation,open:n,activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(){i.focus()}}).data("kendoPopup"),this.popup.element.on(te,"a.k-button",r)},remove:function(){this.popup.element.off(te,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(e){e===t&&(e=!0),this.mainButton.enable(e),this.options.enable=e},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(V).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(V).hide(),this.options.hidden=!1}}),x.toolbar.ToolBarSplitButton=m,g=l.extend({init:function(t,n){var i,o,r=this.element=e('<li class="'+P+'"></li>'),s=t.menuButtons;for(this.options=t,this.toolbar=n,this.overflow=!0,this.mainButton=new u(e.extend({isChild:!0},t)),this.mainButton.element.appendTo(r),o=0;o<s.length;o++)i=new u(e.extend({mobile:t.mobile,isChild:!0},s[o]),this.toolbar),i.element.appendTo(r);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,r.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(de)}}),x.toolbar.OverflowSplitButton=g,x.toolbar.registerComponent("splitButton",m,g),v=l.extend({init:function(t,n){var i=this.element=e("<div>&nbsp;</div>");this.element=i,this.options=t,this.toolbar=n,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(B),i.data({type:"separator",separator:this})}}),_=l.extend({init:function(t,n){var i=this.element=e("<li>&nbsp;</li>");this.element=i,this.options=t,this.toolbar=n,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(B),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(de)}}),x.toolbar.registerComponent("separator",v,_),b=l.extend({init:function(t,n,i){var o=D(t)?t(n):t;o=o instanceof jQuery?o.wrap("<div></div>").parent():e("<div></div>").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})}}),x.toolbar.TemplateItem=b,w=l.extend({init:function(t,n,i){var o=e(D(t)?t(n):t);o=o instanceof jQuery?o.wrap("<li></li>").parent():e("<li></li>").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(de)}}),x.toolbar.OverflowTemplateItem=w,y=C.extend({init:function(e){this.name=e,this.buttons=[]},add:function(e){this.buttons[this.buttons.length]=e},remove:function(t){var n=e.inArray(t,this.buttons);this.buttons.splice(n,1)},select:function(e){var t,n;for(n=0;n<this.buttons.length;n++)t=this.buttons[n],t.select(!1);e.select(!0),e.twin()&&e.twin().select(!0)}}),k=S.extend({init:function(t,n){var o,s=this;if(S.fn.init.call(s,t,n),n=s.options,t=s.wrapper=s.element,t.addClass(M+" k-widget"),this.uid=x.guid(),this._isRtl=x.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",G="km-",R="km-button",z="km-buttongroup km-widget",N="km-state-active",O="km-state-disabled"),n.resizable?(s._renderOverflow(),t.addClass(H),s.overflowUserEvents=new x.UserEvents(s.element,{threshold:5,allowSelection:!0,filter:"."+X,tap:T(s._toggleOverflow,s)}),s._resizeHandler=x.onResize(function(){s.resize()})):s.popup={element:e([])},n.items&&n.items.length)for(o=0;o<n.items.length;o++)s.add(n.items[o]);s.userEvents=new x.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+ue+"="+this.uid+"] a."+R+", ["+ue+"="+this.uid+"] ."+I,tap:T(s._buttonClick,s),press:i,release:i}),s.element.on(te,"a.k-button",r),s._navigatable(),n.resizable&&s.popup.element.on(te,NaN,r),n.resizable&&this._toggleOverflowAnchor(),x.notify(s)},events:[te,ne,ie,oe,re,se],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(e,t){var n;return n=this._groups[t]?this._groups[t]:this._groups[t]=new y,n.add(e),n},destroy:function(){var t=this;t.element.find("."+P).each(function(t,n){e(n).data("kendoPopup").destroy()}),t.element.off(te,"a.k-button"),t.userEvents.destroy(),t.options.resizable&&(x.unbindResize(t._resizeHandler),t.overflowUserEvents.destroy(),t.popup.element.off(te,"a.k-button"),t.popup.destroy()),S.fn.destroy.call(t)},add:function(t){var n,i,o,r=a[t.type],s=t.template,l=this,c=l.isMobile?"":"k-item k-state-default",d=t.overflowTemplate;if(e.extend(t,{uid:x.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:x.guid()});s&&!d?t.overflow=ae:t.overflow||(t.overflow=le),t.overflow!==ae&&l.options.resizable&&(d?i=new w(d,t,l):r&&(i=new r.overflow(t,l),i.element.addClass(c)),i&&(t.overflow===le&&i.overflowHidden(),i.element.appendTo(l.popup.container),l.angular("compile",function(){return{elements:i.element.get()}}))),t.overflow!==ce&&(s?n=new b(s,t,l):r&&(n=new r.toolbar(t,l)),n&&(l.options.resizable?(n.element.appendTo(l.element).css("visibility","hidden"),l._shrink(l.element.innerWidth()),n.element.css("visibility","visible")):n.element.appendTo(l.element),l.angular("compile",function(){return{elements:n.element.get()}})))},_getItem:function(t){var n,i,o,r,s=this.options.resizable;return n=this.element.find(t),n.length||(n=e(".k-split-container[data-uid="+this.uid+"]").find(t)),r=n.length?n.data("type"):"",i=n.data(r),i?(i.main&&(n=n.parent("."+P),r="splitButton",i=n.data(r)),s&&(o=i.twin())):s&&(n=this.popup.element.find(t),r=n.length?n.data("type"):"",o=n.data(r),o&&o.main&&(n=n.parent("."+P),r="splitButton",o=n.data(r))),{type:r,toolbar:i,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,n){var i=this._getItem(e);t===n&&(n=!0),i.toolbar&&i.toolbar.enable(n),i.overflow&&i.overflow.enable(n)},getSelectedFromGroup:function(e){return this.element.find("."+F+"[data-group='"+e+"']").filter("."+N)},toggle:function(n,i){var o=e(n),r=o.data("button");r.options.togglable&&(i===t&&(i=!0),r.toggle(i,!0))},_renderOverflow:function(){var t=this,n=a.overflowContainer,i=t._isRtl,r=i?"left":"right";t.overflowAnchor=e(a.overflowAnchor).addClass(R),t.element.append(t.overflowAnchor),t.isMobile?(t.overflowAnchor.append('<span class="km-icon km-more"></span>'),n=o(n)):t.overflowAnchor.append('<span class="k-icon k-i-arrow-60-down"></span>'),t.popup=new x.ui.Popup(n,{origin:"bottom "+r,position:"top "+r,anchor:t.overflowAnchor,isRtl:i,animation:t.animation,appendTo:t.isMobile?e(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(n){var o=x.wrap(t.popup.element).addClass("k-overflow-wrapper");t.isMobile?t.popup.container.css("max-height",parseFloat(e(".km-content:visible").innerHeight())-15+"px"):o.css("margin-left",(i?-1:1)*((E(o)-o.width())/2+1)),t.trigger(re)&&n.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){t.trigger(se)&&e.preventDefault(),this.element.focus()}}),t.popup.element.on("keydown","."+R,function(n){var i,o=e(n.target),r=o.parent(),a=r.is("."+z)||r.is("."+P);n.preventDefault(),n.keyCode===A.ESC||n.keyCode===A.TAB||n.altKey&&n.keyCode===A.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):n.keyCode===A.DOWN?(i=!a||a&&o.is(":last-child")?r:o,s(i,"next").focus()):n.keyCode===A.UP?(i=!a||a&&o.is(":first-child")?r:o,s(i,"prev").focus()):n.keyCode!==A.SPACEBAR&&n.keyCode!==A.ENTER||t.userEvents.trigger("tap",{
target:e(n.target)})}),t.popup.container=t.isMobile?t.popup.element.find("."+Z):t.popup.element,t.popup.container.attr(ue,this.uid)},_toggleOverflowAnchor:function(){var e=!1;e=this.options.mobile?this.popup.element.find("."+Z).children(":not(."+de+", ."+L+")").length>0:this.popup.element.children(":not(."+de+", ."+L+")").length>0,this.overflowAnchor.css(e?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(n){var i,o,r,s,a,l,c,d=this,u=n.target.closest("."+Q).length;return n.preventDefault(),u?(d._toggle(n),t):(o=e(n.target).closest("."+R,d.element),o.hasClass(X)||(r=o.data("button"),!r&&d.popup&&(o=e(n.target).closest("."+I,d.popup.container),r=o.parent("li").data("button")),r&&r.options.enable&&(r.options.togglable?(a=D(r.toggleHandler)?r.toggleHandler:null,r.toggle(!r.options.selected,!0),l={target:o,group:r.options.group,checked:r.options.selected,id:r.options.id},a&&a.call(d,l),d.trigger(ne,l)):(a=D(r.clickHandler)?r.clickHandler:null,l={sender:d,target:o,id:r.options.id},a&&a.call(d,l),d.trigger(te,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(I)&&d.popup.close(),s=o.closest(".k-split-container"),s[0]&&(i=s.data("kendoPopup"),(i?i:s.parents(".km-popup-wrapper").data("kendoPopup")).close()))),t)},_navigatable:function(){var t=this;t.element.attr("tabindex",0).focus(function(){var t=e(this).find(":kendoFocusable:first");0!==t.length&&(t.is("."+X)&&(t=s(t,"next")),t[0].focus())}).on("keydown",T(t._keydown,t))},_keydown:function(n){var i,o,r,s,a,l,c,d=e(n.target),u=n.keyCode,h=this.element.children(":not(.k-separator):visible");return u===A.TAB&&(i=d.parentsUntil(this.element).last(),o=!1,r=!1,i.length||(i=d),i.is("."+X)&&(n.shiftKey&&n.preventDefault(),h.last().is(":kendoFocusable")?h.last().focus():h.last().find(":kendoFocusable").last().focus()),n.shiftKey||h.index(i)!==h.length-1||(o=!i.is("."+z)||d.is(":last-child")),s=h.index(i)===h.not(".k-overflow-anchor").first().index(),n.shiftKey&&s&&(r=!i.is("."+z)||d.is(":first-child")),o&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(n.preventDefault(),this.overflowAnchor.focus()),r&&(n.preventDefault(),a=this._getPrevFocusable(this.wrapper),a&&a.focus())),n.altKey&&u===A.DOWN?(l=e(document.activeElement).data("splitButton"),c=e(document.activeElement).is("."+X),l?l.toggle():c&&this._toggleOverflow(),t):u!==A.SPACEBAR&&u!==A.ENTER||d.is("input, checkbox")?t:(n.preventDefault(),d.is("."+P)&&(d=d.children().first()),this.userEvents.trigger("tap",{target:d}),t)},_getPrevFocusable:function(n){if(n.is("html"))return n;var i,o,r=n.prevAll();return r.each(function(){return o=e(this),o.is(":kendoFocusable")?(i=o,!1):o.find(":kendoFocusable").length>0?(i=o.find(":kendoFocusable").last(),!1):t}),i?i:this._getPrevFocusable(n.parent())},_toggle:function(t){var n,i=e(t.target).closest("."+P).data("splitButton");t.preventDefault(),i.options.enable&&(n=i.popup.element.is(":visible")?this.trigger(oe,{target:i.element}):this.trigger(ie,{target:i.element}),n||i.toggle())},_toggleOverflow:function(){this.popup.toggle()},_resize:function(e){var t=e.width;this.options.resizable&&(this.popup.close(),this._shrink(t),this._stretch(t),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var t=0;return this.element.children(":visible:not('."+V+"')").each(function(){t+=E(e(this),!0)}),Math.ceil(t)},_shrink:function(e){var t,n,i;if(e<this._childrenWidth())for(n=this.element.children(":visible:not([data-overflow='never'], ."+X+")"),i=n.length-1;i>=0&&(t=n.eq(i),!(e>this._childrenWidth()));i--)this._hideItem(t)},_stretch:function(e){var t,n,i;if(e>this._childrenWidth())for(n=this.element.children(":hidden:not('."+V+"')"),i=0;i<n.length&&(t=n.eq(i),!(e<this._childrenWidth())&&this._showItem(t,e));i++);},_hideItem:function(e){e.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").removeClass(de)},_showItem:function(e,t){return!!(e.length&&t>this._childrenWidth()+E(e,!0))&&(e.show(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(de),!0)},_markVisibles:function(){var e=this.popup.container.children(),t=this.element.children(":not(.k-overflow-anchor)"),n=e.filter(":not(.k-overflow-hidden)"),i=t.filter(":visible");e.add(t).removeClass(J+" "+ee),n.first().add(i.first()).addClass(J),n.last().add(i.last()).addClass(ee)}}),x.ui.plugin(k)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=window.kendo,i="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",f="k-i-volume-up",p="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=n.ui,A=".kendoMediaPlayer",E=new Date(1970,0,1),M=60*E.getTimezoneOffset(),R=n.ui.Widget,I=e.isArray,F={shortTime:"mm:ss",longTime:"HH:mm:ss"},z=n.template,P=e.proxy,B=n.keys,L={htmlPlayer:"<video class='"+x+"'> </video>",titleBar:z("<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='"+p+"' title='video quality' />",toolTip:"#= kendo.toString(new Date(value), 'HH:mm:ss') #"},H=R.extend({init:function(t,i){this.wrapper=e(t),R.fn.init.call(this,t,i),this.wrapper.addClass("k-mediaplayer k-widget"),i=this.options,this._currentIndex=0,this._createTitlebar(),this._createToolbar(),this._createDropDown(),this._createSlider(),this._createVolumeSlider(),this._timers={},this._aria(),this._navigatable(),i.media&&this.media(this.options.media),n.notify(this)},events:[i,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=P(this._sliderDragChange,this),this._sliderDraggingHandler=P(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=P(this._volumeDragging,this),this._volumeChangeHandler=P(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 I(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=P(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"}]}),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-button-bare"))},_createDropDown:function(){var e=this.wrapper.find(T+p),n=this.media();t===e.data("kendoDropDownList")&&(this._dropDownSelectHandler=P(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}),n&&I(n.source)&&(this._dropDown.setDataSource(n.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass("k-button k-button-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 n,i=e(t.target).children().first(),o=i.hasClass(m);this.media()&&((i.hasClass(m)||i.hasClass(g))&&(o?this.play():this.pause()),(i.hasClass(c)||i.hasClass(d))&&(this._isInFullScreen?(i.removeClass(d).addClass(c),this.fullScreen(!1)):(i.removeClass(c).addClass(d),this.fullScreen(!0))),(i.hasClass(u)||i.hasClass(h)||i.hasClass(f))&&(n=this.mute(),this.mute(!n)))},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(e){var t=this,n=e.sender,i=1e3*M;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&n.value()>this._seekBarLastPosition?setTimeout(function(){n.value(t._seekBarLastPosition)},1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(e.value-i)):t._media.currentTime=t._timeToSec(e.value-i),t.trigger(a),t._preventPlay=!0)},_changeVolumeButtonImage:function(e){var t=this._volumeButton,n=t.find("span"),i=n.attr("class");i=i.substring(0,i.lastIndexOf(" ")),0===e?(n.attr("class",i+" "+u),t.attr("title",this.options.messages.unmute),t.attr("aria-label",this.options.messages.unmute)):e>0&&e<51?(n.attr("class",i+" "+h),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute)):(n.attr("class",i+" "+f),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=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime,t=this._msToTime(e);return this._currentTimeElement.text(n.toString(t,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=1e3*(e+M),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(n.toString(this._msToTime(0),this._timeFormat)),this._slider.value(1e3*(0+M)),this.trigger(i)},_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(n.toString(e,this._timeFormat)),this._slider.setOptions({min:E.getTime(),max:e.getTime()}),this._isFirstRun||(this._resetTime(),this._isFirstRun=!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=P(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=P(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,n,i){var o=this;return null!==o._timers[e]&&clearTimeout(o._timers[e]),o._timers[e]=setTimeout(function(i){return function r(){t.call(i)&&(o._timers[e]=setTimeout(r,n))}}(i),n)},_youtubeApiReady:function(){this._configurePlayer()},_configurePlayer:function(){var e,t={autoplay:+this.options.autoPlay,wmode:"transparent",controls:0,rel:0,showinfo:0};this._onYouTubePlayerReady=P(this._onYouTubePlayerReady,this),window.onYouTubePlayerReady=this._onYouTubePlayerReady,this._onPlayerStateChangeHandler=P(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(i),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?=?([^#\&\?]*).*/,n=e.match(t);return n&&11===n[7].length&&(e=n[7]),e},_mouseClick:function(){this.isPaused()?this.play():this.pause()},_initializePlayer:function(){this._mouseMoveHandler||(this._mouseMoveHandler=P(this._mouseMove,this),this._mouseInHandler=P(this._mouseIn,this),this._mouseOutHandler=P(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=P(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=P(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=P(this._mediaDurationChange,this),this._mediaEndedHandler=P(this._mediaEnded,this),this._mediaCanPlayHandler=P(this._mediaReady,this),this._mediaPlayHandler=P(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},_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",n=this._titleBar.add(this._toolBar.element.parent());e?n.fadeIn(t):n.fadeOut(t)},setOptions:function(e){R.fn.setOptions.call(this,e)},destroy:function(){R.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._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._youTubeVideo?this._ytmedia.destroy():(this._media.src="",this._media.remove()),this._mouseMoveTimer=null,clearTimeout(this._mouseMoveTimer),n.destroy(this.element)},seek:function(e){if(t===e)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var n=e/1e3;return this._youTubeVideo?n+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(n,!0):this._media.currentTime=n,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(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&&(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():(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 n=this.element.get(0);e?(this.element.addClass("k-mediaplayer-fullscreen"),n.requestFullscreen?n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.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 n=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;return t===e||e===n?n:(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 n=this.dropdown();return t===e?t!==this._mediaData?this._mediaData:this._mediaData=this.options.media:(I(e.source)?(n.setDataSource(e.source),n.wrapper.show()):n.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=P(this._fullscreen,this),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+A,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=P(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,n;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?(n=this.mute(),this.mute(!n)):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,n){(n||t)()}),function(e,define){define("kendo.pivotgrid.min",["kendo.dom.min","kendo.data.min"],e)}(function(){return function(e,t){function n(e){var n="string"==typeof e?[{name:e}]:e,i="[object Array]"===we.call(n)?n:n!==t?[n]:[];return ke(i,function(e){return"string"==typeof e?{name:e}:{name:e.name,type:e.type}})}function i(e){var n="string"==typeof e?[{name:[e],expand:!1}]:e,i="[object Array]"===we.call(n)?n:n!==t?[n]:[];return ke(i,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,n,i){var o,s,a,l;if(n||(n=t),i||(i=0),l=n.members[i],l&&!l.measure){if(a=l.children,s=a.length,n===t?e[fe.stringify([l.name])]=!!s:s&&(e[fe.stringify(ae(n,i))]=!0),s)for(o=0;o<s;o++)r(e,t,a[o],i);r(e,t,n,i+1)}}function s(t){var n,i,o={};t.length&&r(o,t[0]),n=[];for(i in o)n.push({name:e.parseJSON(i),expand:o[i]});return n}function a(e,t){var n,i,o,r,s=t.tuples||[],a=s[0];if(a&&e.length<a.members.length)for(n=a.members,i=0;i<n.length;i++)if(!n[i].measure){for(o=!1,r=0;r<e.length;r++)if(0===H(e[r]).indexOf(n[i].hierarchy)){o=!0;break}o||e.push({name:[n[i].name],expand:!1})}}function l(e){var t,n=[],i=e.members;for(t=0;t<i.length;t++)i[t].measure||n.push({name:[i[t].name],expand:i[t].children.length>0});return n}function c(e,t,n){var o,r;return e=e||{},a(t,e),n.length>1&&t.push({name:De,measure:!0,children:i(n)}),o={members:t},e.tuples&&(r=x(e.tuples,o),r.tuple&&(t=l(r.tuple))),t}function d(e){var t=fe.getter(e.field,!0);return function(n,i){return e.aggregate(t(n.dataItem),i,n)}}function u(e){return"number"==typeof e&&!isNaN(e)}function h(e){return e&&e.getTime}function f(e){return e[e.length]={value:"",fmtValue:"",ordinal:e.length},e}function p(e,t,n){if(e.tuples.length<_(t.tuples,n))return t}function m(e,t,n,i,o){var r,s,a,l=e.length,c=_(t,i),d=i.length||1;for(s=0;s<n;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,n,i,o){var r,s,a,l=e.length,c=i.length||1;for(s=0;s<l;s++)for(a=v(e[s],t),a*=c,a+=s%c,r=0;r<n;r++)o[s*n+r].ordinal=a*n+r}function v(e,t){return x(t,e).index}function _(e,t){var n,i,o;if(!e.length)return 0;for(n=e.slice(),i=n.shift(),o=1;i;)i.members?[].push.apply(n,i.members):i.children&&(i.measure||(o+=i.children.length),[].push.apply(n,i.children)),i=n.shift();return t.length&&(o*=t.length),o}function b(e){return e||(e={tuples:[]}),e.tuples||(e.tuples=[]),e}function w(e,t,n){var i,o,r,s;if(!e)return 0;for(i=Math.max(n.length,1),o=e.members.slice(0,t),r=i,s=o.shift(),i>1&&(i+=1);s;)s.name===De?r+=i:s.children?[].push.apply(o,s.children):(r++,[].push.apply(o,s.members)),s=o.shift();return r}function y(e,t,n){var i,o,r,s,a,l;if(!t[0])return{parsedRoot:null,tuples:e,memberIndex:0,index:0};if(i=x(e,t[0]),!i.tuple)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};if(o=i.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 n=Math.max(n.length,1),{parsedRoot:i.tuple,index:i.index*n,memberIndex:s,tuples:e}}function k(e,t){var n,i,o=!0;for(e=e.members,t=t.members,n=0,i=e.length;n<i;n++)e[n].measure||t[n].measure||(o=o&&H(e[n])===H(t[n]));return o}function x(e,t){var n,i,o,r,s,a,l,c=0;for(n=0,i=e.length;n<i;n++){if(o=e[n],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 n,i,o,r="";for(i=0,o=e.length;i<o;i++)n=e[i],r+=n.name,t[r]||(t[r]=n)}function S(e,t){var n,i,o,r,s=e.members,a="",l="";for(n=0,i=s.length;n<i;n++){if(o=s[n],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 n,i,o,r;if(0===t.length)return-1;for(n=t[0],i=e.members,o=0,r=i.length;o<r;o++)if(i[o].name==n.name)return o}function D(n,i){if(!(i<0)){var o={name:De,measure:!0,children:[e.extend({members:[],dataIndex:n.dataIndex},n.members[i])]};n.members.splice(i,1,o),n.dataIndex=t}}function A(e,t){var n,i,o,r,s,a;if(e.length<1)return[];for(n=[],i={},o=T(e[0],t),r=0;r<e.length;r++)s=e[r],s.dataIndex=r,D(s,o),a=S(s,i),a?a.children.push(o<0||!a.measure?s:s.members[o].children[0]):n.push(s),C(s.members,i);return n}function E(e,t){var n,i,o,r,s,a,l,c,d;if(!e||!e.length)return t;for(n=[],i=R(e),o=i.length,r=Math.max(t.length/o,1),s=0;s<o;s++)for(l=r*s,c=r*i[s],a=0;a<r;a++)d=parseInt(c+a,10),n[parseInt(l+a,10)]=t[d]||{value:"",fmtValue:"",ordinal:d};return n}function M(e,t){var n,i,o,r,s,a,l,c;if(!e||!e.length)return t;for(n=[],i=R(e),o=i.length,r=Math.max(t.length/o,1),a=0;a<r;a++)for(l=o*a,s=0;s<o;s++)c=i[s]+l,n[l+s]=t[c]||{value:"",fmtValue:"",ordinal:c};return n}function R(e){var n,i,o,r,s,a,l;for(e=e.slice(),n=[],i=e.shift();i;){for(i.dataIndex!==t&&n.push(i.dataIndex),s=0,o=0,r=i.members.length;o<r;o++)l=i.members[o],a=l.children,l.measure?[].splice.apply(e,[0,0].concat(a)):[].splice.apply(e,[s,0].concat(a)),s+=a.length;i=e.shift()}return n}function I(e){var t=e.split(".");return t.length>2?t[0]+"."+t[1]:e}function F(e,t){var n=e.length-1,i=e[n],o=z(t,i);return o&&o.dir?i="ORDER("+i+".Children,"+o.field+".CurrentMember.MEMBER_CAPTION,"+o.dir+")":i+=".Children",e[n]=i,e}function z(e,t){for(var n=0,i=e.length;n<i;n++)if(0===t.indexOf(e[n].field))return e[n];return null}function P(e){var t,n="CROSSJOIN({";return e.length>2?(t=e.pop(),n+=P(e)):(n+=e.shift(),t=e.pop()),n+="},{",n+=t,n+="})"}function B(e,t){var n=e.slice(0);return t.length>1&&n.push("{"+L(t).join(",")+"}"),P(n)}function L(e){for(var n,i=0,o=e.length,r=[];i<o;i++)n=e[i],r.push(n.name!==t?n.name:n);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,n=[],i=0;i<t;i++)n.push(e[i].name[0]);return n}function O(e,t){var n,i,o,r=0,s=e.length,a=t.length;for(t=t.slice(0);r<s;r++)for(n=e[r],o=0;o<a;o++)if(i=I(t[o]),n.indexOf(i)!==-1){t[o]=n;break}return{names:t,expandedIdx:o,uniquePath:t.slice(0,o+1).join("")}}function V(e){for(var t,n,i,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=I(o[0]),n=0,i=c.length;n<i;n++)if(0===c[n].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 U(e,t,n){var i,o,r,s,a,l,c,d,u="";if(e=e||[],i=V(e),o=i.root,r=N(o),s=[],i=i.expanded,a=i.length,l=0,d=[],r.length>1||t.length>1){for(s.push(B(r,t));l<a;l++)c=F(i[l].name,n),d=O(c,r).names,s.push(B(d,t));u+=s.join(",")}else{for(;l<a;l++)c=F(i[l].name,n),d.push(c[0]);u+=r.concat(d).join(",")}return u}function W(e){var t="",n=e.value,i=e.field,o=e.operator;return"in"==o?(t+="{",t+=n,t+="}"):(t+="neq"==o||"doesnotcontain"==o?"-":"",t+="Filter(",t+=i+".MEMBERS",t+=fe.format(Y[o],i,n),t+=")"),t}function j(e,t){var n,i,o="",r=e.filters,s=r.length;for(i=s-1;i>=0;i--)n="SELECT (",n+=W(r[i]),n+=") ON 0",i==s-1?(n+=" FROM ["+t+"]",o=n):o=n+" FROM ( "+o+" )";return o}function q(e,t,n){var i,o,r="";if(t){r+="<"+e+">";for(o in t)i=t[o],n&&(o=o.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),
r+="<"+o+">"+i+"</"+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,n,i,o,r={tuples:[]},s=G(fe.getter("Tuples.Tuple",!0)(e)),a=fe.getter("Caption['#text']"),l=fe.getter("UName['#text']"),c=fe.getter("LName['#text']"),d=fe.getter("LNum['#text']"),u=fe.getter("CHILDREN_CARDINALITY['#text']",!0),h=fe.getter("['@Hierarchy']"),f=fe.getter("PARENT_UNIQUE_NAME['#text']",!0);for(t=0;t<s.length;t++){for(n=[],i=G(s[t].Member),o=0;o<i.length;o++)n.push({children:[],caption:a(i[o]),name:l(i[o]),levelName:c(i[o]),levelNum:d(i[o]),hasChildren:parseInt(u(i[o]),10)>0,parentName:f(i[o]),hierarchy:h(i[o])});r.tuples.push({members:n})}return r}var Y,K,Q,X,Z,J,ee,te,ne,ie,oe,re,se,ae,le,ce,de,ue,he,fe=window.kendo,pe=fe.ui,me=fe.Class,ge=pe.Widget,ve=fe.data.DataSource,_e=fe._outerWidth,be=fe._outerHeight,we={}.toString,ye=function(e){return e},ke=e.map,xe=e.extend,Ce=fe.isFunction,Se="change",Te="error",De="Measures",Ae="progress",Ee="stateReset",Me="auto",Re="<div/>",Ie=".kendoPivotGrid",Fe="__row_total__",ze="dataBinding",Pe="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-#=data.dataItem.value > 0 ? "circle" : data.dataItem.value < 0 ? "stop" : "arrow-60-up k-i-hold"#" title="#:data.dataItem.value#"></span>',Ue='<span class="k-icon k-i-#=data.dataItem.value > 0 ? "arrow-60-up" : data.dataItem.value < 0 ? "arrow-60-down" : "minus"#" title="#:data.dataItem.value#"></span>',We='#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || "&nbsp;" : "&nbsp;" #',je='<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>',qe={sum:function(e,t){var n=t.accumulator;return u(n)?u(e)&&(n+=e):n=e,n},count:function(e,t){return(t.accumulator||0)+1},average:{aggregate:function(e,n){var i=n.accumulator;return n.count===t&&(n.count=0),u(i)?u(e)&&(i+=e):i=e,u(e)&&n.count++,i},result:function(e){var t=e.accumulator;return u(t)&&(t/=e.count),t}},max:function(e,t){var n=t.accumulator;return u(n)||h(n)||(n=e),n<e&&(u(e)||h(e))&&(n=e),n},min:function(e,t){var n=t.accumulator;return u(n)||h(n)||(n=e),n>e&&(u(e)||h(e))&&(n=e),n}},Ge=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 n,i,o,r;if(t=t||{},n={},"[object Array]"===we.call(t)){for(o=0,r=t.length;o<r;o++)i=t[o],"string"==typeof i?n[i]={}:i[e]&&(n[i[e]]=i);t=n}return t},_rootTuples:function(e,n){var i,o,r,s,a=n.length||1,l=this.dimensions||[],c=0,d=e.length,u=[],h=[];if(d||n.length){for(c=0;c<a;c++){for(i={members:[]},s=0;s<d;s++)o=e[s],r=o.split("&"),i.members[i.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&&(i.members[i.members.length]={children:[],caption:n[c].caption,name:n[c].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),u[u.length]=i}h.push(Fe)}return{keys:h,tuples:u}},_expandedTuples:function(e,n,i){var o,r,s,a,l,c,d,u,h,f,p,m=i.length||1,g=this.dimensions||[],v=[],_=[];for(s in e){for(a=e[s],d=this._findExpandedMember(n,a.uniquePath),l=v[d.index]||[],c=_[d.index]||[],u=d.member.names,o=0;o<m;o++){for(r={members:[]},p=0;p<u.length;p++)p===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,p).join(""))):(f=u[p],h=f.split("&"),r.members[r.members.length]={children:[],caption:(g[f]||{}).caption||"All",name:f,levelName:f,levelNum:"0",hasChildren:!0,parentName:h.length>1?h[0]:t,hierarchy:f});m>1&&(r.members[r.members.length]={children:[],caption:i[o].caption,name:i[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 n=0;n<e.length;n++)if(e[n].uniquePath===t)return{member:e[n],index:n}},_asTuples:function(e,t,n){var i,o;return n=n||[],i=this._rootTuples(t.root,n),o=this._expandedTuples(e,t.expanded,n),{keys:[].concat.apply(i.keys,o.keys),tuples:[].concat.apply(i.tuples,o.tuples)}},_measuresInfo:function(e,t){for(var n,i,o=0,r=e&&e.length,s=[],a={},l={},c=this.measures||{};o<r;o++)i=e[o].descriptor.name,n=c[i]||{},s.push(i),n.result&&(a[i]=n.result),n.format&&(l[i]=n.format);return{names:s,formats:l,resultFuncs:a,rowAxis:t}},_toDataArray:function(e,t,n,i){var o,r,s,a,l,c,d,u,h,f,p=[],m=1,g=[],v=n.length||1,_=i.length||1;for(t.rowAxis?(g=t.names,m=g.length):f=t.names,s=0;s<v;s++)for(d=e[n[s]||Fe],c=0;c<m;c++)for(t.rowAxis&&(f=[g[c]]),a=0;a<_;a++)for(h=i[a]||Fe,u=d.items[h],o=h===Fe?d.aggregates:u?u.aggregates:{},l=0;l<f.length;l++)r=f[l],this._addData(p,o[r],t.formats[r],t.resultFuncs[r]);return p},_addData:function(e,t,n,i){var o,r="";t&&(t=i?i(t):t.accumulator,r=n?fe.format(n,t):t),o=e.length,e[o]={ordinal:o,value:t||"",fmtValue:r}},_matchDescriptors:function(e,n,i){for(var o,r,s,a,l=n.names,c=n.expandedIdx;c>0;)if(o=l[--c].split("&"),o.length>1&&(r=o[0],s=o[1],a=i[r](e),a=a!==t&&null!==a?""+a:a,a!=s))return!1;return!0},_calculateAggregate:function(e,t,n){var i,o,r,s={};for(r=0;r<e.length;r++)o=e[r].descriptor.name,i=n.aggregates[o]||{},i.accumulator=e[r].aggregator(t,i),s[o]=i;return s},_processColumns:function(e,n,i,o,r,s,a,l){for(var c,d,u,h,f,p,m,g,v=r.dataItem,_=0;_<n.length;_++)d=n[_],this._matchDescriptors(v,d,i)&&(g=d.names.slice(0,d.expandedIdx).join(""),p=d.names[d.expandedIdx],c=i[p](v),c=c!==t&&null!==c?""+c:c,m=p,p=p+"&"+c,f=g+p,u=o[f]||{index:a.columnIndex,parentName:m,name:p,uniquePath:g+m,value:c},h=s.items[f]||{aggregates:{}},s.items[f]={index:u.index,aggregates:this._calculateAggregate(e,r,h)},l&&(o[f]||a.columnIndex++,o[f]=u))},_measureAggregators:function(e){var t,n,i,o,r,s,a=e.measures||[],l=this.measures||{},c=[];if(a.length){for(i=0,o=a.length;i<o;i++)if(t=a[i],n=l[t.name],r=null,n){if(s=n.aggregate,"string"==typeof s){if(r=qe[s.toLowerCase()],!r)throw Error("There is no such aggregate function");n.aggregate=r.aggregate||r,n.result=r.result}c.push({descriptor:t,caption:n.caption,result:n.result,aggregator:d(n)})}}else c.push({descriptor:{name:"default"},caption:"default",aggregator:function(){return 1}});return c},_buildGetters:function(e){var t,n,i,r={};for(i=0;i<e.length;i++)n=e[i],t=n.split("&"),t.length>1?r[t[0]]=fe.getter(t[0],!0):r[n]=fe.getter(o(n),!0);return r},_parseDescriptors:function(e){var t,n=V(e),i=N(n.root),o=n.expanded,r=[];for(t=0;t<o.length;t++)r.push(O(o[t].name,i));return{root:i,expanded:r}},_filter:function(e,t){var n,i,o;if(!t)return e;for(i=0,o=t.filters;i<o.length;i++)n=o[i],"in"===n.operator&&(o[i]=this._normalizeFilter(n));return new fe.data.Query(e).filter(t).data},_normalizeFilter:function(e){var t,n=e.value.split(","),i=[];if(!n.length)return n;for(t=0;t<n.length;t++)i.push({field:e.field,operator:"eq",value:n[t]});return{logic:"or",filters:i}},process:function(e,n){var o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,M,R,I,F;if(e=e||[],n=n||{},e=this._filter(e,n.filter),o=n.measures||[],r="rows"===n.measuresAxis,s=n.columns||[],a=n.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=i(n.measures)),s=this._parseDescriptors(s),a=this._parseDescriptors(a),l={},c={},d={},h={columnIndex:0},f=this._measureAggregators(n),p=this._buildGetters(s.root),m=this._buildGetters(a.root),g=!1,v=s.expanded,_=a.expanded,y=0!==_.length,I=e.length,F=0,s.root.length||a.root.length)for(g=!0,F=0;F<I;F++)for(b=e[F],w={dataItem:b,index:F},S=l[Fe]||{items:{},aggregates:{}},this._processColumns(f,v,p,c,w,S,h,!y),S.aggregates=this._calculateAggregate(f,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(f,v,p,c,w,E,h,!0),E.aggregates=this._calculateAggregate(f,w,E),l[T]=E):this._processColumns(f,v,p,c,w,{items:{},aggregates:{}},h,!0);return g&&I?(!(f.length>1)||n.columns&&n.columns.length||(s={root:[],expanded:[]}),M=this._asTuples(c,s,r?[]:f),R=this._asTuples(d,a,r?f:[]),c=M.tuples,d=R.tuples,l=this._toDataArray(l,this._measuresInfo(f,r),R.keys,M.keys)):l=c=d=[],{axes:{columns:{tuples:c},rows:{tuples:d}},data:l}}}),$e=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(n){var i,o=this.options||{};return n===t?(o.connection||{}).catalog:(i=o.connection||{},i.catalog=n,this.options.connection=i,e.extend(this.transport.options,{connection:i}),t)},cube:function(e){var n,i=this.options||{};return e===t?(i.connection||{}).cube:(n=i.connection||{},n.cube=e,this.options.connection=n,xe(!0,this.transport.options,{connection:n}),t)}}),Ye=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 Ge(r)),ve.fn.init.call(this,xe(!0,{},{schema:a},t)),this.transport=new $e(this.options.transport||{},this.transport),this._columns=i(this.options.columns),this._rows=i(this.options.rows),o=this.options.measures||[],"[object Object]"===we.call(o)&&(s=o.axis||"columns",o=o.values||[]),this._measures=n(o),this._measuresAxis=s,this._skipNormalize=0,this._axes={}},_cubeSchema:function(t){return{dimensions:function(){var e,n=[],i=t.dimensions;for(e in i)n.push({name:e,caption:i[e].caption||e,uniqueName:e,defaultHierarchy:e,type:1});return t.measures&&n.push({name:De,caption:De,uniqueName:De,type:2}),n},hierarchies:function(){return[]},measures:function(){var e,n=[],i=t.measures;for(e in i)n.push({name:e,caption:e,uniqueName:e,aggregator:e});return n},members:e.proxy(function(e,n){var i,r,s=n.levelUniqueName||n.memberUniqueName,a=this.options.schema.data,l=Ce(a)?a:fe.getter(a,!0),c=this.options.data&&l(this.options.data)||this._rawData||[],d=[],u=0,h={};if(s&&(s=s.split(".")[0]),!n.treeOp)return d.push({caption:t.dimensions[s].caption||s,childrenCardinality:"1",dimensionUniqueName:s,hierarchyUniqueName:s,levelUniqueName:s,name:s,uniqueName:s}),d;for(i=fe.getter(o(s),!0);u<c.length;u++)r=i(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=i(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=i(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:n(e),sort:this.sort(),filter:this.filter()}),t)},measuresAxis:function(){return this._measuresAxis||"columns"},_expandPath:function(e,t){var n,o,r,s="columns"===t?"columns":"rows",a="columns"===t?"rows":"columns",l=i(e),d=H(l[l.length-1]);for(this._lastExpanded=s,l=c(this.axes()[s],l,this.measures()),n=0;n<l.length;n++)if(o=H(l[n]),o===d){if(l[n].expand)return;l[n].expand=!0}else l[n].expand=!1;r={},r[s]=l,r[a]=this._descriptorsForAxis(a),this._query(r)},_descriptorsForAxis:function(e){var t=this.axes(),n=this[e]()||[];return t&&t[e]&&t[e].tuples&&t[e].tuples[0]&&(n=s(t[e].tuples||[])),n},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 n=this._mergeState(t);return this._data.length&&this.cubeBuilder?(this._params(n),this._updateLocalData(this._pristineData),e.Deferred().resolve().promise()):this.read(n)},_mergeState:function(e){return e=ve.fn._mergeState.call(this,e),e!==t&&(this._measures=n(e.measures),e.columns?e.columns=i(e.columns):e.columns||(this._columns=[]),e.rows?e.rows=i(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 n,i,o,r,s,a,l,c,d,u,h;return this.cubeBuilder&&(n=this.cubeBuilder.process(e,this._requestData),e=n.data,t=n.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)},i=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-=1,this.cubeBuilder||(e=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:i,rowIndexes:o,data:e})),"rows"==this._lastExpanded?(r=t.columns.tuples,a=this._columnMeasures(),s=p(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=p(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),n=this.reader.data(e);return this.cubeBuilder&&(this._rawData=n),this._processResult(n,t)},_createTuple:function(e,t,n){var i,o,r,s,a,l,c,d,u=e.members,h=u.length,f={members:[]},p=0;for(t&&(h-=1);p<h;p++)d=u[p],o=+d.levelNum,r=d.name,s=d.parentName,c=d.caption||r,a=d.hasChildren,l=d.hierarchy,i=d.levelName,n&&(c="All",0===o?s=d.name:o-=1,a=!0,r=l=i=s),f.members.push({name:r,children:[],caption:c,levelName:i,levelNum:""+o,hasChildren:a,hierarchy:l,parentName:n?"":s});return t&&f.members.push({name:t.name,children:[]}),f},_hasRoot:function(e,t,n){var i,o,r,s,a,l,c;if(t.length)return x(t,e).tuple;for(i=e.members,s=!0,l=0,c=i.length;l<c;l++)if(o=i[l],a=+o.levelNum||0,r=n[l],!(0===a||r&&o.name===H(r))){s=!1;break}return s},_mergeAxes:function(e,t,n){var i,o,r,s,a,l=this._columnMeasures(),c=this._rowMeasures(),d=this.axes(),u=_(d.rows.tuples,c),h=e.rows.tuples.length,f=_(d.columns.tuples,l),p=e.columns.tuples.length;return"columns"==n?(p=f,o=e.columns.tuples):(o=A(e.columns.tuples,l),t=M(o,t)),r=y(d.columns.tuples,o,l),"rows"==n?(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,f!==_(d.columns.tuples,l)?(i=r.index+w(r.parsedRoot,r.memberIndex,l),a=f+p,t=this._mergeColumnData(t,i,h,p,a)):u!==_(d.rows.tuples,c)&&(i=s.index+w(s.parsedRoot,s.memberIndex,c),t=this._mergeRowData(t,i,h,p)),0===d.columns.tuples.length&&0===d.rows.tuples.length&&(t=[]),{axes:d,data:t}},_mergeColumnData:function(e,t,n,i,o){var r,s,a,l=this.data().toJSON(),c=0,d=Math.max(this._columnMeasures().length,1);for(n=Math.max(n,1),l.length>0&&(c=d,o-=d),r=0;r<n;r++)s=t+r*o,a=e.splice(0,i),a.splice(0,c),[].splice.apply(l,[s,0].concat(a));return l},_mergeRowData:function(e,t,n,i){var o,r,s,a=this.data().toJSON(),l=Math.max(this._rowMeasures().length,1);for(i=Math.max(i,1),a.length>0&&(n-=l,e.splice(0,i*l)),o=0;o<n;o++)s=e.splice(0,i),r=t*i+o*i,[].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 n=this;return e===t?n._data:(this._pristineData=e.slice(0),this._updateLocalData(e,{columns:this.columns(),rows:this.rows(),measures:this.measures()}),t)},_normalizeTuples:function(e,t,n,i){var o,r,s,a=i.length||1,l=0,c=[],d={},u=0;if(e.length){if(this._skipNormalize<=0&&!this._hasRoot(e[0],t,n)){for(this._skipNormalize=0;l<a;l++)c.push(this._createTuple(e[0],i[l],!0)),d[l]=l;e.splice.apply(e,[0,e.length].concat(c).concat(e)),l=a}if(i.length)for(s=o=e[l],r=o.members.length-1;o;){if(u>=a&&(u=0),o.members[r].name!==i[u].name&&(e.splice(l,0,this._createTuple(o,i[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,i[u])),d[l]=l,l+=1;o=e[l]}s=o}return d}},_addMissingDataItems:function(e,n){for(;n.rowIndexes[parseInt(e.length/n.columnsLength,10)]!==t;)for(var i=0;i<n.columnsLength;i++)e=f(e);for(;n.columnIndexes[e.length%n.columnsLength]!==t;)e=f(e);return e},_normalizeOrdinals:function(e,t,n){var i=n.lastOrdinal;if(!t)return f(e);if(t.ordinal-i>1)for(i+=1;i<t.ordinal&&e.length<n.length;)e=this._addMissingDataItems(f(e),n),i+=1;return t.ordinal=e.length,e[e.length]=t,e},_normalizeData:function(e){var t,n,i,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,i=e.length,o.length===i)return o;for(;s.length<i;)t=o[r++],t&&(n=t.ordinal),s=this._normalizeOrdinals(this._addMissingDataItems(s,e),t,e),e.lastOrdinal=n;return s},discover:function(t,n){var i=this,o=i.transport;return e.Deferred(function(e){o.discover(xe({success:function(t){t=i.reader.parse(t),i._handleCustomErrors(t)||(n&&(t=n(t)),e.resolve(t))},error:function(t,n,o){e.reject(t),i.error(t,n,o)}},t))}).promise().done(function(){i.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,n=function(e){return function(n){return t.reader.members(n,e)}}(e);return t.discover({data:{command:"schemaMembers",restrictions:xe({catalogName:t.transport.catalog(),cubeName:t.transport.cube()},e)}},n)},_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}});Ye.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data;if(t.data=n,!(t instanceof Ye)&&t instanceof fe.data.DataSource)throw Error("Incorrect DataSource type. Only PivotDataSource instances are supported");return t instanceof Ye?t:new Ye(t)},Y={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}"'},K={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,n,i,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||[],n=e.rows||[],i=e.measures||[],o="rows"===e.measuresAxis,r=e.sort||[],!t.length&&n.length&&(!i.length||i.length&&o)&&(t=n,n=[],o=!1),t.length||n.length||(o=!1),t.length?s+=U(t,o?[]:i,r):i.length&&!o&&(s+=L(i).join(",")),s+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(n.length||o&&i.length>1)&&(s+=", NON EMPTY {",s+=n.length?U(n,o?i:[],r):L(i).join(","),s+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),e.filter?(s+=" FROM ",s+="(",s+=j(e.filter,e.connection.cube),s+=")"):s+=" FROM ["+e.connection.cube+"]",1==i.length&&t.length&&(s+=" WHERE ("+L(i).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 n='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis">';return n+="<RequestType>"+(K[t.command]||t.command)+"</RequestType>",n+="<Restrictions>"+q("RestrictionList",t.restrictions,!0)+"</Restrictions>",t.connection&&t.connection.catalog&&(t.properties=e.extend({},{Catalog:t.connection.catalog},t.properties)),n+="<Properties>"+q("PropertyList",t.properties)+"</Properties>",n+="</Discover></Body></Envelope>"}},X=fe.data.RemoteTransport.extend({init:function(e){var t=e;e=this.options=xe(!0,{},this.options,e),fe.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,n){return t.data=t.data||{},e.extend(!0,t.data,{connection:this.options.connection}),fe.data.RemoteTransport.fn.setup.call(this,t,n)},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:fe.getter("CUBE_NAME['#text']",!0),caption:fe.getter("CUBE_CAPTION['#text']",!0),description:fe.getter("DESCRIPTION['#text']",!0),type:fe.getter("CUBE_TYPE['#text']",!0)},catalogs:{name:fe.getter("CATALOG_NAME['#text']",!0),description:fe.getter("DESCRIPTION['#text']",!0)},measures:{name:fe.getter("MEASURE_NAME['#text']",!0),caption:fe.getter("MEASURE_CAPTION['#text']",!0),uniqueName:fe.getter("MEASURE_UNIQUE_NAME['#text']",!0),description:fe.getter("DESCRIPTION['#text']",!0),aggregator:fe.getter("MEASURE_AGGREGATOR['#text']",!0),groupName:fe.getter("MEASUREGROUP_NAME['#text']",!0),displayFolder:fe.getter("MEASURE_DISPLAY_FOLDER['#text']",!0),defaultFormat:fe.getter("DEFAULT_FORMAT_STRING['#text']",!0)},kpis:{name:fe.getter("KPI_NAME['#text']",!0),caption:fe.getter("KPI_CAPTION['#text']",!0),value:fe.getter("KPI_VALUE['#text']",!0),goal:fe.getter("KPI_GOAL['#text']",!0),status:fe.getter("KPI_STATUS['#text']",!0),trend:fe.getter("KPI_TREND['#text']",!0),statusGraphic:fe.getter("KPI_STATUS_GRAPHIC['#text']",!0),trendGraphic:fe.getter("KPI_TREND_GRAPHIC['#text']",!0),description:fe.getter("KPI_DESCRIPTION['#text']",!0),groupName:fe.getter("MEASUREGROUP_NAME['#text']",!0)},dimensions:{name:fe.getter("DIMENSION_NAME['#text']",!0),caption:fe.getter("DIMENSION_CAPTION['#text']",!0),description:fe.getter("DESCRIPTION['#text']",!0),uniqueName:fe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),defaultHierarchy:fe.getter("DEFAULT_HIERARCHY['#text']",!0),type:fe.getter("DIMENSION_TYPE['#text']",!0)},hierarchies:{name:fe.getter("HIERARCHY_NAME['#text']",!0),caption:fe.getter("HIERARCHY_CAPTION['#text']",!0),description:fe.getter("DESCRIPTION['#text']",!0),uniqueName:fe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),dimensionUniqueName:fe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:fe.getter("HIERARCHY_DISPLAY_FOLDER['#text']",!0),origin:fe.getter("HIERARCHY_ORIGIN['#text']",!0),defaultMember:fe.getter("DEFAULT_MEMBER['#text']",!0)},levels:{name:fe.getter("LEVEL_NAME['#text']",!0),caption:fe.getter("LEVEL_CAPTION['#text']",!0),description:fe.getter("DESCRIPTION['#text']",!0),uniqueName:fe.getter("LEVEL_UNIQUE_NAME['#text']",!0),dimensionUniqueName:fe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:fe.getter("LEVEL_DISPLAY_FOLDER['#text']",!0),orderingProperty:fe.getter("LEVEL_ORDERING_PROPERTY['#text']",!0),origin:fe.getter("LEVEL_ORIGIN['#text']",!0),hierarchyUniqueName:fe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0)},members:{name:fe.getter("MEMBER_NAME['#text']",!0),caption:fe.getter("MEMBER_CAPTION['#text']",!0),uniqueName:fe.getter("MEMBER_UNIQUE_NAME['#text']",!0),dimensionUniqueName:fe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),hierarchyUniqueName:fe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),levelUniqueName:fe.getter("LEVEL_UNIQUE_NAME['#text']",!0),childrenCardinality:fe.getter("CHILDREN_CARDINALITY['#text']",!0)}},J=["axes","catalogs","cubes","dimensions","hierarchies","levels","measures"],ee=fe.data.XmlDataReader.extend({init:function(e){fe.data.XmlDataReader.call(this,e),this._extend(e)},_extend:function(e){for(var t,n,i=0,o=J.length;i<o;i++)t=J[i],n=e[t],n&&n!==ye&&(this[t]=n)},parse:function(e){var t=fe.data.XmlDataReader.fn.parse(e.replace(/<(\/?)(\w|-)+:/g,"<$1"));return fe.getter("['Envelope']['Body']",!0)(t)},errors:function(e){var t=fe.getter("['Fault']",!0)(e);return t?[{faultstring:fe.getter("faultstring['#text']",!0)(t),faultcode:fe.getter("faultcode['#text']",!0)(t)}]:null},axes:function(e){var t,n,i,o;for(e=fe.getter('ExecuteResponse["return"].root',!0)(e),t=G(fe.getter("Axes.Axis",!0)(e)),i={columns:{},rows:{}},o=0;o<t.length;o++)n=t[o],"sliceraxis"!==n["@name"].toLowerCase()&&(i.columns.tuples?i.rows=$(n):i.columns=$(n));return i},data:function(e){var t,n,i,o,r,s;for(e=fe.getter('ExecuteResponse["return"].root',!0)(e),t=G(fe.getter("CellData.Cell",!0)(e)),n=[],i=fe.getter("['@CellOrdinal']"),o=fe.getter("Value['#text']"),r=fe.getter("FmtValue['#text']"),s=0;s<t.length;s++)n.push({value:o(t[s]),fmtValue:r(t[s]),ordinal:parseInt(i(t[s]),10)});return n},_mapSchema:function(e,t){var n,i,o,r,s;for(e=fe.getter('DiscoverResponse["return"].root',!0)(e),n=G(fe.getter("row",!0)(e)),i=[],o=0;o<n.length;o++){r={};for(s in t)r[s]=t[s](n[o]);i.push(r)}return i},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,fe.data,{PivotDataSource:Ye,XmlaTransport:X,XmlaDataReader:ee,PivotCubeBuilder:Ge,transports:{xmla:X},readers:{xmla:ee}}),te=function(e,t){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].field===t)return e[n];return null},ne=function(e,t){var n,i,o=[];for(n=0,i=e.length;n<i;n++)e[n].field!==t&&o.push(e[n]);return o},fe.ui.PivotSettingTarget=ge.extend({init:function(t,n){var i=this;ge.fn.init.call(i,t,n),i.element.addClass("k-pivot-setting"),i.dataSource=fe.data.PivotDataSource.create(n.dataSource),i._refreshHandler=e.proxy(i.refresh,i),i.dataSource.first(Se,i._refreshHandler),n.template||(i.options.template="<div data-"+fe.ns+'name="${data.name || data}">${data.name || data}'+(i.options.enabled?'<a class="k-button k-button-icon k-button-bare"><span class="k-icon k-i-close k-setting-delete"></span></a>':"")+"</div>"),i.template=fe.template(i.options.template),i.emptyTemplate=fe.template(i.options.emptyTemplate),i._sortable(),i.element.on("click"+Ie,".k-button,.k-item",function(t){var n=e(t.target),o=n.closest("["+fe.attr("name")+"]").attr(fe.attr("name"));o&&(n.hasClass("k-i-close")?i.remove(o):i.options.sortable&&n[0]===t.currentTarget&&i.sort({field:o,dir:n.find(".k-i-sort-asc-sm")[0]?"desc":"asc"}))}),(n.filterable||n.sortable)&&(i.fieldMenu=new pe.PivotFieldMenu(i.element,{messages:i.options.messages.fieldMenu,filter:".k-setting-fieldmenu",filterable:n.filterable,sortable:n.sortable,dataSource:i.dataSource})),i.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 n=t.item.attr(fe.attr("name"));"receive"==t.action?e.add(n):"remove"==t.action?e.remove(n):"sort"==t.action&&e.move(n,t.newIndex)}}).data("kendoSortable"))},_indexOf:function(e,t){var n,i,o=-1;for(n=0,i=t.length;n<i;n++)if(H(t[n])===e){o=n;break}return o},_isKPI:function(e){return"kpi"===e.type||e.measure},validate:function(e){var t,n,i=2==e.type||"aggregator"in e||this._isKPI(e);return i?"measures"===this.options.setting:"measures"===this.options.setting?i:(t=this.dataSource[this.options.setting](),n=e.defaultHierarchy||e.uniqueName,!(this._indexOf(n,t)>-1)&&(t=this.dataSource["columns"===this.options.setting?"rows":"columns"](),!(this._indexOf(n,t)>-1)))},add:function(t){var n,i,o=this.dataSource[this.options.setting]();for(t=e.isArray(t)?t.slice(0):[t],n=0,i=t.length;n<i;n++)this._indexOf(t[n],o)!==-1&&(t.splice(n,1),n-=1,i-=1);t.length&&(o=o.concat(t),this.dataSource[this.options.setting](o))},move:function(e,t){var n=this.dataSource[this.options.setting](),i=this._indexOf(e,n);i>-1&&(e=n.splice(i,1)[0],n.splice(t,0,e),this.dataSource[this.options.setting](n))},remove:function(e){var t=this.dataSource[this.options.setting](),n=this._indexOf(e,t),i=this.dataSource.sort(),o=this.dataSource.filter();n>-1&&(o&&(o.filters=ne(o.filters,e),this.dataSource._filter.filters=o.filters,o.filters.length||(this.dataSource._filter=null)),i&&(i=ne(i,e),this.dataSource._sort=i),t.splice(n,1),this.dataSource[this.options.setting](t))},sort:function(e){var t=this.options.sortable,n=t===!0||t.allowUnsort,i=n&&"asc"===e.dir,o=this.dataSource.sort()||[],r=ne(o,e.field);i&&o.length!==r.length&&(e=null),e&&r.push(e),this.dataSource.sort(r)},refresh:function(){var e,n="",i=this.dataSource[this.options.setting](),o=i.length,r=0;if(o)for(;r<o;r++)e=i[r],e=e.name===t?{name:e}:e,n+=this.template(xe({sortIcon:this._sortIcon(e.name)},e));else n=this.emptyTemplate(this.options.messages.empty);this.element.html(n)},destroy:function(){ge.fn.destroy.call(this),this.dataSource.unbind(Se,this._refreshHandler),this.element.off(Ie),this.sortable&&this.sortable.destroy(),this.fieldMenu&&this.fieldMenu.destroy(),this.element=null,this._refreshHandler=null},_sortIcon:function(e){var t=this.dataSource.sort(),n=te(t,H(e)),i="";return n&&(i="k-i-sort-"+n.dir),i}}),ie=ge.extend({init:function(n,i){var o,r,s=this;ge.fn.init.call(s,n,i),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 n,i,a,l,c=e(this),d=o,u="expandColumn",h=c.attr(fe.attr("path")),f={axis:"columns",path:e.parseJSON(h)};c.parent().is("td")&&(d=r,u="expandRow",f.axis="rows"),i=c.hasClass(He),a=d.metadata[h],l=a.expanded===t,n=i?Le:Be,f.childrenLoaded=a.maxChildren>a.children,s.trigger(n,f)||(d.metadata[h].expanded=!i,c.toggleClass(He,!i).toggleClass(Ne,i),!i&&l?s.dataSource[u](f.path):s.refresh())}),s._scrollable(),s.options.autoBind&&s.dataSource.fetch(),fe.notify(s)},events:[ze,Pe,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,n=this.options.dataCellTemplate,i=this.options.kpiStatusTemplate,o=this.options.kpiTrendTemplate;this._columnBuilder.template=fe.template(e||Oe,{useWithBlock:!!e}),this._contentBuilder.dataTemplate=fe.template(n||We,{useWithBlock:!!n}),this._contentBuilder.kpiStatusTemplate=fe.template(i||Ve,{useWithBlock:!!i}),this._contentBuilder.kpiTrendTemplate=fe.template(o||Ue,{useWithBlock:!!o}),this._rowBuilder.template=fe.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 n,i=this._contentBuilder,o=i.columnIndexes[e||0],r=i.rowIndexes[t||0];return o&&r?(n=r.index*i.rowLength+o.index,{columnTuple:o.tuple,rowTuple:r.tuple,measure:o.measure||r.measure,dataItem:this.dataSource.view()[n]}):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,n=t.options.dataSource;n=e.isArray(n)?{data:n}:n,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=fe.data.PivotDataSource.create(n).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(Re).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,n){var i='<span tabindex="0" class="k-button" data-'+fe.ns+'name="${data.name}">${data.name}',o=n.sortable,r="";return o&&(r+="#if (data.sortIcon) {#",r+='<span class="k-icon ${data.sortIcon}-sm"></span>',r+="#}#"),(n.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&&(i+='<span class="k-field-actions">'+r+"</span>"),i+="</span>",new fe.ui.PivotSettingTarget(t,e.extend({template:i,emptyTemplate:'<span class="k-empty">${data}</span>',enabled:this.options.reorderable,dataSource:this.dataSource},n))},_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,n=e(je),i=n.find(".k-pivot-rowheaders"),o=n.find(".k-pivot-table"),r=e(Re).addClass("k-grid k-widget");t._measureFields(),t.columnFields=e(Re).addClass("k-pivot-toolbar k-header k-settings-columns"),t.rowFields=e(Re).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",fe.support.scrollbar()),t.rowsHeader=e('<div class="k-grid k-widget k-alt"/>'),t.content=e('<div class="k-grid-content" />'),i.append(t.measureFields),i.append(t.rowFields),i.append(t.rowsHeader),r.append(t.columnsHeader.parent()),r.append(t.content),o.append(t.columnFields),o.append(r),t.wrapper.append(n),t.columnsHeaderTree=new fe.dom.Tree(t.columnsHeader[0]),t.rowsHeaderTree=new fe.dom.Tree(t.rowsHeader[0]),t.contentTree=new fe.dom.Tree(t.content[0]),t._initSettingTargets()},_progress:function(e){fe.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");fe.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(Me),n=Math.max(_e(this.measureFields),_e(this.rowFields));n=Math.max(e.children("table").width(),n),t.width(n)},_setSectionsHeight:function(){var e=this.measureFields.height(Me).height(),t=this.columnFields.height(Me).height(),n=this.rowFields.height(Me).innerHeight(),i=this.columnsHeader.height(Me).innerHeight(),o=n-this.rowFields.height(),r=t>e?t:e,s=i>n?i:n;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"),n=e.children("colgroup").children().length,i=n*this.options.columnWidth,o=Math.ceil(i/this.content.width()*100);o<100&&(o=100),e.add(t).css("width",o+"%"),this._resetColspan(t)},_setContentHeight:function(){var e=this,n=e.content,i=e.rowsHeader,o=e.wrapper.innerHeight(),r=fe.support.scrollbar(),s=n[0].offsetHeight===n[0].clientHeight,a=e.options.height;if(e.wrapper.is(":visible")){if(!o||!a)return s&&(r=0),n.height("auto"),i.height(n.height()-r),t;o-=be(e.columnFields),o-=be(e.columnsHeader),o<=2*r&&(o=2*r+1,s||(o+=r)),n.height(o),s&&(r=0),i.height(o-r)}},_resetColspan:function(e){var n=this,i=e.children("tbody").children(":first").children(":first");n._colspan===t&&(n._colspan=i.attr("colspan")),i.attr("colspan",1),clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){i.attr("colspan",n._colspan),n._colspan=t})},_axisMeasures:function(e){var t=[],n=this.dataSource,i=n.measures(),o=i.length>1||i[0]&&i[0].type;return n.measuresAxis()===e&&(0===n[e]().length||o)&&(t=i),t},items:function(){return[]},refresh:function(){var e,t=this,n=t.dataSource,i=n.axes(),o=(i.columns||{}).tuples||[],r=(i.rows||{}).tuples||[],s=t._columnBuilder,a=t._rowBuilder,l={},c={};t.trigger(ze,{action:"rebind"})||(s.measures=t._axisMeasures("columns"),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:this._axisMeasures("rows"),metadata:a.metadata},t.contentTree.render(t._contentBuilder.build(n.view(),l,c)),t._resize(),t.touchScroller?t.touchScroller.contentResized():(e=fe.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(Pe))},_scrollable:function(){var t=this,n=t.columnsHeader,i=t.rowsHeader;t.content.scroll(function(){n.scrollLeft(this.scrollLeft),i.scrollTop(this.scrollTop)}),i.bind("DOMMouseScroll"+Ie+" mousewheel"+Ie,e.proxy(t._wheelScroll,t))},_wheelScroll:function(t){var n,i;t.ctrlKey||(n=fe.wheelDeltaY(t),i=this.content.scrollTop(),n&&(t.preventDefault(),e(t.currentTarget).one("wheel"+Ie,!1),this.rowsHeader.scrollTop(i+-n),this.content.scrollTop(i+-n)))}}),oe=fe.dom.element,re=fe.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 n=[],i=0;i<=t;i++)n.push(e.members[i].name);return n},le=function(e,t){for(var n="",i=0;i<=t;i++)n+=e.members[i].name;return n},ce=me.extend({init:function(){this.measures=1,this.metadata={}},build:function(e){var t=this._tbody(e),n=this._colGroup();return[oe("table",null,[n,t])]},reset:function(){this.metadata={}},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n<e;n++)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,n,i,o,r=this.rows,s=r.length,a=0;a<s;a++)if(e=r[a],1!==e.rowSpan)for(i=e.children,n=0,t=i.length;n<t;n++)o=i[n],o.tupleAll&&(o.attr.rowSpan=e.rowSpan)},_rowIndex:function(e){for(var t=this.rows,n=t.length,i=0;i<n&&t[i]!==e;i++);return i},_rowLength:function(){var e=this.rows[0]?this.rows[0].children:[],t=e.length,n=0,i=0;if(t)for(;i<t;i++)n+=e[i].attr.colSpan||1;return n||(n=this.measures),n},_row:function(e,t,n){var i,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===n||(c.parentMember=n,c.collapsed=0,c.colSpan=0)):(c=oe("tr",null,[]),c.parentMember=n,c.collapsed=0,c.colSpan=0,c.rowSpan=1,l[a]=c,i=l[r+(+s-1)],i&&(o=i.children,c.notFirst=!(!o[1]||o[1].attr.className.indexOf("k-alt")!==-1)||i.notFirst),this.rows.splice(this._rowIndex(i)+1,0,c)),c},_measures:function(e,t,n){var i,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++)i=e[o],a.children.push(this._cell(n||"",[this._content(i,t)],i));return r},_content:function(e,t){return re(this.template({member:e,tuple:t}))},_cell:function(e,t,n){var i=oe("th",{className:"k-header"+e},t);return i.value=n.caption||n.name,i},_buildRows:function(e,n,i){var o,r,s,a,l,c,d,u,h,f,p=e.members,m=p[n],g=p[n+1],v=[],_=0,b=0,w=0;if(m.measure)return this._measures(m.children,e),t;if(u=fe.stringify(ae(e,n)),o=this._row(e,n,i),s=m.children,a=s.length,h=this.metadata[u],h||(this.metadata[u]=h=se(+m.levelNum,n),h.rootLevelNum=+this.rootTuple.members[n].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[fe.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[_],n,m);f=r.colSpan,b=r.collapsed,l.attr.colSpan=f,h.children=f,h.members=1,o.colSpan+=f,o.collapsed+=b,o.rowSpan=r.rowSpan+1,g&&(g.measure?f=this._measures(g.children,e," k-alt"):(r=this._buildRows(e,n+1),f=r.colSpan,o.collapsed+=r.collapsed,w=r.collapsed),c.attr.colSpan=f,f-=1,h.members+=f,o.colSpan+=f)}else g&&(g.measure?f=this._measures(g.children,e):(r=this._buildRows(e,n+1),f=r.colSpan,o.collapsed+=r.collapsed,w=r.collapsed),h.members=f,f>1&&(l.attr.colSpan=f,o.colSpan+=f-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),n=this._colGroup();return[oe("table",null,[n,t])]},reset:function(){this.metadata={}},_rowLength:function(){for(var e=this.rows[0].children,t=0,n=0,i=e[n];i;)t+=i.attr.colSpan||1,i=e[++n];return t},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n<e;n++)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,n,i,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++)n=this[a[d].name],t=e.colSpan["dim"+d],t&&t.colSpan<n&&(t.attr.colSpan=n-t.colSpan+1);e=u[l],i=u[l+"all"],e&&(e.children[0].attr.className="k-first"),i&&(i.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,n){var i=oe("td",{className:e},t);return i.value=n.caption||n.name,i},_buildRows:function(e,t){var n,i,o,r,s,a,l,c,d,u=this.map,h=e.members,f=h[t],p=h[t+1],m=f.children,g=m.length,v=+f.levelNum,_=this.rootTuple.members[t].name,b=ae(e,t-1).join(""),w=+this.rootTuple.members[t].levelNum,y=b+(w===v?"":f.parentName||""),k=u[y+"all"]||u[y],x=v+1,C=[];if(!k||k.hasChild?k=this._row():k.hasChild=!0,f.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+f.name]=k,n=fe.stringify(ae(e,t)),a=this.metadata[n],a||(this.metadata[n]=a=se(v,t),a.rootLevelNum=w),this._indexes.push({path:n,tuple:e}),f.hasChildren&&(a.expanded===!1&&(g=0,a.children=0),c={className:"k-icon "+(g?He:Ne)},c[fe.attr("path")]=n,C.push(oe("span",c))),C.push(this._content(f,e)),l=k.allCell&&!g?"k-grid-footer":"",i=this._cell(l,C,f),i.colSpan=x,k.children.push(i),k.colSpan["dim"+t]=i,(!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&&(i.attr.rowSpan=k.rowSpan),a.children=k.rowSpan,o=this._cell("k-grid-footer",[this._content(f,e)],f),o.colSpan=x,s=this._row([o]),s.colSpan["dim"+t]=o,s.allCell=!0,u[b+f.name+"all"]=s,p&&(r=this._buildRows(e,t+1),o.attr.rowSpan=r.rowSpan),k.rowSpan+=s.rowSpan,a.members=s.rowSpan}else p&&(k.hasChild=!1,this._buildRows(e,t+1),(o||i).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,n,i){var o,r,s=n.indexes[0],a=n.metadata[s?s.path:t];return this.columnAxis=n,this.rowAxis=i,this.data=e,this.rowLength=a?a.maxChildren+a.maxMembers:n.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=[],n=0;for(this.rows[0]&&(e=this.rows[0].children.length);n<e;n++)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,n){var i,o,r,s,a,l,c=[],d=e.indexes,u=e.metadata,h=e.measures,f=h.length||1,p=0,m=0,g=0,v=d.length;if(!v){for(r=0;r<f;r++)c[r]={index:r,measure:h[r],tuple:null};return c}for(;g<v;g++){if(i=d[g],o=u[i.path],a=o.children+o.members,l=0,a&&(a-=f),o.expanded===!1&&o.children!==o.maxChildren&&(l=o.maxChildren),o.parentMember&&o.levelNum===o.rootLevelNum&&(a=-1),a>-1){for(r=0;r<f;r++)s=a+r,o.children||(s+=m),c[a+m+r]={children:a,index:p,measure:h[r],tuple:i.tuple},p+=1;for(;c[m]!==t;)m+=1}if(m===n)break;p+=l}return c},_buildRows:function(){for(var e=this.rowIndexes,t=e.length,n=0;n<t;n++)this.rows.push(this._buildRow(e[n]))},_buildRow:function(e){for(var t,n,i,o,r,s,a,l=e.index*this.rowLength,c=this.columnIndexes,d=c.length,u=[],h=0;h<d;h++)t=c[h],r={},t.children&&(r.className="k-alt"),o="",s=this.data[l+t.index],a=t.measure||e.measure,n={columnTuple:t.tuple,rowTuple:e.tuple,measure:a,dataItem:s},""!==s.value&&a&&a.type&&("status"===a.type?o=this.kpiStatusTemplate(n):"trend"===a.type&&(o=this.kpiTrendTemplate(n))),o||(o=this.dataTemplate(n)),i=oe("td",r,[re(o)]),i.value=s.value,u.push(i);return r={},e.children&&(r.className="k-grid-footer"),oe("tr",r,u)}}),pe.plugin(ie),fe.PivotExcelExporter=fe.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],n=this.widget.rowsHeaderTree.children[0],i=t.children[0].children.length,o=n.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<i;e++)s.push({autoWidth:!1,width:r});return s},_cells:function(e,t,n){for(var i,o,r,s,a,l=[],c=0,d=e.length;c<d;c++){for(o=[],r=e[c].children,i=r.length,s=0;s<i;s++)a=r[s],o.push({background:"#7a7a7a",color:"#fff",value:a.value,colSpan:a.attr.colSpan||1,rowSpan:a.attr.rowSpan||1});n&&n(o,c),l.push({cells:o,type:t})}return l},_rows:function(){var e,t,n=this.widget.columnsHeaderTree.children[0],i=this.widget.rowsHeaderTree.children[0],o=n.children[0].children.length,r=i.children[0].children.length,s=n.children[1].children,a=i.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 n,i,r=0,s=l[t].children;r<o;r++)n=s[r],i=+n.value,isNaN(i)&&(i=n.value),e.push({background:"#dfdfdf",color:"#333",value:i,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],n=t.children[0].children.length,i=e.children[1].children;return{colSplit:n,rowSplit:i.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||{},n=new fe.PivotExcelExporter({widget:this});n.workbook().then(e.proxy(function(e){if(!this.trigger("excelExport",{workbook:e})){var n=new fe.ooxml.Workbook(e);fe.saveAs({dataURI:n.toDataURL(),fileName:e.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy})}},this))}},fe.PivotExcelMixin=he,fe.ooxml&&fe.ooxml.Workbook&&he.extend(ie.prototype),fe.PDFMixin&&(fe.PDFMixin.extend(ie.prototype),ie.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,n){(n||t)()}),function(e,define){define("kendo.treeview.draganddrop.min",["kendo.data.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=e.proxy,r=e.extend,s="visibility",a="k-state-hover",l="input,a,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";i.HierarchicalDragAndDrop=n.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 i.Draggable(t,{ignore:l,filter:s.filter,autoScroll:s.autoScroll,cursorOffset:{left:10,top:n.support.mobileOS?-40/n.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(){n.support.touch&&this.hovered&&(this.hovered.find("."+a).removeClass(a),this.hovered=!1)},_hintStatus:function(n){var i=this._draggable.hint.find(".k-drag-status")[0];return n?(i.className="k-icon k-drag-status "+n,t):e.trim(i.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 i,o,r,l,c,d,u,h,f,p,m,g=this.options,v=this.source,_=this.dropTarget=e(n.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",f=g.itemFromTarget(_),i=f.item,i.length?(this._removeTouchHover(),o=n._outerHeight(i),l=f.content,g.reorderable?(c=o/(l.length>0?4:2),r=n.getOffset(i).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":(p=i.position(),p.top+=d?0:o,this.dropHint.css(p)[d?"prependTo":"appendTo"](g.dropHintContainer(i)),d&&f.first&&(m="k-i-insert-up"),u&&f.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 n,i,o,r="over",l=this.source,c=this.dropHint,d=this.dropTarget;return"visible"==c.css(s)?(r=this.options.dropPositionFrom(c),n=c.closest(this.options.itemSelector)):d&&(n=d.closest(this.options.itemSelector),n.length||(n=d.closest(this.options.allowedContainers))),i={originalEvent:e.originalEvent,source:l[0],destination:n[0],valid:"k-i-cancel"!=this._hintStatus(),setValid:function(e){this.valid=e},dropTarget:d[0],position:r},o=this.options.drop(i),c.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(a),!i.valid||o?(this._draggable.dropped=i.valid,t):(this._draggable.dropped=!0,this.options.dragend({originalEvent:e.originalEvent,source:l,destination:n,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,n){(n||t)()}),function(e,define){define("kendo.treeview.min",["kendo.data.min","kendo.treeview.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return function(t){var n=t.children(".k-animation-container");return n.length||(n=t),n.children(e)}}function i(e){return f.template(e,{useWithBlock:!1})}function o(e){return e.find("> div .k-checkbox-wrapper [type=checkbox]")}function r(e){return function(t,n){n=n.closest(W);var i,o=n.parent();return o.parent().is("li")&&(i=o.parent()),this._dataSourceMove(t,o,i,function(t,i){return this._insert(t.data(),i,n.index()+e)})}}function s(t,n){for(var i;t&&"ul"!=t.nodeName.toLowerCase();)i=t,t=t.nextSibling,3==i.nodeType&&(i.nodeValue=e.trim(i.nodeValue)),h.test(i.className)?n.insertBefore(i,n.firstChild):n.appendChild(i)}function a(t){var n=t.children("div"),i=t.children("ul"),o=n.children(".k-icon"),r=t.children(":checkbox"),a=n.children(".k-in");t.hasClass("k-treeview")||(n.length||(n=e("<div />").prependTo(t)),!o.length&&i.length?o=e("<span class='k-icon' />").prependTo(n):i.length&&i.children().length||(o.remove(),i.remove()),r.length&&e("<span class='k-checkbox-wrapper' />").appendTo(n).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(n),n.length&&s(n[0].nextSibling,a[0])))}var l,c,d,u,h,f=window.kendo,p=f.ui,m=f.data,g=e.extend,v=f.template,_=e.isArray,b=p.Widget,w=m.HierarchicalDataSource,y=e.proxy,k=f.keys,x=".kendoTreeView",C="select",S="check",T="navigate",D="expand",A="change",E="error",M="checked",R="indeterminate",I="collapse",F="dragstart",z="drag",P="drop",B="dragend",L="dataBound",H="click",N="undefined",O="k-state-hover",V="k-treeview",U=":visible",W=".k-item",j="string",q="aria-selected",G="aria-disabled",$={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},Y=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===j};c=n(".k-group"),d=n(".k-group,.k-content"),u=function(e){return e.children("div").children(".k-icon")},h=/k-sprite/,l=f.ui.DataBoundWidget.extend({init:function(e,t){var n,i=this,o=!1,r=t&&!!t.dataSource;_(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==N&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(i,e,t),e=i.element,t=i.options,n=e.is("ul")&&e||e.hasClass(V)&&e.children("ul"),o=!r&&n.length,o&&(t.dataSource.list=n),i._animation(),i._accessors(),i._templates(),e.hasClass(V)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),n&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.root.attr("role","tree"),i._dataSource(o),i._attachEvents(),i._dragging(),o?i._syncHtmlAndDataSource():t.autoBind&&(i._progress(!0),i.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&i.updateIndeterminate(),i.element[0].id&&(i._ariaId=f.format("{0}_tv_active",i.element[0].id)),f.notify(i)},_attachEvents:function(){var t=this,n=".k-in:not(.k-state-selected,.k-state-disabled)",i="mouseenter";t.wrapper.on(i+x,".k-in.k-state-selected",function(e){e.preventDefault()}).on(i+x,n,function(){e(this).addClass(O)}).on("mouseleave"+x,n,function(){e(this).removeClass(O)}).on(H+x,n,y(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",y(t._toggleButtonClick,t)).on(H+x,".k-i-expand,.k-i-collapse",y(t._toggleButtonClick,t)).on("keydown"+x,y(t._keydown,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,".k-checkbox-wrapper :checkbox",y(t._checkboxClick,t)).on("click"+x,".k-request-retry",y(t._retryRequest,t)).on("click"+x,function(n){e(n.target).is(":kendoFocusable")||t.focus()})},_checkboxClick:function(t){var n=e(t.target);n.data(R)&&(n.data(R,!1).prop(R,!1).prop(M,!0),this._checkboxChange(t))},_syncHtmlAndDataSource:function(e,t){e=e||this.root,t=t||this.dataSource;var n,i,r,s,a,l=t.view(),c=f.attr("uid"),d=f.attr("expanded"),u=this.options.checkboxes,h=e.children("li");for(n=0;n<h.length;n++)r=l[n],s=r.uid,i=h.eq(n),i.attr("role","treeitem").attr(c,s),r.expanded="true"===i.attr(d),u&&(a=o(i),r.checked=a.prop(M),a.attr("id","_"+s),a.next(".k-checkbox-label").attr("for","_"+s)),this._syncHtmlAndDataSource(i.children("ul"),r.children)},_animation:function(){var e=this.options,t=e.animation;t===!1?t={expand:{effects:{}},collapse:{hide:!0,effects:{}}}:t.collapse&&"effects"in t.collapse||(t.collapse=g({reverse:!0},t.expand)),g(t.collapse,{hide:!0}),e.animation=t},_dragging:function(){var t,n=this.options.dragAndDrop,i=this.dragging;n&&!i?(t=this,this.dragging=new p.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,n){return e.contains(t,n)},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(F,{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(e){return t.trigger(P,{originalEvent:e.originalEvent,sourceNode:e.source,destinationNode:e.destination,valid:e.valid,setValid:function(t){this.valid=t,e.setValid(t)},dropTarget:e.dropTarget,dropPosition:e.position})},dragend:function(e){function n(n){t.updateIndeterminate(),t.trigger(B,{originalEvent:e.originalEvent,sourceNode:n&&n[0],destinationNode:o[0],dropPosition:r})}var i=e.source,o=e.destination,r=e.position;"over"==r?t.append(i,o,n):("before"==r?i=t.insertBefore(i,o):"after"==r&&(i=t.insertAfter(i,o)),n(i))}})):!n&&i&&(i.destroy(),this.dragging=null)},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=y(e._fieldAccessor,e);t.template&&typeof t.template==j?t.template=v(t.template):t.template||(t.template=i("# var text = "+n("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 n="k-item",i=t.index;return e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},cssClass:function(e,t){var n="",i=t.index,o=e.length-1;return e.firstLevel&&0===i&&(n+="k-top "),n+=0===i&&i!=o?"k-top":i==o?"k-bot":"k-mid"},textClass:function(e,t){var n="k-in";return t&&(n+=" k-link"),e.enabled===!1&&(n+=" k-state-disabled"),e.selected===!0&&(n+=" k-state-selected"),n},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:i("#= data.treeview.template(data) #"),group:i("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),itemContent:i("# var imageUrl = "+n("imageUrl")+"(data.item); ## var spriteCssClass = "+n("spriteCssClass")+"(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #' /># } ##= data.treeview.template(data) #"),itemElement:i("# var item = data.item, r = data.r; ## var url = "+n("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:i("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #' "+f.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:i("<div class='k-icon k-i-loading' /> #: data.messages.loading #"),retry:i("#: 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 n=this.options;n.dataSource=t,this._dataSource(),n.checkboxes&&n.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(A,this._refreshHandler),this.dataSource.bind(E,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(A,this._refreshHandler),e.unbind(E,this._errorHandler))},_dataSource:function(e){function t(e){for(var n=0;n<e.length;n++)e[n]._initChildren(),e[n].children.fetch(),t(e[n].children.view())}var n=this,i=n.options,o=i.dataSource;o=_(o)?{data:o}:o,n._unbindDataSource(),o.fields||(o.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),n.dataSource=o=w.create(o),e&&(o.fetch(),t(o.view())),n._bindDataSource()},events:[F,z,P,B,L,D,I,C,A,T,S],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,n,i=this,o=i.options,r=i.element;for(e in $)t=o[$[e]],n=r.attr(f.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),_(t)||(t=[t]),o[$[e]]=t},_fieldAccessor:function(t){var n=this.options[$[t]],i=n.length,o="(function(item) {";return 0===i?o+="return item['"+t+"'];":(o+="var levels = ["+e.map(n,function(e){return"function(d){ return "+f.expr(e)+"}"}).join(",")+"];",o+="return levels[Math.min(item.level(), "+i+"-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(W)[0]})},_setChecked:function(t,n){if(t&&e.isFunction(t.view))for(var i=0,o=t.view();i<o.length;i++)o[i][M]=n,o[i].children&&this._setChecked(o[i].children,n)},_setIndeterminate:function(e){var t,n,i,r=c(e),s=!0;if(r.length&&(t=o(r.children()),n=t.length)){if(n>1){for(i=1;i<n;i++)if(t[i].checked!=t[i-1].checked||t[i].indeterminate||t[i-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,n,i;if(e=e||this.wrapper,t=c(e).children(),t.length){for(n=0;n<t.length;n++)this.updateIndeterminate(t.eq(n));i=this._setIndeterminate(e),i&&i.prop(M)&&(this.dataItem(e).checked=!0)}},_bubbleIndeterminate:function(e){if(e.length){var t,n=this.parent(e);n.length&&(this._setIndeterminate(n),t=n.children("div").find(".k-checkbox-wrapper :checkbox"),t.prop(R)===!1?this.dataItem(n).set(M,t.prop(M)):delete this.dataItem(n).checked,this._bubbleIndeterminate(n))}},_checkboxChange:function(t){var n=e(t.target),i=n.prop(M),o=n.closest(W),r=this.dataItem(o);r.checked!=i&&(r.set(M,i),this._trigger(S,o))},_toggleButtonClick:function(t){var n=e(t.currentTarget).closest(W);n.is("[aria-disabled='true']")||this.toggle(e(t.target).closest(W))},_mousedown:function(t){var n=e(t.currentTarget).closest(W);n.is("[aria-disabled='true']")||(this._clickTarget=n,this.current(n))},_focusable:function(e){return e&&e.length&&e.is(":visible")&&!e.find(".k-in:first").hasClass("k-state-disabled")},_focus:function(){var t=this.select(),n=this._clickTarget;f.support.touch||(n&&n.length&&(t=n),this._focusable(t)||(t=this.current()),this._focusable(t)||(t=this._nextVisible(e())),this.current(t))},focus:function(){var e,t=this.wrapper,n=t[0],i=[],o=[],r=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),o.push(n.scrollTop));while(n!=r);for(t.focus(),e=0;e<i.length;e++)i[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("k-state-disabled")},parent:function(t){var n,i,o=/\bk-treeview\b/,r=/\bk-item\b/;typeof t==j&&(t=this.element.find(t)),Y(t)||(t=t[0]),i=r.test(t.className);do t=t.parentNode,r.test(t.className)&&(i?n=t:i=!0);while(!o.test(t.className)&&!n);return e(n)},_nextVisible:function(e){function t(e){for(;e.length&&!e.next().length;)e=i.parent(e);return e.next().length?e.next():e}var n,i=this,o=i._expanded(e);return e.length&&e.is(":visible")?o?(n=c(e).children().first(),n.length||(n=t(e))):n=t(e):n=i.root.children().eq(0),i._enabled(n)||(n=i._nextVisible(n)),n},_previousVisible:function(e){var t,n,i=this;if(!e.length||e.prev().length)for(n=e.length?e.prev():i.root.children().last();i._expanded(n)&&(t=c(n).children().last(),t.length);)n=t;else n=i.parent(e)||e;return i._enabled(n)||(n=i._previousVisible(n)),n},_keydown:function(n){var i,o=this,r=n.keyCode,s=o.current(),a=o._expanded(s),l=s.find(".k-checkbox-wrapper:first :checkbox"),c=f.support.isRtl(o.element);n.target==n.currentTarget&&(!c&&r==k.RIGHT||c&&r==k.LEFT?a?i=o._nextVisible(s):o.expand(s):!c&&r==k.LEFT||c&&r==k.RIGHT?a?o.collapse(s):(i=o.parent(s),o._enabled(i)||(i=t)):r==k.DOWN?i=o._nextVisible(s):r==k.UP?i=o._previousVisible(s):r==k.HOME?i=o._nextVisible(e()):r==k.END?i=o._previousVisible(e()):r==k.ENTER?s.find(".k-in:first").hasClass("k-state-selected")||o._trigger(C,s)||o.select(s):r==k.SPACEBAR&&l.length&&(l.prop(M,!l.prop(M)).data(R,!1).prop(R,!1),o._checkboxChange({target:l}),i=s),i&&(n.preventDefault(),s[0]!=i[0]&&(o._trigger(T,i),o.current(i))))},_click:function(t){var n,i=this,o=e(t.currentTarget),r=d(o.closest(W)),s=o.attr("href");n=s?"#"==s||s.indexOf("#"+this.element.id+"-")>=0:r.length&&!r.children().length,n&&t.preventDefault(),o.hasClass(".k-state-selected")||i._trigger(C,o)||i.select(o)},_wrapper:function(){var e,t,n=this,i=n.element,o="k-widget k-treeview";i.is("ul")?(e=i.wrap("<div />").parent(),t=i):(e=i,t=e.children("ul").eq(0)),n.wrapper=e.addClass(o),n.root=t},_group:function(e){var t=this,n=e.hasClass(V),i={firstLevel:n,expanded:n||t._expanded(e)},o=e.children("ul");o.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),t._nodes(o,i)},_nodes:function(t,n){var i,o=this,r=t.children("li");n=g({length:r.length},n),r.each(function(t,r){r=e(r),i={index:t,expanded:o._expanded(r)},a(r),o._updateNodeClasses(r,n,i),o._group(r)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;n&&(e="<input type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #",n.name&&(e+=" name='"+n.name+"'"),e+=" id='_#= item.uid #' class='k-checkbox' /><label for='_#= item.uid #' class='k-checkbox-label'></label>",n=g({template:e},t.checkboxes),typeof n.template==j&&(n.template=v(n.template)),t.checkboxes=n)},_updateNodeClasses:function(e,t,n){var i,o,r=e.children("div"),s=e.children("ul"),a=this.templates;e.hasClass("k-treeview")||(n=n||{},n.expanded=typeof n.expanded!=N?n.expanded:this._expanded(e),n.index=typeof n.index!=N?n.index:e.index(),n.enabled=typeof n.enabled!=N?n.enabled:!r.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=N?t.firstLevel:e.parent().parent().hasClass(V),t.length=typeof t.length!=N?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(a.wrapperCssClass(t,n)),r.removeClass("k-top k-mid k-bot").addClass(a.cssClass(t,n)),i=r.children(".k-in"),o=i[0]&&"a"==i[0].nodeName.toLowerCase(),i.removeClass("k-in k-link k-state-default k-state-disabled").addClass(a.textClass(n,o)),(s.length||"true"==e.attr("data-hasChildren"))&&(r.children(".k-icon").removeClass("k-i-expand k-i-collapse").addClass(a.toggleButtonClass(n)),s.addClass("k-group")))},_processNodes:function(t,n){var i=this;i.element.find(t).each(function(t,o){n.call(i,t,e(o).closest(W))})},dataItem:function(t){var n=e(t).closest(W).attr(f.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},_insertNode:function(t,n,i,o,r){var s,l,d,u,h=this,f=c(i),p=f.children().length+1,m={firstLevel:i.hasClass(V),expanded:!r,length:p},g="",v=function(e,t){e.appendTo(t)};for(d=0;d<t.length;d++)u=t[d],u.index=n+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}})}}),f.length||(f=e(h._renderGroup({group:m})).appendTo(i)),o(l,f),i.hasClass("k-item")&&(a(i),h._updateNodeClasses(i)),h._updateNodeClasses(l.prev().first()),h._updateNodeClasses(l.next().last()),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}},_updateNodes:function(t,n){function i(e,t){e.find(".k-checkbox-wrapper :checkbox").prop(M,t).data(R,!1).prop(R,!1)}var o,r,s,a,l,c,u,h=this,f={treeview:h.options,item:a},m="expanded"!=n&&"checked"!=n;if("selected"==n)a=t[0],r=h.findByUid(a.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected",a[n]).end(),a[n]&&h.current(r),r.attr(q,!!a[n]);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++)f.item=a=t[o],s=u[o],r=s.parent(),m&&s.children(".k-in").html(h.templates.itemContent(f)),n==M?(l=a[n],i(s,l),h.options.checkboxes.checkChildren&&(i(r.children(".k-group"),l),h._setChecked(a.children,l),h._bubbleIndeterminate(r))):"expanded"==n?h._toggle(r,a,a[n]):"enabled"==n&&(r.find(".k-checkbox-wrapper :checkbox").prop("disabled",!a[n]),c=!d(r).is(U),r.removeAttr(G),a[n]||(a.selected&&a.set("selected",!1),a.expanded&&a.set("expanded",!1),c=!0,r.attr(q,!1).attr(G,!0)),h._updateNodeClasses(r,{},{enabled:a[n],expanded:!c})),s.length&&this.trigger("itemChange",{item:s,data:a,ns:p});m&&h.angular("compile",function(){return{elements:u,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_appendItems:function(e,t,n){var i=c(n),o=i.children(),r=!this._expanded(n);typeof e==N&&(e=o.length),this._insertNode(t,e,n,function(t,n){e>=o.length?t.appendTo(n):t.insertBefore(o.eq(e))},r),this._expanded(n)&&(this._updateNodeClasses(n),c(n).css("display","block"))},_refreshChildren:function(e,t,n){var i,o,r,s=this.options,l=s.loadOnDemand,d=s.checkboxes&&s.checkboxes.checkChildren;if(c(e).empty(),t.length)for(this._appendItems(n,t,e),o=c(e).children(),l&&d&&this._bubbleIndeterminate(o.last()),i=0;i<o.length;i++)r=o.eq(i),this.trigger("itemChange",{item:r.children("div"),data:this.dataItem(r),ns:p});else a(e)},_refreshRoot:function(t){var n,i,o,r=this._renderGroup({items:t,group:{firstLevel:!0,expanded:!0}});for(this.root.length?(this._angularItems("cleanup"),n=e(r),this.root.attr("class",n.attr("class")).html(n.html())):this.root=this.wrapper.html(r).children("ul"),this.root.attr("role","tree"),i=this.root.children(".k-item"),o=0;o<t.length;o++)this.trigger("itemChange",{item:i.eq(o),data:t[o],ns:p});this._angularItems("compile")},refresh:function(e){var n,i,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(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(i=!1,n=0;n<s.length;n++)if("checked"in s[n]){i=!0;break}if(!i&&o&&o.checked)for(n=0;n<s.length;n++)s[n].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(n=0;n<s.length;n++)c&&!s[n].expanded||s[n].load();this.trigger(L,{node:o?a:t})},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),n=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(n))},_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){t=2!=arguments.length||!!t,this._processNodes(e,function(e,n){this.dataItem(n).set("enabled",t)})},current:function(n){var i=this,o=i._current,r=i.element,s=i._ariaId;return arguments.length>0&&n&&n.length?(o&&(o[0].id===s&&o.removeAttr("id"),o.find(".k-in:first").removeClass("k-state-focused")),o=i._current=e(n,r).closest(W),o.find(".k-in:first").addClass("k-state-focused"),s=o[0].id||s,s&&(i.wrapper.removeAttr("aria-activedescendant"),o.attr("id",s),i.wrapper.attr("aria-activedescendant",s)),t):(o||(o=i._nextVisible(e())),o)},select:function(n){var i=this,o=i.element;return arguments.length?(n=e(n,o).closest(W),o.find(".k-state-selected").each(function(){var t=i.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-state-selected")}),n.length&&(i.dataItem(n).set("selected",!0),i._clickTarget=n),i.trigger(A),t):o.find(".k-state-selected").closest(W)},_toggle:function(e,t,n){var i,o=this.options,r=d(e),s=n?"expand":"collapse";r.data("animating")||this._trigger(s,e)||(this._expanded(e,n),i=t&&t.loaded(),n&&!i?(o.loadOnDemand&&this._progress(e,!0),r.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:n}),n||r.css("height",r.height()).css("height"),r.kendoStop(!0,!0).kendoAnimate(g({reset:!0},o.animation[s],{complete:function(){n&&r.css("height","")}}))))},toggle:function(t,n){t=e(t),u(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;b.fn.destroy.call(e),e.wrapper.off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),f.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,n){var i=f.attr("expanded"),o=this.dataItem(e),r=n;return 1==arguments.length?"true"===e.attr(i)||o&&o.expanded:(d(e).data("animating")||(o&&(o.set("expanded",r),r=o.expanded),r?(e.attr(i,"true"),e.attr("aria-expanded","true")):(e.removeAttr(i),e.attr("aria-expanded","false"))),t)},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?n.html(i):n.empty()):u(e).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(e,n){var i=this.dataItem(e),o=this.options[$.text],r=i.level(),s=o.length,a=o[Math.min(r,s-1)];return n?(i.set(a,n),t):i[a]},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,o){var r,s=this._objectOrSelf(i||n),a=s.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=s.element[0]&&(r=s.dataItem(i),r.loaded()||(s._progress(i,!0),l=r.load()),i!=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 n,i,o=t;return(t instanceof window.jQuery||Y(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(f.attr("uid")),o=n.getByUid(i),o&&(o=n.remove(o))),o},_insert:function(e,t,n){t instanceof f.data.ObservableArray?t=t.toJSON():_(t)||(t=[t]);var i=e.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),e.splice.apply(e,[n,0].concat(t)),this.findByUid(e[n].uid)},insertAfter:r(1),insertBefore:r(0),append:function(t,n,i){var o=this.root;return n&&(o=c(n)),this._dataSourceMove(t,o,n,function(t,o,r){function s(){n&&l._expanded(n,!0);var e=t.data(),i=Math.max(e.length,0);return l._insert(e,o,i)}var a,l=this;return r.done(function(){a=s(),(i=i||e.noop)(a)}),a||null})},_remove:function(t,n){var i,o,r,s=this;return t=e(t,s.element),this.angular("cleanup",function(){return{elements:t.get()}}),i=t.parent().parent(),o=t.prev(),r=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(a(i),s._updateNodeClasses(i)),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(n,i){return e(i).text()==t}).closest(W)},findByUid:function(t){var n,i,o=this.element.find(".k-item"),r=f.attr("uid");for(i=0;i<o.length;i++)if(o[i].getAttribute(r)==t){n=o[i];break}return e(n)},expandPath:function(t,n){function i(){s.shift(),s.length?o(s[0]).then(i):a.call(r)}function o(t){var n=e.Deferred(),i=r.dataSource.get(t);return i?i.loaded()?(i.set("expanded",!0),n.resolve()):(r._progress(r.findByUid(i.uid),!0),i.load().then(function(){i.set("expanded",!0),n.resolve()})):n.resolve(),n.promise()}var r=this,s=t.slice(0),a=n||e.noop;o(s[0]).then(i)},_parentIds:function(e){for(var t=e&&e.parentNode(),n=[];t&&t.parentNode;)n.unshift(t.id),t=t.parentNode();return n},expandTo:function(e){e instanceof f.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 n="",i=0,o=e.items,r=o?o.length:0,s=e.group;for(s.length=r;i<r;i++)e.group=s,e.item=o[i],e.item.index=i,n+=t._renderItem(e);return n},e.r=t.templates,t.templates.group(e)}}),p.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,t){var n,i,o=[];for(n=0,i=e.length;n<i;n++)e[n].field!==t&&o.push(e[n]);return o}function i(e,t,n){var i,o,r,s;if(!e)return[];for(e=e.filters,i=0,o=[],r=e.length;i<r;i++)s=e[i].operator,(n||"in"===s)&&s!==n||e[i].field!==t||o.push(e[i]);return o}function o(t,n,o){var r,s=0,a=o.length;if(t=i(t,n,"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 n,i=e.length;for(n=0;n<i;n++)e[n].checked&&0!==e[n].level()&&t.push(e[n].uniqueName),e[n].hasChildren&&r(e[n].children.view(),t)}var s=window.kendo,a=s.ui,l="kendoContextMenu",c=e.proxy,d=".kendoPivotFieldMenu",u=a.Widget,h=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(p)({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(".k-filter-item"),t=c(this._filter,this);this._filterOperator=new s.ui.DropDownList(e.find("select")),this._filterValue=e.find(".k-textbox"),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,n="",i="";e&&(n=e.operator,i=e.value),t.value(n),t.value()||t.select(0),this._filterValue.val(i)},_clearFilters:function(e){var t,n,o=this.dataSource.filter()||{},r=0;for(o.filters=o.filters||[],t=i(o,e),n=t.length;r<n;r++)o.filters.splice(o.filters.indexOf(t[r]),1);return o},_convert:function(t){var n=this.dataSource.options.schema,i=((n.model||{}).fields||{})[this.currentMember];return i&&("number"===i.type?t=parseFloat(t):"boolean"===i.type&&(t=!!e.parseJSON(t))),t},_filter:function(e){var n,i,o=this,r=o._convert(o._filterValue.val());return e.preventDefault(),""===r?(o.menu.close(),t):(n={field:o.currentMember,operator:o._filterOperator.value(),value:r},i=o._clearFilters(o.currentMember),i.filters.push(n),o.dataSource.filter(i),o.menu.close(),t)},_reset:function(e){var t=this,n=t._clearFilters(t.currentMember);e.preventDefault(),n.filters[0]||(n={}),t.dataSource.filter(n),t._setFilterForm(null),t.menu.close()},_sort:function(e){var t=this.currentMember,i=this.dataSource.sort()||[];i=n(i,t),i.push({field:t,dir:e}),this.dataSource.sort(i),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(m)({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,n=[],o=this.treeView.dataSource.view(),s=o[0].checked,a=this.dataSource.filter(),l=i(a,this.currentMember,"in")[0];r(o,n),l&&(s?(a.filters.splice(a.filters.indexOf(l),1),a.filters.length||(a={})):l.value=n.join(","),t=a),n.length&&(t||s||(t={field:this.currentMember,operator:"in",value:n.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 n={},i=e.treeView.dataSource.get(t.data.uniqueName),r=t.data.uniqueName;r?(n.memberUniqueName=i.uniqueName.replace(/\&/g,"&amp;"),n.treeOp=1):n.levelUniqueName=e.currentMember+".[(ALL)]",e.dataSource.schemaMembers(n).done(function(n){o(e.dataSource.filter(),e.currentMember,n),t.success(n)}).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 n=s.attr("name");this.currentMember=e(t.event.target).closest("["+n+"]").attr(n),this.options.filterable&&this._setFilterForm(i(this.dataSource.filter(),this.currentMember)[0])}},_select:function(t){var n=e(t.item);e(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"),n.hasClass("k-include-item")?this.includeWindow.center().open():n.hasClass("k-sort-asc")?this._sort("asc"):n.hasClass("k-sort-desc")&&this._sort("desc")},_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}}),f='<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" /><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>',p='<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 k-filter-item"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filterFields}</span><ul><li>'+f+"</li></ul></li># } #</ul>",m='<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(h)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(t){var n="string"==typeof t?t:t.operator;return e.inArray(n,v)>-1}function i(t,n){var o,r,s=[];if(e.isPlainObject(t))if(t.hasOwnProperty("filters"))s=t.filters;else if(t.field==n)return t;for(e.isArray(t)&&(s=t),o=0;o<s.length;o++)if(r=i(s[o],n))return r}function o(t,n){t.filters&&(t.filters=e.grep(t.filters,function(e){return o(e,n),e.filters?e.filters.length:e.field!=n}))}function r(e,t){var n=s.getter(t,!0);return function(t){for(var i,o,r=e(t),s=[],a=0,l={};a<r.length;)i=r[a++],o=n(i),l.hasOwnProperty(o)||(s.push(i),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",f="string",p="Is equal to",m="Is not equal to",g=e.proxy,v=["isnull","isnotnull","isempty","isnotempty"],_=c.extend({init:function(i,o){var r,a,l,p,m,v,_,b,w,y,k,x,C;if(i=e(i).addClass("k-filtercell"),r=this.wrapper=e("<span/>").appendTo(i),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,i[0],o),y&&(a.options.suggestDataSource=y),o=a.options,l=a.dataSource=o.dataSource,a.model=l.reader.model,_=o.type=f,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=p=s.observable({operator:o.operator,value:null,operatorVisible:function(){var e=this.get("value");return null!==e&&e!==t&&"undefined"!=e||n(this.get("operator"))&&!a._clearInProgress}}),p.bind(d,g(a.updateDsFilter,a)),_==f&&a.initSuggestDataSource(o),null!==o.inputWidth&&w.width(o.inputWidth),a._setInputType(o,_),_!=u&&o.showOperators!==!1?a._createOperatorDropDown(b):r.addClass("k-operator-hidden"),a._createClearIcon(),s.bind(this.wrapper,p),_==f&&(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,n){var i,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")):n==f?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"==n?d.attr(s.attr("role"),"datepicker"):n==u?(d.remove(),i=e("<input type='radio'/>"),o=c.wrapper,r=s.guid(),a=e("<label/>").text(t.messages.isTrue).append(i),i.attr(s.attr("bind"),"checked:value").attr("name",r).val("true"),l=a.clone().text(t.messages.isFalse),i.clone().val("false").appendTo(l),o.append([a,l])):"number"==n?d.attr(s.attr("role"),"numerictextbox"):n==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)},_createOperatorDropDown:function(t){var n,i,o=[];for(n in t)o.push({text:t[n],value:n});i=e('<input class="k-dropdown-operator" '+s.attr("bind")+'="value: operator"/>').appendTo(this.wrapper),
this.operatorDropDown=i.kendoDropDownList({dataSource:o,dataTextField:"text",dataValueField:"value",open:function(){this.popup.element.width(150)},valuePrimitive:!0}).data("kendoDropDownList"),this.operatorDropDown.wrapper.find(".k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-i-filter")},initSuggestDataSource:function(e){var n=e.suggestDataSource;n instanceof l||(!e.customDataSource&&n&&(n.group=t),n=this.suggestDataSource=l.create(n)),e.customDataSource||(n._pageSize=t,n.reader.data=r(n.reader.data,this.options.field)),this.suggestDataSource=n},setAutoCompleteSource:function(){var e=this.input.data("kendoAutoComplete");e&&e.setDataSource(this.suggestDataSource)},setComboBoxSource:function(e){var t=l.create({data:e}),n=this.input.data("kendoComboBox");n&&n.setDataSource(t)},_refreshUI:function(){var t=this,n=i(t.dataSource.filter(),this.options.field)||{},o=t.viewModel;t.manuallyUpdatingVM=!0,n=e.extend(!0,{},n),t.options.type==u&&o.value!==n.value&&t.wrapper.find(":radio").prop("checked",!1),n.operator&&o.set("operator",n.operator),o.set("value",n.value),t.manuallyUpdatingVM=!1},updateDsFilter:function(i){var o,r,s,a,l=this,c=l.viewModel;l.manuallyUpdatingVM||"operator"==i.field&&c.value===t&&!n(c)||(o=e.extend({},l.viewModel.toJSON(),{field:l.options.field}),r={logic:"and",filters:[]},s=!1,(o.value!==t&&null!==o.value||n(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 i,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++)i=c[r],i.value=a._parse(i.value);return c=e.grep(c,function(e){return""!==e.value&&null!==e.value||n(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(s.attr("bind"),"visible:operatorVisible").html("<span class='k-icon k-i-close'/>").click(g(t.clearFilter,t)).appendTo(t.wrapper)},clearFilter:function(){this._clearInProgress=!0,n(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(),n=this.options.column;this.angular(e,function(){return{elements:t,data:[{column:n}]}})},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:p,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"},number:{eq:p,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:p,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:p,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,n){(n||t)()}),function(e,define){define("kendo.panelbar.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(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 i(t){var n=t,i=t.children("ul"),o=n.children(".k-link").children(".k-icon");t.hasClass("k-panelbar")||(!o.length&&i.length?o=e("<span class='k-icon' />").appendTo(n):i.length&&i.children().length||(o.remove(),i.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,f=o.data.HierarchicalDataSource,p=/^(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",M="k-content",R="activate",I="collapse",F="dataBound",z="mouseenter",P="mouseleave",B="contentLoad",L="undefined",H="k-state-active",N="> .k-panel",O="> .k-content",V="string",U="k-state-focused",W="k-state-disabled",j="k-state-selected",q="."+j,G="k-state-highlight",$=k+":not(.k-state-disabled)",Y="> "+$+" > "+w+", .k-panel > "+$+" > "+w,K=k+".k-state-disabled > .k-link",Q="> li > "+q+", .k-panel > li > "+q,X="k-state-default",Z="aria-disabled",J="aria-expanded",ee="aria-hidden",te="aria-selected",ne=":visible",ie=":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 n="k-item",i=t.index;return n+=t.enabled===!1?" "+W:t.expanded===!0?" "+H:" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),n},textClass:function(e,t){var n=b;return t.firstLevel&&(n+=" k-header"),n},textAttributes:function(e){return e?" href='"+e+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-panelbar-collapse k-i-arrow-n":" k-panelbar-expand k-i-arrow-s"},text:function(e){return e.encoded===!1?e.text:o.htmlEncode(e.text)},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},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,n){var i,r,s=this;d(n)&&(n={dataSource:n}),r=n&&!!n.dataSource,h.fn.init.call(s,t,n),t=s.wrapper=s.element.addClass("k-widget k-reset k-header k-panelbar"),n=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(n),t.on("click"+m,Y,function(t){s._click(e(t.currentTarget))&&t.preventDefault()}).on(z+m+" "+P+m,Y,s._toggleHover).on("click"+m,K,!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"),i=t.find("li."+H+" > ."+M),i[0]&&s.expand(i.parent(),!1),n.dataSource||s._angularCompile(),o.notify(s)},events:[A,I,E,R,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",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,n){var i=this;i.angular("compile",function(){return{elements:t,data:e.map(n,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,n=l(e._fieldAccessor,e);t.template&&typeof t.template==V?t.template=u(t.template):t.template||(t.template=u("# var text = "+n("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='true' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:u("# var url = "+n("url")+"(item); ## var imageUrl = "+n("imageUrl")+"(item); ## var spriteCssClass = "+n("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(n,i){var o=this,r={};return n=this.element.find(n),o._animating&&n.find("ul").is(":visible")?(o.one("complete",function(){setTimeout(function(){o.expand(n)})}),t):(o._animating=!0,i=i!==!1,n.each(function(t,s){var a,l;if(s=e(s),a=n.children(".k-group,.k-content"),a.length||(a=o._addGroupElement(n)),l=a.add(s.find(O)),!s.hasClass(W)&&l.length>0){if(o.options.expandMode==oe&&o._collapseAllExpanded(s))return o;n.find("."+G).removeClass(G),s.addClass(G),i||(r=o.options.animation,o.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),o._triggerEvent(A,s)||o._toggleItem(s,!1,!1),i||(o.options.animation=r)}}),o)},collapse:function(t,n){var i=this,o={};return i._animating=!0,n=n!==!1,t=i.element.find(t),t.each(function(t,r){r=e(r);var s=r.find(N).add(r.find(O));!r.hasClass(W)&&s.is(ne)&&(r.removeClass(G),n||(o=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(I,r)||i._toggleItem(r,!0),n||(i.options.animation=o))}),i},updateArrow:function(t){var n=this;t=e(t),t.children(w).children(".k-panelbar-collapse, .k-panelbar-expand").remove(),t.filter(function(){var t=n.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),n=t.parent();t.append("<span class='k-icon "+(n.hasClass(H)?" k-panelbar-collapse k-i-arrow-n":" k-panelbar-expand k-i-arrow-s")+"'/>")})},_accessors:function(){var e,t,n,i=this,r=i.options,s=i.element;for(e in re)t=r[re[e]],n=s.attr(o.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),d(t)||(t=[t]),r[re[e]]=t},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?n.html(i):n.empty()):ae(e).toggleClass("k-i-loading",t).removeClass("k-i-refresh")},_refreshRoot:function(t){var n,i=this,o=i.element,r={firstLevel:!0,expanded:!0,length:o.children().length};this.element.empty(),n=e.map(t,function(t,n){return"string"==typeof t?e(t):(t.items=[],e(i.renderItem({group:r,item:a(t,{index:n})})))}),this.element.append(n),this._angularCompileElements(n,t)},_refreshChildren:function(e,t){var n,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"),n=0;n<o.length;n++)s=o.eq(n),this.trigger("itemChange",{item:s,data:this.dataItem(s),ns:r});else i(t),o=t.children(".k-group").children("li"),this._angularCompileElements(o,a)},findByUid:function(t){var n,i,r=this.element.find(".k-item"),s=o.attr("uid");for(i=0;i<r.length;i++)if(r[i].getAttribute(s)==t){n=r[i];break}return e(n)},refresh:function(e){var n,i,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(n=0;n<a.length;n++)c&&!a[n].expanded||(i=a[n],this._hasChildItems(i)&&i.load());this.trigger(F,{node:r?l:t})},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),n=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(n))},_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 n=this.options[re[t]]||[],i=n.length,r="(function(item) {";return 0===i?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(n,function(e){return"function(d){ return "+o.expr(e)+"}"}).join(",")+"];",r+="if(item.level){return levels[Math.min(item.level(), "+i+"-1)](item);}else",r+="{return levels["+i+"-1](item)}"),r+="})"},_dataSource:function(){var e=this,t=e.options,n=t.dataSource;n&&(n=d(n)?{data:n}:n,e._unbindDataSource(),n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource=f.create(n),e._bindDataSource())},_appendItems:function(t,n,i){var o,r,s,l,c,d=this;for(i.hasClass("k-panelbar")?(o=i.children("li"),r=i):(r=i.children(".k-group"),r.length||(r=d._addGroupElement(i)),o=r.children("li")),s={firstLevel:i.hasClass("k-panelbar"),expanded:!0,length:o.length},l=e.map(n,function(t,n){return e("string"==typeof t?t:d.renderItem({group:s,item:a(t,{index:n})}))}),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,n),d.dataItem(i)&&(d.dataItem(i).hasChildren=!0,d.updateArrow(i))},_updateItems:function(t,n){var i,o,s,l,c,d,u=this,h={panelBar:u.options,item:l,group:{}},f="expanded"!=n;if("selected"==n)t[0][n]?(c=u.findByUid(t[0].uid),c.hasClass(W)||u.select(c,!0)):u.clearSelection();else{for(d=e.map(t,function(e){return u.findByUid(e.uid)}),f&&u.angular("cleanup",function(){return{elements:d}}),i=0;i<t.length;i++)h.item=l=t[i],h.panelBar=u,s=d[i],o=s.parent(),f&&(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"==n?u._toggleItem(s,!l[n],!l[n]||"true"):"enabled"==n&&(u.enable(s,l[n]),l[n]||l.selected&&l.set("selected",!1)),s.length&&this.trigger("itemChange",{item:s,data:l,ns:r});f&&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(W,!t).attr(Z,!t)},dataItem:function(t){var n=e(t).closest(k).attr(o.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},select:function(n,i){var o=this;return n===t?o.element.find(Q).parent():(n=o.element.find(n),n.length?n.each(function(){var n=e(this),r=n.children(w);return n.hasClass(W)?o:(o._updateSelected(r,i),t)}):this._updateSelected(n),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 i=this._insert(e,t,t.length?t.find(N):null);return c(i.items,function(){i.group.append(this),n(this)}),this.updateArrow(t),n(i.group.find(".k-first, .k-last")),i.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return c(i.items,function(){t.before(this),n(this)}),n(t),i.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return c(i.items,function(){t.after(this),n(this)}),n(t),i.group.height("auto"),this},remove:function(e){e=this.element.find(e);var t=this,i=e.parentsUntil(t.element,k),o=e.parent("ul");return e.remove(),!o||o.hasClass("k-panelbar")||o.children(k).length||o.remove(),i.length&&(i=i.eq(0),t.updateArrow(i),n(i)),t},reload:function(t){var n=this;t=n.element.find(t),t.each(function(){var t=e(this);n._ajaxRequest(t,t.children("."+M),!t.is(ne))})},_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(n){var i=this,o=i._focused,r=i._itemId;return n===t?o:(i.element.removeAttr("aria-activedescendant"),o&&o.length&&(o[0].id===r&&o.removeAttr("id"),o.children(w).removeClass(U)),e(n).length&&(r=n[0].id||r,n.attr("id",r).children(w).addClass(U),i.element.attr("aria-activedescendant",r)),i._focused=n,t)},_keydown:function(e){var t=this,n=e.keyCode,i=t._current();e.target==e.currentTarget&&(n==s.DOWN||n==s.RIGHT?(t._current(t._nextItem(i)),e.preventDefault()):n==s.UP||n==s.LEFT?(t._current(t._prevItem(i)),e.preventDefault()):n==s.ENTER||n==s.SPACEBAR?(t._click(i.children(w)),e.preventDefault()):n==s.HOME?(t._current(t._first()),e.preventDefault()):n==s.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(C),n=e.nextAll(":visible").first();return t[0]&&(n=t.children("."+T)),n[0]||(n=e.parent(C).parent(k).next()),n[0]||(n=this._first()),n.hasClass(W)&&(n=this._nextItem(n)),n},_prevItem:function(e){if(!e)return this._last();var t,n=e.prevAll(":visible").first();if(n[0])for(t=n;t[0];)t=t.children(C).children("."+_),t[0]&&(n=t);else n=e.parent(C).parent(k),n[0]||(n=this._last());return n.hasClass(W)&&(n=this._prevItem(n)),n},_insert:function(t,n,i){var o,r,s,l=this,c=e.isPlainObject(t),d=n&&n[0];return d||(i=l.element),r={firstLevel:i.hasClass("k-panelbar"),expanded:e(n).hasClass(H),length:i.children().length},d&&!i.length&&(i=e(l.renderGroup({group:r,options:l.options})).appendTo(n)),c||e.isArray(t)||t instanceof f?(t instanceof f&&(t=t.data()),o=e.map(c?[t]:t,function(t,n){return e("string"==typeof t?t:l.renderItem({group:r,item:a(t,{index:n})}))}),d&&(s=l.dataItem(n),s&&(s.hasChildren=!0),n.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:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li."+W).length||n.toggleClass("k-state-hover",t.type==z)},_updateClasses:function(){var t,i,o=this;t=o.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),t.parent().attr(J,!1).not("."+H).children("ul").attr(ee,!0).hide(),i=o.element.add(t).children(),o._updateItemsClasses(i),o.updateArrow(i),n(i)},_updateItemsClasses:function(e){for(var t=e.length,n=0;n<t;n++)this._updateItemClasses(e[n],n)},_updateItemClasses:function(t,n){var i,r,s=this._selected,a=this.options.contentUrls,l=a&&a[n],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(M).attr("role","region").attr(ee,!0).hide().parent().attr(J,!1),r=t.children(q),r[0]&&(s&&s.removeAttr(te).children(q).removeClass(j),r.addClass(j),this._selected=t.attr(te,!0)),t.children(w)[0]||(i="<span class='"+b+"'/>",a&&a[n]&&t[0].parentNode==c&&(i='<a class="k-link k-header" href="'+a[n]+'"/>'),t.contents().filter(function(){return!(this.nodeName.match(p)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(i)),t.parent(".k-panelbar")[0]&&t.children(w).addClass("k-header")},_click:function(e){var t,n,i,o,r,s,a,l,c,d=this,u=d.element;if(!e.parents("li."+W).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)),n=s.find(N).add(s.find(O)),i=r.attr(v),o=i&&("#"==i.charAt(i.length-1)||i.indexOf("#"+d.element[0].id+"-")!=-1),t=!(!o&&!n.length),n.data("animating"))return t;if(d._triggerEvent(E,s)&&(t=!0),t!==!1)return d.options.expandMode==oe&&d._collapseAllExpanded(s)?t:(n.length&&(c=n.is(ne),d._triggerEvent(c?I:A,s)||(t=d._toggleItem(s,c))),t)}},_hasChildItems:function(e){return e.items&&e.items.length>0||e.hasChildren},_toggleItem:function(e,n,i){var o,r,s=this,a=e.find(N),l=e.find(w),c=l.attr(v),d=s.dataItem(e),u=d&&d.loaded();return d&&!i?(d.set("expanded",!n),o=d.hasChildren||!!d.content||!!d.contentUrl):(!d||i&&"true"!==i||u||d.content||d.contentUrl?a.length?(this._toggleGroup(a,n),o=!0):(r=e.children("."+M),r.length&&(o=!0,r.is(ie)&&c!==t?s._ajaxRequest(e,r,n):s._toggleGroup(r,n))):(s.options.loadOnDemand&&this._progress(e,!0),e.children(".k-group,.k-content").remove(),o=d.hasChildren,d.load()),o)},_toggleGroup:function(e,n){var i=this,o=i.options.animation,r=o.expand,s=a({},o.collapse),l=s&&"effects"in s;return e.is(ne)!=n?(i._animating=!1,t):(e.parent().attr(J,!n).attr(ee,n).toggleClass(H,!n).find("> .k-link > .k-panelbar-collapse, .k-panelbar-expand").toggleClass("k-i-arrow-n",!n).toggleClass("k-panelbar-collapse",!n).toggleClass("k-i-arrow-s",n).toggleClass("k-panelbar-expand",n),n?(r=a(l?s:a({reverse:!0},r),{hide:!0}),r.complete=function(){i._animationCallback()}):r=a({complete:function(e){i._triggerEvent(R,e.closest(k)),i._animationCallback()}},r),e.kendoStop(!0,!0).kendoAnimate(r),t)},_animationCallback:function(){var e=this;e.trigger("complete"),e._animating=!1},_addGroupElement:function(t){var n=e('<ul role="group" aria-hidden="true" class="k-group k-panel" style="display:none"></ul>');return t.append(n),n},_collapseAllExpanded:function(t){var n,i=this,o=!1,r=t.find(N).add(t.find(O));return r.is(ne)&&(o=!0),r.is(ne)||0===r.length||(n=t.siblings(),n.find(N).add(n.find(O)).filter(function(){return e(this).is(ne)}).each(function(t,n){n=e(n),o=i._triggerEvent(I,n.closest(k)),o||i._toggleGroup(n,!0)}),i.one("complete",function(){setTimeout(function(){n.each(function(e,t){var n=i.dataItem(t);n&&n.set("expanded",!1)})})})),o},_ajaxRequest:function(t,n,i){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:n.get()}}try{o.angular("cleanup",r),n.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(n,i),o.trigger(B,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){var n=this;return n.trigger(e,{item:t[0]})},_updateSelected:function(e,t){var n=this,i=n.element,o=e.parent(k),r=n._selected,s=n.dataItem(o);r&&r.removeAttr(te),n._selected=o.attr(te,!0),i.find(Q).removeClass(j),i.find("> ."+G+", .k-panel > ."+G).removeClass(G),e.addClass(j),e.parentsUntil(i,k).filter(":has(.k-header)").addClass(G),n._current(o[0]?o:null),s&&s.set("selected",!0),t||n.trigger(D)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(e){var t,n,i=this;return e=a({panelBar:i,group:{}},e),t=i.templates.empty,n=e.item,i.templates.item(a(e,{itemWrapper:i.templates.itemWrapper,renderContent:i.renderContent,arrow:i._hasChildItems(n)||n.content||n.contentUrl?i.templates.arrow:t,subGroup:!e.loadOnDemand||n.expanded?i.renderGroup:t},se))},renderGroup:function(e){var t=this,n=t.templates||e.panelBar.templates;return n.group(a({renderItems:function(e){for(var t="",n=0,i=e.items,o=i?i.length:0,r=a({length:o},e.group);n<o;n++)t+=e.panelBar.renderItem(a(e,{group:r,item:a({index:n},i[n])}));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,n){(n||t)()}),function(e,define){define("kendo.responsivepanel.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=e.proxy,i=".kendoResponsivePanel",o="open",r="close",s="click"+i+" touchstart"+i,a=kendo.ui.Widget,l=a.extend({init:function(t,o){a.fn.init.call(this,t,o),this._guid="_"+kendo.guid(),this._toggleHandler=n(this._toggleButtonClick,this),this._closeHandler=n(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=n(this.resize,this,!0),e(window).on("resize"+i,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 n=e("head,body")[0],i=document.createElement("style");n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.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 n=t.isDefaultPrevented(),i=e(t.target).closest(this.options.toggleButton+",.k-rpanel");i.length||n||this.close()},destroy:function(){a.fn.destroy.call(this),e(window).off("resize"+i,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,n){(n||t)()}),function(e,define){define("kendo.timepicker.min",["kendo.popup.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-o,e.setTime(e.getTime()+i*F))}function i(){var e=new G,t=new G(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),n=new G(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-n.getTimezoneOffset())}function o(e){return 60*e.getHours()*F+e.getMinutes()*F+1e3*e.getSeconds()+e.getMilliseconds()}function r(e,t,n){var i,r=o(t),s=o(n);return!e||r==s||(i=o(e),r>i&&(i+=z),s<r&&(s+=z),i>=r&&i<=s)}function s(e){var t=e.parseFormats;e.format=p(e.format||d.getCulture(e.culture).calendars.standard.patterns.t),t=W(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function a(e){e.preventDefault()}var l,c,d=window.kendo,u=d.keys,h=d.parseDate,f=d._activeElement,p=d._extractFormat,m=d.support,g=m.browser,v=d.ui,_=v.Widget,b="open",w="close",y="change",k=".kendoTimePicker",x="click"+k,C="k-state-default",S="disabled",T="readonly",D="li",A="<span/>",E="k-state-focused",M="k-state-hover",R="mouseenter"+k+" mouseleave"+k,I="mousedown"+k,F=6e4,z=864e5,P="k-state-selected",B="k-state-disabled",L="aria-selected",H="aria-expanded",N="aria-hidden",O="aria-disabled",V="aria-activedescendant",U="id",W=e.isArray,j=e.extend,q=e.proxy,G=Date,$=new G;$=new G($.getFullYear(),$.getMonth(),$.getDate(),0,0,0),l=function(t){var n=this,i=t.id;n.options=t,n._dates=[],n.ul=e('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({overflow:m.kineticScrollNeeded?"":"auto"}).on(x,D,q(n._click,n)).on("mouseenter"+k,D,function(){e(this).addClass(M)}).on("mouseleave"+k,D,function(){e(this).removeClass(M)}),n.list=e("<div class='k-list-container k-list-scroller' unselectable='on'/>").append(n.ul).on(I,a),i&&(n._timeViewID=i+"_timeview",n._optionID=i+"_option_selected",n.ul.attr(U,n._timeViewID)),n._popup(),n._heightHandler=q(n._height,n),n.template=d.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>',{useWithBlock:!1})},l.prototype={current:function(n){var i=this,o=i.options.active;return n===t?i._current:(i._current&&i._current.removeClass(P).removeAttr(L).removeAttr(U),n&&(n=e(n).addClass(P).attr(U,i._optionID).attr(L,!0),i.scroll(n[0])),i._current=n,o&&o(n),t)},close:function(){this.popup.close()},destroy:function(){var e=this;e.ul.off(k),e.list.off(k),e.popup.destroy()},open:function(){var e=this;
e.ul[0].firstChild||e.bind(),e.popup.open(),e._current&&e.scroll(e._current[0])},dataBind:function(e){for(var t,n=this,i=n.options,o=i.format,s=d.toString,a=n.template,l=e.length,c=0,u="";c<l;c++)t=e[c],r(t,i.min,i.max)&&(u+=a(s(t,o,i.culture)));n._html(u)},refresh:function(){var e,t,r,s=this,a=s.options,l=a.format,c=i(),u=c<0,h=a.min,f=a.max,p=o(h),m=o(f),g=a.interval*F,v=d.toString,_=s.template,b=new G((+h)),w=b.getDate(),y=0,k="";for(r=u?(z+c*F)/g:z/g,p!=m&&(p>m&&(m+=z),r=(m-p)/g+1),t=parseInt(r,10);y<r;y++)y&&n(b,g,u),m&&t==y&&(e=o(b),w<b.getDate()&&(e+=z),e>m&&(b=new G((+f)))),s._dates.push(o(b)),k+=_(v(b,l,a.culture));s._html(k)},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(b,t._heightHandler),t.popup.one(b,t._heightHandler),t.current(null),t.select(t._value)},scroll:function(e){if(e){var t=this.list[0],n=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=n+i;o>n?o=n:s>o+r&&(o=s-r),t.scrollTop=o}},select:function(t){var n,i=this,o=i.options,r=i._current;t instanceof Date&&(t=d.toString(t,o.format,o.culture)),"string"==typeof t&&(r&&r.text()===t?t=r:(t=e.grep(i.ul[0].childNodes,function(e){return(e.textContent||e.innerText)==t}),t=t[0]?t:null)),n=i._distinctSelection(t),i.current(n)},_distinctSelection:function(t){var n,i,r=this;return t&&t.length>1&&(n=o(r._value),i=e.inArray(n,r._dates),t=r.ul.children()[i]),t},setOptions:function(e){var t=this.options;e.min=h(e.min),e.max=h(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 n=this,i=e(t.currentTarget),o=i.text(),r=n.options.dates;r&&r.length>0&&(o=r[i.index()]),t.isDefaultPrevented()||(n.select(i),n.options.change(o,!0),n.close())},_height:function(){var e=this,t=e.list,n=t.parent(".k-animation-container"),i=e.options.height;e.ul[0].children.length&&t.add(n).show().height(e.ul[0].scrollHeight>i?i:"auto").hide()},_parse:function(e){var t=this,n=t.options,i=t._value||$;return e instanceof G?e:(e=h(e,n.parseFormats,n.culture),e&&(e=new G(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),e)},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,o=this.options.anchor,r=d._outerWidth;!n.data("width")&&i||(e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=e?parseFloat(e.width):r(o),e&&(g.mozilla||g.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i=t-(r(n)-n.width()),n.css({fontFamily:o.css("font-family"),width:i}).data("width",i))},_popup:function(){var e=this,t=e.list,n=e.options,i=n.anchor;e.popup=new v.Popup(t,j(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:m.isRtl(n.anchor)}))},move:function(e){var n=this,i=e.keyCode,o=n.ul[0],r=n._current,s=i===u.DOWN;if(i===u.UP||s){if(e.altKey)return n.toggle(s),t;r=s?r?r[0].nextSibling:o.firstChild:r?r[0].previousSibling:o.lastChild,r&&n.select(r),n.options.change(n._current.text()),e.preventDefault()}else i!==u.ENTER&&i!==u.TAB&&i!==u.ESC||(e.preventDefault(),r&&n.options.change(r.text(),!0),n.close())}},l.getMilliseconds=o,d.TimeView=l,c=_.extend({init:function(t,n){var i,o,r,a=this;_.fn.init.call(a,t,n),t=a.element,n=a.options,n.min=h(t.attr("min"))||h(n.min),n.max=h(t.attr("max"))||h(n.max),s(n),a._initialOptions=j({},n),a._wrapper(),a.timeView=o=new l(j({},n,{id:t.attr(U),anchor:a.wrapper,format:n.format,change:function(e,n){n?a._change(e):t.val(e)},open:function(e){a.timeView._adjustListWidth(),a.trigger(b)?e.preventDefault():(t.attr(H,!0),i.attr(N,!1))},close:function(e){a.trigger(w)?e.preventDefault():(t.attr(H,!1),i.attr(N,!0))},active:function(e){t.removeAttr(V),e&&t.attr(V,o._optionID)}})),i=o.ul,a._icon(),a._reset();try{t[0].setAttribute("type","text")}catch(c){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":o._timeViewID}),r=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),r?a.enable(!1):a.readonly(t.is("[readonly]")),a._old=a._update(n.value||a.element.val()),a._oldText=t.val(),d.notify(a)},options:{name:"TimePicker",min:$,max:$,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{}},events:[b,w,y],setOptions:function(e){var t=this,n=t._value;_.fn.setOptions.call(t,e),e=t.options,s(e),t.timeView.setOptions(e),n&&t.element.val(d.toString(n,e.format,e.culture))},dataBind:function(e){W(e)&&this.timeView.dataBind(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,o=t._arrow.off(k),r=t.element.off(k),s=t._inputWrapper.off(k);i||n?(s.addClass(n?B:C).removeClass(n?C:B),r.attr(S,n).attr(T,i).attr(O,n)):(s.addClass(C).removeClass(B).on(R,t._toggleHover),r.removeAttr(S).removeAttr(T).attr(O,!1).on("keydown"+k,q(t._keydown,t)).on("focusout"+k,q(t._blur,t)).on("focus"+k,function(){t._inputWrapper.addClass(E)}),o.on(x,q(t._click,t)).on(I,a))},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;_.fn.destroy.call(e),e.timeView.destroy(),e.element.off(k),e._arrow.off(k),e._inputWrapper.off(k),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 n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(E)},_click:function(){var e=this,t=e.element;e.timeView.toggle(),m.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(y),t.trigger(y)),t._typing=!1},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-clock"></span></span>').insertAfter(i)),n._arrow=t.attr({role:"button","aria-controls":n.timeView._timeViewID})},_keydown:function(e){var t=this,n=e.keyCode,i=t.timeView,o=t.element.val();i.popup.visible()||e.altKey?i.move(e):n===u.ENTER&&o!==t._oldText?t._change(o):t._typing=!0},_option:function(e,n){var i=this,o=i.options;return n===t?o[e]:(n=i.timeView._parse(n),n&&(n=new G((+n)),o[e]=n,i.timeView.options[e]=n,i.timeView.bind()),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(M,"mouseenter"===t.type)},_update:function(e){var t=this,n=t.options,i=t.timeView,o=i._parse(e);return r(o,n.min,n.max)||(o=null),t._value=o,t.element.val(d.toString(o||e,n.format,n.culture)),i.value(o),o},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-timepicker"),t[0]||(t=i.wrap(A).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(A).parent()),t[0].style.cssText=i[0].style.cssText,n.wrapper=t.addClass("k-widget k-timepicker k-header").addClass(i[0].className),i.css({width:"100%",height:i[0].style.height}),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))}}),v.plugin(c)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.datetimepicker.min",["kendo.datepicker.min","kendo.timepicker.min"],e)}(function(){return function(e,t){function n(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function i(e){e.preventDefault()}function o(t){var n,i=r.getCulture(t.culture).calendars.standard.patterns,o=!t.parseFormats.length;t.format=c(t.format||i.g),t.timeFormat=n=c(t.timeFormat||i.t),r.DateView.normalize(t),o&&t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"),e.inArray(n,t.parseFormats)===-1&&t.parseFormats.splice(1,0,n)}var r=window.kendo,s=r.TimeView,a=r.parseDate,l=r._activeElement,c=r._extractFormat,d=r.calendar,u=d.isInRange,h=d.restrictValue,f=d.isEqualDatePart,p=s.getMilliseconds,m=r.ui,g=m.Widget,v="open",_="close",b="change",w=".kendoDateTimePicker",y="click"+w,k="disabled",x="readonly",C="k-state-default",S="k-state-focused",T="k-state-hover",D="k-state-disabled",A="mouseenter"+w+" mouseleave"+w,E="mousedown"+w,M="month",R="<span/>",I="aria-activedescendant",F="aria-expanded",z="aria-hidden",P="aria-owns",B="aria-disabled",L=Date,H=new L(1800,0,1),N=new L(2099,11,31),O={view:"date"},V={view:"time"},U=e.extend,W=g.extend({init:function(t,n){var i,s=this;g.fn.init.call(s,t,n),t=s.element,n=s.options,n.disableDates=r.calendar.disabled(n.disableDates),n.min=a(t.attr("min"))||a(n.min),n.max=a(t.attr("max"))||a(n.max),o(n),s._initialOptions=U({},n),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}),s._midnight=s._calculateMidnight(n.min,n.max),i=t.is("[disabled]")||e(s.element).parents("fieldset").is(":disabled"),i?s.enable(!1):s.readonly(t.is("[readonly]")),s._old=s._update(n.value||s.element.val()),s._oldText=t.val(),r.notify(s)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],min:new L(H),max:new L(N),interval:30,height:200,footer:"",start:M,depth:M,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "d")#',dateButtonText:"Open the date view",timeButtonText:"Open the time view"},events:[v,_,b],setOptions:function(e){var t,n,i,s=this,l=s._value;g.fn.setOptions.call(s,e),e=s.options,e.min=t=a(e.min),e.max=n=a(e.max),o(e),s._midnight=s._calculateMidnight(e.min,e.max),i=e.value||s._value||s.dateView._current,t&&!f(t,i)&&(t=new L(H)),n&&!f(n,i)&&(n=new L(N)),s.dateView.setOptions(e),s.timeView.setOptions(U({},e,{format:e.timeFormat,min:t,max:n})),l&&(s.element.val(r.toString(l,e.format,e.culture)),s._updateARIA(l))},_editable:function(t){var n=this,o=n.element.off(w),s=n._dateIcon.off(w),a=n._timeIcon.off(w),c=n._inputWrapper.off(w),d=t.readonly,u=t.disable;d||u?(c.addClass(u?D:C).removeClass(u?C:D),o.attr(k,u).attr(x,d).attr(B,u)):(c.addClass(C).removeClass(D).on(A,n._toggleHover),o.removeAttr(k).removeAttr(x).attr(B,!1).on("keydown"+w,e.proxy(n._keydown,n)).on("focus"+w,function(){n._inputWrapper.addClass(S)}).on("focusout"+w,function(){n._inputWrapper.removeClass(S),o.val()!==n._oldText&&n._change(o.val()),n.close("date"),n.close("time")}),s.on(E,i).on(y,function(){n.toggle("date"),r.support.touch||o[0]===l()||o.focus()}),a.on(E,i).on(y,function(){n.toggle("time"),r.support.touch||o[0]===l()||o.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;g.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.element.off(w),e._dateIcon.off(w),e._timeIcon.off(w),e._inputWrapper.off(w),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 n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_change:function(e){var t,n,i,o=this,r=o.element.val();e=o._update(e),t=+o._old!=+e,n=t&&!o._typing,i=r!==o.element.val(),(n||i)&&o.element.trigger(b),t&&(o._old=e,o._oldText=o.element.val(),o.trigger(b)),o._typing=!1},_option:function(e,i){var o,r,s=this,l=s.options,c=s.timeView,d=c.options,u=s._value||s._old;if(i===t)return l[e];if(i=a(i,l.parseFormats,l.culture)){if(l.min.getTime()===l.max.getTime()&&(d.dates=[]),l[e]=new L(i.getTime()),s.dateView[e](i),s._midnight=s._calculateMidnight(l.min,l.max),u&&(o=f(l.min,u),r=f(l.max,u)),o||r){if(d[e]=i,o&&!r&&(d.max=n(l.interval)),r){if(s._midnight)return c.dataBind([N]),t;o||(d.min=H)}}else d.max=N,d.min=H;c.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_update:function(t){var i,o,s,l,c,d=this,p=d.options,m=p.min,g=p.max,v=p.dates,_=d.timeView,w=d._value,y=a(t,p.parseFormats,p.culture),k=null===y&&null===w||y instanceof Date&&w instanceof Date;return p.disableDates&&p.disableDates(y)&&(y=null,d._old||d.element.val()||(t=null)),+y===+w&&k?(c=r.toString(y,p.format,p.culture),c!==t&&(d.element.val(null===y?t:c),t instanceof String&&d.element.trigger(b)),y):(null!==y&&f(y,m)?y=h(y,m,g):u(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=n(p.interval),i=!0),f(y,g)&&(d._midnight?(_.dataBind([N]),l=!0):(o.max=g,i||(o.min=H),i=!0))),!l&&(!s&&i||s&&!f(s,y))&&(i||(o.max=N,o.min=H),_.bind())),d.element.val(r.toString(y||t,p.format,p.culture)),d._updateARIA(y),y)},_keydown:function(e){var t=this,n=t.dateView,i=t.timeView,o=t.element.val(),s=n.popup.visible();e.altKey&&e.keyCode===r.keys.DOWN?t.toggle(s?"time":"date"):s?(n.move(e),t._updateARIA(n._current)):i.popup.visible()?i.move(e):e.keyCode===r.keys.ENTER&&o!==t._oldText?t._change(o):t._typing=!0},_views:function(){var e,t,n,i,o,l,c=this,d=c.element,h=c.options,f=d.attr("id");c.dateView=e=new r.DateView(U({},h,{id:f,anchor:c.wrapper,change:function(){var t,n,i=e.calendar.value(),o=+i,s=+h.min,a=+h.max;o!==s&&o!==a||(t=o===s?s:a,t=new L(c._value||t),t.setFullYear(i.getFullYear(),i.getMonth(),i.getDate()),u(t,s,a)&&(i=t)),c._value&&(n=r.date.setHours(new Date(i),c._value),u(n,s,a)&&(i=n)),c._change(i),c.close("date")},close:function(e){c.trigger(_,O)?e.preventDefault():(d.attr(F,!1),n.attr(z,!0),t.popup.visible()||d.removeAttr(P))},open:function(t){c.trigger(v,O)?t.preventDefault():(d.val()!==c._oldText&&(l=a(d.val(),h.parseFormats,h.culture),c.dateView[l?"current":"value"](l)),n.attr(z,!1),d.attr(F,!0).attr(P,e._dateViewID),c._updateARIA(l))}})),n=e.div,o=h.min.getTime(),c.timeView=t=new s({id:f,value:h.value,anchor:c.wrapper,animation:h.animation,format:h.timeFormat,culture:h.culture,height:h.height,interval:h.interval,min:new L(H),max:new L(N),dates:o===h.max.getTime()?[new Date(o)]:[],parseFormats:h.parseFormats,change:function(n,i){n=t._parse(n),n<h.min?(n=new L((+h.min)),t.options.min=n):n>h.max&&(n=new L((+h.max)),t.options.max=n),i?(c._timeSelected=!0,c._change(n)):(d.val(r.toString(n,h.format,h.culture)),e.value(n),c._updateARIA(n))},close:function(t){c.trigger(_,V)?t.preventDefault():(i.attr(z,!0),d.attr(F,!1),e.popup.visible()||d.removeAttr(P))},open:function(e){t._adjustListWidth(),c.trigger(v,V)?e.preventDefault():(d.val()!==c._oldText&&(l=a(d.val(),h.parseFormats,h.culture),c.timeView.value(l)),i.attr(z,!1),d.attr(F,!0).attr(P,t._timeViewID),t.options.active(t.current()))},active:function(e){d.removeAttr(I),e&&d.attr(I,t._optionID)}}),i=t.ul},_icons:function(){var t=this,n=t.element,i=t.options,o=n.next("span.k-select");o[0]||(o=e('<span unselectable="on" class="k-select"><span class="k-link k-link-date" aria-label="'+i.dateButtonText+'"><span unselectable="on" class="k-icon k-i-calendar"></span></span><span class="k-link k-link-time" aria-label="'+i.timeButtonText+'"><span unselectable="on" class="k-icon k-i-clock"></span></span></span>').insertAfter(n)),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,n=this,i=n.element;t=i.parents(".k-datetimepicker"),t[0]||(t=i.wrap(R).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(R).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datetimepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=r.template(this.options.ARIATemplate)},_calculateMidnight:function(e,t){return p(e)+p(t)===0},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr(I),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr(I,t.attr("id")))}});m.plugin(W)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.splitter.min",["kendo.resizable.min"],e)}(function(){return function(e,t){function n(e){return v.test(e)}function i(e){return g.test(e)||/^\d+$/.test(e)}function o(e){return!n(e)&&!i(e)}function r(e,t){var i=parseInt(e,10);return n(e)&&(i=Math.floor(i*t/100)),i}function s(e,n){return function(i,o){var r,s=this.element.find(i).data(E);return 1==arguments.length?s[e]:(s[e]=o,n&&(r=this.element.data("kendo"+this.options.name),r.resize(!0)),t)}}function a(e){var t=this,n=e.orientation;t.owner=e,t._element=e.element,t.orientation=n,f(t,n===S?c:l),t._resizable=new d.ui.Resizable(e.element,{orientation:n,handle:".k-splitbar-draggable-"+n+"[data-marker="+e._marker+"]",hint:p(t._createHint,t),start:p(t._start,t),max:p(t._max,t),min:p(t._min,t),invalidClass:"k-restricted-size-"+n,resizeend:p(t._stop,t)})}var l,c,d=window.kendo,u=d.ui,h=d.keys,f=e.extend,p=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",M="mouseleave",R="k-state-focused",I="k-"+E,F="."+I,z=m.extend({init:function(e,t){var n,i=this;m.fn.init.call(i,e,t),i.wrapper=i.element,n=i.options.orientation.toLowerCase()!=T,i.orientation=n?S:T,i._dimension=n?"width":"height",i._keys={decrease:n?h.LEFT:h.UP,increase:n?h.RIGHT:h.DOWN},i._resizeStep=10,i._marker=d.guid().substring(0,8),i._initPanes(),i.resizing=new a(i),i.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,n=t.options.orientation;t.element.children(".k-splitbar-draggable-"+n).on("keydown"+_,p(t._keydown,t)).on("mousedown"+_,function(e){e.currentTarget.focus()}).on("focus"+_,function(t){e(t.currentTarget).addClass(R)}).on("blur"+_,function(n){e(n.currentTarget).removeClass(R),t.resizing&&t.resizing.end()}).on(D+_,function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")}).on(M+_,function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")}).on("mousedown"+_,p(t._addOverlays,t)).end().children(".k-splitbar").on("dblclick"+_,p(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,p(t.resize,t,!1)),e(document).on("mouseup"+_+t._marker,p(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 n,i=this,o=t.keyCode,r=i.resizing,s=e(t.currentTarget),a=i._keys,l=o===a.increase,c=o===a.decrease;l||c?(t.ctrlKey?(n=s[c?"next":"prev"](),r&&r.isResizing()&&r.end(),n[i._dimension]()?i._triggerAction(w,s[c?"prev":"next"]()):i._triggerAction(b,n)):r&&r.move((c?-1:1)*i._resizeStep,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(n,i){"script"!=i.nodeName.toLowerCase()&&t._initPane(i,e[n])}),this.resize()},_initPane:function(t,n){t=e(t).attr("role","group").addClass(I),t.data(E,n?n:{}).toggleClass("k-scrollable",!n||n.scrollable!==!1),this.ajaxRequest(t)},ajaxRequest:function(e,t,n){var i,o=this;e=o.element.find(e),i=e.data(E),t=t||i.contentUrl,t&&(e.append("<span class='k-icon k-i-loading k-pane-loading' />"),d.isLocalUrl(t)?jQuery.ajax({url:t,data:n||{},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,n){o.trigger(k,{pane:e[0],status:n,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 n,i=this,o=e(t.target);o.closest(".k-splitter")[0]==i.element[0]&&(n=o.children(".k-icon:not(.k-resize-handle)"),1===n.length&&(n.is(".k-collapse-prev")?i._triggerAction(w,o.prev()):n.is(".k-collapse-next")?i._triggerAction(w,o.next()):n.is(".k-expand-prev")?i._triggerAction(b,o.prev()):n.is(".k-expand-next")&&i._triggerAction(b,o.next())))},_arrowClick:function(t){var n=this;return function(i){var o,r=e(i.target);r.closest(".k-splitter")[0]==n.element[0]&&(o=r.is(".k-"+t+"-prev")?r.parent().prev():r.parent().next(),n._triggerAction(t,o))}},_updateSplitBar:function(e,t,n){var i=function(e,t){return t?"<div class='k-icon "+e+"' />":""},o=this.orientation,r=t.resizable!==!1&&n.resizable!==!1,s=t.collapsible,a=t.collapsed,l=n.collapsible,c=n.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(i("k-collapse-prev k-i-arrow-60-up",s&&!a&&!c&&o==T)+i("k-collapse-prev k-i-arrow-60-left",s&&!a&&!c&&o==S)+i("k-expand-prev k-i-arrow-60-down",s&&a&&!c&&o==T)+i("k-expand-prev k-i-arrow-60-right",s&&a&&!c&&o==S)+i("k-resize-handle k-i-hbar",r&&o==T)+i("k-resize-handle k-i-vbar",r&&o==S)+i("k-collapse-next k-i-arrow-60-down",l&&!c&&!a&&o==T)+i("k-collapse-next k-i-arrow-60-right",l&&!c&&!a&&o==S)+i("k-expand-next k-i-arrow-60-up",l&&c&&!a&&o==T)+i("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 n=e(this),i=n.prevAll(F).first().data(E),o=n.nextAll(F).first().data(E);o&&t._updateSplitBar(n,i,o)})},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(F):e()},_resize:function(){var n,i,s,a,l,c,u,h,f,p,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"]}),n=0,i=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 i++,n+=a,a}),k-=n,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",f=_?"offsetWidth":"offsetHeight",0===a&&(p=v.filter(function(){return!(e(this).data(E)||{}).collapsed}).last(),p[y](k+p[0][f])),g.children().css(u,g[u]()).each(function(e,t){"script"!=t.tagName.toLowerCase()&&(t.style[h]=Math.floor(c)+"px",c+=t[f])}),m._detachEvents(),m._attachEvents(),m.wrapper.removeClass("k-splitter-resizing"),d.resize(v),m.trigger(C)},toggle:function(e,n){var i,o=this;e=o.element.find(e),i=e.data(E),(n||i.collapsible)&&(1==arguments.length&&(n=i.collapsed!==t&&i.collapsed),i.collapsed=!n,i.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,n){var i=this;return n.length&&(i.options.panes.splice(t,0,e),i._initPane(n,e),i._removeSplitBars(),i.resize(!0)),n},append:function(t){t=t||{};var n=this,i=e("<div />").appendTo(n.element);return n._addPane(t,n.options.panes.length,i)},insertBefore:function(t,n){n=e(n),t=t||{};var i=this,o=i.wrapper.children(".k-pane").index(n),r=e("<div />").insertBefore(e(n));return i._addPane(t,o,r)},insertAfter:function(t,n){n=e(n),t=t||{};var i=this,o=i.wrapper.children(".k-pane").index(n),r=e("<div />").insertAfter(e(n));return i._addPane(t,o+1,r)},remove:function(t){t=e(t);var n=this;return t.length&&(d.destroy(t),t.each(function(t,i){n.options.panes.splice(n.wrapper.children(".k-pane").index(i),1),e(i).remove()}),n._removeSplitBars(),n.options.panes.length&&n.resize(!0)),n},size:s("size",!0),min:s("min"),max:s("max")});u.plugin(z),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 n=this;return e("<div class='k-ghost-splitbar k-ghost-splitbar-"+n.orientation+" k-state-default' />").css(n.alternateSizingProperty,t[n.alternateSizingProperty]())},_start:function(t){var n=this,o=e(t.currentTarget),r=o.prev(),s=o.next(),a=r.data(E),l=s.data(E),c=parseInt(r[0].style[n.positioningProperty],10),d=parseInt(s[0].style[n.positioningProperty],10)+s[0][n.sizingDomProperty]-o[0][n.sizingDomProperty],u=parseInt(n._element.css(n.sizingProperty),10),h=function(e){var t=parseInt(e,10);return(i(e)?t:u*t/100)||0},f=h(a.min),p=h(a.max)||d-c,m=h(l.min),g=h(l.max)||d-c;n.previousPane=r,n.nextPane=s,n._maxPosition=Math.min(d-m,c+p),n._minPosition=Math.max(c+f,d-g)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var n,i,r,s,a,l,c,u,h=this,f=e(t.currentTarget),p=h.owner;return p._panes().children(".k-splitter-overlay").remove(),t.keyCode!==d.keys.ESC&&(n=t.position,i=f.prev(),r=f.next(),s=i.data(E),a=r.data(E),l=n-parseInt(i[0].style[h.positioningProperty],10),c=parseInt(r[0].style[h.positioningProperty],10)+r[0][h.sizingDomProperty]-n-f[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"),p.resize(!0)),!1}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dialog.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){return t!==e}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),parseInt(t,10))}function o(e){return e.keyCode==y.ENTER||e.keyCode==y.SPACEBAR}var r,s,a,l,c,d,u,h,f,p,m,g=window.kendo,v=g.Class,_=g.ui.Widget,b=e.proxy,w=g.template,y=g.keys,k=e.isFunction,x="kendoWindow",C=".k-dialog",S=".k-window",T=".k-dialog-close",D="k-content",A=".k-content",E="k-dialog-titleless",M=".k-dialog-title",R=".k-window-titlebar",I=".k-dialog-buttongroup",F=".k-button",z="k-alert",P="k-confirm",B="k-prompt",L=".k-textbox",H=".k-overlay",N=":visible",O="zIndex",V="body",U="initOpen",W="open",j="close",q="show",G="hide",$="width",Y=100,K={okText:"OK",cancel:"Cancel"},Q=Math.ceil,X=":not(link,meta,script,style)",Z=_.extend({init:function(e,t){var n=this;_.fn.init.call(n,e,t),n._init(n.element,n.options),g.notify(n)},_init:function(i,o){var s,a=this;a._centerCallback=b(a._center,a),a.appendTo=e(V),n(o.visible)&&null!==o.visible||(o.visible=i.is(N)),a.wrapperTemplate===t&&(a.wrapperTemplate=r.wrapper),a._createDialog(),s=a.wrapper=i.closest(C),o._defaultFocus===t&&(a._defaultFocus=i[0]),a._tabindex(i),a._dimensions(),this._tabKeyTrap=new m(s),a.options.visible?(a.toFront(),a._triggerInitOpen(),a.trigger(W),o.modal&&(a._overlay(s.is(N)).css({opacity:.5}),a._focusDialog())):a.wrapper.hide(),o.closable&&(s.autoApplyNS(x),i.autoApplyNS(x),s.find(T).on("click",b(a._closeClick,a)).on("keydown",b(a._closeKeyHandler,a)),i.on("keydown",b(a._keydown,a)))},_dimensions:function(){var e,t,n=this,o=n.wrapper,r=n.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&&o.width((""+s).indexOf("%")>0?s:i(s,r.minWidth,r.maxWidth)),a&&(o.height((""+a).indexOf("%")>0?a:i(a,r.minHeight,r.maxHeight)),this._setElementHeight())},_setElementMaxHeight:function(){var e,t,n=this,i=n.element,o=n.options.maxHeight;o!=1/0&&(e=n._paddingBox(i),t=parseFloat(o,10)-n._uiHeight()-e.vertical,t>0&&i.css({maxHeight:Q(t)+"px",overflow:"hidden"}))},_paddingBox:function(e){var t=parseFloat(e.css("padding-top"),10),n=parseFloat(e.css("padding-left"),10),i=parseFloat(e.css("padding-bottom"),10),o=parseFloat(e.css("padding-right"),10);return{vertical:t+i,horizontal:n+o}},_setElementHeight:function(){var e=this,t=e.element,n=e.options.height,i=e._paddingBox(t),o=parseFloat(n,10)-e._uiHeight()-i.vertical;o>0&&e.element.css({height:Q(o)+"px",overflow:"hidden"})},_uiHeight:function(){var e=this,t=e.wrapper,n=t.children(I),i=n[0]&&n[0].offsetHeight||0,o=t.children(R),r=o[0]&&o[0].offsetHeight||0;return i+r},_overlay:function(t){var n=this.appendTo.children(H),i=this.wrapper;return n.length||(n=e(r.overlay)),n.insertBefore(i[0]).toggle(t).css(O,parseInt(i.css(O),10)-1),t?this._waiAriaOverlay():this._removeWaiAriaOverlay(),n},_waiAriaOverlay:function(){var t=this.wrapper;this._overlayedNodes=t.prevAll(X).add(t.nextAll(X)).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),n=t.data("ariaHidden");n?t.attr("aria-hidden",n):t.removeAttr("aria-hidden")})},_closeClick:function(e){e.preventDefault(),this.close()},_closeKeyHandler:function(e){(o(e)||e.keyCode==y.ESC)&&this.close()},_keydown:function(e){var t=this,n=t.options,i=e.keyCode;i==y.ESC&&!t._closing&&n.closable&&t.close()},_createDialog:function(){var t=this,n=t.element,i=t.options,o=g.support.isRtl(n),s=e(r.titlebar(i)),a=(n.id||g.guid())+"_title",l=e(t.wrapperTemplate(i));l.toggleClass("k-rtl",o),n.addClass(D),t.appendTo.append(l),i.closable!==!1&&(i.title!==!1?s.append(r.close(i)):l.append(r.close(i))),i.title!==!1?(l.append(s),s.attr("id",a),
l.attr("aria-labelledby",a)):l.addClass(E),l.append(n),i.content&&(g.destroy(n.children()),n.html(i.content)),i.actions.length&&t._createActionbar(l)},_createActionbar:function(t){var n="stretched"===this.options.buttonLayout,i=n?"stretched":"normal",o=e(r.actionbar({buttonLayout:i}));this._addButtons(o),n&&this._normalizeButtonSize(o),t.append(o)},_addButtons:function(t){var n,i,o,s,a=this,l=a.options,c=b(a._actionClick,a),d=b(a._actionKeyHandler,a),u=a.options.actions,h=u.length,f=Y/h;for(o=0;o<h;o++)n=u[o],i=a._mergeTextWithOptions(n),s=e(r.action(n)).autoApplyNS(x).html(i).appendTo(t).data("action",n.action).on("click",c).on("keydown",d),"stretched"===l.buttonLayout&&s.css($,f+"%")},_mergeTextWithOptions:function(e){var t=e.text;return t?w(t)(this.options):""},_normalizeButtonSize:function(e){var t=this,n=t.options,i=e.children(F+":last"),o=parseFloat(i[0].style[$]),r=Y-n.actions.length*o;r>0&&i.css($,o+r+"%")},_tabindex:function(e){var t,n=this,i=n.wrapper,o=i.find(T),r=i.find(I+" "+F);_.fn._tabindex.call(this,e),t=e.attr("tabindex"),o.attr("tabIndex",t),r.attr("tabIndex",t)},_actionClick:function(e){this._runActionBtn(e.currentTarget)},_actionKeyHandler:function(e){o(e)?this._runActionBtn(e.currentTarget):e.keyCode==y.ESC&&this.close()},_runActionBtn:function(t){var n,i,o=this;o._closing||(n=e(t).data("action"),i=k(n)&&n({sender:o})===!1,i||o.close())},open:function(){var e,t,n,i=this,o=i.wrapper,r=this._animationOptions(W),s=i.options;return this._triggerInitOpen(),i.trigger(W)||(i._closing&&o.kendoStop(!0,!0),i._closing=!1,i.toFront(),s.visible=!0,s.modal&&(t=!!i._modals().length,e=i._overlay(t),e.kendoStop(!0,!0),r.duration&&g.effects.Fade&&!t?(n=g.fx(e).fadeIn(),n.duration(r.duration||0),n.endValue(.5),n.play()):e.css("opacity",.5),e.show()),o.show().kendoStop().kendoAnimate({effects:r.effects,duration:r.duration,complete:b(i._openAnimationEnd,i)}),o.show()),i},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_openAnimationEnd:function(){this.options.modal&&this._focusDialog(),this.trigger(q)},_triggerInitOpen:function(){n(this._initOpenTriggered)||(this._initOpenTriggered=!0,this.trigger(U))},toFront:function(){var t=this,n=t.wrapper,i=+n.css(O),o=i;return t.center(),e(S).each(function(t,n){var o=e(n),r=o.css(O);isNaN(r)||(i=Math.max(+r,i))}),(!n[0].style.zIndex||o<i)&&n.css(O,i+2),t.element.find("> .k-overlay").remove(),n=null,t},close:function(){return this._close(!0),this._stopCenterOnResize(),this},_close:function(e){var t=this,n=t.wrapper,i=t.options,o=this._animationOptions("open"),r=this._animationOptions("close");if(n.is(N)&&!t.trigger(j,{userTriggered:!e})){if(t._closing)return;t._closing=!0,i.visible=!1,this._removeOverlay(),n.kendoStop().kendoAnimate({effects:r.effects||o.effects,reverse:r.reverse===!0,duration:r.duration,complete:b(this._closeAnimationEnd,this)})}return t},center:function(){this._center(),this._centerOnResize()},_center:function(){var t=this,n=t.wrapper,i=e(window),o=0,r=0,s=r+Math.max(0,(i.width()-n.width())/2),a=o+Math.max(0,(i.height()-n.height()-parseInt(n.css("paddingTop"),10))/2);return n.css({left:s,top:a}),t},_centerOnResize:function(){this._trackResize||(g.onResize(this._centerCallback),this._trackResize=!0)},_stopCenterOnResize:function(){g.unbindResize(this._centerCallback),this._trackResize=!1},_removeOverlay:function(){var e=this._modals(),t=this.options,n=t.modal&&!e.length;n?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(G),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},_modals:function(){var t=this,n=e(S).filter(function(){var n=e(this),i=t._object(n),o=i&&i.options;return o&&o.modal&&t.options.appendTo==o.appendTo&&o.visible&&n.is(N)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(A),i=g.widgetInstance(n);return i?i:t},destroy:function(){var t=this;t._destroy(),_.fn.destroy.call(t),t.wrapper.remove(),t.wrapper=t.element=e()},_destroy:function(){var e=this,t="."+x;e.wrapper.off(t),e.element.off(t),e.wrapper.find(T+","+I+" > "+F).off(t),e._stopCenterOnResize()},title:function(t){var n=this,i=n.wrapper,o=n.options,s=i.children(R),a=s.children(M);return arguments.length?(t===!1?(s.remove(),i.addClass(E)):(s.length||(s=e(r.titlebar(o)).prependTo(i),a=s.children(M),i.removeClass(E)),a.html(t)),n.options.title=t,n):a.html()},content:function(e,t){var i=this,o=i.wrapper.children(A);return n(e)?(this.angular("cleanup",function(){return{elements:o.children()}}),g.destroy(o.children()),o.html(e),this.angular("compile",function(){var e,n=[];for(e=o.length;--e>=0;)n.push({dataItem:t});return{elements:o.children(),data:n}}),i.options.content=e,i):o.html()},_focusDialog:function(){this._defaultFocus&&this._focus(this._defaultFocus),this._tabKeyTrap.trap()},_focus:function(e){e&&e.focus()},events:[U,W,j,q,G],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:V,closable:!0}}),J=Z.extend({options:{name:"Dialog",messages:{close:"Close"}}});g.ui.plugin(J),s=Z.extend({_init:function(e,t){var n=this;n.wrapperTemplate=r.alertWrapper,t._defaultFocus=null,n._ensureContentId(e),Z.fn._init.call(n,e,t),n.bind(G,b(n.destroy,n)),n._ariaDescribedBy(),n._initFocus()},_ensureContentId:function(t){var n=e(t);n.attr("id")||n.attr("id",g.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+" > "+F)[0]},options:{title:window.location.host,closable:!1,messages:K}}),a=s.extend({_init:function(e,t){var n=this;s.fn._init.call(n,e,t),n.wrapper.addClass(z)},options:{name:"Alert",modal:!0,actions:[{text:"#= messages.okText #"}]}}),g.ui.plugin(a),l=function(t){return e(r.alert).kendoAlert({content:t}).data("kendoAlert").open()},c=s.extend({_init:function(t,n){var i=this;s.fn._init.call(i,t,n),i.wrapper.addClass(P),i.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()}}]}}),g.ui.plugin(c),d=function(t){var n=e(r.confirm).kendoConfirm({content:t}).data("kendoConfirm").open();return n.result},u=s.extend({_init:function(t,n){var i=this;s.fn._init.call(i,t,n),i.wrapper.addClass(B),i._createPrompt(),i.result=e.Deferred()},_createPrompt:function(){var t=this.options.value,n=e(r.promptInputContainer).insertAfter(this.element);t&&n.children(L).val(t),this._defaultFocus=this._chooseEntryFocus(),this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(L)[0]},options:{name:"Prompt",modal:!0,value:"",actions:[{text:"#= messages.okText #",primary:!0,action:function(e){var t=e.sender,n=t.wrapper.find(L).val();t.result.resolve(n)}},{text:"#= messages.cancel #",action:function(e){var t=e.sender,n=t.wrapper.find(L).val();e.sender.result.reject(n)}}]}}),g.ui.plugin(u),h=function(t,n){var i=e(r.prompt).kendoPrompt({content:t,value:n}).data("kendoPrompt").open();return i.result},r={wrapper:w("<div class='k-widget k-dialog k-window' role='dialog' />"),action:w("<button type='button' class='k-button# if (data.primary) { # k-primary# } role='button' #'></button>"),titlebar:w("<div class='k-window-titlebar k-dialog-titlebar k-header'><span class='k-window-title k-dialog-title'>#= title #</span></div>"),close:w("<a role='button' href='\\#' class='k-button-bare 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:w("<div class='k-dialog-buttongroup k-dialog-button-layout-#= buttonLayout #' role='toolbar' />"),overlay:"<div class='k-overlay' />",alertWrapper:w("<div class='k-widget k-dialog k-window' role='alertdialog' />"),alert:"<div />",confirm:"<div />",prompt:"<div />",promptInputContainer:"<div class='k-prompt-container'><input type='text' class='k-textbox' /></div>"},f="kendoTabKeyTrap",p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]",m=v.extend({init:function(t){this.element=e(t),this.element.autoApplyNS(f)},trap:function(){this.element.on("keydown",b(this._keepInTrap,this))},removeTrap:function(){this.element.kendoDestroy(f)},destroy:function(){this.element.kendoDestroy(f),this.element=t},_keepInTrap:function(e){var t,n,i,o,r;9===e.which&&(t=e.target,n=this.element.find(p).filter(":visible[tabindex!=-1]"),i=n.length,o=i-1,r=n.index(t),e.shiftKey?0===r&&(n.get(o).focus(),e.preventDefault()):r===o&&(n.get(0).focus(),e.preventDefault()))}}),g.alert=l,g.confirm=d,g.prompt=h}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.virtuallist.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e){return e[e.length-1]}function i(e){return e instanceof Array?e:[e]}function o(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function r(e,t,n){return Math.ceil(e*t/n)}function s(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function a(){var t,n=e('<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>');return n.css({position:"absolute",left:"-200000px",visibility:"hidden"}),n.appendTo(document.body),t=parseFloat(_.getComputedStyles(n.find(".k-item")[0],["line-height"])["line-height"]),n.remove(),t}function l(e,t,n){return{down:e*n,up:e*(t-1-n)}}function c(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,o){return t>o?t-e.top<n:0===e.top||t-e.top>i}}function d(e,t){return function(n){return t(e.scrollTop,n)}}function u(e){return function(t,n){return e(t.items,t.index,n),t}}function h(e,t){_.support.browser.msie&&_.support.browser.version<10?e.style.top=t+"px":(e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)")}function f(t,n){return function(i,o){for(var r=0,s=i.length;r<s;r++)t(i[r],o[r],n),o[r].item&&this.trigger(H,{item:e(i[r]),data:o[r].item,ns:_.ui})}}function p(e,t){var n;return t>0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}function m(n,i,o){var r=o.template;n=e(n),i.item||(r=o.placeholderTemplate),this.angular("cleanup",function(){return{elements:[n]}}),n.attr("data-uid",i.item?i.item.uid:"").attr("data-offset-index",i.index).html(r(i.item||{})),n.toggleClass(F,i.current),n.toggleClass(I,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup&&e("<div class="+R+"></div>").appendTo(n).html(o.groupTemplate(i.group)),i.top!==t&&h(n[0],i.top),this.angular("compile",function(){return{elements:[n],data:[{dataItem:i.item,group:i.group,newGroup:i.newGroup}]}})}function g(e,t){var n,i,o,r,s=t.length,a=e.length,l=[],c=[];if(a)for(o=0;o<a;o++){for(n=e[o],i=!1,r=0;r<s;r++)if(n===t[r]){i=!0,l.push({index:o,item:n});break}i||c.push(n)}return{changed:l,unchanged:c}}function v(e){return e&&"resolved"!==e.state()}var _=window.kendo,b=_.ui,w=b.Widget,y=b.DataBoundWidget,k=e.proxy,x="k-virtual-wrap",C="k-virtual-list",S="k-virtual-content",T="k-list",D="k-group-header",A="k-virtual-item",E="k-item",M="k-height-container",R="k-group",I="k-state-selected",F="k-state-focused",z="k-state-hover",P="change",B="click",L="listBound",H="itemChange",N="activate",O="deactivate",V=".VirtualList",U=y.extend({init:function(t,n){var o=this;o.bound(!1),o._fetching=!1,w.fn.init.call(o,t,n),o.options.itemHeight||(o.options.itemHeight=a()),n=o.options,o.element.addClass(T+" "+C).attr("role","listbox"),o.content=o.element.wrap("<div unselectable='on' class='"+S+"'></div>").parent(),o.wrapper=o.content.wrap("<div class='"+x+"'></div>").parent(),o.header=o.content.before("<div class='"+D+"'></div>").prev(),o.element.on("mouseenter"+V,"li:not(.k-loading-item)",function(){e(this).addClass(z)}).on("mouseleave"+V,"li",function(){e(this).removeClass(z)}),o._values=i(o.options.value),o._selectedDataItems=[],o._selectedIndexes=[],o._rangesList={},o._promisesList=[],o._optionID=_.guid(),o._templates(),o.setDataSource(n.dataSource),o.content.on("scroll"+V,_.throttle(function(){o._renderItems(),o._triggerListBound()},n.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:"fixed header template",mapValueTo:"index",valueMapper:null},events:[P,B,L,H,N,O],setOptions:function(e){w.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(B,"."+A,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(V),this.dataSource.unbind(P,this._refreshHandler),w.fn.destroy.call(this)},setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=_.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(P,i._refreshHandler),i._clean(),i.bound(!1),i._deferValueSet=!0,n=i.value(),i.value([]),i.mute(function(){i.value(n)})):i._refreshHandler=e.proxy(i.refresh,i),i.dataSource=o.bind(P,i._refreshHandler),i.setDSFilter(o.filter()),0!==o.view().length?i.refresh():i.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(L))},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},refresh:function(e){var t,n=this,i=e&&e.action,o="itemchange"===i,r=this.isFiltered();n._mute||(n._deferValueSet=!1,n._fetching?(n._renderItems&&n._renderItems(!0),n._triggerListBound()):(r&&n.focus(0),n._createList(),i||!n._values.length||r||n.options.skipUpdateOnBind?(n.bound(!0),n._triggerListBound()):(n._selectingValue=!0,n.value(n._values,!0).done(function(){n.bound(!0),n._selectingValue=!1,n._triggerListBound()}))),(o||"remove"===i)&&(t=g(n._selectedDataItems,e.items),t.changed.length&&(o?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))),n._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=i(e)},value:function(n,o){var r,s=this;return n===t?s._values.slice():(null===n&&(n=[]),n=i(n),s._valueDeferred&&"resolved"!==s._valueDeferred.state()||(s._valueDeferred=e.Deferred()),r="multiple"===s.options.selectable&&s.select().length&&n.length,!r&&n.length||s.select(-1),s._values=n,(s.bound()&&!s._mute&&!s._deferValueSet||o)&&s._prefetchByValue(n),s._valueDeferred)},_prefetchByValue:function(e){var n,i,r,s=this,a=s._dataView,l=s._valueGetter,c=s.options.mapValueTo,d=!1,u=[];for(i=0;i<e.length;i++)for(r=0;r<a.length;r++)n=a[r].item,n&&(d=o(n)?e[i]===n:e[i]===l(n),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.select([-1]),t)},mapValueToIndex:function(e){if(e=e===t||e===-1||null===e?[]:i(e),e.length){var n=this._deselect([]).removed;n.length&&this._triggerChange(n,[])}else e=[-1];this.select(e)},mapValueToDataItem:function(n){var o,r,s;if(n=n===t||null===n?[]:i(n),n.length){for(o=e.map(this._selectedDataItems,function(e,t){return{index:t,dataItem:e}}),r=e.map(n,function(e,t){return{index:t,dataItem:e}}),this._selectedDataItems=n,this._selectedIndexes=[],s=0;s<this._selectedDataItems.length;s++)this._selectedIndexes.push(t);this._triggerChange(o,r),this._valueDeferred&&this._valueDeferred.resolve()}else this.select([-1])},deferredRange:function(t){var n=this.dataSource,i=this.itemCount,o=this._rangesList,r=e.Deferred(),s=[],a=Math.floor(t/i)*i,l=Math.ceil(t/i)*i,c=l===a?[l]:[a,l];return e.each(c,function(t,r){var a,l=r+i,c=o[r];c&&c.end===l?a=c.deferred:(a=e.Deferred(),o[r]={end:l,deferred:a},n._multiplePrefetch(r,i,function(){a.resolve()})),s.push(a)}),e.when.apply(e,s).then(function(){r.resolve()}),r},prefetch:function(t){var n=this,i=this.itemCount,o=!n._promisesList.length;return v(n._activeDeferred)||(n._activeDeferred=e.Deferred(),n._promisesList=[]),e.each(t,function(e,t){n._promisesList.push(n.deferredRange(n._getSkip(t,i)))}),o&&e.when.apply(e,n._promisesList).done(function(){n._promisesList=[],n._activeDeferred.resolve()}),n._activeDeferred},_findDataItem:function(e,t){var n,i;if("group"===this.options.type)for(i=0;i<e.length;i++){if(n=e[i].items,!(n.length<=t))return n[t];t-=n.length}return e[t]},_getRange:function(e,t){return this.dataSource._findRange(e,Math.min(e+t,this.dataSource.total()))},dataItemByIndex:function(e){var t=this.itemCount,n=this._getSkip(e,t),i=this._getRange(n,t);return this._findDataItem(i,[e-n])},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(i){var o,r,s,a,l,c,d=this.options.itemHeight,u=this._optionID,h=!0;if(i===t)return a=this.element.find("."+F),a.length?a:null;if("function"==typeof i)for(s=this.dataSource.flatView(),l=0;l<s.length;l++)if(i(s[l])){i=l;break}return i instanceof Array&&(i=n(i)),isNaN(i)?(o=e(i),r=parseInt(e(o).attr("data-offset-index"),10)):(r=i,o=this._getElementByIndex(r)),r===-1?(this.element.find("."+F).removeClass(F),this._focusedIndex=t,t):(o.length?(o.hasClass(F)&&(h=!1),this._focusedIndex!==t&&(a=this._getElementByIndex(this._focusedIndex),a.removeClass(F).removeAttr("id"),h&&this.trigger(O)),this._focusedIndex=r,o.addClass(F).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(N)):(this._focusedIndex=r,this.items().removeClass(F),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)},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,n=this.dataSource.total()-1;return!isNaN(t)&&t<n?(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(P,{removed:e,added:t})},select:function(i){var o,r,s,a,l,c=this,d="multiple"!==c.options.selectable,u=v(c._activeDeferred),h=this.isFiltered(),f=[];return i===t?c._selectedIndexes.slice():(c._selectDeferred&&"resolved"!==c._selectDeferred.state()||(c._selectDeferred=e.Deferred()),o=c._getIndecies(i),r=d&&!h&&n(o)===n(this._selectedIndexes),f=c._deselectCurrentValues(o),f.length||!o.length||r?(c._triggerChange(f),c._valueDeferred&&c._valueDeferred.resolve(),c._selectDeferred.resolve().promise()):(1===o.length&&o[0]===-1&&(o=[]),a=c._deselect(o),f=a.removed,o=a.indices,d&&(u=!1,o.length&&(o=[n(o)])),l=function(){var e=c._select(o);c.focus(o),c._triggerChange(f,e),c._valueDeferred&&c._valueDeferred.resolve(),c._selectDeferred.resolve()},s=c.prefetch(o),u||(s?s.done(l):l()),c._selectDeferred.promise()))},bound:function(e){return e===t?this._listCreated:(this._listCreated=e,t)},mute:function(e){this._mute=!0,k(e(),this),this._mute=!1},setDSFilter:function(t){this._lastDSFilter=e.extend({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!_.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},skipUpdate:e.noop,_getElementByIndex:function(t){return this.items().filter(function(n,i){return t===parseInt(e(i).attr("data-offset-index"),10)})},_getElementByDataItem:function(t){var n,i,r,s=this._dataView,a=this._valueGetter;for(r=0;r<s.length;r++)if(i=s[r].item&&o(s[r].item)?s[r].item===t:a(s[r].item)===a(t)){n=s[r];break}return n?this._getElementByIndex(n.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,n=this.options.itemHeight,i=this.dataSource.total();return e?t/n>i&&(t=i*n):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,n=this.content.scrollTop(),i=this._screenHeight,o=this.options.itemHeight,r=e*o,s=r+o,a=n+i;return t=r===n-o||s>n&&r<n?"top":r===a||r<a&&a<s?"bottom":r>=n&&r<=n+(i-o)?"inScreen":"outScreen"},_templates:function(){var e,t=this.options,n={template:t.template,placeholderTemplate:t.placeholderTemplate,groupTemplate:t.groupTemplate,fixedGroupTemplate:t.fixedGroupTemplate};for(e in n)"function"!=typeof n[e]&&(n[e]=_.template(n[e]||""));this.templates=n},_generateItems:function(e,t){for(var n,i=[],o=this.options.itemHeight+"px";t-- >0;)n=document.createElement("li"),n.tabIndex=-1,n.className=A+" "+E,n.setAttribute("role","option"),n.style.height=o,n.style.minHeight=o,e.appendChild(n),i.push(n);return i},_saveInitialRanges:function(){var t,n=this.dataSource._ranges,i=e.Deferred();for(i.resolve(),this._rangesList={},t=0;t<n.length;t++)this._rangesList[n[t].start]={end:n[t].end,deferred:i}},_createList:function(){var t=this,n=t.content.get(0),i=t.options,o=t.dataSource;t.bound()&&t._clean(),t._saveInitialRanges(),t._buildValueGetter(),t.setScreenHeight(),t.itemCount=r(t._screenHeight,i.listScreens,i.itemHeight),t.itemCount>o.total()&&(t.itemCount=o.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(i.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,n){var i=t._listItems(t.getter);return t._fixedHeader(e,i(e,n))},t._renderItems=t._whenChanged(d(n,t._onScroll),u(t._reorderList(t._items,e.proxy(m,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight)},_setHeight:function(e){var t,n,i=this.heightContainer;if(i?t=i.offsetHeight:i=this.heightContainer=s(this.content[0],M),e!==t)for(i.innerHTML="";e>0;)n=Math.min(e,25e4),s(i).style.height=n+"px",e-=n},_getter:function(){var e=null,t=this.dataSource,n=t.skip(),i=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,f,p,m,g=this;if(t.inRange(a,o)){if(n!==a&&this.mute(function(){t.range(a,o),n=a}),"group"===i){if(!r[a])for(c=r[a]=[],d=t.view(),u=0,h=d.length;u<h;u++)for(f=d[u],p=0,m=f.items.length;p<m;p++)c.push({item:f.items[p],group:f.value});l=r[a][s-a]}else l=t.view()[s-a];return l}return e!==a&&(e=a,n=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 n,i=this.currentVisibleGroup,o=this.options.itemHeight,r=Math.floor((e-t.top)/o),s=t.items[r];return s&&s.item&&(n=s.group,n!==i&&(this.header[0].innerHTML=n||"",this.currentVisibleGroup=n)),t},_itemMapper:function(e,t,n){var i,r=this.options.type,s=this.options.itemHeight,a=this._focusedIndex,l=!1,c=!1,d=!1,u=null,h=!1,f=this._valueGetter;if("group"===r&&(e&&(d=0===t||this._currentGroup&&this._currentGroup!==e.group,this._currentGroup=e.group),u=e?e.group:null,e=e?e.item:null),!this.isFiltered()&&n.length&&e)for(i=0;i<n.length;i++)if(h=o(e)?n[i]===e:n[i]===f(e)){n.splice(i,1),l=!0;break}return a===t&&(c=!0),{item:e?e:null,group:u,newGroup:d,selected:l,current:c,index:t,top:t*s}},_range:function(e){var t,n,i,o=this.itemCount,r=this._values.slice(),s=[];for(this._view={},this._currentGroup=null,n=e,i=e+o;n<i;n++)t=this._itemMapper(this.getter(n,e),n,r),s.push(t),this._view[t.index]=t;return this._dataView=s,s},_getDataItemsCollection:function(e,t){var n=this._range(this._listIndex(e,t));return{index:n.length?n[0].index:0,top:n.length?n[0].top:0,items:n}},_listItems:function(){var t=this._screenHeight,n=this.options,i=c(n,t);return e.proxy(function(e,t){var n=this.result,o=this._lastScrollTop;return!t&&n&&i(n,e,o)||(n=this._getDataItemsCollection(e,o)),this._lastScrollTop=e,this.result=n,n},this)},_whenChanged:function(e,t){var n;return function(i){var o=e(i);o!==n&&(n=o,t(o,i))}},_reorderList:function(t,n){var i=this,o=t.length,r=-(1/0);return n=e.proxy(f(n,this.templates),this),function(e,s,a){var l,c,d=s-r;a||Math.abs(d)>=o?(l=t,c=e):(l=p(t,d),c=d>0?e.slice(-d):e.slice(0,-d)),n(l,c,i.bound()),r=s}},_bufferSizes:function(){var e=this.options;return l(this._screenHeight,e.listScreens,e.oppositeBuffer)},_indexConstraint:function(e){var t=this.itemCount,n=this.options.itemHeight,i=this.dataSource.total();return Math.min(Math.max(i-t,0),Math.max(0,Math.floor(e/n)))},_listIndex:function(e,t){var n,i=this._bufferSizes();return n=e-(e>t?i.down:i.up),this._indexConstraint(n)},_selectable:function(){this.options.selectable&&(this._selectProxy=e.proxy(this,"_clickHandler"),this.element.on(B+V,"."+A,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n,i,o=[];if("function"==typeof e)for(t=this.dataSource.flatView(),n=0;n<t.length;n++)if(e(t[n])){o.push(n);break}return"number"==typeof e&&o.push(e),i=this.getElementIndex(e),isNaN(i)||o.push(i),e instanceof Array&&(o=e),o},_deselect:function(n){var i,r,s,a,l,c,d,u=[],h=this._selectedIndexes,f=this._selectedDataItems,p=0,m=this.options.selectable,g=0,v=this._valueGetter,_=null;if(n=n.slice(),m!==!0&&n.length){if("multiple"===m)for(c=0;c<n.length;c++){if(_=null,p=e.inArray(n[c],h),r=this.dataItemByIndex(n[c]),p===-1&&r)for(d=0;d<f.length;d++)a=o(r)?f[d]===r:v(f[d])===v(r),a&&(s=this._getElementByIndex(n[c]),_=this._deselectSingleItem(s,d,n[c],g));else i=h[p],i!==t&&(s=this._getElementByIndex(i),_=this._deselectSingleItem(s,p,i,g));_&&(n.splice(c,1),u.push(_),g++,c--)}}else{for(l=0;l<h.length;l++)h[l]!==t?this._getElementByIndex(h[l]).removeClass(I):f[l]&&this._getElementByDataItem(f[l]).removeClass(I),u.push({index:h[l],position:l,dataItem:f[l]});this._values=[],this._selectedDataItems=[],this._selectedIndexes=[]}return{indices:n,removed:u}},_deselectSingleItem:function(e,t,n,i){var o;if(e.hasClass("k-state-selected"))return e.removeClass(I),this._values.splice(t,1),this._selectedIndexes.splice(t,1),o=this._selectedDataItems.splice(t,1)[0],{index:n,position:t+i,dataItem:o}},_deselectCurrentValues:function(t){var n,i,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,i=t[c],n=this._valueGetter(this.dataItemByIndex(i)),r=0;r<a.length;r++)if(n==a[r]){o=r;break}o>-1&&(l.push(this.removeAt(o)),e(s[i]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var n=e<t?1:Math.floor(e/t)+1;return(n-1)*t},_select:function(t){var n,i,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=[]),i=a.skip(),e.each(t,function(e,t){var s=r._getSkip(t,l);r.mute(function(){a.range(s,l),n=r._findDataItem(a.view(),[t-s]),r._selectedIndexes.push(t),r._selectedDataItems.push(n),r._values.push(o(n)?n:c(n)),d.push({index:t,dataItem:n}),r._getElementByIndex(t).addClass(I),a.range(i,l)})}),d},_clickHandler:function(t){var n=e(t.currentTarget);!t.isDefaultPrevented()&&n.attr("data-uid")&&this.trigger(B,{item:n})},_buildValueGetter:function(){this._valueGetter=_.getter(this.options.dataValueField)},_calculateGroupPadding:function(e){var t=this.items().first(),n=this.header,i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=_.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("right"),10),n.css("padding-right",i))}});_.ui.VirtualList=U,_.ui.plugin(U)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,o){var r,s;if(o=o[t])for(r=i[e]=i[e]||[],s=0;s<o.length;s++)r.push(o[s]),n(e+1,o[s])}var i=[];return n(0,e),i}function n(){return x.support.cssBorderSpacing?"":'cellspacing="0"'}function i(t,i){return t.length?"<table "+n()+' class="'+e.trim("k-scheduler-table "+(i||""))+'"><tr>'+t.join("</tr><tr>")+"</tr></table>":""}function o(e,t){return e.length?"<div style='position:relative'>"+i(e,t)+"</div>":""}function r(t,n,o){var r,s=[];if(o>0)for(r=0;r<t;r++)s.push("<th>&nbsp;</th>");return n&&s.push('<th class="k-scheduler-times-all-day">'+n.text+"</th>"),o<1?e():e('<div class="k-scheduler-times">'+i(s)+"</div>")}function s(t,n,r){var s,a,l,c,d,u,h,f,p,m,g=[];for(a=0;a<t.length;a++){for(l=t[a],c=[],d=n/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(f=t[t.length-1],p=[],m=r.cellContent,s=0;s<f.length;s++)p.push('<td class="'+(f[s].className||"")+'">'+(m?m(s):"&nbsp;")+"</td>");h.push(p.join(""))}return e('<div class="k-scheduler-header k-state-default"><div class="k-scheduler-header-wrap">'+i(g)+o(h,"k-scheduler-header-all-day")+"</div></div>")}function a(t,n){var o,r,s,a,l,c=Array(n).join().split(","),d=[];for(r=0;r<t.length;r++)for(s=t[r],a=n/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<n;o++)d.push(c[o]);return n<1?e():e('<div class="k-scheduler-times">'+i(d)+"</div>")}function l(){return e('<div class="k-scheduler-content"><table '+n()+' class="k-scheduler-table"/></div>')}function c(){return w=w?w:x.support.scrollbar()}function d(e,t,n){var i,o,r,s,a;for(i=e.length-1;i>=0;i--)o=u(e[i]),r=o.start,a=o.end,s=r<=t&&a>=t,(s||r>=t&&a<=n||t<=r&&n>=r)&&(r<t&&(t=r),a>n&&(n=a));return h(e,t,n)}function u(e){return{start:e.start,end:e.end}}function h(e,t,n){var i,o,r=[];for(i=0;i<e.length;i++)o=u(e[i]),(o.start<t&&o.end>t||o.start>=t&&o.end<=n)&&r.push(e[i]);return r}function f(e){return m(e)}function p(e){return m(e)}function m(e){var t,n,i,o,r,s,a,l=[];for(t=0;t<e.length;t++){for(n=e[t],i=u(n),o=null,r=0,s=l.length;r<s;r++)if(a=i.start>l[r].end,i.start<l[r].start||a){o=l[r],o.end<i.end&&(o.end=i.end);break}o||(o={start:i.start,end:i.end,events:[]},l.push(o)),o.events.push(n)}return l}function g(t,n,i,o){var r=[];return e.each(n,function(e,n){
var s=n.className?"k-slot-cell "+n.className:"k-slot-cell",a={text:n.text,className:s};a[t]=o&&!n.minorTicks?g(t,n.columns,i,o):i,r.push(a)}),r}function v(t,n,i,o,r,s){var a,l,c,d=n[0],u=[];if(d){if(r&&i)e.each(r,function(e,i){i[t]=s&&!i.minorTicks?v(t,n,i.columns,o,i.columns,s):v(t,n,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,n.slice(1),i,o),u.push(c);return u}return i}function _(t){return function(n){if(e.isArray(n)||n instanceof x.data.ObservableArray){for(var i=0;i<n.length;i++)if(n[i]==t)return!0;return!1}return n==t}}function b(e){e.className=e.className.replace(k,"")+" k-state-selected"}var w,y,k,x=window.kendo,C=x.ui,S=C.Widget,T=x._outerHeight,D=x.keys,A=".kendoSchedulerView",E=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,n){var i=new P(e,t,this._index,n.length);return n.push(i),i},timeSlotCollectionCount:function(){return this._timeSlotCollections.length},daySlotCollectionCount:function(){return this._daySlotCollections.length},daySlotByPosition:function(e,t,n){return this._slotByPosition(e,t,this._daySlotCollections,n)},timeSlotByPosition:function(e,t,n){return this._slotByPosition(e,t,this._timeSlotCollections,n)},_slotByPosition:function(e,t,n,i){var o,r,s,a,l,c,d,u,h;for(o=0;o<n.length;o++)for(r=n[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,i||(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 n,i=this._timeSlotCollections,o=this._startSlot(e,i);return!o.inRange&&e>=o.slot.end&&(o=null),n=o,e<t&&(n=this._endSlot(t,i)),n&&!n.inRange&&t<=n.slot.start&&(n=null),null===o&&null===n?[]:(null===o&&(o={inRange:!0,slot:i[n.slot.collectionIndex].first()}),null===n&&(n={inRange:!0,slot:i[o.slot.collectionIndex].last()}),this._continuousRange(F,i,o,n))},daySlotRanges:function(e,t,n){var i,o=this._daySlotCollections,r=this._startSlot(e,o,n);if(!r.inRange&&e>=r.slot.end&&(r=null),i=r,e<t&&(i=this._endSlot(t,o,n)),i&&!i.inRange&&t<=i.slot.start&&(i=null),null===r&&null===i)return[];if(null===r)do e+=x.date.MS_PER_DAY,r=this._startSlot(e,o,n);while(!r.inRange&&e>=r.slot.end);if(null===i)do t-=x.date.MS_PER_DAY,i=this._endSlot(t,o,n);while(!i.inRange&&t<=i.slot.start);return this._continuousRange(z,o,r,i)},_continuousRange:function(e,t,n,i){var o,r,s,a,l,c,d=n.slot,u=i.slot,h=d.collectionIndex,f=u.collectionIndex,p=[];for(o=h;o<=f;o++)r=t[o],s=r.first(),a=r.last(),l=!1,c=!1,o==h&&(c=!n.inRange),o==f&&(l=!i.inRange),s.start<d.start&&(s=d),a.start>u.start&&(a=u),h<f&&(o==h?l=!0:o==f?c=!0:l=c=!0),p.push(new e({start:s,end:a,collection:r,head:l,tail:c}));return p},slotRanges:function(e,t){var n=e._startTime||x.date.toUtcTime(e.start),i=e._endTime||x.date.toUtcTime(e.end);return void 0===t&&(t=e.isMultiDay()),t?this.daySlotRanges(n,i,e.isAllDay):this.timeSlotRanges(n,i)},ranges:function(e,t,n,i){return"number"!=typeof e&&(e=x.date.toUtcTime(e)),"number"!=typeof t&&(t=x.date.toUtcTime(t)),n?this.daySlotRanges(e,t,i):this.timeSlotRanges(e,t)},_startCollection:function(e,t){var n,i;for(n=0;n<t.length;n++)if(i=t[n],i.startInRange(e))return i;return null},_endCollection:function(e,t,n){var i,o;for(i=0;i<t.length;i++)if(o=t[i],o.endInRange(e,n))return o;return null},_getCollections:function(e){return e?this._daySlotCollections:this._timeSlotCollections},continuousSlot:function(e,t){var n=t?-1:1,i=this._getCollections(e.isDaySlot),o=i[e.collectionIndex+n];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,n){var i=this,o=function(e,n,o){var r=0===o;if(!t&&!e&&r&&i.daySlotCollectionCount())return i._daySlotCollections[0].at(n)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,-1,o,n)},downSlot:function(e,t,n){var i=this,o=function(e,n,o){if(!t&&e&&i.timeSlotCollectionCount())return i._timeSlotCollections[o].at(0)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,1,o,n)},leftSlot:function(e,t){return this._horizontalSlot(e,-1,t)},rightSlot:function(e,t){return this._horizontalSlot(e,1,t)},_horizontalSlot:function(e,t,n){var i,o=e.index,r=e.isDaySlot,s=e.collectionIndex,a=this._getCollections(r);return r=!n&&r,r?o+=t:s+=t,i=a[s],i?i.at(o):void 0},_verticalSlot:function(e,t,n,i){var o,r=e.index,s=e.isDaySlot,a=e.collectionIndex,l=this._getCollections(s);return(e=n(s,a,r))?e:(s=!i&&s,s?a+=t:r+=t,o=l[a],o?o.at(r):void 0)},_collection:function(e,t){var n=t?this._daySlotCollections:this._timeSlotCollections;return n[e]},_startSlot:function(e,t,n){var i,o=this._startCollection(e,t),r=!0;return o||(o=t[0],r=!1),i=o.slotByStartDate(e,n),i||(i=o.first(),r=!1),{slot:i,inRange:r}},_endSlot:function(e,t,n){var i,o=this._endCollection(e,t,n),r=!0;return o||(o=t[t.length-1],r=!1),i=o.slotByEndDate(e,n),i||(i=o.last(),r=!1),{slot:i,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]}}),I=x.Class.extend({init:function(t){e.extend(this,t)},innerHeight:function(){var e,t=this.collection,n=this.start.index,i=this.end.index,o=0;for(e=n;e<=i;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}}),F=I.extend({innerHeight:function(){var e,t=this.collection,n=this.start.index,i=this.end.index,o=0;for(e=n;e<=i;e++)o+=t.at(e).offsetHeight;return o},outerRect:function(e,t,n){return this._rect("offset",e,t,n)},_rect:function(e,t,n,i){var o,r,s,a,l,c,d,u,h=this.start,f=this.end,p=x.support.isRtl(h.element);return"number"!=typeof t&&(t=x.date.toUtcTime(t)),"number"!=typeof n&&(n=x.date.toUtcTime(n)),i?(o=h.offsetTop,r=f.offsetTop+f[e+"Height"],p?(s=f.offsetLeft,a=h.offsetLeft+h[e+"Width"]):(s=h.offsetLeft,a=f.offsetLeft+f[e+"Width"])):(l=t-h.start,l<0&&(l=0),c=h.end-h.start,o=h.offsetTop+h[e+"Height"]*l/c,d=f.end-n,d<0&&(d=0),u=f.end-f.start,r=f.offsetTop+f[e+"Height"]-f[e+"Height"]*d/u,p?(s=Math.round(f.offsetLeft+f[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(f.offsetLeft+f[e+"Width"]-f[e+"Width"]*d/u))),{top:o,bottom:r,left:0===s?s:s+1,right:a}},innerRect:function(e,t,n){return this._rect("client",e,t,n)}}),z=I.extend({innerWidth:function(){var e,t=this.collection,n=this.start.index,i=this.end.index,o=0,r=n!==i?"offsetWidth":"clientWidth";for(e=n;e<=i;e++)o+=t.at(e)[r];return o}}),P=x.Class.extend({init:function(e,t,n,i){this._slots=[],this._events=[],this._start=x.date.toUtcTime(e),this._end=x.date.toUtcTime(t),this._groupIndex=n,this._collectionIndex=i},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 n=t?e<this._end:e<=this._end;return this._start<=e&&n},slotByStartDate:function(e){var t,n,i=e;for("number"!=typeof i&&(i=x.date.toUtcTime(e)),t=0;t<this._slots.length;t++)if(n=this._slots[t],n.startInRange(i))return n;return null},slotByEndDate:function(e,t){var n,i,o=e;if("number"!=typeof o&&(o=x.date.toUtcTime(e)),t)return this.slotByStartDate(e,!1);for(n=0;n<this._slots.length;n++)if(i=this._slots[n],i.endInRange(o))return i;return null},count:function(){return this._slots.length},events:function(){return this._events},addTimeSlot:function(e,t,n,i){var o=new L(e,t,n,this._groupIndex,this._collectionIndex,this._slots.length,i);this._slots.push(o)},addDaySlot:function(e,t,n,i){var o=new H(e,t,n,this._groupIndex,this._collectionIndex,this._slots.length,i);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]}}),B=x.Class.extend({init:function(e,t,n,i,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=n,this.element=e,this.groupIndex=i,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}}),L=B.extend({init:function(e,t,n,i,o,r,s){B.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,n,i){var o,r,s,a,l;if(i)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=n-o.top,a=Math.floor(r*(s/this.offsetHeight));return this.start+a},endOffset:function(t,n,i){var o,r,s,a,l;if(i)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=n-o.top,a=Math.floor(r*(s/this.offsetHeight));return this.start+a}}),H=B.extend({init:function(e,t,n,i,o,r,s){B.fn.init.apply(this,arguments),this.eventCount=s,this.isDaySlot=!0,this.element.children.length?(this.firstChildHeight=this.element.children[0].offsetHeight+3,this.firstChildTop=this.element.children[0].offsetTop):(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=S.extend({init:function(t,n){S.fn.init.call(this,t,n),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=[]},_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 n=t?"prevGroupSlot":"nextGroupSlot",i=this[n](e.start,e.groupIndex,e.isAllDay);return i&&(e.groupIndex+=t?-1:1),this._isGroupedByDate()&&!i&&(e.groupIndex=t?this.groups.length-1:0),i},_changeDate:function(e,t,n){var i,o,r,s=this.groups[e.groupIndex];if(n){if(i=s._getCollections(!1),o=s.daySlotCollectionCount()?t.index-1:t.collectionIndex-1,o>=0)return i[o]._slots[i[o]._slots.length-1]}else if(i=s._getCollections(s.daySlotCollectionCount()),o=s.daySlotCollectionCount()?0:t.collectionIndex+1,r=s.daySlotCollectionCount()?t.collectionIndex+1:0,i[o]&&i[o]._slots[r])return i[o]._slots[r]},_changeGroupContinuously:function(){return null},_changeViewPeriod:function(){return!1},_horizontalSlots:function(e,t,n,i){var o,r,s,a=i?"leftSlot":"rightSlot",l={startSlot:t[0].start,endSlot:t[t.length-1].end},c=this.groups[e.groupIndex],d=this._isVerticallyGrouped();return n||(o=this._normalizeHorizontalSelection(e,t,i),o&&(l.startSlot=l.endSlot=o)),this._isGroupedByDate()&&!n?(r=this._changeGroup(e,i),r?l.startSlot=l.endSlot=r:l=this._getNextHorizontalRange(c,a,l)):(l.startSlot=c[a](l.startSlot),l.endSlot=c[a](l.endSlot),n||d||l.startSlot&&l.endSlot||(l.startSlot=l.endSlot=this._changeGroup(e,i))),l.startSlot&&l.endSlot||this._isGroupedByDate()||(s=this._continuousSlot(e,t,i),s=this._changeGroupContinuously(e,s,n,i),s&&(l.startSlot=l.endSlot=s)),l},_getNextHorizontalRange:function(e,t,n){return this._isVerticallyGrouped()||(n.startSlot=e[t](n.startSlot),n.endSlot=e[t](n.endSlot)),n},_verticalSlots:function(e,t,n,i){var o,r,s=this.groups[e.groupIndex],a={startSlot:t[0].start,endSlot:t[t.length-1].end};return n||(o=this._normalizeVerticalSelection(e,t,i),o&&(a.startSlot=a.endSlot=o)),r=i?"upSlot":"downSlot",a=this._getNextVerticalRange(s,r,a,n),n||!this._isVerticallyGrouped()||a.startSlot&&a.endSlot||(a.startSlot=a.endSlot=this._isGroupedByDate()?this._changeDate(e,o,i):this._changeGroup(e,i)),a},_getNextVerticalRange:function(e,t,n,i){return n.startSlot=e[t](n.startSlot,i),n.endSlot=e[t](n.endSlot,i),n},_normalizeHorizontalSelection:function(){return null},_normalizeVerticalSelection:function(e,t,n){var i;return i=n?t[0].start:t[t.length-1].end},_continuousSlot:function(){return null},constrainSelection:function(e){var t,n=this.groups[0];this.inRange(e)?n.daySlotCollectionCount()?n.timeSlotCollectionCount()||(e.isAllDay=!0):e.isAllDay=!1:(t=n.firstSlot(),e.isAllDay=t.isDaySlot,e.start=t.startDate(),e.end=t.endDate()),this.groups[e.groupIndex]||(e.groupIndex=0)},move:function(e,t,n){var i,o,r,s,a,l,c=!1,d=this.groups[e.groupIndex],u=this._isGroupedByDate()&&this._isVerticallyGrouped();if(d.timeSlotCollectionCount()||(e.isAllDay=!0),i=d.ranges(e.start,e.end,e.isAllDay,!1),t===D.DOWN||t===D.UP){if(c=!0,s=t===D.UP,this._updateDirection(e,i,n,s,!0),a=this._verticalSlots(e,i,n,s),!a.startSlot&&!n&&this._changeViewPeriod(e,s,!u))return c}else if((t===D.LEFT||t===D.RIGHT)&&(c=!0,s=t===D.LEFT,this._updateDirection(e,i,n,s,!1),a=this._horizontalSlots(e,i,n,s),!a.startSlot&&!n&&this._changeViewPeriod(e,s,u)))return c;return c&&(o=a.startSlot,r=a.endSlot,n?(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,n,i,o){for(var r,s,a=t._continuousEvents||[],l=o?-1:1,c=a.length,d=o?c-1:0;d<c&&d>-1;){if(s=a[d],(!o&&s.start.startDate()>=n.startDate()||o&&s.start.startDate()<=n.startDate())&&(i.length&&(s=a[d+l]),s&&e.inArray(s.uid,i)===-1)){r=!!s;break}d+=l}return s},moveToEvent:function(e,t){var n,i,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,f=e.events;if(this._isGroupedByDate())if(i=this._getAllEvents(),o=this._getUniqueEvents(i),r=this._getSortedEvents(o),0===f.length)s=this._getNextEventIndexBySlot(d,r,l),t&&s--,n=r[s];else for(a=this._getStartIdx(f,r);a<r.length&&a>-1&&(f.length>0&&(d=this._getSelectedSlot(d,r,n,a,h,t)),d);){if((!t&&r[a].start.startDate()>=d.startDate()||t&&r[a].start.startDate()<=d.startDate())&&f[0]!=r[a].uid){n=r[a];break}a+=h}else for(;l<u&&l>-1&&(n=this.moveToEventInGroup(c,d,f,t),l+=h,c=this.groups[l],c&&!n);)f=[],d=t?c.lastSlot():c.firstSlot(!0);return n&&(e.events=[n.uid],e.start=n.start.startDate(),e.end=n.end.endDate(),e.isAllDay=n.start.isDaySlot,e.groupIndex=n.start.groupIndex),!!n},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,n){var i,o,r=0,s=x.date.getDate(e.startDate());for(i=0;i<t.length;i++)if(o=x.date.getDate(t[i].start.startDate()),s>o)r++;else if(s.getTime()===o.getTime()&&n>t[i].start.groupIndex)r++;else{if(!(s.getTime()===o.getTime()&&n>=t[i].start.groupIndex&&e.startDate()>t[i].start.startDate()))break;r++}return r},_getSelectedSlot:function(e,t,n,i,o,r){var s,a;return t[i+o]&&t[i].start.groupIndex!==t[i+o].start.groupIndex&&(s=t[i+o].start.groupIndex,a=this.groups[s],a&&!n||(e=null),e=r?a.lastSlot():a.firstSlot(!0)),e},_getStartIdx:function(t,n){var i=0;return e.each(n,function(){return this.uid!==t[0]&&void i++}),i},_getAllEvents:function(){var e,t=[],n=this.groups;for(e=0;e<n.length;e++)n[e]._continuousEvents&&(t=t.concat(n[e]._continuousEvents));return t},_getUniqueEvents:function(e){var t,n,i,o=[];for(t=0;t<e.length;t++){for(n=!1,i=0;i<o.length;i++)if(e[t].uid===o[i].uid){n=!0;break}n||o.push(e[t])}return o},_getSortedEvents:function(t){return t.sort(function(t,n){var i=t.start.startDate(),o=n.start.startDate(),r=x.date.getDate(i)-x.date.getDate(o);return 0===r&&(r=t.start.groupIndex-n.start.groupIndex),0===r&&(r=i.getTime()-o.getTime()),0===r&&(t.start.isDaySlot&&!n.start.isDaySlot&&(r=-1),!t.start.isDaySlot&&n.start.isDaySlot&&(r=1)),0===r&&(r=e(t.element).index()-e(n.element).index()),r})},_selectSlots:function(e){var t,n,i,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++)i=s.at(a),n=i.element,n.setAttribute("aria-selected",!0),b(n),this._selectedSlots.push({start:i.startDate(),end:i.endDate(),element:n});e.backward&&(n=t[0].start.element),this.current(n)},_selectEvents:function(t){var n,i,o=!1,r=t.events,s=this.groups[t.groupIndex]._continuousEvents||[],a=s.length;if(!r[0]||!s[0])return o;for(i=e(),t.events=[],n=0;n<a;n++)e.inArray(s[n].uid,r)>-1&&(i=i.add(s[n].element),t.events.push(s[n].uid));return i[0]&&(i.addClass("k-state-selected").attr("aria-selected",!0),this.current(i.last()[0]),this._selectedSlots=[],o=!0),o},inRange:function(e){var t=this.startDate(),n=x.date.addDays(this.endDate(),1),i=e.start,o=e.end;return t<=i&&i<n&&t<o&&o<=n},_resourceValue:function(e,t){return e.valuePrimitive&&(t=x.getter(e.dataValueField)(t)),t},_resourceBySlot:function(e){var t,n,i,o,r,s=this.groupedResources,a={};if(s.length)for(t=e.groupIndex,n=s.length-1;n>=0;n--)i=s[n],o=this._resourceValue(i,i.dataSource.view()[t%i.dataSource.total()]),i.multiple&&(o=[o]),r=x.setter(i.field),r(a,o),t=Math.floor(t/i.dataSource.total());return a},_createResizeHint:function(t,n,i,o){return e(M).css({left:t,top:n,width:i,height:o})},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=e()},_removeMoveHint:function(){this._moveHint.remove(),this._moveHint=e()},_scrollTo:function(e,t){var n=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,s=n+i,a=0;a=o>n?n:s>o+r?i<=r?s-r:n:o,t.scrollTop=a},_shouldInverseResourceColor:function(e){var t=new y(e.color).isDark(),n=this.element.css("color"),i=new y(n).isDark();return t==i},_eventTmpl:function(t,n){var i,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),i=x.template(x.format(n,a),r),c.count>0&&(i=e.proxy(i,c.storage)),i},eventResources:function(e){var t,n,i,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(n=h.resources[t],i=n.field,o=x.getter(i)(e),null!=o)for(n.multiple||(o=[o]),r=n.dataSource.view(),s=0;s<o.length;s++){for(a=null,l=o[s],n.valuePrimitive||(l=x.getter(n.dataValueField)(l)),c=0;c<r.length;c++)if(r[c].get(n.dataValueField)==l){a=r[c];break}null!==a&&(d=x.getter(n.dataColorField)(a),u.push({field:n.field,title:n.title,name:n.name,text:x.getter(n.dataTextField)(a),value:l,color:d}))}return u},createLayout:function(i){var o,r,s,a,l,c=-1;for(i.rows||(i.rows=[]),o=0;o<i.rows.length;o++)if(i.rows[o].allDay){c=o;break}r=i.rows[c],c>=0&&i.rows.splice(c,1),s=this.columnLevels=t(i,"columns"),a=this.rowLevels=t(i,"rows"),this.table=e("<table "+n()+' 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,n,i,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-=T(l.eq(t));a.datesHeader&&(u=T(a.datesHeader)),a.timesHeader&&T(a.timesHeader)>u&&(u=T(a.timesHeader)),a.datesHeader&&a.timesHeader&&(n=a.datesHeader.find("table:first tr"),a.timesHeader.find("tr").height(function(t){e(this).height(n.eq(t).height())})),u&&(c-=u),a.footer&&(c-=T(a.footer)),i=function(e){var t,n;return!!e[0].style.height||(t=e.height(),e.height("auto"),n=e.height(),t!=n?(e.height(""),!0):(e.height(""),!1))},o=a.content[0],r=x.support.kineticScrollNeeded?0:d,i(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,n,i){this.timesHeader=r(t.length,n,i);var o=t[t.length-1].length;return this.datesHeader=s(t,o,n),e("<tr>").append(this.timesHeader.add(this.datesHeader).wrap("<td>").parent())},_bottomSection:function(t,n,i){return this.times=a(n,i),this.content=l(t[t.length-1],n[n.length-1]),e("<tr>").append(this.times.add(this.content).wrap("<td>").parent())},_scroller:function(){var t,n=this;this.content.bind("scroll"+A,function(){n.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(this.scrollLeft),n.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){n.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(-e.sender.x),n.times.scrollTop(-e.sender.y)}))},_resourcesForGroups:function(){var e,t,n,i,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(n=0,i=r.length;n<i;n++)s[e].name===r[n]&&o.push(s[e]);this.groupedResources=o},_createDateLayout:function(e,t,n){return g("rows",e,t,n)},_createColumnsLayout:function(e,t,n,i,o){return v("columns",e,t,n,i,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,n,i){return v("rows",e,t,n,i)},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;S.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,n){var i,o=this.groups[t],r=o.ranges(e,e,n,!1)[0].start;if(!(t<=0))return this._isGroupedByDate()?r:this._isVerticallyGrouped()?o.timeSlotCollectionCount()?(i=o._collection(n?r.index:r.collectionIndex,!1),i.last()):(i=o._collection(o.daySlotCollectionCount()-1,!0),i.at(r.index)):o.timeSlotCollectionCount()?(i=o._collection(n?0:o.timeSlotCollectionCount()-1,n),n?i.last():i.at(r.index)):(i=o._collection(r.collectionIndex,!0),i.last())},nextGroupSlot:function(e,t,n){var i,o,r=this.groups[t],s=r.ranges(e,e,n,!1)[0].start;if(!(t>=this.groups.length-1))return this._isGroupedByDate()?s:this._isVerticallyGrouped()?r.timeSlotCollectionCount()?(o=r.daySlotCollectionCount(),i=r._collection(o?0:s.collectionIndex,o),n?i.first():i.at(s.collectionIndex)):(i=r._collection(0,!0),i.at(s.index)):r.timeSlotCollectionCount()?(i=r._collection(0,n),n?i.first():i.at(s.index)):(i=r._collection(s.collectionIndex,!0),i.first())},_eventOptionsForMove:function(){return{}},_updateEventForResize:function(){},_updateEventForSelection:function(e){return e}}),y=function(e){var t,n,i,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,n=a[o].process,i=t.exec(e),i&&(r=n(i),s.r=r[0],s.g=r[1],s.b=r[2]);else s.r=arguments[0],s.g=arguments[1],s.b=arguments[2];s.r=s.normalizeByte(s.r),s.g=s.normalizeByte(s.g),s.b=s.normalizeByte(s.b)},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 E.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:f,createRows:p,rangeIndex:u,collidingEvents:d,groupEqFilter:_})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.dayview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e,t){function n(e){var t=new Date(1980,1,1,0,0,0);return c(t,y(e)),t}function i(e,t,n){return e>=t&&e<=n}function o(e,t,n,i){return i=i?e<=n:e<n,e>t&&i}function r(e,t,n,i){var o,r=e._continuousEvents,s=r[r.length-1],l=m(t.start.startDate()).getTime();if(i&&s&&m(s.start.startDate()).getTime()==l){for(o=r.length-1;o>-1&&!(r[o].isAllDay||m(r[o].start.startDate()).getTime()<l);o--);r.splice(o+1,0,{element:n,isAllDay:!0,uid:n.attr(a.attr("uid")),start:t.start,end:t.end})}else r.push({element:n,isAllDay:i,uid:n.attr(a.attr("uid")),start:t.start,end:t.end})}function s(e){var t=[],n=e.workWeekStart;for(t.push(n);e.workWeekEnd!=n;)n>6?n-=7:n++,t.push(n);return t}var a=window.kendo,l=a.ui,c=a.date.setTime,d=l.SchedulerView,u=a._outerWidth,h=a._outerHeight,f=e.extend,p=e.proxy,m=a.date.getDate,g=a.date.MS_PER_MINUTE,v=a.date.MS_PER_DAY,_="k-current-time",b="k-current-time-arrow",w=.8666,y=a.date.getMilliseconds,k=".kendoMultiDayView",x=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>'),C=a.template('<div title="(#=kendo.format("{0:t}", start)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">${title}</div></div>'),S=a.template("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd M/dd')#</span>"),T='<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-warning"></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"><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>',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.isException()) {#<span class="k-icon k-i-warning"></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"><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>',A=d.extend({
init:function(e,t){var n=this;d.fn.init.call(n,e,t),n.title=n.options.title||n.options.name,n._workDays=s(n.options),n._templates(),n._editable(),n.calculateDateRange(),n._groups(),n._currentTime(!0)},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var n,i,o,r,s,l,c,d,f,p,m,g,v,y,k,x=this.options;for(x.currentTimeMarker.useLocalTimezone===!1&&(n=x.dataSource.options.schema.timezone,x.dataSource&&n&&(i=a.timezone.offset(t,n),t=a.timezone.convert(t,t.getTimezoneOffset(),i))),this.times.find("."+_).remove(),this.content.find("."+_).remove(),o=x.group&&"horizontal"!=x.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(c=this.groups[l],!c)return;if(d=a.date.toUtcTime(t),f=c.timeSlotRanges(d,d+1),0===f.length)return;p=f[0].collection,m=p.slotByStartDate(t),m&&(g="<div class='"+_+"'></div>",v=e(g).prependTo(this.times),y=Math.round(f[0].innerRect(t,new Date(t.getTime()+1),!1).top),k={},this._isRtl?(k.right=r.position().left+h(r)-h(s),v.addClass(b+"-left")):(k.left=s.position().left,v.addClass(b+"-right")),k.top=y-u(v)*w/2,v.css(k),e(g).prependTo(this.content).css({top:y,height:"1px",right:"1px",width:this.content[0].scrollWidth,left:0}))}},_currentTime:function(e){var n=this,i=n.options.currentTimeMarker;i!==!1&&i.updateInterval!==t&&(n._currentTimeMarkerUpdater(),e&&(n._currentTimeUpdateTimer=setInterval(p(this._currentTimeMarkerUpdater,n),i.updateInterval)))},_updateResizeHint:function(e,t,n,i){var o,r,s,l,c,u,h,f,p,m,g,v,_=e.isMultiDay(),b=this.groups[t],w=b.ranges(n,i,_,e.isAllDay);for(this._removeResizeHint(),c=0;c<w.length;c++)if(u=w[c],h=u.startSlot(),this._isGroupedByDate()&&_)for(f=h.index;f<=u.end.index;f++)p=u.collection._slots[f],o=p.offsetWidth,r=p.clientHeight,s=p.offsetTop,l=d.fn._createResizeHint.call(this,p.offsetLeft,s,o,r),this._resizeHint=this._resizeHint.add(l);else o=h.offsetWidth,r=h.clientHeight,s=h.offsetTop,_?o=u.innerWidth():(m=u.outerRect(n,i,this.options.snap),s=m.top,r=m.bottom-m.top),l=d.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(n),g)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(a.toString(a.timezone.toLocalDate(i),g))},_updateMoveHint:function(e,t,n){var i,o,r,s,l,c,d,u,h,f=e.isMultiDay(),p=this.groups[t],m=a.date.toUtcTime(e.start)+n,g=m+e.duration(),v=p.ranges(m,g,f,e.isAllDay);for(m=a.timezone.toLocalDate(m),g=a.timezone.toLocalDate(g),this._removeMoveHint(),!f&&(0===y(g)||y(g)<y(this.startTime()))&&v.length>1&&v.pop(),i=0;i<v.length;i++)if(o=v[i],r=o.start,l={left:r.offsetLeft+2,top:r.offsetTop},this._isGroupedByDate()&&f)for(c=r.index;c<=o.end.index;c++)d=o.collection._slots[c],l.left=this._isRtl?.1*d.clientWidth+d.offsetLeft+2:d.offsetLeft+2,l.height=d.offsetHeight,l.width=.9*d.clientWidth-4,s=this._createEventElement(e.clone({start:m,end:g}),!f),this._appendMoveHint(s,l);else this._isRtl&&(l.left=.1*r.clientWidth+r.offsetLeft+2),f?l.width=o.innerWidth()-4:(u=o.outerRect(m,g,this.options.snap),l.top=u.top,l.height=u.bottom-u.top,l.width=.9*r.clientWidth-4),s=this._createEventElement(e.clone({start:m,end:g}),!f),this._appendMoveHint(s,l);h=this.content,f&&(h=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),h.length||(h=this.content)),this._moveHint.appendTo(h)},_appendMoveHint:function(e,t){e.addClass("k-event-drag-hint"),e.css(t),this._moveHint=this._moveHint.add(e)},_slotByPosition:function(e,t){var n,i,o,r;for(this._isVerticallyGrouped()?(i=this.content.offset(),t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft):i=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)").find(">div").offset(),i&&(e-=i.left,t-=i.top),e=Math.ceil(e),t=Math.ceil(t),r=0;r<this.groups.length;r++)if(o=this.groups[r],n=o.daySlotByPosition(e,t,this._isGroupedByDate()))return n;for(i&&(e+=i.left,t+=i.top),i=this.content.offset(),e-=i.left,t-=i.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],n=o.timeSlotByPosition(e,t))return n;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 n,i,o,r,s,a,l,c,d,u,h=this._timeSlotInterval(),f=e,p=this._isGroupedByDate(),m=this.content.find("tr:not(.k-scheduler-header-all-day)");for(m.attr("role","row"),s=m.length,this._isVerticallyGrouped()&&(p&&(f=t),s=Math.floor(s/f)),a=0;a<f;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&&(i=y(new Date((+this.startTime())))),u=0,p)if(this._isVerticallyGrouped())for(r=0;r<e;r++)n=this.groups[r],this._addTimeSlotGroup(n,d,r,i,h,a);else for(n=this.groups[a],r=c;r<e*t;r+=e)this._addTimeSlotGroup(n,d,r,i,h,u),u++;else for(n=this.groups[a],r=c*t;r<(c+1)*t;r++)this._addTimeSlotGroup(n,d,r,i,h,u),u++;i+=h,o++}},_addTimeSlotGroup:function(e,t,n,i,o,r){var s=t[n],a=e.getTimeSlotCollection(r),l=this._dates[r],c=Date.UTC(l.getFullYear(),l.getMonth(),l.getDate()),d=c+i,u=d+o;s.setAttribute("role","gridcell"),s.setAttribute("aria-selected",!1),a.addTimeSlot(s,d,u)},_addDaySlotGroup:function(e,t,n,i,o){var r=t[n],s=this._dates[o],l=Date.UTC(s.getFullYear(),s.getMonth(),s.getDate());r.setAttribute("role","gridcell"),r.setAttribute("aria-selected",!1),e.addDaySlot(r,l,l+a.date.MS_PER_DAY)},_daySlotGroups:function(e,t){var n,i,o,r,s,a,l,c,d,u=e,h=this._isGroupedByDate();for(this._isVerticallyGrouped()?(h&&(u=t),n=this.element.find(".k-scheduler-header-all-day")):n=this.element.find(".k-scheduler-header-all-day tr"),n.attr("role","row"),o=0;o<u;o++)if(r=0,this._isVerticallyGrouped()&&(r=o),l=n[r].children,c=0,this._isVerticallyGrouped()||(c=o),d=0,h)if(this._isVerticallyGrouped())for(i=0;i<e;i++)s=this.groups[i],a=s.getDaySlotCollection(0),this._addDaySlotGroup(a,l,i,t,o);else for(s=this.groups[o],a=s.getDaySlotCollection(0),i=c;i<e*t;i+=e)this._addDaySlotGroup(a,l,i,t,d),d++;else for(s=this.groups[o],a=s.getDaySlotCollection(0),i=c*t;i<(c+1)*t;i++)this._addDaySlotGroup(a,l,i,t,d),d++},_groups:function(){var e,t,n,i=this._groupCount(),o=this._columnCountInResourceView();for(this.groups=[],e=0;e<i;e++){for(t=this._addResourceView(e),n=0;n<o;n++)t.addTimeSlotCollection(this._dates[n],a.date.addDays(this._dates[n],1));this.options.allDaySlot&&t.addDaySlotCollection(this._dates[0],a.date.addDays(this._dates[this._dates.length-1],1))}this._timeSlotGroups(i,o),this.options.allDaySlot&&this._daySlotGroups(i,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:"&nbsp;",groupHeaderTemplate:"#=text#",slotTemplate:"&nbsp;",allDaySlotTemplate:"&nbsp;",eventTemplate:x,allDayEventTemplate:C,dateHeaderTemplate:S,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,D),this.allDayEventTemplate=this._eventTmpl(e.allDayEventTemplate,T),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"+k,".k-event a:has(.k-i-close)",function(n){t.trigger("remove",{uid:e(this).closest(".k-event").attr(a.attr("uid"))}),n.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+k,".k-scheduler-content td",function(n){var i,o;e(this).parent().hasClass("k-scheduler-header-all-day")||(i=t._slotByPosition(n.pageX,n.pageY),i&&(o=t._resourceBySlot(i),t.trigger("add",{eventInfo:f({start:i.startDate(),end:i.endDate()},o)})),n.preventDefault())}).on("dblclick"+k,".k-scheduler-header-all-day td",function(e){var n,i=t._slotByPosition(e.pageX,e.pageY);i&&(n=t._resourceBySlot(i),t.trigger("add",{eventInfo:f({},{isAllDay:!0,start:a.date.getDate(i.startDate()),end:a.date.getDate(i.startDate())},n)})),e.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+k,".k-event",function(n){t.trigger("edit",{uid:e(this).closest(".k-event").attr(a.attr("uid"))}),n.preventDefault()})},_touchEditable:function(){var n=this,i=0;a.support.mobileOS.android&&(i=5),n.options.editable.create!==!1&&(n._addUserEvents=new a.UserEvents(n.element,{threshold:i,filter:".k-scheduler-content td",tap:function(i){var o,r,s,a;e(i.target).parent().hasClass("k-scheduler-header-all-day")||(o=i.x.location!==t?i.x.location:i.x,r=i.y.location!==t?i.y.location:i.y,s=n._slotByPosition(o,r),s&&(a=n._resourceBySlot(s),n.trigger("add",{eventInfo:f({start:s.startDate(),end:s.endDate()},a)})),i.preventDefault())}}),n._allDayUserEvents=new a.UserEvents(n.element,{threshold:i,filter:".k-scheduler-header-all-day td",tap:function(e){var i,o=e.x.location!==t?e.x.location:e.x,r=e.y.location!==t?e.y.location:e.y,s=n._slotByPosition(o,r);s&&(i=n._resourceBySlot(s),n.trigger("add",{eventInfo:f({},{isAllDay:!0,start:a.date.getDate(s.startDate()),end:a.date.getDate(s.startDate())},i)})),e.preventDefault()}})),n.options.editable.update!==!1&&(n._editUserEvents=new a.UserEvents(n.element,{threshold:i,filter:".k-event",tap:function(t){var i=e(t.target).closest(".k-event");i.hasClass("k-event-active")||n.trigger("edit",{uid:i.attr(a.attr("uid"))}),t.preventDefault()}}))},_layout:function(e){var t,n,i,o=[],r=[],s=this.options,l=this,c=l._isGroupedByDate();for(t=0;t<e.length;t++)n={},n.text=l.dateHeaderTemplate({date:e[t]}),a.date.isToday(e[t])&&(n.className="k-today"),o.push(n);return i=this.groupedResources,s.allDaySlot&&r.push({text:s.messages.allDay,allDay:!0,cellContent:function(t){var n=t;return t=i.length&&"vertical"!==l._groupOrientation()?t%e.length:t,l.allDaySlotTemplate({date:e[t],resources:function(){return l._resourceBySlot({groupIndex:n})}})}}),this._forTimeRange(this.startTime(),this.endTime(),function(e,t,n,i){var o=t?l.majorTimeHeaderTemplate:l.minorTimeHeaderTemplate,s={text:o({date:e}),className:i?"k-slot-cell":""};r.push(s)}),i.length&&("vertical"===this._groupOrientation()?c?(r=this._createDateLayout(o,r),o=this._createColumnsLayout(i,null,this.groupHeaderTemplate)):r=this._createRowsLayout(i,r,this.groupHeaderTemplate):o=c?this._createColumnsLayout(i,o,this.groupHeaderTemplate,o):this._createColumnsLayout(i,o,this.groupHeaderTemplate)),{columns:o,rows:r}},_footer:function(){var t,n,i,o=this.options;o.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',n=o.footer.command,n&&"workDay"===n?(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),i=this,this.footer.on("click"+k,".k-scheduler-fullday",function(e){e.preventDefault(),i.trigger("navigate",{view:i.name||o.name,date:o.date,isWorkDay:!o.showWorkHours})}))},_forTimeRange:function(e,t,i,o){var r,s,a,l,d,u,h,f,p,m,_,b,w,k,x,C;for(e=n(e),t=n(t),r=this,s=y(e),a=y(t),l=r.options.minorTickCount,d=r.options.majorTick*g,u=d/l||1,h=new Date((+e)),f=h.getDate(),m=0,b="",_=v/u,s!=a&&(s>a&&(a+=v),_=(a-s)/u),_=Math.round(_);m<_;m++)w=m%(d/u),k=0===w,x=w<l-1,C=w===l-1,b+=i(h,k,x,C),c(h,u,!1);return a&&(p=y(h),f<h.getDate()&&(p+=v),p>a&&(h=new Date((+t)))),o&&(b+=o(h)),b},_content:function(e){var t,n,i,o=this,r=o.options,s=o.startTime(),a=this.endTime(),l=1,c=1,d=e.length,u="",h=this.groupedResources,f=this.allDaySlotTemplate,p=!1,m=o._isGroupedByDate(),g=0;for(h.length&&(p="vertical"===o._groupOrientation(),p?(c=this._rowCountForLevel(this.rowLevels.length-2),m&&(l=this._columnCountForLevel(this.columnLevels.length-1)),r.allDaySlot&&(t=function(t){var n,i='<tr class="k-scheduler-header-all-day">',r=m?0:t,s=function(){return o._resourceBySlot({groupIndex:r})};if(m)for(;r<l;r++)i+="<td>"+f({date:e[g],resources:s})+"</td>";else for(n=0;n<e.length;n++)i+="<td>"+f({date:e[n],resources:s})+"</td>";return i+"</tr>"})):l=m?this._columnCountForLevel(this.columnLevels.length-1)/this._columnCountForLevel(0):this._columnCountForLevel(this.columnLevels.length-2)),u+="<tbody>",n=function(t,n){var r,s,a,c="",u=0;if(c="<tr"+(n?' class="k-middle-row"':"")+">",m)for(r=0,s=d;r<s;r++){for(u=0;u<l;u++)a=r,p&&(a=g),c=o._addCellsToContent(c,e,t,a,u,i);if(p)break}else for(;u<l;u++)for(r=0,s=d;r<s;r++)c=o._addCellsToContent(c,e,t,r,u,i);return c+="</tr>"},i=0;i<c;i++)u+=t?t(i):"",u+=this._forTimeRange(s,a,n),p&&g++;u+="</tbody>",this.content.find("table").append(u)},_addCellsToContent:function(e,t,n,i,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[i])&&(c+="k-today"),(a.date.getMilliseconds(n)<a.date.getMilliseconds(this.options.workDayStart)||a.date.getMilliseconds(n)>=a.date.getMilliseconds(this.options.workDayEnd)||!this._isWorkDay(t[i]))&&(c+=" k-nonwork-hour"),e+="<td"+(""!==c?' class="'+c+'"':"")+">",s=a.date.getDate(t[i]),a.date.setTime(s,a.date.getMilliseconds(n)),e+=d({date:s,resources:h(u&&!l._isGroupedByDate()?r:o)}),e+="</td>"},_isWorkDay:function(e){var t,n=e.getDay(),i=this._workDays;for(t=0;t<i.length;t++)if(i[t]===n)return!0;return!1},_render:function(t){var n,i=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(),n=this.element.find(".k-scheduler-header-all-day td"),n.length&&(this._allDayHeaderHeight=n.first()[0].clientHeight),i.element.on("click"+k,".k-nav-day",function(t){var n,o=e(t.currentTarget).closest("th"),r=o.offset(),s=0,a=h(o);i._isGroupedByDate()&&(i._isVerticallyGrouped()?(s=u(i.times),a=0):a=h(i.datesHeader)),n=i._slotByPosition(r.left+s,r.top+a),i.trigger("navigate",{view:"day",date:n.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=y(this.endTime())||v;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(k),e.element&&e.element.off(k),e.footer&&e.footer.remove(),d.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,n,i,o,r=d.fn.inRange.call(this,e);return e.isAllDay?r:(t=y(this.startTime()),n=y(this.endTime())||a.date.MS_PER_DAY,i=y(e.start),o=y(e.end)||a.date.MS_PER_DAY,r&&t<=i&&o<=n)},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*g},_timeSlotIndex:function(e){var t=this.options,n=y(e),i=y(this.startTime()),o=t.majorTick/t.minorTickCount*g;return(n-i)/o},_slotIndex:function(e,t){return t?this._dateSlotIndex(e):this._timeSlotIndex(e)},_dateSlotIndex:function(e,t){var n,o,r,s,l=this._dates||[],c=1;for(n=0,o=l.length;n<o;n++)if(r=a.date.getDate(l[n]),s=new Date(a.date.getDate(l[n]).getTime()+v-(t?0:1)),i(e,r,s))return n*c;return-1},_positionAllDayEvent:function(t,n){var i,o,r,s,a,l,c,u=n.innerWidth(),h=n.start.index,f=n.end.index,p=d.collidingEvents(n.events(),h,f),m=this._headerColumnCount||0,g=2,v=h!==f?5:4,_=this._allDayHeaderHeight,b=n.startSlot();for(t.css({left:b.offsetLeft+g,width:u-v}),n.addEvent({slotIndex:h,start:h,end:f,element:t}),p.push({slotIndex:h,start:h,end:f,element:t}),i=d.createRows(p),i.length&&i.length>m&&(this._headerColumnCount=i.length),o=n.start.offsetTop,r=0,s=i.length;r<s;r++)for(a=i[r].events,l=0,c=a.length;l<c;l++)e(a[l].element).css({top:o+r*_})},_arrangeColumns:function(e,t,n,i){var o,r,s,a,l,c,u,h,f,p,m,g=i.start;for(e={element:e,slotIndex:g.index,start:t,end:t+n},r=g.clientWidth,s=.1*r,l=i.events(),c=d.collidingEvents(l,e.start,e.end),i.addEvent(e),c.push(e),o=d.createColumns(c),u=(r-s)/o.length,h=0,f=o.length;h<f;h++)for(a=o[h].events,p=0,m=a.length;p<m;p++)a[p].element[0].style.width=u-4+"px",a[p].element[0].style.left=(this._isRtl?s:0)+g.offsetLeft+h*u+2+"px"},_positionEvent:function(e,t,n){var i=e._startTime||e.start,o=e._endTime||e.end,r=n.innerRect(i,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,n)},_createEventElement:function(t,n,o,r){var s,l,c,d,u,h,p=n?this.eventTemplate:this.allDayEventTemplate,g=this.options,_=g.editable,b=this._isMobile(),w=_&&_.destroy!==!1&&!b,k=_&&_.resize!==!1,x=m(this.startDate()),C=m(this.endDate()),S=y(this.startTime()),T=y(this.endTime()),D=t._time("start"),A=t._time("end");return S>=T&&(T=y(new Date(this.endTime().getTime()+v-1))),n||t.isAllDay||(C=new Date(C.getTime()+v)),l=t.start,c=t.end,t.isAllDay&&(c=m(t.end)),!i(m(l),x,C)&&!i(c,x,C)||n&&D<S&&A>T?s=!0:m(l)<x||n&&D<S?r=!0:(c>C&&!n||n&&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:k,showDelete:w,middle:s,head:o,tail:r,singleDay:1==this._dates.length,resources:d,inverseColor:!(!d||!d[0])&&this._shouldInverseResourceColor(d[0])},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,n=this.startTime(),i=this.endTime(),r=e._startTime||e.start,s=e._endTime||e.end;return y(i)===y(a.date.getDate(i))&&(i=a.date.getDate(i),c(i,v-1)),e._date("end")>e._date("start")&&(s=+e._date("end")+(v-1)),s-=e._date("end"),r-=e._date("start"),i=y(i),n=y(n),n===r&&r===s||(t=r!==i,o(r,n,i,t)||o(s,n,i,t)||o(n,r,s)||o(i,r,s))},_isInDateSlot:function(e){var t=this.groups[0],n=t.firstSlot().start,o=t.lastSlot().end-1,r=a.date.toUtcTime(e.start),s=a.date.toUtcTime(e.end);return(i(r,n,o)||i(s,n,o)||i(n,r,s)||i(o,r,s))&&(!i(s,n,n)||i(s,r,r)||e.isAllDay)},_updateAllDayHeaderHeight:function(e){var t,n;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),n=0;n<this.groups.length;n++)this.groups[n].refresh()},_renderEvents:function(e,t){var n,i,o,s,a,l,c,d,u,h,f,p,m,g,_,b,w,y,k,x,C,S=this.datesHeader.find(".k-scheduler-header-wrap > div"),T=this._isGroupedByDate();for(i=0,o=e.length;i<o;i++)if(n=e[i],this._isInDateSlot(n))if(s=n.isAllDay||n.end.getTime()-n.start.getTime()>=v,a=s&&!this._isVerticallyGrouped()?S:this.content,s){if(this.options.allDaySlot&&(f=this.groups[t],f._continuousEvents||(f._continuousEvents=[]),c=f.slotRanges(n),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(n,!s,x!==w,x!==b),C=f.daySlotRanges(y,k,!0)[0],k.setDate(k.getDate()+1),y.setDate(y.getDate()+1),this._positionAllDayEvent(l,C),r(f,C,l,!0),l.appendTo(a);else l=this._createEventElement(n,!s),this._positionAllDayEvent(l,c[0]),r(f,c[0],l,!0),l.appendTo(a)}else if(this._isInTimeSlot(n))for(f=this.groups[t],f._continuousEvents||(f._continuousEvents=[]),c=f.slotRanges(n),p=c.length,m=0;m<p;m++)d=c[m],u=n.start,h=n.end,p>1&&(0===m?h=d.end.endDate():m==p-1?u=d.start.startDate():(u=d.start.startDate(),h=d.end.endDate())),g=n.clone({start:u,end:h,_startTime:n._startTime,_endTime:n.endTime}),this._isInTimeSlot(g)&&(_=d.head,l=this._createEventElement(n,!s,_,d.tail),l.appendTo(a),this._positionEvent(g,l,d),r(f,d,l,!1))},render:function(t){var n,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(),n=[],this._eventsByResource(t,this.groupedResources,n),o=e.map(this._dates,function(t){return Math.max.apply(null,e.map(n,function(n){return e.grep(n,function(e){return e.isMultiDay()&&i(t,m(e.start),m(e.end))}).length}))}),r=Math.max.apply(null,o),this._updateAllDayHeaderHeight((r+1)*this._allDayHeaderHeight),s=0;s<n.length;s++)this._renderEvents(n[s],s);this.refreshLayout(),this._currentTime(!1),this.trigger("activate")},_eventsByResource:function(e,t,n){var i,o,r,s,l=t[0];if(l)for(i=l.dataSource.view(),o=0;o<i.length;o++)r=this._resourceValue(l,i[o]),s=new a.data.Query(e).filter({field:l.field,operator:d.groupEqFilter(r)}).toArray(),t.length>1?this._eventsByResource(s,t.slice(1),n):n.push(s);else n.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,n,i,o){var r=e.isAllDay,s=t[0].start,a=t[t.length-1].end;n&&(o?r||s.index!==a.index||s.collectionIndex!==a.collectionIndex||(e.backward=i):(r&&s.index===a.index||!r&&s.collectionIndex===a.collectionIndex)&&(e.backward=i))},_changeViewPeriod:function(e,t,n){var i,o,r,s,a,l,d,u,h,f,p;if(!n)return i=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()),d=l[l.length-1]._slots,u=t||a.daySlotCollectionCount()?d.length-1:0,e.start=new Date(i),e.end=new Date(i),s?(f=new Date(d[u].startDate()),p=new Date(d[u].endDate()),h=y(p)?y(p):v,c(e.start,y(f)),c(e.end,h),a.daySlotCollectionCount()&&(e.isAllDay=!e.isAllDay)):(h=e.isAllDay||!y(r)?v:y(r),c(e.start,y(o)),c(e.end,h)),this._isVerticallyGrouped()||(e.groupIndex=t?this.groups.length-1:0),e.events=[],!0}});f(!0,l,{MultiDayView:A,DayView:A.extend({options:{name:"DayView",title:"Day"},name:"day"}),WeekView:A.extend({options:{name:"WeekView",title:"Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"week",calculateDateRange:function(){var e,t,n=this.options.date,i=a.date.dayOfWeek(n,this.calendarInfo().firstDay,-1),o=[];for(e=0,t=7;e<t;e++)o.push(i),i=a.date.nextDay(i);this._render(o)}}),WorkWeekView:A.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,n=t(e,this.calendarInfo().firstDay,-1),i=t(n,this.options.workWeekStart,1),o=t(i,this.options.workWeekEnd,1),r=[];i<=o;)r.push(i),i=a.date.nextDay(i);this._render(r)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.agendaview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e){function t(e){var t,n,i=0;for(t=0,n=e.length;t<n;t++)i+=e[t].items.length;return i}function n(e,t){return e.valuePrimitive&&(t=r.getter(e.dataValueField)(t)),t}function i(e){for(var t,n=0,i=e.length,r=[];n<i;n++)t=e[n],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),n=t.shift(),i=[],o=[].push;n;)n.groups?o.apply(t,n.groups):n.items?o.apply(t,n.items):o.call(i,n),n=t.shift();return i}var r=window.kendo,s=r.ui,a=".kendoAgendaView",l='<div class="k-task" title="#: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-warning"></span># } else if (data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #{0}#if (showDelete) {#<a href="\\#" class="k-link k-event-delete"><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,n,i){var o=this._view;0===n&&0===i&&t.length&&o._renderTaskGroupsCells(e,t)},_renderDateCell:function(e,t,n,i,o,s){var a=this._view;e.push(r.format('<td class="k-scheduler-datecolumn{3}{2}" rowspan="{0}">{1}</td>',n.length,a._dateTemplate({date:i}),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,n){var i=this._view;e.append(i._renderTaskGroups(t,n))}}),d=r.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){var n,i,o=this._view;return o._isMobilePhoneView()?e.concat(t):(n=t.slice(0,1),i=t.slice(1),n.concat(e).concat(i))},_compareDateGroups:function(e,t,n){return e[n].text==t[n].text&&(0===n||this._compareDateGroups(e,t,n-1))},_getGroupsInDay:function(e,t){var n,i,o,r,s,a=[],l=null;for(n=0;n<e.length;n++)for(i=0;i<e[n].items.length;i++){if(o=0,0===a.length)for(o;o<t[n].length;o++)a.push([1]);else for(o;o<t[n].length;o++)if(this._compareDateGroups(t[n],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[n]}return a},_getSumOfItemsForDate:function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].items.length;return n},_renderTaskGroupsCells:function(e,t,n,i,o,s,a,l){var c,d=this._view,u=d._isMobilePhoneView();if(u)0===n&&0===i&&t.length&&d._renderTaskGroupsCells(e,t);else for(0===n&&0===i&&e.push(r.format('<td class="k-scheduler-datecolumn k-first" rowspan="{0}">{1}</td>',s,d._dateTemplate({date:a}))),c=0;c<t[n].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[n][c].text}),t[n][c].className))},_renderDateCell:function(){},_renderDates:function(e){var t,n=this._view,i=n._groupsByDate.sort(function(e,t){return e.array[0].value.getTime()-t.array[0].value.getTime()});for(t=0;t<i.length;t++)e.append(n._renderTaskGroups(i[t].array,i[t].groups))},_getParents:function(e){return e.slice(0)},_getGroupsByDate:function(e,t,n){var i,o,r,s,a=this._view;if(e[t].items)for(i=0;i<e[t].items.length;i++){for(o=e[t].items[i].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[i]),a._groupsByDate[s].groups.push(n));r||a._groupsByDate.push({array:[e[t].items[i]],groups:[n]})}},_renderTaskGroups:function(){}});r.ui.scheduler.AgendaGroupedView=c,r.ui.scheduler.AgendaGroupedByDateView=d,s.AgendaView=s.SchedulerView.extend({init:function(t,n){s.SchedulerView.fn.init.call(this,t,n),this._groupedView=this._getGroupedView(),n=this.options,n.editable&&(n.editable=e.extend({"delete":!0},n.editable,{create:!1,update:!1})),this.title=n.title,this._eventTemplate=this._eventTmpl(n.eventTemplate,l),this._dateTemplate=r.template(n.eventDateTemplate),this._groupTemplate=r.template(n.eventGroupTemplate),this._timeTemplate=r.template(n.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(n.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,n,i=[{text:this.options.messages.time,className:"k-scheduler-timecolumn"},{text:this.options.messages.event}];if(this._isMobilePhoneView()||i.splice(0,0,{text:this.options.messages.date,className:"k-scheduler-datecolumn"}),e=this.groupedResources,e.length){for(t=[],n=0;n<e.length;n++)t.push({text:"",className:"k-scheduler-groupcolumn"});i=this._groupedView._getColumns(t,i)}return{columns:i}},_tasks:function(e){var t,n,i,o,s,a,l,c=[];for(t=0;t<e.length;t++)if(n=e[t],i=n.start,o=n.isAllDay?r.date.getDate(n.end):n.end,s=Math.ceil((o-r.date.getDate(i))/r.date.MS_PER_DAY),n.isAllDay&&(s+=1),a=n.clone(),a.startDate=r.date.getDate(i),a.startDate>=this.startDate()&&c.push(a),s>1)for(a.end=r.date.nextDay(i),a.head=!0,l=1;l<s;l++)i=a.end,a=n.clone(),a.start=a.startDate=r.date.getDate(i),a.end=r.date.nextDay(i),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 n,i,o,s,a,l,c,d,u=[],h=this.options.editable,f=h&&h.destroy!==!1&&!this._isMobile(),p=this._isMobilePhoneView(),m=this._groupedView._getSumOfItemsForDate(e),g=this._groupedView._getGroupsInDay(e,t),v=0;for(n=0;n<e.length;n++)for(i=e[n].value,o=e[n].items,s=r.date.isToday(i),a=0;a<o.length;a++)l=o[a],c=[],d=p?[]:c,this._groupedView._renderTaskGroupsCells(d,t,n,a,g,m,i,v),v++,0===a&&(p?(d.push(r.format('<td class="k-scheduler-datecolumn" colspan="2">{0}</td>',this._dateTemplate({date:i}))),u.push('<tr role="row" aria-selected="false"'+(s?' class="k-today">':">")+d.join("")+"</tr>")):this._groupedView._renderDateCell(c,t,o,i,n,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:f})))),u.push('<tr role="row" aria-selected="false"'+(s?' class="k-today">':">")+c.join("")+"</tr>");return u.join("")},_renderTaskGroupsCells:function(e,t){for(var n=0;n<t.length;n++)e.push(r.format('<td class="k-scheduler-groupcolumn{2}" rowspan="{0}">{1}</td>',t[n].rowSpan,this._groupTemplate({value:t[n].text}),t[n].className))},render:function(e){var t,n,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,[])))),n=this._eventsList=i(r),this._angularItems(o,n),this.refreshLayout(),this.trigger("activate")},_angularItems:function(e,t){this.angular("compile",function(){var n=[],i=t.map(function(t){return n.push({dataItem:t}),e.find(".k-task["+r.attr("uid")+"="+t.uid+"]")});return{elements:i,data:n}})},_renderGroups:function(e,t,n){var i,o,r;for(i=0,o=e.length;i<o;i++)r=this._groupedView._getParents(n),r.push(e[i]),this._groupedView._getGroupsByDate(e,i,r),e[i].groups?this._renderGroups(e[i].groups,t,r):this._groupedView._renderTaskGroups(t,e[i].items,r)},_createGroupConfiguration:function(e,i,o){var a,l,c,d,u,h,f,p=i[0],m=[],g=p.dataSource.view(),v=this._isMobilePhoneView();for(a=0;a<g.length;a++)l=n(p,g[a]),c=new r.data.Query(e).filter({field:p.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(p.dataTextField)(g[a]),value:l,rowSpan:0,className:u},i.length>1?(h.groups=this._createGroupConfiguration(c,i.slice(1),h),o&&(o.rowSpan+=h.rowSpan)):(h.items=d,f=t(h.items),v&&(f+=h.items.length),h.rowSpan=f,o&&(o.rowSpan+=f)),m.push(h));return m},selectionByElement:function(t){var n,i,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(),n=o.parent().children().filter(function(){return e(this).children(":not(.k-scheduler-datecolumn)").length}).index(o)):n=t.parent().index(),i=this._eventsList[n],{index:n,start:i.start,end:i.end,isAllDay:i.isAllDay,uid:i.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 n,i=!1,o=e.index;return t==r.keys.UP?(o--,i=!0):t==r.keys.DOWN&&(o++,i=!0),i&&(n=this._eventsList[o],n&&(e.start=n.start,e.end=n.end,e.isAllDay=n.isAllDay,e.events=[n.uid],e.index=o)),i},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,n){(n||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 n(e,t){for(var n=t.firstDay,i=new Date(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)o.date.setTime(i,-1*d);return i}function i(e,t,n){var i,o=t,r=n;return i=e,i>=o&&i<=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,f=o.template('<span class="k-link k-nav-day">#:kendo.toString(date, "dd")#</span>'),p='<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-warning"></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"><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,n,i){var o,r=this._view,s=h,a=r._isVerticallyGrouped(),l="";for(o=0;o<n;o++)l+=r._createRow(e,t,s,a?i:o);return l},_adjustStartDate:function(e){return o.date.addDays(e,h)},_getContent:function(e,t,n){return e({date:t,resources:n})},_getTimeSlotByPosition:function(e,t,n){var i=this._view.groups[n];return i.daySlotByPosition(e,t)},_nextSlotStartDate:function(e){return o.date.nextDay(e)},_createRowsLayout:function(e,t,n){var i=this._view;return i._createRowsLayout(e,t,n)},_createVerticalColumnsLayout:function(e,t,n,i){return i},_createColumnsLayout:function(e,t,n){var i=this._view;return i._createColumnsLayout(e,t,n)},_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,n,i,o,r,s){var a,l=this._view,c=l._isMobilePhoneView();i>1&&(0===s?r=n.end.endDate():s==i-1?o=n.start.startDate():(o=n.start.startDate(),r=n.end.endDate())),a=e.clone({start:o,end:r,head:n.head,tail:n.tail}),c?l._positionMobileEvent(n,l._createEventElement(a),t):l._positionEvent(n,l._createEventElement(a),t)},_addDaySlotCollections:function(e,t,n){var i,r,s,a,l,c,d,f,p,m,g,v=this._view,_=h,b=u;for(i=0;i<e;i++)for(r=0,s=0,v._isVerticallyGrouped()&&(s=i),a=s*b;a<(s+1)*b;a++)for(l=v.groups[i],c=l.addDaySlotCollection(o.date.addDays(n,r),o.date.addDays(n,r+_)),d=t[a],f=d.children,p=0,d.setAttribute("role","row"),v._isVerticallyGrouped()||(p=i),m=p*_;m<(p+1)*_;m++)g=f[m],v.addDaySlot(c,g,n,r),r++},_changePeriodGroupIndex:function(e){var t=this._view;return e?t.groups.length-1:0},_createResizeHint:function(e){var t=this._view,n=e.startSlot().offsetLeft,i=e.start.offsetTop,o=e.innerWidth(),r=e.start.clientHeight-2,a=s.fn._createResizeHint.call(t,n,i,o,r);t._appendResizeHint(a)},_createMoveHint:function(e,t){var n=this._view,i=e.startSlot(),o=e.endSlot(),r=n._createEventElement(t.clone({head:e.head,tail:e.tail}));r.css({left:i.offsetLeft+2,top:i.offsetTop+i.firstChildHeight,height:n.options.eventHeight,width:e.innerWidth()-(i.index!==o.index?5:4)}),r.addClass("k-event-drag-hint"),n._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,n){var i,r,s=this._view,a=h,l=s._isVerticallyGrouped(),c="",d=0;if(l){for(i=new Date(e),r=s._groupCount(),d;d<u;d++)c+=s._createRow(i,t,r,d),i=o.date.addDays(i,a);e=o.date.nextDay(e)}else{for(d;d<a;d++)c+=s._createRow(e,t,n,d),e=o.date.nextDay(e);e=o.date.addDays(e,a)}return c},_adjustStartDate:function(e,t){var n=this._view,i=n._isVerticallyGrouped();return i?t?o.date.addDays(e,h*(u-1)+1):o.date.nextDay(e):o.date.addDays(e,h)},_getContent:function(e,t,n,i){return 0===i?e({date:t,resources:n}):""},_getTimeSlotByPosition:function(e,t,n){var i=this._view.groups[n];return i.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,n,i){var o=this._view;return o._createDateLayout(i,null,!1)},_createVerticalColumnsLayout:function(e,t,n){var i,r,s=this._view,a=e[0],l=[],c=a.dataSource.view();for(i=0;i<c.length*u;i++)r={text:n({text:o.htmlEncode(o.getter(a.dataTextField)(c[i%c.length])),color:o.getter(a.dataColorField)(c[i%c.length]),field:a.field,title:a.title,name:a.name,value:o.getter(a.dataValueField)(c[i%c.length])}),className:"k-slot-cell"},r.columns=s._createColumnsLayout(e.slice(1),null,n),l.push(r);return l},_createColumnsLayout:function(e,t,n,i){var o=this._view;return o._createColumnsLayout(e,t,n,i,!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,n,i,o,r){var s,a,l,c,d=this._view,u=n.start.index,h=n.end.index,f=d._isMobilePhoneView();for(s=n.start.index;s<=n.end.index;s++)a=n.collection._slots[s],l=t.daySlotRanges(a.start,a.start,!0)[0],c=e.clone({start:s===u?a.start:o,end:s===h?a.end:r,head:s!==h||n.head,tail:s!==u||n.tail}),f?d._positionMobileEvent(l,d._createEventElement(c),t):d._positionEvent(l,d._createEventElement(c),t)},_addDaySlotCollections:function(e,t,n){var i,r,s,a,l,c,d,f,p,m,g,v,_,b,w=this._view,y=h,k=u,x=w._isVerticallyGrouped();for(i=0;i<y;i++)for(r=0;r<k;r++)for(s=0,a=x?i:r,l=t[a],c=l.children,d=0,l.setAttribute("role","row"),w._isVerticallyGrouped()||(d=i),f=d*e;f<(d+1)*e;f++)p=r*y+i,m=x?f+r*e:f,g=c[m],v=x?f:s,_=w.groups[v],b=0===i?_.addDaySlotCollection(o.date.addDays(n,p),o.date.addDays(n,p+y)):_._daySlotCollections[r],w.addDaySlot(b,g,n,p),s++},_changePeriodGroupIndex:function(e,t,n){var i=this._view;return t&&i._isVerticallyGrouped()?e?i.groups.length-1:0:n},_createResizeHint:function(e){var t,n,i,o,r,a,l,c=this._view;if(c._isVerticallyGrouped())t=e.startSlot().offsetLeft,n=e.start.offsetTop,i=e.startSlot().offsetWidth,o=e.endSlot().offsetTop+e.startSlot().offsetHeight-e.startSlot().offsetTop-2,r=s.fn._createResizeHint.call(c,t,n,i,o),c._appendResizeHint(r);else for(a=e.startSlot().index;a<=e.endSlot().index;a++)l=e.collection._slots[a],t=l.offsetLeft,n=l.offsetTop,i=l.offsetWidth,o=l.offsetHeight-2,r=s.fn._createResizeHint.call(c,t,n,i,o),c._appendResizeHint(r)},_createMoveHint:function(e,t){var n,i,o,r=this._view,s=e.startSlot(),a=e.endSlot();for(n=s.index;n<=a.index;n++)i=e.collection._slots[n],o=r._createEventElement(t.clone({head:e.head,tail:e.tail})),o.css({left:i.offsetLeft,top:i.offsetTop+i.firstChildHeight,height:r.options.eventHeight,width:i.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 n=this;s.fn.init.call(n,e,t),n._groupedView=n._getGroupedView(),n.title=n.options.title,n._templates(),n._editable(),n._renderLayout(n.options.date),n._groups()},name:"month",_getGroupedView:function(){return this._isGroupedByDate()?new o.ui.scheduler.MonthGroupedByDateView(this):new o.ui.scheduler.MonthGroupedView(this)},_updateDirection:function(e,t,n,i,o){var r,s,a,l,c;n&&(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=i))},_changeDate:function(e,t,n){var i,o,r,s=this.groups[e.groupIndex];if(n){if(i=s._getCollections(s.daySlotCollectionCount()),o=t.collectionIndex-1,o>=0)return i[o]._slots[i[o]._slots.length-1]}else if(i=s._getCollections(s.daySlotCollectionCount()),o=t.collectionIndex+1,r=0,i[o]&&i[o]._slots[r])return i[o]._slots[r]},_getNextHorizontalRange:function(e,t,n){var i=this._isVerticallyGrouped();return n.startSlot=e[t](n.startSlot,i),n.endSlot=e[t](n.endSlot,i),n},_getNextVerticalRange:function(e,t,n,i){var o=this._isVerticallyGrouped()&&this._isGroupedByDate();return n.startSlot=e[t](n.startSlot,i,o),n.endSlot=e[t](n.endSlot,i,o),n},_changeViewPeriod:function(e,t,n){var i=n?7:1;return t&&(i*=-1),e.start=o.date.addDays(e.start,i),e.end=o.date.addDays(e.end,i),(!n||n&&this._isVerticallyGrouped())&&(e.groupIndex=this._groupedView._changePeriodGroupIndex(t,n,e.groupIndex)),e.events=[],!0},_continuousSlot:function(e,t,n){var i=e.backward?0:t.length-1,o=this.groups[e.groupIndex];return o.continuousSlot(t[i].start,n)},_changeGroupContinuously:function(e,t,n,i){var o,r,s,a;return n||(o=e.groupIndex,r=this.groups.length-1,s=this._isVerticallyGrouped(),a=this.groups[o],!t&&s?(t=a[i?"lastSlot":"firstSlot"](),o+=i?-1:1):t&&!s&&(o=i?r:0),(o<0||o>r)&&(o=i?r:0,t=null),e.groupIndex=o),t},_normalizeHorizontalSelection:function(e,t,n){var i;return i=n?t[0].start:t[t.length-1].end},_normalizeVerticalSelection:function(e,t){var n;return n=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,p),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 i=this;this._firstDayOfMonth=o.date.firstDayOfMonth(t),this._lastDayOfMonth=o.date.lastDayOfMonth(t),this._startDate=n(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 n=e(t.currentTarget).offset(),o=i._slotByPosition(n.left,n.top);t.preventDefault(),i.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(n){t.trigger("remove",{uid:e(this).closest(".k-event").attr(o.attr("uid"))}),n.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+a,".k-scheduler-monthview .k-scheduler-content td",function(n){var i,o=e(n.currentTarget).offset(),r=t._slotByPosition(o.left,o.top);r&&(i=t._resourceBySlot(r),t.trigger("add",{eventInfo:l({isAllDay:!0,start:r.startDate(),end:r.startDate()},i)})),n.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+a,".k-scheduler-monthview .k-event",function(n){t.trigger("edit",{uid:e(this).closest(".k-event").attr(o.attr("uid"))}),n.preventDefault()})},_touchEditable:function(){var t=this,n=0;o.support.mobileOS.android&&(n=5),t.options.editable.create!==!1&&(t._addUserEvents=new o.UserEvents(t.element,{threshold:n,filter:".k-scheduler-monthview .k-scheduler-content td",tap:function(n){var i,o=e(n.target).offset(),r=t._slotByPosition(o.left,o.top);r&&(i=t._resourceBySlot(r),t.trigger("add",{eventInfo:l({isAllDay:!0,start:r.startDate(),end:r.startDate()},i)})),n.preventDefault()}})),t.options.editable.update!==!1&&(t._editUserEvents=new o.UserEvents(t.element,{threshold:n,filter:".k-scheduler-monthview .k-event",tap:function(n){0===e(n.event.target).closest("a:has(.k-i-close)").length&&(t.trigger("edit",{uid:e(n.target).closest(".k-event").attr(o.attr("uid"))}),n.preventDefault())}}))},selectionByElement:function(t){var n=e(t).offset();return this._slotByPosition(n.left,n.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>",n=1,i=this._groupedView,o=this.groupedResources;for(o.length&&this._isVerticallyGrouped()&&(n=i._verticalRowCountForLevel(o.length-1)),e=0;e<n;e++)t+=this._createCalendar(e);t+="</tbody>",this.content.find("table").html(t)},_createCalendar:function(e){var t,n,i,r=this.startDate(),s=h*u,a=h,l=[r],c="",d=1,f=this._isVerticallyGrouped(),p=this._groupedView,m=this.groupedResources;for(m.length&&(f||(d=p._horizontalGroupCountForLevel(m.length-1))),this._slotIndices={},t=p._getCalendarRowsLength(a,s),n=0;n<t;n++)c+="<tr>",l.push(r),i=n*a,c+=p._createRows(r,i,d,e),r=p._adjustStartDate(r,n===t-1),c+="</tr>";return this._weekStartDates=l,this._endDate=o.date.previousDay(r),c},_createRow:function(e,t,n,i){var r,s=this,a=s._firstDayOfMonth,l=s._lastDayOfMonth,d=s.dayTemplate,u="",h="",f=this._groupedView,p=function(){return s._resourceBySlot({groupIndex:i})};for(r=0;r<n;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+=f._getContent(d,e,p,r),h+="</td>",s._slotIndices[c(e).getTime()]=t+r,e=f._nextSlotStartDate(e);return h},_layout:function(){var n,i,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(i=[],o=0;o<6;o++)i.push({text:"<div>&nbsp;</div>",className:"k-hidden k-slot-cell"});n=d._createRowsLayout(c,i,this.groupHeaderTemplate,l),l=d._createVerticalColumnsLayout(c,i,this.groupHeaderTemplate,l)}else l=d._createColumnsLayout(c,l,this.groupHeaderTemplate,l);return{columns:l,rows:n}},_createEventElement:function(t){var n,i=this.options,r=i.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]),n=e(this.eventTemplate(t)),this.angular("compile",function(){return{elements:n,data:[{dataItem:t}]}}),n},_isInDateSlot:function(e){var t=this.groups[0],n=t.firstSlot().start,r=t.lastSlot().end-1,s=o.date.toUtcTime(e.start),a=o.date.toUtcTime(e.end);return(i(s,n,r)||i(a,n,r)||i(n,s,a)||i(r,s,a))&&(!i(a,n,n)||i(a,s,s)||e.isAllDay)},_slotIndex:function(e){return this._slotIndices[c(e).getTime()]},_positionMobileEvent:function(t,n,i){var r,a,l,c,d,u,h,f=t.start;t.start.offsetLeft>t.end.offsetLeft&&(f=t.end),r=t.start.index,a=r,l=3,c=s.collidingEvents(t.events(),r,a),c.push({element:n,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}"/>',f.offsetTop+f.firstChildTop+f.firstChildHeight-3+"px",f.offsetLeft+"px",f.offsetWidth+"px")),u.container=h,this.content[0].appendChild(h[0])),d.length<=l&&(t.addEvent({element:n,start:r,end:a,groupIndex:f.groupIndex}),i._continuousEvents.push({element:n,uid:n.attr(o.attr("uid")),start:t.start,end:t.end}),h[0].appendChild(n[0]))},_positionEvent:function(t,n,i){var r,a,l,c,d,u,h,f,p,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:n,start:r,end:a}),u=s.createRows(c),h=0,f=Math.min(u.length,l);h<f;h++)for(p=u[h].events,m=x.offsetTop+x.firstChildHeight+h*k+3*h+"px",v=0,_=p.length;v<_;v++)p[v].element[0].style.top=m;if(u.length>l)for(b=r;b<=a;b++){if(w=t.collection,y=w.at(b),y.more)return;y.more=e(g({ns:o.ns,start:b,end:b,width:y.clientWidth-2,left:y.offsetLeft+2,top:y.offsetTop+y.firstChildHeight+l*k+3*l})),this.content[0].appendChild(y.more[0])}else t.addEvent({element:n,start:r,end:a,groupIndex:x.groupIndex}),n[0].style.width=t.innerWidth()-d+"px",n[0].style.left=x.offsetLeft+2+"px",n[0].style.height=k+"px",i._continuousEvents.push({element:n,uid:n.attr(o.attr("uid")),start:t.start,end:t.end}),n.appendTo(this.content)},_slotByPosition:function(e,t){var n,i,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),n=0;n<this.groups.length;n++)if(i=this._groupedView._getTimeSlotByPosition(e,t,n))return i;return null},_appendResizeHint:function(e){e.appendTo(this.content),this._resizeHint=this._resizeHint.add(e)},_updateResizeHint:function(e,t,n,i){var r,s,a;for(this._removeResizeHint(),r=this.groups[t],s=r.ranges(n,i,!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(n),"M/dd")),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(o.toString(o.timezone.toLocalDate(i),"M/dd"))},_updateMoveHint:function(e,t,n){var i,r=o.date.toUtcTime(e.start)+n,s=r+e.duration(),a=this.groups[t],l=a.ranges(r,s,!0,e.isAllDay);for(this._removeMoveHint(),i=0;i<l.length;i++)this._groupedView._createMoveHint(l[i],e)},_appendMoveHint:function(e){e.appendTo(this.content),this._moveHint=this._moveHint.add(e)},_groups:function(){var e,t=this._groupCount(),n=this.content[0].getElementsByTagName("tr"),i=this.startDate();for(this.groups=[],e=0;e<t;e++)this._addResourceView(e);this._groupedView._addDaySlotCollections(t,n,i)},addDaySlot:function(e,t,n,i){var r,s=t.clientHeight,a=t.children.length?t.children[0].offsetHeight+3:0,l=o.date.addDays(n,i),c=o.date.MS_PER_DAY;n.getHours()!==l.getHours()&&(c+=(n.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 n,i,o,r,s,a,l,c,d,u;for(i=0,o=e.length;i<o;i++)if(n=e[i],this._isInDateSlot(n))for(r=this.groups[t],r._continuousEvents||(r._continuousEvents=[]),s=r.slotRanges(n,!0),a=s.length,l=0;l<a;l++)c=s[l],d=n.start,u=n.end,this._groupedView._positionEvent(n,r,c,a,d,u,l)},_renderGroups:function(e,t,n,i){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?n=this._renderGroups(c,t.slice(1),n++,i+1):this._renderEvents(c,n++);return n},_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:f,eventTemplate:m}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,t){var n;return 0!==e&&e<t?n=t-e:(n=e%t,n&&(n=t-n)),n}function i(e){var t=e.getMonth(),n=g(e)?te[t]:ne[t];return n+e.getDate()}function o(e,n){var i,o;return e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),Z(e,0),i=e.getFullYear(),n!==t?(X(e,n,-1),e.setDate(e.getDate()+4)):e.setDate(e.getDate()+(4-(e.getDay()||7))),Z(e,0),o=Math.floor((e.getTime()-new Date(i,0,1,(-6)))/864e5),1+Math.floor(o/7)}function r(e,t){var n=J(e).getDay(),i=7-(n+7-(t||7))||7;return i<0&&(i+=7),Math.ceil((e.getDate()-i)/7)+1}function s(e,t){return e+(e<t?7:0)}function a(e,t,n){var i,o,a,l,c,d=t.offset;return d?(i=new Date(e.getFullYear(),e.getMonth()+1,0),o=r(i,n),a=s(t.day,n),l=a<s(new Date(e.getFullYear(),e.getMonth(),1).getDay(),n),c=a>s(i.getDay(),n),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,n)}function l(e,t){return r(new Date(e.getFullYear(),e.getMonth()+1,0),t)}function c(e,t,n){return r(e,n)===a(e,t,n)}function d(e,t,n){for(var i,o,l,c,d=s(t.getDay(),n),u=e.length,h=[],f=0;f<u;f++)if(o=e[f],c=r(t,n),i=a(t,o,n),null!==i)if(c<i)h.push(o);else if(c===i)if(l=s(o.day,n),d<l)h.push(o);else if(d===l)return null;return h}function u(e,t,n){for(var i,o=0,r=e.length,s=[];o<r;o++){if(i=e[o],n&&(i=n(i)),t===i)return null;t<i&&s.push(i)}return s}function h(e,t){for(var n,i=0,o=e.length;i<o;i++){if(n=parseInt(e[i],10),isNaN(n)||n<t.start||n>t.end||0===n&&t.start<0)return null;e[i]=n}return e.sort(v)}function f(e){for(var n,i,o,r=0,s=e.length;r<s;r++){if(n=e[r],i=n.length,o=n.substring(i-2).toUpperCase(),o=re[o],o===t)return null;e[r]={offset:parseInt(n.substring(0,i-2),10)||0,day:o}}return e}function p(e){for(var t,n,i=0,o=e.length,r=[];i<o;i++)t=e[i],"string"==typeof t?n=t:(n=""+oe[t.day],t.offset&&(n=t.offset+n)),r.push(n);return""+r}function m(e){var t=e.getMonth();return 1===t?1===new Date(e.getFullYear(),1,29).getMonth()?29:28:ie[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 n,i,o=0,r=[];if(e)for(e=e.split(e.indexOf(";")!==-1?";":","),n=e.length;o<n;o++)i=T(e[o],t),i&&r.push(i);return r}function b(t,n,i){for(var o=e.isArray(t)?t:_(t,i),r=n.getTime()-n.getMilliseconds(),s=0,a=o.length;s<a;s++)if(o[s].getTime()===r)return!0;return!1}function w(e,t){var n,i,o=0,r=[].concat(e);for(n=r.length;o<n;o++)i=r[o],i=W.timezone.convert(i,t||i.getTimezoneOffset(),"Etc/UTC"),r[o]=W.toString(i,ce);return r.join(",")}function y(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),0,1);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth(),1);break;case"weekly":X(n,t.weekStart,-1)}return t.hours&&n.setHours(0),t.minutes&&n.setMinutes(0),t.seconds&&n.setSeconds(0),n}function k(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),11,31);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth()+1,0);break;case"weekly":X(n,t.weekStart,-1),n.setDate(n.getDate()+6)}return t.hours&&n.setHours(23),t.minutes&&n.setMinutes(59),t.seconds&&n.setSeconds(59),n}function x(e,t,n){var i,o,r,s,a=e.length,l=[];for(r=0,s=n.length;r<s;r++)i=n[r],i<0?i=a+i:i-=1,o=e[i],o&&o.start>=t&&l.push(o);return l}function C(e,t,n){var i,o,r=[];for(o=0;o<e.length;o++)i=e[o],b(t,i.start,n)||r.push(i);return r}function S(e,n,i,o){var r,s,a,l,c,d,u,h,f,p,m,g,v,S,T,D,E,M,R,I,F,z,P,B=A(e.recurrenceRule,o),L=[];if(!B)return[e];for(I=B.positions,F=I?0:1,p=B.start,m=B.end,(p||m)&&(e=e.clone({start:p?new Date(p.value[0]):t,end:m?new Date(m.value[0]):t})),E=e.start,D=E.getTime(),T=ee(E),S=_(e.recurrenceException,o),!S[0]&&B.exdates&&(S=B.exdates.value,e.set("recurrenceException",w(S,o))),h=n=new Date(n),i=new Date(i),v=B.freq,R=ve[v],M=B.count,B.until&&B.until<i&&(i=new Date(B.until)),g="yearly"===v||"monthly"===v||"weekly"===v,n<D||M||B.interval>1||g?n=new Date(D):(l=n.getHours(),c=n.getMinutes(),d=n.getSeconds(),B.hours||(l=E.getHours()),B.minutes||(c=E.getMinutes()),B.seconds||(d=E.getSeconds()),n.setHours(l,c,d,E.getMilliseconds())),B._startPeriod=new Date(n),I&&(n=y(n,B),i=k(i,B),P=ee(i)-ee(n),P<0&&(l=n.getHours(),i.setHours(l,n.getMinutes(),n.getSeconds(),n.getMilliseconds()),K.adjustDST(i,l)),B._startPeriod=new Date(n),B._endPeriod=k(n,B)),u=e.duration(),B._startTime=r=K.toInvariantTime(n),R.setup&&R.setup(B,E,n),R.limit(n,i,B);n<=i;)if(a=new Date(n),Q(a,u),f=n>=h||a>h,(f&&!b(S,n,o)||I)&&(r=K.toUtcTime(K.getDate(n))+ee(B._startTime),s=r+u,D!==n.getTime()||T!==ee(B._startTime)?L.push(e.toOccurrence({start:new Date(n),end:a,_startTime:r,_endTime:s})):(e._startTime=r,e._endTime=s,L.push(e))),I){if(R.next(n,B),R.limit(n,i,B),n>B._endPeriod&&(z=x(L.slice(F),E,I),z=C(z,S,o),L=L.slice(0,F).concat(z),B._endPeriod=k(n,B),F=L.length),M&&M===F)break}else{if(M&&M===F)break;F+=1,R.next(n,B),R.limit(n,i,B)}return L}function T(e,t){return e=W.parseDate(e,se),e&&t&&(e=j.convert(e,e.getTimezoneOffset(),t)),e}function D(e,t){var n,i,o,r,s,a,l,c,d=e.split(";");for(l=0,c=d.length;l<c;l++)if(n=d[l].split(":"),i=n[0],o=n[1],i.indexOf("TZID")!==-1&&(r=i.substring(i.indexOf("TZID")).split("=")[1]),o)for(o=o.split(","),s=0,a=o.length;s<a;s++)o[s]=T(o[s],r||t);if(o)return{value:o,tzid:r}}function A(n,i){var o,r,s,a,l,c,d,u,p,m={},g=0,v=!1,_=function(e,t){var n=e.day,i=t.day;return n<u&&(n+=7),i<u&&(i+=7),n-i};if(!n)return null;for(c=n.split("\n"),c[1]||n.indexOf("DTSTART")===-1&&n.indexOf("DTEND")===-1&&n.indexOf("EXDATE")===-1||(c=n.split(" ")),g=0,s=c.length;g<s;g++)l=e.trim(c[g]),l.indexOf("DTSTART")!==-1?m.start=D(l,i):l.indexOf("DTEND")!==-1?m.end=D(l,i):l.indexOf("EXDATE")!==-1?m.exdates=D(l,i):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=T(r[0],i);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=p=f(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=re[r[0]]}return m.freq===t||m.count!==t&&m.until?null:(m.interval||(m.interval=1),u===t&&(m.weekStart=u=W.culture().calendar.firstDay),p&&(m.weekDays=p.sort(_)),m.positions&&!v&&(m.positions=null),m._hasRuleValue=v,m)}function E(e,t){for(var n,i=e.value,o=e.tzid||"",r=i.length,s=0;s<r;s++)n=i[s],n=j.convert(n,o||t||n.getTimezoneOffset(),"Etc/UTC"),i[s]=W.toString(n,"yyyyMMddTHHmmssZ");return o&&(o=";TZID="+o),o+":"+i.join(",")+" "}function M(e,n){var i=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=j.convert(l,n||l.getTimezoneOffset(),"Etc/UTC"),o+=";UNTIL="+W.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="+p(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),i!==t&&(o+=";WKST="+oe[i]),s&&(s="DTSTART"+E(s,n)),a&&(a="DTEND"+E(a,n)),r&&(r="EXDATE"+E(r,n)),(s||a||r)&&(o=s+a+r+"RRULE:"+o),o}var R,I,F,z,P,B,L,H,N,O,V,U,W=window.kendo,j=W.timezone,q=W.Class,G=W.ui,$=G.Widget,Y=G.DropDownList,K=W.date,Q=K.setTime,X=K.setDayOfWeek,Z=K.adjustDST,J=K.firstDayOfMonth,ee=K.getMilliseconds,te=[0,31,60,91,121,152,182,213,244,274,305,335,366],ne=[0,31,59,90,120,151,181,212,243,273,304,334,365],ie=[31,28,30,31,30,31,30,31,30,31,30,31],oe={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},re={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},se=["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"],ae=["months","weeks","yearDays","monthDays","weekDays","hours","minutes","seconds"],le=ae.length,ce="yyyyMMddTHHmmssZ",de={months:function(e,t,n){var i=n.months,o=u(i,e.getMonth()+1),r=!1;return null!==o&&(o.length?e.setMonth(o[0]-1,1):e.setFullYear(e.getFullYear()+1,i[0]-1,1),r=!0),r},monthDays:function(e,t,n){for(var i,o,r,s=!1,a=e.getHours(),l=function(e){return e<0&&(e=i+e),e};e<=t;){if(o=e.getMonth(),i=m(e),r=u(n.monthDays,e.getDate(),l),null===r)return s;if(s=!0,r.length){if(e.setMonth(o,r.sort(v)[0]),Z(e,a),o===e.getMonth())break}else e.setMonth(o+1,1)}return s},yearDays:function(e,t,n){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(n.yearDays,i(e),l),null===r)return s;if(s=!0,o=e.getFullYear(),r.length){e.setFullYear(o,0,r.sort(v)[0]),Z(e,a);break}e.setFullYear(o+1,0,1)}return s},weeks:function(e,t,n){for(var i,r,s,a=n.weekStart,l=!1,c=e.getHours(),d=function(e){return e<0&&(e=53+e),e};e<t;){if(r=u(n.weeks,o(e,a),d),null===r)return l;if(l=!0,i=e.getFullYear(),r.length){s=7*r.sort(v)[0]-1,e.setFullYear(i,0,s),X(e,a,-1),Z(e,c);break}e.setFullYear(i+1,0,1)}return l},weekDays:function(e,t,n){var i,o,s=n.weekDays,a=n.weekStart,u=d(s,e,a),h=e.getHours();if(null===u)return!1;if(i=u[0],i||(i=s[0],X(e,a)),o=i.day,i.offset)for(;e<=t&&!c(e,i,a);)r(e,a)===l(e,a)?(e.setMonth(e.getMonth()+1,1),Z(e,h)):(e.setDate(e.getDate()+7),Z(e,h),X(e,a,-1));return e.getDay()!==o&&X(e,o),!0},hours:function(e,t,n){var i=n.hours,o=n._startTime,r=o.getHours(),s=u(i,r),a=!1;return null!==s&&(a=!0,e.setHours(r),Z(e,r),s.length?(s=s[0],e.setHours(s)):(s=e.getHours(),e.setDate(e.getDate()+1),Z(e,s),s=i[0],e.setHours(s),Z(e,s)),n.minutes&&e.setMinutes(0),o.setHours(s,e.getMinutes())),a},minutes:function(e,t,n){var i=n.minutes,o=e.getMinutes(),r=u(i,o),s=n._startTime.getHours(),a=!1;return null!==r&&(a=!0,r.length?r=r[0]:(s+=1,r=i[0]),n.seconds&&e.setSeconds(0),e.setHours(s,r),s%=24,Z(e,s),n._startTime.setHours(s,r,e.getSeconds())),a},seconds:function(e,t,n){var i=n.seconds,o=n._startTime.getHours(),r=u(i,e.getSeconds()),s=e.getMinutes(),a=!1;return null!==r&&(a=!0,r.length?e.setSeconds(r[0]):(s+=1,e.setMinutes(s,i[0]),s>59&&(s%=60,o=(o+1)%24)),n._startTime.setHours(o,s,e.getSeconds())),a}},ue=q.extend({next:function(e,t){var n,i,o=t._startTime,r=o.getDate();if(t.seconds)i=e.getSeconds()+1,e.setSeconds(i),o.setSeconds(i),o.setDate(r);else{if(!t.minutes)return!1;n=e.getMinutes()+1,e.setMinutes(n),o.setMinutes(n),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,n,i){for(var o,r,s,a,l,c=i.interval;e<=n;){for(s=r=t,l=e.getDate(),a=0;a<le;a++){if(o=ae[a],i[o]){if(s=de[o](e,n,i),r!==t&&s)break;r=s}s&&this.normalize({date:e,rule:i,day:l,idx:a})}if((1===c||!this.interval(i,e))&&a===le)break}},interval:function(e,t){var i,o,r,a,l=new Date(e._startPeriod),c=new Date(t),d=t.getHours(),u=e.weekStart,h=e.interval,f=e.freq,p=!1,m=0,g=0,v=1;return"hourly"===f?(i=c.getTimezoneOffset()-l.getTimezoneOffset(),o=e._startTime.getHours(),c=c.getTime(),d!==o&&(c+=(o-d)*K.MS_PER_HOUR),c-=l,i&&(c-=i*K.MS_PER_MINUTE),i=Math.floor(c/K.MS_PER_HOUR),m=n(i,h),0!==m&&(this._hour(t,e,m),p=!0)):"daily"===f?(K.setTime(c,-l,!0),i=Math.ceil(c/K.MS_PER_DAY),m=n(i,h),0!==m&&(this._date(t,e,m),p=!0)):"weekly"===f?(m=this._getNumberOfWeeksBetweenDates(l,t),r=s(t.getDay(),u),a=s(l.getDay(),u),r<a&&(m+=1),m=n(m,h),0!==m&&(K.setDayOfWeek(t,e.weekStart,-1),t.setDate(t.getDate()+7*m),Z(t,d),p=!0)):"monthly"===f?(i=t.getFullYear()-l.getFullYear(),i=t.getMonth()-l.getMonth()+12*i,m=n(i,h),0!==m&&(v=e._hasRuleValue?1:t.getDate(),t.setFullYear(t.getFullYear(),t.getMonth()+m,v),Z(t,d),p=!0)):"yearly"===f&&(i=t.getFullYear()-l.getFullYear(),m=n(i,h),e.months||(g=t.getMonth()),e.yearDays||e.monthDays||e.weekDays||(v=t.getDate()),0!==m&&(t.setFullYear(t.getFullYear()+m,g,v),Z(t,d),p=!0)),p},_getNumberOfWeeksBetweenDates:function(e,t){var n=(t-e)/6048e5,i=Math.floor(n);return n-i>.99&&(i=Math.round(n)),i},_hour:function(e,t,n){var i=t._startTime,o=i.getHours();n&&(o+=n),e.setHours(o),o%=24,i.setHours(o),Z(e,o)},_date:function(e,t,n){var i=e.getHours();e.setDate(e.getDate()+n),Z(e,i)||this._hour(e,t)}}),he=ue.extend({next:function(e,t){ue.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))}}),fe=ue.extend({next:function(e,t){ue.fn.next(e,t)||this[t.hours?"_hour":"_date"](e,t,1)}}),pe=fe.extend({setup:function(e,t){e.weekDays||(e.weekDays=[{day:t.getDay(),offset:0}])}}),me=ue.extend({next:function(e,t){var n,i;if(!ue.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(n=e.getDate(),i=e.getHours(),e.setMonth(e.getMonth()+1),Z(e,i);e.getDate()!==n;)e.setDate(n),Z(e,i);this._hour(e,t)}},normalize:function(e){var t=e.rule,n=e.date,i=n.getHours();0!==e.idx||t.monthDays||t.weekDays?ue.fn.normalize(e):(n.setDate(e.day),Z(n,i))},setup:function(e,t,n){e.monthDays||e.weekDays||n.setDate(t.getDate())}}),ge=me.extend({next:function(e,t){var n,i=e.getHours();if(!ue.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(n=e.getDate(),e.setMonth(e.getMonth()+1),Z(e,i);e.getDate()!==n;)e.setDate(n),Z(e,i);this._hour(e,t)}else e.setFullYear(e.getFullYear()+1),Z(e,i),this._hour(e,t)},setup:function(){}}),ve={hourly:new he,daily:new fe,weekly:new pe,monthly:new me,yearly:new ge},_e="click";W.recurrence={rule:{parse:A,serialize:M},expand:S,dayInYear:i,weekInYear:o,weekInMonth:r,numberOfWeeks:l,isException:b,toExceptionString:w},R=function(e){for(var t=W.culture().calendar.days.namesShort,n=t.length,i="",o=0,r=[];o<n;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<n;o++)i+='<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="'+r[o]+'" /> '+t[o]+"</label>";return i},I=W.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-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" />#:messages.day#</label><input class="k-recur-monthday" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" /><input class="k-recur-weekday-offset" /><input class="k-recur-weekday" /></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" /><input class="k-recur-month" /><input class="k-recur-monthday" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" /><input class="k-recur-weekday-offset" /><input class="k-recur-weekday" />#:messages.of#<input class="k-recur-month" /></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" />#: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" /></li></ul></div># } #'),F=[{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}],z=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],P=[{day:0,offset:0},{day:6,offset:0}],B=$.extend({init:function(e,t){var n,i=this,o=t&&t.frequencies;$.fn.init.call(i,e,t),i.wrapper=i.element,t=i.options,t.start=n=t.start||K.today(),o&&(t.frequencies=o),"string"==typeof n&&(t.start=W.parseDate(n,"yyyyMMddTHHmmss")),null===t.firstWeekDay&&(t.firstWeekDay=W.culture().calendar.firstDay),i._namespace="."+t.name},options:{value:"",start:"",timezone:"",spinners:!0,firstWeekDay:null,frequencies:["never","daily","weekly","monthly","yearly"],mobile:!1,messages:{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,n=(t._weekDay.element||t._weekDay).val(),i=+(t._weekDayOffset.element||t._weekDayOffset).val(),o=null,r=null;e||("day"===n?(o=F,r=i):"weekday"===n?(o=z,r=i):"weekend"===n?(o=P,r=i):o=[{offset:i,day:+n}]),t._value.weekDays=o,t._value.positions=r},_weekDayView:function(){var e,t,n,i,o=this,r=o._value.weekDays,s=o._value.positions,a=o._weekDayOffset;r&&(n=r.length,s&&(7===n?(t="day",e=s):5===n?(t="weekday",e=s):2===n&&(t="weekend",e=s)),t||(r=r[0],t=r.day,e=r.offset||""),i=a.value?"value":"val",a[i](e),o._weekDay[i](t))},_initWeekDay:function(){var t,n=this,i=n.options.messages.weekdays,o=n.options.messages.offsetPositions,r=n._container.find(".k-recur-weekday"),s=function(){n._weekDayRule(),n._trigger()};r[0]&&(n._weekDayOffset=new Y(n._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:i.day,value:"day"},{text:i.weekday,value:"weekday"},{text:i.weekend,value:"weekend"}],n._weekDay=new Y(r,{value:n.options.start.getDay(),change:s,dataTextField:"text",dataValueField:"value",dataSource:t.concat(e.map(W.culture().calendar.days.names,function(e,t){return{text:e,value:t}}))}),n._weekDayView())},_initWeekDays:function(){var t,n,i,o,r,s=this,a=s._value,l=s._container.find(".k-recur-weekday-checkbox");if(l[0]&&(l.on(_e+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(i=0,o=l.length,r=a.weekDays.length;i<o;i++)for(n=l[i],t=0;t<r;t++)n.value==a.weekDays[t].day&&(n.checked=!0)},_initMonthDay:function(){var e=this,t=e._value,n=e._container.find(".k-recur-monthday");n[0]&&(e._monthDay=new W.ui.NumericTextBox(n,{spinners:e.options.spinners,min:1,max:31,decimals:0,format:"#",value:t.monthDays?t.monthDays[0]:e.options.start.getDate(),change:function(){var n=this.value();t.monthDays=n?[n]:n,e._trigger()}}))},_initCount:function(){var e=this,t=e._container.find(".k-recur-count"),n=e._value;e._count=t.kendoNumericTextBox({spinners:e.options.spinners,value:n.count||1,decimals:0,format:"#",min:1,change:function(){n.count=this.value(),e._trigger()}}).data("kendoNumericTextBox")},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),n=e.options.start,i=e._value,o=i.until;e._until=t.kendoDatePicker({min:o&&o<n?o:n,value:o||new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59),change:function(){var t=this.value();i.until=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59),e._trigger()}}).data("kendoDatePicker")},_trigger:function(){this.options.mobile||this.trigger("change")}}),L=B.extend({init:function(e,t){var n=this;B.fn.init.call(n,e,t),n._initFrequency(),n._initContainer(),n.value(n.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(_e+e._namespace),W.destroy(e._container),B.fn.destroy.call(e)},value:function(e){var n,i=this,o=i.options.timezone;return e===t?i._value.freq?M(i._value,o):"":(i._value=A(e,o)||{},n=i._value.freq,n?i._frequency.value(n):i._frequency.select(0),i._initView(i._frequency.value()),t)},_initContainer:function(){var t=this.element,n=e('<div class="k-recur-view" />'),i=t.parent(".k-edit-field");i[0]?n.insertAfter(i):t.append(n),this._container=n},_initFrequency:function(){var t,n=this,i=n.options,o=i.frequencies,r=i.messages.frequencies,s=e("<input />");o=e.map(o,function(e){return{text:r[e],value:e}}),t=o[0],t&&"never"===t.value&&(t.value=""),n.element.append(s),n._frequency=new Y(s,{dataTextField:"text",dataValueField:"value",dataSource:o,change:function(){n._value={},n._initView(n._frequency.value()),n.trigger("change")}})},_initView:function(e){var n=this,i=n._value,o=n.options,r={frequency:e||"never",weekDayCheckBoxes:R,firstWeekDay:o.firstWeekDay,messages:o.messages[e],end:o.messages.end};return W.destroy(n._container),n._container.html(I(r)),e?(i.freq=e,"weekly"!==e||i.weekDays||(i.weekDays=[{day:o.start.getDay(),offset:0}]),n._initInterval(),n._initWeekDays(),n._initMonthDay(),n._initWeekDay(),n._initMonth(),n._initCount(),n._initUntil(),n._period(),n._end(),t):(n._value={},t)},_initMonth:function(){var t,n=this,i=n._value,o=i.months||[n.options.start.getMonth()+1],r=n._container.find(".k-recur-month");r[0]&&(t={change:function(){i.months=[+this.value()],n.trigger("change")},dataTextField:"text",dataValueField:"value",dataSource:e.map(W.culture().calendar.months.names,function(e,t){return{text:e,value:t+1}})},n._month1=new Y(r[0],t),n._month2=new Y(r[1],t),o&&(o=o[0],n._month1.value(o),n._month2.value(o)))},_end:function(){var e,t=this,n=t._value,i=t._container,o=t._namespace,r=function(e){t._toggleEnd(e.currentTarget.value),t.trigger("change")};t._buttonNever=i.find(".k-recur-end-never").on(_e+o,r),t._buttonCount=i.find(".k-recur-end-count").on(_e+o,r),t._buttonUntil=i.find(".k-recur-end-until").on(_e+o,r),n.count?e="count":n.until&&(e="until"),t._toggleEnd(e)},_period:function(){var e=this,t=e._value,n="monthly"===t.freq,i=n?e._toggleMonthDay:e._toggleYear,o=".k-recur-"+(n?"month":"year")+"-radio",r=e._container.find(o);(n||"yearly"===t.freq)&&(r.on(_e+e._namespace,function(t){i.call(e,t.currentTarget.value),e.trigger("change")}),e._buttonMonthDay=r.eq(0),e._buttonWeekDay=r.eq(1),i.call(e,t.weekDays?"weekday":"monthday"))},_toggleEnd:function(e){var t,n,i,o,r=this;"count"===e?(r._buttonCount.prop("checked",!0),i=!0,o=!1,t=r._count.value(),n=null):"until"===e?(r._buttonUntil.prop("checked",!0),i=!1,o=!0,t=null,n=r._until.value()):(r._buttonNever.prop("checked",!0),i=o=!1,t=n=null),r._count.enable(i),r._until.enable(o),r._value.count=t,r._value.until=n},_toggleMonthDay:function(e){var t,n=this,i=!1,o=!0,r=!1;"monthday"===e?(n._buttonMonthDay.prop("checked",!0),t=[n._monthDay.value()],i=!0,o=!1,r=!0):(n._buttonWeekDay.prop("checked",!0),t=null),n._weekDay.enable(o),n._weekDayOffset.enable(o),n._monthDay.enable(i),n._value.monthDays=t,n._weekDayRule(r)},_toggleYear:function(e){var t,n=this,i=!1,o=!0;"monthday"===e?(i=!0,o=!1,t=n._month1.value()):t=n._month2.value(),n._month1.enable(i),n._month2.enable(o),n._value.months=[t],n._toggleMonthDay(e)}}),G.plugin(L),H=W.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>'),N=W.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" 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"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday"></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" 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"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday"></select></div></div><div class="k-edit-label"><label>#:messages.month#</label></div><div class="k-edit-field"><select class="k-recur-month"></select></div># } #'),O=W.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># } #'),V=W.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>'),U=B.extend({init:function(e,t){var n=this;B.fn.init.call(n,e,t),t=n.options,n._optionTemplate=W.template('<option value="#:value#">#:text#</option>'),n.value(t.value),n._pane=t.pane,n._initRepeatButton(),n._initRepeatEnd(),n._defaultValue=n._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 n=this,i=n.options.timezone;return e===t?n._value.freq?M(n._value,i):"":(n._value=A(e,i)||{},t)},destroy:function(){this._destroyView(),W.destroy(this._endFields),this._repeatButton.off(_e+this._namespace),B.fn.destroy.call(this)},_initRepeatButton:function(){var t=this,n=t.options.messages.frequencies[this._value.freq||"never"];t._repeatButton=e('<a href="#" class="k-button k-scheduler-recur">'+n+"</a>").on(_e+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,n=e('<div class="k-edit-label"><label>'+t.options.messages.end.mobileLabel+"</label></div>").insertAfter(t.element.parent(".k-edit-field")),i=e('<div class="k-edit-field"><a href="#" class="k-button k-scheduler-recur-end"></a></div>').on(_e+t._namespace,function(e){e.preventDefault(),t._value.freq&&(t._createView("end"),t._pane.navigate("recurrence",t.options.animations.left))}).insertAfter(n);t._endFields=n.add(i).toggleClass("k-state-disabled",!t._value.freq),t._endButton=i.find(".k-scheduler-recur-end").text(t._endText())},_endText:function(){var e=this._value,t=this.options.messages.end,n=t.never;return e.count?n=W.format("{0} {1}",t.after,e.count):e.until&&(n=W.format("{0} {1:d}",t.on,e.until)),n},_initFrequency:function(){var t=this,n=t.options.messages.frequencies,i=V({dataSource:e.map(this.options.frequencies,function(e){return{text:n[e],value:"never"!==e?e:""}}),value:t._value.freq||"",ns:W.ns});t._view.element.find(".k-recur-pattern").append(i).on(_e+t._namespace,".k-scheduler-navigation li",function(n){var i=e(this);n.preventDefault(),i.addClass("k-state-selected").siblings().removeClass("k-state-selected"),t._value={freq:i.children("a").attr(W.attr("value"))},t._initRepeatView()})},_initEndNavigation:function(){var t,n=this,i=n.options.messages.end.patterns,o=n._value,r="";o.count?r="count":o.until&&(r="until"),t=V({dataSource:[{text:i.never,value:""},{text:i.after,value:"count"},{text:i.on,value:"until"}],value:r,ns:W.ns}),n._view.element.find(".k-recur-pattern").append(t).on(_e+n._namespace,".k-scheduler-navigation li",function(t){var i=e(this),r=null,s=null;t.preventDefault(),i.addClass("k-state-selected").siblings().removeClass("k-state-selected"),n._initEndView(i.children("a").attr(W.attr("value"))),n._count?(r=n._count.value(),s=null):n._until&&(r=null,s=n._until.val?W.parseDate(n._until.val(),"yyyy-MM-dd"):n._until.value()),o.count=r,o.until=s})},_createView:function(t){var n=this,i=n.options,o=i.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=n._pane.view().id;n._view=n._pane.append(s+H({headerTitle:r})),n._view.element.on(_e+n._namespace,"a.k-scheduler-cancel, a.k-scheduler-update",function(t){t.preventDefault(),t.stopPropagation(),e(this).hasClass("k-scheduler-update")?(n.trigger("change"),n._defaultValue=e.extend({},n._value)):n._value=n._defaultValue;var i=n._value.freq;n._endButton.text(n._endText()),n._endFields.toggleClass("k-state-disabled",!i),n._repeatButton.text(o.frequencies[i||"never"]),n._pane.one("viewShow",function(){n._destroyView()}),n._pane.navigate(a,n.options.animations.right)}),n._container=n._view.element.find(".k-recur-view"),"repeat"===t?(n._initFrequency(),n._initRepeatView()):(n._initEndNavigation(),n._initEndView())},_destroyView:function(){this._view&&(this._view.destroy(),this._view.element.remove()),this._view=null},_initRepeatView:function(){var e=this,n=e._value.freq||"never",i={frequency:n,weekDayCheckBoxes:R,firstWeekDay:e.options.firstWeekDay,messages:e.options.messages[n]},o=N(i),r=e._container,s=e._value;return W.destroy(r),r.html(o),o?("weekly"!==n||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 n,i=this,o=i._value;e===t&&(o.count?e="count":o.until&&(e="until")),n={endPattern:e,messages:i.options.messages.end},W.destroy(i._container),i._container.html(O(n)),i._initCount(),i._initUntil()},_initWeekDay:function(){var t,n=this,i=n.options.messages.weekdays,o=n.options.messages.offsetPositions,r=n._container.find(".k-recur-weekday"),s=function(){n._weekDayRule(),n.trigger("change")};r[0]&&(n._weekDayOffset=n._container.find(".k-recur-weekday-offset").html(n._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:i.day,value:"day"},{text:i.weekday,value:"weekday"},{text:i.weekend,value:"weekend"}],t=t.concat(e.map(W.culture().calendar.days.names,function(e,t){return{text:e,value:t}})),n._weekDay=r.html(n._options(t)).change(s).val(n.options.start.getDay()),n._weekDayView())},_initMonth:function(){var t,n=this,i=n._value,o=n.options.start,r=i.months||[o.getMonth()+1],s=n._container.find(".k-recur-month"),a=W.culture().calendar.months.names;s[0]&&(t=e.map(a,function(e,t){return{text:e,value:t+1}}),s.html(n._options(t)).change(function(){i.months=[+this.value]}),n._monthSelect=s,r&&s.val(r[0]))},_period:function(){var t,n,i,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",n=V({value:t,dataSource:[{text:a.dayOfMonth,value:"monthday"},{text:a.dayOfWeek,value:"weekday"}],ns:W.ns}),i=function(e){var t=o._weekDay.val(),n=o._weekDayOffset.val(),i=o._monthDay.value(),s=o._monthSelect?o._monthSelect.val():null;"monthday"===e?(r.weekDays=null,r.monthDays=i?[i]:i,r.months=s?[+s]:s,c.hide(),d.show()):(r.monthDays=null,r.months=s?[+s]:s,r.weekDays=[{offset:+n,day:+t}],c.show(),d.hide())},l.append(n).on(_e+o._namespace,".k-scheduler-navigation li",function(t){var n,o=e(this).addClass("k-state-selected");t.preventDefault(),o.siblings().removeClass("k-state-selected"),n=o.children("a").attr(W.attr("value")),i(n)}),i(t))},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),n=e.options.start,i=e._value,o=i.until,r=o&&o<n?o:n;e._until=W.support.input.date?t.attr("min",W.toString(r,"yyyy-MM-dd")).val(W.toString(o||n,"yyyy-MM-dd")).on("change",function(){i.until=W.parseDate(this.value,"yyyy-MM-dd")}):t.kendoDatePicker({min:r,value:o||n,change:function(){i.until=this.value()}}).data("kendoDatePicker")},_options:function(e,t){var n=0,i="",o=e.length,r=this._optionTemplate;for(t&&(i+=r({value:"",text:t}));n<o;n++)i+=r(e[n]);return i}}),G.plugin(U)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.timelineview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e,t){function n(e){var t=new Date(1980,1,1,0,0,0);return d(t,v(e)),t}function i(e){var t=[],n=e.workWeekStart;for(t.push(n);e.workWeekEnd!=n;)n>6?n-=7:n++,t.push(n);return t}function o(e){var t,n=0;if(e.columns){for(t=0;t<e.columns.length;t++)n+=o(e.columns[t]);return e.colspan=n,n}return e.colspan=1,1}function r(e,t,n){var i,o,r,a;for(i=e.length-1;i>=0;i--)o=e[i].rectLeft,a=e[i].rectRight,r=o<=t&&a>=t,(r||o>=t&&a<=n||t<=o&&n>=o)&&(o<t&&(t=o),a>n&&(n=a));return s(e,t,n)}function s(e,t,n){var i,o,r=[];for(i=0;i<e.length;i++)o={rectLeft:e[i].rectLeft,rectRight:e[i].rectRight},(o.rectLeft<t&&o.rectRight>t||o.rectLeft>=t&&o.rectRight<=n)&&r.push(e[i]);return r}var a,l=window.kendo,c=l.ui,d=l.date.setTime,u=c.SchedulerView,h=l._outerWidth,f=l._outerHeight,p=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-warning"></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"><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,n){var i=this._view.groups[n];return i.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,n){var i=this._view;return i._createRowsLayout(e,t,n)},_createVerticalColumnsLayout:function(e,t,n,i){return i},_createColumnsLayout:function(e,t,n){var i=this._view;return i._createColumnsLayout(e,t,n)},_getRowCount:function(){var e=this._view;return e._groupCount()},_getGroupsCount:function(){return 1},_addContent:function(e,t,n,i,o,r,s,a){var c,d,u,h,f=this._view,p="",m=f.options,g=function(t){var n,i="",o="",r=function(e){return function(){return f._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)||!f._isWorkDay(e[u]))&&(o+=" k-nonwork-hour"),i+="<td"+(""!==o?' class="'+o+'"':"")+">",n=l.date.getDate(e[u]),l.date.setTime(n,l.date.getMilliseconds(t)),i+=s({date:n,resources:r(a?c:d)}),i+="</td>"};for(c=0;c<i;c++){for(p+="<tr>",d=0;d<n;d++)for(u=0,h=t;u<h;u++)p+=f._forTimeRange(o,r,g);p+="</tr>"}return p},_addTimeSlotsCollections:function(e,t,n,i,o){var r,s,a,l,c,d,u,h,f,p,m,g,_=this._view,b=n.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=n[c].children,h=u.length/(o?1:e),f=h/t,p=0;p<t;p++)for(m=p*f+h*d,l=v(new Date((+_.startTime()))),g=0;g<f;g++)_._addTimeSlotToCollection(a,u,g,m,p,l,i),l+=i},_getVerticalGroupCount:function(e){return e},_getVerticalRowCount:function(e,t,n){var i=this._view;return i._isVerticallyGrouped()?e[t].maxRowCount:n},_renderEvent:function(e,t,n,i,o,r){var s,a=this._view,l=a._createEventElement(n.occurrence,t,o.head||n.head,o.tail||n.tail);l.appendTo(r).css({top:0,height:a.options.eventHeight}),s={start:n.occurrence._startTime||n.occurrence.start,end:n.occurrence._endTime||n.occurrence.end,element:l,uid:t.uid,slotRange:o,rowIndex:0,offsetTop:0},e.events[t.uid]=s,a.addContinuousEvent(i,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,n){var i=this._view,o="<div class='"+w+"'></div>",r=i.datesHeader.find("."+k),s=Math.round(t[0].innerRect(n,new Date(n.getTime()+1),!1).left),a=e(o).prependTo(r).addClass(y+"-down");a.css({left:i._adjustLeftPosition(s-h(a)*x/2),top:r.find("tr:last").prev().position().top}),e(o).prependTo(i.content).css({left:i._adjustLeftPosition(s),width:"1px",height:i.content[0].scrollHeight-1,top:0})},_changeGroup:function(){return t},_prevGroupSlot:function(e,t,n){var i,o=this._view;return o._isVerticallyGrouped()?e:(i=t._collection(0,n),i.last())},_nextGroupSlot:function(e,t,n){var i,o=this._view;return o._isVerticallyGrouped()?e:(i=t._collection(0,n),i.first())},_verticalSlots:function(e,t){var n=this._view;return n._changeGroup(e,t)},_verticalMethod:function(e){return e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(){return t},_horizontalSlots:function(e,t,n,i,o,r,s){var a=this._view,l={};return l.startSlot=t[n](i),l.endSlot=t[n](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,n,i){var o=this._view;return!(e.startSlot&&e.endSlot||t||!o._changeViewPeriod(n,i,!1))},_updateDirection:function(e,t,n,i){var o=this._view;o._updateDirection(e,t,n,i,!0)},_createMoveHint:function(e,t){var n,i,o,r,s=this._view,a=e.start,l=s._createEventElement(t.occurrence,t.occurrence,!1,!1);l.addClass("k-event-drag-hint"),n=e.innerRect(t.occurrence.start,t.occurrence.end,s.options.snap),i=n.right-n.left-2,i<0&&(i=0),o=s._adjustLeftPosition(n.left),r={left:o,top:a.offsetTop,height:a.offsetHeight-2,width:i},l.css(r),s._moveHint=s._moveHint.add(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,n){var i=this._view.groups[n];return i.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,n,i){var o=this._view;return o._createDateLayout(i,null,!0)},_createVerticalColumnsLayout:function(e,t,n){var i=this._view;return i._createColumnsLayout(e,null,n)},_createColumnsLayout:function(e,t,n,i){var o=this._view;return o._createColumnsLayout(e,t,n,i,!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,n,i,o,r,s,a){var c,u,h,f,p=this._view,m="",g=p.options,v=function(t,n,i,o,r,a){var d,u="",f="",m=p._isVerticallyGrouped()?c:h,v=function(e){return function(){return p._resourceBySlot({groupIndex:e})}};return l.date.isToday(e[h])&&(f+="k-today"),(l.date.getMilliseconds(t)<l.date.getMilliseconds(g.workDayStart)||l.date.getMilliseconds(t)>=l.date.getMilliseconds(g.workDayEnd)||!p._isWorkDay(e[m]))&&(f+=" k-nonwork-hour"),u+="<td"+(""!==f?' class="'+f+'"':"")+">",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=p.options.minorTickCount,y=p.options.majorTick*b,k=y/w||1;for(u=0;u<i;u++){for(m+="<tr>",u%(i/p._dates.length)===0&&(c=u/(i/p._dates.length),_=new Date(p._dates[c]),l.date.setTime(_,l.date.getMilliseconds(o))),h=0,f=t;h<f;h++)if(m+=p._forTimeRange(_,r,v,a,n),a){d(_,k,!1);break}m+="</tr>"}return m},_addTimeSlotsCollections:function(e,t,n,i,o){var r,s,a,l,c,d,u,h,f,p,m,g,_=this._view,b=n.length;for(o&&(b/=t),r=0;r<t;r++)for(s=0,o&&(s=r),l=s*b,c=0,d=n[l].children,u=o?b:d.length/(t*e),h=d.length/t,a=v(new Date((+_.startTime()))),p=0;p<u;p++){for(o?(f=0,d=n[p+u*r].children):(f=r*h+e*p,c++),m=0;m<e;m++)g=_.groups[m],_._addTimeSlotToCollection(g,d,m,f,r,a,i);a+=i}},_getVerticalGroupCount:function(){var e=this._view;return e.content.find("tr").length},_getVerticalRowCount:function(e,t,n){return n},_renderEvent:function(e,t,n,i,o,r,s,a){var l,c,d,u,h,f=this._view,p=[];for(c=o.start.index;c<=o.end.index;c++)l=f._createEventElement(n.occurrence,t,c!==a,c!==s),l.appendTo(r).css({top:0,height:f.options.eventHeight}),d=i._timeSlotCollections[0]._slots[c],u=i.timeSlotRanges(d.start,d.end,!1)[0],h={start:c===s?n.occurrence._startTime||n.occurrence.start:d.start,end:c===a?n.occurrence._endTime||n.occurrence.end:d.end,element:l,uid:t.uid,slotRange:u,rowIndex:0,offsetTop:0},e.events[t.uid]=h,p.push(h),f.addContinuousEvent(i,u,l,t.isAllDay),f._arrangeRows(h,u,e);e.events[t.uid]=p},_verticalCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_horizontalCountForLevel:function(e,t){var n=this._view;return n._columnCountForLevel(t)/n._columnCountForLevel(2)},_updateCurrentVerticalTimeMarker:function(t,n){var i=this._view,o=i.times.find("tr:first th:first"),r=i.times.find("tr:first th:last"),s="<div class='"+w+"'></div>",a=e(s).prependTo(i.times),l=Math.round(t[0].innerRect(n,new Date(n.getTime()+1),!1).top),c={};this._isRtl?(c.right=o.position().left+f(o)-f(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(i.content).css({top:l,height:"1px",right:"1px",width:i.content[0].scrollWidth,left:0})},_changeGroup:function(e,t,n){var i=this._view;n||(e.groupIndex=t?i.groups.length-1:0)},_prevGroupSlot:function(e){return e},_nextGroupSlot:function(e){return e},_changeDate:function(e,t,n){var i,o,r=this._view,s=r.groups[e.groupIndex];if(t){if(i=s._getCollections(!1),o=n.index-1,o>=0)return i[0]._slots[o]}else if(i=s._getCollections(!1),o=n.index+1,i[0]&&i[0]._slots[o])return i[0]._slots[o]},_verticalSlots:function(e,t,n){return this._changeDate(e,t,n)},_verticalMethod:function(e,t){return t?e?"upSlot":"downSlot":e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(e,n,i,o){var r=this._view;return o?t:r._normalizeVerticalSelection(e,n,i)},_horizontalSlots:function(e,t,n,i,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[n](i),c.endSlot=t[n](o)),c},_changeVerticalViewPeriod:function(e,t,n,i){var o=this._view;return!(e.startSlot&&e.endSlot||t||!o._changeViewPeriod(n,i,o._isVerticallyGrouped()))},_changeHorizontalViewPeriod:function(e,t,n,i){var o=this._view;return!o._isVerticallyGrouped()&&!(e.startSlot&&e.endSlot||t||!o._changeViewPeriod(n,i,!1))},_updateDirection:function(e,t,n,i){var o=this._view;o._updateDirection(e,t,n,i,!o._isVerticallyGrouped())},_createMoveHint:function(e,t){var n,i,o,r,s=this._view,a=e.start,l=e.end;for(n=a.index;n<=l.index;n++)i=e.collection._slots[n],o=s._createEventElement(t.occurrence,t.occurrence,!1,!1),o.addClass("k-event-drag-hint"),r={left:i.offsetLeft+2,top:i.offsetTop,height:s.options.eventHeight,width:i.offsetWidth},o.css(r),s._moveHint=s._moveHint.add(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 n=this;u.fn.init.call(n,e,t),n._groupedView=n._getGroupedView(),n.title=n.options.title||n.options.name,n._workDays=i(n.options),n._templates(),n._editable(),n.calculateDateRange(),n._groups(),n._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,n){var i,o;if(this._isVerticallyGrouped())return l.ui.SchedulerView.fn._getNextEventIndexBySlot.call(this,e,t,n);for(i=0,o=0;o<t.length;o++)if(e.startDate()>t[o].start.startDate())i++;else{if(!(e.startDate().getTime()===t[o].start.startDate().getTime()&&n>t[o].start.groupIndex))break;i++}return i},_getSelectedSlot:function(e,t,n,i,o,r){return this._isVerticallyGrouped()?l.ui.SchedulerView.fn._getSelectedSlot.call(this,e,t,n,i,o,r):e},_getSortedEvents:function(t){return this._isVerticallyGrouped()?l.ui.SchedulerView.fn._getSortedEvents.call(this,t):t.sort(function(t,n){var i=t.start.startDate().getTime()-n.start.startDate().getTime();return 0===i&&(t.start.isDaySlot&&!n.start.isDaySlot&&(i=-1),!t.start.isDaySlot&&n.start.isDaySlot&&(i=1)),0===i&&(i=t.start.groupIndex-n.start.groupIndex),0===i&&(i=e(t.element).index()-e(n.element).index()),i})},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var n,i,o,r,s,a,c,d,u,f,p,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&&(n=v.dataSource.options.schema.timezone,v.dataSource&&n&&(i=l.timezone.offset(t,n),t=l.timezone.convert(t,t.getTimezoneOffset(),i))),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):(f="<div class='"+w+"'></div>",p=this.datesHeader.find("."+k),m=Math.round(c[0].innerRect(t,new Date(t.getTime()+1),!1).left),g=e(f).prependTo(p).addClass(y+"-down"),g.css({left:this._adjustLeftPosition(m-h(g)*x/2),top:p.find("tr:last").prev().position().top}),e(f).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 n=this,i=n.options.currentTimeMarker;i!==!1&&i.updateInterval!==t&&(n._currentTimeMarkerUpdater(),e&&(n._currentTimeUpdateTimer=setInterval(m(this._currentTimeMarkerUpdater,n),i.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(n){t.trigger("remove",{uid:e(this).closest(".k-event").attr(l.attr("uid"))}),n.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+C,".k-scheduler-content td",function(e){var n,i=t._slotByPosition(e.pageX,e.pageY);i&&(n=t._resourceBySlot(i),t.trigger("add",{eventInfo:p({start:i.startDate(),end:i.endDate()},n)})),e.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+C,".k-event",function(n){t.trigger("edit",{uid:e(this).closest(".k-event").attr(l.attr("uid"))}),n.preventDefault()})},_touchEditable:function(){var n=this,i=0;l.support.mobileOS.android&&(i=5),n.options.editable.create!==!1&&(n._addUserEvents=new l.UserEvents(n.element,{threshold:i,filter:".k-scheduler-content td",tap:function(e){var i,o=e.x.location!==t?e.x.location:e.x,r=e.y.location!==t?e.y.location:e.y,s=n._slotByPosition(o,r);s&&(i=n._resourceBySlot(s),n.trigger("add",{eventInfo:p({start:s.startDate(),end:s.endDate()},i)})),e.preventDefault()}})),n.options.editable.update!==!1&&(n._editUserEvents=new l.UserEvents(n.element,{threshold:i,filter:".k-event",tap:function(t){var i=e(t.target).closest(".k-event");i.hasClass("k-event-active")||n.trigger("edit",{uid:i.attr(l.attr("uid"))}),t.preventDefault()}}))},_slotByPosition:function(e,t){var n,i,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),i=0;i<this.groups.length;i++)if(n=this._groupedView._getTimeSlotByPosition(e,t,i))return n;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=p({},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 n=this;t=t||[],n._dates=t,n._startDate=t[0],n._endDate=t[t.length-1||0],n._calculateSlotRanges(),n.createLayout(n._layout(t)),n._content(t),n._footer(),n._setContentWidth(),n.refreshLayout(),n.datesHeader.on("click"+C,".k-nav-day",function(t){var i=e(t.currentTarget).closest("th"),o=n._slotByPosition(i.offset().left,n.content.offset().top);n.trigger("navigate",{view:"timeline",date:o.startDate()})}),n._groupedView._hideHeaders()},_setContentWidth:function(){var e=this.content,t=e.width(),n=this.content.find("table"),i=n.find("tr:first").children().length,o=100,r=i*this.options.columnWidth;t<r&&(o=Math.ceil(r/t*100)),n.add(this.datesHeader.find("table")).css("width",o+"%")},_calculateSlotRanges:function(){var e,t,n,i,o=this._dates,r=this.startTime(),s=this.endTime();for(v(s)===v(l.date.getDate(s))&&(s=l.date.getDate(s),d(s,_-1)),s=v(s),r=v(r),e=[],t=0;t<o.length;t++)n=g(o[t]),d(n,r),i=g(o[t]),d(i,s),e.push({start:l.date.toUtcTime(n),end:l.date.toUtcTime(i)});this._slotRanges=e},_forTimeRange:function(e,t,i,o,r){var s,a,l,c,u,h,f,p,m,g,w,y,k,x,C,S,T,D;for(e=n(e),t=n(t),s=this,a=v(e),l=v(t),c=s.options.minorTickCount,u=s.options.majorTick*b,h=u/c||1,f=new Date((+e)),p=f.getDate(),g=0,y="",w=_/h,a!=l&&(a>l&&(l+=_),w=(l-a)/h),w=o?1:Math.round(w),r&&(w*=r);g<w;g++)k=g%(u/h),x=0===k,C=k<c-1,S=k===c-1,T=c,w%c!==0&&(D=w-(g+1)<c,x&&D&&(T=w%c)),y+=i(f,x,C,S,T,g%r),o||(r?g%r===r-1&&d(f,h,!1):d(f,h,!1));return l&&(m=v(f),p<f.getDate()&&(m+=_),m>l&&(f=new Date((+t)))),y},_layout:function(e){var t,n,i,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:"",className:"k-last",minorTicks:!0});for(this._forTimeRange(s.startTime(),s.endTime(),function(e,t,n,i,r){var a,d=s.majorTimeHeaderTemplate;t&&(a={text:d({date:e}),className:i?"k-slot-cell":"",columns:c.slice(0,r)},l._setColspan(a),o.push(a))}),n=0;n<e.length;n++)r.push({text:s.dateHeaderTemplate({date:e[n]}),className:"k-slot-cell",columns:o.slice(0)});return i=this.groupedResources,i.length&&("vertical"===this._groupOrientation()?(a=l._createRowsLayout(i,null,this.groupHeaderTemplate,r),r=l._createVerticalColumnsLayout(i,null,this.groupHeaderTemplate,r)):r=l._createColumnsLayout(i,r,this.groupHeaderTemplate,r)),{columns:r,rows:a}},_footer:function(){var t,n,i,o=this.options;o.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',n=o.footer.command,n&&"workDay"===n?(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),i=this,this.footer.on("click"+C,".k-scheduler-fullday",function(e){e.preventDefault(),i.trigger("navigate",{view:i.name||o.name,date:i.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,n=e.getDay(),i=this._workDays;for(t=0;t<i.length;t++)if(i[t]===n)return!0;return!1},_content:function(e){var t=this,n=t.startTime(),i=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,n,i,c,d),a+="</tbody>",this.content.find("table").append(a)},_groups:function(){var e,t,n,i,o=this._groupCount(),r=this._dates,s=r.length;for(this.groups=[],e=0;e<o;e++)t=this._addResourceView(e),n=r[0],i=r[r.length-1||0],t.addTimeSlotCollection(n,l.date.addDays(i,1));this._timeSlotGroups(o,s)},_isHorizontallyGrouped:function(){return this.groupedResources.length&&"horizontal"===this._groupOrientation()},_timeSlotGroups:function(e,t){var n=this._timeSlotInterval(),i=this._isVerticallyGrouped(),o=this.content.find("tr");o.attr("role","row"),this._groupedView._addTimeSlotsCollections(e,t,o,n,i)},_addTimeSlotToCollection:function(e,t,n,i,o,r,s){var a=t[n+i],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},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,n,i,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),n=[],i=0,o=0;o<t.length;o++)r={groupIndex:o,maxRowCount:0,events:{}},n.push(r),this._renderEvents(t[o],o,r),i<r.maxRowCount&&(i=r.maxRowCount);this._setRowsHeight(n,t.length,i),this._positionEvents(n,t.length),this._currentTime(!1),this.trigger("activate")},_positionEvents:function(t,n){var i,o,r,s,a;for(i=0;i<n;i++){o=t[i].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,n,i){var o,r,s,a,l,c=this.options.eventHeight+2,d=this._getBottomRowOffset(),u=this._groupedView,h=u._getVerticalGroupCount(n);for(n=this._isVerticallyGrouped()?h:1,o=0;o<n;o++)r=u._getVerticalRowCount(t,o,i),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,n=.5*this.options.eventHeight,i=this._isMobile();return i?(e=30,t=60):(e=15,t=30),n>t?n=t:n<e&&(n=e),n},_positionEvent:function(e){var t,n,i,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,n=t._slots[t._slots.length-1],i=n.offsetLeft+n.offsetWidth,a=this.options.eventMinWidth,i<s+a&&(a=i-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,n){var i,o,r,s,a=t[0];if(a)for(i=a.dataSource.view(),o=0;o<i.length;o++)r=this._resourceValue(a,i[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),n):n.push(s);else n.push(e)},_isInDateSlot:function(e){var t=e.start,n=e.end,i=g(this._startDate),o=l.date.addDays(g(this._endDate),1);return t<o&&i<=n},_isInTimeSlot:function(e){var t,n=e._startTime||l.date.toUtcTime(e.start),i=e._endTime||l.date.toUtcTime(e.end),o=this._slotRanges;for(n===i&&(i+=1),t=0;t<o.length;t++)if(n<o[t].end&&o[t].start<i)return!0;return!1},_adjustEvent:function(e){var t,n=e.start,i=e.end,o=e._time("start"),r=e._time("end"),s=v(this.startTime()),a=v(this.endTime()),c=null,u=null,h=!1,f=!1;return e.isAllDay?(c=g(n),s>o&&(d(c,s),f=!0),u=g(i),a===v(g(this.endTime()))?u=l.date.addDays(u,1):(d(u,a),h=!0)):(a=0===a?_:a,s>o?(c=g(n),d(c,s),f=!0):a<o&&(c=g(n),c=l.date.addDays(c,1),d(c,s),f=!0),a<r?(u=g(i),d(u,a),h=!0):s>r&&(u=g(i),u=l.date.addDays(u,-1),d(u,a),h=!0)),t=e.clone({start:c?c:n,end:u?u:i,_startTime:c?l.date.toUtcTime(c):e._startTime,_endTime:u?l.date.toUtcTime(u):e._endTime,isAllDay:!1}),{occurrence:t,head:h,tail:f}},_renderEvents:function(e,t,n){var i,o,r,s,a,l,c,d,u,h,f;for(o=0,r=e.length;o<r;o++)i=e[o],this._isInDateSlot(i)&&(s=i.isAllDay||i.end.getTime()-i.start.getTime()>=_,a=this.content,(s||this._isInTimeSlot(i))&&(l=this._adjustEvent(i),c=this.groups[t],c._continuousEvents||(c._continuousEvents=[]),d=c.slotRanges(l.occurrence,!1),u=d[0],h=u.start.index,f=u.end.index,this._isInTimeSlot(l.occurrence)&&this._groupedView._renderEvent(n,i,l,c,u,a,h,f)))},addContinuousEvent:function(e,t,n,i){var o=e._continuousEvents;o.push({element:n,isAllDay:i,uid:n.attr(l.attr("uid")),start:t.start,end:t.end})},_createEventElement:function(t,n,i,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,f=n._time("start"),m=n._time("end"),g=n.start,v=n.end,_=this.eventResources(n);return n._startTime&&f!==l.date.getMilliseconds(n.start)&&(g=new Date(f),g=l.timezone.apply(g,"Etc/UTC")),n._endTime&&m!==l.date.getMilliseconds(n.end)&&(v=new Date(m),v=l.timezone.apply(v,"Etc/UTC")),r=p({},{ns:l.ns,resizable:h,showDelete:u,head:i,tail:o,singleDay:1==this._dates.length,resources:_,inverseColor:!(!_||!_[0])&&this._shouldInverseResourceColor(_[0])},n,{start:g,end:v}),s=e(a(r)),this.angular("compile",function(){return{elements:s,data:[{dataItem:r}]}}),s},_arrangeRows:function(e,t,n){var i,o,s,a,l,c,d=t.start.index,h=t.end.index,f=e.slotRange.innerRect(e.start,e.end,!1),p=f.right+this.options.eventMinWidth,m=r(t.events(),f.left,p);for(t.addEvent({slotIndex:d,start:d,end:h,rectLeft:f.left,rectRight:p,element:e.element,uid:e.uid}),m.push({start:d,end:h,uid:e.uid}),i=u.createRows(m),n.maxRowCount<i.length&&(n.maxRowCount=i.length),o=0,s=i.length;o<s;o++)for(a=i[o].events,l=0,c=a.length;l<c;l++)n.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,n){var i,o,r,s,a=this.groups[t],l=e.clone({start:e.start,end:e.end}),c=l.duration();for(l.start=new Date(l.start.getTime()+n),l.end=new Date(+l.start+c),i=this._adjustEvent(l),o=a.slotRanges(i.occurrence,!1),this._removeMoveHint(),r=0;r<o.length;r++)this._groupedView._createMoveHint(o[r],i);s=this.content,this._moveHint.appendTo(s)},_updateResizeHint:function(e,t,n,i){var o,r,s,a,c,d,h,f,p,m,g=this.groups[t],v=g.ranges(n,i,!1,!1);for(this._removeResizeHint(),o=0;o<v.length;o++)r=v[o],s=r.startSlot(),a=r.innerRect(n,i,!1),a.top=s.offsetTop,c=a.right-a.left,d=r.endSlot().offsetTop+s.offsetHeight-a.top,h=this._adjustLeftPosition(a.left),f=u.fn._createResizeHint.call(this,h,a.top,c,d),this._resizeHint=this._resizeHint.add(f);p="t",m=this.content,this._resizeHint.appendTo(m),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(n),p)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(l.toString(l.timezone.toLocalDate(i),p))},selectionByElement:function(e){var t=e.offset();return this._slotByPosition(t.left,t.top)},_updateDirection:function(e,t,n,i,o){var r=t[0].start,s=t[t.length-1].end;n&&!o&&r.index===s.index&&r.collectionIndex===s.collectionIndex&&(e.backward=i)},_changeGroup:function(e,t){var n=t?"prevGroupSlot":"nextGroupSlot",i=this[n](e.start,e.groupIndex,!1);return i&&(e.groupIndex+=t?-1:1),this._groupedView._changeGroup(e,t,i),i},prevGroupSlot:function(e,t,n){var i=this.groups[t],o=i.ranges(e,e,n,!1)[0].start;if(!(t<=0))return this._groupedView._prevGroupSlot(o,i,n)},nextGroupSlot:function(e,t,n){var i=this.groups[t],o=i.ranges(e,e,n,!1)[0].start;if(!(t>=this.groups.length-1))return this._groupedView._nextGroupSlot(o,i,n)},_verticalSlots:function(e,t,n,i){var o=this._groupedView,r=o._verticalMethod(i,n),s=t[0].start,a=t[t.length-1].end,l=this.groups[e.groupIndex],c=o._normalizeVerticalSelection(e,t,i,n);return c&&(s=a=c),s=l[r](s),a=l[r](a),n||!this._isVerticallyGrouped()||s&&a||(s=a=o._verticalSlots(e,i,c)),{startSlot:s,endSlot:a}},_horizontalSlots:function(e,t,n,i){var o=i?"upSlot":"downSlot",r=t[0].start,s=t[t.length-1].end,a=this.groups[e.groupIndex],l={};return n?(l.startSlot=a[o](r),l.endSlot=a[o](s),n||!this._isHorizontallyGrouped()||r&&s||(l.startSlot=l.endSlot=this._changeGroup(e,i))):l=this._groupedView._horizontalSlots(e,a,o,r,s,n,i),l},_changeViewPeriod:function(e,t){var n,i=t?this.previousDate():this.nextDate(),o=e.start,r=e.end;return e.start=new Date(i),e.end=new Date(i),this._isHorizontallyGrouped()&&(e.groupIndex=t?this.groups.length-1:0),n=r-o,t?(r=v(this.endTime()),r=0===r?_:r,d(e.start,r-n),d(e.end,r)):(o=v(this.startTime()),d(e.start,o),d(e.end,o+n)),e.events=[],!0},move:function(e,t,n){var i,o,r,s,a,c=!1,d=this.groups[e.groupIndex],u=l.keys,h=this._groupedView,f=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,f,n,r),s=this._verticalSlots(e,f,n,r),h._changeVerticalViewPeriod(s,n,e,r))return c}else if((t===u.LEFT||t===u.RIGHT)&&(c=!0,r=t===u.LEFT,this._updateDirection(e,f,n,r,!1),s=this._horizontalSlots(e,f,n,r),h._changeHorizontalViewPeriod(s,n,e,r)))return c;return c&&(i=s.startSlot,o=s.endSlot,n?(a=e.backward,a&&i?e.start=i.startDate():!a&&o&&(e.end=o.endDate())):i&&o&&(e.start=i.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())}}),p(!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,n=this.options.date,i=l.date.dayOfWeek(n,this.calendarInfo().firstDay,-1),o=[];for(e=0,t=7;e<t;e++)o.push(i),i=l.date.nextDay(i);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),n=l.date.dayOfWeek(t,this.options.workWeekEnd,1),i=[];t<=n;)i.push(t),t=l.date.nextDay(t);this._render(i)}}),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,n=this.options.date,i=l.date.firstDayOfMonth(n),o=l.date.lastDayOfMonth(n),r=[];for(e=0,t=o.getDate();e<t;e++)r.push(i),i=l.date.nextDay(i);this._render(r)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,t){return t=t||"",e.startTimezone&&(t=e.startTimezone,e.endTimezone&&(t+=" | "+e.endTimezone)),t}function i(e,t){var n=t.timezone;n&&(e[R.attr("timezone")]=n)}function o(e,t){var n,i=t.model.fields[t.field].validation;i&&(n=i.dateCompare,n&&G(n)&&n.message&&(e[R.attr("dateCompare-msg")]=n.message))}function r(e,t){return function(n){return n=e(n),a(n,"apply",t),n||[]}}function s(e,t){return function(n){return n&&("[object Array]"===K.call(n)||n instanceof R.data.ObservableArray||(n=[n])),a(n,"remove",t,!0),n=e(n),n||[]}}function a(e,t,n,i){var o,r,s;for(e=e||[],r=0,s=e.length;r<s;r++)o=e[r],i?o.startTimezone||o.endTimezone?n?(o.start=R.timezone.convert(o.start,o.startTimezone||o.endTimezone,n),o.end=R.timezone.convert(o.end,o.endTimezone||o.startTimezone,n),o.start=R.timezone[t](o.start,n),o.end=R.timezone[t](o.end,n)):(o.start=R.timezone[t](o.start,o.startTimezone||o.endTimezone),o.end=R.timezone[t](o.end,o.endTimezone||o.startTimezone)):n&&(o.start=R.timezone[t](o.start,n),o.end=R.timezone[t](o.end,n)):o.startTimezone||o.endTimezone?(o.start=R.timezone[t](o.start,o.startTimezone||o.endTimezone),o.end=R.timezone[t](o.end,o.endTimezone||o.startTimezone),n&&(o.start=R.timezone.convert(o.start,o.startTimezone||o.endTimezone,n),o.end=R.timezone.convert(o.end,o.endTimezone||o.startTimezone,n))):n&&(o.start=R.timezone[t](o.start,n),
o.end=R.timezone[t](o.end,n)),i&&delete o.uid;return e}function l(e,t){for(var n,i=e.length,o=0;o<i;o++)if(n=e[o],n.uid===t)return n}function c(e,t,n){return e=n?R.timezone.convert(e,t,n):R.timezone.remove(e,t)}function d(e){var t,n,i,o,r,s,a,l,d,u,h,f;return!(e.filter("[name=end]").length&&(t=e.closest(".k-scheduler-edit-form"),n=t.find("[name=start]:visible"),i=t.find("[name=end]:visible"),i[0]&&n[0]&&(s=R.widgetInstance(n,R.ui),a=R.widgetInstance(i,R.ui),l=t.data("kendoEditable"),d=l?l.options.model:null,s&&a?(o=s.value(),r=a.value()):(o=R.parseDate(n.val()),r=R.parseDate(i.val())),o&&r)))||(d&&(u=n.attr(R.attr("timezone")),h=d.startTimezone,f=d.endTimezone,h=h||f,f=f||h,h&&(o=c(o,h,u),r=c(r,f,u))),o<=r)}function u(e,t,n,i){for(var o=e.length,r=[],s=0;s<o;s++)r=r.concat(e[s].expand(t,n,i));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 f(t,n){var i,o,r=(t.fields||t)[n],s=["url","email","number","date","boolean"],a=r?r.validation:{},l=R.attr("type"),c=e.inArray,d={};for(i in a)o=a[i],c(i,s)>=0?d[l]=i:R.isFunction(o)||(d[i]=G(o)?o.value||i:o),d[R.attr(i+"-msg")]=o.message;return d}function p(t,n){var i=f(n,t.field);return function(n){e(R.format('<select data-{0}bind="value:{1}">',R.ns,t.field)).appendTo(n).attr(i).kendoDropDownList({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,optionLabel:"None",template:R.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function m(t){var n=f(t.model,t.field);return function(t){e('<textarea name="description" class="k-textbox"/>').attr(n).appendTo(t)}}function g(t,n){var i=f(n,t.field);return function(n){e(R.format('<select data-{0}bind="value:{1}">',R.ns,t.field)).appendTo(n).attr(i).kendoMultiSelect({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,itemTemplate:R.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField),tagTemplate:R.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function v(t,n){var i=f(n,t.field);return function(n){var o,r,s="",a=t.dataSource.view();for(o=0,r=a.length;o<r;o++)s+=R.format('<option value="{0}">{1}</option>',R.getter(t.dataValueField)(a[o]),R.getter(t.dataTextField)(a[o]));e(R.format('<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>',R.ns,t.field,s,t.valuePrimitive)).appendTo(n).attr(i)}}function _(e,t){var n,i=e.end.getTime()-e.start.getTime(),o=new Date(e.start.getTime());return R.date.setTime(o,t),n=new Date(o.getTime()),R.date.setTime(n,i,!0),{start:o,end:n}}var b,w,y,k,x,C,S,T,D,A,E,M,R=window.kendo,I=R.date,F=R.support.input,z=I.MS_PER_DAY,P=I.getDate,B=R.date.getMilliseconds,L=R.recurrence,H=R.keys,N=R.ui,O=N.Widget,V=N.DataBoundWidget,U="string",W=N.Popup,j=N.Calendar,q=R.data.DataSource,G=e.isPlainObject,$=e.extend,Y=e.proxy,K=Object.prototype.toString,Q=e.isArray,X=".kendoScheduler",Z="click",J="change",ee="cancel",te="remove",ne="save",ie="add",oe="edit",re=/(?:value:start|value:end)(?:,|$)/,se=P(new Date),ae=",",le=/\;/g,ce="recurrenceException",de="Are you sure you want to delete this event?",ue="Do you want to delete only this event occurrence or the whole series?",he="Do you want to edit only this event occurrence or the whole series?",fe="Are you sure you want to delete this event occurrence?",pe="Are you sure you want to delete the whole series?",me='<a class="k-button #=className#" #=attr# href="\\#">#=text#</a>',ge=R.template('<li class="k-current-view" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>'),ve=R.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">${messages.today}</a></li><li class="k-state-default k-header 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-header k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-right"></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>'),_e=R.template('<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-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>'),be=function(t,n){var r={name:n.field},s=F.date?"":R.attr("role")+'="datepicker" ',a=R.attr("role")+'="datetimepicker" ',l=n.model.isAllDay,c=R.attr("validate")+"='"+!l+"'",d=R.attr("validate")+"='"+l+"'";i(r,n),o(r,n),e('<input type="datetime-local" required '+R.attr("type")+'="date" '+a+R.attr("bind")+'="value:'+n.field+',invisible:isAllDay" '+c+"/>").attr(r).appendTo(t),e('<input type="date" required '+R.attr("type")+'="date" '+s+R.attr("bind")+'="value:'+n.field+',visible:isAllDay" '+d+"/>").attr(r).appendTo(t),e("<span "+R.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},we=function(t,n){var r={name:n.field},s=n.model.isAllDay,a=R.attr("validate")+"='"+!s+"' ",l=R.attr("validate")+"='"+s+"' ";i(r,n),o(r,n),e('<input type="text" required '+R.attr("type")+'="date" '+R.attr("role")+'="datetimepicker" '+R.attr("bind")+'="value:'+n.field+',invisible:isAllDay" '+a+"/>").attr(r).appendTo(t),e('<input type="text" required '+R.attr("type")+'="date" '+R.attr("role")+'="datepicker" '+R.attr("bind")+'="value:'+n.field+',visible:isAllDay" '+l+"/>").attr(r).appendTo(t),e("<span "+R.attr("bind")+'="text: '+n.field+'Timezone"></span>').appendTo(t),"end"===n.field&&e("<span "+R.attr("bind")+'="text: startTimezone, invisible: endTimezone"></span>').appendTo(t),e("<span "+R.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},ye=function(t,n){e("<div "+R.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).appendTo(t).kendoRecurrenceEditor({start:n.model.start,timezone:n.timezone,messages:n.messages})},ke=function(t,n){e("<div "+R.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).appendTo(t).kendoMobileRecurrenceEditor({start:n.model.start,timezone:n.timezone,messages:n.messages,pane:n.pane,value:n.model[n.field]})},xe=function(t,i){var o=n(i.model,i.messages.noTimezone);e('<a href="#" class="k-button k-timezone-button" data-bind="invisible:isAllDay">'+o+"</a>").click(i.click).appendTo(t)},Ce=function(t,n){e('<a href="#" class="k-button" data-bind="invisible:isAllDay">'+n.messages.timezoneEditorButton+"</a>").click(n.click).appendTo(t)},Se=function(t,n){e("<div "+R.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).toggle(n.visible).appendTo(t).kendoMobileTimezoneEditor({optionLabel:n.noTimezone})},Te=function(n,i){var o=i.visible||i.visible===t;e("<div "+R.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).toggle(o).appendTo(n).kendoTimezoneEditor({optionLabel:i.noTimezone})},De=R.Class.extend({init:function(t,n){var i=t.timezone;this.reader=n,n.model&&(this.model=n.model),this.timezone=i,this.data=r(e.proxy(this.data,this),i),this.serialize=s(e.proxy(this.serialize,this),i)},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)}}),Ae=R.data.Model.define({init:function(e){var t=this;R.data.Model.fn.init.call(t,e),t._defaultId=t.defaults[t.idField]},_time:function(e){var t=this[e],n="_"+e+"Time";return this[n]?this[n]-R.date.toUtcTime(R.date.getDate(t)):B(t)},_date:function(e){var t="_"+e+"Time";return this[t]?this[t]-this._time(e):R.date.getDate(this[e])},clone:function(t,n){var i=this.uid,o=new this.constructor(e.extend({},this.toJSON(),t));return n||(o.uid=i),o},duration:function(){var e=this.end,t=this.start,n=(e.getTimezoneOffset()-t.getTimezoneOffset())*R.date.MS_PER_MINUTE;return e-t-n},expand:function(e,t,n){return L?L.expand(this,e,t,n):[this]},update:function(e){for(var t in e)this.set(t,e[t]);this._startTime&&this.set("_startTime",R.date.toUtcTime(this.start)),this._endTime&&this.set("_endTime",R.date.toUtcTime(this.end))},isMultiDay:function(){return this.isAllDay||this.duration()>=R.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=R.data.Model.fn.toJSON.call(this);return e.uid=this.uid,delete e._startTime,delete e._endTime,e},shouldSerialize:function(e){return R.data.Model.fn.shouldSerialize.call(this,e)&&"_defaultId"!==e},set:function(e,t){var n,i,o,r=this.isAllDay||!1;R.data.Model.fn.set.call(this,e,t),"isAllDay"==e&&t!=r&&(n=R.date.getDate(this.start),i=new Date(this.end),o=R.date.getMilliseconds(i),0===o&&t&&(o=z),this.set("start",n),t===!0?(R.date.setTime(i,-o),i<n&&(i=n)):R.date.setTime(i,z-o),this.set("end",i))},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"}}}),Ee=q.extend({init:function(e){q.fn.init.call(this,$(!0,{},{schema:{modelBase:Ae,model:Ae}},e)),this.reader=new De(this.options.schema,this.reader)},expand:function(e,t){var n=this.view(),i={};return e&&t&&(t=new Date(t.getTime()+z-1),i={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()+z-1)},{field:"end",operator:"gte",value:e}]}]},n=new R.data.Query(u(n,e,t,this.reader.timezone)).filter(i).toArray()),n},cancelChanges:function(e){e&&e.isOccurrence()&&this._removeExceptionDate(e),q.fn.cancelChanges.call(this,e)},insert:function(e,t){if(t){if(!(t instanceof Ae)){var n=t;t=this._createNewModel(),t.accept(n)}return(!this._pushCreated&&t.isRecurrenceHead()||t.recurrenceId)&&(t=t.recurrenceId?t:t.toOccurrence(),this._addExceptionDate(t)),q.fn.insert.call(this,e,t)}},pushCreate:function(e){this._pushCreated=!0,q.fn.pushCreate.call(this,e),this._pushCreated=!1},remove:function(e){return e.isRecurrenceHead()?this._removeExceptions(e):e.isRecurring()&&this._addExceptionDate(e),q.fn.remove.call(this,e)},_removeExceptions:function(e){for(var t=this.data().slice(0),n=t.shift(),i=e.id;n;)n.recurrenceId===i&&q.fn.remove.call(this,n),n=t.shift();e.set(ce,"")},_removeExceptionDate:function(e){var t,n,i,o;e.recurrenceId&&(t=this.get(e.recurrenceId),t&&(n=e.start,i=RegExp("(\\"+ae+"?)"+L.toExceptionString(n,this.reader.timezone)),o=(t.recurrenceException||"").replace(le,ae).replace(/\,$/,""),t.set(ce,o.replace(i,""))))},_addExceptionDate:function(e){var t,n=e.start,i=this.reader.timezone,o=this.get(e.recurrenceId),r=(o.recurrenceException||"").replace(le,ae).replace(/\,$/,"");L.isException(r,n,i)||(t=L.toExceptionString(n,i),o.set(ce,r+(r&&t?ae:"")+t))}});Ee.create=function(e){(Q(e)||e instanceof R.data.ObservableArray)&&(e={data:e});var t=e||{},n=t.data;if(t.data=n,!(t instanceof Ee)&&t instanceof R.data.DataSource)throw Error("Incorrect DataSource type. Only SchedulerDataSource instances are supported");return t instanceof Ee?t:new Ee(t)},$(!0,R.data,{SchedulerDataSource:Ee,SchedulerDataReader:De,SchedulerEvent:Ae}),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:be,timezonePopUp:xe,timezone:Se,recurrence:ke,description:m,multipleResources:v,resources:p},desktop:{dateRange:we,timezonePopUp:Ce,timezone:Te,recurrence:ye,description:m,multipleResources:g,resources:p}},y=R.Observable.extend({init:function(e,t){R.Observable.fn.init.call(this),this.element=e,this.options=$(!0,{},this.options,t),this.createButton=this.options.createButton,this.toggleDateValidationHandler=Y(this._toggleDateValidation,this)},_toggleDateValidation:function(t){if("isAllDay"==t.field){var n,i,o,r=this.container,s=this.editable.options.model.isAllDay,a=R.attr("bind");r.find("["+a+"*=end],["+a+"*=start]").each(function(){n=e(this),re.test(n.attr(a))&&(i=n.is("["+R.attr("role")+"=datetimepicker],[type*=datetime]"),o=s!==i,n.attr(R.attr("validate"),o))})}},fields:function(e,t){var n,i,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}];R.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(n=0;n<this.options.resources.length;n++)i=this.options.resources[n],l.push({field:i.field,title:i.title,editor:i.multiple?e.multipleResources(i,t):e.resources(i,t)});return l},end:function(){return this.editable.end()},_buildEditTemplate:function(e,t,n){var i,o,r,s,a=this.options.messages,l=$({},R.Template,this.options.templateSettings),c=l.paramName,d=this.options.editable.template,u="";if(d)typeof d===U&&(d=window.unescape(d)),u+=R.template(d,l)(e);else for(i=0,o=t.length;i<o;i++)r=t[i],"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)?(n.push(r),u+="<div "+R.attr("container-for")+'="'+r.field+'" class="k-edit-field"></div>'):(s="#:",r.field?(r=R.expr(r.field,c),s+=r+"==null?'':"+r):s+="''",s+="#",s=R.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=R.mobile.ui.Pane.wrap(this.element),this.pane.element.parent().css("height",this.options.height),this.view=this.pane.view(),this._actionSheetButtonTemplate=R.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 i,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 n=t.startTimezone;c.prop("disabled",!n),n||(d.hide(),t.set("endTimezone",""),c.prop("checked",!1))}};o._startTimezone=t.startTimezone||"",o._endTimezone=t.endTimezone||"",a||(i='<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(i),a.contentElement().append(l.show()),a.element.on(Z+X,".k-scheduler-cancel, .k-scheduler-update",function(i){var a,l;i.preventDefault(),i.stopPropagation(),e(this).hasClass("k-scheduler-cancel")&&o._revertTimezones(t),t.unbind("change",u),a=r.element.find("#edit").data("kendoMobileView"),l=n(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 n,i,o="",r='<ul><li class="km-actionsheet-title">'+t.title+"</li>",s=this.element.find(".k-event["+R.attr("uid")+"='"+t.model.uid+"']");for(this.container&&(s=this.container.find(".k-scheduler-delete"),s[0]&&(o="phone")),n=0;n<t.buttons.length;n++)r+=this._createActionSheetButton(t.buttons[n]);r+="</ul>",i=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(n){var o=i.element.find("li:not(.km-actionsheet-cancel) > .k-button").index(e(n.currentTarget));o>-1&&(i.close(),t.buttons[o].click())},popup:this._actionSheetPopupOptions}).data("kendoMobileActionSheet"),i.open(s)},editEvent:function(t){var n,i,o,r,s,a=this.pane,l="",c=this.options.messages,d=c.save,u=c.destroy,h=c.cancel,f=c.editor.editorTitle;return l+='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="edit" '+R.attr("uid")+'="'+t.uid+'"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+h+"</a>"+f+'<a href="#" class="k-button k-scheduler-update">'+d+"</a></div>",n=this.fields(w.mobile,t),i=this,o=[],l+=this._buildEditTemplate(t,n,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:i.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(n){var o,r;n.preventDefault(),n.stopPropagation(),o=e(this),o.hasClass("k-scheduler-edit")?a.navigate("#edit",i.options.animations.right):(r="cancel",o.hasClass("k-scheduler-update")?r="save":o.hasClass("k-scheduler-delete")&&(r="remove"),i.trigger(r,{container:s,model:t}))}),a.navigate(r,i.options.animations.left),t.bind("change",i.toggleDateValidationHandler)),this.editable},_views:function(){return this.pane.element.find(R.roleSelector("view")).not(this.view.element)},close:function(){var e,t,n,i;if(this.container){for(this.pane.navigate("",this.options.animations.right),e=this._views(),n=0,i=e.length;n<i;n++)t=e.eq(n).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 n,i,o,r=this,s=r.options.editable,a="<div "+R.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),f=[];return a+=this._buildEditTemplate(t,h,f),i=G(s)?s.window:{},a+='<div class="k-edit-buttons k-state-default">',a+=this.createButton({name:"update",text:c,attr:n})+this.createButton({name:"canceledit",text:d,attr:n}),t.isNew()||s.destroy===!1||(a+=this.createButton({name:"delete",text:u,attr:n})),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(ee,{container:o,model:t})&&e.preventDefault()}},i)),r.editable=o.kendoEditable({fields:f,model:t,clearContainer:!1,validateOnBlur:!0,target:r.options.target}).data("kendoEditable"),r.trigger(oe,{container:o,model:t})?r.trigger(ee,{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(ee,{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(te,{container:o,model:t})}),R.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 n,i,o,r=R.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">',n=0;n<t.buttons.length;n++)r+=this.createButton(t.buttons[n]);r+="</div></div></div>",i=this.element,this.popup&&this.popup.destroy(),o=this.popup=e(r).appendTo(i).eq(0).on("click",".k-button",function(n){n.preventDefault(),o.close();var i=e(n.currentTarget).index();t.buttons[i].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,close:function(){this.destroy(),i.focus()}}).getKendoWindow(),o.center().open()},_initTimezoneEditor:function(e,t){var n,i=this,o=i.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=i._timezonePopup,d=function(t){if("startTimezone"===t.field){var n=e.startTimezone;r.prop("disabled",!n),n||(s.hide(),e.set("endTimezone",""),r.prop("checked",!1))}};i._startTimezone=e.startTimezone,i._endTimezone=e.endTimezone,c||(i._timezonePopup=c=o.kendoWindow({modal:!0,resizable:!1,draggable:!0,title:i.options.messages.editor.timezoneEditorTitle,visible:!1,close:function(n){e.unbind("change",d),n.userTriggered&&i._revertTimezones(e),t&&t.focus()}}),r.click(function(){s.toggle(r.prop("checked")),e.set("endTimezone","")}),a.click(function(e){e.preventDefault(),n.close()}),l.click(function(t){t.preventDefault(),i._revertTimezones(e),n.close()}),e.bind("change",d)),r.prop("checked",e.endTimezone).prop("disabled",!e.startTimezone),e.endTimezone?s.show():s.hide(),n=c.data("kendoWindow"),n.center().open()}}),C=V.extend({init:function(t,n){var i=this;O.fn.init.call(i,t,n),i.options.views&&i.options.views.length||(i.options.views=["day","week"]),i.resources=[],i._initModel(),i._wrapper(),i._views(),i._toolbar(),i._dataSource(),i._resources(),i._resizeHandler=function(){i.resize()},i.wrapper.on("mousedown"+X+" selectstart"+X,function(t){e(t.target).is(":kendoFocusable")||t.preventDefault()}),i.options.editable&&i.options.editable.resize!==!1&&i._resizable(),i._movable(),i._bindResize(),i.options.messages&&i.options.messages.recurrence&&(L.options=i.options.messages.recurrence),i._selectable(),i._ariaId=R.guid(),i._createEditor()},_bindResize:function(){e(window).on("resize"+X,this._resizeHandler)},_unbindResize:function(){e(window).off("resize"+X,this._resizeHandler)},dataItems:function(){var n,i,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(n=0;n<h;n++)u[d[n]]=null;for(o=c.length,n=0;n<o;n++)r=c[n],u[r.uid]!==t&&(u[r.uid]=r);s=[];for(i in u)s.push(u[i]);return s},_isMobile:function(){var e=this.options;return e.mobile===!0&&R.support.mobileOS||"phone"===e.mobile||"tablet"===e.mobile},_isMobilePhoneView:function(){var e=this.options;return e.mobile===!0&&R.support.mobileOS&&!R.support.mobileOS.tablet||"phone"===e.mobile},_groupsByResource:function(e,t,n,i,o){var r,s,a,l,c,d,u;if(n||(n=[]),r=e[0]){for(a=r.dataSource.view(),l=0,c=0;c<a.length;c++)d=R.getter(r.dataValueField)(a[c]),u=t+l+c,s=this._groupsByResource(e.slice(1),u,n,d,r.field),s[r.field]=d,l=s.groupIndex,o&&i&&(s[o]=i),1===e.length&&(s.groupIndex=t+c,n.push(s));return s}return{}},data:function(){return this._data},select:function(n){var i,o,r,s,a,l,c,d,u,h,f=this,p=f.view(),m=f._selection,g=p.groups;if(n===t)return r=p._selectedSlots,m?(m&&m.events&&(o=f._selectedEvents()),{start:m.start,end:m.end,events:o,slots:r,resources:p._resourceBySlot(m)}):[];if(!n)return f._selection=null,f._old=null,p.clearSelection(),t;if(e.isArray(n)&&(n={events:n.splice(0)}),n.resources){a=[],l=[],p.groupedResources&&f._groupsByResource(p.groupedResources,0,l);for(s in n.resources)a.push({field:s,operator:"eq",value:n.resources[s]});i=new R.data.Query(l).filter(a).toArray()}return n.events&&n.events.length?(f._selectEvents(n.events,i),f._select(),t):(g&&n.start&&n.end&&(c=P(p._startDate),d=R.date.addDays(P(p._endDate),1),n.start<d&&c<=n.end&&(u=i&&i.length?g[i[0].groupIndex]:g[0],h=u.ranges(n.start,n.end,n.isAllDay,!1),h.length&&(f._selection={start:R.timezone.toLocalDate(h[0].start.start),end:R.timezone.toLocalDate(h[h.length-1].end.end),groupIndex:h[0].start.groupIndex,index:h[0].start.index,isAllDay:h[0].start.isDaySlot,events:[]},f._select()))),t)},_selectEvents:function(e,t){var n,i,o,r,s,a,l,c,d=this,u=d.view(),h=u.groups,f=e.length,p=t&&t.length;for(n=0;n<f;n++)if(h&&p){for(i=h[t[0].groupIndex],o=[],r=i.timeSlotCollectionCount(),s=i.daySlotCollectionCount(),a=0;a<r;a++)o=o.concat(i.getTimeSlotCollection(a).events());for(l=0;l<s;l++)o=o.concat(i.getDaySlotCollection(l).events());o=new R.data.Query(o).filter({field:"element[0].getAttribute('data-uid')",operator:"eq",value:e[n]}).toArray(),o[0]&&d._createSelection(o[0].element)}else c=u.element.find(R.format(".k-event[data-uid={0}], .k-task[data-uid={0}]",e[n])),c.length&&d._createSelection(c[0])},_selectable:function(){var t,n=this,i=n.wrapper,o=R.support.mobileOS?"touchend":"mousedown";n.options.selectable&&(n._tabindex(),i.on(o+X,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){var t=e.which,o=e.button,r=R.support.browser,s=t&&3===t||o&&2==o;R.support.mobileOS&&e.isDefaultPrevented()||(s||n._createSelection(e.currentTarget),i.focus(),r.msie&&r.version<9&&setTimeout(function(){i.focus()}))}),t=e.proxy(n._mouseMove,n),i.on("mousedown"+X,".k-scheduler-header-all-day td, .k-scheduler-content td",function(e){var n=e.which,o=e.button,r=n&&3===n||o&&2==o;r||i.on("mousemove"+X,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),i.on("mouseup"+X+" mouseleave"+X,function(){i.off("mousemove"+X,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),i.on("focus"+X,function(){n._selection||n._selectFirstSlot(),n._select()}),i.on("focusout"+X,function(){n._ctrlKey=n._shiftKey=!1}),i.on("keydown"+X,Y(n._keydown,n)),i.on("keyup"+X,function(e){n._ctrlKey=e.ctrlKey,n._shiftKey=e.shiftKey}))},_selectFirstSlot:function(){this._createSelection(this.wrapper.find(".k-scheduler-content").find("td:first"))},_select:function(){var t,n,i,o,r,s=this,a=s.view(),l=s.wrapper,c=a.current(),d=s._selection;if(d&&(c&&(c.removeAttribute("id"),c.removeAttribute("aria-label"),l.removeAttr("aria-activedescendant")),a.select(d),c=a.current(),c&&s._old!==c)){if(t=e(c).data("uid"),s._old&&t&&t===e(s._old).data("uid"))return;i=d,o=s._selectedEvents(),r=a._selectedSlots,o[0]?(i=o[0]||d,n=R.format(s.options.messages.ariaEventLabel,i.title,i.start,i.start)):n=R.format(s.options.messages.ariaSlotLabel,i.start,i.end),c.setAttribute("id",s._ariaId),c.setAttribute("aria-label",n),l.attr("aria-activedescendant",s._ariaId),s._old=c,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,n=t.length,i=0,o=[];i<n;i++)e=this.occurrenceByUid(t[i]),
e&&o.push(e);return o},_mouseMove:function(t){var n=this;clearTimeout(n._moveTimer),n._moveTimer=setTimeout(function(){var i,o,r,s=n.view(),a=n._selection;a&&(i=s.selectionByElement(e(t.currentTarget)),i&&a.groupIndex===i.groupIndex&&(o=i.startDate(),r=i.endDate(),o>=a.end?a.backward=!1:r<=a.start&&(a.backward=!0),a.backward?a.start=o:a.end=r,n._select()))},5)},_viewByIndex:function(e){var t,n=this.views;for(t in n){if(!e)return t;e--}},_keydown:function(n){var i=this,o=n.keyCode,r=i.view(),s=r.options.editable,a=i._selection,l=n.shiftKey;return i._ctrlKey=n.ctrlKey,i._shiftKey=n.shiftKey,a?(o===H.TAB?r.moveToEvent(a,l)&&(i._select(),n.preventDefault()):s&&o===H.ENTER?a.events.length?s.update!==!1&&i.editEvent(a.events[0]):s.create!==!1&&(a.isAllDay&&(a=e.extend({},a,{end:R.date.addDays(a.end,-1)})),i.addEvent($({},a,r._resourceBySlot(a)))):o===H.DELETE&&s!==!1&&s.destroy!==!1?i.removeEvent(a.events[0]):o>=49&&o<=57?i.view(i._viewByIndex(o-49)):r.move(a,o,l)&&(r.inRange(a)?i._select():i.date(a.start),n.preventDefault()),i._adjustSelectedDate(),t):(i._selectFirstSlot(),i._select(),t)},_createSelection:function(t){var n,i,o;this._selection&&(this._ctrlKey||this._shiftKey)||(this._selection={events:[],groupIndex:0}),t=e(t),o=this._selection,t.is(".k-event")&&(n=t.attr(R.attr("uid"))),i=this.view().selectionByElement(t),i&&(o.groupIndex=i.groupIndex||0),n&&(i=l(this._data,n)),i&&i.uid&&(n=[i.uid]),this._updateSelection(i,n),this._adjustSelectedDate()},_updateSelection:function(e,n,i){var o,r,s=this._selection;e&&s&&(o=this.view(),e.uid&&(e=o._updateEventForSelection(e)),this._shiftKey&&s.start&&s.end?(r=e.end<s.end,s.end=e.endDate?e.endDate():e.end,r&&o._timeSlotInterval&&R.date.setTime(s.end,-o._timeSlotInterval())):(s.start=e.startDate?e.startDate():e.start,s.end=e.endDate?e.endDate():e.end),s.isAllDay="isDaySlot"in e?e.isDaySlot:e.isAllDay,null!==i&&i!==t&&(s.groupIndex=i),s.index=e.index,s.events=this._ctrlKey?s.events.concat(n||[]):n||[])},options:{name:"Scheduler",date:se,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",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:de},editor:{title:"Title",start:"Start",end:"End",allDayEvent:"All day event",description:"Description",repeat:"Repeat",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:[te,oe,ee,ne,"add","dataBinding","dataBound","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","navigate","change"],destroy:function(){var t,n=this;O.fn.destroy.call(n),n.dataSource&&(n.dataSource.unbind(J,n._refreshHandler),n.dataSource.unbind("progress",n._progressHandler),n.dataSource.unbind("error",n._errorHandler)),n.calendar&&(n.calendar.destroy(),n.popup.destroy()),n.view()&&n.view().destroy(),n._editor&&n._editor.destroy(),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),t=n.element.add(n.wrapper).add(n.toolbar).add(n.popup),t.off(X),clearTimeout(n._moveTimer),n._model=null,n.toolbar=null,n.element=null,e(window).off("resize"+X,n._resizeHandler),R.destroy(n.wrapper)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},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 n,i,o,r,s,a,l,c=this,d=0,u=c._isMobile(),h=c.options.editable&&c.options.editable.move!==!1,f=c.options.editable&&c.options.editable.resize!==!1;(h||f&&u)&&(u&&R.support.mobileOS.android&&(d=5),c._moveDraggable=new R.ui.Draggable(c.element,{distance:d,filter:".k-event",ignore:".k-resize-handle",holdToDrag:u,autoScroll:!0}),h&&c._moveDraggable.bind("dragstart",function(e){var r=c.view(),d=e.currentTarget;return r.options.editable&&r.options.editable.move!==!1?u&&!d.hasClass("k-event-active")?(c.element.find(".k-event-active").removeClass("k-event-active"),e.preventDefault(),t):(s=c.occurrenceByUid(d.attr(R.attr("uid"))),a=s.clone(),a.update(r._eventOptionsForMove(a)),n=r._slotByPosition(e.x.startLocation,e.y.startLocation),o=n.startOffset(e.x.startLocation,e.y.startLocation,c.options.snap),i=n,l=n,n&&!c.trigger("moveStart",{event:s})||e.preventDefault(),t):(e.preventDefault(),t)}).bind("drag",function(e){var t,l,d=c.view(),u=d._slotByPosition(e.x.location,e.y.location);u&&(r=u.startOffset(e.x.location,e.y.location,c.options.snap),u.isDaySlot!==n.isDaySlot?(n=d._slotByPosition(e.x.location,e.y.location),o=n.startOffset(e.x.location,e.y.location,c.options.snap),t=r-o,a.isAllDay=u.isDaySlot,a.start=R.timezone.toLocalDate(o),a.end=R.timezone.toLocalDate(r),d._updateMoveHint(a,u.groupIndex,t),l={start:a.start,end:a.end}):(t=r-o,d._updateMoveHint(a,u.groupIndex,t),l=_(a,t)),c.trigger("move",{event:s,slot:{element:u.element,start:u.startDate(),end:u.endDate(),isDaySlot:u.isDaySlot},resources:d._resourceBySlot(u),start:l.start,end:l.end})?d._updateMoveHint(a,u.groupIndex,t):i=u)}).bind("dragend",function(t){var d,u,h,f,p,m,g,v,b;c.view()._removeMoveHint(),d=r-o,u=_(a,d),h=u.start,f=u.end,p=c.view()._resourceBySlot(i),m=c.view()._resourceBySlot(n),g=c.trigger("moveEnd",{event:s,slot:{element:i.element,start:i.startDate(),end:i.endDate()},start:h,end:f,resources:p}),g||s.start.getTime()===h.getTime()&&s.end.getTime()===f.getTime()&&l.isDaySlot===i.isDaySlot&&R.stringify(p)===R.stringify(m)||(v=c.view()._eventOptionsForMove(s),b=l.isDaySlot!==i.isDaySlot?i.isDaySlot?e.extend({start:i.startDate(),end:i.startDate(),isAllDay:i.isDaySlot},v,p):e.extend({isAllDay:i.isDaySlot,start:h,end:f},v,p):e.extend({isAllDay:s.isAllDay,start:h,end:f},v,p),c._updateEvent(null,s,b,i.groupIndex)),t.currentTarget.removeClass("k-event-active"),this.cancelHold()}).bind("dragcancel",function(){c.view()._removeMoveHint(),this.cancelHold()}),u&&(c._moveDraggable.bind("hold",function(e){c.element.find(".k-scheduler-monthview").length&&e.preventDefault(),c.element.find(".k-event-active").removeClass("k-event-active"),e.currentTarget.addClass("k-event-active")}),R.support.mobileOS.android||c._moveDraggable.userEvents.bind("press",function(e){e.preventDefault()})))},_resizable:function(){function t(e){var t,n={"k-resize-e":"east","k-resize-w":"west","k-resize-n":"north","k-resize-s":"south"};for(t in n)if(e.hasClass(t))return n[t]}var n,i,o,r,s,a=this,l=0;a._isMobile()&&R.support.mobileOS.android&&(l=5),a._resizeDraggable=new R.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(R.attr("uid")),u=a.view();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(),n=R.date.toUtcTime(r.start),i=R.date.toUtcTime(r.end)},drag:function(l){var c,d,u,h,f,p;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,f=n,p=i,"south"==d?!s.isDaySlot&&s.end-R.date.toUtcTime(r.start)>=u._timeSlotInterval()&&(i=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&&R.date.toUtcTime(r.end)-s.start>=u._timeSlotInterval()&&(n=s.startOffset(l.x.location,l.y.location,a.options.snap)):"east"==d?s.isDaySlot&&R.date.toUtcTime(R.date.getDate(s.endDate()))>=R.date.toUtcTime(R.date.getDate(r.start))?i=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-R.date.toUtcTime(r.start)>=u._timeSlotInterval()&&(i=s.endOffset(l.x.location,l.y.location,a.options.snap)):"west"==d&&(s.isDaySlot&&R.date.toUtcTime(R.date.getDate(r.end))>=R.date.toUtcTime(R.date.getDate(s.startDate()))?n=s.startOffset(l.x.location,l.y.location,a.options.snap):!s.isDaySlot&&R.date.toUtcTime(r.end)-s.start>=u._timeSlotInterval()&&(n=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:R.timezone.toLocalDate(n),end:R.timezone.toLocalDate(i),resources:u._resourceBySlot(s)})?(n=f,i=p):u._updateResizeHint(r,s.groupIndex,n,i)))},dragend:function(l){var c,d=e(l.currentTarget),u=new Date(r.start.getTime()),h=new Date(r.end.getTime()),f=t(d);a.view()._removeResizeHint(),"south"==f?h=R.timezone.toLocalDate(i):"north"==f?u=R.timezone.toLocalDate(n):"east"==f?h=s.isDaySlot?R.date.getDate(R.timezone.toLocalDate(i)):R.timezone.toLocalDate(i):"west"==f&&(s.isDaySlot?(u=new Date(R.timezone.toLocalDate(n)),u.setHours(0),u.setMinutes(0)):u=R.timezone.toLocalDate(n)),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(f,o,{start:u,end:h}))),s=null,o=null},dragcancel:function(){a.view()._removeResizeHint(),s=null,o=null}})},_updateEvent:function(e,t,n,i){var o,r=this,s=function(e,t){try{r._preventRefresh=!0,e.update(n),r._convertDates(e)}finally{r._preventRefresh=!1}r.trigger(ne,{event:e})||(t&&t(),r._updateSelection(e,[e.uid],i),r.dataSource.sync())},a=function(e){return e.recurrenceRule?r.dataSource.getByUid(e.uid):r.dataSource.get(e.recurrenceId)},l=function(){var i,o,l=a(t);"south"!=e&&"north"!=e||(n.start&&(i=R.date.getDate(l.start),R.date.setTime(i,B(n.start)),n.start=i),n.end&&(o=R.date.getDate(l.end),R.date.setTime(o,B(n.end)),n.end=o)),r.dataSource._removeExceptions(l),s(l)},c=function(){var e=a(t),n=function(){r._convertDates(e)},i=e.toOccurrence({start:t.start,end:t.end});s(r.dataSource.add(i),n)};t.recurrenceRule||t.isOccurrence()?(o=r.options.messages.recurrenceMessages,r._showRecurringDialog(t,c,l,{title:o.editWindowTitle,text:o.editRecurring?o.editRecurring:he,occurrenceText:o.editWindowOccurrence,seriesText:o.editWindowSeries})):s(r.dataSource.getByUid(t.uid))},_modelForContainer:function(t){return t=e(t).closest("["+R.attr("uid")+"]"),this.dataSource.getByUid(t.attr(R.attr("uid")))},showDialog:function(e){this._editor.showDialog(e)},focus:function(){this.wrapper.focus()},_confirmation:function(e,t){var n,i,o,r,s,a=this.options.editable;a===!0||a.confirmation!==!1?(n=this.options.messages,i=n.deleteWindowTitle,o=typeof a.confirmation===U?a.confirmation:n.editable.confirmation,this._isEditorOpened()&&t.isRecurring()&&(r=this.options.messages.recurrenceMessages,i=r.deleteWindowTitle,o=t.isException()?r.deleteRecurringConfirmation?r.deleteRecurringConfirmation:fe:r.deleteSeriesConfirmation?r.deleteSeriesConfirmation:pe),s=[{name:"destroy",text:n.destroy,click:function(){e()}}],this._isMobile()&&R.mobile.ui.Pane||s.push({name:"canceledit",text:n.cancel,click:function(){e(!0)}}),this._unbindResize(),this.showDialog({model:t,text:o,title:i,buttons:s}),this._bindResize()):e()},addEvent:function(e){var t,n,i=this._editor.editable,o=this.dataSource;e=e||{},n=this.trigger("add",{event:e}),!n&&(i&&i.end()||!i)&&(this.cancelEvent(),e&&e.toJSON&&(e=e.toJSON()),t=o.add(e),t&&(this.cancelEvent(),this._editEvent(t)))},saveEvent:function(){var e,t,n,i=this._editor;i&&(e=i.editable,t=i.container,n=this._modelForContainer(t),t&&e&&e.end()&&!this.trigger(ne,{container:t,event:n})&&(n.isRecurrenceHead()&&this.dataSource._removeExceptions(n),n.dirty||n.isOccurrence()||this._convertDates(n,"remove"),this.dataSource.sync()))},cancelEvent:function(){var e,t=this._editor,n=t.container;n&&(e=this._modelForContainer(n),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,n=function(){e.isException()?t._editEvent(e):t.addEvent(e)},i=function(){e.recurrenceId&&(e=t.dataSource.get(e.recurrenceId)),t._editEvent(e)},o=t.options.messages.recurrenceMessages;t._showRecurringDialog(e,n,i,{title:o.editWindowTitle,text:o.editRecurring?o.editRecurring:he,occurrenceText:o.editWindowOccurrence,seriesText:o.editWindowSeries})},_showRecurringDialog:function(e,t,n,i){var o=this,r=o.options.editable,s=G(r)?r.editRecurringMode:"dialog";"series"===s?n():"occurrence"===s?t():(this._unbindResize(),o.showDialog({model:e,title:i.title,text:i.text,buttons:[{text:i.occurrenceText,click:t},{text:i.seriesText,click:n}]}),this._bindResize())},_createButton:function(e){var t=e.template||me,n=typeof e===U?e:e.name||e.text,i={className:"k-scheduler-"+(n||"").replace(/\s/g,""),text:n,attr:""};if(!(n||G(e)&&e.template))throw Error("Custom commands should have name specified");return G(e)?(e.className&&(e.className+=" "+i.className),"edit"===n&&G(e.text)&&(e=$(!0,{},e),e.text=e.text.edit),i=$(!0,i,b[n],e)):i=$(!0,i,b[n]),R.template(t)(i)},_convertDates:function(e,t){var n=this.dataSource.reader.timezone,i=e.startTimezone,o=e.endTimezone,r=e.start,s=e.start;t=t||"apply",i=i||o,o=o||i,i&&(n?"apply"===t?(r=R.timezone.convert(e.start,n,i),s=R.timezone.convert(e.end,n,o)):(r=R.timezone.convert(e.start,i,n),s=R.timezone.convert(e.end,o,n)):(r=R.timezone[t](e.start,i),s=R.timezone[t](e.end,o)),e._set("start",r),e._set("end",s))},_createEditor:function(){var e,n=this;e=n._editor=this._isMobile()&&R.mobile.ui.Pane?new k(this.wrapper,$({},this.options,{target:this,timezone:n.dataSource.reader.timezone,resources:n.resources,createButton:Y(this._createButton,this)})):new x(this.wrapper,$({},this.options,{target:this,createButton:Y(this._createButton,this),timezone:n.dataSource.reader.timezone,resources:n.resources})),e.bind("cancel",function(e){return n.trigger("cancel",{container:e.container,event:e.model})?(e.preventDefault(),t):(n.cancelEvent(),n.focus(),t)}),e.bind("edit",function(e){n.trigger(oe,{container:e.container,event:e.model})&&e.preventDefault()}),e.bind("save",function(){n.saveEvent()}),e.bind("remove",function(e){n.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,n="string"==typeof e?t.occurrenceByUid(e):e;n&&(n.isRecurring()?t._deleteRecurringDialog(n):t._confirmation(function(e){e||t._removeEvent(n)},n))},occurrenceByUid:function(e){var t=this.dataSource.getByUid(e);return t||(t=l(this._data,e)),t},occurrencesInRange:function(e,t){return new R.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(te,{event:e})||this.dataSource.remove(e)&&this.dataSource.sync()},_deleteRecurringDialog:function(e){var t,n,i,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)},n=function(){s._confirmation(function(e){e||u()},a)}),i=n||u,o=t||d,s._isEditorOpened()?e.isException()?o():i():(r=s.options.messages.recurrenceMessages,s._showRecurringDialog(e,o,i,{title:r.deleteWindowTitle,text:r.deleteRecurring?r.deleteRecurring:ue,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(te,t._viewRemoveHandler),t._viewRemoveHandler=function(e){t.removeEvent(e.uid)},e.bind(te,t._viewRemoveHandler),t._viewAddHandler&&e.unbind(ie,t._viewAddHandler),t._viewAddHandler=function(e){t.addEvent(e.eventInfo)},e.bind(ie,this._viewAddHandler),t._viewEditHandler&&e.unbind(oe,t._viewEditHandler),t._viewEditHandler=function(e){t.editEvent(e.uid)},e.bind(oe,this._viewEditHandler)),t._viewNavigateHandler&&e.unbind("navigate",t._viewNavigateHandler),t._viewNavigateHandler=function(e){var n,i;e.view&&(n="isWorkDay"in e,i=n?"changeWorkDay":"changeView",t.trigger("navigate",{view:e.view,isWorkDay:e.isWorkDay,action:i,date:e.date})||(n&&(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,n,i,o=this;e&&o.views[e]&&(o._selectedView&&o._unbindView(o._selectedView),o._selectedView=o._renderView(e),o._selectedViewName=e,o._viewsCount>1&&(t=ge({views:o.views,view:e,ns:R.ns}),n=o.toolbar.find(".k-scheduler-views li:first-child"),n.is(".k-current-view")?n.replaceWith(t):o.toolbar.find(".k-scheduler-views").prepend(t),i=o.toolbar.find(".k-scheduler-views li").removeClass("k-state-selected"),i.end().find(".k-view-"+e.replace(/\./g,"\\.").toLowerCase()).addClass("k-state-selected")))},view:function(e){var n=this;return e?(n._selectView(e),n.rebind(),t):n._selectedView},viewName:function(){return this.view().name},_renderView:function(e){var t=this._initializeView(e);return this._bindView(t),this._model.set("formattedDate",t.dateForTitle()),this._model.set("formattedShortDate",t.shortDateForTitle()),t},resize:function(e){var t=this.getSize(),n=this._size,i=this.view();i&&i.groups&&(!e&&n&&t.width===n.width&&t.height===n.height||(this.refresh({action:"resize"}),this._size=t))},_adjustSelectedDate:function(){var e=this._model.selectedDate,t=this._selection,n=t.start;n&&!R.date.isInDateRange(e,P(n),P(t.end))&&e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate())},_initializeView:function(e){var t,n,i=this.views[e];if(i){if(t=G(i),n=i.type,typeof n===U&&(n=R.getter(i.type)(window)),!n)throw Error("There is no such view");i=new n(this.wrapper,h($(!0,{},this.options,t?i:{},{resources:this.resources,date:this.date(),showWorkHours:this._workDayMode})))}return i},_views:function(){var e,t,n,i,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],i=G(e),i?(r=o=e.type?e.type:e,typeof r!==U&&(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,i?e:{}),o&&(this.views[o]=e,this._viewsCount++,n&&!e.selected||(n=o));n&&(this._selectedViewName=n)},rebind:function(){this.dataSource.fetch()},_dataSource:function(){var e=this,t=e.options,n=t.dataSource;n=Q(n)?{data:n}:n,!t.timezone||n instanceof Ee?n instanceof Ee&&(t.timezone=n.options.schema?n.options.schema.timezone:""):n=$(!0,n,{schema:{timezone:t.timezone}}),e.dataSource&&e._refreshHandler?e.dataSource.unbind(J,e._refreshHandler).unbind("progress",e._progressHandler).unbind("error",e._errorHandler):(e._refreshHandler=Y(e.refresh,e),e._progressHandler=Y(e._requestStart,e),e._errorHandler=Y(e._error,e)),e.dataSource=R.data.SchedulerDataSource.create(n).bind(J,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");R.ui.progress(t,e)},_resources:function(){var t,n,i,o,r,s=this,a=s.options.resources;for(t=0;t<a.length;t++){if(n=a[t],i=n.field,o=n.dataSource,!i||!o)throw Error('The "field" and "dataSource" options of the scheduler resource are mandatory.');s.resources.push({field:i,name:n.name||i,title:n.title||i,dataTextField:n.dataTextField||"text",dataValueField:n.dataValueField||"value",dataColorField:n.dataColorField||"color",valuePrimitive:null==n.valuePrimitive||n.valuePrimitive,multiple:n.multiple||!1,dataSource:R.data.DataSource.create(o)})}r=e.map(s.resources,function(e){return e.dataSource.fetch()}),e.when.apply(null,r).then(function(){s.options.autoBind?s.view(s._selectedViewName):s._selectView(s._selectedViewName)})},_initModel:function(){var e=this;e._model=R.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,n=t.height,i=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"),n&&e.wrapper.height(n),i&&e.wrapper.width(i)},date:function(e){return null!=e&&P(e)>=P(this.options.min)&&P(e)<=P(this.options.max)&&this._model.set("selectedDate",e),P(this._model.get("selectedDate"))},_toolbar:function(){var n,i,o=this,r=o.options,s=[];r.toolbar&&(s=e.isArray(r.toolbar)?r.toolbar:[r.toolbar]),n=this._isMobilePhoneView()?_e:ve,i=e(n({messages:r.messages,pdf:e.grep(s,function(e){return"pdf"==e||"pdf"==e.name}).length>0,ns:R.ns,views:o.views,viewsCount:o._viewsCount})),o.wrapper.append(i),o.toolbar=i,R.bind(o.toolbar,o._model),i.on(Z+X,".k-pdf",function(e){e.preventDefault(),o.saveAsPDF()}),i.on(Z+X,".k-scheduler-navigation li",function(n){var i=e(this),r=new Date(o.date()),s="";if(n.preventDefault(),i.hasClass("k-nav-today"))s="today",r=new Date;else if(i.hasClass("k-nav-next"))s="next",r=o.view().nextDate();else if(i.hasClass("k-nav-prev"))s="previous",r=o.view().previousDate();else if(i.hasClass("k-nav-current")&&!o._isMobilePhoneView())return o._showCalendar(),t;o.trigger("navigate",{view:o._selectedViewName,action:s,date:r})||o.date(r)}),i.on(Z+X,".k-scheduler-views li, .k-scheduler-refresh",function(t){t.preventDefault();var n=e(this).attr(R.attr("name"));o.trigger("navigate",{view:n,action:"changeView",date:o.date()})||(o.view(n),o.element.find(".k-state-expanded").removeClass("k-state-expanded"))}),i.on(Z+X,".k-scheduler-views li.k-current-view",function(){o.element.find(".k-scheduler-views").toggleClass("k-state-expanded")}),i.find("li").hover(function(){e(this).addClass("k-state-hover")},function(){e(this).removeClass("k-state-hover")})},_showCalendar:function(){var t=this,n=t.toolbar.find(".k-nav-current"),i=e('<div class="k-calendar-container"><div class="k-scheduler-calendar"/></div>');t.popup||(t.popup=new W(i,{anchor:n,open:function(){t.calendar||(t.calendar=new j(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())},min:t.options.min,max:t.options.max})),t.calendar.value(t.date())},copyAnchorStyles:!1})),t.popup.open()},refresh:function(e){var t=this,n=this.view();this._progress(!1),this.angular("cleanup",function(){return{elements:t.items()}}),e=e||{},n&&(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(n.startDate(),n.endDate()),n.refreshLayout(),n.render(this._data),this.trigger("dataBound")))},slotByPosition:function(e,t){var n,i=this.view();return i._slotByPosition?(n=i._slotByPosition(e,t),n?{startDate:n.startDate(),endDate:n.endDate(),groupIndex:n.groupIndex,element:n.element,isDaySlot:n.isDaySlot}:null):null},slotByElement:function(t){var n=e(t).offset();return this.slotByPosition(n.left,n.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),R.PDFMixin&&(R.PDFMixin.extend(C.prototype),T="k-scheduler-pdf-export",C.fn._drawPDF=function(t){var n,i,o,r=this.wrapper,s=r[0].style.cssText;return r.css({width:r.width(),height:r.height()}),r.addClass(T),n=this,i=new e.Deferred,o=r.find(".k-scheduler-content").find("table").css("table-layout","auto"),setTimeout(function(){o.css("table-layout","fixed"),n.resize(!0),n._drawPDFShadow({},{avoidLinks:n.options.pdf.avoidLinks}).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)}).always(function(){r[0].style.cssText=s,r.removeClass(T),n.resize(!0),n.resize(!0)})}),i}),D=O.extend({init:function(e,t){var n=this,i=R.timezone.windows_zones;if(!i||!R.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");O.fn.init.call(n,e,t),n.wrapper=n.element,n._zonesQuery=new R.data.Query(i),n._zoneTitleId=R.guid(),n._zoneTitlePicker(),n._zonePicker(),n._zoneTitle.bind("cascade",function(){this.value()||n._zone.wrapper.hide()}),n._zone.bind("cascade",function(){n._value=this.value(),n.trigger("change")}),n.value(n.options.value)},options:{name:"TimezoneEditor",value:"",optionLabel:"No timezone"},events:["change"],_zoneTitlePicker:function(){var t=this,n=e('<input id="'+t._zoneTitleId+'"/>').appendTo(t.wrapper);t._zoneTitle=new R.ui.DropDownList(n,{dataSource:R.timezone.zones_titles,dataValueField:"other_zone",dataTextField:"name",optionLabel:t.options.optionLabel})},_zonePicker:function(){var t=this,n=e("<input />").appendTo(this.wrapper);t._zone=new R.ui.DropDownList(n,{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),R.destroy(this.wrapper)},value:function(e){var n,i=this;return e===t?i._value:(n=i._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],n?(i._zoneTitle.value(n.other_zone),i._zone.value(n.zone)):i._zoneTitle.select(0),t)}}),N.plugin(D),A=R.template('<option value="#=other_zone#">#=name#</option>'),E=R.template('<option value="#=zone#">#=territory#</option>'),M=O.extend({init:function(e,t){var n=this,i=R.timezone.windows_zones;if(!i||!R.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");O.fn.init.call(n,e,t),n.wrapper=n.element,n._zonesQuery=new R.data.Query(i),n._zoneTitlePicker(),n._zonePicker(),n.value(n.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,n){var i=0,o="",r=e.length;for(n&&(o+=t({other_zone:"",name:n}));i<r;i++)o+=t(e[i]);return o},_zoneTitlePicker:function(){var t=this,n=t._options(R.timezone.zones_titles,A,t.options.optionLabel);t._zoneTitle=e("<select>"+n+"</select>").appendTo(t.wrapper).change(function(){var e=this.value,n=t._zone;t._bindZones(e),e&&n[0].children.length>1?n.show():n.hide(),t._value=n[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),R.destroy(this.wrapper)},value:function(e){var n,i=this,o=i._zone,r="",s="";return e===t?i._value:(n=i._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],n&&(s=n.zone,r=n.other_zone),i._zoneTitle.val(r),i._bindZones(r),o.val(s),s=o[0].value,s&&o[0].children.length>1?o.show():o.hide(),i._value=s,t)}}),N.plugin(M)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.touch.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=e.proxy,r=Math.abs,s=20,a=i.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;i.fn.init.call(a,e,t),t=a.options,e=a.element,a.wrapper=e,a.events=new n.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"))),n.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(){this.events.destroy()},_triggerTouch:function(e,t){this.trigger(e,{touch:t.touch,event:t.event})&&t.preventDefault()},_tap:function(e){var t=this,i=t.lastTap,o=e.touch;i&&o.endTime-i.endTime<t.options.doubleTapTimeout&&n.touchDelta(o,i).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,n=t.options,i=e.touch,o=e.event.timeStamp-i.startTime,s=i.x.initialDelta>0?"right":"left";r(i.x.initialDelta)>=n.minXDelta&&r(i.y.initialDelta)<n.maxYDelta&&o<n.maxDuration&&(t.trigger("swipe",{direction:s,touch:e.touch}),i.cancel())}});n.ui.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n,i=[],o=e.className;for(t=0,n=e.level;t<n;t++)i.push(r("span",{className:o}));return i}function n(){var t=i._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).blur()}var i=window.kendo,o=i.dom,r=o.element,s=o.text,a=i.support.browser,l=i.support.mobileOS,c=i.ui,d=c.Widget,u=e.extend,h=i._outerWidth,f=i._outerHeight,p=e.map,m=e.isFunction,g=a.msie&&a.version<9,v=i.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,n){d.fn.init.call(this,t,n),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,n;this.options.resizable&&(t=this.header.find("col"),n=this.content.find("col"),this.header.find("th").not(":last").each(function(i){var o=h(e(this));t.eq(i).width(o),n.eq(i).width(o)}),t.last().css("width","auto"),n.last().css("width","auto"))},!0)},_adjustHeight:function(){this.content.height(this.element.height()-f(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,i.destroy(this.element)},options:{name:"GanttList",selectable:!0,editable:!0,resizable:!1},_attachEvents:function(){var t=this,n=S.styles;t.content.on(y+w,"td > span."+n.icon+":not(."+n.iconHidden+")",function(n){var i=e(this),o=t._modelFromElement(i);o.set("expanded",!o.get("expanded")),n.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=p(e,function(e){return e=typeof e===b?{field:e,title:_[e]}:e,u(new t,e)})},_layout:function(){var t=this,n=this.options,o=this.element,r=S.styles,s=function(){var o,r=typeof n.rowHeight===b?n.rowHeight:n.rowHeight+"px",s=e(i.format(x,r));return t.content.append(s),o=f(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),n.rowHeight&&(this._rowHeight=s())},_header:function(){var e=this.headerTree,t=r("colgroup",null,this._cols()),n=r("thead",{role:"rowgroup"},[r("tr",{role:"row"},this._ths())]),i=r("table",{style:{minWidth:this.options.listWidth+"px"},role:"grid"},[t,n]);e.render([i])},_render:function(e){var t,n,i,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()),n=r("tbody",{role:"rowgroup"},this._trs(e)),i=r("table",o,[t,n]),this.contentTree.render([i]),this.trigger("render")},_ths:function(){var e,t,n,i,o=this.columns,a=[];for(n=0,i=o.length;n<i;n++)e=o[n],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,n,i,o,s=this.columns,a=[];for(i=0,o=s.length;i<o;i++)e=s[i],n=e.width,t=n&&0!==parseInt(n,10)?{style:{width:typeof n===b?n:n+"px"}}:null,a.push(r("col",t,[]));return this.options.resizable&&a.push(r("col",{style:{width:"1px"}})),a},_trs:function(e){var t,n,i,o,r,s=[],a=[],l=S.styles;for(o=0,r=e.length;o<r;o++)t=e[o],i=this._levels({idx:t.parentId,id:t.id,summary:t.summary}),n={"data-uid":t.uid,"data-level":i,role:"row"},t.summary&&(n["aria-expanded"]=t.expanded),o%2!==0&&a.push(l.alt),t.summary&&a.push(l.group),a.length&&(n.className=a.join(" ")),s.push(this._tds({task:t,attr:n,level:i})),a=[];return s},_tds:function(e){var t,n,i,o=[],s=this.columns;for(n=0,i=s.length;n<i;n++)t=s[n],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 n,o,a,l=[],c=this.options.resourcesField,d=S.styles,u=e.task,h=e.column,f=u.get(h.field);if(h.field==c){for(f=f||[],n=[],a=0;a<f.length;a++)n.push(i.format("{0} [{1}]",f[a].get("name"),f[a].get("formatedValue")));n=n.join(", ")}else n=h.format?i.format(h.format,f):f;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=i.format("{0}, {1:P0}",n,u.percentComplete)),l.push(r("span",{"aria-label":o},[s(n)])),r("td",{role:"gridcell"},l)},_levels:function(e){var t,n,i,o=this.levels,r=e.summary,s=e.idx,a=e.id;for(n=0,i=o.length;n<i;n++)if(t=o[n],t.field==s)return r&&o.push({field:a,value:t.value+1}),t.value},_sortable:function(){var e,t,n,o,r,s=this,a=this.options.resourcesField,l=this.columns,c=this.header.find("th["+i.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&&(n=c.eq(o),t=n.data("kendoColumnSorter"),t&&t.destroy(),n.attr("data-"+i.ns+"field",e.field).kendoColumnSorter({dataSource:this.dataSource,change:d}));c=null},_selectable:function(){var t=this,n=this.options.selectable;n&&this.content.on(y+w,"tr",function(n){var i=e(this);t.editable&&t.editable.trigger("validate"),n.ctrlKey?t.clearSelection():t.select(i)})},select:function(e){var t=this.content.find(e),n=S.styles.selected;return t.length?(t.siblings(k+n).removeClass(n).attr("aria-selected",!1).end().addClass(n).attr("aria-selected",!0),void this.trigger("change")):this.content.find(k+n)},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,i=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 i=e(t.currentTarget);i.hasClass(o.editCell)||n()};i&&i.update!==!1&&(this._startEditHandler=function(n){var i=n.currentTarget?e(n.currentTarget):n,o=t._columnFromElement(i);t.editable||o&&o.editable&&t._editCell({cell:i,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 i,o,r=e.keyCode;switch(r){case v.ENTER:n(),s();break;case v.ESC:t.editable&&(i=t._editableContainer,o=t._modelFromElement(i),t.trigger("cancel",{model:o,cell:i})||t._closeCell(!0))}}),l?t.touch=t.content.kendoTouch({filter:"td",touchstart:function(e){a(e.touch)},doubletap:function(n){e(n.touch.initialTouch).is(r)||t._startEditHandler(n.touch)}}).data("kendoTouch"):t.content.on("mousedown"+w,"td",function(e){a(e)}).on("dblclick"+w,"td",function(n){e(n.target).is(r)||t._startEditHandler(n)}))},_editCell:function(t){var n,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=i.attr("type"),f=i.attr("bind"),p=i.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[f]="value:"+a.field,v[h]="date",a.format&&(v[p]=i._extractFormat(a.format)),n=function(t,n){e('<input type="text"/>').attr(v).appendTo(t).kendoDateTimePicker({format:n.format})}),this.editable=s.addClass(r.editCell).kendoEditable({fields:{field:a.field,format:a.format,editor:a.editor||n},model:c,clearContainer:!1}).data("kendoEditable"),u&&u.dateCompare&&m(u.dateCompare)&&u.message&&(e("<span "+i.attr("for")+'="'+a.field+'" class="k-invalid-msg"/>').hide().appendTo(s),s.find("[name="+a.field+"]").attr(i.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,n=this._editableContainer,i=this._modelFromElement(n),o=this._columnFromElement(n),r=o.field,s=n.data("modelCopy"),a={};a[r]=s.get(r),n.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()+i.duration())),this.trigger("update",{task:i,updateInfo:a}))},_draggable:function(){var t,n=this,o=null,r=!0,s=S.styles,a=i.support.isRtl(this.element),c="tr["+i.attr("level")+" = 0]:last",d={},h=this.options.editable,f=function(){o=null,t=null,r=!0,d={}},p=function(e){for(var t=e;t;){if(o.get("id")===t.get("id")){r=!1;break}t=n.dataSource.taskParent(t)}},m=function(){var n=e(t).height(),o=i.getOffset(t).top;u(t,{beforeLimit:o+.25*n,afterLimit:o+.75*n})},g=function(e){var n,o,r,a,l;t&&(n=e.location,o=s.dropAdd,r="add",a=parseInt(t.attr(i.attr("level")),10),n<=t.beforeLimit?(l=t.prev(),o=s.dropTop,r="insert-before"):n>=t.afterLimit&&(l=t.next(),o=s.dropBottom,r="insert-after"),l&&parseInt(l.attr(i.attr("level")),10)===a&&(o=s.dropMiddle),d.className=o,d.command=r)},v=function(){return n._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=n.editable;return t&&t.reorder!==!1&&t.trigger("validate")?void e.preventDefault():(o=n._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(){f()},dragcancel:function(){f()}}).data("kendoDraggable"),this._tableDropArea=this.content.kendoDropTargetArea({distance:0,group:"listGroup",filter:"tr[data-uid]",dragenter:function(e){t=e.dropTarget,p(n._modelFromElement(t)),m(),v().toggleClass(s.dropDenied,!r)},dragleave:function(){r=!0,v()},drop:function(){var e=n._modelFromElement(t),i=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?i-1:i;break;case"insert-after":s.orderId=e.parentId===o.parentId&&e.orderId>o.orderId?i:i+1}n.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=n._modelFromElement(n.content.find(c)),t=e.orderId,i={parentId:null,orderId:null!==o.parentId?t+1:t};n.trigger("update",{task:o,updateInfo:i})}}).data("kendoDropTargetArea"))},_resizable:function(){var t=this,n=S.styles,i=function(i){var o,r,s=e(i.currentTarget),a=t.resizeHandle,l=s.position(),c=l.left,d=h(s),u=s.closest("div"),p=i.clientX+e(window).scrollLeft(),m=t.options.columnResizeHandleWidth;return c+=u.scrollLeft(),a||(a=t.resizeHandle=e('<div class="'+n.resizeHandle+'"><div class="'+n.resizeHandleInner+'" /></div>')),o=s.offset().left+d,(r=p>o-m&&p<o+m)?(u.append(a),void a.show().css({top:l.top,left:c+d-m-1,height:f(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",i),this._columnResizable=this.header.kendoResizable({handle:k+n.resizeHandle,start:function(n){var i=e(n.currentTarget).data("th"),o="col:eq("+i.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=i,this.startLocation=n.x.location,this.columnWidth=h(i),this.table=r.add(s),this.totalWidth=this.table.width()-h(r.find("th:last"))},resize:function(e){var t=11,n=e.x.location-this.startLocation;this.columnWidth+n<t&&(n=t-this.columnWidth),this.table.css({minWidth:this.totalWidth+n}),this.col.width(this.columnWidth+n)},resizeend:function(){var e,n,i;t.element.removeClass("k-grid-column-resizing"),e=Math.floor(this.columnWidth),n=Math.floor(h(this.th)),i=t.columns[this.th.index()],t.trigger("columnResize",{column:i,oldWidth:e,newWidth:n}),this.table=this.col=this.th=null}}).data("kendoResizable"))},_modelFromElement:function(e){var t=e.closest("tr"),n=this.dataSource.getByUid(t.attr(i.attr("uid")));return n},_columnFromElement:function(e){var t=e.closest("td"),n=t.parent(),i=n.children().index(t);return this.columns[i]}});u(!0,c.GanttList,{styles:C})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e){var t=[],n=e.workWeekStart;for(t.push(n);e.workWeekEnd!=n;)n>6?n-=7:n++,t.push(n);return t}function i(){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,f=e.extend,p=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')#"),M=kendo.template("#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"),R=kendo.template("#=kendo.toString(start, 'MMM')#"),I=kendo.template("#=kendo.toString(start, 'yyyy')#"),F=kendo.template('<div class="#=styles.marquee#"><div class="#=styles.marqueeColor#"></div></div>'),z=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>'),P=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="#=styles.taskDetails#"><strong>#=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=n(this.options),this._headerTree=t.headerTree,this._taskTree=t.taskTree,this._taskTemplate=t.taskTemplate?kendo.template(t.taskTemplate,f({},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.height(this.element.height()-h(this.header))},createLayout:function(e){var t=this._headers(e),n=this._colgroup(),i=this._headerTree,o=a("thead",null,t),r=a("table",{style:{width:this._tableWidth+"px"}},[n,o]);i.render([r]),this.headerRow=this.header.find("table:first tr").last()},_slotDimensions:function(){var e,t,n,i,o=this.headerRow[0].children,r=this._timeSlots();for(n=0,i=o.length;n<i;n++)t=o[n],e=r[n],e.offsetLeft=t.offsetLeft,e.offsetWidth=t.offsetWidth},render:function(e){var t,n,i=e.length,o=O.styles,r=this._rowsTable(i),s=this._columnsTable(i),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&&(n=c.row*e.length,this.content.find(D+o.tasksTable).height(n),t.height(n)),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,n,i=[],o=O.styles,r=[null,{className:o.alt}];for(n=0;n<e;n++)t=a("tr",r[n%2],[a("td",null,[l(" ")])]),i.push(t);return this._createTable(1,i,{className:o.rowsTable})},_columnsTable:function(){var e,t,n,i,o,r=[],s=O.styles,c=this._timeSlots(),d=c.length,u=0;for(o=0;o<d;o++)t=c[o],i={},n=t.span,u+=n,1!==n&&(i.colspan=n),t.isNonWorking&&(i.className=s.nonWorking),r.push(a("td",i,[l(" ")]));return e=a("tr",null,r),this._createTable(u,[e],{className:s.columnsTable})},_tasksTable:function(e){var t,n,i,o,r,s,l,c,d=[],u=O.styles,h=this._taskCoordinates={},f=this._calculateMilestoneWidth(),p=Math.round(f.width),m=this.options.resourcesField,v=[u.resource,u.resourceAlt],_=this.options.calculatedSize,b=this._calculateResourcesMargin(),w=this._calculateTaskBorderWidth(),y=function(e){var t=i.left,n=t+i.width;o.isMilestone()&&(t-=p/2,n=t+p),h[o.id]={start:t,end:n,rowIndex:e}};for(l=0,c=e.length;l<c;l++)o=e[l],i=this._taskPosition(o),i.borderWidth=w,t=a("tr",null),n=a("td"),o.start<=this.end&&o.end>=this.start&&(n.children.push(this._renderTask(e[l],i)),o[m]&&o[m].length&&(r=g?this._tableWidth-i.left:Math.max(i.width||f.clientWidth,0)+i.left,s={width:this._tableWidth-(r+b)+"px"},s[g?"right":"left"]=r+"px",_&&(s.height=_.cell+"px"),n.children.push(a("div",{className:u.resourcesWrap,style:s},this._renderResources(o[m],v[l%2])))),y(l)),t.children.push(n),d.push(t);return this._createTable(1,d,{className:O.styles.tasksTable})},_createTable:function(e,t,n){var i,o,r,s=[];for(r=0;r<e;r++)s.push(a("col"));return i=a("colgroup",null,s),o=a("tbody",null,t),n.style||(n.style={}),n.style.width=this._tableWidth+"px",a("table",n,[i,o])},_calculateTableWidth:function(){var e,t,n,i,o=this._timeSlots(),r=0,s=0;for(n=0,i=o.length;n<i;n++)e=o[n].span,s+=e,e>r&&(r=e);return t=Math.round(s*this.options.slotSize/r)},_calculateMilestoneWidth:function(){var t,n,i=O.styles.task+" "+O.styles.taskMilestone,o=e("<div class='"+i+"' style='visibility: hidden; position: absolute'>");return this.content.append(o),n=o[0].getBoundingClientRect(),t={width:n.right-n.left,clientWidth:o[0].clientWidth},o.remove(),t},_calculateResourcesMargin:function(){var t,n=e("<div class='"+O.styles.resourcesWrap+"' style='visibility: hidden; position: absolute'>");return this.content.append(n),t=parseInt(n.css(g?"margin-right":"margin-left"),10),n.remove(),t},_calculateTaskBorderWidth:function(){var t,n,i=O.styles.task+" "+O.styles.taskSingle,o=e("<div class='"+i+"' style='visibility: hidden; position: absolute'>");return this.content.append(o),n=kendo.getComputedStyles(o[0],["border-left-width"]),t=parseFloat(n["border-left-width"],10),o.remove(),t},_renderTask:function(e,t){var n,i,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?i=this._renderSummary(e,t):e.isMilestone()?(i=this._renderMilestone(e,t),h.className+=" "+l.taskMilestoneWrap):i=this._renderSingleTask(e,t),n=a("div",h,[i]),r&&r.dependencyCreate!==!1&&(n.children.push(a("div",{className:l.taskDot+" "+l.taskDotStart})),n.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",n.children.push(a("div",{className:l.taskDragHandle,style:u}))),n},_renderSingleTask:function(e,t){var n,i,o,r=O.styles,s=Math.round(t.width*e.percentComplete),d=[],u=this.options.editable;return null!==this._taskTemplate?n=c(this._taskTemplate(e)):(n=l(e.title),d.push(a("div",{className:r.taskComplete,style:{width:s+"px"}}))),i=a("div",{className:r.taskContent},[a("div",{className:r.taskTemplate},[n])]),d.push(i),u&&(u.destroy!==!1&&i.children.push(a("span",{className:r.taskActions},[a("a",{className:r.link+" "+r.taskDelete,href:"#"},[a("span",{className:r.icon+" "+r.iconDelete})])])),u.resize!==!1&&u.update!==!1&&(i.children.push(a("span",{className:r.taskResizeHandle+" "+r.taskResizeHandleWest})),i.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,n=a("div",{className:t.task+" "+t.taskMilestone,"data-uid":e.uid});return n},_renderSummary:function(e,t){var n=O.styles,i=Math.round(t.width*e.percentComplete),o=a("div",{className:n.task+" "+n.taskSummary,"data-uid":e.uid,style:{width:t.width+"px"}},[a("div",{className:n.taskSummaryProgress,style:{width:i+"px"}},[a("div",{className:n.taskSummaryComplete,style:{width:t.width+"px"}})])]);return o},_renderResources:function(e,t){var n,i,o,r=[];for(i=0,o=e.length;i<o;i++)n=e[i],r.push(a("span",{className:t,style:{color:n.get("color")}},[l(n.get("name"))]));return g&&r.reverse(),r},_taskPosition:function(e){var t=Math.round,n=t(this._offset(g?e.end:e.start)),i=t(this._offset(g?e.start:e.end));return{left:n,width:i-n}},_offset:function(e){var t,n,i,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&&(n=e-t.start,i=t.end-t.start,s=n/i*t.offsetWidth),g&&(s=t.offsetWidth+1-s),t.offsetLeft+s):0},_slotIndex:function(e,t,n){var i,o=this._timeSlots(),r=0,s=o.length-1;n&&(o=[].slice.call(o).reverse());do i=Math.ceil((s+r)/2),o[i][e]<t?r=i:(i===s&&i--,s=i);while(r!==s);return n&&(r=o.length-1-r),r},_timeByPosition:function(t,n,i){var o,r,s,a=this._slotByPosition(t);return n?i?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 n=t-e(D+O.styles.tasksTable).offset().left,i=this._slotIndex("offsetLeft",n,g);return this._timeSlots()[i]},_renderDependencies:function(e){var t,n,i=[],o=this._dependencyTree;for(t=0,n=e.length;t<n;t++)i.push.apply(i,this._renderDependency(e[t]));o.render(i)},_renderDependency:function(e){var t,n,i,o,r=this._taskCoordinates[e.predecessorId],s=this._taskCoordinates[e.successorId];if(!r||!s)return[];for(n="_render"+["FF","FS","SF","SS"][g?3-e.type:e.type],t=this[n](r,s),i=0,o=t.length;i<o;i++)t[i].attr["data-uid"]=e.uid;return t},_renderFF:function(e,t){var n=this._dependencyFF(e,t,!1);return n[n.length-1].children[0]=this._arrow(!0),n},_renderSS:function(e,t){var n=this._dependencyFF(t,e,!0);return n[0].children[0]=this._arrow(!1),n.reverse()},_renderFS:function(e,t){var n=this._dependencyFS(e,t,!1);return n[n.length-1].children[0]=this._arrow(!1),n},_renderSF:function(e,t){var n=this._dependencyFS(t,e,!0);return n[0].children[0]=this._arrow(!0),n.reverse()},_dependencyFF:function(e,t,n){var i,o=this,r=[],s=0,a=0,l=0,c=0,d=n?"start":"end",u=2,h=1,f=this._rowHeight,p=10,m=e.rowIndex*f+Math.floor(f/2)-1,g=t.rowIndex*f+Math.floor(f/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=p,i=t[d]-e[d],i>0!==n&&(l=Math.abs(i)+p),n?(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]),n||(l-=h,s-=l),_(),r},_dependencyFS:function(e,t,n){var i=this,o=[],r=0,s=0,a=0,l=0,c=this._rowHeight,d=Math.floor(c/2),u=10,h=2*u,f=t.start-e.end,p=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(i._line(_.line+" "+_.lineHorizontal,{left:r+"px",top:s+"px",width:a+"px"}))},w=function(){o.push(i._line(_.line+" "+_.lineVertical,{left:r+"px",top:s+"px",height:l+"px"}))};return r=e.end,s=g,a=u,n&&(r+=m,f>h&&(a=f-(u-p)),a-=m),b(),r+=a-p,f<=h&&(l=n?Math.abs(v-g)-d:d,v<g?(s-=l,l+=p,w()):(w(),s+=l),a=e.end-t.start+h,a<u&&(a=u),r-=a-p,b()),v<g?(l=s-v,s=v,l+=p,w()):(l=v-s,w(),s+=l),a=t.start-r,n||(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,n,i=this._timeSlots(),o=i.length,r=[];for(e=0;e<o;e++)for(t=0,n=i[e].span;t<n;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 n,i,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(z({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),n=h(this._resizeTooltip),i=r-n,i<0&&(i=r+this._rowHeight),this._resizeTooltipTop=i},_updateResizeHint:function(t,n,i){var o=this._offset(g?n:t),r=this._offset(g?t:n),s=r-o,a=i!==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(z({styles:O.styles,start:t,end:n,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,n,i){var o,r,s,a;this._removePercentCompleteTooltip(),o=this._percentCompleteResizeTooltip=e(P({styles:O.styles,text:i})).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:n-r}),s.css("left",r-a)},_removePercentCompleteTooltip:function(){this._percentCompleteResizeTooltip&&this._percentCompleteResizeTooltip.remove(),this._percentCompleteResizeTooltip=null},_updateDependencyDragHint:function(e,t,n){this._removeDependencyDragHint(),n?this._creteVmlDependencyDragHint(e,t):this._creteDependencyDragHint(e,t)},_creteDependencyDragHint:function(t,n){var i=O.styles,o=n.x-t.x,r=n.y-t.y,s=Math.sqrt(o*o+r*r),a=Math.atan(r/o);o<0&&(a+=Math.PI),e("<div class='"+i.line+" "+i.lineHorizontal+" "+i.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,n){var i=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='"+n.x+"px,"+n.y+"px'></kvml:line>").appendTo(this.content);i[0].outerHTML=i[0].outerHTML},_removeDependencyDragHint:function(){this.content.find(D+O.styles.dependencyHint).remove()},_createTaskTooltip:function(t,n,i){var o,r=O.styles,s=this.options,a=this.content,l=a.offset(),c=a.width(),d=kendo.scrollLeft(a),f=e(n).parents("tr").first(),p=f.offset(),m=s.tooltip&&s.tooltip.template?kendo.template(s.tooltip.template):B,v=g?i-(l.left+d+kendo.support.scrollbar()):i-(l.left-d),_=p.top+h(f)-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)<p.top-l.top&&b.css("top",p.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,n=e.width(),i=t+n,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,f=c.left,p=l.width(),m=f+p,g=kendo.support.scrollbar();r<d?l.scrollTop(l.scrollTop()+(r-d)):a>h&&l.scrollTop(l.scrollTop()+(a+g-h)),t<f&&n>p&&i<m||i>m&&n<p?l.scrollLeft(l.scrollLeft()+(i+g-m)):(i>m&&n>p&&t>f||t<f&&n<p)&&l.scrollLeft(l.scrollLeft()+(t-f))},_scrollToDate:function(e){var t,n=this.start,i=this.end;e>=n&&e<i&&(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,n,i,o,r,s,c,d,u=[],h=O.styles;for(r=0,s=e.length;r<s;r++){for(t=e[r],n=[],c=0,d=t.length;c<d;c++)i=t[c],o=l(i.text),n.push(a("th",{colspan:i.span,className:h.header+(i.isNonWorking?" "+h.nonWorking:"")},[o]));u.push(a("tr",null,n))}return u},_hours:function(e,t){var n,i,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);e<t;)n=new Date(e),o=n.getHours(),i=o>=a&&o<l,n.setHours(n.getHours()+c),o==n.getHours()&&n.setHours(n.getHours()+2*c),s.showWorkHours&&!i||r.push({start:e,end:n,isNonWorking:!i,span:1}),e=n;return r},_days:function(e,t){var n,i,o=[];for(e=new Date(e),t=new Date(t);e<t;)n=t<kendo.date.nextDay(e)?t:kendo.date.nextDay(e),i=this._isWorkDay(e),this.options.showWorkDays&&!i||o.push({start:e,end:n,isNonWorking:!i,span:1}),e=n;return o},_weeks:function(e,t){var n,i,o,r=[],s=this.calendarInfo().firstDay;for(e=new Date(e),t=new Date(t);e<t;)n=kendo.date.dayOfWeek(kendo.date.addDays(e,1),s,1),n>t&&(n=t),i=this._days(e,n),o=i.length,o>0&&r.push({start:i[0].start,end:i[o-1].end,span:o}),e=n;return r},_months:function(e,t){var n,i,o,r,s=[];for(e=new Date(e),t=new Date(t);e<t;)n=new Date(e),i=kendo.date.firstDayOfMonth(new Date(n.setMonth(n.getMonth()+1))),n=t<i?t:i,o=this._days(e,n),r=o.length,r>0&&s.push({start:o[0].start,end:o[r-1].end,span:r}),e=n;return s},_years:function(e,t){var n,i,o,r=[];for(e=new Date(e),t=new Date(t);e<t;)n=new Date(e),n=kendo.date.firstDayOfMonth(new Date(n.setMonth(12))),n>=t&&(n=t),o=n.getMonth()||12,i=o-e.getMonth(),r.push({start:e,end:n,span:i}),e=n;return r},_slotHeaders:function(e,t){var n,i,o,r=[];for(i=0,o=e.length;i<o;i++)n=e[i],r.push({text:t(n),isNonWorking:!!n.isNonWorking,span:n.span});return r},_isWorkDay:function(e){var t,n,i=e.getDay(),o=this._workDays;for(t=0,n=o.length;t<n;t++)if(o[t]===i)return!0;return!1},calendarInfo:function(){return kendo.getCulture().calendars.standard},_renderCurrentTime:function(){var t,n=this._getCurrentTime(),i=this._offset(n),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",n)],n<t.start||n>t.end||(s.length&&a.length&&(i+=a.offset().left-s.offset().left),o.css({left:i+"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(p(this._renderCurrentTime,this),e.updateInterval))}});f(!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,n,i,o=[],r=this._days(this.start,this.end),s=[];for(n=0,i=r.length;n<i;n++)e=r[n],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:M,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(e){var t,n=this.options.range,i=this.calendarInfo(),o=i.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)),n&&n.start&&(this.start=kendo.date.getDate(n.start)),n&&n.end&&(t=new Date(n.end),this.end=kendo.date.getDate(t)<n.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:M,monthHeaderTemplate:R,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(e){var t,n=this.options.range;this.start=kendo.date.firstDayOfMonth(e.start),this.end=kendo.date.addDays(kendo.date.getDate(kendo.date.lastDayOfMonth(e.end)),1),n&&n.start&&(this.start=kendo.date.getDate(n.start)),n&&n.end&&(t=new Date(n.end),this.end=kendo.date.getDate(t)<n.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:I,monthHeaderTemplate:R,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(e){var t,n=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))),n&&n.start&&(this.start=kendo.date.firstDayOfMonth(n.start)),n&&n.end&&(t=kendo.date.firstDayOfMonth(n.end),this.end=kendo.date.getDate(new Date(t.setMonth(t.getMonth()+1))))},_createSlots:function(){var t=[],n=this._months(this.start,this.end);return e(n).each(function(e,t){t.span=1}),t.push(this._years(this.start,this.end)),t.push(n),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,n=this,i=this.options,o=function(){var o,r,s=typeof i.rowHeight===b?i.rowHeight:i.rowHeight+"px",a=e(kendo.format(L,s)),l=n.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>"),i.rowHeight&&(this._calculatedSize=o())},_domTrees:function(){var e=r.styles,t=kendo.dom.Tree,n=this.wrapper;this._headerTree=new t(n.find(D+e.gridHeaderWrap)[0]),this._taskTree=new t(n.find(D+e.tasksWrapper)[0]),this._dependencyTree=new t(n.find(D+e.dependenciesWrapper)[0])},_views:function(){var e,t,n,i,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||(n=t?"string"!=typeof e.type?e.title:e.type:e,i=H[n],i&&(t&&(e.type=i.type),i.title=this.options.messages.views[n]),e=f({title:n},i,t?e:{}),n&&(this.views[n]=e,o&&!e.selected||(o=n)));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,n=this.views;for(t in n){if(!e)return t;e--}},_initializeView:function(e){var n,i,o,r=this.views[e];if(r){if(n=r.type,"string"==typeof n&&(n=kendo.getter(r.type)(window)),!n)throw Error("There is no such view");i={},f(i,this.options.range,r.range),o=r.date||this.options.date,r=new n(this.wrapper,t(f(!0,{headerTree:this._headerTree,taskTree:this._taskTree,dependencyTree:this._dependencyTree,calculatedSize:this._calculatedSize},r,this.options,{date:o,range:i})))}return r},_unbindView:function(e){e&&e.destroy()},_range:function(e){var t,n,i={field:"start",dir:"asc"},o={field:"end",dir:"desc"};return e&&e.length?(t=new _(e).sort(i).toArray()[0].start||new Date,n=new _(e).sort(o).toArray()[0].end||new Date,{start:new Date(t),end:new Date(n)}):{start:new Date,end:new Date}},_render:function(e){var t=this.view(),n=this._range(e),i=t.options.date;this._tasks=e,t.range(n),t.renderLayout(),t.render(e),i&&t._scrollToDate(i)},_renderDependencies:function(e){this.view()._renderDependencies(e)},_taskByUid:function(e){var t,n,i=this._tasks,o=i.length;for(n=0;n<o;n++)if(t=i[n],t.uid===e)return t},_draggable:function(){var e,t,n,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(i){var r=s.view();return e=i.currentTarget.parent(),t=s._taskByUid(i.currentTarget.attr("data-uid")),s.trigger("moveStart",{task:t})?void i.preventDefault():(n=t.start,o=r._timeByPosition(i.x.location,a)-n,r._createDragHint(e),e.css("opacity",.5),clearTimeout(s._tooltipTimeout),void(s.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){var i,r,l;s.dragInProgress&&(i=s.view(),r=new Date(i._timeByPosition(e.x.location,a)-o),l=r,s.trigger("move",{task:t,start:r})||(n=r,g&&(l=new Date(n.getTime()+t.duration())),i._updateDragHint(l)))},15)).bind("dragend",function(){s.trigger("moveEnd",{task:t,start:n}),d()}).bind("dragcancel",function(){d()}).userEvents.bind("select",function(){i()}))},_resizable:function(){var e,t,n,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(i){return s=i.currentTarget.hasClass(c.taskResizeHandleWest),g&&(s=!s),e=i.currentTarget.closest(D+c.task),t=a._taskByUid(e.attr("data-uid")),a.trigger("resizeStart",{task:t})?void i.preventDefault():(n=t.start,o=t.end,a.view()._createResizeHint(t),clearTimeout(a._tooltipTimeout),void(a.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){var i,r;a.dragInProgress&&(i=a.view(),r=i._timeByPosition(e.x.location,l,!s),s?n=r<o?r:o:o=r>n?r:n,a.trigger("resize",{task:t,start:n,end:o})||i._updateResizeHint(n,o,s))},15)).bind("dragend",function(){a.trigger("resizeEnd",{task:t,resizeStart:s,start:n,end:o}),u()}).bind("dragcancel",function(){u()}).userEvents.bind("select",function(){i()}))},_percentResizeDraggable:function(){var e,t,n,o,s,a,l,c,d,h,f=this,p=r.styles,m=this.options.editable,v=function(){f.view()._removePercentCompleteTooltip(),t=null,e=null,f.dragInProgress=!1},_=function(e){t.find(D+p.taskComplete).width(e).end().siblings(D+p.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+p.taskDragHandle,holdToDrag:!1}),this._percentDraggable.bind("dragstart",function(i){return f.trigger("percentResizeStart")?void i.preventDefault():(t=i.currentTarget.siblings(D+p.task),e=f._taskByUid(t.attr("data-uid")),l=e.percentComplete,n=t.offset(),o=this.element.offset(),s=t.find(D+p.taskComplete).width(),a=u(t),clearTimeout(f._tooltipTimeout),void(f.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){if(f.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=n.top-o.top,d=n.left+t-o.left,g&&(d+=a-2*t),f.view()._updatePercentCompleteTooltip(c,d,l)}},15)).bind("dragend",function(){f.trigger("percentResizeEnd",{task:e,percentComplete:l/100}),v()}).bind("dragcancel",function(){_(s),v()}).userEvents.bind("select",function(){i()}))},_createDependencyDraggable:function(){var t,n,o,s=this,a=e(),l=e(),c=m.msie&&m.version<9,d=r.styles,f=this.options.editable,p=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))};f&&f.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 i,r;return s.trigger("dependencyDragStart")?void e.preventDefault():(t=e.currentTarget.css("display","block").addClass(d.hovered),t.parent().addClass(d.origin),i=t.offset(),r=s.wrapper.find(D+d.tasksWrapper).offset(),n=Math.round(i.left-r.left+h(t)/2),o=Math.round(i.top-r.top+u(t)/2),clearTimeout(s._tooltipTimeout),void(s.dragInProgress=!0))}).bind("drag",kendo.throttle(function(t){var i,r,u,h;s.dragInProgress&&(s.view()._removeDependencyDragHint(),i=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:n,y:o},{x:u,y:h},c),g(!1),a=i.hasClass(d.taskDot)?i:e(),l=i.closest(D+d.taskWrap),g(!0))},15)).bind("dragend",function(){var e,n,i,o,r;a.length&&(e=t.hasClass(d.taskDotStart),n=a.hasClass(d.taskDotStart),i=e?n?3:2:n?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:i,predecessor:o,successor:r})),p()}).bind("dragcancel",function(){p()}).userEvents.bind("select",function(){i()}))},_selectable:function(){var t=this,n=r.styles;this.options.selectable&&this.wrapper.on(y+w,D+n.task,function(n){n.stopPropagation(),n.ctrlKey?t.trigger("clear"):t.trigger("select",{uid:e(this).attr("data-uid")})}).on(y+w,D+n.taskWrap,function(t){t.stopPropagation(),e(this).css("z-index","0");var i=e(document.elementFromPoint(t.clientX,t.clientY));i.hasClass(n.line)&&i.click(),e(this).css("z-index","")}).on(y+w,D+n.tasksWrapper,function(){t.selectDependency().length>0?t.clearSelection():t.trigger("clear")}).on(y+w,D+n.line,function(e){e.stopPropagation(),t.selectDependency(this)})},select:function(e){var t=this.wrapper.find(e),n=r.styles;return t.length?(this.clearSelection(),t.addClass(n.selected),void(kendo.support.mobileOS&&t.parent().addClass(n.taskWrapActive))):this.wrapper.find(D+n.task+D+n.selected)},selectDependency:function(t){var n,i=this.wrapper.find(t),o=r.styles;return i.length?(this.clearSelection(),this.trigger("clear"),n=e(i).attr("data-uid"),void this.wrapper.find(D+o.line+"[data-uid='"+n+"']").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,n=r.styles,i=this.options.editable;i&&(this._tabindex(),this.wrapper.on(y+w,D+n.taskDelete,function(i){t.trigger("removeTask",{uid:e(this).closest(D+n.task).attr("data-uid")}),i.stopPropagation(),i.preventDefault()}).on(T+w,function(e){var n,i=t.options.editable;e.keyCode===v.DELETE&&i&&i.dependencyDestroy!==!1&&(n=t.selectDependency(),n.length&&(t.trigger("removeDependency",{uid:n.attr("data-uid")}),t.clearSelection()))}),kendo.support.mobileOS?this.touch=this.wrapper.kendoTouch({filter:D+n.task,doubletap:function(n){t.options.editable.update!==!1&&t.trigger("editTask",{uid:e(n.touch.currentTarget).attr("data-uid")})}}).data("kendoTouch"):this.wrapper.on(k+w,D+n.task,function(n){t.options.editable.update!==!1&&(t.trigger("editTask",{uid:e(this).attr("data-uid")}),n.stopPropagation(),n.preventDefault())}))},_tooltip:function(){var t,n=this,i=this.options.tooltip,o=r.styles,s=function(e){t=e.clientX};i&&i.visible===!1||(kendo.support.mobileOS?(this.wrapper.on(y+w,D+o.taskDelete,function(e){e.stopPropagation(),n.view()._removeTaskTooltip()}).on(S+w,D+o.task,function(t){var i=e(t.relatedTarget).parents(D+o.taskWrap,D+o.task);0===i.length&&n.view()._removeTaskTooltip()}),this.touch&&this.touch.bind("tap",function(t){var i=t.touch.target,o=n._taskByUid(e(i).attr("data-uid")),r=t.touch.x.client;n.view()._taskTooltip&&n.view()._removeTaskTooltip(),n.view()._createTaskTooltip(o,i,r)}).bind("doubletap",function(){n.view()._removeTaskTooltip()})):this.wrapper.on(C+w,D+o.task,function(){var i=this,o=n._taskByUid(e(this).attr("data-uid"));n.dragInProgress||(n._tooltipTimeout=setTimeout(function(){n.view()._createTaskTooltip(o,i,t)},800),e(this).on(x,s))}).on(S+w,D+o.task,function(){clearTimeout(n._tooltipTimeout),n.view()._removeTaskTooltip(),e(this).off(x,s)}))}}),f(!0,r,{styles:o})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e){return"["+m.attr("uid")+(e?"='"+e+"']":"]")}function i(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,n,i,o,r,s;if(e.filter("[name=end], [name=start]").length){for(t=e.attr("name"),n=m.widgetInstance(e,m.ui),i={},o=e;o!==window&&!r;)o=o.parent(),r=o.data("kendoEditable");return!(s=r?r.options.model:null)||(i.start=s.start,i.end=s.end,i[t]=n?n.value():m.parseDate(e.value()),i.start<=i.end)}return!0}function r(t,n){var i=t.parents("["+m.attr("role")+'="gantt"]'),o=[],r=s(i);t.attr(H,0),n&&r.each(function(t,n){o[t]=e(n).scrollTop()});try{t[0].setActive()}catch(a){t[0].focus()}n&&r.each(function(t,n){e(n).scrollTop(o[t])})}function s(t){return e(t).parentsUntil("body").filter(function(e,t){var n=m.getComputedStyles(t,["overflow"]);return"visible"!=n.overflow}).add(window)}var a,l,c,d,u,h,f,p,m=window.kendo,g="matchMedia"in window,v=m.support.browser,_=m.support.mobileOS,b=m.Observable,w=m.ui.Widget,y=m.data.DataSource,k=m.data.ObservableObject,x=m.data.ObservableArray,C=m.data.Query,S=e.isArray,T=e.inArray,D=m.isFunction,A=e.proxy,E=e.extend,M=e.isPlainObject,R=e.map,I=m._outerWidth,F=m._outerHeight,z=m.keys,P=3,B=".kendoGantt",L="p0",H="tabIndex",N="click",O="width",V="string",U={down:{origin:"bottom left",position:"top left"},up:{origin:"top left",position:"bottom left"}},W="aria-activedescendant",j="gantt_active_cell",q="action-option-focused",G=".",$="Are you sure you want to delete this task?",Y="Are you sure you want to delete this dependency?",K=m.template('<button class="#=styles.buttonToggle#" type="button"><span class="#=styles.iconToggle#"></span></button>'),Q='<button class="#=styles.button# #=className#" type="button" #if (action) {#data-action="#=action#"#}#><span class="#=iconClass#"></span><span>#=text#</span></button>',X='<a class="#=className#" #=attr# href="\\#">#=text#</a>',Z=m.template('<li class="#=styles.currentView# #=styles.viewButtonDefault#"><a href="\\#" class="#=styles.link#">&nbps;</a></li>'),J=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>'),ee=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>'),te=function(t,n){var i={name:n.field},o=n.model.fields[n.field].validation;o&&M(o)&&o.message&&(i[m.attr("dateCompare-msg")]=o.message),e('<input type="text" required '+m.attr("type")+'="date" '+m.attr("role")+'="datetimepicker" '+m.attr("bind")+'="value:'+n.field+'" '+m.attr("validate")+"='true' />").attr(i).appendTo(t),e("<span "+m.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},ne=function(t,n){e('<a href="#" class="'+n.styles.button+'">'+n.messages.assignButton+"</a>").click(n.click).appendTo(t)},ie={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",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"}},oe=b.extend({init:function(e,t){b.fn.init.call(this),this.element=e,this.options=E(!0,{},this.options,t),this._popup()},options:{direction:"down",navigatable:!1},_current:function(e){var t=p.styles,n=this.list.find(G+t.focused),i=n[e]();i.length&&(n.removeClass(t.focused).removeAttr("id"),i.addClass(t.focused).attr("id",q),this.list.find("ul").removeAttr(W).attr(W,q))},_popup:function(){var t=this,n=p.styles,i="li"+G+n.item,o=G+n.toolbar.appendButton,r=this.options.messages.actions,s=this.options.navigatable;this.list=e(ee({styles:n,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,E({anchor:this.element.find(o),open:function(){t._adjustListWidth()},animation:this.options.animation},U[this.options.direction])),this.element.on(N+B,o,function(i){var o=e(this),r=o.attr(m.attr("action"));i.preventDefault(),r?t.trigger("command",{type:r}):(t.popup.open(),s&&t.list.find("li:first").addClass(n.focused).attr("id",q).end().find("ul").attr({TABINDEX:0,"aria-activedescendant":q}).focus())}),this.list.find(i).hover(function(){e(this).addClass(n.hovered)},function(){e(this).removeClass(n.hovered)}).end().on(N+B,i,function(){t.trigger("command",{type:e(this).attr(m.attr("action"))}),t.popup.close()}),s&&(this.popup.bind("close",function(){t.list.find(i).removeClass(n.focused).end().find("ul").attr(H,0),t.element.parents("["+m.attr("role")+'="gantt"]').find(G+n.gridContent+" > table:first").focus()}),this.list.find("ul").on("keydown"+B,function(e){var i=e.keyCode;switch(i){case z.UP:e.preventDefault(),t._current("prev");break;case z.DOWN:e.preventDefault(),t._current("next");break;case z.ENTER:t.list.find(G+n.focused).click();break;case z.ESC:e.preventDefault(),t.popup.close()}}))},_adjustListWidth:function(){var e,t,n=this.list,i=p.styles,o=n[0].style.width,r=this.element.find(G+i.toolbar.appendButton),s=I(n);!n.data(O)&&o||(e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=e?parseFloat(e.width):I(r),e&&(v.mozilla||v.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==n.css("box-sizing")?t-(I(n)-n.width()):t,s>o&&(o=s),n.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()}}),re=function(e,t){return function(n){var i,o;if(n=S(n)?{data:n}:n,i=n||{},o=i.data,i.data=o,!(i instanceof e)&&i instanceof y)throw Error("Incorrect DataSource type. Only "+t+" instances are supported");return i instanceof e?i:new e(i)}},se=m.data.Model.define({id:"id",fields:{id:{type:"number"},predecessorId:{type:"number"},successorId:{type:"number"},type:{type:"number"}}}),ae=y.extend({init:function(e){y.fn.init.call(this,E(!0,{},{schema:{modelBase:se,model:se}},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),n=this.successors(e);return t.push.apply(t,n),t},_dependencies:function(e,t){var n=this.view(),i={field:e,operator:"eq",value:t};return n=new C(n).filter(i).toArray()}});ae.create=re(ae,"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,n,i=["start","end"];for(n=0;n<i.length;n++)t=new Date(this.get(i[n]).getTime()+e),this.set(i[n],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=y.extend({init:function(e){y.fn.init.call(this,E(!0,{},{schema:{modelBase:l,model:l}},e))},remove:function(e){var t=e.get("parentId"),n=this.taskAllChildren(e);return this._removeItems(n),e=y.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=y.fn.insert.call(this,e,t),this._reorderSiblings(t,this.taskSiblings(t).length-1),this._resolveSummaryFields(this.taskParent(t)),t},taskChildren:function(e){var n,i=this.view(),o={field:"parentId",operator:"eq",value:null},r=this._sort&&this._sort.length?this._sort:{field:"orderId",dir:"asc"};if(e){if(n=e.get("id"),n===t||null===n||""===n)return[];o.value=n}return i=new C(i).filter(o).sort(r).toArray()},taskAllChildren:function(e){var t=[],n=this,i=function(e){var o=n.taskChildren(e);t.push.apply(t,o),R(o,i)};return e?i(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,n=this.taskParent(e);null!==n;)t+=1,n=this.taskParent(n);return t},taskTree:function(e){var t,n,i,o,r=[],s=this.taskChildren(e);for(n=0,i=s.length;n<i;n++)t=s[n],r.push(t),t.get("expanded")&&(o=this.taskTree(t),r.push.apply(r,o));return r},update:function(e,n){var i,o,r=this,s=function(e,t){var n,i,o=r.taskAllChildren(e);for(n=0,i=o.length;n<i;n++)o[n]._offset(t)},a=function(e){var t=e.field,n=e.sender;switch(t){
case"start":r._resolveSummaryStart(r.taskParent(n)),s(n,n.get(t).getTime()-i.getTime());break;case"end":r._resolveSummaryEnd(r.taskParent(n));break;case"percentComplete":r._resolveSummaryPercentComplete(r.taskParent(n));break;case"orderId":r._reorderSiblings(n,i)}};n.parentId!==t&&(i=e.get("parentId"),i!==n.parentId&&(e.set("parentId",n.parentId),r._childRemoved(i,e.get("orderId")),e.set("orderId",r.taskSiblings(e).length-1),r._resolveSummaryFields(r.taskParent(e))),delete n.parentId),e.bind("change",a);for(o in n)i=e.get(o),e.set(o,n[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,n=function(e){var n,i,o,r=t.taskChildren(e),s=r[0].start.getTime();for(i=1,o=r.length;i<o;i++)n=r[i].start.getTime(),n<s&&(s=n);return new Date(s)};this._updateSummaryRecursive(e,"start",n)},_resolveSummaryEnd:function(e){var t=this,n=function(e){var n,i,o,r=t.taskChildren(e),s=r[0].end.getTime();for(i=1,o=r.length;i<o;i++)n=r[i].end.getTime(),n>s&&(s=n);return new Date(s)};this._updateSummaryRecursive(e,"end",n)},_resolveSummaryPercentComplete:function(e){var t=this,n=function(e){var n=t.taskChildren(e),i=new C(n).aggregate([{field:"percentComplete",aggregate:"average"}]);return i.percentComplete.average};this._updateSummaryRecursive(e,"percentComplete",n)},_updateSummaryRecursive:function(e,t,n){var i,o;e&&(i=n(e),e.set(t,i),o=this.taskParent(e),o&&this._updateSummaryRecursive(o,t,n))},_childRemoved:function(e,t){var n,i,o=null===e?null:this.get(e),r=this.taskChildren(o);for(n=t,i=r.length;n<i;n++)r[n].set("orderId",n);this._resolveSummaryFields(o)},_reorderSiblings:function(e,t){var n,i=e.get("orderId"),o=i>t,r=o?t:i,s=o?i:t,a=o?r:r+1,l=this.taskSiblings(e);for(s=Math.min(s,l.length-1),n=r;n<=s;n++)l[n]!==e&&(l[n].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=re(c,"GanttDataSource"),E(!0,m.data,{GanttDataSource:c,GanttTask:l,GanttDependencyDataSource:ae,GanttDependency:se}),d={desktop:{dateRange:te,resources:ne}},u=m.Observable.extend({init:function(e,t){m.Observable.fn.init.call(this),this.element=e,this.options=E(!0,{},this.options,t),this.createButton=this.options.createButton},fields:function(t,n){var i,o=this,r=this.options,s=r.messages.editor,a=r.resources,l=function(e){e.preventDefault(),a.editor(o.container.find(G+p.styles.popup.resourcesField),n)};return r.editable.template?i=e.map(n.fields,function(e,t){return{field:t}}):(i=[{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}],n.get(a.field)&&i.push({field:a.field,title:s.resources,messages:s,editor:t.resources,click:l,styles:p.styles.popup})),i},_buildEditTemplate:function(e,t,n){var i,o,r,s,a=this.options.resources,l=this.options.editable.template,c=E({},m.Template,this.options.templateSettings),d=c.paramName,u=p.styles.popup,h="";if(l)typeof l===V&&(l=window.unescape(l)),h+=m.template(l,c)(e);else for(i=0,o=t.length;i<o;i++)r=t[i],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)?(n.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 n,i,o,r,s=t.buttons,a=p.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(n=0,i=s.length;n<i;n++)l+=this.createButton(s[n]);l+="</div></div></div>",o=this.element,this.popup&&this.popup.destroy(),r=this.popup=e(l).appendTo(o).eq(0).on("click",G+a.button,function(t){t.preventDefault(),r.close();var n=e(t.currentTarget).index();s[n].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,deactivate:function(){this.destroy(),o.focus()}}).getKendoWindow(),r.center().open()},_createPopupEditor:function(t){var n,i,o=this,r={},s=this.options.messages,a=p.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:p.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>",n=this.container=e(c).appendTo(this.element).eq(0).kendoWindow(E({modal:!0,resizable:!1,draggable:!0,title:s.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&o.trigger("cancel",{container:n,model:t})&&e.preventDefault()}},r)),i=n.kendoEditable({fields:h,model:t,clearContainer:!1,validateOnBlur:!0,target:o.options.target}).data("kendoEditable"),m.cycleForm(n),this.trigger("edit",{container:n,model:t})?o.trigger("cancel",{container:n,model:t}):(n.data("kendoWindow").center().open(),n.on(N+B,G+a.buttonCancel,function(e){e.preventDefault(),e.stopPropagation(),o.trigger("cancel",{container:n,model:t})}),n.on(N+B,G+a.buttonSave,function(e){var i,r,s,a,l;for(e.preventDefault(),e.stopPropagation(),i=o.fields(d.desktop,t),r={},a=0,l=i.length;a<l;a++)s=i[a].field,r[s]=t.get(s);o.trigger("save",{container:n,model:t,updateInfo:r})}),n.on(N+B,G+a.buttonDelete,function(e){e.preventDefault(),e.stopPropagation(),o.trigger("remove",{container:n,model:t})})),i}}),f=w.extend({init:function(e,t){w.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",A(this.destroy,this)).close()},destroy:function(){this._dettachHandlers(),this.grid.destroy(),this.grid=null,this.window.destroy(),this.window=null,w.fn.destroy.call(this),m.destroy(this.wrapper),this.element=this.wrapper=null},_attachHandlers:function(){var t=p.styles,n=this.grid,i=this._cancelProxy=A(this._cancel,this);this.container.on(N+B,G+t.buttonCancel,this._cancelProxy),this._saveProxy=A(this._save,this),this.container.on(N+B,G+t.buttonSave,this._saveProxy),this.window.bind("close",function(e){e.userTriggered&&i(e)}),n.wrapper.on(N+B,"input[type='checkbox']",function(){var t=e(this),i=e(t).closest("tr"),o=n.dataSource.getByUid(i.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(G+p.styles.popup.resourcesField)||this.trigger("save",{container:this.wrapper,model:this.model}),this.close()},_initContainer:function(){var t=this,n=p.styles.popup,i=m.format('<div class="{0} {1}"><div class="{2} {3}"/></div>"',n.form,n.editForm,n.formContainer,n.resourcesFormContainer);i=e(i),this.container=i.find(G+n.resourcesFormContainer),this.window=i.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,n=this.options.messages,i=e('<div id="resources-grid"/>').appendTo(this.container);this.grid=new m.ui.Grid(i,{columns:[{field:"name",title:n.resourcesHeader,template:"<label><input type='checkbox' value='#=name#'# if (value > 0 && value !== null) {#checked='checked'# } #/>#=name#</labe>"},{field:"value",title:n.unitsHeader,template:function(e){var t=e.format,n=null!==e.value?e.value:"";return t?m.toString(n,t):n}}],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",defaultValue:""},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,n=this.options.buttons,i='<div class="'+p.styles.popup.buttonsContainer+'">';for(e=0,t=n.length;e<t;e++)i+=this.createButton(n[e]);i+="</div>",this.container.append(i)},_updateModel:function(){var e,t,n,i=[],o=this.grid.dataSource.data();for(t=0,n=o.length;t<n;t++)e=o[t].get("value"),null!==e&&e>0&&i.push(o[t]);this.model[this.resourcesField]=i}}),p=w.extend({init:function(e,t,n){S(t)&&(t={dataSource:t}),a={append:{text:"Add Task",action:"add",className:p.styles.toolbar.appendButton,iconClass:p.styles.toolbar.iconPlus},pdf:{text:"Export to PDF",className:p.styles.toolbar.pdfButton,iconClass:p.styles.toolbar.iconPdf}},w.fn.init.call(this,e,t),n&&(this._events=n),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:P,columns:[],views:[],dataSource:{},dependencies:{},resources:{},assignments:{},taskTemplate:null,messages:{save:"Save",cancel:"Cancel",destroy:"Delete",deleteTaskConfirmation:$,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 n=this.list;return e?(n.select(e),t):n.select()},clearSelection:function(){this.list.clearSelection()},destroy:function(){w.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),g&&(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 n,i=m.deepExtend({},this.options,t),o=this._events;t.views||(n=this.view().name,i.views=e.map(this.options.views,function(e){var t=M(e),i=t?"string"!=typeof e.type?e.title:e.type:e;return n===i?t?e.selected=!0:e={type:i,selected:!0}:t&&(e.selected=!1),e})),t.dataSource||(i.dataSource=this.dataSource),t.dependencies||(i.dependencies=this.dependencies),t.resources||(i.resources=this.resources),t.assignments||(i.assignments=this.assignments),this.destroy(),this.element.empty(),this.options=null,this.init(this.element,i,o),w.fn._setEvents.call(this,i)},_attachEvents:function(){this._resizeHandler=A(this.resize,this,!1),e(window).on("resize"+B,this._resizeHandler)},_wrapper:function(){var e=p.styles,t=[e.icon,e.resizeHandle].join(" "),n=this.options,i=n.height,o=n.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(G+e.list).width(n.listWidth),i&&this.wrapper.height(i),o&&this.wrapper.width(o),n.rowHeight&&this.wrapper.addClass(e.rowHeight)},_toolbar:function(){var t,n,i,o=this,r=p.styles,s=G+r.toolbar.views+" > li",a=G+r.toolbar.pdfButton,l=G+r.buttonToggle,c=G+r.gridContent,d=e(G+r.list),u=e(G+r.timeline),h=r.hovered,f=this.options.toolbar,v=e("<div class='"+r.toolbar.actions+"'>"),_=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()};D(f)||(f=typeof f===V?f:this._actions(f),f=A(m.template(f),this)),i=e(K({styles:r.toolbar})),n=e(J({ns:m.ns,views:this.timeline.views,styles:r.toolbar})),v.append(f({})),t=e("<div class='"+r.toolbar.headerWrapper+"'>").append(i).append(n).append(v),n.find("li").length>1&&n.prepend(Z({styles:r.toolbar})),this.wrapper.prepend(t),this.toolbar=t,g&&(this._mediaQueryHandler=A(_,this),this._mediaQuery=window.matchMedia("(max-width: 480px)"),this._mediaQuery.addListener(this._mediaQueryHandler)),t.on(N+B,s,function(t){var i,s,a;t.preventDefault(),i=o.list,s=e(this).attr(m.attr("name")),a=n.find(G+r.toolbar.currentView),a.is(":visible")&&a.parent().toggleClass(r.toolbar.expanded),i.editable&&i.editable.trigger("validate")||o.trigger("navigate",{view:s})||o.view(s)}).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.find(G+r.toolbar.toolbar+" li").hover(function(){e(this).addClass(h)},function(){e(this).removeClass(h)})},_actions:function(){var e,t,n=this.options,i=n.editable,o=n.toolbar,r="";if(!S(o)){if(!i||i.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,n,i,o,r,s=this.options.editable;s&&s.create!==!1&&(t=p.styles.toolbar,n=this.options.messages.actions,i=e(m.template(Q)(E(!0,{styles:t},a.append,{text:n.append}))),o=e("<div class='"+t.actions+"'>").append(i),r=e("<div class='"+t.footerWrapper+"'>").append(o),this.wrapper.append(r),this.footer=r)},_createButton:function(e){var t=e.template||Q,n=this.options.messages.actions,i=typeof e===V?e:e.name||e.text,o=a[i]?a[i].className:"k-gantt-"+(i||"").replace(/\s/g,""),r={iconClass:"",action:"",text:i,className:o,styles:p.styles.toolbar};if(!(i||M(e)&&e.template))throw Error("Custom commands should have name specified");return r=E(!0,r,a[i],{text:n[i]}),M(e)&&(e.className&&T(r.className,e.className.split(" "))<0&&(e.className+=" "+r.className),r=E(!0,r,e)),m.template(t)(r)},_adjustDimensions:function(){var e=this.element,t=p.styles,n=G+t.list,i=G+t.timeline,o=G+t.splitBar,r=F(this.toolbar),s=this.footer?F(this.footer):0,a=e.height(),l=e.width(),c=I(e.find(o)),d=I(e.find(n));e.children([n,i,o].join(",")).height(a-(r+s)).end().children(i).width(l-(c+d)),l<d+c&&e.find(n).width(l-c)},_scrollTo:function(e){var t,i,o=this.timeline.view(),r=this.list,s=m.attr("uid"),a="string"==typeof e?e:e.closest("tr"+n()).attr(s),l=function(){0!==i.length&&t()};o.content.is(":visible")?(i=o.content.find(n(a)),t=function(){o._scrollTo(i)}):(i=r.content.find(n(a)),t=function(){i.get(0).scrollIntoView()}),l()},_dropDowns:function(){var e=this,t=G+p.styles.toolbar.actions,n=this.options.messages.actions,i=this.timeline,o=this.options.editable,r=function(t){var n,o=t.type,r=e.dataSource,s=r._createNewModel(),a=e.dataItem(e.select()),l=r.taskParent(a),c=i.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&&(n=a.get("orderId"),n="insert-before"===o?n:n+1),e._createTask(s,n))};o&&o.create!==!1&&(this.footerDropDown=new oe(this.footer.children(t).eq(0),{messages:{actions:n},direction:"up",animation:{open:{effects:"slideIn:up"}},navigatable:e.options.navigatable}),this.headerDropDown=new oe(this.toolbar.children(t).eq(0),{messages:{actions:n},navigatable:e.options.navigatable}),this.footerDropDown.bind("command",r),this.headerDropDown.bind("command",r))},_list:function(){var e,t,n=this,i=n.options.navigatable,o=p.styles,s=this.wrapper.find(G+o.list),a=s.find("> div"),l=this.wrapper.find(G+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:I(s),resourcesField:this.resources.field,rowHeight:this.options.rowHeight},d=c.columns,u=function(){i&&(n._current(n._cachedCurrent),r(n.list.content.find("table"),!0)),delete n._cachedCurrent};for(t=0;t<d.length;t++)e=d[t],e.field===this.resources.field&&"function"!=typeof e.editor&&(e.editor=A(this._createResourceEditor,this));this.list=new m.ui.GanttList(a,c),this.list.bind("render",function(){n._navigatable()},!0).bind("edit",function(e){n._cachedCurrent=e.cell,n.trigger("edit",{task:e.model,container:e.cell})&&e.preventDefault()}).bind("cancel",function(e){n.trigger("cancel",{task:e.model,container:e.cell})&&e.preventDefault(),u()}).bind("update",function(e){n._updateTask(e.task,e.updateInfo),u()}).bind("change",function(){n.trigger("change");var e=n.list.select();e.length?(l.removeAttr("data-action","add"),n.timeline.select("[data-uid='"+e.attr("data-uid")+"']")):(l.attr("data-action","add"),n.timeline.clearSelection())}).bind("columnResize",function(e){n.trigger("columnResize",{column:e.column,oldWidth:e.oldWidth,newWidth:e.newWidth})})},_timeline:function(){var e=this,n=p.styles,o=i(E(!0,{resourcesField:this.resources.field},this.options)),r=this.wrapper.find(G+n.timeline+" > div"),s=G+n.toolbar.currentView+" > "+G+n.toolbar.link;this.timeline=new m.ui.GanttTimeline(r,o),this.timeline.bind("navigate",function(t){var i=t.view.replace(/\./g,"\\.").toLowerCase(),o=e.toolbar.find(G+n.toolbar.views+" > li").removeClass(n.selected).end().find(G+n.toolbar.viewButton+"-"+i).addClass(n.selected).find(G+n.toolbar.link).text();e.toolbar.find(s).text(o),e.refresh()}).bind("moveStart",function(n){var i=e.list.editable;return i&&i.trigger("validate")?(n.preventDefault(),t):(e.trigger("moveStart",{task:n.task})&&n.preventDefault(),t)}).bind("move",function(t){var n=t.task,i=t.start,o=new Date(i.getTime()+n.duration());e.trigger("move",{task:n,start:i,end:o})&&t.preventDefault()}).bind("moveEnd",function(t){var n=t.task,i=t.start,o=new Date(i.getTime()+n.duration());e.trigger("moveEnd",{task:n,start:i,end:o})||e._updateTask(e.dataSource.getByUid(n.uid),{start:i,end:o})}).bind("resizeStart",function(n){var i=e.list.editable;return i&&i.trigger("validate")?(n.preventDefault(),t):(e.trigger("resizeStart",{task:n.task})&&n.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 n=t.task,i={};t.resizeStart?i.start=t.start:i.end=t.end,e.trigger("resizeEnd",{task:n,start:t.start,end:t.end})||e._updateTask(e.dataSource.getByUid(n.uid),i)}).bind("percentResizeStart",function(t){var n=e.list.editable;n&&n.trigger("validate")&&t.preventDefault()}).bind("percentResizeEnd",function(t){e._updateTask(e.dataSource.getByUid(t.task.uid),{percentComplete:t.percentComplete})}).bind("dependencyDragStart",function(t){var n=e.list.editable;n&&n.trigger("validate")&&t.preventDefault()}).bind("dependencyDragEnd",function(t){var n=e.dependencies._createNewModel({type:t.type,predecessorId:t.predecessor.id,successorId:t.successor.id});e._createDependency(n)}).bind("select",function(t){var n=e.list.editable;n&&n.trigger("validate"),e.select("[data-uid='"+t.uid+"']")}).bind("editTask",function(t){var n=e.list.editable;n&&n.trigger("validate")||e.editTask(t.uid)}).bind("clear",function(){e.clearSelection()}).bind("removeTask",function(t){var n=e.list.editable;n&&n.trigger("validate")||e.removeTask(e.dataSource.getByUid(t.uid))}).bind("removeDependency",function(t){var n=e.list.editable;n&&n.trigger("validate")||e.removeDependency(e.dependencies.getByUid(t.uid))})},_dataSource:function(){var e=this.options,t=e.dataSource;t=S(t)?{data:t}:t,this.dataSource&&this._refreshHandler?this.dataSource.unbind("change",this._refreshHandler).unbind("progress",this._progressHandler).unbind("error",this._errorHandler):(this._refreshHandler=A(this.refresh,this),this._progressHandler=A(this._requestStart,this),this._errorHandler=A(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=S(e)?{data:e}:e;this.dependencies&&this._dependencyRefreshHandler?this.dependencies.unbind("change",this._dependencyRefreshHandler).unbind("error",this._dependencyErrorHandler):(this._dependencyRefreshHandler=A(this.refreshDependencies,this),this._dependencyErrorHandler=A(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"},E(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=A(this.refresh,this),this.assignments={dataTaskIdField:"taskId",dataResourceIdField:"resourceId",dataValueField:"value"},E(this.assignments,e),this.assignments.dataSource=m.data.DataSource.create(t),this.assignments.dataSource.bind("change",this._assignmentsRefreshHandler)},_createEditor:function(){var e=this,n=this._editor=new h(this.wrapper,E({},this.options,{target:this,resources:{field:this.resources.field,editor:A(this._createResourceEditor,this)},createButton:A(this._createPopupButton,this)}));n.bind("cancel",function(n){var i=e.dataSource.getByUid(n.model.uid);return e.trigger("cancel",{container:n.container,task:i})?(n.preventDefault(),t):(e.cancelTask(),t)}).bind("edit",function(t){var n=e.dataSource.getByUid(t.model.uid);e.trigger("edit",{container:t.container,task:n})&&t.preventDefault()}).bind("save",function(t){var n=e.dataSource.getByUid(t.model.uid);e.saveTask(n,t.updateInfo)}).bind("remove",function(t){e.removeTask(t.model.uid)}).bind("close",e._onDialogClose)},_onDialogClose:function(){},_createResourceEditor:function(e,t){var n=this,i=t instanceof k?t:t.model,o=i.get("id"),r=this.options.messages,s=n.resources.field,a=this._resourceEditor=new f(e,{resourcesField:s,data:this._wrapResourceData(o),model:i,messages:E({},r.editor),buttons:[{name:"update",text:r.save,className:p.styles.primary},{name:"cancel",text:r.cancel}],createButton:A(this._createPopupButton,this),save:function(e){n._updateAssignments(e.model.get("id"),e.model.get(s))}});a.open()},_createPopupButton:function(e){var t=e.name||e.text,n={className:p.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+=" "+n.className),n=E(!0,n,e)),m.template(X)(n)},view:function(e){return this.timeline.view(e)},range:function(e){var t=this.dataSource,n=this.view(),i=this.timeline;return e&&(n.options.range={start:e.start,end:e.end},i._render(t.taskTree()),i._renderDependencies(this.dependencies.view())),{start:n.start,end:n.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,n;return e?(t=this.list,n=t.content.find(e),t._modelFromElement(n)):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 n,i,o,r,s,a,l,c=this.assignments.dataSource,d=this.assignments.dataTaskIdField,u=this.assignments.dataResourceIdField,h=!1,f=new C(c.view()).filter({field:d,operator:"eq",value:e}).toArray();f.length;){for(n=f[0],r=0,s=t.length;r<s;r++)if(i=t[r],n.get(u)===i.get("id")){o=t[r].get("value"),this._updateAssignment(n,o),t.splice(r,1),h=!0;break}h||this._removeAssignment(n),h=!1,f.shift()}for(a=0,l=t.length;a<l;a++)i=t[a],this._createAssignment(i,e);c.sync()},cancelTask:function(){var e=this._editor,t=e.container;t&&e.close()},editTask:function(e){var t,n="string"==typeof e?this.dataSource.getByUid(e):e;n&&(t=this.dataSource._createNewModel(n.toJSON()),t.uid=n.uid,this.cancelTask(),this._editTask(t))},_editTask:function(e){this._editor.editTask(e)},saveTask:function(e,t){var n=this._editor,i=n.container,o=n.editable;i&&o&&o.end()&&this._updateTask(e,t)},_updateTask:function(e,t){var n=this.resources.field;this.trigger("save",{task:e,values:t})||(this._preventRefresh=!0,this.dataSource.update(e,t),t[n]&&this._updateAssignments(e.get("id"),t[n]),this._syncDataSource())},_updateAssignment:function(e,t){var n=this.assignments.dataValueField;e.set(n,t)},removeTask:function(e){var t=this,n="string"==typeof e?this.dataSource.getByUid(e):e;n&&this._taskConfirm(function(e){e||t._removeTask(n)},n)},_createTask:function(e,n){if(!this.trigger("add",{task:e,dependency:null})){var i=this.dataSource;this._preventRefresh=!0,n===t?i.add(e):i.insert(n,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 n=this.assignments,i=n.dataSource,o=n.dataTaskIdField,r=n.dataResourceIdField,s=n.dataValueField,a=i._createNewModel();a[o]=t,a[r]=e.get("id"),a[s]=e.get("value"),i.add(a)},removeDependency:function(e){var t=this,n="string"==typeof e?this.dependencies.getByUid(e):e;n&&this._dependencyConfirm(function(e){e||t._removeDependency(n)},n)},_removeTaskDependencies:function(e,t){this._preventDependencyRefresh=!0;for(var n=0,i=t.length;n<i;n++)this.dependencies.remove(t[n]);this._preventDependencyRefresh=!1,this.dependencies.sync()},_removeTaskAssignments:function(e){var t,n,i=this.assignments.dataSource,o=i.view(),r={field:this.assignments.dataTaskIdField,operator:"eq",value:e.get("id")};for(o=new C(o).filter(r).toArray(),this._preventRefresh=!0,t=0,n=o.length;t<n;t++)i.remove(o[t]);this._preventRefresh=!1,i.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 n=this.options.messages;this._confirm(e,{model:t,text:n.deleteTaskConfirmation,title:n.deleteTaskWindowTitle})},_dependencyConfirm:function(e,t){var n=this.options.messages;this._confirm(e,{model:t,text:n.deleteDependencyConfirmation,title:n.deleteDependencyWindowTitle})},_confirm:function(e,t){var n,i,o=this.options.editable;o===!0||o.confirmation!==!1?(n=this.options.messages,i=[{name:"delete",text:n.destroy,className:p.styles.primary,click:function(){e()}},{name:"cancel",text:n.cancel,click:function(){e(!0)}}],this.showDialog(E(!0,{},t,{buttons:i}))):e()},showDialog:function(e){this._editor.showDialog(e)},refresh:function(){var e,t,i,o,r,s;this._preventRefresh||this.list.editable||(this._progress(!1),e=this.dataSource,t=e.taskTree(),i=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()),i&&(this._scrollTo(i),this.select(n(i))),(i||r)&&s>=0&&(o=this.list.content.find("tr"+n(i||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,n,i=this.resources,o=this.assignments,r=function(){var e=o.dataSource.view(),t={field:o.dataTaskIdField};return e=new C(e).group(t).toArray()},s=r(),a=function(e,t){var n,o,r=e.get("id");for(m.setter(i.field)(e,new x([])),n=0,o=s.length;n<o;n++)s[n].value===r&&t(e,s[n].items)},l=function(e,t){var n,r,s,a,l,c,d,u;for(n=0,r=t.length;n<r;n++)s=t[n],a=i.dataSource.get(s.get(o.dataResourceIdField)),l=s.get(o.dataValueField),c=s.get(o.dataResourceIdField),d=a.get(i.dataFormatField)||L,u=m.toString(l,d),e[i.field].push(new k({id:c,name:a.get(i.dataTextField),color:a.get(i.dataColorField),value:l,formatedValue:u}))};for(t=0,n=e.length;t<n;t++)a(e[t],l)},_wrapResourceData:function(e){var t,n,i,o=this,r=[],s=this.resources.dataSource.view(),a=this.assignments.dataSource.view(),l=new C(a).filter({field:o.assignments.dataTaskIdField,operator:"eq",value:e}).toArray(),c=function(e){var t=null;return new C(l).filter({field:o.assignments.dataResourceIdField,operator:"eq",value:e}).select(function(e){t+=e.get(o.assignments.dataValueField)}),t};for(n=0,i=s.length;n<i;n++)t=s[n],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,n,i,o=this,r=this.wrapper,s=p.styles,a=G+s.gridContent,l=r.find(G+s.list),c=r.find(G+s.timeline);this._resizeDraggable=r.find(G+s.splitBar).height(l.height()).hover(function(){e(this).addClass(s.splitBarHover)},function(){e(this).removeClass(s.splitBarHover)}).end().kendoResizable({orientation:"horizontal",handle:G+s.splitBar,start:function(){t=l.width(),n=c.width(),i=c.find(a).scrollLeft()},resize:function(e){var s=e.x.initialDelta;m.support.isRtl(r)&&(s*=-1),t+s<0||n-s<0||(l.width(t+s),c.width(n-s),c.find(a).scrollLeft(i+s),o.timeline.view()._renderCurrentTime())}}).data("kendoResizable")},_scrollable:function(){var t=this,n=p.styles,i=G+n.gridContent,o=G+n.gridHeaderWrap,r=this.timeline.element.find(o),s=this.timeline.element.find(i),a=this.list.element.find(o),l=this.list.element.find(i);_&&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 n=s.scrollTop(),i=m.wheelDeltaY(t);i&&(t.preventDefault(),e(t.currentTarget).one("wheel"+B,!1),s.scrollTop(n+-i))})},_navigatable:function(){var i,o=this,s=this.options.navigatable,a=this.options.editable,l=this.list.header.find("table"),c=this.list.content.find("table"),d=p.styles,u=m.support.isRtl(this.wrapper),h=this.timeline.element.find(G+d.gridContent),f=l.add(c),g=n(),v={collapse:!1,expand:!0},_=function(e){var t=o.timeline.view()._timeSlots()[0].offsetWidth;h.scrollLeft(h.scrollLeft()+(e?-t:t))},b=function(e){var t=o.current.parent("tr"+n()),i=o.current.index(),s=t[e]();0!==o.select().length&&o.clearSelection(),0!==s.length?(o._current(s.children("td:eq("+i+")")),o._scrollTo(o.current)):o.current.is("td")&&"prev"==e?r(l):o.current.is("th")&&"next"==e&&r(c)},w=function(e){var t=o.current[e]();0!==t.length&&(o._current(t),i=o.current.index())},y=function(e){var t=o.dataItem(o.current);t.summary&&t.expanded!==e&&t.set("expanded",e)},k=function(){var e,t,n=o.options.editable;n&&n.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"+g+", div"+g+":not("+G+d.line+")",function(t){var i,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&&(i=l.is("tr")?e(t.target).closest("td"):o.list.content.find("tr"+n(l.attr(m.attr("uid")))+" > td:first"),o._current(i)),!s&&!a||c||(o._focusTimeout=setTimeout(function(){r(o.list.content.find("table"),!0)},2)))}),s!==!0?(c.on("keydown"+B,function(e){e.keyCode==z.DELETE&&k()}),t):(f.on("focus"+B,function(){var t=this===c.get(0)?"td":"th",n=o.select(),r=o.current||e(n.length?n:this).find(t+":eq("+(i||0)+")");o._current(r)}).on("blur"+B,function(){o._current(),this==l&&e(this).attr(H,-1)}).on("keydown"+B,function(t){var n,i=t.keyCode;if(o.current)switch(n=o.current.is("td"),i){case z.RIGHT:t.preventDefault(),t.altKey?_():t.ctrlKey?y(u?v.collapse:v.expand):w(u?"prev":"next");break;case z.LEFT:t.preventDefault(),t.altKey?_(!0):t.ctrlKey?y(u?v.expand:v.collapse):w(u?"next":"prev");break;case z.UP:t.preventDefault(),b("prev");break;case z.DOWN:t.preventDefault(),b("next");break;case z.SPACEBAR:t.preventDefault(),n&&o.select(o.current.closest("tr"));break;case z.ENTER:t.preventDefault(),n?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 z.ESC:t.stopPropagation();break;case z.DELETE:n&&k();break;default:i>=49&&i<=57&&o.view(o.timeline._viewByIndex(i-49))}}),t)},_current:function(t){var n,i=p.styles;this.current&&this.current.length&&this.current.removeClass(i.focused).removeAttr("id"),t&&t.length?(this.current=t.addClass(i.focused).attr("id",j),n=e(m._activeElement()),n.is("table")&&this.wrapper.find(n).length>0&&n.removeAttr(W).attr(W,j)):this.current=null},_dataBind:function(){var t,n=this;n.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(){n._preventRefresh=!1,n._preventDependencyRefresh=!1,n.refresh()}))},_resize:function(){this._adjustDimensions(),this.timeline.view()._adjustHeight(),this.timeline.view()._renderCurrentTime(),this.list._adjustHeight()}}),m.PDFMixin&&(m.PDFMixin.extend(p.fn),p.fn._drawPDF=function(){var e=p.styles,t="."+e.list,n=this.wrapper.find(t).width(),i=this.wrapper.clone();return i.find(t).css("width",n),this._drawPDFShadow({content:i},{avoidLinks:this.options.pdf.avoidLinks})}),m.ui.plugin(p),E(!0,p,{styles:ie})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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"],e)}(function(){return function(e,t){function n(e){return function(t){return t[e]}}function i(e){return function(t){return!e(t)}}function o(){return"none"!==this.style.display}function r(n){var i,o=n.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)),i=kendo.attr("index"),s.sort(function(n,o){var r,s;return n=e(n),o=e(o),r=n.attr(i),s=o.attr(i),r===t&&(r=e(n).index()),s===t&&(s=e(o).index()),r=parseInt(r,10),s=parseInt(s,10),r>s?1:r<s?-1:0}),s}function s(e){var t,n,i=[],o=e.className;for(t=0,n=e.level;t<n;t++)i.push(g("span",{className:o}));return i}function a(e){var t,n,i,o=0;for(n=0,i=e.length;n<i;n++)t=e[n].style.width,t&&t.indexOf("%")==-1&&(o+=parseInt(t,10));return o}function l(e,t){var n,i,o,r;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(n=e.offsetHeight,i=t.offsetHeight,n>i?(o=t.rows[t.rows.length-1],r=n-i):(o=e.rows[e.rows.length-1],r=i-n),o.style.height=o.offsetHeight+r+"px")}var c,d,u,h,f=kendo.data,p=e.extend,m=kendo.dom,g=m.element,v=m.text,_=m.html,b=kendo._outerWidth,w=kendo._outerHeight,y=kendo.ui,k=y.DataBoundWidget,x=f.DataSource,C=f.ObservableArray,S=f.Query,T=f.Model,D=e.proxy,A=e.map,E=e.grep,M=e.inArray,R=e.isPlainObject,I=Array.prototype.push,F="string",z="change",P="error",B="progress",L=".",H=".kendoTreeList",N="click",O="mousedown",V="edit",U="save",W="expand",j="collapse",q="remove",G="dataBinding",$="dataBound",Y="cancel",K="filterMenuInit",Q="columnHide",X="columnShow",Z="th.k-header",J="columnReorder",ee="columnResize",te="columnMenuInit",ne="columnLock",ie="columnUnlock",oe="parentId",re="dragstart",se="drag",ae="drop",le="dragend",ce={wrapper:"k-treelist k-grid k-widget",header:"k-header",button:"k-button",alt:"k-alt",editCell:"k-edit-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",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"},de={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"},excel:{imageClass:"k-i-file-excel",className:"k-grid-excel",methodName:"saveAsExcel"},pdf:{imageClass:"k-i-file-pdf",className:"k-grid-pdf",methodName:"saveAsPDF"}},ue=T.define({id:"id",parentId:oe,fields:{id:{type:"number"},parentId:{type:"number",nullable:!0}},init:function(e){T.fn.init.call(this,e),this._loaded=!1,this.parentIdField||(this.parentIdField=oe),this.parentId=this.get(this.parentIdField)},accept:function(e){T.fn.accept.call(this,e),this.parentId=this.get(this.parentIdField)},set:function(e,t,n){e==oe&&this.parentIdField!=oe&&(this[this.parentIdField]=t),T.fn.set.call(this,e,t,n),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 T.fn.shouldSerialize.call(this,e)&&"_loaded"!==e&&"_error"!=e&&"_edit"!=e&&!("parentId"!==this.parentIdField&&"parentId"===e)}});ue.parentIdField=oe,ue.define=function(e,n){var i,o;return n===t&&(n=e,e=ue),i=n.parentId||oe,n.parentIdField=i,o=T.define(e,n),i&&(o.parentIdField=i),o},c=x.extend({init:function(e){x.fn.init.call(this,p(!0,{},{schema:{modelBase:ue,model:ue}},e))},_createNewModel:function(e){var t={},n=e instanceof T;return n&&(t=e),t=x.fn._createNewModel.call(this,t),n||(e.parentId&&(e[t.parentIdField]=e.parentId),t.accept(e)),t},_shouldWrap:function(){return!0},_push:function(e,t){var n=x.fn._readData.call(this,e);n||(n=e),this[t](n)},_readData:function(e){var t=this.data();return e=x.fn._readData.call(this,e),this._replaceData(t.toJSON().concat(e),t),e instanceof C?e:t},_replaceData:function(e,t){var n,i=e.length;for(n=0;n<i;n++)t[n]=e[n];t.length=i},_readAggregates:function(e){var t=p(this._aggregateResult,this.reader.aggregates(e));return""in t&&(t[this._defaultParentId()]=t[""],delete t[""]),t},remove:function(e){var t=this._subtree(this._childrenMap(this.data()),e.id);this._removeItems(t),x.fn.remove.call(this,e)},_filterCallback:function(e){var t,n,i={},o=[],r=e.toArray();for(t=0;t<r.length;t++)for(n=r[t];n&&(i[n.id]||(i[n.id]=!0,o.push(n)),!i[n.parentId]);)i[n.parentId]=!0,n=this.parentNode(n),n&&o.push(n);return new S(o)},_subtree:function(e,t){var n,i,o=e[t]||[],r=this._defaultParentId();for(n=0,i=o.length;n<i;n++)o[n].id!==r&&(o=o.concat(this._subtree(e,o[n].id)));return o},_childrenMap:function(e){var t,n,i,o,r={};for(e=this._observeView(e),t=0;t<e.length;t++)n=e[t],i=n.id,o=n.parentId,r[i]=r[i]||[],r[o]=r[o]||[],r[o].push(n);return r},_calculateAggregates:function(e,t){var n,i,o,r,s,a;for(t=t||{},n={},s=t.filter,s&&(e=S.process(e,{filter:s,filterCallback:D(this._filterCallback,this)}).data),a=this._childrenMap(e),n[this._defaultParentId()]=new S(this._subtree(a,this._defaultParentId())).aggregate(t.aggregate),r=0;r<e.length;r++)i=e[r],o=this._subtree(a,i.id),n[i.id]=new S(o).aggregate(t.aggregate);return n},_queryProcess:function(e,t){var n,i,o,r,s,a,l;for(t=t||{},t.filterCallback=D(this._filterCallback,this),n=this._defaultParentId(),i=S.process(e,t),o=this._childrenMap(i.data),e=o[n]||[],s=0;s<e.length;s++)a=e[s],a.id!==n&&(l=o[a.id],r=!(!l||!l.length),a.loaded()||a.loaded(r||!a.hasChildren),(a.loaded()||a.hasChildren!==!0)&&(a.hasChildren=r),r&&(e=e.slice(0,s+1).concat(l,e.slice(s+1))));return i.data=e,i},_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,n){return n&&t!==n.id||(this._data=this._observe([])),x.fn.success.call(this,e,n)},load:function(t){var n="_query",i=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates,o=e.Deferred().resolve().promise();if(t.loaded()){if(i)return o}else t.hasChildren&&(n="read");return this[n]({id:t.id}).done(D(this._modelLoaded,this,t.id)).fail(D(this._modelError,this,t.id))},contains:function(e,t){for(var n=e.id;t;){if(t.parentId===n)return!0;t=this.parentNode(t)}return!1},_byParentId:function(e,t){var n,i,o=[],r=this.view();if(e===t)return[];for(i=0;i<r.length;i++)n=r.at(i),n.parentId==e&&o.push(n);return o},_defaultParentId:function(){return this.reader.model.fn.defaults[this.reader.model.parentIdField]},childNodes:function(e){return this._byParentId(e.id,this._defaultParentId())},rootNodes:function(){return this._byParentId(this._defaultParentId())},parentNode:function(e){return this.get(e.parentId)},level:function(e){var t=-1;e instanceof ue||(e=this.get(e));do e=this.parentNode(e),t++;while(e);return t},filter:function(e){var n=x.fn.filter;return e===t?n.call(this,e):(n.call(this,e),t)}}),c.create=function(t){return e.isArray(t)?t={data:t}:t instanceof C&&(t={data:t.toJSON()}),t instanceof c?t:new c(t)},d=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),t=this.options=p(!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 y.Editable(this.wrapper,{fields:this.fields,target:e.target,clearContainer:e.clearContainer,model:this.model})},_isEditable:function(e){return e.field&&this.model.editable(e.field)},_fields:function(e){var t,n,i,o=[];for(t=0,n=e.length;t<n;t++)i=e[t],this._isEditable(i)&&o.push({field:i.field,format:i.format,editor:i.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=d.extend({init:function(e,t){d.fn.init.call(this,e,t),this._attachHandlers(),kendo.cycleForm(this.wrapper),this.open()},events:[Y,U],options:{window:{modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1}},_initContainer:function(){var t=this.options,n=[];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(n),this.fields=[]):this._appendFields(n),this._appendButtons(n),new m.Tree(this.wrapper.children()[0]).render(n),this.wrapper.appendTo(t.appendTo),this.window=new y.Window(this.wrapper,t.window)},_appendTemplate:function(e){var t=this.options.template;typeof t===F&&(t=window.unescape(t)),t=kendo.template(t)(this.model),e.push(_(t))},_appendFields:function(e){var t,n,i,o=this.options.columns;for(t=0,n=o.length;t<n;t++)i=o[t],i.command||(e.push(_('<div class="k-edit-label"><label for="'+i.field+'">'+(i.title||i.field||"")+"</label></div>")),e.push(this._isEditable(i)?_("<div "+kendo.attr("container-for")+'="'+i.field+'" class="k-edit-field"></div>'):g("div",{"class":"k-edit-field"},[this.options.fieldRenderer(i,this.model)])))},_appendButtons:function(e){e.push(g("div",{"class":"k-edit-buttons k-state-default"},this.options.commandRenderer()))},_attachHandlers:function(){var e=this._cancelProxy=D(this._cancel,this);this.wrapper.on(N+H,".k-grid-cancel",this._cancelProxy),this._saveProxy=D(this._save,this),this.wrapper.on(N+H,".k-grid-update",this._saveProxy),this.window.bind("close",function(t){t.userTriggered&&e(t)})},_dettachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.wrapper.off(H)},_cancel:function(e){this.trigger(Y,e)},_save:function(){this.trigger(U)},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",D(this.destroy,this)).close()},destroy:function(){this.window.destroy(),this.window=null,this._dettachHandlers(),d.fn.destroy.call(this)}}),h=k.extend({init:function(t,n){if(k.fn.init.call(this,t,n),this._dataSource(this.options.dataSource),this._columns(),this._layout(),this._selectable(),this._sortable(),this._resizable(),this._filterable(),this._attachEvents(),this._toolbar(),this._scrollable(),this._reorderable(),this._columnMenu(),this._minScreenSupport(),this._draggable(),this.options.autoBind&&this.dataSource.fetch(),this._hasLockedColumns){var i=this;this.wrapper.addClass("k-grid-lockedcolumns"),this._resizeHandler=function(){i.resize()},e(window).on("resize"+H,this._resizeHandler)}kendo.notify(this)},_draggable:function(){var t=this.options.editable;t&&t.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 n=function(){return e(this).text()},i="<span class='k-header k-drag-separator' />";return t.children("td").map(n).toArray().join(i)},contains:D(function(e,t){var n=this.dataItem(t),i=this.dataItem(e);return i==n||this.dataSource.contains(i,n)},this),itemFromTarget:function(e){var t=e.closest("tr");return{item:t,content:t}},dragstart:D(function(e){this.wrapper.addClass("k-treelist-dragging");var t=this.dataItem(e);return this.trigger(re,{source:t})},this),drag:D(function(e){e.source=this.dataItem(e.source),this.trigger(se,e)},this),drop:D(function(e){return e.source=this.dataItem(e.source),e.destination=this.dataItem(e.destination),this.wrapper.removeClass("k-treelist-dragging"),this.trigger(ae,e)},this),dragend:D(function(e){var t=this.dataItem(e.destination),n=this.dataItem(e.source);n.set("parentId",t?t.id:null),e.source=n,e.destination=t,this.trigger(le,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,n,i;this.options.scrollable&&(t=this.thead.closest(".k-grid-header-wrap"),n=e(this.lockedContent).bind("DOMMouseScroll"+H+" mousewheel"+H,D(this._wheelScroll,this)),this.content.bind("scroll"+H,function(){t.scrollLeft(this.scrollLeft),n.scrollTop(this.scrollTop)}),i=kendo.touchScroller(this.content),i&&i.movable&&(this._touchScroller=i,i.movable.bind("change",function(e){t.scrollLeft(-e.sender.x),n&&n.scrollTop(-e.sender.y)})))},_wheelScroll:function(t){var n,i;t.ctrlKey||(n=kendo.wheelDeltaY(t),i=e(t.currentTarget),n&&(i[0].scrollHeight>i[0].clientHeight&&(i[0].scrollTop<i[0].scrollHeight-i[0].clientHeight&&n<0||i[0].scrollTop>0&&n>0)&&t.preventDefault(),i.one("wheel"+H,!1),this.content.scrollTop(this.content.scrollTop()+-n)))},_progress:function(){var e=this.options.messages;this.tbody.find("tr").length||this._showStatus(kendo.template("<span class='#= className #' /> #: messages.loading #")({className:ce.icon+" "+ce.loading,messages:e}))},_error:function(e){this.dataSource.rootNodes().length||this._render({error:e})},refresh:function(e){e=e||{},"itemchange"==e.action&&this.editor||this.trigger(G)||(this._cancelEditor(),this._render(),this._adjustHeight(),this.trigger($))},_angularFooters:function(e){var t,n,i,o=this.dataSource.aggregates(),r=this._footerItems();for(t=0;t<r.length;t++)n=r.eq(t),i=o[n.attr("data-parentId")],this._angularFooter(e,n.find("td").get(),i)},_angularFooter:function(e,t,n){var i=this.columns;this.angular(e,function(){return{elements:t,data:A(i,function(e){return{column:e,aggregate:n&&n[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(ce.footerTemplate)})},_footerItems:function(){var t=this.tbody;return this._hasLockedColumns&&(t=t.add(this.lockedTable)),t.find("tr").filter(function(){return e(this).hasClass(ce.footerTemplate)})},dataItems:function(){var e,t,n,i=kendo.ui.DataBoundWidget.fn.dataItems.call(this);if(this._hasLockedColumns){for(e=i.length,t=Array(2*e),n=e;--n>=0;)t[n]=t[n+e]=i[n];i=t}return i},_showStatus:function(t){var n=this.element.find(".k-status"),i=e(this.content).add(this.lockedContent);n.length||(n=e("<div class='k-status' />").appendTo(this.element)),this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]),i.hide(),n.html(t)},_hideStatus:function(){this.element.find(".k-status").remove(),e(this.content).add(this.lockedContent).show()},_adjustHeight:function(){var e,t,n=this.element,i=n.find(L+ce.gridContentWrap),o=n.find(L+ce.gridHeader),r=n.find(L+ce.gridToolbar),s=kendo.support.scrollbar();n.height(this.options.height),t=function(e){var t,n;return!!e[0].style.height||(t=e.height(),e.height("auto"),n=e.height(),e.height(""),t!=n)},t(n)&&(e=n.height()-w(o)-w(r),i.height(e),this._hasLockedColumns&&(s=this.table[0].offsetWidth>this.table.parent()[0].clientWidth?s:0,this.lockedContent.height(e-s)))},_resize:function(){this._applyLockedContainersWidth(),this._adjustHeight()},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=D(this.hideMinScreenCols,this),e(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){var e,n,i,o=this.columns,r=!1,s=window.innerWidth>0?window.innerWidth:screen.width;for(e=0;e<o.length;e++)n=o[e],i=n.minScreenWidth,i!==t&&null!==i&&(r=!0,i>s?this.hideColumn(n):this.showColumn(n));return r},destroy:function(){k.fn.destroy.call(this);var t=this.dataSource;t.unbind(z,this._refreshHandler),t.unbind(P,this._errorHandler),t.unbind(B,this._progressHandler),this._resizeHandler&&e(window).off("resize"+H,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(H),this._touchScroller&&this._touchScroller.destroy(),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:[z,V,U,q,W,j,G,$,Y,re,se,ae,le,K,Q,X,J,ee,te,ne,ie],_toggle:function(n,i){var o=e.Deferred().resolve().promise(),r=n.loaded();return n._error&&(n.expanded=!1,n._error=t),!r&&n.expanded?o:(t===i&&(i=!n.expanded),n.expanded=i,r||(o=this.dataSource.load(n).always(D(function(){this._render(),this._syncLockedContentHeight()},this))),this._render(),this._syncLockedContentHeight(),o)},expand:function(e){return this._toggle(this.dataItem(e),!0)},collapse:function(e){return this._toggle(this.dataItem(e),!1)},_toggleChildren:function(t){var n=e(t.currentTarget),i=this.dataItem(n),o=i.expanded?j:W;this.trigger(o,{model:i})||this._toggle(i),t.preventDefault()},_attachEvents:function(){var e=L+ce.iconCollapse+", ."+ce.iconExpand+", ."+ce.refresh,t=L+ce.retry;this.element.on(O+H,e,D(this._toggleChildren,this)).on(N+H,t,this._dataSourceFetchProxy).on(N+H,".k-button[data-command]",D(this._commandClick,this))},_commandByName:function(t){var n,i,o,r,s=this.columns,a=e.isArray(this.options.toolbar)?this.options.toolbar:[];if(t=t.toLowerCase(),de[t])return de[t];for(n=0;n<s.length;n++)if(o=s[n].command)for(i=0;i<o.length;i++)if(r=o[i].name,r&&r.toLowerCase()==t)return o[i];for(n=0;n<a.length;n++)if(r=a[n].name,r&&r.toLowerCase()==t)return a[n]},_commandClick:function(n){var i=e(n.currentTarget),o=i.attr("data-command"),r=this._commandByName(o),s=i.parentsUntil(this.wrapper,"tr");s=s.length?s:t,r&&(r.methodName?this[r.methodName](s):r.click&&r.click.call(this,n),n.preventDefault())},_ensureExpandableColumn:function(){var e,t;this._autoExpandable&&delete this._autoExpandable.expandable,e=E(this.columns,i(n("hidden"))),t=E(e,n("expandable")),this.columns.length&&!t.length&&(this._autoExpandable=e[0],e[0].expandable=!0)},_columns:function(){var e,t=this.options.columns||[];this.columns=A(t,function(e){return e="string"==typeof e?{field:e}:e,p({encoded:!0},e)}),e=this._lockedColumns(),e.length>0&&(this._hasLockedColumns=!0,this.columns=e.concat(this._nonLockedColumns())),this._ensureExpandableColumn(),this._columnTemplates(),this._columnAttributes()},_columnTemplates:function(){var e,t,n,i=this.columns;for(e=0,t=i.length;e<t;e++)n=i[e],n.template&&(n.template=kendo.template(n.template)),n.headerTemplate&&(n.headerTemplate=kendo.template(n.headerTemplate)),n.footerTemplate&&(n.footerTemplate=kendo.template(n.footerTemplate))},_columnAttributes:function(){function t(t){var n,i,o,r;if(t&&t.style)for(n=t.style.split(";"),t.style={},i=0;i<n.length;i++)o=n[i].split(":"),r=e.trim(o[0]),r&&(t.style[e.camelCase(r)]=e.trim(o[1]))}var n,i,o=this.columns;for(n=0,i=o.length;n<i;n++)t(o[n].attributes),t(o[n].headerAttributes)},_layout:function(){var e,t,n,i=this.columns,o=this.element,r="";this.wrapper=o.addClass(ce.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)(ce)+"<div class='k-status' />"),this.toolbar=o.find(L+ce.gridToolbar),e=o.find(L+ce.gridHeader).find("thead").addBack().filter("thead"),this.thead=e.last(),this.options.scrollable&&(t=kendo.support.isRtl(o),o.find("div."+ce.gridHeader).css(t?"padding-left":"padding-right",kendo.support.scrollbar())),n=o.find(L+ce.gridContentWrap),n.length?this.content=n:n=o,this.table=n.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:A(i,function(e){return{column:e}})}})},_initVirtualTrees:function(){this._headerColsTree=new m.Tree(this.thead.prev()[0]),this._contentColsTree=new m.Tree(this.tbody.prev()[0]),this._headerTree=new m.Tree(this.thead[0]),this._contentTree=new m.Tree(this.tbody[0]),this._statusTree=new m.Tree(this.element.children(".k-status")[0]),this.lockedHeader&&(this._lockedHeaderColsTree=new m.Tree(this.lockedHeader.find("colgroup")[0]),this._lockedContentColsTree=new m.Tree(this.lockedTable.find(">colgroup")[0]),this._lockedHeaderTree=new m.Tree(this.lockedHeader.find("thead")[0]),this._lockedContentTree=new m.Tree(this.lockedTable.find(">tbody")[0]))},_toolbar:function(){var t,n=this.options.toolbar,i=this.toolbar;n&&(e.isArray(n)?(t=this._buildCommands(n),new m.Tree(i[0]).render(t)):i.append(kendo.template(n)({})),this.angular("compile",function(){return{elements:i.get()}}))},_lockedColumns:function(){return E(this.columns,n("locked"))},_nonLockedColumns:function(){return E(this.columns,i(n("locked")))},_templateColumns:function(){return E(this.columns,n("template"))},_flushCache:function(){this.options.$angular&&this._templateColumns().length&&(this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]))},_render:function(t){var n,i,o,r;t=t||{},n=this.options.messages,i=this.dataSource.rootNodes(),o=kendo.attr("uid"),r=this.select().removeClass("k-state-selected").map(function(t,n){return e(n).attr(o)}),this._absoluteIndex=0,this._angularItems("cleanup"),this._angularFooters("cleanup"),this._flushCache(),t.error?this._showStatus(kendo.template("#: messages.requestFailed # <button class='#= buttonClass #'>#: messages.retry #</button>")({buttonClass:[ce.button,ce.retry].join(" "),messages:n})):i.length?(this._hideStatus(),this._contentTree.render(this._trs({columns:this._nonLockedColumns(),aggregates:t.aggregates,selected:r,data:i,visible:!0,level:0})),this._hasLockedColumns&&(this._absoluteIndex=0,this._lockedContentTree.render(this._trs({columns:this._lockedColumns(),aggregates:t.aggregates,selected:r,data:i,visible:!0,level:0})))):this._showStatus(kendo.htmlEncode(n.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(o),r)>=0}).addClass("k-state-selected"),this._adjustRowsHeight()},_adjustRowsHeight:function(){var e,t,n,i,o,r,s,a,l,c,d,u,h,f;if(this._hasLockedColumns){for(e=this.table,t=this.lockedTable,n=e[0].rows,i=n.length,r=t[0].rows,s=e.add(t),a=s.length,l=[],c=this.lockedHeader.find("tr"),d=this.thead.find("tr"),c.add(d).height("auto").height(Math.max(c.height(),d.height())),o=0;o<i&&r[o];o++)n[o].style.height&&(n[o].style.height=r[o].style.height="");for(o=0;o<i&&r[o];o++)u=n[o].offsetHeight,h=r[o].offsetHeight,f=0,u>h?f=u:u<h&&(f=h),l.push(f);for(o=0;o<a;o++)s[o].style.display="none";for(o=0;o<i;o++)l[o]&&(n[o].style.height=r[o].style.height=l[o]+1+"px");for(o=0;o<a;o++)s[o].style.display=""}},_ths:function(e){var t,n,i,o,r,s,a,l,c=[];for(a=0,l=e.length;a<l;a++)t=e[a],i=[],o=[ce.header],n=t.headerTemplate?t.headerTemplate({}):t.title||t.field||"",s=t.headerTemplate?_(n):v(n),i.push(t.sortable?g("a",{href:"#",className:ce.link},[s]):s),r={"data-field":t.field,"data-title":t.title,style:t.hidden===!0?{display:"none"}:{},className:o.join(" "),role:"columnheader"},r=p(!0,{},r,t.headerAttributes),c.push(g("th",r,i));return c},_cols:function(e){var t,n,i,o=[];for(i=0;i<e.length;i++)e[i].hidden!==!0&&(t=e[i].width,n={},t&&0!==parseInt(t,10)&&(n.style={width:"string"==typeof t?t:t+"px"}),o.push(g("col",n)));return o},_renderCols:function(){var e=this._nonLockedColumns();this._headerColsTree.render(this._cols(e)),this.options.scrollable&&this._contentColsTree.render(this._cols(e)),this._hasLockedColumns&&(e=this._lockedColumns(),this._lockedHeaderColsTree.render(this._cols(e)),this._lockedContentColsTree.render(this._cols(e)))},_renderHeader:function(){var e=this._nonLockedColumns();this._headerTree.render([g("tr",{role:"row"
},this._ths(e))]),this._hasLockedColumns&&(e=this._lockedColumns(),this._lockedHeaderTree.render([g("tr",{role:"row"},this._ths(e))]),this._applyLockedContainersWidth())},_applyLockedContainersWidth:function(){var e,t,n,i,o,r;this._hasLockedColumns&&(e=a(this.lockedHeader.find(">table>colgroup>col")),t=this.thead.parent(),n=a(t.find(">colgroup>col")),i=this.wrapper[0].clientWidth,o=kendo.support.scrollbar(),e>=i&&(e=i-3*o),this.lockedHeader.add(this.lockedContent).width(e),t.add(this.table).width(n),r=i-e-2,this.content.width(r),t.parent().width(r-o))},_trs:function(t){var n,i,o,r,s,a,l,c=[],d=t.level,u=t.data,h=this.dataSource,f=h.aggregates()||{},p=t.columns;for(a=0,l=u.length;a<l;a++)o=[],n=u[a],s=n.loaded()&&h.childNodes(n),r=s&&s.length,i={role:"row"},i[kendo.attr("uid")]=n.uid,r&&(i["aria-expanded"]=!!n.expanded),t.visible?(this._absoluteIndex%2!==0&&o.push(ce.alt),this._absoluteIndex++):i.style={display:"none"},e.inArray(n.uid,t.selected)>=0&&o.push(ce.selected),r&&o.push(ce.group),n._edit&&o.push("k-grid-edit-row"),i.className=o.join(" "),c.push(this._tds({model:n,attr:i,level:d},p,D(this._td,this))),r&&(c=c.concat(this._trs({columns:p,aggregates:f,selected:t.selected,visible:t.visible&&!!n.expanded,data:s,level:d+1})));return this._hasFooterTemplate()&&(i={className:ce.footerTemplate,"data-parentId":n.parentId},t.visible||(i.style={display:"none"}),c.push(this._tds({model:f[n.parentId],attr:i,level:d},p,this._footerTd))),c},_footerTd:function(t){var n=[],i=t.column,o=t.column.footerTemplate||e.noop,r=t.model[i.field]||{},a={role:"gridcell",style:i.hidden===!0?{display:"none"}:{}};return i.expandable&&(n=n.concat(s({level:t.level+1,className:ce.iconPlaceHolder}))),i.attributes&&p(a,i.attributes),n.push(_(o(r)||"")),g("td",a,n)},_hasFooterTemplate:function(){return!!E(this.columns,function(e){return e.footerTemplate}).length},_tds:function(e,t,n){var i,o,r,s=[];for(o=0,r=t.length;o<r;o++)i=t[o],s.push(n({model:e.model,column:i,level:e.level}));return g("tr",e.attr,s)},_td:function(e){var t,n=[],i=e.model,o=e.column,r={role:"gridcell",style:o.hidden===!0?{display:"none"}:{}};return i._edit&&o.field&&i.editable(o.field)?r[kendo.attr("container-for")]=o.field:(o.expandable&&(n=s({level:e.level,className:ce.iconPlaceHolder}),t=[ce.icon],t.push(i.hasChildren?i.expanded?ce.iconCollapse:ce.iconExpand:ce.iconHidden),i._error?t.push(ce.refresh):!i.loaded()&&i.expanded&&t.push(ce.loading),n.push(g("span",{className:t.join(" ")})),r.style["white-space"]="nowrap"),o.attributes&&p(!0,r,o.attributes),o.command?n=this._buildCommands(i._edit?["update","canceledit"]:o.command):n.push(this._cellContent(o,i))),g("td",r,n)},_cellContent:function(e,n){var i;return e.template?i=e.template(n):e.field&&(i=n.get(e.field),null!==i&&e.format&&(i=kendo.format(e.format,i))),null!==i&&t!==i||(i=""),e.template||!e.encoded?_(i):v(i)},_buildCommands:function(e){var t,n=[];for(t=0;t<e.length;t++)n.push(this._button(e[t]));return n},_button:function(e){var t=(e.name||e).toLowerCase(),n=this.options.messages.commands[t],i=[];return e=p({},de[t],{text:n},e),e.imageClass&&i.push(g("span",{className:["k-icon",e.imageClass].join(" ")})),g("button",{type:"button","data-command":t,className:["k-button k-button-icontext",e.className].join(" ")},i.concat([v(e.text||e.name)]))},_positionResizeHandle:function(n){var i,o,r,s=e(n.currentTarget),a=this.resizeHandle,l=s.position(),c=l.left,d=b(s),u=s.closest("div"),h=n.clientX+e(window).scrollLeft(),f=this.options.columnResizeHandleWidth||3;return c+=u.scrollLeft(),a||(a=this.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner" /></div>')),i=s.offset().left+d,(o=h>i-f&&h<i+f)?(u.append(a),a.show().css({top:l.top,left:c+d-f-1,height:w(s),width:3*f}).data("th",s),r=this,a.off("dblclick"+H).on("dblclick"+H,function(){var t=s.index();e.contains(r.thead[0],s[0])&&(t+=E(r.columns,function(e){return e.locked&&!e.hidden}).length),r.autoFitColumn(t)}),t):(a.hide(),t)},autoFitColumn:function(t){var n,i,s,a,l,c,d,u,h,f,p,m,g,v,_,w,y,k=this,x=k.options,C=k.columns,S=kendo.support.browser,T=k.lockedHeader?r(k.lockedHeader.find(">table>thead")).filter(o).length:0;if(t="number"==typeof t?C[t]:R(t)?E(C,function(e){return e===t})[0]:E(C,function(e){return e.field===t})[0],t&&!t.hidden){for(n=M(t,C),a=t.locked,s=a?k.lockedHeader.children("table"):k.thead.parent(),i=s.find("[data-index='"+n+"']"),c=a?k.lockedTable:k.table,d=k.footer||e(),k.footer&&k.lockedContent&&(d=k.footer.children(a?".k-grid-footer-locked":".k-grid-footer-wrap")),u=d.find("table").first(),k.lockedHeader&&T>=n&&!a&&(n-=T),h=0;h<C.length&&C[h]!==t;h++)C[h].hidden&&n--;if(l=x.scrollable?s.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")").add(c.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")")).add(u.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")")):c.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")"),f=s.add(c).add(u),p=b(i),l.width(""),f.css("table-layout","fixed"),l.width("auto"),f.addClass("k-autofitting"),f.css("table-layout",""),m=Math.ceil(Math.max(b(i),b(c.find("tr").eq(0).children("td:visible").eq(n)),b(u.find("tr").eq(0).children("td:visible").eq(n)))),l.width(m),t.width=m,x.scrollable){for(g=s.find("col"),_=0,w=0,y=g.length;w<y;w+=1){if(v=g[w].style.width,!v||v.indexOf("%")!=-1){_=0;break}_+=parseInt(v,10)}_&&f.each(function(){this.style.width=_+"px"})}S.msie&&8==S.version&&(f.css("display","inline-table"),setTimeout(function(){f.css("display","table")},1)),f.removeClass("k-autofitting"),k.trigger(ee,{column:t,oldWidth:p,newWidth:m}),k._applyLockedContainersWidth(),k._syncLockedContentHeight(),k._syncLockedHeaderHeight()}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?kendo.support.scrollbar():0;this.lockedContent.height(t.height()-n)},_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),l(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"+H,"th",e.proxy(this._positionResizeHandle,this)),this.resizable=new kendo.ui.Resizable(this.wrapper,{handle:".k-resize-handle",start:function(n){var i,o,r=e(n.currentTarget).data("th"),s="col:eq("+e.inArray(r[0],r.parent().children().filter(":visible"))+")";t.wrapper.addClass("k-grid-column-resizing"),t.lockedHeader&&e.contains(t.lockedHeader[0],r[0])?(i=t.lockedHeader,o=t.lockedTable):(i=t.thead.parent(),o=t.table),this.col=o.children("colgroup").find(s).add(i.find(s)),this.th=r,this.startLocation=n.x.location,this.columnWidth=b(r),this.table=this.col.closest("table"),this.totalWidth=this.table.width()},resize:function(e){var t=11,n=e.x.location-this.startLocation;this.columnWidth+n<t&&(n=t-this.columnWidth),this.table.width(this.totalWidth+n),this.col.width(this.columnWidth+n)},resizeend:function(){var e,n,i;t.wrapper.removeClass("k-grid-column-resizing"),e=this.th.attr("data-field"),n=E(t.columns,function(t){return t.field==e}),i=Math.floor(b(this.th)),n[0].width=i,t._resize(),t._adjustRowsHeight(),t.trigger(ee,{column:n,oldWidth:this.columnWidth,newWidth:i}),this.table=this.col=this.th=null}})}},_sortable:function(){var t,n,i,o,r,s=this.columns,a=e(this.lockedHeader).add(this.thead).find("th"),l=kendo.attr("field"),c=this.options.sortable;if(c)for(o=0,r=a.length;o<r;o++)t=s[o],t.sortable!==!1&&!t.command&&t.field&&(i=a.eq(o),n=i.data("kendoColumnSorter"),n&&n.destroy(),i.attr(l,t.field).kendoColumnSorter(p({},c,t.sortable,{dataSource:this.dataSource})))},_filterable:function(){var t,n,i,o,r,s,a=e(this.lockedHeader).add(this.thead).find("th"),l=this.options.filterable;if(l&&!this.options.columnMenu)for(s=D(function(e){this.trigger(K,{field:e.field,container:e.container})},this),t=0,n=a.length;t<n;t++)i=this.columns[t],o=a.eq(t),r=o.data("kendoFilterMenu"),r&&r.destroy(),i.command||i.filterable===!1||o.kendoFilterMenu(p(!0,{},l,i.filterable,{dataSource:this.dataSource,init:s}))},_change:function(){this.trigger(z)},_selectable:function(){var e,n,i=this.options.selectable,o=this.table;i&&(i=kendo.ui.Selectable.parseOptions(i),this._hasLockedColumns&&(o=o.add(this.lockedTable),n=i.multiple&&i.cell),e=">tbody>tr:not(.k-footer-template)",i.cell&&(e+=">td"),this.selectable=new kendo.ui.Selectable(o,{filter:e,aria:!0,multiple:i.multiple,change:D(this._change,this),useAllItems:n,continuousItems:D(this._continuousItems,this,e,i.cell),relatedTarget:!i.cell&&this._hasLockedColumns?D(this._selectableTarget,this):t}))},_continuousItems:function(t,n){var i,o,r,s,a,l;if(this.lockedContent){for(i=e(t,this.lockedTable),o=e(t,this.table),r=n?this._lockedColumns().length:1,s=n?this.columns.length-r:1,a=[],l=0;l<i.length;l+=r)I.apply(a,i.slice(l,l+r)),I.apply(a,o.splice(0,s));return a}},_selectableTarget:function(t){var n,i,o,r=e();for(i=0,o=t.length;i<o;i++)n=this._relatedRow(t[i]),M(n[0],t)<0&&(r=r.add(n));return r},_relatedRow:function(t){var n,i,o=this.lockedTable;return t=e(t),o?(n=t.closest(this.table.add(this.lockedTable)),i=n.find(">tbody>tr").index(t),n=n[0]===this.table[0]?o:this.table,n.find(">tbody>tr").eq(i)):t},select:function(n){var i=this.selectable;return i?(t!==n&&(i.options.multiple||(i.clear(),n=n.first()),this._hasLockedColumns&&(n=n.add(e.map(n,D(this._relatedRow,this))))),i.value(n)):e()},clearSelection:function(){var e=this.select();e.length&&(this.selectable.clear(),this.trigger(z))},_dataSource:function(e){var t=this.dataSource;t&&(t.unbind(z,this._refreshHandler),t.unbind(P,this._errorHandler),t.unbind(B,this._progressHandler)),this._refreshHandler=D(this.refresh,this),this._errorHandler=D(this._error,this),this._progressHandler=D(this._progress,this),t=this.dataSource=c.create(e),t.bind(z,this._refreshHandler),t.bind(P,this._errorHandler),t.bind(B,this._progressHandler),this._dataSourceFetchProxy=D(function(){this.dataSource.fetch()},this)},setDataSource:function(e){this._dataSource(e),this._sortable(),this._filterable(),this._contentTree.render([]),this.options.autoBind&&this.dataSource.fetch()},dataItem:function(t){var n,i;return t instanceof ue?t:(n=e(t).closest("tr"),i=this.dataSource.getByUid(n.attr(kendo.attr("uid"))))},editRow:function(e){var t;typeof e===F&&(e=this.tbody.find(e)),t=this.dataItem(e),t&&("popup"!=this._editMode()&&(t._edit=!0),this._cancelEditor(),this._render(),this._createEditor(t),this.trigger(V,{container:this.editor.wrapper,model:t}))},_cancelEdit:function(e){e=p(e,{container:this.editor.wrapper,model:this.editor.model}),this.trigger(Y,e)||this.cancelRow()},cancelRow:function(){this._cancelEditor(),this._render()},saveRow:function(){var e,t=this.editor;t&&(e={model:t.model,container:t.wrapper},t.end()&&!this.trigger(U,e)&&this.dataSource.sync())},addRow:function(e){var n=this.editor,i=0,o={};if(!n||n.end())return e?(e instanceof ue||(e=this.dataItem(e)),o[e.parentIdField]=e.id,i=this.dataSource.indexOf(e)+1,this.expand(e).then(D(this._insertAt,this,o,i)),t):(this._insertAt(o,i),t)},_insertAt:function(e,t){e=this.dataSource.insert(t,e);var n=this.itemFor(e);this.editRow(n)},removeRow:function(e){var t=this.dataItem(e),n={model:t,row:e};t&&!this.trigger(q,n)&&(this.dataSource.remove(t),this.dataSource.sync())},_cancelEditor:function(){var e,t=this.editor;t&&(e=t.model,this._destroyEditor(),this.dataSource.cancelChanges(e),e._edit=!1)},_destroyEditor:function(){this.editor&&(this.editor.close(),this.editor=null)},_createEditor:function(e){var t,n,i=this.itemFor(e);i=i.add(this._relatedRow(i)),t=this._editMode(),n={columns:this.columns,model:e,target:this,clearContainer:!1,template:this.options.editable.template},"inline"==t?this.editor=new d(i,n):(p(n,{window:this.options.editable.window,commandRenderer:D(function(){return this._buildCommands(["update","canceledit"])},this),fieldRenderer:this._cellContent,save:D(this.saveRow,this),cancel:D(this._cancelEdit,this),appendTo:this.wrapper}),this.editor=new u(i,n))},_editMode:function(){var e="inline",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e.toLowerCase()},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._ensureExpandableColumn(),this._renderCols(),this._renderHeader(),this._render(),this._adjustTablesWidth(),this.trigger(t?Q:X,{column:e}),t||e.width||this.table.add(this.thead.closest("table")).width(""))},_findColumn:function(e){return e="number"==typeof e?this.columns[e]:R(e)?E(this.columns,function(t){return t===e})[0]:E(this.columns,function(t){return t.field===e})[0]},_adjustTablesWidth:function(){var e,t,n,i=this.thead.prev().children(),o=0;for(e=0,t=i.length;e<t;e++){if(n=i[e].style.width,!n||n.indexOf("%")!=-1){o=0;break}o+=parseInt(n,10)}o&&this.table.add(this.thead.closest("table")).width(o)},_reorderable:function(){var t,n,i;this.options.reorderable&&(t=this.options.scrollable===!0,n=(t?".k-grid-header:first ":"table:first>.k-grid-header ")+Z,i=this,this._draggableInstance=new y.Draggable(this.wrapper,{group:kendo.guid(),filter:n,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 y.Reorderable(this.wrapper,{draggable:this._draggableInstance,dragOverContainers:D(this._allowDragOverContainers,this),inSameContainer:function(t){return e(t.source).parent()[0]===e(t.target).parent()[0]},change:function(e){var t=e.newIndex,n=e.oldIndex,o="before"===e.position,r=i.columns[n];i.trigger(J,{newIndex:t,oldIndex:n,column:r}),i.reorderColumn(t,r,o)}}))},_allowDragOverContainers:function(e){return this.columns[e].lockable!==!1},reorderColumn:function(n,i,o){var r,s,a,l=this.columns,c=M(i,l),d=l[n],u=!!d.locked,h=this._nonLockedColumns().length;c!==n&&(u&&!i.locked&&1==h||!u&&i.locked&&l.length-h==1||(o===t&&(o=n<c),r=!!i.locked,r=r!=u,i.locked=u,l.splice(o?n:n+1,0,i),l.splice(c<n?c:c+1,1),this._renderCols(),s=e(this.lockedHeader).add(this.thead).find("th"),s.eq(c)[o?"insertBefore":"insertAfter"](s.eq(n)),a=this._headerTree.children[0].children,this._hasLockedColumns&&(a=this._lockedHeaderTree.children[0].children.concat(a)),a.splice(o?n:n+1,0,a[c]),a.splice(c<n?c:c+1,1),this._hasLockedColumns&&(this._lockedHeaderTree.children[0].children=a.splice(0,this._lockedColumns().length),this._headerTree.children[0].children=a),this._applyLockedContainersWidth(),this.refresh(),r&&(u?this.trigger(ne,{column:i}):this.trigger(ie,{column:i}))))},lockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:E(n,function(t){return t.field===e})[0],e&&!e.hidden&&(t=this._lockedColumns().length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:E(n,function(t){return t.field===e})[0],e&&!e.hidden&&(t=this._lockedColumns().length,this.reorderColumn(t,e,!0))},_columnMenu:function(){var t,n,i,o,r,s,a=e(this.lockedHeader).add(this.thead).find("th"),l=this.columns,c=this.options,d=c.columnMenu,u=D(this._columnMenuInit,this),h=this._lockedColumns().length;if(d)for("boolean"==typeof d&&(d={}),s=0;s<a.length;s++)t=l[s],t.field&&(n=a.eq(s).data("kendoColumnMenu"),n&&n.destroy(),o=!1,t.sortable!==!1&&d.sortable!==!1&&c.sortable!==!1&&(o=p({},c.sortable,{compare:(t.sortable||{}).compare})),r=!1,c.filterable&&t.filterable!==!1&&d.filterable!==!1&&(r=p({pane:this.pane},t.filterable,c.filterable)),i={dataSource:this.dataSource,values:t.values,columns:d.columns,sortable:o,filterable:r,messages:d.messages,owner:this,closeCallback:e.noop,init:u,pane:this.pane,lockedColumns:t.lockable!==!1&&h>0},c.$angular&&(i.$angular=c.$angular),a.eq(s).kendoColumnMenu(i))},_columnMenuInit:function(e){this.trigger(te,{field:e.field,container:e.container})}}),kendo.ExcelMixin&&kendo.ExcelMixin.extend(h.prototype),kendo.PDFMixin&&(kendo.PDFMixin.extend(h.prototype),h.fn._drawPDF=function(t){var n=new e.Deferred;return this._drawPDFShadow({width:this.wrapper.width()},{avoidLinks:this.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)}),n}),p(!0,kendo.data,{TreeListDataSource:c,TreeListModel:ue}),p(!0,kendo.ui,{TreeList:h}),y.plugin(h)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e){var t,n,i=[];if(e)for(t=l.toHyphens(e).split("-"),n=0;n<t.length;n++)i.push("k-pos-"+t[n]);return i.join(" ")}function i(e){for(var t={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},n=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],i="";e>0;)e<n[0]?n.shift():(i+=t[n[0]],e-=n[0]);return i}function o(e){var t,n,i,o,r;for(e=e.toLowerCase(),t={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},n=0,i=0,o=0;o<e.length;++o){if(r=t[e.charAt(o)],!r)return null;n+=r,r>i&&(n-=2*i),i=r}return n}function r(e){var t=Object.create(null);return function(){var n,i="";for(n=arguments.length;--n>=0;)i+=":"+arguments[n];return i in t?t[i]:t[i]=e.apply(this,arguments)}}function s(e){return a.test(e)}var a,l=window.kendo,c=l.deepExtend,d=Date.now;d||(d=function(){return(new Date).getTime()}),c(l,{util:{now:d,renderPos:n,renderSize:t,sqr:e,romanToArabic:o,arabicToRoman:i,memoize:r,isUnicodeLetter:s}}),a=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,n){(n||t)()}),function(e,define){define("util/parse-xml.min",["kendo.core.min","util/main.min"],e)}(function(){"use strict";function e(e){var t,n=[];for(t=0;t<e.length;++t)n.push(e.charCodeAt(t));return n}function t(e,t){t>65535?(t-=65536,e.push(t>>>10&1023|55296,56320|1023&t)):e.push(t)}function n(e,n){function C(n){var i=e[q++];240&i^240?224&i^224?192&i^192?n.push(i):t(n,(31&i)<<6|63&e[q++]):t(n,(15&i)<<12|(63&e[q++])<<6|63&e[q++]):t(n,(3&i)<<18|(63&e[q++])<<12|(63&e[q++])<<6|63&e[q++])}function S(e){throw Error(e+", at "+q)}function T(t){for(var n=[];q<e.length&&t(e[q]);)n.push(e[q++]);return n}function D(e){return i.apply(0,T(e))}function A(){T(R)}function E(t){var n,i=q;for(n=0;n<t.length;++n)if(e[q++]!=t[n])return q=i,!1;return t}function M(e){E(e)||S("Expecting "+e.join(", "))}function R(e){return 9==e||10==e||13==e||32==e}function I(e){return e>=48&&e<=57}function F(e){return e>=48&&e<=57||(e|=32)>=97&&e<=102}function z(e){return 58==e||95==e||(e|=32)>=97&&e<=122}function P(e){return 45==e||I(e)||z(e)}function B(){for(var t=[];q<e.length;){if(E(a))return j("comment",i.apply(0,t));C(t)}}function L(){var e,t;E(h)?U():E(l)?B():(e=N(),t=W(e),G.push(t),E(c)?j("enter",e,t,!0):(M(p),j("enter",e,t),H(e),e!=N()&&S("Bad closing tag"),j("leave",e,t),A(),M(p)),G.pop())}function H(t){for(var n=[];q<e.length;){if(E(d))return n.length&&j("text",i.apply(0,n));if(E(r))for(;q<e.length&&!E(s);)C(n);else E(f)?(n.length&&j("text",i.apply(0,n)),L(),n=[]):E(v)?V(n):C(n)}S("Unclosed tag "+t)}function N(){return z(e[q])||S("Expecting XML name"),D(P)}function O(){var t,n=E(_)||E(b);for(n||S("Expecting string"),t=[];q<e.length;){if(E(n))return i.apply(0,t);E(v)?V(t):C(t)}S("Unfinished string")}function V(e){var n,i;E(w)?(n=E(y)||E(k)?parseInt(D(F),16):parseInt(D(I),10),isNaN(n)&&S("Bad numeric entity")):(i=N(),n=o[i],void 0===n&&S("Unknown entity "+i)),t(e,n),M(m)}function U(){j("decl",N(),W()),M(u)}function W(t){for(var n,i={$tag:t};q<e.length&&(A(),n=e[q],63!=n&&62!=n&&47!=n);)i[N()]=(M(g),O());return i}function j(e,t,i,o){var r=n&&n[e];r&&r.call($,t,i,o)}var q=0,G=[],$={is:function(e){for(var t=G.length,n=e.length;--t>=0&&--n>=0;)if(G[t].$tag!=e[n]&&"*"!=e[n])return!1;return n<0?G[G.length-1]:null},exit:function(){throw x},stack:G},Y=[];for(C(Y),65279!=Y[0]&&(q=0);q<e.length;)A(),M(f),L(),A()}var i=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("?"),f=e("<"),p=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 n.apply(this,arguments)}catch(e){if(e!==x)throw e}}},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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");n(t).addClass("k-spreadsheet-clipboard").val(e).appendTo(document.body).focus().select(),document.execCommand("copy"),n(t).remove()}var n,i,o,r,s,a,l,c;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=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.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(),n=t._ref;n.forEach(function(n){t.sheet().forEach(n.toRangeRef(),e.bind(this))}.bind(this))}}),o=i.extend({init:function(e){i.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=i.extend({init:function(e){i.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=i.extend({_setRange:function(e){i.prototype._setRange.call(this,e.skipHiddenCells())},init:function(e){i.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=i.extend({exec:function(){this.getState(),this.range().clearContent()}}),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"}},getState:function(){this._state=this.range().getState()},exec:function(){var t,n,i=this.range();if(!i.enable())return{reason:"error",type:"rangeDisabled"};if(t=this._value,this.getState(),"value"==this._property)return void i.value(t);try{if(i.link(null),""===t?i.value(null):(i.input(t),/\n/.test(i.value())&&i.wrap(!0)),i._adjustRowHeight(),n=i._getValidationState())return this.rejectState(n)}catch(o){if(o instanceof e.spreadsheet.calc.ParseError)return{title:"Error in formula",body:o+"",reason:"error"};throw o}}}),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 n=t.topLeft().row;e[n]=t.sheet().rowHeight(n)}),this._state=this.range().getState(this._property),this._rowHeight=e},undo:function(){var e,t=this.range().sheet(),n=this._rowHeight;this.range().setState(this._state);for(e in n)t.rowHeight(e,n[e])}}),e.spreadsheet.AdjustDecimalsCommand=i.extend({init:function(e){this._decimals=e.value,e.property="format",i.fn.init.call(this,e)},exec:function(){var t=this.range().sheet(),n=this._decimals,i=e.spreadsheet.formatting;this.getState(),t.batch(function(){this.range().forEachCell(function(e,o,r){var s=r.format;(s||n>0)&&(s=i.adjustDecimals(s||"#",n),t.range(e,o).format(s))})}.bind(this))}}),e.spreadsheet.BorderChangeCommand=i.extend({init:function(e){e.property="border",i.fn.init.call(this,e),this._type=e.border,this._style=e.style},exec:function(){this.getState(),this[this._type](this._style)},noBorders:function(){var e=this.range();e.sheet().batch(function(){e.borderLeft(null).borderTop(null).borderRight(null).borderBottom(null)}.bind(this),{})},allBorders:function(e){var t=this.range();t.sheet().batch(function(){t.borderLeft(e).borderTop(e).borderRight(e).borderBottom(e)}.bind(this),{})},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.sheet().batch(function(){t.leftColumn().borderLeft(e),t.topRow().borderTop(e),t.rightColumn().borderRight(e),t.bottomRow().borderBottom(e)}.bind(this),{})},insideBorders:function(e){this.range().sheet().batch(function(){this.allBorders(e),this.outsideBorders(null)}.bind(this),{})},insideHorizontalBorders:function(e){var t=this.range();t.sheet().batch(function(){t.borderBottom(e),t.bottomRow().borderBottom(null)}.bind(this),{})},insideVerticalBorders:function(e){var t=this.range();t.sheet().batch(function(){t.borderRight(e),t.rightColumn().borderRight(null)}.bind(this),{})}}),e.spreadsheet.MergeCellCommand=i.extend({init:function(e){i.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=i.extend({init:function(e){i.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=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._event=e.event},getState:function(){this._range=this._workbook.activeSheet().range(this._clipboard.pasteRef()),this._state=this._range.getState()},exec:function(){var e,t,n;return this.getState(),this._clipboard.parse(),e=this._clipboard.canPaste(),e.canPaste?(t=this._workbook.activeSheet().selection(),n=this._workbook.trigger("paste",{range:t}),void(n?this._event.preventDefault():(this._clipboard.paste(),t._adjustRowHeight()))):e.menuInvoked?{reason:"error",type:"useKeyboard"}:e.pasteOnMerged?{reason:"error",type:"modifyMerged"}:e.overflow?{reason:"error",type:"overflow"}:e.pasteOnDisabled?(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"}):{reason:"error"}}}),e.spreadsheet.AdjustRowHeightCommand=i.extend({exec:function(){var e=this.options,t=this._workbook.activeSheet(),n=e.range||t.range(e.rowIndex);n._adjustRowHeight()}}),e.spreadsheet.ToolbarPasteCommand=i.extend({exec:function(){return e.support.clipboard.paste?(this._workbook._view.clipboard.focus().select(),void document.execCommand("paste")):{reason:"error",type:"useKeyboard"}}}),e.spreadsheet.CopyCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._event=e.event},undo:n.noop,exec:function(){var e,t,n=this._clipboard.canCopy();if(this._clipboard.menuInvoked=!0,n.canCopy)e=this._workbook.activeSheet().selection(),t=this._workbook.trigger("copy",{range:e}),t?this._event.preventDefault():this._clipboard.copy();else{if(n.menuInvoked)return{reason:"error",type:"useKeyboard"};if(n.multiSelection)return{reason:"error",type:"unsupportedSelection"}}}}),e.spreadsheet.ToolbarCopyCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard()},undo:n.noop,exec:function(){if(!e.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var n=this._workbook._view.clipboard;t(n.html()),n.trigger("copy")}}),e.spreadsheet.CutCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._event=e.event},exec:function(){var e,t;return this.range().enable()&&this._clipboard.canCopy()?(this.getState(),e=this._workbook.activeSheet().selection(),(t=this._workbook.trigger("cut",{range:e}))?void this._event.preventDefault():void this._clipboard.cut()):(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"})}}),e.spreadsheet.AutoFillCommand=i.extend({init:function(e){i.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"};this.getState();try{t.fillFrom(this._origin)}catch(n){if(n instanceof e.spreadsheet.Range.FillError)return{reason:"error",type:n.code};throw n}}}),e.spreadsheet.ToolbarCutCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard()},exec:function(){if(!e.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var n=this._workbook._view.clipboard;t(n.html()),n.trigger("cut")}}),e.spreadsheet.FilterCommand=i.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=i.extend({undo:function(){var e=this.range().sheet();e.setState(this._state)},exec:function(){var e,t=this.range(),n=t.sheet(),i=n.activeCell(),o=this.options.sheet?i.topLeft.col:this.options.column||0,r="asc"===this.options.value;return this._state=n.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=i.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,n,i=this.range(),o=this.column(),r=i.sheet().filter(),s=!1;this.options.valueFilter?n={column:o,filter:new e.spreadsheet.ValueFilter(this.options.valueFilter)}:this.options.customFilter&&(n={column:o,filter:new e.spreadsheet.CustomFilter(this.options.customFilter)}),this.getState(),r&&r.ref.eq(i._ref)&&r.columns.length?(r.columns.forEach(function(e){e.index===o&&(s=!0)}),t=r.columns.map(function(e){return e.index===o?n:{column:e.index,filter:e.filter}}),s||t.push(n)):t=n,i.filter(t)}}),e.spreadsheet.ClearFilterCommand=s.extend({exec:function(){var e=this.range(),t=this.column();this.getState(),e.clearFilter(t)}}),e.spreadsheet.HideLineCommand=i.extend({init:function(e){i.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=e.spreadsheet.DeleteCommand=i.extend({undo:function(){var e=this.range().sheet();e.setState(this._state)}}),e.spreadsheet.DeleteRowCommand=a.extend({exec:function(){var e=this.range().sheet();this._state=e.getState(),e.axisManager().deleteSelectedRows()}}),e.spreadsheet.DeleteColumnCommand=a.extend({exec:function(){var e=this.range().sheet();this._state=e.getState(),e.axisManager().deleteSelectedColumns()}}),l=i.extend({init:function(e){i.fn.init.call(this,e),this._value=e.value},undo:function(){var e=this.range().sheet();e.setState(this._state)}}),e.spreadsheet.AddColumnCommand=l.extend({exec:function(){var e=this.range().sheet(),t=e.axisManager().preventAddColumn();return t?t:(this._state=e.getState(),void("left"===this._value?e.axisManager().addColumnLeft():e.axisManager().addColumnRight()))}}),e.spreadsheet.AddRowCommand=l.extend({exec:function(){var e=this.range().sheet(),t=e.axisManager().preventAddRow();return t?t:(this._state=e.getState(),void("above"===this._value?e.axisManager().addRowAbove():e.axisManager().addRowBelow()))}}),e.spreadsheet.EditValidationCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._value=e.value},exec:function(){this.range().validation(this._value)}}),e.spreadsheet.OpenCommand=i.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=i.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(n.extend(this.options.pdf,{workbook:this.options.workbook,fileName:e}))}}),c=i.extend({init:function(e){i.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,n){(n||t)()}),function(e,define){define("spreadsheet/formulabar.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n={wrapper:"k-spreadsheet-formula-bar"},i=e.ui.Widget.extend({init:function(n,o){e.ui.Widget.call(this,n,o),n=this.element.addClass(i.classNames.wrapper),this.formulaInput=new e.spreadsheet.FormulaInput(t("<div/>").appendTo(n))},destroy:function(){this.formulaInput&&this.formulaInput.destroy(),this.formulaInput=null}}),e.spreadsheet.FormulaBar=i,t.extend(!0,i,{classNames:n}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/formulainput.min",["kendo.core.min"],e)}(function(){!function(e,t){function n(e){return"("==e||"["==e||"{"==e}function i(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,f,p,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"},f=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],p={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(n){if(n===e)throw t;if(1==n.nodeType)for(var i=n.firstChild;i;i=i.nextSibling)o(i);else 3==n.nodeType&&(t+=n.nodeValue.length)}(i)}catch(n){return n}}var n,i=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&&(n=r,r=s,s=n),{begin:r,end:s,collapsed:r==s}},setPos:function(e,n){function i(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 i(e){var n,o;if(3==e.nodeType){if(n=e.nodeValue.length,n>=t)throw e;t-=n}else if(1==e.nodeType)for(o=e.firstChild;o;o=o.nextSibling)i(o)}(e)}catch(n){return{node:n,pos:t}}}var r,s,a,l=this.element[0];e=o(l,e),n=null!=n?o(l,n):e,e&&n&&(r=document.createRange(),r.setStart(e.node,e.pos),r.setEnd(n.node,n.pos),s=t.getSelection(),a=s.getRangeAt(0),i(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,n,i=[];for(n in e.spreadsheet.calc.runtime.FUNCS)m.test(n)||(t=n.toUpperCase(),i.push({value:t,text:t}));this.formulaSource=new e.data.DataSource({data:i})},_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,n,i=this._tokenContext();i&&!this._mute&&(e=i.token,t=this.list.value()[0],n={replace:!0,token:e,end:e.end},i.nextToken&&"("==i.nextToken.value||(t+="("),this._replaceAt(n,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;p[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(){this._focusTimeout=setTimeout(this._syntaxHighlight.bind(this)),this.trigger("focus")},_paste:function(n){var i,o,r;n.preventDefault(),i=this.getPos(),o=e.support.browser.msie?t.clipboardData.getData("Text"):n.originalEvent.clipboardData.getData("text/plain"),r=this.value(),r=r.substr(0,i.begin)+o+r.substr(i.end),this.value(r),this.setPos(i.begin+o.length),this.scale()},_move:function(e){var t=this.list,n=this.popup;if(n.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()),n.close(),!0;if(e===u.TAB)return t.select(t.focus()),n.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,n,i,o=this.getPos(),s=this.value();if(!s||!o||!o.collapsed)return null;for(t=e.spreadsheet.calc.tokenize(s,this.row(),this.col()),i=0;i<t.length;++i)if(n=t[i],r(n,o)&&/^(?:str|sym|func)$/.test(n.type))return{token:n,nextToken:t[i+1]};return null},_sync:function(){this._editorToSync&&this.isActive()&&this._editorToSync.value(this.value())},_textContainer:function(){var t=e.getComputedStyles(this.element[0],f);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,n=this._canInsertRef(e),i=n&&n.token;if(i)for(t=0;t<this._staticTokens.length;t++)if(a(i,this._staticTokens[t]))return null;return n},_canInsertRef:function(t){function i(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)||n(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(/^(?:ref|op|punc)$/.test(e.type))return{token:e,end:l.end};if(/^(?:punc|op)$/.test(e.type))return/^[,;({]$/.test(e.value)?{token:e,end:l.end}:null}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(i(d))return s(c[u-1],d)}return s(d,null)}return null},refAtPoint:function(e){var t=this._canInsertRef();t&&this._replaceAt(t,""+e.simplify())},_replaceAt:function(e,t){var n,i=this.value(),o=e.token,r=i.substr(e.end);i=i.substr(0,e.replace?o.begin:e.end)+t,n=i.length,i+=r,this._value(i),this.setPos(n),this.scale(),this._syntaxHighlight(),this._sync()},syncWith:function(t){var n,i=this,o="input"+d,r=i._sync.bind(i);e.support.browser.msie&&(o="keydown"+d,n=function(){setTimeout(r)}),i._editorToSync=t,i.element.off(o).on(o,n||r)},scale:function(){var e,t,n=this.element;this._span||this._textContainer(),this._span.html(n.html()),e=this._span.width()+this.options.scalePadding,t=this._span.height(),e>n.width()&&n.width(e),t>n.height()&&n.height(t)},_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=[],f=[];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());f=e.spreadsheet.calc.tokenize(l,this.row(),this.col()),f.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(n(e.value))h.unshift(e);else if(i(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")}),f.reverse().forEach(function(t){var n=t.begin,i=t.end,o=e.htmlEncode(l.substring(n,i));l=l.substr(0,n)+"<span class='"+t.cls.join(" ")+"'>"+o+"</span>"+l.substr(i)}),this.element.html(l),a&&this.setPos(a.begin,a.end),t&&/^(?:startexp|op|punc)$/.test(t.type)&&this._setStaticTokens(f),this._highlightedRefs=d}},_setStaticTokens:function(e){var t,n;for(this._staticTokens=[],t=0;t<e.length;t++)n=e[t],/^(?:num|str|bool|sym|ref)$/.test(n.type)&&this._staticTokens.push(n)},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(),n=t.end==e.length;e=e.substr(0,t.begin)+(n?"\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,n){(n||t)()}),function(e,define){define("spreadsheet/eventlistener.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n={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"},i=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},r=function(e){var t=e.keyCode,i=n[t];return!i&&o(t)&&(i=":alphanum"),!i&&e.key&&1==e.key.length&&(i=":alphanum"),i},s=e.Class.extend({init:function(e,n,i){if(this._handlers={},this.target=e,this._observer=n||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),i)for(var o in i)this.on(o,i[o])},keyDown:function(e){this.handleEvent(e,r(e.originalEvent))},mouse:function(e){var t,n,i,o,r;e.which?t=3==e.which:e.button&&(t=2==e.button),n=e.type,"mousedown"===n&&(t?n="rightmousedown":this._pressLocation={x:e.pageX,y:e.pageY}),"mouseup"===n&&(t||(this._pressLocation=null)),"mousemove"===n&&this._pressLocation&&(i=this._pressLocation.x-e.pageX,o=this._pressLocation.y-e.pageY,r=Math.sqrt(i*i+o*o),r>this.threshold&&(n="mousedrag")),this.handleEvent(e,n)},handleEvent:function(e,t){var n,o,r="";e.mod=i?e.metaKey:e.ctrlKey&&!e.altKey,e.altKey&&(r+="alt+"),e.shiftKey&&(r+="shift+"),e.ctrlKey&&(r+="ctrl+"),r+=t,n=this._handlers["*+"+t],n&&n.call(this._observer,e,r),o=this._handlers[r],o&&o.call(this._observer,e,r)},on:function(e,t){var n=this._handlers;"string"==typeof t&&(t=this._observer[t]),"string"==typeof e&&(e=e.split(",")),e.forEach(function(e){n[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,n){(n||t)()}),function(e,define){define("spreadsheet/rangelist.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e}function n(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 o(e,t){return e===d?new c(1,t,d,d):(e.value.start-t.start>0?e.left=o(e.left,t):e.right=o(e.right,t),i(n(e)))}function r(e,t){var o,s;if(e===d)return e;if(o=e.value.start-t.start,0===o)if(e.left!==d&&e.right!==d){for(s=e.left;s.right!==d;)s=s.right;e.value=s.value,e.left=r(e.left,e.value)}else e=e.left===d?e.right:e.left;else o>0?e.left=r(e.left,t):e.right=r(e.right,t);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=n(e),e.right=n(e.right),e.right.right=n(e.right.right),e=i(e),e.right=i(e.right)),e}function s(e,t){e!==d&&(s(e.left,t),t.push(e.value),s(e.right,t))}function a(e,t,n){if(e!==d){var i=e.value;t.start<i.start&&a(e.left,t,n),i.intersects(t)&&n.push(i),t.end>i.end&&a(e.right,t,n)}}function l(e,t,n){t!==d&&(l(e,t.left,n),e.insert(n(t.value)),l(e,t.right,n))}var c,d,u,h,f,p,m;e.support.browser.msie&&e.support.browser.version<9||(c=e.Class.extend({init:function(e,t,n,i){this.level=e,this.value=t,this.left=n,this.right=i}}),d=new function(){this.left=this,this.right=this,this.level=0},u=e.Class.extend({init:function(e,t,n){this.start=e,this.end=t,this.value=n},intersects:function(e){return e.start<=this.end&&e.end>=this.start}}),h=e.Class.extend({init:function(){this.root=d},insert:function(e){this.root=o(this.root,e)},remove:function(e){this.root=r(this.root,e)},findrange:function(e){for(var t=this.root;t!=d;)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 s(this.root,e),e},intersecting:function(e,t){var n=[];return a(this.root,new u(e,t),n),n},map:function(e){var t=new h;return l(t,this.root,e),t},clone:function(){return this.map(t)},first:function(){for(var e=this.root;e.left!=d;)e=e.left;return e},last:function(){for(var e=this.root;e.right!=d;)e=e.right;return e}}),f=e.Class.extend({init:function(e,t,n){void 0===t?this.tree=e:(this.tree=new h,this.tree.insert(new u(e,t,n)))},values:function(){return this.tree.values()},map:function(e){return new f(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,n){return this.tree.insert(new u(e,t,n))},value:function(e,t,n){var i,o,r,s,a,l,c,d,u;if(void 0===n)return void 0===t&&(t=e),this.intersecting(e,t)[0].value;if(i=this.tree.intersecting(e-1,t+1),i.length)for(o=i[0],r=i[i.length-1],o.end<e&&(o.value===n?e=o.start:i.shift()),r.start>t&&(r.value===n?t=r.end:i.pop()),s=0,a=i.length;s<a;s++)l=i[s],c=l.value,d=l.start,u=l.end,this.tree.remove(l),d<e&&(c!==n?this.insert(d,e-1,c):e=d),u>t&&(c!==n?this.insert(t+1,u,c):t=u);this.insert(e,t,n)},expandedValues:function(e,t){var n,i=this.intersecting(e,t),o=[],r=0;for(n=e;n<=t;n++)i[r].end<n&&r++,o.push({index:n-e,value:i[r].value});return o},sortedIndices:function(e,t,n,i){var o=this.expandedValues(e,t),r=function(e,t){return e.value===t.value?e.index-t.index:n(e.value,t.value)};return i&&(r=function(e,t){var o=i[e.index],r=i[t.index];return o.value===r.value?n(e.value,t.value):e.index-t.index}),o.sort(r),o},sort:function(e,t,n){var i,o,r;if(1!==this.intersecting(e,t).length)for(i=this.expandedValues(e,t),o=0,r=n.length;o<r;o++)this.value(o+e,o+e,i[n[o].index].value)},copy:function(e,t,n){var i,o,r,s,a,l=this.intersecting(e,t),c=n;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),i=c+(a-s),this.value(c,i,l[o].value),c=++i},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}}),p=e.Class.extend({init:function(e,t,n){this.start=e,this.end=t,this.index=0,this.ranges=n},unique:function(){return this.ranges.map(function(e){return e.value})},at:function(e){for(;this.ranges[this.index].end<e;)this.index++;return 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}}),m=f.extend({init:function(e,t,n){this.tree=new h,this.range=new u(e,t,n)},intersecting:function(e,t){var n,i,o,r=this.tree.intersecting(e,t),s=[];if(!r.length)return[this.range];for(i=0,o=r.length;i<o;i++)n=r[i],n.start>e&&s.push(new u(e,n.start-1,this.range.value)),s.push(n),e=n.end+1;return n.end<t&&s.push(new u(n.end+1,t,this.range.value)),s},insert:function(e,t,n){n!==this.range.value&&this.tree.insert(new u(e,t,n))},lastRangeStart:function(){var e=this.tree.root;if(e===d)return this.range.start;for(;e.right!==d;)e=e.right;return e.value.end+1}}),e.spreadsheet.RangeTree=h,e.spreadsheet.RangeList=f,e.spreadsheet.SparseRangeList=m,e.spreadsheet.ValueRange=u)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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")}var n,i,o,r;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=e.Class.extend({init:function(e){this.list=e},get:function(e){return this.parse(this.list.value(e,e))},set:function(e,t,n){void 0===n&&(n=t,t=e),this.list.value(e,t,n)},parse:function(e){return e},copy:function(e,t,n){this.list.copy(e,t,n)},iterator:function(e,t){return this.list.iterator(e,t)}}),o=i.extend({set:function(e,t,n){this.list.value(e,t,JSON.stringify(n))},parse:function(e){return JSON.parse(e)}}),r=i.extend({init:function(e,t,n){i.prototype.init.call(this,e),this.validations=n,this.formats=t},set:function(n,i,o){o instanceof Date&&(o=e.spreadsheet.dateToNumber(o),this.formats.value(n,i,t(e.culture().calendar.patterns.d))),this.list.value(n,i,o)}}),e.spreadsheet.PropertyBag=e.Class.extend({specs:[{property:r,name:"value",value:null,sortable:!0,serializable:!0,depends:"format"},{property:i,name:"format",value:null,sortable:!0,serializable:!0},{property:i,name:"formula",value:null,sortable:!0,serializable:!0},{property:i,name:"background",value:null,sortable:!0,serializable:!0},{property:o,name:"borderBottom",value:null,sortable:!1,serializable:!0},{property:o,name:"borderRight",value:null,sortable:!1,serializable:!0},{property:o,name:"borderLeft",value:null,sortable:!1,serializable:!0},{property:o,name:"borderTop",value:null,sortable:!1,serializable:!0},{property:i,name:"color",value:null,sortable:!0,serializable:!0},{property:i,name:"fontFamily",value:null,sortable:!0,serializable:!0},{property:i,name:"underline",value:null,sortable:!0,serializable:!0},{property:i,name:"fontSize",value:null,sortable:!0,serializable:!0},{property:i,name:"italic",value:null,sortable:!0,serializable:!0},{property:i,name:"bold",value:null,sortable:!0,serializable:!0},{property:i,name:"textAlign",value:null,sortable:!0,serializable:!0},{property:i,name:"verticalAlign",value:null,sortable:!0,serializable:!0},{property:i,name:"wrap",value:null,sortable:!0,serializable:!0},{property:i,name:"validation",value:null,sortable:!1,serializable:!0},{property:i,name:"enable",value:null,sortable:!1,serializable:!0},{property:i,name:"link",value:null,sortable:!1,serializable:!0},{property:i,name:"editor",value:null,sortable:!1,serializable:!0}],init:function(t,n){n=n||{},this.properties={},this.lists={},this.specs.forEach(function(i){var o=void 0!==n[i.name]?n[i.name]:i.value;this.lists[i.name]=new e.spreadsheet.SparseRangeList(0,t,o)},this),this.specs.forEach(function(e){this.properties[e.name]=new e.property(this.lists[e.name],this.lists[e.depends])},this)},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){return void 0===t?this.lists[e]:this.properties[e].get(t)},set:function(e,t,n,i){this.properties[e].set(t,n,i)},fromJSON:function(e,t){var n,i;for(n=0;n<this.specs.length;n++)i=this.specs[n],i.serializable&&void 0!==t[i.name]&&this.set(i.name,e,e,t[i.name],!1)},copy:function(e,t,n){this.specs.forEach(function(i){this.properties[i.name].copy(e,t,n)},this)},iterator:function(e,t,n){return this.properties[e].iterator(t,n)},sortable:function(){return this.specs.filter(function(e){return e.sortable}).map(function(e){return this.lists[e.name]},this)},iterators:function(e,t){var n=this.specs.filter(function(e){return e.serializable});return n.map(function(n){var i=this.iterator(n.name,e,t);return{name:n.name,value:n.value,at:function(e){return n.property.fn.parse(i.at(e))}}},this)},forEach:function(e,t,n){var i,o,r,s,a,l=this.iterators(e,t);for(i=e;i<=t;i++){for(o={},r=0;r<l.length;r++)s=l[r],a=s.at(i),a!==s.value&&(o[s.name]=a);n(o)}},forEachProperty:function(e){for(var t in this.properties)e(this.properties[t]);
}}),e.spreadsheet.ALL_PROPERTIES=n.map(e.spreadsheet.PropertyBag.prototype.specs,function(e){return e.name}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/references.min",["kendo.core.min"],e)}(function(){"use strict";function e(t){var n=Math.floor(t/26)-1;return(n>=0?e(n):"")+String.fromCharCode(65+t%26)}function t(e){return/^[a-z0-9_]*$/i.test(e)?e:"'"+e.replace(/\x27/g,"\\'")+"'"}function n(n,i,o,r){var s="";return++i,isFinite(i)?null==r||2&r||(i="$"+i):i="",isFinite(o)?(s=e(o),null==r||1&r||(s="$"+s)):o="",n?t(n)+"!"+s+i:s+i}var i,o,r,s,a,l,c,d;kendo.support.browser.msie&&kendo.support.browser.version<9||(i=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,n,i,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,n=a.refs,t.length!=n.length)return!1;for(i=0,o=t.length;i<o;i++)if(!t[i].eq(n[i]))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 n=[],i="row"===e?"forEachRow":"forEachColumn";this[i](function(t){var i=t.first()[e];n.indexOf(i)===-1&&n.push(i)}),n.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=n,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,n){this.row=e,this.col=t,this.rel=n||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,i,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,i),o?(l=r.row%1048576,a=r.col%16384,l<0&&(l+=1048576),a<0&&(a+=16384),n(this._hasSheet&&this.sheet,l,a,c)):r.valid()?n(this._hasSheet&&this.sheet,r.row,r.col,c):"#REF!")},absolute:function(e,t){var n=this.clone();return n.rel&!1?n:(1&n.rel&&(n.col=(n.col+t)%16384),2&n.rel&&(n.row=(n.row+e)%1048576),n.rel=0,n)},toRangeRef:function(){return new c(this,this)},relative:function(e,t,n){var i,o;return null==n&&(n=this.rel),i=2&n?this.row-e:this.row,o=1&n?this.col-t:this.col,new l(i,o,n).setSheet(this.sheet,this.hasSheet())},height:function(){return 1},width:function(){return 1},toString:function(){return n(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,n,i,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!=n&&null!=i&&(l=l.relative(n,i,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,n,i,o,r,a,d,u;return this.sheet!=e.sheet?s:(t=this.topLeft.col,n=this.topLeft.row,i=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<=i&&n<=u&&a<=o?new c(new l(Math.max(n,a),Math.max(t,r)),new l(Math.min(o,u),Math.min(i,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,n=this.bottomRight,i=t.row,o=t.col,r=n.row,s=n.col,a=2&t.rel,c=1&t.rel,d=2&n.rel,u=1&n.rel,h=!1;return i>r&&(h=!0,e=i,i=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(i,o,c|a),this.bottomRight=new l(r,s,u|d)),this},print:function(e,n,i){if(i||this.absolute(e,n).valid()){var o=this.topLeft.print(e,n,i)+":"+this.bottomRight.print(e,n,i);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,n,i){return null==i&&(i=n),new c(this.topLeft.relative(e,t,n),this.bottomRight.relative(e,t,i)).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,n=this.topLeft.row,i=this.bottomRight.row,o=this.topLeft.col,r=this.bottomRight.col;for(t=n;t<=i;t++)e(new c(new l(t,o),new l(t,r)))},forEachColumn:function(e){var t,n=this.topLeft.row,i=this.bottomRight.row,o=this.topLeft.col,r=this.bottomRight.col;for(t=o;t<=r;t++)e(new c(new l(n,t),new l(i,t)))},intersecting:function(e){return e.filter(function(e){return e.toRangeRef().intersects(this)},this)},union:function(e,t){var n,i=this.intersecting(e),o=this.topLeft.row,r=this.topLeft.col,s=this.bottomRight.row,a=this.bottomRight.col,d=!1;return i.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)}),n=new c(new l(o,r),new l(s,a)),d?n.union(e,t):n},resize:function(e){function t(e){return e||0}var n=Math.max.bind(Math,0),i=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||i<0&&r<0?s:i<=r&&o<=a?new c(new l(n(i),n(o)),new l(n(r),n(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},isCell:function(){return!this.endSheet&&this.topLeft.eq(this.bottomRight)},toString:function(){return this.topLeft+":"+this.bottomRight},adjust:function(e,t,n,i,o,r,a){var l=this.topLeft.adjust(e,t,n,i,o,r,a),d=this.bottomRight.adjust(e,t,n,i,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!=n&&null!=i&&(l=l.relative(n,i,this.topLeft.rel))):d===s&&(d=this.bottomRight.absolute(e,t),o?d.row=r-1:d.col=r-1,null!=n&&null!=i&&(d=d.relative(n,i,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,n,i=[];for(t=0;t<this.length;++t)n=e.intersect(this.refs[t]),n!==s&&i.push(n);return i.length>0?new d(i).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(n){return n.absolute(e,t)}))},forEach:function(e,t){this.refs.forEach(e,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){return new d(this.refs.map(e,t))},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,n){return this.refs.map(function(i){return i.print(e,t,n)}).join(",")},replaceAt:function(e,t){var n=this.refs.slice();return n.splice(e,1,t),new d(n)},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,n,i,o,r,s){return this.map(function(a){return a.adjust(e,t,n,i,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(n){n.renameSheet(e,t)})}}),i.NULLREF=s,i.SHEETREF=new c(new l(0,0),new l(1/0,1/0)),i.FIRSTREF=new l(0,0),i.Ref=r,i.NameRef=a,i.CellRef=l,i.RangeRef=c,i.UnionRef=d,i.SHEETREF.print=function(){return"#SHEET"})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/autofillcalculator.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.Class.extend({init:function(e){this._grid=e},rectIsVertical:function(e,t,n,i){var o=this._grid.rectangle(e.toRangeRef()),r=this._grid.rectangle(t.toRangeRef());return Math.abs(r[i]-o[i])>Math.abs(o[n]-r[n])},autoFillDest:function(e,i){var o,r,s,a,l,c,d,u=e.topLeft,h=e.bottomRight,f=i.row>=u.row,p=i.col>=u.col;return o=f?p?4:3:p?2:1,4===o?(r=u,s=h,l=i.row>s.row||i.col>s.col,l&&(i=new n(Math.max(i.row,s.row),Math.max(i.col,s.col))),a=this.rectIsVertical(s,i,"right","bottom")?new n(i.row,s.col):new n(s.row,i.col)):3===o?(c=new n(u.col,h.row),i.row>h.row&&this.rectIsVertical(c,i,"left","bottom")?(r=u,a=new n(i.row,h.col)):(r=h,a=new n(u.row,i.col))):2===o?(d=new n(u.row,h.col),i.col>h.col&&!this.rectIsVertical(d,i,"right","top")?(r=u,a=new n(h.row,i.col)):(r=h,a=new n(i.row,u.col))):(r=h,a=this.rectIsVertical(u,i,"left","top")?new n(i.row,u.col):new n(u.row,i.col)),this._grid.normalize(new t(r,a))}}),e.spreadsheet.AutoFillCalculator=i)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/navigator.min",["kendo.core.min","spreadsheet/autofillcalculator.min"],e)}(function(){!function(e){var t,n,i,o;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.Class.extend({init:function(e,t,n,i){this.rangeGetter=n,this.prevLeft=function(n){var o=i(this.range(n)),r=this.range(t.prevVisible(o.topLeft[e]));return i(r).topLeft[e]},this.nextRight=function(n){var o=i(this.range(n)),r=this.range(t.nextVisible(o.bottomRight[e]));return i(r).bottomRight[e]},this.nextLeft=function(n){var o=i(this.range(n));return t.nextVisible(o.bottomRight[e])},this.prevRight=function(n){var o=i(this.range(n));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 i("col",this._sheet._grid._columns,this.columnRange.bind(this),this.union.bind(this)),this.rowEdge=new i("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,n){return this._sheet._ref(t,e,n-t,1)},rowRange:function(e,t,n){return this._sheet._ref(e,t,1,n-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,n){e=this.refForMode(e,t),n&&(e=this._sheet.select().concat(e)),this._sheet.select(e)},refForMode:function(e,t){var n=this._sheet._grid;switch(t){case"range":e=n.normalize(e);break;case"row":e=n.rowRef(e.row);break;case"column":e=n.colRef(e.col);break;case"sheet":e=this._sheet._sheetRef}return e},startSelection:function(e,n,i,o){if("autofill"==n)this._sheet.startAutoFill();else if(o&&"range"==n){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,n,i)},completeSelection:function(){this._sheet.completeSelection()},selectForContextMenu:function(e,t){var n=this._sheet;n.select().contains(this.refForMode(e,t))||this.select(e,t)},modifySelection:function(e){var n,i,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(),f=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),n=h;break;case"shrink-right":h.col=this.colEdge.nextLeft(h.col),n=h;break;case"expand-right":f.col=this.colEdge.nextRight(f.col),n=f;break;case"shrink-left":f.col=this.colEdge.prevRight(f.col),n=f;break;case"expand-up":h.row=this.rowEdge.prevLeft(h.row),n=h;break;case"shrink-down":h.row=this.rowEdge.nextLeft(h.row),n=h;break;case"expand-down":f.row=this.rowEdge.nextRight(f.row),n=f;break;case"shrink-up":f.row=this.rowEdge.prevRight(f.row),n=f;break;case"expand-page-up":h.row=a.prevPage(h.row,s);break;case"shrink-page-up":f.row=a.prevPage(f.row,s);break;case"expand-page-down":f.row=a.nextPage(f.row,s);break;case"shrink-page-down":h.row=a.nextPage(h.row,s);break;case"first-col":h.col=l.firstVisible(),f.col=u.bottomRight.col,n=h;break;case"last-col":f.col=l.lastVisible(),h.col=u.topLeft.col,n=f;break;case"first-row":h.row=a.firstVisible(),f.row=u.bottomRight.row,n=h;break;case"last-row":f.row=a.lastVisible(),h.row=u.topLeft.row,n=f;break;case"last":f.row=a.lastVisible(),f.col=l.lastVisible(),h=u.topLeft,n=f;break;case"first":h.row=a.firstVisible(),h.col=l.firstVisible(),f=u.bottomRight,n=h}return i=new t(h,f),this.union(i).intersects(u)?(n&&r.focus(n),void this.updateCurrentSelectionRange(i)):void this.modifySelection(o.replace("shrink","expand"))},moveActiveCell:function(e){var t=this._sheet,i=t.activeCell(),o=i.topLeft,r=i.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 n(c,d))},navigateInSelection:function(e){for(var t,i=this._sheet,o=i.activeCell(),r=o.topLeft,s=i.originalActiveCell(),a=i._grid._rows,l=i._grid._columns,c=s.row,d=s.col,u=i.currentNavigationRange(),h=u.topLeft,f=u.bottomRight,p=!1,m=r.col,g=r.row;!p;){switch(t=new n(c,d),e){case"next":f.eq(t)?(u=i.nextNavigationRange(),c=u.topLeft.row,d=u.topLeft.col):(d=l.nextVisible(m,!0),d>f.col&&(d=h.col,c=a.nextVisible(c,!0)));break;case"previous":h.eq(t)?(u=i.previousNavigationRange(),c=u.bottomRight.row,d=u.bottomRight.col):(d=l.prevVisible(m,!0),d<h.col&&(d=f.col,c=a.prevVisible(c,!0)));break;case"lower":f.eq(t)?(u=i.nextNavigationRange(),c=u.topLeft.row,d=u.topLeft.col):(c=a.nextVisible(g,!0),c>f.row&&(c=h.row,d=l.nextVisible(d,!0)));break;case"upper":h.eq(t)?(u=i.previousNavigationRange(),c=u.bottomRight.row,d=u.bottomRight.col):(c=a.prevVisible(g,!0),c<h.row&&(c=f.row,d=l.prevVisible(d,!0)));break;default:throw Error("Unknown entry navigation: "+e)}p=!this.shouldSkip(c,d),m=d,g=c}i.singleCellSelection()?i.select(new n(c,d)):i.activeCell(new n(c,d))},extendSelection:function(e,n){var i,o=this._sheet,r=o._grid;return"autofill"===n?void this.resizeAutoFill(e):("range"===n?e=r.normalize(e):"row"===n?e=r.rowRef(e.row).bottomRight:"column"===n&&(e=r.colRef(e.col).bottomRight),i=o.originalActiveCell().toRangeRef(),void this.updateCurrentSelectionRange(new t(i.topLeft,e)))},shouldSkip:function(e,t){var i=new n(e,t),o=!1;return this._sheet.forEachMergedCell(function(e){e.intersects(i)&&!e.collapse().eq(i)&&(o=!0)}),o},resizeAutoFill:function(e){var t,n,i,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&&(n=o.direction,r=o.props,0===n||1==n?(i=r[r.length-1],t=i[i.length-1].value):2===n?(i=r[0],t=i[i.length-1].value):3===n&&(i=r[r.length-1],t=i[0].value))),s.updateAutoFill(c,d,t,n)},determineDirection:function(e){var t=this._sheet.currentSelectionRange(),n=this._sheet.activeCell(),i=n.topLeft.col==t.topLeft.col,o=n.bottomRight.col==t.bottomRight.col,r=n.topLeft.row==t.topLeft.row,s=n.bottomRight.row==t.bottomRight.row;switch(e){case"left":e=o?"expand-left":"shrink-left";break;case"right":e=i?"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,i){var o,r,s;return i.topLeft.eq(e.topLeft)&&(i.bottomRight.row<e.bottomRight.row?(r=this.rowEdge.nextRight(i.bottomRight.row),o=new t(new n(r,e.topLeft.col),e.bottomRight)):i.bottomRight.col<e.bottomRight.col&&(s=this.colEdge.nextRight(i.bottomRight.col),o=new t(new n(e.topLeft.row,s),e.bottomRight))),o}}),e.spreadsheet.SheetNavigator=o)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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(n,i){e(t,n,i)})},{layout:!0,recalc:!0})},forEachSelectedRow:function(e){var t=this._sheet;t.batch(function(){t.select().forEachRowIndex(function(n,i){e(t,n,i)})},{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(){this.forEachSelectedColumn(function(e,t,n){e.deleteColumn(t-n)})},deleteSelectedRows:function(){this.forEachSelectedRow(function(e,t,n){e.deleteRow(t-n)})},hideSelectedColumns:function(){var t,n,i,o,r,s,a;for(this.forEachSelectedColumn(function(e,t){e.hideColumn(t)}),t=this._sheet,n=t.select().toRangeRef(),i=n.topLeft.col,o=n.bottomRight.col,r=null;;){if(s=o<t._columns._count,a=i>=0,!a&&!s)break;if(s&&!t.isHiddenColumn(o)){r=o;break}if(a&&!t.isHiddenColumn(i)){r=i;break}i--,o++}null!==r&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(0,r),new e.spreadsheet.CellRef(t._rows._count-1,r)),t.range(n).select())},hideSelectedRows:function(){var t,n,i,o,r,s,a;for(this.forEachSelectedRow(function(e,t){e.hideRow(t)}),t=this._sheet,n=t.select().toRangeRef(),i=n.topLeft.row,o=n.bottomRight.row,r=null;;){if(s=o<t._rows._count,a=i>=0,!a&&!s)break;if(s&&!t.isHiddenRow(o)){r=o;break}if(a&&!t.isHiddenRow(i)){r=i;break}i--,o++}null!==r&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(r,0),new e.spreadsheet.CellRef(r,t._columns._count-1)),t.range(n).select())},unhideSelectedColumns:function(){this.forEachSelectedColumn(function(e,t){e.unhideColumn(t)})},unhideSelectedRows:function(){this.forEachSelectedRow(function(e,t){e.unhideRow(t)})},addColumnLeft:function(){this.forEachSelectedColumn(function(e,t,n){e.insertColumn(t-n)})},addColumnRight:function(){this.forEachSelectedColumn(function(e,t,n){e.insertColumn(t+(n+1))})},preventAddRow:function(){var e=this._sheet.select().toRangeRef(),t=e.height();return this._sheet.preventInsertRow(0,t)},preventAddColumn:function(){return this._sheet.preventInsertColumn()},addRowAbove:function(){this.forEachSelectedRow(function(e,t,n){e.insertRow(t-n)})},addRowBelow:function(){this.forEachSelectedRow(function(e,t,n){e.insertRow(t+(n+1))})}});e.spreadsheet.AxisManager=t}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,t,n,i){var o,r=e.data||(e.data=[]);r[t]||(r[t]=[]),r[t][n]=i,o=e.origRef.bottomRight,o.row=Math.max(o.row,t),o.col=Math.max(o.col,n)}function i(e){return e.replace(/^-(?:ms|moz|webkit)-/,"")}function o(e){var t={};return["borderBottom","borderRight","borderLeft","borderTop"].forEach(function(n){t[n]="none"==e[n+"Style"]?null:{size:1,color:e[n+"Color"]}}),t}function r(e){var t=window.getComputedStyle(e[0]),n=e[0].innerText,r=o(t),s={value:""===n?null:n,borderBottom:r.borderBottom,borderRight:r.borderRight,borderLeft:r.borderLeft,borderTop:r.borderTop,fontSize:parseInt(t["font-size"],10)};return"rgb(0, 0, 0)"!==t["background-color"]&&"rgba(0, 0, 0, 0)"!==t["background-color"]&&(s.background=t["background-color"]),"rgb(0, 0, 0)"!==t.color&&"rgba(0, 0, 0, 0)"!==t.color&&(s.color=t.color),"underline"==t["text-decoration"]&&(s.underline=!0),"italic"==t["font-style"]&&(s.italic=!0),"bold"==t["font-weight"]&&(s.bold=!0),"right"!==i(t["text-align"])&&(s.textAlign=i(t["text-align"])),"middle"!==t["vertical-align"]&&(s.verticalAlign=t["vertical-align"]),"normal"!==t["word-wrap"]&&(s.wrap=!0),s}function s(e){var i=t();return e.find(">tr, >tbody>tr").each(function(t,n){l(n).find(">td, >th").each(function(i,o){var r,s,a,c,d,u=parseInt(l(o).attr("rowspan"),10)-1||0,h=parseInt(l(o).attr("colspan"),10)-1||0,f="<td/>";if(u){for(s=t+u,a=t;a<=s;a++)if(c=e.find("tr").eq(a),a>t&&(f="<td class='rowspan'></td>",0===i?c.find("td").eq(i).after(f):(d=Math.min(c.find("td").length,i),c.find("td").eq(d-1).after(f))),h)for(r=i;r<h+i;r++)f="<td class='rowspan colspan'></td>",c.find("td").eq(r).after(f)}else if(h)for(r=i;r<h+i;r++)f="<td class='colspan'></td>",l(n).find("td").eq(r).after(f)})}),e.find(">tr, >tbody>tr").each(function(e,t){l(t).find(">td, >th").each(function(t,o){var s,a,c,d=parseInt(l(o).attr("rowspan"),10)-1||0,u=parseInt(l(o).attr("colspan"),10)-1||0;n(i,e,t,r(l(o))),(d||u)&&(s=String.fromCharCode(65+t),a=String.fromCharCode(65+t+u),c=s+(e+1)+":"+a+(e+1+d),i.mergedCells.push(c))})}),i}function a(e){var i,o,r,s,a=t();if(e.indexOf("\t")===-1&&e.indexOf("\n")==-1)n(a,0,0,{value:e});else for(i=e.split("\n"),o=0;o<i.length;o++)for(r=i[o].split("\t"),s=0;s<r.length;s++)n(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=!0,this._uid=e.guid(),document.body.appendChild(this.iframe)},destroy:function(){document.body.removeChild(this.iframe)},canCopy:function(){var t={canCopy:!0},n=this.workbook.activeSheet().select();return n===e.spreadsheet.NULLREF&&(t.canCopy=!1),n 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(),n=e.range(t),i={canPaste:!0,pasteOnMerged:!1,pasteOnDisabled:!1};return n.enable()||(i.canPaste=!1,i.pasteOnDisabled=!0),t.eq(e.unionWithMerged(t))||(i.canPaste=!1,i.pasteOnMerged=!0),this.menuInvoked&&(i.canPaste=!1,i.menuInvoked=!0),(t.bottomRight.row>=e._rows._count||t.bottomRight.col>=e._columns._count)&&(i.canPaste=!1,i.overflow=!0),i},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 e=this.workbook.activeSheet(),t=e.activeCell().first(),n=this.origin.first(),i=n.row-t.row,o=n.col-t.col;return this.origin.relative(i,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,n,i,o=t();this._isInternal()?o=this._internalContent:(e=this._externalContent,e.html?(n=this.iframe.contentWindow.document,n.open(),n.write(e.html),n.close(),i=l(n).find("table:first"),o=i.length?s(i):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,n){(n||t)()}),function(e,define){define("spreadsheet/range.min",["kendo.core.min","util/text-metrics.min"],e)}(function(){!function(e){function t(e,n,i){for(;e<=n&&i(e);)e++;if(e>n)return[];for(var o=e+1;o<=n;++o)if(i(o))return[{begin:e,end:o-1}].concat(t(o+1,n,i));return[{begin:e,end:n}]}function n(e){return e.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}function i(t){return!/^=/.test(t)&&/number|percent/.test(e.spreadsheet.calc.parse(null,0,0,t).type)}function o(t,n,i,o){var r={baselineMarkerSize:0,width:o===!0?n+"px":"auto","font-size":(i||12)+"px","word-break":o===!0?"break-all":"normal","white-space":o===!0?"pre-wrap":"pre"};return e.util.measureText(t,r,h).height}var r,s,a,l,c,d,u,h;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"],d={borderTop:{complement:"borderBottom",direction:{top:-1,bottom:-1}},borderLeft:{complement:"borderRight",direction:{left:-1,right:-1}},borderRight:{complement:"borderLeft",direction:{left:1,right:1}},borderBottom:{complement:"borderTop",direction:{top:1,bottom:1}}},u=e.Class.extend({init:function(e,t){this._sheet=t,this._ref=e},clone:function(){return new u(this._ref.clone(),this._sheet)},skipHiddenCells:function(){var e=[],n=this,i=n._sheet,o=i.isHiddenRow.bind(i),r=i.isHiddenColumn.bind(i);return n._ref.forEach(function c(i){var d,u,h,f,p,m;if(i instanceof s)i.forEach(c);else for(i=n._normalize(i.toRangeRef()),d=i.topLeft,u=i.bottomRight,h=t(d.row,u.row,o),f=t(d.col,u.col,r),p=0;p<h.length;++p)for(m=0;m<f.length;++m)e.push(new l(new a(h[p].begin,f[m].begin),new a(h[p].end,f[m].end)))}),i.range(e.length>1?new s(e):e[0])},_normalize:function(e){return this._sheet._grid.normalize(e)},_set:function(e,t,n){var i=this,o=i._sheet;return i._ref.forEach(function(n){o._set(n.toRangeRef(),e,t)}),n||o.triggerChange({recalc:"formula"==e||"value"==e||"validation"==e,value:t,range:i,ref:i._ref}),i},_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 u(t,this._sheet)},_resizedRef:function(e){return this._ref.map(function(t){return t.toRangeRef().resize(e)})},_border:function(t,n){var i,o=d[t].complement,r=d[t].direction,s=this._sheet;return s.batch(function(){i=this._property(t,n),void 0!==n&&this._resizedRef(r).forEach(function(t){t!==e.spreadsheet.NULLREF&&new u(t,s)._property(o,null)})}.bind(this),{}),i},_collapsedBorder:function(t){var n=this._property(t),i=d[t].complement,o=d[t].direction;return this._resizedRef(o).forEach(function(t){if(!n&&t!==e.spreadsheet.NULLREF){var o=new u(t,this._sheet);n=o._property(i)}}.bind(this)),n},borderTop:function(e){return this._border("borderTop",e)},borderRight:function(e){return this._border("borderRight",e)},borderBottom:function(e){return this._border("borderBottom",e)},borderLeft:function(e){return this._border("borderLeft",e)},collapsedBorderTop:function(){return this._collapsedBorder("borderTop")},collapsedBorderRight:function(){return this._collapsedBorder("borderRight")},collapsedBorderBottom:function(){return this._collapsedBorder("borderBottom")},collapsedBorderLeft:function(){return this._collapsedBorder("borderLeft")},input:function(t){var o,r,s,a,l,c,d=this._get("format");return void 0!==t?(r=this._ref.toRangeRef().topLeft,o=e.spreadsheet.calc.parse(this._sheet.name(),r.row,r.col,t),this._sheet.batch(function(){var i,r=null;"exp"==o.type?r=e.spreadsheet.calc.compile(o):"@"!=d?(i=d&&e.spreadsheet.formatting.type(o.value,d),"date"==o.type&&"date"!=i?this.format(o.format||n(e.culture().calendar.patterns.d)):"percent"==o.type&&"percent"!=i?this.format(100*o.value==(100*o.value|0)?"0%":"0.00%"):o.format&&!d&&this.format(o.format)):"string"!=o.type&&(o.value=t),this.formula(r),r||this.value(o.value)}.bind(this),{recalc:!0,value:t,ref:this._ref,editorChange:this._sheet.isInEditMode()}),this):(t=this._get("value"),s=this._get("formula"),a=d&&!s&&e.spreadsheet.formatting.type(t,d),s?t="="+s:d&&"date"==a&&(l=e.spreadsheet.formatting.text(t,d),o=e.spreadsheet.calc.parse(null,null,null,l),"number"==typeof o.value&&(c=e.spreadsheet.formatting.text(o.value,d),l==c))?t=l:"date"===a?t=e.toString(e.spreadsheet.numberToDate(t),e.culture().calendar.patterns.d):"percent"===a?t=100*t+"%":"string"==typeof t&&(/^[=']/.test(t)||/^(?:true|false)$/i.test(t)||i(t))&&(t="'"+t),t)},enable:function(e){return void 0===e?(e=!0,this._sheet.forEach(this._ref.toRangeRef(),function(t,n,i){i.enable===!1&&(e=!1)}),e):this._property("enable",e)},formula:function(e){if(void 0===e){var t=this._get("formula");return t?""+t:null}return this._property("formula",e)},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,n,i=this._ref.toRangeRef(),o=i.topLeft.row,r=i.topLeft.col,s=i.bottomRight.row,a=i.bottomRight.col;for(e=r;e<=a;e++)for(t=o;t<=s;t++)if(n=this._sheet._validation(t,e),n&&"reject"===n.type&&n.value===!1)return n;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 n,i,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(n=this._ref.toRangeRef(),i=n.topLeft.row,o=n.topLeft.col,r=n.bottomRight.row,a=n.bottomRight.col,void 0===t){for(t=Array(n.height()),d=0;d<t.length;d++)t[d]=Array(n.width());for(l=o;l<=a;l++)for(c=i;c<=r;c++)t[c-i][l-o]=this._sheet._value(c,l);return t}for(this._sheet._set(n,"formula",null),l=o;l<=a;l++)for(c=i;c<=r;c++)u=t[c-i],u&&(h=u[l-o],void 0!==h&&this._sheet._value(c,l,h));return this._sheet.triggerChange({recalc:!0,ref:n}),this},_properties:function(t){var n,i,o,r,a,l,c,d,u,h,f;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(n=this._ref.toRangeRef(),i=n.topLeft.row,o=n.topLeft.col,r=n.bottomRight.row,a=n.bottomRight.col,d=this._sheet,void 0===t)return t=Array(n.height()),d.forEach(n,function(e,n,r){e-=i,n-=o;var s=t[e]||(t[e]=[]);s[n]=r}),t;for(n=n.clone(),h=function(e){var t=u[e];n.topLeft.row=n.bottomRight.row=c,n.topLeft.col=n.bottomRight.col=l,"value"==e&&d._set(n,"formula",null),d._set(n,e,t)},l=o;l<=a;l++)for(c=i;c<=r;c++)f=t[c-i],f&&(u=f[l-o],u&&Object.keys(u).forEach(h));return d.triggerChange({recalc:!0,ref:this._ref}),this},clear:function(e){var t=!e||!Object.keys(e).length,n=this._sheet,i={recalc:t||e&&e.contentsOnly===!0,ref:this._ref};return n.batch(function(){i.recalc&&this.formula(null),t&&this.validation(null),(t||e&&e.formatOnly===!0)&&(c.forEach(function(e){this[e](null)}.bind(this)),this.unmerge())}.bind(this),i),this},clearContent:function(){return this.clear({contentsOnly:!0})},clearFormat:function(){return this.clear({formatOnly:!0})},isSortable:function(){return!this.cantSort()},cantSort:function(){var t,n,i,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()),n=t.primary,i=t.secondary,o=null,r=null,l={};try{this._sheet.forEach(this,function(e,s){var c=new a(e,s).print(),d=n[c];if(d){if(null===o)o=d.width(),r=d.height();else if(o!=d.width()||r!=d.height())throw l}else if(!i[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(),n=[];if(t){for(e=0;e<t.columns.length;e++)n.push(e);this._sheet.batch(function(){this.clearFilter(n),this._filter=null},{layout:!0,filter:!0})}},hasFilter:function(){var e=this._sheet.filter();return!!e},leftColumn:function(){return new u(this._ref.leftColumn(),this._sheet)},rightColumn:function(){return new u(this._ref.rightColumn(),this._sheet)},topRow:function(){return new u(this._ref.topRow(),this._sheet)},bottomRow:function(){return new u(this._ref.bottomRow(),this._sheet)},column:function(e){return new u(this._ref.toColumn(e),this._sheet)},row:function(e){return new u(this._ref.toRow(e),this._sheet)},forEachRow:function(e){this._ref.forEachRow(function(t){e(new u(t,this._sheet))}.bind(this))},forEachColumn:function(e){this._ref.forEachColumn(function(t){e(new u(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 n,i,o=this._ref.first(),r={ref:o,data:[],origRef:this._ref};return t?n="input"===t?["value","formula"]:"border"===t?["borderLeft","borderTop","borderRight","borderBottom"]:[t]:(n=e.spreadsheet.ALL_PROPERTIES,r.mergedCells=this.intersectingMerged()),i=r.data,this.forEachCell(function(e,t,r){var s={},a=e-o.row,l=t-o.col;i[a]||(i[a]=[]),i[a][l]=s,n.forEach(function(e){s[e]=void 0===r[e]?null:r[e]})}),r},setState:function(e,t){var n=this._sheet,i=this._ref.first(),o=e.ref.row-i.row,r=e.ref.col-i.col;n.batch(function(){e.mergedCells&&this.unmerge();var s=i.row;e.data.forEach(function(o,r){if(!t||t.isExternal()||!n.isHiddenRow(e.ref.row+r)){var a=i.col;o.forEach(function(o,l){var c,d;if(!t||t.isExternal()||!n.isHiddenColumn(e.ref.col+l)){if(c=t?n.range(s,a):n.range(i.row+r,i.col+l),c.enable()){for(d in o)"value"!=d&&(t&&"enable"==d||c._set(d,o[d]));if(!o.formula)if(t&&t.isExternal())try{null==o.value?c._set("value",null):c.input(o.value)}catch(u){c._set("value",o.value)}else c._set("value",o.value)}a++}}),s++}}),e.mergedCells&&e.mergedCells.forEach(function(e){e=n._ref(e).relative(o,r,3),n.range(e).merge()},this)}.bind(this),{recalc:!0})},_adjustRowHeight:function(){var t,n=this._sheet,i=this.getState(),o=[];for(t=0;t<i.mergedCells.length;t++)o.push(n.range(i.mergedCells[t]));this.forEachRow(function(t){if(!(t.topLeft().row>=t.sheet()._rows._count)){var i=t.sheet().rowHeight(t.topLeft().row);t.forEachCell(function(t,r,s){var a,l,c=n.range(t,r),d=0;for(a=0;a<o.length;a++)if(c._ref.intersects(o[a]._ref)){d+=s.width;break}l=Math.max(n.columnWidth(r),d),i=Math.max(i,e.spreadsheet.util.getTextHeight(s.value,l,s.fontSize,s.wrap))}),n.rowHeight(t.topLeft().row,Math.max(n.rowHeight(t.topLeft().row),i))}})},forEachCell:function(e){this._ref.forEach(function(t){this._sheet.forEach(t.toRangeRef(),e.bind(this))}.bind(this))},hasValue:function(){var e={},t=this._sheet._defaultCellStyle;try{this.forEachCell(function(n,i,o){var r,s;for(r in o)if(s=o[r],void 0!==s&&s!==t[r])throw e})}catch(n){if(n===e)return!0;throw n}return!1},wrap:function(t){return void 0===t?!!this._property("wrap"):(this.forEachRow(function(t){var n=t.sheet().rowHeight(t.topLeft().row);t.forEachCell(function(t,i,o){var r=this._sheet.columnWidth(i);null!==o.value&&void 0!==o.value&&(n=Math.max(n,e.spreadsheet.util.getTextHeight(o.value,r,o.fontSize,!0)))}),t.sheet().rowHeight(t.topLeft().row,n)}.bind(this)),this._property("wrap",t),this)},fontSize:function(t){return void 0===t?this._property("fontSize"):(this.forEachRow(function(n){var i=n.sheet().rowHeight(n.topLeft().row);n.forEachCell(function(n,o,r){var s=this._sheet.columnWidth(o);null!==r.value&&void 0!==r.value&&(i=Math.max(i,e.spreadsheet.util.getTextHeight(r.value,s,t,r.wrap)))}),n.sheet().rowHeight(n.topLeft().row,i)}.bind(this)),this._property("fontSize",t),this)},draw:function(e,t){this._sheet.draw(this,e,t)}}),r.each(c,function(e,t){u.prototype[t]=function(e){return this._property(t,e)}}),h=r('<div style="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px !important; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap; word-break: break-all;" />')[0],e.spreadsheet.util={getTextHeight:o},e.spreadsheet.Range=u)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){for(var i,o=n(e),r=e;++e<t;)i=n(e),i>o&&(o=i,r=e);return r}function n(t,n){function o(e){var t,n,i,s;return c=e[0],t="{ ",Array.isArray(c)?(h+="while (i < args.length) { ",f+="while (i < args.length) { ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="while (i < args.length) { ",t+=e.map(o).join(""),t+="} ",t+="xargs = stack.pop(); ",f+="} ",h+="} "):"+"==c?(h+="while (i < args.length) { ",f+="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(o).join(""),t+="} while (i < args.length); ",t+="xargs = stack.pop(); ",f+="} ",h+="} "):"?"==c?t+="if (!("+l(e[1])+")) return new CalcError(err); ":(n=e[1],Array.isArray(n)&&/^#?collect/.test(n[0])?(i=n[2],r(),t+="try {var $"+c+" = this.cellValues(args.slice(i",i&&(t+=", i + "+i),t+=")).filter(function($"+c+"){ ","collect"==n[0]&&(t+="if ($"+c+" instanceof CalcError) throw $"+c+"; "),t+="return "+l(n[1])+"; }, this); ",t+=i?"i += "+i+"; ":"i = args.length; ",t+="xargs.push($"+c+")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ",f+="toResolve.push(args.slice(i)); "):"rest"==n?t+="xargs.push(args.slice(i)); i = args.length; ":((g=/^\*/.test(c))&&(v=!0,c=c.substr(1)),t+="var $"+c+" = args[i++]; ",s=!1,/!$/.test(n)?(n=n.substr(0,n.length-1),s=!0):t+="if ($"+c+" instanceof CalcError) return $"+c+"; ",t+=a(n,s)+"xargs.push($"+c+"); ")),t+="} "}function r(){return d?"$"+c:(m=!0,d=!0,f+="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') || (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 n="if (!("+l(e)+")) { ";return d&&!t&&(n+=" if ($"+c+" instanceof CalcError) return $"+c+"; "),n+="return new CalcError(err); } ",d||(f+="i++; "),h+=g?"var $"+c+" = this.asMatrix(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); ",n}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("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; ",f="function resolve(args, callback) { var toResolve = [], i = 0; ",p="'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",m=!1,g=!1,v=!1;return p+=n.map(o).join(""),p+="if (i < args.length) return new CalcError('N/A'); ",p+="return xargs; } ",h+="return { args: xargs, width: width, height: height, arrays: arrays }; } ",m?(f+="this.resolveCells(toResolve, callback); } ",u=Function("CalcError","round",p+f+h+" return { resolve: resolve, check: check, arrayArgs: arrayArgs };")):u=Function("CalcError","round",p+" return { check: check };"),u=u(e,i),v||delete u.arrayArgs,u}function i(e){var t=Math.floor(e),n=e-t;return t+Math.round(1e15*n)/1e15}function o(e){return"number"==typeof e?i(e):e}function r(t,n,i){if(i instanceof e)return i;try{return n.apply(t,i)}catch(o){if(o instanceof e)return o;throw o}}function s(e,t,n,i){return function(o,s){function a(){var t,a,l,c,d,u,h;if(i&&(t=i.call(this,s),s=t.args,t.width>0&&t.height>0)){for(a=new I(this),l=0;l<t.height;++l)for(c=0;c<t.width;++c){for(d=[],u=0;u<s.length;++u)t.arrays[u]?(h=s[u],d[u]=h.get(l%h.height,c%h.width)):d[u]=s[u];d=n.call(this,d),a.set(l,c,r(this,e,d))}return o(a)}d=n.call(this,s),o(r(this,e,d))}t?t.call(this,s,a):a.call(this)}}function a(t,n,i,o){return function(r,s){function a(){var n,a,l,c,d,u,h,f,p;if(o&&(n=o.call(this,s),s=n.args,n.width>0&&n.height>0))for(a=new I(this),l=n.width*n.height,c=function(e,t){return function(n){if(a.set(e,t,n),--l,0===l)return r(a)}},d=0;d<n.height&&l>0;++d)for(u=0;u<n.width&&l>0;++u){for(h=[],f=0;f<s.length;++f)n.arrays[f]?(p=s[f],h[f]=p.get(d%p.height,u%p.width)):h[f]=s[f];if(h=i.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 n=i.call(this,s),n instanceof e?r(n):(n.unshift(r),t.apply(this,n))}n?n.call(this,s,a):a.call(this)}}function l(e,t){return e=e.toLowerCase(),z[e]=t,{args:function(i,o){var r,a=n(e,i);return o&&(a.arrayArgs&&console.log(""+a.arrayArgs),a.resolve&&console.log(""+a.resolve),a.check&&console.log(""+a.check)),r=z[e]=s(t,a.resolve,a.check,a.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=z[e]=a(t,s.resolve,s.check,s.arrayArgs),r.kendoSpreadsheetArgs=i,this}}}function c(e,t,n){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)+n-32075}function d(e){var t,n,i,o,r,s,a;return t=e+68569,n=4*t/146097|0,t-=(146097*n+3)/4|0,o=4e3*(t+1)/1461001|0,t=t-(1461*o/4|0)+31,i=80*t/2447|0,s=t-(2447*i/80|0),t=i/11|0,r=i+2-12*t,a=100*(n-49)+o+t,r--,{year:a,month:r,date:s,day:(e+1)%7,ord:L[u(a)][r]+s}}function u(e){return e%4?0:e%100?1:e%400?0:1}function h(e){return u(e)?366:365}function f(e,t){return u(e)&&1==t?29:B[t]}function p(e){return d((0|e)+P)}function m(e,t,n){return c(e,t,n)-P}function g(e){var t,n,i,o,r=e-(0|e);return r<0&&r++,t=Math.round(O*r),n=Math.floor(t/N),t-=n*N,i=Math.floor(t/H),t-=i*H,o=Math.floor(t/1e3),t-=1e3*o,{hours:n,minutes:i,seconds:o,milliseconds:t}}function v(e){var t=p(e),n=g(e);return new Date(t.year,t.month,t.date,n.hours,n.minutes,n.seconds,n.milliseconds)}function _(e,t,n,i){return(e+(t+(n+i/1e3)/60)/60)/24}function b(e){var t=_(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return e=m(e.getFullYear(),e.getMonth(),e.getDate()),e<0?e-1+t:e+t}function w(e){return kendo.parseDate(e)||kendo.parseDate(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 y(t){return function(n,i){return"string"==typeof n&&"string"!=typeof i&&(i=null==i?"":i+""),"string"!=typeof n&&"string"==typeof i&&(n=null==n?"":n+""),"number"==typeof n&&null==i&&(i=0),"number"==typeof i&&null==n&&(n=0),"string"==typeof n&&"string"==typeof i&&(n=n.toLowerCase(),i=i.toLowerCase()),typeof i==typeof n?t(n,i):new e("VALUE")}}var k,x,C,S,T,D,A,E,M,R,I,F,z,P,B,L,H,N,O,V,U,W;kendo.support.browser.msie&&kendo.support.browser.version<9||(k={},x=kendo.spreadsheet,x.calc=k,C=k.runtime={},S=kendo.Class,T=x.Ref,D=x.CellRef,A=x.RangeRef,E=x.UnionRef,M=x.NULLREF,e.prototype.toString=function(){return"#"+this.code+("NAME"==this.code?"?":"!")},R=S.extend({init:function(e,t,n,i){this.callback=e,this.formula=t,this.ss=n,this.parent=i},resolve:function(e){var t=this;e instanceof T?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):o(e);var t=this.formula;t.value=e,this.ss.onFormula(t)&&this.callback&&this.callback.call(t,e)},resolveCells:function(e,t){function n(e){e.exec(s.ss,function(){--o||t.call(s)},s)}function i(e){var t,n;for(t=0;t<e.length;++t)n=e[t],n.formula&&a.push(n.formula);return!0}var o,r,s=this,a=[];if(function l(e){var t,n;for(t=0;t<e.length;++t)n=e[t],n instanceof T&&i(s.getRefCells(n)),Array.isArray(n)&&l(n)}(e),!a.length)return t.call(s);for(o=a.length,r=0;r<a.length;++r)n(a[r])},cellValues:function(e,t){var n,i,o=[];for(n=0;n<e.length;++n)i=e[n],i instanceof T?(i=this.getRefData(i),o=o.concat(i)):Array.isArray(i)?o=o.concat(this.cellValues(i)):i instanceof I?o=o.concat(this.cellValues(i.data)):o.push(i);return t?t.apply(this,o):o},fetchName:function(t,n){var i,o=this.formula,r=this.ss.nameValue(t,o.sheet,o.row,o.col);r instanceof F?(r=r.clone(o.sheet,o.row,o.col,!0),i=new x.ValidationFormulaContext(this.ss.workbook),r.exec(i,n,this)):(r instanceof T&&(r=r.absolute(o.row,o.col),r.sheet||(r.sheet=o.sheet)),n(null==r?new e("NAME"):r))},force:function(e){return e instanceof T?this.getRefData(e):e},func:function(t,n,i){t=t.toLowerCase();var o=z[t];return o?o.call(this,n,i):void n(new e("NAME"))},bool:function(e){return e instanceof T&&(e=this.getRefData(e)),"string"==typeof e?"true"==e.toLowerCase():"number"==typeof e?0!==e:"boolean"==typeof e?e:null!=e},asMatrix:function(e){var t,n,i,o,r,s,a;return e instanceof I?e:(t=this,e instanceof A?(n=e.topLeft,i=n.row,o=n.col,r=t.getRefCells(e),s=new I(t),isFinite(e.width())&&(s.width=e.width()),isFinite(e.height())&&(s.height=e.height()),isFinite(i)||(i=0),isFinite(o)||(o=0),r.forEach(function(e){s.set(e.row-i,e.col-o,e.value)}),s):Array.isArray(e)&&e.length>0?(s=new I(t),a=0,e.forEach(function(e){var n=0,i=1;e.forEach(function(e){var o=e instanceof A;e instanceof T&&!o&&(e=t.getRefData(e)),(o||Array.isArray(e))&&(e=t.asMatrix(e)),e instanceof I?(e.each(function(e,t,i){s.set(a+t,n+i,e)}),i=Math.max(i,e.height),n+=e.width):s.set(a,n++,e)}),a+=i}),s):void 0)},getRefCells:function(e,t){var n=this.formula;return this.ss.getRefCells(e,t,n.sheet,n.row,n.col)},getRefData:function(e){var t=this.formula;return this.ss.getData(e,t.sheet,t.row,t.col)},workbook:function(){return this.ss.workbook}}),I=S.extend({init:function(e){this.context=e,this.height=0,this.width=0,this.data=[]},clone:function(){var e=new I(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 n=this.data[e],i=n?n[t]:null;return i instanceof T?this.context.getRefData(i):i},set:function(e,t,n){var i=this.data[e];null==i&&(i=this.data[e]=[]),i[t]=n,e>=this.height&&(this.height=e+1),t>=this.width&&(this.width=t+1)},each:function(e,t){var n,i,o;for(n=0;n<this.height;++n)for(i=0;i<this.width;++i)if(o=this.get(n,i),(t||null!=o)&&(o=e.call(this.context,o,n,i),void 0!==o))return o},map:function(e,t){var n=new I(this.context);return this.each(function(t,i,o){n.set(i,o,e.call(this,t,i,o))},t),n},eachRow:function(e){var t,n;for(t=0;t<this.height;++t)if(n=e.call(this.context,t),void 0!==n)return n},eachCol:function(e){var t,n;for(t=0;t<this.width;++t)if(n=e.call(this.context,t),void 0!==n)return n},mapRow:function(e){var t=new I(this.context);return this.eachRow(function(n){t.set(n,0,e.call(this.context,n))}),t},mapCol:function(e){var t=new I(this.context);return this.eachCol(function(n){t.set(0,n,e.call(this.context,n))}),t},toString:function(){return JSON.stringify(this.data)},transpose:function(){var e=new I(this.context);return this.each(function(t,n,i){e.set(i,n,t)}),e},unit:function(e){var t,n,i,o;for(this.width=this.height=e,t=this.data=Array(e),n=e;--n>=0;)for(i=t[n]=Array(e),o=e;--o>=0;)i[o]=n==o?1:0;return this},multiply:function(t){var n,i,o,r,s,a,l=this,c=new I(l.context);for(n=0;n<l.height;++n)for(i=0;i<t.width;++i){for(o=0,r=0;r<l.width;++r){if(s=l.get(n,r),a=t.get(r,i),"number"!=typeof s||"number"!=typeof a)throw new e("VALUE");o+=s*a}c.set(n,i,o)}return c},adds:function(e,t){var n,i,o,r,s=this,a=new I(s.context),l=t?-1:1;for(n=0;n<s.height;++n)for(i=0;i<s.width;++i)o=s.get(n,i),r=e.get(n,i),a.set(n,i,o+l*r);return a},determinant:function(){var e,t,n,i,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,i=e;i<s;i++)o=r[e][i],r[e][i]=r[t][i],r[t][i]=o;for(n=e+1;n<s;n++)for(i=e+1;i<s;i++)r[n][i]-=r[e][i]*r[n][e]/r[e][e];a*=r[e][e]}return a},inverse:function(){var e,n,i,o,r,s,a=this.width,l=this.augment(new I(this.context).unit(a)),c=l.data;for(n=0;n<a;++n){if(i=t(n,a,function(e){return c[e][n]}),!c[i][n])return null;for(n!=i&&(e=c[n],c[n]=c[i],c[i]=e),o=n+1;o<a;++o){for(r=n+1;r<2*a;++r)c[o][r]-=c[n][r]*c[o][n]/c[n][n];c[o][n]=0}}for(o=0;o<a;++o)for(s=c[o][o],r=0;r<2*a;++r)c[o][r]/=s;for(n=a;--n>=0;)for(o=n;--o>=0;)if(c[o][n])for(r=2*a;--r>=a;)c[o][r]-=c[n][r]*c[o][n];return l.slice(0,a,a,a)},augment:function(e){var t=this.clone(),n=t.width;return e.each(function(e,i,o){t.set(i,o+n,e)}),t},slice:function(e,t,n,i){var o,r,s=new I(this.context);for(o=0;o<n;++o)for(r=0;r<i;++r)s.set(o,r,this.get(e+o,t+r));return s}}),F=S.extend({init:function(e,t,n,i,o,r){this.refs=e,this.handler=t,this.print=n,this.absrefs=null,this.sheet=i,this.row=o,this.col=r,this.onReady=[],this.pending=!1},clone:function(e,t,n,i){var o=e.toLowerCase(),r=this.refs;return(i||o!=this.sheet.toLowerCase())&&(r=r.map(function(t){return t.hasSheet()||t.sheet&&t.sheet.toLowerCase()==o||(t=t.clone().setSheet(e)),t})),new F(r,this.handler,this.print,e,t,n)},resolve:function(e){this.pending=!1,this.onReady.forEach(function(t){t(e)})},exec:function(t,n,i){var o,r,s;if("value"in this)n&&n(this.value);else{for(n&&this.onReady.push(n),o=new R(this.resolve,this,t,i),r=0;i;){if(i.formula===this)return this.pending=!1,void o.resolve(new e("CIRCULAR"));i=i.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(n){n.renameSheet(e,t)})},adjust:function(e,t,n,i){var o,r,s,a,l,c;e=e.toLowerCase(),o=this.row,r=this.col,s=this.sheet.toLowerCase(),a=!1,s==e&&("row"==t&&o>=n&&(this.row+=i,a=!0),"col"==t&&r>=n&&(this.col+=i,a=!0)),l=this.row,c=this.col,this.absrefs=null,this.refs=this.refs.map(function(s){return s===M?s:s.sheet.toLowerCase()!=e?(a&&("row"==t&&o>=n&&(s=s.relative(i,0)),"col"==t&&r>=n&&(s=s.relative(0,i))),s):s.adjust(o,r,l,c,"row"==t,n,i)},this)},toString:function(){return this.print(this.row,this.col)}}),z=Object.create(null),z["if"]=function(t,n){var i=this,o=n[0],r=n[1],s=n[2];this.resolveCells([o],function(){var n=i.asMatrix(o);n?r(function(o){s(function(r){var s=i.asMatrix(o),a=i.asMatrix(r);t(n.map(function(t,n,l){return t instanceof e?t:i.bool(t)?s?s.get(n,l):o:a?a.get(n,l):r}))})}):(o=this.force(o),o instanceof e?t(o):i.bool(o)?r(t):s(t))})},z["φ"]=function(e){e((1+Math.sqrt(5))/2)},P=c(1900,0,-1),B=[31,28,31,30,31,30,31,31,30,31,30,31],L=[[0,31,59,90,120,151,181,212,243,273,304,334],[0,31,60,91,121,152,182,213,244,274,305,335]],H=6e4,N=60*H,O=24*N,C.CalcError=e,C.Formula=F,C.Matrix=I,C.packDate=m,C.unpackDate=p,C.packTime=_,C.unpackTime=g,C.serialToDate=v,C.dateToSerial=b,C.daysInMonth=f,C.isLeapYear=u,C.daysInYear=h,C.parseDate=w,x.dateToNumber=b,x.numberToDate=v,x.defineFunction=l,x.CalcError=e,C.defineFunction=l,C.defineAlias=function(e,t){var n=z[t];if(!n)throw Error("Function "+t+" is not yet defined");n.kendoSpreadsheetAliases||(n.kendoSpreadsheetAliases=[t]),n.kendoSpreadsheetAliases.push(e),z[e]=n},C.FUNCS=z,V=["or","number",["null",0]],U=[["*a",V],["*b",V]],W=[["*a",["or","anyvalue",["null",0]]],["*b",["or","anyvalue",["null",0]]]],l("binary+",function(e,t){return e+t}).args(U),l("binary-",function(e,t){return e-t}).args(U),l("binary*",function(e,t){return e*t}).args(U),l("binary/",function(e,t){return e/t}).args([["*a",V],["*b","divisor"]]),l("binary^",function(e,t){return Math.pow(e,t)}).args(U),l("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"]]]),l("binary=",function(e,t){return e===t}).args(W),l("binary<>",function(e,t){return e!==t}).args(W),l("binary<",y(function(e,t){return e<t})).args(W),l("binary<=",y(function(e,t){return e<=t})).args(W),l("binary>",y(function(e,t){return e>t})).args(W),l("binary>=",y(function(e,t){return e>=t})).args(W),l("unary+",function(e){return e}).args([["*a",V]]),l("unary-",function(e){return-e}).args([["*a",V]]),l("unary%",function(e){return e/100}).args([["*a",V]]),l("binary:",function(e,t){return new A(e,t).setSheet(e.sheet||this.formula.sheet,e.hasSheet())}).args([["a","cell"],["b","cell"]]),l("binary,",function(e,t){return new E([e,t])}).args([["a","ref"],["b","ref"]]),l("binary ",function(e,t){return e.intersect(t)}).args([["a","ref"],["b","ref"]]),l("not",function(e){return!this.bool(e)}).args([["*a",["or","anyvalue",["null",0]]]]),l("isblank",function(e){return e instanceof D&&(e=this.getRefData(e),null==e)}).args([["*value","anything!"]]),l("iserror",function(t){return t instanceof e}).args([["*value","forced!"]]),l("iserr",function(t){return t instanceof e&&"N/A"!=t.code}).args([["*value","forced!"]]),l("isna",function(t){return t instanceof e&&"N/A"==t.code}).args([["*value","forced!"]]),l("islogical",function(e){return"boolean"==typeof e}).args([["*value","forced!"]]),l("isnontext",function(e){return"string"!=typeof e}).args([["*value","forced!"]]),l("istext",function(e){return"string"==typeof e}).args([["*value","forced!"]]),l("isnumber",function(e){return"number"==typeof e}).args([["*value","forced!"]]),l("isref",function(e){return e instanceof D||e instanceof A}).args([["*value","anything!"]]),z[",getname"]=function(e,t){this.fetchName(t[0],e)})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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=i.runtime.parseDate(a.from),u&&(a.from=kendo.format(s,a.from),a.fromIsDateValue=!0)),a.from=i.compile(i.parseFormula(e,t,o,a.from))),a.to&&("date"===a.dataType&&(h=i.runtime.parseDate(a.to),h&&(a.to=kendo.format(s,a.to),a.toIsDateValue=!0)),a.to=i.compile(i.parseFormula(e,t,o,a.to))),
d="custom"==a.dataType?n.validationComparers.custom:"list"==a.dataType?n.validationComparers.list:n.validationComparers[a.comparerType],!d)throw kendo.format("'{0}' comparer is not implemented.",a.comparerType);return c=function(e){var t,n=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,n):"list"==this.dataType?(t=this._getListData(),this.value=d(e,t,n)):this.value=d(e,this.from_value,n),this.value},new kendo.spreadsheet.validation.Validation(l.extend(a,{handler:c,sheet:e,row:t,col:o}))}var t,n,i,o,r,s,a,l=kendo.jQuery;kendo.support.browser.msie&&kendo.support.browser.version<9||(t=kendo.spreadsheet,n={},t.validation=n,i=t.calc,o=kendo.Class,r="_matrix({0})",s='DATEVALUE("{0}")',i.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:"",n=this.to?this.to_value:"",i=this.from?""+this.from:"",o=this.to?""+this.to:"",r=this.dataType,s=this.type,a=this.comparerType;return kendo.format(e,t,n,i,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,n,i,o;if(!this.from_value||!this.from_value.data)return[];for(e=this.from_value.data,i=[],t=0;t<e.length;t++)if(o=e[t])for(n=0;n<o.length;n++)i.push(o[n]);return i},clone:function(e,t,n){var i=this._getOptions();return i.from&&(i.from=i.from.clone(e,t,n)),i.to&&(i.to=i.to.clone(e,t,n)),new a(l.extend(i,{handler:this.handler},{sheet:e,row:t,col:n}))},exec:function(e,t,n,i){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,n),r._setMessages(),i&&i(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,n,i){var o,r;if(this.from&&this.from.adjust(e,t,n,i),this.to&&this.to.adjust(e,t,n,i),this.sheet.toLowerCase()==e.toLowerCase())switch(o=this.row,r=this.col,t){case"row":o>=n&&(this.row+=i);break;case"col":r>=n&&(this.col+=i)}},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}}}),n.compile=e,n.validationComparers={greaterThan:function(e,t){return e>t},lessThan:function(e,t){return e<t},between:function(e,t,n){return e>=t&&e<=n},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,n){return e<t||e>n},custom:function(e,t){return t},list:function(e,t){return t.indexOf(e)>-1}},n.Validation=a)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n,i,o,r;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.spreadsheet.Range,o=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,n){if(e){if(e.eq(this.originalSelection))return;this._sheet.triggerSelect(new i(e,this._sheet)),this.originalSelection=e,this.selection=t,n!==!1?(this.activeCell(e.isCell()?e: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)}}),r=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,n,i,r,s,a,l){var c=t*n-1;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},this._rows=new e.spreadsheet.Axis(t,i),this._columns=new e.spreadsheet.Axis(n,r),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,n,s,a),this._sheetRef=this._grid.normalize(e.spreadsheet.SHEETREF),this._properties=new e.spreadsheet.PropertyBag(c,this._defaultCellStyle),this._sorter=new e.spreadsheet.Sorter(this._grid,this._properties.sortable()),this._viewSelection=new o(this),this._editSelection=new o(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,n){return void 0===t?e():(e(t),this.triggerChange(n))},_field:function(e,t,n){return void 0===t?this[e]:(this[e]=t,this.triggerChange(n))},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,n){this.dataSourceBinder&&this.dataSourceBinder.destroy(),this.dataSourceBinder=new e.spreadsheet.SheetDataSourceBinder({dataSource:t,sheet:this,columns:n}),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 n=this._grid,i=n.rowCount,o=n.normalize(e.topLeft),r=n.normalize(e.bottomRight),s=o.col*i+o.row,a=r.col*i+r.row,l=t.col*i+t.row;this._properties.copy(s,a,l)},_adjustReferences:function(n,i,o,r){var s,a,l;this._mergedCells=r.reduce(function(e,r){return r=r.adjust(null,null,null,null,"row"==n,i,o),r instanceof t&&e.push(r),e},[]),this._workbook&&(s=this._name(),this._workbook._sheets.forEach(function(e){e._forFormulas(function(e){e.adjust(s,n,i,o)}),e._forValidations(function(e){e.adjust(s,n,i,o)})}),this._workbook.adjustNames(s,"row"==n,i,o)),a=this.select(),a=a.adjust(null,null,null,null,"row"==n,i,o),a!==e.spreadsheet.NULLREF&&this.select(a),l="col"==n?this._columns:this._rows,l.adjust(i,o)},_forFormulas:function(e){var t=this._properties,n=t.get("formula").values(),i=n.length;n.forEach(function(t,n){e.call(this,t.value,n,i)},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 n,i;return this.selectedHeaders().allRows?{reason:"error",type:"insertRowWhenColumnIsSelected"}:(t=t||1,n=this._grid,i=this.range(n.rowCount-t,0,t,n.columnCount),!!i.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},preventInsertColumn:function(){return!!this.selectedHeaders().allCols&&{reason:"error",type:"insertColumnWhenRowIsSelected"}},insertRow:function(e){var o=this.preventInsertRow(e);if(o)throw Error("Shifting nonblank cells off the worksheet is not supported!");if(!this.trigger("insertRow",{index:e}))return this.batch(function(){var o,r,s,a,l,c,d=this._grid,u=d.columnCount,h=d.rowCount,f=this.frozenRows();for(e<f&&this.frozenRows(f+1),o=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 i(s,this).clear();this._adjustReferences("row",e,1,o)},{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 o=new t(new n(e,0),new n(e,this._grid.columnCount));return new i(o,this).enable()},deleteRow:function(e){if(!this.isEnabledRow(e))return this;if(!this.trigger("deleteRow",{index:e}))return this.batch(function(){var o,r,s,a,l,c,d,u=this._grid,h=u.columnCount,f=this.frozenRows();for(e<f&&this.frozenRows(f-1),o=this._mergedCells.slice(),r=0;r<h;r++)s=new t(new n(e,r),new n(e,r)),new i(s,this).clear(),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 i(new t(d,d),this).clear();this._adjustReferences("row",e,-1,o)},{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 o,r,s,a,l,c,d=this._grid,u=d.columnCount,h=this.frozenColumns();for(e<h&&this.frozenColumns(h+1),o=this._mergedCells.slice(),r=u;r>=e&&(s=new t(new n(0,r),new n(1/0,r)),new i(s,this).clear(),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,o)},{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 o=new t(new n(0,e),new n(1/0,e));return new i(o,this).enable()},deleteColumn:function(e){if(!this.isEnabledColumn(e))return this;if(!this.trigger("deleteColumn",{index:e}))return this.batch(function(){var o,r,s,a,l,c,d=this._grid,u=d.columnCount,h=this.frozenColumns();for(e<h&&this.frozenColumns(h-1),o=this._mergedCells.slice(),r=e;r<u&&(s=new t(new n(0,r),new n(1/0,r)),new i(s,this).clear(),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,o)},{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,n,o){return new i(this._ref(e,t,n,o),this)},_getMergedCells:function(e){var t=this._grid,n={},i={},o=!1;return this.forEachMergedCell(e,function(r){var s=r.topLeft;t.forEach(r,function(t){s.eq(t)?(n[t.print()]=r,o=!0):e.contains(t)&&(i[t.print()]=s,o=!0)})}),{primary:n,secondary:i,hasMerged:o}},forEachMergedCell:function(e,t){var n=!1;void 0===t&&(t=e,n=!0),this._mergedCells.forEach(function(i){(n||i.intersects(e))&&t(i)})},forEachFilterHeader:function(e,t){var n,i=!1;void 0===t&&(t=e,i=!0),this._filter&&(n=[],this._filter.ref.forEachColumn(function(t){(i||t.intersects(e))&&n.push(t.topLeft)}),this._mergedCells.forEach(function(e){n=n.map(function(t){return e.intersects(t)?e:t})}),n.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]).forEach(t))},forEach:function(e,n){function i(e){n(a++,s,e)}var o,r,s,a,l,c;for(e instanceof t||(e=this._ref(e)),o=this._grid.normalize(e.topLeft),r=this._grid.normalize(e.bottomRight),s=o.col;s<=r.col;s++)a=o.row,l=this._grid.index(a,s),c=this._grid.index(r.row,s),this._properties.forEach(l,c,i)},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,n,i){this._autoFillDest=e,this._autoFillPunch=t,this._autoFillHint=n,this._autoFillDirection=i,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 n,i=this._selectionState();return e&&(e=this._ref(e),e=this._grid.normalize(e),n=this._grid.isAxis(e)?e:this.unionWithMerged(e)),i.select(e,n,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=[],n=this._grid;return this._properties.forEachProperty(function(i){t.push(n.trim(e,i.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 i(this._grid.normalize(this.activeCell()),this)},selection:function(){return new i(this._grid.normalize(this._selectionState().selection),this)},selectedHeaders:function(){var e=this.select(),t={},n={},i=!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",f="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,f="full"),d&&(i=!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"!==n[a]&&(n[a]=f)}),{rows:t,cols:n,allRows:o,allCols:i,all:o&&i}},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 n,i={},o=this._rows.toJSON("height",i),r=this._columns.toJSON("width",{}),s=this._viewSelection,a=[],l=this._defaultCellStyle||{};return this.forEach(e.spreadsheet.SHEETREF,function(n,r,s){if(t(s),0!==Object.keys(s).length){s.link&&a.push({ref:e.spreadsheet.Ref.display(null,n,r),target:s.link});var l=i[n];void 0===l&&(l=o.length,o.push({index:n}),i[n]=l),n=o[l],s.index=r,void 0===n.cells&&(n.cells=[]),s.formula&&(s.formula=""+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()),n.cells.push(s)}}),n={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&&(n.sort={ref:""+this._sort.ref,columns:this._sort.columns.map(function(e){return{index:e.index,ascending:e.ascending}})}),this._filter&&(n.filter={ref:""+this._filter.ref,columns:this._filter.columns.map(function(e){var t=e.filter.toJSON();return t.index=e.index,t})}),n},fromJSON:function(t){this.batch(function(){var n,i,o,r,s,a,l,c,d;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),n=0;n<t.rows.length;n++)if(i=t.rows[n],o=i.index,void 0===o&&(o=n),i.cells)for(r=0;r<i.cells.length;r++)s=i.cells[r],a=s.index,void 0===a&&(a=r),s.formula&&(s.formula=this._compileFormula(o,a,s.formula)),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&&(l=this._ref(t.activeCell),this._viewSelection._activeCell=l.toRangeRef(),this._viewSelection.originalActiveCell=l),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&&(c=t.filter.ref,d=void 0===t.filter.columns?[]:t.filter.columns,c?(this._filter={ref:this._ref(c),columns:d.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 n(){r--,s!=o||r||t()}var i=this._properties.get("formula").values(),o=i.length,r=0,s=0;if(!o&&t)return t();for(;s<o;)r++,i[s++].value.exec(e,t?n: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,n){var i=this._grid.index(e,t);return void 0===n?this._properties.get("value",i):void this._properties.set("value",i,i,n)},_validation:function(e,t){var n=this._grid.index(e,t);return this._properties.get("validation",n)},_compileValidation:function(t,n,i){return i instanceof e.spreadsheet.validation.Validation?i.clone(this._name(),t,n):(null!=i.from&&(i.from=(i.from+"").replace(/^=/,"")),null!=i.to&&(i.to=(i.to+"").replace(/^=/,"")),e.spreadsheet.validation.compile(this._name(),t,n,i))},_compileFormula:function(t,n,i){return i=i.replace(/^=/,""),i=e.spreadsheet.calc.parseFormula(this._name(),t,n,i),e.spreadsheet.calc.compile(i)},_copyValuesInRange:function(e,t,n,i){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)n=n.clone(this._name(),l,o),this._properties.set(i,a,a,n);return n},_set:function(e,t,n){var i,o,r,s=this._grid.normalize(e.topLeft),a=this._grid.normalize(e.bottomRight);if(n&&"formula"==t)"string"==typeof n&&(n=this._compileFormula(s.row,s.col,n)),n=this._copyValuesInRange(s,a,n,"formula");else if(n&&"validation"==t)n=this._compileValidation(s.row,s.col,n),n=this._copyValuesInRange(s,a,n,"validation");else for(i=s.col;i<=a.col;i++)o=this._grid.index(s.row,i),r=this._grid.index(a.row,i),this._properties.set(t,o,r,n),"formula"==t&&this._properties.set("value",o,r,null)},_get:function(e,t){var n=this._grid.normalize(e.topLeft),i=this._grid.index(n.row,n.col);return this._properties.get(t,i)},batch:function(e,t){var n=this.suspendChanges();return this.suspendChanges(!0),e.call(this),this.suspendChanges(n).triggerChange(t||{recalc:!0})},_sortBy:function(e,t){var n=null;t.forEach(function(t){n=this._sorter.sortBy(e,t.index,this._properties.get("value"),t.ascending,n)},this),this._sort={ref:e,columns:t},this._refreshFilter(),this.triggerChange({recalc:!0})},_refreshFilter:function(){this._filter&&this._filterBy(this._filter.ref,this._filter.columns)},_filterBy:function(t,n){this.batch(function(){for(var i=t.topLeft.row;i<=t.bottomRight.row;i++)this._rows.hidden(i)&&this._rows.unhide(i);n.forEach(function(n){var i,o,r,s=t.resize({top:1}).toColumn(n.index),a=[];if(s!==e.spreadsheet.NULLREF)for(this.forEach(s,function(e,t,n){n.row=e,a.push(n)}),n.filter.prepare(a),i=0;i<a.length;i++)o=a[i],r=n.filter.value(o),n.filter.matches(r)===!1&&this.hideRow(o.row)},this),this._filter={ref:t,columns:n}},{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()},{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 n,o=this._mergedCells,r=this;return this.batch(function(){n=t.map(function(t){var n,s,a,l,c,d,u;return t instanceof e.spreadsheet.CellRef?t:(n=t.toRangeRef().union(o,function(e){o.splice(o.indexOf(e),1)}),s=new i(n,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 i(n.collapse(),r),a?u._set("formula",a):u.value(l),u.format(c),u.background(d),o.push(n),n)});var s=r._viewSelection;s.selection=r.unionWithMerged(s.originalSelection),s._activeCell=r.unionWithMerged(s.originalActiveCell)},{activeCell:!0,selection:!0}),n}}),e.spreadsheet.Sheet=r)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/sheetsbar.min",["kendo.core.min","kendo.sortable.min"],e)}(function(){!function(e){var t,n,i,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n=e._outerWidth,i=".",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-button-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,n){var o=s.classNames;e.ui.Widget.call(this,t,n),t=this.element,t.addClass(o.sheetsBarWrapper),this._openDialog=n.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",i+o.sheetsBarRemove,this._onSheetRemove.bind(this)),t.on("click","li",this._onSheetSelect.bind(this)),t.on("dblclick","li"+i+o.sheetsBarActive,this._createEditor.bind(this)),t.on("click",i+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}",i,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,f,p,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(i+w.sheetsBarPrev),h=d.children(i+w.sheetsBarNext),f=2,p=b.element.find(i+w.sheetsBarAdd),m=n(p)+p.position().left+f,g=n(u)+f,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:n(h)+_+f})):b._scrollableModeActive&&c<=l?(b._scrollableModeActive=!1,
v.css({marginLeft:m,marginRight:""})):v.css({marginLeft:m}),b._toggleScrollButtons())},_toggleScrollButtons:function(e){var t=this,n=t._sheetsGroup(),o=t._sheetsWrapper(),r=n.scrollLeft(),a=o.find(i+s.classNames.sheetsBarPrev),l=o.find(i+s.classNames.sheetsBarNext);e===!1?(a.toggle(!1),l.toggle(!1)):(a.toggle(t._isRtl?r<n[0].scrollWidth-n[0].offsetWidth-1:0!==r),l.toggle(t._isRtl?0!==r:r<n[0].scrollWidth-n[0].offsetWidth-1))},_toggleScrollEvents:function(e){var t=this,n=s.classNames,o=t.options,r=t._sheetsWrapper(),a=r.children(i+n.sheetsBarPrev),l=r.children(i+n.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,n){var i,r,a,l,c,d,u=[],h=e.dom,f=h.element,p=this._sheets,m=this._selectedIndex,g=s.classNames;for(i=0;i<p.length;i++)r=p[i],a=i===m,l={className:g.sheetsBarKItem+o},c=[],l.className+=a?g.sheetsBarKActive+o+g.sheetsBarActive:g.sheetsBarInactive,a&&t?c.push(f("input",{type:"text",value:r.name(),className:g.sheetsBarKTextbox+o+g.sheetsBarEditor,maxlength:50},[])):(c.push(f("span",{className:g.sheetsBarKLink,title:r.name()},[h.text(r.name())])),p.length>1&&(d=f("span",{className:g.sheetsBarKIcon+o+g.sheetsBarKFontIcon+o+g.sheetsBarKIconX},[]),c.push(f("span",{className:g.sheetsBarKLink+o+g.sheetsBarRemove},[d])))),u.push(f("li",l,c));this._tree.render([this._addButton(),this._createSheetsWrapper(u,n)])},_createSheetsWrapper:function(t,n){var i,r=e.dom.element,a=s.classNames,l=[r("ul",{className:a.sheetsBarKReset},t)];return n=!0,n&&(i=a.sheetsBarKButton+o+a.sheetsBarKButtonBare+o,l.push(r("span",{className:i+a.sheetsBarPrev},[r("span",{className:a.sheetsBarKIcon+o+a.sheetsBarKArrowW},[])])),l.push(r("span",{className:i+a.sheetsBarNext},[r("span",{className:a.sheetsBarKIcon+o+a.sheetsBarKArrowE},[])]))),r("div",{className:a.sheetsBarItems},l)},_createSortable:function(){var n=s.classNames;this._sortable=new e.ui.Sortable(this.element,{filter:e.format("ul li.{0},ul li.{1}",n.sheetsBarActive,n.sheetsBarInactive),container:i+n.sheetsBarItems,axis:"x",animation:!1,ignore:"input",end:function(){this.draggable.hint&&this.draggable.hint.remove()},hint:function(e){var i=t(e).clone();return i.wrap("<div class='"+n.sheetsBarHintWrapper+"'><ul class='"+n.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 n,i=t(e.target).closest("li").text();this._editor&&this._destroyEditor(),n=function(e){var t=e.sender;t.isConfirmed()&&this.trigger("remove",{name:i,confirmation:!0})}.bind(this),this._openDialog("confirmation",{close:n})},_onSheetSelect:function(e){var n=t(e.target).text();return t(e.target).is(i+s.classNames.sheetsBarEditor)||!n?void e.preventDefault():(this._editor&&this._destroyEditor(),this._scrollSheetsToItem(t(e.target).closest("li")),void this.trigger("select",{name:n,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,n=s.classNames;return t("a",{className:n.sheetsBarAdd+o+n.sheetsBarKButton},[t("span",{className:n.sheetsBarKIcon+o+n.sheetsBarKFontIcon+o+n.sheetsBarKIconPlus},[])])},destroy:function(){this._sortable.destroy()},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!isNaN(e.scrollable.distance)},_scrollSheetsToItem:function(e){var t,i,o,r,s,a,l,c=this;c._scrollableModeActive&&(t=c._sheetsGroup(),i=t.scrollLeft(),o=n(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=i+r-(s-i)-a:r+o>s&&(l=i+r-o+2*a):i+s<r+o?l=r+o-s+2*a:i>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(i+s.classNames.sheetsBarItems)},_scrollSheetsByDelta:function(e){var t=this,n=t._sheetsGroup(),i=n.scrollLeft();n.finish().animate({scrollLeft:i+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,n){(n||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,n=0;n<e.length;++n)t=26*t+e.charCodeAt(n)-64;return t-1}function t(e){return parseInt(e,10)-1}function n(n,i){var o,r,s,a,l,d;if("#sheet"==n.toLowerCase())return _.SHEETREF;e:{if(!(o=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(n))){for(a=c(n,{}),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(!i)throw Error("Cannot parse reference: "+n)}function i(e,t,n,i){function o(e){return e.index=v.length,v.push(e),e}function r(e,t,n){if(g(e,t))return i.next();var o=i.peek();o?i.croak("Expected "+e+" «"+t+"» but found "+o.type+" «"+o.value+"»"):n||i.croak("Expected "+e+" «"+t+"»")}function s(e){return m(f(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=i.next();for(t=t.value,r("punc","("),e=[];;){if(g("punc",")"))break;if(g("op",","))e.push({type:"null"}),i.next();else{if(e.push(s(!1)),i.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(i.next()):g("func")?t=l():g("punc","(")?(i.next(),t=s(!0),r("punc",")",!0)):g("punc","{")?(i.next(),t=h(),r("punc","}",!0)):g("num")||g("str")||g("error")?t=i.next():g("sym")?t=a(i.next()):g("op","+")||g("op","-")?t={type:"prefix",op:i.next().value,exp:u(e)}:i.croak(i.peek()?g("punc","[")?"External reference not supported":"Parse error":"Incomplete expression"),p(t)}function h(){for(var e=[],t=[e],n=!0;!i.eof()&&!g("punc","}");)n?n=!1:g("punc",";")?(t.push(e=[]),i.next()):r("op",","),e.push(s(!1));return{type:"matrix",value:t}}function f(e){return g("punc","(")||g("ref")||g("num")||g("func")?{type:"binary",op:" ",left:e,right:s(!1)}:e}function p(e){return g("op","%")?(i.next(),p({type:"postfix",op:"%",exp:e})):e}function m(e,t,n){var o,r,s=g("op");return s&&(n||","!=s.value)&&(o=S[s.value],o>t)?(i.next(),r=m(u(n),o,n),m({type:"binary",op:s.value,left:e,right:r},t,n)):e}var g,v=[];return i=c(i,{row:t,col:n}),g=i.is,{type:"exp",ast:s(!0),refs:v,sheet:e,row:t,col:n}}function o(e,t){var n,o=i(null,0,0,e);if(!(o.ast instanceof k))throw new T("Invalid name: "+e);return o=o.ast,t instanceof b||(n=i(o.sheet,0,0,t),t=n.ast instanceof b?n.ast:/^(?:str|num|bool|error)$/.test(n.ast.type)?n.ast.value:a(n)),{name:o,value:t}}function r(e){function t(e,i,o){function r(t){var r=e.op,s=S[r]<o||!o&&","==r||"prefix"==i.type&&o==S[r]&&"-"==i.op||"binary"==i.type&&o==S[r]&&e===i.right;return n(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 i=n(t(e.left,e,S[e.op]),e.left instanceof k&&":"==e.op),o=n(t(e.right,e,S[e.op]),e.right instanceof k&&":"==e.op);return i+" + "+JSON.stringify(e.op)+" + "+o});case"func":return JSON.stringify(e.func+"(")+" + "+(e.args.length>0?e.args.map(function(n){return t(n,e,0)}).join(" + ', ' + "):"''")+" + ')'";case"matrix":return"'{ ' + "+e.value.map(function(n){return n.map(function(n){return t(n,e,0)}).join(" + ', ' + ")}).join(" + '; ' + ")+"+ ' }'";case"null":return"''"}throw Error("Cannot make printer for node "+e.type)}function n(e,t){return t?"'(' + "+e+" + ')'":e}return E("function(row, col, mod){return("+t(e.ast,e,0)+")}")}function s(e,t){function n(e,t){switch(e.type){case"ref":return i(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 f(e.value,t,!0)}throw Error("Cannot CPS "+e.type)}function i(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:[p(t),e]}}function s(e,t){return n({type:"func",func:"unary"+e.op,args:[e.exp]},t)}function a(e,t){return n({type:"func",func:"binary"+e.op,args:[e.left,e.right]},t)}function l(e,t,i,o){return n(e,function(e){var r=p(o),s=m("T"),a=m("E");return{type:"func",func:"if",args:[r,e,{type:"lambda",vars:[s],body:n(t||D,function(e){return{type:"call",func:{type:"var",name:s},args:[e]}})},{type:"lambda",vars:[a],body:n(i||A,function(e){return{type:"call",func:{type:"var",name:a},args:[e]}})}]}})}function c(e,t){return 0===e.length?o(D,t):n({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):n({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 i(t,o){return o==e.args.length?{type:"func",func:e.func,args:t}:n(e.args[o],function(e){return i(t.concat([e]),o+1)})}([p(t)],0)}function h(e,t){var i=m("K"),o=n(e.body,function(e){return{type:"call",func:{type:"var",value:i},args:[e]}});return t({type:"lambda",vars:[i].concat(e.vars),body:o})}function f(e,t,i){var o=[];return function r(s){return s==e.length?t({type:"matrix",value:o}):(i?f:n)(e[s],function(e){return o[s]=e,r(s+1)})}(0)}function p(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 n(e,t)}function a(e){function t(e){var i=e.type;if("num"==i)return e.value+"";if("str"==i)return JSON.stringify(e.value);if("error"==i)return"context.error("+JSON.stringify(e.value)+")";if("return"==i)return"context.resolve("+t(e.value)+")";if("func"==i)return"context.func("+JSON.stringify(e.func)+", "+t(e.args[0])+", "+n(e.args.slice(1))+")";if("call"==i)return t(e.func)+"("+e.args.map(t).join(", ")+")";if("ref"==i)return"refs["+e.index+"]";if("bool"==i)return""+e.value;if("if"==i)return"(context.bool("+t(e.co)+") ? "+t(e.th)+" : "+t(e.el)+")";if("lambda"==i)return"(function("+e.vars.join(", ")+"){ return("+t(e.body)+") })";if("var"==i)return e.name;if("matrix"==i)return n(e.value);if("null"==i)return"null";throw Error("Cannot compile expression "+i)}function n(e){return"[ "+e.map(t).join(", ")+" ]"}var i,o=r(e),a=o.call(e),l=M[a];return l?l.clone(e.sheet,e.row,e.col):(i=t(s(e.ast,function(e){return{type:"return",value:e}})),i=["function(){","var context = this, refs = context.formula.absrefs",i,"}"].join(";\n"),l=new C.Formula(e.refs,E(i),o,e.sheet,e.row,e.col),M[a]=l,l)}function l(e){return e}function c(n,i){function o(e,t){var n=r();return null==n||null!=e&&n.type!==e||null!=t&&n.value!==t?null:n}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=n.peek();return t&&("sym"!=t.type&&"rc"!=t.type&&"num"!=t.type||(e=b(8,d)||b(6,f)||b(6,p)||b(4,m)||b(4,g)||b(2,v)||b(2,_)),e||(e=n.next())),e}function c(o,r){var s,a,l,c,d;if("rc"==o.type)return!o.rel||i.forEditor||null!=i.row&&null!=i.col||n.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,n,i,o,r,s,a){if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==n.type&&"punc"==i.type&&"!"==i.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(n.value,!0)).setSheet(e.value,!0),e,s)}}function f(e,t,n,i,o,r){var s,a;if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==n.type&&"punc"==i.type&&"!"==i.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(n.value,!0)).setSheet(e.value,!0),e,o)}function p(e,t,n,i,o,r){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&"op"==i.type&&":"==i.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(n,!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,n,i){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&("punc"!=i.type||"("!=i.value||n.space)){x(3);var o=c(n);return o&&isFinite(o.row)||(o=new k(n.value)),T(o.setSheet(e.value,!0),e,n)}}function g(e,t,n,i){if(("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&"op"==t.type&&":"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&("punc"!=i.type||"("!=i.value||n.space)){var o=c(e,!0),r=c(n,!1);if(o&&r)return x(3),T(new w(o,r),e,n)}}function v(e,t){if(("sym"==e.type||"rc"==e.type)&&("punc"!=t.type||"("!=t.value||e.space)){var n=c(e);if(n&&isFinite(n.row)&&isFinite(n.col))return x(1),T(n,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 n=u(h(n),i),b=n.ahead,x=n.skip,C=null,S=null!=i.row&&null!=i.col?function(e){return 1&e.rel&&(e.col-=i.col),2&e.rel&&(e.row-=i.row),e}:l,T=i.forEditor?function(e,t,n){return e.begin=t.begin,e.end=n.end,e}:l,{peek:r,next:s,croak:n.croak,eof:n.eof,is:o}}function d(e){return" \t\n ​".indexOf(e)>=0}function u(e,t){function n(e){return/[0-9]/i.test(e)}function i(e){return/[a-z$_]/i.test(e)||v.isUnicodeLetter(e)}function o(e){return i(e)||n(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):n(t)});return{type:"num",value:parseFloat(t)}}function l(t,n){return{type:"sym",value:t,upper:t.toUpperCase(),space:d(e.peek()),quote:n}}function c(e,t,n){if(!e&&!t&&!n)return null;if(!e&&!n||e&&n){var i=t?parseInt(t,10):0;return e?i:i-1}}function u(){var t,n,i=e.lookingAt(/^R(\[)?(-?[0-9]+)?(\])?C(\[)?(-?[0-9]+)?(\])?/i);return i&&(t=c(i[1],i[2],i[3]),n=c(i[4],i[5],i[6]),null!=t&&null!=n)?(e.skip(i),{type:"rc",row:t,col:n,rel:(i[4]||!(i[4]||i[5]||i[6])?1:0)|(i[1]||!(i[1]||i[2]||i[3])?2:0)}):l(T(o))}function h(){return e.next(),{type:"str",value:e.readEscaped('"')}}function f(){return e.next(),l(e.readEscaped("'"),!0)}function p(){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?f():n(l)||"."==l?a():i(l)?u():r(l)?p():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 n,i;x.length<=C;)T(d),n=e.pos(),i=g(),t.forEditor&&i&&(i.begin=n,i.end=e.pos()),x.push(i);return x[C]}function b(){var e=_();return e&&C++,e}function w(e,t){for(var n=C,i=[];e-- >0;)i.push(b()||R);return C=n,t.apply(i,i)}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 n(){var t=e.charAt(u++);return"\n"==t?(h++,f=0):f++,t}function i(){return e.charAt(u)}function o(){return""===i()}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 n=t.exec(e.substr(u));if(n)return a(n[0].length),n}else a(t[0].length)}function a(e){for(;e-- >0;)n()}function l(e){for(var t,i=!1,r="";!o();)if(t=n(),i)r+=t,i=!1;else if("\\"==t)i=!0;else{if(t==e)break;r+=t}return r}function c(e){for(var t="";!o()&&e(i(),t);)t+=n();return t}function d(t){return t.exec(e.substr(u))}var u=0,h=1,f=0;return{next:n,peek:i,eof:o,croak:r,readWhile:c,readEscaped:l,lookingAt:d,skip:s,forward:a,pos:t}}function f(e,t,n){function i(){var i=e.next();return"sym"==i.type?"TRUE"==i.upper?(i.type="bool",i.value=!0):"FALSE"==i.upper&&(i.type="bool",i.value=!1):"ref"==i.type&&(i={type:"ref",ref:null!=t&&null!=n?i.absolute(t,n):i,begin:i.begin,end:i.end}),i}var o,r=[];for(e=c(e,{forEditor:!0,row:t,col:n});!e.eof();)r.push(i());return o=r[0],"op"==o.type&&"="==o.value&&(o.type="startexp"),r}function p(e,t,n){var i,o;for(t=t||0,n=n||0,e=c(e,{row:t,col:n}),i=[];!e.eof();){if(o=e.next(),"ref"!=o.type)throw new T("Expecting a reference but got: "+JSON.stringify(o));i.push(o.absolute(t,n))}return i}function m(e,t){var n=e+t,i=z[n];return i||(i="^(\\d+(COM\\d{3})*(DOT\\d+)?)",i=i.replace(/DOT/g,"\\"+t).replace(/COM/g,"\\"+e),i=RegExp(i),z[n]=i),i}function g(e,t){for(var n="";t-- >0;)n+=e;return n}var v,_,b,w,y,k,x,C,S,T,D,A,E,M,R,I,F,z;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,n){t.forEach(function(t){S[t]=e.length-n})})}([[":"],[" "],[","],["%"],["^"],["*","/"],["+","-"],["&"],["=","<",">","<=",">=","<>"]]),D={type:"bool",value:!0},A={type:"bool",value:!1},E=function(e){return function(t){var n=e[t];return n||(n=e[t]=Function("'use strict';return("+t+")")()),n}}(Object.create(null)),M=Object.create(null),R={type:"eof"},I=[],F=x.registerFormatParser=function(e){I.push(e)},x.parse=function(e,t,n,o){var r,s,a,l,c;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)&&(r=o.substr(0,o.length-1),s=parseFloat(r),!isNaN(s)&&s==r))return{type:"percent",value:s/100};if(/^=/.test(o))return o=o.substr(1),/\S/.test(o)?i(e,t,n,o):{type:"string",value:"="+o};for(a=0;a<I.length;++a)if(l=I[a](o))return l;return"true"==o.toLowerCase()?{type:"boolean",value:!0}:"false"==o.toLowerCase()?{type:"boolean",value:!1}:(c=C.parseDate(o))?{type:"date",value:C.dateToSerial(c)}:(s=parseFloat(o),!isNaN(s)&&o.length>0&&s==o?{type:"number",value:s}:{type:"string",value:o})},x.parseNameDefinition=o,x.parseFormula=i,x.parseReference=n,x.compile=a,x.parseSqref=p,x.InputStream=h,x.ParseError=T,x.tokenize=f,F(function(e){var t,n,i,o,r;return(t=/^(\d+):(\d+)$/.exec(e))?(n=parseInt(t[1],10),i=parseInt(t[2],10),{type:"date",format:"hh:mm",value:C.packTime(n,i,0,0)}):(t=/^(\d+):(\d+)(\.\d+)$/.exec(e))?(i=parseInt(t[1],10),o=parseInt(t[2],10),r=1e3*parseFloat(t[3]),{type:"date",format:"mm:ss.00",value:C.packTime(0,i,o,r)}):(t=/^(\d+):(\d+):(\d+)$/.exec(e))?(n=parseInt(t[1],10),i=parseInt(t[2],10),o=parseInt(t[3],10),{type:"date",format:"hh:mm:ss",value:C.packTime(n,i,o,0)}):(t=/^(\d+):(\d+):(\d+)(\.\d+)$/.exec(e))?(n=parseInt(t[1],10),i=parseInt(t[2],10),o=parseInt(t[3],10),r=1e3*parseFloat(t[4]),{type:"date",format:"hh:mm:ss.00",value:C.packTime(n,i,o,r)}):void 0}),F(function(e){var t,n,i,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="",f="",p=!1;if(e=h(e.replace(/^\s+|\s+$/g,"")),e.skip(/^-\s*/)&&(d=-1),(t=e.skip(c))&&(p=!0,u+='"'+t[0]+'"'),e.skip(/^-\s*/)){if(d<0)return null;d=-1}if(!(n=e.skip(l)))return null;if(u+="#",t=e.skip(c)){if(p)return null;p=!0,f='"'+t[0]+'"'}return e.eof()?((n[2]||p)&&(u+=",#"),n[3]&&(u+="."+g("0",n[3].length-1)),i=n[0].replace(RegExp("\\"+r,"g"),"").replace(RegExp("\\"+s,"g"),"."),u+=f,p&&(u+=";-"+u),{type:"number",format:u,value:d*parseFloat(i)}):null}),z={})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,i){var o=new FileReader;o.onload=function(e){var o=new JSZip(e.target.result);n(o,t,i)},o.readAsArrayBuffer(e)}function t(e){return e=/^\//.test(e)?e.substr(1):"xl/"+e}function n(e,t,n){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(n,i){var r,l,h,f;this.is(B)?(r=i["r:id"],l=a.byId[r],h=i.name,f=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,f.rows),columns:Math.max(t.options.columns||0,f.cols),columnWidth:f.columnWidth,rowHeight:f.rowHeight}})):this.is(V)&&i.activeTab&&(u=w(i.activeTab))},text:function(e){var n,i,o,r=this.is(M);!r||y(r["function"])||y(r.vbProcedure)||(n=r.localSheetId,i=null,null!=n&&(i=d[n].options.name),o=r.name,i&&(o="'"+i.replace(/\'/g,"\\'")+"'!"+o),f(i,null,function(){t.defineName(o,e,y(r.hidden))},"reading user-defined name: "+o))}}),h=new x.Deferred,h.progress(function(e){n&&n.notify(e)}).then(function(){var e=t.sheets();r(e),t.activeSheet(e[u]),n&&n.resolve()}),i(d,t,h)}function i(e,t,n){var i,r=(new x.Deferred).resolve();for(i=0;i<e.length;i++)!function(i,s){r=r.then(function(){var r,a,l=t.insertSheet(i.options);return l.suspendChanges(!0),r=o(l,i),a={sheet:l,progress:s/(e.length-1)},r.then(function(){n.notify(a)}),r})}(e[i],i);r.then(function(){n.resolve()})}function o(e,t){var n=new x.Deferred;return setTimeout(function(){c(t.zip,t.file,e,t.strings,t.styles),n.resolve()},0),n}function r(e){for(var t=0;t<e.length;t++)e[t].suspendChanges(!1).triggerChange({recalc:!0})}function s(e,n){var i={rows:0,cols:0};return m(e,t(n),{enter:function(e,t){if("dimension"==e){var n=S(t.ref);n.bottomRight&&(i.cols=n.bottomRight.col+1,i.rows=n.bottomRight.row+1)}else"sheetFormatPr"===e?(t.defaultColWidth&&(i.columnWidth=a(parseFloat(t.defaultColWidth))),t.defaultRowHeight&&(i.rowHeight=l(parseFloat(t.defaultRowHeight)))):this.is(z)&&this.exit()}}),i}function a(e){var t=7,n=(256*e+Math.floor(128/t))/256;return Math.floor(n)*t}function l(e){return 1.5625*e}function c(e,n,i,o,r){var s,c,g,_,b,k,x,C,M,B,H,N,V,$=i._columns._count,Y=null,K=n.replace(/worksheets\//,"worksheets/_rels/"),Q=v(e,K),X=[];D=i._workbook.excelImportErrors,m(e,t(n),{enter:function(e,t){var n,o,f,m,v,k,x,T,D,R,L;if(this.is(A))g=null,_=null,b=null,s=t.r,null==s&&(s=S(Y),s.col++,s=""+s),Y=s,c=t.t,o=t.s,null!=o&&p(i,s,r,o);else if(this.is(I))i.range(t.ref).merge();else if(this.is(E)){if(f=w(t.min)-1,m=Math.min($,w(t.max))-1,t.width&&(v=a(parseFloat(t.width)),0!==v&&i._columns.values.value(f,m,v)),"1"===t.hidden||0===v)for(k=f;k<=m;k++)i.hideColumn(k);null!=t.style&&p(i,new kendo.spreadsheet.RangeRef(new kendo.spreadsheet.CellRef((-(1/0)),f),new kendo.spreadsheet.CellRef((+(1/0)),m)),r,t.style)}else this.is(z)?(x=w(t.r)-1,t.ht&&(T=l(parseFloat(t.ht)),0!==T&&i._rows.values.value(x,x,T)),"1"!==t.hidden&&0!==T||i.hideRow(x)):this.is(P)?t.activeCell&&(D=S(t.activeCell),i.select(D,!0)):this.is(F)?"frozen"==t.state&&(t.xSplit&&i.frozenColumns(w(t.xSplit)),t.ySplit&&i.frozenRows(w(t.ySplit))):this.is(U)?i.showGridLines(y(t.showGridLines,!0)):this.is(W)?(R=t["r:id"],L=Q.byId[R],L&&i.range(t.ref).link(L)):this.is(["autoFilter"])?C=t.ref:C&&(this.is(["filterColumn"])?M=parseInt(t.colId,10):this.is(["customFilters"])?(B=y(t.and)?"and":"or",H=[]):this.is(["customFilter"])?(n=d(t.operator,t.val),n&&H.push({operator:n.operator,value:n.value})):this.is(["dynamicFilter"])?X.push({column:M,filter:new kendo.spreadsheet.DynamicFilter({type:u(t.type)})}):this.is(["top10"])?X.push({column:M,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"])?(N=y(t.blank),V=[]):this.is(["filter"])&&V.push(h(t.val)))},leave:function(e,t){var n,r;this.is(A)?null!=_?(n=f(i,b||s,function(){i.range(b||s).formula(_)},"parsing formula"),n&&i.range(b||s).value(_).background("#ffaaaa")):null!=g&&(r=i.range(s),r._get("formula")||(c&&"n"!=c?"s"==c?g=o[w(g)]:"b"==c?g="1"===g:"d"==c&&(g=kendo.parseDate(g)):g=parseFloat(g),null!=g&&r.value(g))):this.is(j)?!function(){var e=kendo.spreadsheet.calc.parseSqref(t.sqref),n=t.type.toLowerCase(),o=t.operator;/^(?:whole|decimal)$/.test(n)?n="number":"list"==n&&(o="list"),!o&&/^(?:number|date)$/.test(n)&&(o="between"),e.forEach(function(e){f(i,e,function(){i.range(e).validation({type:y(t.showErrorMessage,!0)?"reject":"warning",from:k,to:x,dataType:n,comparerType:T[o]||o,allowNulls:y(t.allowBlank),showButton:y(t.showDropDown)||"date"==n||"list"==n,messageTemplate:t.error,titleTemplate:t.errorTitle})},"parsing validation")})}():"cols"==e?i._columns._refresh():"sheetData"==e?i._rows._refresh():"autoFilter"==e?(i.range(C).filter(X),C=null):C&&("customFilters"==e?X.push({column:M,filter:new kendo.spreadsheet.CustomFilter({logic:B,criteria:H})}):"filters"==e&&X.push({column:M,filter:new kendo.spreadsheet.ValueFilter({values:V,blanks:N})}))},text:function(e){var t;this.is(O)||this.is(L)?g=e:(t=this.is(R))?(_=e,"shared"==t.t&&(b=t.ref)):this.is(q)?k=e:this.is(G)&&(x=e)}})}function d(e,t){var n={equal:"eq",notEqual:"ne",greaterThan:"gt",greaterThanOrEqual:"gte",lessThan:"lt",lessThanOrEqual:"lte"}[e];return t=h(t),n&&"number"==typeof t?{operator:n,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 f(e,t,n,i){try{return n(),!1}catch(o){var r={context:i,error:o+""};return e&&(r.sheet=e.name()),t&&(r.location=t+""),D.push(r),!0}}function p(e,t,n,i){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)}function a(e){function t(t,n){var i,o,r=e[t];r&&(i=$[r.style],0!==i&&(o=r.color,null==o&&(o="#000"),u._property(n,{size:i,color:o})))}t("left","borderLeft"),t("top","borderTop"),t("right","borderRight"),t("bottom","borderBottom")}function l(e,t){var n=h[e];if(null!=n&&!n)return!1;if(d=h[t],c&&null==d){if(n=c[e],null!=n&&!n)return!1;d=c[t]}return null!=d}var c,d,u=e.range(t),h=n.inlineStyles[i];h.xfId&&(c=n.namedStyles[h.xfId]),l("applyBorder","borderId")&&a(n.borders[d]),l("applyFont","fontId")&&s(n.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(n.fills[d]),l("applyNumberFormat","numFmtId")&&o(n.numFmts[d]||Y[d])}function m(e,t,n){var i=e.files[t];i&&C(i.asUint8Array(),n)}function g(e){var t=[],n=null;return m(e,"xl/sharedStrings.xml",{leave:function(){this.is(N)&&(t.push(n),n=null)},text:function(e){this.is(H)&&(null==n&&(n=""),n+=e)}}),t}function v(e,n){var i={byId:{},byType:{theme:[]}};return m(e,t(n)+".rels",{enter:function(e,t){var n,o;"Relationship"==e&&(i.byId[t.Id]=t.Target,n=t.Type.match(/\w+$/)[0],o=i.byType[n]||[],o.push(t.Target),i.byType[n]=o)}}),i}function _(e,t){function n(e){function t(t){null!=e[t]&&(n[t]=y(e[t]))}var n={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"),n}function i(e){var n,i,o;return e.rgb?k(e.rgb):e.indexed?te[w(e.indexed)]:e.theme?(n=t.colorScheme[w(e.theme)])?(i=kendo.parseColor(n),e.tint&&(i=i.toHSL(),o=parseFloat(e.tint),i.l=o<0?i.l*(1+o):i.l*(1-o)+(100-100*(1-o))),i.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));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=i(t):"bgColor"==e&&"solid"!==s.type&&(s.color=i(t));else if(this.is(K))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=i(t)}}else this.is(J)?(l=n(t),o.namedStyles.push(l),c&&(l=null)):this.is(Z)?(l=n(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(K)?a=null:"xf"==e&&(l=null)}}),o}function b(e,n){function i(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}var o=[],r={colorScheme:o},s=t(n);return e.files[s]&&(m(e,s,{enter:function(e,t){this.is(ie)?o.push(k("window"==t.val?"FFFFFFFF":"FF000000")):this.is(ne)&&o.push(k("FF"+t.val))}}),o.length>3&&(i(o,0,1),i(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,M,R,I,F,z,P,B,L,H,N,O,V,U,W,j,q,G,$,Y,K,Q,X,Z,J,ee,te,ne,ie;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"],M=["definedNames","definedName"],R=["sheetData","row","c","f"],I=["mergeCells","mergeCell"],F=["sheetViews","sheetView","pane"],z=["sheetData","row"],P=["sheetViews","sheetView","selection"],
B=["sheets","sheet"],L=["sheetData","row","c","is"],H=["t"],N=["si"],O=["sheetData","row","c","v"],V=["bookViews","workbookView"],U=["sheetViews","sheetView"],W=["hyperlinks","hyperlink"],j=["dataValidations","dataValidation"],q=["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},Y={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:"@"},K=["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")],ne=["a:clrScheme","*","a:srgbClr"],ie=["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=n)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e,t,n){return void 0!==e?e:void 0!==t?t:n}var i,o,r,s,a,l,c=n(e.rowCount,t.rows,200),d=n(e.columnCount,t.columns,50),u=n(e.rowHeight,t.rowHeight,20),h=n(e.columnWidth,t.columnWidth,64),f=n(e.headerHeight,t.headerHeight,20),p=n(e.headerWidth,t.headerWidth,32);if(void 0!==e.rows)for(i=0;i<e.rows.length;++i)if(o=e.rows[i],r=n(o.index,i),r>=c&&(c=r+1),o.cells)for(s=0;s<o.cells.length;++s)a=o.cells[s],l=n(a.index,s),l>=d&&(d=l+1);return{rowCount:c,columnCount:d,rowHeight:u,columnWidth:h,headerHeight:f,headerWidth:p}}var n,i,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=e.spreadsheet.calc.runtime.Formula,o=e.spreadsheet.Ref,r=e.spreadsheet.CalcError,s=e.Observable.extend({init:function(t,n){e.Observable.fn.init.call(this),this.options=t,this._view=n,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 i,o=n.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:o.editActiveCell?s.activeCellSelection():s.selection()),i=r.exec(),i&&"error"===i.reason||(r.cannotUndo?this.undoRedoStack.clear():this.undoRedoStack.push(r)),i},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 n=this.sheetIndex(e),i=this._sheets;n!==-1&&(this._sheetsSearchCache={},i.splice(t,0,i.splice(n,1)[0]),this.trigger("change",{sheetSelection:!0}))},insertSheet:function(t){var n,i,o,r,s,a;if(t=t||{},n=this,i="number"==typeof t.index?t.index:n._sheets.length,r=n._sheets,s=function(e){e=e?e:1;var t="Sheet"+e;return n.sheetByName(t)?s(e+1):t},!t.name||!n.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(i,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,n=this._sheets,i=("string"==typeof e?e:e.name()).toLowerCase(),o=this._sheetsSearchCache[i];if(o>=0)return o;for(o=0;o<n.length;o++)if(t=n[o].name().toLowerCase(),this._sheetsSearchCache[t]=o,t===i)return o;return-1},renameSheet:function(e,t){var n=e.name().toLowerCase();if(t&&n!==t.toLowerCase()&&!this.sheetByName(t)&&(e=this.sheetByName(n),e&&(this._sheetsSearchCache={},!this.trigger("renameSheet",{sheet:e,newSheetName:t}))))return this._sheets.forEach(function(e){e._forFormulas(function(e){e.renameSheet(n,t)})}),this.forEachName(function(e,r){e.nameref.renameSheet(n,t)&&(this.undefineName(r),e.name=e.nameref.print(),this.nameDefinition(e.name,e)),(e.value instanceof o||e.value instanceof i)&&e.value.renameSheet(n,t)}.bind(this)),e._name(t),this.trigger("change",{sheetSelection:!0}),e},removeSheet:function(e){var t,n=this,i=n._sheets,o=e.name(),r=n.sheetIndex(e);1!==i.length&&(this.trigger("removeSheet",{sheet:e})||(this._sheetsSearchCache={},r>-1&&(e.unbind(),i.splice(r,1),n.activeSheet().name()===o?(t=i[r===i.length?r-1:r],n.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 n,i,o,r;if(e.sheets)for(this._clearSheets(),n=0;n<e.sheets.length;n++)i=e.sheets[n],o=t(i,this.options),r=this.insertSheet({rows:o.rowCount,columns:o.columnCount,rowHeight:o.rowHeight,columnWidth:o.columnWidth,headerHeight:o.headerHeight,headerWidth:o.headerWidth,data:i}),i.dataSource&&r.setDataSource(i.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],n=t.value;return n instanceof o||n instanceof i?n=n.print(0,0,!0):n instanceof r?n+="":n=JSON.stringify(n),{value:n,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 i=new n.Deferred,o=i.promise(),r={file:t,promise:o};return t&&!this.trigger("excelImport",r)?(this._clearSheets(),e.spreadsheet.readExcel(t,this,i)):i.reject(),o},saveAsExcel:function(t){var i,o;t=n.extend({},this.options.excel,t),i=this.toJSON(),this.trigger("excelExport",{workbook:i})||(o=new e.ooxml.Workbook(i),e.saveAs({dataURI:o.toDataURL(),fileName:i.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy}))},draw:function(t,n){"function"!=typeof t||n||(n=t,t={});var i=[],o=this._sheets;!function r(s){if(s<o.length)o[s].draw(e.spreadsheet.SHEETREF,t,function(e){i.push(e),r(s+1)});else{var a=i[0];for(s=1;s<i.length;++s)a.children=a.children.concat(i[s].children);n(a)}}(0)},nameForRef:function(e,t){var n,i,r,s;void 0===t&&(t=e.sheet),t=t.toLowerCase(),n=e+"";for(i in this._names)if(r=this._names[i],s=r.value,s instanceof o&&(!s.sheet||s.sheet&&t==s.sheet.toLowerCase())&&s+""==n)return r;return{name:n}},defineName:function(t,n,i){var o=e.spreadsheet.calc.parseNameDefinition(t,n);t=o.name.print(),this._names[t.toLowerCase()]={value:o.value,hidden:i,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,n,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,n,r):l instanceof i&&l.adjust(e,t?"row":"col",n,r)},this)},options:{}}),e.spreadsheet.Workbook=s,e.PDFMixin&&(e.PDFMixin.extend(s.prototype),s.prototype.saveAsPDF=function(t){var i=new n.Deferred,o=i.promise(),r={promise:o};if(!this.trigger("pdfExport",r))return this._drawPDF(t,i).then(function(t){return e.drawing.exportPDF(t)}).done(function(n){e.saveAs({dataURI:n,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy,proxyTarget:t.proxyTarget}),i.resolve()}).fail(function(e){i.reject(e)}),o},s.prototype._drawPDF=function(e){var t=new n.Deferred,i=function(e){t.resolve(e)};switch(e.area){case"workbook":e.workbook.draw(e,i);break;case"sheet":e.workbook.activeSheet().draw(e,i);break;case"selection":e.workbook.activeSheet().selection().draw(e,i)}return t.promise()}))}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/formulacontext.min",["kendo.core.min"],e)}(function(){var e,t,n,i,o,r,s,a;kendo.support.browser.msie&&kendo.support.browser.version<9||(e=kendo.spreadsheet,t=e.CellRef,n=e.RangeRef,i=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){var d,u,h,f,p,m,g,v,_,b,w,y,k,x,C,S,T;if(e instanceof t)return d=this.workbook.sheetByName(e.sheet),d&&e.valid()?(u=d.formula(e),h=d.range(e.row,e.col).value(),null!=u||null!=h?[{formula:u,value:h,row:e.row,col:e.col,sheet:e.sheet,hidden:!!s&&(0===d.columnWidth(e.col)||0===d.rowHeight(e.row))}]:[]):[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];if(e instanceof n){if(f=this.workbook.sheetIndex(e.sheet),p=[],m=f,e.endSheet&&(m=this.workbook.sheetIndex(e.endSheet),f>m&&(g=f,f=m,m=g)),f<0||m<0||!e.valid())return[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];for(;f<=m;)for(d=this.workbook.sheetByIndex(f++),v=d._grid.normalize(e.topLeft),_=d._grid.normalize(e.bottomRight),b=d._grid.cellRefIndex(v),w=d._grid.cellRefIndex(_),y=d._properties.iterator("value",b,w),k=v.col;k<=_.col;++k)for(x=v.row;x<=_.row;++x)C=d._grid.index(x,k),u=d._properties.get("formula",C),h=y.at(C),null==u&&null==h||p.push({formula:u,value:h,row:x,col:k,sheet:d.name(),hidden:!!s&&(0===d.columnWidth(k)||0===d.rowHeight(x))});return p}if(e instanceof i){for(S=[],f=0;f<e.refs.length;++f)S=S.concat(this.getRefCells(e.refs[f],s,a,l,c));return S}return e instanceof o?(T=this.nameValue(e,a,l,c),T instanceof r?this.getRefCells(T,s,a,l,c):[{value:null==T?new kendo.spreadsheet.calc.runtime.CalcError("NAME"):T}]):[]},nameValue:function(e,t,n,i){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(n,i)),o},getData:function(e,n,i,r){var s,a=e instanceof t;return e instanceof o&&(a=this.workbook.nameValue(e.name)instanceof t),s=this.getRefCells(e,!1,n,i,r).map(function(e){var t=e.value;return t instanceof kendo.spreadsheet.calc.runtime.Formula&&(t=t.value),t}),a?s[0]:s},onFormula:function(e){var t=this.workbook.sheetByName(e.sheet),n=e.row,i=e.col,o=e.value,s=t.formula({row:n,col:i});return s===e&&(o instanceof r&&(o=this.getData(o,e.sheet,n,i),Array.isArray(o)&&(o=o[0]),void 0===o&&(o=null)),o instanceof kendo.spreadsheet.calc.runtime.Matrix?o.each(function(e,o,r){t._value(n+o,i+r,e)}):t._value(n,i,o),clearTimeout(t._formulaContextRefresh),t._formulaContextRefresh=setTimeout(function(){t.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,n){(n||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 n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_;if(!(e.support.browser.msie&&e.support.browser.version<9)){n=e.jQuery,i=/: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",":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"},c=n.extend({focus:"onEditorBarFocus"},l),d=n.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"]),f=t(["unhide-row","unhide-column"]),p=[],m=[],g=[];for(v in o)p.push(v),m.push("shift+"+v);for(v in r)g.push(v);a[p]="onAction",a[m]="onShiftAction",a[g]="onEntryAction",d[p]="onEditorAction",d[m]="onEditorShiftAction",_=e.Class.extend({init:function(t,i){this.view=t,this.workbook(i),this.container=n(t.container),this.clipboardElement=n(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)),n(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.view.showError(t,function(){this.activateEditor(),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,i=n(e.item).data("action");switch(i){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,n=this._workbook;if(e.isAddButton){if(this._workbook.trigger("insertSheet"))return;t=n.insertSheet()}else t=n.sheetByName(e.name);if(n.activeSheet().name()!==t.name()){if(this._workbook.trigger("selectSheet",{sheet:t}))return;n.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,n=this.editor,i=this._workbook,o=i.activeSheet();this._viewPortHeight=this.view.scroller.clientHeight,this.navigator.height(this._viewPortHeight),n.isActive()||this.isEditorDisabled||(n.enable(o.selection().enable()!==!1),n.value(i._inputForRef(o.activeCell()))),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,n=e.originalEvent.deltaY;1===e.originalEvent.deltaMode&&(t*=10,n*=10),this.scrollWith(t,n),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 n,o,s;if(e.mod){switch(n=!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:n=!1}n&&e.preventDefault()}else if(s=this._workbook.activeSheet().selection().enable()===!1,"delete"==t||"backspace"==t)s||this._execute({command:"ClearContentCommand"}),e.preventDefault();else if(i.test(t)||":edit"===t){if(s)return void e.preventDefault();":edit"!==t&&this.editor.value(""),this.activateEditor()}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,n=this._workbook.activeSheet();n.resizingInProgress()||n.selectionInProgress()||(t=this.objectAt(e),"columnresizehandle"===t.type||"rowresizehandle"===t.type?n.positionResizeHandle(t.ref):n.removeResizeHandle())},onMouseDown:function(e){var t,n=this.objectAt(e);if(n.pane&&(this.originFrame=n.pane),"editor"===n.type)return this.onEditorEsc(),this.openCustomEditor(),void e.preventDefault();if(this.editor.canInsertRef(!1)&&n.ref)return this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs()),this.navigator.startSelection(n.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"===n.type||"rowresizehandle"===n.type)return t.startResizing({x:n.x,y:n.y}),void e.preventDefault();if("filtericon"===n.type)return this.openFilterMenu(e),void e.preventDefault();this._selectionMode=u[n.type],this.appendSelection=e.mod,this.navigator.startSelection(n.ref,this._selectionMode,this.appendSelection,e.shiftKey)}},onContextMenu:function(t){var n,i,o,r,s,a=this._workbook.activeSheet();a.resizingInProgress()||(t.preventDefault(),this.cellContextMenu.close(),this.colHeaderContextMenu.close(),this.rowHeaderContextMenu.close(),i=this.objectAt(t),"columnresizehandle"!==i.type&&"rowresizehandle"!==i.type&&(this.navigator.selectForContextMenu(i.ref,u[i.type]),o=this.navigator._sheet.select()instanceof e.spreadsheet.UnionRef,r=!1,s=!1,"columnheader"==i.type?(n=this.colHeaderContextMenu,r=!o&&this.axisManager.selectionIncludesHiddenColumns()):"rowheader"==i.type?(n=this.rowHeaderContextMenu,r=!o&&this.axisManager.selectionIncludesHiddenRows()):(n=this.cellContextMenu,s=this.navigator.selectionIncludesMergedCells()),n.element.find(h).toggle(!o),n.element.find(f).toggle(r),n.element.find("[data-action=unmerge]").toggle(s),setTimeout(function(){n.open(t.pageX,t.pageY)})))},prevent:function(e){e.preventDefault()},constrainResize:function(e,t){var n=this._workbook.activeSheet(),i=n.resizeHandlePosition();return!i||"outside"===e||"topcorner"===e||t.col<i.col||t.row<i.row},onMouseDrag:function(e){var t,n,i,o;if("sheet"!==this._selectionMode){if(t={clientX:e.clientX,clientY:e.clientY},n=this.objectAt(t),i=this._workbook.activeSheet(),i.resizingInProgress())return void(this.constrainResize(n.type,n.ref)||i.resizeHintPosition({x:n.x,y:n.y}));if("outside"===n.type)return void this.startAutoScroll(n);this.originFrame===n.pane?this.selectToLocation(t):(o=this.originFrame._grid,n.x>o.right&&this.scrollLeft(),n.y>o.bottom&&this.scrollTop(),n.y<o.top||n.x<o.left?this.startAutoScroll(n,t):this.selectToLocation(t)),e.preventDefault()}},onMouseUp:function(e){var t,n,i,o=this._workbook.activeSheet();if(o.completeResizing(),this.navigator.completeSelection(),this.stopAutoScroll(),t=this.editor.activeEditor()){for(n=e.target;n;){if(n===t.element[0])return;n=n.parentNode}i=this.objectAt(e),i&&i.ref&&t.canInsertRef(!1)&&(t.refAtPoint(o.selection()._ref),o._setFormulaSelections(t.highlightedRefs()))}},onDblClick:function(e){var t=this.objectAt(e),n=this._workbook.activeSheet().selection().enable()===!1;"cell"!==t.type||n||(this.editor.activate({range:this._workbook.activeSheet()._viewActiveCell(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()}).focus(),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 n,i,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(),n=window.clipboardData.getData("Text").trim();(e||n)&&(this.clipboard.external({html:e,plain:n}),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(),n=!1,i=!1,window.DOMStringList&&t.originalEvent.clipboardData.types instanceof window.DOMStringList?(n=t.originalEvent.clipboardData.types.contains("text/html"),i=t.originalEvent.clipboardData.types.contains("text/plain")):(n=/text\/html/.test(t.originalEvent.clipboardData.types),i=/text\/plain/.test(t.originalEvent.clipboardData.types)),n&&(r=t.originalEvent.clipboardData.getData("text/html")),i&&(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){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,n=this.originFrame._grid,i=this.view.scroller,o=8,r=i.scrollLeft,s=i.scrollTop;e<n.left&&this.scrollRight(-o),e>n.right&&this.scrollRight(o),t<n.top&&this.scrollDown(-o),t>n.bottom&&this.scrollDown(o),s===i.scrollTop&&r===i.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),n=this._workbook.activeSheet(),i=n.filterColumn(t.ref),o=this.view.createFilterMenu(i);o.bind("action",this.onCommandRequest.bind(this)),o.bind("action",o.close.bind(o)),o.openFor(e.target)},onEditorChange:function(e){this._workbook.activeSheet().isInEditMode(!1),this._lastEditorValue=e.value,this._execute({command:"EditCommand",options:{editActiveCell:!0,value:e.value}})},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()._viewActiveCell(),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 n=this.editor,i=this._workbook.activeSheet();n.canInsertRef(!0)&&(this.navigator.moveActiveCell(o[t]),n.activeEditor().refAtPoint(i.selection()._ref),i._setFormulaSelections(n.highlightedRefs()),e.preventDefault())},onEditorShiftAction:function(e,t){var n=this.editor,i=this._workbook.activeSheet();n.canInsertRef(!0)&&(this.navigator.modifySelection(o[t.replace("shift+","")],this.appendSelection),n.activeEditor().refAtPoint(i.selection()._ref),i._setFormulaSelections(n.highlightedRefs()),e.preventDefault())},resetEditorValue:function(){this.editor.value(this._workbook._inputForRef(this._workbook.activeSheet()._viewActiveCell()))},activateEditor:function(){this.editor.activate({range:this._workbook.activeSheet()._viewActiveCell(),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?n.extend(!0,e.options,t):e.options=t,this.view.openDialog(e.name,e.options)},onNameEditorEnter:function(){var t,n=this._workbook,i=n.activeSheet(),o=this.view.nameEditor.value(),r=e.spreadsheet.calc.parseReference(o,!0)||n.nameValue(o);return r instanceof e.spreadsheet.Ref?(r.sheet&&r.sheet.toLowerCase()!=i.name().toLowerCase()&&(t=n.sheetByName(r.sheet),t&&(n.activeSheet(t),i=t)),void i.range(r).select()):(r=i.selection()._ref.clone().simplify().setSheet(i.name(),!0),this._execute({command:"DefineNameCommand",options:{name:o,value:r}}),void this.clipboardElement.focus())},onNameEditorCancel:function(){this.clipboardElement.focus()},onNameEditorSelect:function(t){var n,i=t.name,o=this._workbook,r=o.activeSheet(),s=o.nameValue(i);return s instanceof e.spreadsheet.Ref?(s.sheet&&s.sheet.toLowerCase()!=r.name().toLowerCase()&&(n=o.sheetByName(s.sheet),n&&(o.activeSheet(n),r=n)),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,n){(n||t)()}),function(e,define){define("spreadsheet/view.min",["kendo.core.min","kendo.menu.min","spreadsheet/sheetsbar.min"],e)}(function(){!function(e){function t(e){var t,n=window.getSelection();n.removeAllRanges(),t=document.createRange(),t.selectNodeContents(e),n.addRange(t)}function n(e,t){var n=e.trs[t].children;return n[n.length-2]}function i(e,t){var n=e.trs[t-1],i=e.trs[t].children.length-1;if(n&&i>=0)return n.children[i]}function o(e){return["solid",(e.size||1)+"px",e.color||"#000"].join(" ")}function r(e){return/:\/\//.test(e)||(e="http://"+e),e}function s(t,n,i,s,a,l){function c(t){var i,o=n.link;return o||"object"==typeof n.value&&(o=n.value.link),o?(i={textDecoration:"none"},n.color&&(i.color=n.color),n.underline&&(i.textDecoration="underline"),e.dom.element("a",{href:r(o),style:i,target:"_blank"},t?[t]:[])):t}var d,u,h,f,p,m,g,v,_,b,y,k,x,C,S;if(i||e.spreadsheet.draw.shouldDrawCell(n)){if(d=n.left,u=n.top,h=n.width+1,f=n.height+1,p={},m=n.background,g=null,m&&(g=m,l&&(g=e.parseColor(g).toHSV(),g.v*=.9,g=g.toCssRgba()),g=o({color:g})),m&&(p.backgroundColor=m),n.color&&(p.color=n.color),n.fontFamily&&(p.fontFamily=n.fontFamily),n.underline&&(p.textDecoration="underline"),n.italic&&(p.fontStyle="italic"),n.textAlign&&(p.textAlign=n.textAlign),n.bold&&(p.fontWeight="bold"),n.fontSize&&(p.fontSize=n.fontSize+"px"),n.wrap===!0&&(p.whiteSpace="pre-wrap",p.overflowWrap="break-word",p.wordWrap="break-word"),n.borderLeft?(p.borderLeft=o(n.borderLeft),a&&(a[n.left]=!0)):g&&a&&!a[n.left]?p.borderLeft=g:(d++,h--),n.borderTop?(p.borderTop=o(n.borderTop),s&&(s[n.top]=!0)):g&&s&&!s[n.top]?p.borderTop=g:(u++,f--),n.borderRight?(p.borderRight=o(n.borderRight),a&&(a[n.right]=!0)):g&&a&&!a[n.right]?p.borderRight=g:h--,n.borderBottom?(p.borderBottom=o(n.borderBottom),s&&(s[n.bottom]=!0)):g&&s&&!s[n.bottom]?p.borderBottom=g:f--,p.left=d+"px",p.top=u+"px",p.width=h+"px",p.height=f+"px",v=n.value,_=typeof v,n.format&&null!=v?(v=e.spreadsheet.formatting.format(v,n.format),v.__dataType&&(_=v.__dataType)):null!==v&&void 0!==v&&(v=e.dom.text(v)),!p.textAlign)switch(_){case"number":case"date":case"percent":p.textAlign="right";break;case"boolean":p.textAlign="center"}return b=[w.cell],i&&b.push(i),n.enable===!1&&b.push("k-state-disabled"),n.merged&&b.push("k-spreadsheet-merged-cell"),y=n.verticalAlign||"bottom",v=y&&v?e.dom.element("div",{className:"k-vertical-align-"+y},[c(v)]):c(v),k=v?[v]:[],x={style:p},C=n.validation,C&&!C.value&&(k.push(e.dom.element("span",{className:"k-dirty"})),b.push("k-dirty-cell"),x.title=C.message),x.className=b.join(" "),S=e.dom.element("div",x,k),t.push(S),S}}function a(t,r,s){var a,l,c,d,u,h,f={};if(s.background&&(f.backgroundColor=s.background),s.color&&(f.color=s.color),s.fontFamily&&(f.fontFamily=s.fontFamily),s.underline&&(f.textDecoration="underline"),s.italic&&(f.fontStyle="italic"),s.textAlign&&(f.textAlign=s.textAlign),s.verticalAlign&&(f.verticalAlign="center"===s.verticalAlign?"middle":s.verticalAlign),s.bold&&(f.fontWeight="bold"),s.fontSize&&(f.fontSize=s.fontSize+"px"),s.wrap===!0&&(f.whiteSpace="pre-wrap",f.wordBreak="break-all"),s.borderRight?f.borderRight=o(s.borderRight):s.background&&(f.borderRightColor=s.background),s.borderBottom?f.borderBottom=o(s.borderBottom):s.background&&(f.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)),!f.textAlign)switch(l){case"number":case"date":case"percent":f.textAlign="right";break;case"boolean":f.textAlign="center"}return c=null,s.enable===!1&&(c="k-state-disabled"),d=t.addCell(r,a,f,c,s.validation),s.borderLeft?(h=n(t,r),u=o(s.borderLeft),h&&u&&(h.attr.style.borderRight=u)):s.background&&(f.borderLeftColor=s.background),s.borderTop?(h=i(t,r),u=o(s.borderTop),h&&u&&(h.attr.style.borderBottom=u)):s.background&&(f.borderTopColor=s.background),d}function l(e,t,n){return e>=t&&e<=n}var c,d,u,h,f,p,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,f={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={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"}},p=e.Class.extend({init:function(){this.cols=[],this.trs=[],this._height=0,this._width=0},addColumn:function(t){this._width+=t;var n=e.dom.element("col",{style:{width:t+"px"}});n.visible=t>0,this.cols.push(n)},addRow:function(t){var n,i=null;i={style:{height:t+"px"}},this._height+=t,n=e.dom.element("tr",i),n.visible=t>0,this.trs.push(n)},addCell:function(t,n,i,o,r){var s,a,l;return null!==n&&void 0!==n||(n=""),n instanceof e.dom.Node||(n=e.dom.text(n)),s=[n],a={style:i},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,n,i){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:n+"px",height:this._height+"px",width:this._width+"px"},className:i},[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,n){var i,o,r=b.classNames;this.element=t,this.options=c.extend(!0,{messages:e.spreadsheet.messages.view},this.options,n),this._chrome(),this._dialogs=[],t.append(_({classNames:r})),this._formulaInput(),this.wrapper=t.find(u+r.view),this.container=t.find(u+r.fixedContainer)[0],this.scroller=t.find(u+r.scroller)[0],this.clipboard=t.find(u+r.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(),i={target:t,animation:!1,showOn:"never"},this.cellContextMenu=new e.spreadsheet.ContextMenu(t.find(u+r.cellContextMenu),i),this.colHeaderContextMenu=new e.spreadsheet.ContextMenu(t.find(u+r.colHeaderContextMenu),i),this.rowHeaderContextMenu=new e.spreadsheet.ContextMenu(t.find(u+r.rowHeaderContextMenu),i),o=e.support.scrollbar(),c(this.container).css({width:this.wrapper[0].clientWidth-o,height:this.wrapper[0].clientHeight-o})},enableClipboard:function(e){this.isClipboardDeactivated=!e,e?this.clipboard.attr("contenteditable",e):this.clipboard.removeAttr("contenteditable")},_resize:function(){var t=e._outerHeight,n=this.tabstrip?t(this.tabstrip.element):0,i=this.formulaBar?t(this.formulaBar.element):0,o=this.sheetsbar?t(this.sheetsbar.element):0;this.wrapper.height(this.element.height()-(n+i+o)),this.tabstrip&&this.tabstrip.quickAccessAdjust()},_chrome:function(){var t,n=c("<div class='k-spreadsheet-action-bar' />").prependTo(this.element),i=c("<div class='k-spreadsheet-name-editor' />").appendTo(n);this.nameEditor=new e.spreadsheet.NameEditor(i),t=c("<div />").appendTo(n),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,n=this.options.messages.tabs,i=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 i)(i[t]===!0||i[t]instanceof Array)&&o.push({id:t,text:n[t],content:""});this.tabstrip=new e.spreadsheet.TabStrip(c("<div />").prependTo(this.element),{animation:!1,dataTextField:"text",dataContentField:"content",dataSource:o,toolbarOptions:i,view:this}),this.tabstrip.select(0)},_executeCommand:function(e){this._sheet.trigger("commandRequest",e)},workbook:function(e){this._workbook=e,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,n){var i,o,r=this._rectangle(t,n);return e-=this._sheet._grid._headerWidth,i=h/2,o=r.right-this.scroller.scrollLeft,o-i<=e&&e<=o+i},isRowResizer:function(e,t,n){var i,o,r=this._rectangle(t,n);return e-=this._sheet._grid._headerHeight,i=h/2,o=r.bottom-this.scroller.scrollTop,o-i<=e&&e<=o+i},isFilterIcon:function(e,t,n,i){var o,r=n._grid,s=r.rows.frozen?0:this.scroller.scrollTop,a=r.columns.frozen?0:this.scroller.scrollLeft;return e-=this._sheet._grid._headerWidth-a,t-=this._sheet._grid._headerHeight-s,o=!1,this._sheet.forEachFilterHeader(i,function(i){if(!o){var r=this._rectangle(n,i);o=n.filterIconRect(r).intersects(e,t)}}.bind(this)),o},isAutoFill:function(e,t,n){var i,o=this._sheet.select();return!(o.size>1)&&(e-=this._sheet._grid._headerWidth,t-=this._sheet._grid._headerHeight,n._grid.columns.frozen||(e+=this.scroller.scrollLeft),n._grid.rows.frozen||(t+=this.scroller.scrollTop),i=this._rectangle(n,o),Math.abs(i.right-e)<8&&Math.abs(i.bottom-t)<8)},isEditButton:function(e,t){var n,i=this._sheet.activeCellCustomEditor();if(i&&(n=this.activeCellRectangle(),e>n.right&&e<=n.right+20&&t>=n.top&&t<=n.bottom))return!0},objectAt:function(e,t){var n,i,o,r,s,a,l,c=this._sheet._grid;return e<0||t<0||e>this.scroller.clientWidth||t>this.scroller.clientHeight?n={type:"outside"}:e<c._headerWidth&&t<c._headerHeight?n={type:"topcorner"}:(i=this.paneAt(e,t),i?(o=i._grid.rows.index(t,this.scroller.scrollTop),r=i._grid.columns.index(e,this.scroller.scrollLeft),s="cell",a=new d(o,r),l=this._sheet.selectionInProgress(),this.isAutoFill(e,t,i)?s="autofill":this.isFilterIcon(e,t,i,a)?s="filtericon":!l&&e<c._headerWidth?(a=new d(o,(-(1/0))),s=this.isRowResizer(t,i,a)?"rowresizehandle":"rowheader"):!l&&t<c._headerHeight?(a=new d((-(1/0)),r),s=this.isColumnResizer(e,i,a)?"columnresizehandle":"columnheader"):this.isEditButton(e,t)&&(s="editor"),n={type:s,ref:a}):n={type:"outside"}),n.pane=i,n.x=e,n.y=t,n},paneAt:function(e,t){return this.panes.filter(function(n){var i=n._grid;return l(t,i.top,i.bottom)&&l(e,i.left,i.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,n=this._sheet._grid.rectangle(e);return n.offset(t.headerWidth-(t.columns.frozen?0:this.scroller.scrollLeft),t.headerHeight-(t.rows.frozen?0:this.scroller.scrollTop))},refresh:function(e){var t,n,i=this._sheet;this.tabstrip&&this.tabstrip.refreshTools(i.range(i.activeCell())),e.sheetSelection&&this.sheetsbar&&this.sheetsbar.renderSheets(this._workbook.sheets(),this._workbook.sheetIndex(this._sheet)),this._resize(),this.viewSize[0].style.height=i._grid.totalHeight()+"px",this.viewSize[0].style.width=i._grid.totalWidth()+"px",e.layout&&(t=i.frozenColumns(),n=i.frozenRows(),this.panes=[this._pane(n,t)],t>0&&this.panes.push(this._pane(n,0,null,t)),n>0&&this.panes.push(this._pane(0,t,n,null)),n>0&&t>0&&this.panes.push(this._pane(0,0,n,t))),e.filter&&this._destroyFilterMenu(),e.activeCell&&(this._focus=i.activeCell().toRangeRef())},createFilterMenu:function(t){var n,i,o,r,s,a;return this._filterMenu&&this._filterMenu.options.column==t?this._filterMenu:(this._destroyFilterMenu(),n=this._sheet,i=n.filter().ref,o=new e.spreadsheet.Range(i,n),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,n=this.containingPane(e)._grid,i=n.scrollBoundaries(e),o=this.scroller,r=n.rows.frozen?0:o.scrollTop,s=n.columns.frozen?0:o.scrollLeft;return i.top<r&&(t=!0,o.scrollTop=i.scrollTop),i.bottom>r&&(t=!0,o.scrollTop=i.scrollBottom),i.left<s&&(t=!0,o.scrollLeft=i.scrollLeft),i.right>s&&(t=!0,o.scrollLeft=i.scrollRight),t},_destroyDialog:function(){this._dialogs.pop()},openCustomEditor:function(){var e=this,t=e._sheet.activeCell().first(),n=e._sheet.activeCellCustomEditor(),i=e._sheet.range(t);n.edit({range:i,rect:e.activeCellRectangle(),view:this,validation:this._sheet.validation(t),callback:function(t,n){e._executeCommand({command:"EditCommand",options:{operatingRange:i,property:n?"input":"value",value:t}})}})},openDialog:function(t,n){var i,o,r,s=e.spreadsheet.dialogs.create(t,n);if(s)return s.bind("action",this._executeCommand.bind(this)),s.bind("deactivate",this._destroyDialog.bind(this)),this._dialogs.push(s),i=this._sheet,o=i.activeCell(),r=new e.spreadsheet.Range(o,i),s.open(r),s},showError:function(t,n){var i,o=this.options.messages.errors,r=function(t){var n=t.sender.dialog().element;n.find(".k-button:first").focus(),n.find(".k-button, input").on("keydown",function(n){n.keyCode==e.keys.ESC&&t.sender.close()})},s=function(e){var t=e.sender;this.selectClipBoardContents(),t._retry&&n&&n()}.bind(this);e.spreadsheet.dialogs.registered(t.type)?(i={close:s},"validationError"===t.type&&(i=c.extend(i,{title:t.title||"Error",text:t.body?t.body:o[t.type],activate:r})),this.openDialog(t.type,i)):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,n,i,o,r,s,a,l,c;this.element.is(":visible")&&(t=this._sheet,n=t.focus(),n&&this.scrollIntoView(n)||(i=t.resizingInProgress()?t.resizeHandlePosition().col===-(1/0)?"column":"row":"none",this.wrapper.toggleClass(f.editContainer,this.editor.isActive()).toggleClass(f.horizontalResize,"row"==i).toggleClass(f.verticalResize,"column"==i),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)},this),l=[],l=Array.prototype.concat.apply(l,a),c=e.dom.element("div",{style:{width:o._headerWidth+"px",height:o._headerHeight+"px"},className:b.classNames.topCorner}),l.push(c),t.resizeHandlePosition()&&t.resizeHintPosition()&&l.push(this.renderResizeHint()),this.tree.render(l),this.editor.isActive()?this.editor.toggleTooltip(this.activeCellRectangle()):t.selectionInProgress()||t.resizingInProgress()||t.isInEditMode()||this.renderClipboardContents()))},renderResizeHint:function(){var t,n,i=this._sheet,o=i.resizeHandlePosition(),r=o.col!==-(1/0);return t=r?{height:this.scroller.clientHeight+"px",width:h+"px",left:i.resizeHintPosition().x+"px",top:"0px"}:{height:h+"px",width:this.scroller.clientWidth+"px",top:i.resizeHintPosition().y+"px",left:"0px"},n=y.classNames,e.dom.element("div",{className:n.resizeHint+(r?"":" "+n.resizeHintVertical),style:t},[e.dom.element("div",{className:n.resizeHintHandle}),e.dom.element("div",{className:n.resizeHintMarker})])},renderClipboardContents:function(){var e,t,n,i,o,r=this._sheet,s=r._grid,l=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 p,t=s.rangeDimensions(l),t.rows.forEach(function(t){e.addRow(t)}),t.columns.forEach(function(t){e.addColumn(t)}),n=r._getMergedCells(l),i=n.primary,o=n.secondary,r.forEach(l,function(t,n,r){var s,c,u=new d(t,n).print();o[u]||(s=a(e,t-l.topLeft.row,r),c=i[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,n,i){var o=new y(this._sheet,this._sheet._grid.pane({row:e,column:t,rowCount:n,columnCount:i}));return o.refresh(this.scroller.clientWidth,this.scroller.clientHeight),o}}),w={cell:"k-spreadsheet-cell",vaxis:"k-spreadsheet-vaxis",haxis:"k-spreadsheet-haxis",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,n){return this._grid.view(e,t).ref.intersects(n)},render:function(t,n){var i,o,r,s,a,l,c=y.classNames,d=this._sheet,u=this._grid,h=u.view(t,n);return this._currentView=h,this._currentRect=this._rectangle(h.ref),this._selectedHeaders=d.selectedHeaders(),i=[],i.push(this.renderData()),i.push(this.renderSelection()),i.push(this.renderAutoFill()),i.push(this.renderEditorSelection()),i.push(this.renderFilterHeaders()),u.hasRowHeader&&(o=e.dom.element("div",{className:c.rowHeader,style:{width:u.headerWidth+"px",top:h.rowOffset+"px"}}),i.push(o),d.forEach(h.ref.leftColumn(),function(t){if(!d.isHiddenRow(t)){var n=t+1,i=d.rowHeight(t);o.children.push(e.dom.element("div",{className:this.headerClassName(t,"row"),style:{width:u.headerWidth+"px",height:i+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(n+"")])]))}}.bind(this))),u.hasColumnHeader&&(r=e.dom.element("div",{className:c.columnHeader,style:{top:"0px",left:h.columnOffset+"px",width:this._currentRect.width+"px",height:u.headerHeight+"px"}}),i.push(r),s=0,d.forEach(h.ref.topRow(),function(t,n){if(!d.isHiddenColumn(n)){var i=e.spreadsheet.Ref.display(null,1/0,n),o=d.columnWidth(n);r.children.push(e.dom.element("div",{className:this.headerClassName(n,"col"),style:{position:"absolute",left:s+"px",width:o+"px",height:u.headerHeight+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(i+"")])])),s+=o}}.bind(this))),d.resizeHandlePosition()&&(u.hasColumnHeader||u.hasRowHeader)&&(a=d._grid.normalize(d.resizeHandlePosition()),h.ref.intersects(a)&&(d.resizeHintPosition()||i.push(this.renderResizeHandle()))),l=[c.pane],u.hasColumnHeader&&l.push(c.top),u.hasRowHeader&&l.push(c.left),e.dom.element("div",{style:u.style,className:l.join(" ")},i)},headerClassName:function(e,t){var n,i,o,r=this._selectedHeaders;return"row"===t?(n=r.rows[e],i=r.allRows):(n=r.cols[e],i=r.allCols),o=n||(r.all?"full":i?"partial":"none"),o&&(o="k-selection-"+o),o},renderData:function(){var t,n,i,o=this._sheet,r=this._currentView,a=e.dom.element("div",{className:y.classNames.data,style:{position:"relative",left:r.columnOffset+"px",top:r.rowOffset+"px"}}),l=this._currentRect,c=e.spreadsheet.draw.doLayout(o,r.ref,{forScreen:!0}),d=o._showGridLines;return d&&(t=null,c.xCoords.forEach(function(n){n!==t&&(t=n,a.children.push(e.dom.element("div",{className:w.vaxis,style:{left:n+"px",height:l.height+"px",borderColor:o.gridLinesColor()}})))}),t=null,c.yCoords.forEach(function(n){n!==t&&(t=n,a.children.push(e.dom.element("div",{className:w.haxis,style:{top:n+"px",width:l.width+"px",borderColor:o.gridLinesColor()}})))})),n={},i={},c.cells.forEach(function(e){var t=i[e.col]||(i[e.col]={}),o=n[e.row]||(n[e.row]={});s(a.children,e,null,t,o,d)}),a},renderResizeHandle:function(){var t,n=this._sheet,i=n.resizeHandlePosition(),o=this._rectangle(i),r=[y.classNames.resizeHandle];return i.col!==-(1/0)?(t={height:this._grid.headerHeight+"px",width:h+"px",left:o.right-h/2+"px",top:"0px"},r.push(f.horizontalResize)):(t={height:h+"px",width:this._grid.headerWidth+"px",top:o.bottom-h/2+"px",left:"0px"},r.push(f.verticalResize)),e.dom.element("div",{className:r.join(" "),style:t})},filterIconRect:function(t){var n=16,i=3;return new e.spreadsheet.Rectangle(t.right-n-i,t.top+i,n,n)},renderFilterHeaders:function(){function t(t){return e.dom.element("span",{className:r.icon+" "+t})}function n(n,i,o){var r,a={left:i.left+"px",top:i.top+"px"},l=s&&s.columns.some(function(e){return e.index===o}),c=n.filterButton;return l&&(c+=" "+n.filterButtonActive),r=e.dom.element("span",{className:c,style:a},[t(n.iconFilterDefault)])}var i=this._sheet,o=[],r=b.classNames,s=i.filter();return s&&this._addDiv(o,s.ref,r.filterRange),i.forEachFilterHeader(this._currentView.ref,function(e){var t=this._rectangle(e),i=this.filterIconRect(t),s=this._sheet.filterColumn(e),a=n(r,i,s);o.push(a)}.bind(this)),e.dom.element("div",{className:r.filterHeadersWrapper},o)},renderEditorSelection:function(){var t=y.classNames,n=this._sheet,i=[];return n._formulaSelections.forEach(function(n){var o=n.ref;o!==e.spreadsheet.NULLREF&&this._addDiv(i,o,t.selectionHighlight+" "+n.colorClass)}.bind(this)),e.dom.element("div",{className:t.selectionWrapper},i)},renderSelection:function(){var t=y.classNames,n=[],i=[t.activeCell],o=[t.selection],r=this._sheet,s=r.activeCell().toRangeRef(),a=this._activeFormulaColor(),l=r.select();return i=i.concat(a,this._directionClasses(s)),o=o.concat(a),r.singleCellSelection()&&i.push(t.single),1===l.size()&&o.push("k-single-selection"),this._sheet.autoFillPunch()&&o.push("k-dim-auto-fill-handle"),l.forEach(function(t){t!==e.spreadsheet.NULLREF&&this._addDiv(n,t,o.join(" "))}.bind(this)),this._addTable(n,s,i.join(" ")),e.dom.element("div",{className:t.selectionWrapper},n)},renderAutoFill:function(){var t,n,i,o,r,s,a,l=[];if(this._sheet.autoFillInProgress())if(t=this._sheet.autoFillRef(),n=this._sheet.autoFillPunch(),i=this._sheet._autoFillDirection,this._addDiv(l,t,"k-auto-fill"),n)this._addDiv(l,n,"k-auto-fill-punch");else if(void 0!==i){switch(i){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,n){var i,o=this._currentView;return o.ref.intersects(t)&&(i=this._rectangle(t).resize(1,1).toDiv(n),e.push(i)),i},_addTable:function(t,n,i){var o,r,a=this,l=a._sheet,c=a._currentView;c.ref.intersects(n)&&(o=a._rectangle(n),r=a._sheet.activeCellCustomEditor(),l.forEach(n.collapse(),function(n,a,l){if(l.left=o.left,l.top=o.top,l.width=o.width,l.height=o.height,s(t,l,i,null,null,!0),r){var c=e.dom.element("div",{className:"k-button k-spreadsheet-editor-button",style:{left:l.left+l.width+"px",top:l.top+"px",height:l.height+"px"}});r.icon&&c.children.push(e.dom.element("span",{className:"k-icon "+r.icon})),t.push(c)}}))},_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=[],n=y.classNames,i=this._currentView.ref;return e.move(0,-1).intersects(i)||t.push(n.left),e.move(-1,0).intersects(i)||t.push(n.top),e.move(0,1).intersects(i)||t.push(n.right),e.move(1,0).intersects(i)||t.push(n.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:f}),c.extend(!0,y,{classNames:w}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n;e.support.browser.msie&&e.support.browser.version<9||(t={},n=e.spreadsheet.registerEditor=function(e,n){t[e]=n},e.spreadsheet.Sheet.prototype.activeCellCustomEditor=function(){var e,n,i,o=this.activeCell().first();if(this.range(o).enable())return e=this.validation(o),n=this._properties.get("editor",this._grid.cellRefIndex(o)),null!=n?i=t[n]:e&&e.showButton&&(n="_validation_"+e.dataType,i=t[n]),"function"==typeof i&&(i=t[n]=i()),i},n("_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();i.range.format()||i.range.format("yyyy-mm-dd"),i.callback(e.spreadsheet.dateToNumber(t))})),r.setOptions({anchor:i.view.element.find(".k-spreadsheet-editor-button")})}function n(){var n,s,a,l;t(),n=i.range.value(),o.value(null!=n?e.spreadsheet.numberToDate(n):null),s=i.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 n=s.from?0|s.from.value:0,i=s.to?0|s.to.value:0;return t=0|e.spreadsheet.dateToNumber(t),!e.spreadsheet.validation.validationComparers[s.comparerType](t,n,i)},min:a,max:l})):o.setOptions({disableDates:null,min:null,max:null}),r.open()}var i,o,r;return{edit:function(e){i=e,n()},icon:"k-i-calendar"}}),n("_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&&i.callback(e.value)})),r.setOptions({anchor:i.view.element.find(".k-spreadsheet-editor-button")})}function n(){var n,s,a;t(),n=i.validation.from.value,s=[],n&&n.each(function(e){s.push({value:e})}),a=new e.data.DataSource({data:s}),o.setDataSource(a),a.read(),r.open()}var i,o,r;return{edit:function(e){i=e,n()},icon:"k-i-arrow-60-down"}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),
function(e,define){define("spreadsheet/grid.min",["kendo.core.min","spreadsheet/references.min"],e)}(function(){!function(e){var t,n,i,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.CellRef,n=e.spreadsheet.RangeRef,i=e.spreadsheet.UnionRef,o=e.Class.extend({init:function(e,t,n,i){this.left=e,this.width=n,this.right=e+n,this.top=t,this.height=i,this.bottom=t+i},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,n,i,o,r){this.rowCount=n,this.columnCount=i,this._columns=t,this._rows=e,this._headerHeight=o,this._headerWidth=r},isAxis:function(e){var t,n;return e=e.toRangeRef(),t=e.topLeft,n=e.bottomRight,0===t.row&&n.row===this.rowCount-1||0===t.col&&n.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 n(new t(e,0),new t(e,this.columnCount-1))},colRef:function(e){return new n(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 n?new n(this.normalize(e.topLeft),this.normalize(e.bottomRight)).setSheet(e.sheet,e.hasSheet()):e instanceof i?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),n=this.normalize(e.bottomRight);return new o(this.width(0,t.col-1),this.height(0,t.row-1),this.width(t.col,n.col),this.height(t.row,n.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,n){var i,o,r=this.normalize(e.topLeft),s=this.normalize(e.bottomRight);for(i=r.col;i<=s.col;i++)for(o=r.row;o<=s.row;o++)n(new t(o,i))},trim:function(e,i){var o,r,s,a,l,c=e.topLeft,d=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=i.tree.intersecting(r,s),a.length&&(l=this.cellRef(a[a.length-1].end),u=Math.max(u,l.row),h=o);return new n(e.topLeft,new t(Math.min(u,e.bottomRight.row),h))}}),s=e.Class.extend({init:function(e,t,n){this.rows=e,this.columns=t,this._grid=n,this.headerHeight=e.headerSize,this.headerWidth=t.headerSize,this.hasRowHeader=t.hasHeader,this.hasColumnHeader=e.hasHeader},refresh:function(e,t){var n,i;this.columns.viewSize(e),this.rows.viewSize(t),n=this.columns.paneSegment(),i=this.rows.paneSegment(),this.left=n.offset,this.top=i.offset,this.right=n.offset+n.length,this.bottom=i.offset+i.length,this.style={top:i.offset+"px",left:n.offset+"px",height:i.length+"px",width:n.length+"px"}},view:function(e,i){var o=this.rows.visible(i),r=this.columns.visible(e);return{rows:o,columns:r,rowOffset:o.offset,columnOffset:r.offset,mergedCellLeft:r.start,mergedCellTop:o.start,ref:new n(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),n={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},i=this.columns.defaultValue/2,o=this.rows.defaultValue/2;return n.scrollTop=n.top-o,n.scrollBottom=n.bottom+o,n.scrollLeft=n.left-i,n.scrollRight=n.right+i,n}}),e.spreadsheet.Grid=r,e.spreadsheet.PaneGrid=s,e.spreadsheet.Rectangle=o)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/axis.min",["kendo.core.min"],e)}(function(){!function(e){var t,n;e.support.browser.msie&&e.support.browser.version<9||(t=e.Class.extend({init:function(t,n){this._value=n,this._count=t,this.values=new e.spreadsheet.RangeList(0,t-1,n),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 n,i,o,r,s=[],a=this.values.iterator(0,this._count-1);for(n=0;n<this._count;n++)i=a.at(n),i!==this._value&&(o=t[n],void 0===o&&(o=s.length,r={index:n},r[e]=i,s.push(r),t[n]=o));return s},fromJSON:function(e,t){var n,i,o;for(n=0;n<t.length;n++)i=t[n][e],o=t[n].index,void 0===o&&(o=n),this.value(o,o,i)},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,t){var n,i=this._count-1;return e===i?t?e+1:e:(e+=1,n=this._hidden.intersecting(e,e)[0],0!==n.value?n.end===i?e-1:n.end+1: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,t){if(0===e)return t?-1:0;e-=1;var n=this._hidden.intersecting(e,e)[0];return 0!==n.value?0===n.start?e+1:n.start-1: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,n){return void 0===n?this.values.iterator(e,t).at(0):(this.values.value(e,t,n),void this._refresh())},sum:function(e,t){var n,i=this.values.iterator(e,t),o=0;for(n=e;n<=t;n++)o+=i.at(n);return o},visible:function(e,t){var n,i,o,r,s,a,l=null,c=null,d=!1;return t>=this.total+this.scrollBarSize&&(d=!0),n=this._pixelValues.intersecting(e,t),l=n[0],c=n[n.length-1],l?(i=e-l.start,o=(i/l.value.value>>0)+l.value.start,r=i-(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,n=this.values.iterator(0,this._count-1),i=n.at(0);i<e&&t<this._count-1;)i+=n.at(++t);return t},_refresh:function(){var t=0;this._pixelValues=this.values.map(function(n){var i,o=t;return t+=(n.end-n.start+1)*n.value,i=t-1,new e.spreadsheet.ValueRange(o,i,n)}),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()}}),n=e.Class.extend({init:function(e,t,n,i){this._axis=e,this._start=t,this._count=n,this.hasHeader=0===t,this.headerSize=i,this.defaultValue=e._value,this.frozen=n>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)},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,n,i=this.start();return this.frozen?(t=this.size(),this.hasHeader||(t-=this.headerSize)):(t=this._viewSize-i-this.headerSize,i+=e),n=this._axis.visible(i,i+t-1),this.frozen&&(n.offset=0),n.start=i,this.hasHeader&&(n.offset+=this.headerSize,n.start-=this.headerSize),n},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=n)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(t,n){if(t instanceof Date){var i=e.date.today();return i.setFullYear(i.getFullYear()+n),i.getFullYear()===t.getFullYear()}return!1}function i(t,n){if(t instanceof Date){var i=e.date.firstDayOfMonth(e.date.today());return i.setMonth(i.getMonth()+n,1),i.getTime()===e.date.firstDayOfMonth(t).getTime()}return!1}function o(t,n){var i,o;return n instanceof Date&&(i=e.date.dayOfWeek(e.date.getDate(t),1),o=e.date.dayOfWeek(e.date.getDate(n),1),i.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 n,i=t.filter;if(!i)throw Error("Filter type not specified.");if(n=e.spreadsheet[i.charAt(0).toUpperCase()+i.substring(1)+"Filter"],!n)throw Error("Filter type not recognized.");return new n(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 n,i=t.value;return this._dates.length>0&&t.format&&"number"==typeof i&&(n=e.spreadsheet.formatting.type(i,t.format),"date"===n&&(i=e.spreadsheet.numberToDate(i))),i},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 n=e.data.Query.filterExpr({logic:this._logic,filters:this._criteria}).expression;this._matches=Function("d","return "+n)},matches:function(e){return null!==e&&this._matches(e)},value:function(t){var n=t.value,i=this._criteria[0].value,o=i instanceof Date?"date":typeof i,r=typeof n;return t.format&&(r=e.spreadsheet.formatting.type(n,t.format)),r!=o?"string"==o&&(t.format&&(n=e.spreadsheet.formatting.text(n,t.format)),n+=""):"date"==r&&(n=e.spreadsheet.numberToDate(n)),n},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,n=e.map(this.value).sort().filter(function(e,t,n){return 0===t||e!==n[t-1]});n.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=n.length*t/100>>0),this._values=n.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 n,i=t.value;return t.format&&(n=e.spreadsheet.formatting.type(i,t.format),"date"===n&&(i=e.spreadsheet.numberToDate(i))),i},prepare:function(e){var t,n,i=0,o=0;for(t=0;t<e.length;t++)n=this.value(e[t]),"number"==typeof n&&(i+=n,o++);this._average=o>0?i/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 n=e.date.addDays(e.date.today(),1);return e.date.getDate(t).getTime()===n.getTime()}return!1},today:function(t){return t instanceof Date&&e.date.isToday(t)},yesterday:function(t){if(t instanceof Date){var n=e.date.addDays(e.date.today(),-1);return e.date.getDate(t).getTime()===n.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 i(e,1)},thisMonth:function(e){return i(e,0)},lastMonth:function(e){return i(e,-1)},nextQuarter:function(n){var i,o;return n instanceof Date&&(i=e.date.today(),o=t(n)-t(i),1===o&&i.getFullYear()===n.getFullYear()||o==-3&&i.getFullYear()+1===n.getFullYear())},thisQuarter:function(n){var i,o;return n instanceof Date&&(i=e.date.today(),o=t(n)-t(i),0===o&&i.getFullYear()===n.getFullYear())},lastQuarter:function(n){var i,o;return n instanceof Date&&(i=e.date.today(),o=t(i)-t(n),1===o&&i.getFullYear()===n.getFullYear()||o==-3&&i.getFullYear()-1===n.getFullYear())},nextYear:function(e){return n(e,1)},thisYear:function(e){return n(e,0)},lastYear:function(e){return n(e,-1)},yearToDate:function(t){if(t instanceof Date){var n=e.date.today();return t.getFullYear()===n.getFullYear()&&t<=n}return!1},toJSON:function(){return{filter:"dynamic",type:this._type}}}),[1,2,3,4].forEach(function(n){e.spreadsheet.DynamicFilter.prototype["quarter"+n]=function(e){return e instanceof Date&&t(e)===n}}),e.cultures["en-US"].calendar.months.names.forEach(function(t,n){e.spreadsheet.DynamicFilter.prototype[t.toLowerCase()]=function(e){return e instanceof Date&&e.getMonth()===n}})}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n,i,o){var r=t.ascendingComparer;return i===!1&&(r=t.descendingComparer),n.sortedIndices(this._grid.cellRefIndex(e.topLeft),this._grid.cellRefIndex(e.bottomRight),r,o)},sortBy:function(e,t,n,i,o){var r,s,a,l,c=this.indices(e.toColumn(t),n,i,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,n){var i,o;if(null===t&&null===n)return 0;if(null===t)return 1;if(null===n)return-1;if(i=typeof t,o=typeof n,"number"===i)return"number"===o?t-n:-1;if("string"===i)switch(o){case"number":return 1;case"string":return t.localeCompare(n);default:return-1}if("boolean"===i)switch(o){case"number":return 1;case"string":return 1;case"boolean":return t-n;default:return-1}if(t instanceof e.spreadsheet.calc.runtime.CalcError)return n instanceof e.spreadsheet.calc.runtime.CalcError?0:1;throw Error("Cannot compare "+t+" and "+n)},t.descendingComparer=function(e,n){return null===e&&null===n?0:null===e?1:null===n?-1:t.ascendingComparer(n,e)},e.spreadsheet.Sorter=t}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/numformat.min",["spreadsheet/calc.min","kendo.dom.min"],e)}(function(){"use strict";function e(e){function t(){var t=e.skip(d);if(t)return t[1].toLowerCase()}function n(){var t,n=e.skip(u);if(n&&(t=parseFloat(n[2]),!isNaN(t)))return{op:n[1],value:t}}function i(){for(var t,n=[],i=null;!e.eof()&&(t=r());)"date"==t.type?i&&/^(el)?time$/.test(i.type)&&"h"==i.part&&"m"==t.part&&t.format<3&&(t.type="time"):/^(el)?time$/.test(t.type)&&"s"==t.part&&i&&"date"==i.type&&"m"==i.part&&i.format<3&&(i.type="time"),/^(?:str|space|fill)$/.test(t.type)||(i=t),n.push(t);return n}function o(t){if("date"!=t.type||"m"==t.part&&t.format<3){var n=e.skip(/^\.(0+)/);n&&(t.fraction=n[1].length,"date"==t.type&&(t.type="time"))}return t}function r(){var t,n;if(n=e.skip(/^([#0?]+)(?:,([#0?]+))+/))return{type:"digit",sep:!0,format:n[1]+n[2],decimal:h};if(n=e.skip(/^[#0?]+/))return{type:"digit",sep:!1,format:n[0],decimal:h};if(n=e.skip(/^(e)([+-])/i))return{type:"exp",ch:n[1],sign:n[2]};if(n=e.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i))return n=n[1].toLowerCase(),o({type:"date",part:n.charAt(0),format:n.length});if(n=e.skip(/^(hh?|ss?)/i))return n=n[1].toLowerCase(),o({type:"time",part:n.charAt(0),format:n.length});if(n=e.skip(/^\[(hh?|mm?|ss?)\]/i))return n=n[1].toLowerCase(),o({type:"eltime",part:n.charAt(0),format:n.length});if(n=e.skip(/^(am\/pm|a\/p)/i))return n=n[1].split("/"),{type:"ampm",am:n[0],pm:n[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=n();return!e&&o&&(e=t()),{color:e,cond:o,body:i()}}var a,c,h,f;for(e=l.InputStream(e),a=[],c=!1;!e.eof();)f=s(),a.push(f),f.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(i).join("")}function n(e,t){return t.fraction&&(e+="."+s("",t.fraction,"0")),e}function i(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?n(s("",e.format,e.part),e):"eltime"==e.type?n("["+s("",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 n(e,t){e.forEach(function(e){var n,i,o,r,a,l=t;if("text"!=e.cond){for(n=e.body,i=!1,o=n.length;0!==l&&--o>=0;)if(r=n[o],"digit"==r.type){if(r.decimal&&(i=!0,l>0?r.format+=s("",l,"0"):l<0&&(a=r.format.length,r.format=r.format.substr(0,a+l),l+=a-r.format.length),0===r.format.length))for(n.splice(o,1);--o>=0;){if(r=n[o],"digit"==r.type&&r.decimal){++o;break}if("dec"==r.type){n.splice(o,1);break}}if(l>0)break}!i&&l>0&&n.splice(o+1,0,{type:"dec"},{type:"digit",sep:!1,decimal:!0,format:s("",l,"0")})}})}function i(e){var t=0;return{next:function(){return e[t++]},eof:function(){return t>=e.length},ahead:function(n,i){if(t+n<=e.length){var o=i.apply(null,e.slice(t,t+n));return o&&(t+=n),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,d++)}var n,o,r=i(e.body),s=!1,a=!1,l=!1,c=0,d=0,u="",h=!1,f=0,p=[],m=[],g=e.cond,v="";for("text"==g?v="if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { ":"num"==g?v="if (typeof value == 'number') { ":g&&(n="="==g.op?"==":g.op,v="if (typeof value == 'number' && value "+n+" "+g.value+") { ",u+="value = Math.abs(value); "),e.color&&(u+="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,m.push(o.format)):(p.push(o.format),o.sep&&(h=!0)):"time"==o.type?a=!0:"date"==o.type?s=!0:"ampm"==o.type&&(l=a=!0);for(c>0&&(u+="value *= "+Math.pow(100,c)+"; "),d>0&&(u+="value /= "+Math.pow(1e3,d)+"; "),p.length&&(u+="var intPart = runtime.formatInt(culture, value, "+JSON.stringify(p)+", "+f+", "+h+"); "),m.length&&(u+="var decPart = runtime.formatDec(value, "+JSON.stringify(m)+", "+f+"); "),(p.length||m.length)&&(u+="type = 'number'; "),s&&(u+="var date = runtime.unpackDate(value); "),a&&(u+="var time = runtime.unpackTime(value); "),(s||a)&&(u+="type = 'date'; "),(c>0||d>0||p.length||m.length||s||a)&&(v||(v="if (typeof value == 'number') { ")),r.restart();!r.eof();)o=r.next(),"dec"==o.type?u+="output += culture.numberFormat['.']; ":"comma"!=o.type||o.hidden?"percent"==o.type?(u+="type = 'percent'; ",u+="output += culture.numberFormat.percent.symbol; "):"str"==o.type?u+="output += "+JSON.stringify(o.value)+"; ":"text"==o.type?(u+="type = 'text'; ",u+="output += value; "):"space"==o.type?(u+="if (output) result.body.push(output); ",u+="output = ''; ",u+="result.body.push({ type: 'space', value: "+JSON.stringify(o.value)+" }); "):"fill"==o.type?u+="output += runtime.fill("+JSON.stringify(o.value)+"); ":"digit"==o.type?u+="output += "+(o.decimal?"decPart":"intPart")+".shift(); ":"date"==o.type?u+="output += runtime.date(culture, date, "+JSON.stringify(o.part)+", "+o.format+"); ":"time"==o.type?u+="output += runtime.time(time, "+JSON.stringify(o.part)+", "+o.format+", "+l+", "+o.fraction+"); ":"eltime"==o.type?u+="output += runtime.eltime(value, "+JSON.stringify(o.part)+", "+o.format+", "+o.fraction+"); ":"ampm"==o.type&&(u+="output += time.hours < 12 ? "+JSON.stringify(o.am)+" : "+JSON.stringify(o.pm)+"; "):u+="output += ','; ";return u+="if (output) result.body.push(output); ",u+="result.type = type; ",u+="return result; ",v&&(u=v+u+"}"),u}function r(t){var n,i,r=h[t];return r||(n=e(t),i=n.map(o),i.push(f),i=i.join("\n"),i="'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; "+i+"; return result; };",r=h[t]=Function("runtime",i)(p)),r}function s(e,t,n){for(e+="";e.length<t;)e=n+e;return e}function a(e){var t,n,i=e.body,o="";for(t=0;t<i.length;++t)n=i[t],"string"==typeof n?o+=n:"space"==n.type&&(o+=" ");return o}var l,c,d,u,h,f,p;kendo.support.browser.msie&&kendo.support.browser.version<9||(l=kendo.spreadsheet.calc,c=kendo.dom,d=/^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i,u=/^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/,h=Object.create(null),f=o({cond:"text",body:[{type:"text"}]}),p={unpackDate:l.runtime.unpackDate,unpackTime:l.runtime.unpackTime,date:function(e,t,n,i){switch(n){case"d":switch(i){case 1:return t.date;case 2:return s(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(i){case 1:return t.month+1;case 2:return s(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(i){case 2:return t.year%100;case 4:return t.year}}return"##"},time:function(e,t,n,i,o){var r,a;switch(t){case"h":r=s(i?e.hours%12||12:e.hours,n,"0"),o&&(a=(e.minutes+(e.seconds+e.milliseconds/1e3)/60)/60);break;case"m":r=s(e.minutes,n,"0"),o&&(a=(e.seconds+e.milliseconds/1e3)/60);break;case"s":r=s(e.seconds,n,"0"),o&&(a=e.milliseconds/1e3)}return a&&(r+=a.toFixed(o).replace(/^0+/,"")),r},eltime:function(e,t,n,i){var o,r;switch(t){case"h":o=24*e;break;case"m":o=24*e*60;break;case"s":o=24*e*60*60}return i&&(r=o-(0|o)),o=s(0|o,n,"0"),r&&(o+=r.toFixed(i).replace(/^0+/,"")),o},fill:function(e){return e},formatInt:function(e,t,n,i,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,f;for(t=t.toFixed(i).replace(/\..*$/,""),i>0&&("0"===t?t="":"-0"===t&&(t="-")),s=t.length-1,a=[],l=0,d=n.length;--d>=0;){for(u=n[d],c="",h=u.length;--h>=0;)f=u.charAt(h),s<0?"0"==f?r("0"):"?"==f&&r(" "):r(t.charAt(s--));if(0===d)for(;s>=0;)r(t.charAt(s--));a.unshift(c)}return a},formatDec:function(e,t,n){var i,o,r,s,a,l,c,d;for(e=e.toFixed(n),i=e.indexOf("."),e=i>=0?e.substr(i+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}},kendo.spreadsheet.formatting={compile:r,parse:e,format:function(e,t,n){var i,o,s,a=r(t)(e,n),l=c.element("span");for(l.__dataType=a.type,i=a.body,a.color&&(l.attr.style={color:a.color}),o=0;o<i.length;++o)s=i[o],"string"==typeof s?l.children.push(c.text(s)):"space"==s.type&&l.children.push(c.element("span",{style:{visibility:"hidden"}},[c.text(s.value)]));return l},text:function(e,t,n){var i=r(t)(e,n);return a(i)},textAndColor:function(e,t,n){var i=r(t)(e,n);return{text:a(i),color:i.color,type:i.type}},type:function(e,t){return r(t)(e).type},adjustDecimals:function(i,o){var r=e(i);return n(r,o),t(r)}})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(n){return t(n)/e(n)}function i(e,t){for(;t;){var n=e%t;e=t,t=n}return e}function o(e,t){return Math.abs(e*t)/i(e,t)}function r(e,t){for(var n,i,o,r=[],s=0,a=e[0];s<e.length;)r.push({matrix:e[s++],pred:G(e[s++])});for(n=0;n<a.height;++n)e:for(i=0;i<a.width;++i){for(s=0;s<r.length;++s)if(o=r[s].matrix.get(n,i),!r[s].pred(null==o||""===o?0:o))continue e;t(n,i)}}function s(e){return e.reduce(function(e,t){return e+t},0)/e.length}function a(e,t,n){return null==n&&(n=s(e)),e.reduce(function(e,t){return e+Math.pow(t-n,2)},0)/t}function l(e,t){return Math.sqrt(a(e,t))}function c(e,t,n){var i=0,o=0,r=null,s=null,a=!1;return e.forEach(function(e){e<t?(i++,r=null==r?e:Math.max(r,e)):e>t?(o++,s=null==s?e:Math.min(s,e)):a=!0}),i||o?a?n?(i+1)/(e.length+1):i/(i+o):((s-t)*c(e,r,n)+(t-r)*c(e,s,n))/(s-r):new A("N/A")}function d(e,t,n){var i,o=0,r=s(e),a=s(t),l=e.length;for(i=0;i<l;++i)o+=(e[i]-r)*(t[i]-a);return o/n}function u(e,t){var n,i,o;return e.sort(w),n=e.length,i=0|t,o=t-i,0===i?e[0]:i>=n?e[n-1]:(--i,e[i]+o*(e[i+1]-e[i]))}function h(e,t){var n=t*(e.length-1)+1;return u(e,n)}function f(e,t){var n=t*(e.length+1);return u(e,n)}function p(e,t,n){var i=[],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(!(n&o&&e.hidden)){if(e.formula){if(t=e.formula.print(e.row,e.col),/^\s*(?:aggregate|subtotal)\s*\(/i.test(t)&&!(n&s))return;"value"in e.formula&&(a=e.formula.value)}n&r&&a instanceof A||("number"==typeof a||a instanceof A)&&i.push(a)}});else if(Array.isArray(t))for(var l=0;l<t.length;++l)a(t[l]);else t instanceof I?t.each(a):"number"==typeof t?i.push(t):t instanceof A&&!(n&r)&&i.push(t)}(t),i}function m(e,t,n,i){var o,r;if(i){for(o=0,r=0;r<=e;++r)o+=W(t,r)*Math.pow(n,r)*Math.pow(1-n,t-r);return o}return W(t,e)*Math.pow(n,e)*Math.pow(1-n,t-e)}function g(e){var t=B(P(e,0,1));return 4==t.day||3==t.day&&S.isLeapYear(e)?53:52}function v(e,t,n){var i=B(e),o=B(t);return n?(31==i.date&&(i.date=30),31==o.date&&(o.date=30)):(1==i.month&&1==o.month&&i.date==z(i.year,1)&&o.date==z(o.year,1)&&(o.date=30),i.date==z(i.year,i.month)?(i.date=30,31==o.date&&(o.date=30)):30==i.date&&31==o.date&&(o.date=30)),360*(o.year-i.year)+30*(o.month-i.month)+(o.date-i.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,M,R,I,F,z,P,B,L,H,N,O,V,U,W,j,q,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,M=x.CellRef,R=x.UnionRef,I=S.Matrix,F=x.Ref,z=S.daysInMonth,P=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",n).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/n(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,n){return t&&e?(e<0&&(!n&&t<0||n&&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,n){return t&&e?(e<0&&(!n&&t<0||n&&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 n=e<0?-1:1;return n<0&&(e=-e),t=Math.pow(10,t),e*=t,e=Math.round(e),n*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,n=e[0];for(t=1;t<e.length;++t)n=i(n,e[t]);return n}).args([["numbers",["collect","number"]]]),T("lcm",function(e){var t,n=e[0];for(t=1;t<e.length;++t)n=o(n,e[t]);return n}).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 n=0;return e.each(function(e,i,o){var r,s;if("number"==typeof e){for(r=0;r<t.length;++r){if(s=t[r].get(i,o),"number"!=typeof s)return;e*=s}n+=e}}),n}).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 n=0;return e.each(function(e,i,o){var r=t.get(i,o);"number"==typeof e&&"number"==typeof r&&(n+=e*e-r*r)}),n}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),T("sumx2py2",function(e,t){var n=0;return e.each(function(e,i,o){var r=t.get(i,o);"number"==typeof e&&"number"==typeof r&&(n+=e*e+r*r)}),n}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),T("sumxmy2",function(e,t){var n=0;return e.each(function(e,i,o){var r=t.get(i,o);"number"==typeof e&&"number"==typeof r&&(n+=(e-r)*(e-r))}),n}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),T("seriessum",function(e,t,n,i){var o=0;return i.each(function(i){if("number"!=typeof i)throw new A("VALUE");o+=i*Math.pow(e,t),t+=n}),o}).args([["x","number"],["y","number"],["m","number"],["a","matrix"]]),T("min",function(e){return Math.min.apply(Math,e)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),T("max",function(e){return Math.max.apply(Math,e)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),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,n=[];return e.forEach(function(e){n.indexOf(e)<0&&(t++,n.push(e))}),t}).args([["values",["#collect","anyvalue"]]]),T("countblank",function(e){function t(e){null!=e&&""!==e||i++}function n(e){var n,i;for(n=0;n<e.length;++n)i=e[n],i instanceof I?i.each(t,!0):t(i)}var i=0;return n(e),i}).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,n){var i=0;return n.unshift(e,t),r(n,function(){i++}),i}).args(H),N=[["range","matrix"]].concat(H),T("sumifs",function(e,t,n,i){i.unshift(e,b,t,n);var o=0;return r(i,function(t,n){var i=e.get(t,n);i&&(o+=i)}),o}).args(N),T("averageifs",function(e,t,n,i){i.unshift(e,b,t,n);var o=0,s=0;return r(i,function(t,n){var i=e.get(t,n);null!=i&&""!==i||(i=0),o+=i,s++}),s?o/s:new A("DIV/0")}).args(N),T("countif",function(e,t){t=G(t);var n=0;return e.each(function(e){t(e)&&n++}),n}).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,n){var i=0;return t=G(t),e.each(function(e,o,r){if(t(e)){var s=n.get(o,r);b(s)&&(i+=s||0)}}),i}).args(O),T("averageif",function(e,t,n){var i=0,o=0;return t=G(t),e.each(function(e,r,s){if(t(e)){var a=n.get(r,s);b(a)&&(i+=a||0,o++)}}),o?i/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,n){var i=[],o=e.each(function(e){return e instanceof A?e:void("number"==typeof e&&i.push(e))});return o?o:n>i.length?new A("NUM"):t(i,n-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>>2])/2}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),T("mode.sngl",function(e){var t,n,i,o,r,s;for(e.sort(w),t=null,n=0,i=1,o=null,r=0;r<e.length;++r)s=e[r],s!=t?(n=1,t=s):n++,n>i&&(i=n,o=s);return null==o?new A("N/A"):o}).args([["numbers",["collect","number"]]]),T("mode.mult",function(e){var t,n=Object.create(null),i=2,o=[];return e.forEach(function(e){var t=n[e]||0;n[e]=++t,t==i?o.push(e):t>i&&(i=t,o=[e])}),t=new I(this),o.forEach(function(e,n){t.set(n,0,e)}),t}).args([["numbers",["collect","number"]]]),T("geomean",function(e){var t=e.length,n=e.reduce(function(e,t){if(t<0)throw new A("NUM");return e*t},1);return Math.pow(n,1/t)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),T("harmean",function(e){var t=e.length,n=e.reduce(function(e,t){if(!t)throw new A("DIV/0");return e+1/t},0);return t/n}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),T("trimmean",function(e,t){var n,i,o,r=e.length;for(e.sort(w),n=Math.floor(r*t),n%2&&--n,n/=2,i=0,o=n;o<r-n;++o)i+=e[o];return i/(r-2*n)}).args([["numbers",["collect","number",1]],["percent",["and","number",["[between)",0,1]]],["?",["assert","$numbers.length > 0","NUM"]]]),T("frequency",function(e,t){function n(t){for(var n=0;o<e.length&&e[o]>i&&e[o]<=t;)++n,++o;return n}var i,o,r;return e.sort(w),t.sort(w),i=-(1/0),o=0,r=new I(this),t.forEach(function(e,t){var o=n(e);i=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,n){t.sort(n?w:y);var i=t.indexOf(e);return i<0?new A("N/A"):i+1}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),D("rank","rank.eq"),T("rank.avg",function(e,t,n){var i,o;if(t.sort(n?w:y),i=t.indexOf(e),i<0)return new A("N/A");for(o=i;t[o]==e;++o);return(i+o+1)/2}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),T("kurt",function(e){var t=e.length,n=s(e),i=a(e,t-1,n),o=Math.sqrt(i),r=e.reduce(function(e,t){return e+Math.pow((t-n)/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,n){var i=c(e,t,0);return i=i.toFixed(n+1),parseFloat(i.substr(0,i.length-1))}).args(V),T("percentrank.exc",function(e,t,n){var i=c(e,t,1);return i=i.toFixed(n+1),parseFloat(i.substr(0,i.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"),U=k.memoize(function(e){for(var t=2,n=1;t<=e;++t)n*=t;return n}),T("fact",U).args([["*n","integer+"]]),T("factdouble",function(e){for(var t=2+(1&e),n=1;t<=e;t+=2)n*=t;return n}).args([["*n","integer+"]]),T("multinomial",function(e){var t=1,n=0;return e.forEach(function(e){if(e<0)throw new A("NUM");n+=e,t*=U(e)}),U(n)/t}).args([["numbers",["collect","number"]]]),W=k.memoize(function(e,t){for(var n=t+1,i=1,o=1,r=1;i<=e-t;++n,++i)o*=n,r*=i;return o/r}),T("combin",W).args([["*n","integer++"],["*k",["and","integer",["[between]",0,"$n"]]]]),T("combina",function(e,t){return W(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",["and","number",["not","boolean"]]]],["?",["assert","$numbers.length > 0","DIV/0"]]]),T("averagea",function(e){var t=0,n=0;return e.forEach(function(e){"string"!=typeof e&&(t+=e),++n}),n?t/n: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",f).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 f(e,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),D("quartile","quartile.inc"),D("percentile","percentile.inc"),j=["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,n,i){var o=this;o.resolveCells(i,function(){var r,s;if(t>12){if(r=p(o,i[0],n),s=i[1],s instanceof M&&(s=o.getRefData(s)),"number"!=typeof s)return e(new A("VALUE"))}else r=p(o,i,n);o.func(j[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 n,i,o=this,r=t>100;for(r&&(t-=100),n=[],i=2;i<arguments.length;++i)n.push(arguments[i]);o.resolveCells(n,function(){var i=p(o,n,r?1:0);o.func(j[t-1],e,i)})}).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,n){return e+Math.abs(n-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,n){for(var i=0;i<=e;++i)if(m(i,e,t,!0)>=n)return i;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,n,i){var o,r=0;for(o=n;o<=i;++o)r+=W(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,n,i){if(i){for(var o=0;e>=0;)o+=W(e+t-1,e)*Math.pow(n,t)*Math.pow(1-n,e),e--;return o}return W(e+t-1,e)*Math.pow(n,t)*Math.pow(1-n,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,n,i,o){var r=new M(e-1,t-1,n-1);return o&&r.setSheet(o,!0),i?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 n(e){e instanceof M||e instanceof E?t++:e instanceof R&&e.refs.forEach(n)}(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 M?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,n,i){var o=null;return t.eachCol(function(n){var r=t.get(0,n);if(i){if(r>e)return!0;o=n}else if(r===e)return o=n,!0}),null==o?new A("N/A"):t.get(n-1,o)}).args([["value","anyvalue"],["range","matrix"],["row","integer++"],["approx",["or","logical",["null",!0]]]]),T("index",function(e,t,n,i,o){var r,s,a,l=this;if(t instanceof R&&(t=t.refs[o-1]),!n&&!i||!t)return e(new A("N/A"));if(t instanceof M&&(t=t.toRangeRef()),t instanceof E){if(n&&i)return i>t.width()||n>t.height()?e(new A("REF")):(r=t.toCell(n-1,i-1),void l.resolveCells([r],function(){e(l.getRefData(r))}));if(!n)return s=t.toColumn(i-1),void l.resolveCells([s],function(){e(l.asMatrix(s))});if(!i)return a=t.toRow(n-1),void l.resolveCells([a],function(){e(l.asMatrix(a))})}else if(t instanceof I){if(t.width>1&&t.height>1){if(n&&i)return e(t.get(n-1,i-1));if(!n)return e(t.mapRow(function(e){return t.get(e,i-1)}));if(!i)return e(t.mapCol(function(e){return t.get(n-1,e)}))}if(1==t.width)return e(t.get(n-1,0));if(1==t.height)return e(t.get(0,i-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,n;try{if(t=this.formula,n=C.parseFormula(t.sheet,t.row,t.col,e),!(n.ast instanceof F))throw 1;return n.ast.absolute(t.row,t.col)}catch(i){return new A("REF")}}).args([["thing","string"]]),T("match",function(e,t,n){var i,o=1;return 0===n?i=G(e):n===-1?i=G("<="+e):1===n&&(i=G(">="+e)),t.each(function(t){return null!=t&&i(t)?(0!==n&&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,n,i,o){var r=(e instanceof M?e:e.topLeft).clone();return r.row+=t,r.col+=n,r.row<0||r.col<0?new A("VALUE"):i>1||o>1?new E(r,new M(r.row+i-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 M?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,n,i){var o=null;return"number"!=typeof e&&(i=!1),"string"==typeof e&&(e=e.toLowerCase()),t.eachRow(function(n){var r=t.get(n,0);if(i){if(r>e)return!0;o=n}else if("string"==typeof r&&(r=r.toLowerCase()),r===e)return o=n,!0}),null==o?new A("N/A"):t.get(o,n-1)}).args([["value","anyvalue"],["range","matrix"],["col","integer++"],["approx",["or","logical",["null",!0]]]]),T("date",function(e,t,n){return P(e,t-1,n)}).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 n,i=P(B(e).year,0,1),o=B(i);return 21==t?(n=3-(o.day+6)%7,n<0&&(n+=7),i+=n,o.date+=n,o.day=4,t=1):t=1==t?0:2==t?1:(t-10)%7,n=o.day-t,n<0&&(n+=7),i-=n,Math.ceil((e+1-i)/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),n=t.day||7,i=Math.floor((t.ord-n+10)/7);return i<1?g(t.year-1):53==i&&i>g(t.year)?1:i}).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,n){return S.packTime(e,t,n,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 n=B(e),i=n.month+t,o=n.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),n=Math.min(n.date,z(o,i)),P(o,i,n)}).args([["*start_date","date"],["*months","integer"]]),T("eomonth",function(e,t){var n=B(e),i=n.month+t,o=n.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),n=z(o,i),P(o,i,n)}).args([["*start_date","date"],["*months","integer"]]),T("workday",function(e,t,n){var i,o=t>0?1:-1;for(t=Math.abs(t),i=B(e).day;t>0;)e+=o,i=(i+o)%7,i>0&&i<6&&n.indexOf(e)<0&&--t;return e}).args([["start_date","date"],["days","integer"],["holidays",["collect","date"]]]),T("networkdays",function(e,t,n){var i,o,r;for(e>t&&(i=e,e=t,t=i),o=0,r=B(e).day;e<=t;)r>0&&r<6&&n.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,n){switch(n){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,n,i,o,r=e.toLowerCase().match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);return r?(t=parseFloat(r[1]),n=parseFloat(r[2]),i=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,n,i,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 I(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,n){for(var i=e.toString(t).toUpperCase();i.length<n;)i="0"+i;return i}).args([["*number","integer"],["*radix",["and","integer",["[between]",2,36]]],["*minLen",["or","integer+",["null",0]]]]),T("decimal",function(e,t){var n,i,o;for(e=e.toUpperCase(),n=0,i=0;i<e.length;++i){if(o=e.charCodeAt(i),o>=48&&o<=57)o-=48;else{if(!(o>=65&&o<55+t))return new A("VALUE");o-=55}n=n*t+o}return n}).args([["*text","string"],["*radix",["and","integer",["[between]",2,36]]]]),T("char",function(e){return String.fromCharCode(e)}).args([["*code","integer+"]]),q=/[\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(q,"")}).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,n="";for(t=0;t<e.length;++t)n+=e[t];return n}).args([["+",["*text","string"]]]),T("dollar",function(e,t){for(var n="$#,##0.DECIMALS;($#,##0.DECIMALS)",i="";t-- >0;)i+="0";return n=n.replace(/DECIMALS/g,i),x.formatting.text(e,n)}).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,n){var i=t.indexOf(e,n-1);return i<0?new A("VALUE"):i+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),T("fixed",function(e,t,n){for(var i=n?"0.DECIMALS":"#,##0.DECIMALS",o="";t-- >0;)o+="0";return i=i.replace(/DECIMALS/g,o),x.formatting.text(e,i)}).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,n){return e.substr(t-1,n)}).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,n,i){return e.substr(0,--t)+i+e.substr(t+n)}).args([["*text","string"],["*start","integer++"],["*length","integer+"],["*newText","string"]]),T("rept",function(e,t){for(var n="";t-- >0;)n+=e;return n}).args([["*text","string"],["*number","integer+"]]),T("search",function(e,t,n){var i=t.toLowerCase().indexOf(e.toLowerCase(),n-1);return i<0?new A("VALUE"):i+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),T("substitute",function(e,t,n,i){function o(){e=e.substring(0,r)+n+e.substring(r+t.length)}if(t===n)return e;for(var r=-1;(r=e.indexOf(t,r+1))>=0;)if(null==i)o();else if(0===--i){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 n=parseFloat(t);isNaN(n)||n!=t||(t=n)}return function(n){var i=t;return"string"==typeof n&&"string"==typeof i&&(n=n.toLowerCase(),i=i.toLowerCase()),e(n,i)}}function t(e){var t,n;return"string"==typeof e&&(e=e.toLowerCase()),/^[0-9.]+%$/.test(e)?(n=e.substr(0,e.length-1),t=parseFloat(n),isNaN(t)||t!=n||(e=t/100)):/^[0-9.]+$/.test(e)&&(t=parseFloat(e),isNaN(t)||t!=e||(e=t)),e}function n(e,n){return t(e)<t(n)}function i(e,n){return t(e)<=t(n)}function o(e,n){return t(e)>t(n)}function r(e,n){return t(e)>=t(n)}function s(e,t){return!a(e,t)}function a(e,n){return n instanceof RegExp?n.test(e):("string"!=typeof e&&"string"!=typeof n||(e+="",n+=""),t(e)==t(n))}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(i,c[1]):(c=/^<(.*)$/.exec(t))?e(n,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,n){(n||t)()}),function(e,define){define("spreadsheet/runtime.functions.2.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e){var n,i,o,r;if(ct(e)>=3.3)return 1-t(e);for(n=e>0?1:-1,n==-1&&(e=-e),i=0,o=1,r=1;r<100;r++)i+=o,o*=2*e*e/(2*r+1);return 2*n/Math.sqrt(Math.PI)*e*Math.exp(-e*e)*i}function t(t){var n,i,o;if(ct(t)<3.3)return 1-e(t);for(n=1,t<0&&(n=-1,t=-t),i=t,o=8;o>=1;o-=.5)i=t+o/i;return i=1/(t+i),1==n?Math.exp(-t*t)/Math.sqrt(Math.PI)*i:2-Math.exp(-t*t)/Math.sqrt(Math.PI)*i}function n(e){var t,n=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],i=e,o=e+5.5,r=n[0];for(o-=(e+.5)*Math.log(o),t=1;t<=6;t++)i+=1,r+=n[t]/i;return-o+Math.log(Math.sqrt(2*Math.PI)*r/e)}function i(e){if(e>0)return Math.exp(n(e));var t=Math.PI,o=-e;return-t/(o*i(o)*Math.sin(t*o))}function o(e,t){return n(e)+n(t)-n(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 i,o=1/e,r=o,s=e,a=n(e);for(i=1;i<=st&&(s++,r*=t/s,o+=r,!(ct(r)<ct(o)*at));i++);return o*Math.exp(-t+e*Math.log(t)-a)}function l(e,t){var i,o,r=lt,s=r,a=0,l=1,c=t+1-e,d=n(e);for(i=1;i<=st&&(a=c+l*a,ct(a)<lt&&(a=lt),s=c+l/s,ct(s)<lt&&(s=lt),a=1/a,o=s*a,r*=o,!(ct(o-1)<at));i++)c+=2,l=-i*(i-e);return r*Math.exp(-t-d+e*Math.log(t))}function c(e,t,n,o){return o?s(t,e/n):Math.pow(e/n,t-1)*Math.exp(-e/n)/(n*i(t))}function d(e,t,n){var i,o,r,s,a,l;if(0===e)return 0;if(1==e)return 1/0;for(i=0,o=10,r=0,s=t*n,s>1&&(o*=s),a=0;a<st&&(r=.5*(i+o),l=c(r,t,n,!0),!(ct(e-l)<1e-16));a++)l>e?o=r:i=r;return r}function u(t,n){return n?.5+.5*e(t/Math.sqrt(2)):Math.exp(-t*t/2)/Math.sqrt(2*Math.PI)}function h(e){var t,n,i=[-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,n=t*t,(((((i[0]*n+i[1])*n+i[2])*n+i[3])*n+i[4])*n+i[5])*t/(((((o[0]*n+o[1])*n+o[2])*n+o[3])*n+o[4])*n+1))}function f(e,t,n,i){return i?u((e-t)/n,!0):Math.exp(-(e-t)*(e-t)/(2*n*n))/(n*Math.sqrt(2*Math.PI))}function p(e,t,n){return t+n*h(e)}function m(e,t,n){return Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-o(t,n))}function g(e,t,n){var i=Math.exp(t*Math.log(e)+n*Math.log(1-e)-o(t,n));return e<(t+1)/(t+n+2)?i*v(t,n,e)/t:1-i*v(n,t,1-e)/n}function v(e,t,n){var i,o,r,s,a,l=e+t,c=e+1,d=e-1,u=1,h=1-l*n/c;for(ct(h)<lt&&(h=lt),h=1/h,a=h,i=1;i<=st&&(o=2*i,r=i*(t-i)*n/((d+o)*(e+o)),h=1+r*h,ct(h)<lt&&(h=lt),u=1+r/u,ct(u)<lt&&(u=lt),h=1/h,a*=h*u,r=-(e+i)*(l+i)*n/((e+o)*(c+o)),h=1+r*h,ct(h)<lt&&(h=lt),u=1+r/u,ct(u)<lt&&(u=lt),h=1/h,s=h*u,a*=s,!(ct(s-1)<at));i++);return a}function _(e,t,n){var i,o,r=0,s=1,a=0;for(i=0;i<st&&(a=.5*(r+s),o=g(a,t,n),!(ct(e-o)<at));i++)o>e?s=a:r=a;return a}function b(e,t,n,i,o){return g((e-i)/(o-i),t,n)}function w(e,t,n,i,o,r){return i?g((e-o)/(r-o),t,n):m((e-o)/(r-o),t,n)/(r-o)}function y(e,t,n,i,o){return i+(o-i)*_(e,t,n)}function k(e,t,n){return c(e,t/2,2,n)}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 n,i,o,r,s,a=e.length,l=e[0].length,c=0;for(n=0;n<a;n++)for(i=0;i<l;i++)o=t[n][i],r=e[n][i]-o,r*=r,c+=r/o;return s=(a-1)*(l-1),x(c,s)}function D(e,t,n){return n?1-Math.exp(-t*e):t*Math.exp(-t*e)}function A(e,t,n){var i,o;if(n)return 1-k(2*t,2*(e+1),!0);for(i=0,o=2;o<=e;o++)i+=Math.log(o);return Math.exp(e*Math.log(t)-t-i)}function E(e,t,n,i){if(i)return g(t*e/(n+t*e),t/2,n/2);var o=t/n;return t/=2,n/=2,o/r(t,n)*Math.pow(o*e,t-1)/Math.pow(1+o*e,t+n)}function M(e,t,n){return 1-E(e,t,n,!0)}function R(e,t,n){return n/t*(1/y(e,n/2,t/2,0,1)-1)}function I(e,t,n){return n/t*(1/y(1-e,n/2,t/2,0,1)-1)}function F(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=e[t];return n/i}function z(e,t){var n,i,o=0,r=e.length;for(n=0;n<r;n++)i=e[n]-t,o+=i*i;return o/(r-1)}function P(e,t){var n=e.length-1,i=t.length-1,o=z(e,F(e)),r=z(t,F(t));if(!o||!r)throw new Je("DIV/0");return 2*E(o/r,n,i,!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,n){return n?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 n=_(2*Math.min(e,1-e),t/2,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}function U(e,t){return V(1-e/2,t)}function W(e,t,n,i){var o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b,w=e.length,y=t.length;if(1==i){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==n?N(o,w-1):O(o,w-1)}return u=F(e),h=F(t),f=z(e,u),p=z(t,h),3==i?(m=f/w,g=p/y,v=m+g,_=m/v,b=g/v,r=1/(_*_/(w-1)+b*b/(y-1)),o=ct(u-h)/Math.sqrt(v),1==n?N(o,r):O(o,r)):(r=w+y-2,o=ct(u-h)*Math.sqrt(r*w*y/((w+y)*((w-1)*f+(y-1)*p))),1==n?N(o,r):O(o,r))}function j(e,t,n){return-V(e/2,n-1)*t/Math.sqrt(n)}function q(e,t,n){return-h(e/2)*t/Math.sqrt(n)}function G(e){return u(e,!0)-.5}function $(e){return u(e)}function Y(t,n,i,o){if(o)return.5+.5*e((Math.log(t)-n)/(i*Math.sqrt(2)));var r=Math.log(t)-n;return Math.exp(-r*r/(2*i*i))/(t*i*Math.sqrt(2*Math.PI))}function K(e,t,n){return Math.exp(p(e,t,n))}function Q(e,t,n,i){var o,r,s,a=e.length,l=0;for(o=0;o<a;o++){if(t[o]<=0||t[o]>1)throw new Je("NUM");l+=t[o]}if(1!=l)throw new Je("NUM");for(r=0,o=0;o<a;o++)s=e[o],s>=n&&s<=i&&(r+=t[o]);return r}function X(e,t){var n,i,o,r=F(t),s=F(e),a=0,l=0;for(n=0,i=e.length;n<i;n++)o=t[n]-r,a+=o*(e[n]-s),l+=o*o;return a/l}function Z(e,t){var n,i,o,r=F(t),s=F(e),a=0,l=0;for(n=0,i=e.length;n<i;n++)o=t[n]-r,a+=o*(e[n]-s),l+=o*o;return s-a*r/l}function J(e,t){var n,i,o,r,s=F(e),a=F(t),l=0,c=0,d=0;for(n=0,i=e.length;n<i;n++)o=e[n]-s,r=t[n]-a,l+=o*r,c+=o*o,d+=r*r;return l/Math.sqrt(c*d)}function ee(e,t){var n=J(e,t);return n*n}function te(e,t){var n,i,o,r=t.length,s=F(t),a=F(e),l=0,c=0,d=0;for(n=0;n<r;n++)i=t[n]-s,o=e[n]-a,l+=o*o,c+=i*o,d+=i*i;return Math.sqrt((l-c*c/d)/(r-2))}function ne(e,t,n){var i,o,r,s,a,l,c=F(n),d=F(t),u=0,h=0;for(i=0,o=n.length;i<o;i++)r=n[i]-c,s=t[i]-d,u+=r*s,h+=r*r;if(0===h)throw new Je("N/A");return a=u/h,l=d-a*c,l+a*e}function ie(e){var t,n=e.height,i=0;for(t=0;t<n;t++)i+=e.data[t][0];return i/n}function oe(e,t){var n,i,o=e.height,r=0;for(n=0;n<o;n++)i=e.data[n][0]-t,r+=i*i;return r}function re(e,t,n,i){var o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k=0;for(t||(t=e.map(function(){return++k})),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),s=[],k=r.height-1;k>=0;k--)s.push(r.data[k][0]);if(n||s.push(0),!i)return this.asMatrix([s]);for(a=t.multiply(r),l=e.adds(a,!0),c=n?ie(a):0,d=oe(a,c),u=n?ie(l):0,h=oe(l,u),f=[],f.push(d,h),p=d/(d+h),m=e.height-t.width,g=Math.sqrt(h/m),v=[],v.push(p,g),_=n?d/(t.width-1)/(h/m):p/t.width/((1-p)/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,f])}function se(e,t,n,i){return re.call(this,e.map(Math.log),t,n,i).map(Math.exp)}function ae(e,t,n,i){var o,r,s=0;return t||(t=e.map(function(){return++s})),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),n?i&&(n=n.clone(),n.eachRow(function(e){n.data[e].unshift(1)}),++n.width):n=t,n.multiply(r)}function le(e,t,n,i){return ae.call(this,e.map(Math.log),t,n,i).map(Math.exp)}function ce(e,t,n,i){var o,r,s,a,l,c=n||20,d=i||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 Je("NUM")}function de(e,t,n,i,o){var r=Math.pow(1+e,t),s=e?(r-1)/e:t;return-(i*r+n*s*(1+e*o))}function ue(e,t,n,i,o){if(!e)return-i-n*t;var r=Math.pow(1+e,t);return-(i+n*(r-1)/e*(1+e*o))/r}function he(e,t,n,i,o){if(!e)return-(i+n)/t;var r=Math.pow(1+e,t);return-e*(i+n*r)/((1+e*o)*(r-1))}function fe(e,t,n,i,o){if(!e)return-(i+n)/t;var r=t*(1+e*o);return Math.log((r-i*e)/(r+n*e))/Math.log(1+e)}function pe(e,t,n,i,o,r){function s(r){var s=Math.pow(1+r,e-1),a=s*(1+r);return[n*a+t*(1/r+o)*(a-1)+i,e*n*s+t*(-(a-1)/(r*r)+(1/r+o)*e*s)]}return ce(s,r)}function me(e,t,n,i,o,r){var s,a;return 1==r&&1==t?0:(s=he(e,n,i,o,r),a=de(e,t-1,s,i,r)*e,r?a/(1+e):a)}function ge(e,t,n,i,o,r){var s=he(e,n,i,o,r);return s-me(e,t,n,i,o,r)}function ve(e,t,n,i,o,r){var s,a,l,c,d,u;return 1==r&&(i--,o--),s=Math.pow(1+e,t),a=Math.pow(1+e,i-1),l=Math.pow(1+e,o),c=e*n*s/(s-1),d=a*n-(a-1)/e*c,u=l*n-(l-1)/e*c,u-d}function _e(e,t,n,i,o,r){var s,a=0;for(s=i;s<=o;s++)a+=me(e,s,t,n,0,r);return a}function be(e,t){var n,i,o=0;for(n=0,i=t.length;n<i;n++)o+=t[n]*Math.pow(1+e,-n-1);return o}function we(e,t){function n(t){var n,i,o=0,r=0;for(n=0,i=e.length;n<i;n++)o+=e[n]*Math.pow(1+t,-n-1),r+=-n*e[n]*Math.pow(1+t,-n-2);return[o,r]}return ce(n,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,n){var i,o,r=0;for(i=0,o=t.length;i<o;i++)r+=t[i]*Math.pow(1+e,(n[0]-n[i])/365);return r}function Ce(e,t,n){function i(n){var i,o,r,s=e[0],a=0;for(i=1,o=e.length;i<o;i++)r=(t[0]-t[i])/365,s+=e[i]*Math.pow(1+n,r),a+=r*e[i]*Math.pow(1+n,r-1);return[s,a]}return ce(i,n)}function Se(e,t,n,i){var o=-i*e;return o*(1-t/n)}function Te(e,t,n,i,o){var r,s,a=1-Math.pow(t/e,1/n);if(a=Math.floor(1e3*a+.5)/1e3,r=e*a*o/12,1==i)return r;for(s=1;s<n;s++){if(s==i-1)return(e-r)*a;r+=(e-r)*a}return(e-r)*a*(12-o)/12}function De(e,t,n,i,o){var r=o/n,s=-e*(Math.pow(1-r,i-1)-1),a=(e-s)*r;return a=Math.min(a,Math.max(0,e-s-t))}function Ae(e,t,n){return(e-t)/n}function Ee(e,t,n,i){return(e-t)*(n-i+1)*2/(n*(n+1))}function Me(e,t,n,i,o,r,s){function a(e,n){var i,o,r;return o=1==f?1==n?e:0:e*Math.pow(1-f,n-1),r=e*Math.pow(1-f,n),i=r<t?o-t:o-r,i<0?0:i}function l(e,n,i){var o,r,s,l=e-t,c=Math.ceil(i),d=0,u=0,h=!1;for(r=1;r<=c;r++)h?o=d:(s=a(e,r),d=l/(n-r+1),d>s?(o=d,h=!0):(o=s,l-=s)),r==c&&(o*=i+1-c),u+=o;return u}var c,d,u,h,f=r>=n?1:r/n,p=Math.floor(i),m=Math.ceil(o),g=0;if(s)for(c=p+1;c<=m;c++)d=a(e,c),c==p+1?d*=Math.min(o,p+1)-i:c==m&&(d*=o+1-m),g+=d;else u=n,i!=Math.floor(i)&&r>1&&i>=n/2&&(h=i-n/2,i=n/2,o-=h,u+=1),e-=l(e,u,i),g=l(e,n-i,o-i);return g}function Re(e,t){var n=tt(e),i=n.month+t,o=n.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),n=Math.min(n.date,it(o,i)),et(o,i,n)}function Ie(e,t,n){return 1==n||2==n||3==n?t-e:ot(e,t,n)}function Fe(e,t,n){var i,o,r,s=tt(e),a=tt(t),l=a.year-s.year;l>0&&(l=(l-1)*n),r=12/n;do l++,i=Re(t,-l*r);while(e<i);return l--,o=Re(t,-l*r),[i,o]}function ze(e,t,n){var i,o,r,s=tt(t),a=tt(e),l=s.year-a.year;for(l>0&&(l=(l-1)*n),i=e,r=12/n;t>i;)o=i,l++,i=Re(e,l*r);return[o,i]}function Pe(e,t,n,i){var o=Fe(e,t,n)[0];return Ie(o,e,i)}function Be(e,t,n,i){if(1==i){var o=Fe(e,t,n);return Ie(o[0],o[1],1)}return 3==i?365/n:360/n}function Le(e,t,n,i){var o=Fe(e,t,n)[1];return Ie(e,o,i)}function He(e,t,n){return Fe(e,t,n)[0]}function Ne(e,t,n){return Fe(e,t,n)[1]}function Oe(e,t,n){var i=tt(e),o=tt(t),r=12*(o.year-i.year)+o.month-i.month;return 1+(r*n/12|0)}function Ve(e,t){return 3==t?365:1==t?nt(e)?366:365:360}function Ue(e,t,n,i,o){var r=Ve(tt(t).year,o);return n*i*Ie(e,t,o)/r}function We(e,t,n,i,o,r,s,a){function l(e,t){return(t-e)*r/v|0}var c,d,u,h,f,p,m=0,g=o*i/r,v=s%2===0?360:365;return n<=t?(c=Fe(n,t,r),d=c[0],u=c[1],d<=e?g*Ie(e,n,s)/Ie(d,u,s):(c=Fe(e,d,r),h=c[0],f=c[1],p=l(f,n),g*(p+Ie(e,f,s)/Ie(h,f,s)+(n<u?Ie(d,n,s)/Ie(d,u,s):0)))):(c=ze(t,n,r),d=c[0],u=c[1],p=l(t,n),m=u==n?g*p:g*(p+Ie(d,n,s)/Ie(d,u,s)),a?(c=Fe(e,t,r),d=c[0],u=c[1],p=l(e,t),m+=g*(p+Ie(e,u,s)/Ie(d,u,s))):m)}function je(e,t,n,i,o){var r=o%2===0?360:nt(tt(e).year)?366:365;return(i-n)/i*r/Ie(e,t,o)}function qe(e,t,n,i,o){var r=o%2===0?360:nt(tt(e).year)?366:365;return(i-n)/n*r/Ie(e,t,o)}function Ge(e,t,n,i,o){var r=o%2===0?360:nt(tt(e).year)?366:365;return n/(1-i*Ie(e,t,o)/r)}function $e(e,t,n,i,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=Ie(c,e,s),h=Ie(e,d,s),f=Ie(c,d,s),p=100*n/r,m=i/r,g=h/f;return 1==a?(o+p)/(1+g*m)-u/f*p:o/Math.pow(1+m,a-1+g)+p*Math.pow(1+m,1-a-g)*(Math.pow(1+m,a)-1)/m-u/f*p}function Ye(e,t,n,i,o){var r=Ie(e,t,o),s=Ve(tt(t).year,o);return i-n*i*r/s}var Ke,Qe,Xe,Ze,Je,et,tt,nt,it,ot,rt,st,at,lt,ct;kendo.support.browser.msie&&kendo.support.browser.version<9||(Ke=kendo.spreadsheet,Qe=Ke.calc,Xe=Qe.runtime,Ze=Xe.defineFunction,Je=Xe.CalcError,et=Xe.packDate,tt=Xe.unpackDate,nt=Xe.isLeapYear,it=Xe.daysInMonth,ot=Xe._days_360,Ze("ERF",function(t,n){return null==n?e(t):e(n)-e(t)}).args([["lower_limit","number"],["upper_limit",["or","number","null"]]]),Ze("ERFC",t).args([["x","number"]]),Ze("GAMMALN",n).args([["x","number++"]]),Ze("GAMMA",i).args([["x","number"]]),Ze("GAMMA.DIST",c).args([["x","number+"],["alpha","number++"],["beta","number++"],["cumulative","logical"]]),Ze("GAMMA.INV",d).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"]]),Ze("NORM.S.DIST",u).args([["z","number"],["cumulative","logical"]]),Ze("NORM.S.INV",h).args([["p",["and","number",["[between]",0,1]]]]),Ze("NORM.DIST",f).args([["x","number"],["mean","number"],["stddev","number++"],["cumulative","logical"]]),Ze("NORM.INV",p).args([["p",["and","number",["[between]",0,1]]],["mean","number"],["stddev","number++"]]),Ze("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"]]]),Ze("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"]]]),Ze("BETA.INV",y).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]]]),Ze("CHISQ.DIST",k).args([["x","number+"],["deg_freedom","integer++"],["cumulative","logical"]]),Ze("CHISQ.DIST.RT",x).args([["x","number+"],["deg_freedom","integer++"]]),Ze("CHISQ.INV",C).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),Ze("CHISQ.INV.RT",S).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),Ze("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"]]]),Ze("EXPON.DIST",D).args([["x","number+"],["lambda","number++"],["cumulative","logical"]]),Ze("POISSON.DIST",A).args([["x","integer+"],["mean","number+"],["cumulative","logical"]]),Ze("F.DIST",E).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"],["cumulative","logical"]]),Ze("F.DIST.RT",M).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Ze("F.INV",I).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Ze("F.INV.RT",R).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Ze("F.TEST",P).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),Ze("FISHER",B).args([["x",["and","number",["(between)",-1,1]]]]),Ze("FISHERINV",L).args([["y","number"]]),Ze("T.DIST",H).args([["x","number"],["deg_freedom","integer++"],["cumulative","logical"]]),Ze("T.DIST.RT",N).args([["x","number"],["deg_freedom","integer++"]]),Ze("T.DIST.2T",O).args([["x","number+"],["deg_freedom","integer++"]]),Ze("T.INV",V).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),Ze("T.INV.2T",U).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),Ze("T.TEST",W).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"]]]),Ze("CONFIDENCE.T",j).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++",["assert","$size != 1","DIV/0"]]]]),Ze("CONFIDENCE.NORM",q).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++"]]]),Ze("GAUSS",G).args([["z","number"]]),Ze("PHI",$).args([["x","number"]]),Ze("LOGNORM.DIST",Y).args([["x","number++"],["mean","number"],["standard_dev","number++"],["cumulative","logical"]]),Ze("LOGNORM.INV",K).args([["probability",["and","number",["(between)",0,1]]],["mean","number"],["standard_dev","number++"]]),Ze("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"]]]),Ze("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"]]]),Ze("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"]]]),Ze("PEARSON",J).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array2.length == $array1.length","N/A"]],["?",["assert","$array2.length > 0 && $array1.length > 0","N/A"]]]),Ze("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"]]]),Ze("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"]]]),Ze("FORECAST",ne).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"]]]),Ze("LINEST",re).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),Ze("LOGEST",se).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),Ze("TREND",ae).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),Ze("GROWTH",le).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),Ze("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"]]]),Ze("PV",ue).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$pmt || $fv"]]]),Ze("PMT",he).args([["rate","number"],["nper","number"],["pmt","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Ze("NPER",fe).args([["rate","number"],["pmt","number"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Ze("RATE",pe).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"]]]),Ze("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"]]]),Ze("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"]]]),Ze("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"]]]),Ze("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"]]]),Ze("NPV",be).args([["rate","number"],["values",["collect","number"]],["?",["assert","$values.length > 0","N/A"]]]),Ze("IRR",we).args([["values",["collect","number",1]],["guess",["or","number",["null",.1]]]]),Ze("EFFECT",ye).args([["nominal_rate","number++"],["npery","integer++"]]),Ze("NOMINAL",ke).args([["effect_rate","number++"],["npery","integer++"]]),Ze("XNPV",xe).args([["rate","number"],["values",["collect","number",1]],["dates",["collect","date",1]],["?",["assert","$values.length == $dates.length","NUM"]]]),Ze("XIRR",Ce).args([["values",["collect","number",1]],["dates",["collect","date",1]],["guess",["or","number",["null",.1]]],["?",["assert","$values.length == $dates.length","NUM"]]]),Ze("ISPMT",Se).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["?",["assert","$per >= 1 && $per <= $nper"]]]),Ze("DB",Te).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["month",["or","number",["null",12]]]]),Ze("DDB",De).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["factor",["or","number",["null",2]]]]),Ze("SLN",Ae).args([["cost","number"],["salvage","number"],["life","number++"]]),Ze("SYD",Ee).args([["cost","number"],["salvage","number"],["life","number++"],["per","number++"]]),Ze("VDB",Me).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"]]]),rt=[["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"]]],Ze("COUPDAYBS",Pe).args(rt),Ze("COUPDAYS",Be).args(rt),Ze("COUPDAYSNC",Le).args(rt),Ze("COUPPCD",He).args(rt),Ze("COUPNCD",Ne).args(rt),Ze("COUPNUM",Oe).args(rt),Ze("ACCRINTM",Ue).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"]]]),Ze("ACCRINT",We).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"]]]),Ze("DISC",je).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"]]]),Ze("INTRATE",qe).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"]]]),Ze("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"]]]),Ze("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"]]]),Ze("PRICEDISC",Ye).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"]]]),st=300,at=2.2204e-16,lt=1e-30,ct=Math.abs)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n,i,o,r,s;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=["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",reset:"Reset color",customColor:"Custom color...",apply:"Apply",cancel:"Cancel"},r=e.ui.Widget.extend({init:function(n,i){e.ui.Widget.call(this,n,i),this.element=n,this.color=i.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=n("<div />",{"class":"k-spreadsheet-color-palette"}),t=this.colorPalette=n("<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,i,r=n("<div />",{"class":"k-spreadsheet-window",html:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>"+o.apply+"</button><button class='k-button' data-bind='click: close'>"+o.cancel+"</button></div>"}),s=this.dialog=r.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"),i=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"),i)},_resetButton:function(){this.resetButton=n("<a class='k-button k-reset-color' href='#'><span class='k-icon k-i-reset-color'></span>"+o.reset+"</a>").appendTo(this.element)},_customColorButton:function(){this.customColorButton=n("<a class='k-button k-custom-color' href='#'><span class='k-icon'></span>"+o.customColor+"</a>").appendTo(this.element)},resetColor:function(){this.colorPalette.value(null),this.flatColorPicker.value(null),this._change(null)},customColor:function(){this.dialog.open()}}),s=e.ui.Widget.extend({init:function(n,i){e.ui.Widget.call(this,n,i),this.element=n,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=i.map(function(n){return'<a title="'+t[n]+'" href="#" data-border-type="'+n+'" class="k-button k-button-icon"><span class="k-icon k-i-'+e.toHyphens(n)+'"></span></a>'}).join(""),s=n("<div />",{"class":"k-spreadsheet-border-type-palette",html:r});s.appendTo(this.element)},_borderColorPalette:function(){var e=n("<div />",{"class":"k-spreadsheet-border-color-palette"});e.appendTo(this.element),this.colorChooser=new r(e,{color:this.color,change:this._colorChange.bind(this)})},_click:function(e){this.type=n(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=r,e.spreadsheet.BorderPalette=s)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,M,R,I,F,z,P;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n=e.ui.ToolBar,i=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",colorPicker:{reset:"Reset color",customColor:"Custom color..."},copy:"Copy",cut:"Cut",deleteColumn:"Delete column",deleteRow:"Delete row",filter:"Filter",fontFamily:"Font",fontSize:"Font size",format:"Custom format...",formatTypes:{automatic:"Automatic",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",sortAsc:"Sort ascending",sortDesc:"Sort descending",sortButtons:{sortSheetAsc:"Sort sheet A to Z",sortSheetDesc:"Sort sheet Z to A",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=n.extend({init:function(e,t){t.items=this._expandTools(t.tools||s.prototype.options.tools[t.toolbarName]),n.fn.init.call(this,e,t);var i=this._click.bind(this);this.element.addClass("k-spreadsheet-toolbar"),this._addSeparators(this.element),this.bind({click:i,toggle:i})},_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 n(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:i[o.name||e],icon:o.iconClass,attributes:{title:i[o.name||e]}},l[a],o);return"splitButton"==a&&(c.menuButtons=c.menuButtons.map(n)),c.attributes["data-tool"]=e,o.property&&(c.attributes["data-property"]=o.property),c}return e.reduce(function(e,i){return e.push(t.isArray(i)?{type:"buttonGroup",buttons:i.map(n)}:n.call(this,i)),e},[])},_click:function(e){var t,n=e.target.attr("data-tool"),i=r[n]||{},o=i.command;o&&(t={command:o,options:{property:i.property||null,value:i.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 n(e,t){var n,i=e.toolbar,o=e.overflow,r=i&&i.options.togglable||o&&o.options.togglable;r&&(n=!1,"boolean"==typeof t?n=t:"string"==typeof t&&(n=i.options.value===t),i.toggle(n),o&&o.toggle(n))}function i(e,t){var n=e.toolbar,i=e.overflow;n&&n.update&&n.update(t),i&&i.update&&i.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?n(s,a):i(s,a)},_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),n=e.data("instance");n&&n.destroy&&n.destroy()}),n.fn.destroy.call(this)}}),e.spreadsheet.ToolBar=s,a=e.toolbar.Item.extend({init:function(e,n){var i=t("<select />").kendoDropDownList({height:"auto"}).data("kendoDropDownList");this.dropDownList=i,this.element=i.wrapper,this.options=e,this.toolbar=n,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),i.bind("open",this._open.bind(this)),i.bind("change",this._change.bind(this)),this.element.width(e.width).attr({"data-command":"PropertyChangeCommand","data-property":e.property})},_open:function(){var t,n=this.dropDownList,i=n.list;i.css({whiteSpace:"nowrap",width:"auto"}),t=i.width(),t?t+=20:t=n._listWidth,i.css("width",t+e.support.scrollbar()),n._listWidth=t},_change:function(e){var t=e.sender,n=t.value(),i=t.dataItem(),o=i?i.popup:void 0;o?this.toolbar.dialog({name:o}):this.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,n){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=n,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,n){e.toolbar.ToolBarButton.fn.init.call(this,t,n),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,n){this._dialogName=e.dialogName,this.toolbar=n,this.element=t("<button class='k-button k-button-icon' title='"+e.attributes.title+"'><span class='k-icon k-i-file-excel' /></button>").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,n){e.toolbar.OverflowButton.fn.init.call(this,t,n),this.element.on("click touchend",this._click.bind(this)),this.message=this.options.text;var i=this.element.data("button");this.element.data(this.options.type,i)},_click:t.noop}),d=l.extend({init:function(t,n){l.fn.init.call(this,t,n),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],f=12,p=e.toolbar.Item.extend({init:function(e,n){var i=t("<input />").kendoComboBox({change:this._valueChange.bind(this),clearButton:!1,dataSource:e.fontSizes||h,value:f}).data("kendoComboBox");this.comboBox=i,this.element=i.wrapper,this.options=e,this.toolbar=n,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)||f)},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:f}})},update:function(e){this._value=e||f,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),e.toolbar.registerComponent("fontSize",p,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 n=this.dropDownList;n.setDataSource(e.fontFamilies||g),n.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,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 n,o;a.fn.init.call(this,e,t),n=this.dropDownList,o="<span class='k-icon k-i-"+e.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",n.bind("change",this._revertTitle.bind(this)),n.bind("dataBound",this._revertTitle.bind(this)),n.setOptions({dataValueField:"format",dataTextField:"name",dataValuePrimitive:!0,valueTemplate:o,template:"# if (data.sample) { #<span class='k-spreadsheet-sample'>#: data.sample #</span># } ##: data.name #"}),n.text(o),n.setDataSource([{format:w.automatic,name:i.formatTypes.automatic},{format:w.number,name:i.formatTypes.number,sample:"1,499.99"},{format:w.percent,name:i.formatTypes.percent,sample:"14.50%"},{format:w.financial,name:i.formatTypes.financial,sample:"(1,000.12)"},{format:w.currency,name:i.formatTypes.currency,sample:"$1,499.99"},{format:w.date,name:i.formatTypes.date,sample:"4/21/2012"},{format:w.time,name:i.formatTypes.time,sample:"5:49:00 PM"},{format:w.dateTime,name:i.formatTypes.dateTime,sample:"4/21/2012 5:49:00"},{format:w.duration,name:i.formatTypes.duration,sample:"168:05:00"},{popup:"formatCells",name:i.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 n=t("<div />").appendTo(this.popup.element);this.borderPalette=new e.spreadsheet.BorderPalette(n,{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,n){l.fn.init.call(this,e,n),this.element.attr({"data-property":"alignment"}),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})},buttons:[{property:"textAlign",value:"left",iconClass:"align-left",text:i.alignmentButtons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:i.alignmentButtons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:i.alignmentButtons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:i.alignmentButtons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:i.alignmentButtons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:i.alignmentButtons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:i.alignmentButtons.alignBottom}],destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},update:function(e){var t=e.textAlign(),n=e.verticalAlign(),i=this.popup.element;i.find(".k-button").removeClass("k-state-active"),t&&i.find("[data-property=textAlign][data-value="+t+"]").addClass("k-state-active"),n&&i.find("[data-property=verticalAlign][data-value="+n+"]").addClass("k-state-active")},_commandPalette:function(){var e=this.buttons,n=t("<div />").appendTo(this.popup.element);e.forEach(function(i,o){var r="<a title='"+i.text+"' data-property='"+i.property+"' data-value='"+i.value+"' class='k-button k-button-icon'><span class='k-icon k-i-"+i.iconClass+"'></span></a>";0!==o&&e[o-1].property!==i.property&&n.append(t("<span class='k-separator' />")),n.append(r)})},_action:function(e){var t=e.attr("data-property"),n=e.attr("data-value");this.toolbar.action({command:"PropertyChangeCommand",options:{property:t,value:n}})}}),T=c.extend({_click:function(){this.toolbar.dialog({name:"alignment"})}}),e.toolbar.registerComponent("alignment",S,T),D=l.extend({init:function(e,n){l.fn.init.call(this,e,n),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})},buttons:[{value:"cells",iconClass:"cells-merge",text:i.mergeButtons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:i.mergeButtons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:i.mergeButtons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:i.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 n="<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(n)})},_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,n){l.fn.init.call(this,e,n),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})},buttons:[{value:"panes",iconClass:"pane-freeze",text:i.freezeButtons.freezePanes},{value:"rows",iconClass:"row-freeze",text:i.freezeButtons.freezeRows},{value:"columns",iconClass:"column-freeze",text:i.freezeButtons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:i.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 n="<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(n)})},_action:function(e){var t=e.attr("data-value");this.toolbar.action({command:"FreezePanesCommand",options:{value:t}})}}),M=c.extend({_click:function(){this.toolbar.dialog({name:"freeze"})}}),e.toolbar.registerComponent("freeze",E,M),R=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 n=this.dropDownList;n.bind("change",this._revertTitle.bind(this)),n.bind("dataBound",this._revertTitle.bind(this)),n.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"}),n.setDataSource([{value:"asc",sheet:!1,text:i.sortButtons.sortRangeAsc,iconClass:"sort-asc"},{value:"desc",sheet:!1,text:i.sortButtons.sortRangeDesc,iconClass:"sort-desc"}]),n.select(0),this.element.data({type:"sort",sort:this})},_change:function(e){var t=e.sender,n=t.dataItem();n&&this.toolbar.action({command:"SortCommand",options:{value:n.value,sheet:n.sheet}})},value:t.noop}),I=c.extend({_click:function(){this.toolbar.dialog({name:"sort"})}}),e.toolbar.registerComponent("sort",R,I),F=e.toolbar.ToolBarButton.extend({init:function(t,n){t.showText="overflow",e.toolbar.ToolBarButton.fn.init.call(this,t,n),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)}}),z=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,z),P=e.toolbar.Item.extend({init:function(e,n){this.toolbar=n,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.remove("input"),t("<input type='file' autocomplete='off' accept='.xlsx'/>").attr("title",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",P),e.spreadsheet.TabStrip=e.ui.TabStrip.extend({init:function(n,i){e.ui.TabStrip.fn.init.call(this,n,i),n.addClass("k-spreadsheet-tabstrip"),this._quickAccessButtons(),this.toolbars={};var o=i.dataSource;this.contentElements.each(function(e,n){this._toolbar(t(n),o[e].id,i.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,n=this.toolbars;for(t in n)n.hasOwnProperty(t)&&n[t].refresh(e)},_quickAccessButtons:function(){var n=[{title:i.quickAccess.undo,iconClass:"undo",action:"undo"},{title:i.quickAccess.redo,iconClass:"redo",action:"redo"}],o=e.template("<a href='\\#' title='#= title #' data-action='#= action #' class='k-button k-button-icon'><span class='k-icon k-i-#=iconClass#'></span></a>");this.quickAccessToolBar=t("<div />",{"class":"k-spreadsheet-quick-access-toolbar",html:e.render(o,n)}).insertBefore(this.wrapper),this.quickAccessToolBar.on("click",".k-button",function(e){e.preventDefault();var n=t(e.currentTarget).attr("data-action");this.action({action:n})}.bind(this)),this.quickAccessAdjust()},quickAccessAdjust:function(){this.tabGroup.css("padding-left",e._outerWidth(this.quickAccessToolBar))},_toolbar:function(t,n,i){var o,r;this.toolbars[n]&&(this.toolbars[n].destroy(),t.children(".k-toolbar").remove()),i&&(o=t.html("<div />").children("div"),r={tools:"boolean"==typeof i?void 0:i,toolbarName:n,action:this.action.bind(this),dialog:this.dialog.bind(this)},this.toolbars[n]=new e.spreadsheet.ToolBar(o,r))}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/dialogs.min",["kendo.core.min","kendo.binder.min","kendo.validator.min"],e)}(function(){!function(e){function t(t,n){return e.spreadsheet.formatting.text(t,n)}function n(e,t){var n,i=[],r=[];for(n=0;n<t.length;n++)o.inArray(t[n][e],r)==-1&&(i.push(t[n]),r.push(t[n][e]));return i}function i(t,n){e.spreadsheet.dialogs.register(t,u.extend({options:{messageId:n}}))}var o,r,s,a,l,c,d,u,h,f,p,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."},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 n=a[e];if(n)return new n(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' />").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:this.options.autoFocus,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()},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",n="currency"==t;this.category=e,this.set("showCurrencyFilter",n&&this.currencies.length>1),n?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 n,i;return void 0!==e&&(this._currency=e,n=e.value,i=[{currency:n,decimals:!0},{currency:n,decimals:!0,iso:!0},{currency:n,decimals:!1}],i=i.map(function(e){return e=c.convert.currency(e),{value:e,name:t(1e3,e)}}),this.set("formats",i),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"),n=this.value||0;return e&&e.length?t(n,e):n}}),c.convert={currency:function(e){function t(e,t){return Array(t+1).join(e)}var n=e.currency,i=n.pattern[1];return e.decimals&&(i=i.replace(/n/g,"n"+n["."]+t("0",n.decimals))),i=e.iso?'"'+n.abbr+'" '+i.replace(/\s*\$\s*/g,""):i.replace(/\$/g,n.symbol),i=i.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 n=e.spreadsheet.messages.dialogs.formatCellsDialog||s,i={title:n.title,categories:[{type:"number",name:n.categories.number},{type:"currency",name:n.categories.currency},{type:"date",name:n.categories.date}]};l.fn.init.call(this,o.extend(i,t)),this._generateFormats()},options:{className:"k-spreadsheet-format-cells",template:"<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>"},_generateFormats:function(){var i,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||(i=e.cultures.current.calendars.standard.patterns,r.dateFormats=n("value",o.map(i,function(e){if(e=c.convert.date(e))return{value:e,name:t(34567.7678,e)}})))},open:function(t){var n,i,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),n=this.dialog().element,e.bind(n,this.viewModel),i=n.find("select.k-format-filter").data("kendoDropDownList"),o.currencies.length>10&&i.setOptions({filter:"contains"}),n.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 n("description",o.map(t,function(t,n){var i,o;if(/-/.test(n))return i=t.numberFormat.currency,o=e.format("{0} ({1}, {2})",i.name,i.abbr,i.symbol),{description:o,value:i}}))},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,n;l.fn.open.call(this),t=this.options,n=t.text,t.messageId&&(n=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:n,close:this.close.bind(this)})}}),e.spreadsheet.dialogs.register("message",u),h=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.confirmationDialog||s,i={title:n.title,text:n.text};l.fn.init.call(this,o.extend(i,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,n;l.fn.open.call(this),t=this.options,n=t.text,t.messageId&&(n=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:n,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),f=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,n;l.fn.open.call(this),t=this.options,n=t.text,t.messageId&&(n=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:n,retry:this.retry.bind(this),cancel:this.close.bind(this)})},retry:function(){this._retry=!0,this.close()}}),e.spreadsheet.dialogs.register("validationError",f),p=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.fontFamilyDialog||s;l.fn.init.call(this,o.extend({title:n.title},t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul"),n=this.options.fonts,i=this.options.defaultFont;
this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:n}),template:"#: data #",value:i,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",p),m=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.fontSizeDialog||s;l.fn.init.call(this,o.extend({title:n.title},t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul"),n=this.options.sizes,i=this.options.defaultSize;this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:n}),template:"#: data #",value:i,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 n=e.spreadsheet.messages.dialogs.bordersDialog||s;l.fn.init.call(this,o.extend({title:n.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 n=e.spreadsheet.messages.dialogs.alignmentDialog||s,i={title:n.title,buttons:[{property:"textAlign",value:"left",iconClass:"align-left",text:n.buttons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:n.buttons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:n.buttons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:n.buttons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:n.buttons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:n.buttons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:n.buttons.alignBottom}]};l.fn.init.call(this,o.extend(i,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 n=e.spreadsheet.messages.dialogs.mergeDialog||s,i={title:n.title,buttons:[{value:"cells",iconClass:"cells-merge",text:n.buttons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:n.buttons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:n.buttons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:n.buttons.unmerge}]};l.fn.init.call(this,o.extend(i,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 n=e.spreadsheet.messages.dialogs.freezeDialog||s,i={title:n.title,buttons:[{value:"panes",iconClass:"pane-freeze",text:n.buttons.freezePanes},{value:"rows",iconClass:"row-freeze",text:n.buttons.freezeRows},{value:"columns",iconClass:"column-freeze",text:n.buttons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:n.buttons.unfreeze}]};l.fn.init.call(this,o.extend(i,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,n=this.defaultComparers,i=[];if("text"===this.criterion)for(e=["equalTo","notEqualTo"],t=0;t<n.length;t++)e[0]==n[t].type&&(i.push(n[t]),e.shift());else i=n.slice();this.set("comparers",i)},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 n=e.spreadsheet.messages.dialogs.validationDialog||s,i={title:n.title,hintMessage:n.hintMessage,hintTitle:n.hintTitle,criteria:[{type:"any",name:n.criteria.any},{type:"number",name:n.criteria.number},{type:"text",name:n.criteria.text},{type:"date",name:n.criteria.date},{type:"custom",name:n.criteria.custom},{type:"list",name:n.criteria.list}],comparers:[{type:"greaterThan",name:n.comparers.greaterThan},{type:"lessThan",name:n.comparers.lessThan},{type:"between",name:n.comparers.between},{type:"notBetween",name:n.comparers.notBetween},{type:"equalTo",name:n.comparers.equalTo},{type:"notEqualTo",name:n.comparers.notEqualTo},{type:"greaterThanOrEqualTo",name:n.comparers.greaterThanOrEqualTo},{type:"lessThanOrEqualTo",name:n.comparers.lessThanOrEqualTo}],comparerMessages:n.comparerMessages};l.fn.init.call(this,o.extend(i,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" 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" 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 #" 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 #" 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" 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 #" 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" 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 #" 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 #" 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 #" 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 #" 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="showButton" class="k-checkbox" data-bind="checked: showButton"/><label for="showButton" 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="showButton" class="k-checkbox" data-bind="checked: showButton"/><label for="showButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showCalendarButton #</label></div></div><div data-bind="invisible: isAny"><div class="k-edit-field"><input type="checkbox" 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-action-buttons"></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.onInvalidData #:</label></div><div class="k-edit-field"><input type="radio" 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" 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" 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" 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" 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 n,i=this.options;this.viewModel=new x({type:i.type,defaultHintMessage:i.hintMessage,defaultHintTitle:i.hintTitle,defaultComparers:i.comparers.slice(0),comparerMessages:i.comparerMessages,criteria:i.criteria.slice(0),criterion:i.criterion,ignoreBlank:i.ignoreBlank,showButton:i.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),n=this.dialog().element,this.validatable&&this.validatable.destroy(),e.bind(n,this.viewModel),this.validatable=new e.ui.Validator(n.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 n,i=e.spreadsheet.messages.dialogs.exportAsDialog||s;l.fn.init.call(this,o.extend({title:i.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)}),n=this.dialog(),this.viewModel.bind("change",function(e){"extension"===e.field&&(this.set("showPdfOptions",".pdf"===this.extension),n.center())}),e.bind(n.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='export-config' data-bind='visible: showPdfOptions'><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'><input type='radio' id='k-orientation-portrait' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='false' /><label class='k-orientation-label k-orientation-portrait-label' for='k-orientation-portrait'></label><input type='radio' id='k-orientation-landscape' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='true' /><label class='k-orientation-label k-orientation-landscape-label' for='k-orientation-landscape'></label></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' data-bind='css: {k-page-landscape: pdf.landscape}'><div class='k-margins-horizontal'></div><div class='k-margins-vertical'></div></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),i("modifyMerged","modifyMergedDialog.errorMessage"),i("rangeDisabled","rangeDisabledDialog.errorMessage"),i("overflow","overflowDialog.errorMessage"),i("unsupportedSelection","unsupportedSelectionDialog.errorMessage"),i("incompatibleRanges","incompatibleRangesDialog.errorMessage"),i("noFillDirection","noFillDirectionDialog.errorMessage"),i("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 n=e.spreadsheet.messages.dialogs.useKeyboardDialog||s;l.fn.init.call(this,o.extend({title:n.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' /></div><div class='k-action-buttons'><button style='float: left' class='k-button' 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 n,i,r=this;l.fn.open.apply(r,arguments),n=r.dialog().element,i=e.observable({url:t.link(),apply:function(){/\S/.test(i.url)||(i.url=null),r.trigger("action",{command:"HyperlinkCommand",options:{link:i.url}}),r.close()},remove:function(){i.url=null,i.apply()},cancel:r.close.bind(r)}),e.bind(n,i),n.find("input").focus().on("keydown",function(e){13==e.keyCode?(i.url=o(this).val(),e.stopPropagation(),e.preventDefault(),i.apply()):27==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i.cancel())})}}),e.spreadsheet.dialogs.register("hyperlink",A))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/sheetbinder.min",["kendo.core.min","kendo.data.min","spreadsheet/sheet.min"],e)}(function(){!function(e){var t,n;e.support.browser.msie&&e.support.browser.version<9||(t=function(e){return e},n=e.Class.extend({init:function(e){this.options=$.extend({},this.options,e),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,n;void 0!==e.index&&(t=this.dataSource,n=t.view()[e.index-1],n&&t.remove(n))},_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(n){var i,o,r,s,a,l,c;n.insertRow||n.deleteRow||n.recalc&&n.ref&&(i=this.dataSource,o=i.view(),r=this.columns,i.reader.model&&(s=i.reader.model.fields),!r.length&&o.length&&(r=Object.keys(o[0].toJSON())),a=r.map(function(n){var i=n.field;return i&&s&&s[i]&&"date"==s[i].type?e.spreadsheet.numberToDate:t}),this._skipRebind=!0,l=this.sheet._grid.normalize(n.ref),c=this.sheet.range(l).values(),l.forEach(function(e){var t,n,s,l,d;for(e=e.toRangeRef(),n=0,s=e.topLeft.row;s<=e.bottomRight.row;s++){for(t=o[s-1],t||(t=i.insert(s-1,{}),o=i.view()),l=0,d=e.topLeft.col;d<=e.bottomRight.col&&d<r.length;d++)t.set(r[d].field,a[d](c[n][l++]));n++}}),this._boundRowsCount=i.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,n=t.dataSource;n=Array.isArray(n)?{data:n}:n,this.dataSource&&this._changeHandler?this.dataSource.unbind("change",this._changeHandler):this._changeHandler=this._change.bind(this),this.dataSource=e.data.DataSource.create(n).bind("change",this._changeHandler)},_change:function(){var t,n,i;this._skipRebind||(t=this.dataSource.view(),n=this.columns,!n.length&&t.length&&(this.columns=n=this._normalizeColumns(Object.keys(t[0].toJSON())),this._header()),i=n.map(function(t){return e.getter(t.field)}),this.sheet.batch(function(){var e,n,o,r=Math.max(t.length,this._boundRowsCount);for(e=0;e<r;e++)for(n=0;n<i.length;n++)o=t[e]?i[n](t[e]):null,this.sheet.range(e+1,n).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=n)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n={},i=[];for(t=0;t<e.length;t++)n[e[t].value]?!n[e[t].value].checked&&e[t].checked&&(n[e[t].value].checked=!0):(n[e[t].value]=e[t],i.push(e[t]));return i}function n(t,i){var o,r,s,a,l,c=!1,d=t instanceof e.data.HierarchicalDataSource&&t.data();for(o=0;o<d.length;o++)r=d[o],s=(""+r.text).toLowerCase(),a=i===!0||""===i||s.indexOf(i)>=0,l=n(r.children,a||i),c=c||l||a,r.hidden=!a&&!l,r.checked=!r.hidden;return d&&t.filter({field:"hidden",operator:"neq",value:!0}),c}function i(t){var n,o,r=t instanceof e.data.HierarchicalDataSource&&t.data();for(n=0;n<r.length;n++)o=r[n],o.checked=!1,o.hasChildren&&i(o.children)}function o(e){var t,n,i=c.operators,o=[];for(t in e)if(e.hasOwnProperty(t))for(n in e[t])e[t].hasOwnProperty(n)&&o.push({text:i[t][n],
value:n,unique:t+"_"+n,type:t});return o}var r,s,a,l,c,d,u,h,f;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,n){s.fn.init.call(this,t,n),this.element.addClass(f.classNames.details),this._summary=this.element.find("."+f.classNames.detailsSummary).on("click",this._toggle.bind(this));var i=n.expanded?f.classNames.iconCollapse:f.classNames.iconExpand;this._icon=r("<span />",{"class":f.classNames.icon+" "+i}).prependTo(this._summary),this._container=e.wrap(this._summary.next(),!0),n.expanded||this._container.hide()},options:{name:"Details"},events:["toggle"],visible:function(){return this.options.expanded},toggle:function(t){var n=e.fx(this._container).expand("vertical");n.stop()[t?"reverse":"play"](),this._icon.toggleClass(f.classNames.iconExpand,t).toggleClass(f.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,n,i){e.data.Binder.fn.init.call(this,t,n,i),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,n,i){e.data.Binder.fn.init.call(this,t.element[0],n,i),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(),n=r(this.widget.element).data("filterType");this.widget.value("date"===n&&t instanceof Date||"number"===n&&!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 n=t?t.sender.dataSource:this.valuesDataSource,i=function(e){return e.checked},o=function(t){return"date"===t.dataType?e.spreadsheet.dateToNumber(t.value):t.value},r=function(e,t,n){return n.lastIndexOf(e)===t},s=n.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(i).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="string"==typeof e?e:r(e.target).val().toLowerCase(),o=this.valuesDataSource;this.set("hasActiveSearch",!!t),i(o),n(o,t)},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.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:!0,items:this.values(e.resize({top:1}),t)}]},values:function(n,i){var o=[],r=c,s=n.column(i),a=n.sheet();return s.forEachCell(function(t,n,i){var s,l,c;a.isHiddenRow(t)||(s=i.value,l=i.dataType,c=i.text,l=void 0===s?"blank":i.format?e.spreadsheet.formatting.type(s,i.format):typeof s,c=null!==s&&i.format?e.spreadsheet.formatting.text(s,i.format):"blank"==l?r.blanks:s,"percent"===l&&(l="number"),"date"===l&&(s=e.spreadsheet.numberToDate(s)),o.push({dataType:l,value:s,text:c,checked:!0}))}),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 n,i,o,r=e.sheet(),s=this.filterForColumn(t,r);return s=s&&s.filter.toJSON(),s&&"custom"==s.filter&&(i=s.criteria[0].value,i instanceof Date?n="date":"string"==typeof i?n="string":"number"==typeof i&&(n="number")),n||(o=this.values(e.row(1),t)[0],n=o&&o.dataType,"blank"==n&&(n=null)),n},filterForColumn:function(e,t){var n,i=t.filter();return i&&(n=i.columns.filter(function(t){return t.index===e})[0]),n},filter:function(e,t){var n,i,o,r,s=this.filterForColumn(e,t);if(s)return n=s.filter.toJSON(),i=n.filter,delete n.filter,o={type:i,options:n},r=n.criteria,r&&r.length&&(o.operator=r[0].operator),o}},f=s.extend({init:function(e,t){s.call(this,e,t),this.element.addClass(f.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,n;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&&(n=this.viewModel.customFilter.toJSON(),n.criteria.length&&null!==n.criteria[0].value&&(e.customFilter=n)),(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,n=this.options.range,i=n.sheet(),o=h.filter(t,i);o?(e=h.filterType(n,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(f.templates.menuItem),n=c,i=[{command:"sort",dir:"asc",text:n.sortAscending,iconClass:"sort-asc"},{command:"sort",dir:"desc",text:n.sortDescending,iconClass:"sort-desc"}],o=r("<ul />",{html:e.render(t,i)}).appendTo(this.element);this.menu=o.kendoMenu({orientation:"vertical",select:function(e){var t=r(e.item).data("dir"),n=this.options.range.resize({top:1}),i={value:t,sheet:!1,operatingRange:n,column:this.options.column};n.isSortable()?this.action({command:"SortCommand",options:i}):this.close()}.bind(this)}).data("kendoMenu")},_appendTemplate:function(t,n,i,o){var s=e.template(t),a=r("<div class='"+n+"'/>").html(s({messages:c,guid:e.guid(),ns:e.ns}));return this.element.append(a),i&&(i=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(f.templates.filterByCondition,f.classNames.filterByCondition,!0,e)},_filterByValue:function(){var t,n="value"===this.viewModel.active,i=this._appendTemplate(f.templates.filterByValue,f.classNames.filterByValue,!0,n);this.valuesTreeView=i.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(f.templates.actionButtons,f.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(f.classNames.filterByValue)?this.viewModel.set("active","value"):e.hasClass(f.classNames.filterByCondition)&&this.viewModel.set("active","custom")}}),e.spreadsheet.FilterMenu=f,r.extend(!0,f,{classNames:a,templates:d}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=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,n=e._activeElement();return this.barElement()[0]===n?t=this.barInput:this.cellElement()[0]===n&&(t=this.cellInput),t},activate:function(e){return this._active=!0,this._rect=e.rect,this.cellInput.position(e.rect),this.cellInput.resize(e.rect),this.cellInput.tooltip(e.tooltip),this.cellInput.activeCell=this.barInput.activeCell=e.range.topLeft,this.trigger("activate"),this},deactivate:function(){var e=this.cellInput;this._active&&(e.value()!=this._value&&this.trigger("change",{value:e.value()}),this._active=!1,this._rect=null,e.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){return void 0===e?this.barInput.value():(null===e&&(e=""),this._value=e,this.barInput.value(e),void this.cellInput.value(e))},insertNewline:function(){this.activeEditor().insertNewline(),this.scale()},select:function(){this.activeEditor().select()}});e.spreadsheet.SheetEditor=n}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/autofill.min",["spreadsheet/runtime.min","spreadsheet/range.min"],e)}(function(){"use strict";function e(e){var t,n,i,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++)n=t+1-a,i=e[t]-l,c+=n*i,d+=n*n;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 r(e){var t,n=e[1]-e[0];for(t=2;t<e.length;++t)if(e[t]-e[t-1]!=n)return null;return n}function s(e){return e.map(function(e){return e.number})}var a=[],l=t.map(function(e){return e.formula||e.value});return o(l,function(i,o,c,d){var u,h,f,p,m;for("number"==c?(h=s(d),1==h.length&&(i>0||o<l.length||"date"==n(h[0],t[i].format))&&h.push(h[0]+1),u=e(h)):"string"==c||"formula"==c||"boolean"==c?u=function(e,t){return l[t]}:Array.isArray(c)?1==d.length?u=function(e){return c[(d[0].number+e)%c.length]}:(f=r(s(d)),u=null==f?function(e){return d[e%d.length].value}:function(e){var t=d[0].number+f*e;return c[t%c.length]}):"null"!=c?(h=s(d),1==h.length&&h.push(h[0]+1),h=e(h),u=function(e,t){return l[t].replace(/^(.*\D)\d+/,"$1"+h(e,t))}):u=function(){return null},p={f:u,begin:i,end:o,len:o-i},m=i;m<o;++m)a[m]=p}),function(e,n){var o=a[n],r=e/l.length|0,s=e%l.length,c=r*o.len+s-o.begin,d=o.f(c,n),u=i(t[n]);return delete u.enable,d instanceof h?u.formula=d:u.value=d,u}}function n(e,t){if(null!=t)return c.formatting.type(e,t)}function i(e){var t={};return Object.keys(e||{}).forEach(function(n){t[n]=e[n]}),t}function o(e,t){var n,i,o=null,s=0,a=[];for(i=0;i<e.length;++i)n=r(e[i]),a.push(n),null!=o&&n.type!==o.type&&(t(s,i,o.type,a.slice(s,i)),s=i),o=n;t(s,i,o.type,a.slice(s,i))}function r(e){var t,n;if("number"==typeof e)return{type:"number",number:e};if("string"==typeof e)return(t=a(e))?t:(n=/^(.*\D)(\d+)/.exec(e),n?(e=e.replace(/^(.*\D)\d+/,"$1-######"),{type:e,match:n,number:parseFloat(n[2])}):{type:"string"});if("boolean"==typeof e)return{type:"boolean"};if(null==e)return{type:"null"};if(e instanceof h)return{type:"formula"};throw window.console.error(e),Error("Cannot fill data")}function s(){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 a(e){var t,n,i,o,r=e.toLowerCase(),a=s();for(t=0;t<a.length;++t)for(n=a[t],i=n.length;--i>=0;)if(o=n[i].toLowerCase(),o==r)return{type:n,number:i,value:e}}function l(e){var t,n,i=e.length,o=e[0].length,r=[];for(t=0;t<o;++t)for(r[t]=[],n=0;n<i;++n)r[t][n]=e[n][t];return r}var c,d,u,h,f,p,m;kendo.support.browser.msie&&kendo.support.browser.version<9||(c=kendo.spreadsheet,d=c.Range,u=c.calc.runtime,h=u.Formula,f="incompatibleRanges",p="noFillDirection",m=d.FillError=function(e){this.code=e},d.prototype._previewFillFrom=function(e,n){var i,o,r,s,a,c,d,u,h,g,v,_,b,w,y=this,k=y._sheet;if("string"==typeof e&&(e=k.range(e)),i=e._ref.toRangeRef(),o=y._ref.toRangeRef(),i.intersects(o)){if(i.eq(o))return null;if(o=o.clone(),i.topLeft.eq(o.topLeft))if(i.width()==o.width())o.topLeft.row+=i.height(),n=0;else{if(i.height()!=o.height())throw new m(f);o.topLeft.col+=i.width(),n=1}else{if(!i.bottomRight.eq(o.bottomRight))throw new m(f);if(i.width()==o.width())o.bottomRight.row-=i.height(),n=2;else{if(i.height()!=o.height())throw new m(f);o.bottomRight.col-=i.width(),n=3}}return k.range(o)._previewFillFrom(e,n)}if(null==n)if(i.topLeft.col==o.topLeft.col)n=i.topLeft.row<o.topLeft.row?0:2;else{if(i.topLeft.row!=o.topLeft.row)throw new m(p);n=i.topLeft.col<o.topLeft.col?1:3}if(r=1&n,s=2&n,r&&i.height()!=o.height()||!r&&i.width()!=o.width())throw new m(f);for(a=e._properties(),r?c=o.width():(a=l(a),c=o.height()),d=Array(a.length),u=0;u<a.length;++u)for(h=a[u],g=t(h),v=d[u]=Array(c),_=0;_<c;++_)b=s?-_-1:h.length+_,w=s?h.length-_%h.length-1:_%h.length,v[s?c-_-1:_]=g(b,w);return r||(d=l(d)),{props:d,direction:n,dest:y}},d.prototype.fillFrom=function(e,t){var n=this._previewFillFrom(e,t);return n.dest._properties(n.props),n.dest})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/nameeditor.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n={input:"k-spreadsheet-name-editor",list:"k-spreadsheet-name-list"},i=e.ui.Widget.extend({init:function(i,o){e.ui.Widget.call(this,i,o),i.addClass(n.input);var r=new e.data.DataSource({transport:{read:function(t){var n=[];this._workbook.forEachName(function(t){!t.hidden&&t.value instanceof e.spreadsheet.Ref&&n.push({name:t.name})}),t.success(n)}.bind(this),cache:!1}});this.combo=t("<input />").appendTo(i).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:r,autoBind:!1,ignoreCase:!0,change:this._on_listChange.bind(this),noDataTemplate:"<div></div>",open:function(){r.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 n=t(e.target).closest(".k-item");n=this.combo.dataItem(n),this._deleteItem(n.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=i)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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){var n=0,i=[],o=.2*t,r=t;return e.forEach(function(e){t&&n+e>r&&(r-n<o&&(n=t*Math.ceil(n/t)),r+=t*Math.ceil(e/t)),i.push(n),n+=e}),i.push(n),i}function t(t,s,a){var l,c,d,u,f,p,m,g,v=[],_=[],b=[],w=t._getMergedCells(s),y=-1,k=-1;return t.forEach(s,function(e,n,i){var r,l,c,d=e-s.topLeft.row,u=n-s.topLeft.col,f=t.rowHeight(e),p=t.columnWidth(n);u||_.push(f),d||b.push(p),!t.isHiddenColumn(n)&&!t.isHiddenRow(e)&&f&&p&&(r=a.forScreen||o(i),(a.emptyCells||r)&&(l=new h(e,n).print(),w.secondary[l]||(r?(y=Math.max(y,d),k=Math.max(k,u)):i.empty=!0,c=w.primary[l],c?(delete w.primary[l],i.merged=!0,i.rowspan=c.height(),i.colspan=c.width(),a.forScreen&&(i.width=t._columns.sum(c.topLeft.col,c.bottomRight.col),i.height=t._rows.sum(c.topLeft.row,c.bottomRight.row))):(i.rowspan=1,i.colspan=1),i.row=d,i.col=u,v.push(i))))}),_=_.slice(0,y+1),b=b.slice(0,k+1),l=a.pageWidth,c=a.pageHeight,d=1,a.fitWidth&&(u=b.reduce(n,0),u>l&&(d=l/u,l/=d,c/=d)),f=e(_,c||0),p=e(b,l||0),m=0,g=0,v=v.filter(function(e){return(!e.empty||!(e.row>y||e.col>k))&&(e.left=p[e.col],e.top=f[e.row],e.merged?a.forScreen?(e.right=e.left+e.width,e.bottom=e.top+e.height):(e.right=i(p,e.col+e.colspan),e.bottom=i(f,e.row+e.rowspan),e.width=e.right-e.left,e.height=e.bottom-e.top):(e.width=b[e.col],e.height=_[e.row],e.bottom=e.top+e.height,e.right=e.left+e.width),m=Math.max(m,e.right),g=Math.max(g,e.bottom),!0)}),Object.keys(w.primary).forEach(function(e){var n=w.primary[e];t.forEach(n.topLeft.toRangeRef(),function(e,i,o){var r=e-s.topLeft.row,a=i-s.topLeft.col;o.merged=!0,o.colspan=n.height(),o.rowspan=n.width(),o.top=r<0?-t._rows.sum(e,e-r-1):f[r],o.left=a<0?-t._columns.sum(i,i-a-1):p[a],o.height=t._rows.sum(n.topLeft.row,n.bottomRight.row),o.width=t._columns.sum(n.topLeft.col,n.bottomRight.col),o.height>0&&o.width>0&&(o.right=o.left+o.width,o.bottom=o.top+o.height,v.push(o))})}),{width:m,height:g,cells:v.sort(r),scale:d,xCoords:p,yCoords:f}}function n(e,t){return e+t}function i(e,t){return t<e.length?e[t]:e[e.length-1]}function o(e){return null!=e.value||e.merged||null!=e.background||null!=e.borderTop||null!=e.borderRight||null!=e.borderBottom||null!=e.borderLeft||null!=e.validation&&!e.validation.value}function r(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 s(e,t,n){function i(i,o){var r,s,l,u,h,p=o*c,v=p+c,_=i*d,b=_+d,w=0,y=0,k=e.cells.filter(function(e){return!(e.right<=p||e.left>=v||e.bottom<=_||e.top>=b)&&(w=Math.max(e.bottom,w),y=Math.max(e.right,y),!0)});k.length>0&&(r=new f.Group,t.append(r),r.clip(f.Path.fromRect(new m.Rect([0,0],[n.pageWidth,n.pageHeight]))),s=new f.Group,r.append(s),l=m.Matrix.scale(e.scale,e.scale).multiplyCopy(m.Matrix.translate(-p,-_)),(n.hCenter||n.vCenter)&&(l=l.multiplyCopy(m.Matrix.translate(n.hCenter?(v-y)/2:0,n.vCenter?(b-w)/2:0))),s.transform(l),n.guidelines&&(u=null,e.xCoords.forEach(function(e){e=Math.min(e,y),e!==u&&e>=p&&e<=v&&(u=e,s.append((new f.Path).moveTo(e,_).lineTo(e,w).close().stroke("#999",g)))}),u=null,e.yCoords.forEach(function(e){e=Math.min(e,w),e!==u&&e>=_&&e<=b&&(u=e,s.append((new f.Path).moveTo(p,e).lineTo(y,e).close().stroke("#999",g)))})),h=new f.Group,k.forEach(function(e){a(e,s,h,n)}),s.append(h))}var o,r,s=Math.ceil(e.width/n.pageWidth),l=Math.ceil(e.height/n.pageHeight),c=n.pageWidth/e.scale,d=n.pageHeight/e.scale;for(o=0;o<s;++o)for(r=0;r<l;++r)i(r,o)}function a(e,t,n,i){var o,r,s,a,c,d,u=new f.Group;if(t.append(u),o=new m.Rect([e.left,e.top],[e.width,e.height]),(e.background||e.merged)&&(r=o,i.guidelines&&(r=o.clone(),r.origin.x+=g/2,r.origin.y+=g/2,r.size.width-=g,r.size.height-=g),u.append(new f.Rect(r).fill(e.background||"#fff").stroke(null))),e.borderLeft&&n.append((new f.Path).moveTo(e.left,e.top).lineTo(e.left,e.bottom).close().stroke(e.borderLeft.color,e.borderLeft.size)),e.borderTop&&n.append((new f.Path).moveTo(e.left,e.top).lineTo(e.right,e.top).close().stroke(e.borderTop.color,e.borderTop.size)),e.borderRight&&n.append((new f.Path).moveTo(e.right,e.top).lineTo(e.right,e.bottom).close().stroke(e.borderRight.color,e.borderRight.size)),e.borderBottom&&n.append((new f.Path).moveTo(e.left,e.bottom).lineTo(e.right,e.bottom).close().stroke(e.borderBottom.color,e.borderBottom.size)),s=e.value,null!=s){if(a="number"==typeof s?"number":null,c=new f.Group,c.clip(f.Path.fromRect(o)),u.append(c),e.format?(d=p.textAndColor(s,e.format),s=d.text,d.type&&(a=d.type)):s+="",!e.textAlign)switch(a){case"number":case"date":case"percent":e.textAlign="right";break;case"boolean":e.textAlign="center"}l(s,d&&d.color||e.color||"#000",e,c)}}function l(e,t,n,i){var o,r;switch(v||(v=document.createElement("div"),v.style.position="absolute",v.style.left="-10000px",v.style.top="-10000px",v.style.overflow="hidden",v.style.boxSizing="border-box",v.style.padding="2px 4px",v.style.lineHeight="normal",document.body.appendChild(v)),v.style.color=t,v.style.font=c(n),v.style.width=n.width+"px",v.style.textAlign=n.textAlign||"left",v.style.textDecoration=n.underline?"underline":"none",n.wrap?(v.style.whiteSpace="pre-wrap",v.style.overflowWrap=v.style.wordWrap="break-word"):(v.style.whiteSpace="pre",v.style.overflowWrap=v.style.wordWrap="normal"),v.firstChild&&v.removeChild(v.firstChild),v.appendChild(document.createTextNode(e)),o=0,n.verticalAlign){case"center":o=n.height-v.offsetHeight>>1;break;case void 0:case null:case"bottom":o=n.height-v.offsetHeight}o<0&&(o=0),r=kendo.drawing.drawDOM.drawText(v),r.transform(m.Matrix.translate(1e4+n.left,1e4+n.top+o)),i.append(r)}function c(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 d(e,n,i,o){var r,a,l,c,d;null==i&&null==o&&(o=n,i={},n=u.SHEETREF),null==o&&(o=i,n instanceof u.Range||n instanceof u.Ref||"string"==typeof n?i={}:(i=n,n=u.SHEETREF)),i=kendo.jQuery.extend({paperSize:"A4",landscape:!0,margin:"1cm",guidelines:!0,emptyCells:!0,fitWidth:!1,center:!1},i),r=new f.Group,a=kendo.pdf.getPaperOptions(i),r.options.set("pdf",{author:i.author,creator:i.creator,date:i.date,keywords:i.keywords,margin:a.margin,multiPage:!0,paperSize:a.paperSize,subject:i.subject,title:i.title}),l=a.paperSize[0],c=a.paperSize[1],a.margin&&(l-=a.margin.left+a.margin.right,c-=a.margin.top+a.margin.bottom),i.pageWidth=l,i.pageHeight=c,d=t(e,e._ref(n),i),s(d,r,i),o(r)}var u,h,f,p,m,g,v;kendo.support.browser.msie&&kendo.support.browser.version<9||(u=kendo.spreadsheet,h=u.CellRef,f=kendo.drawing,p=u.formatting,m=kendo.geometry,g=.8,u.Sheet.prototype.draw=function(e,t,n){var i=this;i._workbook?i.recalc(i._workbook._context,function(){d(i,e,t,n)}):d(i,e,t,n)},u.draw={doLayout:t,drawLayout:s,shouldDrawCell:o})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n,i,o,r,s,a,l,c,d;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=e.ui.Widget,o=e.spreadsheet.Workbook,r=e.spreadsheet.Controller,s=e.spreadsheet.View,a=".kendoSpreadsheet",l={recalc:!0,selection:!0,activeCell:!0,layout:!0,sheetSelection:!0,resize:!0,editorChange:!1,editorClose:!1},c={wrapper:"k-widget k-spreadsheet"},d=e.ui.Widget.extend({init:function(e,t){i.fn.init.call(this,e,t),this.element.addClass(d.classNames.wrapper),this._view=new s(this.element,{messages:this.options.messages.view,toolbar:this.options.toolbar,sheetsbar:this.options.sheetsbar}),this._workbook=new o(this.options,this._view),this._controller=new r(this._view,this._workbook),this._autoRefresh=!0,this._bindWorkbookEvents(),this._view.workbook(this._workbook),this.refresh(),this._resizeHandler=function(){this.resize()}.bind(this),n(window).on("resize"+a,this._resizeHandler)},_resize:function(){this.refresh({layout:!0})},_workbookChange:function(t){if(this._autoRefresh&&this.refresh(t),t.recalc&&t.ref){var n=t.range||new e.spreadsheet.Range(t.ref,this.activeSheet());this.trigger("change",{range:n})}},_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=l),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 o(n.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(n.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 i=n("<div class='k-loading-mask' style='width: 100%; height: 100%; top: 0;'><div class='k-loading-color'/></div>").appendTo(this.element),o=n("<div class='k-loading-progress'>").appendTo(i).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(i),i.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&&n(window).off("resize"+a,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,n){return this._workbook.defineName(e,t,n)},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=l,e.ui.plugin(d),n.extend(!0,d,{classNames:c}))}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pivot.configurator.min",["kendo.dom.min"],e)}(function(){return function(e,t){function n(e){for(var t,n=0,i=e.length;n<i;n++)if(2==e[n].type){t=!0;break}t&&e.splice(n+1,0,{caption:"KPIs",defaultHierarchy:"[KPIs]",name:"KPIs",uniqueName:"[KPIs]"})}function i(e){return{name:e.uniqueName,type:e.type}}function o(e){for(var t=0,n=e.length;t<n;t++)e[t].uniqueName=e[t].name,e[t].type="kpi";return e}function r(t){var n=e(t).closest(".k-pivot-setting");return n.length?n.data("kendoPivotSettingTarget"):null}function s(e,t,n){return{hierarchyUniqueName:e,uniqueName:t,caption:t,measure:t,name:t,type:n,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,f=l.template('<p class="k-reset"><span class="k-icon #=icon#"></span>${name}</p><div class="k-list-container k-reset"/>'),p=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(i){var r,s,l;e.isEmptyObject(i.data)?(r=t.dataSource.schemaDimensions(),r.done(function(e){t.dataSource.cubeBuilder||n(e),i.success(e)}).fail(i.error)):(s=t.treeView.dataSource.get(i.data.uniqueName),"[KPIs]"===s.uniqueName?(l=!0,r=t.dataSource.schemaKPIs(),r.done(function(e){i.success(o(e))}).fail(i.error)):"kpi"==s.type&&(l=!0,i.success(a(s))),l||(r=2==s.type?t.dataSource.schemaMeasures():s.dimensionUniqueName?t.dataSource.schemaLevels(i.data.uniqueName):t.dataSource.schemaHierarchies(i.data.uniqueName),r.done(i.success).fail(i.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),n='# 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:n,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",n=r(e.dropTarget);n&&n.validate(this.dataItem(e.sourceNode))&&(t="k-i-plus"),e.setStatusClass(t)},drop:function(e){var t,n,o,s,l,c;if(e.preventDefault(),t=r(e.dropTarget),n=this.dataItem(e.sourceNode),t&&t.validate(n)){if(c=n.defaultHierarchy||n.uniqueName,"kpi"===n.type)for(l=a(n),s=l.length,c=[],o=0;o<s;o++)c.push(i(l[o]));else n.kpi&&(c=[i(n)]);t.add(c)}}}).data("kendoTreeView")},_createTarget:function(t,n){var i='<li class="k-item k-header" data-'+l.ns+'name="${data.name}">${data.name}',o=n.sortable,r="";return o&&(r+="#if (data.sortIcon) {#",r+='<span class="k-icon ${data.sortIcon}-sm"></span>',r+="#}#"),(n.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>',i+='<span class="k-field-actions">'+r+"</span></li>",new l.ui.PivotSettingTarget(t,e.extend({dataSource:this.dataSource,hint:function(t){var n=e('<div class="k-fieldselector"><ul class="k-list k-reset"></ul></div>');return n.find(".k-list").append(t.clone()),n},template:i,emptyTemplate:'<li class="k-item k-empty">${data}</li>'},n))},_targets:function(){var t=e('<div class="k-state-default"/>').appendTo(this.form),n=e(f({name:this.options.messages.columnsLabel,icon:"k-i-columns"})).appendTo(t),i=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(n.last()),o=e(f({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(f({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(i,{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:i,messages:{empty:this.options.messages.rows,fieldMenu:this.options.messages.fieldMenu}}),this.measures=this._createTarget(a,{setting:"measures",messages:{empty:l.messages.measures}}),i.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,n=this.element,i=this.options.height,o=l._outerHeight;i&&(n.height(i),n.is(":visible")&&(t=n.children(".k-columns").children("div.k-state-default"),i=n.innerHeight(),e=(o(n)-i)/2,i=i-(o(t,!0)-t.height())-e,t.height(i)))},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(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.angular.min",["kendo.core.min"],e)}(function(){return function(e,t,n){"use strict";function i(e){var t=T;try{return T=function(e){return e()},e()}finally{T=t}}function o(t,i,o,c,d,g){function v(){var n,g,v,_,b,x,S;return o.kRebind&&(n=e(e(i)[0].cloneNode(!0))),C=r(t,i,o,c,k).options,i.is("select")&&!function(t){if(t.length>0){var n=e(t[0]);!/\S/.test(n.text())&&/^\?/.test(n.val())&&n.remove()}}(i[0].options),g=k.call(i,E=C).data(c),l(g,t,o,c,d),t.$emit("kendoWidgetCreated",g),v=f(t,g),o.kRebind&&m(g,t,i,n,o.kRebind,v,o),o.kNgDisabled&&(_=o.kNgDisabled,b=t.$eval(_),b&&g.enable(!b),s(g,t,i,_)),o.kNgReadonly&&(x=o.kNgReadonly,S=t.$eval(x),S&&g.readonly(S),a(g,t,i,x)),o.kNgModel&&h(g,t,o.kNgModel),w&&u(g,t,i,w,y),g&&p(g,i),g}var _,b,w,y,k,x,C,S,D,A,M,R,I,F;if(!(i instanceof jQuery))throw Error("The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.");if(_=o.kNgDelay,b=t.$eval(_),g=g||[],w=g[0],y=g[1],k=e(i)[c],!k)return window.console.error("Could not find: "+c),null;if(x=r(t,i,o,c,k),C=x.options,x.unresolved.length){for(S=[],D=0,A=x.unresolved.length;D<A;D++)M=x.unresolved[D],R=e.Deferred(function(e){var i=t.$watch(M.path,function(t){t!==n&&(i(),e.resolve())})}).promise(),S.push(R);return e.when.apply(null,S).then(v),n}return _&&!b?(I=t.$root||t,F=function(){var e=t.$watch(_,function(t){t!==n&&(e(),i.removeAttr(o.$attr.kNgDelay),_=null,T(v))})},/^\$(digest|apply)$/.test(I.$$phase)?F():t.$apply(F),n):v()}function r(i,o,r,s,a){function l(e,o){var r=t.copy(i.$eval(o));r===n?p.push({option:e,path:o}):c[e]=r}var c,d,u,h,f=s.replace(/^kendo/,""),p=[],m=r.kOptions||r.options,g=i.$eval(m);return m&&g===n&&p.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 n,i,o,r;"source"!==e&&"kDataSource"!==e&&"kScopeField"!==e&&"scopeField"!==e&&(n="data"+e.charAt(0).toUpperCase()+e.slice(1),0===e.indexOf("on")&&(i=e.replace(/^on./,function(e){return e.charAt(2).toLowerCase()}),u.indexOf(i)>-1&&(c[i]=t)),d.hasOwnProperty(n)?l(n,t):d.hasOwnProperty(e)&&!I[e]?l(e,t):R[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=M(i,o,f,h)),c.$angular=[i],{options:c,unresolved:p}}function s(e,t,i,o){return kendo.ui.PanelBar&&e instanceof kendo.ui.PanelBar||kendo.ui.Menu&&e instanceof kendo.ui.Menu?(A.warn("k-ng-disabled specified on a widget that does not have the enable() method: "+e.options.name),n):(t.$watch(o,function(t,n){t!=n&&e.enable(!t)}),n)}function a(e,t,i,o){return"function"!=typeof e.readonly?(A.warn("k-ng-readonly specified on a widget that does not have the readonly() method: "+e.options.name),n):(t.$watch(o,function(t,n){t!=n&&e.readonly(t)}),n)}function l(e,t,n,i,o){if(n[o]){var r=S(n[o]).assign;if(!r)throw Error(o+" attribute used but expression in it is not assignable: "+n[i]);r(t,e)}}function c(e){return/checkbox|radio/i.test(e.attr("type"))?e.prop("checked"):e.val()}function d(e){return F.test(e[0].tagName)}function u(e,t,i,o,r){var s,a,l,u,h;e.value&&(a=!1,s=d(i)?function(){return c(i)}:function(){return e.value()},l=function(){var i=o.$viewValue;i===n&&(i=o.$modelValue),i===n&&(i=null),a=!0,setTimeout(function(){if(a=!1,e){var n=t[e.element.attr("k-ng-model")];n&&(i=n),e.options.autoBind!==!1||e.listView.bound()?e.value(i):i&&e.value(i)}},0)},o.$render=l,setTimeout(function(){o.$render!==l&&(o.$render=l)()}),d(i)&&i.on("change",function(){a=!0}),u=function(e){return function(){var n;a||(e&&r&&(n=r.$pristine),o.$setViewValue(s()),e&&(o.$setPristine(),n&&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,i,o){var r,s,a,l,c,d,u,h,f,p;return"function"!=typeof t.value?(A.warn("k-ng-model specified on a widget that does not have the value() method: "+t.options.name),n):(r=e(t.element).parents("form"),s=kendo.getter(r.attr("name"),!0)(i),a=S(o),l=a.assign,c=!1,d=kendo.ui.MultiSelect&&t instanceof kendo.ui.MultiSelect,u=function(e){return e&&d?e.length:0},h=u(a(i)),t.$angular_setLogicValue(a(i)),f=function(e,i){e===n&&(e=null),c||e==i&&u(e)==h||(h=u(e),t.$angular_setLogicValue(e))},d?i.$watchCollection(o,f):i.$watch(o,f),p=function(){c=!0,s&&s.$pristine&&s.$setDirty(),w(i,function(){l(i,t.$angular_getLogicValue()),h=u(a(i))}),c=!1},t.first("change",p),t.first("spin",p),n)}function f(e,t){var n=e.$on("$destroy",function(){n(),t&&(kendo.destroy(t.element),t=null)});return n}function p(t,n){function i(){s.disconnect()}function o(){s.observe(e(n)[0],{attributes:!0})}var r,s;window.MutationObserver&&t.wrapper&&(r=[].slice.call(e(n)[0].classList),s=new MutationObserver(function(n){i(),t&&(n.forEach(function(n){var i,o=e(t.wrapper)[0];switch(n.attributeName){case"class":i=[].slice.call(n.target.classList),i.forEach(function(e){r.indexOf(e)<0&&(o.classList.add(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.add(e))}),r.forEach(function(e){i.indexOf(e)<0&&(o.classList.remove(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.remove(e))}),r=i;break;case"disabled":"function"!=typeof t.enable||t.element.attr("readonly")||t.enable(!e(n.target).attr("disabled"));break;case"readonly":"function"!=typeof t.readonly||t.element.attr("disabled")||t.readonly(!!e(n.target).attr("readonly"))}}),o())}),o(),t.first("destroy",i))}function m(t,n,i,o,r,s,a){var l=n.$watch(r,function(r,c){var d,u,h,f,p;t._muteRebind||r===c||(l(),a._cleanUp&&a._cleanUp(),d=H[t.options.name],d&&d.forEach(function(t){var i=n.$eval(a["k"+t]);i&&o.append(e(i).attr(kendo.toHyphens("k"+t),""))}),u=e(t.wrapper)[0],h=e(t.element)[0],f="Upload"===t.options.name,f&&(i=e(h)),p=i.injector().get("$compile"),t._destroy(),s&&s(),t=null,h&&(u&&u.parentNode.replaceChild(h,u),e(i).replaceWith(o)),p(o)(n))},!0);w(n)}function g(e,t){return function(n,i){return e.call(t,n,i)}}function v(e,t){this[e]=kendo.stringify(t)}function _(e,n){function i(e,t){x.directive(e,["directiveFactory",function(n){return n.create(t,e)}])}var o,r,s,a,l=n?"Mobile":"";l+=e.fn.options.name,o=l,r="kendo"+l.charAt(0)+l.substr(1).toLowerCase(),l="kendo"+l,s=l.replace(/([A-Z])/g,"-$1"),P.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 n=z[o]||"div",i=t.kScopeField||t.scopeField;return"<"+n+" "+s+(i?'="'+i+'"':"")+">"+e.html()+"</"+n+">"}}})})),B.indexOf(l.replace("kendo",""))>-1||(i(l,l),r!=l&&i(r,l))}function 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 n=e.$root||e,i=/^\$(digest|apply)$/.test(n.$$phase);t?i?t():n.$apply(t):i||n.$digest()}function y(t,n){t.$destroy(),n&&e(n).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function k(n,i,o){var r,s,a;if(e.isArray(n))return t.forEach(n,function(e){k(e,i,o)});if("string"==typeof n){for(r=n.split("."),s=kendo;s&&r.length>0;)s=s[r.shift()];if(!s)return L.push([n,i,o]),!1;n=s.prototype}return a=n[i],n[i]=function(){var e=this,t=arguments;return o.apply({self:e,next:function(){return a.apply(e,arguments.length>0?arguments:t)}},t)},!0}var x,C,S,T,D,A,E,M,R,I,F,z,P,B,L,H;t&&t.injector&&(x=t.module("kendo.directives",[]),C=t.injector(["ng"]),S=C.get("$parse"),T=C.get("$timeout"),A=C.get("$log"),M=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(n,i,o,r){var s=e[o]||"DataSource",a=n.$eval(r),l=t(a,s);return n.$watch(r,function(e){var n,o=b(i);o&&"function"==typeof o.setDataSource&&e!==a&&(n=t(e,s),o.setDataSource(n),a=e)}),l}}(),R={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},I={name:!0,title:!0,style:!0},F=/^(input|select|textarea)$/i,x.factory("directiveFactory",["$compile",function(t){var n,i,r=!1;return D=t,i=function(t,i){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,i,c),d&&(n&&clearTimeout(n),n=setTimeout(function(){s.$emit("kendoRendered"),r||(r=!0,e("form").each(function(){var t=e(this).controller("form");t&&t.$setPristine()}))}))}}},{create:i}}]),z={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"},P=["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,n,i){o(t,n,i,e,e)}}})}),L=[],kendo.onWidgetRegistered(function(t){L=e.grep(L,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)),n):(s=a.$angular_scope,s&&i(function(){var i,l,c=r(),d=c.elements,u=c.data;if(d.length>0)switch(o){case"cleanup":t.forEach(d,function(t){var n=e(t).data("$$kendoScope");n&&n!==s&&n.$$kendoScope&&y(n,t)});break;case"compile":i=a.element.injector(),l=i?i.get("$compile"):D,t.forEach(d,function(t,i){var o,r;c.scopeFrom?o=c.scopeFrom:(r=u&&u[i],r!==n?(o=e.extend(s.$new(),r),o.$$kendoScope=!0):o=s),e(t).data("$$kendoScope",o),l(t)(o)}),w(s)}}),n)}),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,i=t.options,o=i.dataValueField,r=i.text||"";e===n&&(e=""),o&&!i.valuePrimitive&&e&&(r=e[i.dataTextField]||"",e=e[o||i.dataTextField]),t.options.autoBind!==!1||t.listView.bound()?t.value(e):!r&&e&&i.valuePrimitive?t.value(e):t._preselect(e,r)}),k("ui.MultiSelect","$angular_getLogicValue",function(){var t=this.self.dataItems().slice(0),n=this.self.options.dataValueField;return n&&this.self.options.valuePrimitive&&(t=e.map(t,function(e){return e[n]})),t}),k("ui.MultiSelect","$angular_setLogicValue",function(t){var n,i,o,r;null==t&&(t=[]),n=this.self,i=n.options,o=i.dataValueField,r=t,o&&!i.valuePrimitive&&(t=e.map(t,function(e){return e[o]})),i.autoBind!==!1||i.valuePrimitive||n.listView.bound()?n.value(t):n._preselect(r,t)}),k("ui.AutoComplete","$angular_getLogicValue",function(){var e,t,n,i,o,r=this.self.options,s=this.self.value().split(r.separator),a=r.valuePrimitive,l=this.self.listView.selectedDataItems(),c=[];for(e=0,t=l.length;e<t;e++)for(n=l[e],i=r.dataTextField?n[r.dataTextField]:n,o=0;o<s.length;o++)if(i===s[o]){c.push(a?i:n.toJSON());break}return c}),k("ui.AutoComplete","$angular_setLogicValue",function(t){null==t&&(t=[]);var i=this.self,o=i.options.dataTextField;o&&!i.options.valuePrimitive&&(t=t.length!==n?e.map(t,function(e){return e[o]}):t[o]),i.value(t)}),k("ui.Widget","$angular_init",function(t,n){var i,o,r,s,a=this.self;if(n&&!e.isArray(n))for(i=a.$angular_scope,o=a.events.length;--o>=0;)r=a.events[o],s=n[r],s&&"string"==typeof s&&(n[r]=a.$angular_makeEventHandler(r,i,s))}),k("ui.Widget","$angular_makeEventHandler",function(e,t,n){return n=S(n),function(e){w(t,function(){n(t,{kendoEvent:e})})}}),k(["ui.Grid","ui.ListView","ui.TreeView","ui.PanelBar"],"$angular_makeEventHandler",function(e,n,i){return"change"!=e?this.next():(i=S(i),function(e){var o,r,s,a,l,c,d,u,h,f=e.sender,p=f.options,m={kendoEvent:e};for(t.isString(p.selectable)&&(o=p.selectable.indexOf("cell")!==-1,r=p.selectable.indexOf("multiple")!==-1),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=f.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(n,function(){i(n,m)})})}),k("ui.Grid","$angular_init",function(i,o){if(this.next(),o.columns){var r=e.extend({},kendo.Template,o.templateSettings);t.forEach(o.columns,function(e){!e.field||e.template||e.format||e.values||e.encoded!==n&&!e.encoded||(e.template="<span ng-bind='"+kendo.expr(e.field,"dataItem")+"'>#: "+kendo.expr(e.field,r.paramName)+"#</span>")})}}),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,n){o(e,t,n,"kendoMobileApplication","kendoMobileApplication")}}}).directive("kendoMobileView",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileView","kendoMobileView")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileDrawer",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileDrawer","kendoMobileDrawer")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileModalView",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileModalView","kendoMobileModalView")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileSplitView",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=o(e,t,n,"kendoMobileSplitView","kendoMobileSplitView")},post:function(e,t,n){n._instance._layout()}}}}).directive("kendoMobilePane",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,o(e,t,n,"kendoMobilePane","kendoMobilePane")}}}}).directive("kendoMobileLayout",function(){return{link:{pre:function(e,t,n){o(e,t,n,"kendoMobileLayout","kendoMobileLayout")}}}}).directive("kendoMobileActionSheet",function(){return{restrict:"A",link:function(t,n,i){n.find("a[k-action]").each(function(){e(this).attr("data-"+kendo.ns+"action",e(this).attr("k-action"))}),o(t,n,i,"kendoMobileActionSheet","kendoMobileActionSheet")}}}).directive("kendoMobilePopOver",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,o(e,t,n,"kendoMobilePopOver","kendoMobilePopOver")}}}}).directive("kendoViewTitle",function(){return{restrict:"E",replace:!0,template:function(e){return"<span data-"+kendo.ns+"role='view-title'>"+e.html()+"</span>"}}}).directive("kendoMobileHeader",function(){return{restrict:"E",link:function(e,t){t.addClass("km-header").attr("data-role","header")}}}).directive("kendoMobileFooter",function(){return{restrict:"E",link:function(e,t){t.addClass("km-footer").attr("data-role","footer")}}}).directive("kendoMobileScrollViewPage",function(){return{restrict:"E",replace:!0,template:function(e){return"<div data-"+kendo.ns+"role='page'>"+e.html()+"</div>"}}}),t.forEach(["align","icon","rel","transition","actionsheetContext"],function(e){var t="k"+e.slice(0,1).toUpperCase()+e.slice(1);x.directive(t,function(){return{restrict:"A",priority:2,link:function(n,i,o){i.attr(kendo.attr(kendo.toHyphens(e)),n.$eval(o[t]))}}})}),H={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(H,function(n,i){t.forEach(n,function(t){e[t]||(e[t]=[]),e[t].push("?^^kendo"+i)})}),t.forEach(e,function(e,t){var n="k"+t,i=kendo.toHyphens(n);x.directive(n,function(){return{restrict:"A",require:e,terminal:!0,compile:function(t,o){if(""===o[n]){t.removeAttr(i);var r=t[0].outerHTML;return function(t,o,s,a){for(var l;!l&&a.length;)l=a.shift();l?(l.template(n,r),o.remove()):A.warn(i+" 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,n){(n||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.button.min","kendo.pager.min","kendo.popup.min","kendo.notification.min","kendo.tooltip.min","kendo.list.min","kendo.calendar.min","kendo.datepicker.min","kendo.autocomplete.min","kendo.dropdownlist.min","kendo.combobox.min","kendo.multiselect.min","kendo.colorpicker.min","kendo.columnmenu.min","kendo.columnsorter.min","kendo.grid.min","kendo.listview.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,n){(n||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 n(e,n){var i,o,r=t(n)?n:[n];for(i=0;i<r.length;i++)o=r[i],e.className.indexOf(o)===-1&&(e.className+=" "+o)}function i(e,t){e&&e.className&&(e.className=e.className.replace(t,"").replace(st," "))}function o(e){var t,n=.5;for(e.options.stroke&&kendo.drawing.util.defined(e.options.stroke.width)&&e.options.stroke.width%2===0&&(n=0),t=0;t<e.segments.length;t++)e.segments[t].anchor().round(0).translate(n,n);return e}function r(e,t){return-e.x*t.y+e.y*t.x<0}function s(e){return"object"==typeof e}function a(e){return typeof e===tt}function l(e){return"number"==typeof e&&!isNaN(e)}function c(e){return l(e)?e+"px":e}function d(e){return at.test(e)}function u(e,n){var i,o,r,l,u,h=a(n)?[n]:n;
if(t(h)){for(i={},o=window.getComputedStyle(e),r=0;r<h.length;r++)l=h[r],i[l]=d(l)?parseFloat(o[l]):o[l];return i}if(s(n))for(u in n)e.style[u]=c(n[u])}function h(e,t){void 0===t&&(t=0);var n={top:0,right:0,bottom:0,left:0};return"number"==typeof e?n[Ae]=n[Re]=n[Ee]=n[Me]=e:(n[Ae]=e[Ae]||t,n[Re]=e[Re]||t,n[Ee]=e[Ee]||t,n[Me]=e[Me]||t),n}function f(e,t){var n,i=e.length,o=[];for(n=0;n<i;n++)t(e[n])&&o.push(e[n]);return o}function p(e,t){var n,i;if(e.className)for(n=t.split(" "),i=0;i<n.length;i++)if(e.className.indexOf(n[i])!==-1)return!0}function m(e,t){if(t)return t.indexOf(e)!==-1}function g(e,t,n){return kendo.drawing.util.round(e+(t-e)*n,Pe)}function v(e){return"function"==typeof e}function _(e,t){var n,i,o=e.length,r=[];for(n=0;n<o;n++)i=t(e[n]),kendo.drawing.util.defined(i)&&r.push(i);return r}function b(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 w(e,t){var n=e.prototype;n.options=n.options?Ce({},n.options,t):t}function y(e){var t,n,i,o=Be,r=Le;for(t=0,n=e.length;t<n;t++)i=e[t],null!==i&&isFinite(i)&&(o=Math.min(o,i),r=Math.max(r,i));return{min:o===Be?void 0:o,max:r===Le?void 0:r}}function k(e,t,n,i,o){var r=yt(o);return new Tt(n+(e-n)*Math.cos(r)+(t-i)*Math.sin(r),i-(e-n)*Math.sin(r)+(t-i)*Math.cos(r))}function x(e,t){return e-t}function C(e,t){var n,i,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:(n=Math.min(e.x1,t.x1),i=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 Dt(i,s,o,a),d[1]=new Dt(n,a,i,l),d[2]=new Dt(o,a,r,l),d[3]=new Dt(i,l,o,c),e.x1===n&&e.y1===s||t.x1===n&&t.y1===s?(d[4]=new Dt(n,s,i,a),d[5]=new Dt(o,l,r,c)):(d[4]=new Dt(o,s,r,a),d[5]=new Dt(n,l,i,c)),f(d,function(e){return e.height()>0&&e.width()>0})[0])}function S(t){var n,i,o=t.stops,r=t.innerRadius/t.radius*100,s=o.length,a=[];for(n=0;n<s;n++)i=e.extend({},o[n]),i.offset=(i.offset*(100-r)+r)/100,a.push(i);return a}function T(e){var t=e.origin,n=e.bottomRight();return new Dt(t.x,t.y,n.x,n.y)}function D(e,t){var n=e.tickX,i=e.tickY,r=e.position,s=new me({stroke:{width:t.width,color:t.color}});return e.vertical?s.moveTo(n,r).lineTo(n+t.size,r):s.moveTo(r,i).lineTo(r,i+t.size),o(s),s}function A(e,t){var n=e.lineStart,i=e.lineEnd,r=e.position,s=new me({stroke:{width:t.width,color:t.color,dashType:t.dashType}});return e.vertical?s.moveTo(n,r).lineTo(i,r):s.moveTo(r,n).lineTo(r,i),o(s),s}function E(e,t){var n=e.getTime()-t,i=e.getTimezoneOffset()-t.getTimezoneOffset();return n-i*bn}function M(e,t){return new Date(e.getTime()+t)}function R(e){var t;return e instanceof Date?t=e:e&&(t=new Date(e)),t}function I(e,t){var n,i;if(void 0===t&&(t=0),n=0,i=e.getDay(),!isNaN(i))for(;i!==t;)0===i?i=6:i--,n++;return M(e,-n*yn)}function F(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function z(e,t){var n,i=new Date(e);return i.setMinutes(0,0,0),n=(e.getTimezoneOffset()-i.getTimezoneOffset())*bn,M(i,n+t*wn)}function P(e,t,n,i){var o,r,s=e;return e&&(o=R(e),r=o.getHours(),n===gn?(s=new Date(o.getFullYear()+t,0,1),F(s,0)):n===mn?(s=new Date(o.getFullYear(),o.getMonth()+t,1),F(s,r)):n===pn?(s=P(I(o,i),7*t,fn),F(s,r)):n===fn?(s=new Date(o.getFullYear(),o.getMonth(),o.getDate()+t),F(s,r)):n===hn?s=z(o,t):n===un?(s=M(o,t*bn),s.getSeconds()>0&&s.setSeconds(0)):n===dn?s=M(o,t*_n):n===cn&&(s=M(o,t)),n!==cn&&s.getMilliseconds()>0&&s.setMilliseconds(0)),s}function B(e,t,n){return P(R(e),0,t,n)}function L(e,t,n){var i=R(e);return i&&B(i,t,n).getTime()===i.getTime()?i:P(i,1,t,n)}function H(e,t){return e&&t?e.getTime()-t.getTime():-1}function N(e,t){return e.getTime()-t}function O(e){var n,i;if(t(e)){for(n=[],i=0;i<e.length;i++)n.push(O(e[i]));return n}if(e)return R(e).getTime()}function V(e,t){return e&&t?O(e)===O(t):e===t}function U(e,t,n){return E(e,t)/Sn[n]}function W(e,t,n,i){var o,r=R(e),s=R(t);return o=n===mn?r.getMonth()-s.getMonth()+12*(r.getFullYear()-s.getFullYear())+U(r,new Date(r.getFullYear(),r.getMonth()),fn)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():n===gn?r.getFullYear()-s.getFullYear()+W(r,new Date(r.getFullYear(),0),mn,1)/12:n===fn||n===pn?U(r,s,n):N(r,t)/Sn[n],o/i}function j(e,t,n){var i;return i=n===gn?t.getFullYear()-e.getFullYear():n===mn?12*j(e,t,gn)+t.getMonth()-e.getMonth():n===fn?Math.floor(N(t,e)/yn):Math.floor(N(t,e)/Sn[n])}function q(e,t){for(var n,i,o=0,r=t.length-1;o<=r;)if(n=Math.floor((o+r)/2),i=t[n],i<e)o=n+1;else{if(!(i>e)){for(;V(t[n-1],e);)n--;return n}r=n-1}return t[n]<=e?n:n-1}function G(e,t){var n;return n=a(t)?e.parseDate(t)||R(t):R(t)}function $(e,n){var i,o;if(t(n)){for(i=[],o=0;o<n.length;o++)i.push(G(e,n[o]));return i}return G(e,n)}function Y(e,t){var n,i,o,r=kt(t-e,We-1);if(0===r){if(0===t)return.1;r=Math.abs(t)}return n=Math.pow(10,Math.floor(Math.log(r)/Math.log(10))),i=kt(r/n,We),o=1,o=i<1.904762?.2:i<4.761904?.5:i<9.523809?1:2,kt(n*o,We)}function K(e,t,n){var i,o,r;if(!e&&!t)return 0;if(e>=0&&t>=0){if(o=e===t?0:e,r=(t-o)/t,n===!1||!n&&r>An)return 0;i=Math.max(0,o-(t-o)/2)}else i=e;return i}function Q(e,t,n){var i,o,r;if(!e&&!t)return 1;if(e<=0&&t<=0){if(o=e===t?0:t,r=Math.abs((o-e)/o),n===!1||!n&&r>An)return 0;i=Math.min(0,o-(e-o)/2)}else i=t;return i}function X(e,t){return kt(Math.floor(e/t)*t,We)}function Z(e,t){return kt(Math.ceil(e/t)*t,We)}function J(e){return Math.max(Math.min(e,Tn),-Tn)}function ee(e,t,n){var i=n.narrowRange,o=K(e,t,i),r=Q(e,t,i),s=Y(o,r),a={majorUnit:s};return n.roundToMajorUnit!==!1&&(o<0&&ie(o,s,1/3)&&(o-=s),r>0&&ie(r,s,1/3)&&(r+=s)),a.min=X(o,s),a.max=Z(r,s),a}function te(e,t){return{min:ht(t.min)?Math.min(e.min,t.min):e.min,max:ht(t.max)?Math.max(e.max,t.max):e.max,majorUnit:e.majorUnit}}function ne(e,t){var n,i=t;return t&&(n=ht(t.min)||ht(t.max),n&&t.min===t.max&&(t.min>0?t.min=0:t.max=1),t.majorUnit?(e.min=X(e.min,t.majorUnit),e.max=Z(e.max,t.majorUnit)):n&&(i=Ce(e,t),e.majorUnit=Y(i.min,i.max))),e.minorUnit=(i.majorUnit||e.majorUnit)/5,Ce(e,i)}function ie(e,t,n){var i=kt(Math.abs(e%t),We),o=t*(1-n);return 0===i||i>o}function oe(e){var t=hn;return e>=Cn?t=gn:e>=xn?t=mn:e>=kn?t=pn:e>=yn&&(t=fn),t}function re(e,t,n){var i=n.min||e,o=n.max||t,r=n.baseUnit||(o&&i?oe(E(o,i)):hn),s=Sn[r],a=B(O(i)-1,r)||R(o),l=L(O(o)+1,r),c=n.majorUnit?n.majorUnit:void 0,d=c||Z(Y(a.getTime(),l.getTime()),s)/s,u=j(a,l,r),h=Z(u,d),f=h-u,p=Math.floor(f/2),m=f-p;return n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||r,n.min=n.min||P(a,-p,r),n.max=n.max||P(l,m,r),n.minorUnit=n.minorUnit||d/5,n.majorUnit=d,n}function se(e,t,n,i){var o=n.min,r=n.max;return ht(n.axisCrossingValue)&&n.axisCrossingValue<=0&&ce(),ht(i.max)?i.max<=0&&ce():r=t,ht(i.min)?i.min<=0&&ce():o=e,{min:o,max:r}}function ae(e,t,n){var i=n.majorUnit,o=e;return e<=0?o=t<=1?Math.pow(i,-2):1:n.narrowRange||(o=Math.pow(i,Math.floor(de(e,i)))),o}function le(e,t){var n,i=kt(de(e,t),We)%1;return n=e<=0?t:0!==i&&(i<.3||i>.9)?Math.pow(t,de(e,t)+.2):Math.pow(t,Math.ceil(de(e,t)))}function ce(){throw Error("Non positive values cannot be used for a logarithmic axis")}function de(e,t){return Math.log(e)/Math.log(t)}function ue(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function he(e){return e<=0?-1:1}var fe,pe,me,ge,ve,_e,be,we,ye,ke,xe,Ce,Se,Te,De,Ae,Ee,Me,Re,Ie,Fe,ze,Pe,Be,Le,He,Ne,Oe,Ve,Ue,We,je,qe,Ge,$e,Ye,Ke,Qe,Xe,Ze,Je,et,tt,nt,it,ot,rt,st,at,lt,ct,dt,ut,ht,ft,pt,mt,gt,vt,_t,bt,wt,yt,kt,xt,Ct,St,Tt,Dt,At,Et,Mt,Rt,It,Ft,zt,Pt,Bt,Lt,Ht,Nt,Ot,Vt,Ut,Wt,jt,qt,Gt,$t,Yt,Kt,Qt,Xt,Zt,Jt,en,tn,nn,on,rn,sn,an,ln,cn,dn,un,hn,fn,pn,mn,gn,vn,_n,bn,wn,yn,kn,xn,Cn,Sn,Tn,Dn,An,En,Mn,Rn,In,Fn,zn,Pn,Bn,Ln,Hn,Nn,On,Vn,Un,Wn,jn,qn,Gn;window.kendo.dataviz=window.kendo.dataviz||{},fe=kendo.drawing,pe=fe.util,me=fe.Path,ge=fe.Group,ve=kendo.Class,_e=kendo.geometry,be=_e.Rect,we=_e.Circle,ye=_e.transform,ke=_e.Segment,xe=kendo.dataviz,Ce=kendo.deepExtend,Se=kendo.getter,Te="x",De="y",Ae="top",Ee="bottom",Me="left",Re="right",Ie="center",Fe="width",ze="height",Pe=3,Be=Number.MAX_VALUE,Le=-Number.MAX_VALUE,He=600,Ne=400,Oe="#fff",Ve="#000",Ue="12px sans-serif",We=10,je="axisLabelClick",qe="noteClick",Ge="noteHover",$e="outside",Ye="none",Ke="circle",Qe="triangle",Xe="cross",Ze="arc",Je="inside",et="value",tt="string",nt="object",it="date",ot=/\{\d+:?/,rt={X:Te,Y:De,WIDTH:Fe,HEIGHT:ze,DEFAULT_HEIGHT:Ne,DEFAULT_WIDTH:He,TOP:Ae,LEFT:Me,BOTTOM:Ee,RIGHT:Re,CENTER:Ie,COORD_PRECISION:Pe,DEFAULT_PRECISION:We,CIRCLE:Ke,TRIANGLE:Qe,CROSS:Xe,MAX_VALUE:Be,MIN_VALUE:Le,WHITE:Oe,BLACK:Ve,DEFAULT_FONT:Ue,AXIS_LABEL_CLICK:je,OUTSIDE:$e,INSIDE:Je,NONE:Ye,NOTE_CLICK:qe,NOTE_HOVER:Ge,VALUE:et,STRING:tt,OBJECT:nt,DATE:it,ARC:Ze,FORMAT_REGEX:ot},st=/\s+/g,at=/width|height|top|left|bottom|right/i,lt=ve.extend({init:function(e,t){this.observer=e,this.handlerMap=Ce({},this.handlerMap,t)},trigger:function(e,t){var n,i=this,o=i.observer,r=i.handlerMap;return r[e]?n=o[r[e]](t):o.trigger&&(n=o.trigger(e,t)),n},requiresHandlers:function(e){var t,n=this;if(this.observer.requiresHandlers)return this.observer.requiresHandlers(e);for(t=0;t<e.length;t++)if(n.handlerMap[e[t]])return!0}}),ct=kendo.drawing.util,dt=ct.append,ut=ct.bindEvents,ht=ct.defined,ft=ct.deg,pt=ct.elementOffset,mt=ct.elementSize,gt=ct.eventElement,vt=ct.eventCoordinates,_t=ct.last,bt=ct.limitValue,wt=ct.objectKey,yt=ct.rad,kt=ct.round,xt=ct.unbindEvents,Ct=ct.valueOrDefault,St=ve.extend({}),St.fetchFonts=function(e,t,n){void 0===n&&(n={depth:0});var i=5;!e||n.depth>i||!document.fonts||Object.keys(e).forEach(function(i){var o=e[i];"dataSource"!==i&&"$"!==i[0]&&o&&("font"===i?t.push(o):"object"==typeof o&&(n.depth++,St.fetchFonts(o,t,n),n.depth--))})},St.loadFonts=function(e,t){var n=[];if(e.length>0&&document.fonts){try{n=e.map(function(e){return document.fonts.load(e)})}catch(i){kendo.logToConsole(i)}Promise.all(n).then(t,t)}else t()},St.preloadFonts=function(e,t){var n=[];St.fetchFonts(e,n),St.loadFonts(n,t)},Tt=ve.extend({init:function(e,t){this.x=e||0,this.y=t||0},clone:function(){return new Tt(this.x,this.y)},equals:function(e){return e&&this.x===e.x&&this.y===e.y},rotate:function(e,t){var n=yt(t),i=Math.cos(n),o=Math.sin(n),r=e.x,s=e.y,a=this,l=a.x,c=a.y;return this.x=kt(r+(l-r)*i+(c-s)*o,Pe),this.y=kt(s+(c-s)*i-(l-r)*o,Pe),this},multiply:function(e){return this.x*=e,this.y*=e,this},distanceTo:function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}}),Tt.onCircle=function(e,t,n){var i=yt(t);return new Tt(e.x-n*Math.cos(i),e.y-n*Math.sin(i))},Dt=ve.extend({init:function(e,t,n,i){this.x1=e||0,this.y1=t||0,this.x2=n||0,this.y2=i||0},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 n=this.height(),i=this.width();return ht(e)&&(this.x1=e,this.x2=this.x1+i),ht(t)&&(this.y1=t,this.y2=this.y1+n),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 n=t(e),i=n?e[0]:e.x,o=n?e[1]:e.y;return this.wrap(new Dt(i,o,i,o)),this},snapTo:function(e,t){return t!==Te&&t||(this.x1=e.x1,this.x2=e.x2),t!==De&&t||(this.y1=e.y1,this.y2=e.y2),this},alignTo:function(e,t){var n,i,o=this.height(),r=this.width(),s=t===Ae||t===Ee?De:Te,a=s===De?o:r;return t===Ie?(n=e.center(),i=this.center(),this.x1+=n.x-i.x,this.y1+=n.y-i.y):this[s+1]=t===Ae||t===Me?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=h(e);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},unpad:function(e){var t=h(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 Dt(this.x1,this.y1,this.x2,this.y2)},center:function(){return new Tt(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 Tt(this.x1,this.y1),new Tt(this.x2,this.y1),new Tt(this.x2,this.y2),new Tt(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(),n=this.height(),i=this.center(),o=i.x,r=i.y,s=k(0,0,o,r,e),a=k(t,0,o,r,e),l=k(t,n,o,r,e),c=k(0,n,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),n=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+n,this},toRect:function(){return new be([this.x1,this.y1],[this.width(),this.height()])},hasSize:function(){return 0!==this.width()&&0!==this.height()},align:function(e,t,n){var i=t+1,o=t+2,r=t===Te?Fe:ze,s=this[r]();m(n,[Me,Ae])?(this[i]=e[i],this[o]=this[i]+s):m(n,[Re,Ee])?(this[o]=e[o],this[i]=this[o]-s):n===Ie&&(this[i]=e[i]+(e[r]()-s)/2,this[o]=this[i]+s)}}),At=ve.extend({init:function(e,t,n,i,o){this.center=e,this.innerRadius=t,this.radius=n,this.startAngle=i,this.angle=o},clone:function(){return new At(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 n=yt(e),i=Math.cos(n),o=Math.sin(n),r=t?this.innerRadius:this.radius,s=kt(this.center.x-i*r,Pe),a=kt(this.center.y-o*r,Pe);return new Tt(s,a)},adjacentBox:function(e,t,n){var i=this.clone().expand(e),o=i.middle(),r=i.point(o),s=t/2,a=n/2,l=Math.sin(yt(o)),c=Math.cos(yt(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 Dt(d,u,d+t,u+n)},containsPoint:function(e){var t=this.center,n=this.innerRadius,i=this.radius,o=this.startAngle,s=this.startAngle+this.angle,a=e.x-t.x,l=e.y-t.y,c=new Tt(a,l),d=this.point(o),u=new Tt(d.x-t.x,d.y-t.y),h=this.point(s),f=new Tt(h.x-t.x,h.y-t.y),p=kt(a*a+l*l,Pe);return(u.equals(c)||r(u,c))&&!r(f,c)&&p>=n*n&&p<=i*i},getBBox:function(){var e,t,n,i=this,o=new Dt(Be,Be,Le,Le),r=kt(this.startAngle%360),s=kt((r+this.angle)%360),a=this.innerRadius,l=[0,90,180,270,r,s].sort(x),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++)n=i.point(e[t]),o.wrapPoint(n),o.wrapPoint(n,a);return a||o.wrapPoint(this.center),o},expand:function(e){return this.radius+=e,this}}),Et=At.extend({init:function(e,t,n,i){At.fn.init.call(this,e,0,t,n,i)},expand:function(e){return At.fn.expand.call(this,e)},clone:function(){return new Et(this.center,this.radius,this.startAngle,this.angle)},setRadius:function(e){return this.radius=e,this}}),Mt=ve.extend({createRing:function(e,t){var n,i=e.startAngle+180,o=e.angle+i,r=new _e.Point(e.center.x,e.center.y),s=Math.max(e.radius,0),a=Math.max(e.innerRadius,0),l=new _e.Arc(r,{startAngle:i,endAngle:o,radiusX:s,radiusY:s}),c=me.fromArc(l,t).close();return a?(l.radiusX=l.radiusY=a,n=l.pointAt(o),c.lineTo(n.x,n.y),c.arc(o,i,a,a,!0)):c.lineTo(r.x,r.y),c}}),Mt.current=new Mt,Rt=ve.extend({init:function(e){this.children=[],this.options=Ce({},this.options,e)},reflow:function(e){var t,n,i,o=this.children;for(n=0;n<o.length;n++)i=o[n],i.reflow(e),t=t?t.wrap(i.box):i.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 n,i=this.children,o=i.length;for(n=0;n<o;n++)i[n].box.translate(e,t)},append:function(){var e,t,n=arguments,i=this;for(e=0;e<arguments.length;e++)t=n[e],i.children.push(t),t.parent=i},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,n=t.length;for(e=0;e<n;e++)t[e].renderVisual()},createVisual:function(){this.visual=new ge({zIndex:this.options.zIndex,visible:Ct(this.options.visible,!0)})},createAnimation:function(){this.visual&&(this.animation=fe.Animation.create(this.visual,this.options.animation))},appendVisual:function(e){e.chartElement||(e.chartElement=this),e.options.noclip?this.clipRoot().visual.append(e):ht(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,n,i,o=e.options.zIndex||0,r=this.visual.children,s=r.length;for(t=0;t<s&&(n=r[t],i=Ct(n.options.zIndex,0),!(i>o));t++);this.visual.insert(t,e)},traverse:function(e){var t,n,i=this.children,o=i.length;for(t=0;t<o;t++)n=i[t],e(n),n.traverse&&n.traverse(e)},closest:function(e){for(var t=this,n=!1;t&&!n;)n=e(t),n||(t=t.parent);if(n)return t},renderComplete:function(){},hasHighlight:function(){var e=(this.options||{}).highlight;return!(!this.createHighlight||e&&e.visible===!1)},toggleHighlight:function(t){var n,i=this,o=(this.options||{}).highlight,r=(o||{}).visual,s=this._highlight;if(!s){if(n={fill:{color:Oe,opacity:.2},stroke:{color:Oe,width:1,opacity:.2}},r){if(s=this._highlight=r(e.extend(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(n)},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(n);s.options.zIndex=this.options.zIndex,this.appendVisual(s)}s.visible(t)},createGradientOverlay:function(t,n,i){var o=new me(e.extend({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},n));return o.segments.elements(t.segments.elements()),o},createGradient:function(e){if(this.parent)return this.parent.createGradient(e)}}),Rt.prototype.options={},It=Rt.extend({init:function(e){Rt.fn.init.call(this,e),this.options.margin=h(this.options.margin),this.options.padding=h(this.options.padding)},reflow:function(e){var t,n,i,o,r=this,s=this.options,a=s.width,l=s.height,c=s.shrinkToFit,d=a&&l,u=s.margin,h=s.padding,f=s.border.width,p=function(){r.align(e,Te,s.align),r.align(e,De,s.vAlign),r.paddingBox=t.clone().unpad(u).unpad(f)},m=e.clone();for(d&&(m.x2=m.x1+a,m.y2=m.y1+l),c&&m.unpad(u).unpad(f).unpad(h),Rt.fn.reflow.call(this,m),t=d?this.box=new Dt(0,0,a,l):this.box,c&&d?(p(),m=this.contentBox=this.paddingBox.clone().unpad(h)):(m=this.contentBox=t.clone(),t.pad(h).pad(f).pad(u),p()),this.translateChildren(t.x1-m.x1+u.left+f+h.left,t.y1-m.y1+u.top+f+h.top),n=this.children,i=0;i<n.length;i++)o=n[i],o.reflow(o.box)},align:function(e,t,n){this.box.align(e,t,n)},hasBox:function(){var e=this.options;return e.border.width||e.background},createVisual:function(){Rt.fn.createVisual.call(this);var e=this.options;e.visible&&this.hasBox()&&this.visual.append(me.fromRect(this.paddingBox.toRect(),this.visualStyle()))},visualStyle:function(){var e=this.options,t=e.border||{};return{stroke:{width:t.width,color:t.color,opacity:Ct(t.opacity,e.opacity),dashType:t.dashType},fill:{color:e.background,opacity:e.opacity},cursor:e.cursor}}}),w(It,{align:Me,vAlign:Ae,margin:{},padding:{},border:{color:Ve,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0}),Ft=It.extend({init:function(e,t){It.fn.init.call(this,e),this.pointData=t},getElement:function(){var e,t,n=this,i=n.options,o=n.paddingBox,r=i.type,s=i.rotation,a=o.center(),l=o.width()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===Ke?t=new fe.Circle(new we([kt(o.x1+l,Pe),kt(o.y1+o.height()/2,Pe)],l),e):r===Qe?t=me.fromPoints([[o.x1+l,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===Xe?(t=new fe.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=me.fromRect(o.toRect(),e),s&&t.transform(ye().rotate(-s,[a.x,a.y])),t.options.zIndex=i.zIndex,t):null},createElement:function(){var e,t=this,n=this.options.visual,i=this.pointData||{};return e=n?n({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.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()}}),w(Ft,{type:Ke,align:Ie,vAlign:Ie}),zt="linear",Pt="radial",Bt={glass:{type:zt,rotation:0,stops:[{offset:0,color:Oe,opacity:0},{offset:.25,color:Oe,opacity:.3},{offset:1,color:Oe,opacity:0}]},sharpBevel:{type:Pt,stops:[{offset:0,color:Oe,opacity:.55},{offset:.65,color:Oe,opacity:0},{offset:.95,color:Oe,opacity:.25}]},roundedBevel:{type:Pt,stops:[{offset:.33,color:Oe,opacity:.06},{offset:.83,color:Oe,opacity:.2},{offset:.95,color:Oe,opacity:0}]},roundedGlass:{type:Pt,supportVML:!1,stops:[{offset:0,color:Oe,opacity:0},{offset:.5,color:Oe,opacity:.3},{offset:.99,color:Oe,opacity:0}]},sharpGlass:{type:Pt,supportVML:!1,stops:[{offset:0,color:Oe,opacity:.2},{offset:.15,color:Oe,opacity:.15},{offset:.17,color:Oe,opacity:.35},{offset:.85,color:Oe,opacity:.05},{offset:.87,color:Oe,opacity:.15},{offset:.99,color:Oe,opacity:0}]},bubbleShadow:{type:Pt,center:[.5,.5],radius:.5}},Lt=Rt.extend({init:function(e){Rt.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,n=t.options,i=t.children,o=new Dt(0,0,n.width,n.height);for(this.box=o.unpad(n.margin),e=0;e<i.length;e++)i[e].reflow(o),o=C(o,i[e].box)||new Dt},createVisual:function(){this.visual=new ge,this.createBackground()},createBackground:function(){var e=this.options,t=e.border||{},n=this.box.clone().pad(e.margin).unpad(t.width),i=me.fromRect(n.toRect(),{stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},fill:{color:e.background,opacity:e.opacity},zIndex:-10});this.visual.append(i)},getRoot:function(){return this},createGradient:function(t){var n,i,o=this.gradients,r=wt(t),s=Bt[t.gradient];return o[r]?n=o[r]:(i=e.extend({},s,t),"linear"===s.type?n=new fe.LinearGradient(i):(t.innerRadius&&(i.stops=S(i)),n=new fe.RadialGradient(i),n.supportVML=s.supportVML!==!1),o[r]=n),n}}),w(Lt,{width:He,height:Ne,background:Oe,border:{color:Ve,width:0},margin:h(5),zIndex:-2}),Ht=Rt.extend({init:function(e){Rt.fn.init.call(this,e),this._initDirection()},_initDirection:function(){var e=this.options;e.vertical?(this.groupAxis=Te,this.elementAxis=De,this.groupSizeField=Fe,this.elementSizeField=ze,this.groupSpacing=e.spacing,this.elementSpacing=e.vSpacing):(this.groupAxis=De,this.elementAxis=Te,this.groupSizeField=ze,this.elementSizeField=Fe,this.groupSpacing=e.vSpacing,this.elementSpacing=e.spacing)},reflow:function(e){this.box=e.clone(),this.reflowChildren()},reflowChildren:function(){var e,t,n,i,o,r,s,a,l,c,d,u=this,h=this,f=h.box,p=h.elementAxis,m=h.groupAxis,g=h.elementSizeField,v=h.groupSizeField,_=this.groupOptions(),b=_.groups,w=_.groupsSize,y=_.maxGroupElementsSize,k=b.length,x=f[m+1]+this.alignStart(w,f[v]());if(k){for(e=x,t=0;t<k;t++){for(n=b[t],i=n.groupElements,o=f[p+1],r=i.length,s=0;s<r;s++)a=i[s],l=u.elementSize(a),c=e+u.alignStart(l[v],n.groupSize),d=new Dt,d[m+1]=c,d[m+2]=c+l[v],d[p+1]=o,d[p+2]=o+l[g],a.reflow(d),o+=l[g]+u.elementSpacing;e+=n.groupSize+u.groupSpacing}f[m+1]=x,f[m+2]=x+w,f[p+2]=f[p+1]+y}},alignStart:function(e,t){var n=0,i=this.options.align;return i===Re||i===Ee?n=t-e:i===Ie&&(n=(t-e)/2),n},groupOptions:function(){var e,t,n,i=this,o=this,r=o.box,s=o.children,a=o.elementSizeField,l=o.groupSizeField,c=o.elementSpacing,d=o.groupSpacing,u=kt(r[a]()),h=s.length,f=[],p=0,m=0,g=0,v=0,_=[];for(e=0;e<h;e++)t=s[e],t.box||t.reflow(r),n=i.elementSize(t),i.options.wrap&&kt(m+c+n[a])>u&&(f.push({groupElements:_,groupSize:p,groupElementsSize:m}),v=Math.max(v,m),g+=d+p,p=0,m=0,_=[]),p=Math.max(p,n[l]),m>0&&(m+=c),m+=n[a],_.push(t);return f.push({groupElements:_,groupSize:p,groupElementsSize:m}),v=Math.max(v,m),g+=p,{groups:f,groupsSize:g,maxGroupElementsSize:v}},elementSize:function(e){return{width:e.box.width(),height:e.box.height()}},createVisual:function(){}}),w(Ht,{vertical:!0,wrap:!0,vSpacing:0,spacing:0}),Nt=fe.Text,Ot=Rt.extend({init:function(e,t){Rt.fn.init.call(this,t),this.content=e,this.reflow(new Dt)},reflow:function(e){var t=this.options,n=t.size=pe.measureText(this.content,{font:t.font});this.baseline=n.baseline,this.box=new Dt(e.x1,e.y1,e.x1+n.width,e.y1+n.height)},createVisual:function(){var e=this.options,t=e.font,n=e.color,i=e.opacity,o=e.cursor;this.visual=new Nt(this.content,this.box.toRect().topLeft(),{font:t,fill:{color:n,opacity:i},cursor:o})}}),w(Ot,{font:Ue,color:Ve}),Vt=/\n|\\n/m,Ut=It.extend({init:function(e,t){It.fn.init.call(this,t),this.content=e,this._initContainer(),this.options._autoReflow!==!1&&this.reflow(new Dt)},_initContainer:function(){var e,t,n=this.options,i=(this.content+"").split(Vt),o=new Ht({vertical:!0,align:n.align,wrap:!1}),r=Ce({},n,{opacity:1,animation:null});for(this.container=o,this.append(o),e=0;e<i.length;e++)t=new Ot(i[e].trim(),r),o.append(t)},reflow:function(e){var t,n,i,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),n=this.visual=s(this.visualContext(t)),n&&(t=T(n.clippedBBox()||new be),n.options.zIndex=r.zIndex,n.options.noclip=r.noclip),this.box=this.contentBox=this.paddingBox=t):(It.fn.reflow.call(this,e),r.rotation&&(i=h(r.margin),o=this.box.unpad(i),this.targetBox=e,this.normalBox=o.clone(),o=this.rotate(),o.translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=o.clone(),o.pad(i)))},createVisual:function(){var e,t=this.options;t.visible&&(this.visual=new ge({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(e=me.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(e)))},renderVisual:function(){this.options.visual?(this.addVisual(),this.createAnimation()):It.fn.renderVisual.call(this)},visualOptions:function(){var e=this.options;return{background:e.background,border:e.border,color:e.color,font:e.font,margin:e.margin,padding:e.padding,visible:e.visible}},visualContext:function(e){var t=this;return{text:this.content,rect:e.toRect(),sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t._boxReflow=!0,t.reflow(e),t._boxReflow=!1,t.getDefaultVisual()}}},getDefaultVisual:function(){this.createVisual(),this.renderChildren();var e=this.visual;return delete this.visual,e},rotate:function(){var e=this.options;return this.box.rotate(e.rotation),this.align(this.targetBox,Te,e.align),this.align(this.targetBox,De,e.vAlign),this.box},rotationTransform:function(){var e,t,n,i,o=this.options.rotation;return o?(e=this.normalBox.center(),t=e.x,n=e.y,i=this.rotatedBox.center(),ye().translate(i.x-t,i.y-n).rotate(o,[t,n])):null}}),Wt=Rt.extend({init:function(t){Rt.fn.init.call(this,t),this.append(new Ut(this.options.text,e.extend({},this.options,{vAlign:this.options.position})))},reflow:function(e){Rt.fn.reflow.call(this,e),this.box.snapTo(e,Te)}}),Wt.buildTitle=function(t,n,i){var o,r=t;return"string"==typeof t&&(r={text:t}),r=e.extend({visible:!0},i,r),r&&r.visible&&r.text&&(o=new Wt(r),n.append(o)),o},w(Wt,{color:Ve,position:Ae,align:Ie,margin:h(5),padding:h(5)}),jt=Ut.extend({init:function(e,t,n,i,o){Ut.fn.init.call(this,t,o),this.text=t,this.value=e,this.index=n,this.dataItem=i,this.reflow(new Dt)},visualContext:function(e){var t=Ut.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(je,{element:gt(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!==Ie?(e=this.normalBox.toRect(),t=this.rotationTransform(),this.box=T(e.bbox(t.matrix()))):Ut.fn.rotate.call(this),this.box},rotationTransform:function(){var e,t,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_=this.options,b=_.rotation;return b?_.alignRotation===Ie?Ut.fn.rotationTransform.call(this):(e=ye().rotate(b).matrix(),t=this.normalBox.toRect(),n=this.targetBox.toRect(),i=_.rotationOrigin||Ae,o=i===Ae||i===Ee?Te:De,r=i===Ae||i===Ee?De:Te,s=i===Ae||i===Me?n.origin:n.bottomRight(),a=t.topLeft().transformCopy(e),l=t.topRight().transformCopy(e),c=t.bottomRight().transformCopy(e),d=t.bottomLeft().transformCopy(e),u=be.fromPoints(a,l,c,d),h={},h[r]=n.origin[r]-u.origin[r],f=Math.abs(a[r]+h[r]-s[r]),p=Math.abs(l[r]+h[r]-s[r]),kt(f,We)===kt(p,We)?(m=a,g=l):p<f?(m=l,g=c):(m=a,g=d),v=m[o]+(g[o]-m[o])/2,h[o]=n.center()[o]-v,ye().translate(h.x,h.y).rotate(b)):null}}),w(jt,{_autoReflow:!1}),qt={format:function(e,t){return t},toString:function(e){return e},parseDate:function(e){return new Date(e)}},Gt=qt,$t=ve.extend({}),$t.register=function(e){Gt=e},Object.defineProperties&&Object.defineProperties($t,{implementation:{get:function(){return Gt}}}),Yt=/\{(\d+)(:[^\}]+)?\}/g,Kt=ve.extend({init:function(e){this._intlService=e},auto:function(e){for(var t,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];return t=this.intlService,e.match(ot)?t.format.apply(t,[e].concat(n)):t.toString(n[0],e)},localeAuto:function(e,t,n){var i,o=this.intlService;return i=e.match(ot)?e.replace(Yt,function(e,i,r){var s=t[parseInt(i,10)];return o.toString(s,r?r.substring(1):"",n)}):o.toString(t[0],e,n)}}),Object.defineProperties&&Object.defineProperties(Kt.fn,{intlService:{get:function(){return this._intlService||$t.implementation}}}),Qt=ve.extend({init:function(e,t){void 0===t&&(t={}),this._intlService=t.intlService,this.sender=t.sender||e,this.format=new Kt(t.intlService),this.chart=e},notify:function(e,t){this.chart.trigger(e,t)}}),Object.defineProperties&&Object.defineProperties(Qt.fn,{intl:{get:function(){return this._intlService||$t.implementation}}}),Zt=ve.extend({}),Zt.register=function(e){Xt=e},Zt.create=function(e,t){if(Xt)return Xt.create(e,t)},Jt={compile:function(e){return e}},en=ve.extend({}),en.register=function(e){Jt=e},en.compile=function(e){return Jt.compile(e)},tn={ChartService:Qt,DomEventsBuilder:Zt,FormatService:Kt,IntlService:$t,TemplateService:en},nn=7,on="#fff",rn=It.extend({init:function(e,t,n){It.fn.init.call(this,t),this.fields=e,this.chartService=n,this.render()},hide:function(){this.options.visible=!1},show:function(){this.options.visible=!0},render:function(){var e,t,n,i,o,r,s,a,l,c=this.options;c.visible&&(e=c.label,t=c.icon,n=new Dt,i=t.size,o=this.fields.text,ht(e)&&e.visible&&(e.template?(a=en.compile(e.template),o=a(this.fields)):e.format&&(o=this.chartService.format.auto(e.format,o)),e.color||(e.color=e.position===Je?on:t.background),this.label=new Ut(o,Ce({},e)),e.position!==Je||ht(i)||(t.type===Ke?i=Math.max(this.label.box.width(),this.label.box.height()):(r=this.label.box.width(),s=this.label.box.height()),n.wrap(this.label.box))),t.width=r||i||nn,t.height=s||i||nn,l=new Ft(Ce({},t)),this.marker=l,this.append(l),this.label&&this.append(this.label),l.reflow(new Dt),this.wrapperBox=n.wrap(l.box))},reflow:function(e){var t,n,i,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&&(m(u,[Me,Re])?u===Me?(i=l.alignTo(e,u).translate(-d,e.center().y-l.center().y),r.line.visible&&(t=[e.x1,c.y],this.linePoints=[t,[i.x2,c.y]],n=i.clone().wrapPoint(t))):(i=l.alignTo(e,u).translate(d,e.center().y-l.center().y),
r.line.visible&&(t=[e.x2,c.y],this.linePoints=[t,[i.x1,c.y]],n=i.clone().wrapPoint(t))):u===Ee?(i=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,i.y1]],n=i.clone().wrapPoint(t))):(i=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,i.y2]],n=i.clone().wrapPoint(t))),a&&a.reflow(i),s&&(s.reflow(i),a&&(r.label.position===$e&&s.box.alignTo(a.box,u),s.reflow(s.box))),this.contentBox=i,this.targetBox=e,this.box=n||i)},createVisual:function(){It.fn.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},renderVisual:function(){var t=this,n=this.options,i=n.visual;n.visible&&i?(this.visual=i(e.extend(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:n.background,border:n.background,icon:n.icon,label:n.label,line:n.line,position:n.position,visible:n.visible},createVisual:function(){t.createVisual(),t.renderChildren();var e=t.visual;return delete t.visual,e}})),this.addVisual()):It.fn.renderVisual.call(this)},createLine:function(){var e,t=this.options.line;this.linePoints&&(e=me.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}}),o(e),this.visual.append(e))},click:function(e,t){var n=this.eventArgs(t);e.trigger(qe,n)||t.preventDefault()},hover:function(e,t){var n=this.eventArgs(t);e.trigger(Ge,n)||t.preventDefault()},leave:function(e){e._unsetActivePoint()},eventArgs:function(t){var n=this.options;return e.extend(this.fields,{element:gt(t),text:ht(n.label)?n.label.text:"",visual:this.visual})}}),w(rn,{icon:{visible:!0,type:Ke},label:{position:Je,visible:!0,align:Ie,vAlign:Ie},line:{visible:!0},visible:!0,position:Ae,zIndex:2}),sn=Rt.extend({init:function(e,t){void 0===t&&(t=new Qt),Rt.fn.init.call(this,e),this.chartService=t,this.options.visible||(this.options=Ce({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=Ce({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==Ye},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=Ce({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==Ye},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()},labelsRange:function(){return{min:this.options.labels.skip,max:this.labelsCount()}},createLabels:function(){var e,t,n,i,o=this,r=this.options,a=r.vertical?Re:Ie,l=Ce({},r.labels,{align:a,zIndex:r.zIndex}),c=Math.max(1,l.step);if(this.children=f(this.children,function(e){return!(e instanceof jt)}),this.labels=[],l.visible)for(e=this.labelsRange(),t=l.rotation,s(t)&&(l.alignRotation=t.align,l.rotation=t.angle),"auto"===l.rotation&&(l.rotation=0,r.autoRotateLabels=!0),n=e.min;n<e.max;n+=c)i=o.createAxisLabel(n,l),i&&(o.append(i),o.labels.push(i))},lineBox:function(){var e=this,t=e.options,n=e.box,i=t.vertical,o=t.labels.mirror,r=o?n.x1:n.x2,s=o?n.y2:n.y1,a=t.line.width||0;return i?new Dt(r,n.y1,r,n.y2-a):new Dt(n.x1,s,n.x2-a,s)},createTitle:function(){var e,t=this.options,n=Ce({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);n.visible&&n.text&&(e=new Ut(n.text,n),this.append(e),this.title=e)},createNotes:function(){var e,t,n,i=this,o=this.options,r=o.notes,s=r.data||[];for(this.notes=[],e=0;e<s.length;e++)t=Ce({},r,s[e]),t.value=i.parseNoteValue(t.value),n=new rn({value:t.value,text:t.label.text,dataItem:t},t,i.chartService),n.options.visible&&(ht(n.options.position)?o.vertical&&!m(n.options.position,[Me,Re])?n.options.position=o.reverse?Me:Re:o.vertical||m(n.options.position,[Ae,Ee])||(n.options.position=o.reverse?Ee:Ae):n.options.position=o.vertical?o.reverse?Me:Re:o.reverse?Ee:Ae,i.append(n),i.notes.push(n))},parseNoteValue:function(e){return e},renderVisual:function(){Rt.fn.renderVisual.call(this),this.createPlotBands()},createVisual:function(){Rt.fn.createVisual.call(this),this.createBackground(),this.createLine()},gridLinesVisual:function(){var e=this._gridLines;return e||(e=this._gridLines=new ge({zIndex:-2}),this.appendVisual(this._gridLines)),e},createTicks:function(e){function t(t,n,r){var a,l=t.length,c=Math.max(1,n.step);if(n.visible)for(a=n.skip;a<l;a+=c)ht(r)&&a%r===0||(s.tickX=o?i.x2:i.x2-n.size,s.tickY=o?i.y1-n.size:i.y1,s.position=t[a],e.append(D(s,n)))}var n=this.options,i=this.lineBox(),o=n.labels.mirror,r=n.majorTicks.visible?n.majorUnit:0,s={vertical:n.vertical};t(this.getMajorTickPositions(),n.majorTicks),t(this.getMinorTickPositions(),n.minorTicks,r/n.minorUnit)},createLine:function(){var e,t,n=this.options,i=n.line,r=this.lineBox();i.width>0&&i.visible&&(e=new me({stroke:{width:i.width,color:i.color,dashType:i.dashType}}),e.moveTo(r.x1,r.y1).lineTo(r.x2,r.y2),n._alignLines&&o(e),t=this._lineGroup=new ge,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,n=e.box,i=t.background;i&&(this._backgroundPath=me.fromRect(n.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},createPlotBands:function(){var e,t,n,i,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 ge({zIndex:-1}),t=f(this.pane.axes,function(e){return e.options.vertical!==l.options.vertical})[0],n=0;n<d.length;n++)i=d[n],o=void 0,r=void 0,u?(o=(t||h.axisX).lineBox(),r=l.getSlot(i.from,i.to,!0)):(o=l.getSlot(i.from,i.to,!0),r=(t||h.axisY).lineBox()),0!==o.width()&&0!==r.height()&&(s=new be([o.x1,r.y1],[o.width(),r.height()]),a=me.fromRect(s,{fill:{color:i.color,opacity:i.opacity},stroke:null}),e.append(a));this.appendVisual(e)}},createGridLines:function(e){function t(e,t,n){var i,o,r=e.length,s=Math.max(1,t.step);if(t.visible)for(i=t.skip;i<r;i+=s)o=kt(e[i]),m(o,h)||i%n===0||a&&d===o||(u.position=o,f.append(A(u,t)),h.push(o))}var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=n.minorUnit,s=n.vertical,a=e.options.line.visible,l=o.visible?n.majorUnit:0,c=e.lineBox(),d=c[s?"y1":"x1"],u={lineStart:c[s?"x1":"y1"],lineEnd:c[s?"x2":"y2"],vertical:s},h=[],f=this.gridLinesVisual();return t(this.getMajorTickPositions(),o),t(this.getMinorTickPositions(),i,l/r),f.children},reflow:function(e){var t,n,i=this,o=i.options,r=i.labels,s=i.title,a=o.vertical,l=r.length,c=a?Fe:ze,d=s?s.box[c]():0,u=this.getActualTickSize()+o.margin+d,h=(this.getRoot()||{}).box||e,f=h[c](),p=0;for(t=0;t<l;t++)n=r[t].box[c](),n+u<=f&&(p=Math.max(p,n));this.box=a?new Dt(e.x1,e.y1,e.x1+p+u,e.y2):new Dt(e.x1,e.y1,e.x2,e.y1+p+u),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},getLabelsTickPositions:function(){return this.getMajorTickPositions()},labelTickIndex:function(e){return e.index},arrangeLabels:function(){var e,t,n,i,o,r,s,a,l,c,d,u=this,h=this,f=h.options,p=h.labels,m=!f.justified,g=f.vertical,v=this.lineBox(),_=f.labels.mirror,b=this.getLabelsTickPositions(),w=this.getActualTickSize()+f.margin;for(e=0;e<p.length;e++)t=p[e],n=u.labelTickIndex(t),i=g?t.box.height():t.box.width(),o=b[n]-i/2,r=void 0,s=void 0,a=void 0,g?(m&&(s=b[n],a=b[n+1],l=s+(a-s)/2,o=l-i/2),c=v.x2,_?(c+=w,t.options.rotationOrigin=Me):(c-=w+t.box.width(),t.options.rotationOrigin=Re),r=t.box.move(c,o)):(m?(s=b[n],a=b[n+1]):(s=o,a=o+i),d=v.y1,_?(d-=w+t.box.height(),t.options.rotationOrigin=Ee):(d+=w,t.options.rotationOrigin=Ae),r=new Dt(s,d,a,d+t.box.height())),t.reflow(r)},autoRotateLabels:function(){var e,t,n,i,o,r,s;if(this.options.autoRotateLabels&&!this.options.vertical){for(e=this.getMajorTickPositions(),t=this.labels,i=0;i<t.length;i++)if(o=e[i+1]-e[i],r=t[i].box,r.width()>o){if(r.height()>o){n=-90;break}n=-45}if(n){for(s=0;s<t.length;s++)t[s].options.rotation=n,t[s].reflow(new Dt);return!0}}},arrangeTitle:function(){var e=this,t=e.options,n=e.title,i=t.labels.mirror,o=t.vertical;n&&(o?(n.options.align=i?Re:Me,n.options.vAlign=n.options.position):(n.options.align=n.options.position,n.options.vAlign=i?Ae:Ee),n.reflow(this.box))},arrangeNotes:function(){var e,t,n,i,o=this;for(e=0;e<this.notes.length;e++)t=o.notes[e],n=t.options.value,i=void 0,ht(n)?(o.shouldRenderNote(n)?t.show():t.hide(),i=o.noteSlot(n)):t.hide(),t.reflow(i||o.lineBox())},noteSlot:function(e){return this.getSlot(e)},alignTo:function(e){var t=e.lineBox(),n=this.options.vertical,i=n?De:Te;this.box.snapTo(t,i),n?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},axisLabelText:function(e,t,n){var i,o=e;return n.template?(i=en.compile(n.template),o=i({value:e,dataItem:t,format:n.format,culture:n.culture})):n.format&&(o=this.chartService.format.localeAuto(n.format,[e],n.culture)),o},slot:function(e,t,n){var i=this.getSlot(e,t,n);if(i)return i.toRect()},contentBox:function(){var e,t=this.box.clone(),n=this.labels;return n.length&&(n[0].options.visible&&t.wrap(n[0].box),e=n[n.length-1],e.options.visible&&t.wrap(e.box)),t},limitRange:function(e,t,n,i,o){var r,s,a,l=this.options;return e<n&&o<0&&(!ht(l.min)||l.min<=n)||i<t&&o>0&&(!ht(l.max)||i<=l.max)?null:t<n&&o>0||i<e&&o<0?{min:e,max:t}:(r=t-e,s=e,a=t,e<n?(s=bt(e,n,i),a=bt(e+r,n+r,i)):t>i&&(a=bt(t,n,i),s=bt(t-r,n,i-r)),{min:s,max:a})},valueRange:function(){return{min:this.seriesMin,max:this.seriesMax}}}),w(sn,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Ve,visible:!0},title:{visible:!0,position:Ie},majorTicks:{align:$e,size:4,skip:0,step:1},minorTicks:{align:$e,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:$e,minorTickType:Ye,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Ve,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1}),an=.01,ln=sn.extend({init:function(e,t){sn.fn.init.call(this,e,t),this._ticks={},this._initCategories(this.options)},_initCategories:function(e){var t,n,i=(e.categories||[]).slice(0),o=ht(e.min),r=ht(e.max);e.categories=i,(o||r)&&i.length&&(e.srcCategories=e.categories,t=o?Math.floor(e.min):0,n=r?e.justified?Math.floor(e.max)+1:Math.ceil(e.max):i.length,e.categories=e.categories.slice(t,n))},rangeIndices:function(){var e,t=this.options,n=t.categories.length||1,i=l(t.min)?t.min%1:0;return e=l(t.max)&&t.max%1!==0&&t.max<this.totalRange().max?n-(1-t.max%1):n-(t.justified?1:0),{min:i,max:e}},totalRangeIndices:function(e){var t,n,i=this.options,o=l(i.min)?i.min:0;return t=l(i.max)?i.max:l(i.min)?o+i.categories.length:(i.srcCategories||i.categories).length-(i.justified?1:0)||1,e&&(n=this.totalRange(),o=bt(o,0,n.max),t=bt(t,0,n.max)),{min:o,max:t}},range:function(){var e=this.options;return{min:l(e.min)?e.min:0,max:l(e.max)?e.max:e.categories.length}},totalRange:function(){var e=this.options;return{min:0,max:Math.max(this._seriesMax||0,(e.srcCategories||e.categories).length)-(e.justified?1:0)}},getScale:function(){var e=this.rangeIndices(),t=e.min,n=e.max,i=this.lineBox(),o=this.options.vertical?i.height():i.width(),r=o/(n-t||1);return r*(this.options.reverse?-1:1)},getTickPositions:function(e){for(var t=this.options,n=t.vertical,i=t.reverse,o=this.rangeIndices(),r=o.min,s=o.max,a=this.lineBox(),l=this.getScale(),c=a[(n?De:Te)+(i?2:1)],d=[],u=r%1!==0?Math.floor(r/1)+e:r;u<=s;)d.push(c+kt(l*(u-r),Pe)),u+=e;return d},getLabelsTickPositions:function(){var e=this.getMajorTickPositions().slice(0),t=this.rangeIndices(),n=this.getScale(),i=this.lineBox(),o=this.options,r=o.vertical?De:Te,s=o.reverse?2:1,a=o.reverse?1:2;return t.min%1!==0&&e.unshift(i[r+s]-n*(t.min%1)),t.max%1!==0&&e.push(i[r+a]+n*(1-t.max%1)),e},labelTickIndex:function(e){var t=this.rangeIndices(),n=e.index;return t.min>0&&(n-=Math.floor(t.min)),n},arrangeLabels:function(){sn.fn.arrangeLabels.call(this),this.hideOutOfRangeLabels()},hideOutOfRangeLabels:function(){var e,t,n,i,o,r=this,s=r.box,a=r.labels;a.length&&(e=this.options.vertical?De:Te,t=s[e+1],n=s[e+2],i=a[0],o=_t(a),(i.box[e+1]>n||i.box[e+2]<t)&&(i.options.visible=!1),(o.box[e+1]>n||o.box[e+2]<t)&&(o.options.visible=!1))},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var e=this.options,t=e.reverse,n=e.justified,i=this._ticks,o=this.rangeIndices(),r=this.lineBox(),s=r.getHash()+o.min+","+o.max+t+n;return i._hash!==s&&(i._hash=s,i.majorTicks=this.getTickPositions(1),i.minorTicks=this.getTickPositions(.5)),i},getSlot:function(e,t,n){var i,o,r=this,s=r.options,a=s.reverse,l=s.justified,c=s.vertical,d=this.rangeIndices(),u=d.min,h=c?De:Te,f=this.lineBox(),p=this.getScale(),m=f[h+(a?2:1)],g=f.clone(),v=!ht(t),_=Ct(e,0),b=Ct(t,_);return b=Math.max(b-1,_),b=Math.max(_,b),i=m+(_-u)*p,o=m+(b+1-u)*p,v&&l&&(o=i),n&&(i=bt(i,f[h+1],f[h+2]),o=bt(o,f[h+1],f[h+2])),g[h+1]=a?o:i,g[h+2]=a?i:o,g},slot:function(e,t,n){var i=e,o=t;return"string"==typeof i&&(i=this.categoryIndex(i)),"string"==typeof o&&(o=this.categoryIndex(o)),sn.fn.slot.call(this,i,o,n)},pointCategoryIndex:function(e){var t,n,i=this.options,o=i.reverse,r=i.justified,s=i.vertical,a=s?De:Te,l=this.lineBox(),c=this.rangeIndices(),d=o?c.max:c.min,u=this.getScale(),h=l[a+1],f=l[a+2],p=e[a];return p<h||p>f?null:(t=d+(p-h)/u,n=t%1,r?t=Math.round(t):0===n&&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){var t=this.options,n=(t.srcCategories||t.categories).indexOf(e);return n-Math.floor(t.min||0)},translateRange:function(e){var t=this.options,n=this.lineBox(),i=t.vertical?n.height():n.width(),o=t.categories.length,r=i/o,s=kt(e/r,We);return{min:s,max:o+s}},zoomRange:function(e){var t=this.totalRangeIndices(),n=this.totalRange(),i=n.min,o=n.max,r=bt(t.min+e,i,o),s=bt(t.max-e,i,o);if(s-r>0)return{min:r,max:s}},scaleRange:function(e){var t=this.options.categories.length,n=e*t;return{min:-n,max:t+n}},labelsCount:function(){var e=this.labelsRange();return e.max-e.min},labelsRange:function(){var e,t=this.options,n=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,s=o.max,a=Math.floor(r);return n?(r=Math.ceil(r),s=Math.floor(s)):(r=Math.floor(r),s=Math.ceil(s)),e=r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip,{min:e-a,max:(t.categories.length?s+(n?1:0):0)-a}},createAxisLabel:function(e,t){var n=this.options,i=n.dataItems?n.dataItems[e]:null,o=Ct(n.categories[e],""),r=this.axisLabelText(o,i,t);return new jt(o,r,e,i,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,n=e-Math.floor(t.min||0);return this.getSlot(n)},arrangeNotes:function(){sn.fn.arrangeNotes.call(this),this.hideOutOfRangeNotes()},hideOutOfRangeNotes:function(){var e,t,n,i,o,r=this,s=r.notes,a=r.box;if(s&&s.length)for(e=this.options.vertical?De:Te,t=a[e+1],n=a[e+2],i=0;i<s.length;i++)o=s[i],o.box&&(n<o.box[e+1]||o.box[e+2]<t)&&o.hide()},pan:function(e){var t=this.totalRangeIndices(!0),n=this.getScale(),i=kt(e/n,We),o=this.totalRange(),r=t.min+i,s=t.max+i;return this.limitRange(r,s,0,o.max,i)},pointsRange:function(e,t){var n=this.options,i=n.reverse,o=n.vertical,r=o?De:Te,s=this.lineBox(),a=this.totalRangeIndices(!0),l=this.getScale(),c=s[r+(i?2:1)],d=e[r]-c,u=t[r]-c,h=a.min+d/l,f=a.min+u/l,p=Math.min(h,f),m=Math.max(h,f);if(m-p>=an)return{min:p,max:m}},valueRange:function(){return this.range()}}),w(ln,{type:"category",categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:Ve},labels:{zIndex:1},justified:!1,_deferLabels:!0}),cn="milliseconds",dn="seconds",un="minutes",hn="hours",fn="days",pn="weeks",mn="months",gn="years",vn=1,_n=1e3,bn=60*_n,wn=60*bn,yn=24*wn,kn=7*yn,xn=31*yn,Cn=365*yn,Sn={years:Cn,months:xn,weeks:kn,days:yn,hours:wn,minutes:bn,seconds:_n,milliseconds:vn},Tn=3e5,Dn={seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},An=.2,En="auto",Mn=[cn,dn,un,hn,fn,pn,mn,gn],Rn="fit",In=ln.extend({init:function(e,t){var n,i,o,r;ln.fn.init.call(this,e,t),n=t.intl,i=this.options,i=Ce({roundToBaseUnit:!0},i,{categories:$(n,i.categories),min:G(n,i.min),max:G(n,i.max)}),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,i.categories&&i.categories.length>0?(o=(i.baseUnit||"").toLowerCase(),r=o!==Rn&&!m(o,Mn),r&&(i.baseUnit=this.defaultBaseUnit(i)),o!==Rn&&i.baseUnitStep!==En||this.autoBaseUnit(i),this._groupsStart=P(i.categories[0],0,i.baseUnit,i.weekStartDay),this.groupCategories(i)):i.baseUnit=i.baseUnit||fn,this.options=i},_initCategories:function(){},shouldRenderNote:function(e){var t=this.range(),n=this.options.categories||[];return H(e,t.min)>=0&&H(e,t.max)<=0&&n.length},parseNoteValue:function(e){return G(this.chartService.intl,e)},noteSlot:function(e){return this.getSlot(e)},translateRange:function(e){var t,n,i=this.options,o=i.baseUnit,r=i.weekStartDay,s=i.vertical,a=this.lineBox(),l=s?a.height():a.width(),c=this.range(),d=l/(c.max-c.min),u=kt(e/d,We);return c.min&&c.max&&(t=M(i.min||c.min,u),n=M(i.max||c.max,u),c={min:P(t,0,o,r),max:P(n,0,o,r)}),c},scaleRange:function(e){var t,n,i=Math.abs(e),o=this.range(),r=o.min,s=o.max;if(r&&s){for(;i--;)t=N(r,s),n=Math.round(.1*t),e<0?(r=M(r,n),s=M(s,-n)):(r=M(r,-n),s=M(s,n));o={min:r,max:s}}return o},defaultBaseUnit:function(e){var t,n,i,o,r,s=e.categories,a=ht(s)?s.length:0,l=Be;for(i=0;i<a;i++)o=s[i],o&&t&&(r=E(o,t),r>0&&(l=Math.min(l,r),n=l>=Cn?gn:l>=xn-3*yn?mn:l>=kn?pn:l>=yn?fn:l>=wn?hn:l>=bn?un:dn)),t=o;return n||fn},_categoryRange:function(e){var t=e._range;return t||(t=e._range=y(e)),t},totalRange:function(){return{min:0,max:this.options.categories.length}},rangeIndices:function(){var e=this.options,t=e.categories,n=e.baseUnit,i=e.baseUnitStep||1,o=this.categoriesRange(),r=R(e.min||o.min),s=R(e.max||o.max),a=0,l=0;return t.length&&(a=W(r,t[0],n,i),l=W(s,t[0],n,i),e.roundToBaseUnit&&(a=Math.floor(a),l=e.justified?Math.floor(l):Math.ceil(l))),{min:a,max:l}},labelsRange:function(){var e=this.options,t=e.labels,n=this.rangeIndices(),i=Math.floor(n.min),o=Math.ceil(n.max);return{min:i+t.skip,max:e.categories.length?o+(e.justified?1:0):0}},categoriesRange:function(){var e=this.options,t=this._categoryRange(e.srcCategories||e.categories),n=R(t.max);return!e.justified&&V(n,this._roundToTotalStep(n,e,!1))&&(n=this._roundToTotalStep(n,e,!0,!0)),{min:R(t.min),max:n}},currentRange:function(){var e=this.options,t=e.roundToBaseUnit!==!1,n=this.categoriesRange(),i=e.min,o=e.max;return i||(i=t?this._roundToTotalStep(n.min,e,!1):n.min),o||(o=t?this._roundToTotalStep(n.max,e,!e.justified):n.max),{min:i,max:o}},datesRange:function(){var e=this._categoryRange(this.options.srcCategories||this.options.categories);return{min:R(e.min),max:R(e.max)}},pan:function(e){var t=this.options,n=this.lineBox(),i=t.vertical?n.height():n.width(),o=this.currentRange(),r=o.min,s=o.max,a=this.totalLimits(),l=i/(s-r),c=kt(e/l,We),d=M(r,c),u=M(s,c),h=this.limitRange(O(d),O(u),O(a.min),O(a.max),c);if(h)return h.min=R(h.min),h.max=R(h.max),h.baseUnit=t.baseUnit,h.baseUnitStep=t.baseUnitStep||1,h.userSetBaseUnit=t.userSetBaseUnit,h.userSetBaseUnitStep=t.userSetBaseUnitStep,h},pointsRange:function(e,t){var n=ln.fn.pointsRange.call(this,e,t),i=this.currentRange(),o=this.rangeIndices(),r=N(i.max,i.min)/(o.max-o.min),s=this.options,a=M(i.min,n.min*r),l=M(i.min,n.max*r);return{min:a,max:l,baseUnit:s.userSetBaseUnit,baseUnitStep:s.userSetBaseUnitStep}},zoomRange:function(e){var t,n,i,o,r,s,a,l,c,d=this.options,u=this.totalLimits(),h=d.weekStartDay,f=d.baseUnit,p=d.baseUnitStep||1,m=this.currentRange(),g=m.min,v=m.max,_=P(g,e*p,f,h),b=P(v,-e*p,f,h);if(d.userSetBaseUnit===Rn)if(t=d.autoBaseUnitSteps,n=d.maxDateGroups,i=_t(t[f])*n*Sn[f],o=N(v,g),r=N(b,_),s=Mn.indexOf(f),r<Sn[f]&&f!==cn)f=Mn[s-1],a=_t(t[f]),l=(o-(n-1)*a*Sn[f])/2,_=M(g,l),b=M(v,-l);else if(r>i&&f!==gn){c=0;do{s++,f=Mn[s],c=0,l=2*Sn[f];do a=t[f][c],c++;while(c<t[f].length&&l*a<o)}while(f!==gn&&l*a<o);l=(l*a-o)/2,l>0&&(_=M(g,-l),b=M(v,l),_=M(_,bt(b,u.min,u.max)-b),b=M(b,bt(_,u.min,u.max)-_))}if(_=R(bt(_,u.min,u.max)),b=R(bt(b,u.min,u.max)),_&&b&&N(b,_)>0)return{min:_,max:b,baseUnit:d.userSetBaseUnit,baseUnitStep:d.userSetBaseUnitStep}},totalLimits:function(){var e=this.options,t=this.datesRange(),n=this._roundToTotalStep(R(t.min),e,!1),i=t.max;return e.justified||(i=this._roundToTotalStep(i,e,!0,V(i,this._roundToTotalStep(i,e,!1)))),{min:n,max:i}},range:function(e){var t=e||this.options,n=t.categories,i=t.baseUnit===Rn,o=i?Mn[0]:t.baseUnit,r=t.baseUnitStep||1,s={baseUnit:o,baseUnitStep:r,weekStartDay:t.weekStartDay},a=this._categoryRange(n),l=R(t.min||a.min),c=R(t.max||a.max);return{min:this._roundToTotalStep(l,s,!1),max:this._roundToTotalStep(c,s,!0,!0)}},autoBaseUnit:function(e){for(var t,n,i,o=this._categoryRange(e.categories),r=R(e.max||o.max)-R(e.min||o.min),s=e.maxDateGroups||this.options.maxDateGroups,a=e.baseUnit===Rn,l=0,c=a?Mn[l++]:e.baseUnit,d=r/Sn[c],u=d,h=Ce({},this.options.autoBaseUnitSteps,e.autoBaseUnitSteps);!n||d>=s;)if(t=t||h[c].slice(0),i=t.shift())n=i,d=u/n;else{if(c===_t(Mn)){n=Math.ceil(u/s);break}if(!a){d>s&&(n=Math.ceil(u/s));break}c=Mn[l++]||_t(Mn),u=r/Sn[c],t=null}e.baseUnitStep=n,e.baseUnit=c},groupCategories:function(e){var t,n,i=e.categories,o=e.baseUnit,r=e.baseUnitStep||1,s=R(y(i).max),a=this.range(e),l=a.min,c=a.max,d=[];for(n=l;n<c&&(d.push(n),t=P(n,r,o,e.weekStartDay),!(t>s)||e.max);n=t);e.srcCategories=i,e.categories=d},_roundToTotalStep:function(e,t,n,i){var o,r,s=t||this.options,a=s.baseUnit,l=s.baseUnitStep||1,c=this._groupsStart;return c?(o=W(e,c,a,l),r=n?Math.ceil(o):Math.floor(o),i&&r++,P(c,r*l,a,s.weekStartDay)):P(e,n?l:0,a,s.weekStartDay)},createAxisLabel:function(e,t){var n,i,o=this.options,r=o.dataItems?o.dataItems[e]:null,s=o.categories[e],a=o.baseUnit,l=t.dateFormats[a],c=!0;if(o.justified?(n=B(s,a,o.weekStartDay),c=V(n,s)):o.roundToBaseUnit||(c=!V(this.range().max,s)),c&&(t.format=t.format||l,i=this.axisLabelText(s,r,t)))return new jt(s,i,e,r,t)},categoryIndex:function(e){var t=this.options,n=t.categories,i=-1;return n.length&&(i=Math.floor(W(R(e),n[0],t.baseUnit,t.baseUnitStep||1))),i},getSlot:function(e,t,n){var i=e,o=t;return typeof i===nt&&(i=this.categoryIndex(i)),typeof o===nt&&(o=this.categoryIndex(o)),ln.fn.getSlot.call(this,i,o,n)},valueRange:function(){var e=this.options,t=this._categoryRange(e.srcCategories||e.categories);return{min:R(t.min),max:R(t.max)}}}),w(In,{type:it,labels:{dateFormats:Dn},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}),Fn=Math.pow(10,-We+1),zn=sn.extend({init:function(e,t,n,i){var o=ee(e,t,n),r=te(o,n);sn.fn.init.call(this,ne(o,n),i),this.totalMin=r.min,this.totalMax=r.max,this.totalMajorUnit=r.majorUnit,this.seriesMin=e,this.seriesMax=t},startValue:function(){return 0},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t,n;return 0===e?1:(t=this.options,n=t.max-t.min,Math.floor(kt(n/e,Pe))+1)},getTickPositions:function(e,t){var n,i=this.options,o=i.vertical,r=i.reverse,s=this.lineBox(),a=o?s.height():s.width(),l=i.max-i.min,c=a/l,d=e*c,u=this.getDivisions(e),h=(o?-1:1)*(r?-1:1),f=1===h?1:2,p=[],m=s[(o?De:Te)+f],g=0;for(t&&(g=t/e),n=0;n<u;n++)n%g!==0&&p.push(kt(m,Pe)),m+=d*h;return p},getMajorTickPositions:function(){return this.getTickPositions(this.options.majorUnit)},getMinorTickPositions:function(){return this.getTickPositions(this.options.minorUnit)},getSlot:function(e,t,n){var i,o,r,s,a,l,c,d,u,h,f,p,m,g;return void 0===n&&(n=!1),i=this.options,o=i.vertical,r=i.reverse,s=o?De:Te,a=this.lineBox(),l=a[s+(r?2:1)],c=o?a.height():a.width(),d=r?-1:1,u=d*(c/(i.max-i.min)),h=new Dt(a.x1,a.y1,a.x1,a.y1),f=e,p=t,ht(f)||(f=p||0),ht(p)||(p=f||0),n&&(f=Math.max(Math.min(f,i.max),i.min),p=Math.max(Math.min(p,i.max),i.min)),o?(m=i.max-Math.max(f,p),g=i.max-Math.min(f,p)):(m=Math.min(f,p)-i.min,g=Math.max(f,p)-i.min),h[s+1]=J(l+u*(r?g:m)),h[s+2]=J(l+u*(r?m:g)),h},getValue:function(e){var t,n=this.options,i=n.vertical,o=n.reverse,r=+n.max,s=+n.min,a=i?De:Te,l=this.lineBox(),c=l[a+(o?2:1)],d=i?l.height():l.width(),u=o?-1:1,h=u*(e[a]-c),f=(r-s)/d,p=h*f;return h<0||h>d?null:(t=i?r-p:s+p,kt(t,We))},translateRange:function(e){var t=this.options,n=t.vertical,i=t.reverse,o=t.max,r=t.min,s=this.lineBox(),a=n?s.height():s.width(),l=o-r,c=a/l,d=kt(e/c,We);return!n&&!i||n&&i||(d=-d),{min:r+d,max:o+d}},scaleRange:function(e){var t=this.options,n=-e*t.majorUnit;return{min:t.min-n,max:t.max+n}},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n=this.options,i=kt(n.min+e*n.majorUnit,We),o=this.axisLabelText(i,null,t);return new jt(i,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)},pointsRange:function(e,t){var n=this.getValue(e),i=this.getValue(t),o=Math.min(n,i),r=Math.max(n,i);if(this.isValidRange(o,r))return{min:o,max:r}},zoomRange:function(e){var t=this,n=t.totalMin,i=t.totalMax,o=this.scaleRange(e),r=bt(o.min,n,i),s=bt(o.max,n,i);if(this.isValidRange(r,s))return{min:r,max:s}},isValidRange:function(e,t){return t-e>Fn}}),w(zn,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Ve},labels:{format:"#.####################"},zIndex:1}),Pn=sn.extend({init:function(e,t,n,i){var o=R(e),r=R(t),s=i.intl,a=n||{};a=Ce(a||{},{min:G(s,a.min),max:G(s,a.max),axisCrossingValue:$(s,a.axisCrossingValues||a.axisCrossingValue)}),a=re(o,r,a),sn.fn.init.call(this,a,i),this.seriesMin=o,this.seriesMax=r,this.totalMin=O(B(O(o)-1,a.baseUnit)),this.totalMax=O(L(O(r)+1,a.baseUnit))},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return Math.floor(j(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,n,i,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?De:Te)+l],d=this.getDivisions(e),u=N(o.max,o.min),h=r?s.height():s.width(),f=h/u,p=[c];for(t=1;t<d;t++)n=P(o.min,t*e,o.baseUnit),i=c+N(n,o.min)*f*a,p.push(kt(i,Pe));return p},getMajorTickPositions:function(){return this.getTickPositions(this.options.majorUnit)},getMinorTickPositions:function(){return this.getTickPositions(this.options.minorUnit)},getSlot:function(e,t,n){return zn.prototype.getSlot.call(this,R(e),R(t),n)},getValue:function(e){var t=zn.prototype.getValue.call(this,e);return null!==t?R(t):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n,i,o=this.options,r=e*o.majorUnit,s=o.min;return r>0&&(s=P(s,r,o.baseUnit)),n=t.dateFormats[o.baseUnit],t.format=t.format||n,i=this.axisLabelText(s,null,t),new jt(s,i,e,null,t)},translateRange:function(e,t){var n=this.options,i=n.baseUnit,o=n.weekStartDay,r=this.lineBox(),s=n.vertical?r.height():r.width(),a=this.range(),l=s/N(a.max,a.min),c=kt(e/l,We),d=M(n.min,c),u=M(n.max,c);return t||(d=P(d,0,i,o),u=P(u,0,i,o)),{min:d,max:u}},scaleRange:function(e){for(var t,n,i=this.options,o=i.min,r=i.max,s=Math.abs(e);s--;)t=N(o,r),n=Math.round(.1*t),e<0?(o=M(o,n),r=M(r,-n)):(o=M(o,-n),r=M(r,n));return{min:o,max:r}},shouldRenderNote:function(e){var t=this.range();return H(e,t.min)>=0&&H(e,t.max)<=0},pan:function(e){var t=this.translateRange(e,!0),n=this.limitRange(O(t.min),O(t.max),this.totalMin,this.totalMax);if(n)return{min:R(n.min),max:R(n.max)}},pointsRange:function(e,t){var n=this.getValue(e),i=this.getValue(t),o=Math.min(n,i),r=Math.max(n,i);return{min:R(o),max:R(r)}},zoomRange:function(e){var t=this.scaleRange(e),n=R(bt(O(t.min),this.totalMin,this.totalMax)),i=R(bt(O(t.max),this.totalMin,this.totalMax));return{min:n,max:i}}}),w(Pn,{type:it,majorGridLines:{visible:!0,width:1,color:Ve},labels:{dateFormats:Dn}}),Bn=10,Ln=sn.extend({init:function(e,t,n,i){var o=Ce({majorUnit:Bn,min:e,max:t},n),r=o.majorUnit,s=le(t,r),a=ae(e,t,o),l=se(a,s,o,n);o.max=l.max,o.min=l.min,o.minorUnit=n.minorUnit||kt(r-1,We),sn.fn.init.call(this,o,i),this.totalMin=ht(n.min)?Math.min(a,n.min):a,this.totalMax=ht(n.max)?Math.max(s,n.max):s,this.logMin=kt(de(l.min,r),We),this.logMax=kt(de(l.max,r),We),this.seriesMin=e,this.seriesMax=t,this.createLabels()},startValue:function(){return this.options.min},getSlot:function(e,t,n){var i,o,r=this,s=r.options,a=r.logMin,l=r.logMax,c=s.reverse,d=s.vertical,u=s.majorUnit,h=d?De:Te,f=this.lineBox(),p=f[h+(c?2:1)],m=d?f.height():f.width(),g=c?-1:1,v=g*(m/(l-a)),_=new Dt(f.x1,f.y1,f.x1,f.y1),b=e,w=t;return ht(b)||(b=w||1),ht(w)||(w=b||1),b<=0||w<=0?null:(n&&(b=Math.max(Math.min(b,s.max),s.min),w=Math.max(Math.min(w,s.max),s.min)),b=de(b,u),w=de(w,u),d?(i=l-Math.max(b,w),o=l-Math.min(b,w)):(i=Math.min(b,w)-a,o=Math.max(b,w)-a),_[h+1]=J(p+v*(c?o:i)),_[h+2]=J(p+v*(c?i:o)),_)},getValue:function(e){var t,n=this,i=n.options,o=n.logMin,r=n.logMax,s=i.reverse,a=i.vertical,l=i.majorUnit,c=this.lineBox(),d=a===s?1:-1,u=1===d?1:2,h=a?c.height():c.width(),f=(r-o)/h,p=a?De:Te,m=c[p+u],g=d*(e[p]-m),v=g*f;return g<0||g>h?null:(t=o+v,kt(Math.pow(l,t),We))},range:function(){var e=this.options;return{min:e.min,max:e.max}},scaleRange:function(e){var t=this.options.majorUnit,n=-e;return{min:Math.pow(t,this.logMin-n),max:Math.pow(t,this.logMax+n)}},translateRange:function(e){var t=this,n=t.options,i=t.logMin,o=t.logMax,r=n.reverse,s=n.vertical,a=n.majorUnit,l=this.lineBox(),c=s?l.height():l.width(),d=c/(o-i),u=kt(e/d,We);return!s&&!r||s&&r||(u=-u),{min:Math.pow(a,i+u),max:Math.pow(a,o+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,n){c.tickX=s?a.x2:a.x2-n.size,c.tickY=s?a.y1-n.size:a.y1,c.position=t,e.append(D(c,n))}var n=this.options,i=n.majorTicks,o=n.minorTicks,r=n.vertical,s=n.labels.mirror,a=this.lineBox(),l=[],c={vertical:r};return i.visible&&this.traverseMajorTicksPositions(t,i),o.visible&&this.traverseMinorTicksPositions(t,o),l},createGridLines:function(e){function t(e,t){m(e,l)||(a.position=e,c.append(A(a,t)),l.push(e))}var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=n.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),i.visible&&this.traverseMinorTicksPositions(t,i),c.children},traverseMajorTicksPositions:function(e,t){var n,i,o=this._lineOptions(),r=o.lineStart,s=o.step,a=this,l=a.logMin,c=a.logMax;for(n=Math.ceil(l)+t.skip;n<=c;n+=t.step)i=kt(r+s*(n-l),We),e(i,t)},traverseMinorTicksPositions:function(e,t){var n,i,o,r,s,a=this,l=this.options,c=l.min,d=l.max,u=l.minorUnit,h=l.majorUnit,f=this._lineOptions(),p=f.lineStart,m=f.step,g=this,v=g.logMin,_=g.logMax,b=Math.floor(v);for(n=b;n<_;n++)for(i=a._minorIntervalOptions(n),o=t.skip;o<u&&(r=i.value+o*i.minorStep,!(r>d));o+=t.step)r>=c&&(s=kt(p+m*(de(r,h)-v),We),e(s,t))},createAxisLabel:function(e,t){var n=Math.ceil(this.logMin+e),i=Math.pow(this.options.majorUnit,n),o=this.axisLabelText(i,null,t);return new jt(i,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,-e)},pointsRange:function(e,t){
var n=this.getValue(e),i=this.getValue(t),o=Math.min(n,i),r=Math.max(n,i);return{min:o,max:r}},zoomRange:function(e){var t=this,n=t.options,i=t.totalMin,o=t.totalMax,r=this.scaleRange(e),s=bt(r.min,i,o),a=bt(r.max,i,o),l=n.majorUnit,c=a>s&&n.min&&n.max&&kt(de(n.max,l)-de(n.min,l),We)<1,d=!(n.min===i&&n.max===o)&&kt(de(a,l)-de(s,l),We)>=1;if(c||d)return{min:s,max:a}},_minorIntervalOptions:function(e){var t=this.options,n=t.minorUnit,i=t.majorUnit,o=Math.pow(i,e),r=Math.pow(i,e+1),s=r-o,a=s/n;return{value:o,minorStep:a}},_lineOptions:function(){var e=this.options,t=e.reverse,n=e.vertical,i=n?De:Te,o=this.lineBox(),r=n===t?1:-1,s=1===r?1:2,a=n?o.height():o.width(),l=r*(a/(this.logMax-this.logMin)),c=o[i+s];return{step:l,lineStart:c,lineBox:o}}}),w(Ln,{type:"log",majorUnit:Bn,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Ve},zIndex:1,_deferLabels:!0}),Hn={createGridLines:function(e){var t,n,i=this.options,o=Math.abs(this.box.center().y-e.lineBox().y1),r=[],s=!1;return i.majorGridLines.visible&&(t=this.majorGridLineAngles(e),s=!0,r=this.renderMajorGridLines(t,o,i.majorGridLines)),i.minorGridLines.visible&&(n=this.minorGridLineAngles(e,s),dt(r,this.renderMinorGridLines(n,o,i.minorGridLines,e,s))),r},renderMajorGridLines:function(e,t,n){return this.renderGridLines(e,t,n)},renderMinorGridLines:function(e,t,n,i,o){var r=this.radiusCallback&&this.radiusCallback(t,i,o);return this.renderGridLines(e,t,n,r)},renderGridLines:function(e,t,n,i){var o,r,s={stroke:{width:n.width,color:n.color,dashType:n.dashType}},a=this.box.center(),l=new we([a.x,a.y],t),c=this.gridLinesVisual();for(o=0;o<e.length;o++)r=new me(s),i&&(l.radius=i(e[o])),r.moveTo(l.center).lineTo(l.pointAt(e[o]+180)),c.append(r);return c.children},gridLineAngles:function(e,t,n,i,o){var r=this,s=this.intervals(t,n,i,o),a=e.options,l=a.visible&&(a.line||{}).visible!==!1;return _(s,function(e){var t=r.intervalAngle(e);if(!l||90!==t)return t})}},Nn=ln.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,n=this,i=this,o=i.labels,r=i.options.labels,s=r.skip||0,a=r.step||1,l=new Dt;for(e=0;e<o.length;e++)o[e].reflow(l),t=o[e].box,o[e].reflow(n.getSlot(s+e*a).adjacentBox(0,t.width(),t.height()))},intervals:function(e,t,n,i){var o,r,s,a,l,c,d,u,h;for(void 0===i&&(i=!1),o=this.options,r=o.categories.length,s=r/e||1,a=360/s,l=t||0,c=n||1,d=[],u=0,h=l;h<s;h+=c)u=o.reverse?360-h*a:h*a,u=kt(u,Pe)%360,i&&m(u,i)||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 _(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 n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=t?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(e,.5,i.skip,i.step,r)},radiusCallback:function(e,t,n){var i,o,r,s;if(t.options.type!==Ze)return i=yt(360/(2*this.options.categories.length)),o=Math.cos(i)*e,r=this.majorAngles(),s=function(t){return!n&&m(t,r)?e:o}},createPlotBands:function(){var e,t,n,i,o,r,s,a=this,l=this.options.plotBands||[],c=this._plotbandGroup=new ge({zIndex:-1});for(e=0;e<l.length;e++)t=l[e],n=a.plotBandSlot(t),i=a.getSlot(t.from),o=t.from-Math.floor(t.from),n.startAngle+=o*i.angle,r=Math.ceil(t.to)-t.to,n.angle-=(r+o)*i.angle,s=Mt.current.createRing(n,{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 n,i,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=bt(Math.floor(h),0,d-1),n=c[h],a&&(n-=u/2,n<0&&(n+=360)),i=bt(Math.ceil(t||h),h,d-1),o=i-h+1,r=u*o,new At(l.center(),0,l.height()/2,n,r)},slot:function(e,t){var n=this.getSlot(e,t),i=n.startAngle+180,o=i+n.angle;return new _e.Arc([n.center.x,n.center.y],{startAngle:i,endAngle:o,radiusX:n.radius,radiusY:n.radius})},pointCategoryIndex:function(e){var t,n,i=this,o=this.options.categories.length,r=null;for(t=0;t<o;t++)if(n=i.getSlot(t),n.containsPoint(e)){r=t;break}return r}}),w(Nn,{startAngle:90,labels:{margin:h(10)},majorGridLines:{visible:!0},justified:!0}),Ce(Nn.prototype,Hn),On=sn.extend({init:function(e,t){sn.fn.init.call(this,e,t);var n=this.options;n.minorUnit=n.minorUnit||n.majorUnit/2},getDivisions:function(e){return zn.prototype.getDivisions.call(this,e)-1},reflow:function(e){this.box=e,this.reflowLabels()},reflowLabels:function(){var e,t,n=this,i=this,o=i.options,r=i.labels,s=i.options.labels,a=s.skip||0,l=s.step||1,c=new Dt,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(n.getSlot(d[e]).adjacentBox(0,t.width(),t.height()))},lineBox:function(){return this.box},intervals:function(e,t,n,i){var o,r,s,a,l,c,d;for(void 0===i&&(i=!1),o=this.options.min,r=this.getDivisions(e),s=[],a=t||0,l=n||1,c=a;c<r;c+=l)d=(360+o+c*e)%360,i&&m(d,i)||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 n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=t?this.intervals(n.majorUnit,o.skip,o.step):null;return this.gridLineAngles(e,n.minorUnit,i.skip,i.step,r)},plotBandSlot:function(e){return this.getSlot(e.from,e.to)},getSlot:function(e,t){var n,i=this,o=i.options,r=i.box,s=o.startAngle,a=bt(e,o.min,o.max),l=bt(t||a,a,o.max);return o.reverse&&(a*=-1,l*=-1),a=(540-a-s)%360,l=(540-l-s)%360,l<a&&(n=a,a=l,l=n),new At(r.center(),0,r.height()/2,a,l-a)},slot:function(e,t){var n,i,o,r,s,a,l;return void 0===t&&(t=e),n=this.options,i=360-n.startAngle,o=this.getSlot(e,t),r=Math.min(e,t),s=Math.max(e,t),n.reverse?(a=r,l=s):(a=360-s,l=360-r),a=(a+i)%360,l=(l+i)%360,new _e.Arc([o.center.x,o.center.y],{startAngle:a,endAngle:l,radiusX:o.radius,radiusY:o.radius})},getValue:function(e){var t=this.options,n=this.box.center(),i=e.x-n.x,o=e.y-n.y,r=Math.round(ft(Math.atan2(o,i))),s=t.startAngle;return t.reverse||(r*=-1,s*=-1),(r+s+360)%360},valueRange:function(){return{min:0,max:2*Math.PI}}}),w(On,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:h(10)},majorGridLines:{color:Ve,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),Ce(On.prototype,Hn,{createPlotBands:Nn.prototype.createPlotBands,majorAngles:Nn.prototype.majorAngles,range:zn.prototype.range,labelsCount:zn.prototype.labelsCount,createAxisLabel:zn.prototype.createAxisLabel}),Vn={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var e,t,n,i,o,r,s,a,l,c,d=this,u=this.options,h=u.majorGridLines.type,f=u.plotBands;for(void 0===f&&(f=[]),e=this.plotArea.polarAxis,t=e.majorAngles(),n=e.box.center(),i=this._plotbandGroup=new ge({zIndex:-1}),o=0;o<f.length;o++)r=f[o],s={fill:{color:r.color,opacity:r.opacity},stroke:{opacity:r.opacity}},a=d.getSlot(r.from,r.to,!0),l=new At(n,n.y-a.y2,n.y-a.y1,0,360),c=void 0,c=h===Ze?Mt.current.createRing(l,s):me.fromPoints(d.plotBandPoints(l,t),s).close(),i.append(c);this.appendVisual(i)},plotBandPoints:function(e,t){var n,i=[],o=[],r=[e.center.x,e.center.y],s=new we(r,e.innerRadius),a=new we(r,e.radius);for(n=0;n<t.length;n++)i.push(s.pointAt(t[n]+180)),o.push(a.pointAt(t[n]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(e){var t,n=this.options,i=this.radarMajorGridLinePositions(),o=e.majorAngles(),r=e.box.center(),s=[];return n.majorGridLines.visible&&(s=this.renderGridLines(r,i,o,n.majorGridLines)),n.minorGridLines.visible&&(t=this.radarMinorGridLinePositions(),dt(s,this.renderGridLines(r,t,o,n.minorGridLines))),s},renderGridLines:function(e,t,n,i){var o,r,s,a,l,c,d,u={stroke:{width:i.width,color:i.color,dashType:i.dashType}},h=i.skip;for(void 0===h&&(h=0),o=i.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 we([e.x,e.y],a),i.type===Ze)r.append(new fe.Circle(l,u));else{for(c=new me(u),d=0;d<n.length;d++)c.lineTo(l.pointAt(n[d]+180));c.close(),r.append(c)}return r.children},getValue:function(e){var t,n,i,o,r,s,a,l=this.lineBox(),c=this.plotArea.polarAxis,d=c.majorAngles(),u=c.box.center(),h=e.distanceTo(u),f=h;return this.options.majorGridLines.type!==Ze&&d.length>1&&(t=e.x-u.x,n=e.y-u.y,i=(ft(Math.atan2(n,t))+540)%360,d.sort(function(e,t){return ue(e,i)-ue(t,i)}),o=ue(d[0],d[1])/2,r=ue(i,d[0]),s=90-o,a=180-r-s,f=h*(Math.sin(yt(a))/Math.sin(yt(s)))),this.axisType().prototype.getValue.call(this,new Tt(l.x1,l.y2-f))}},Un=zn.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 zn}}),Ce(Un.prototype,Vn),Wn=Ln.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 Ln}}),Ce(Wn.prototype,Vn),jn=.333,qn=.01,Gn=ve.extend({init:function(e){this.closed=e},process:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f,p,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],n=g[1],i=g[2],v.push(new ke(t));t.equals(g[b-1]);)_=!0,g.pop(),b--;if(2===b)return o=this.tangent(t,n,Te,De),_t(v).controlOut(this.firstControlPoint(o,t,n,Te,De)),v.push(new ke(n,this.secondControlPoint(o,t,n,Te,De))),v;for(_?(t=g[b-1],n=g[0],i=g[1],a=this.controlPoints(t,n,i),r=a[1],s=a[0]):(l=this.tangent(t,n,Te,De),r=this.firstControlPoint(l,t,n,Te,De)),c=r,d=0;d<=b-3;d++)m.removeDuplicates(d,g),b=g.length,d+3<=b&&(t=g[d],n=g[d+1],i=g[d+2],u=m.controlPoints(t,n,i),_t(v).controlOut(c),c=u[1],h=u[0],v.push(new ke(n,h)));return _?(t=g[b-2],n=g[b-1],i=g[0],f=this.controlPoints(t,n,i),_t(v).controlOut(c),v.push(new ke(n,f[0])),_t(v).controlOut(f[1]),v.push(new ke(i,s))):(p=this.tangent(n,i,Te,De),_t(v).controlOut(c),v.push(new ke(i,this.secondControlPoint(p,n,i,Te,De)))),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,n){var i,o,r=!1;return e.x===t.x?r=!0:t.x===n.x?(t.y<n.y&&e.y<=t.y||n.y<t.y&&t.y<=e.y)&&(r=!0):(i=this.lineFunction(e,t),o=this.calculateFunction(i,n.x),e.y<=t.y&&n.y<=o||t.y<=e.y&&n.y>=o||(r=!0)),r},isLine:function(e,t,n){var i=this.lineFunction(e,t),o=this.calculateFunction(i,n.x);return e.x===t.x&&t.x===n.x||kt(o,1)===kt(n.y,1)},lineFunction:function(e,t){var n=(t.y-e.y)/(t.x-e.x),i=e.y-n*e.x;return[i,n]},controlPoints:function(e,t,n){var i,o,r,s,a,l,c=Te,d=De,u=!1,h=!1;return this.isLine(e,t,n)?i=this.tangent(e,t,Te,De):(o={x:this.isMonotonicByField(e,t,n,Te),y:this.isMonotonicByField(e,t,n,De)},o.x&&o.y?(i=this.tangent(e,n,Te,De),u=!0):(this.invertAxis(e,t,n)&&(c=De,d=Te),o[c]?i=0:(r=n[d]<e[d]&&e[d]<=t[d]||e[d]<n[d]&&t[d]<=e[d]?he((n[d]-e[d])*(t[c]-e[c])):-he((n[c]-e[c])*(t[d]-e[d])),i=qn*r,h=!0))),s=this.secondControlPoint(i,e,t,c,d),h&&(a=c,c=d,d=a),l=this.firstControlPoint(i,t,n,c,d),u&&(this.restrictControlPoint(e,t,s,i),this.restrictControlPoint(t,n,l,i)),[s,l]},restrictControlPoint:function(e,t,n,i){e.y<t.y?t.y<n.y?(n.x=e.x+(t.y-e.y)/i,n.y=t.y):n.y<e.y&&(n.x=t.x-(t.y-e.y)/i,n.y=e.y):n.y<t.y?(n.x=e.x-(e.y-t.y)/i,n.y=t.y):e.y<n.y&&(n.x=t.x+(e.y-t.y)/i,n.y=e.y)},tangent:function(e,t,n,i){var o,r=t[n]-e[n],s=t[i]-e[i];return o=0===r?0:s/r},isMonotonicByField:function(e,t,n,i){return n[i]>t[i]&&t[i]>e[i]||n[i]<t[i]&&t[i]<e[i]},firstControlPoint:function(e,t,n,i,o){var r=t[i],s=n[i],a=(s-r)*jn;return this.point(r+a,t[o]+a*e,i,o)},secondControlPoint:function(e,t,n,i,o){var r=t[i],s=n[i],a=(s-r)*jn;return this.point(s-a,n[o]-a*e,i,o)},point:function(e,t,n,i){var o=new _e.Point;return o[n]=e,o[i]=t,o},calculateFunction:function(e,t){var n,i=e.length,o=0;for(n=0;n<i;n++)o+=Math.pow(t,n)*e[n];return o}}),xe.Gradients=Bt,kendo.deepExtend(kendo.dataviz,{constants:rt,services:tn,autoMajorUnit:Y,Point:Tt,Box:Dt,Ring:At,Sector:Et,ShapeBuilder:Mt,ShapeElement:Ft,ChartElement:Rt,BoxElement:It,RootElement:Lt,FloatElement:Ht,Text:Ot,TextBox:Ut,Title:Wt,AxisLabel:jt,Axis:sn,Note:rn,CategoryAxis:ln,DateCategoryAxis:In,DateValueAxis:Pn,NumericAxis:zn,LogarithmicAxis:Ln,PolarAxis:On,RadarCategoryAxis:Nn,RadarNumericAxis:Un,RadarLogarithmicAxis:Wn,CurveProcessor:Gn,rectToBox:T,addClass:n,removeClass:i,alignPathToPixel:o,clockwise:r,deepExtend:Ce,elementStyles:u,getSpacing:h,getter:Se,grep:f,hasClasses:p,inArray:m,interpolateValue:g,InstanceObserver:lt,isArray:t,isFunction:v,isNumber:l,isObject:s,isString:a,map:_,mousewheelDelta:b,FontLoader:St,setDefaultOptions:w,sparseArrayLimits:y,styleValue:c,append:dt,bindEvents:ut,Class:ve,defined:ht,deg:ft,elementOffset:pt,elementSize:mt,eventElement:gt,eventCoordinates:vt,last:_t,limitValue:bt,logToConsole:kendo.logToConsole,objectKey:wt,rad:yt,round:kt,unbindEvents:xt,valueOrDefault:Ct,absoluteDateDiff:E,addDuration:P,addTicks:M,ceilDate:L,dateComparer:H,dateDiff:N,dateEquals:V,dateIndex:W,duration:j,floorDate:B,lteDateIndex:q,startOfWeek:I,toDate:R,parseDate:G,parseDates:$,toTime:O})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/core/core.min",["dataviz/core/kendo-core.min"],e)}(function(){!function(e){var t=kendo.dataviz,n=t.services,i=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 i.exportSVG(this.exportVisual(),e)},exportImage:function(e){return i.exportImage(this.exportVisual(e),e)},exportPDF:function(e){return i.exportPDF(this.exportVisual(),e)},svg:function(){if(i.svg.Surface)return i.svg.exportGroup(this.exportVisual());throw Error("SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface")},imageDataURL:function(){var t,n,o;if(!kendo.support.canvas)return null;if(i.canvas.Surface)return t=e("<div />").css({display:"none",width:this.element.width(),height:this.element.height()}).appendTo(document.body),n=new i.canvas.Surface(t[0]),n.draw(this.exportVisual()),o=n._rootElement.toDataURL(),n.destroy(),t.remove(),o;throw Error("Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface")}},n.IntlService.register({format:function(e){return kendo.format.apply(null,[e].concat(Array.prototype.slice.call(arguments,1)))},toString:kendo.toString,parseDate:kendo.parseDate}),n.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,n){(n||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,n){(n||t)()}),function(e,define){define("dataviz/themes/chart-base-theme.min",["kendo.dataviz.core.min"],e)}(function(){!function(){!function(e){var t=1.5,n=.4,i="#000",o="Arial, Helvetica, sans-serif",r="11px "+o,s="12px "+o,a="16px "+o,l="transparent",c="#fff",d=function(){return{icon:{border:{width:1}},label:{font:s,padding:3},line:{length:10,width:2},visible:!0}},u=function(){return{labels:{font:s},notes:d(),title:{font:a,margin:5}}},h=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4}},f=function(){return{gap:t,spacing:n}},p=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:c,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:l},opacity:.6}},g=function(){return{gap:t,spacing:n,target:{color:"#ff0000"}}},v=function(){return{border:{_brightness:.8,width:1},downColor:c,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:i,width:1},spacing:.3}},_=function(){return{gap:t,spacing:n}},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:t,spacing:n}},S=function(){return{gap:t,spacing:n}},T=function(){return{width:1}},D=function(){return{gap:.5,line:{color:i,width:1},spacing:n}},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}}}},M=function(e){return{visible:!0,labels:{font:r},overlay:e.gradients?{}:{gradient:"none"},area:h(),bar:f(),boxPlot:p(),bubble:m(),bullet:g(),candlestick:v(),column:_(),pie:A(),donut:b(),funnel:E(),horizontalWaterfall:D(),line:w(),notes:d(),ohlc:y(),radarArea:k(),radarLine:x(),polarArea:k(),polarLine:x(),rangeBar:C(),rangeColumn:S(),scatterLine:T(),verticalArea:h(),verticalBoxPlot:p(),verticalBullet:g(),verticalLine:w(),waterfall:D()}},R=function(){return{font:a}},I=function(){return{labels:{font:s}}},F=function(e){return void 0===e&&(e={}),{axisDefaults:u(),categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:M(e),title:R(),legend:I()}};kendo.deepExtend(e,{chartBaseTheme:F})}(this.kendo.dataviz=this.kendo.dataviz||{})}()},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/themes/auto-theme.min",["kendo.dataviz.core.min"],e)}(function(){function e(e){function n(e,t){o(e,i(t,"backgroundColor"))}function i(e,t){return s.find(".k-var--"+e).css(t)}function o(e,t){for(var n=r,i=e.split("."),o=i.shift();i.length>0;)n=n[o]=n[o]||{},o=i.shift();n[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--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>').appendTo(document.body),function(){n("chart.axisDefaults.crosshair.color","chart-crosshair-background"),n("chart.axisDefaults.labels.color","normal-text-color"),n("chart.axisDefaults.line.color","chart-major-lines"),n("chart.axisDefaults.majorGridLines.color","chart-major-lines"),n("chart.axisDefaults.minorGridLines.color","chart-minor-lines"),n("chart.axisDefaults.notes.icon.background","chart-notes-background"),n("chart.axisDefaults.notes.icon.border.color","chart-notes-border"),n("chart.axisDefaults.notes.line.color","chart-notes-lines"),n("chart.axisDefaults.title.color","normal-text-color"),n("chart.legend.inactiveItems.labels.color","chart-inactive"),n("chart.legend.inactiveItems.markers.color","chart-inactive"),n("chart.legend.labels.color","normal-text-color"),n("chart.seriesDefaults.boxPlot.downColor","chart-major-lines"),n("chart.seriesDefaults.boxPlot.mean.color","base"),n("chart.seriesDefaults.boxPlot.median.color","base"),n("chart.seriesDefaults.boxPlot.whiskers.color","accent"),n("chart.seriesDefaults.bullet.target.color","accent"),n("chart.seriesDefaults.candlestick.downColor","normal-text-color"),n("chart.seriesDefaults.candlestick.line.color","normal-text-color"),n("chart.seriesDefaults.errorBars.color","chart-error-bars-background"),n("chart.seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),n("chart.seriesDefaults.icon.border.color","chart-major-lines"),n("chart.seriesDefaults.labels.background","background"),n("chart.seriesDefaults.labels.color","normal-text-color"),n("chart.seriesDefaults.notes.icon.background","chart-notes-background"),n("chart.seriesDefaults.notes.icon.border.color","chart-notes-border"),n("chart.seriesDefaults.notes.line.color","chart-notes-lines"),n("chart.seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),n("chart.seriesDefaults.verticalBoxPlot.mean.color","base"),n("chart.seriesDefaults.verticalBoxPlot.median.color","base"),n("chart.seriesDefaults.verticalBoxPlot.whiskers.color","accent"),n("chart.seriesDefaults.verticalBullet.target.color","accent"),n("chart.seriesDefaults.waterfall.line.color","chart-major-lines"),n("chart.title.color","normal-text-color"),o("chart.seriesDefaults.labels.opacity",i("chart-area-opacity","opacity"))}(),function(){function e(e){return i(e,"fontSize")+" "+i(e,"fontFamily")}var t=e("chart-font"),n=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",n)}(),function(){function e(e){return e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0)}function t(t){return e(t.match(/series-([a-z])$/)[1])}var n=$(".k-var--series div").toArray(),i=n.reduce(function(e,n){var i=t(n.className);return e[i]=$(n).css("backgroundColor"),e},[]);o("chart.seriesColors",i)}(),s.remove(),t=r,r)}var t;kendo.dataviz.autoTheme=e},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/themes/themes.min",["dataviz/themes/chart-base-theme.min"],e)}(function(){return function(e){function t(t,n){return e.map(t,function(e,t){return[[e,n[t]]]})}var n=window.kendo,i=n.dataviz.ui,o=n.deepExtend,r="#000",s="Arial,Helvetica,sans-serif",a="12px "+s,l="#fff",c=n.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=i.themes,f=i.registerTheme=function(e,t){var n,i={};i.chart=o({},c,t.chart),i.gauge=o({},d,t.gauge),i.diagram=o({},u,t.diagram),i.treeMap=o({},t.treeMap),n=i.chart.seriesDefaults,n.verticalLine=o({},n.line),n.verticalArea=o({},n.area),n.verticalBoxPlot=o({},n.boxPlot),n.polarArea=o({},n.radarArea),n.polarLine=o({},n.radarLine),h[e]=i};f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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"]]}}),f("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 n="#333333",i="#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;f("fiori",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:e(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:d},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:d},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(a,c)}})}(),function(){function e(){return{icon:{background:"#00b0ff",border:{color:"#00b0ff"}},label:{color:"#ffffff"},line:{color:r}}}var n="#4e4e4e",i="#7f7f7f",o="#bdbdbd",r="#c8c8c8",s="#e5e5e5",a=["#0072c6","#5db2ff","#008a17","#82ba00","#ff8f32","#ac193d"],c=["#cbe2f3","#deeffe","#cbe7d0","#e5f0cb","#fee8d5","#eed0d7"],d=a[0],u=l;f("office365",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:e(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:d},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:d},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(a,c)}})}(),function(){function e(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var n="#32364c",i="#7f7f7f",o="#bdbdbd",r="#dfe0e1",s="#dfe0e1",a=["#ff4350","#ff9ea5","#00acc1","#80deea","#ffbf46","#ffd78c"],c=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],d=a[0],u=l;f("nova",{chart:{title:{color:n},legend:{labels:{color:n},inactiveItems:{labels:{color:i},markers:{color:i}}},seriesDefaults:{labels:{color:n},errorBars:{color:n},notes:e(),candlestick:{downColor:r,line:{color:o}},area:{opacity:.8},waterfall:{line:{color:r}},horizontalWaterfall:{line:{color:r}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:a,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:s},majorGridLines:{color:r},title:{color:n},crosshair:{color:n},notes:e()}},gauge:{pointer:{color:d},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:d},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(a,c)}})}(),function(){var e="#656565",n="#bdbdbd",i="rgba(0, 0, 0, .04)",o=["#ff6358","#ffd246","#78d237","#28b4c8","#2d73f5","#aa46be"],r=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],s=o[0],a=l;f("default-v2",{chart:{},gauge:{pointer:{color:s},scale:{rangePlaceholderColor:i,labels:{color:e},minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}},diagram:{shapeDefaults:{fill:{color:s},connectorDefaults:{fill:{color:e},stroke:{color:a},hover:{fill:{color:a},stroke:{color:e}}},content:{color:e}},editable:{resize:{handles:{fill:{color:a},stroke:{color:n},hover:{fill:{color:n},stroke:{color:n}}}},rotate:{thumb:{stroke:{color:n},fill:{color:n}}}},selectable:{stroke:{color:n}},connectionDefaults:{stroke:{color:n},content:{color:n},selection:{handles:{fill:{color:a},stroke:{color:n}},stroke:{color:n}}}},treeMap:{colors:t(o,r)}}),h.sass=h["default-v2"]}()}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||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){var t,n,i=e.length,o=0;for(t=0;t<i;t++)n=e[t],q(n)&&o++;return o}function n(e,t){if(null===t)return t;var n=de(e,!0);return n(t)}function i(e,t,n,o){var r,s,a,l,c;if(void 0===n&&(n={}),void 0===o&&(o=!1),r=n.defaults=n.defaults||{},s=n.depth=n.depth||0,a=!1,n.excluded=n.excluded||[],s>In)return null;for(l in e)!ve(l,n.excluded)&&e.hasOwnProperty(l)&&(c=e[l],_e(c)?(a=!0,o||(e[l]=be(c(t),r[l]))):we(c)&&(o||(n.defaults=r[l]),n.depth++,a=i(c,t,n,o)||a,n.depth--));return a}function o(e){var t,n=e.length,i=0;for(t=0;t<n;t++)i=Math.max(i,e[t].data.length);return i}function r(e){for(var t=0;t<e.length;t++)if(ce(e[t].zIndex))return!0}function s(e){var t=e.overlay;return t&&t.gradient&&"none"!==t.gradient}function a(e){return t(e)===e.length}function l(e){return ce(e)&&null!==e}function c(e){var t,n,i,o=e.series;for(t=0;t<o.length;t++)n=o[t],i=n.data,!i||ue(i[0])||we(i[0])||(n.data=[i])}function d(){return"pane"+yi++}function u(e){var t,n,i,o=e.length;if(o>0)for(n=0;n<o;n++)i=e[n].contentBox(),t?t.wrap(i):t=i.clone();return t||new pe}function h(e,t){var n,i;for(n=0;n<e.length;n++)if(i=e[n],i&&i.pane===t)return i}function f(e){return""===e||null===e||"none"===e||"transparent"===e||!ce(e)}function p(e,t,n){var i,o=t,r=e;if(e.indexOf(".")>-1){for(i=e.split(".");i.length>1;)r=i.shift(),ce(o[r])||(o[r]={}),o=o[r];r=i.shift()}o[r]=n}function m(e,t){var n,i,o=[],r=[].concat(t);for(n=0;n<e.length;n++)i=e[n],ve(i.type,r)&&o.push(i);return o}function g(e,t){return e&&t?e.toLowerCase()===t.toLowerCase():e===t}function v(e,t){var n=e.type,i=t instanceof Date;return!n&&i||g(n,se)}function _(e,t){null!==t&&e.push(t)}function b(e){return 1===e.length?e[0]:e}function w(e,t,n){var i,o;return null===t?t:(i="_date_"+e,o=t[i],o||(o=Ie(n,de(e,!0)(t)),t[i]=o),o)}function y(e,t,n){return Le(e,function(e){return 0===n&&!e.categoryAxis||e.categoryAxis===t})}function k(){this._defaultPrevented=!0}function x(e,t){var n=(t||"").toLowerCase(),i=e.event,o="none"===n&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[n+"Key"];return o}function C(e){var t,n,i={};for(t=0;t<e.length;t++)n=e[t],n.axis.options.name&&(i[n.axis.options.name]={min:n.range.min,max:n.range.max});return i}function S(e){var t=document.createElement("div");return e&&(t.className=e),t}function T(e){for(var t=e;t&&!Oe(t,"k-handle");)t=t.parentNode;return t}function D(e){e.stopPropagation()}function A(e){var t,n,i=W.rad(e),o=Be(Math.sin(i),ae),r=Be(Math.cos(i),ae);return t=Math.abs(o)>no?Q:r<0?oe:J,n=Math.abs(o)<to?Q:o<0?Z:X,{horizontal:t,vertical:n}}function E(e,t,n){var i,o=t.visible;return ce(o)?o:(i=e.pointVisibility,i?i[n]:void 0)}function M(e){var t,n,i,o,r=e.data,s=0;for(t=0;t<r.length;t++)n=nt.current.bindPoint(e,t),i=n.valueFields.value,Re(i)&&(i=parseFloat(i)),o=E(e,n.fields,t),q(i)&&o!==!1&&(s+=Math.abs(i));return s}function R(e,t,n,i){var o,r,s=(i.x-n.x)*(e.y-n.y)-(i.y-n.y)*(e.x-n.x),a=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y);return 0!==a&&(r=s/a,o=new fe(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y))),o}function I(e,t){return e.value.x-t.value.x}function F(e){var t,n,i=Oo;for(t=0;t<i.length;t++)n=i[t]+"Axes",e[n]&&(e[i[t]+"Axis"]=e[n],delete e[n])}function z(e,t){if(e)for(var n=0;n<e.length;n++)if(e[n].category===t)return[e[n]]}function P(e,t){function n(e){var t=(e||{}).color||o.color,n=ye({},a,a[i],o,o[i],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete n[i],n}var i,o,r,s,a=(t||{}).axisDefaults||{};for(s=0;s<Oo.length;s++)i=Oo[s]+"Axis",o=e.axisDefaults||{},r=[].concat(e[i]),r=r.map(n),e[i]=r.length>1?r:r[0]}function B(e,t){var n,i,o,r=e.series,s=r.length,a=e.seriesDefaults,l=ye({},e.seriesDefaults),c=t?ye({},t.seriesDefaults):{},d=ye({},c);for(L(l),L(d),n=0;n<s;n++)i=r[n].type||e.seriesDefaults.type,o=ye({data:[]},d,c[i],{tooltip:e.tooltip},l,a[i]),r[n]._defaults=o,r[n]=ye({},o,r[n])}function L(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 H(e){var t,n,i,o={};for(t=0;t<e.length;t++)n=e[t],i=n.options.name,i&&(o[i]=n.range());return o}function N(e,t){void 0===t&&(t=W.dateComparer);for(var n=1,i=e.length;n<i;n++)if(t(e[n],e[n-1])<0){e.sort(t);break}return e}function O(e,t){var n,i,o,r;for(void 0===t&&(t=W.dateComparer),n=N(e,t),i=n.length,o=i>0?[n[0]]:[],r=1;r<i;r++)0!==t(n[r],Ee(o))&&o.push(n[r]);return o}function V(e){var t,n,i,o,r=e.length,s=[];for(t=0;t<r;t++)for(n=e[t],i=n.length,o=0;o<i;o++)s[o]=s[o]||[],s[o].push(n[o]);return s}function U(e,t){var n,i,o,r;for(n in t)i=t[n],o=e[n],ce(o)&&(r=null===i,r||!ce(i)?(delete e[n],r&&delete t[n]):o&&we(i)&&we(o)&&U(o,i))}var W,j,q,G,$,Y,K,Q,X,Z,J,ee,te,ne,ie,oe,re,se,ae,le,ce,de,ue,he,fe,pe,me,ge,ve,_e,be,we,ye,ke,xe,Ce,Se,Te,De,Ae,Ee,Me,Re,Ie,Fe,ze,Pe,Be,Le,He,Ne,Oe,Ve,Ue,We,je,qe,Ge,$e,Ye,Ke,Qe,Xe,Ze,Je,et,tt,nt,it,ot,rt,st,at,lt,ct,dt,ut,ht,ft,pt,mt,gt,vt,_t,bt,wt,yt,kt,xt,Ct,St,Tt,Dt,At,Et,Mt,Rt,It,Ft,zt,Pt,Bt,Lt,Ht,Nt,Ot,Vt,Ut,Wt,jt,qt,Gt,$t,Yt,Kt,Qt,Xt,Zt,Jt,en,tn,nn,on,rn,sn,an,ln,cn,dn,un,hn,fn,pn,mn,gn,vn,_n,bn,wn,yn,kn,xn,Cn,Sn,Tn,Dn,An,En,Mn,Rn,In,Fn,zn,Pn,Bn,Ln,Hn,Nn,On,Vn,Un,Wn,jn,qn,Gn,$n,Yn,Kn,Qn,Xn,Zn,Jn,ei,ti,ni,ii,oi,ri,si,ai,li,ci,di,ui,hi,fi,pi,mi,gi,vi,_i,bi,wi,yi,ki,xi,Ci,Si,Ti,Di,Ai,Ei,Mi,Ri,Ii,Fi,zi,Pi,Bi,Li,Hi,Ni,Oi,Vi,Ui,Wi,ji,qi,Gi,$i,Yi,Ki,Qi,Xi,Zi,Ji,eo,to,no,io,oo,ro,so,ao,lo,co,uo,ho,fo,po,mo,go,vo,_o,bo,wo,yo,ko,xo,Co,So,To,Do,Ao,Eo,Mo,Ro,Io,Fo,zo,Po,Bo,Lo,Ho,No,Oo,Vo,Uo,Wo,jo;window.kendo.dataviz=window.kendo.dataviz||{},W=kendo.dataviz,j=W.Class,q=W.isNumber,G=W.constants,$=G.MAX_VALUE,Y=G.MIN_VALUE,K=G.VALUE,Q=G.CENTER,X=G.TOP,Z=G.BOTTOM,J=G.LEFT,ee=G.WHITE,te=G.CIRCLE,ne=G.Y,ie=G.X,oe=G.RIGHT,re=G.BLACK,se=G.DATE,ae=G.DEFAULT_PRECISION,le=G.ARC,ce=W.defined,de=W.getter,ue=W.isArray,he=W.ChartElement,fe=W.Point,pe=W.Box,me=W.alignPathToPixel,ge=W.setDefaultOptions,ve=W.inArray,_e=W.isFunction,be=W.valueOrDefault,we=W.isObject,ye=W.deepExtend,ke=W.eventElement,xe=W.services,Ce=xe.TemplateService,Se=W.TextBox,Te=W.ShapeElement,De=W.getSpacing,Ae=W.limitValue,Ee=W.last,Me=W.append,Re=W.isString,Ie=W.parseDate,Fe=W.styleValue,ze=W.CategoryAxis,Pe=W.BoxElement,Be=W.round,Le=W.grep,He=W.DateCategoryAxis,Ne=W.elementStyles,Oe=W.hasClasses,Ve=W.bindEvents,Ue=W.unbindEvents,We=kendo.support,je=kendo.drawing,qe=je.Path,Ge=je.Animation,$e=je.AnimationFactory,Ye=je.Group,Ke=kendo.Color,Qe=kendo.geometry,Xe=Qe.Point,Ze=Qe.transform,Je=j.extend({init:function(e){this._axis=e,this.options=e.options},value:function(e){var t=this._axis,n=t.getCategory?t.getCategory(e):t.getValue(e);return n},slot:function(e,t,n){return void 0===n&&(n=!0),this._axis.slot(e,t,n)},range:function(){return this._axis.range()},valueRange:function(){return this._axis.valueRange()}}),et=j.extend({init:function(e){this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}}),tt={min:function(e){var t,n,i=e.length,o=$;for(t=0;t<i;t++)n=e[t],q(n)&&(o=Math.min(o,n));return o===$?e[0]:o},max:function(e){var t,n,i=e.length,o=Y;for(t=0;t<i;t++)n=e[t],q(n)&&(o=Math.max(o,n));return o===Y?e[0]:o},sum:function(e){var t,n,i=e.length,o=0;for(t=0;t<i;t++)n=e[t],q(n)&&(o+=n);return o},sumOrNull:function(e){var n=null;return t(e)&&(n=tt.sum(e)),n},count:function(e){var t,n,i=e.length,o=0;for(t=0;t<i;t++)n=e[t],null!==n&&ce(n)&&o++;return o},avg:function(e){var n=t(e),i=e[0];return n>0&&(i=tt.sum(e)/n),i},first:function(e){var t,n,i=e.length;for(t=0;t<i;t++)if(n=e[t],null!==n&&ce(n))return n;return e[0]}},nt=j.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(e,t,n){var i,o,r=this;for(void 0===t&&(t=[K]),void 0===n&&(n={}),i=0;i<e.length;i++)o=e[i],r._valueFields[o]=t,r._otherFields[o]=n,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]||[K]},otherFields:function(e){return this._otherFields[e.type]||[K]},bindPoint:function(e,t,n){var i,o,r,s,a,l=e.data,c=ce(n)?n:l[t],d={valueFields:{value:c}},u=this.valueFields(e),h=this._otherFields[e.type];return null===c?o=this._nullValue[e.type]:ce(c)?Array.isArray(c)?(r=c.slice(u.length),o=this._bindFromArray(c,u),i=this._bindFromArray(r,h)):"object"==typeof c&&(s=this.sourceFields(e,u),a=this.sourceFields(e,h),o=this._bindFromObject(c,u,s),i=this._bindFromObject(c,h,a)):o=this._undefinedValue[e.type],ce(o)&&(1===u.length?d.valueFields.value=o[u[0]]:d.valueFields=o),d.fields=i||{},d},_makeValue:function(e,t){var n,i,o={},r=e.length;for(n=0;n<r;n++)i=e[n],o[i]=t;return o},_bindFromArray:function(e,t){var n,i,o={};if(t)for(n=Math.min(t.length,e.length),i=0;i<n;i++)o[t[i]]=e[i];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 n,i,o,r,s=[];if(t)for(n=t.length,i=0;i<n;i++)o=t[i],r=o===K?"field":o+"Field",s.push(e[r]||o);return s}}),nt.current=new nt,it="stderr",ot="stddev",rt=/percent(?:\w*)\((\d+)\)/,st=RegExp("^"+ot+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),at=j.extend({init:function(e,t,n){this.initGlobalRanges(e,t,n)},initGlobalRanges:function(e,t,n){var i,o,r,s,a,l=t.data,c=st.exec(e);c?(this.valueGetter=this.createValueGetter(t,n),i=this.getAverage(l),o=this.getStandardDeviation(l,i,!1),r=c[1]?parseFloat(c[1]):1,s={low:i.value-o*r,high:i.value+o*r},this.globalRange=function(){return s}):e.indexOf&&e.indexOf(it)>=0&&(this.valueGetter=this.createValueGetter(t,n),a=this.getStandardError(l,this.getAverage(l)),this.globalRange=function(e){return{low:e-a,high:e+a}})},createValueGetter:function(e,t){var n,i,o,r=e.data,s=nt.current,a=s.valueFields(e),l=ce(r[0])?r[0]:{};return ue(l)?(i=t?a.indexOf(t):0,n=de("["+i+"]")):q(l)?n=de():typeof l===G.OBJECT&&(o=s.sourceFields(e,a),n=de(o[a.indexOf(t)])),n},getErrorRange:function(e,t){var n,i,o,r;if(!ce(t))return null;if(this.globalRange)return this.globalRange(e);if(ue(t))n=e-t[0],i=e+t[1];else if(q(o=parseFloat(t)))n=e-o,i=e+o;else{if(!(o=rt.exec(t)))throw Error("Invalid ErrorBar value: "+t);r=e*(parseFloat(o[1])/100),n=e-Math.abs(r),i=e+Math.abs(r)}return{low:n,high:i}},getStandardError:function(e,t){return this.getStandardDeviation(e,t,!0)/Math.sqrt(t.count)},getStandardDeviation:function(e,t,n){var i,o,r=this,s=e.length,a=n?t.count-1:t.count,l=0;for(i=0;i<s;i++)o=r.valueGetter(e[i]),q(o)&&(l+=Math.pow(o-t.value,2));return Math.sqrt(l/a)},getAverage:function(e){var t,n,i=this,o=e.length,r=0,s=0;for(t=0;t<o;t++)n=i.valueGetter(e[t]),q(n)&&(r+=n,s++);return{value:r/s,count:s}}}),lt=We.browser||{},ct=600,dt="fadeIn",ut="glass",ht=.8,ft=5,pt=lt.msie?.001:0,mt="errorLow",gt="errorHigh",vt="xErrorLow",_t="xErrorHigh",bt="yErrorLow",wt="yErrorHigh",yt=8,kt="zero",xt="interpolate",Ct="gap",St="smooth",Tt="step",Dt="area",At="bar",Et="boxPlot",Mt="bubble",Rt="bullet",It="candlestick",Ft="column",zt="donut",Pt="funnel",Bt="horizontalWaterfall",Lt="line",Ht="ohlc",Nt="pie",Ot="polarArea",Vt="polarLine",Ut="polarScatter",Wt="radarArea",jt="radarColumn",qt="radarLine",Gt="rangeBar",$t="rangeColumn",Yt="scatter",Kt="scatterLine",Qt="verticalArea",Xt="verticalBoxPlot",Zt="verticalBullet",Jt="verticalLine",en="waterfall",tn=[At,Ft,Ht,It,Et,Xt,Rt,$t,Gt,en,Bt],nn="legendItemClick",on="legendItemHover",rn="seriesClick",sn="seriesHover",an="plotAreaClick",ln="plotAreaHover",cn="drag",dn="dragEnd",un="dragStart",hn="zoomStart",fn="zoom",pn="zoomEnd",mn="selectStart",gn="select",vn="selectEnd",_n="render",bn="showTooltip",wn="hideTooltip",yn="log",kn="category",xn="insideEnd",Cn="insideBase",Sn="outsideEnd",Tn="DOMMouseScroll mousewheel",Dn=150,An={INITIAL_ANIMATION_DURATION:ct,FADEIN:dt,LEGEND_ITEM_CLICK:nn,LEGEND_ITEM_HOVER:on,SERIES_CLICK:rn,SERIES_HOVER:sn,GLASS:ut,BORDER_BRIGHTNESS:ht,TOOLTIP_OFFSET:ft,START_SCALE:pt,ERROR_LOW_FIELD:mt,ERROR_HIGH_FIELD:gt,X_ERROR_LOW_FIELD:vt,X_ERROR_HIGH_FIELD:_t,Y_ERROR_LOW_FIELD:bt,Y_ERROR_HIGH_FIELD:wt,LINE_MARKER_SIZE:yt,INTERPOLATE:xt,ZERO:kt,SMOOTH:St,STEP:Tt,CATEGORY:kn,FUNNEL:Pt,BAR:At,CANDLESTICK:It,PIE:Nt,COLUMN:Ft,AREA:Dt,VERTICAL_BULLET:Zt,BOX_PLOT:Et,OHLC:Ht,WATERFALL:en,LINE:Lt,BULLET:Rt,VERTICAL_LINE:Jt,VERTICAL_AREA:Qt,RANGE_COLUMN:$t,VERTICAL_BOX_PLOT:Xt,RANGE_BAR:Gt,HORIZONTAL_WATERFALL:Bt,SCATTER:Yt,SCATTER_LINE:Kt,BUBBLE:Mt,RADAR_AREA:Wt,RADAR_LINE:qt,RADAR_COLUMN:jt,POLAR_LINE:Vt,POLAR_AREA:Ot,POLAR_SCATTER:Ut,RENDER:_n,PLOT_AREA_CLICK:an,PLOT_AREA_HOVER:ln,LOGARITHMIC:yn,DRAG:cn,DRAG_START:un,DRAG_END:dn,ZOOM_START:hn,ZOOM:fn,ZOOM_END:pn,SELECT_START:mn,SELECT:gn,SELECT_END:vn,GAP:Ct,DONUT:zt,INSIDE_END:xn,INSIDE_BASE:Cn,OUTSIDE_END:Sn,MOUSEWHEEL:Tn,MOUSEWHEEL_DELAY:Dn,SHOW_TOOLTIP:bn,HIDE_TOOLTIP:wn,EQUALLY_SPACED_SERIES:tn},En=4,Mn=he.extend({init:function(e,t,n,i,o,r){he.fn.init.call(this,r),this.low=e,this.high=t,this.isVertical=n,this.chart=i,this.series=o},reflow:function(e){var t,n=this.options.endCaps,i=this.isVertical,o=this.getAxis(),r=o.getSlot(this.low,this.high),s=e.center(),a=this.getCapsWidth(e,i),l=i?s.x:s.y,c=l-a,d=l+a;i?(t=[new fe(s.x,r.y1),new fe(s.x,r.y2)],n&&t.push(new fe(c,r.y1),new fe(d,r.y1),new fe(c,r.y2),new fe(d,r.y2)),this.box=new pe(c,r.y1,d,r.y2)):(t=[new fe(r.x1,s.y),new fe(r.x2,s.y)],n&&t.push(new fe(r.x1,c),new fe(r.x1,d),new fe(r.x2,c),new fe(r.x2,d)),this.box=new pe(r.x1,c,r.x2,d)),this.linePoints=t},getCapsWidth:function(e,t){var n=t?e.width():e.height(),i=Math.min(Math.floor(n/2),En)||En;return i},createVisual:function(){var e=this,t=this.options,n=t.visual;n?this.visual=n({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,n=this,i=this,o=i.options,r=i.linePoints,s={stroke:{color:o.color,width:o.line.width,dashType:o.line.dashType}};for(he.fn.createVisual.call(this),e=0;e<r.length;e+=2)t=new qe(s).moveTo(r[e].x,r[e].y).lineTo(r[e+1].x,r[e+1].y),me(t),n.visual.append(t)}}),ge(Mn,{animation:{type:dt,delay:ct},endCaps:!0,line:{width:2},zIndex:1}),Rn=Mn.extend({getAxis:function(){var e=this.chart.seriesValueAxis(this.series);return e}}),In=5,Fn=he.extend({init:function(e,t){he.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 n,i=this.seriesOptions[t];return i||(n=this.pointType().prototype.defaults,this.seriesOptions[t]=i=ye({},n,{vertical:!this.options.invertAxes},e)),i},plotValue:function(e){var t,n,i,o,r,s,a,l;if(!e)return 0;if(this.options.isStacked100&&q(e.value)){for(t=e.categoryIx,n=this.categoryPoints[t],i=[],o=0,r=0;r<n.length;r++)if(s=n[r]){if(a=e.series.stack,l=s.series.stack,a&&l&&a.group!==l.group)continue;q(s.value)&&(o+=Math.abs(s.value),i.push(Math.abs(s.value)))}if(o>0)return e.value/o}return e.value},plotRange:function(e,t){var n,i,o,r,s,a,l,c,d,u,h,f,p,m=this;if(void 0===t&&(t=0),n=this.categoryPoints[e.categoryIx],this.options.isStacked){for(i=this.plotValue(e),o=i>=0,r=t,s=!1,a=0;a<n.length&&(l=n[a],e!==l);a++){if(c=e.series.stack,d=l.series.stack,c&&d){if(typeof c===G.STRING&&c!==d)continue;if(c.group&&c.group!==d.group)continue}u=m.plotValue(l),(u>=0&&o||u<0&&!o)&&(r+=u,i+=u,s=!0,m.options.isStacked100&&(i=Math.min(i,1)))}return s&&(r-=t),[r,i]}return h=e.series,f=this.seriesValueAxis(h),p=this.categoryAxisCrossingValue(f),[p,e.value||p]},stackLimits:function(e,t){var n,i,o,r,s,a=this,l=$,c=Y;for(n=0;n<this.categoryPoints.length;n++)if(i=a.categoryPoints[n])for(o=0;o<i.length;o++)r=i[o],r&&(r.series.stack!==t&&r.series.axis!==e||(s=a.plotRange(r,0)[1],ce(s)&&isFinite(s)&&(c=Math.max(c,s),l=Math.min(l,s))));return{min:l,max:c}},updateStackRange:function(){var e,t,n,i,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],n=t.axis,i=n+t.stack,o=d[i],o||(o=s.stackLimits(n,t.stack),r=s.errorTotals,r&&(r.negative.length&&(o.min=Math.min(o.min,W.sparseArrayLimits(r.negative).min)),r.positive.length&&(o.max=Math.max(o.max,W.sparseArrayLimits(r.positive).max))),o.min!==$||o.max!==Y?d[i]=o:o=null),o&&(s.valueAxisRanges[n]=o)},addErrorBar:function(e,t,n){var i,o=e.value,r=e.series,s=e.seriesIx,a=e.options.errorBars,l=t.fields[mt],c=t.fields[gt];q(l)&&q(c)?i={low:l,high:c}:a&&ce(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new at(a.value,r,K),i=this.seriesErrorRanges[s].getErrorRange(o,a.value)),i&&(e.low=i.low,e.high=i.high,this.addPointErrorBar(e,n))},addPointErrorBar:function(e,t){var n,i,o,r=!this.options.invertAxes,s=e.options.errorBars,a=e.series,l=e.low,c=e.high;this.options.isStacked?(n=this.stackedErrorRange(e,t),l=n.low,c=n.high):(i={categoryIx:t,series:a},this.updateRange({value:l},i),this.updateRange({value:c},i)),o=new Rn(l,c,r,this,a,s),e.errorBars=[o],e.append(o)},stackedErrorRange:function(e,t){var n=this.plotRange(e,0)[1]-e.value,i=e.low+n,o=e.high+n;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[t]=Math.min(this.errorTotals.negative[t]||0,i)),o>0&&(this.errorTotals.positive[t]=Math.max(this.errorTotals.positive[t]||0,o)),{low:i,high:o}},addValue:function(t,n){var i,o,r=n.categoryIx,s=n.series,a=n.seriesIx,l=this.categoryPoints[r];l||(this.categoryPoints[r]=l=[]),i=this.seriesPoints[a],i||(this.seriesPoints[a]=i=[]),o=this.createPoint(t,n),o&&(e.extend(o,n),o.owner=this,o.dataItem=s.data[r],o.noteText=t.fields.noteText,this.addErrorBar(o,t,r)),this.points.push(o),i.push(o),l.push(o),this.updateRange(t.valueFields,n)},evalPointOptions:function(e,t,n,o,r,s){var a,l={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},c=this._evalSeries[s];return ce(c)||(this._evalSeries[s]=c=i(e,{},l,!0)),a=e,c&&(a=ye({},a),i(a,{value:t,category:n,index:o,series:r,dataItem:r.data[o]},l)),a},updateRange:function(e,t){var n=t.series.axis,i=e.value,o=this.valueAxisRanges[n];isFinite(i)&&null!==i&&(o=this.valueAxisRanges[n]=o||{min:$,max:Y},o.min=Math.min(o.min,i),o.max=Math.max(o.max,i))},seriesValueAxis:function(e){var t=this.plotArea,n=e.axis,i=n?t.namedValueAxes[n]:t.valueAxis;if(!i)throw Error("Unable to locate value axis with name "+n);return i},reflow:function(e){var t=this,n=this.categorySlots=[],i=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),f=i[r++],p=n[d];p||(n[d]=p=t.categorySlot(o,d,h)),f&&(a=t.plotRange(f,h.startValue()),l=h.getSlot(a[0],a[1],!t.options.clip),l?(c=t.pointSlot(p,l),f.aboveAxis=t.aboveAxis(f,h),f.stackValue=a[1],t.options.isStacked100&&(f.percentage=t.plotValue(f)),t.reflowPoint(f,c)):f.visible=!1)}),this.reflowCategories(n),this.box=e},aboveAxis:function(e,t){var n=this.categoryAxisCrossingValue(t),i=e.value;return t.options.reverse?i<n:i>=n},categoryAxisCrossingValue:function(e){var t=this.categoryAxis,n=e.options,i=[].concat(n.axisCrossingValues||n.axisCrossingValue);return i[t.axisIndex||0]||0},reflowPoint:function(e,t){e.reflow(t)},reflowCategories:function(){},pointSlot:function(e,t){var n=this.options,i=n.invertAxes,o=i?t:e,r=i?e:t;return new pe(o.x1,r.y1,o.x2,r.y2)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,n,i,r,s,a,l,c=this,d=this.options.series,u=this.categoryAxis.options.categories||[],h=o(d),f=d.length;for(t=0;t<f;t++)c._outOfRangeCallback(d[t],"_outOfRangeMinPoint",t,e);for(n=0;n<h;n++)for(i=0;i<f;i++)r=d[i],s=u[n],a=c._bindPoint(r,i,n),e(a,{category:s,categoryIx:n,series:r,seriesIx:i});for(l=0;l<f;l++)c._outOfRangeCallback(d[l],"_outOfRangeMaxPoint",l,e)},_outOfRangeCallback:function(e,t,n,i){var o,r,s=e[t];s&&(o=s.categoryIx,r=this._bindPoint(e,n,o,s.item),i(r,{category:s.category,categoryIx:o,series:e,seriesIx:n}))},_bindPoint:function(e,t,n,i){var o,r;return this._bindCache||(this._bindCache=[]),o=this._bindCache[t],o||(o=this._bindCache[t]=[]),r=o[n],r||(r=o[n]=nt.current.bindPoint(e,n,i)),r},formatPointValue:function(e,t){return null===e.value?"":this.chartService.format.auto(t,e.value)},pointValue:function(e){return e.valueFields.value}}),ge(Fn,{series:[],invertAxes:!1,isStacked:!1,clip:!0}),zn={click:function(e,t){return e.trigger(rn,this.eventArgs(t))},hover:function(e,t){return e.trigger(sn,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:ke(e),originalEvent:e,point:this}}},Pn={createNote:function(){var e=this.options.notes,t=this.noteText||e.label.text;e.visible!==!1&&ce(t)&&null!==t&&(this.note=new W.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))}},Bn="above",Ln="below",Hn=he.extend({init:function(e,t){he.fn.init.call(this),this.value=e,this.options=t,this.aboveAxis=be(this.options.aboveAxis,!0),this.tooltipTracking=!0},render:function(){var e,t,n=this.options,i=n.markers,o=n.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(e=this.value,o.template?(t=Ce.compile(o.template),e=t({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series})):o.format&&(e=this.formatValue(o.format)),this.label=new Se(e,ye({align:Q,vAlign:Q,margin:{left:5,right:5},zIndex:be(o.zIndex,this.series.zIndex)},o)),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},markerBorder:function(){var e=this.options.markers,t=e.background,n=ye({color:this.color},e.border);return ce(n.color)||(n.color=new Ke(t).brightness(ht).toHex()),n},createVisual:function(){},createMarker:function(){var e=this.options.markers,t=new Te({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:this.markerBorder(),opacity:e.opacity,zIndex:be(e.zIndex,this.series.zIndex),animation:e.animation,visual:e.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});return t},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(e){var t,n,i,o,r=this,s=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(n=0;n<this.errorBars.length;n++)r.errorBars[n].reflow(t);this.note&&(i=this.markerBox(),a.markers.visible&&a.markers.size||(o=i.center(),i=new pe(o.x,o.y,o.x,o.y)),this.note.reflow(i))},reflowLabel:function(e){var t=this,n=t.options,i=t.label,o=n.labels.position;i&&(o=o===Bn?X:o,o=o===Ln?Z:o,i.reflow(e),i.box.alignTo(this.markerBox(),o),i.reflow(i.box))},createHighlight:function(){var e=this.options.highlight.markers,t=this.markerBorder().color,n=this.options.markers,i=n.size+(n.border.width||0)+(e.border.width||0),o=new Te({type:n.type,width:i,height:i,rotation:n.rotation,background:e.color||t,border:{color:e.border.color,width:e.border.width,opacity:be(e.border.opacity,1)},opacity:be(e.opacity,1)});return o.reflow(this._childBox),o.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var e,t,n,i,o,r=this.marker;return r?(t=r.paddingBox.toRect(),e=r.visual):(n=this.options.markers.size,i=n/2,o=this.box.center(),t=new Qe.Rect([o.x-i,o.y-i],[n,n])),{options:this.options,rect:t,visual:e}},tooltipAnchor:function(){var e,t,n,i,o=this.markerBox(),r=this.owner.pane.clipBox(),s=!r||r.overlaps(o);if(s)return e=o.x2+ft,t=J,this.aboveAxis?(n=o.y1,i=Z):(n=o.y2,i=X),{point:new fe(e,n),align:{horizontal:t,vertical:i}}},formatValue:function(e){return this.owner.formatPointValue(this,e)},overlapsBox:function(e){var t=this.markerBox();return t.overlaps(e)}}),Hn.prototype.defaults={vertical:!0,markers:{visible:!0,background:ee,size:yt,type:te,border:{width:2},opacity:1},labels:{visible:!1,position:Bn,margin:De(3),padding:De(4),animation:{type:dt,delay:ct}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}}},errorBars:{line:{width:1}}},ye(Hn.prototype,zn),ye(Hn.prototype,Pn),Nn=he.extend({init:function(e,t,n){he.fn.init.call(this),this.linePoints=e,this.series=t,this.seriesIx=n},points:function(e){var t,n,i=this.linePoints.concat(e||[]),o=[];for(t=0,n=i.length;t<n;t++)i[t].visible!==!1&&o.push(i[t]._childBox.toRect().center());return o},createVisual:function(){var e,t=this,n=t.options,i=t.series,o=i.color,r=i._defaults;_e(o)&&r&&(o=r.color),e=qe.fromPoints(this.points(),{stroke:{color:o,width:i.width,opacity:i.opacity,dashType:i.dashType},zIndex:i.zIndex}),n.closed&&e.close(),this.visual=e},aliasFor:function(e,t){return this.parent.getNearestPoint(t.x,t.y,this.seriesIx)}}),ge(Nn,{closed:!1}),On=Nn.extend({points:function(e){var t=this.calculateStepPoints(this.linePoints);return e&&e.length&&(t=t.concat(this.calculateStepPoints(e).reverse())),t},calculateStepPoints:function(e){var t,n,i,o,r,s=this.parent,a=s.plotArea,l=a.seriesCategoryAxis(this.series),c=s.seriesMissingValues(this.series)===xt,d=l.options.reverse,u=l.options.vertical,h=d?2:1,f=d?1:2,p=e.length,m=[];for(t=1;t<p;t++)n=e[t-1],i=e[t],o=n.markerBox().center(),r=i.markerBox().center(),l.options.justified?(m.push(new Xe(o.x,o.y)),m.push(u?new Xe(o.x,r.y):new Xe(r.x,o.y)),m.push(new Xe(r.x,r.y))):u?(m.push(new Xe(o.x,n.box[ne+h])),m.push(new Xe(o.x,n.box[ne+f])),c&&m.push(new Xe(o.x,i.box[ne+h])),m.push(new Xe(r.x,i.box[ne+h])),m.push(new Xe(r.x,i.box[ne+f]))):(m.push(new Xe(n.box[ie+h],o.y)),m.push(new Xe(n.box[ie+f],o.y)),c&&m.push(new Xe(i.box[ie+h],o.y)),m.push(new Xe(i.box[ie+h],r.y)),m.push(new Xe(i.box[ie+f],r.y)));return m||[]}}),Vn=Nn.extend({createVisual:function(){var e,t,n,i=this.series,o=i._defaults,r=i.color;_e(r)&&o&&(r=o.color),e=new W.CurveProcessor(this.options.closed),t=e.process(this.points()),n=new qe({stroke:{color:r,width:i.width,opacity:i.opacity,dashType:i.dashType},zIndex:i.zIndex}),n.segments.push.apply(n.segments,t),this.visual=n}}),Un={renderSegments:function(){var e,t,n,i,o,r,s,a,l=this,c=this,d=c.options,u=c.seriesPoints,h=d.series,f=u.length;for(this._segments=[],t=0;t<f;t++){for(n=h[t],i=l.sortPoints(u[t]),o=i.length,r=[],s=0;s<o;s++)a=i[s],a?r.push(a):l.seriesMissingValues(n)!==xt&&(r.length>1&&(e=l.createSegment(r,n,t,e),l._addSegment(e)),r=[]);r.length>1&&(e=l.createSegment(r,n,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,n=!t&&this.options.isStacked;return n?kt:t||xt},getNearestPoint:function(e,t,n){var i,o,r,s,a,l=new fe(e,t),c=this.seriesPoints[n],d=$;for(o=0;o<c.length;o++)r=c[o],r&&ce(r.value)&&null!==r.value&&r.visible!==!1&&(s=r.box,a=s.center().distanceTo(l),a<d&&(i=r,d=a));return i}},Wn=Ge.extend({setup:function(){this._setEnd(this.options.box.x1)},step:function(e){var t=this.options.box;this._setEnd(W.interpolateValue(t.x1,t.x2,e))},_setEnd:function(e){var t=this.element,n=t.segments,i=n[1].anchor(),o=n[2].anchor();t.suspend(),i.setX(e),t.resume(),o.setX(e)}}),ge(Wn,{duration:ct}),$e.current.register("clip",Wn),jn={createAnimation:function(){var e,t,n=this.getRoot();n&&(n.options||{}).transitions!==!1&&(e=n.box,t=qe.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Wn(t,{box:e}),r(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(e){var t,n,i=this.animationPoints();for(t=0;t<i.length;t++)n=i[t],n&&n.visual&&ce(n.visual.options.zIndex)&&n.visual.clip(e)}},qn=Fn.extend({render:function(){Fn.fn.render.call(this),this.updateStackRange(),this.renderSegments()},pointType:function(){return Hn},createPoint:function(e,t){var n,i,o,r=t.categoryIx,s=t.category,a=t.series,l=t.seriesIx,c=this.seriesMissingValues(a),d=e.valueFields.value;if(!ce(d)||null===d){if(c!==kt)return null;d=0}return n=this.pointOptions(a,l),n=this.evalPointOptions(n,d,s,r,a,l),i=e.fields.color||a.color,_e(a.color)&&(i=n.color),o=new Hn(d,n),o.color=i,this.append(o),o},plotRange:function(e){var t,n,i,o,r=this,s=this.plotValue(e);if(this.options.isStacked)for(t=e.categoryIx,n=this.categoryPoints[t],i=0;i<n.length&&(o=n[i],e!==o);i++)s+=r.plotValue(o),r.options.isStacked100&&(s=Math.min(s,1));return[s,s]},createSegment:function(e,t,n){var i,o=t.style;return new(i=o===Tt?On:o===St?Vn:Nn)(e,t,n)},animationPoints:function(){var e,t=this.points,n=[];for(e=0;e<t.length;e++)n.push((t[e]||{}).marker);return n.concat(this._segments)}}),ye(qn.prototype,Un,jn),Gn={points:function(){var e,t,n=this.parent,i=n.plotArea,o=n.options.invertAxes,r=n.seriesValueAxis(this.series),s=r.lineBox(),a=i.seriesCategoryAxis(this.series),l=a.lineBox(),c=this.stackPoints,d=this._linePoints(c),u=o?ie:ne,h=o?l.x1:l.y1;return h=Ae(h,s[u+1],s[u+2]),!this.stackPoints&&d.length>1&&(e=d[0],t=Ee(d),o?(d.unshift(new Xe(h,e.y)),d.push(new Xe(h,t.y))):(d.unshift(new Xe(e.x,h)),d.push(new Xe(t.x,h)))),d},createVisual:function(){var e=this.series,t=e._defaults,n=e.color;_e(n)&&t&&(n=t.color),this.visual=new Ye({zIndex:e.zIndex}),this.createArea(n),this.createLine(n)},createLine:function(e){var t,n=this.series,i=ye({color:e,opacity:n.opacity},n.line);i.visible!==!1&&i.width>0&&(t=qe.fromPoints(this._linePoints(),{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType,lineCap:"butt"}}),this.visual.append(t))},createArea:function(e){var t=this.series,n=qe.fromPoints(this.points(),{fill:{color:e,opacity:t.opacity},stroke:null});this.visual.append(n)}},$n=Nn.extend({init:function(e,t,n,i){Nn.fn.init.call(this,e,n,i),this.stackPoints=t}}),ye($n.prototype,Gn,{_linePoints:Nn.prototype.points}),Yn=On.extend({init:function(e,t,n,i){On.fn.init.call(this,e,n,i),this.stackPoints=t}}),ye(Yn.prototype,Gn,{_linePoints:On.prototype.points}),Kn=$n.extend({init:function(e,t,n,i,o){$n.fn.init.call(this,e,[],i,o),this.prevSegment=t,this.isStacked=n},strokeSegments:function(){var e,t,n=this._strokeSegments;return n||(e=new W.CurveProcessor(this.options.closed),t=Nn.prototype.points.call(this),n=this._strokeSegments=e.process(t)),n},createVisual:function(){var e=this.series,t=e._defaults,n=e.color;_e(n)&&t&&(n=t.color),this.visual=new Ye({zIndex:e.zIndex}),this.createFill({fill:{color:n,opacity:e.opacity},stroke:null}),this.createStroke({stroke:ye({color:n,opacity:e.opacity,lineCap:"butt"},e.line)})},createFill:function(e){var t,n,i,o,r,s,a,l=this.strokeSegments(),c=l.slice(0),d=this.prevSegment;if(this.isStacked&&d){for(t=d.strokeSegments(),n=Ee(t).anchor(),c.push(new Qe.Segment(n,n,Ee(l).anchor())),i=[],o=t.length-1;o>=0;o--)r=t[o],i.push(new Qe.Segment(r.anchor(),r.controlOut(),r.controlIn()));Me(c,i),s=c[0].anchor(),c.push(new Qe.Segment(s,s,Ee(i).anchor()))}a=new qe(e),a.segments.push.apply(a.segments,c),this.closeFill(a),this.visual.append(a)},closeFill:function(e){var t=this.parent,n=this.prevSegment,i=t.plotArea,o=t.options.invertAxes,r=t.seriesValueAxis(this.series),s=r.lineBox(),a=i.seriesCategoryAxis(this.series),l=a.lineBox(),c=o?ie:ne,d=this.strokeSegments(),u=d[0].anchor(),h=Ee(d).anchor(),f=o?l.x1:l.y1;f=Ae(f,s[c+1],s[c+2]),t.options.isStacked&&n||!(d.length>1)||(o?e.lineTo(f,h.y).lineTo(f,u.y):e.lineTo(h.x,f).lineTo(u.x,f))},createStroke:function(e){if(e.stroke.width>0){var t=new qe(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)}}}),Qn=qn.extend({createSegment:function(e,t,n,i){var o,r,s,a=this.options.isStacked,l=(t.line||{}).style;return a&&n>0&&i&&(r=this.seriesMissingValues(t),o="gap"!==r?i.linePoints:this._gapStackPoints(e,n,l),l!==Tt&&(o=o.slice(0).reverse())),l===St?new Kn(e,i,a,t,n):new(s=l===Tt?Yn:$n)(e,o,t,n)},reflow:function(e){var t,n,i,o,r=this;if(qn.fn.reflow.call(this,e),t=this._stackPoints)for(n=0;n<t.length;n++)i=t[n],o=r.categoryAxis.getSlot(i.categoryIx),i.reflow(o)},_gapStackPoints:function(e,t,n){var i,o,r,s,a=this,l=this.seriesPoints,c=e[0].categoryIx,d=c+e.length,u=[];for(this._stackPoints=this._stackPoints||[],i=c;i<d;i++){o=t,r=void 0;do o--,r=l[o][i];while(o>0&&!r);r?(n!==Tt&&i>c&&!l[o][i-1]&&u.push(a._previousSegmentPoint(i,i-1,o)),u.push(r),n!==Tt&&i+1<d&&!l[o][i+1]&&u.push(a._previousSegmentPoint(i,i+1,o))):(s=a._createGapStackPoint(i),a._stackPoints.push(s),u.push(s))}return u},_previousSegmentPoint:function(e,t,n){for(var i,o=this.seriesPoints,r=n;r>0&&!i;)r--,i=o[r][t];return i?i=o[r][e]:(i=this._createGapStackPoint(e),this._stackPoints.push(i)),i},_createGapStackPoint:function(e){var t=this.pointOptions({},0),n=new Hn(0,t);return n.categoryIx=e,n.series={},n},seriesMissingValues:function(e){return e.missingValues||kt}}),Xn=j.extend({init:function(){this.axisRanges={}},update:function(e){var t,n,i,o=this.axisRanges;for(t in e)n=e[t],i=o[t],o[t]=i=i||{min:$,max:Y},i.min=Math.min(i.min,n.min),i.max=Math.max(i.max,n.max)},reset:function(e){this.axisRanges[e]=void 0},query:function(e){return this.axisRanges[e]}}),Zn=he.extend({init:function(e,t){he.fn.init.call(this,t),this.textBox=new Se(e,this.options),this.append(this.textBox)},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(e){var t=this.options,n=t.vertical,i=t.aboveAxis,o=this.children[0],r=o.options,s=o.box,a=o.options.padding,l=e;r.align=n?Q:J,r.vAlign=n?X:Q,t.position===xn?n?(r.vAlign=X,!i&&s.height()<e.height()&&(r.vAlign=Z)):r.align=i?oe:J:t.position===Q?(r.vAlign=Q,r.align=Q):t.position===Cn?n?r.vAlign=i?Z:X:r.align=i?J:oe:t.position===Sn&&(n?l=i?new pe(e.x1,e.y1-s.height(),e.x2,e.y1):new pe(e.x1,e.y2,e.x2,e.y2+s.height()):(r.align=Q,l=i?new pe(e.x2,e.y1,e.x2+s.width(),e.y2):new pe(e.x1-s.width(),e.y1,e.x1,e.y2))),t.rotation||(n?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,n=this.options.vertical,i=n?ne:ie,o=i+"1",r=i+"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))}}),ge(Zn,{position:Sn,margin:De(3),padding:De(4),color:re,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:dt,delay:ct},zIndex:2}),Jn=6,ei=he.extend({init:function(e,t){he.fn.init.call(this),this.options=t,this.color=t.color||ee,this.aboveAxis=be(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,n=this.options,i=n.labels;i.visible&&(i.template?(t=Ce.compile(i.template),e=t({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series})):e=this.formatValue(i.format),this.label=new Zn(e,ye({vertical:n.vertical},i)),this.append(this.label))},formatValue:function(e){return this.owner.formatPointValue(this,e)},reflow:function(e){var t,n,i=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(n=0;n<this.errorBars.length;n++)i.errorBars[n].reflow(e)},createVisual:function(){var e,t=this,n=this,i=n.box,o=n.options,r=o.visual;this.visible!==!1&&(he.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:i.toRect(),createVisual:function(){var e=new Ye;return t.createRect(e),e},options:o}),e&&this.visual.append(e)):i.width()>0&&i.height()>0&&this.createRect(this.visual))},createRect:function(e){var t,n,i,o,r,a=this.options,l=a.border,c=ce(l.opacity)?l.opacity:a.opacity,d=this.box.toRect();d.size.width=Math.round(d.size.width),t=this.rectVisual=qe.fromRect(d,{fill:{color:this.color,opacity:a.opacity},stroke:{color:this.getBorderColor(),width:l.width,opacity:c,dashType:l.dashType}}),n=this.box.width(),i=this.box.height(),o=a.vertical?n:i,o>Jn&&(me(t),(n<1||i<1)&&(t.options.stroke.lineJoin="round")),e.append(t),s(a)&&(r=this.createGradientOverlay(t,{baseColor:this.color},ye({end:a.vertical?void 0:[0,1]},a.overlay)),e.append(r))},createHighlight:function(e){var t=qe.fromRect(this.box.toRect(),e);return me(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,n=t._brightness||ht,i=t.color;return ce(i)||(i=new Ke(e).brightness(n).toHex()),i},tooltipAnchor:function(){var e,t,n,i,o=this,r=o.options,s=o.box,a=o.aboveAxis,l=this.owner.pane.clipBox()||s,c=J,d=X;return r.vertical?(e=Math.min(s.x2,l.x2)+ft,a?t=Math.max(s.y1,l.y1):(t=Math.min(s.y2,l.y2),d=Z)):(n=Math.max(s.x1,l.x1),i=Math.min(s.x2,l.x2),r.isStacked?(d=Z,a?(c=oe,e=i):e=n,t=Math.max(s.y1,l.y1)-ft):(a?e=i+ft:(e=n-ft,c=oe),t=Math.max(s.y1,l.y1))),{point:new fe(e,t),align:{horizontal:c,vertical:d}}},overlapsBox:function(e){return this.box.overlaps(e)}}),ye(ei.prototype,zn),ye(ei.prototype,Pn),ei.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},ti=he.extend({reflow:function(e){var t,n,i=this.options,o=i.vertical,r=i.gap,s=i.spacing,a=this.children,l=a.length,c=o?ne:ie,d=l+r+s*(l-1),u=(o?e.height():e.width())/d,h=e[c+1]+u*(r/2);for(t=0;t<l;t++)n=(a[t].box||e).clone(),n[c+1]=h,n[c+2]=h+u,a[t].reflow(n),t<l-1&&(h+=u*s),h+=u}}),ge(ti,{vertical:!1,gap:0,spacing:0}),ni=he.extend({reflow:function(e){var t,n,i,o=this,r=this.options.vertical?ie:ne,s=this.children,a=s.length,l=this.box=new pe;for(t=0;t<a;t++)n=s[t],n.visible!==!1&&(i=n.box.clone(),i.snapTo(e,r),0===t&&(l=o.box=i.clone()),n.reflow(i),l.wrap(i))}}),ge(ni,{vertical:!0}),ii=Fn.extend({render:function(){Fn.fn.render.call(this),this.updateStackRange()},pointType:function(){return ei},clusterType:function(){return ti},stackType:function(){return ni},stackLimits:function(e,t){var n=Fn.fn.stackLimits.call(this,e,t);return n},createPoint:function(e,t){var n,i,o,r,s,a,l=t.categoryIx,c=t.category,d=t.series,u=t.seriesIx,h=this,f=h.options,p=h.children,m=f.isStacked,g=this.pointValue(e),v=this.pointOptions(d,u),_=v.labels;return m&&_.position===Sn&&(_.position=xn),v.isStacked=m,n=e.fields.color||d.color,g<0&&v.negativeColor&&(n=v.negativeColor),v=this.evalPointOptions(v,g,c,l,d,u),_e(d.color)&&(n=v.color),i=this.pointType(),o=new i(g,v),o.color=n,r=p[l],r||(s=this.clusterType(),r=new s({vertical:f.invertAxes,gap:f.gap,spacing:f.spacing}),this.append(r)),m?(a=this.getStackWrap(d,r),a.append(o)):r.append(o),o},getStackWrap:function(e,t){var n,i,o,r=e.stack,s=r?r.group||r:r,a=t.children;if(typeof s===G.STRING){for(i=0;i<a.length;i++)if(a[i]._stackGroup===s){n=a[i];break}}else n=a[0];return n||(o=this.stackType(),n=new o({vertical:!this.options.invertAxes}),n._stackGroup=s,t.append(n)),n},categorySlot:function(e,t,n){var i,o,r=this.options,s=e.getSlot(t),a=n.startValue();return r.isStacked&&(i=n.getSlot(a,a,!0),o=r.invertAxes?ie:ne,s[o+1]=s[o+2]=i[o+1]),s},reflowCategories:function(e){var t,n=this.children,i=n.length;for(t=0;t<i;t++)n[t].reflow(e[t])},createAnimation:function(){this._setAnimationOptions(),Fn.fn.createAnimation.call(this),r(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var e,t,n,i=this,o=this.points;for(e=0;e<o.length;e++)t=o[e],n=t.visual,n&&ce(n.options.zIndex)&&(t.options.animation=i.options.animation,t.createAnimation())},_setAnimationOptions:function(){var e,t,n=this.options,i=n.animation||{};n.isStacked?(t=this.seriesValueAxis(n.series[0]),e=t.getSlot(t.startValue())):e=this.categoryAxis.getSlot(0),i.origin=new Xe(e.x1,e.y1),i.vertical=!n.invertAxes}}),ge(ii,{animation:{type:At}}),oi=he.extend({init:function(e,t){he.fn.init.call(this,t),this.value=e},reflow:function(e){var t,n,i=this,o=i.options,r=i.value,s=i.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,n=[],n.push([[t,c.y1],[t,l.y1]]),n.push([[t,l.y2],[t,c.y2]]),this.lines=n,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(){he.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(e){var t=new Ye;return this.createBody(t,e),this.createLines(t,e),t},createBody:function(e,t){var n=qe.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});t.border.width>0&&n.options.set("stroke",{color:this.getBorderColor(),width:t.border.width,dashType:t.border.dashType,opacity:be(t.border.opacity,t.opacity)}),me(n),e.append(n),s(t)&&e.append(this.createGradientOverlay(n,{baseColor:this.color},ye({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,n,i){var o,r,s;if(n)for(o={stroke:{color:i.color||this.color,opacity:be(i.opacity,t.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},r=0;r<n.length;r++)s=qe.fromPoints(n[r],o),me(s),e.append(s)},getBorderColor:function(){var e=this.options.border,t=e.color;return ce(t)||(t=new Ke(this.color).brightness(e._brightness).toHex()),t},createOverlay:function(){var e=qe.fromRect(this.box.toRect(),{fill:{color:ee,opacity:0},stroke:null});this.visual.append(e)},createHighlight:function(){var e,t=this.options.highlight,n=this.color;return this.color=t.color||this.color,e=this.mainVisual(ye({},this.options,{line:{color:this.getBorderColor()}},t)),this.color=n,e},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var e=this.box,t=this.owner.pane.clipBox()||e;return{point:new fe(e.x2+ft,Math.max(e.y1,t.y1)+ft),align:{horizontal:J,vertical:X}}},formatValue:function(e){return this.owner.formatPointValue(this,e)},overlapsBox:function(e){return this.box.overlaps(e)}}),ge(oi,{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:{}}}),ye(oi.prototype,zn),ye(oi.prototype,Pn),ri=Fn.extend({reflowCategories:function(e){var t,n=this.children,i=n.length;for(t=0;t<i;t++)n[t].reflow(e[t])},addValue:function(e,t){var n,i,o=t.categoryIx,r=t.category,s=t.series,l=t.seriesIx,c=this,d=c.children,u=c.options,h=e.valueFields,f=this.splitValue(h),p=a(f),m=s.data[o],g=this.categoryPoints[o];g||(this.categoryPoints[o]=g=[]),p&&(n=this.createPoint(e,t)),i=d[o],i||(i=new ti({vertical:u.invertAxes,gap:u.gap,spacing:u.spacing}),this.append(i)),n&&(this.updateRange(h,t),i.append(n),n.categoryIx=o,n.category=r,n.series=s,n.seriesIx=l,n.owner=this,n.dataItem=m,n.noteText=e.fields.noteText),this.points.push(n),g.push(n)},pointType:function(){return oi},createPoint:function(e,t){var n,i=t.categoryIx,o=t.category,r=t.series,s=t.seriesIx,a=this.pointType(),l=e.valueFields,c=ye({},r),d=e.fields.color||r.color;return c=this.evalPointOptions(c,l,o,i,r,s),r.type===It&&l.open>l.close&&(d=e.fields.downColor||r.downColor||r.color),_e(r.color)&&(d=c.color),c.vertical=!this.options.invertAxes,n=new a(l,c),n.color=d,n},splitValue:function(e){return[e.low,e.open,e.close,e.high]},updateRange:function(e,t){var n=t.series.axis,i=this.splitValue(e),o=this.valueAxisRanges[n];o=this.valueAxisRanges[n]=o||{min:$,max:Y},o=this.valueAxisRanges[n]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},formatPointValue:function(e,t){var n=e.value;return this.chartService.format.auto(t,n.open,n.high,n.low,n.close,e.category)},animationPoints:function(){return this.points}}),ye(ri.prototype,jn),si=oi.extend({init:function(e,t){oi.fn.init.call(this,e,t),this.createNote()},reflow:function(e){var t,n,i,o,r=this,s=r.options,a=r.value,l=r.owner,c=l.seriesValueAxis(s);this.boxSlot=n=c.getSlot(a.q1,a.q3),this.realBody=n,this.reflowBoxSlot(e),this.whiskerSlot=t=c.getSlot(a.lower,a.upper),this.reflowWhiskerSlot(e),i=c.getSlot(a.median),a.mean&&(o=c.getSlot(a.mean),this.meanPoints=this.calcMeanPoints(e,o)),this.whiskerPoints=this.calcWhiskerPoints(n,t),this.medianPoints=this.calcMedianPoints(e,i),this.box=t.clone().wrap(n),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 n=t.center().x;return[[[n-5,t.y1],[n+5,t.y1],[n,t.y1],[n,e.y1]],[[n-5,t.y2],[n+5,t.y2],[n,t.y2],[n,e.y2]]]},calcMedianPoints:function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},renderOutliers:function(e){var t,n,i,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++)n=a[t],d=n<s.q3+l&&n>s.q1-l?e.outliers:e.extremes,i=ye({},d.border),ce(i.color)||(i.color=ce(r.color)?r.color:new Ke(d.background).brightness(ht).toHex()),o=new Te({type:d.type,width:d.size,height:d.size,rotation:d.rotation,background:d.background,border:i,opacity:d.opacity}),o.value=n,c.push(o);return this.reflowOutliers(c),c},reflowOutliers:function(e){var t,n,i,o=this,r=this.owner.seriesValueAxis(this.options),s=this.box.center();for(t=0;t<e.length;t++)n=e[t].value,i=r.getSlot(n),o.options.vertical?i.move(s.x):i.move(void 0,s.y),o.box=o.box.wrap(i),e[t].reflow(i)},mainVisual:function(e){var t,n,i=oi.fn.mainVisual.call(this,e),o=this.renderOutliers(e);for(t=0;t<o.length;t++)n=o[t].getElement(),n&&i.append(n);return i},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:oi.fn.getBorderColor.call(this)}}),ge(si,{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:yt,type:G.CROSS,background:ee,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:yt,type:te,background:ee,border:{width:2,opacity:1},opacity:0}}),ye(si.prototype,zn),ai=si.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 n=t.center().y;return[[[t.x1,n-5],[t.x1,n+5],[t.x1,n],[e.x1,n]],[[t.x2,n-5],[t.x2,n+5],[t.x2,n],[e.x2,n]]]},calcMedianPoints:function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]}}),li=ri.extend({addValue:function(e,t){var n,i,o=t.categoryIx,r=t.category,s=t.series,l=t.seriesIx,c=this,d=c.children,u=c.options,h=e.valueFields,f=this.splitValue(h),p=a(f),m=s.data[o],g=this.categoryPoints[o];g||(this.categoryPoints[o]=g=[]),p&&(n=this.createPoint(e,t)),i=d[o],i||(i=new ti({vertical:u.invertAxes,gap:u.gap,spacing:u.spacing}),this.append(i)),n&&(this.updateRange(h,t),i.append(n),n.categoryIx=o,n.category=r,n.series=s,n.seriesIx=l,n.owner=this,n.dataItem=m),this.points.push(n),g.push(n)},pointType:function(){return this.options.invertAxes?ai:si},splitValue:function(e){return[e.lower,e.q1,e.median,e.q3,e.upper]},updateRange:function(e,t){var n=t.series.axis,i=this.valueAxisRanges[n],o=this.splitValue(e).concat(this.filterOutliers(e.outliers));ce(e.mean)&&(o=o.concat(e.mean)),i=this.valueAxisRanges[n]=i||{min:$,max:Y},i=this.valueAxisRanges[n]={min:Math.min.apply(Math,o.concat([i.min])),max:Math.max.apply(Math,o.concat([i.max]))}},formatPointValue:function(e,t){var n=e.value;return this.chartService.format.auto(t,n.lower,n.q1,n.median,n.q3,n.upper,n.mean,e.category)},filterOutliers:function(e){var t,n,i=(e||[]).length,o=[];for(t=0;t<i;t++)n=e[t],ce(n)&&null!==n&&o.push(n);return o}}),ci=Mn.extend({getAxis:function(){var e=this.chart.seriesAxes(this.series),t=this.isVertical?e.y:e.x;return t}}),di=he.extend({init:function(e,t){he.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,n){var i,o=e.value[t],r=t+"Value",s=t+"ErrorLow",a=t+"ErrorHigh",l=n.seriesIx,c=n.series,d=e.options.errorBars,u=n[s],h=n[a];q(o)&&(q(u)&&q(h)&&(i={low:u,high:h}),d&&ce(d[r])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[t][l]=this.seriesErrorRanges[t][l]||new at(d[r],c,t),i=this.seriesErrorRanges[t][l].getErrorRange(o,d[r])),i&&this.addPointErrorBar(i,e,t))},addPointErrorBar:function(e,t,n){var i,o=e.low,r=e.high,s=t.series,a=t.options.errorBars,l=n===ne,c={};t[n+"Low"]=o,t[n+"High"]=r,t.errorBars=t.errorBars||[],i=new ci(o,r,l,this,s,a),t.errorBars.push(i),t.append(i),c[n]=o,this.updateRange(c,s),c[n]=r,this.updateRange(c,s)},addValue:function(t,n){var i,o=t.x,r=t.y,s=n.seriesIx,a=this.options.series[s],c=this.seriesMissingValues(a),d=this.seriesPoints[s],u=t;l(o)&&l(r)||(u=this.createMissingValue(u,c)),u&&(i=this.createPoint(u,n),i&&(e.extend(i,n),this.addErrorBar(i,ie,n),this.addErrorBar(i,ne,n)),this.updateRange(u,n.series)),this.points.push(i),d.push(i)},seriesMissingValues:function(e){return e.missingValues},createMissingValue:function(){},updateRange:function(e,t){var n=this.chartService.intl,i=t.xAxis,o=t.yAxis,r=e.x,s=e.y,a=this.xAxisRanges[i],c=this.yAxisRanges[o];l(r)&&(a=this.xAxisRanges[i]=a||{min:$,max:Y},Re(r)&&(r=Ie(n,r)),a.min=Math.min(a.min,r),a.max=Math.max(a.max,r)),l(s)&&(c=this.yAxisRanges[o]=c||{min:$,max:Y},Re(s)&&(s=Ie(n,s)),c.min=Math.min(c.min,s),c.max=Math.max(c.max,s))},evalPointOptions:function(e,t,n){var o,r=n.series,s=n.seriesIx,a={defaults:r._defaults,excluded:["data","tooltip","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},l=this._evalSeries[s];return ce(l)||(this._evalSeries[s]=l=i(e,{},a,!0)),o=e,l&&(o=ye({},e),i(o,{value:t,series:r,dataItem:n.dataItem},a)),o},pointType:function(){return Hn},pointOptions:function(e,t){var n,i=this.seriesOptions[t];return i||(n=this.pointType().prototype.defaults,this.seriesOptions[t]=i=ye({},n,{markers:{opacity:e.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},e)),i},createPoint:function(e,t){var n,i=t.series,o=this.pointOptions(i,t.seriesIx),r=t.color||i.color;return o=this.evalPointOptions(o,e,t),_e(i.color)&&(r=o.color),n=new Hn(e,o),n.color=r,this.append(n),n},seriesAxes:function(e){var t=e.xAxis,n=e.yAxis,i=this.plotArea,o=t?i.namedXAxes[t]:i.axisX,r=n?i.namedYAxes[n]:i.axisY;if(!o)throw Error("Unable to locate X axis with name "+t);if(!r)throw Error("Unable to locate Y axis with name "+n);return{x:o,y:r}},reflow:function(e){var t=this,n=this.points,i=!this.options.clip,o=0;this.traverseDataPoints(function(e,r){var s,a=n[o++],l=t.seriesAxes(r.series),c=l.x.getSlot(e.x,e.x,i),d=l.y.getSlot(e.y,e.y,i);a&&(c&&d?(s=t.pointSlot(c,d),a.reflow(s)):a.visible=!1)}),this.box=e},pointSlot:function(e,t){return new pe(e.x1,t.y1,e.x2,t.y2)},traverseDataPoints:function(e){var t,n,i,o,r,s,a,l=this,c=this,d=c.options.series,u=c.seriesPoints;for(t=0;t<d.length;t++)for(n=d[t],i=u[t],i||(u[t]=[]),o=0;o<n.data.length;o++)r=l._bindPoint(n,t,o),s=r.valueFields,a=r.fields,e(s,ye({pointIx:o,series:n,seriesIx:t,dataItem:n.data[o],owner:l},a))},formatPointValue:function(e,t){var n=e.value;return this.chartService.format.auto(t,n.x,n.y)},animationPoints:function(){var e,t=this.points,n=[];for(e=0;e<t.length;e++)n.push((t[e]||{}).marker);return n}}),ge(di,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),ye(di.prototype,jn,{_bindPoint:Fn.prototype._bindPoint}),ui=Hn.extend({init:function(e,t){Hn.fn.init.call(this,e,t),this.category=e.category},createHighlight:function(){var e=this.options.highlight,t=e.border,n=this.options.markers,i=this.box.center(),o=(n.size+n.border.width+t.width)/2,r=new Ye,s=new je.Circle(new Qe.Circle([i.x,i.y+o/5+t.width/2],o+t.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:n.background,stops:[{offset:0,color:n.background,opacity:.3},{offset:1,color:n.background,opacity:0}]})}),a=new je.Circle(new Qe.Circle([i.x,i.y],o),{stroke:{color:t.color||new Ke(n.background).brightness(ht).toHex(),width:t.width,opacity:t.opacity},fill:{color:n.background,opacity:e.opacity}});return r.append(s,a),r}}),ui.prototype.defaults=ye({},ui.prototype.defaults,{labels:{position:Q},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),hi=di.extend({_initFields:function(){this._maxSize=Y,di.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)),di.fn.addValue.call(this,e,t)):(this.points.push(null),this.seriesPoints[t.seriesIx].push(null))},reflow:function(e){this.updateBubblesSize(e),di.fn.reflow.call(this,e)},pointType:function(){return ui},createPoint:function(e,t){var n,i,o=t.series,r=o.data.length,s=t.pointIx*(ct/r),a={delay:s,duration:ct-s,type:Mt},l=t.color||o.color;return e.size<0&&o.negativeValues.visible&&(l=be(o.negativeValues.color,l)),n=ye({labels:{animation:{delay:s,duration:ct-s}}},this.pointOptions(o,t.seriesIx),{markers:{type:te,border:o.border,opacity:o.opacity,animation:a}}),n=this.evalPointOptions(n,e,t),_e(o.color)&&(l=n.color),n.markers.background=l,i=new ui(e,n),i.color=l,this.append(i),i},updateBubblesSize:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f,p,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(n=w[t],i=_.seriesPoints[t],o=n.minSize||Math.max(.02*y,10),r=n.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<i.length;h++)f=i[h],f&&(p=Math.abs(f.value.size)*u,m=Math.sqrt((l+p)/Math.PI),g=be(f.options.zIndex,0),v=g+(1-m/a),ye(f.options,{zIndex:v,markers:{size:2*m,zIndex:v},labels:{zIndex:v+1}}))},formatPointValue:function(e,t){var n=e.value;return this.chartService.format.auto(t,n.x,n.y,n.size,e.category)},createAnimation:function(){},createVisual:function(){}}),ge(hi,{tooltip:{format:"{3}"},labels:{format:"{3}"}}),fi=Te.extend({}),ye(fi.prototype,zn),pi=he.extend({init:function(e,t){he.fn.init.call(this,t),this.aboveAxis=this.options.aboveAxis,this.color=t.color||ee,this.value=e},render:function(){var e=this.options;this._rendered||(this._rendered=!0,ce(this.value.target)&&(this.target=new fi({type:e.target.shape,background:e.target.color||this.color,opacity:e.opacity,zIndex:e.zIndex,border:e.target.border,vAlign:X,align:oe}),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,n,i,o,r,s,a,l,c,d,u;this.render(),t=this,n=t.options,i=t.target,o=t.owner,r=n.invertAxes,s=o.seriesValueAxis(this.options),a=o.categorySlot(o.categoryAxis,n.categoryIx,s),l=s.getSlot(this.value.target),c=r?l:a,d=r?a:l,i&&(u=new pe(c.x1,d.y1,c.x2,d.y2),i.options.height=r?u.height():n.target.line.width,i.options.width=r?n.target.line.width:u.width(),i.reflow(u)),this.note&&this.note.reflow(e),this.box=e},createVisual:function(){var e,t;he.fn.createVisual.call(this),e=this.options,t=qe.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:be(e.border.opacity,e.opacity)}),this.bodyVisual=t,me(t),this.visual.append(t)},createAnimation:function(){this.bodyVisual&&(this.animation=Ge.create(this.bodyVisual,this.options.animation))},createHighlight:function(e){return qe.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)}}),pi.prototype.tooltipAnchor=ei.prototype.tooltipAnchor,ge(pi,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),ye(pi.prototype,zn),ye(pi.prototype,Pn),mi=Fn.extend({init:function(e,t){c(t),Fn.fn.init.call(this,e,t)},reflowCategories:function(e){var t,n=this.children,i=n.length;for(t=0;t<i;t++)n[t].reflow(e[t])},plotRange:function(e){var t=e.series,n=this.seriesValueAxis(t),i=this.categoryAxisCrossingValue(n);return[i,e.value.current||i]},createPoint:function(e,t){var n,i,o=t.categoryIx,r=t.category,s=t.series,a=t.seriesIx,l=this,c=l.options,d=l.children,u=e.valueFields,h=ye({vertical:!c.invertAxes,overlay:s.overlay,categoryIx:o,invertAxes:c.invertAxes},s),f=e.fields.color||s.color;return h=this.evalPointOptions(h,u,r,o,s,a),_e(s.color)&&(f=h.color),n=new pi(u,h),n.color=f,i=d[o],i||(i=new ti({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),this.append(i)),i.append(n),n},updateRange:function(e,t){var n=e.current,i=e.target,o=t.series.axis,r=this.valueAxisRanges[o];ce(n)&&!isNaN(n)&&ce(i&&!isNaN(i))&&(r=this.valueAxisRanges[o]=r||{min:$,max:Y},r.min=Math.min(r.min,n,i),r.max=Math.max(r.max,n,i))},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,n=this,i=this.points;for(this._setAnimationOptions(),e=0;e<i.length;e++)t=i[e],t.options.animation=n.options.animation,t.createAnimation()}}),mi.prototype._setAnimationOptions=ii.prototype._setAnimationOptions,ge(mi,{animation:{type:At}}),gi=j.extend({init:function(e,t){this.chartService=e,this.options=ye({},this.options,t)},getStyle:function(e,t){var n,i,o=e.background,r=e.border.color;return t&&(n=t.color||t.options.color,o=be(o,n),r=be(r,n)),i=De(e.padding||{},"auto"),{backgroundColor:o,borderColor:r,font:e.font,color:e.color,opacity:e.opacity,borderWidth:Fe(e.border.width),paddingTop:Fe(i.top),paddingBottom:Fe(i.bottom),paddingLeft:Fe(i.left),paddingRight:Fe(i.right)}},show:function(e,t,n){e.format=t.format;var i=this.getStyle(t,n);e.style=i,!ce(t.color)&&new Ke(i.backgroundColor).percBrightness()>180&&(e.className="k-chart-tooltip-inverse"),this.chartService.notify(bn,e)},hide:function(){this.chartService.notify(wn)},destroy:function(){delete this.chartService}}),ge(gi,{border:{width:1},opacity:1}),vi=gi.extend({init:function(e,t,n){gi.fn.init.call(this,e,n),this.crosshair=t,this.formatService=e.format,this.initAxisName()},initAxisName:function(){var e,t=this.crosshair.axis,n=t.plotArea;e=n.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis",this.axisName=e},showAt:function(e){var t=this,n=t.crosshair.axis,i=t.options,o=n[i.stickyMode?"getCategory":"getValue"](e),r=o;i.format?r=this.formatService.auto(i.format,o):n.options.type===se&&(r=this.formatService.auto(n.options.labels.dateFormats[n.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(wn,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},getAnchor:function(){var e,t,n,i=this,o=i.crosshair,r=i.options,s=r.position,a=r.padding,l=!o.axis.options.vertical,c=o.line.bbox();return l?(e=Q,s===Z?(t=X,n=c.bottomLeft().translate(0,a)):(t=Z,n=c.topLeft().translate(0,-a))):(t=Q,s===J?(e=oe,n=c.topLeft().translate(-a,0)):(e=J,n=c.topRight().translate(a,0))),{point:n,align:{horizontal:e,vertical:t}}}}),ge(vi,{padding:10}),_i=he.extend({init:function(e,t,n){he.fn.init.call(this,n),this.axis=t,this.stickyMode=t instanceof ze;var i=this.options.tooltip;i.visible&&(this.tooltip=new vi(e,this,ye({},i,{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,n=this,i=n.axis,o=n.point,r=i.options.vertical,s=this.getBox(),a=r?ne:ie,l=new Xe(s.x1,s.y1);e=r?new Xe(s.x2,s.y1):new Xe(s.x1,s.y2),o&&(this.stickyMode?(t=i.getSlot(i.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,n,i=this.axis,o=i.pane.axes,r=o.length,s=i.options.vertical,a=i.lineBox().clone(),l=s?ie:ne;for(t=0;t<r;t++)n=o[t],n.options.vertical!==s&&(e?e.wrap(n.lineBox()):e=n.lineBox().clone());return a[l+1]=e[l+1],a[l+2]=e[l+2],a},createVisual:function(){he.fn.createVisual.call(this);var e=this.options;this.line=new qe({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(),he.fn.destroy.call(this)}}),ge(_i,{color:re,width:2,zIndex:-1,tooltip:{visible:!1}}),bi=he.extend({init:function(e,t){he.fn.init.call(this,e),this.pane=t},shouldClip:function(){var e,t=this.children,n=t.length;for(e=0;e<n;e++)if(t[e].options.clip===!0)return!0;return!1},_clipBox:function(){return this.pane.chartsBox()},createVisual:function(){var e,t,n;this.visual=new Ye({zIndex:0}),this.shouldClip()&&(e=this.clipBox=this._clipBox(),t=e.toRect(),n=qe.fromRect(t),this.visual.clip(n),this.unclipLabels())},stackRoot:function(){return this},unclipLabels:function(){var e,t,n,i,o,r,s,a=this,l=a.children,c=a.clipBox;for(e=0;e<l.length;e++)for(t=l[e].points||{},n=t.length,i=0;i<n;i++)o=t[i],o&&o.overlapsBox&&o.overlapsBox(c)&&(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(){he.fn.destroy.call(this),delete this.parent}}),bi.prototype.isStackRoot=!0,wi=Pe.extend({init:function(e){Pe.fn.init.call(this,e),this.id=d(),this.createTitle(),this.content=new he,this.chartContainer=new bi({},this),this.append(this.content),this.axes=[],this.charts=[]},createTitle:function(){var e=this.options.title;we(e)&&(e=ye({},e,{align:e.position,position:X})),this.title=W.Title.buildTitle(e,this,wi.prototype.options.title)},appendAxis:function(e){this.content.append(e),this.axes.push(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,n=this,i=this.parent;if(i){for(e=0;e<this.axes.length;e++)i.removeAxis(n.axes[e]);for(t=0;t<this.charts.length;t++)i.removeChart(n.charts[t])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},reflow:function(e){var t;Ee(this.children)===this.content&&(t=this.children.pop()),Pe.fn.reflow.call(this,e),t&&this.children.push(t),this.title&&(this.contentBox.y1+=this.title.box.height())},visualStyle:function(){var e=Pe.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,n,i,o,r,s=this.axes,a=s.concat(this.parent.axes),l=[],c=[];for(e=0;e<s.length;e++)for(t=s[e],n=t.options.vertical,i=n?l:c,o=0;o<a.length;o++)0===i.length&&(r=a[o],n!==r.options.vertical&&Me(i,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()},chartsBox:function(){var e,t,n,i,o,r,s,a,l,c=this.axes,d=c.length,u=new pe;for(e=0;e<d;e++)t=c[e],n=t.options.vertical?ne:ie,i=t.lineBox(),u[n+1]=i[n+1],u[n+2]=i[n+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}}),yi=1,wi.prototype.isStackRoot=!0,ge(wi,{zIndex:-1,shrinkToFit:!0,title:{align:J},visible:!0}),ki=he.extend({init:function(e,t,n){he.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=n,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){Re(e.title)&&(e.title={text:e.title}),e.title=ye({},t.title,e.title)}var t,n,i,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++)n=a[t]||{},e(n,r),i=new wi(n),i.paneIndex=t,s.push(i),o.append(i);this.panes=s},createCrosshairs:function(e){var t,n,i,o,r,s=this;for(void 0===e&&(e=this.panes),t=0;t<e.length;t++)for(n=e[t],i=0;i<n.axes.length;i++)o=n.axes[i],o.options.crosshair&&o.options.crosshair.visible&&(r=new _i(s.chartService,o,o.options.crosshair),s.crosshairs.push(r),n.content.append(r))},removeCrosshairs:function(e){var t,n,i=this.crosshairs,o=e.axes;for(t=i.length-1;t>=0;t--)for(n=0;n<o.length;n++)if(i[t].axis===o[n]){i.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,n,i=this.panes;for(n=0;n<i.length;n++)if(i[n].options.name===e){t=i[n];break}return t||i[0]},findPointPane:function(e){var t,n,i=this.panes;for(n=0;n<i.length;n++)if(i[n].box.containsPoint(e)){t=i[n];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,n,i=this,o=[];for(t=0;t<this.axes.length;t++)n=i.axes[t],e!==n?o.push(n):n.destroy();this.axes=o},appendChart:function(e,t){this.charts.push(e),t?t.appendChart(e):this.append(e)},removeChart:function(e){var t,n,i=this,o=[];for(t=0;t<this.charts.length;t++)n=i.charts[t],n!==e?o.push(n):n.destroy();this.charts=o},addToLegend:function(e){var t,n,i,o,r,s,a,l,c,d=e.length,u=this.options.legend,h=u.labels||{},f=u.inactiveItems||{},p=f.labels||{},m=[];for(t=0;t<d;t++)n=e[t],i=n.visible!==!1,n.visibleInLegend!==!1&&(o=n.name||"",r=i?h.template:p.template||h.template,r&&(o=Ce.compile(r)({text:o,series:n})),s=n._defaults,a=n.color,_e(a)&&s&&(a=s.color),l=void 0,c=void 0,i?(l={},c=a):(l={color:p.color,font:p.font},c=f.markers.color),o&&m.push({text:o,labels:l,markerColor:c,series:n,active:i}));Me(u.items,m)},groupAxes:function(e){var t,n,i,o,r=[],s=[];for(t=0;t<e.length;t++)for(n=e[t].axes,i=0;i<n.length;i++)o=n[i],o.options.vertical?s.push(o):r.push(o);return{x:r,y:s,any:r.concat(s)}},groupSeriesByPane:function(){var e,t,n,i=this,o=this.series,r={};for(e=0;e<o.length;e++)t=o[e],n=i.seriesPaneName(t),r[n]?r[n].push(t):r[n]=[t];return r},filterVisibleSeries:function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],n.visible!==!1&&i.push(n);return i},reflow:function(e){var t=this.options.plotArea,n=this.panes,i=De(t.margin);this.box=e.clone().unpad(i),this.reflowPanes(),this.reflowAxes(n),this.reflowCharts(n)},redraw:function(e){var t,n,i=this,o=[].concat(e);for(this.initSeries(),t=0;t<o.length;t++)i.removeCrosshairs(o[t]),o[t].empty();for(this.render(o),this.reflowAxes(this.panes),this.reflowCharts(o),this.createCrosshairs(o),n=0;n<o.length;n++)o[n].refresh()},axisCrossingValues:function(e,t){var n,i=e.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=t.length-o.length,s=o[0]||0;for(n=0;n<r;n++)o.push(s);return o},alignAxisTo:function(e,t,n,i){var o=e.getSlot(n,n,!0),r=e.options.reverse?2:1,s=t.getSlot(i,i,!0),a=t.options.reverse?2:1,l=e.box.translate(s[ie+a]-o[ie+r],s[ne+a]-o[ne+r]);e.pane!==t.pane&&l.translate(0,e.pane.box.y1-t.pane.box.y1),e.reflow(l)},alignAxes:function(e,t){var n,i,o,r,s,a,l,c,d,u,f,p,m=this,g=e[0],v=t[0],_=this.axisCrossingValues(g,t),b=this.axisCrossingValues(v,e),w={},y={},k={},x={};for(n=0;n<t.length;n++)i=t[n],o=i.pane,r=o.id,s=h(e,o)||g,a=_,s!==g&&(a=m.axisCrossingValues(s,t)),m.alignAxisTo(i,s,b[n],a[n]),i.options._overlap||(Be(i.lineBox().x1)===Be(s.lineBox().x1)&&(w[r]&&i.reflow(i.box.alignTo(w[r].box,J).translate(-i.options.margin,0)),w[r]=i),Be(i.lineBox().x2)===Be(s.lineBox().x2)&&(i._mirrored||(i.options.labels.mirror=!i.options.labels.mirror,i._mirrored=!0),m.alignAxisTo(i,s,b[n],a[n]),y[r]&&i.reflow(i.box.alignTo(y[r].box,oe).translate(i.options.margin,0)),y[r]=i),0!==n&&v.pane===i.pane&&(i.alignTo(v),i.reflow(i.box)));for(l=0;l<e.length;l++)c=e[l],d=c.pane,u=d.id,f=h(t,d)||v,p=b,f!==v&&(p=m.axisCrossingValues(f,e)),m.alignAxisTo(c,f,_[l],p[l]),c.options._overlap||(Be(c.lineBox().y1)===Be(f.lineBox().y1)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),m.alignAxisTo(c,f,_[l],p[l]),k[u]&&c.reflow(c.box.alignTo(k[u].box,X).translate(0,-c.options.margin)),k[u]=c),Be(c.lineBox().y2,G.COORD_PRECISION)===Be(f.lineBox().y2,G.COORD_PRECISION)&&(x[u]&&c.reflow(c.box.alignTo(x[u].box,Z).translate(0,c.options.margin)),x[u]=c),0!==l&&(c.alignTo(g),c.reflow(c.box)))},shrinkAxisWidth:function(e){var t,n,i,o,r=this.groupAxes(e).any,s=u(r),a=0;for(t=0;t<e.length;t++)n=e[t],n.axes.length>0&&(a=Math.max(a,s.width()-n.contentBox.width()));if(0!==a)for(i=0;i<r.length;i++)o=r[i],o.options.vertical||o.reflow(o.box.shrink(a,0))},shrinkAxisHeight:function(e){var t,n,i,o,r,s,a;for(n=0;n<e.length;n++)if(i=e[n],o=i.axes,r=Math.max(0,u(o).height()-i.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,n,i,o,r,s,a,l,c,d,h=this.groupAxes(e).any,f=0;for(t=0;t<e.length;t++)if(n=e[t],i=n.axes,o=n.contentBox,i.length>0)for(r=u(i),s=Math.max(o.y1-r.y1,o.y2-r.y2),f=Math.max(f,o.x1-r.x1),a=0;a<i.length;a++)l=i[a],l.reflow(l.box.translate(0,s));for(c=0;c<h.length;c++)d=h[c],d.reflow(d.box.translate(f,0))},reflowAxes:function(e){var t,n=this,i=this.groupAxes(e);for(t=0;t<e.length;t++)n.reflowPaneAxes(e[t]);i.x.length>0&&i.y.length>0&&(this.alignAxes(i.x,i.y),this.shrinkAxisWidth(e),this.autoRotateAxisLabels(i),this.alignAxes(i.x,i.y),this.shrinkAxisWidth(e)&&this.alignAxes(i.x,i.y),this.shrinkAxisHeight(e),this.alignAxes(i.x,i.y),this.shrinkAxisHeight(e)&&this.alignAxes(i.x,i.y),this.fitAxes(e))},autoRotateAxisLabels:function(e){var t,n,i,o,r=this,s=this,a=s.axes,l=s.panes;for(n=0;n<a.length;n++)i=a[n],i.autoRotateLabels()&&(t=!0);if(t){for(o=0;o<l.length;o++)r.reflowPaneAxes(l[o]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(l))}},reflowPaneAxes:function(e){var t,n=e.axes,i=n.length;if(i>0)for(t=0;t<i;t++)n[t].reflow(e.contentBox)},reflowCharts:function(e){var t,n,i=this.charts,o=i.length,r=this.box;for(t=0;t<o;t++)n=i[t].pane,n&&!ve(n,e)||i[t].reflow(r)},reflowPanes:function(){var e,t,n,i,o,r,s,a,l,c=this,d=c.box,u=c.panes,h=u.length,f=d.height(),p=h,m=0,g=d.y1;for(e=0;e<h;e++)t=u[e],n=t.options.height,t.options.width=d.width(),t.options.height?(n.indexOf&&n.indexOf("%")&&(i=parseInt(n,10)/100,
t.options.height=i*d.height()),t.reflow(d.clone()),f-=t.options.height):m++;for(o=0;o<h;o++)r=u[o],r.options.height||(r.options.height=f/m);for(s=0;s<h;s++)a=u[s],l=d.clone().move(d.x1,g),a.reflow(l),p--,g+=a.options.height},backgroundBox:function(){var e,t,n,i,o,r,s=this.axes,a=s.length;for(t=0;t<a;t++)for(n=s[t],i=0;i<a;i++)o=s[i],n.options.vertical!==o.options.vertical&&(r=n.lineBox().clone().wrap(o.lineBox()),e=e?e.wrap(r):r);return e||this.box},chartsBoxes:function(){var e,t=this.panes,n=[];for(e=0;e<t.length;e++)n.push(t[e].chartsBox());return n},addBackgroundPaths:function(e){var t,n=this.chartsBoxes();for(t=0;t<n.length;t++)e.paths.push(qe.fromRect(n[t].toRect()))},backgroundContainsPoint:function(e){var t,n=this.chartsBoxes();for(t=0;t<n.length;t++)if(n[t].containsPoint(e))return!0},createVisual:function(){var e,t,n,i,o;he.fn.createVisual.call(this),e=this.options.plotArea,t=e.opacity,n=e.background,i=e.border,void 0===i&&(i={}),f(n)&&(n=ee,t=0),o=this._bgVisual=new je.MultiPath({fill:{color:n,opacity:t},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType},zIndex:-1}),this.addBackgroundPaths(o),this.appendVisual(o)},pointsByCategoryIndex:function(e){var t,n,i,o,r,s=this.charts,a=[];if(null!==e)for(t=0;t<s.length;t++)if(n=s[t],"_navigator"!==n.pane.options.name&&(i=s[t].categoryPoints[e],i&&i.length))for(o=0;o<i.length;o++)r=i[o],r&&ce(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,n,i,o,r,s=this.charts,a=[];for(t=0;t<s.length;t++)for(n=s[t],i=n.points,o=0;o<i.length;o++)r=i[o],r&&e(r)&&a.push(r);return a},findPoint:function(e){var t,n,i,o,r,s=this.charts;for(t=0;t<s.length;t++)for(n=s[t],i=n.points,o=0;o<i.length;o++)if(r=i[o],r&&e(r))return r},paneByPoint:function(e){var t,n,i=this.panes;for(t=0;t<i.length;t++)if(n=i[t],n.box.containsPoint(e))return n}}),ge(ki,{series:[],plotArea:{margin:{}},background:"",border:{color:re,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),xi={hover:function(e,t){this._dispatchEvent(e,t,ln)},click:function(e,t){this._dispatchEvent(e,t,an)}},Ci=j.extend({init:function(e,t,n){var i,o,r,s=t.canonicalFields(e),a=t.valueFields(e),l=t.sourceFields(e,s),c=this._seriesFields=[],d=n.query(e.type),u=e.aggregate||d;for(this._series=e,this._binder=t,i=0;i<s.length;i++){if(o=s[i],r=void 0,we(u))r=u[o];else{if(0!==i&&!ve(o,a))break;r=u}r&&c.push({canonicalName:o,name:l[i],transform:_e(r)?r:tt[r]})}},aggregatePoints:function(e,t){var n,i,o,r,s,a=this,l=this,c=l._series,d=l._seriesFields,u=this._bindPoints(e||[]),h=u.dataItems[0],f={};for(!h||q(h)||ue(h)||(n=function(){},n.prototype=h,f=new n),i=0;i<d.length;i++){if(o=d[i],r=a._bindField(u.values,o.canonicalName),s=o.transform(r,c,u.dataItems,t),!(null===s||!we(s)||ce(s.length)||s instanceof Date)){f=s;break}ce(s)&&p(o.name,f,s)}return f},_bindPoints:function(e){var t,n,i=this,o=i._binder,r=i._series,s=[],a=[];for(t=0;t<e.length;t++)n=e[t],s.push(o.bindPoint(r,n)),a.push(r.data[n]);return{values:s,dataItems:a}},_bindField:function(e,t){var n,i,o,r,s=[],a=e.length;for(n=0;n<a;n++)i=e[n],o=i.valueFields,r=void 0,r=ce(o[t])?o[t]:i.fields[t],s.push(r);return s}}),Si=j.extend({init:function(){this._defaults={}},register:function(e,t){var n,i=this;for(n=0;n<e.length;n++)i._defaults[e[n]]=t},query:function(e){return this._defaults[e]}}),Si.current=new Si,Ti=ei.extend({createLabel:function(){var e=this.options.labels,t=ye({},e,e.from),n=ye({},e,e.to);t.visible&&(this.labelFrom=this._createLabel(t),this.append(this.labelFrom)),n.visible&&(this.labelTo=this._createLabel(n),this.append(this.labelTo))},_createLabel:function(e){var t,n;return e.template?(n=Ce.compile(e.template),t=n({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):t=this.formatValue(e.format),new Zn(t,ye({vertical:this.options.vertical},e))},reflow:function(e){var t,n,i,o;this.render(),t=this,n=t.labelFrom,i=t.labelTo,o=t.value,this.box=e,n&&(n.options.aboveAxis=o.from>o.to,n.reflow(e)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(e)),this.note&&this.note.reflow(e)}}),Ti.prototype.defaults=ye({},Ti.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}}),Di=ii.extend({pointType:function(){return Ti},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 n=t.series.axis,i=e.from,o=e.to,r=this.valueAxisRanges[n];null!==e&&q(i)&&q(o)&&(r=this.valueAxisRanges[n]=r||{min:$,max:Y},r.min=Math.min(r.min,i),r.max=Math.max(r.max,i),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}}),Di.prototype.plotLimits=Fn.prototype.plotLimits,Ai=oi.extend({reflow:function(e){var t,n=this,i=n.options,o=n.value,r=n.owner,s=r.seriesValueAxis(i),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(){}}),Ei=ri.extend({pointType:function(){return Ai}}),Mi=he.extend({init:function(e,t,n){he.fn.init.call(this),this.from=e,this.to=t,this.series=n},linePoints:function(){var e,t,n=this.from,i=this,o=i.from.box,r=i.to.box,s=[];return n.isVertical?(e=n.aboveAxis?o.y1:o.y2,s.push([o.x1,e],[r.x2,e])):(t=n.aboveAxis?o.x2:o.x1,s.push([t,o.y1],[t,r.y2])),s},createVisual:function(){var e,t;he.fn.createVisual.call(this),e=this.series.line||{},t=qe.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}}),me(t),this.visual.append(t)}}),ge(Mi,{animation:{type:dt,delay:ct}}),Ri=ii.extend({render:function(){ii.fn.render.call(this),this.createSegments()},traverseDataPoints:function(e){var t,n,i,r,s,a,l,c,d,u,h=this.options.series,f=this.categoryAxis.options.categories||[],p=o(h),m=!this.options.invertAxes;for(t=0;t<h.length;t++)for(n=h[t],i=0,r=0,s=0;s<p;s++)a=nt.current.bindPoint(n,s),l=a.valueFields.value,c=a.fields.summary,d=i,u=void 0,c?"total"===c.toLowerCase()?(a.valueFields.value=i,d=0,u=i):(a.valueFields.value=r,u=d-r,r=0):q(l)&&(r+=l,i+=l,u=i),e(a,{category:f[s],categoryIx:s,series:n,seriesIx:t,total:i,runningTotal:r,from:d,to:u,isVertical:m})},updateRange:function(e,t){ii.fn.updateRange.call(this,{value:t.to},t)},aboveAxis:function(e){return e.value>=0},plotRange:function(e){return[e.from,e.to]},createSegments:function(){var e,t,n,i,o,r,s,a=this,l=this.options.series,c=this.seriesPoints,d=this.segments=[];for(e=0;e<l.length;e++)if(t=l[e],n=c[e])for(i=void 0,o=0;o<n.length;o++)r=n[o],r&&i&&(s=new Mi(i,r,t),d.push(s),a.append(s)),i=r}}),Ii=ki.extend({initFields:function(e){var t,n,i=this;if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Xn,e.length>0)for(this.invertAxes=ve(e[0].type,[At,Rt,Jt,Qt,Gt,Bt,Xt]),t=0;t<e.length;t++)if(n=e[t].stack,n&&"100%"===n.type){i.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;ki.fn.removeAxis.call(this,e),e instanceof ze?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,n,i,o,r,s,a=this,l=this.groupSeriesByPane();for(t=0;t<e.length;t++)if(n=e[t],i=l[n.options.name||"default"]||[],a.addToLegend(i),o=a.filterVisibleSeries(i))for(r=a.groupSeriesByCategoryAxis(o),s=0;s<r.length;s++)a.createChartGroup(r[s],n)},createChartGroup:function(e,t){this.createAreaChart(m(e,[Dt,Qt]),t),this.createBarChart(m(e,[Ft,At]),t),this.createRangeBarChart(m(e,[$t,Gt]),t),this.createBulletChart(m(e,[Rt,Zt]),t),this.createCandlestickChart(m(e,It),t),this.createBoxPlotChart(m(e,[Et,Xt]),t),this.createOHLCChart(m(e,Ht),t),this.createWaterfallChart(m(e,[en,Bt]),t),this.createLineChart(m(e,[Lt,Jt]),t)},aggregateCategories:function(e){var t,n,i,o,r,s=this,a=this.srcSeries||this.series,l=[];for(t=0;t<a.length;t++)n=a[t],i=s.seriesCategoryAxis(n),o=s.findPane(i.options.pane),r=g(i.options.type,se),(r||n.categoryField)&&ve(o,e)?n=s.aggregateSeries(n,i):(q(i.options.min)||q(i.options.max))&&(n=s.filterSeries(n,i)),l.push(n);this.srcSeries=a,this.series=l},filterSeries:function(e,t){var n,i,o,r=t.totalRangeIndices(),s=t.options.justified,a=ve(e.type,[Lt,Jt,Dt,Qt]);return r.min=q(t.options.min)?Math.floor(r.min):0,r.max=q(t.options.max)?s?Math.floor(r.max)+1:Math.ceil(r.max):e.data.length,n=ye({},e),a&&(i=r.min-1,o=t.options.srcCategories||[],i>=0&&i<n.data.length&&(n._outOfRangeMinPoint={item:n.data[i],category:o[i],categoryIx:-1}),r.max<n.data.length&&(n._outOfRangeMaxPoint={item:n.data[r.max],category:o[r.max],categoryIx:r.max-r.min})),t._seriesMax=Math.max(t._seriesMax||0,n.data.length),n.data=(n.data||[]).slice(r.min,r.max),n},aggregateSeries:function(e,t){var i,o,r,s,a,l,c,d,u,h,f,p,m,v,_,b,y,k=this,x=ve(e.type,[Lt,Jt,Dt,Qt]),C=t.options,S=C.categories,T=C.srcCategories;for(void 0===T&&(T=S),i=C.dataItems,void 0===i&&(i=[]),o=g(t.options.type,se),r=ye({},e),s=ye({},e),a=e.data,l=[],c=Y,d=$,u=n,o&&(u=w),p=0;p<a.length;p++)m=void 0,m=e.categoryField?u(e.categoryField,a[p],k.chartService.intl):T[p],ce(m)&&(v=t.categoryIndex(m),0<=v&&v<S.length?(l[v]=l[v]||[],l[v].push(p)):x&&(v<0?v===c?h.points.push(p):v>c&&(c=v,h={category:m,points:[p]}):v>=S.length&&(v===d?f.points.push(p):v<d&&(d=v,f={category:m,points:[p]}))));for(_=new Ci(r,nt.current,Si.current),b=s.data=[],y=0;y<S.length;y++)b[y]=_.aggregatePoints(l[y],S[y]),l[y]&&(i[y]=b[y]);return h&&b.length&&(s._outOfRangeMinPoint={item:_.aggregatePoints(h.points,h.category),categoryIx:c,category:h.category}),f&&b.length&&(s._outOfRangeMaxPoint={item:_.aggregatePoints(f.points,f.category),categoryIx:d,category:f.category}),t.options.dataItems=i,s},appendChart:function(e,t){for(var n=e.options.series,i=this.seriesCategoryAxis(n[0]),r=i.options.categories,s=Math.max(0,o(n)-r.length);s--;)r.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),ki.fn.appendChart.call(this,e,t)},seriesPaneName:function(e){var t=this.options,n=e.axis,i=[].concat(t.valueAxis),o=Le(i,function(e){return e.name===n})[0],r=t.panes||[{}],s=(r[0]||{}).name||"default",a=(o||{}).pane||s;return a},seriesCategoryAxis:function(e){var t=e.categoryAxis,n=t?this.namedCategoryAxes[t]:this.categoryAxis;if(!n)throw Error("Unable to locate category axis with name "+t);return n},stackableChartOptions:function(e,t){var n=e.stack,i=n&&"100%"===n.type,o=t.options.clip;return{isStacked:n,isStacked100:i,clip:o}},groupSeriesByCategoryAxis:function(e){var t,n,i,o,r,s,a=[],l={};for(t=0;t<e.length;t++)n=e[t].categoryAxis||"$$default$$",l.hasOwnProperty(n)||(l[n]=!0,a.push(n));for(i=[],o=0;o<a.length;o++)r=a[o],s=y(e,r,o),0!==s.length&&i.push(s);return i},createBarChart:function(t,n){var i,o;0!==t.length&&(i=t[0],o=new ii(this,e.extend({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,n))),this.appendChart(o,n))},createRangeBarChart:function(e,t){var n,i;0!==e.length&&(n=e[0],i=new Di(this,{series:e,invertAxes:this.invertAxes,gap:n.gap,spacing:n.spacing}),this.appendChart(i,t))},createBulletChart:function(e,t){var n,i;0!==e.length&&(n=e[0],i=new mi(this,{series:e,invertAxes:this.invertAxes,gap:n.gap,spacing:n.spacing,clip:t.options.clip}),this.appendChart(i,t))},createLineChart:function(t,n){var i,o;0!==t.length&&(i=t[0],o=new qn(this,e.extend({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,n))),this.appendChart(o,n))},createAreaChart:function(t,n){var i,o;0!==t.length&&(i=t[0],o=new Qn(this,e.extend({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,n))),this.appendChart(o,n))},createOHLCChart:function(e,t){var n,i;0!==e.length&&(n=e[0],i=new Ei(this,{invertAxes:this.invertAxes,gap:n.gap,series:e,spacing:n.spacing,clip:t.options.clip}),this.appendChart(i,t))},createCandlestickChart:function(e,t){var n,i;0!==e.length&&(n=e[0],i=new ri(this,{invertAxes:this.invertAxes,gap:n.gap,series:e,spacing:n.spacing,clip:t.options.clip}),this.appendChart(i,t))},createBoxPlotChart:function(e,t){var n,i;0!==e.length&&(n=e[0],i=new li(this,{invertAxes:this.invertAxes,gap:n.gap,series:e,spacing:n.spacing,clip:t.options.clip}),this.appendChart(i,t))},createWaterfallChart:function(e,t){var n,i;0!==e.length&&(n=e[0],i=new Ri(this,{series:e,invertAxes:this.invertAxes,gap:n.gap,spacing:n.spacing}),this.appendChart(i,t))},axisRequiresRounding:function(e,t){var n,i,o,r,s,a=this,l=m(this.series,tn);for(n=0;n<this.series.length;n++)i=a.series[n],i.type!==Lt&&i.type!==Dt||(o=i.line,o&&o.style===Tt&&l.push(i));for(r=0;r<l.length;r++)if(s=l[r].categoryAxis||"",s===e||!s&&0===t)return!0},aggregatedAxis:function(e,t){var n,i,o=this.series;for(n=0;n<o.length;n++)if(i=o[n].categoryAxis||"",(i===e||!i&&0===t)&&o[n].categoryField)return!0},createCategoryAxesLabels:function(){var e,t=this.axes;for(e=0;e<t.length;e++)t[e]instanceof ze&&t[e].createLabels()},createCategoryAxes:function(e){var t,n,i,o,r,s,a,l=this,c=this.invertAxes,d=[].concat(this.options.categoryAxis),u=[];for(t=0;t<d.length;t++)if(n=d[t],i=l.findPane(n.pane),ve(i,e)){if(o=n.name,r=n.categories,void 0===r&&(r=[]),n=ye({vertical:c,axisCrossingValue:c?$:0},n),ce(n.justified)||(n.justified=l.isJustified()),l.axisRequiresRounding(o,t)&&(n.justified=!1),s=void 0,s=v(n,r[0])?new He(n,l.chartService):new ze(n,l.chartService),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,n=this.series;for(e=0;e<n.length;e++)if(t=n[e],!ve(t.type,[Dt,Qt]))return!1;return!0},createValueAxes:function(e){var t,n,i,o,r,s,a,l,c,d=this,u=this.valueAxisRangeTracker,h=u.query(),f=[].concat(this.options.valueAxis),p=this.invertAxes,m={vertical:!p},v=[];for(this.stack100&&(m.roundToMajorUnit=!1,m.labels={format:"P0"}),t=0;t<f.length;t++)if(n=f[t],i=d.findPane(n.pane),ve(i,e)){if(o=n.name,r=g(n.type,yn)?{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=g(n.type,yn)?W.LogarithmicAxis:W.NumericAxis,l=new a(s.min,s.max,ye({},m,n),d.chartService),o){if(d.namedValueAxes[o])throw Error("Value axis with name "+o+" is already defined");d.namedValueAxes[o]=l}l.axisIndex=t,v.push(l),d.appendAxis(l)}c=this.valueAxis||v[0],this.valueAxis=c,p?this.axisX=c:this.axisY=c},_dispatchEvent:function(e,t,n){var i,o,r,s=e._eventCoordinates(t),a=new fe(s.x,s.y),l=this.pointPane(a),c=[],d=[];if(l){for(i=l.axes,o=0;o<i.length;o++)r=i[o],r.getValue?_(d,r.getValue(a)):_(c,r.getCategory(a));0===c.length&&_(c,this.categoryAxis.getCategory(a)),c.length>0&&d.length>0&&e.trigger(n,{element:ke(t),originalEvent:t,category:b(c),value:b(d)})}},pointPane:function(e){var t,n,i=this.panes;for(t=0;t<i.length;t++)if(n=i[t],n.contentBox.containsPoint(e))return n},updateAxisOptions:function(e,t){var n=[].concat(e instanceof ze?this.options.categoryAxis:this.options.valueAxis);ye(n[e.axisIndex],t)}}),ge(Ii,{categoryAxis:{categories:[]},valueAxis:{}}),ye(Ii.prototype,xi),Fi=j.extend({init:function(){this._points=[]},destroy:function(){this._points=[]},show:function(e){var t,n,i=this,o=[].concat(e);for(this.hide(),t=0;t<o.length;t++)n=o[t],n&&n.toggleHighlight&&n.hasHighlight()&&(i.togglePointHighlight(n,!0),i._points.push(n))},togglePointHighlight:function(e,t){var n,i=(e.options.highlight||{}).toggle;i?(n={category:e.category,series:e.series,dataItem:e.dataItem,value:e.value,stackValue:e.stackValue,preventDefault:k,visual:e.highlightVisual(),show:t},i(n),n._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,n,i=this._points;for(t=0;t<i.length;t++)if(n=i[t],e===n)return!0;return!1}}),zi=j.extend({init:function(e,t){this.plotArea=e,this.options=ye({},this.options,t)},start:function(e){return this._active=x(e,this.options.key)},move:function(e){if(this._active){var t=this.axisRanges=this._panAxes(e,ie).concat(this._panAxes(e,ne));if(t.length)return this.axisRanges=t,C(t)}},end:function(){var e=this._active;return this._active=!1,e},pan:function(){var e,t,n=this,i=n.plotArea,o=n.axisRanges;if(o.length){for(e=0;e<o.length;e++)t=o[e],i.updateAxisOptions(t.axis,t.range);i.redraw(i.panes)}},destroy:function(){delete this.plotArea},_panAxes:function(e,t){var n,i,o,r,s=this.plotArea,a=-e[t].delta,l=(this.options.lock||"").toLowerCase(),c=[];if(0!==a&&(l||"").toLowerCase()!==t)for(n=s.axes,i=0;i<n.length;i++)o=n[i],(t===ie&&!o.options.vertical||t===ne&&o.options.vertical)&&(r=o.pan(a),r&&(r.limitRange=!0,c.push({axis:o,range:r})));return c}}),zi.prototype.options={key:"none",lock:"none"},Pi=j.extend({init:function(e,t){this.chart=e,this.options=ye({},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){Ne(this._marquee,e)},start:function(e){var t,n,i,o,r;return!!(x(e,this.options.key)&&(t=this.chart,n=t._eventCoordinates(e),i=this._zoomPane=t._plotArea.paneByPoint(n),i&&i.clipBox()))&&(o=i.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=Ne(e,["paddingLeft","paddingTop"]),n=t.paddingLeft,i=t.paddingTop,o=W.elementOffset(e);return{left:n+o.left,top:i+o.top}},move:function(e){var t=this._zoomPane;t&&this.setStyles(this._selectionPosition(e))},end:function(e){var t,n,i,o,r=this._zoomPane;if(r)return t=this._elementOffset(),n=this._selectionPosition(e),n.left-=t.left,n.top-=t.top,i={x:n.left,y:n.top},o={x:n.left+n.width,y:n.top+n.height},this._updateAxisRanges(i,o),this.removeElement(),delete this._zoomPane,C(this.axisRanges)},zoom:function(){var e,t,n,i=this.axisRanges;if(i&&i.length){for(e=this.chart._plotArea,t=0;t<i.length;t++)n=i[t],e.updateAxisOptions(n.axis,n.range);e.redraw(e.panes)}},destroy:function(){this.removeElement(),delete this._marquee,delete this.chart},_updateAxisRanges:function(e,t){var n,i,o,r,s=(this.options.lock||"").toLowerCase(),a=[],l=this._zoomPane.axes;for(n=0;n<l.length;n++)i=l[n],o=i.options.vertical,s===ie&&!o||s===ne&&o||(r=i.pointsRange(e,t),r&&a.push({axis:i,range:r}));this.axisRanges=a},_selectionPosition:function(e){var t=this._zoomPaneClipBox,n={x:e.x.startLocation,y:e.y.startLocation},i=e.x.location,o=e.y.location,r=(this.options.lock||"").toLowerCase(),s=Math.min(n.x,i),a=Math.min(n.y,o),l=Math.abs(n.x-i),c=Math.abs(n.y-o);return r===ie&&(s=t.x1,l=t.width()),r===ne&&(a=t.y1,c=t.height()),i>t.x2&&(l=t.x2-n.x),i<t.x1&&(l=n.x-t.x1),o>t.y2&&(c=t.y2-n.y),o<t.y1&&(c=n.y-t.y1),{left:Math.max(s,t.x1),top:Math.max(a,t.y1),width:l,height:c}}}),Pi.prototype.options={key:"shift",lock:"none"},Bi=j.extend({init:function(e,t){this.chart=e,this.options=ye({},this.options,t)},updateRanges:function(e){var t,n,i,o,r=(this.options.lock||"").toLowerCase(),s=[],a=this.chart._plotArea.axes;for(t=0;t<a.length;t++)n=a[t],i=n.options.vertical,r===ie&&!i||r===ne&&i||(o=n.zoomRange(-e),o&&s.push({axis:n,range:o}));return this.axisRanges=s,C(s)},zoom:function(){var e,t,n,i=this.axisRanges;if(i&&i.length){for(e=this.chart._plotArea,t=0;t<i.length;t++)n=i[t],e.updateAxisOptions(n.axis,n.range);e.redraw(e.panes)}},destroy:function(){delete this.chart}}),Li=he.extend({init:function(e,t){he.fn.init.call(this,e),this.chartService=t},render:function(){var e,t,n=this,i=n.children,o=n.options,r=o.vertical;for(this.visual=new je.Layout(null,{spacing:r?0:o.spacing,lineSpacing:r?o.spacing:0,orientation:r?"vertical":"horizontal"}),e=0;e<i.length;e++)t=i[e],t.reflow(new pe),t.renderVisual()},reflow:function(e){this.visual.rect(e.toRect()),this.visual.reflow();var t=this.visual.clippedBBox();this.box=t?W.rectToBox(t):new pe},renderVisual:function(){this.addVisual()},createVisual:function(){}}),Hi=Pe.extend({init:function(e){Pe.fn.init.call(this,e),this.createContainer(),this.createMarker(),this.createLabel()},createContainer:function(){this.container=new W.FloatElement({vertical:!1,wrap:!1,align:Q}),this.append(this.container)},createMarker:function(){this.container.append(new Te(this.markerOptions()))},markerOptions:function(){var e=this.options,t=e.markerColor;return ye({},e.markers,{background:t,border:{color:t}})},createLabel:function(){var e=this.options,t=ye({},e.labels);this.container.append(new Se(e.text,t))},renderComplete:function(){var e,t;Pe.fn.renderComplete.call(this),e=this.options.cursor||{},t=this._itemOverlay=qe.fromRect(this.container.box.toRect(),{fill:{color:ee,opacity:0},stroke:null,cursor:e.style||e}),this.appendVisual(t)},click:function(e,t){var n=this.eventArgs(t);e.trigger(nn,n)||t.preventDefault()},hover:function(e,t){var n=this.eventArgs(t);return e.trigger(on,n)||(t.preventDefault(),e._legendItemHover(n.seriesIndex,n.pointIndex)),!0},leave:function(e){e._unsetActivePoint()},eventArgs:function(e){var t=this.options;return{element:ke(e),text:t.text,series:t.series,seriesIndex:t.series.index,pointIndex:t.pointIndex}},renderVisual:function(){var e=this,t=this.options,n=t.visual;n?(this.visual=n({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()):Pe.fn.renderVisual.call(this)}}),Ni="horizontal",Oi="pointer",Vi="custom",Ui=he.extend({init:function(e,t){he.fn.init.call(this,e),this.chartService=t,ve(this.options.position,[X,oe,Z,J,Vi])||(this.options.position=oe),this.createContainer(),this.createItems()},createContainer:function(){var e=this.options,t=e.position,n=e.align,i=t,o=Q;t===Vi?i=J:ve(t,[X,Z])?(i="start"===n?J:"end"===n?oe:Q,o=t):n&&("start"===n?o=X:"end"===n&&(o=Z)),this.container=new Pe({margin:e.margin,padding:e.padding,background:e.background,border:e.border,vAlign:o,align:i,zIndex:e.zIndex,shrinkToFit:!0}),this.append(this.container)},createItems:function(){var e,t,n,i=this.getService(),o=this.options,r=this.isVertical(),s=new Li({vertical:r,spacing:o.spacing},i),a=o.items;for(o.reverse&&(a=a.slice(0).reverse()),e=a.length,t=0;t<e;t++)n=a[t],s.append(new Hi(ye({},{markers:o.markers,labels:o.labels},o.item,n)));s.render(),this.container.append(s)},isVertical:function(){var e=this.options,t=e.orientation,n=e.position,i=n===Vi&&t!==Ni||(ce(t)?t!==Ni:ve(n,[J,oe]));return i},hasItems:function(){return this.container.children[0].children.length>0},reflow:function(e){var t=this.options,n=e.clone();return this.hasItems()?void(t.position===Vi?(this.containerCustomReflow(n),this.box=n):this.containerReflow(n)):void(this.box=n)},containerReflow:function(e){var t,n=this,i=n.options,o=n.container,r=i.position,s=i.width,a=i.height,l=r===X||r===Z?ie:ne,c=this.isVertical(),d=e.clone(),u=e.clone();r!==J&&r!==oe||(u.y1=d.y1=0),c&&a?(u.y2=u.y1+a,u.align(d,ne,o.options.vAlign)):!c&&s&&(u.x2=u.x1+s,u.align(d,ie,o.options.align)),o.reflow(u),u=o.box,t=u.clone(),(i.offsetX||i.offsetY)&&(u.translate(i.offsetX,i.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,n=t.options,i=t.container,o=n.offsetX,r=n.offsetY,s=n.width,a=n.height,l=this.isVertical(),c=e.clone();l&&a?c.y2=c.y1+a:!l&&s&&(c.x2=c.x1+s),i.reflow(c),c=i.box,i.reflow(new pe(o,r,o+c.width(),r+c.height()))},renderVisual:function(){this.hasItems()&&he.fn.renderVisual.call(this)}}),ge(Ui,{position:oe,items:[],labels:{margin:{left:6}},offsetX:0,offsetY:0,margin:De(5),padding:De(5),border:{color:re,width:0},item:{cursor:Oi},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:J,vAlign:Q}}),Wi=j.extend({init:function(){this._registry=[]},register:function(e,t){this._registry.push({type:e,seriesTypes:t})},create:function(e,t,n){var i,o,r,s=this._registry,a=s[0];for(o=0;o<s.length;o++)if(r=s[o],i=m(e,r.seriesTypes),i.length>0){a=r;break}return new a.type(i,t,n)}}),Wi.current=new Wi,ji=3,qi=j.extend({init:function(e,t,n,i){var o=e.element,r=this.getValueAxis(t);this.options=ye({},this.options,n),this.chart=e,this.observer=i,this.chartElement=o,this.categoryAxis=t,this._dateAxis=this.categoryAxis instanceof He,this.valueAxis=r,this.initOptions(),this.options.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())},createElements:function(){var e,t,n,i,o,r,s=this.options,a=this.wrapper=S("k-selector");Ne(a,{top:s.offset.top,left:s.offset.left,width:s.width,height:s.height}),e=this.selection=S("k-selection"),this.leftMask=S("k-mask"),this.rightMask=S("k-mask"),a.appendChild(this.leftMask),a.appendChild(this.rightMask),a.appendChild(e),e.appendChild(S("k-selection-bg")),t=this.leftHandle=S("k-handle k-left-handle"),n=this.rightHandle=S("k-handle k-right-handle"),t.appendChild(S()),n.appendChild(S()),e.appendChild(t),e.appendChild(n),this.chartElement.appendChild(a),i=Ne(e,["borderLeftWidth","borderRightWidth","height"]),o=Ne(t,"height").height,r=Ne(n,"height").height,s.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Ne(t,{top:(i.height-o)/2}),Ne(n,{top:(i.height-r)/2}),a.style.cssText=a.style.cssText},bindEvents:function(){this._mousewheelHandler=this.options.mousewheel!==!1?this._mousewheel.bind(this):D;var e;Ve(this.wrapper,(e={},e[Tn]=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,n,i=this,o=i.options,r=i.categoryAxis,s=i.valueAxis,a=r.lineBox(),l=s.lineBox(),c=this.chart.chartService.intl;this._dateAxis&&ye(o,{min:Ie(c,o.min),max:Ie(c,o.max),from:Ie(c,o.from),to:Ie(c,o.to)}),e=Ne(this.chartElement,["paddingLeft","paddingTop"]),t=e.paddingLeft,n=e.paddingTop,this.options=ye({},{width:a.width(),height:l.height(),padding:{left:t,top:n},offset:{left:l.x2+t,top:l.y1+n},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){var e;Ue(this.wrapper,(e={},e[Tn]=this._mousewheelHandler,e)),this.chartElement.removeChild(this.wrapper)}},_rangeEventArgs:function(e){return{axis:this.categoryAxis.options,from:this._value(e.from),to:this._value(e.to)}},_start:function(e){var t,n=this.options,i=ke(e);!this._state&&i&&(this.chart._unsetActivePoint(),this._state={moveTarget:T(i)||i,startLocation:e.x?e.x.location:0,range:{from:this._index(n.from),to:this._index(n.to)}},t=this._rangeEventArgs({from:this._index(n.from),to:this._index(n.to)}),this.trigger(mn,t)&&(this._state=null))},_press:function(e){var t;t=this._state?this._state.moveTarget:T(ke(e)),t&&W.addClass(t,"k-handle-active")},_move:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f,p,m;this._state&&(t=this,n=t._state,i=t.options,o=t.categoryAxis.options.categories,r=n.range,s=n.moveTarget,a=this._index(i.from),l=this._index(i.to),c=this._index(i.min),d=this._index(i.max),u=n.startLocation-e.x.location,h={from:r.from,to:r.to},f=r.to-r.from,p=Ne(this.wrapper,"width").width/(o.length-1),m=Math.round(u/p),s&&(Oe(s,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(c,a-m),d-f),r.to=Math.min(r.from+f,d)):Oe(s,"k-left-handle")?(r.from=Math.min(Math.max(c,a-m),d-1),r.to=Math.max(r.from+1,r.to)):Oe(s,"k-right-handle")&&(r.to=Math.min(Math.max(c+1,l-m),d),r.from=Math.min(r.to-1,r.from)),r.from===h.from&&r.to===h.to||(this.move(r.from,r.to),this.trigger(gn,this._rangeEventArgs(r)))))},_end:function(){var e,t;this._state&&(e=this._state.moveTarget,e&&W.removeClass(e,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(vn,this._rangeEventArgs(t)),delete this._state)},_tap:function(e){var t=this,n=t.options,i=t.categoryAxis,o=this.chart._eventCoordinates(e),r=i.pointCategoryIndex(new fe(o.x,i.box.y1)),s=this._index(n.from),a=this._index(n.to),l=this._index(n.min),c=this._index(n.max),d=a-s,u=s+d/2,h={},f=3===e.event.which,p=Math.round(u-r);this._state||f||(this.chart._unsetActivePoint(),i.options.justified||p--,h.from=Math.min(Math.max(l,s-p),c-d),h.to=Math.min(h.from+d,c),this._start(e),this._state&&(this._state.range=h,this.trigger(gn,this._rangeEventArgs(h)),this._end()))},_mousewheel:function(e){var t,n=this,i=W.mousewheelDelta(e);this._start({target:this.selection}),this._state&&(t=this._state.range,e.preventDefault(),e.stopPropagation(),Math.abs(i)>1&&(i*=ji),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger(gn,{axis:this.categoryAxis.options,delta:i,originalEvent:e,from:this._value(t.from),to:this._value(t.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){n._end()},Dn))},_gesturestart:function(e){var t,n=this.options;this._state={range:{from:this._index(n.from),to:this._index(n.to)}},t=this._rangeEventArgs(this._state.range),this.trigger(mn,t)?this._state=null:e.preventDefault()},_gestureend:function(){this._state&&(this.trigger(vn,this._rangeEventArgs(this._state.range)),delete this._state)},_gesturechange:function(e){var t=this,n=t.chart,i=t._state,o=t.options,r=t.categoryAxis,s=i.range,a=n._toModelCoordinates(e.touches[0].x.location).x,l=n._toModelCoordinates(e.touches[1].x.location).x,c=Math.min(a,l),d=Math.max(a,l);e.preventDefault(),s.from=r.pointCategoryIndex(new fe(c))||o.min,s.to=r.pointCategoryIndex(new fe(d))||o.max,this.move(s.from,s.to),this.trigger(gn,this._rangeEventArgs(s))},_index:function(e){var t=e;return e instanceof Date&&(t=this.categoryAxis.categoryIndex(e)),t},_value:function(e){var t=this.categoryAxis.options.categories,n=e;return this._dateAxis&&(n=e>t.length-1?this.options.max:t[Math.ceil(e)]),n},_slot:function(e){var t=this.categoryAxis,n=this._index(e);return t.getSlot(n,n,!0)},move:function(e,t){var n,i,o=this.options,r=o.offset,s=o.padding,a=o.selection.border,l=this._slot(e),c=Be(l.x1-r.left+s.left);Ne(this.leftMask,{width:c}),Ne(this.selection,{left:c}),l=this._slot(t),n=Be(o.width-(l.x1-r.left+s.left)),Ne(this.rightMask,{width:n}),i=o.width-n,i!==o.width&&(i+=a.right),Ne(this.rightMask,{left:i}),Ne(this.selection,{width:Math.max(o.width-(c+n)-a.right,0)})},set:function(e,t){var n=this.options,i=this._index(n.min),o=this._index(n.max),r=Ae(this._index(e),i,o),s=Ae(this._index(t),r+1,o);n.visible&&this.move(r,s),n.from=this._value(r),n.to=this._value(s)},expand:function(e){var t=this.options,n=this._index(t.min),i=this._index(t.max),o=t.mousewheel.zoom,r=this._index(t.from),s=this._index(t.to),a={from:r,to:s},l=ye({},a);if(this._state&&(a=this._state.range),o!==oe&&(a.from=Ae(Ae(r-e,0,s-1),n,i)),o!==J&&(a.to=Ae(Ae(s+e,a.from+1,i),n,i)),
a.from!==l.from||a.to!==l.to)return this.set(a.from,a.to),!0},getValueAxis:function(e){var t,n,i=e.pane.axes,o=i.length;for(t=0;t<o;t++)if(n=i[t],n.options.vertical!==e.options.vertical)return n},trigger:function(e,t){return(this.observer||this.chart).trigger(e,t)}}),ge(qi,{visible:!0,mousewheel:{zoom:"both"},min:Y,max:$}),Gi=gi.extend({show:function(e){var t,n;!e||!e.tooltipAnchor||this._current&&this._current===e||(t=ye({},this.options,e.options.tooltip),n=e.tooltipAnchor(),n?(this._current=e,gi.fn.show.call(this,{point:e,anchor:n},t,e)):this.hide())},hide:function(){delete this._current,gi.fn.hide.call(this)}}),$i=gi.extend({init:function(e,t){gi.fn.init.call(this,e.chartService,t),this.plotArea=e,this.formatService=e.chartService.format},showAt:function(e,t){var n,i,o,r=Le(e,function(e){var t=e.series.tooltip,n=t&&t.visible===!1;return!n});r.length>0&&(n=r[0],i=this.plotArea.categoryAxis.getSlot(n.categoryIx),o=t?this._slotAnchor(t,i):this._defaultAnchor(n,i),this.show({anchor:o,shared:!0,points:e,category:n.category,categoryText:this.formatService.auto(this.options.categoryFormat,n.category)},this.options))},_slotAnchor:function(e,t){var n=this.plotArea.categoryAxis,i={horizontal:"left",vertical:"center"};return n.options.vertical||(e.x=t.center().x),{point:e,align:i}},_defaultAnchor:function(e,t){var n,i=e.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=i.center(),s=t.center(),a={horizontal:"center",vertical:"center"};return n=o?new fe(r.x,s.y):new fe(s.x,r.y),{point:n,align:a}}}),ge($i,{categoryFormat:"{0:d}"}),Yi=Ge.extend({setup:function(){var e,t,n=this,i=n.element,o=n.options,r=i.bbox();r?(this.origin=o.origin,e=o.vertical?ne:ie,t=this.fromScale=new Xe(1,1),t[e]=pt,i.transform(Ze().scale(t.x,t.y))):this.abort()},step:function(e){var t=W.interpolateValue(this.fromScale.x,1,e),n=W.interpolateValue(this.fromScale.y,1,e);this.element.transform(Ze().scale(t,n,this.origin))},abort:function(){Ge.fn.abort.call(this),this.element.transform(null)}}),ge(Yi,{duration:ct}),$e.current.register(At,Yi),Ki=Ge.extend({setup:function(){var e=this.center=this.element.bbox().center();this.element.transform(Ze().scale(pt,pt,e))},step:function(e){this.element.transform(Ze().scale(e,e,this.center))}}),ge(Ki,{easing:"easeOutElastic"}),$e.current.register(Mt,Ki),Qi=Ge.extend({setup:function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},step:function(e){this.element.opacity(e*this.fadeTo)}}),ge(Qi,{duration:200,easing:"linear"}),$e.current.register(dt,Qi),Xi=Ge.extend({setup:function(){this.element.transform(Ze().scale(pt,pt,this.options.center))},step:function(e){this.element.transform(Ze().scale(e,e,this.options.center))}}),ge(Xi,{easing:"easeOutElastic",duration:ct}),$e.current.register(Nt,Xi),Zi=di.extend({render:function(){di.fn.render.call(this),this.renderSegments()},createSegment:function(e,t,n){var i,o=t.style;return new(i=o===St?Vn:Nn)(e,t,n)},animationPoints:function(){var e=di.fn.animationPoints.call(this);return e.concat(this._segments)},createMissingValue:function(e,t){if(t===kt){var n={x:e.x,y:e.y};return l(n.x)||(n.x=0),l(n.y)||(n.y=0),n}}}),ye(Zi.prototype,Un),Ji=ki.extend({initFields:function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Xn,this.yAxisRangeTracker=new Xn},render:function(e){var t,n,i,o,r,s=this;for(void 0===e&&(e=this.panes),t=this.groupSeriesByPane(),n=0;n<e.length;n++)i=e[n],o=t[i.options.name||"default"]||[],s.addToLegend(o),r=s.filterVisibleSeries(o),r&&(s.createScatterChart(m(r,Yt),i),s.createScatterLineChart(m(r,Kt),i),s.createBubbleChart(m(r,Mt),i));this.createAxes(e)},appendChart:function(e,t){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),ki.fn.appendChart.call(this,e,t)},removeAxis:function(e){var t=e.options.name;ki.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,n=e.xAxis,i=[].concat(t.xAxis),o=Le(i,function(e){return e.name===n})[0],r=e.yAxis,s=[].concat(t.yAxis),a=Le(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 di(this,{series:e,clip:t.options.clip}),t)},createScatterLineChart:function(e,t){e.length>0&&this.appendChart(new Zi(this,{series:e,clip:t.options.clip}),t)},createBubbleChart:function(e,t){e.length>0&&this.appendChart(new hi(this,{series:e,clip:t.options.clip}),t)},createXYAxis:function(e,t,n){var i,o,r,s,a,l,c,d,u=e.name,h=t?this.namedYAxes:this.namedXAxes,f=t?this.yAxisRangeTracker:this.xAxisRangeTracker,p=ye({},e,{vertical:t}),m=g(p.type,yn),v=f.query(),_=m?{min:.1,max:1}:{min:0,max:1},b=f.query(u)||v||_,w=[p.min,p.max],y=this.series;for(i=0;i<y.length;i++)if(o=y[i],r=o[t?"yAxis":"xAxis"],r===p.name||0===n&&!r){s=nt.current.bindPoint(o,0).valueFields,w.push(s[t?"y":"x"]);break}for(0===n&&v&&(b.min=Math.min(b.min,v.min),b.max=Math.max(b.max,v.max)),l=0;l<w.length;l++)if(w[l]instanceof Date){a=!0;break}if(c=g(p.type,se)||!p.type&&a?W.DateValueAxis:m?W.LogarithmicAxis:W.NumericAxis,d=new c(b.min,b.max,p,this.chartService),d.axisIndex=n,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,n,i,o,r=this,s=this.options,a=[].concat(s.xAxis),l=[],c=[].concat(s.yAxis),d=[];for(t=0;t<a.length;t++)n=r.findPane(a[t].pane),ve(n,e)&&l.push(r.createXYAxis(a[t],!1,t));for(i=0;i<c.length;i++)o=r.findPane(c[i].pane),ve(o,e)&&d.push(r.createXYAxis(c[i],!0,i));this.axisX=this.axisX||l[0],this.axisY=this.axisY||d[0]},_dispatchEvent:function(e,t,n){var i,o,r,s,a=e._eventCoordinates(t),l=new fe(a.x,a.y),c=this.axes,d=c.length,u=[],h=[];for(i=0;i<d;i++)o=c[i],r=o.options.vertical?h:u,s=o.getValue(l),null!==s&&r.push(s);u.length>0&&h.length>0&&e.trigger(n,{element:ke(t),originalEvent:t,x:b(u),y:b(h)})},updateAxisOptions:function(e,t){var n=e.options.vertical,i=this.groupAxes(this.panes),o=(n?i.y:i.x).indexOf(e),r=[].concat(n?this.options.yAxis:this.options.xAxis)[o];ye(r,t)}}),ge(Ji,{xAxis:{},yAxis:{}}),ye(Ji.prototype,xi),eo=he.extend({init:function(e,t,n){he.fn.init.call(this,n),this.value=e,this.sector=t},render:function(){var e,t,n,i=this.options.labels,o=this.owner.chartService,r=this.value;this._rendered||this.visible===!1||(this._rendered=!0,i.template?(e=Ce.compile(i.template),r=e({dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage})):i.format&&(r=o.format.auto(i.format,r)),i.visible&&r&&(i.position===Q||i.position===xn?(i.color||(t=new Ke(this.options.color).percBrightness(),i.color=t>180?re:ee),i.background||(i.background=this.options.color)):(n=o.theme.seriesDefaults.labels,i.color=i.color||n.color,i.background=i.background||n.background),this.label=new Se(r,ye({},i,{align:Q,vAlign:"",animation:{type:dt,delay:this.animationDelay}})),this.append(this.label)))},reflow:function(e){this.render(),this.box=e,this.reflowLabel()},reflowLabel:function(){var e,t,n,i,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===Q?(a.radius=Math.abs((a.radius-e)/2)+e,n=a.point(c),s.reflow(new pe(n.x,n.y-e/2,n.x,n.y))):r.position===xn?(a.radius=a.radius-e/2,n=a.point(c),s.reflow(new pe(n.x,n.y-e/2,n.x,n.y))):(n=a.clone().expand(l).point(c),n.x>=a.center.x?(i=n.x+t,s.orientation=oe):(i=n.x-t,s.orientation=J),s.reflow(new pe(i,n.y-e,n.x,n.y))))},createVisual:function(){var e,t,n=this,i=this,o=i.sector,r=i.options;he.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 Xe(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 Ye;return n.createSegmentVisual(e),e}}),t&&this.visual.append(t)):this.createSegmentVisual(this.visual))},createSegmentVisual:function(e){var t=this,n=t.sector,i=t.options,o=i.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},a=i.color,l={color:a,opacity:i.opacity},c=this.createSegment(n,ye({fill:l,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));e.append(c),s(i)&&e.append(this.createGradientOverlay(c,{baseColor:a,fallbackFill:l},ye({center:[n.center.x,n.center.y],innerRadius:n.innerRadius,radius:n.radius,userSpace:!0},i.overlay)))},createSegment:function(e,t){return t.singleSegment?new je.Circle(new Qe.Circle(new Xe(e.center.x,e.center.y),e.radius),t):W.ShapeBuilder.current.createRing(e,t)},createAnimation:function(){var e=this,t=e.options,n=e.sector.center;ye(t,{animation:{center:[n.x,n.y],delay:this.animationDelay}}),he.fn.createAnimation.call(this)},createHighlight:function(e){var t=this.options.highlight||{},n=t.border||{};return this.createSegment(this.sector,ye({},e,{fill:{color:t.color,opacity:t.opacity},stroke:{opacity:n.opacity,width:n.width,color:n.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 Xe(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(ft),t=e.middle(),n=e.point(t);return{point:n,align:A(t+180)}},formatValue:function(e){return this.owner.formatPointValue(this,e)}}),to=Be(W.rad(30),ae),no=Be(W.rad(60),ae),ge(eo,{color:ee,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:G.DEFAULT_FONT,margin:De(.5),align:te,zIndex:1,position:Sn},animation:{type:Nt},highlight:{visible:!0,border:{width:1}},visible:!0}),ye(eo.prototype,zn),io={createLegendItem:function(e,t,n){var i,o,r,s,a,l=this.options.legend||{},c=l.labels||{},d=l.inactiveItems||{},u=d.labels||{};n&&n.visibleInLegend!==!1&&(i=n.visible!==!1,o=i?c.template:u.template||c.template,r=n.category||"",o&&(r=Ce.compile(o)({text:r,series:n.series,dataItem:n.dataItem,percentage:n.percentage,value:e})),i?(s={},a=t.color):(s={color:u.color,font:u.font},a=(d.markers||{}).color),r&&this.legendItems.push({pointIndex:n.index,text:r,series:n.series,markerColor:a,labels:s}))}},oo=70,ro=he.extend({init:function(e,t){he.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,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v,_=this,b=this,w=b.options,y=b.plotArea.options.seriesColors;for(void 0===y&&(y=[]),t=y.length,n=w.series,i=n.length,o=0;o<i;o++)for(r=n[o],s=r.data,a=M(r),l=360/a,c=void 0,c=ce(r.startAngle)?r.startAngle:w.startAngle,o!==i-1&&r.labels.position===Sn&&(r.labels.position=Q),d=0;d<s.length;d++)u=nt.current.bindPoint(r,d),h=u.valueFields.value,f=Math.abs(h),p=u.fields,m=f*l,g=1!==s.length&&!!p.explode,_e(r.color)||(r.color=p.color||y[d%t]),v=E(r,p,d),e(h,new W.Ring(null,0,0,c,m),{owner:_,category:p.category||"",index:d,series:r,seriesIx:o,dataItem:s[d],percentage:0!==a?f/a:0,explode:g,visibleInLegend:p.visibleInLegend,visible:v,zIndex:i-o,animationDelay:_.animationDelay(d,o,i)}),v!==!1&&(c+=m)},evalSegmentOptions:function(e,t,n){var o=n.series;i(e,{value:t,series:o,dataItem:n.dataItem,category:n.category,percentage:n.percentage},{defaults:o._defaults,excluded:["data","template","visual","toggle"]})},addValue:function(t,n,i){var o,r=ye({},i.series,{index:i.index});this.evalSegmentOptions(r,t,i),this.createLegendItem(t,r,i),i.visible!==!1&&(o=new eo(t,n,r),e.extend(o,i),this.append(o),this.points.push(o))},reflow:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f,p,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,n=e.clone(),i=5,o=Math.min(n.width(),n.height()),r=o/2,s=o-.85*o,a=new pe(n.x1,n.y1,n.x1+o,n.y1+o),l=a.center(),c=n.center(),d=x.series.length,u=[],h=[],f=be(x.padding,s),f=f>r-i?r-i:f,a.translate(c.x-l.x,c.y-l.y),p=r-f,m=new fe(p+a.x1+f,p+a.y1+f),g=0;g<t;g++)v=C[g],_=v.sector,b=v.seriesIx,_.radius=p,_.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===Sn&&b===d-1&&(y.orientation===oe?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,n,i=Ee(this.points),o=i.sector,r=e.length-1,s=o.radius+i.options.labels.distance,a=[],l=e[0].box,c=Be(l.y1-(o.center.y-s-l.height()-l.height()/2));for(a.push(c),t=0;t<r;t++)n=e[t+1].box,l=e[t].box,c=Be(n.y1-l.y2),a.push(c);return c=Be(o.center.y+s-e[r].box.y2-e[r].box.height()/2),a.push(c),a},distributeLabels:function(e,t){var n,i,o,r,s=this,a=e.length;for(r=0;r<a;r++)for(o=-e[r],n=i=r;o>0&&(n>=0||i<a);)o=s._takeDistance(e,r,--n,o),o=s._takeDistance(e,r,++i,o);this.reflowLabels(e,t)},_takeDistance:function(e,t,n,i){var o,r=i;return e[n]>0&&(o=Math.min(e[n],r),r-=o,e[n]-=o,e[t]+=o),r},reflowLabels:function(e,t){var n,i,o,r,s=this,a=Ee(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,i=0;i<d;i++)o=t[i],r=o.box,h+=e[i],n=s.hAlignLabel(r.x2,l.clone().expand(u),h,h+r.height(),o.orientation===oe),o.orientation===oe?(c.align!==te&&(n=l.radius+l.center.x+u),o.reflow(new pe(n+r.width(),h,n,h))):(c.align!==te&&(n=l.center.x-l.radius-u),o.reflow(new pe(n-r.width(),h,n,h))),h+=r.height()},createVisual:function(){var e,t,n,i,o,r,s,a,l,c,d,u,h,f,p=this,m=this,g=m.options.connectors,v=m.points,_=v.length,b=4;for(he.fn.createVisual.call(this),this._connectorLines=[],e=0;e<_;e++)t=v[e],n=t.sector,i=t.label,o=n.middle(),r=(t.options.connectors||{}).color||g.color,i&&(s=new qe({stroke:{color:r,width:g.width},animation:{type:dt,delay:t.animationDelay}}),i.options.position===Sn&&0!==t.value&&(a=i.box,l=n.center,c=n.point(o),d=new fe(a.x1,a.center().y),u=void 0,h=void 0,f=void 0,c=n.clone().expand(g.padding).point(o),s.moveTo(c.x,c.y),i.orientation===oe?(h=new fe(a.x1-g.padding,a.center().y),f=R(l,c,d,h),d=new fe(h.x-b,h.y),f=f||d,f.x=Math.min(f.x,d.x),p.pointInCircle(f,n.center,n.radius+b)||f.x<n.center.x?(u=n.center.x+n.radius+b,t.options.labels.align!==Ft?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)):(f.y=h.y,s.lineTo(f.x,f.y))):(h=new fe(a.x2+g.padding,a.center().y),f=R(l,c,d,h),d=new fe(h.x+b,h.y),f=f||d,f.x=Math.max(f.x,d.x),p.pointInCircle(f,n.center,n.radius+b)||f.x>n.center.x?(u=n.center.x-n.radius-b,t.options.labels.align!==Ft?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)):(f.y=h.y,s.lineTo(f.x,f.y))),s.lineTo(h.x,h.y),p._connectorLines.push(s),p.visual.append(s)))},labelComparator:function(e){var t=e?-1:1;return function(e,n){var i=(e.parent.sector.middle()+270)%360,o=(n.parent.sector.middle()+270)%360;return(i-o)*t}},hAlignLabel:function(e,t,n,i,o){var r=t.radius,s=t.center,a=s.x,l=s.y,c=Math.min(Math.abs(l-n),Math.abs(l-i));return c>r?e:a+Math.sqrt(r*r-c*c)*(o?1:-1)},pointInCircle:function(e,t,n){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<Math.pow(n,2)},formatPointValue:function(e,t){return this.chartService.format.auto(t,e.value)},animationDelay:function(e){return e*oo}}),ge(ro,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),ye(ro.prototype,io),so=ki.extend({render:function(){this.createPieChart(this.series)},createPieChart:function(e){var t=e[0],n=new ro(this,{series:e,padding:t.padding,startAngle:t.startAngle,connectors:t.connectors,legend:this.options.legend});this.appendChart(n)},appendChart:function(e,t){ki.fn.appendChart.call(this,e,t),Me(this.options.legend.items,e.legendItems)}}),ao=eo.extend({reflowLabel:function(){var e,t,n=this,i=n.options.labels,o=n.label,r=this.sector.clone(),s=r.middle();o&&(e=o.box.height(),i.position===Q?(r.radius-=(r.radius-r.innerRadius)/2,t=r.point(s),o.reflow(new pe(t.x,t.y-e/2,t.x,t.y))):eo.fn.reflowLabel.call(this))},createSegment:function(e,t){return W.ShapeBuilder.current.createRing(e,t)}}),ge(ao,{overlay:{gradient:"roundedGlass"},labels:{position:Q},animation:{type:Nt}}),ye(ao.prototype,zn),lo=50,co=ro.extend({addValue:function(t,n,i){var o,r=ye({},i.series,{index:i.index});this.evalSegmentOptions(r,t,i),this.createLegendItem(t,r,i),t&&i.visible!==!1&&(o=new ao(t,n,r),e.extend(o,i),this.append(o),this.points.push(o))},reflow:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f=this,p=this.options,m=e.clone(),g=5,v=Math.min(m.width(),m.height()),_=v/2,b=v-.85*v,w=p.series,y=w.length,k=be(p.padding,b);for(k=k>_-g?_-g:k,t=_-k,n=0,o=0;o<y;o++)r=w[o],0===o&&ce(r.holeSize)&&(i=r.holeSize,t-=r.holeSize),ce(r.size)?t-=r.size:n++,ce(r.margin)&&o!==y-1&&(t-=r.margin);for(ce(i)||(s=(_-k)/(y+.75),i=.75*s,t-=i),a=i,l=0,this.seriesConfigs=[],u=0;u<y;u++)h=w[u],c=be(h.size,t/n),a+=l,d=a+c,f.seriesConfigs.push({innerRadius:a,radius:d}),l=h.margin||0,a=d;ro.fn.reflow.call(this,e)},animationDelay:function(e,t,n){return e*lo+ct*(t+1)/(n+1)}}),ge(co,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}}),uo=so.extend({render:function(){this.createDonutChart(this.series)},createDonutChart:function(e){var t=e[0],n=new co(this,{series:e,padding:t.padding,connectors:t.connectors,legend:this.options.legend});this.appendChart(n)}}),ho=.15,fo=ki.extend({initFields:function(){this.valueAxisRangeTracker=new Xn},render:function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},alignAxes:function(){var e=this.valueAxis,t=e.range(),n=e.options.reverse?t.max:t.min,i=e.getSlot(n),o=this.polarAxis.getSlot(0).center,r=e.box.translate(o.x-i.x1,o.y-i.y1);e.reflow(r)},createValueAxis:function(){var e,t,n,i,o=this.valueAxisRangeTracker,r=o.query(),s=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});s.type===yn?(e=W.RadarLogarithmicAxis,t={min:.1,max:1}):(e=W.RadarNumericAxis,t={min:0,max:1}),n=o.query(name)||r||t,n&&r&&(n.min=Math.min(n.min,r.min),n.max=Math.max(n.max,r.max)),i=new e(n.min,n.max,s,this.chartService),this.valueAxis=i,this.appendAxis(i)},reflowAxes:function(){var e,t=this,n=t.options.plotArea,i=t.valueAxis,o=t.polarAxis,r=t.box,s=Math.min(r.width(),r.height())*ho,a=De(n.padding||{},s),l=r.clone().unpad(a),c=l.clone().shrink(0,l.height()/2);o.reflow(l),i.reflow(c),e=i.lineBox().height()-i.box.height(),i.reflow(i.box.unpad({top:e})),this.axisBox=l,this.alignAxes(l)},backgroundBox:function(){return this.box}}),po=di.extend({pointSlot:function(e,t){var n=e.center.y-t.y1,i=fe.onCircle(e.center,e.startAngle,n);return new pe(i.x,i.y,i.x,i.y)}}),ge(po,{clip:!1}),mo=Zi.extend({}),mo.prototype.pointSlot=po.prototype.pointSlot,ge(mo,{clip:!1}),go=Kn.extend({closeFill: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,n,i=this._strokeSegments;return i||(e=this._polarAxisCenter(),t=new W.CurveProcessor((!1)),n=Nn.prototype.points.call(this),n.push(e),i=this._strokeSegments=t.process(n),i.pop()),i}}),vo=$n.extend({points:function(){var e=this,t=e.parent.plotArea.polarAxis,n=e.stackPoints,i=t.box.center(),o=Nn.prototype.points.call(this,n);return o.unshift([i.x,i.y]),o.push([i.x,i.y]),o}}),_o=mo.extend({createSegment:function(e,t,n){var i,o=(t.line||{}).style;return i=o===St?new go(e,null,(!1),t,n):new vo(e,[],t,n)},createMissingValue:function(e,t){var n;return l(e.x)&&t!==xt&&(n={x:e.x,y:e.y},t===kt&&(n.y=0)),n},seriesMissingValues:function(e){return e.missingValues||kt},_hasMissingValuesGap:function(){var e,t=this,n=this.options.series;for(e=0;e<n.length;e++)if(t.seriesMissingValues(n[e])===Ct)return!0},sortPoints:function(e){var t,n,i,o=this;if(e.sort(I),this._hasMissingValuesGap())for(t=0;t<e.length;t++)n=e[t],n&&(i=n.value,l(i.y)||o.seriesMissingValues(n.series)!==Ct||delete e[t]);return e}}),bo=fo.extend({createPolarAxis:function(){var e=new W.PolarAxis(this.options.xAxis,this.chartService);this.polarAxis=e,this.axisX=e,this.appendAxis(e)},valueAxisOptions:function(e){return ye(e,{majorGridLines:{type:le},minorGridLines:{type:le}},this.options.yAxis)},createValueAxis:function(){fo.fn.createValueAxis.call(this),this.axisY=this.valueAxis},appendChart:function(e,t){this.valueAxisRangeTracker.update(e.yAxisRanges),ki.prototype.appendChart.call(this,e,t)},createCharts:function(){var e=this.filterVisibleSeries(this.series),t=this.panes[0];this.createLineChart(m(e,[Vt]),t),this.createScatterChart(m(e,[Ut]),t),this.createAreaChart(m(e,[Ot]),t)},createLineChart:function(e,t){if(0!==e.length){var n=new mo(this,{series:e});this.appendChart(n,t)}},createScatterChart:function(e,t){if(0!==e.length){var n=new po(this,{series:e});this.appendChart(n,t)}},createAreaChart:function(e,t){if(0!==e.length){var n=new _o(this,{series:e});this.appendChart(n,t)}},_dispatchEvent:function(e,t,n){var i=e._eventCoordinates(t),o=new fe(i.x,i.y),r=this.axisX.getValue(o),s=this.axisY.getValue(o);null!==r&&null!==s&&e.trigger(n,{element:ke(t),x:r,y:s})},createCrosshairs:function(){}}),ge(bo,{xAxis:{},yAxis:{}}),ye(bo.prototype,xi),wo=qn.extend({pointSlot:function(e,t){var n=e.center.y-t.y1,i=fe.onCircle(e.center,e.middle(),n);return new pe(i.x,i.y,i.x,i.y)},createSegment:function(e,t,n){var i,o,r=t.style;return i=r===St?Vn:Nn,o=new i(e,t,n),e.length===t.data.length&&(o.options.closed=!0),o}}),ge(wo,{clip:!1}),yo=Kn.extend({closeFill:function(){}}),ko=$n.extend({points:function(){return Nn.prototype.points.call(this,this.stackPoints)}}),xo=wo.extend({createSegment:function(e,t,n,i){var o,r,s=this.options.isStacked,a=(t.line||{}).style;return a===St?(o=new yo(e,i,s,t,n),o.options.closed=!0):(s&&n>0&&i&&(r=i.linePoints.slice(0).reverse()),e.push(e[0]),o=new ko(e,r,t,n)),o},seriesMissingValues:function(e){return e.missingValues||kt}}),Co=ao.extend({init:function(e,t){ao.fn.init.call(this,e,null,t)}}),ge(Co,{overlay:{gradient:"none"},labels:{distance:10}}),So=he.extend({reflow:function(e){var t,n,i=this,o=i.options,r=i.children,s=o.gap,a=o.spacing,l=r.length,c=l+s+a*(l-1),d=e.angle/c,u=e.startAngle+d*(s/2);for(t=0;t<l;t++)n=e.clone(),n.startAngle=u,n.angle=d,r[t].sector&&(n.radius=r[t].sector.radius),r[t].reflow(n),r[t].sector=n,u+=d+d*a}}),ge(So,{gap:1,spacing:0}),To=he.extend({reflow:function(e){var t,n,i=this,o=i.options.reverse,r=i.children,s=r.length,a=o?s-1:0,l=o?-1:1;for(this.box=new pe,t=a;t>=0&&t<s;t+=l)n=r[t].sector,n.startAngle=e.startAngle,n.angle=e.angle}}),Do=ii.extend({pointType:function(){return Co},clusterType:function(){return So},stackType:function(){return To},categorySlot:function(e,t){return e.getSlot(t)},pointSlot:function(e,t){var n=e.clone(),i=e.center.y;return n.radius=i-t.y1,n.innerRadius=i-t.y2,n},reflowPoint:function(e,t){e.sector=t,e.reflow()},createAnimation:function(){this.options.animation.center=this.box.toRect().center(),ii.fn.createAnimation.call(this)}}),Do.prototype.reflow=Fn.prototype.reflow,ge(Do,{clip:!1,animation:{type:"pie"}}),Ao=fo.extend({createPolarAxis:function(){var e=new W.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&&ye(e,{majorGridLines:{type:le},minorGridLines:{type:le}}),this._isStacked100&&ye(e,{roundToMajorUnit:!1,labels:{format:"P0"}}),ye(e,this.options.valueAxis)},aggregateCategories:function(){Ii.prototype.aggregateCategories.call(this,this.panes)},createCategoryAxesLabels:function(){Ii.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(m(e,[Wt]),t),this.createLineChart(m(e,[qt]),t),this.createBarChart(m(e,[jt]),t)},chartOptions:function(e){var t,n,i={series:e},o=e[0];return o&&(t=this.filterVisibleSeries(e),n=o.stack,i.isStacked=n&&t.length>1,i.isStacked100=n&&"100%"===n.type&&t.length>1,i.isStacked100&&(this._isStacked100=!0)),i},createAreaChart:function(e,t){if(0!==e.length){var n=new xo(this,this.chartOptions(e));this.appendChart(n,t)}},createLineChart:function(e,t){if(0!==e.length){var n=new wo(this,this.chartOptions(e));this.appendChart(n,t)}},createBarChart:function(e,t){var n,i,o;0!==e.length&&(n=e[0],i=this.chartOptions(e),i.gap=n.gap,i.spacing=n.spacing,o=new Do(this,i),this.appendChart(o,t),this._hasBarCharts=!0)},seriesCategoryAxis:function(){return this.categoryAxis},_dispatchEvent:function(e,t,n){var i=e._eventCoordinates(t),o=new fe(i.x,i.y),r=this.categoryAxis.getCategory(o),s=this.valueAxis.getValue(o);null!==r&&null!==s&&e.trigger(n,{element:ke(t),category:r,value:s})},createCrosshairs:function(){}}),ye(Ao.prototype,xi,{appendChart:Ii.prototype.appendChart,aggregateSeries:Ii.prototype.aggregateSeries}),ge(Ao,{categoryAxis:{categories:[]},valueAxis:{}}),Eo=he.extend({init:function(e,t,n){he.fn.init.call(this,t),this.value=e,this.options.index=n.index},reflow:function(e){var t=this.points,n=this.children[0];this.box=new pe(t[0].x,t[0].y,t[1].x,t[2].y),n&&n.reflow(new pe(e.x1,t[0].y,e.x2,t[2].y))},createVisual:function(){var e,t=this,n=this.options;he.fn.createVisual.call(this),e=n.visual?n.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:n,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath(),e&&this.visual.append(e)},createPath:function(){var e=this.options,t=e.border,n=qe.fromPoints(this.points,{fill:{color:e.color,opacity:e.opacity},stroke:{color:t.color,opacity:t.opacity,width:t.width}}).close();return n},createHighlight:function(e){return qe.fromPoints(this.points,e)},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var e=qe.fromPoints(this.points).close();return{options:this.options,path:e}},tooltipAnchor:function(){var e=this.box;return{point:new fe(e.center().x,e.y1),align:{horizontal:"center",vertical:"top"}}},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),ge(Eo,{color:ee,border:{width:1}}),ye(Eo.prototype,zn),Mo=he.extend({init:function(e,t){he.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,n,i,o,r,s,a,l,c,d=this,u=this,h=u.options,f=u.plotArea.options.seriesColors;if(void 0===f&&(f=[]),e=h.series[0],t=e.data)for(n=M(e),i=0;i<t.length;i++)o=nt.current.bindPoint(e,i),r=o.valueFields.value,null!==r&&void 0!==r&&(s=o.fields,_e(e.color)||(e.color=s.color||f[i%f.length]),a=E(e,s,i),s=ye({index:i,owner:d,series:e,dataItem:t[i],percentage:Math.abs(r)/n},s,{visible:a}),l=d.createSegment(r,s),c=d.createLabel(r,s),l&&c&&l.append(c))},evalSegmentOptions:function(e,t,n){var o=n.series;i(e,{value:t,series:o,dataItem:n.dataItem,index:n.index},{defaults:o._defaults,excluded:["data","toggle","visual"]})},createSegment:function(t,n){var i,o=ye({},n.series);if(this.evalSegmentOptions(o,t,n),this.createLegendItem(t,o,n),n.visible!==!1)return i=new Eo(t,o,n),e.extend(i,n),this.append(i),this.points.push(i),i},createLabel:function(e,t){var n,i,o,r=t.series,s=t.dataItem,a=ye({},this.options.labels,r.labels),l=e;if(a.visible)return a.template?(n=Ce.compile(a.template),l=n({dataItem:s,value:e,percentage:t.percentage,category:t.category,series:r})):a.format&&(l=this.plotArea.chartService.format.auto(a.format,l)),a.color||(i=new Ke(r.color).percBrightness(),a.color=i>180?re:ee,a.background||(a.background=r.color)),this.evalSegmentOptions(a,e,t),o=new Se(l,ye({vAlign:a.position},a)),this.labels.push(o),o},labelPadding:function(){var e,t,n,i,o=this.labels,r={left:0,right:0};for(e=0;e<o.length;e++)t=o[e],n=t.options.align,n!==Q&&(i=o[e].box.width(),n===J?r.left=Math.max(r.left,i):r.right=Math.max(r.right,i));return r},dynamicSlopeReflow:function(e,t,n){var i,o,r,s,a,l,c,d,u,h,f,p=this,m=p.options,g=p.points,v=g.length,_=g[0],b=_;for(i=0;i<g.length;i++)g[i].percentage>b.percentage&&(b=g[i]);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?n*l:n/v,f=void 0,f=l?(t-o*(d/l))/2:d?0:t/2,f=Ae(f,0,t),u.push(new Xe(e.x1+r,e.y1+s)),u.push(new Xe(e.x1+t-r,e.y1+s)),u.push(new Xe(e.x1+t-f,e.y1+h+s)),u.push(new Xe(e.x1+f,e.y1+h+s)),r=f,s+=h+m.segmentSpacing,o=Ae(t-2*f,0,t)},constantSlopeReflow:function(e,t,n){var i,o,r,s,a,l=this,c=l.options,d=l.points,u=d.length,h=c.neckRatio<=1,f=h?c.neckRatio*t:t,p=h?0:(t-t/c.neckRatio)/2,m=h?t:t-2*p,g=(m-f)/2,v=0;for(i=0;i<u;i++)o=d[i].points=[],r=d[i].percentage,s=c.dynamicHeight?g*r:g/u,a=c.dynamicHeight?n*r:n/u,o.push(new Xe(e.x1+p,e.y1+v)),o.push(new Xe(e.x1+t-p,e.y1+v)),o.push(new Xe(e.x1+t-p-s,e.y1+a+v)),o.push(new Xe(e.x1+p+s,e.y1+a+v)),p+=s,v+=a+c.segmentSpacing},reflow:function(e){var t,n,i,o,r,s=this.points,a=s.length;if(a)for(t=this.options,n=e.clone().unpad(this.labelPadding()),i=n.height()-t.segmentSpacing*(a-1),o=n.width(),t.dynamicSlope?this.dynamicSlopeReflow(n,o,i):this.constantSlopeReflow(n,o,i),r=0;r<a;r++)s[r].reflow(e)}}),ge(Mo,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:Q,position:Q,zIndex:1}}),ye(Mo.prototype,io),Ro=ki.extend({render:function(){this.createFunnelChart(this.series)},createFunnelChart:function(e){var t=e[0],n=new Mo(this,{series:e,legend:this.options.legend,neckRatio:t.neckRatio,dynamicHeight:t.dynamicHeight,dynamicSlope:t.dynamicSlope,segmentSpacing:t.segmentSpacing,highlight:t.highlight});this.appendChart(n)},appendChart:function(e,t){ki.fn.appendChart.call(this,e,t),Me(this.options.legend.items,e.legendItems)}}),Io="color",Fo="first",zo="from",Po="max",Bo="min",Lo="noteText",Ho="summary",No="to",Wi.current.register(Ii,[At,Ft,Lt,Jt,Dt,Qt,It,Ht,Rt,Zt,Et,Xt,$t,Gt,en,Bt]),Wi.current.register(Ji,[Yt,Kt,Mt]),Wi.current.register(so,[Nt]),Wi.current.register(uo,[zt]),Wi.current.register(Ro,[Pt]),Wi.current.register(bo,[Ot,Vt,Ut]),Wi.current.register(Ao,[Wt,jt,qt]),nt.current.register([At,Ft,Lt,Jt,Dt,Qt],[K],[kn,Io,Lo,mt,gt]),nt.current.register([$t,Gt],[zo,No],[kn,Io,Lo]),nt.current.register([en,Bt],[K],[kn,Io,Lo,Ho]),nt.current.register([Ot,Vt,Ut],[ie,ne],[Io]),nt.current.register([Wt,jt,qt],[K],[Io]),nt.current.register([Pt],[K],[kn,Io,"visibleInLegend","visible"]),Si.current.register([At,Ft,Lt,Jt,Dt,Qt,en,Bt],{value:Po,color:Fo,noteText:Fo,errorLow:Bo,errorHigh:Po}),Si.current.register([$t,Gt],{from:Bo,to:Po,color:Fo,noteText:Fo}),Si.current.register([Wt,jt,qt],{value:Po,color:Fo}),nt.current.register([Yt,Kt,Mt],[ie,ne],[Io,Lo,vt,_t,bt,wt]),nt.current.register([Mt],[ie,ne,"size"],[Io,kn,Lo]),nt.current.register([It,Ht],["open","high","low","close"],[kn,Io,"downColor",Lo]),Si.current.register([It,Ht],{open:Po,high:Po,low:Bo,close:Po,color:Fo,downColor:Fo,noteText:Fo}),nt.current.register([Et,Xt],["lower","q1","median","q3","upper","mean","outliers"],[kn,Io,Lo]),Si.current.register([Et,Xt],{lower:Po,q1:Po,median:Po,q3:Po,upper:Po,mean:Po,outliers:Fo,color:Fo,noteText:Fo}),nt.current.register([Rt,Zt],["current","target"],[kn,Io,"visibleInLegend",Lo]),Si.current.register([Rt,Zt],{current:Po,target:Po,color:Fo,
noteText:Fo}),nt.current.register([Nt,zt],[K],[kn,Io,"explode","visibleInLegend","visible"]),Oo=[kn,K,ie,ne],Vo="mousemove",Uo="contextmenu",Wo=20,jo=j.extend({init:function(e,t,n,i){var o,r=this;void 0===i&&(i={}),this.observers=[],this.addObserver(i.observer),this.chartService=new xe.ChartService(this,i),this.chartService.theme=n,this._initElement(e),o=ye({},this.options,t),this._originalOptions=ye({},o),this._theme=n,this._initTheme(o,n),this._initSurface(),this._initHandlers(),this._bindCategories(),W.FontLoader.preloadFonts(t,function(){r._destroyed||(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){W.addClass(e,"k-chart")},_initTheme:function(t,n){var i,o=[],r=t.series||[];for(i=0;i<r.length;i++)o.push(e.extend({},r[i]));t.series=o,F(t),this._applyDefaults(t,n),null===t.seriesColors&&delete t.seriesColors,this.options=ye({},n,t),this._applySeriesColors()},getSize:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},resize:function(e){var t=this.getSize(),n=this._size;(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},_resize:function(){this._noTransitionsRedraw()},redraw:function(e){var t,n;this._applyDefaults(this.options),this._applySeriesColors(),e?(t=this._model._plotArea,n=t.findPane(e),t.redraw(n)):this._redraw()},getAxis:function(e){var t,n=this._plotArea.axes;for(t=0;t<n.length;t++)if(n[t].options.name===e)return new Je(n[t])},findAxisByName:function(e){return this.getAxis(e)},plotArea:function(){return new et(this._plotArea)},toggleHighlight:function(e,t){var n,i,o,r=this._plotArea,s=(r.srcSeries||r.series||[])[0];_e(t)?n=r.filterPoints(t):(we(t)?(i=t.series,o=t.category):i=o=t,n=s.type===zt?z(r.pointsBySeriesName(i),o):s.type===Nt||s.type===Pt?z((r.charts[0]||{}).points,o):r.pointsBySeriesName(i)),n&&this._togglePointsHighlight(e,n)},_togglePointsHighlight:function(e,t){var n,i=this._highlight;for(n=0;n<t.length;n++)i.togglePointHighlight(t[n],e)},showTooltip:function(e){var t,n,i,o=this._sharedTooltip(),r=this,s=r._tooltip,a=r._plotArea;_e(e)?(t=a.findPoint(e),t&&o&&(n=t.categoryIx)):o&&ce(e)&&(n=a.categoryAxis.categoryIndex(e)),o?n>=0&&(i=this._plotArea.pointsByCategoryIndex(n),s.showAt(i)):t&&s.show(t)},hideTooltip:function(){this._tooltip.hide()},_initSurface:function(){var e=this.surface,t=this._surfaceWrap(),n=this.options.chartArea;n.width&&W.elementSize(t,{width:n.width}),n.height&&W.elementSize(t,{height:n.height}),e&&e.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=je.Surface.create(t,{type:this.options.renderAs}))},_surfaceWrap:function(){return this.element},_redraw:function(){var e=this._getModel();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 Fi,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger(_n),this._navState||this._cancelDomEvents()},exportVisual:function(e){var t,n,i,o;return e&&(e.width||e.height)?(n=this.options.chartArea,i=this._originalOptions.chartArea,ye(n,e),o=this._getModel(),n.width=i.width,n.height=i.height,o.renderVisual(),t=o.visual):t=this.surface.exportVisual(),t},_sharedTooltip:function(){return this._plotArea instanceof Ii&&this.options.tooltip.shared},_createPannable:function(){var e=this.options;e.pannable!==!1&&(this._pannable=new zi(this._plotArea,e.pannable))},_createZoomSelection:function(){var e=this.options.zoomable,t=(e||{}).selection;e!==!1&&t!==!1&&(this._zoomSelection=new Pi(this,t))},_createMousewheelZoom:function(){var e=this.options.zoomable,t=(e||{}).mousewheel;e!==!1&&t!==!1&&(this._mousewheelZoom=new Bi(this,t))},_createTooltip:function(){var e,t=this,n=t.options.tooltip;return e=this._sharedTooltip()?new $i(this._plotArea,n):new Gi(this.chartService,n)},_applyDefaults:function(e,t){P(e,t),B(e,t)},_applySeriesColors:function(){var e,t,n,i,o=this.options,r=o.series,s=o.seriesColors||[];for(e=0;e<r.length;e++)t=r[e],n=s[e%s.length],i=t._defaults,t.color=t.color||n,i&&(i.color=i.color||n)},_getModel:function(){var e=this.options,t=this._createPlotArea(),n=new W.RootElement(this._modelOptions());return n.chart=this,n._plotArea=t,W.Title.buildTitle(e.title,n),e.legend.visible&&n.append(new Ui(t.options.legend,this.chartService)),n.append(t),n.reflow(),n},_modelOptions:function(){var e=this,t=e.options,n=e.element,i=W.elementSize(n);return this._size=null,ye({width:Math.floor(i.width)||G.DEFAULT_WIDTH,height:Math.floor(i.height)||G.DEFAULT_HEIGHT,transitions:t.transitions},t.chartArea)},_createPlotArea:function(e){var t=this.options,n=Wi.current.create(e?[]:t.series,t,this.chartService);return n},_hasSelection:function(){return this._selections&&this._selections.length},_setupSelection:function(){var e,t,n,i,o,r,s=this,a=this,l=a._plotArea.axes,c=this._selections=[];for(e=0;e<l.length;e++)t=l[e],n=t.options,t instanceof ze&&n.select&&!n.vertical&&(i=0,o=n.categories.length-1,t instanceof He&&(i=n.categories[i],o=n.categories[o]),n.justified||(t instanceof He?o=W.addDuration(o,1,n.baseUnit,n.weekStartDay):o++),r=new qi(s,t,ye({min:i,max:o},n.select)),c.push(r))},_selectStart:function(e){return this.trigger(mn,e)},_select:function(e){return this.trigger(gn,e)},_selectEnd:function(e){return this.trigger(vn,e)},_initHandlers:function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=kendo.throttle(this._mousemove.bind(this),Wo)},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,n=this.observers;for(t=0;t<n.length;t++)if(n[t].requiresHandlers(e))return!0},trigger:function(e,t){var n,i,o;for(void 0===t&&(t={}),e===bn&&(t.anchor.point=this._toDocumentCoordinates(t.anchor.point)),t.sender=this,n=this.observers,i=!1,o=0;o<n.length;o++)n[o].trigger(e,t)&&(i=!0);return i},_attachEvents:function(){var e,t,n=this,i=n.element,o=n.surface;o.bind("mouseenter",this._surfaceMouseenterHandler),o.bind("mouseleave",this._surfaceMouseleaveHandler),Ve(i,(e={},e[Uo]=this._clickHandler,e[Tn]=this._mousewheelHandler,e)),this._shouldAttachMouseMove()&&Ve(i,(t={},t[Vo]=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)})},_cancelDomEvents:function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},_gesturestart:function(e){this._mousewheelZoom&&!this._stopDragEvent(e)&&(this._gestureDistance=e.distance,this._unsetActivePoint(),this.surface.suspendTracking())},_gestureend:function(e){this._zooming&&!this._stopDragEvent(e)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(pn,{}))},_gesturechange:function(e){var t,n,i,o,r=this._mousewheelZoom;r&&!this._stopDragEvent(e)&&(e.preventDefault(),t=this._gestureDistance,n=-e.distance/t+1,Math.abs(n)>=.1&&(n=Math.round(10*n),this._gestureDistance=e.distance,i={delta:n,axisRanges:H(this._plotArea.axes),originalEvent:e},!this._zooming&&this.trigger(hn,i)||(this._zooming||(this._zooming=!0),o=i.axisRanges=r.updateRanges(n),o&&!this.trigger(fn,i)&&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._stopDragEvent(e)&&this._plotArea.backgroundContainsPoint(t)&&(this.requiresHandlers([un,cn,dn])&&this._startNavigation(e,t,un),this._pannable&&this._pannable.start(e)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0),this._zoomSelection&&this._zoomSelection.start(e)&&this.trigger(hn,{axisRanges:H(this._plotArea.axes),originalEvent:e}))},_move:function(e){var t,n,i,o,r,s,a,l,c=this,d=c._navState,u=c._pannable;if(!this._stopDragEvent(e)){if(u)t=u.move(e),t&&!this.trigger(cn,{axisRanges:t,originalEvent:e})&&u.pan();else if(d){for(n={},i=d.axes,o=0;o<i.length;o++)r=i[o],s=r.options.name,s&&(a=r.options.vertical?e.y:e.x,l=a.startLocation-a.location,0!==l&&(n[r.options.name]=r.translateRange(l)));d.axisRanges=n,this.trigger(cn,{axisRanges:n,originalEvent:e})}this._zoomSelection&&this._zoomSelection.move(e)}},_end:function(e){var t,n;this._stopDragEvent(e)||(t=this._pannable,t&&t.end(e)?(this.surface.resumeTracking(),this.trigger(dn,{axisRanges:H(this._plotArea.axes),originalEvent:e}),this._suppressHover=!1):this._endNavigation(e,dn),this._zoomSelection&&(n=this._zoomSelection.end(e),n&&!this.trigger(fn,{axisRanges:n,originalEvent:e})&&(this._zoomSelection.zoom(),this.trigger(pn,{axisRanges:n,originalEvent:e}))))},_stopDragEvent:function(){return this._hasSelection()},_mousewheel:function(e){var t,n,i,o,r,s,a,l,c,d=this,u=W.mousewheelDelta(e),h=this._mousewheelZoom,f=this._eventCoordinates(e);if(this._plotArea.backgroundContainsPoint(f))if(h)t={delta:u,axisRanges:H(this._plotArea.axes),originalEvent:e},!this._zooming&&this.trigger(hn,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(fn,t)&&h.zoom(),this._mwTimeout=setTimeout(function(){d.trigger(pn,t),d._zooming=!1,d.surface&&d.surface.resumeTracking()},Dn));else if(n=this._navState,n||(i=this._startNavigation(e,f,hn),i||(n=this._navState)),n){for(o=n.totalDelta||u,n.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(fn,{delta:u,axisRanges:s,originalEvent:e}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){d._endNavigation(e,pn)},Dn)}},_startNavigation:function(e,t,n){var i,o,r=this._model._plotArea,s=r.findPointPane(t),a=r.axes.slice(0);s&&(i=H(a),o=this.trigger(n,{axisRanges:i,originalEvent:e}),o?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,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 n=this.surface.eventTarget(e);if(n)return this._drawingChartElement(n,e,t)},_drawingChartElement:function(e,t,n){for(var i,o=e;o&&!i;)i=o.chartElement,o=o.parent;if(i)return i.aliasFor&&(i=i.aliasFor(t,this._eventCoordinates(t))),n&&(i=i.closest(n)),i},_eventCoordinates:function(e){var t=W.eventCoordinates(e);return this._toModelCoordinates(t.x,t.y)},_elementPadding:function(){var e,t,n;return this._padding||(e=Ne(this.element,["paddingLeft","paddingTop"]),t=e.paddingLeft,n=e.paddingTop,this._padding={top:n,left:t}),this._padding},_toDocumentCoordinates:function(e){var t=this._elementPadding(),n=W.elementOffset(this.element);return{left:Be(e.x+t.left+n.left),top:Be(e.y+t.top+n.top)}},_toModelCoordinates:function(e,t){var n=this.element,i=W.elementOffset(n),o=this._elementPadding();return new fe(e-i.left-o.left,t-i.top-o.top)},_tap:function(e){var t=this,n=this.surface.eventTarget(e),i=this._drawingChartElement(n,e);this._activePoint===i?this._propagateClick(i,e):(this._startHover(n,e)||this._unsetActivePoint(),this._propagateClick(i,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 n=this,i=e;i;)i.click&&i.click(n,t),i=i.parent},_startHover:function(e,t){var n,i,o=this._drawingChartElement(e,t),r=this,s=r._tooltip,a=r._highlight;return!(this._suppressHover||!a||a.isHighlighted(o)||this._sharedTooltip())&&(n=this._drawingChartElement(e,t,function(e){return e.hover&&!(e instanceof ki)}),n&&!n.hover(this,t)?(this._activePoint=n,i=ye({},i,n.options.tooltip),i.visible&&s.show(n),a.show(n),n):void 0)},_mouseover:function(e){var t,n=this._startHover(e.element,e.originalEvent);n&&n.tooltipTracking&&(this._mouseMoveTrackHandler=this._mouseMoveTrackHandler||this._mouseMoveTracking.bind(this),Ve(document,(t={},t[Vo]=this._mouseMoveTrackHandler,t)))},_mouseMoveTracking:function(e){var t,n,i,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&&(t.hover(this,e),this._activePoint=t,n=ye({},r.tooltip,l.options.tooltip),n.visible&&s.show(t),a.show(t))):(Ue(document,(i={},i[Vo]=this._mouseMoveTrackHandler,i)),this._unsetActivePoint())},_mousemove:function(e){var t=this._eventCoordinates(e);this._trackCrosshairs(t),this._plotArea.hover&&this._plotArea.hover(this,e),this._sharedTooltip()&&this._trackSharedTooltip(t,e)},_trackCrosshairs:function(e){var t,n,i=this._plotArea.crosshairs;for(t=0;t<i.length;t++)n=i[t],n.box.containsPoint(e)?n.showAt(e):n.hide()},_trackSharedTooltip:function(e,t){var n,i,o,r,s=this,a=s.options.tooltip,l=s._plotArea,c=s._plotArea.categoryAxis,d=s._tooltip,u=s._highlight;l.box.containsPoint(e)&&(n=c.pointCategoryIndex(e),n!==this._tooltipCategoryIx&&(i=l.pointsByCategoryIndex(n),o=i.map(function(e){return e.eventArgs(t)}),r=o[0]||{},r.categoryPoints=o,i.length>0&&!this.trigger(sn,r)?(a.visible&&d.showAt(i,e),u.show(i)):d.hide(),this._tooltipCategoryIx=n))},hideElements:function(){var e=this,t=e._plotArea,n=e._tooltip,i=e._highlight;this._mousemove.cancel(),t.hideCrosshairs(),i.hide(),n.hide(),delete this._tooltipCategoryIx},_unsetActivePoint:function(){var e=this,t=e._tooltip,n=e._highlight;this._activePoint=null,t&&t.hide(),n&&n.hide()},_deferRedraw:function(){this._redraw()},_clearRedrawTimeout:function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},_bindCategories:function(){var e,t,n=this,i=this.options,o=[].concat(i.categoryAxis);for(e=0;e<o.length;e++)t=o[e],t.autoBind!==!1&&n._bindCategoryAxisFromSeries(t,e)},_bindCategoryAxisFromSeries:function(e,t){var i,o,r,s,a,l,c,d,u,h,f,p=this,m=this.options.series,g=m.length,_={},b=[];for(o=0;o<g;o++)if(r=m[o],s=r.categoryAxis===e.name||!r.categoryAxis&&0===t,a=r.data,l=a.length,r.categoryField&&s&&l>0)for(i=v(e,n(r.categoryField,a[0])),c=i?w:n,d=0;d<l;d++)u=a[d],h=c(r.categoryField,u,p.chartService.intl),!i&&_[h]||(b.push([h,u]),i||(_[h]=!0));b.length>0&&(i&&(b=O(b,function(e,t){return W.dateComparer(e[0],t[0])})),f=V(b),e.categories=f[0])},_isBindable:function(e){var t,n,i=nt.current.valueFields(e),o=!0;for(t=0;t<i.length;t++)if(n=i[t],n===K?n="field":n+="Field",!ce(e[n])){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 n,i=this,o=i._plotArea,r=i._highlight,s=(o.srcSeries||o.series)[e];n=ve(s.type,[Nt,zt,Pt])?o.findPoint(function(n){return n.series.index===e&&n.index===t}):o.pointsBySeriesIndex(e),r.show(n)},_shouldAttachMouseMove:function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([ln])},updateMouseMoveHandler:function(){var e,t;Ue(this.element,(e={},e[Vo]=this._mousemove,e)),this._shouldAttachMouseMove()&&Ve(this.element,(t={},t[Vo]=this._mousemove,t))},applyOptions:function(e,t){U(this._originalOptions,e),this._originalOptions=ye(this._originalOptions,e),this.options=ye({},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()},destroy:function(){var e,t;this._destroyed=!0,Ue(this.element,(e={},e[Uo]=this._clickHandler,e[Tn]=this._mousewheelHandler,e[Vo]=this._mousemove,e)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),Ue(document,(t={},t[Vo]=this._mouseMoveTrackHandler,t)),this._destroyView(),this.surface.destroy(),this.surface=null,this._clearRedrawTimeout()},_destroyView:function(){var e=this,t=e._model,n=e._selections;if(t&&(t.destroy(),this._model=null),n)for(;n.length>0;)n.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)}}),ge(jo,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Ft,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:An,Aggregates:tt,AreaChart:Qn,AreaSegment:$n,AxisGroupRangeTracker:Xn,Bar:ei,BarChart:ii,BarLabel:Zn,BoxPlotChart:li,BoxPlot:si,BubbleChart:hi,Bullet:pi,BulletChart:mi,CandlestickChart:ri,Candlestick:oi,CategoricalChart:Fn,CategoricalErrorBar:Rn,CategoricalPlotArea:Ii,Chart:jo,ChartContainer:bi,ClipAnimation:Wn,ClusterLayout:ti,Crosshair:_i,CrosshairTooltip:vi,DefaultAggregates:Si,DonutChart:co,DonutPlotArea:uo,DonutSegment:ao,ErrorBarBase:Mn,ErrorRangeCalculator:at,Highlight:Fi,SharedTooltip:$i,Legend:Ui,LegendItem:Hi,LegendLayout:Li,LineChart:qn,LinePoint:Hn,LineSegment:Nn,Pane:wi,PieAnimation:Xi,PieChart:ro,PieChartMixin:io,PiePlotArea:so,PieSegment:eo,PlotAreaBase:ki,PlotAreaEventsMixin:xi,PlotAreaFactory:Wi,PointEventsMixin:zn,RangeBar:Ti,RangeBarChart:Di,ScatterChart:di,ScatterErrorBar:ci,ScatterLineChart:Zi,Selection:qi,SeriesAggregator:Ci,SeriesBinder:nt,SplineSegment:Vn,SplineAreaSegment:Kn,StackWrap:ni,Tooltip:Gi,OHLCChart:Ei,OHLCPoint:Ai,WaterfallChart:Ri,WaterfallSegment:Mi,XYPlotArea:Ji,MousewheelZoom:Bi,ZoomSelection:Pi,Pannable:zi,ChartAxis:Je,ChartPlotArea:et,anyHasZIndex:r,appendIfNotNull:a,areNumbers:a,categoriesCount:o,countNumbers:t,equalsIgnoreCase:g,evalOptions:i,filterSeriesByType:m,getDateField:w,getField:n,hasGradientOverlay:s,hasValue:l,isDateAxis:v,segmentVisible:E,seriesTotal:M,singleItemOrArray:b})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e){r.fn[e]=function(){var t=this._instance;if(t)return t[e].apply(t,arguments)}}function i(e,n){var i,o,r,s=[],a=e.groupNameTemplate,l=n.length;if(0===l)return r=C({},e),r.visibleInLegend=!1,[r];for(S(a)?(p.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"),a&&(i=I(a))):(i=I(e.name||""),0===i._slotCount&&(i=I(S(e.name)?"#= group.value #: #= series.name #":"#= group.value #"))),o=0;o<l;o++)r=C({},e),p.isFunction(r.color)||(r.color=t),r._groupIx=o,r._groupValue=n[o].value,s.push(r),i&&(r.name=i({series:r,group:n[o]}));return s}var o,r,s,a,l,c,d,u,h,f=".kendoChart",p=window.kendo,m=p.Class,g=p._outerWidth,v=p._outerHeight,_=p.dataviz,b=_.constants,w=_.Chart,y=_.SeriesBinder,k=p.ui.Widget,x=p.data.DataSource,C=p.deepExtend,S=_.defined,T=_.getField,D=_.InstanceObserver,A=_.inArray,E=_.services,M=e.proxy,R=e.isArray,I=p.template,F="mouseleave"+f,z=b.AXIS_LABEL_CLICK,P=b.LEGEND_ITEM_CLICK,B=b.LEGEND_ITEM_HOVER,L=b.SERIES_CLICK,H=b.SERIES_HOVER,N=b.PLOT_AREA_CLICK,O=b.PLOT_AREA_HOVER,V=b.DRAG,U=b.DRAG_END,W=b.DRAG_START,j=b.ZOOM_START,q=b.ZOOM,G=b.ZOOM_END,$=b.SELECT_START,Y=b.SELECT,K=b.SELECT_END,Q=b.RENDER,X=b.NOTE_CLICK,Z=b.NOTE_HOVER,J="change",ee="dataBound",te="leave",ne=b.VALUE,ie=b.PIE,oe=b.DONUT,re=b.FUNNEL,se=p.Observable,ae=150,le=100,ce="k-chart-tooltip-inverse",de="k-chart-shared-tooltip";for(E.DomEventsBuilder.register({create:function(e,t){return new p.UserEvents(e,C({global:!0,multiTouch:!0,fastTap:!0},t))}}),o=D.extend({handlerMap:{showTooltip:"_showTooltip",hideTooltip:"_hideTooltip",legendItemClick:"_onLegendItemClick",render:"_onRender"}}),r=k.extend({init:function(e,t){var n;p.destroy(e),k.fn.init.call(this,e),t&&(n=t.dataSource,delete t.dataSource),this.options=C({},this.options,t),this.wrapper=this.element,this._attachEvents(),t&&(t.dataSource=n),this.bind(this.events,this.options),this._initDataSource(t),p.notify(this,_.ui)},events:[ee,L,H,z,P,B,N,O,W,V,U,j,q,G,$,Y,K,X,Z,Q],options:{name:"Chart",renderAs:"",theme:"default",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(ee),e._redraw()},getSize:function(){return p.dimensions(this.element)},redraw:function(e){this._size=null,this._instance.redraw(e)},setOptions:function(e){var t=this,n=e.dataSource;delete e.dataSource,k.fn._setEvents.call(t,e),this._instance.applyOptions(e,this._getThemeOptions(e)),this.options=this._instance.options,this._tooltip.setOptions(this.options.tooltip),this._sourceSeries=null,n&&t.setDataSource(n),t._hasDataSource?t._onDataChanged():(t._bindCategories(),t.redraw()),t._instance.updateMouseMoveHandler()},setDataSource:function(e){var t=this;t.dataSource.unbind(J,t._dataChangeHandler),t.dataSource=e=x.create(e),t._hasDataSource=!0,t._hasData=!1,e.bind(J,t._dataChangeHandler),t.options.autoBind&&e.fetch()},destroy:function(){var e=this,t=e.dataSource;e.element.off(f),t&&t.unbind(J,e._dataChangeHandler),e._instance&&(e._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),this._destroyCrosshairTooltips(),k.fn.destroy.call(e)},findPaneByName:function(e){var t,n=this._plotArea.panes;for(t=0;t<n.length;t++)if(n[t].options.name===e)return new u(this,n[t])},findPaneByIndex:function(e){var t=this._plotArea.panes;if(t[e])return new u(this,t[e])},findSeries:function(e){var t,n=this._plotArea,i=n.srcSeries||n.series;for(t=0;t<i.length;t++)if(e(i[t]))return new h(this,i[t])},findSeriesByName:function(e){return this._createSeries({name:e})},findSeriesByIndex:function(e){return this._createSeries({index:e})},_createSeries:function(e){var t=this._seriesOptions(e);if(t)return new h(this,t)},_seriesOptions:function(e){var t,n,i=this._plotArea,o=i.srcSeries||i.series;if(S(e.index))t=o[e.index];else if(S(e.name))for(n=0;n<o.length;n++)if(o[n].name===e.name){t=o[n];break}return t},_attachEvents:function(){this.element.on(F,M(this._mouseleave,this))},_mouseleave:function(t){var n=this._instance,i=this._tooltip,o=t.relatedTarget;o&&e(o).closest(i.element).length||!n||n.handlingTap||n.hideElements()},_getThemeOptions:function(e){var n,i,o=(e||{}).theme;return"sass"===o||"default-v2"===o?_.autoTheme().chart:S(o)?(n=_.ui.themes||{},i=n[o]||n[o.toLowerCase()]||{},i.chart||{}):t},_initChart:function(){this._createChart(this.options,this._getThemeOptions(this.options)),this.options=this._instance.options},_createChart:function(e,t){this._instance=new w(this.element[0],e,t,{observer:new o(this),sender:this})},_initDataSource:function(e){var t=this,n=(e||{}).dataSource;t._dataChangeHandler=M(t._onDataChanged,t),t.dataSource=x.create(n).bind("change",t._dataChangeHandler),t._bindCategories(),n&&(t._hasDataSource=!0),this._initChart(),this._initTooltip(),n&&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 n=this._crosshairTooltips=this._crosshairTooltips||{},i=e+t,o=n[i];return o||(o=n[i]=new d(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(Q)},_copyMembers:function(e){this._instance=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,n=this._events;for(t=0;t<e.length;t++)if(S(n[e[t]]))return!0},_initTooltip:function(){this._tooltip=this._createTooltip(),this._tooltip.bind(te,M(this._tooltipleave,this))},_onLegendItemClick:function(e){this.trigger(P,e)||this._legendItemClick(e.seriesIndex,e.pointIndex)},_legendItemClick:function(t,n){var i,o,r=this._instance,s=r._plotArea,a=(s.srcSeries||s.series)[t];e.inArray(a.type,[ie,oe,re])>=0?(i=a.pointVisibility=a.pointVisibility||{},o=i[n],i[n]=!!S(o)&&!o):(a.visible=!a.visible,this._saveGroupVisibleState(a)),r._noTransitionsRedraw()},_createTooltip:function(){return new c(this.element,this.options.tooltip)},_tooltipleave:function(){var e=this._instance,t=e._plotArea,n=e._highlight;t.hideCrosshairs(),n.hide()},_bindData:function(e){var t,n,o=this,r=o.options,s=o._sourceSeries||r.series,a=s.length,l=o.dataSource.view(),c=(o.dataSource.group()||[]).length>0,d=[];for(t=0;t<a;t++)n=s[t],o._isBindable(n)&&c?(d=d.concat(i(n,l)),this._applyGroupVisibleState(d,e)):d.push(n||[]);o._sourceSeries=s,r.series=d,this._instance._applySeriesColors(),o._bindSeries(),o._bindCategories(),this._hasData=!0},_onDataChanged:function(e){this._bindData(e),this.trigger(ee),this._redraw()},_applyGroupVisibleState:function(e,t){var n,i;if(t&&t.action)for(n=this._groupVisibleState=this._groupVisibleState||{},i=0;i<e.length;i++)n[e[i]._groupValue]===!1&&(e[i].visible=!1);else delete this._groupVisibleState},_saveGroupVisibleState:function(e){S(e._groupValue)&&(this._groupVisibleState||(this._groupVisibleState={}),this._groupVisibleState[e._groupValue]=e.visible)},_bindSeries:function(){var e,t,n,i,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)&&(n=t._groupIx,i=S(n)?(r[n]||{}).items:r,t.autoBind!==!1&&(t.data=i))},_bindCategories:function(){var e,t,n=this,i=n.dataSource.view()||[],o=(n.dataSource.group()||[]).length>0,r=i,s=n.options,a=[].concat(s.categoryAxis);for(o&&i.length&&(r=i[0].items),e=0;e<a.length;e++)t=a[e],t.autoBind!==!1&&n._bindCategoryAxis(t,r,e)},_bindCategoryAxis:function(e,t,n){var i,o,r,s=(t||[]).length;if(e.field)for(e.categories=[],i=0;i<s;i++)r=t[i],o=T(e.field,r),0===i?(e.categories=[o],e.dataItems=[r]):(e.categories.push(o),e.dataItems.push(r));else this._instance&&this._instance._bindCategoryAxisFromSeries(e,n)},_isBindable:function(e){var t,n,i=y.current.valueFields(e),o=!0;for(n=0;n<i.length;n++)if(t=i[n],t===ne?t="field":t+="Field",!S(e[t])){o=!1;break}return o}}),s=["getAxis","findAxisByName","plotArea","toggleHighlight","showTooltip","hideTooltip","exportVisual","_resize","_redraw","_noTransitionsRedraw","_legendItemHover","_eventCoordinates"],a=0;a<s.length;a++)n(s[a]);_.ExportMixin.extend(r.fn),p.PDFMixin&&p.PDFMixin.extend(r.fn),_.ui.plugin(r),l=p.geometry,c=se.extend({init:function(t,n){var i,o=this;se.fn.init.call(o),this.setOptions(n),o.chartElement=t,o.template=c.template,o.template||(o.template=c.template=p.template("<div class='k-tooltip k-chart-tooltip' 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=M(o.move,o),o._mouseleave=M(o._mouseleave,o),i=p.format("[{0}='content'],[{0}='scroller']",p.attr("role")),o._mobileScroller=t.closest(i).data("kendoMobileScroller")},destroy:function(){this._clearShowTimeout(),this.element&&(this.element.off(F).remove(),this.element=null)},setOptions:function(e){this.options=C({},this.options,e)},options:{opacity:1,animation:{duration:ae},sharedTemplate:"<table><th colspan='3'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr><td><span class='k-chart-shared-tooltip-marker' style='background-color:#:point.series.color#'></span></td># if(point.series.name) { # <td> #= point.series.name #:</td># } #<td>#= content(point) #</td></tr># } #</table>",categoryFormat:"{0:d}"},move:function(){var e,t=this,n=t.options,i=t.element;t.anchor&&t.element&&(e=t._offset(),t.visible||i.css({top:e.top,left:e.left}),t.visible=!0,t._ensureElement(document.body),i.stop(!0,!0).show().animate({left:e.left,top:e.top},n.animation.duration))},_clearShowTimeout:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},getAnchor:function(e){var t=this.anchor,n=t.point,i=t.align,o=n.left,r=n.top;return"center"===i.horizontal?o-=e.width/2:"right"===i.horizontal&&(o-=e.width),"center"===i.vertical?r-=e.height/2:"bottom"===i.vertical&&(r-=e.height),{x:o,y:r}},_offset:function(){var t,n,i=this,o=i._measure(),r=i.getAnchor(o),s=r.y,a=r.x,c=p.support.zoomLevel(),d=e(window),u=window.pageYOffset||document.documentElement.scrollTop||0,h=window.pageXOffset||document.documentElement.scrollLeft||0,f=(this._mobileScroller||{}).movable;return f&&1!==f.scale?(t=l.transform().scale(f.scale,f.scale,[f.x,f.y]),n=new l.Point(a,s).transform(t),a=n.x,s=n.y):(s+=i._fit(s-u,o.height,v(d)/c),a+=i._fit(a-h,o.width,g(d)/c)),{top:s,left:a}},show:function(e){this.anchor=e.anchor,this.element.css(e.style),this.element.toggleClass(ce,!!e.className),this.element.toggleClass(de,!!e.shared);var t=e.shared?this._sharedContent(e):this._pointContent(e.point);this.element.html(t),this._clearShowTimeout(),this.showTimeout=setTimeout(this.move,le)},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,n,i=this;return t=p.template(i.options.sharedTemplate),n=t({points:e.points,category:e.category,categoryText:e.categoryText,content:i._pointContent})},_measure:function(){this._ensureElement();var e={width:g(this.element),height:v(this.element)};return e},_ensureElement:function(){this.element&&this.element.appendTo(document.body).on(F,this._mouseleave)},_mouseleave:function(t){var n=t.relatedTarget,i=this.chartElement[0];n&&n!==i&&!e.contains(i,n)&&(this.trigger(te),this.hide())},_hideElement:function(){var e=this,t=this.element;t&&t.fadeOut({always:function(){e.visible||t.off(F).remove()}})},_pointContent:function(e){var t,n,i=this,o=C({},i.options,e.options.tooltip);return S(e.value)&&(t=""+e.value),o.template?(n=I(o.template),t=n({value:e.value,category:e.category,series:e.series,dataItem:e.dataItem,percentage:e.percentage,runningTotal:e.runningTotal,total:e.total,low:e.low,high:e.high,xLow:e.xLow,xHigh:e.xHigh,yLow:e.yLow,yHigh:e.yHigh})):o.format&&(t=e.formatValue(o.format)),t},_fit:function(e,t,n){
var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i}}),d=c.extend({init:function(e,t){c.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,n=e._offset();e._ensureElement(),t.css({top:n.top,left:n.left}).show()},content:function(e){var t=e.value,n=e.crosshair.options.tooltip;return n.template&&(t=I(n.template)({value:t})),t},hide:function(){this.element.hide()}}),u=m.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,n=t._plotArea.groupSeriesByPane(),i=n[this.name||"default"],o=[];if(i)for(e=0;e<i.length;e++)o.push(new h(t,i[e]));return o}}),h=m.extend({init:function(e,t){this._chart=e,this._options=t},points:function(e){var t,n,i=this._points;return i||(t=this._seriesOptions(),n=this._chart._plotArea,this._points=i=n.pointsBySeriesIndex(t.index)),p.isFunction(e)&&(i=this._filterPoints(i,e)),i},data:function(e){var t,n,i,o,r=this._seriesOptions();return e&&(t=this._chart,n=t._plotArea,r.data=e,r.categoryField&&(i=n.seriesCategoryAxis(r),o=[].concat(t.options.categoryAxis),t._instance._bindCategoryAxisFromSeries(o[i.axisIndex],i.axisIndex)),t._noTransitionsRedraw(),this._clearFields()),r.data},findPoint:function(e){var t,n=this.points();for(t=0;t<n.length;t++)if(e(n[t]))return n[t]},toggleHighlight:function(e,t){t=t?p.isFunction(t)?this.points(t):R(t)?t:[t]:this.points(),this._chart._instance._togglePointsHighlight(e,t)},toggleVisibility:function(e,t){var n,i,o=this._chart,r=this._seriesOptions(),s=p.isFunction(t);if(s)if(A(r.type,[ie,oe,re]))for(n=this._filterData(t),i=0;i<n.length;i++)n[i].visible=e;else r.visible=function(n){return!t(n.dataItem)||e};else r.visible=e,o._saveGroupVisibleState(r);o._noTransitionsRedraw(),this._clearFields()},_filterData:function(e){var t,n=this._seriesOptions().data,i=n.length,o=[];for(t=0;t<i;t++)e(n[t])&&o.push(n[t]);return o},_filterPoints:function(e,t){var n,i=[],o=e.length;for(n=0;n<o;n++)t(e[n])&&i.push(e[n]);return i},_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}}),_.Tooltip=c,_.CrosshairTooltip=d,_.ChartInstanceObserver=o,_.ChartPane=u,_.ChartSeries=h}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||t)()}),function(e,define){define("kendo.dataviz.gauge.min",["kendo.dataviz.core.min","kendo.drawing.min","kendo.dataviz.themes.min"],e)}(function(){return function(e,t){function n(e,t){var n=e.box,i=e.children[0].box,r=t.border||{},s=t.background||"",a=new D,l=A.fromRect(new E([n.x1,n.y1],[n.width(),n.height()]),{stroke:{}}),c=new M(e.text,new T(i.x1,i.y1),{font:t.font,fill:{color:t.color}}),d=o(c.bbox().clone(),t.padding),u=A.fromRect(d,{stroke:{color:r.width?r.color:"",width:r.width,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:s}});return a.append(l),a.append(u),a.append(c),a}function i(e,t,n){var i=b(e.from)?e.from:O,o=b(e.to)?e.to:N;return e.from=l.max(l.min(o,i),t),e.to=l.min(l.max(o,i),n),e}function o(e,t){var n=e.getOrigin(),i=e.getSize(),o=k(t);return e.setOrigin([n.x-o.left,n.y-o.top]),e.setSize([i.width+(o.left+o.right),i.height+(o.top+o.bottom)]),e}function r(e,t){var n=k(t);return n.left=-n.left,n.top=-n.top,n.right=-n.right,n.bottom=-n.bottom,o(e,n)}var s,a,l=Math,c=window.kendo,d=c.ui.Widget,u=c.deepExtend,h=c.dataviz,f=h.autoMajorUnit,p=h.ChartElement,m=h.NumericAxis,g=h.Axis,v=h.Box2D,_=c.Class,b=h.defined,w=h.isNumber,y=h.interpolateValue,k=h.getSpacing,x=h.round,C=h.geometry,S=h.drawing,T=C.Point,D=S.Group,A=S.Path,E=C.Rect,M=S.Text,R=150,I=250,F="arrow",z="arrowPointer",P="barPointer",B="#000",L=.05,H=h.COORD_PRECISION,N=Number.MAX_VALUE,O=-Number.MAX_VALUE,V=200,U=.5,W=200,j=60,q=60,G=5,$=l.PI/180,Y=180,K="inside",Q="linear",X="needle",Z="outside",J="radialPointer",ee="x",te="y",ne=_.extend({init:function(e,t){var n=this,i=e.options;p.fn.init.call(n,t),t=n.options,t.fill=t.color,n.scale=e,t.value=b(t.value)?l.min(l.max(t.value,i.min),i.max):i.min},options:{color:B},value:function(e){var n=this,i=n.options,o=i.value,r=n.scale.options;return 0===arguments.length?o:(i._oldValue=i._oldValue!==t?i.value:r.min,i.value=l.min(l.max(e,r.min),r.max),n.elements&&n.repaint(),t)}}),ie=ne.extend({options:{shape:X,cap:{size:L},arrow:{width:16,height:14},animation:{type:J,duration:R}},setRadius:function(e){var t=this;e&&(t.elements.clear(),t.render(t.parent,t.center,e))},setAngle:function(e){this.elements.transform(C.transform().rotate(e,this.center))},repaint:function(){var e=this,t=e.scale,n=e.options,i=t.slotAngle(n._oldValue),o=t.slotAngle(n.value);n.animation.transitions===!1?e.setAngle(o):new he(e.elements,u(n.animation,{oldAngle:i,newAngle:o})).play()},render:function(){var e=this,t=e.scale,n=t.arc.center,i=e.options,o=new D;return i.animation!==!1&&u(i.animation,{startAngle:0,center:n,reverse:t.options.reverse}),i.shape===X?o.append(e._renderNeedle(),e._renderCap()):o.append(e._renderArrow()),e.elements=o,e.setAngle($),o},reflow:function(e){var t=this,n=t.center=e.center,i=t.radius=e.getRadiusX(),o=t.capSize=Math.round(i*t.options.cap.size);t.bbox=E.fromPoints(new T(n.x-o,n.y-o),new T(n.x+o,n.y+o))},_renderNeedle:function(){var e=this,t=e.options,n=e.scale.options.minorTicks.size,i=e.center,o=t.color,r=new A({fill:{color:o},stroke:{color:o,width:U}});return r.moveTo(i.x+e.radius-n,i.y).lineTo(i.x,i.y-e.capSize/2).lineTo(i.x,i.y+e.capSize/2).close(),r},_renderCap:function(){var e=this,t=e.options,n=t.cap.color||t.color,i=new C.Circle(e.center,e.capSize),o=new S.Circle(i,{fill:{color:n},stroke:{color:n}});return o}}),oe=m.extend({init:function(e){var t=this;t.options=u({},t.options,e),t.options.majorUnit=t.options.majorUnit||f(t.options.min,t.options.max),t.options.minorUnit=t.options.minorUnit||t.options.majorUnit/10,g.fn.init.call(t,t.options)},options:{min:0,max:100,majorTicks:{size:15,align:K,color:B,width:U,visible:!0},minorTicks:{size:10,align:K,color:B,width:U,visible:!0},startAngle:-30,endAngle:210,labels:{position:K,padding:2}},render:function(e,t){var n=this,i=n.renderArc(e,t);n.bbox=i.bbox(),n.labelElements=n.renderLabels(),n.ticks=n.renderTicks(),n.ranges=n.renderRanges()},reflow:function(e){var n=this,i=e.center(),o=l.min(e.height(),e.width())/2;return n.bbox===t?n.render(i,o):(n.bbox=n.arc.bbox(),n.radius(n.arc.getRadiusX()),n.repositionRanges(),n.renderLabels(),t)},slotAngle:function(e){var t,n=this.options,i=n.startAngle,o=n.reverse,r=n.endAngle-i,s=n.min,a=n.max;return t=o?n.endAngle-(e-s)/(a-s)*r:(e-s)/(a-s)*r+i,t+Y},renderLabels:function(){var e,i,o,r,s,a,c,d,u,f,p,m,g,v,_=this,b=_.options,w=b.majorTicks.size,y=_.arc.clone(),k=y.getRadiusX(),x=_.tickAngles(y,b.majorUnit),S=_.labels,A=S.length,M=b.labels,R=M.padding,I=.05*k,F=b.rangeSize=b.rangeSize||.1*k,z=b.ranges||[],P=new D;for(_.options.rangeDistance!==t?I=_.options.rangeDistance:_.options.rangeDistance=I,M.position===K&&(k-=w,z.length&&_.labelElements===t&&(k-=F+I),y.setRadiusX(k).setRadiusY(k)),c=0;c<A;c++)s=S[c],e=s.box.width()/2,i=s.box.height()/2,r=x[c],o=(r-Y)*$,f=M.position===K,a=y.pointAt(r),d=a.x+l.cos(o)*(e+R)*(f?1:-1),u=a.y+l.sin(o)*(i+R)*(f?1:-1),s.reflow(new h.Box2D(d-e,u-i,d+e,u+i)),m=new T(s.box.x1,s.box.y1),_.labelElements===t?(p=n(s,b.labels),P.append(p)):(p=_.labelElements.children[c],g=p.bbox().origin,v=p.transform()||C.transform(),v.translate(m.x-g.x,m.y-g.y),p.transform(v)),_.bbox=E.union(_.bbox,p.bbox());return P},repositionRanges:function(){var e,t,n,i=this,o=i.ranges.children,r=i.options.rangeSize,s=i.options.rangeDistance;if(o.length>0){for(e=i.getRangeRadius(),i.options.labels.position===K&&(e+=r+s),t=e+r/2,n=0;n<o.length;n++)o[n]._geometry.setRadiusX(t).setRadiusY(t);i.bbox=E.union(i.bbox,i.ranges.bbox())}},renderRanges:function(){var e,t,n,i,o,r,s=this,a=s.arc,l=new D,c=s.rangeSegments(),d=c.length,u=s.options.reverse,h=s.options.rangeSize,f=s.options.rangeDistance;if(d)for(i=s.getRangeRadius(),s.radius(s.radius()-h-f),r=0;r<d;r++)n=c[r],e=s.slotAngle(n[u?"to":"from"]),t=s.slotAngle(n[u?"from":"to"]),t-e!==0&&(o=new C.Arc(a.center,{radiusX:i+h/2,radiusY:i+h/2,startAngle:e,endAngle:t}),l.append(new S.Arc(o,{stroke:{width:h,color:n.color,opacity:n.opacity}})));return l},rangeSegments:function(){function e(e,t,n,i){return{from:e,to:t,color:n,opacity:i}}var t,n,o,r,s,a=this,l=a.options,c=l.ranges||[],d=c.length,u=l.rangePlaceholderColor,h=[],f=l.min,p=l.max;if(d)for(h.push(e(f,p,u)),r=0;r<d;r++)for(t=i(c[r],f,p),n=h.length,s=0;s<n;s++)if(o=h[s],o.from<=t.from&&t.from<=o.to){h.push(e(t.from,t.to,t.color,t.opacity)),o.from<=t.to&&t.to<=o.to&&h.push(e(t.to,o.to,u,t.opacity)),o.to=t.from;break}return h},getRangeRadius:function(){var e,t=this,n=t.options,i=n.majorTicks.size,o=n.rangeSize,r=n.rangeDistance,s=t.arc;return e=n.labels.position===Z?s.getRadiusX()-i-r-o:s.getRadiusX()-o},renderArc:function(e,t){var n=this,i=n.options,o=n.arc=new C.Arc(e,{radiusX:t,radiusY:t,startAngle:i.startAngle+Y,endAngle:i.endAngle+Y});return o},renderTicks:function(){function e(e,t,n,i){var o,r,s,a=new D,l=e.center,c=e.getRadiusX(),d=i.visible;if(d)for(o=0;o<t.length;o++)r=e.pointAt(t[o]),s=new T(l.x+c-i.size,l.y).rotate(t[o],l),a.append(new A({stroke:{color:i.color,width:i.width}}).moveTo(r).lineTo(s));return a}var t=this,n=t.arc,i=t.options,o=i.labels.position,r=new D,s=i.majorTicks.size,a=i.minorTicks.size,l=n.clone(),c=l.getRadiusX();return t.majorTickAngles=t.tickAngles(n,i.majorUnit),t.majorTicks=e(l,t.majorTickAngles,i.majorUnit,i.majorTicks),r.append(t.majorTicks),t._tickDifference=s-a,o===Z&&l.setRadiusX(c-s+a).setRadiusY(c-s+a),t.minorTickAngles=t.normalizeTickAngles(t.tickAngles(n,i.minorUnit)),t.minorTicks=e(l,t.minorTickAngles,i.minorUnit,i.minorTicks,i.majorUnit),r.append(t.minorTicks),r},normalizeTickAngles:function(e){var t,n=this,i=n.options,o=i.majorUnit/i.minorUnit;for(t=e.length-1;t>=0;t--)t%o===0&&e.splice(t,1);return e},tickAngles:function(e,t){var n,i=this,o=i.options,r=o.reverse,s=o.max-o.min,a=e.endAngle-e.startAngle,l=e.startAngle,c=s/t,d=a/c,u=[];for(r&&(l+=a,d=-d),n=0;n<c;n++)u.push(x(l,H)),l+=d;return x(l)<=e.endAngle&&u.push(l),u},radius:function(e){var n=this;return e?(n.arc.setRadiusX(e).setRadiusY(e),n.repositionTicks(n.majorTicks.children,n.majorTickAngles),n.repositionTicks(n.minorTicks.children,n.minorTickAngles,!0),t):n.arc.getRadiusX()},repositionTicks:function(e,t,n){var i,o,r,s,a,l=this,c=n?l._tickDifference||0:0,d=l.arc,u=d.getRadiusX();for(n&&l.options.labels.position===Z&&0!==c&&(d=l.arc.clone(),d.setRadiusX(u-c).setRadiusY(u-c)),i=0;i<e.length;i++)o=d.pointAt(t[i]),r=e[i].segments,s=o.x-r[0].anchor().x,a=o.y-r[0].anchor().y,e[i].transform((new C.Transformation).translate(s,a))}}),re=d.extend({init:function(t,n){var i,o,r,s,a,l=this,f=h.ui.themes||{};if(c.destroy(t),e(t).empty(),d.fn.init.call(l,t),l.wrapper=l.element,l._originalOptions=u({},n),i=u({},l.options,n),r=i.theme,s=f[r]||f[r.toLowerCase()],o=r&&s?s.gauge:{},l.options=u({},o,i),e.isArray(i.pointer))for(a=0;a<i.pointer.length;a++)l.options.pointer[a]=u({},o.pointer,i.pointer[a]);l.element.addClass("k-gauge"),l.surface=l._createSurface(),l.redraw()},options:{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}},destroy:function(){this.surface.destroy(),d.fn.destroy.call(this)},value:function(e){var n=this,i=n.pointers[0];return 0===arguments.length?i.value():(i.value(e),n._setValueOptions(e),t)},_draw:function(){var e=this.surface;e.clear(),e.draw(this._visuals)},exportVisual:function(){return this._visuals},allValues:function(t){var n,i=this,o=i.pointers,r=[];if(0===arguments.length){for(n=0;n<o.length;n++)r.push(o[n].value());return r}if(e.isArray(t))for(n=0;n<t.length;n++)w(t[n])&&o[n].value(t[n]);i._setValueOptions(t)},_setValueOptions:function(e){var t,n=[].concat(this.options.pointer);for(e=[].concat(e),t=0;t<e.length;t++)n[t].value=e[t]},_resize:function(){var e,t=this,n=t.options.transitions;for(t.options.transitions=!1,e=0;e<t.pointers.length;e++)t.pointers[e].options.animation.transitions=!1;for(t.redraw(),t.options.transitions=n,e=0;e<t.pointers.length;e++)t.pointers[e].options.animation.transitions=n},redraw:function(){var e,t=this,n=u(t._getSize(),t.options.gaugeArea),i=new E([0,0],[n.width,n.height]);t.surface.clear(),t.gaugeArea=t._createGaugeArea(),t.surface.element.css({width:n.width,height:n.height}),t._createModel(),e=r(i.bbox(),t._gaugeAreaMargin),t.reflow(e)},_createGaugeArea:function(){var e,t=this,n=t.options.gaugeArea,i=t.surface.size(),o=n.border||{},s=new E([0,0],[i.width,i.height]);return t._gaugeAreaMargin=n.margin||G,o.width>0&&(s=r(s,o.width)),e=A.fromRect(s,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n.background}})},_createSurface:function(){var t,n=this,i=n.options,o=n._getSize();return o=i.gaugeArea?u(o,i.gaugeArea):o,t=e("<div></div>").appendTo(n.element).css({width:o.width,height:o.height}),new S.Surface.create(t,{type:i.renderAs})},getSize:function(){return this._getSize()},_getSize:function(){var e=this,t=e.element,n=t.width(),i=t.height();return n||(n=W),i||(i=V),{width:n,height:i}}}),se=re.extend({init:function(e,t){var n=this;re.fn.init.call(n,e,t),c.notify(n,h.ui)},options:{name:"RadialGauge",transitions:!0,gaugeArea:{background:""}},reflow:function(e){var t,n=this,i=n.pointers;for(n.scale.reflow(e),n._initialPlotArea=n.scale.bbox,t=0;t<i.length;t++)i[t].reflow(n.scale.arc),n._initialPlotArea=E.union(n._initialPlotArea,i[t].bbox);n.fitScale(e),n.alignScale(e),n._buildVisual(n.gaugeArea,i,n.scale),n._draw()},_buildVisual:function(e,t,n){var i,o,r=new D;for(r.append(e),r.append(n.ticks),r.append(n.ranges),o=0;o<t.length;o++)i=t[o],i.render(),r.append(i.elements),i.value(i.options.value);r.append(n.labelElements),this._visuals=r},fitScale:function(e){for(var t,n,i,o,r,s=this,a=s.scale,c=a.arc,d=s._initialPlotArea,u=l.abs(s.getDiff(d,e)),h=x(u,H),f=x(-u,H),p=0,m=0;!(!(m++<100)||(p=r===i?p+1:0,p>5)||h!=o&&(t=s.getPlotBox(h,e,c),0<=t&&t<=2)||f!=o&&(i=s.getPlotBox(f,e,c),0<=i&&i<=2)||(o=t>0&&i>0?2*h:t<0&&i<0?2*f:x((h+f)/2||1,H),n=s.getPlotBox(o,e,c),0<=n&&n<=2));)r=i,n>0?(f=o,i=n):(h=o,t=n)},getPlotBox:function(e,t,n){var i,o=this,r=o.scale,s=o.pointers,a=n.getRadiusX();for(n=n.clone(),n.setRadiusX(a+e).setRadiusY(a+e),r.arc=n,r.reflow(t),o.plotBbox=r.bbox,i=0;i<s.length;i++)s[i].reflow(n),o.plotBbox=E.union(o.plotBbox,s[i].bbox);return o.getDiff(o.plotBbox,t)},getDiff:function(e,t){return l.min(t.width()-e.width(),t.height()-e.height())},alignScale:function(e){var t,n=this,i=n.plotBbox.center(),o=e.center(),r=i.x-o.x,s=i.y-o.y,a=n.scale,l=n.pointers;for(a.arc.center.x-=r,a.arc.center.y-=s,a.reflow(e),t=0;t<l.length;t++)l[t].reflow(a.arc),n.plotBbox=E.union(a.bbox,l[t].bbox)},_createModel:function(){var t,n,i=this,o=i.options,r=o.pointer,s=i.scale=new oe(o.scale);for(i.pointers=[],r=e.isArray(r)?r:[r],n=0;n<r.length;n++)t=new ie(s,u({},r[n],{animation:{transitions:o.transitions}})),i.pointers.push(t)}}),ae=re.extend({init:function(e,t){var n=this;re.fn.init.call(n,e,t),c.notify(n,h.ui)},options:{name:"LinearGauge",transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}},reflow:function(e){var t,n=this,i=n.pointers,o=e.origin.x,r=e.origin.y,s=new h.Box2D(o,r,o+e.width(),r+e.height());for(n.scale.reflow(s),t=0;t<i.length;t++)i[t].reflow();n.bbox=n._getBox(s),n._alignElements(),n._shrinkElements(),n._buildVisual(),n._draw()},_buildVisual:function(){var e,t,n=this,i=new D,o=n.scale.render(),r=n.pointers;for(i.append(n.gaugeArea),i.append(o),t=0;t<r.length;t++)e=r[t],i.append(e.render()),e.value(e.options.value);n._visuals=i},_createModel:function(){var t,n,i,o=this,r=o.options,s=r.pointer,a=o.scale=new le(r.scale);for(o.pointers=[],s=e.isArray(s)?s:[s],i=0;i<s.length;i++)n=u({},s[i],{animation:{transitions:r.transitions}}),t=n.shape===F?new de(a,n):new ue(a,n),o.pointers.push(t)},_getSize:function(){var e=this,t=e.element,n=t.width(),i=t.height(),o=e.options.scale.vertical;return n||(n=o?j:W),i||(i=o?V:q),{width:n,height:i}},_getBox:function(e){var t,n,i=this,o=i.scale,r=i.pointers,s=e.center(),a=r[0].box.clone().wrap(o.box);for(n=0;n<r.length;n++)a.wrap(r[n].box.clone());return o.options.vertical?(t=a.width()/2,a=new v(s.x-t,e.y1,s.x+t,e.y2)):(t=a.height()/2,a=new v(e.x1,s.y-t,e.x2,s.y+t)),a},_alignElements:function(){var e,t,n=this,i=n.scale,o=n.pointers,r=i.box,s=o[0].box.clone().wrap(i.box),a=n.bbox;for(t=0;t<o.length;t++)s.wrap(o[t].box.clone());for(i.options.vertical?(e=a.center().x-s.center().x,i.reflow(new v(r.x1+e,a.y1,r.x2+e,a.y2))):(e=a.center().y-s.center().y,i.reflow(new v(a.x1,r.y1+e,a.x2,r.y2+e))),t=0;t<o.length;t++)o[t].reflow(n.bbox)},_shrinkElements:function(){var e,t=this,n=t.scale,i=t.pointers,o=n.box.clone(),r=n.options.vertical?"y":"x",s=i[0].box;for(e=0;e<i.length;e++)s.wrap(i[e].box.clone());for(o[r+1]+=l.max(o[r+1]-s[r+1],0),o[r+2]-=l.max(s[r+2]-o[r+2],0),n.reflow(o),e=0;e<i.length;e++)i[e].reflow(t.bbox)}}),le=m.extend({init:function(e){var t=this;t.options=u({},t.options,e),t.options=u({},t.options,{labels:{mirror:t.options.mirror}}),t.options.majorUnit=t.options.majorUnit||f(t.options.min,t.options.max),g.fn.init.call(t,t.options),t.options.minorUnit=t.options.minorUnit||t.options.majorUnit/10},options:{min:0,max:50,majorTicks:{size:15,align:K,color:B,width:U,visible:!0},minorTicks:{size:10,align:K,color:B,width:U,visible:!0},line:{width:U},labels:{position:K,padding:2},mirror:!1,_alignLines:!1},render:function(){var e=this,t=e.elements=new D,n=e.renderLabels(),i=e.renderLine(),o=e.renderTicks(),r=e.renderRanges();return t.append(i,n,o,r),t},renderRanges:function(){var e,t,n,o,r,s=this,a=s.options,l=a.min,c=a.max,d=a.ranges||[],u=a.vertical,h=a.labels.mirror,f=new D,p=d.length,m=a.rangeSize||a.minorTicks.size/2;if(p)for(r=0;r<p;r++)e=i(d[r],l,c),t=s.getSlot(e.from,e.to),n=u?s.lineBox():t,o=u?t:s.lineBox(),u?n.x1-=m*(h?-1:1):o.y2+=m*(h?-1:1),f.append(A.fromRect(new E([n.x1,o.y1],[n.x2-n.x1,o.y2-o.y1]),{fill:{color:e.color,opacity:e.opacity},stroke:{}}));return f},renderLabels:function(){var e,t=this,i=t.options,o=t.labels,r=new D;for(e=0;e<o.length;e++)r.append(n(o[e],i.labels));return r},renderLine:function(){var e,t=this,n=t.options,i=n.line,o=t.lineBox(),r=new D;return i.width>0&&i.visible&&(e=new A({stroke:{color:i.color,dashType:i.dashType,width:i.width}}),e.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),r.append(e)),r},renderTicks:function(){function e(e,i){var s,l=e.length;if(i.visible)for(s=i.skip;s<l;s+=i.step)s%i.skipUnit!==0&&(a.tickX=r?o.x2:o.x2-i.size,a.tickY=r?o.y1-i.size:o.y1,a.position=e[s],n.append(t.renderAxisTick(a,i)))}var t=this,n=new D,i=t.options,o=t.lineBox(),r=i.labels.mirror,s=i.majorTicks.visible?i.majorUnit:0,a={_alignLines:i._alignLines,vertical:i.vertical};return e(t.getMajorTickPositions(),i.majorTicks),e(t.getMinorTickPositions(),u({},{skipUnit:s/i.minorUnit},i.minorTicks)),n},renderAxisTick:function(e,t){var n,i,o,r=e.tickX,s=e.tickY,a=e.position;return e.vertical?(n=new T(r,a),i=new T(r+t.size,a)):(n=new T(a,s),i=new T(a,s+t.size)),o=new A({stroke:{color:t.color,width:t.width}}).moveTo(n).lineTo(i)}}),ce=ne.extend({init:function(e,t){var n=this;ne.fn.init.call(n,e,t),n.options=u({track:{visible:b(t.track)}},n.options)},options:{shape:P,track:{border:{width:1}},color:B,border:{width:1},opacity:1,margin:k(3),animation:{type:P},visible:!0},reflow:function(){var e,t,n,i=this,o=i.options,r=i.scale,s=r.lineBox(),a=o.track.size||o.size,l=o.size/2,c=r.options.mirror,d=k(o.margin),u=r.options.vertical,h=u?d[c?"left":"right"]:d[c?"bottom":"top"];h=c?-h:h,u?(n=new v(s.x1+h,s.y1,s.x1+h,s.y2),c?n.x1-=a:n.x2+=a,o.shape!==P&&(t=new v(s.x2+h,s.y1-l,s.x2+h,s.y2+l),e=t)):(n=new v(s.x1,s.y1-h,s.x2,s.y1-h),c?n.y2+=a:n.y1-=a,o.shape!==P&&(t=new v(s.x1-l,s.y1-h,s.x2+l,s.y1-h),e=t)),i.trackBox=n,i.pointerRangeBox=t,i.box=e||n.clone().pad(o.border.width)},getElementOptions:function(){var e=this.options;return{fill:{color:e.color,opacity:e.opacity},stroke:b(e.border)?{color:e.border.width?e.border.color||e.color:"",width:e.border.width,dashType:e.border.dashType,opacity:e.opacity}:null}},_margin:function(){var e=this,t=e.options,n=e.scale,i=n.options.mirror,o=k(t.margin),r=n.options.vertical,s=r?o[i?"left":"right"]:o[i?"bottom":"top"];return s}}),de=ce.extend({init:function(e,n){ce.fn.init.call(this,e,n),this.options.size===t&&(this.options.size=.6*this.scale.options.majorTicks.size)},pointerShape:function(){var e,t,n=this,i=n.options,o=n.scale,r=i.size,s=o.options.vertical,a=r/2,l=o.options.mirror?-1:1,c=o.options.reverse;return s?(e=c?"y2":"y1",t=[new T(0,0-a),new T(0-l*r,0),new T(0,0+a)]):(e=c?"x1":"x2",t=[new T(0-a,0),new T(0,0+l*r),new T(0+a,0)]),t},repaint:function(){var e=this,t=e.scale,n=e.options,i=new s(e.elements,u(n.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:e._margin(n.margin),from:t.getSlot(n._oldValue),to:t.getSlot(n.value)}));n.animation.transitions===!1&&(i.options.duration=0),i.setup(),i.play()},render:function(){var e,t=this,n=t.options,i=new D,o=t.scale,r=t.getElementOptions(),s=t.pointerShape(n.value);return n.animation.type=z,i=new A({stroke:r.stroke,fill:r.fill}).moveTo(s[0]).lineTo(s[1]).lineTo(s[2]).close(),e=o.getSlot(n.value),i.transform(C.transform().translate(e.x1,e.y1)),t.elements=i,i}}),ue=ce.extend({init:function(e,n){ce.fn.init.call(this,e,n),this.options.size===t&&(this.options.size=.3*this.scale.options.majorTicks.size)},pointerShape:function(e){var t,n,i,o=this,r=o.options,s=o.scale,a=s.options.vertical,l=s.options.mirror,c=l==a?-1:1,d=r.size*c,u=s.getSlot(s.options.min),h=s.getSlot(e),f=a?te:ee,p=a?ee:te,m=o._margin()*c,g=new T;return g[f]=u[f+"1"],g[p]=u[p+"1"],t=new T,t[f]=h[f+"1"],t[p]=h[p+"1"],a?(g.translate(m,0),t.translate(m,0)):(g.translate(0,m),t.translate(0,m)),n=t.clone(),i=g.clone(),a?(n.translate(d,0),i.translate(d,0)):(n.translate(0,d),i.translate(0,d)),[g,t,n,i]},repaint:function(){var e,t=this,n=t.scale,i=t.options,o=t.pointerShape(i.value),r=t.elements.children[0],s=t.pointerShape(i._oldValue);r.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),e=new a(r,u(i.animation,{reverse:n.options.reverse,vertical:n.options.vertical,oldPoints:[s[1],s[2]],newPoints:[o[1],o[2]]})),i.animation.transitions===!1&&(e.options.duration=0),e.setup(),e.play()},render:function(){var e=this,t=new D,n=e.getElementOptions(),i=new A({stroke:n.stroke,fill:n.fill});return t.append(i),e.elements=t,t}}),he=S.Animation.extend({init:function(e,t){S.Animation.fn.init.call(this,e,t),t=this.options,t.duration=l.max(l.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)},options:{easing:Q,duration:R},step:function(e){var t=this,n=t.options,i=y(n.oldAngle,n.newAngle,e);t.element.transform(C.transform().rotate(i,n.center))}});S.AnimationFactory.current.register(J,he),s=S.Animation.extend({options:{easing:Q,duration:I},setup:function(){var e,t,n=this.options,i=n.margin,o=n.from,r=n.to,s=n.vertical?"x1":"y1";n.mirror==n.vertical?(o[s]-=i,r[s]-=i):(o[s]+=i,r[s]+=i),e=this.fromScale=new T(o.x1,o.y1),t=this.toScale=new T(r.x1,r.y1),0!==n.duration&&(n.duration=l.max(e.distanceTo(t)/n.duration*1e3,1))},step:function(e){var t=y(this.fromScale.x,this.toScale.x,e),n=y(this.fromScale.y,this.toScale.y,e);this.element.transform(C.transform().translate(t,n))}}),S.AnimationFactory.current.register(z,s),a=S.Animation.extend({options:{easing:Q,speed:I},setup:function(){var e=this.options,t=e.newPoints,n=e.oldPoints,i=this.axis=e.vertical?te:ee,o=this.to=t[0][i],r=this.from=n[0][i];0!==e.duration&&(e.duration=l.max(l.abs(o-r)/e.speed*1e3,1)),this._set(r)},step:function(e){var t=y(this.from,this.to,e);this._set(t)},_set:function(e){var t="set"+this.axis.toUpperCase(),n=this.options.newPoints;n[0][t](e),n[1][t](e)}}),S.AnimationFactory.current.register(P,a),h.ui.plugin(se),h.ui.plugin(ae),h.ExportMixin.extend(re.fn),u(h,{Gauge:re,RadialPointer:ie,LinearPointer:ce,ArrowLinearPointer:de,BarLinearPointer:ue,LinearScale:le,RadialScale:oe,LinearGauge:ae,RadialGauge:se})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dataviz.barcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],e)}(function(){return function(e,t){function n(e,t,n){return e.substring(t,t+n)}var i,o,r,s,a,l,c=window.kendo,d=c.ui.Widget,u=e.extend,h=c.deepExtend,f=e.inArray,p=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,n){var i=this;return _(e)&&(e+=""),i.initValue(e,t,n),i.options.addQuietZone&&i.addQuietZone(),i.addData(),i.options.addQuietZone&&i.addQuietZone(),{baseUnit:i.baseUnit,pattern:i.pattern}},options:{quietZoneLength:C,addQuietZone:!0,addCheckSum:!0},initValue:function(){},addQuietZone:function(){this.pattern.push(this.options.quietZoneLength||C)},addData:function(){},invalidCharacterError:function(e){throw Error(c.format(D,e,this.name))}}),E={},M=A.extend({minBaseUnitLength:.7,addData:function(){var e,t=this,n=t.value;for(t.addStart(),e=0;e<n.length;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.pushCheckSum(),t.addStop(),t.prepareValues()},addCharacter:function(e){var t=this,n=t.characterMap[e];n||t.invalidCharacterError(e),t.addBase(n)},addBase:function(){}}),R={addCharacter:function(e){var t=this;t.characterMap[e]?t.addBase(t.characterMap[e]):e.charCodeAt(0)>127?t.invalidCharacterError(e):t.addExtended(e.charCodeAt(0))},addExtended:function(e){var n,i,o,r=this;for(i=0;i<r.extendedMappings.length;i++)if(n=r.extendedMappings[i].call(r,e)){for(o=0;o<n.length;o++)r.addBase(n[o]);return r.dataLength+=n.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,n,i,o=this;if(o.specialAsciiCodes[e])for(t=[],i=0;i<o.specialAsciiCodes[e].length;i++)t.push(o.characterMap[o.shiftCharacters[3]]),t.push(o.characterMap[o.specialAsciiCodes[e][i]]);else n=6*Math.floor(e/32)+(e-27)%32+64,t=[o.characterMap[o.shiftCharacters[3]],o.characterMap[String.fromCharCode(n)]];return t}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]};E.code39=M.extend({name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",initValue:function(e,t,n){var i=this;i.width=t,i.height=n,i.value=e,i.dataLength=e.length,i.pattern=[],i.patternString=""},prepareValues:function(){var e,t,n=this,i=n.minBaseUnitLength,o=n.maxRatio,r=n.minRatio,s=Math.max(.15*n.width,24);if(n.height<s)throw Error("Insufficient Height. The minimum height for value: "+n.value+" is: "+s);for(;(e=n.getBaseUnit(o))<i&&o>r;)o=parseFloat((o-.1).toFixed(1));if(e<i)throw t=Math.ceil(n.getBaseWidth(r)*i),Error("Insufficient width. The minimum width for value: "+n.value+" is: "+t);n.ratio=o,n.baseUnit=e,n.patternString=n.patternString.substring(0,n.patternString.length-1),n.pattern=n.pattern.concat(n.patternString.replace(/ratio/g,o).split(n.splitCharacter))},getBaseUnit:function(e){return this.width/this.getBaseWidth(e)},getBaseWidth:function(e){var t=this,n=3*(e+2);return t.quietZoneLength+n*(t.dataLength+2)+t.gapWidth*(t.dataLength+1)},addStart:function(){var e=this;e.addPattern(e.characterMap.START.pattern),e.addCharacterGap()},addBase:function(e){this.addPattern(e.pattern),this.addCharacterGap()},addStop:function(){this.addPattern(this.characterMap.START.pattern)},addPattern:function(e){for(var t=0;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({},R,{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=M.extend({name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,initValue:function(e,t,n){var i=this;i.value=e,i.width=t,i.height=n,i.pattern=[],i.values=[],i.dataLength=e.length},prepareValues:function(){var e=this,t=Math.max(.15*e.width,24);if(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,n=this,i=n._getCheckValues();for(n.checksum=i.join(""),t=0;t<i.length;t++)e=n.characterMap[n._findCharacterByValue(i[t])],n.addPattern(e.pattern)},_getCheckValues:function(){var e,t,n,i=this,o=i.values,r=o.length,s=0;for(n=r-1;n>=0;n--)s+=i.weightedValue(o[n],r-n,i.cCheckSumTotal);for(e=s%i.checkSumMod,s=i.weightedValue(e,1,i.kCheckSumTotal),n=r-1;n>=0;n--)s+=i.weightedValue(o[n],r-n+1,i.kCheckSumTotal);return t=s%i.checkSumMod,[e,t]},_findCharacterByValue:function(e){for(var t in this.characterMap)if(this.characterMap[t].value===e)return t},weightedValue:function(e,t,n){return(t%n||n)*e},addPattern:function(e){var t,n;for(n=0;n<e.length;n++)t=parseInt(e.charAt(n),10),this.pattern.push(t)},characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",
value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}}),E.code93extended=E.code93.extend(h({},R,{name:"Code 93 extended",pushCheckSum:function(){var e,t,n=this,i=n._getCheckValues();for(n.checksum=i.join(""),t=0;t<i.length;t++)e=i[t],n.shiftValuesAsciiCodes[e]?n.addExtended(n.shiftValuesAsciiCodes[e]):n.addPattern(n.characterMap[n._findCharacterByValue(e)].pattern)}})),i=c.Class.extend({init:function(e){this.encoding=e},addStart:function(){},is:function(){},move:function(){},pushState:function(){}}),o=i.extend({FNC4:"FNC4",init:function(e,t){var n=this;n.encoding=e,n.states=t,n._initMoves(t)},addStart:function(){this.encoding.addPattern(this.START)},is:function(e,t){var n=e.charCodeAt(t);return this.isCode(n)},move:function(e){for(var t=this,n=0;!t._moves[n].call(t,e)&&n<t._moves.length;)n++},pushState:function(e){var t,n,i=this,o=i.states,r=e.value,s=r.length;for(f("C",o)>=0&&(n=r.substr(e.index).match(/\d{4,}/g),n&&(s=r.indexOf(n[0],e.index)));(t=e.value.charCodeAt(e.index))>=0&&i.isCode(t)&&e.index<s;)i.encoding.addPattern(i.getValue(t)),e.index++},_initMoves:function(e){var t=this;t._moves=[],f(t.FNC4,e)>=0&&t._moves.push(t._moveFNC),f(t.shiftKey,e)>=0&&t._moves.push(t._shiftState),t._moves.push(t._moveState)},_moveFNC:function(e){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=i.extend({key:"C",addStart:function(){this.encoding.addPattern(this.START)},is:function(e,t){var i=n(e,t,4);return(t+4<=e.length||2==e.length)&&S.test(i)},move:function(){this.encoding.addPattern(this.MOVE)},pushState:function(e){for(var t;(t=n(e.value,e.index,2))&&S.test(t)&&2==t.length;)this.encoding.addPattern(parseInt(t,10)),e.index+=2},getValue:function(e){return e},MOVE:99,START:105}),r.FNC4=i.extend({key:"FNC4",dependentStates:["A","B"],init:function(e,t){this.encoding=e,this._initSubStates(t)},addStart:function(e){var t=e.value.charCodeAt(0)-128,n=this._getSubState(t);this.encoding[n].addStart()},is:function(e,t){var n=e.charCodeAt(t);return this.isCode(n)},isCode:function(e){return 128<=e&&e<256},pushState:function(e){var t,n=this,i=n._initSubState(e),o=n.encoding,r=i.value.length;if(e.index+=r,r<3)for(;i.index<r;i.index++)t=i.value.charCodeAt(i.index),i.state=n._getSubState(t),i.previousState!=i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(t));else i.state!=i.previousState&&o[i.state].move(i),n._pushStart(i),o.pushData(i,n.subStates),e.index<e.value.length&&n._pushStart(i);e.fnc=!0,e.state=i.state},_pushStart:function(e){var t=this;t.encoding.addPattern(t.encoding[e.state].MOVE),t.encoding.addPattern(t.encoding[e.state].MOVE)},_initSubState:function(e){var t=this,n={value:t._getAll(e.value,e.index),index:0};return n.state=t._getSubState(n.value.charCodeAt(0)),n.previousState=e.previousState==t.key?n.state:e.previousState,n},_initSubStates:function(e){var t,n=this;for(n.subStates=[],t=0;t<e.length;t++)f(e[t],n.dependentStates)>=0&&n.subStates.push(e[t])},_getSubState:function(e){var t,n=this;for(t=0;t<n.subStates.length;t++)if(n.encoding[n.subStates[t]].isCode(e))return n.subStates[t]},_getAll:function(e,t){for(var n,i="";(n=e.charCodeAt(t++))&&this.isCode(n);)i+=String.fromCharCode(n-128);return i}}),r.FNC1=i.extend({key:"FNC1",startState:"C",dependentStates:["C","B"],startAI:"(",endAI:")",init:function(e,t){this.encoding=e,this.states=t},addStart:function(){this.encoding[this.startState].addStart()},is:function(){return f(this.key,this.states)>=0},pushState:function(e){var t,n,i,o=this,r=o.encoding,s=e.value.replace(/\s/g,""),a=RegExp("["+o.startAI+o.endAI+"]","g"),l=e.index,c={state:o.startState};for(r.addPattern(o.START);;){if(c.index=0,i=s.charAt(l)===o.startAI?2:0,t=i>0?o.getBySeparator(s,l):o.getByLength(s,l),t.ai.length)n=l+i+t.id.length+t.ai.length;else if(n=s.indexOf(o.startAI,l+1),n<0){if(l+t.ai.max+t.id.length+i<s.length)throw Error("Separators are required after variable length identifiers");n=s.length}if(c.value=s.substring(l,n).replace(a,""),o.validate(t,c.value),r.pushData(c,o.dependentStates),n>=s.length)break;l=n,c.state!=o.startState&&(r[o.startState].move(c),c.state=o.startState),t.ai.length||r.addPattern(o.START)}e.index=e.value.length},validate:function(e,t){var n=t.substr(e.id.length),i=e.ai;if(!i.type&&!S.test(n))throw Error("Application identifier "+e.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"==i.type&&!T.test(n))throw Error("Application identifier "+e.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==n.length)throw Error("Application identifier "+e.id+" must be "+i.length+" characters long.");if(i.min&&i.min>n.length)throw Error("Application identifier "+e.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<n.length)throw Error("Application identifier "+e.id+" must be at most "+i.max+" characters long.")},getByLength:function(e,t){var i,o,r,s=this;for(r=2;r<=4;r++)if(i=n(e,t,r),o=s.getAI(i)||s.getAI(i.substring(0,i.length-1)))return{id:i,ai:o};s.unsupportedAIError(i)},unsupportedAIError:function(e){throw Error(c.format("'{0}' is not a supported Application Identifier"),e)},getBySeparator:function(e,t){var n=this,i=e.indexOf(n.startAI,t),o=e.indexOf(n.endAI,i),r=e.substring(i+1,o),s=n.getAI(r)||n.getAI(r.substr(r.length-1));return s||n.unsupportedAIError(r),{ai:s,id:r}},getAI:function(e){var t,n,i,o=this.applicationIdentifiers,r=o.multiKey;if(o[e])return o[e];for(t=0;t<r.length;t++){if(r[t].ids&&f(e,r[t].ids)>=0)return r[t].type;if(r[t].ranges)for(n=r[t].ranges,i=0;i<n.length;i++)if(n[i][0]<=e&&e<=n[i][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,n){var i=this;i.pattern=[],i.value=e,i.width=t,i.height=n,i.checkSum=0,i.totalUnits=0,i.index=0,i.position=1},addData:function(){var e=this,t={value:e.value,index:0,state:""};0!==e.value.length&&(t.state=t.previousState=e.getNextState(t,e.states),e.addStart(t),e.pushData(t,e.states),e.addCheckSum(),e.addStop(),e.setBaseUnit())},pushData:function(e,t){for(var n,i=this;;){if(i[e.state].pushState(e),e.index>=e.value.length)break;e.shifted?(n=e.state,e.state=e.previousState,e.previousState=n,e.shifted=!1):(e.previousState=e.state,e.state=i.getNextState(e,t),i[e.state].move(e))}},addStart:function(e){this[e.state].addStart(e),this.position=1},addCheckSum:function(){var e=this;e.checksum=e.checkSum%103,e.addPattern(e.checksum)},addStop:function(){this.addPattern(this.STOP)},setBaseUnit:function(){var e=this;e.baseUnit=e.width/(e.totalUnits+e.quietZoneLength)},addPattern:function(e){var t,n,i=this,o=""+i.characterMap[e];for(n=0;n<o.length;n++)t=parseInt(o.charAt(n),10),i.pattern.push(t),i.totalUnits+=t;i.checkSum+=e*i.position++},getNextState:function(e,t){for(var n=0;n<t.length;n++)if(this[t[n]].is(e.value,e.index))return t[n];this.invalidCharacterError(e.value.charAt(e.index))},characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106}),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 n=this;n.pattern=[],n.value=e,n.checkSumLength=0,n.width=t},setBaseUnit:function(){var e=this,t=7;e.baseUnit=e.width/(12*(e.value.length+e.checkSumLength)+e.quietZoneLength+t)},addData:function(){var e,t=this,n=t.value;for(t.addPattern(t.START),e=0;e<n.length;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.STOP),t.setBaseUnit()},addCharacter:function(e){var t=this,n=t.characterMap[e];n||t.invalidCharacterError(e),t.addPattern(n)},addPattern:function(e){for(var t=0;t<e.length;t++)this.pattern.push(parseInt(e.charAt(t),10))},addCheckSum:function(){var e,t=this,n=t.checkSums[t.checkSumType],i=n.call(t.checkSums,t.value);for(t.checksum=i.join(""),e=0;e<i.length;e++)t.checkSumLength++,t.addPattern(t.characterMap[i[e]])},checkSums:{Modulo10:function(e){var t,n,i,o=[0,""],r=e.length%2;for(t=0;t<e.length;t++)o[(t+r)%2]+=parseInt(e.charAt(t),10);for(i=o[0],n=""+2*o[1],t=0;t<n.length;t++)i+=parseInt(n.charAt(t),10);return[(10-i%10)%10]},Modulo11:function(e){var t,n,i,o=0,r=11,s=e.length;for(i=0;i<s;i++)t=((s-i)%6||6)+1,o+=t*e.charAt(i);return n=(r-o%r)%r,10!=n?[n]:[1,0]},Modulo11Modulo10:function(e){var t,n=this.Modulo11(e);return t=e+n[0],n.concat(this.Modulo10(t))},Modulo10Modulo10:function(e){var t,n=this.Modulo10(e);return t=e+n[0],n.concat(this.Modulo10(t))}},characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:""}),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 n=this;n.pattern=[],n.value=e,n.width=t,n.totalUnits=0},addData:function(){var e,t=this,n=t.value;for(t.addPattern(t.START),e=0;e<n.length;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.STOP),t.setBaseUnit()},setBaseUnit:function(){var e=this;e.baseUnit=e.width/(e.totalUnits+e.quietZoneLength)},addCheckSum:function(){var e,t=this,n=t.value,i=n.length,o=t.getWeightedSum(n,i,t.cCheckSumTotal)%t.checkSumMod;t.checksum=o+"",t.addPattern(t.characterMap[o]),i++,i>=t.kCheckSumMinLength&&(e=(o+t.getWeightedSum(n,i,t.kCheckSumTotal))%t.checkSumMod,t.checksum+=e,t.addPattern(t.characterMap[e]))},getWeightedSum:function(e,t,n){var i,o=0;for(i=0;i<e.length;i++)o+=this.weightedValue(this.getValue(e.charAt(i)),t,i,n);return o},weightedValue:function(e,t,n,i){var o=(t-n)%i||i;return o*e},getValue:function(e){var t=this;return isNaN(e)?(e!==t.DASH&&t.invalidCharacterError(e),t.DASH_VALUE):parseInt(e,10)},addCharacter:function(e){var t=this,n=t.getValue(e),i=t.characterMap[n];t.addPattern(i)},addPattern:function(e){var t,n;for(n=0;n<e.length;n++)t=parseInt(e.charAt(n),10),this.pattern.push(t),this.totalUnits+=t},characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],options:{addCheckSum:!0}}),E.postnet=A.extend({name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",initValue:function(e,t,n){var i=this;i.height=n,i.width=t,i.baseHeight=n/2,i.value=e.replace(RegExp(i.DIGIT_SEPARATOR,"g"),""),i.pattern=[],i.validate(i.value),i.checkSum=0,i.setBaseUnit()},addData:function(){var e,t=this,n=t.value;for(t.addPattern(t.START),e=0;e<n.length;e++)t.addCharacter(n.charAt(e));t.options.addCheckSum&&t.addCheckSum(),t.addPattern(t.START),t.pattern.pop()},addCharacter:function(e){var t=this,n=t.characterMap[e];t.checkSum+=parseInt(e,10),t.addPattern(n)},addCheckSum:function(){var e=this;e.checksum=(10-e.checkSum%10)%10,e.addCharacter(e.checksum)},setBaseUnit:function(){var e=this,t=3;e.baseUnit=e.width/(10*(e.value.length+1)+t+e.quietZoneLength)},validate:function(e){var t=this;if(S.test(e)||t.invalidCharacterError(e.match(/[^0-9]/)[0]),f(e.length,t.VALID_CODE_LENGTHS)<0)throw Error("Invalid value length. Valid lengths for the Postnet symbology are "+t.VALID_CODE_LENGTHS.join(","))},addPattern:function(e){var t,n,i=this;for(n=0;n<e.length;n++)t=i.height-i.baseHeight*e.charAt(n),i.pattern.push({width:1,y1:t,y2:i.height}),i.pattern.push(1)},characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]}),E.ean13=A.extend({initValue:function(e,t,n){if(e+="",12!=e.length||/\D/.test(e))throw Error('The value of the "EAN13" encoding should be 12 symbols');var i=this;i.pattern=[],i.options.height=n,i.baseUnit=t/(95+i.quietZoneLength),i.value=e,i.checksum=i.calculateChecksum(),i.leftKey=e[0],i.leftPart=e.substr(1,6),i.rightPart=e.substr(7)+i.checksum},addData:function(){var e=this;e.addPieces(e.characterMap.start),e.addSide(e.leftPart,e.leftKey),e.addPieces(e.characterMap.middle),e.addSide(e.rightPart),e.addPieces(e.characterMap.start)},addSide:function(e,t){var n,i=this;for(n=0;n<e.length;n++)t&&parseInt(i.keyTable[t].charAt(n),10)?i.addPieces(Array.prototype.slice.call(i.characterMap.digits[e.charAt(n)]).reverse(),!0):i.addPieces(i.characterMap.digits[e.charAt(n)],!0)},addPieces:function(e,t){var n,i=this;for(n=0;n<e.length;n++)i.pattern.push(t?{y1:0,y2:.95*i.options.height,width:e[n]}:e[n])},calculateChecksum:function(){var e,t,n=0,i=0,o=this.value.split("").reverse().join("");for(e=0;e<o.length;e++)e%2?i+=parseInt(o.charAt(e),10):n+=parseInt(o.charAt(e),10);return t=(10-(3*n+i)%10)%10},keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}}),E.ean8=E.ean13.extend({initValue:function(e,t,n){var i=this;if(7!=e.length||/\D/.test(e))throw Error("Invalid value provided");i.value=e,i.options.height=n,i.checksum=i.calculateChecksum(i.value),i.leftPart=i.value.substr(0,4),i.rightPart=i.value.substr(4)+i.checksum,i.pattern=[],i.baseUnit=t/(67+i.quietZoneLength)}}),l=d.extend({init:function(t,n){var i=this;d.fn.init.call(i,t,n),i.element=e(t),i.wrapper=i.element,i.element.addClass("k-barcode").css("display","block"),i.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),i.surface=m.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},setOptions:function(e){var t=this;if(t.type=(e.type||t.options.type).toLowerCase(),"upca"==t.type&&(t.type="ean13",e.value="0"+e.value),"upce"==t.type&&(t.type="ean8",e.value="0"+e.value),!E[t.type])throw Error("Encoding "+t.type+"is not supported.");t.encoding=new E[t.type],t.options=u(!0,t.options,e),_(e.value)&&t.redraw()},redraw:function(){var e=this._getSize();this.surface.clear(),this.surface.setSize({width:e.width,height:e.height}),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return c.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},_render:function(){var e,t,n,i=this,o=i.options,r=o.value,s=o.text,a=b.getSpacing(s.margin),l=i._getSize(),c=o.border||{},d=i.encoding,u=new w(0,0,l.width,l.height).unpad(c.width).unpad(o.padding),h=u.height(),f=new m.Group;return i.contentBox=u,f.append(i._getBackground(l)),s.visible&&(n=m.util.measureText(r,{font:s.font}).height,h-=n+a.top+a.bottom),e=d.encode(r,u.width(),h),s.visible&&(t=r,o.checksum&&_(d.checksum)&&(t+=" "+d.checksum),f.append(i._getText(t))),i.barHeight=h,this._bandsGroup=this._getBands(e.pattern,e.baseUnit),f.append(this._bandsGroup),f},exportVisual:function(){return this._render()},_getSize:function(){var e=this,t=e.element,n=new g.Size(k,x);return t.width()>0&&(n.width=t.width()),t.height()>0&&(n.height=t.height()),e.options.width&&(n.width=e.options.width),e.options.height&&(n.height=e.options.height),n},value:function(e){var n=this;return _(e)?(n.options.value=e+"",n.redraw(),t):n.options.value},_getBands:function(e,t){var n,i,o,r,s,a=this,l=a.contentBox,c=l.x1,d=new m.Group;for(o=0;o<e.length;o++)i=p(e[o])?e[o]:{width:e[o],y1:0,y2:a.barHeight},n=i.width*t,o%2&&(r=g.Rect.fromPoints(new g.Point(c,i.y1+l.y1),new g.Point(c+n,i.y2+l.y1)),s=m.Path.fromRect(r,{fill:{color:a.options.color},stroke:null}),d.append(s)),c+=n;return d},_getBackground:function(e){var t=this,n=t.options,i=n.border||{},o=new w(0,0,e.width,e.height).unpad(i.width/2),r=m.Path.fromRect(o.toRect(),{fill:{color:n.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}});return r},_getText:function(e){var t=this,n=t.options.text,i=t._textbox=new y(e,{font:n.font,color:n.color,align:"center",vAlign:"bottom",margin:n.margin});return i.reflow(t.contentBox),i.renderVisual(),i.visual},options:{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}}}),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,n){(n||t)()}),function(e,define){define("kendo.dataviz.qrcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],e)}(function(){return function(e,t){function n(e){return parseInt(e,2)}function i(e,t){var n=(+e).toString(2);return n.length<t&&(n=Array(t-n.length+1).join(0)+n),n}function o(e,t){for(var n=[],i=0;i<e.length;)n.push(e.substring(i,i+t)),i+=t;return n}function r(e,t,n,i){for(var o=0;o<e.length;o++)e[o][n][i]=t}function s(e,t,n,i){for(var o=0;o<ve.length;o++)e[o][n][i]=ve[o](n,i)?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,n,i=68;for(e=2;e<=i;e++)t=se[e-1],n=[e,0],se[e]=w(t,n)}function c(e,n){var i=[],o=e.length-1;do i[o]=re[(e[o]+n)%255],o--;while(e[o]!==t);return i}function d(e,t){return parseInt(e.charAt(t),10)}function u(e,t,n,i,o){t[e][i]=(t[e][i]<<1^o)%128,t[e][i]==ge&&(n[e]+=40)}function h(e,t,n,i,o,r){n[e][r]==i?o[e][r]++:(n[e][r]=i,o[e][r]>=5&&(t[e]+=3+o[e][r]-5),o[e][r]=1)}function f(e,t){var n=Math.floor(e/t*100),i=n%5,o=Math.abs(n-i-50),r=Math.abs(n+5-i-50),s=10*Math.min(o/5,r/5);return s}var p,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,M,R,I,F,z,P,B,L,H,N,O,V,U,W,j,q,G,$,Y=window.kendo,K=e.extend,Q=Y.drawing,X=Y.dataviz,Z=Y.ui.Widget,J=X.Box2D,ee="0000",te="numeric",ne="alphanumeric",ie="byte",oe={1:0},re={0:1},se=[[1,0],[1,25,0]],ae={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},le=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],
totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],ce=[1,0,1,1,1],de=[1,0,1],ue={L:"01",M:"00",Q:"11",H:"10"},he="101010000010010",fe="10100110111",pe="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,Me=Math.round,Re=Y.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 n=this;return n.modeIndicator+i(e,n.getBitsCharacterCount(t))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Ie={};Ie[te]=Re.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(e){return parseInt(e,10)},encode:function(e,t){var n,r=this,s=o(e,3),a=r.getModeCountString(e.length,t);for(n=0;n<s.length-1;n++)a+=i(s[n],10);return a+i(s[n],1+3*s[n].length)},getStringBitsLength:function(e,t){var n=e%3;return 4+this.getBitsCharacterCount(t)+10*Math.floor(e/3)+3*n+(0===n?0:1)}}),Ie[ne]=Re.extend({characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010",getValue:function(e){return this.characters[e]},encode:function(e,t){var n,r,s=this,a=o(e,2),l=s.getModeCountString(e.length,t);for(r=0;r<a.length-1;r++)n=45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)),l+=i(n,11);return n=2==a[r].length?45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)):s.getValue(a[r].charAt(0)),l+i(n,1+5*a[r].length)},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+11*Math.floor(e/2)+6*(e%2)}}),Ie[ie]=Re.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 n,o=this,r=o.getModeCountString(e.length,t);for(n=0;n<e.length;n++)r+=i(o.getValue(e.charAt(n)),8);return r},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+8*e}}),p={};for(m in Ie)p[m]=new Ie[m];g=function(e){var n=this,i=e.length-1,o=e.length-1,r=o,s=-1,a=0;n.move=function(){i+=s*a,a^=1,o=r-a},n.getNextCell=function(){for(;e[i][o]!==t;)n.move(),(i<0||i>=e.length)&&(s=-s,r-=8!=r?2:3,o=r,i=s<0?e.length-1:0);return{row:i,column:o}},n.getNextRemainderCell=function(){if(n.move(),e[i][o]===t)return{row:i,column:o}}},v=function(e,t){var n,i,o,r,a,l,c=new g(e[0]);for(r=0;r<t.length;r++)for(n=t[r],i=0;n.length>0;){for(a=0;a<n.length;a++)for(l=0;l<8;l++)o=c.getNextCell(),s(e,n[a][i].charAt(l),o.row,o.column);for(i++;n[0]&&i==n[0].length;)n.splice(0,1)}for(;o=c.getNextRemainderCell();)s(e,0,o.row,o.column)},_=function(e,t){for(var n=8*t,i=0,o=0;e.length<n&&i<ee.length;)e+=ee.charAt(i++);for(e.length%8!==0&&(e+=Array(9-e.length%8).join("0"));e.length<n;)e+=me[o],o^=1;return e},b=function(e,t){var n,i=[],o=e.length-2;for(n=o;n>=0;n--)i[n]=e[n]^t[n];return i},w=function(e,n){var i,o,r=[];for(i=0;i<e.length;i++)for(o=0;o<n.length;o++)r[i+o]=r[i+o]===t?(e[i]+(n[o]>=0?n[o]:0))%255:oe[re[r[i+o]]^re[(e[i]+n[o])%255]];return r},a(),l(),y=function(e,t){var n,o,r=se[t-1],s=Array(t).concat(e),a=Array(s.length-r.length).concat(r),l=e.length,d=[];for(o=0;o<l;o++)n=c(a,oe[s[s.length-1]]),a.splice(0,1),s=b(n,s);for(o=s.length-1;o>=0;o--)d[t-1-o]=i(s[o],8);return d},k=function(e,t){var i,o,r,s,a,l,c,d,u=0,h=[],f=[],p=t.groups;for(l=0;l<p.length;l++)for(r=p[l][0],c=0;c<r;c++){for(o=p[l][1],i=[],s=[],d=1;d<=o;d++)a=e.substring(u,u+8),i.push(a),s[o-d]=n(a),u+=8;h.push(i),f.push(y(s,t.errorCodewordsPerBlock))}return[h,f]},x=function(e,t,n,i,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>=n&&!ke.test(e.charAt(l.length)))?(r=te,s=l):h&&(e.length==h.length||h.length>=i||o==ne)?(r=ne,s=l||d):(r=ie,s=h?h+xe.exec(e.substring(h.length))[0]:xe.exec(e)[0]),{mode:r,modeString:s}},C=function(e){var t,n,i=[],o=0;for(i.push(x(e,Ce,Se,Te,t)),t=i[0].mode,e=e.substr(i[0].modeString.length);e.length>0;)n=x(e,De,Ae,Ee,t),n.mode!=t?(t=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,e=e.substr(n.modeString.length);return i},S=function(e){var t,n,i=0;for(n=0;n<e.length;n++)t=p[e[n].mode],i+=t.getStringBitsLength(e[n].modeString.length);return Math.ceil(i/8)},T=function(e,t){var n=0,i=le.length-1,o=Math.floor(le.length/2);do e<le[o][t].totalDataCodewords?i=o:n=o,o=n+Math.floor((i-n)/2);while(i-n>1);return e<=le[n][t].totalDataCodewords?o+1:i+1},D=function(e,t){var n,i,o="";for(i=0;i<e.length;i++)n=p[e[i].mode],o+=n.encode(e[i].modeString,t);return o},A=function(e){var t,i,o=n(e),r="";if(0===o)return"101010000010010";for(t=E(n(e),fe,15),i=0;i<t.length;i++)r+=t.charAt(i)^he.charAt(i);return r},E=function(e,t,o){var r=n(t),s=t.length-1,a=e<<s,l=o-s,c=i(e,l),d=M(a,r);return d=c+i(d,s)},M=function(e,t){var n=t.toString(2).length,i=e.toString(2).length;do e^=t<<i-n,i=e.toString(2).length;while(i>=n);return e},R=function(e){var t,n,i=[],o=17+4*e;for(t=0;t<ve.length;t++)for(i[t]=Array(o),n=0;n<o;n++)i[t][n]=Array(o);return i},I=function(e,t){var n,i,o=e[0],s=0,a=t.length;for(n=0,i=8;n<=8;n++)6!==n&&r(e,d(t,a-1-s++),n,i);for(n=8,i=7;i>=0;i--)6!==i&&r(e,d(t,a-1-s++),n,i);for(s=0,i=o.length-1,n=8;i>=o.length-8;i--)r(e,d(t,a-1-s++),n,i);for(r(e,1,o.length-8,8),n=o.length-7,i=8;n<o.length;n++)r(e,d(t,a-1-s++),n,i)},F=function(e){return E(e,pe,18)},z=function(e,t){var n,i,o,s,a=e[0],l=a.length,c=0,u=l-11,h=l-11,f=0;for(s=0;s<t.length;s++)n=Math.floor(s/3),i=s%3,o=d(t,t.length-s-1),r(e,o,c+n,u+i),r(e,o,h+i,f+n)},P=function(e,t,n,i){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,n+a,i+s),r(e,o,n+s,i+a),r(e,o,n+c-a,i+c-s),r(e,o,n+c-s,i+c-a)},B=function(e,t,n,i){var o=n,s=i,a=e[0];do r(e,0,o,i),r(e,0,n,s),o+=t[0],s+=t[1];while(o>=0&&o<a.length)},L=function(e){var t=e[0].length;P(e,ce,0,0),B(e,[-1,-1],7,7),P(e,ce,t-7,0),B(e,[1,-1],t-8,7),P(e,ce,0,t-7),B(e,[-1,1],7,t-8)},H=function(e,n){var i,o,r,s,a,l,c,d,u;if(!(n<2)){for(i=e[0],o=i.length,r=Math.floor(n/7),s=[6],c=0,(a=ae[n])?l=(o-13-a)/r:a=l=(o-13)/(r+1),s.push(s[c++]+a);s[c]+l<o;)s.push(s[c++]+l);for(d=0;d<s.length;d++)for(u=0;u<s.length;u++)i[s[d]][s[u]]===t&&P(e,de,s[d]-2,s[u]-2)}},N=function(e){var t,n=6,i=6,o=1,s=e[0].length;for(t=8;t<s-8;t++)r(e,o,n,t),r(e,o,t,i),o^=1},O=function(e){var t,n,i,o,r,s,a,l=[],c=[],d=[],p=[],m=[],g=0,v=1,_=e[0].length;for(n=0;n<e.length;n++)l[n]=0,d[n]=0,m[n]=[0,0],p[n]=[0,0],c[n]=[];for(n=0;n<_;n++)for(i=0;i<_;i++)for(o=0;o<e.length;o++)t=e[o],d[o]+=parseInt(t[n][i],10),c[o][g]===t[n][i]&&n+1<_&&i-1>=0&&t[n+1][i]==c[o][g]&&t[n+1][i-1]==c[o][g]&&(l[o]+=3),u(o,p,l,g,t[n][i]),u(o,p,l,v,t[i][n]),h(o,l,c,t[n][i],m,g),h(o,l,c,t[i][n],m,v);for(r=_*_,a=Number.MAX_VALUE,n=0;n<l.length;n++)l[n]+=f(d[n],r),l[n]<a&&(a=l[n],s=n);return s},V=function(e,t){this.dataString=e,this.version=t},U=function(){this.getEncodingResult=function(e,t){var n=C(e),i=S(n),o=T(i,t),r=D(n,o);return new V(r,o)}},W=function(){this.mode=p[this.encodingMode]},W.fn=W.prototype={encodingMode:ie,utfBOM:"111011111011101110111111",initialModeCountStringLength:20,getEncodingResult:function(e,t){var n=this,i=n.encode(e),o=n.getDataCodewordsCount(i),r=T(o,t),s=n.mode.getModeCountString(i.length/8,r)+i;return new V(s,r)},getDataCodewordsCount:function(e){var t=this,n=e.length,i=Math.ceil((t.initialModeCountStringLength+n)/8);return i},encode:function(e){var t,n=this,i=n.utfBOM;for(t=0;t<e.length;t++)i+=n.encodeCharacter(e.charCodeAt(t));return i},encodeCharacter:function(e){var t,n,o=this.getBytesCount(e),r=o-1,s="";if(1==o)s=i(e,8);else{for(t=8-o,n=0;n<r;n++)s=i(e>>6*n&63|128,8)+s;s=(e>>6*r|255>>t<<t).toString(2)+s}return s},getBytesCount:function(e){var t,n=this.ranges;for(t=0;t<n.length;t++)if(e<n[t])return t+1},ranges:[128,2048,65536,2097152,67108864]},j=function(e){return e&&e.toLowerCase().indexOf("utf_8")>=0?new W:new U},q=function(e,t,n){var o,r,s,a=new j(n),l=a.getEncodingResult(e,t),c=l.version,d=le[c-1][t],u=_(l.dataString,d.totalDataCodewords),h=k(u,d),f=R(c);return L(f),H(f,c),N(f),c>=7&&z(f,i(0,18)),I(f,i(0,15)),v(f,h),o=O(f),r=f[o],c>=7&&z([r],F(c)),s=ue[t]+i(o,3),I([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,n){var i=this;Z.fn.init.call(i,t,n),i.element=e(t),i.wrapper=i.element,i.element.addClass("k-qrcode"),i.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),i.surface=Q.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},redraw:function(){var e=this._getSize();this.surfaceWrap.css({width:e,height:e}),this.surface.clear(),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return Y.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},exportVisual:function(){return this._render()},_render:function(){var e,t,n,i,o,r,s,a=this,l=a._value,c=a.options.border||{},d=a.options.padding||0,u=c.width||0;return c.width=u,s=new Q.Group,l&&(n=q(l,a.options.errorCorrection,a.options.encoding),i=a._getSize(),r=i-2*(u+d),e=a._calculateBaseUnit(r,n.length),o=n.length*e,t=u+d+(r-o)/2,s.append(a._renderBackground(i,c)),s.append(a._renderMatrix(n,e,t))),s},_getSize:function(){var e,t,n,i=this;return i.options.size?e=parseInt(i.options.size,10):(t=i.element,n=Math.min(t.width(),t.height()),e=n>0?n:G.DEFAULT_SIZE),e},_calculateBaseUnit:function(e,t){var n=Math.floor(e/t);if(n<G.MIN_BASE_UNIT_SIZE)throw Error("Insufficient size.");return n*t>=e&&n-1>=G.MIN_BASE_UNIT_SIZE&&n--,n},_renderMatrix:function(e,t,n){var i,o,r,s,a,l,c,d,u=new Q.MultiPath({fill:{color:this.options.color},stroke:null});for(i=0;i<e.length;i++)for(o=n+i*t,r=0;r<e.length;){for(;0===e[i][r]&&r<e.length;)r++;if(r<e.length){for(s=r;1==e[i][r];)r++;a=Me(n+s*t),l=Me(o),c=Me(n+r*t),d=Me(o+t),u.moveTo(a,l).lineTo(a,d).lineTo(c,d).lineTo(c,l).close()}}return u},_renderBackground:function(e,t){var n=new J(0,0,e,e).unpad(t.width/2);return Q.Path.fromRect(n.toRect(),{fill:{color:this.options.background},stroke:{color:t.color,width:t.width}})},setOptions:function(e){var n=this;e=e||{},n.options=K(n.options,e),e.value!==t&&(n._value=n.options.value+""),n.redraw()},value:function(e){var n=this;return e===t?n._value:(n._value=e+"",n.redraw(),t)},options:{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection: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($),Y.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:M,initMatrices:R,addFormatInformation:I,encodeVersionInformation:F,addVersionInformation:z,addCentricPattern:P,addFinderSeparator:B,addFinderPatterns:L,addAlignmentPatterns:H,addTimingFunctions:N,scoreMaskMatrixes:O,encodeData:q,UTF8Encoder:W},QRCodeFields:{modes:p,powersOfTwo:oe,powersOfTwoResult:re,generatorPolynomials:se}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/stock/kendo-stock-chart.min",["kendo.dataviz.chart.min"],e)}(function(){!function(){function e(e,t){var n=document.createElement("div");return n.className=e,t&&(n.style.cssText=t),n}function t(){}function n(e){return t.prototype=e,new t}var i,o,r,s,a,l,c,d,u,h,f,p,m,g,v;window.kendo.dataviz=window.kendo.dataviz||{},i=kendo.dataviz,o=i.deepExtend,r=i.elementStyles,s=i.toTime,a=i.services,l=i.constants,c=i.Chart,d=i.Class.extend({init:function(e,t,n){this.options=o({},this.options,n),this.container=e,this.chartService=t;var i=r(e,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.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;"),n=this.tooltip=e("k-tooltip k-chart-tooltip"),i=this.scroll=e("k-scroll");n.innerHTML="&nbsp;",t.appendChild(n),t.appendChild(i)},show:function(e,t,n){var o,l=this,c=l.element,d=l.options,u=l.scroll,h=l.tooltip,f=i.toDate(s(e)+s(t-e)/2),p=.4*n.width(),m=n.center().x-p,g=n.center().x,v=g-m,_=d.max-d.min,b=v/_,w=f-d.min,y=this.chartService.intl.format(d.format,e,t);this._hideTimeout&&clearTimeout(this._hideTimeout),this._visible||(r(c,{visibility:"hidden",display:"block"}),this._visible=!0),d.template&&(y=a.TemplateService.compile(d.template)({from:e,to:t})),h.innerHTML=y,r(h,{left:n.center().x-h.offsetWidth/2,top:n.y1}),o=r(h,["marginTop","borderTopWidth","height"]),r(u,{width:p,left:m+w*b,top:n.y1+o.marginTop+o.borderTopWidth+o.height/2}),r(c,{visibility:"visible"})},hide:function(){var e=this;this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(function(){e._visible=!1,r(e.element,{display:"none"})},this.options.hideDelay)}}),i.setDefaultOptions(d,{format:"{0:d} - {1:d}",hideDelay:500}),u="_navigator",h=u,f={NAVIGATOR_AXIS:h,NAVIGATOR_PANE:u},p=3,m=i.Class.extend({init:function(e){var t,n,r;this.chart=e,t=this.options=o({},this.options,e.options.navigator),n=t.select,n&&(n.from=this.parseDate(n.from),n.to=this.parseDate(n.to)),i.defined(t.hint.visible)||(t.hint.visible=t.visible),this.chartObserver=new i.InstanceObserver(this,(r={},r[l.DRAG]="_drag",r[l.DRAG_END]="_dragEnd",r[l.ZOOM]="_zoom",r[l.ZOOM_END]="_zoomEnd",r)),e.addObserver(this.chartObserver)},parseDate:function(e){return i.parseDate(this.chart.chartService.intl,e)},destroy:function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.selection&&(this.selection.destroy(),delete this.selection)},redraw:function(){this._redrawSelf(),this._initSelection()},_initSelection:function(){var e=this,t=e.chart,o=e.options,r=this.mainAxis(),s=r.range(),a=s.min,l=s.max,c=o.select,u=c.from,h=c.to,f=c.mousewheel,p=n(r),m=r.options.categories,g=this.selection;0!==m.length&&(g&&g.destroy(),p.box=r.box,g=this.selection=new i.Selection(t,p,{min:a,max:l,from:u||a,to:h||l,mousewheel:i.valueOrDefault(f,{zoom:"left"}),visible:o.visible},new i.InstanceObserver(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new d(t.element,t.chartService,{min:a,max:l,template:o.hint.template,format:o.hint.format})))},_setRange:function(){var e,t=this.chart._createPlotArea(!0),n=t.namedCategoryAxes[h],i=n.range(),r=i.min,s=i.max,a=this.options.select||{},l=a.from||r;l<r&&(l=r),e=a.to||s,e>s&&(e=s),this.options.select=o({},a,{from:l,to:e}),this.filterAxes()},_redrawSelf:function(e){var t=this.chart._plotArea;t&&t.redraw(i.last(t.panes),e)},redrawSlaves:function(){var e=this.chart,t=e._plotArea,n=t.panes.slice(0,-1);t.srcSeries=e.options.series,t.redraw(n)},_drag:function(e){var t,n,o,r=this,a=r.chart,l=r.selection,c=a._eventCoordinates(e.originalEvent),d=this.mainAxis(),u=d.datesRange(),h=d.pane.box.containsPoint(c),f=a._plotArea.categoryAxis,p=e.axisRanges[f.options.name],m=this.options.select;p&&!h&&l&&(t=m.from&&m.to?s(m.to)-s(m.from):s(l.options.to)-s(l.options.from),n=i.toDate(i.limitValue(s(p.min),u.min,s(u.max)-t)),o=i.toDate(i.limitValue(s(n)+t,s(u.min)+t,u.max)),this.options.select={from:n,to:o},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),l.set(n,o),this.showHint(n,o))},_dragEnd:function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},readSelection:function(){var e=this,t=e.selection.options,n=t.from,i=t.to,o=e.options.select;o.from=n,o.to=i},filterAxes:function(){var e,t,n,i,o,r,s=this,a=s.options.select;for(void 0===a&&(a={}),e=s.chart,t=e.options.categoryAxis,n=a.from,i=a.to,o=0;o<t.length;o++)r=t[o],r.pane!==u&&(r.min=n,r.max=i)},filter:function(){var e,t=this,n=t.chart,r=t.options,s=r.filterable,a=r.select;s&&(e=new i.DateCategoryAxis(o({baseUnit:"fit"},n.options.categoryAxis[0],{categories:[a.from,a.to]}),n.chartService).options,this.chart.trigger("navigatorFilter",{from:i.addDuration(e.min,-e.baseUnitStep,e.baseUnit),to:i.addDuration(e.max,e.baseUnitStep,e.baseUnit)}))},_zoom:function(e){var t,n,o=this,r=o.chart._plotArea.categoryAxis,s=o.selection,a=o.options,l=a.select,c=a.liveDrag,d=this.mainAxis().options.categories,u=e.delta;s&&(t=i.lteDateIndex(s.options.from,d),n=i.lteDateIndex(s.options.to,d),e.originalEvent.preventDefault(),Math.abs(u)>1&&(u*=p),n-t>1?(s.expand(u),this.readSelection()):(r.options.min=l.from,l.from=r.scaleRange(-e.delta).min),c&&(this.filterAxes(),this.redrawSlaves()),s.set(l.from,l.to),this.showHint(this.options.select.from,this.options.select.to))},_zoomEnd:function(e){this._dragEnd(e)},showHint:function(e,t){var n=this.chart._plotArea;this.hint&&this.hint.show(e,t,n.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[h]},select:function(e,t){var n=this.options.select;return e&&t&&(n.from=this.parseDate(e),n.to=this.parseDate(t),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(e,t)),{from:n.from,to:n.to}}}),m.setup=function(e,t){var n,i,r;void 0===e&&(e={}),void 0===t&&(t={}),e.__navi||(e.__navi=!0,n=o({},t.navigator,e.navigator),i=e.panes=[].concat(e.panes),r=o({},n.pane,{name:u}),n.visible||(r.visible=!1,r.height=.1),i.push(r),m.attachAxes(e,n),m.attachSeries(e,n,t))},m.attachAxes=function(e,t){var n=t.series||[],r=e.categoryAxis=[].concat(e.categoryAxis),s=e.valueAxis=[].concat(e.valueAxis),a=i.filterSeriesByType(n,l.EQUALLY_SPACED_SERIES),c=0===a.length,d=o({type:"date",pane:u,roundToBaseUnit:!c,justified:c,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:!t.filterable,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),f=t.categoryAxis;r.push(o({},d,{maxDateGroups:200},f,{name:h,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),o({},d,f,{name:h+"_labels",maxDateGroups:20,baseUnitStep:"auto",plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),o({},d,f,{name:h+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),s.push(o({name:h,pane:u,majorGridLines:{visible:!1},visible:!1},t.valueAxis))},m.attachSeries=function(e,t,n){var i,r=e.series=e.series||[],s=[].concat(t.series||[]),a=n.seriesColors,l=t.seriesDefaults;for(i=0;i<s.length;i++)r.push(o({color:a[i%a.length],categoryField:t.dateField,visibleInLegend:!1,tooltip:{visible:!1}},l,s[i],{axis:h,categoryAxis:h,autoBind:!t.filterable}))},g=28,v=c.extend({_applyDefaults:function(e,t){var n=i.elementSize(this.element).width||l.DEFAULT_WIDTH,r=t,s={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(n/g)}}};r&&(r=o({},r,s)),m.setup(e,r),c.fn._applyDefaults.call(this,e,r)},_setElementClass:function(e){i.addClass(e,"k-chart k-stockchart")},setOptions:function(e){this._destroyNavigator(),c.fn.setOptions.call(this,e)},_resize:function(){var e=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=e},_redraw:function(){var e=this._navigator;!this._dirty()&&e&&e.options.filterable?e.redrawSlaves():this._fullRedraw()},_dirty:function(){var e=this.options,t=[].concat(e.series,e.navigator.series),n=i.grep(t,function(e){return e&&e.visible}).length,o=this._seriesCount!==n;return this._seriesCount=n,o},_fullRedraw:function(){var e=this._navigator;e||(e=this._navigator=new m(this),this.trigger("navigatorCreated",{navigator:e})),e._setRange(),c.fn._redraw.call(this),e._initSelection()},_trackSharedTooltip:function(e){var t=this._plotArea,n=t.paneByPoint(e);n&&n.options.name===u?this._unsetActivePoint():c.fn._trackSharedTooltip.call(this,e)},_destroyNavigator:function(){this._navigator.destroy(),this._navigator=null},destroy:function(){this._destroyNavigator(),c.fn.destroy.call(this)},_stopDragEvent:function(e){var t=this._eventCoordinates(e),n=this._plotArea.paneByPoint(t);return c.fn._stopDragEvent.call(this,e)||n&&n.options.name===u}}),i.setDefaultOptions(v,{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:m,NavigatorHint:d,StockChart:v})}()},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=window.kendo,i=n.dataviz,o=i.ChartInstanceObserver,r=i.ui.Chart,s=i.StockChart,a=i.constants,l=a.NAVIGATOR_AXIS,c=a.NAVIGATOR_PANE,d=n.deepExtend,u=i.defined,h=e.proxy,f="change",p=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}},_createChart:function(e,t){this._initNavigatorOptions(e),this._instance=new s(this.element[0],e,t,{observer:new p(this),sender:this})},_initNavigatorOptions:function(e){var t=e.navigator||{},i=n.support,o=i.touch,r=i.browser.mozilla;d(t,{filterable:!!t.dataSource,liveDrag:!o&&!r})},_initDataSource:function(e){var o,s,a,l,c=e||{},u=c.dataSource,h=u&&u.serverFiltering,f=[].concat(c.categoryAxis)[0],p=c.navigator||{},m=p.select,g=m&&m.from&&m.to;h&&g&&(o=[].concat(u.filter||[]),s=n.parseDate(m.from),a=n.parseDate(m.to),l=new i.DateCategoryAxis(d({baseUnit:"fit"},f,{categories:[s,a]}),n),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,i=e.dataSource;i&&(this._navigatorDataChangedHandler=this._navigatorDataChangedHandler||h(this._onNavigatorDataChanged,this),this._navigatorDataSource=n.data.DataSource.create(i).bind(f,this._navigatorDataChangedHandler),u(t)||(t=this.options.autoBind),t&&this._navigatorDataSource.fetch())},_onNavigatorDataChanged:function(){var e,t,n,i,o,r,s=this,a=s._instance,d=s.options.series,u=d.length,h=s.options.categoryAxis,f=h.length,p=s._navigatorDataSource.view();for(e=0;e<u;e++)n=d[e],n.axis==l&&s._isBindable(n)&&(n.data=p);for(t=0;t<f;t++)i=h[t],i.pane==c&&(i.name==l?(s._bindCategoryAxis(i,p,t),o=i.categories):i.categories=o);a._model&&(r=this.navigator,r.redraw(),r._setRange(),(!s.options.dataSource||s.options.dataSource&&s._dataBound)&&r.redrawSlaves())},_bindCategories:function(){var e,t,n,i=this.options,o=[].concat(i.categoryAxis);for(r.fn._bindCategories.call(this),e=0;e<o.length;e++)t=o[e],t.name===l?n=t.categories:n&&t.pane==c&&(t.categories=n)},_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))},_removeNavigatorDataSource:function(){var e=this._navigatorDataSource;e&&(e.unbind(f,this._navigatorDataChangedHandler),delete this._navigatorDataSource)},destroy:function(){r.fn.destroy.call(this),this._removeNavigatorDataSource()}});i.ui.plugin(m)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||t)()}),function(e,define){define("dataviz/sparkline/kendo-sparkline.min",["kendo.dataviz.chart.min"],e)}(function(){!function(){function e(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i[t]=n.style.display,n.style.display="none";return i}function t(e,t){for(var n=0;n<e.length;n++)e[n].style.display=t[n]}function n(e){return i.isNumber(e)?[e]:e}var i,o,r,s,a,l,c,d,u;window.kendo.dataviz=window.kendo.dataviz||{},i=kendo.dataviz,o=i.constants,r=i.Chart,s=i.elementSize,a=i.deepExtend,l=150,c=150,d=[o.BAR,o.BULLET],u=r.extend({_setElementClass:function(e){i.addClass(e,"k-sparkline")},_initElement:function(e){r.fn._initElement.call(this,e),this._initialWidth=Math.floor(s(e).width)},_resize:function(){var n=this.element,i=e(n.childNodes);this._initialWidth=Math.floor(s(n).width),t(n.childNodes,i),r.fn._resize.call(this)},_modelOptions:function(){var n,i=this.options,o=this._surfaceWrap(),r=e(o.childNodes),l=document.createElement("span");return l.innerHTML="&nbsp;",o.appendChild(l),n=a({width:this._autoWidth,height:s(o).height,transitions:i.transitions},i.chartArea,{inline:!0,align:!1}),s(o,{width:n.width,height:n.height}),o.removeChild(l),t(o.childNodes,r),this.surface.resize(),n},_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,n,r,a,d,u,h=this.options,f=i.getSpacing(h.chartArea.margin),p=e.charts,m=this._surfaceWrap(),g=0;for(t=0;t<p.length;t++)if(n=p[t],r=(n.options.series||[])[0]){if(r.type===o.BAR)return l;if(r.type===o.BULLET)return c;if(r.type===o.PIE)return s(m).height;a=n.categoryAxis,a&&(d=a.options.categories.length*(!n.options.isStacked&&i.inArray(r.type,[o.COLUMN,o.VERTICAL_BULLET])?n.seriesOptions.length:1),g=Math.max(g,d))}return u=g*h.pointWidth,u>0&&(u+=f.left+f.right),u}}),u.normalizeOptions=function(e){var t=n(e);return t=i.isArray(t)?{seriesDefaults:{data:t}}:a({},t),t.series||(t.series=[{data:n(t.data)}]),a(t,{seriesDefaults:{type:t.type}}),(i.inArray(t.series[0].type,d)||i.inArray(t.seriesDefaults.type,d))&&(t=a({},{categoryAxis:{crosshair:{visible:!1}}},t)),t},i.setDefaultOptions(u,{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:u})}()},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/sparkline/sparkline.min",["dataviz/sparkline/kendo-sparkline.min"],e)}(function(){!function(){var e,t=kendo.dataviz,n=t.ui.Chart,i=t.Sparkline,o=t.ChartInstanceObserver,r=n.extend({init:function(e,t){var o=t;o instanceof kendo.data.ObservableArray&&(o={seriesDefaults:{data:o}}),n.fn.init.call(this,e,i.normalizeOptions(o))},_createChart:function(e,t){this._instance=new i(this.element[0],e,t,{observer:new o(this),sender:this})},_createTooltip:function(){return new e(this.element,this.options.tooltip)},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}]}});t.ui.plugin(r),e=t.Tooltip.extend({options:{animation:{duration:0}},_hideElement:function(){this.element&&this.element.hide().remove()}}),t.SparklineTooltip=e}()},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||t)()}),function(e,define){define("dataviz/map/location.min",["kendo.drawing.min","util/main.min"],e)}(function(){!function(e,t){
var n,i=Math,o=i.abs,r=i.atan,s=i.atan2,a=i.cos,l=i.max,c=i.min,d=i.sin,u=i.tan,h=window.kendo,f=h.Class,p=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=f.extend({init:function(e,t){1===arguments.length?(this.lat=e[0],this.lng=e[1]):(this.lat=e,this.lng=t)},DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6},{1:N6}",toArray:function(){return[this.lat,this.lng]},equals:function(e){return e&&e.lat===this.lat&&e.lng===this.lng},clone:function(){return new 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,n){var o,r,l,c,u;return t=b(t),n=n||p.map.datums.WGS84,o=b(this.lat),r=b(this.lng),l=e/h.dataviz.map.datums.WGS84.a,c=i.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 n,l,c,h,f,m,g,v,y,C,S,T,D,A,E,M,R,I,F,z,P,B,L,H,N,O,V,U,W;if(e=x.create(e),t=t||p.map.datums.WGS84,!e||this.clone().round(8).equals(e.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(n=t.a,l=t.b,c=t.f,h=b(e.lng-this.lng),f=r((1-c)*u(b(this.lat))),m=d(f),g=a(f),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),M=a(S),R=i.sqrt(k(C*E)+k(g*y-m*C*M)),F=m*y+g*C*M,P=s(R,F),B=g*C*E/R,I=1-k(B),z=0,0!==I&&(z=F-2*m*y/I),T=S,L=c/16*I*(4+c*(4-3*I)),S=h+(1-L)*c*B*(P+L*R*(z+L*F*(-1+2*k(z)))),A=o(S-T)<=this.DISTANCE_CONVERGENCE;return H=I*(k(n)-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*R*(z+O/4*(F*(-1+2*k(z))-O/6*z*(-3+4*k(R))*(-3+4*k(z)))),U=s(C*E,g*y-m*C*M),W=s(g*E,-m*C+g*y*M),{distance:w(l*N*(P-V),this.DISTANCE_PRECISION),azimuthFrom:_(U),azimuthTo:_(W)}}});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)},n=f.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,n=this.se,i=y(e.lng,e[1]),o=y(e.lat,e[0]);return e&&i+180>=t.lng+180&&i+180<=n.lng+180&&o+90>=n.lat+90&&o+90<=t.lat+90},center:function(){var e=this.nw,t=this.se,n=e.lng+(t.lng-e.lng)/2,i=e.lat+(t.lat-e.lat)/2;return new x(i,n)},containsAny:function(e){var t,n=!1;for(t=0;t<e.length;t++)n=n||this.contains(e[t]);return n},include:function(e){var t=this.nw,n=this.se,i=y(e.lng,e[1]),o=y(e.lat,e[0]);t.lng=c(t.lng,i),t.lat=l(t.lat,o),n.lng=l(n.lng,i),n.lat=c(n.lat,o)},includeAll:function(e){for(var t=0;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())}}),n.World=new n([90,-180],[-90,180]),n.create=function(e,i){return e instanceof n?e:e&&i?new n(e,i):e&&4===e.length&&!i?new n([e[0],e[1]],[e[2],e[3]]):t},m(p,{map:{Extent:n,Location:x}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/map/attribution.min",["kendo.drawing.min"],e)}(function(){!function(){var e=window.kendo,t=e.ui.Widget,n=e.template,i=e.drawing.util,o=i.valueOrDefault,r=i.defined,s=t.extend({init:function(e,n){t.fn.init.call(this,e,n),this._initOptions(n),this.items=[],this.element.addClass("k-widget k-attribution")},options:{name:"Attribution",separator:"&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,n,i=[];for(t=0;t<this.items.length;t++)n=this.items[t],n.text!==e&&i.push(n);this.items=i,this._render()},clear:function(){this.items=[],this.element.empty()},_render:function(){var e,t,i,o=[],r=n(this.options.itemTemplate);for(e=0;e<this.items.length;e++)t=this.items[e],i=this._itemText(t),""!==i&&o.push(r({text:i}));o.length>0?this.element.empty().append(o.join(this.options.separator)).show():this.element.hide()},_itemText:function(e){var t="",n=this._inZoomLevel(e.minZoom,e.maxZoom),i=this._inArea(e.extent);return n&&i&&(t+=e.text),t},_inZoomLevel:function(e,t){var n=!0;return e=o(e,-Number.MAX_VALUE),t=o(t,Number.MAX_VALUE),n=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,n){(n||t)()}),function(e,define){define("dataviz/map/navigator.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return n.format('<button class="k-button k-navigator-{0}"><span class="k-icon k-i-arrow-60-{0}"/></button>',e)}var n=window.kendo,i=n.ui.Widget,o=n.keys,r=e.proxy,s=".kendoNavigator",a=t("up")+t("right")+t("down")+t("left"),l=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._initOptions(t),this.element.addClass("k-widget k-header k-shadow k-navigator").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=o.length>0?o:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"Navigator",panStep:1},events:["pan"],dispose:function(){this._keyroot.off("keydown",this._keydown)},_pan:function(e,t){var n=this.options.panStep;this.trigger("pan",{x:e*n,y:t*n})},_click:function(t){var n=0,i=0,o=e(t.currentTarget);o.is(".k-navigator-up")?i=1:o.is(".k-navigator-down")?i=-1:o.is(".k-navigator-right")?n=1:o.is(".k-navigator-left")&&(n=-1),this._pan(n,i),t.preventDefault()},_keydown:function(e){switch(e.which){case o.UP:this._pan(0,1),e.preventDefault();break;case o.DOWN:this._pan(0,-1),e.preventDefault();break;case o.RIGHT:this._pan(1,0),e.preventDefault();break;case o.LEFT:this._pan(-1,0),e.preventDefault()}}});n.dataviz.ui.plugin(l)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/map/zoom.min",["kendo.core.min"],e)}(function(){!function(e){function t(e,t){return n.format('<button class="k-button k-zoom-{0}" title="zoom-{0}"><span class="k-icon {1}"></span></button>',e,t)}var n=window.kendo,i=n.ui.Widget,o=n.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=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._initOptions(t),this.element.addClass("k-widget k-zoom-control k-button-wrap k-buttons-horizontal k-button-group k-group-horizontal").append(a).on("click"+s,".k-button",r(this,"_click"));var o=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=o.length>0?o:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"ZoomControl",zoomStep:1},events:["change"],_change:function(e){var t=this.options.zoomStep;this.trigger("change",{delta:e*t})},_click:function(t){var n=e(t.currentTarget),i=1;n.is(".k-zoom-out")&&(i=-1),this._change(i),t.preventDefault()},_keydown:function(e){switch(e.which){case o.NUMPAD_PLUS:case l:case d:this._change(1);break;case o.NUMPAD_MINUS:case c:case u:this._change(-1)}}});n.dataviz.ui.plugin(h)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/map/crs.min",["dataviz/map/location.min","kendo.drawing.min"],e)}(function(){!function(e,t){var n=Math,i=n.atan,o=n.exp,r=n.pow,s=n.sin,a=n.log,l=n.tan,c=window.kendo,d=c.Class,u=c.dataviz,h=c.deepExtend,f=c.geometry,p=f.Point,m=u.map,g=m.Location,v=c.drawing.util,_=v.rad,b=v.deg,w=v.limitValue,y=n.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 n=this,i=n.options,o=i.datum,r=o.a,s=i.centralMeridian,a=w(e.lat,-n.MAX_LAT,n.MAX_LAT),l=t?w(e.lng,-n.MAX_LNG,n.MAX_LNG):e.lng,c=_(l-s)*r,d=n._projectLat(a);return new p(c,d)},_projectLat:function(e){var t=this.options.datum,n=t.e,i=t.a,o=_(e),c=l(x+o/2),d=n*s(o),u=r((1-d)/(1+d),n/2);return i*a(c*u)},inverse:function(e,t){var n=this,i=n.options,o=i.datum,r=o.a,s=i.centralMeridian,a=e.x/(C*r)+s,l=w(n._inverseY(e.y),-n.MAX_LAT,n.MAX_LAT);return t&&(a=w(a,-n.MAX_LNG,n.MAX_LNG)),new g(l,a)},_inverseY:function(e){var t,a,l,c,d=this,u=d.options.datum,h=u.a,f=u.e,p=f/2,m=o(-e/h),g=k-2*i(m);for(t=0;t<=d.INVERSE_ITERATIONS&&(a=f*s(g),l=r((1-a)/(1+a),p),c=k-2*i(m*l)-g,g+=c,!(n.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,n=_(e),i=l(x+n/2);return t*a(i)},_inverseY:function(e){var t=this.options.datum.a,n=o(-e/t);return b(k-2*i(n))}}),A=d.extend({forward:function(e){return new p(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,n=this.c=2*y*t.options.datum.a;this._tm=f.transform().translate(.5,.5).scale(1/n,-1/n),this._itm=f.transform().scale(n,-n).translate(-.5,-.5)},toPoint:function(e,t,n){var i=this._proj.forward(e,n);return i.transform(this._tm).scale(t||1)},toLocation:function(e,t,n){return e=e.clone().scale(1/(t||1)).transform(this._itm),this._proj.inverse(e,n)}}),M=d.extend({init:function(){this._proj=new T},toPoint:function(e){return this._proj.forward(e)},toLocation:function(e){return this._proj.inverse(e)}}),R=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:M,EPSG3857:E,EPSG4326:R},datums:{WGS84:S},projections:{Equirectangular:A,Mercator:T,SphericalMercator:D}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/map/layers/base.min",["kendo.core.min","dataviz/map/location.min"],e)}(function(){!function(e,t){var n=e.proxy,i=window.kendo,o=i.Class,r=i.dataviz,s=i.deepExtend,a=r.map.Extent,l=i.drawing.util,c=l.defined,d=o.extend({init:function(t,i){this._initOptions(i),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=n(this._beforeReset,this),this._reset=n(this._reset,this),this._resize=n(this._resize,this),this._panEnd=n(this._panEnd,this),this._activate(),this._updateAttribution()},destroy:function(){this._deactivate()},show:function(){this.reset(),this._activate(),this._applyExtent(!0)},hide:function(){this._deactivate(),this._setVisibility(!1)},reset:function(){this._beforeReset(),this._reset()},_reset:function(){this._applyExtent()},_beforeReset:e.noop,_resize:e.noop,_panEnd:function(){this._applyExtent()},_applyExtent:function(){var e=this.options,t=this.map.zoom(),n=!c(e.minZoom)||t>=e.minZoom,i=!c(e.maxZoom)||t<=e.maxZoom,o=a.create(e.extent),r=!o||o.overlaps(this.map.extent());this._setVisibility(n&&i&&r)},_setVisibility:function(e){this.element.css("display",e?"":"none")},_activate:function(){var e=this.map;e.bind("beforeReset",this._beforeReset),e.bind("reset",this._reset),e.bind("resize",this._resize),e.bind("panEnd",this._panEnd)},_deactivate:function(){var e=this.map;e.unbind("beforeReset",this._beforeReset),e.unbind("reset",this._reset),e.unbind("resize",this._resize),e.unbind("panEnd",this._panEnd)},_updateAttribution:function(){var e=this.map.attribution;e&&e.add(this.options.attribution)}});s(r,{map:{layers:{Layer:d}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=e.proxy,i=window.kendo,o=i.Class,r=i.data.DataSource,s=i.dataviz,a=i.deepExtend,l=i.geometry,c=i.drawing,d=c.Group,u=c.util.last,h=c.util.defined,f=s.map,p=f.Location,m=f.layers.Layer,g=m.extend({init:function(e,t){this._pan=n(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 i.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=i.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=n(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,n,i;for(this._clearMarkers(),this._loader||(this._loader=new v(this.map,this.options.style,this)),t=new d,n=0;n<e.length;n++)i=this._loader.parse(e[n]),i&&t.append(i);this._root.clear(),this._root.append(t)},shapeCreated:function(e){var t,n=!1;return e instanceof c.Circle&&(n=h(this._createMarker(e))),n||(t={layer:this,shape:e},n=this.map.trigger("shapeCreated",t)),n},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(n){if(n.element){var i={layer:t,shape:n.element,originalEvent:n.originalEvent};t.map.trigger(e,i)}}},_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,n){this.observer=n,this.locator=e,this.style=t},parse:function(e){var t=new d,n=!0;return"Feature"===e.type?(n=!1,this._loadGeometryTo(t,e.geometry,e),this._featureCreated(t,e)):this._loadGeometryTo(t,e,e),n&&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,n){var i,o,r=t.coordinates;switch(t.type){case"LineString":o=this._loadPolygon(e,[r],n),this._setLineFill(o);break;case"MultiLineString":for(i=0;i<r.length;i++)o=this._loadPolygon(e,[r[i]],n),this._setLineFill(o);break;case"Polygon":this._loadPolygon(e,r,n);break;case"MultiPolygon":for(i=0;i<r.length;i++)this._loadPolygon(e,r[i],n);break;case"Point":this._loadPoint(e,r,n);break;case"MultiPoint":for(i=0;i<r.length;i++)this._loadPoint(e,r[i],n)}},_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,n){var i=this._buildPolygon(t);return i.dataItem=n,this._loadShape(e,i)},_buildPolygon:function(e){var t,n,i,o=e.length>1?c.MultiPath:c.Path,r=new o(this.style);for(t=0;t<e.length;t++)for(n=0;n<e[t].length;n++)i=this.locator.locationToView(p.fromLngLat(e[t][n])),0===n?r.moveTo(i.x,i.y):r.lineTo(i.x,i.y);return r},_loadPoint:function(e,t,n){var i=p.fromLngLat(t),o=this.locator.locationToView(i),r=new l.Circle(o,10),s=new c.Circle(r,this.style);return s.dataItem=n,s.location=i,this._loadShape(e,s)}});a(i.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,n){(n||t)()}),function(e,define){define("dataviz/map/layers/bubble.min",["dataviz/map/layers/shape.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.getter,o=n.dataviz,r=n.deepExtend,s=n.geometry,a=n.drawing,l=a.util,c=l.defined,d=o.map,u=d.Location,h=d.layers.ShapeLayer,f=h.extend({options:{autoBind:!0,locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle"},_load:function(e){var t,n,o,r,s,a,l,d,h,f,p;if(this.surface.clear(),0!==e.length)for(t=this.options,n=i(t.valueField),e=e.slice(0),e.sort(function(e,t){return n(t)-n(e)}),o=this._scaleType(),s=0;s<e.length;s++)a=e[s],l=i(t.locationField)(a),d=i(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),f=r.map(d),p=this._createSymbol({center:h,size:f,style:t.style,dataItem:a,location:l}),p.dataItem=a,p.location=l,p.value=d,this._drawSymbol(p))},_scaleType:function(){var e=this.options.scale;return n.isFunction(e)?e:o.map.scales[e]},_createSymbol:function(e){var t=this.options.symbol;return n.isFunction(t)||(t=o.map.symbols[t]),t(e)},_drawSymbol:function(e){var t={layer:this,shape:e},n=this.map.trigger("shapeCreated",t);n||this.surface.draw(e)}}),p=n.Class.extend({init:function(e,t){var n,i;this._domain=e,this._range=t,n=Math.sqrt(e[1])-Math.sqrt(e[0]),i=t[1]-t[0],this._ratio=i/n},map:function(e){var t=(Math.sqrt(e)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t}}),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),n=e.size/2,i=e.center;return t.moveTo(i.x-n,i.y-n).lineTo(i.x+n,i.y-n).lineTo(i.x+n,i.y+n).lineTo(i.x-n,i.y+n).close(),t}};r(o,{map:{layers:{bubble:f,BubbleLayer:f},scales:{sqrt:p},symbols:m}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(e){return new u(g(e.x),g(e.y))}var i=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,f=r.util,p=f.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 n=this._viewType();this._view=new n(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,n=t.extent(),i={nw:t.locationToLayer(n.nw).round(),se:t.locationToLayer(n.se).round()};e.center(t.locationToLayer(t.center())),e.extent(i),e.zoom(t.zoom())},_resize:function(){this._render()},_panEnd:function(e){h.fn._panEnd.call(this,e),this._render()},_render:function(){this._updateView(),this._view.render()}}),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(i.floor(e.x/this.options.tileSize),i.floor(e.y/this.options.tileSize))},tileCount:function(){var e=this.size(),t=this.pointToTileIndex(this._extent.nw),n=this._extent.nw,o=this.indexToPoint(t).translate(-n.x,-n.y);return{x:i.ceil((i.abs(o.x)+e.width)/this.options.tileSize),y:i.ceil((i.abs(o.y)+e.height)/this.options.tileSize)}},size:function(){var e=this._extent.nw,t=this._extent.se,n=t.clone().translate(-e.x,-e.y);return{width:n.x,height:n.y}},indexToPoint:function(e){var t=e.x,n=e.y;return new u(t*this.options.tileSize,n*this.options.tileSize)},subdomainText:function(){var e=this.options.subdomains;return e[this.subdomainIndex++%e.length]},destroy:function(){this.element.empty(),this.pool.empty()},reset:function(){this.pool.reset(),this.subdomainIndex=0,this.render()},render:function(){var e,t,n,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw);for(t=0;t<i.x;t++)for(n=0;n<i.y;n++)e=this.createTile({x:o.x+t,y:o.y+n}),e.visible||e.show()},createTile:function(e){var t=this.tileOptions(e),n=this.pool.get(this._center,t);return 0===n.element.parent().length&&this.element.append(n.element),n},tileOptions:function(e){var t=this.wrapIndex(e),i=this.indexToPoint(e),o=this._viewOrigin,r=i.clone().translate(-o.x,-o.y);return{index:t,currentIndex:e,point:i,offset:n(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},wrapIndex:function(e){var t=i.pow(2,this._zoom);return{x:this.wrapValue(e.x,t),y:v(e.y,0,t-1)}},wrapValue:function(e,t){var n=i.abs(e)%t;return e=e>=0?n:t-(0===n?t:n)}}),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;' />").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=p(this.options.offset.y),t.style.left=p(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,n,i=this._items,o=f.hashKey(""+e.point+(""+e.offset)+e.zoom+e.urlTemplate);for(n=0;n<i.length;n++)if(i[n].id===o){t=i[n];break}return t?t.show():(t=new w(o,e),this._items.push(t)),t},_remove:function(e){var t,n,i=this._items,o=-1,r=-1;for(t=0;t<i.length;t++)n=i[t].options.point.distanceTo(e),n>o&&!i[t].visible&&(r=t,o=n);r!==-1&&(i[r].destroy(),i.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,n){(n||t)()}),function(e,define){define("dataviz/map/layers/bing.min",["dataviz/map/layers/tile.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.dataviz,o=n.deepExtend,r=n.drawing.util.defined,s=i.map.Extent,a=i.map.Location,l=i.map.layers.TileLayer,c=i.map.layers.TileView,d=l.extend({init:function(t,n){this.options.baseUrl=this._scheme()+"://dev.virtualearth.net/REST/v1/Imagery/Metadata/",l.fn.init.call(this,t,n),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,n;e&&e.resourceSets.length&&(t=this.resource=e.resourceSets[0].resources[0],o(this._view.options,{urlTemplate:t.imageUrl.replace("{subdomain}","#= subdomain #").replace("{quadkey}","#= quadkey #").replace("{culture}","#= culture #"),subdomains:t.imageUrlSubdomains}),n=this.options,r(n.minZoom)||(n.minZoom=t.zoomMin),r(n.maxZoom)||(n.maxZoom=t.zoomMax),this._addAttribution(),"none"!==this.element.css("display")&&this._reset())},_viewType:function(){return u},_addAttribution:function(){var e,t,n,i,o,r=this.map.attribution;if(r&&(e=this.resource.imageryProviders))for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.coverageAreas.length;i++)o=n.coverageAreas[i],r.add({text:n.attribution,minZoom:o.zoomMin,maxZoom:o.zoomMax,extent:new s(new a(o.bbox[2],o.bbox[1]),new a(o.bbox[0],o.bbox[3]))})},imagerySet:function(e){return e?(this.options.imagerySet=e,this.map.attribution.clear(),this._fetchMetadata(),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,n,i,o="";for(i=this._zoom;i>0;i--)t=0,n=1<<i-1,0!==(e.x&n)&&t++,0!==(e.y&n)&&(t+=2),o+=t;return o}});o(i,{map:{layers:{bing:d,BingLayer:d,BingView:u}}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n=document,i=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,f=h.Location,p=h.layers.Layer,m=p.extend({init:function(e,t){p.fn.init.call(this,e,t),this._markerClick=r(this._markerClick,this),this.element.on("click",".k-marker",this._markerClick),this.items=[],this._initDataSource()},destroy:function(){p.fn.destroy.call(this),this.element.off("click",".k-marker",this._markerClick),this.dataSource.unbind("change",this._dataChange),this.clear()},options:{zIndex:1e3,autoBind:!0,dataSource:{},locationField:"location",titleField:"title"},add:function(t){if(!e.isArray(t))return this._addOne(t);for(var n=0;n<t.length;n++)this._addOne(t[n])},remove:function(e){e.destroy();var t=o(e,this.items);t>-1&&this.items.splice(t,1)},clear:function(){for(var e=0;e<this.items.length;e++)this.items[e].destroy();this.items=[]},update:function(e){var t,n=e.location();n&&(e.showAt(this.map.locationToView(n)),t={marker:e,layer:this},this.map.trigger("markerActivate",t))},_reset:function(){var e,t;for(p.fn._reset.call(this),e=this.items,t=0;t<e.length;t++)this.update(e[t])},bind:function(e,t){var n,i,o=h.Marker.create(e,this.options);if(o.dataItem=t,n={marker:o,layer:this},i=this.map.trigger("markerCreated",n),!i)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,n,i,o;for(this._data=e,this.clear(),t=s.getter(this.options.locationField),n=s.getter(this.options.titleField),i=0;i<e.length;i++)o=e[i],this.bind({location:t(o),title:n(o)},o)},_markerClick:function(t){var n={marker:e(t.target).data("kendoMarker"),layer:this};this.map.trigger("markerClick",n)}}),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=f.create(e).toArray(),this.layer&&this.layer.update(this),this):f.create(this.options.location)},showAt:function(e){this.render(),this.element.css({left:i.round(e.x),top:i.round(e.y)}),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},hide:function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},destroy:function(){this.layer=null,this.hide()},render:function(){var t,i;this.element||(t=this.options,i=this.layer,this.element=e(n.createElement("span")).addClass("k-marker k-marker-"+s.toHyphens(t.shape||"pin")).attr("title",t.title).attr(t.attributes||{}).data("kendoMarker",this).css("zIndex",t.zIndex),i&&i.element.append(this.element),this.renderTooltip())},renderTooltip:function(){var e,t,n=this,i=n.options.title,o=n.options.tooltip||{};o&&c&&(e=o.template,e&&(t=s.template(e),o.content=function(e){return e.location=n.location(),e.marker=n,t(e)}),(i||o.content||o.contentUrl)&&(this.tooltip=new c(this.element,o),this.tooltip.marker=this))}});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,n){(n||t)()}),function(e,define){define("dataviz/map/main.min",["dataviz/map/crs.min","dataviz/map/location.min"],e)}(function(){!function(e,t){var n=document,i=Math,o=i.min,r=i.pow,s=e.proxy,a=window.kendo,l=a.ui.Widget,c=a.deepExtend,d=a.dataviz,u=d.ui,h=a.geometry,f=h.Point,p=d.map,m=p.Extent,g=p.Location,v=p.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=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(n.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("click",s(this._click,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=i.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 n=!this.options.wraparound;return e=g.create(e),this.crs.toPoint(e,this._layerSize(t),n)},layerToLocation:function(e,t){var n=!this.options.wraparound;return e=f.create(e),this.crs.toLocation(e,this._layerSize(t),n)},locationToView:function(e){var t,n;return e=g.create(e),t=this.locationToLayer(this._viewOrigin),n=this.locationToLayer(e),n.translateWith(t.scale(-1))},viewToLocation:function(e,t){var n=this.locationToLayer(this._getOrigin(),t);return e=f.create(e),e=e.clone().translateWith(n),this.layerToLocation(e,t)},eventOffset:function(e){var t=this.element.offset(),n=e.originalEvent||e,i=x(n.pageX,n.clientX)-t.left,o=x(n.pageY,n.clientY)-t.top;return new h.Point(i,o)},eventToView:function(e){var t=this.eventOffset(e);return this.locationToView(this.viewToLocation(t))},eventToLayer:function(e){return this.locationToLayer(this.eventToLocation(e))},eventToLocation:function(e){var t=this.eventOffset(e);return this.viewToLocation(t)},viewSize:function(){var e=this.element,t=this._layerSize(),n=e.width();return this.options.wraparound||(n=o(t,n)),{width:n,height:o(t,e.height())}},exportVisual:function(){return this._reset(),!1},_setOrigin:function(e,t){var n,i=this.viewSize();return e=this._origin=g.create(e),n=this.locationToLayer(e,t),n.x+=i.width/2,n.y+=i.height/2,this.options.center=this.layerToLocation(n,t).toArray(),this},_getOrigin:function(e){var t,n=this.viewSize();return!e&&this._origin||(t=this.locationToLayer(this.center()),t.x-=n.width/2,t.y-=n.height/2,this._origin=this.layerToLocation(t)),this._origin},_setExtent:function(e){var t,n,o,r,s,a,l;for(e=m.create(e),this.center(e.center()),t=this.element.width(),n=this.element.height(),o=this.options.maxZoom;o>=this.options.minZoom&&(r=this.locationToLayer(e.nw,o),s=this.locationToLayer(e.se,o),a=i.abs(s.x-r.x),l=i.abs(s.y-r.y),!(a<=t&&l<=n));o--);this.zoom(o)},_getExtent:function(){var e,t=this._getOrigin(),n=this.locationToLayer(t),i=this.viewSize();return n.x+=i.width,n.y+=i.height,e=this.layerToLocation(n),new 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,n){var i=t.position||n,o="."+b(i).replace(" ","."),r=e(".k-map-controls"+o,this.element);return 0===r.length&&(r=e("<div>").addClass("k-map-controls "+b(i)).appendTo(this.element)),e("<div>").appendTo(r)},_createAttribution:function(e){var t=this._createControlElement(e,"bottomRight");this.attribution=new u.Attribution(t,e)},_createNavigator:function(e){var t=this._createControlElement(e,"topLeft"),n=this.navigator=new u.Navigator(t,e);this._navigatorPan=s(this._navigatorPan,this),n.bind("pan",this._navigatorPan),this._navigatorCenter=s(this._navigatorCenter,this),n.bind("center",this._navigatorCenter)},_navigatorPan:function(e){var t=this,n=t.scroller,i=n.scrollLeft+e.x,o=n.scrollTop-e.y,r=this._virtualSize,s=this.element.height(),a=this.element.width();i=k(i,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(-i,-o)},_navigatorCenter:function(){this.center(this.options.center)},_createZoomControl:function(e){var t=this._createControlElement(e,"topLeft"),n=this.zoomControl=new u.ZoomControl(t,e);this._zoomControlChange=s(this._zoomControlChange,this),n.bind("change",this._zoomControlChange)},_zoomControlChange:function(e){this.trigger("zoomStart",{originalEvent:e})||(this.zoom(this.zoom()+e.delta),this.trigger("zoomEnd",{originalEvent:e}))},_initScroller:function(){var e=a.support.mobileOS?T:S,t=this.options.zoomable!==!1,n=this.scroller=new a.mobile.ui.Scroller(this.element.children(0),{friction:e,velocityMultiplier:A,zoom:t,mousewheelScrolling:!1});n.bind("scroll",s(this._scroll,this)),n.bind("scrollEnd",s(this._scrollEnd,this)),n.userEvents.bind("gesturestart",s(this._scaleStart,this)),n.userEvents.bind("gestureend",s(this._scale,this)),this.scrollElement=n.scrollElement},_initLayers:function(){var e,t,n,i,o,r=this.options.layers,s=this.layers=[];for(e=0;e<r.length;e++)t=r[e],n=t.type||"shape",i=this.options.layerDefaults[n],o=d.map.layers[n],s.push(new o(this,c({},i,t)))},_initMarkers:function(){this.markers=new p.layers.MarkerLayer(this,this.options.markerDefaults),this.markers.add(this.options.markers)},_scroll:function(e){var t=this.locationToLayer(this._viewOrigin).round(),n=e.sender.movable,i=new h.Point(n.x,n.y).scale(-1).scale(1/n.scale);t.x+=i.x,t.y+=i.y,this._scrollOffset=i,this._setOrigin(this.layerToLocation(t)),this.trigger("pan",{originalEvent:e,origin:this._getOrigin(),center:this.center()})},_scrollEnd:function(e){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTS=new Date,this.trigger("panEnd",{originalEvent:e,origin:this._getOrigin(),center:this.center()}))},_panComplete:function(){return new Date-(this._panEndTS||0)>50},_scaleStart:function(e){if(this.trigger("zoomStart",{originalEvent:e})){var t=e.touches[1];t&&t.cancel()}},_scale:function(e){var t=this.scroller.movable.scale,n=this._scaleToZoom(t),i=new h.Point(e.center.x,e.center.y),o=this.viewToLocation(i,n),r=this.locationToLayer(o,n),s=r.translate(-i.x,-i.y);this._zoomAround(s,n),this.trigger("zoomEnd",{originalEvent:e})},_scaleToZoom:function(e){var t=this._layerSize()*e,n=t/this.options.minSize,o=i.log(n)/i.log(2);return i.round(o)},_reset:function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},_resetScroller:function(){var e,t,n,i,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},n={min:-d.y,max:l-d.y},this.options.wraparound&&(t.max=20*l,t.min=-t.max),this.options.pannable===!1&&(i=this.viewSize(),t.min=n.min=0,t.max=i.width,n.max=i.height),s.makeVirtual(),a.makeVirtual(),s.virtualSize(t.min,t.max),a.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},_renderLayers:function(){var e,t,n,i,o,r=this.options.layers,s=this.layers=[],a=this.scrollWrap;for(a.empty(),e=0;e<r.length;e++)t=r[e],n=t.type||"shape",i=this.options.layerDefaults[n],o=d.map.layers[n],s.push(new o(this,c({},i,t)))},_layerSize:function(e){return e=x(e,this.options.zoom),this.options.minSize*r(2,e)},_click:function(e){if(this._panComplete()){var t=this.eventOffset(e);this.trigger("click",{originalEvent:e,location:this.viewToLocation(t)})}},_mousewheel:function(e){var t,n,i,o,r,s,a,l;e.preventDefault(),t=d.mwDelta(e)>0?-1:1,n=this.options,i=this.zoom(),o=k(i+t,n.minZoom,n.maxZoom),n.zoomable!==!1&&o!==i&&(this.trigger("zoomStart",{originalEvent:e})||(r=this.eventOffset(e),s=this.viewToLocation(r),a=this.locationToLayer(s,o),l=a.translate(-r.x,-r.y),this._zoomAround(l,o),this.trigger("zoomEnd",{originalEvent:e})))}});d.ui.plugin(E)}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||t)()}),function(e,define){define("dataviz/diagram/utils.min",["kendo.core.min"],e)}(function(){!function(e,t){function n(e,n,i){function o(e){for(var t=1;e*t%1;)t*=10;return t}var r,s,a,l;if(t===e||t===n)return[];if(i&&u.sign(n-e)!=u.sign(i))throw"The sign of the increment should allow to reach the stop-value.";if(i=i||1,e=e||0,n=n||e,(n-e)/i===1/0)throw"Infinite range defined.";if(r=[],s=-1,l=o(Math.abs(i)),e*=l,n*=l,i*=l,e>n&&i>0&&(i=-i),i<0)for(;(a=e+i*++s)>=n;)r.push(a/l);else for(;(a=e+i*++s)<=n;)r.push(a/l);return r}function i(e,t){if(e==t)return 0;var n=t.x-e.x,i=e.y-t.y,o=Math.atan(n/i);return i>=0?n<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 n in t)e[n]=t[n]},initArray:function(e,t){var n,i=[];for(n=0;n<e;++n)i[n]=t;return i},serializePoints:function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push(n.x+";"+n.y);return i.join(";")},deserializePoints:function(e){var t,n=e.split(";"),i=[];if(n.length%2!==0)throw"Not an array of points.";for(t=0;t<n.length;t+=2)i.push(new a.Point(parseInt(n[t],10),parseInt(n[t+1],10)));return i},randomInteger:function(e,t){return parseInt(Math.floor(Math.random()*t)+e,10)},DFT:function(e,t){var n,i;if(t(e),e.childNodes)for(n=0;n<e.childNodes.length;n++)i=e.childNodes[n],this.DFT(i,t)},getMatrixAngle:function(e){return null===e||0===e.d?0:180*Math.atan2(e.b,e.d)/Math.PI},getMatrixScaling:function(e){var t=Math.sqrt(e.a*e.a+e.c*e.c),n=Math.sqrt(e.b*e.b+e.d*e.d);return[t,n]}}),u.sign=function(e){return e?e<0?-1:1:0},u.findAngle=function(e,t){return 180*i(e,t)/Math.PI},u.forEach=function(e,t,n){for(var i=0;i<e.length;i++)t.call(n,e[i],i,e)},u.any=function(e,t){for(var n=0;n<e.length;++n)if(t(e[n]))return e[n];return null},u.remove=function(e,t){for(var n;(n=u.indexOf(e,t))!==-1;)e.splice(n,1);return e},u.contains=function(e,t){return u.indexOf(e,t)!==-1},u.indexOf=function(t,n){return e.inArray(n,t)},u.fold=function(e,t,n,i){var o,r,s=arguments.length>2;for(o=0;o<e.length;o++)r=e[o],s?n=t.call(i,n,r,o,e):(n=r,s=!0);if(!s)throw"Reduce of empty array with no initial value";return n},u.find=function(e,t,n){var i;return u.any(e,function(e,o,r){return!!t.call(n,e,o,r)&&(i=e,!0)}),i},u.first=function(e,t,n){return 0===e.length?null:u.isUndefined(t)?e[0]:u.find(e,t,n)},u.insert=function(e,t,n){return e.splice(n,0,t),e},u.all=function(e,t,n){var i,o,r=!0;for(o=0;o<e.length&&(i=e[o],r=r&&t.call(n,i,o,e),r);o++);return r},u.clear=function(e){e.splice(0,e.length)},u.bisort=function(e,t,n){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 i,o=[];for(i=0;i<e.length;i++)o.push({x:e[i],y:t[i]});for(o.sort(u.isUndefined(n)?function(e,t){return e.x-t.x}:function(e,t){return n(e.x,t.x)}),u.clear(e),u.clear(t),i=0;i<o.length;i++)e.push(o[i].x),t.push(o[i].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(),n=t-this.lastTime;this.lastTime=t,e=n/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:n,Ticker:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/diagram/math.min",["dataviz/diagram/utils.min","kendo.dataviz.core.min"],e)}(function(){!function(e,t){function n(e){return Math.abs(e)<F}function i(e,t,i,o,r){var s,a,l,c,d=(t.x-e.x)*(o.y-i.y)-(t.y-e.y)*(o.x-i.x);if(!n(d)&&(s=(e.y-i.y)*(o.x-i.x)-(e.x-i.x)*(o.y-i.y),a=(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y),l=s/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 n,i,o;do n=2*Math.random()-1,i=2*Math.random()-1,o=n*n+i*i;while(!o||o>1);return e+t*n*Math.sqrt(-2*Math.log(o)/o)}function r(e){var t,n,i;for(D.isUndefined(e)&&(e=10),t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",i=e;i>0;--i)t+=n.charAt(Math.round(Math.random()*(n.length-1)));return t}var s,a,l,c,d,u,h,f,p,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,M=D.contains,R=e.map,I=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,n,i,o=1;if(e&&(o=180/Math.PI),t=Math.atan2(Math.abs(this.y),Math.abs(this.x)),n=Math.PI/2,i=this.length(),0===this.x){if(0===this.y)return new u(0,0);if(this.y>0)return new u(i,o*n);if(this.y<0)return new u(i,3*o*n)}else if(this.x>0){if(0===this.y)return new u(i,0);if(this.y>0)return new u(i,o*t);if(this.y<0)return new u(i,o*(4*n-t))}else{if(0===this.y)return new u(i,2*n);if(this.y>0)return new u(i,o*(2*n-t));if(this.y<0)return new u(i,o*(2*n+t))}},isOnLine:function(e,t){var n,i,o,r,s;return e.x>t.x&&(n=t,t=e,e=n),i=new a(e.x,e.y).inflate(I,I),o=new a(t.x,t.y).inflate(I,I),!!i.union(o).contains(this)&&(e.x===t.x||e.y===t.y||(e.y<t.y?(r=i.x+(o.x-i.x)*(this.y-(i.y+i.height))/(o.y+o.height-(i.y+i.height)),s=i.x+i.width+(o.x+o.width-(i.x+i.width))*(this.y-i.y)/(o.y-i.y)):(r=i.x+(o.x-i.x)*(this.y-i.y)/(o.y-i.y),s=i.x+i.width+(o.x+o.width-(i.x+i.width))*(this.y-(i.y+i.height))/(o.y+o.height-(i.y+i.height))),this.x>r&&this.x<s))}}),S(A,{parse:function(e){var t=e.slice(1,e.length-1),n=t.split(","),i=parseInt(n[0],10),o=parseInt(n[1],10);if(!isNaN(i)&&!isNaN(o))return new A(i,o)}}),s=C.extend({init:function(e,t,n){this.point=e,this.left=t,this.right=n}}),a=C.extend({init:function(e,t,n,i){this.x=e||0,this.y=t||0,this.width=n||0,this.height=i||0},contains:function(e){return e.x>=this.x&&e.x<=this.x+this.width&&e.y>=this.y&&e.y<=this.y+this.height},inflate:function(e,n){return n===t&&(n=e),this.x-=e,this.y-=n,this.width+=2*e+1,this.height+=2*n+1,this},offset:function(e,t){var n=e,i=t;return e instanceof A&&(n=e.x,i=e.y),this.x+=n,this.y+=i,this},union:function(e){var t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x+this.width,e.x+e.width),o=Math.max(this.y+this.height,e.y+e.height);return new a(t,n,i-t,o-n)},center:function(){return new A(this.x+this.width/2,this.y+this.height/2)},top:function(){return new A(this.x+this.width/2,this.y)},right:function(){return new A(this.x+this.width,this.y+this.height/2)},bottom:function(){return new A(this.x+this.width/2,this.y+this.height)},left:function(){return new A(this.x,this.y+this.height/2)},topLeft:function(){return new A(this.x,this.y)},topRight:function(){return new A(this.x+this.width,this.y)},bottomLeft:function(){return new A(this.x,this.y+this.height)},bottomRight:function(){return new A(this.x+this.width,this.y+this.height)},clone:function(){return new a(this.x,this.y,this.width,this.height)},isEmpty:function(){return!this.width&&!this.height},equals:function(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},rotatedBounds:function(e){var t=this.clone(),n=this.rotatedPoints(e),i=n[0],o=n[1],r=n[2],s=n[3];return t.x=Math.min(r.x,i.x,o.x,s.x),t.y=Math.min(r.y,i.y,o.y,s.y),t.width=Math.max(r.x,i.x,o.x,s.x)-t.x,t.height=Math.max(r.y,i.y,o.y,s.y)-t.y,t},rotatedPoints:function(e){var t=this,n=t.center(),i=t.bottomRight().rotate(n,360-e),o=t.topLeft().rotate(n,360-e),r=t.topRight().rotate(n,360-e),s=t.bottomLeft().rotate(n,360-e);return[o,r,i,s]},toString:function(e){return e=e||" ",this.x+e+this.y+e+this.width+e+this.height},scale:function(e,t,n,i,o){var r,s,a,l=this.topLeft(),c=this.center();l.rotate(c,360-o).rotate(i,o),r=n.minus(l),s=new A(r.x*e,r.y*t),a=r.minus(s),l=l.plus(a),l.rotate(i,360-o).rotate(c,o),this.x=l.x,this.y=l.y,this.width*=e,this.height*=t},zoom:function(e){return this.x*=e,this.y*=e,this.width*=e,this.height*=e,this},overlaps:function(e){var t=this.bottomRight(),n=e.bottomRight(),i=!(t.x<e.x||t.y<e.y||n.x<this.x||n.y<this.y);return i}}),l=C.extend({init:function(e,t){this.width=e,this.height=t}}),l.prototype.Empty=new l(0,0),a.toRect=function(e){return e instanceof a||(e=new a(e.x,e.y,e.width,e.height)),e},a.empty=function(){return new a(0,0,0,0)},a.fromPoints=function(e,t){if(isNaN(e.x)||isNaN(e.y)||isNaN(t.x)||isNaN(t.y))throw"Some values are NaN.";return new a(Math.min(e.x,t.x),Math.min(e.y,t.y),Math.abs(e.x-t.x),Math.abs(e.y-t.y))},c={lines:function(e,t,n,o){return i(e,t,n,o)},segments:function(e,t,n,o){return i(e,t,n,o,!0)},rectWithLine:function(e,t,n){return c.segments(t,n,e.topLeft(),e.topRight())||c.segments(t,n,e.topRight(),e.bottomRight())||c.segments(t,n,e.bottomLeft(),e.bottomRight())||c.segments(t,n,e.topLeft(),e.bottomLeft())},rects:function(e,t,n){var i,o,r=t.topLeft(),s=t.topRight(),a=t.bottomLeft(),l=t.bottomRight(),d=t.center();return n&&(r=r.rotate(d,n),s=s.rotate(d,n),a=a.rotate(d,n),l=l.rotate(d,n)),i=e.contains(r)||e.contains(s)||e.contains(a)||e.contains(l)||c.rectWithLine(e,r,s)||c.rectWithLine(e,r,a)||c.rectWithLine(e,s,l)||c.rectWithLine(e,a,l),i||(r=e.topLeft(),s=e.topRight(),a=e.bottomLeft(),l=e.bottomRight(),n&&(o=360-n,r=r.rotate(d,o),s=s.rotate(d,o),a=a.rotate(d,o),l=l.rotate(d,o)),i=t.contains(r)||t.contains(s)||t.contains(a)||t.contains(l)),i}},d=C.extend({init:function(e){this.container=a.toRect(e)},align:function(e,t){var n,i=t.toLowerCase().split(" ");for(n=0;n<i.length;n++)e=this._singleAlign(e,i[n]);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,n,i,o,r){this.a=e||0,this.b=t||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},plus:function(e){this.a+=e.a,this.b+=e.b,this.c+=e.c,this.d+=e.d,this.e+=e.e,this.f+=e.f},minus:function(e){this.a-=e.a,this.b-=e.b,this.c-=e.c,this.d-=e.d,this.e-=e.e,this.f-=e.f},times:function(e){return new 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 n=new h;return n.a=1,n.b=0,n.c=0,n.d=1,n.e=e,n.f=t,n},unit:function(){return new h(1,0,0,1,0,0)},rotation:function(e,t,n){var i=new h;return i.a=Math.cos(e*Math.PI/180),i.b=Math.sin(e*Math.PI/180),i.c=-i.b,i.d=i.a,i.e=t-t*i.a+n*i.b||0,i.f=n-n*i.a-t*i.b||0,i},scaling:function(e,t){var n=new h;return n.a=e,n.b=0,n.c=0,n.d=t,n.e=0,n.f=0,n},parse:function(e){var t,n;if(e){if(e=e.trim(),"matrix"===e.slice(0,6).toLowerCase()){if(n=e.slice(7,e.length-1).trim(),t=n.split(","),6===t.length)return h.fromList(R(t,function(e){return parseFloat(e)}));if(t=n.split(" "),6===t.length)return h.fromList(R(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(R(t,function(e){return parseFloat(e)}));if(e.indexOf(" ")>0&&(t=e.split(" "),6===t.length))return h.fromList(R(t,function(e){return parseFloat(e)}))}return t}}),f=C.extend({init:function(e,t,n,i,o,r){this.a=e||0,this.b=t||0,this.c=n||0,this.d=i||0,this.e=o||0,this.f=r||0},fromMatrix:function(e){var t=new f;return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t}}),p={_distanceToLineSquared:function(e,t,n){function i(e,t){return(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)}if(t===n)return i(e,t);var o=n.x-t.x,r=n.y-t.y,s=(e.x-t.x)*o+(e.y-t.y)*r;return s<0?i(t,e):(s=(n.x-e.x)*o+(n.y-e.y)*r,s<0?i(n,e):(s=(n.x-e.x)*r-(n.y-e.y)*o,s*s/(o*o+r*r)))},distanceToLine:function(e,t,n){return Math.sqrt(this._distanceToLineSquared(e,t,n))},distanceToPolyline:function(e,t){var n,i,o,r,s=Number.MAX_VALUE;if(D.isUndefined(t)||0===t.length)return Number.MAX_VALUE;for(n=0;n<t.length-1;n++)i=t[n],o=t[n+1],r=this._distanceToLineSquared(e,i,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 n=this._createGetBucket(e);return D.isDefined(t)&&(n.value=t),n},get:function(e){return this._bucketExists(e)?this._createGetBucket(e):null},set:function(e,t){this.add(e,t)},containsKey:function(e){return this._bucketExists(e)},remove:function(e){if(this._bucketExists(e)){var t=this._hash(e);return delete this._buckets[t],this.length--,e}},forEach:function(e){var t,n,i,o,r=this._hashes();for(t=0,n=r.length;t<n;t++)i=r[t],o=this._buckets[i],D.isUndefined(o)||e(o)},clone:function(){var e,t,n,i,o=new m,r=this._hashes();for(e=0,t=r.length;e<t;e++)n=r[e],i=this._buckets[n],D.isUndefined(i)||o.add(i.key,i.value);return o},_hashes:function(){var e,t=[];for(e in this._buckets)this._buckets.hasOwnProperty(e)&&t.push(e);return t},_bucketExists:function(e){var t=this._hash(e);return D.isDefined(this._buckets[t])},_createGetBucket:function(e){var t=this._hash(e),n=this._buckets[t];return D.isUndefined(n)&&(n={key:e},this._buckets[t]=n,this.length++),n},_hash:function(e){if(D.isNumber(e))return e;if(D.isString(e))return this._hashString(e);if(D.isObject(e))return this._objectHashId(e);throw"Unsupported key type."},_hashString:function(e){var t,n,i=0;if(0===e.length)return i;for(t=0;t<e.length;t++)n=e.charCodeAt(t),i=32*i-i+n;return i},_objectHashId:function(e){var t=e._hashId;return D.isUndefined(t)&&(t=r(),e._hashId=t),t}}),g=k.Observable.extend({init:function(t){var n,i=this;if(k.Observable.fn.init.call(i),this._hashTable=new m,this.length=0,D.isDefined(t))if(e.isArray(t))for(n=0;n<t.length;n++)this.add(t[n]);else t.forEach(function(e,t){this.add(e,t)},this)},add:function(e,t){var n=this._hashTable.get(e);n||(n=this._hashTable.add(e),this.length++,this.trigger("changed")),n.value=t},set:function(e,t){this.add(e,t)},get:function(e){var t=this._hashTable.get(e);if(t)return t.value;throw Error("Cannot find key "+e)},containsKey:function(e){return this._hashTable.containsKey(e)},remove:function(e){if(this.containsKey(e))return this.trigger("changed"),this.length--,this._hashTable.remove(e)},forEach:function(e,t){this._hashTable.forEach(function(n){e.call(t,n.key,n.value)})},forEachValue:function(e,t){this._hashTable.forEach(function(n){e.call(t,n.value)})},forEachKey:function(e,t){this._hashTable.forEach(function(n){e.call(t,n.key)})},keys:function(){var e=[];return this.forEachKey(function(t){e.push(t)}),e}}),v=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 n=t.bounds();this.width=n.width,this.height=n.height,this.x=n.x,this.y=n.y}else this.associatedShape=null;this.data=null,this.type="Node",this.shortForm="Node '"+this.id+"'",this.isVirtual=!1},isIsolated:function(){return D.isEmpty(this.links)},bounds:function(e){return D.isDefined(e)?(this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,t):new x.Rect(this.x,this.y,this.width,this.height)},isLinkedTo:function(e){var t=this;return D.any(t.links,function(n){return n.getComplement(t)===e})},getChildren:function(){var e,t,n,i;if(0===this.outgoing.length)return[];for(e=[],t=0,n=this.outgoing.length;t<n;t++)i=this.outgoing[t],e.push(i.getComplement(this));return e},getParents:function(){var e,t,n,i;if(0===this.incoming.length)return[];for(e=[],t=0,n=this.incoming.length;t<n;t++)i=this.incoming[t],e.push(i.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 M(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,n,i){if(D.isUndefined(e))throw"The source of the new link is not set.";if(D.isUndefined(t))throw"The target of the new link is not set.";var o,s;o=D.isString(e)?new 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(n)?n:r(),this.associatedConnection=D.isDefined(i)?i:null,this.type="Link",this.shortForm="Link '"+this.source.id+"->"+this.target.id+"'"},getComplement:function(e){if(this.source!==e&&this.target!==e)throw"The given node is not incident with this link.";return this.source===e?this.target:this.source},getCommonNode:function(e){return this.source===e.source||this.source===e.target?this.source:this.target===e.source||this.target===e.target?this.target:null},isBridging:function(e,t){return this.source===e&&this.target===t||this.source===t&&this.target===e},getNodes:function(){return[this.source,this.target]},incidentWith:function(e){return this.source===e||this.target===e},adjacentTo:function(e){return M(this.source.links,e)||M(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,n,i;if(D.isUndefined(e)&&(e=!1),!this._hasCachedRelationships||e){for(t=0,n=this.nodes.length;t<n;t++)i=this.nodes[t],i.children=this.getChildren(i),i.parents=this.getParents(i);this._hasCachedRelationships=!0}},assignLevels:function(e,t,n){var i,o,r,s;if(!e)throw"Start node not specified.";for(D.isUndefined(t)&&(t=0),this.cacheRelationships(),D.isUndefined(n)&&(n=new g,D.forEach(this.nodes,function(e){n.add(e,!1)})),n.set(e,!0),e.level=t,i=e.children,o=0,r=i.length;o<r;o++)s=i[o],s&&!n.get(s)&&this.assignLevels(s,t+1,n)},root:function(e){if(D.isUndefined(e)){if(this._root)return this._root;var t=D.first(this.nodes,function(e){return 0===e.incoming.length});return t?t:D.first(this.nodes)}this._root=e},getConnectedComponents:function(){var e,t,n,i,o;for(this.componentIndex=0,this.setItemIndices(),e=D.initArray(this.nodes.length,-1),t=0;t<this.nodes.length;t++)e[t]===-1&&(this._collectConnectedNodes(e,t),this.componentIndex++);for(n=[],i=0;i<this.componentIndex;++i)n[i]=new y;for(i=0;i<e.length;++i)o=n[e[i]],o.addNodeAndOutgoings(this.nodes[i]);return n.sort(function(e,t){return t.nodes.length-e.nodes.length}),n},_collectConnectedNodes:function(e,t){e[t]=this.componentIndex;var n=this.nodes[t];D.forEach(n.links,function(t){var i=t.getComplement(n),o=i.index;e[o]===-1&&this._collectConnectedNodes(e,o)},this)},calcBounds:function(){var e,t,n,i;if(this.isEmpty())return this.bounds=new a;for(e=null,t=0,n=this.nodes.length;t<n;t++)i=this.nodes[t],e=e?e.union(i.bounds()):i.bounds();return this.bounds=e},getSpanningTree:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,f=new y,p=new g;for(f.root=e.clone(),f.root.level=0,f.root.id=e.id,p.add(e,f.root),e.level=0,i=[],o=[],f._addNode(f.root),i.push(e),o.push(e),r=1;o.length>0;)for(s=o.pop(),a=0;a<s.links.length;a++)l=s.links[a],c=l.getComplement(s),M(i,c)||(c.level=s.level+1,r<c.level+1&&(r=c.level+1),M(o,c)||o.push(c),M(i,c)||i.push(c),p.containsKey(s)?t=p.get(s):(t=s.clone(),t.level=s.level,t.id=s.id,p.add(s,t)),p.containsKey(c)?n=p.get(c):(n=c.clone(),n.level=c.level,n.id=c.id,p.add(c,n)),d=new w(t,n),f.addLink(d));for(u=[],h=0;h<r;h++)u.push([]);return D.forEach(f.nodes,function(e){u[e.level].push(e)}),f.treeLevels=u,f.cacheRelationships(),f},takeRandomNode:function(t,n){if(D.isUndefined(t)&&(t=[]),D.isUndefined(n)&&(n=4),0===this.nodes.length)return null;if(1===this.nodes.length)return M(t,this.nodes[0])?null:this.nodes[0];var i=e.grep(this.nodes,function(e){return!M(t,e)&&e.degree()<=n});return D.isEmpty(i)?null:i[D.randomInteger(0,i.length)]},isEmpty:function(){return D.isEmpty(this.nodes)},isHealthy:function(){return D.all(this.links,function(e){return M(this.nodes,e.source)&&M(this.nodes,e.target)},this)},getParents:function(e){if(!this.hasNode(e))throw"The given node is not part of this graph.";return e.getParents()},getChildren:function(e){if(!this.hasNode(e))throw"The given node is not part of this graph.";return e.getChildren()},addLink:function(e,n,i){var o,r,s;if(D.isUndefined(e))throw"The source of the link is not defined.";if(D.isUndefined(n)){if(D.isDefined(e.type)&&"Link"===e.type)return this.addExistingLink(e),t;throw"The target of the link is not defined."}return o=this.getNode(e),D.isUndefined(o)&&(o=this.addNode(e)),r=this.getNode(n),D.isUndefined(r)&&(r=this.addNode(n)),s=new w(o,r),D.isDefined(i)&&(s.owner=i),this.links.push(s),s},removeAllLinks:function(){for(;this.links.length>0;){var e=this.links[0];this.removeLink(e)}},addExistingLink:function(e){var t,n;this.hasLink(e)||(this.links.push(e),this.hasNode(e.source.id)?(t=this.getNode(e.source.id),e.changeSource(t)):this.addNode(e.source),this.hasNode(e.target.id)?(n=this.getNode(e.target.id),e.changeTarget(n)):this.addNode(e.target))},hasLink:function(e){if(D.isString(e))return D.any(this.links,function(t){return t.id===e});if("Link"===e.type)return M(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,n,i,o,r=e;if(D.isString(e)&&(r=this.getNode(e)),!D.isDefined(r))throw"The identifier should be a Node or the Id (string) of a node.";for(t=r.links,r.links=[],n=0,i=t.length;n<i;n++)o=t[n],this.removeLink(o);this._removeNode(r)},areConnected:function(e,t){return D.any(this.links,function(n){return n.source==e&&n.target==t||n.source==t&&n.target==e})},removeLink:function(e){D.remove(this.links,e),D.remove(e.source.outgoing,e),D.remove(e.source.links,e),D.remove(e.target.incoming,e),D.remove(e.target.links,e)},addNode:function(e,t,n){var i=null;if(!D.isDefined(e))throw"No Node or identifier for a new Node is given.";if(D.isString(e)){if(this.hasNode(e))return this.getNode(e);i=new b(e)}else{if(this.hasNode(e))return this.getNode(e);i=e}return D.isDefined(t)&&i.bounds(t),D.isDefined(n)&&(i.owner=n),this._addNode(i),i},addNodeAndOutgoings:function(e){this.hasNode(e)||this._addNode(e);var t=e.outgoing;e.outgoing=[],D.forEach(t,function(e){this.addExistingLink(e)},this)},setItemIndices:function(){var e;for(e=0;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,n=new y,i=D.isDefined(e)&&e===!0;return i&&(n.nodeMap=new g,n.linkMap=new g),t=new g,D.forEach(this.nodes,function(e){var o=e.clone();t.set(e,o),n._addNode(o),i&&n.nodeMap.set(o,e)}),D.forEach(this.links,function(e){if(t.containsKey(e.source)&&t.containsKey(e.target)){var o=n.addLink(t.get(e.source),t.get(e.target));i&&n.linkMap.set(o,e)}}),n},linearize:function(e){return y.Utils.linearize(this,e)},depthFirstTraversal:function(e,t){var n,i;if(D.isUndefined(e))throw"You need to supply a starting node.";if(D.isUndefined(t))throw"You need to supply an action.";if(!this.hasNode(e))throw"The given start-node is not part of this graph";n=this.getNode(e),i=[],this._dftIterator(n,t,i)},_dftIterator:function(e,t,n){var i,o,r,s;for(t(e),n.push(e),i=e.getChildren(),o=0,r=i.length;o<r;o++)s=i[o],M(n,s)||this._dftIterator(s,t,n)},breadthFirstTraversal:function(e,t){var n,i,o,r,s,a,l,c;if(D.isUndefined(e))throw"You need to supply a starting node.";if(D.isUndefined(t))throw"You need to supply an action.";if(!this.hasNode(e))throw"The given start-node is not part of this graph";for(n=this.getNode(e),i=new v,o=[],i.enqueue(n);i.length>0;)for(r=i.dequeue(),t(r),o.push(r),s=r.getChildren(),a=0,l=s.length;a<l;a++)c=s[a],M(o,c)||M(i,c)||i.enqueue(c)},_stronglyConnectedComponents:function(e,t,n,i,o,r,s){var a,l,c,d,u;for(n.add(t,s),i.add(t,s),s++,r.push(t),a=t.getChildren(),c=0,d=a.length;c<d;c++)l=a[c],n.containsKey(l)?M(r,l)&&i.add(t,Math.min(i.get(t),n.get(l))):(this._stronglyConnectedComponents(e,l,n,i,o,r,s),i.add(t,Math.min(i.get(t),i.get(l))));if(i.get(t)===n.get(t)){u=[];do l=r.pop(),u.push(l);while(l!==t);(!e||u.length>1)&&o.push(u)}},findCycles:function(e){var t,n,i,o,r,s,a;for(D.isUndefined(e)&&(e=!0),t=new g,n=new g,i=[],o=[],r=0,s=this.nodes.length;r<s;r++)a=this.nodes[r],t.containsKey(a)||this._stronglyConnectedComponents(e,a,t,n,i,o,0);return i},isAcyclic:function(){return D.isEmpty(this.findCycles())},isSubGraph:function(e){var t=e.linearize(),n=this.linearize();return D.all(t,function(e){return M(n,e)})},makeAcyclic:function(){var e,t,n,i,o,r,s,a,l,c,d,u,h,f,p,m,v,_,b,w,y,k,x,C,S,T,A,E,M,R,I,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],n=t.source,i=0,o=this.links.length;i<o;i++)r=this.links[i],r.source!=n&&(s=r.reverse(),e.push(s));return e}for(a=this.clone(!0),l=this.nodes.length,c=new 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 n=d(e,l);t.containsKey(n)||t.set(n,[]),t.get(n).push(e)},D.forEach(a.nodes,function(e){u(e,c)}),h=[],f=[];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],p=w.getComplement(m),v=d(p,l),D.remove(c.get(v),p),p.removeLink(w),u(p,c);a._removeNode(m),f.unshift(m)}if(c.containsKey(l-2))for(y=c.get(l-2);y.length>0;){for(p=y.pop(),k=0;k<p.links.length;k++)x=p.links[k],m=x.getComplement(p),v=d(m,l),D.remove(c.get(v),m),m.removeLink(x),u(m,c);h.push(p),a._removeNode(p)}if(a.nodes.length>0)for(C=l-3;C>2-l;C--)if(c.containsKey(C)&&c.get(C).length>0){for(S=c.get(C),T=S.pop(),A=0;A<T.links.length;A++)E=T.links[A],M=E.getComplement(T),v=d(M,l),D.remove(c.get(v),M),M.removeLink(E),u(M,c);h.push(T),a._removeNode(T);break}}for(h=h.concat(f),R=new g,I=0;I<this.nodes.length;I++)R.set(a.nodeMap.get(h[I]),I);return F=[],D.forEach(this.links,function(e){R.get(e.source)>R.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,n){return y.Utils.createBalancedForest(e,t,n)},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 n,i,o,r,s,a=new x.Graph;if(e<=0&&t<=0)return a;for(n=0;n<e+1;n++)for(i=null,o=0;o<t+1;o++)r=new b(""+n+"."+o),a.addNode(r),i&&a.addLink(i,r),n>0&&(s=a.getNode(""+(n-1)+"."+o),a.addLink(s,r)),i=r;return a}},y.Utils={parse:function(e){var t,n,i,o,r,s=new x.Graph,a=e.slice();for(n=0,i=a.length;n<i;n++){if(o=a[n],D.isString(o)){if(o.indexOf("->")<0)throw"The link should be specified as 'a->b'.";if(r=o.split("->"),2!=r.length)throw"The link should be specified as 'a->b'.";t=new w(r[0],r[1]),s.addLink(t)}if(D.isObject(o)){if(!t)throw"Specification found before Link definition.";k.deepExtend(t,o)}}return s},linearize:function(e,t){var n,i,o,r;if(D.isUndefined(e))throw"Expected an instance of a Graph object in slot one.";for(D.isUndefined(t)&&(t=!1),n=[],i=0,o=e.links.length;i<o;i++)r=e.links[i],n.push(r.source.id+"->"+r.target.id),t&&n.push({id:r.id});return n},_addShape:function(e,t,n,i){return D.isUndefined(t)&&(t=new x.Point(0,0)),D.isUndefined(n)&&(n=r()),i=k.deepExtend({width:20,height:20,id:n,radius:10,fill:"#778899",data:"circle",undoable:!1,x:t.x,y:t.y},i),e.addShape(i)},_addConnection:function(e,t,n,i){return e.connect(t,n,i)},createDiagramFromGraph:function(e,t,n,i){var o,r,s,l,c,d,u,h,f,p,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(n)&&(n=!0),D.isUndefined(i)&&(i=!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))),f={},"0"===l.id||i&&k.deepExtend(f,{width:150*Math.random()+20,height:80*Math.random()+50,data:"rectangle",fill:{color:"#778899"}}),c=this._addShape(e,h,l.id,f),p=c.bounds(),D.isDefined(p)&&(l.x=p.x,l.y=p.y,l.width=p.width,l.height=p.height),s[l.id]=c;for(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(n)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 n,i,o,r,s,a,l,c,d,u;if(D.isUndefined(e)&&(e=3),D.isUndefined(t)&&(t=3),n=new x.Graph,i=-1,o=[],e<=0||t<=0)return n;for(s=new b(""+ ++i),n.addNode(s),n.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(""+ ++i),n.addLink(c,u),r.push(u);o=r}return n},createBalancedForest:function(e,t,n){var i,o,r,s,a,l,c,d,u,h,f;if(D.isUndefined(e)&&(e=3),D.isUndefined(t)&&(t=3),D.isUndefined(n)&&(n=5),i=new x.Graph,o=-1,r=[],e<=0||t<=0||n<=0)return i;for(a=0;a<n;a++)for(l=new b(""+ ++o),i.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++)f=new b(""+ ++o),i.addLink(u,f),s.push(f);r=s}return i},createRandomConnectedGraph:function(e,t,n){var i,o,r,s,a,l,c,d,u,h;if(D.isUndefined(e)&&(e=40),D.isUndefined(t)&&(t=4),D.isUndefined(n)&&(n=!1),i=new x.Graph,o=-1,e<=0)return i;if(r=new b(""+ ++o),i.addNode(r),1===e)return i;if(e>1){for(s=1;s<e&&(a=i.takeRandomNode([],t),a);s++)l=i.addNode(""+s),i.addLink(a,l);if(!n&&e>1)for(c=D.randomInteger(1,e),d=0;d<c;d++)u=i.takeRandomNode([],t),h=i.takeRandomNode([],t),u&&h&&!i.areConnected(u,h)&&i.addLink(u,h);return i}},randomDiagram:function(e,t,n,i,o){var r=k.dataviz.diagram.Graph.Utils.createRandomConnectedGraph(t,n,i);y.Utils.createDiagramFromGraph(e,r,!1,o)}},k.deepExtend(x,{init:function(e){k.init(e,x.ui)},Point:A,Intersect:c,Geometry:p,Rect:a,Size:l,RectAlign:d,Matrix:h,MatrixVector:f,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,n){(n||t)()}),function(e,define){define("dataviz/diagram/svg.min",["kendo.drawing.min","dataviz/diagram/math.min"],e)}(function(){!function(e,t){function n(e,t){var n,i,o,r=this.options,s=!1;for(o=0;o<t.length;o++)i=t[o],n=e[i],H(n)&&r[i]!==n&&(r[i]=n,s=!0);return s}function i(e){return{x:e.x||0,y:e.y||0,width:e.width||0,height:e.height||0}}function o(e){if(e){var t=e;return N(t)&&(t={color:t}),t.color&&(t.color=r(t.color)),t}}function r(e){var t;return t=e!=q?new U.Color(e).toHex():e}function s(e,t){var n=t.x-e.x,i=t.y-e.y,o=U.util.deg(Math.atan2(i,n));return o}function a(e,t){return new U.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,f,p,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,M=window.kendo,R=M.dataviz.diagram,I=M.Class,F=M.deepExtend,z=R.Point,P=R.Rect,B=R.Matrix,L=R.Utils,H=L.isNumber,N=L.isString,O=R.MatrixVector,V=M.geometry,U=M.drawing,W=U.util.defined,j=e.inArray,q="transparent",G={none:"none",arrowStart:"ArrowStart",filledCircle:"FilledCircle",arrowEnd:"ArrowEnd"},$=360,Y="start",K="end",Q="width",X="height",Z="x",J="y";R.Markers=G,c=I.extend({init:function(e,t){this.x=e,this.y=t},toMatrix:function(){return B.scaling(this.x,this.y)},toString:function(){return M.format("scale({0},{1})",this.x,this.y)},invert:function(){return new c(1/this.x,1/this.y)}}),d=I.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 M.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=I.extend({init:function(e,t,n){this.x=t||0,this.y=n||0,this.angle=e},toString:function(){return this.x&&this.y?M.format("rotate({0},{1},{2})",this.angle,this.x,this.y):M.format("rotate({0})",this.angle)},toMatrix:function(){return B.rotation(this.angle,this.x,this.y)},center:function(){return new z(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(","),n=t[0],i=t[1],o=t[2],r=new u(n,i,o);return r},h=I.extend({init:function(e,n,i,o,r,s){this.translate=new d(e,n),i!==t&&o!==t&&(this.scale=new c(i,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,n,i=this.rotate?this.rotate.invert():t,o=i?i.toMatrix():B.unit(),r=this.scale?this.scale.invert():t,s=r?r.toMatrix():B.unit(),a=new z((-this.translate.x),(-this.translate.y));return a=o.times(s).apply(a),e=new d(a.x,a.y),n=new h,n.translate=e,n.rotate=i,n.scale=r,n}}),f={_setScale:function(){var e=this.options,t=this._originWidth,n=this._originHeight,i=e.width/t,o=e.height/n;H(i)||(i=1),H(o)||(o=1),this._transform.scale=new c(i,o)},_setTranslate:function(){var e=this.options,t=e.x||0,n=e.y||0;this._transform.translate=new d(t,n)},_initSize:function(){var e=this.options,t=!1;e.autoSize!==!1&&(W(e.width)||W(e.height))&&(this._measure(!0),this._setScale(),t=!0),(W(e.x)||W(e.y))&&(this._setTranslate(),t=!0),t&&this._renderTransform()},_updateSize:function(e){var t=!1;return this.options.autoSize!==!1&&this._diffNumericOptions(e,[Q,X])&&(t=!0,this._measure(!0),this._setScale()),this._diffNumericOptions(e,[Z,J])&&(t=!0,this._setTranslate()),t&&this._renderTransform(),t}},p=I.extend({init:function(e){var t=this;t.options=F({},t.options,e),t.id=t.options.id,t._originSize=P.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,n){var i=this.options;return W(e)?(W(n)?(i.x=e,i.y=n):e instanceof z&&(i.x=e.x,i.y=e.y),this._transform.translate=new d(i.x,i.y),this._renderTransform(),t):new z(i.x,i.y)},rotate:function(e,t){return W(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:n,_measure:function(e){var t,n,i;return!this._measured||e?(n=this._boundingBox()||new V.Rect,i=n.topLeft(),t=new P(i.x,i.y,n.width(),n.height()),this._originSize=t,this._originWidth=t.width,this._originHeight=t.height,this._measured=!0):t=this._originSize,t},_boundingBox:function(){return this.drawingElement.rawBBox()}}),m=p.extend({init:function(e){p.fn.init.call(this,e),e=this.options,e.fill=o(e.fill),e.stroke=o(e.stroke)},options:{stroke:{color:"gray",width:1},fill:{color:q}},fill:function(e,t){this._fill({color:r(e),opacity:t})},stroke:function(e,t,n){this._stroke({color:r(e),width:t,opacity:n})},redraw:function(e){var t,n;e&&(t=e.stroke,n=e.fill,t&&this._stroke(o(t)),n&&this._fill(o(n)),p.fn.redraw.call(this,e))},_hover:function(e){var t,n=this.drawingElement,i=this.options,r=i.hover;r&&r.fill&&(t=e?o(r.fill):i.fill,n.fill(t.color,t.opacity))},_stroke:function(e){var t,n=this.options;F(n,{stroke:e}),e=n.stroke,t=null,e.width>0&&(t={color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}),this.drawingElement.options.set("stroke",t)},_fill:function(e){var t,n,i,o=this.options;F(o,{fill:e||{}}),t=o.fill,t.gradient?(n=t.gradient,i="radial"===n.type?U.RadialGradient:U.LinearGradient,this.drawingElement.fill(new i(n))):this.drawingElement.fill(t.color,t.opacity)}}),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 U.Text(W(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&&W(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,n;e&&(t=!1,n=this.options,e=this._textColor(e),m.fn.redraw.call(this,e),(e.fontFamily||W(e.fontSize)||e.fontStyle||e.fontWeight)&&(F(n,{fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight}),this._font(),this.drawingElement.options.set("font",n.font),t=!0),e.text&&(this.content(e.text),t=!0),!this._updateSize(e)&&t&&this._initSize())}}),F(g.fn,f),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,n=e.y;(W(t)||W(n))&&this.position(t||0,n||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 U.Path({stroke:e.stroke,closed:!0}),this._fill(),this._drawPath()},_drawPath:function(){var e=this.drawingElement,t=i(this.options),n=t.width,o=t.height;e.segments.elements([a(0,0),a(n,0),a(n,o),a(0,o)])}}),_=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:q,width:0},fill:{color:"black"}},_transformToPath:function(e,t){var n=t.transform();return e&&n&&(e=e.transformCopy(n)),e},redraw:function(e){e&&(e.position&&(this.options.position=e.position),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 U.Circle(new V.Circle(this.anchor,e.radius),{fill:e.fill,stroke:e.stroke})},positionMarker:function(e){var t,n,i=this.options,o=i.position,r=e.segments;t=o==Y?r[0]:r[r.length-1],t&&(n=this._transformToPath(t.anchor(),e),this.drawingElement.transform(V.transform().translate(n.x,n.y)))}}),w=_.extend({options:{path:"M 0 0 L 10 5 L 0 10 L 3 5 z",anchor:{x:10,y:5}},createElement:function(){var e=this.options;this.drawingElement=U.Path.parse(e.path,{fill:e.fill,stroke:e.stroke})},positionMarker:function(e){var t,n,i=this._linePoints(e),o=i.start,r=i.end,a=V.transform();o&&a.rotate(s(o,r),r),r&&(t=this.anchor,n=r.clone().translate(-t.x,-t.y),a.translate(n.x,n.y)),this.drawingElement.transform(a)},_linePoints:function(e){var t,n,i,o,r,s=this.options,a=e.segments;if(s.position==Y?(i=a[0],i&&(n=i.anchor(),t=i.controlOut(),o=a[1],!t&&o&&(t=o.anchor()))):(i=a[a.length-1],i&&(n=i.anchor(),t=i.controlIn(),r=a[a.length-2],!t&&r&&(t=r.anchor()))),n)return{start:this._transformToPath(t,e),end:this._transformToPath(n,e)}}}),y={_getPath:function(e){var t=this.drawingElement;if(t instanceof U.MultiPath&&(t=e==Y?t.paths[0]:t.paths[t.paths.length-1]),t&&t.segments.length)return t},_normalizeMarkerOptions:function(e){var t=e.startCap,n=e.endCap;N(t)&&(e.startCap={type:t}),N(n)&&(e.endCap={type:n})},_removeMarker:function(e){var t=this._markers[e];t&&(this.drawingContainer().remove(t.drawingElement),delete this._markers[e])},_createMarkers:function(){var e=this.options;this._normalizeMarkerOptions(e),this._markers={},this._markers[Y]=this._createMarker(e.startCap,Y),this._markers[K]=this._createMarker(e.endCap,K)},_createMarker:function(e,n){var i,o,r=(e||{}).type,s=this._getPath(n);return s?(r==G.filledCircle?i=b:r==G.arrowStart||r==G.arrowEnd?i=w:this._removeMarker(n),i?(o=new i(F({},e,{position:n})),o.positionMarker(s),this.drawingContainer().append(o.drawingElement),o):t):(this._removeMarker(n),t)},_positionMarker:function(e){var t,n=this._markers[e];n&&(t=this._getPath(e),t?n.positionMarker(t):this._removeMarker(e))},_capMap:{start:"startCap",end:"endCap"},_redrawMarker:function(e,t,n){var i,o,r,s,a;return this._normalizeMarkerOptions(n),i=this.options,o=this._capMap[t],r=(i[o]||{}).type,s=n[o],a=!1,s?(i[o]=F({},i[o],s),s.type&&r!=s.type?(this._removeMarker(t),this._markers[t]=this._createMarker(i[o],t),a=!0):this._markers[t]&&this._markers[t].redraw(s)):e&&!this._markers[t]&&i[o]&&(this._markers[t]=this._createMarker(i[o],t),a=!0),a},_redrawMarkers:function(e,t){!this._redrawMarker(e,Y,t)&&e&&this._positionMarker(Y),!this._redrawMarker(e,K,t)&&e&&this._positionMarker(K)}},k=m.extend({init:function(e){m.fn.init.call(this,e),this.container=new U.Group,this._createElements(),this._initSize()},options:{autoSize:!0},drawingContainer:function(){return this.container},data:function(e){var n=this.options;return e?(n.data!=e&&(n.data=e,this._setData(e),this._initSize(),this._redrawMarkers(!0,{})),t):n.data},redraw:function(e){var t,n;e&&(m.fn.redraw.call(this,e),t=this.options,n=e.data,W(n)&&t.data!=n?(t.data=n,this._setData(n),this._updateSize(e)||this._initSize(),this._redrawMarkers(!0,e)):(this._updateSize(e),this._redrawMarkers(!1,e)))},_createElements:function(){var e=this.options;this.drawingElement=U.Path.parse(e.data||"",{stroke:e.stroke}),this._fill(),this.container.append(this.drawingElement),this._createMarkers()},_setData:function(e){var t=this.drawingElement,n=U.Path.parse(e||""),i=n.paths.slice(0);n.paths.elements([]),t.paths.elements(i)}}),F(k.fn,f),F(k.fn,y),x=m.extend({init:function(e){m.fn.init.call(this,e),this.container=new U.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},redraw:function(e){var t,n;e&&(e=e||{},t=e.from,n=e.to,t&&(this.options.from=t),n&&(this.options.to=n),t||n?(this._drawPath(),this._redrawMarkers(!0,e)):this._redrawMarkers(!1,e),m.fn.redraw.call(this,e))},_initPath:function(){var e=this.options,t=this.drawingElement=new U.Path({stroke:e.stroke});this._fill(),this._drawPath(),this.container.append(t)},_drawPath:function(){var e=this.options,t=this.drawingElement,n=e.from||new z,i=e.to||new z;t.segments.elements([a(n.x,n.y),a(i.x,i.y)])}}),F(x.fn,y),C=m.extend({init:function(e){m.fn.init.call(this,e),this.container=new U.Group,this._initPath(),this._createMarkers()},drawingContainer:function(){return this.container},points:function(e){var n=this.options;return e?(n.points=e,this._updatePath(),t):n.points},redraw:function(e){if(e){var t=e.points;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 U.Path({stroke:e.stroke}),this._fill(),this.container.append(this.drawingElement),e.points&&this._updatePath()},_pointsDiffer:function(e){var t,n=this.options.points,i=n.length!==e.length;if(!i)for(t=0;t<e.length;t++)if(n[t].x!==e[t].x||n[t].y!==e[t].y){i=!0;break}return i},_updatePath:function(){var e,t,n=this.drawingElement,i=this.options,o=i.points,r=[];for(t=0;t<o.length;t++)e=o[t],r.push(a(e.x,e.y));n.segments.elements(r)},options:{points:[]}}),F(C.fn,y),S=p.extend({init:function(e){p.fn.init.call(this,e),this._initImage()},redraw:function(e){e&&(e.source&&this.drawingElement.src(e.source),this._diffNumericOptions(e,[Q,X,Z,J])&&this.drawingElement.rect(this._rect()),p.fn.redraw.call(this,e))},_initImage:function(){var e=this.options,t=this._rect();this.drawingElement=new U.Image(e.source,t,{})},_rect:function(){var e=i(this.options),t=new V.Point(e.x,e.y),n=new V.Size(e.width,e.height);return new V.Rect(t,n)}}),T=p.extend({init:function(e){this.children=[],p.fn.init.call(this,e),this.drawingElement=new U.Group,this._initSize()},options:{autoSize:!1},append:function(e){this.drawingElement.append(e.drawingContainer()),this.children.push(e),this._childrenChange=!0},remove:function(e){this._remove(e)&&(this._childrenChange=!0)},_remove:function(e){var t=j(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,n;for(n=0;n<e.length;n++)t=e[n],this._remove(t)&&this.append(t)},toBack:function(e){this._reorderChildren(e,0)},toIndex:function(e,t){this._reorderChildren(e,t)},_reorderChildren:function(e,t){var n,i,o,r,s,a=this.drawingElement,l=a.children.slice(0),c=this.children,d=H(t);for(n=0;n<e.length;n++)s=e[n],r=s.drawingContainer(),i=j(s,c),i>=0&&(l.splice(i,1),c.splice(i,1),o=d?t:t[n],l.splice(o,0,r),c.splice(o,0,s));a.clear(),a.append.apply(a,l)},redraw:function(e){e&&(this._childrenChange?(this._childrenChange=!1,this._updateSize(e)||this._initSize()):this._updateSize(e),p.fn.redraw.call(this,e))},_boundingBox:function(){var e,t,n,i,o=this.children;for(i=0;i<o.length;i++)t=o[i],t.visible()&&t._includeInBBox!==!1&&(n=t.drawingContainer().clippedBBox(null),n&&(e=e?V.Rect.union(e,n):n));return e}}),F(T.fn,f),D=T.extend({init:function(e,t){this.children=[],p.fn.init.call(this,t),this.drawingElement=new U.Layout(l(e),t),this._initSize()},rect:function(e){if(e)this.drawingElement.rect(l(e));else{var t=this.drawingElement.rect();if(t)return new P(t.origin.x,t.origin.y,t.size.width,t.size.height)}},reflow:function(){this.drawingElement.reflow()},redraw:function(e){M.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,n=t.width,i=t.height,o=t.radius;W(o)||(W(n)||(n=i),W(i)||(i=n),t.radius=o=Math.min(n,i)/2),e=t.center||{x:o,y:o},this._center=new V.Point(e.x,e.y),this._circle=new V.Circle(this._center,o),this.drawingElement=new U.Circle(this._circle,{stroke:t.stroke}),this._fill()}}),F(A.fn,f),E=I.extend({init:function(e,t){t=t||{},this.element=e,this.surface=U.Surface.create(e,t),M.isFunction(this.surface.translate)&&(this.translate=this._translate),this.drawingElement=new U.Group,this._viewBox=new P(0,0,t.width,t.height),this.size(this._viewBox)},bounds:function(){var e=this.drawingElement.clippedBBox();return new P(0,0,e.width(),e.height())},size:function(e){var t=this._viewBox;return W(e)&&(t.width=e.width,t.height=e.height,this.surface.setSize(e)),{width:t.width,height:t.height}},_translate:function(e,t){var n=this._viewBox;return W(e)&&W(t)&&(n.x=e,n.y=t,this.surface.translate({x:e,y:t})),{x:n.x,y:n.y}},draw:function(){this.surface.draw(this.drawingElement)},append:function(e){return this.drawingElement.append(e.drawingContainer()),this},remove:function(e){this.drawingElement.remove(e.drawingContainer())},insertBefore:function(){},clear:function(){this.drawingElement.clear()},destroy:function(t){this.surface.destroy(),t&&e(this.element).remove();
}}),M.deepExtend(R,{init:function(e){M.init(e,R.ui)},diffNumericOptions:n,Element:p,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,n){(n||t)()}),function(e,define){define("dataviz/diagram/services.min",["kendo.drawing.min","dataviz/diagram/svg.min"],e)}(function(){!function(e,t){function n(e,t){return t.charCodeAt(0)==e||t.toUpperCase().charCodeAt(0)==e}function i(e,t){var n;return e.x==-1&&e.y==-1?n=t.bottomRight():1==e.x&&1==e.y?n=t.topLeft():e.x==-1&&1==e.y?n=t.topRight():1==e.x&&e.y==-1?n=t.bottomLeft():0===e.x&&e.y==-1?n=t.bottom():0===e.x&&1==e.y?n=t.top():1==e.x&&0===e.y?n=t.left():e.x==-1&&0===e.y&&(n=t.right()),n}function o(e){var t=e.options.editable;return t&&t.drag!==!1}function r(e,t){var n,i,o,r;for(r=0;r<e.connectors.length;r++)if(n=e.connectors[r],i=n.position(),o=new j(i.x,i.y),o.inflate(re,re),o.contains(t))return n}function s(e){return e.ctrlKey===!1&&e.altKey===!1&&e.shiftKey===!1}var a,l,c,d,u,h,f,p,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E,M,R,I,F,z,P,B,L,H,N=window.kendo,O=N.dataviz,V=O.diagram,U=N.Class,W=V.Group,j=V.Rect,q=V.Rectangle,G=V.Utils,$=G.isUndefined,Y=V.Point,K=V.Circle,Q=V.Ticker,X=N.deepExtend,Z=N.ui.Movable,J=N.support.browser,ee=N.drawing.util,te=ee.defined,ne=e.inArray,ie=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,fe="dragStart",pe="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",Me="pan",Re="rotated",Ie="source",Fe="target",ze={"-1":Ie,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 n=this.diagram.getShapeById(e);n&&(this.subjects.push(n),this.froms.push(n.bounds().topLeft()),this.tos.push(t.topLeft()))}this.froms=[],this.tos=[],this.subjects=[],this.layoutState.nodeMap.forEach(e,this)},update:function(e){if(!(this.subjects.length<=0))for(var t=0;t<this.subjects.length;t++)this.subjects[t].position(new Y(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=U.extend({init:function(e,t,n){this.animate=!$(n)&&n,this._initialState=e,this._finalState=t,this.title="Diagram layout"},undo:function(){this.setState(this._initialState)},redo:function(){this.setState(this._finalState)},setState:function(e){var t,n=e.diagram;this.animate?(e.linkMap.forEach(function(e,t){var i=n.getShapeById(e);i.visible(!1),i&&i.points(t)}),t=new Q,t.addAdapter(new a(e)),t.onComplete(function(){e.linkMap.forEach(function(e){var t=n.getShapeById(e);t.visible(!0)})}),t.play()):(e.nodeMap.forEach(function(e,t){var i=n.getShapeById(e);i&&i.position(t.topLeft())}),e.linkMap.forEach(function(e,t){var i=n.getShapeById(e);i&&i.points(t)}))}}),c=U.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=U.extend({init:function(e,t,n){this.item=e,this._redoSource=t,this._redoTarget=n,te(t)&&(this._undoSource=e.source()),te(n)&&(this._undoTarget=e.target()),this.title="Connection Editing"},undo:function(){this._undoSource!==t&&this.item._updateConnector(this._undoSource,"source"),this._undoTarget!==t&&this.item._updateConnector(this._undoTarget,"target"),this.item.updateModel()},redo:function(){this._redoSource!==t&&this.item._updateConnector(this._redoSource,"source"),this._redoTarget!==t&&this.item._updateConnector(this._redoTarget,"target"),this.item.updateModel()}}),u=U.extend({init:function(e,t,n){this.item=e,this._undoSource=t,this._undoTarget=n,this._redoSource=e.source(),this._redoTarget=e.target(),this.title="Connection Editing"},undo:function(){this.item._updateConnector(this._undoSource,"source"),this.item._updateConnector(this._undoTarget,"target"),this.item.updateModel()},redo:function(){this.item._updateConnector(this._redoSource,"source"),this.item._updateConnector(this._redoTarget,"target"),this.item.updateModel()}}),h=U.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)}}),f=U.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)}}),p=U.extend({init:function(e,t,n){var i,o;for(this.shapes=e,this.undoStates=t,this.title="Transformation",this.redoStates=[],this.adorner=n,i=0;i<this.shapes.length;i++)o=this.shapes[i],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=U.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=U.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=U.extend({init:function(e,t,n){this.initial=e,this.finalPos=t,this.diagram=n,this.title="Pan Unit"},undo:function(){this.diagram.pan(this.initial)},redo:function(){this.diagram.pan(this.finalPos)}}),_=U.extend({init:function(e,t,n){var i,o;for(this.shapes=t,this.undoRotates=n,this.title="Rotation",this.redoRotates=[],this.redoAngle=e._angle,this.adorner=e,this.center=e._innerBounds.center(),i=0;i<this.shapes.length;i++)o=this.shapes[i],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=U.extend({init:function(e,t,n){this.diagram=e,this.indices=n,this.items=t,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toFront(this.items,!1)}}),w=U.extend({init:function(e,t,n){this.diagram=e,this.indices=n,this.items=t,this.title="Rotate Unit"},undo:function(){this.diagram._toIndex(this.items,this.indices)},redo:function(){this.diagram.toBack(this.items,!1)}}),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=U.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 n,i,o,r,s=this,a=N.support.mobileOS?De:Te;k.fn.init.call(s,t),n=s.toolService.diagram,i=n.canvas,o=n.scroller=s.scroller=e(n.scrollable).kendoMobileScroller({friction:a,velocityMultiplier:Ae,mousewheelScrolling:!1,zoom:!1,scroll:ie(s._move,s)}).data("kendoMobileScroller"),i.translate&&(s.movableCanvas=new Z(i.element)),r=function(e,t,n){e.makeVirtual(),e.virtualSize(t||Ce,n||Se)},r(o.dimensions.x),r(o.dimensions.y),o.disable()},tryActivate:function(e,t){var n=this.toolService,i=n.diagram.options.pannable,o=t.ctrlKey;return te(i.key)&&(o=i.key&&"none"!=i.key?t[i.key+"Key"]:s(t)&&!te(n.hoveredItem)),i!==!1&&o&&!te(n.hoveredAdorner)&&!te(n._hoveredConnector)},start:function(){this.scroller.enable()},move:function(){},_move:function(e){var t=this,n=t.toolService.diagram,i=n.canvas,o=new Y(e.scrollLeft,e.scrollTop);i.translate?(n._storePan(o.times(-1)),t.movableCanvas.moveTo(o),i.translate(o.x,o.y)):o=o.plus(n._pan.times(-1)),n.trigger(Me,{pan:o})},end:function(){this.scroller.disable()},getCursor:function(){return oe.move}}),C=U.extend({init:function(e){this.toolService=e},tryActivate:function(){return!0},start:function(e,t){var n=this.toolService,i=n.diagram,o=n.hoveredItem;o&&(n.selectSingle(o,t),o.adorner&&(this.adorner=o.adorner,this.handle=this.adorner._hitTest(e))),this.handle||(this.handle=i._resizingAdorner._hitTest(e),this.handle&&(this.adorner=i._resizingAdorner)),this.adorner&&(this.adorner.isDragHandle(this.handle)&&i.trigger(fe,{shapes:this.adorner.shapes,connections:[]})?(n.startPoint=e,n.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(pe,{shapes:this.adorner.shapes,connections:[]}))},end:function(){var e,n=this.toolService.diagram,i=this.adorner;i&&(i.isDragHandle(this.handle)&&n.trigger(me,{shapes:i.shapes,connections:[]})?i.cancel():(e=i.stop(),e&&n.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=U.extend({init:function(e){this.toolService=e},tryActivate:function(e,t){var n=this.toolService,i=n.diagram.options.selectable,o=i&&i.multiple!==!1;return o&&(o=i.key&&"none"!=i.key?t[i.key+"Key"]:s(t)),o&&!te(n.hoveredItem)&&!te(n.hoveredAdorner)},start:function(e){var t=this.toolService.diagram;t.deselect(),t.selector.start(e)},move:function(e){var t=this.toolService.diagram;t.selector.move(e)},end:function(e,t){var n=this.toolService.diagram,i=this.toolService.hoveredItem,o=n.selector.bounds();i&&i.isSelected||t.ctrlKey||n.deselect(),o.isEmpty()||n.selectArea(o),n.selector.end()},getCursor:function(){return oe.arrow}}),T=U.extend({init:function(e){this.toolService=e,this.type="ConnectionTool"},tryActivate:function(){return this.toolService._hoveredConnector},start:function(e,t){var n=this.toolService,i=n.diagram,r=n._hoveredConnector,s=i._createConnection({},r._c,e);o(s)&&!i.trigger(fe,{shapes:[],connections:[s],connectionHandle:Fe})&&i._addConnection(s)?(n._connectionManipulation(s,r._c.shape,!0),n._removeHover(),n.selectSingle(n.activeConnection,t),"touchmove"==t.type&&(i._cachedTouchTarget=r.visual)):(s.source(null),n.end(e))},move:function(e){var t=this.toolService,n=t.activeConnection;return n.target(e),t.diagram.trigger(pe,{shapes:[],connections:[n],connectionHandle:Fe}),!0},end:function(e){var t,n=this.toolService,i=n.diagram,o=n.activeConnection,r=n.hoveredItem,s=n._hoveredConnector,a=i._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),i.trigger(me,{shapes:[],connections:[o],connectionHandle:Fe})?(i.remove(o,!1),i.undoRedoService.pop()):(o.updateModel(),i._syncConnectionChanges()),n._connectionManipulation(),a&&(i._connectorsAdorner.visual.remove(a),i._cachedTouchTarget=null))},getCursor:function(){return oe.arrow}}),D=U.extend({init:function(e){this.toolService=e,this.type="ConnectionTool"},tryActivate:function(e,t){var n=this.toolService,i=n.diagram,o=i.options.selectable,r=n.hoveredItem,s=o!==!1&&r&&r.path&&!(r.isSelected&&t.ctrlKey);return s&&(this._c=r),s},start:function(e,t){var n,i,r,s=this.toolService,a=this._c;s.selectSingle(a,t),n=a.adorner,n&&(i=n._hitTest(e),r=ze[i]),o(a)&&n&&!s.diagram.trigger(fe,{shapes:[],connections:[a],connectionHandle:r})?(this.handle=i,this.handleName=r,n.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(pe,{shapes:[],connections:[this._c],connectionHandle:this.handleName}),!0},end:function(e){var t,n=this._c,i=n.adorner,r=this.toolService,s=r.diagram;i&&o(n)&&(t=i.stop(e),s.trigger(me,{shapes:[],connections:[n],connectionHandle:this.handleName})?t.undo():(s.undoRedoService.add(t,!1),n.updateModel(),s._syncConnectionChanges()))},getCursor:function(){return oe.move}}),A=U.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 n=!0;return this.activeTool&&(n=this.activeTool.move(e,t)),n&&this._updateHoveredItem(e),this._updateCursor(e),!0},end:function(e,n){return n=X({},n),this.activeTool&&this.activeTool.end(e,n),this.diagram.canvas.surface.resumeTracking(),this.activeTool=t,this._updateCursor(e),!0},keyDown:function(e,t){var i,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 i=this.diagram._triggerRemove(o.select()),i.length&&(this.diagram.remove(i,!0),this.diagram._syncChanges(),this.diagram._destroyToolBar()),!0;if(27===e)return this._discardNewConnection(),o.deselect(),o._destroyToolBar(),!0}else{if(n(e,"a"))return o.selectAll(),o._destroyToolBar(),!0;if(n(e,"z"))return o.undo(),o._destroyToolBar(),!0;if(n(e,"y"))return o.redo(),o._destroyToolBar(),!0;n(e,"c")?(o.copy(),o._destroyToolBar()):n(e,"x")?(o.cut(),o._destroyToolBar()):n(e,"v")?(o.paste(),o._destroyToolBar()):n(e,"l")?(o.layout(),o._destroyToolBar()):n(e,"d")&&(o._destroyToolBar(),o.copy(),o.paste())}},wheel:function(e,t){var n=this.diagram,i=t.delta,o=n.zoom(),r=n.options,s=r.zoomRate,a={point:e,meta:t,zoom:o};if(!n.trigger(ke,a))return i<0?o+=s:o-=s,o=N.dataviz.round(Math.max(r.zoomMin,Math.min(r.zoomMax,o)),2),a.zoom=o,n.zoom(o,a),n.trigger(xe,a),!0},setTool:function(e,t){e.toolService=this,this.tools[t]=e},selectSingle:function(e,t){var n,i=this.diagram,o=i.options.selectable;o&&!e.isSelected&&e.options.selectable!==!1&&(n=t.ctrlKey&&o.multiple!==!1,i.select(e,{addToSelection:n}))},_discardNewConnection:function(){this.newConnection&&(this.diagram.remove(this.newConnection),this.newConnection=t)},_activateTool:function(e,t){var n,i;for(n=0;n<this.tools.length;n++)if(i=this.tools[n],i.tryActivate(e,t)){this.activeTool=i;break}},_updateCursor:function(e){var t=this.diagram.element,n=this.activeTool?this.activeTool.getCursor(e):this.hoveredAdorner?this.hoveredAdorner._getCursor(e):this.hoveredItem?this.hoveredItem._getCursor(e):oe.arrow;t.css({cursor:n}),J.msie&&7==J.version&&(t[0].style.cssText=t[0].style.cssText)},_connectionManipulation:function(e,n,i){this.activeConnection=e,this.disabledShape=n,this.newConnection=i?this.activeConnection:t},_updateHoveredItem:function(e){var n=this._hitTest(e),i=this.diagram;n==this.hoveredItem||this.disabledShape&&n==this.disabledShape||(this.hoveredItem&&(i.trigger(ye,{item:this.hoveredItem}),this.hoveredItem._hover(!1)),n&&n.options.enable?(i.trigger(we,{item:n}),this.hoveredItem=n,this.hoveredItem._hover(!0)):this.hoveredItem=t)},_removeHover:function(){this.hoveredItem&&(this.hoveredItem._hover(!1),this.hoveredItem=t)},_hitTest:function(e){var n,i,o,r,s=this.diagram;if(this._hoveredConnector&&(this._hoveredConnector._hover(!1),this._hoveredConnector=t),s._connectorsAdorner._visible&&(n=s._connectorsAdorner._hitTest(e)))return n;if(n=this.diagram._resizingAdorner._hitTest(e)){if(this.hoveredAdorner=s._resizingAdorner,0!==n.x||0!==n.y)return;n=t}else this.hoveredAdorner=t;if(!this.activeTool||"ConnectionTool"!==this.activeTool.type){for(r=[],o=0;o<s._selectedItems.length;o++)i=s._selectedItems[o],i instanceof V.Connection&&r.push(i);n=this._hitTestItems(r,e)}return n||this._hitTestElements(e)},_hitTestElements:function(e){var t,n,i,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)||(n=s.mainLayer,i=ne(a.visual,n.children),o=ne(l.visual,n.children),t=i>o?a:l),t||a||l},_hitTestItems:function(e,t){var n,i,o;for(n=e.length-1;n>=0;n--)if(i=e[n],o=i._hitTest(t))return o}}),E=N.Class.extend({init:function(){}}),M=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(),n=t[0],i=t[t.length-1],o=Math.max(n.x,i.x),r=Math.min(n.x,i.x),s=Math.min(n.y,i.y),a=Math.max(n.y,i.y);for(e=1;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 j(r,s,o-r,a-s)}}),R=M.extend({init:function(e){var t=this;M.fn.init.call(t),this.connection=e},route:function(){}}),I=M.extend({SAME_SIDE_DISTANCE_RATIO:5,init:function(e){var t=this;M.fn.init.call(t),this.connection=e},routePoints:function(e,t,n,i){var o;return o=n&&i?this._connectorPoints(e,t,n,i):this._floatingPoints(e,t,n)},route:function(){var e=this.connection._resolvedSourceConnector,t=this.connection._resolvedTargetConnector,n=this.connection.sourcePoint(),i=this.connection.targetPoint(),o=this.routePoints(n,i,e,t);this.connection.points(o)},_connectorSides:[{name:"Top",axis:"y",boundsPoint:"topLeft",secondarySign:1},{name:"Left",axis:"x",boundsPoint:"topLeft",secondarySign:1},{name:"Bottom",axis:"y",boundsPoint:"bottomRight",secondarySign:-1},{name:"Right",axis:"x",boundsPoint:"bottomRight",secondarySign:-1}],_connectorSide:function(e,t){var n,i,o,r,s,a=e.position(),l=e.shape.bounds(Re),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,n=Math.round(Math.abs(a[o]-c[r.boundsPoint][o])),n<u?(u=n,i=r):n===u&&(a[o]-t[o])*r.secondarySign>(a[i.axis]-t[i.axis])*i.secondarySign&&(i=r);return i.name},_sameSideDistance:function(e){var t=e.shape.bounds(Re);return Math.min(t.width,t.height)/this.SAME_SIDE_DISTANCE_RATIO},_connectorPoints:function(e,t,n,i){var o,r,s=this._connectorSide(n,t),a=this._connectorSide(i,e),l=t.x-e.x,c=t.y-e.y,d=this._sameSideDistance(n),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 Y(e.x,r),new Y(t.x,r)]):u=[new Y(e.x,e.y+c/2),new Y(t.x,e.y+c/2)]:u=[new Y(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 Y(o,e.y),new Y(o,t.y)]):u=[new Y(e.x+l/2,e.y),new Y(e.x+l/2,e.y+c)]:u=[new Y(t.x,e.y)],u},_floatingPoints:function(e,t,n){var i,o,r,s=n?this._connectorSide(n,t):null,a=this._startHorizontal(e,t,s),l=[e,e,t,t],c=t.x-e.x,d=t.y-e.y,u=l.length;for(r=1;r<u-1;++r)a?r%2!==0?(i=c/(u/2),o=0):(i=0,o=d/((u-1)/2)):r%2!==0?(i=0,o=d/(u/2)):(i=c/((u-1)/2),o=0),l[r]=new Y(l[r-1].x+i,l[r-1].y+o);return r--,l[u-2]=a&&r%2!==0||!a&&r%2===0?new Y(l[u-1].x,l[u-2].y):new Y(l[u-2].x,l[u-1].y),[l[1],l[2]]},_startHorizontal:function(e,t,n){var i;return i=null!==n&&(n===le||n===ce)||Math.abs(e.x-t.x)>Math.abs(e.y-t.y)}}),F=U.extend({init:function(e,t){var n=this;n.diagram=e,n.options=X({},n.options,t),n.visual=new W,n.diagram._adorners.push(n)},refresh:function(){}}),z=F.extend({init:function(e,t){var n,i,o,r=this;r.connection=e,n=r.connection.diagram,r._ts=n.toolService,F.fn.init.call(r,n,t),i=r.connection.sourcePoint(),o=r.connection.targetPoint(),r.spVisual=new K(X(r.options.handles,{center:i})),r.epVisual=new K(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 n=t.minus(this.startPoint);this.startPoint=t,this.connection.sourceConnector||this.connection.source(this.connection.sourcePoint().plus(n)),this.connection.targetConnector||this.connection.target(this.connection.targetPoint().plus(n))}return this.refresh(),!0},stop:function(e){var n,i=this.diagram.toolService,o=i.hoveredItem;return n=i._hoveredConnector?i._hoveredConnector._c:o&&o instanceof V.Shape?o.getConnector(se)||o.getConnector(e):e,this.handle===-1?this.connection.source(n):1===this.handle&&this.connection.target(n),this.handle=t,this._ts._connectionManipulation(),new u(this.connection,this._initialSource,this._initialTarget)},_hitTest:function(e){var t=this.connection.sourcePoint(),n=this.connection.targetPoint(),i=this.options.handles.width/2+re,o=this.options.handles.height/2+re,r=t.distanceTo(e),s=n.distanceTo(e),a=new j(t.x,t.y).inflate(i,o).contains(e),l=new j(n.x,n.y).inflate(i,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())})}}),P=F.extend({init:function(e,t){var n=this;F.fn.init.call(n,e,t),n._refreshHandler=function(e){e.item==n.shape&&n.refresh()}},show:function(e){var t,n,i,o=this;for(o._visible=!0,o.shape=e,o.diagram.bind(ve,o._refreshHandler),t=e.connectors.length,o.connectors=[],o._clearVisual(),n=0;n<t;n++)i=new H(e.connectors[n]),o.connectors.push(i),o.visual.append(i.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,n=t.visual.children,i=n.length,o=ne(t.diagram._cachedTouchTarget,n);for(e=i-1;e>=0;e--)e!=o&&t.visual.remove(n[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,n;for(n=0;n<this.connectors.length;n++)if(t=this.connectors[n],t._hitTest(e)){t._hover(!0),this.diagram.toolService._hoveredConnector=t;break}},refresh:function(){if(this.shape){var t=this.shape.bounds();t=this.diagram.modelToLayer(t),this.visual.position(t.topLeft()),e.each(this.connectors,function(){this.refresh()})}}}),B=F.extend({init:function(e,t){var n=this;F.fn.init.call(n,e,t),n._manipulating=!1,n.map=[],n.shapes=[],n._initSelection(),n._createHandles(),n.redraw(),n.diagram.bind("select",function(e){n._initialize(e.selected)}),n._refreshHandler=function(){n._internalChange||(n.refreshBounds(),n.refresh())},n._rotatedHandler=function(){1==n.shapes.length&&(n._angle=n.shapes[0].rotate().angle),n._refreshHandler()},n.diagram.bind(ve,n._refreshHandler).bind(ge,n._rotatedHandler),n.refreshBounds(),n.refresh()},options:{handles:{fill:{color:"#fff"},stroke:{color:"#282828"},height:7,width:7,hover:{fill:{color:"#282828"},stroke:{color:"#282828"}}},selectable:{stroke:{color:"#778899",width:1,dashType:"dash"},fill:{color:Ee}},offset:10},_initSelection:function(){var e=this,t=e.diagram,n=t.options.selectable,i=X({},e.options.selectable,n);e.rect=new q(i),e.visual.append(e.rect)},_resizable:function(){return this.options.editable&&this.options.editable.resize!==!1},_handleOptions:function(){return(this.options.editable.resize||{}).handles||this.options.handles},_createHandles:function(){var e,t,n,i;if(this._resizable())for(e=this._handleOptions(),i=-1;i<=1;i++)for(n=-1;n<=1;n++)0===i&&0===n||(t=new q(e),t.drawingElement._hover=ie(this._hover,this),this.map.push({x:i,y:n,visual:t}),this.visual.append(t))},bounds:function(e){return e?(this._innerBounds=e.clone(),this._bounds=this.diagram.modelToLayer(e).inflate(this.options.offset,this.options.offset),t):this._bounds},_hitTest:function(e){var t,n,i,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],n=new Y(o.x,o.y),i=this._getHandleBounds(n),i.offset(this._bounds.x,this._bounds.y),i.contains(r))return n;if(this._bounds.contains(r))return new Y(0,0)},_getHandleBounds:function(e){if(this._resizable()){var t=this._handleOptions(),n=t.width,i=t.height,o=new j(0,0,n,i);return e.x<0?o.x=-n/2:0===e.x?o.x=Math.floor(this._bounds.width/2)-n/2:e.x>0&&(o.x=this._bounds.width+1-n/2),e.y<0?o.y=-i/2:0===e.y?o.y=Math.floor(this._bounds.height/2)-i/2:e.y>0&&(o.y=this._bounds.height+1-i/2),o}},_getCursor:function(e){var t,n=this._hitTest(e);if(n&&n.x>=-1&&n.x<=1&&n.y>=-1&&n.y<=1&&this._resizable()){if(t=this._angle,t&&(t=360-t,n.rotate(new Y(0,0),t),n=new Y(Math.round(n.x),Math.round(n.y))),n.x==-1&&n.y==-1)return"nw-resize";if(1==n.x&&1==n.y)return"se-resize";if(n.x==-1&&1==n.y)return"sw-resize";if(1==n.x&&n.y==-1)return"ne-resize";if(0===n.x&&n.y==-1)return"n-resize";if(0===n.x&&1==n.y)return"s-resize";if(1==n.x&&0===n.y)return"e-resize";if(n.x==-1&&0===n.y)return"w-resize"}return this._manipulating?oe.move:oe.select},_initialize:function(){var e,t,n=this,i=n.diagram.select();for(n.shapes=[],e=0;e<i.length;e++)t=i[e],t instanceof V.Shape&&(n.shapes.push(t),t._rotationOffset=new Y);n._angle=1==n.shapes.length?n.shapes[0].rotate().angle:0,n._startAngle=n._angle,n._rotates(),n._positions(),n.refreshBounds(),n.refresh(),n.redraw()},_rotates:function(){var e,t,n=this;for(n.initialRotates=[],e=0;e<n.shapes.length;e++)t=n.shapes[e],n.initialRotates.push(t.rotate().angle)},_positions:function(){var e,t,n=this;for(n.initialStates=[],e=0;e<n.shapes.length;e++)t=n.shapes[e],n.initialStates.push(t.bounds())},_hover:function(e,t){if(this._resizable()){var n=this._handleOptions(),i=n.hover,o=n.stroke,r=n.fill;e&&G.isDefined(i.stroke)&&(o=X({},o,i.stroke)),e&&G.isDefined(i.fill)&&(r=i.fill),t.stroke(o.color,o.width,o.opacity),t.fill(r.color,r.opacity)}},start:function(e){var t,n;for(this._sp=e,this._cp=e,this._lp=e,this._manipulating=!0,this._internalChange=!0,this.shapeStates=[],t=0;t<this.shapes.length;t++)n=this.shapes[t],this.shapeStates.push(n.bounds())},redraw:function(){var e,t,n=this._resizable();for(e=0;e<this.map.length;e++)t=this.map[e],t.visual.visible(n)},angle:function(e){return te(e)&&(this._angle=e),this._angle},rotate:function(){var e,t,n=this._innerBounds.center(),i=this.angle();for(this._internalChange=!0,e=0;e<this.shapes.length;e++)t=this.shapes[e],i=(i+this.initialRotates[e]-this._startAngle)%360,t.rotate(i,n);this.refresh()},move:function(e,n){var r,s,a,l,c,d,u,h,f,p,m,g,v,_,b=new Y,w=new Y,y=0;if(e.y===-2&&e.x===-1){for(l=this._innerBounds.center(),this._angle=this._truncateAngle(G.findAngle(l,n)),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(n.minus(this._lp)),0===g.x&&0===g.y)return this._cp=n,t;r=g,this._lp=new Y(this._lp.x+g.x,this._lp.y+g.y)}else r=n.minus(this._cp);for(this.isDragHandle(e)?(w=b=r,s=!0):(this._angle&&r.rotate(new Y(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||(f=i(e,this._innerBounds),p=(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(p,m,f,this._innerBounds.center(),c.rotate().angle),v=h.center(),v.rotate(a.center(),-this._angle),h=new j(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=n},isDragHandle:function(e){return 0===e.x&&0===e.y},cancel:function(){var e,n=this.shapes,i=this.shapeStates;for(e=0;e<n.length;e++)n[e].bounds(i[e]);this.refreshBounds(),this.refresh(),this._manipulating=t,this._internalChange=t,this._rotating=t},_truncatePositionToGuides:function(e){return this.diagram.ruler?this.diagram.ruler.truncatePositionToGuides(e):e},_truncateSizeToGuides:function(e){return this.diagram.ruler?this.diagram.ruler.truncateSizeToGuides(e):e},_truncateAngle:function(e){var t=this.snapOptions(),n=Math.max(t.angle||he,be);return t?Math.floor(e%360/n)*n:e%360},_truncateDistance:function(e){var t,n;return e instanceof V.Point?new V.Point(this._truncateDistance(e.x),this._truncateDistance(e.y)):(t=this.snapOptions()||{},n=Math.max(t.size||ue,_e),t?Math.floor(e/n)*n:e)},snapOptions:function(){var e=this.diagram.options.editable,t=((e||{}).drag||{}).snap||{};return t},shouldSnap:function(){var e=this.diagram.options.editable,t=(e||{}).drag,n=(t||{}).snap;return e!==!1&&t!==!1&&n!==!1},_displaceBounds:function(e,t,n,i){var o,r=e.topLeft().plus(t),s=e.bottomRight().plus(n),a=j.fromPoints(r,s);return i||(o=a.center(),o.rotate(e.center(),-this._angle),a=new j(o.x-a.width/2,o.y-a.height/2,a.width,a.height)),a},stop:function(){var e,n,i,o;if(this._cp!=this._sp)if(this._rotating)e=new _(this,this.shapes,this.initialRotates),this._rotating=!1;else if(this._diffStates()){if(this.diagram.ruler)for(n=0;n<this.shapes.length;n++)i=this.shapes[n],o=i.bounds(),o=this._truncateSizeToGuides(this._truncatePositionToGuides(o)),i.bounds(o),this.refreshBounds(),this.refresh();for(n=0;n<this.shapes.length;n++)i=this.shapes[n],i.updateModel();e=new p(this.shapes,this.shapeStates,this),this.diagram._syncShapeChanges()}return this._manipulating=t,this._internalChange=t,this._rotating=t,e},_diffStates:function(){var e,t=this.shapes,n=this.shapeStates;for(e=0;e<t.length;e++)if(!t[e].bounds().equals(n[e]))return!0;return!1},refreshBounds:function(){var e=1==this.shapes.length?this.shapes[0].bounds().clone():this.diagram.boundingBox(this.shapes,!0);this.bounds(e)},refresh:function(){var t,n,i,o,r=this;this.shapes.length>0?(n=this.bounds(),this.visual.visible(!0),
this.visual.position(n.topLeft()),e.each(this.map,function(){t=r._getHandleBounds(new Y(this.x,this.y)),this.visual.position(t.topLeft())}),this.visual.position(n.topLeft()),i=new Y(n.width/2,n.height/2),this.visual.rotate(this._angle,i),this.rect.redraw({width:n.width,height:n.height}),this.rotationThumb&&(o=this.options.editable.rotate.thumb,this._rotationThumbBounds=new j(n.center().x,n.y+o.y,0,0).inflate(o.width),this.rotationThumb.redraw({x:n.width/2-o.width/2}))):this.visual.visible(!1)}}),L=U.extend({init:function(e){var t=e.options.selectable;this.options=X({},this.options,t),this.visual=new q(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=j.fromPoints(this.diagram.modelToLayer(this._sp),this.diagram.modelToLayer(this._ep));this.bounds(j.fromPoints(this._sp,this._ep)),this.visual.position(e.topLeft()),this.visual.redraw({height:e.height+1,width:e.width+1})}}}),H=U.extend({init:function(e){this.options=X({},e.options),this._c=e,this.visual=new K(this.options),this.refresh()},_hover:function(e){var t=this.options,n=t.hover,i=t.stroke,o=t.fill;e&&G.isDefined(n.stroke)&&(i=X({},i,n.stroke)),e&&G.isDefined(n.fill)&&(o=n.fill),this.visual.redraw({stroke:i,fill:o})},refresh:function(){var e=this._c.shape.diagram.modelToView(this._c.position()),t=e.minus(this._c.shape.bounds("transformed").topLeft()),n=new j(e.x,e.y,0,0);n.inflate(this.options.width/2,this.options.height/2),this._visualBounds=n,this.visual.redraw({center:new Y(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:p,PanUndoUnit:v,AddShapeUnit:g,AddConnectionUnit:m,DeleteShapeUnit:f,DeleteConnectionUnit:h,ConnectionEditAdorner:z,ConnectionTool:T,ConnectorVisual:H,UndoRedoService:y,ResizingAdorner:B,Selector:L,ToolService:A,ConnectorsAdorner:P,LayoutUndoUnit:l,ConnectionEditUnit:d,ToFrontUnit:b,ToBackUnit:w,ConnectionRouterBase:E,PolylineRouter:R,CascadingRouter:I,SelectionTool:S,ScrollerTool:x,PointerTool:C,ConnectionEditTool:D,RotateUnit:_})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("dataviz/diagram/layout.min",["dataviz/diagram/math.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.dataviz.diagram,o=i.Graph,r=i.Node,s=i.Link,a=n.deepExtend,l=i.Size,c=i.Rect,d=i.Dictionary,u=i.Set,h=i.Graph,f=i.Utils,p=i.Point,m=1e-6,g=Math.PI/180,v=f.contains,_=e.grep,b=n.Class.extend({defaultOptions:{type:"Tree",subtype:"Down",roots:null,animate:!1,limitToView:!1,friction:.9,nodeDistance:50,iterations:300,horizontalSeparation:90,verticalSeparation:50,underneathVerticalTopOffset:15,underneathHorizontalOffset:15,underneathVerticalSeparation:15,grid:{width:1500,offsetX:50,offsetY:50,componentSpacingX:20,componentSpacingY:20},layerSeparation:50,layeredIterations:2,startRadialAngle:0,endRadialAngle:360,radialSeparation:150,radialFirstLevelSeparation:200,keepComponentsInOneRadialLayout:!1,ignoreContainers:!0,layoutContainerChildren:!1,ignoreInvisible:!0,animateTransitions:!1},init:function(){},gridLayoutComponents:function(e){var t,n,i,o,r,s,a,l,c,d,u,h,m,g,v;if(!e)throw"No components supplied.";for(f.forEach(e,function(e){e.calcBounds()}),e.sort(function(e,t){return t.bounds.width-e.bounds.width}),t=this.options.grid.width,n=this.options.grid.componentSpacingX,i=this.options.grid.componentSpacingY,o=0,r=this.options.grid.offsetX,s=this.options.grid.offsetY,a=r,l=s,d=[],u=[];e.length>0;){for(a>=t&&(a=r,l+=o+i,o=0),h=e.pop(),this.moveToOffset(h,new p(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+n}return{nodes:u,links:d}},moveToOffset:function(e,t){var n,i,o,r,s,a,l,d,u=e.bounds,h=t.x-u.x,f=t.y-u.y;for(n=0;n<e.nodes.length;n++)o=e.nodes[n],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+=f,o.bounds(r);for(n=0;n<e.links.length;n++)if(s=e.links[n],s.points){for(a=[],l=s.points,i=0;i<l.length;i++)d=l[i],d.x+=h,d.y+=f,a.push(d);s.points=a}return this.currentHorizontalOffset+=u.width+this.options.grid.offsetX,new p(h,f)},transferOptions:function(e){this.options=n.deepExtend({},this.defaultOptions),f.isUndefined(e)||(this.options=n.deepExtend(this.options,e||{}))}}),w=n.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(f.isUndefined(this.diagram))throw"No diagram to convert.";return this.options=n.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 f.first(e.links,function(n){return n.getComplement(e)===t})},clear:function(){this.finalGraph=null,this.hyperTree=!this.options.ignoreContainers&&this.options.layoutContainerChildren?new h:null,this.hyperMap=!this.options.ignoreContainers&&this.options.layoutContainerChildren?new 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=[],n=e.container;if(!n)return t;for(t.push(n);n.parentContainer;)n=n.parentContainer,t.push(n);return t.reverse(),t},firstNonIgnorableContainer:function(e){return e.isContainer&&!this._isIgnorableItem(e)?e:e.parentContainer?this.firstNonIgnorableContainer(e.parentContainer):null},isContainerConnection:function(e,t){return!(!e.isContainer||!this.isDescendantOf(e,t))||t.isContainer&&this.isDescendantOf(t,e)},isDescendantOf:function(e,t){var n,i,o,r;if(!e.isContainer)throw"Expecting a container.";if(e===t)return!1;if(v(e.children,t))return!0;for(n=[],i=0,o=e.children.length;i<o;i++)r=e.children[i],r.isContainer&&this.isDescendantOf(r,t)&&n.push(r);return n.length>0},isIgnorableItem:function(e){return this.options.ignoreInvisible?(!e.isCollapsed||!this._isVisible(e))&&!(!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 n,i,o,r,s,a;if(!e)throw"Parameter should not be null.";if(!t)throw"Parameter should not be null.";if(!this.hyperTree)throw"No hypertree available.";if(n=this.listToRoot(e),i=this.listToRoot(t),o=null,f.isEmpty(n)||f.isEmpty(i))return this.hyperTree.root.data;for(r=n[0],s=i[0],a=0;r===s&&(o=n[a],a++,!(a>=n.length||a>=i.length));)r=n[a],s=i[a];return o?_(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,n,i;if(!this.options.ignoreContainers)throw"Containers are not supported yet, but stay tuned.";for(e=0,t=this.diagram.shapes.length;e<t;e++)n=this.diagram.shapes[e],this.options.ignoreInvisible&&!this._isVisible(n)||n.isContainer?this.ignoredShapes.push(n):(i=new r(n.id,n),i.isVirtual=!1,this.nodeMap.add(n.id,i),this.nodes.push(i))},_renormalizeConnections:function(){var e,t,n,i,o,r,a,l;if(0!==this.diagram.connections.length)for(e=0,t=this.diagram.connections.length;e<t;e++)if(n=this.diagram.connections[e],this.isIgnorableItem(n))this.ignoredConnections.push(n);else if(i=n.sourceConnector?n.sourceConnector.shape:null,o=n.targetConnector?n.targetConnector.shape:null,i&&o)if(!v(this.ignoredShapes,i)||this.shapeMap.containsKey(i))if(!v(this.ignoredShapes,o)||this.shapeMap.containsKey(o))if(this.shapeMap.containsKey(i)&&(i=this.shapeMap[i]),this.shapeMap.containsKey(o)&&(o=this.shapeMap[o]),r=this.mapShape(i),a=this.mapShape(o),r===a||this.areConnectedAlready(r,a))this.ignoredConnections.push(n);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(n):(l=new s(r,a,n.id,n),this.edgeMap.add(n.id,l),this.edges.push(l))}else this.ignoredConnections.push(n);else this.ignoredConnections.push(n);else this.ignoredConnections.push(n)},areConnectedAlready:function(e,t){return f.any(this.edges,function(n){return n.source===e&&n.target===t||n.source===t&&n.target===e})}}),y=b.extend({init:function(e){var t=this;if(b.fn.init.call(t),f.isUndefined(e))throw"Diagram is not specified.";this.diagram=e},layout:function(e){var t,n,o,r,s,a;if(this.transferOptions(e),t=new w(this.diagram),n=t.convert(e),!n.isEmpty()&&(o=n.getConnectedComponents(),!f.isEmpty(o))){for(r=0;r<o.length;r++)s=o[r],this.layoutGraph(s,e);return a=this.gridLayoutComponents(o),new i.LayoutState(this.diagram,a)}},layoutGraph:function(e,t){var n,i,o;for(f.isDefined(t)&&this.transferOptions(t),this.graph=e,n=9*this.options.nodeDistance,this.temperature=n,i=this._expectedBounds(),this.width=i.width,this.height=i.height,o=0;o<this.options.iterations;o++)this.refineStage=o>=5*this.options.iterations/6,this.tick(),this.temperature=this.refineStage?n/30:n*(1-o/(2*this.options.iterations))},tick:function(){var e,t,n;for(e=0;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],n=Math.sqrt(t.dx*t.dx+t.dy*t.dy),0===n)return;t.x+=Math.min(n,this.temperature)*t.dx/n,t.y+=Math.min(n,this.temperature)*t.dy/n,this.options.limitToView&&(t.x=Math.min(this.width,Math.max(t.width/2,t.x)),t.y=Math.min(this.height,Math.max(t.height/2,t.y)))}},_shake:function(e){var t=Math.random()*this.options.nodeDistance/4,n=2*Math.random()*Math.PI;e.x+=t*Math.cos(n),e.y-=t*Math.sin(n)},_InverseSquareForce:function(e,t,n){var i,o,r,s,a,l,c;return this.refineStage?(o=t.x-n.x,r=t.y-n.y,s=t.width/2,a=t.height/2,l=n.width/2,c=n.height/2,i=Math.pow(o,2)/Math.pow(s+l+this.options.nodeDistance,2)+Math.pow(r,2)/Math.pow(a+c+this.options.nodeDistance,2)):i=Math.pow(e,2)/Math.pow(this.options.nodeDistance,2),4*i/3},_SquareForce:function(e,t,n){return 1/this._InverseSquareForce(e,t,n)},_repulsion:function(e){e.dx=0,e.dy=0,f.forEach(this.graph.nodes,function(t){var n,i,o,r;if(t!==e){for(;e.x===t.x&&e.y===t.y;)this._shake(t);n=e.x-t.x,i=e.y-t.y,o=Math.sqrt(n*n+i*i),r=2*this._SquareForce(o,e,t),e.dx+=n/o*r,e.dy+=i/o*r}},this)},_attraction:function(e){var t,n,i,o,r,s,a=e.target,l=e.source;if(l!==a){for(;l.x===a.x&&l.y===a.y;)this._shake(a);t=l.x-a.x,n=l.y-a.y,i=Math.sqrt(t*t+n*n),o=5*this._InverseSquareForce(i,l,a),r=t/i*o,s=n/i*o,a.dx+=r,a.dy+=s,l.dx-=r,l.dy-=s}},_expectedBounds:function(){var e,t,n,i,o,r=this.graph.nodes.length,s=1.5,a=4;return 0===r?e:(e=f.fold(this.graph.nodes,function(e,t){var n=t.width*t.height;return n>0?e+=Math.sqrt(n):0},0,this),t=e/r,n=t*Math.ceil(Math.sqrt(r)),i=n*Math.sqrt(s),o=n/Math.sqrt(s),{width:i*a,height:o*a})}}),k=n.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,n,i,o,r,s,a,c;for(this.setChildrenDirection(this.center,"Left",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,n=0,o=0;o<e.length;o++)r=e[o],r.TreeDirection="Left",s=this.measure(r,l.Empty),n=Math.max(n,s.Width),t+=s.height+this.options.verticalSeparation;for(t-=this.options.verticalSeparation,a=this.center.x-this.options.horizontalSeparation,i=this.center.y+(this.center.height-t)/2,o=0;o<e.length;o++)r=e[o],c=new p(a-r.Size.width,i),this.arrange(r,c),i+=r.Size.height+this.options.verticalSeparation},layoutRight:function(e){var t,n,i,o,r,s,a,c;for(this.setChildrenDirection(this.center,"Right",!1),this.setChildrenLayout(this.center,"Default",!1),t=0,n=0,o=0;o<e.length;o++)r=e[o],r.TreeDirection="Right",s=this.measure(r,l.Empty),n=Math.max(n,s.Width),t+=s.height+this.options.verticalSeparation;for(t-=this.options.verticalSeparation,a=this.center.x+this.options.horizontalSeparation+this.center.width,i=this.center.y+(this.center.height-t)/2,o=0;o<e.length;o++)r=e[o],c=new p(a,i),this.arrange(r,c),i+=r.Size.height+this.options.verticalSeparation},layoutUp:function(e){var t,n,i,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++)i=e[o],i.TreeDirection="Up",r=this.measure(i,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++)i=e[o],n=this.center.y-this.options.verticalSeparation-i.Size.height,a=new p(s,n),this.arrange(i,a),s+=i.Size.width+this.options.horizontalSeparation},layoutDown:function(e){var t,n,i,o,r,s,a;for(this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),i=0,n=0;n<e.length;n++)t=e[n],t.treeDirection="Down",r=this.measure(t,l.Empty),i+=r.width+this.options.horizontalSeparation;for(i-=this.options.horizontalSeparation,s=this.center.x+this.center.width/2-i/2,o=this.center.y+this.options.verticalSeparation+this.center.height,n=0;n<e.length;n++)t=e[n],a=new p(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 p(this.center.x,this.center.y),this.calculateAngularWidth(this.center,0),this.maxDepth>0&&this.radialLayout(this.center,this.options.radialFirstLevelSeparation,e,t),this.center.Angle=t-e},tipOverTree:function(e,t){var n,i,o,r,s,a,c;for(f.isUndefined(t)&&(t=0),this.setChildrenDirection(this.center,"Down",!1),this.setChildrenLayout(this.center,"Default",!1),this.setChildrenLayout(this.center,"Underneath",!1,t),n=0,r=0;r<e.length;r++)o=e[r],o.TreeDirection="Down",s=this.measure(o,l.Empty),n+=s.width+this.options.horizontalSeparation;for(n-=this.options.horizontalSeparation,n-=e[e.length-1].width,n+=e[e.length-1].associatedShape.bounds().width,a=this.center.x+this.center.width/2-n/2,i=this.center.y+this.options.verticalSeparation+this.center.height,r=0;r<e.length;r++)o=e[r],c=new p(a,i),this.arrange(o,c),a+=o.Size.width+this.options.horizontalSeparation},calculateAngularWidth:function(e,t){var n,i,o,r,s,a,l;if(t>this.maxDepth&&(this.maxDepth=t),n=0,i=1e3,o=1e3,r=0===t?0:Math.sqrt(i*i+o*o)/t,e.children.length>0){for(s=0,a=e.children.length;s<a;s++)l=e.children[s],n+=this.calculateAngularWidth(l,t+1);n=Math.max(r,n)}else n=r;return e.sectorAngle=n,n},sortChildren:function(e){var t,n,i,o,r,s,a,l,c,d,u,h=0;if(e.parents.length>1)throw"Node is not part of a tree.";if(n=e.parents[0],n&&(i=new p(n.x,n.y),o=new p(e.x,e.y),h=this.normalizeAngle(Math.atan2(i.y-o.y,i.x-o.x))),r=e.children.length,0===r)return null;for(s=[],a=[],t=0;t<r;++t)l=e.children[t],c=new p(l.x,l.y),a[t]=t,s[t]=this.normalizeAngle(-h+Math.atan2(c.y-c.y,c.x-c.x));for(f.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,n,i){var o,r,s,a,l,c=i-n,d=c/2,u=e.sectorAngle,h=0,f=this.sortChildren(e);for(o=0,r=f.length;o<r;o++)s=f[o],a=s,l=a.sectorAngle/u,s.children.length>0&&this.radialLayout(s,t+this.options.radialSeparation,n+h*c,n+(h+l)*c),this.setPolarLocation(s,t,n+h*c+l*d),a.angle=l*c,h+=l},setPolarLocation:function(e,t,n){e.x=this.origin.x+t*Math.cos(n),e.y=this.origin.y+t*Math.sin(n),e.BoundingRectangle=new c(e.x,e.y,e.width,e.height)},setChildrenDirection:function(e,t,n){var i=e.treeDirection;this.graph.depthFirstTraversal(e,function(e){e.treeDirection=t}),n||(e.treeDirection=i)},setChildrenLayout:function(e,t,n,i){f.isUndefined(i)&&(i=0);var o=e.childrenLayout;i>0?(this.graph.assignLevels(e),this.graph.depthFirstTraversal(e,function(e){e.level>=i+1&&(e.childrenLayout=t)})):(this.graph.depthFirstTraversal(e,function(e){e.childrenLayout=t}),n||(e.childrenLayout=o))},measure:function(e,t){var n,i,o,r,s,a,c,d=0,u=0,h=new l(0,0);if(!e)throw"";if(i=e.associatedShape.bounds(),o=i.width,r=i.height,1!==e.parents.length)throw"Node not in a spanning tree.";if(s=e.parents[0],"Undefined"===e.treeDirection&&(e.treeDirection=s.treeDirection),f.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":n=this.measure(e.children[0],t),d=o+this.options.radialSeparation*Math.cos(e.AngleToParent)+n.width,u=r+Math.abs(this.options.radialSeparation*Math.sin(e.AngleToParent))+n.height;break;case"Left":case"Right":switch(e.childrenLayout){case"TopAlignedWithParent":break;case"BottomAlignedWithParent":break;case"Underneath":n=this.measure(e.children[0],t),d=o+n.width+this.options.underneathHorizontalOffset,u=r+this.options.underneathVerticalTopOffset+n.height;break;case"Default":n=this.measure(e.children[0],t),d=o+this.options.horizontalSeparation+n.width,u=Math.max(r,n.height);break;default:throw"Unhandled TreeDirection in the Radial layout measuring."}break;case"Up":case"Down":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":n=this.measure(e.children[0],t),d=Math.max(o,n.width+this.options.underneathHorizontalOffset),u=r+this.options.underneathVerticalTopOffset+n.height;break;case"Default":n=this.measure(e.children[0],t),u=r+this.options.verticalSeparation+n.height,d=Math.max(o,n.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],n=this.measure(c,t),d=Math.max(d,n.width+this.options.underneathHorizontalOffset),u+=n.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],n=this.measure(c,t),d=Math.max(d,o+this.options.horizontalSeparation+n.width),u+=n.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],n=this.measure(c,t),d=Math.max(d,n.width+this.options.underneathHorizontalOffset),u+=n.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],n=this.measure(c,t),d+=n.width+this.options.horizontalSeparation,u=Math.max(u,n.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 n,i,o,r,s,a,l,d,u=e.associatedShape.bounds(),h=u.width,g=u.height;if(f.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,n=0;n<r.children.length;n++)r=r.children[n],a=d.x-r.associatedShape.width-this.options.underneathHorizontalOffset,i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(d=new p(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,n=0;n<e.children.length;n++)r=e.children[n],i=new p(a-r.Size.width,l),this.arrange(r,i),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,n=0;n<e.children.length;n++)r=e.children[n],i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":for(d=new p(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,n=0;n<e.children.length;n++)r=e.children[n],i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.verticalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"Up":if(d=new p(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,n=0;n<e.children.length;n++)o=e.children[n],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=t.x+(h-s)/2}else a=t.x;for(n=0;n<e.children.length;n++)r=e.children[n],l=d.y-this.options.verticalSeparation-r.Size.height,i=new p(a,l),this.arrange(r,i),a+=r.Size.width+this.options.horizontalSeparation;break;case"Down":switch(e.childrenLayout){case"TopAlignedWithParent":case"BottomAlignedWithParent":break;case"Underneath":for(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,n=0;n<e.children.length;n++)r=e.children[n],i=new p(a,l),this.arrange(r,i),l+=r.Size.height+this.options.underneathVerticalSeparation;break;case"Default":if(d=new p(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,n=0;n<e.children.length;n++)o=e.children[n],s+=o.Size.width+this.options.horizontalSeparation;s-=this.options.horizontalSeparation,a=t.x+(h-s)/2}else a=t.x;for(n=0;n<e.children.length;n++)r=e.children[n],l=d.y+this.options.verticalSeparation+g,i=new p(a,l),this.arrange(r,i),a+=r.Size.width+this.options.horizontalSeparation;break;default:throw"Unsupported TreeDirection"}break;case"None":break;default:throw"Unsupported TreeDirection"}},layoutSwitch:function(){var e,t,n,i,o,r;if(this.center&&!f.isEmpty(this.center.children))switch(e=this.options.subtype,f.isUndefined(e)&&(e="Down"),r=this.center.children,e.toLowerCase()){case"radial":case"radialtree":this.layoutRadialTree();break;case"mindmaphorizontal":case"mindmap":t=this.center.children,1===this.center.children.length?this.layoutRight(t):(o=r.length/2,n=_(this.center.children,function(e){return f.indexOf(r,e)<o}),i=_(this.center.children,function(e){return f.indexOf(r,e)>=o}),this.layoutLeft(n),this.layoutRight(i));break;case"mindmapvertical":t=this.center.children,1===this.center.children.length?this.layoutDown(t):(o=r.length/2,n=_(this.center.children,function(e){return f.indexOf(r,e)<o}),i=_(this.center.children,function(e){return f.indexOf(r,e)>=o}),this.layoutUp(n),this.layoutDown(i));break;case"right":this.layoutRight(this.center.children);break;case"left":this.layoutLeft(this.center.children);break;case"up":case"bottom":this.layoutUp(this.center.children);break;case"down":case"top":this.layoutDown(this.center.children);break;case"tipover":case"tipovertree":if(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),f.isUndefined(e))throw"No diagram specified.";this.diagram=e},layout:function(e){var t,n;return this.transferOptions(e),t=new w(this.diagram),this.graph=t.convert(),n=this.layoutComponents(),new i.LayoutState(this.diagram,n)},layoutComponents:function(){var e,t,n,i,o,r,s,a;if(!this.graph.isEmpty()&&(e=this.graph.getConnectedComponents(),!f.isEmpty(e))){for(t=new k(this.options),n=[],i=0;i<e.length;i++){if(o=e[i],r=this.getTree(o),!r)throw"Failed to find a spanning tree for the component.";s=r.root,a=r.tree,t.layout(a,s),n.push(a)}return this.gridLayoutComponents(n)}},getTree:function(e){var t,n,i,o,r,s=null;if(this.options.roots&&this.options.roots.length>0)for(t=0,n=e.nodes.length;t<n;t++)for(i=e.nodes[t],o=0;o<this.options.roots.length;o++)if(r=this.options.roots[o],r===i.associatedShape){s=i;break}if(!s&&(s=e.root(),!s))throw"Unable to find a root for the tree.";return this.getTreeForRoot(e,s)},getTreeForRoot:function(e,t){var n=e.getSpanningTree(t);return f.isUndefined(n)||n.isEmpty()?null:{tree:n,root:n.root}}}),C=b.extend({init:function(e){var t=this;if(b.fn.init.call(t),f.isUndefined(e))throw"Diagram is not specified.";this.diagram=e},layout:function(e){var t,n,o,r,s,a;if(this.transferOptions(e),t=new w(this.diagram),n=t.convert(e),!n.isEmpty()&&(o=n.getConnectedComponents(),!f.isEmpty(o))){for(r=0;r<o.length;r++)s=o[r],this.layoutGraph(s,e);return a=this.gridLayoutComponents(o),new i.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,n,i,o,r,s,a,l,c,u,h,p=[],m=new d,g=0;for(f.forEach(e.nodes,function(e){0===e.incoming.length&&(m.set(e,0),p.push(e))});p.length>0;)for(r=p.shift(),t=0;t<r.outgoing.length;t++)i=r.outgoing[t],s=i.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(p,s)||p.push(s);for(a=m.keys(),a.sort(function(e,t){var n=m.get(e),i=m.get(t);return f.sign(i-n)}),l=0;l<a.length;++l)if(c=a[l],u=Number.MAX_VALUE,0!==c.outgoing.length){for(n=0;n<c.outgoing.length;++n)i=c.outgoing[n],u=Math.min(u,m.get(i.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),n=0;n<this.layers.length;n++)for(h=this.layers[n],t=0;t<h.length;t++)h[t].gridPosition=t},layoutGraph:function(e,t){if(f.isUndefined(e))throw"No graph given or graph analysis of the diagram failed.";f.isDefined(t)&&this.transferOptions(t),this.graph=e,e.setItemIndices();var n=e.makeAcyclic();this._initRuntimeProperties(),this._prepare(e,t),this._dummify(),this._optimizeCrossings(),this._swapPairs(),this.arrangeNodes(),this._moveThingsAround(),this._dedummify(),f.forEach(n,function(e){e.points&&e.points.reverse()})},setMinDist:function(e,t,n){var i=e.layer,o=e.layerIndex;this.minDistances[i][o]=n},getMinDist:function(e,t){var n,i=0,o=e.layerIndex,r=t.layerIndex,s=e.layer,a=Math.min(o,r),l=Math.max(o,r);for(n=a;n<l;++n)i+=this.minDistances[s][n];return i},placeLeftToRight:function(e){var t,n,i,o,r,s,a,l,c,u,h=new d;for(i=0;i<this.layers.length;++i)if(o=e[i]){for(t=0;t<o.length;t++)n=o[t],h.containsKey(n)||this.placeLeft(n,h,i);for(r=Number.POSITIVE_INFINITY,t=0;t<o.length;t++)n=o[t],s=this.rightSibling(n),s&&this.nodeLeftClass.get(s)!==i&&(r=Math.min(r,h.get(s)-h.get(n)-this.getMinDist(n,s)));if(r===Number.POSITIVE_INFINITY){for(a=[],t=0;t<o.length;t++)for(n=o[t],l=[],f.addRange(l,this.upNodes.get(n)),f.addRange(l,this.downNodes.get(n)),c=0;c<l.length;c++)u=l[c],this.nodeLeftClass.get(u)<i&&a.push(h.get(u)-h.get(n));a.sort(),r=0===a.length?0:a.length%2===1?a[this.intDiv(a.length,2)]:(a[this.intDiv(a.length,2)-1]+a[this.intDiv(a.length,2)])/2}for(t=0;t<o.length;t++)n=o[t],h.set(n,h.get(n)+r)}return h},placeRightToLeft:function(e){var t,n,i,o,r,s,a,l,c,u,h=new d;for(i=0;i<this.layers.length;++i)if(o=e[i]){for(t=0;t<o.length;t++)n=o[t],h.containsKey(n)||this.placeRight(n,h,i);for(r=Number.NEGATIVE_INFINITY,t=0;t<o.length;t++)n=o[t],s=this.leftSibling(n),s&&this.nodeRightClass.get(s)!==i&&(r=Math.max(r,h.get(s)-h.get(n)+this.getMinDist(s,n)));if(r===Number.NEGATIVE_INFINITY){for(a=[],t=0;t<o.length;t++)for(n=o[t],l=[],f.addRange(l,this.upNodes.get(n)),f.addRange(l,this.downNodes.get(n)),c=0;c<l.length;c++)u=l[c],this.nodeRightClass.get(u)<i&&a.push(h.get(n)-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++)n=o[t],h.set(n,h.get(n)+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 n,i,o,r,s,a,l,c,u,h=0,f=e.value=new d;for(n=0;n<this.layers.length;++n)for(h=n,i=this.layers[n],o=1===t?0:i.length-1;0<=o&&o<i.length;o+=t)if(r=i[o],f.containsKey(r))h=f.get(r);else if(f.set(r,h),r.isVirtual)for(s=this._nodesInLink(r),a=0;a<s.length;a++)l=s[a],f.set(l,h);for(c=[],u=0;u<this.layers.length;u++)c.push(null);return f.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 n,i,o=Number.MIN_VALUE;for(n=0;n<e.length;++n)i=e[n],o=t._isVerticalLayout()?Math.max(o,i.height):Math.max(o,i.width);return o}var t,n,i,o,r,s,a,l,c,u,h,p,m,g,v,_,b,w,y,k,x,C,S,T,D,A,E;for(n=0;n<this.layers.length;++n)o=this.layers[n],o.sort(this._gridPositionComparer);for(this.minDistances=[],n=0;n<this.layers.length;++n)for(o=this.layers[n],this.minDistances[n]=[],r=0;r<o.length;++r)i=o[r],i.layerIndex=r,this.minDistances[n][r]=this.options.nodeDistance,r<o.length-1&&(this.minDistances[n][r]+=this._isVerticalLayout()?(i.width+o[r+1].width)/2:(i.height+o[r+1].height)/2);for(this.downNodes=new d,this.upNodes=new d,f.forEach(this.graph.nodes,function(e){this.downNodes.set(e,[]),this.upNodes.set(e,[])},this),f.forEach(this.graph.links,function(e){var t=e.source,n=e.target,i=null,o=null;t.layer>n.layer?(i=e.source,o=e.target):(o=e.source,i=e.target),this.downNodes.get(o).push(i),
this.upNodes.get(i).push(o)},this),this.downNodes.forEachValue(function(e){e.sort(this._gridPositionComparer)},this),this.upNodes.forEachValue(function(e){e.sort(this._gridPositionComparer)},this),n=0;n<this.layers.length-1;++n)for(o=this.layers[n],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)i=o[r],i.isVirtual&&(c=this.downNodes.get(i)[0],c.isVirtual&&l.gridPosition>c.gridPosition&&(u=l.gridPosition,l.gridPosition=c.gridPosition,c.gridPosition=u,h=l.layerIndex,p=c.layerIndex,this.layers[n+1][h]=c,this.layers[n+1][p]=l,l.layerIndex=p,c.layerIndex=h));for(m=this._getLeftWing(),g=this._getRightWing(),v=this.placeLeftToRight(m),_=this.placeRightToLeft(g),b=new d,f.forEach(this.graph.nodes,function(e){b.set(e,(v.get(e)+_.get(e))/2)}),w=new d,y=new d,n=0;n<this.layers.length;++n)for(o=this.layers[n],k=-1,x=-1,r=0;r<o.length;++r)i=o[r],w.set(i,0),y.set(i,!1),i.isVirtual&&(k===-1?k=r:k===r-1?k=r:(x=r,w.set(o[k],0),b.get(i)-b.get(o[k])===this.getMinDist(o[k],i)?y.set(o[k],!0):y.set(o[k],!1),k=r));for(C=[1,-1],f.forEach(C,function(e){var n,i,o,r,s,a,l,c=1===e?0:this.layers.length-1;for(n=c;0<=n&&n<this.layers.length;n+=e){if(i=this.layers[n],o=this._firstVirtualNode(i),r=null,s=null,o!==-1)for(r=i[o],s=[],t=0;t<o;t++)s.push(i[t]);else r=null,s=i;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(i,r)){if(w.get(r)===e){for(o=r.layerIndex,l=a.layerIndex,s=[],t=o+1;t<l;t++)s.push(i[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<i.length;t++)s.push(i[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(n,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)i=o[r],this._isVerticalLayout()?(i.x=b.get(i),i.y=A+E/2):(i.x=A+E/2,i.y=b.get(i));A+=this.options.layerSeparation+E}},adjustDirections:function(e,t,n,i){var o,r,s,a,l,c,d,u,h,f,p,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=i.get(r),u=this.layers[e],h=r.layerIndex,f=c.layerIndex,p=h+1;p<f;++p)u[p].isVirtual&&(d=d&&i.get(u[p]));if(d)for(n.set(o,t),m=o.layerIndex,g=l.layerIndex,v=m+1;v<g;++v)s[v].isVirtual&&n.set(s[v],t)}o=l,r=c}},getNeighborOnLayer:function(e,t){var n=this.upNodes.get(e)[0];return n.layer===t?n:(n=this.downNodes.get(e)[0],n.layer===t?n:null)},_sequencer:function(e,t,n,i,o){if(1===o.length&&this._sequenceSingle(e,t,n,i,o[0]),o.length>1){var r=o.length,s=this.intDiv(r,2);this._sequencer(e,t,n,i,o.slice(0,s)),this._sequencer(e,t,n,i,o.slice(s)),this.combineSequences(e,t,n,i,o)}},_sequenceSingle:function(e,t,n,i,o){var r=i===-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))),n&&e.set(o,Math.min(e.get(o),e.get(n)-this.getMinDist(o,n))))},combineSequences:function(e,t,n,i,o){var r,s,a,l,c,d,u,h,f,p,m=o.length,g=this.intDiv(m,2),v=[];for(r=0;r<g;++r){for(s=0,l=i===-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=i===-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(n&&u.push({k:e.get(n)-this.getMinDist(n,o[g]),v:Number.MAX_VALUE}),u.sort(this._positionAscendingComparer),h=0,f=0,p=this.getMinDist(o[g-1],o[g]);e.get(o[g])-e.get(o[g-1])<p;)if(h<f){if(0===v.length){e.set(o[g-1],e.get(o[g])-p);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])-p))}else{if(0===u.length){e.set(o[g],e.get(o[g-1])+p);break}d=u.shift(),f+=d.v,e.set(o[g],d.k),e.set(o[g],Math.min(e.get(o[g]),e.get(o[g-1])+p))}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,n){var i=Number.NEGATIVE_INFINITY;f.forEach(this._getComposite(e),function(e){var o=this.leftSibling(e);o&&this.nodeLeftClass.get(o)===this.nodeLeftClass.get(e)&&(t.containsKey(o)||this.placeLeft(o,t,n),i=Math.max(i,t.get(o)+this.getMinDist(o,e)))},this),i===Number.NEGATIVE_INFINITY&&(i=0),f.forEach(this._getComposite(e),function(e){t.set(e,i)})},placeRight:function(e,t,n){var i=Number.POSITIVE_INFINITY;f.forEach(this._getComposite(e),function(e){var o=this.rightSibling(e);o&&this.nodeRightClass.get(o)===this.nodeRightClass.get(e)&&(t.containsKey(o)||this.placeRight(o,t,n),i=Math.min(i,t.get(o)-this.getMinDist(e,o)))},this),i===Number.POSITIVE_INFINITY&&(i=0),f.forEach(this._getComposite(e),function(e){t.set(e,i)})},leftSibling:function(e){var t=this.layers[e.layer],n=e.layerIndex;return 0===n?null:t[n-1]},rightSibling:function(e){var t=this.layers[e.layer],n=e.layerIndex;return n===t.length-1?null:t[n+1]},_getComposite:function(e){return e.isVirtual?this._nodesInLink(e):[e]},arrangeNodes:function(){var e,t,n,i,o,r,s,a;for(t=0;t<this.layers.length;t++)for(i=this.layers[t],n=0;n<i.length;n++)o=i[n],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(i=this.layers[t],n=0;n<i.length;n++)o=i[n],a=Math.min(a,o.gridPosition);if(a<0)for(t=0;t<this.layers.length;t++)for(i=this.layers[t],n=0;n<i.length;n++)o=i[n],o.gridPosition=o.gridPosition-a},layoutLayer:function(e,t){var n,i,o,r;for(i=e?this.layers[n=t+1]:this.layers[n=t-1],o=[],r=0;r<i.length;r++)o.push(i[r]);o.sort(function(e,t){var n=(e.upstreamPriority+e.downstreamPriority)/2,i=(t.upstreamPriority+t.downstreamPriority)/2;return Math.abs(n-i)<1e-4?0:n<i?1:-1}),f.forEach(o,function(e){var t=e.gridPosition,n=this.calcBaryCenter(e),o=(e.upstreamPriority+e.downstreamPriority)/2;if(!(Math.abs(t-n)<1e-4||Math.abs(t-n)<.2501))if(t<n)for(;t<n&&this.moveRight(e,i,o);)t=e.gridPosition;else for(;t>n&&this.moveLeft(e,i,o);)t=e.gridPosition},this),n>0&&this.calcDownData(n-1),n<this.layers.length-1&&this.calcUpData(n+1)},moveRight:function(e,t,n){var i,o,r=f.indexOf(t,e);return r===t.length-1?(e.gridPosition=e.gridPosition+.5,!0):(i=t[r+1],o=(i.upstreamPriority+i.downstreamPriority)/2,i.gridPosition>e.gridPosition+1?(e.gridPosition=e.gridPosition+.5,!0):!(o>n||Math.abs(o-n)<1e-4)&&(!!this.moveRight(i,t,n)&&(e.gridPosition=e.gridPosition+.5,!0)))},moveLeft:function(e,t,n){var i,o,r=f.indexOf(t,e);return 0===r?(e.gridPosition=e.gridPosition-.5,!0):(i=t[r-1],o=(i.upstreamPriority+i.downstreamPriority)/2,i.gridPosition<e.gridPosition-1?(e.gridPosition=e.gridPosition-.5,!0):!(o>n||Math.abs(o-n)<1e-4)&&(!!this.moveLeft(i,t,n)&&(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,n,i,o,a,l,c,u,h,p,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,p=function(e,t,n){h[e].linksTo[t]=h[e].linksTo[t]||[],h[e].linksTo[t].push(n)},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(n=new r,n.x=g.x,n.y=g.y,n.width=g.width/100,n.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),n.layer=l,n.uBaryCenter=0,n.dBaryCenter=0,n.upstreamLinkCount=0,n.downstreamLinkCount=0,n.gridPosition=t,n.isVirtual=!0,f.insert(e,n,t),o=t+1;o<e.length;o++)i=e[o],i.gridPosition=i.gridPosition+1;a=new s(x,n),a.depthOfDumminess=0,p(l-1,l,a),x=n,this.graph._addNode(n),this.graph.addLink(a),n.index=this.graph.nodes.length-1,this.mapVirtualNode(n,m)}p(b-1,b,a),m.changeSource(x),m.depthOfDumminess=_-b-1}else if(_-b<-1){for(l=_+1;l<b;l++){for(n=new r,n.x=g.x,n.y=g.y,n.width=g.width/100,n.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),n.layer=l,n.uBaryCenter=0,n.dBaryCenter=0,n.upstreamLinkCount=0,n.downstreamLinkCount=0,n.gridPosition=t,n.isVirtual=!0,t&=t,f.insert(e,n,t),o=t+1;o<e.length;o++)i=e[o],i.gridPosition=i.gridPosition+1;a=new s(x,n),a.depthOfDumminess=0,p(l-1,l,a),x=n,this.graph._addNode(n),this.graph.addLink(a),n.index=this.graph.nodes.length-1,this.mapVirtualNode(n,m)}p(b-1,b,m),m.changeSource(x),m.depthOfDumminess=b-_-1}else p(_,b,m)},_dedummify:function(){for(var e,t,n,i,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(n=[],n.unshift({x:t.target.x,y:t.target.y}),n.unshift({x:t.source.x,y:t.source.y}),i=t,o=t.depthOfDumminess,r=0;r<o;r++)s=i.source,a=s.incoming[0],n.unshift({x:a.source.x,y:a.source.y}),i=a;t.changeSource(i.source),t.depthOfDumminess=0,n.length>2?(n.splice(0,1),n.splice(n.length-1),t.points=n):t.points=[],l=!0;break}},_optimizeCrossings:function(){for(var e,t=-1,n=3,i=0;0!==t&&!(i++>n);){for(t=0,e=this.layers.length-1;e>=1;e--)t+=this.optimizeLayerCrossings(!1,e);for(e=0;e<this.layers.length-1;e++)t+=this.optimizeLayerCrossings(!0,e)}},calcUpData:function(e){var t,n,i,o,r,s,a,l,c;if(0!==e){for(t=this.layers[e],r=new u,s=this.layers[e-1],n=0;n<s.length;n++)r.add(s[n]);for(n=0;n<t.length;n++){for(a=t[n],l=0,c=0,i=0;i<a.incoming.length;i++)o=a.incoming[i],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(i=0;i<a.outgoing.length;i++)o=a.outgoing[i],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.uBaryCenter=l/c,a.upstreamLinkCount=c):(a.uBaryCenter=n,a.upstreamLinkCount=0)}}},calcDownData:function(e){var t,n,i,o,r,s,a,l,c;if(e!==this.layers.length-1){for(t=this.layers[e],r=new u,s=this.layers[e+1],n=0;n<s.length;n++)r.add(s[n]);for(n=0;n<t.length;n++){for(a=t[n],l=0,c=0,i=0;i<a.incoming.length;i++)o=a.incoming[i],r.contains(o.source)&&(c++,l+=o.source.gridPosition);for(i=0;i<a.outgoing.length;i++)o=a.outgoing[i],r.contains(o.target)&&(c++,l+=o.target.gridPosition);c>0?(a.dBaryCenter=l/c,a.downstreamLinkCount=c):(a.dBaryCenter=n,a.downstreamLinkCount=0)}}},optimizeLayerCrossings:function(e,t){var n,i,o,r,s,a,l,c;for(i=e?this.layers[n=t+1]:this.layers[n=t-1],o=i.slice(0),e?this.calcUpData(n):this.calcDownData(n),r=this,i.sort(function(e,t){var n,i=r.calcBaryCenter(e),o=r.calcBaryCenter(t);return Math.abs(i-o)<1e-4?e.degree()===t.degree()?r.compareByIndex(e,t):e.degree()<t.degree()?1:-1:(n=1e3*(o-i),n>0?-1:n<0?1:r.compareByIndex(e,t))}),a=0,s=0;s<i.length;s++)i[s]!==o[s]&&a++;if(a>0)for(l=0,s=0;s<i.length;s++)c=i[s],c.gridPosition=l++;return a},_swapPairs:function(){for(var e,t,n,i,o,r,s,a,l,c,d,u,h,f,p,m,g,v=this.options.layeredIterations,_=0;;){if(_++>v)break;for(e=_%4<=1,t=_%4===1,n=e?0:this.layers.length-1;e?n<=this.layers.length-1:n>=0;n+=e?1:-1){for(i=this.layers[n],o=!1,r=!0,s=0,a=0;a<i.length-1;a++)l=0,c=0,d=0,r?(0!==n&&(l=this.countLinksCrossingBetweenTwoLayers(n-1,n)),n!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(n,n+1)),e?l*=2:c*=2,d=l+c):d=s,0!==d&&(u=i[a],h=i[a+1],f=u.gridPosition,p=h.gridPosition,i[a]=h,i[a+1]=u,u.gridPosition=p,h.gridPosition=f,l=0,0!==n&&(l=this.countLinksCrossingBetweenTwoLayers(n-1,n)),c=0,n!==this.layers.length-1&&(c=this.countLinksCrossingBetweenTwoLayers(n,n+1)),e?l*=2:c*=2,m=l+c,g=!1,g=t?m>=d:m>d,g?(u=i[a],h=i[a+1],f=u.gridPosition,p=h.gridPosition,i[a]=h,i[a+1]=u,u.gridPosition=p,h.gridPosition=f,s=d,r=!1):(o=!0,r=!0));o&&(n!==this.layers.length-1&&this.calcUpData(n+1),0!==n&&this.calcDownData(n-1))}}},countLinksCrossingBetweenTwoLayers:function(e,t){var n,i,o,r,s,a,l,c,d,u,h,f,p=this.layers[e].linksTo[t],m=0,g=p.length;for(l=0;l<g;l++)for(n=p[l],c=l+1;c<g;c++)i=p[c],n.target.layer===t?(o=n.source,r=n.target):(o=n.target,r=n.source),i.target.layer===t?(s=i.source,a=i.target):(s=i.target,a=i.source),d=o.gridPosition,u=r.gridPosition,h=s.gridPosition,f=a.gridPosition,(d-h)*(u-f)<0&&m++;return m},calcBaryCenter:function(e){var t=e.upstreamLinkCount,n=e.downstreamLinkCount,i=e.uBaryCenter,o=e.dBaryCenter;return t>0&&n>0?(i+o)/2:t>0?i:n>0?o:0},_gridPositionComparer:function(e,t){return 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 n=e.index,i=t.index;return n<i?1:n>i?-1:0},intDiv:function(e,t){return(e-e%t)/t},nextVirtualNode:function(e,t){var n,i=t.layerIndex;for(n=i+1;n<e.length;++n)if(e[n].isVirtual)return e[n];return null}}),S=n.Class.extend({init:function(e,t){if(f.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,n,o,r,s,a,l,d,u;if(e instanceof i.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(n=e,r=0;r<n.length;r++)t=n[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(n=e.nodes,l=e.links,r=0;r<n.length;r++)t=n[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(i,{init:function(e){n.init(e,i.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,n){(n||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 n(e){var t=e.originalEvent,n=0;return t.wheelDelta?(n=-t.wheelDelta/40,n=n>0?ye.ceil(n):ye.floor(n)):t.detail&&(n=t.detail),n}function i(e){return e.options.name.toLowerCase()===Fe.toLowerCase()}function o(e,t){var n,o,r,s,a=He;for(r=0;r<t.length;r++)o=t[r],i(o)||(s=e.distanceTo(o.position()),s<a&&(a=s,n=o));return n}function r(e,t){var n,i,o,r=[],s=e.drawingContainer().children,a=s.length;for(n=0;n<t.length;n++)for(i=t[n],o=0;o<a;o++)if(s[o]==i.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,n){var i,o=this.dataSource.reader.model;o&&(i=o.fn.fields.text?"text":o.idField,e("<input name='"+n.field+"' />").appendTo(t).kendoDropDownList({dataValueField:o.idField,dataTextField:i,dataSource:this.dataSource.data().toJSON(),optionLabel:" ",valuePrimitive:!0}))}function c(e){this.dataItem=e,this.callbacks=[]}function 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,n,i=[],o=[];for(n=0;n<e.length;n++)t=e[n],t instanceof y?o.push(t):i.push(t);return{shapes:o,connections:i}}function f(e,t){return e.reader.model?new e.reader.model(t):new kendo.data.ObservableObject(t)}function p(e,t){ge(t[e])&&t.set(e,null)}function m(e,t,n){var i,o;for(o=0;o<n.length;o++)i=n[o],t&&!ge(t[i])&&(t[i]=e[i])}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,M=kendo.dataviz,R=kendo.drawing,I=kendo.geometry,F=M.diagram,z=kendo.ui.Widget,P=kendo.Class,B=e.proxy,L=kendo.deepExtend,H=kendo._outerWidth,N=kendo._outerHeight,O=e.extend,V=kendo.data.HierarchicalDataSource,U=F.Canvas,W=F.Group,j=F.Rectangle,q=F.Circle,G=F.CompositeTransform,$=F.Rect,Y=F.Path,K=F.DeleteShapeUnit,Q=F.DeleteConnectionUnit,X=F.TextBlock,Z=F.Image,J=F.Point,ee=F.Intersect,te=F.ConnectionEditAdorner,ne=F.UndoRedoService,ie=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,fe=F.CascadingRouter,pe=le.isUndefined,me=le.isDefined,ge=R.util.defined,ve=e.isArray,_e=kendo.isFunction,be=le.isString,we=e.isPlainObject,ye=Math,ke=".kendoDiagram",xe="cascading",Ce="itemBoundsChange",Se="change",Te="click",De="drag",Ae="dragEnd",Ee="dragStart",Me="mouseEnter",Re="mouseLeave",Ie="error",Fe="Auto",ze="Top",Pe="Right",Be="Left",Le="Bottom",He=9007199254740992,Ne="select",Oe="itemRotate",Ve="pan",Ue="zoomStart",We="zoomEnd",je="none",qe=600,Ge=600,$e="rectangle",Ye=100,Ke=100,Qe=20,Xe=20,Ze=0,Je="Yellow",et=Number.MAX_VALUE,tt=-Number.MAX_VALUE,nt="absolute",it="transformed",ot="rotated",rt="transparent",st="width",at="height",lt="x",ct="y",dt="DOMMouseScroll"+ke+" mousewheel"+ke,ut=.05,ht=5,ft='<a class="k-button k-button-icontext #=className#" href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',pt=5;F.DefaultConnectors=[{name:ze},{name:Le},{name:Be},{name:Pe},{name:Fe,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:$e,path:"",autoSize:!0,visual:null,x:Ze,y:Ze,minWidth:Qe,minHeight:Xe,width:Ye,height:Ke,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 W({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 pe(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 n,i,o;return e!==t&&(n=this.options,F.Utils.isString(e)?n.content.text=e:L(n.content,e),i=n.content,o=this._contentVisual,o?this._updateContentVisual(i):this._createContentVisual(i)),this.options.content.text},_createContentVisual:function(e){e.text&&(this._contentVisual=new 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,n=this;n.options.content.template&&(e=n.dataItem||{},t=kendo.template(n.options.content.template,{paramName:"dataItem"}),n.options.content.text=t(e))},_canSelect:function(){return this.options.selectable!==!1},toJSON:function(){return{id:this.options.id}}}),w=P.extend({init:function(e,t){this.options=L({},this.options,t),this.connections=[],this.shape=e},options:{width:7,height:7,fill:{color:Je},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 n,i,o=t.split(":"),r=o[0],s=o[1]||Fe;for(n=0;n<e.shapes.length;n++)if(i=e.shapes[n],i.options.id==r)return i.getConnector(s.trim())},y=b.extend({init:function(e,t){var n=this;b.fn.init.call(n,e),this.diagram=t,this.updateOptionsFromModel(),e=n.options,n.connectors=[],n.type=e.type,n.createShapeVisual(),n.updateBounds(),n.content(n.content()),n._createConnectors()},options:F.shapeDefaults(),_setOptionsFromModel:function(e){var t=s(e||this.dataItem);this.options=L({},this.options,t),this.redrawVisual()},updateOptionsFromModel:function(e,t){var n,i;this.diagram&&this.diagram._isEditable&&(n=s(e||this.dataItem),e&&t?M.inArray(t,["x","y","width","height"])?(i=this.bounds(),i[t]=e[t],this.bounds(i)):(this.options.visual?this._redrawVisual():n.type&&(this.options=L({},this.options,n),this._redrawVisual()),this.options.content&&(this._template(),this.content(this.options.content))):this.options=L({},this.options,n))},_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,n,i=this.diagram;i&&i._isEditable&&(t=this._bounds,n=this.dataItem,n&&(i._suspendModelRefresh(),ge(n.x)&&t.x!==n.x&&n.set("x",t.x),ge(n.y)&&t.y!==n.y&&n.set("y",t.y),ge(n.width)&&t.width!==n.width&&n.set("width",t.width),ge(n.height)&&t.height!==n.height&&n.set("height",t.height),this.dataItem=n,i._resumeModelRefresh(),e&&i._syncShapeChanges()))},updateBounds:function(){var e=this.visual._measure(!0),t=this.options;this.bounds(new $(t.x,t.y,e.width,e.height)),this._rotate(),this._alignContent()},content:function(e){var t=this._content(e);return this._alignContent(),t},_alignContent:function(){var e,t,n,i,o,r=this.options.content||{},s=this._contentVisual;s&&r.align&&(e=this.visual._measure(),t=new F.RectAlign(e),n=s.drawingElement.bbox(null),i=new $(0,0,n.width(),n.height()),o=t.align(i,r.align),s.position(o.topLeft()))},_createConnectors:function(){var e,t,n=this.options,i=n.connectors.length,o=n.connectorDefaults;for(t=0;t<i;t++)e=new w(this,L({},o,n.connectors[t])),this.connectors.push(e)},bounds:function(e){var t,n;if(e)if(be(e))switch(e){case it:t=this._transformedBounds();break;case nt:t=this._transformedBounds(),n=this.diagram._pan,t.x+=n.x,t.y+=n.y;break;case ot:t=this._rotatedBounds();break;default:t=this._bounds}else this._setBounds(e),this._triggerBoundsChange(),this.diagram&&this.diagram._layouting||this.refreshConnections();else t=this._bounds;return t},_setBounds:function(e){var t=this.options,n=e.topLeft(),i=t.x=n.x,o=t.y=n.y,r=t.width=ye.max(e.width,t.minWidth),s=t.height=ye.max(e.height,t.minHeight);this._bounds=new $(i,o,r,s),this.visual.redraw({x:i,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,n,i=this.diagram;if(pe(e)&&(e=!0),this._canSelect()&&this.isSelected!=e)return t=[],n=[],this.isSelected=e,this.isSelected?(i._selectedItems.push(this),t.push(this)):(le.remove(i._selectedItems,this),n.push(this)),i._internalSelection||i._selectionChanged(t,n),!0},rotate:function(e,n,i){var o,r,s,a,l=this.visual.rotate();return e!==t&&(i!==!1&&this.diagram&&this.diagram.undoRedoService&&e!==l.angle&&this.diagram.undoRedoService.add(new F.RotateUnit(this.diagram._resizingAdorner,[this],[l.angle]),!1),o=this.bounds(),r=new J(o.width/2,o.height/2),n&&(s=e-l.angle,a=o.center().rotate(n,360-s).minus(r),this._rotationOffset=this._rotationOffset.plus(a.minus(o.topLeft())),this.position(a)),this.visual.rotate(e,r),this.options.rotation.angle=e,this.diagram&&this.diagram._connectorsAdorner&&this.diagram._connectorsAdorner.refresh(),this.refreshConnections(),this.diagram&&this.diagram.trigger(Oe,{item:this})),l},connections:function(e){var t,n,i,o,r,s,a,l=[];for(t=0;t<this.connectors.length;t++)for(r=this.connectors[t],o=r.connections,n=0,o;n<o.length;n++)i=o[n],"out"==e?(s=i.source(),s.shape&&s.shape==this&&l.push(i)):"in"==e?(a=i.target(),a.shape&&a.shape==this&&l.push(i)):l.push(i);return l},refreshConnections:function(){e.each(this.connections(),function(){this.refresh()})},getConnector:function(e){var t,n;if(!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(n=this.connectors[t],n.options.name.toLocaleLowerCase()==e)return n},getPosition:function(e){var t=this.bounds(),n=e.charAt(0).toLowerCase()+e.slice(1);return _e(t[n])?this._transformPoint(t[n]()):t.center()},redraw:function(e){var t,n;e&&(t=this.options,this.shapeVisual.redraw(this._visualOptions(e)),this._diffNumericOptions(e,[st,at,lt,ct])&&(this.bounds(new $(t.x,t.y,t.width,t.height)),n=!0),e.connectors&&(t.connectors=e.connectors,this._updateConnectors()),t=L(t,e),(e.rotation||n)&&this._rotate(),t.content&&this.content(t.content))},_updateConnectors:function(){var e,t,n,i,o=this.connections();for(this.connectors=[],this._createConnectors(),i=0;i<o.length;i++)e=o[i],t=e.source(),n=e.target(),t.shape&&t.shape===this?e.source(this.getConnector(t.options.name)||null):n.shape&&n.shape===this&&e.target(this.getConnector(n.options.name)||null),e.updateModel()},_diffNumericOptions: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(Ce,{item:this,bounds:this._bounds.clone()})},_transformPoint:function(e){var t=this.rotate(),n=this.bounds(),i=n.topLeft();return t.angle&&e.rotate(t.center().plus(i),360-t.angle),e},_transformedBounds:function(){var e=this.bounds(),t=e.topLeft(),n=e.bottomRight();return $.fromPoints(this.diagram.modelToView(t),this.diagram.modelToView(n))},_rotatedBounds:function(){var e=this.bounds().rotatedBounds(this.rotate().angle),t=e.topLeft(),n=e.bottomRight();return $.fromPoints(t,n)},_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,n=t.hover,i=t.stroke,o=t.fill;e&&me(n.stroke)&&(i=L({},i,n.stroke)),e&&me(n.fill)&&(o=n.fill),this.shapeVisual.redraw({stroke:i,fill:o}),t.editable&&t.editable.connect&&this.diagram._showConnectors(this,e)},_hitTest:function(e){if(this.visible()){var t,n=this.bounds(),i=this.rotate().angle;if(e.isEmpty&&!e.isEmpty())return ee.rects(e,n,i?i:0);if(t=e.clone().rotate(n.center(),i),n.contains(t))return this}},toJSON:function(){return{shapeId:this.options.id}},createShapeVisual:function(){var e,t=this.options,n=this._visualOptions(t),i=t.visual,o=(t.type+"").toLocaleLowerCase();n.width=t.width,n.height=t.height,_e(i)?e=i.call(this,t):n.data?(e=new Y(n),g(e)):e="rectangle"==o?new j(n):"circle"==o?new q(n):"text"==o?new X(n):"image"==o?new Z(n):new Y(n),this.shapeVisual=e,this.visual.append(this.shapeVisual)}}),k=b.extend({init:function(e,t,n){var i=this;b.fn.init.call(i,n),this.updateOptionsFromModel(),this._initRouter(),i.path=new F.Polyline(i.options),i.path.fill(rt),i.visual.append(i.path),i._sourcePoint=i._targetPoint=new J,i._setSource(e),i._setTarget(t),i.content(i.options.content),i.definers=[],ge(n)&&n.points&&i.points(n.points)},options:{hover:{stroke:{}},startCap:je,endCap:je,points:[],selectable:!0,fromConnector:Fe,toConnector:Fe},_setOptionsFromModel:function(e){this.updateOptionsFromModel(e||this.dataItem)},updateOptionsFromModel:function(e){var t,n,i,o;this.diagram&&this.diagram._isEditable&&(t=this.diagram._dataMap,n=a(e||this.dataItem),e?(ge(n.from)?(i=t[n.from],i&&ge(n.fromConnector)&&(i=i.getConnector(n.fromConnector)),this.source(i)):ge(n.fromX)&&ge(n.fromY)&&this.source(new J(n.fromX,n.fromY)),ge(n.to)?(o=t[n.to],o&&ge(n.toConnector)&&(o=o.getConnector(n.toConnector)),this.target(o)):ge(n.toX)&&ge(n.toY)&&this.target(new J(n.toX,n.toY)),ge(n.type)&&this.type()!==n.type&&(this.points([]),this.type(n.type)),this.dataItem=e,this._template(),this.redraw(this.options)):this.options=L({},n,this.options))},updateModel:function(e){if(this.diagram&&this.diagram._isEditable&&this.diagram.connectionsDataSource){var t=this.diagram.connectionsDataSource.getByUid(this.dataItem.uid);t&&(this.diagram._suspendModelRefresh(),ge(this.options.fromX)&&null!==this.options.fromX?(p("from",t),p("fromConnector",t),t.set("fromX",this.options.fromX),t.set("fromY",this.options.fromY)):(t.set("from",this.options.from),ge(t.fromConnector)&&t.set("fromConnector",this.sourceConnector?this.sourceConnector.options.name:null),p("fromX",t),p("fromY",t)),ge(this.options.toX)&&null!==this.options.toX?(p("to",t),p("toConnector",t),t.set("toX",this.options.toX),t.set("toY",this.options.toY)):(t.set("to",this.options.to),ge(t.toConnector)&&t.set("toConnector",this.targetConnector?this.targetConnector.options.name:null),p("toX",t),p("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 n,i=e instanceof y,o=this.options.fromConnector||Fe;i&&!e.getConnector(o)||(e!==t&&(this.from=e),this._removeFromSourceConnector(),null===e?this.sourceConnector&&(this._sourcePoint=(this._resolvedSourceConnector||this.sourceConnector).position(),this._clearSourceConnector(),this._setFromOptions(null,this._sourcePoint)):e instanceof w?(n=e.shape.dataItem,n&&this._setFromOptions(n.id),this.sourceConnector=e,this.sourceConnector.connections.push(this)):e instanceof J?(this._setFromOptions(null,e),this._sourcePoint=e,this.sourceConnector&&this._clearSourceConnector()):i&&(n=e.dataItem,n&&this._setFromOptions(n.id),this.sourceConnector=e.getConnector(o),this.sourceConnector.connections.push(this)))},source:function(e,t){return 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 n,i=e instanceof y,o=this.options.toConnector||Fe;i&&!e.getConnector(o)||(e!==t&&(this.to=e),this._removeFromTargetConnector(),null===e?this.targetConnector&&(this._targetPoint=(this._resolvedTargetConnector||this.targetConnector).position(),this._clearTargetConnector(),this._setToOptions(null,this._targetPoint)):e instanceof w?(n=e.shape.dataItem,n&&this._setToOptions(n.id),this.targetConnector=e,this.targetConnector.connections.push(this)):e instanceof J?(this._setToOptions(null,e),this._targetPoint=e,this.targetConnector&&this._clearTargetConnector()):i&&(n=e.dataItem,n&&this._setToOptions(n.id),this.targetConnector=e.getConnector(o),this.targetConnector.connections.push(this)))},target:function(e,n){return me(e)&&(n&&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 n,i,o,r,s=this,a=s.diagram;e instanceof w&&!a.getShapeById(e.shape.id)?(n=e.shape.dataItem,i=e.options.name,o=function(){var o=a._dataMap[n.id];e=o.getConnector(i),s[t](e,!1),s.updateModel()},a._dataMap[n.id]?o():(r=a._inactiveShapeItems.getByUid(n.uid),r&&a._deferredConnectionUpdates.push(r.onActivate(o)))):s[t](e,!1)},content:function(e){var t=this._content(e);return 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,n,i,o,r,s,a,l,c,d,u,h,f,p,m;if(this._contentVisual){for(e=pt,t=this.allPoints(),n=ye.floor(t.length/2),i=n-1;i>0&&t[i].equals(t[n]);)i--,n++;o=t[n],r=t[i],s=this._contentVisual._measure(),a=s.width,l=s.height,c=t.length%2===0,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=R.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)):(f=ye.floor(t.length/2),u=t[f].clone(),r=t[f-1],o=t[f+1],p=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+=p,u.y+=m),this._contentVisual.position(u)}},select:function(e){var n,i,o=this.diagram;if(this._canSelect()&&this.isSelected!==e)return this.isSelected=e,n=[],i=[],this.isSelected?(this.adorner=new te(this,this.options.selection),o._adorn(this.adorner,!0),o._selectedItems.push(this),n.push(this)):this.adorner&&(o._adorn(this.adorner,!1),le.remove(o._selectedItems,this),this.adorner=t,i.push(this)),this.adorner&&this.adorner.refresh(),o._internalSelection||o._selectionChanged(n,i),!0},bounds:function(e){return!e||be(e)?this._bounds:(this._bounds=e,t)},type:function(e){var n=this.options;return e?(e!==n.type&&(n.type=e,this._initRouter(),this.refresh()),t):n.type},_initRouter:function(){var e=(this.options.type||"").toLowerCase();this._router=e==xe?new fe(this):new he(this)},points:function(e){var t,n,i,o;if(!e){if(i=[],me(this.definers))for(o=0;o<this.definers.length;o++)i.push(this.definers[o].point);return i}for(this.definers=[],t=0;t<e.length;t++)if(n=e[t],n instanceof F.Point)this.definers.push(new F.PathDefiner(n));else{if(!n.hasOwnProperty("x")||!n.hasOwnProperty("y"))throw"A Connection point needs to be a Point or an object with x and y properties.";this.definers.push(new F.PathDefiner(new J(n.x,n.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,n,r,s=this,a=s.source(),l=s.target();a instanceof J?e=a:a instanceof w&&(n=i(a)?a.shape.connectors:[a]),l instanceof J?t=l:l instanceof w&&(r=i(l)?l.shape.connectors:[l]),e?r&&(s._resolvedTargetConnector=o(e,r)):n&&(t?s._resolvedSourceConnector=o(t,n):r&&this._resolveAutoConnectors(n,r))},_resolveAutoConnectors:function(e,t){var n,o,r,s,a,l,c,d,u,h,f,p=He,m=He;for(u=0;u<e.length;u++)if(c=e[u],!i(c))for(r=c.position(),h=0;h<t.length;h++)d=t[h],i(d)||(s=d.position(),f=ye.round(r.distanceTo(s)),f<p&&this.diagram&&this._testRoutePoints(r,s,c,d)&&(p=f,n=c,o=d),f<m&&(a=c,l=d,m=f));n&&(a=n,l=o),this._resolvedSourceConnector=a,this._resolvedTargetConnector=l},_testRoutePoints:function(e,t,n,i){var o,r,s,a,l,c,d=this._router,u=!0;if(d instanceof fe)for(o=d.routePoints(e,t,n,i),l=this._getRouteExclude(e,t,n.shape,i.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,n,i){var o=[];return this._isPointInsideShape(e,n)&&o.push(n),this._isPointInsideShape(t,i)&&o.push(i),o},_isPointInsideShape:function(e,t){var n,i,o,r=t.bounds(),s=t.rotate().angle,a=r.x,l=r.y;return n=e.clone().rotate(r.center(),s),i=n.x,o=n.y,i>a&&i<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,n=L({},{options:this.options,from:e,to:t});return ge(this.dataItem)&&(n.dataItem=""+this.dataItem),n.options.points=this.points(),n},_hitTest:function(e){if(this.visible()){var t=new J(e.x,e.y),n=this.sourcePoint(),i=this.targetPoint();if(e.isEmpty&&!e.isEmpty()&&e.contains(n)&&e.contains(i))return this;if(this._router.hitTest(t))return this}},_hover:function(e){var t=(this.options.stroke||{}).color;e&&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,n;this._router&&this._router.route(),e=this.sourcePoint(),t=this.targetPoint(),n=this.points(),this.path.redraw({points:[e].concat(n,[t])})},_clearSourceConnector:function(){this.sourceConnector=t,this._resolvedSourceConnector=t},_clearTargetConnector:function(){this.targetConnector=t,this._resolvedTargetConnector=t},_removeFromSourceConnector:function(){this.sourceConnector&&le.remove(this.sourceConnector.connections,this)},_removeFromTargetConnector:function(){this.targetConnector&&le.remove(this.targetConnector.connections,this)},toJSON:function(){var e,t,n,i=this;return i.from&&i.from.toJSON?e=i.from.toJSON():(n=i._sourcePoint,e={x:n.x,y:n.y}),i.to&&i.to.toJSON?t=i.to.toJSON():(n=i._targetPoint,t={x:n.x,y:n.y}),{from:e,to:t}}}),x=z.extend({init:function(e,t){var n=this;kendo.destroy(e),z.fn.init.call(n,e,t),n._initTheme(),n._initElements(),n._extendLayoutOptions(n.options),n._initDefaults(t),n._interactionDefaults(),n._initCanvas(),n.mainLayer=new W({id:"main-layer"}),n.canvas.append(n.mainLayer),n._shapesQuadTree=new E(n),n._pan=new J,n._adorners=[],n.adornerLayer=new W({id:"adorner-layer"}),n.canvas.append(n.adornerLayer),n._createHandlers(),n._initialize(),n._resizingAdorner=new re(n,{editable:n.options.editable}),n._connectorsAdorner=new se(n),n._adorn(n._resizingAdorner,!0),n._adorn(n._connectorsAdorner,!0),n.selector=new oe(n),n._clipboard=[],n.pauseMouseHandlers=!1,n._fetchFreshData(),n._createGlobalToolBar(),n._createOptionElements(),n.zoom(n.options.zoom),n.canvas.draw()},options:{name:"Diagram",theme:"default",layout:"",zoomRate:.1,zoom:1,zoomMin:0,zoomMax:2,dataSource:{},draggable:!0,template:"",autoBind:!0,editable:{rotate:{},resize:{},text:!0,tools:[],drag:{snap:{size:10,angle:10}},remove:!0},pannable:{},selectable:{key:"none"},tooltip:{enabled:!0,format:"{0}"},copy:{enabled:!0,offsetX:20,offsetY:20},shapeDefaults:F.shapeDefaults({undoable:!0}),connectionDefaults:{editable:{tools:[]},type:xe},shapes:[],connections:[]},events:[We,Ue,Ve,Ne,Oe,Ce,Se,Te,Me,Re,"toolBarClick","save","cancel","edit","remove","add","dataBound",Ee,De,Ae],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,n,i,o,r;(this.editor&&this.editor.end()||!this.editor)&&(e=this.dataSource,t=e.view()||[],n=t.length,i=f(e,{}),o=this._createShape(i,{}),this.trigger("add",{shape:o})||(e.insert(n,i),r=this._inactiveShapeItems.getByUid(i.uid),r.element=o,this.edit(o)))},_createShape:function(e,t){t=L({},this.options.shapeDefaults,t),t.dataItem=e;var n=new y(t,this);return n},createConnection:function(){var e,t,n,i,o;(this.editor&&this.editor.end()||!this.editor)&&(e=this.connectionsDataSource,t=e.view()||[],n=t.length,i=f(e,{}),o=this._createConnection(i),this.trigger("add",{connection:o})||(this._connectionsDataMap[i.uid]=o,e.insert(n,i),this.addConnection(o,!1),this.edit(o)))},_createConnection:function(e,t,n){var i,o=L({},this.options.connectionDefaults);return o.dataItem=e,i=new k(t||new J,n||new J,o)},editModel:function(e,t){var n,i,o,r;if(this.cancelEdit(),o=this.options.editable,"shape"==t)n=o.shapeEditors,i=o.shapeTemplate;else{if("connection"!=t)return;r=B(l,this),n=L({},{from:r,to:r},o.connectionEditors),i=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:n,template:i}),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,n=t.editable,i=t.shapeDefaults,o=t.connectionDefaults,r=(e||{}).shapeDefaults;n===!1?(i.editable=!1,o.editable=!1):(m(n,i.editable,["drag","remove","connect"]),m(n,o.editable,["drag","remove"])),r&&r.connectors&&(t.shapeDefaults.connectors=r.connectors)},_interactionDefaults:function(){var e=this.options,t=e.selectable,n=e.pannable,i=kendo.support.mobileOS;t&&!ge(t.multiple)&&(e.selectable=L({multiple:!i},e.selectable)),n&&!ge(n.key)&&(e.pannable=L({key:i?"none":"ctrl"},e.pannable))},_initCanvas:function(){var t=e("<div class='k-layer'></div>").appendTo(this.scrollable)[0],n=this.viewport();this.canvas=new U(t,{width:n.width||qe,height:n.height||Ge})},_createHandlers:function(){var e=this,t=e.element;t.on(dt,B(e._wheel,e)).on("keydown"+ke,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)}),e.toolService=new ie(e),this.scrollable.on("mouseover"+ke,B(e._mouseover,e)).on("mouseout"+ke,B(e._mouseout,e)).on("mousemove"+ke,B(e._mouseMove,e)).on("mousedown"+ke,B(e._mouseDown,e)).on("mouseup"+ke,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(Ve,B(e._destroyToolBar,e))},_dragStart:function(e){var t,n;this._pauseMouseHandlers=!0,t=this._eventPositions(e,!0),n=e.event,this.toolService.start(t,this._meta(n))&&(this._destroyToolBar(),n.preventDefault())},_drag:function(e){var t=this._eventPositions(e),n=e.event;this.toolService.move(t,this._meta(n))&&n.preventDefault()},_dragEnd:function(e){var t,n;this._pauseMouseHandlers=!1,t=this._eventPositions(e),n=e.event,this.toolService.end(t,this._meta(n))&&(this._createToolBar(),n.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,n,i,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&&(n=r.multiple!==!1,i=kendo.support.mobileOS||this._meta(e.event).ctrlKey,t.isSelected?i?(this._destroyToolBar(),t.select(!1)):this._createToolBar(a):(this._destroyToolBar(),this.select(t,{addToSelection:n&&i}),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=n(e),i=this._eventPositions(e),o=L(this._meta(e),{delta:t});this.toolService.wheel(i,o)&&e.preventDefault()},_meta:function(e){return{ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,shiftKey:e.shiftKey,type:e.type}},_eventPositions:function(e,t){var n,i,o;return e.touch?(i=t?"startLocation":"location",n=new J(e.x[i],e.y[i])):(o=e.originalEvent,n=new J(o.pageX,o.pageY)),this.documentToModel(n)},_gestureStart:function(e){var t,n;this._destroyToolBar(),this.scroller.disable(),t=this.documentToModel(new J(e.center.x,e.center.y)),n={point:t,zoom:this.zoom()},this.trigger(Ue,n)||(this._gesture=e,this._initialCenter=t)},_gestureChange:function(e){var t,n,i=this._gesture,o=this._initialCenter,r=this.documentToView(new J(e.center.x,e.center.y)),s=e.distance/i.distance,a=this._zoom,l=!1;ye.abs(s-1)>=ut&&(this._zoom=a=this._getValidZoom(a*s),this.options.zoom=a,this._gesture=e,l=!0),t=o.times(a),n=r.minus(t),(l||this._pan.distanceTo(n)>=ht)&&(this._panTransform(n),this._updateAdorners()),e.preventDefault()},_gestureEnd:function(){this.options.pannable!==!1&&this.scroller.enable(),this.trigger(We,{point:this._initialCenter,zoom:this.zoom()})},_resize:function(){var e=this.viewport();this.canvas&&this.canvas.size(e),this.scrollable&&this.toolBar&&this.scrollable.height(e.height)},_mouseover:function(e){var t=e.target._kendoNode;t&&t.srcElement._hover&&t.srcElement._hover(!0,t.srcElement)},_mouseout:function(e){var t=e.target._kendoNode;t&&t.srcElement._hover&&t.srcElement._hover(!1,t.srcElement)},_initTheme:function(){var e=this,t=M.ui.themes||{},n=((e.options||{}).theme||"").toLowerCase(),i=(t[n]||{}).diagram;e.options=L({},i,e.options),e.options.editable===!0&&L(e.options,{editable:(i||{}).editable})},_createOptionElements:function(){var e=this.options,t=e.shapes.length;t&&this._createShapes(),e.connections.length&&this._createConnections(),t&&e.layout&&this.layout(e.layout)},_createShapes:function(){var e,t,n=this,i=n.options,o=i.shapes;for(t=0;t<o.length;t++)e=o[t],n.addShape(e)},_createConnections:function(){var e,t,n,i,o=this,r=o.options,s=r.connectionDefaults,a=r.connections;for(i=0;i<a.length;i++)e=a[i],t=o._findConnectionTarget(e.from),n=o._findConnectionTarget(e.to),o.connect(t,n,L({},s,e))},_findConnectionTarget:function(e){var t,n,i;return e=e||{},t=this,n=be(e)?e:e.shapeId||e.id,n?(i=t.getShapeById(n),e.connector&&(i=i.getConnector(e.connector))):i=new J(e.x||0,e.y||0),i},destroy:function(){var e=this;z.fn.destroy.call(e),this._userEvents&&this._userEvents.destroy(),kendo.unbindResize(e._resizeHandler),e.clear(),e.element.off(ke),e.scroller.wrapper.off(ke),e.canvas.destroy(!0),e.canvas=t,e._destroyEditor(),e.destroyScroller(),e._destroyGlobalToolBar(),e._destroyToolBar()},destroyScroller:function(){var e=this.scroller;e&&(e.destroy(),e.element.remove(),this.scroller=null)},save:function(){var e,t,n,i={shapes:[],connections:[]};for(e=0;e<this.shapes.length;e++)n=this.shapes[e],n.options.serializable&&i.shapes.push(n.options);for(e=0;e<this.connections.length;e++)t=this.connections[e],i.connections.push(L({},t.options,t.toJSON()));return i},focus:function(){if(!this.element.is(kendo._activeElement())){var e,t=this.element,n=t[0],i=[],o=[],r=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),o.push(n.scrollTop));while(n!=r);for(t.focus(),e=0;e<i.length;e++)i[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,n){var i,o;return this.connectionsDataSource&&this._isEditable?(o=this.connectionsDataSource.add({}),i=this._connectionsDataMap[o.uid],i.source(e),i.target(t),i.redraw(n),i.updateModel()):(i=new k(e,t,L({},this.options.connectionDefaults,n)),this.addConnection(i)),i},connected:function(e,t){var n,i;for(n=0;n<this.connections.length;n++)if(i=this.connections[n],i.from==e&&i.to==t)return!0;return!1},addConnection:function(e,t){return t!==!1&&this.undoRedoService.add(new F.AddConnectionUnit(e,this),!1),e.diagram=this,e._setOptionsFromModel(),e.refresh(),this.mainLayer.append(e.visual),this.connections.push(e),this.trigger(Se,{added:[e],removed:[]}),e},_addConnection:function(e,t){var n,i=this.connectionsDataSource;if(i&&this._isEditable){if(n=f(i,u(e.dataItem)),e.dataItem=n,e.updateModel(),!this.trigger("add",{connection:e}))return this._connectionsDataMap[n.uid]=e,i.add(n),this.addConnection(e,t),e._updateConnectors(),e}else if(!this.trigger("add",{connection:e}))return this.addConnection(e,t),e._updateConnectors(),e},addShape:function(e,t){var n,i=this.options.shapeDefaults;if(e instanceof y)n=e;else{if(e instanceof kendo.Class)return;i=L({},i,e||{}),n=new y(i,this)}return t!==!1&&this.undoRedoService.add(new F.AddShapeUnit(n,this),!1),this.shapes.push(n),n.diagram!==this&&(this._shapesQuadTree.insert(n),n.diagram=this),this.mainLayer.append(n.visual),this.trigger(Se,{added:[n],removed:[]}),n},_addShape:function(e,t){var n,i,o=this,r=o.dataSource;if(r&&this._isEditable){if(n=f(r,u(e.dataItem)),e.dataItem=n,e.updateModel(),!this.trigger("add",{shape:e}))return this.dataSource.add(n),i=this._inactiveShapeItems.getByUid(n.uid),i.element=e,i.undoable=t,e}else if(!this.trigger("add",{shape:e}))return this.addShape(e,t)},remove:function(e,t){var n,i,o,r;for(e=ve(e)?e.slice(0):[e],n=h(e),i=n.shapes,o=n.connections,ge(t)||(t=!0),t&&this.undoRedoService.begin(),this._suspendModelRefresh(),r=i.length-1;r>=0;r--)this._removeItem(i[r],t,o);for(r=o.length-1;r>=0;r--)this._removeItem(o[r],t);this._resumeModelRefresh(),t&&this.undoRedoService.commit(!1),this.trigger(Se,{added:[],removed:e})},_removeShapeDataItem:function(e){this._isEditable&&(this.dataSource.remove(e.dataItem),delete this._dataMap[e.dataItem.id])},_removeConnectionDataItem:function(e){this._isEditable&&(this.connectionsDataSource.remove(e.dataItem),delete this._connectionsDataMap[e.dataItem.uid])},_triggerRemove:function(e){var t,n,i,o,r=[];for(o=0;o<e.length;o++)t=e[o],i=t.options.editable,n=t instanceof y?{shape:t}:{connection:t},i&&i.remove!==!1&&!this.trigger("remove",n)&&r.push(t);return r},undo:function(){this.undoRedoService.undo()},redo:function(){this.undoRedoService.redo()},select:function(e,t){if(!me(e))return this._selectedItems;t=L({addToSelection:!1},t);var n,i,o=t.addToSelection,r=[],s=[];for(o||this.deselect(),this._internalSelection=!0,e instanceof Array?r=e:e instanceof b&&(r=[e]),n=0;n<r.length;n++)i=r[n],i.select(!0)&&s.push(i);this._selectionChanged(s,[]),this._internalSelection=!1},selectAll:function(){this.select(this.shapes.concat(this.connections))},selectArea:function(e){var t,n,i,o;if(this._internalSelection=!0,o=[],e instanceof $)for(n=this.shapes.concat(this.connections),t=0;t<n.length;t++)i=n[t],e&&!i._hitTest(e)||!i.options.enable||i.select(!0)&&o.push(i);this._selectionChanged(o,[]),this._internalSelection=!1},deselect:function(e){this._internalSelection=!0;var t,n,i=[],o=[];for(e instanceof Array?o=e:e instanceof b?o.push(e):me(e)||(o=this._selectedItems.slice(0)),n=0;n<o.length;n++)t=o[n],t.select(!1)&&i.push(t);this._selectionChanged([],i),this._internalSelection=!1},toFront:function(e,t){var n,i,o;e||(e=this._selectedItems.slice()),n=this._getDiagramItems(e),!ge(t)||t?(i=r(this.mainLayer,n.visuals),o=new ue(this,e,i),this.undoRedoService.add(o)):(this.mainLayer.toFront(n.visuals),this._fixOrdering(n,!0))},toBack:function(e,t){var n,i,o;e||(e=this._selectedItems.slice()),n=this._getDiagramItems(e),!ge(t)||t?(i=r(this.mainLayer,n.visuals),o=new de(this,e,i),this.undoRedoService.add(o)):(this.mainLayer.toBack(n.visuals),this._fixOrdering(n,!1))},bringIntoView:function(e,t){var n,i,o,r,s=this.viewport(),a=new 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?i=e.bounds(it):ve(e)?i=this.boundingBox(e):e instanceof $&&(i=e.clone()),o=i.clone(),i.zoom(this._zoom),(i.width>s.width||i.height>s.height)&&(this._zoom=this._getValidZoom(ye.min(s.width/o.width,s.height/o.height)),i=o.clone().zoom(this._zoom)),this._zoomMainLayer(),n=i.clone(),a.align(i,t.align),r=i.topLeft().minus(n.topLeft()),this.pan(r.times(-1),t.animate))},alignShapes:function(e){var t,n,i,o,r,s,a;if(pe(e)&&(e="Left"),t=this.select(),0!==t.length){switch(e.toLowerCase()){case"left":case"top":n=et;break;case"right":case"bottom":n=tt}for(o=0;o<t.length;o++)if(i=t[o],i instanceof y)switch(e.toLowerCase()){case"left":n=ye.min(n,i.options.x);break;case"top":n=ye.min(n,i.options.y);break;case"right":n=ye.max(n,i.options.x);break;case"bottom":n=ye.max(n,i.options.y)}for(r=[],s=[],o=0;o<t.length;o++)if(i=t[o],i instanceof y)switch(s.push(i),r.push(i.bounds()),e.toLowerCase()){case"left":case"right":i.position(new J(n,i.options.y));break;case"top":case"bottom":i.position(new J(i.options.x,n))}a=new F.TransformUnit(s,r),this.undoRedoService.add(a,!1)}},zoom:function(e,t){var n,i,o,r;return e&&(n=t?t.point:new F.Point(0,0),e=this._zoom=this._getValidZoom(e),pe(n)||(n=new F.Point(ye.round(n.x),ye.round(n.y)),i=n.times(e),o=this.modelToView(n),r=o.minus(i),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,n){var i,o;return e instanceof J?(i=this,o=i.scroller,e=i._getPan(e),e=e.times(-1),n?o.animatedScrollTo(e.x,e.y,function(){i._updateAdorners()}):(o.scrollTo(e.x,e.y),i._updateAdorners()),t):this._pan.times(-1)},viewport:function(){var e=this.element,t=e.width(),n=e.height();return this.toolBar&&(n-=N(this.toolBar.element)),new $(0,0,t,n)},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,n,i,o,r,s,a;if(this._clipboard.length>0){for(i={},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(),n=0;n<s.length;n++)e=s[n],t=e.clone(),i[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(n=0;n<r.length;n++)e=r[n],t=this._addConnection(e.clone()),t&&(this._updateCopiedConnection(t,e,"source",i,a),this._updateCopiedConnection(t,e,"target",i,a),t.select(!0),t.updateModel());this._syncChanges(),this._copyOffset+=1}},_updateCopiedConnection:function(e,t,n,i,o){var r,s,a,l=t[n](),c=this;l instanceof w&&i[l.shape.id]?(a=i[l.shape.id],c.getShapeById(a.id)?e[n](a.getConnector(l.options.name)):(s=c._inactiveShapeItems.getByUid(a.dataItem.uid),s&&(r=function(t){a=c._dataMap[t.id],e[n](a.getConnector(l.options.name)),e.updateModel()},c._deferredConnectionUpdates.push(s.onActivate(r))))):e[n](new J(t[n+"Point"]().x+o.x,t[n+"Point"]().y+o.y))},boundingBox:function(e,t){var n,i,o,r=$.empty(),s=me(e)?this._getDiagramItems(e):{shapes:this.shapes};if(s.shapes.length>0)for(i=s.shapes[0],r=i.bounds(ot),o=1;o<s.shapes.length;o++)i=s.shapes[o],n=i.bounds(ot),t===!0&&(n.x-=i._rotationOffset.x,n.y-=i._rotationOffset.y),r=r.union(n);return r},_containerOffset:function(){var e=this.element.offset();return this.toolBar&&(e.top+=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 n,i,o=e;return e instanceof J?t&&(o=t.apply(e)):(n=this._transformWithMatrix(e.topLeft(),t),i=this._transformWithMatrix(e.bottomRight(),t),o=$.fromPoints(n,i)),o},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&this.dataSource.fetch()},setConnectionsDataSource:function(e){this.options.connectionsDataSource=e,this._connectionDataSource(),this.options.autoBind&&this.connectionsDataSource.fetch()},layout:function(e){var t,n,i,o,r;switch(this._layouting=!0,pe(e)&&(e=this.options.layout),t=pe(e)||pe(e.type)?"Tree":e.type,t.toLowerCase()){case"tree":n=new F.TreeLayout(this);break;case"layered":n=new F.LayeredLayout(this);break;case"forcedirected":case"force":case"spring":case"springembedder":n=new F.SpringLayout(this);break;default:throw"Layout algorithm '"+t+"' is not supported."}i=new F.LayoutState(this),o=n.layout(e),o&&(r=new F.LayoutUndoUnit(i,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(Ne,{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,n=e||t._pan;t.canvas.translate?(t.scroller.scrollTo(n.x,n.y),t._zoomMainLayer()):(t._storePan(n),t._transformMainLayer())},_finishPan:function(){this.trigger(Ve,{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,n=new G(e.x,e.y,t,t);n.render(this.mainLayer),this._storeLayerMatrix(n),this._storeViewMatrix()},_storeLayerMatrix:function(e){this._layerMatrix=e.toMatrix(),this._layerMatrixInvert=e.invert().toMatrix()},_storeViewMatrix:function(){var e=this._pan,t=this._zoom,n=new G(e.x,e.y,t,t);this._matrix=n.toMatrix(),this._matrixInvert=n.invert().toMatrix()},_toIndex:function(e,t){var n=this._getDiagramItems(e);this.mainLayer.toIndex(n.visuals,t),this._fixOrdering(n,!1)},_fixOrdering:function(e,t){var n,i,o=t?this.shapes.length-1:0,r=t?this.connections.length-1:0;for(n=0;n<e.shapes.length;n++)i=e.shapes[n],le.remove(this.shapes,i),le.insert(this.shapes,i,o);for(n=0;n<e.cons.length;n++)i=e.cons[n],le.remove(this.connections,i),le.insert(this.connections,i,r)},_getDiagramItems:function(e){var t,n,i={},o=e;for(i.visuals=[],i.shapes=[],i.cons=[],e?ve(e)||(o=[e]):o=this._selectedItems.slice(),t=0;t<o.length;t++)n=o[t],n instanceof y?(i.shapes.push(n),i.visuals.push(n.visual)):n instanceof k&&(i.cons.push(n),i.visuals.push(n.visual));return i},_removeItem:function(e,t,n){e.select(!1),e instanceof y?(this._removeShapeDataItem(e),this._removeShape(e,t,n)):e instanceof k&&(this._removeConnectionDataItem(e),this._removeConnection(e,t)),this.mainLayer.remove(e.visual)},_removeShape:function(e,t,n){var i,o,r,s,a=[],l=[];for(this.toolService._removeHover(),t&&this.undoRedoService.addCompositeItem(new K(e)),
le.remove(this.shapes,e),this._shapesQuadTree.remove(e),i=0;i<e.connectors.length;i++)for(r=e.connectors[i],s=0;s<r.connections.length;s++)o=r.connections[s],n&&M.inArray(o,n)||(o.sourceConnector==r?a.push(o):o.targetConnector==r&&l.push(o));for(i=0;i<a.length;i++)a[i].source(null,t),a[i].updateModel();for(i=0;i<l.length;i++)l[i].target(null,t),l[i].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 n,i,o,r;for(e=ve(e)?e:[e];e.length;)if(n=e.shift(),o=this._dataMap[n.uid],o&&(this._removeShapeConnections(o),this._removeItem(o,!1),delete this._dataMap[n.uid],t&&n.hasChildren&&n.loaded()))for(i=n.children.data(),r=0;r<i.length;r++)e.push(i[r])},_removeShapeConnections:function(e){var t,n=e.connections();if(n)for(t=0;t<n.length;t++)this._removeItem(n[t],!1)},_addDataItem:function(e,t){var n,i;if(ge(e))return(n=this._dataMap[e.id])?n:(i=L({},this.options.shapeDefaults),i.dataItem=e,n=new y(i,this),this.addShape(n,t!==!1),this._dataMap[e.id]=n,n)},_addDataItemByUid:function(e){var t,n;if(ge(e))return(t=this._dataMap[e.uid])?t:(n=L({},this.options.shapeDefaults),n.dataItem=e,t=new y(n,this),this.addShape(t),this._dataMap[e.uid]=t,t)},_addDataItems:function(e,t){var n,i,o,r,s;for(i=0;i<e.length;i++)n=e[i],o=this._addDataItemByUid(n),r=this._addDataItemByUid(t),r&&!this.connected(r,o)&&(s=this.connect(r,o))},_refreshSource:function(e){var t,n,i=this,o=e.node,r=e.action,s=e.items,a=i.options;if(e.field)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,n=!0),r||o||i.clear(),this._addDataItems(s,o),t=0;t<s.length;t++)s[t].load();a.layout&&(n||"remove"==r||"add"==r)&&i.layout(a.layout),n&&(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,n,i,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&&(n=t.options.editable,i=n.tools,this._isEditable&&0===i.length&&(t instanceof y?i=["edit","rotateClockwise","rotateAnticlockwise"]:t instanceof k&&(i=["edit"]),n&&n.remove!==!1&&i.push("delete")),i&&i.length&&(o=20,this.singleToolBar=new C(d,{tools:i,click:B(this._toolBarClick,this),modal:!0}),s=H(this.singleToolBar._popup.element),a=N(this.singleToolBar._popup.element),t instanceof y?(l=this.modelToView(t.bounds(ot)),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 ne({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,n,i=this._dataMap;for(n=0;n<e.length;n++)t=e[n],i[t.id]&&(this.remove(i[t.id],!1),i[t.id]=null)},_syncShapes:function(){var e=this,t=e._inactiveShapeItems;t.forEach(function(n){var i=n.dataItem,o=n.element;i.isNew()||(o?(o._setOptionsFromModel(),e.addShape(o,n.undoable),e._dataMap[i.id]=o):e._addDataItem(i),n.activate(),t.remove(i))})},_updateShapes:function(e,t){var n,i,o;for(n=0;n<e.length;n++)i=e[n],o=this._dataMap[i.id],o&&o.updateOptionsFromModel(i,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,n,i;for(t=0;t<e.length;t++)n=e[t],i=this._connectionsDataMap[n.uid],i.updateOptionsFromModel(n)},_addConnections:function(e,t){var n,i,o=e.length;for(n=0;n<o;n++)i=e[n],this._addConnectionDataItem(i,t)},_addConnectionDataItem:function(e,t){var n,i,o,r;this._connectionsDataMap[e.uid]||(n=this._validateConnector(e.from),ge(n)&&null!==n||(n=new J(e.fromX,e.fromY)),i=this._validateConnector(e.to),ge(i)&&null!==i||(i=new J(e.toX,e.toY)),ge(n)&&ge(i)&&(o=L({},this.options.connectionDefaults),o.dataItem=e,r=new k(n,i,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,n=t.dataSource;if(n=ve(n)?{data:n}:n,n instanceof kendo.data.DataSource&&!(n 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.");n.fields||(n.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(n).bind(Se,e._refreshHandler).bind(Ie,e._errorHandler)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(Se,e._refreshHandler).unbind(Ie,e._errorHandler)},_adorn:function(e,n){n!==t&&e&&(n?(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,n=this._adorners;for(e=0;e<n.length;e++)t=n[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=I.transform().translate(-e.x,-e.y),n=new I.Rect([0,0],[e.width,e.height]),i=R.Path.fromRect(n),o=new R.Group({transform:t}),r=new R.Group({clip:i}),s=this.canvas.drawingElement.children[0];return r.append(o),o.children.push(s),r},exportVisual:function(){var e=I.transform().scale(1/this._zoom),t=new R.Group({transform:e}),n=this.mainLayer.drawingElement;return t.children.push(n),t},_syncChanges:function(){this._syncShapeChanges(),this._syncConnectionChanges()},_syncShapeChanges:function(){this.dataSource&&this._isEditable&&this.dataSource.sync()},_syncConnectionChanges:function(){var t=this;t.connectionsDataSource&&t._isEditable&&(e.when.apply(e,t._deferredConnectionUpdates).then(function(){t.connectionsDataSource.sync()}),t.deferredConnectionUpdates=[])}}),M.ExportMixin.extend(x.fn,!0),kendo.PDFMixin&&kendo.PDFMixin.extend(x.fn),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){this._popup&&this._popup.open(e.x,e.y)},hide:function(){this._popup&&this._popup.close()},newGroup:function(){return{type:"buttonGroup",buttons:[]}},editTool:function(){this._tools.push({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,n={},i=e.attr(kendo.attr("action"));return i&&(n.action=i),t=e.attr(kendo.attr("step")),t&&(n.step=t),n},click:function(t){var n=this._getAttributes(e(t.target)),i=n.action;i&&this[i]&&this[i](n),this.trigger("click",this.eventData(i,t.target))},eventData:function(e,t){var n,i,o=this.selectedElements(),r=o.length,s=[],a=[];for(i=0;i<r;i++)n=o[i],n instanceof y?s.push(n):a.push(n);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,n,i=[],o=this.model.fields;for(e in o)t={},this._isEditable(e)&&(n=this.options.editors[e],n&&(t.editor=n),t.field=e,i.push(t));return i},end:function(){return this.editable.end()},destroy:function(){this.editable.destroy(),this.editable.element.find("["+kendo.attr("container-for")+"]").empty(),this.model=this.wrapper=this.element=this.columns=this.editable=null}}),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,n=this;this.wrapper=e('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"),this.model.uid),t="",this.options.template?(t+=this._renderTemplate(),this.fields=[]):t+=this._renderFields(),t+=this._renderButtons(),this.wrapper.append(e('<div class="k-edit-form-container"/>').append(t)),this.window=new kendo.ui.Window(this.wrapper.appendTo(this.element),this.options.window),this.window.bind("close",function(e){e.userTriggered&&(e.sender.element.focus(),n._cancelClick(e))}),this._attachButtonEvents()},_renderTemplate:function(){var e=this.options.template;return"string"==typeof e&&(e=window.unescape(e)),e=kendo.template(e)(this.model)},_renderFields:function(){var e,t,n="";for(e=0;e<this.fields.length;e++)t=this.fields[e],n+='<div class="k-edit-label"><label for="'+t.field+'">'+(t.field||"")+"</label></div>",this._isEditable(t.field)&&(n+="<div "+kendo.attr("container-for")+'="'+t.field+'" class="k-edit-field"></div>');return n},_renderButtons:function(){var e='<div class="k-edit-buttons k-state-default">';return e+=this._createButton("update"),e+=this._createButton("cancel"),e+="</div>"},_createButton:function(e){return kendo.template(ft)(_[e])},_attachButtonEvents:function(){this._cancelClickHandler=B(this._cancelClick,this),this.window.element.on(Te+ke,"a.k-diagram-cancel",this._cancelClickHandler),this._updateClickHandler=B(this._updateClick,this),this.window.element.on(Te+ke,"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(Te+ke,"a.k-diagram-cancel",this._cancelClickHandler),this.window.element.off(Te+ke,"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 n=e.Deferred();return this.callbacks.push({callback:t,deferred:n}),n},activate:function(){var e,t,n=this.callbacks;for(t=0;t<n.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=P.extend({init:function(){this.shapes=[]},_add:function(e,t){this.shapes.push({bounds:t,shape:e}),e._quadNode=this},insert:function(e,t){this._add(e,t)},remove:function(e){var t,n=this.shapes,i=n.length;for(t=0;t<i;t++)if(n[t].shape===e){n.splice(t,1);break}},hitTestRect:function(e,t){var n,i=this.shapes,o=i.length;for(n=0;n<o;n++)if(this._testRect(i[n].shape,e)&&!M.inArray(i[n].shape,t))return!0},_testRect:function(e,t){var n,i=e.rotate().angle,o=e.bounds();return n=i?ee.rects(t,o,-i):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,n=t.bottomRight(),i=e.bottomRight(),o=t.x<=e.x&&t.y<=e.y&&i.x<=n.x&&i.y<=n.y;return o},overlapsBounds:function(e){return this.rect.overlaps(e)},insert:function(e,t){var n,i=!1,o=this.children,r=o.length;if(this.inBounds(t)){if(!r&&this.shapes.length<4)this._add(e,t);else{for(r||this._initChildren(),n=0;n<o.length;n++)if(o[n].insert(e,t)){i=!0;break}i||this._add(e,t)}i=!0}return i},_initChildren:function(){var e,t,n=this.rect,i=this.children,o=this.shapes,r=n.center(),s=n.width/2,a=n.height/2;for(i.push(new A(new $(n.x,n.y,s,a)),new A(new $(r.x,n.y,s,a)),new A(new $(n.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<i.length;e++)if(i[e].insert(o[t].shape,o[t].bounds)){o.splice(t,1);break}},hitTestRect:function(e,t){var n,i=this.children,o=i.length,r=!1;if(this.overlapsBounds(e))if(D.fn.hitTestRect.call(this,e,t))r=!0;else for(n=0;n<o;n++)if(i[n].hitTestRect(e,t)){r=!0;break}return r}}),E=P.extend({ROOT_SIZE:1e3,init:function(e){var t=B(this._boundsChange,this);e.bind(Ce,t),e.bind(Oe,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(ot),n=this.ROOT_SIZE,i=this.getSectors(t),o=i[0][0],r=i[1][0];this.inRoot(i)?this.root.insert(e,t):(this.rootMap[o]||(this.rootMap[o]={}),this.rootMap[o][r]||(this.rootMap[o][r]=new A(new $(o*n,r*n,n,n))),this.rootMap[o][r].insert(e,t))},remove:function(e){e._quadNode&&e._quadNode.remove(e)},inRoot:function(e){return e[0].length>1||e[1].length>1},getSectors:function(e){var t,n,i=this.ROOT_SIZE,o=e.bottomRight(),r=ye.floor(o.x/i),s=ye.floor(o.y/i),a=[[],[]];for(t=ye.floor(e.x/i);t<=r;t++)a[0].push(t);for(n=ye.floor(e.y/i);n<=s;n++)a[1].push(n);return a},hitTestRect:function(e,t){var n,i,o,r,s,a=this.getSectors(e);if(this.root.hitTestRect(e,t))return!0;for(n=0;n<a[0].length;n++)for(o=a[0][n],i=0;i<a[1].length;i++)if(r=a[1][i],s=(this.rootMap[o]||{})[r],s&&s.hitTestRect(e,t))return!0;return!1}}),M.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,n){(n||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,n){(n||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 n(e,t){if(null===t)return t;var n=C(e,!0);return n(t)}function i(e){return typeof e!==F}function o(e,t,n){var i,o,l=a(e),c=a(t),d=u(e)-u(t)<0,h=[];for(h.push(e),i=0;i<n;i++)o={r:r(l.r,c.r,i,n,d),g:r(l.g,c.g,i,n,d),b:r(l.b,c.b,i,n,d)},h.push(s(o));return h.push(t),h}function r(e,t,n,i,o){var r,s=f.min(f.abs(e),f.abs(t)),a=f.max(f.abs(e),f.abs(t)),l=(a-s)/(i+1),c=l*(n+1);return r=o?s+c:a-c}function s(e){return"#"+l(e.r)+l(e.g)+l(e.b)}function a(e){e=e.replace("#","");var t=c(e);return{r:d(t.r),g:d(t.g),b:d(t.b)}}function l(e){var t=f.round(e).toString(16).toUpperCase();return 1===t.length&&(t="0"+t),t}function c(e){var t=e.length,n={};return 3===t?(n.r=e[0],n.g=e[1],n.b=e[2]):(n.r=e.substring(0,2),n.g=e.substring(2,4),n.b=e.substring(4,6)),n}function d(e){return parseInt(e.toString(16),16)}function u(e){var t=0;return e&&(e=a(e),t=f.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)),t}function h(e){var t=f.pow(10,4);return f.round(e*t)/t}var f=Math,p=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",M=Number.MAX_VALUE,R="mouseover"+T,I="mouseleave"+T,F="undefined",z=w.extend({init:function(t,n){g.destroy(t),e(t).empty(),w.fn.init.call(this,t,n),this.wrapper=this.element,this._initTheme(this.options),this.element.addClass("k-widget k-treemap"),this._setLayout(),this._originalOptions=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,n=S.ui.themes||{},i=((e||{}).theme||"").toLowerCase(),o=(n[i]||{}).treeMap;t.options=k({},o,e)},_attachEvents:function(){this.element.on(R,p(this._mouseover,this)).on(I,p(this._mouseleave,this)),this._resizeHandler=p(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 P,this._view=new B(this,this.options))},_initDataSource:function(){var e=this,t=e.options,n=t.dataSource;e._dataChangeHandler=p(e._onDataChange,e),e.dataSource=x.create(n).bind(D,e._dataChangeHandler),n&&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,n,i,o,r=e.node,s=e.items,a=this.options;if(r){if(s.length){for(i=this._getByUid(r.uid),i.children=[],s=new g.data.Query(s)._sortForGrouping(a.valueField,"desc"),n=0;n<s.length;n++)t=s[n],i.children.push(this._wrapItem(t));o=this._view.htmlSize(i),this._layout.compute(i.children,i.coord,o),this._setColors(i.children),this._view.render(i)}}else this._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(n=0;n<s.length;n++)s[n].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,n,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++)n=e[s],i(n.color)||(n.color=t?t[s]:c),n.dataItem.hasChildren||(r=!0);r&&this._colorIdx++},_contentSize:function(e){this.view.renderHeight(e)},_wrapItem:function(e){var t={};return i(this.options.valueField)&&(t.value=n(this.options.valueField,e)),i(this.options.colorField)&&(t.color=n(this.options.colorField,e)),i(this.options.textField)&&(t.text=n(this.options.textField,e)),t.level=e.level(),t.dataItem=e,t},_getByUid:function(e){for(var t,n=[this._root];n.length;){if(t=n.pop(),t.dataItem.uid===e)return t;t.children&&(n=n.concat(t.children))}},dataItem:function(t){var n=e(t).attr(g.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},findByUid:function(e){return this.element.find(".k-treemap-tile["+g.attr("uid")+"='"+e+"']")},_mouseover:function(t){var n=e(t.target);n.hasClass("k-leaf")&&(this._removeActiveState(),n.removeClass("k-state-hover").addClass("k-state-hover"))},_removeActiveState:function(){this.element.find(".k-state-hover").removeClass("k-state-hover")},_mouseleave:function(){this._removeActiveState()},destroy:function(){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,n=this._root;n&&(e=this.element,t=e.children(),n.coord.width=_(e),n.coord.height=v(e),t.css({width:n.coord.width,height:n.coord.height}),this._resizeItems(n,t))},_resizeItems:function(e,t){var n,i,o,r;if(e.children&&e.children.length)for(n=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++)i=e.children[r],o=n.filter("["+g.attr("uid")+"='"+i.dataItem.uid+"']"),this._view.setItemSize(i,o),this._resizeItems(i,o)},setOptions:function(e){var n=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),n&&this.setDataSource(x.create(n)),this.options.autoBind&&this.dataSource.fetch()}}),P=b.extend({createRoot:function(e,t,n){e.coord={width:t,height:n,top:0,left:0}},leaf:function(e){return!e.children},layoutChildren:function(e,t){var n,i,o,r,s=t.width*t.height,a=0,l=[];for(n=0;n<e.length;n++)l[n]=parseFloat(e[n].value),a+=l[n];for(n=0;n<l.length;n++)e[n].area=s*l[n]/a;i=this.layoutHorizontal()?t.height:t.width,o=[e[0]],r=e.slice(1),this.squarify(r,o,i,t)},squarify:function(e,t,n,i){this.computeDim(e,t,n,i)},computeDim:function(e,n,i,o){var r,s,a;return e.length+n.length==1?(r=1==e.length?e:n,this.layoutLast(r,i,o),t):(e.length>=2&&0===n.length&&(n=[e[0]],e=e.slice(1)),0===e.length?(n.length>0&&this.layoutRow(n,i,o),t):(s=e[0],this.worstAspectRatio(n,i)>=this.worstAspectRatio([s].concat(n),i)?this.computeDim(e.slice(1),n.concat([s]),i,o):(a=this.layoutRow(n,i,o),this.computeDim(e,[],a.dim,a)),t))},layoutLast:function(e,t,n){e[0].coord=n},layoutRow:function(e,t,n){return this.layoutHorizontal()?this.layoutV(e,t,n):this.layoutH(e,t,n)},orientation:"h",layoutVertical:function(){return"v"===this.orientation},layoutHorizontal:function(){return"h"===this.orientation},layoutChange:function(){this.orientation=this.layoutVertical()?"h":"v"},worstAspectRatio:function(e,t){var n,i,o,r,s;if(!e||0===e.length)return M;for(n=0,i=0,o=M,r=0;r<e.length;r++)s=e[r].area,n+=s,o=o<s?o:s,i=i>s?i:s;return f.max(t*t*i/(n*n),n*n/(t*t*o))},compute:function(e,t,n){if(t.width>=t.height&&this.layoutHorizontal()||this.layoutChange(),e&&e.length>0){var i={width:t.width,height:t.height-n.text,top:0,left:0};this.layoutChildren(e,i)}},layoutV:function(e,t,n){var i,o,r,s=this._totalArea(e),a=0;for(t=h(s/t),i=0;i<e.length;i++)o=h(e[i].area/t),e[i].coord={height:o,width:t,top:n.top+a,left:n.left},a+=o;return r={height:n.height,width:n.width-t,top:n.top,left:n.left+t},r.dim=f.min(r.width,r.height),r.dim!=r.height&&this.layoutChange(),r},layoutH:function(e,t,n){var i,o,r=this._totalArea(e),s=h(r/t),a=n.top,l=0;for(i=0;i<e.length;i++)e[i].coord={height:s,width:h(e[i].area/s),top:a,left:n.left+l},l+=e[i].coord.width;return o={height:n.height-s,width:n.width,top:n.top+s,left:n.left},o.dim=f.min(o.width,o.height),o.dim!=o.width&&this.layoutChange(),o},_totalArea:function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].area;return n}}),B=b.extend({init:function(t,n){this.options=k({},this.options,n),this.treeMap=t,this.element=e(t.element),this.offset=0},titleSize:function(e,t){var n=t.children(".k-treemap-title");return n.height()},htmlSize:function(e){var t,n,i=this._getByUid(e.dataItem.uid),o={text:0};return e.children&&(this._clean(i),t=this._getText(e),t&&(n=this._createTitle(e),i.append(n),this._compile(n,e.dataItem),o.text=n.height()),i.append(this._createWrap()),this.offset=(_(i)-i.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,n,i,o,r=this._getByUid(e.dataItem.uid),s=e.children;if(s)for(t=r.find(".k-treemap-wrap"),n=0;n<s.length;n++)i=s[n],o=this._createLeaf(i),t.append(o),this._compile(o.children(),i.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).append(e("<div></div>").html(this._getText(t)))},_createTile:function(t){var n=e("<div class='k-treemap-tile'></div>");
return this.setItemSize(t,n),i(t.dataItem)&&i(t.dataItem.uid)&&n.attr(g.attr("uid"),t.dataItem.uid),n},_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 n=this._itemCoordinates(e);t.css({width:n.width,height:n.height,left:n.left,top:n.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,n,i){e.coord={width:t,height:n,top:0,left:0},e.vertical=i},init:function(e){this.vertical=e,this.quotient=e?1:0},compute:function(e,t,n){var i,o,r;e.length>0&&(i=t.width,o=t.height,this.vertical?o-=n.text:i-=n.text,r={width:i,height:o,top:0,left:0},this.layoutChildren(e,r))},layoutChildren:function(e,t){var n,i,o=t.width*t.height,r=0,s=[];for(n=0;n<e.length;n++)i=e[n],s[n]=parseFloat(e[n].value),r+=s[n],i.vertical=this.vertical;for(n=0;n<s.length;n++)e[n].area=o*s[n]/r;this.sliceAndDice(e,t)},sliceAndDice:function(e,t){var n=this._totalArea(e);e[0].level%2===this.quotient?this.layoutHorizontal(e,t,n):this.layoutVertical(e,t,n)},layoutHorizontal:function(e,t,n){var i,o,r,s=0;for(i=0;i<e.length;i++)o=e[i],r=o.area/(n/t.width),o.coord={height:t.height,width:r,top:t.top,left:t.left+s},s+=r},layoutVertical:function(e,t,n){var i,o,r,s=0;for(i=0;i<e.length;i++)o=e[i],r=o.area/(n/t.height),o.coord={height:r,width:t.width,top:t.top+s,left:t.left},s+=r},_totalArea:function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].area;return n}}),H=B.extend({htmlSize:function(e){var t,n,i=this._getByUid(e.dataItem.uid),o={text:0,offset:0};return e.children&&(this._clean(i),t=this._getText(e),t&&(n=this._createTitle(e),i.append(n),this._compile(n,e.dataItem),o.text=e.vertical?n.height():n.width()),i.append(this._createWrap()),this.offset=(_(i)-i.innerWidth())/2),o},titleSize:function(e,t){var n;return n=e.vertical?t.children(".k-treemap-title").height():t.children(".k-treemap-title-vertical").width()},_createTitle:function(t){var n;return n=e(t.vertical?"<div class='k-treemap-title'></div>":"<div class='k-treemap-title-vertical'></div>"),n.append(e("<div></div>").html(this._getText(t)))}});S.ui.plugin(z)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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,n){(n||t)()}),function(e,define){define("kendo.mobile.modalview.min",["kendo.mobile.shim.min","kendo.mobile.view.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,o=i.Shim,r=i.Widget,s="beforeOpen",a="open",l="close",c="init",d='<div class="km-modalview-wrapper" />',u=i.View.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n._id(),n._wrap(),n._shim(),this.options.$angular||(n._layout(),n._scroller(),n._model()),n.element.css("display",""),n.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 n=this;n.target=e(t),n.shim.show(),n._invokeNgController(),n.trigger("show",{view:n})},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,n=this,i=n.element,o=n.options;e=i[0].style.width||"auto",t=i[0].style.height||"auto",i.addClass("km-modalview").wrap(d),n.wrapper=i.parent().css({width:o.width||e||300,height:o.height||t||300}).addClass("auto"==t?" km-auto-height":""),i.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()}})}});i.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.drawer.min",["kendo.mobile.view.min","kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,o=n.support.mobileOS,r=n.effects.Transition,s=n.roleSelector,a="x",l=i.ui,c=!(o.ios&&7==o.majorVersion&&!o.appMode),d="beforeShow",u="init",h="show",f="hide",p="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),i.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 n.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 n.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,f,p,u,h],show:function(){this._activate()&&this._show()},hide:function(){this.currentView&&(this.currentView.enable(),g.current=null,this._moveViewTo(0),this.trigger(f,{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 n=this.pane.view();return e.inArray(n.id.replace("#",""),t)>-1||e.inArray(n.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,i=this.movable,o=i&&i.x;this.transition&&(this.transition.cancel(),this.movable.moveAxis("x",0)),i=this.movable=new n.ui.Movable(e),this.transition=new r({axis:a,movable:this.movable,onEnd:function(){0===i[a]&&(e[0].style.cssText="",t.element.hide(),t.trigger(p),t.visible=!1)}}),o&&(e.addClass("k-fx-hidden"),n.animationFrame(function(){e.removeClass("k-fx-hidden"),t.movable.moveAxis(a,o),t.hide()}))},_start:function(e){var i,o,r,s,a,l=e.sender;return Math.abs(e.x.velocity)<Math.abs(e.y.velocity)||n.triggeredByInput(e.event)||!this._currentViewIncludedIn(this.options.swipeToOpenViews)?(l.cancel(),t):(i=this.leftPositioned,o=this.visible,r=i&&o||!i&&!g.current,s=!i&&o||i&&!g.current,a=e.x.velocity<0,(r&&a||s&&!a)&&this._activate()?(l.capture(),t):(l.cancel(),t))},_update:function(e){var t,n=this.movable,i=n.x+e.x.delta;t=this.leftPositioned?Math.min(Math.max(0,i),this.element.width()):Math.max(Math.min(0,i),-this.element.width()),this.movable.moveAxis(a,t),e.event.preventDefault(),e.event.stopPropagation()},_end:function(e){var t,n=e.x.velocity,i=Math.abs(this.movable.x)>this.element.width()/2,o=.8;t=this.leftPositioned?n>-o&&(n>o||i):n<o&&(n<-o||i),t?this._show():this.hide()}});l.plugin(g)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.splitview.min",["kendo.mobile.pane.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,o=i.Widget,r="<div class='km-expanded-pane-shim' />",s=i.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,i){n.compileMobileDirective(e(i),s.$angular[0])}):n.mobile.init(l),c.panes=[],c._paramsHistory=[],c.options.$angular?(c.element.children(n.directiveSelector("pane")).each(function(){a=n.compileMobileDirective(e(this),s.$angular[0]),c.panes.push(a)}),c.element.children(n.directiveSelector("header footer")).each(function(){n.compileMobileDirective(e(this),s.$angular[0])})):c.content.children(n.roleSelector("pane")).each(function(){a=n.initWidget(this,{},i.roles),c.panes.push(a)}),c.expandedPaneShim=e(r).appendTo(c.element),c._shimUserEvents=new n.UserEvents(c.expandedPaneShim,{fastTap:!0,tap:function(){c.collapsePanes()}})},_locate:function(e){return this.options.$angular?n.directiveSelector(e):n.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=n.attrValue(t,"transition"),n.mobile.ui.View.prototype._layout.call(this),n.mobile.init(this.header.add(this.footer)),e.element.addClass("km-splitview"),e.content.addClass("km-split-content")},_style:function(){var t,n=this.options.style,i=this.element;n&&(t=n.split(" "),e.each(t,function(){i.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})}});i.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.application.min",["kendo.mobile.pane.min","kendo.router.min"],e)}(function(){return function(e,t){function n(e,t){var n=[];return p&&n.push("km-on-"+p.name),n.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)&&n.push("km-"+e.name+e.majorVersion),n.push("km-"+e.majorVersion),n.push("km-m"+(e.minorVersion?e.minorVersion[0]:0)),e.variant&&(e.skin&&e.skin===e.name||!e.skin||e.setDefaultPlatform===!1)&&n.push("km-"+(e.skin?e.skin:e.name)+"-"+e.variant),e.cordova&&n.push("km-cordova"),n.push(e.appMode?"km-app":"km-web"),t&&t.statusBarStyle&&n.push("km-"+t.statusBarStyle+"-status-bar"),n.join(" ")}function i(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 p.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(),P.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,f="ios7",p=d.mobileOS,m="blackberry"==p.device&&p.flatVersion>=600&&p.flatVersion<1e3&&p.appMode,g=.93,v="km-vertical",_="chrome"===p.browser,b=p.ios&&p.flatVersion>=700&&p.flatVersion<800&&(p.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=p.android&&"chrome"!=p.browser||p.blackberry,D=l.template('<link rel="apple-touch-icon'+(p.android?"-precomposed":"")+'" # if(data.size) { # sizes="#=data.size#" #}# href="#=data.icon#" />',{usedWithBlock:!1}),A=("iphone"==p.device||"ipod"==p.device)&&p.majorVersion<7,E=("iphone"==p.device||"ipod"==p.device)&&p.majorVersion>=7,M=E?"none":null,R="mobilesafari"==p.browser?60:0,I=20,F=e(window),z=window.screen,P=e("head"),B="init",L=e.proxy,H=u.extend({init:function(t,n){c.application=this,e(e.proxy(this,"bootstrap",t,n))},bootstrap:function(t,n){var i,o,r;t=e(t),t[0]||(t=e(document.body)),u.fn.init.call(this,t,n),this.element.removeAttr("data-"+l.ns+"role"),this._setupPlatform(),this._attachMeta(),this._setupElementClass(),this._attachHideBarHandlers(),i=e.extend({},this.options),delete i.name,o=this,r=function(){o.pane=new h(o.element,i),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:M,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=p||k[f];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("-"),p||(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=n(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(i(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,n=e("meta[name=apple-mobile-web-app-status-bar-style]").attr("content").match(/black-translucent|hidden/),i=this.element;t=_?window.innerHeight:o(i)?n?w?z.availWidth+I:z.availWidth:w?z.availWidth:z.availWidth-I:n?w?z.availHeight:z.availHeight+I:w?z.availHeight-I:z.availHeight,i.height(t)},_setupElementClass:function(){var t,n=this,i=n.element;i.parent().addClass("km-root km-"+(n.os.tablet?"tablet":"phone")),i.addClass(n.osCssClass+" "+r(i)),this.options.useNativeScrolling&&i.parent().addClass("km-native-scrolling"),_&&i.addClass("km-ios-chrome"),d.wpDevicePixelRatio&&i.parent().css("font-size",d.wpDevicePixelRatio+"em"),this.options.retina&&(i.parent().addClass("km-retina"),i.parent().css("font-size",d.devicePixelRatio*g+"em")),m&&a(),n.options.useNativeScrolling?i.parent().addClass("km-native-scrolling"):T&&(t=(screen.availWidth>screen.availHeight?screen.availWidth:screen.availHeight)+200,e(S({width:t,height:t})).appendTo(P)),b&&n._resizeToScreenHeight(),l.onResize(function(){i.removeClass("km-horizontal km-vertical").addClass(r(i)),n.options.useNativeScrolling&&s(i),b&&n._resizeToScreenHeight(),m&&a(),l.resize(i)})},_clearExistingMeta:function(){P.find("meta").filter("[name|='apple-mobile-web-app'],[name|='msapplication-tap'],[name='viewport']").remove()},_attachMeta:function(){var e,t=this.options,n=t.icon;if(this._clearExistingMeta(),m||P.prepend(x({height:"",scale:this.options.retina?1/d.devicePixelRatio:"1.0"})),P.prepend(C(t)),n){"string"==typeof n&&(n={"":n});for(e in n)P.prepend(D({icon:n[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,n=document.title;e.pane.bind("viewShow",function(e){var i=e.view.title;document.title=i!==t?i:n})},_hideBar:function(){var t=this,n=t.element;n.height(l.support.transforms.css+"calc(100% + "+R+"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,n){(n||t)()}),function(e,define){define("kendo.mobile.button.min",["kendo.userevents.min"],e)}(function(){return function(e,t){function n(t,n,i){e(n.target).closest(".km-button,.km-detail").toggleClass("km-state-active",i),d&&t.deactivateTimeoutID&&(clearTimeout(t.deactivateTimeoutID),t.deactivateTimeoutID=0)}function i(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",f="km-state-disabled",p=a.extend({init:function(e,t){var i,r=this;a.fn.init.call(r,e,t),i="up"===r.options.clickOn,r._wrap(),r._style(),i||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:!i,fastTap:!0,press:function(e){r._activate(e)},release:function(e){n(r,e,!1),i||e.event.stopPropagation()}}),r._userEvents.bind(i?"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||i(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 n=this.element;t===e&&(e=!0),this.options.enable=e,e?n.removeAttr(h):n.attr(h,h),n.toggleClass(f,!e)},_timeoutDeactivate:function(e){this.deactivateTimeoutID||(this.deactivateTimeoutID=setTimeout(n,500,this,e,!1))},_activate:function(e){var t=document.activeElement,i=t?t.nodeName:"";this.options.enable&&(n(this,e,!0),"INPUT"!=i&&"TEXTAREA"!=i||t.blur())},_release:function(n){var i=this;if(!(n.which>1))return i.options.enable?(i.trigger(u,{target:e(n.target),button:i.element})&&n.preventDefault(),t):(n.preventDefault(),t)},_style:function(){var t,n=this.options.style,i=this.element;n&&(t=n.split(" "),e.each(t,function(){i.addClass("km-"+this)}))},_wrap:function(){var t=this,n=t.options.icon,o=t.options.badge,r='<span class="km-icon km-'+n,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]&&n&&(a[0]||(r+=" km-notext"),t.iconElement=s.prepend(e(r+'" />'))),(o||0===o)&&(t.badgeElement=i(o).appendTo(s))}}),m=p.extend({options:{name:"BackButton",style:"back"},init:function(e,n){var i=this;p.fn.init.call(i,e,n),t===i.element.attr("href")&&i.element.attr("href","#:back")}}),g=p.extend({options:{name:"DetailButton",style:""},init:function(e,t){p.fn.init.call(this,e,t)},_style:function(){var t,n=this.options.style+" detail",i=this.element;n&&(t=n.split(" "),e.each(t,function(){i.addClass("km-"+this)}))},_wrap:function(){var t=this,n=t.options.icon,i='<span class="km-icon km-'+n,o=t.element,r=o.children("span"),s=o.find("img").addClass("km-image");!s[0]&&n&&(r[0]||(i+=" km-notext"),o.prepend(e(i+'" />')))}});s.plugin(p),s.plugin(m),s.plugin(g)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.buttongroup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){return"k-"+e+" km-"+e}function i(t){return e('<span class="'+n("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 i=this;s.fn.init.call(i,e,t),i.element.addClass("km-buttongroup k-widget k-button-group").find("li").each(i._button),i.element.on(i.options.selectOn,d,"_select"),i._enable=!0,i.select(i.options.index),i.options.enable||(i._enable=!1,i.wrapper.addClass(n(l)))},events:[c],options:{name:"ButtonGroup",selectOn:"down",index:-1,enable:!0},current:function(){return this.element.find(".km-"+a)},select:function(i){var o=this,r=-1;i!==t&&i!==-1&&o._enable&&!e(i).is(".km-"+l)&&(o.current().removeClass(n(a)),"number"==typeof i?(r=i,i=e(o.element[0].children[i])):i.nodeType&&(i=e(i),r=i.index()),i.addClass(n(a)),o.selectedIndex=r)},badge:function(t,n){var o,r=this.element;return isNaN(t)||(t=r.children().get(t)),t=r.find(t),o=e(t.children(".km-badge")[0]||i(n).appendTo(t)),n||0===n?(o.html(n),this):n===!1?(o.empty().remove(),this):o.html()},enable:function(e){t===e&&(e=!0),this.wrapper.toggleClass(n(l),!e),this._enable=this.options.enable=e},_button:function(){var t=e(this).addClass(n("button")),r=o.attrValue(t,"icon"),s=o.attrValue(t,"badge"),a=t.children("span"),l=t.find("img").addClass(n("image"));a[0]||(a=t.wrapInner("<span/>").children("span")),a.addClass(n("text")),!l[0]&&r&&t.prepend(e('<span class="'+n("icon")+" "+n(r)+'"/>')),(s||0===s)&&i(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,n){(n||t)()}),function(e,define){define("kendo.mobile.collapsible.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,o=i.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",f="km-animated",p="left",m="expand",g="collapse",v=o.extend({init:function(t,i){var s=this,a=e(t);o.fn.init.call(s,a,i),a.addClass(r),s._buildHeader(),s.content=a.children().not(s.header).wrapAll(d).parent(),s._userEvents=new n.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(f),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:p,animation:!0,inset:!1},destroy:function(){o.fn.destroy.call(this),this._userEvents.destroy()},expand:function(e){var t=this.options.collapseIcon,i=this.content,o=n.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?(i.off("transitionend"),i.show(),o&&i.removeClass(f),i.height(this._getContentHeight()),o&&i.addClass(f),n.resize(i)):i.show())},collapse:function(e){var t=this.options.expandIcon,n=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?(n.one("transitionend",function(){n.hide()}),n.height(0)):n.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),n=e('<span class="km-icon"/>'),i=this.options.collapsed?this.options.expandIcon:this.options.collapseIcon,o=this.options.iconPosition;i&&(t.prepend(n),n.addClass("km-"+i)),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}});i.plugin(v)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||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 n(){return this.nodeType===v.TEXT_NODE&&this.nodeValue.match(W)}function i(e,t){t&&!e[0].querySelector(".km-icon")&&e.prepend('<span class="km-icon km-'+t+'"/>')}function o(e){i(e,D(e,"icon")),i(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(n);r.length||(e.addClass("km-listview-link").attr(g.attr("role"),"listview-link"),i(e,D(t,"icon")),i(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,n){e(t).css("transform","translate3d(0px, "+n+"px, 0px)")}var l,c,d,u,h,f,p,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",M='<div class="'+A+'"><div class="km-text"></div></div>',R=g.template('<li><div class="'+A+'"><div class="km-text">#= this.headerTemplate(data) #</div></div><ul>#= kendo.render(this.template, data.items)#</ul></li>'),I='<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>'),z=".kendoMobileListView",P="styled",B="dataBound",L="dataBinding",H="itemChange",N="click",O="change",V="progress",U="function",W=/^\s+$/,j=/button/,q=g.Class.extend({init:function(e){var t,n,i=e.scroller();i&&(this.options=e.options,this.element=e.element,this.scroller=e.scroller(),this._shouldFixHeaders(),t=this,n=function(){t._cacheHeaders()},e.bind("resize",n),e.bind(P,n),e.bind(B,n),this._scrollHandler=function(e){t._fixHeader(e)},i.bind("scroll",this._scrollHandler))},destroy:function(){var e=this;e.scroller&&e.scroller.unbind("scroll",e._scrollHandler)},_fixHeader:function(t){if(this.fixedHeaders){var n,i,o,r=0,s=this.scroller,a=this.headers,l=t.scrollTop;do{if(n=a[r++],!n){o=e("<div />");break}i=n.offset,o=n.header}while(i+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=[],n=this.scroller.scrollTop;this.element.find("."+A).each(function(i,o){o=e(o),t.unshift({offset:o.position().top+n,header:o})}),this.headers=t,this._fixHeader({scrollTop:n})}}}),G=function(){return{page:1}},$=g.Class.extend({init:function(e){var t=this,n=e.options,i=e.scroller(),o=n.pullParameters||G;this.listView=e,this.scroller=i,e.bind("_dataSource",function(e){t.setDataSource(e.dataSource)}),i.setOptions({pullToRefresh:!0,pull:function(){t._pulled||(t._pulled=!0,t.dataSource.read(o.call(e,t._first)))},messages:{pullTemplate:n.messages.pullTemplate,releaseTemplate:n.messages.releaseTemplate,refreshTemplate:n.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,n=this.dataSource;this._pulled&&t.pullHandled(),!this._pulled&&this._first||(e=n.view(),e[0]&&(this._first=e[0])),this._pulled=!1}}),Y=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,n,i,o=this.buffer,r=this.items,s=!1;r.length;)r.pop().destroy();for(this.offset=o.offset,e=this.item,i=0;i<o.viewSize;i++){if(i===o.total()){s=!0;break}n=e(this.content(this.offset+r.length)),n.below(t),t=n,r.push(n)}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,n=t[0].top,i=t[t.length-1].bottom,o=(i-n)/e.itemCount,r=e.buffer.length-e.offset-e.itemCount;return(this.footer?this.footer.height:0)+i+r*o},batchUpdate:function(e){var t,n,i=this.height(),o=this.items,r=this.offset;if(o[0]){if(this.lastDirection)for(;o[o.length-1].bottom>e+2*i&&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-i;){if(n=this.offset+this.itemCount,n===this.buffer.total()){this.trigger("endReached");break}if(n===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,n,i,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(),n=s[0],t.update(this.content(this.offset)),s.unshift(t),t.above(n),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(),i=s[s.length-1],s.push(t),t.update(this.content(this.offset+this.itemCount)),r.offset++,t.below(i),r._resize())))},content:function(e){return this.buffer.at(e)},destroy:function(){this.unbind()},_resize:function(){var e=this.items,t=0,n=0,i=e[0],o=e[e.length-1];i&&(t=i.top,n=o.bottom),this.trigger("resize",{top:t,bottom:n}),this.footer&&this.footer.below(o)}});g.mobile.ui.VirtualList=Y,l=g.Class.extend({init:function(t,n){var i=t.append([n],!0)[0],o=i.offsetHeight;e.extend(this,{top:0,element:i,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,n){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 i=this;this._loadButton.kendoMobileButton().data("kendoMobileButton").bind("click",function(){i._hideShowButton(),n.next()}),n.bind("resize",function(){i._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,n){var i,o,r,s,a=this,c=this.options,h=this.listView,f=h.scroller(),p=c.loadMore;if(this.dataSource=t,i=t.pageSize()||c.virtualViewSize,!i&&!n)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(i/2),p),r=p?new u(h,o):new d(h),this.list&&this.list.destroy(),s=new Y({buffer:o,footer:r,item:function(e){return new l(h,e)},height:function(){return f.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(f.scrollTop)}),e.extend(this,{buffer:o,scroller:f,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()}}),f=g.Class.extend({init:function(e){var t,n=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){n.setDataSource(e.dataSource)})},destroy:function(){this._unbindDataSource()},reset:function(){},refresh:function(e){var n,i,o,r,s,a,l,c=e&&e.action,d=e&&e.items,u=this.listView,h=this.dataSource,f=this.options.appendOnRefresh,p=h.view(),m=h.group(),g=m&&m[0];return"itemchange"===c?(u._hasBindingTarget()||(n=u.findByDataItem(d)[0],n&&u.setDataItem(n,d[0])),t):(s="add"===c&&!g||f&&!u._filter,a="remove"===c&&!g,s?i=[]:a&&(i=u.findByDataItem(d)),u.trigger(L,{action:c||"rebind",items:d,removedItems:i,index:e&&e.index})?(this._shouldShowLoading()&&u.hideLoading(),t):("add"!==c||g?"remove"!==c||g?g?u.replaceGrouped(p):f&&!u._filter?(o=u.prepend(p),r=p):u.replace(p):(o=[],u.remove(d)):(l=p.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}}),p=g.Class.extend({init:function(t){var n=this,i=t.options.filterable,o="change paste",r=this;this.listView=t,this.options=i,t.element.before(F({placeholder:i.placeholder||"Search..."})),i.autoFilter!==!1&&(o+=" keyup"),this.element=t.wrapper.find(".km-search-form"),this.searchInput=t.wrapper.find("input[type=search]").closest("form").on("submit"+z,function(e){e.preventDefault()}).end().on("focus"+z,function(){n._oldFilter=n.searchInput.val()}).on(o.split(" ").join(z+" ")+z,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(),n=t.length?{field:e.field,operator:e.operator||"startswith",ignoreCase:e.ignoreCase,value:t}:null;t!==this._oldFilter&&(this._oldFilter=t,this._search(n))},_clearFilter:function(e){this.searchInput.val(""),this._search(null),e.preventDefault()}}),m=k.extend({init:function(t,n){var i=this;k.fn.init.call(this,t,n),t=this.element,n=this.options,n.scrollTreshold&&(n.scrollThreshold=n.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){i._click(e)}}),t.css("-ms-touch-action","auto"),t.wrap(I),this.wrapper=this.element.parent(),this._headerFixer=new q(this),this._itemsCache={},this._templates(),this.virtual=n.endlessScroll||n.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 p(this)),this._itemBinder=this.virtual?new h(this):new f(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,n){var i=this;return i._renderItems(e,function(o){if(0===t?i.element.prepend(o):t===-1?i.element.append(o):i.items().eq(t-1).after(o),n)for(var r=0;r<o.length;r++)i.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 n=e(g.render(this.groupTemplate,t));this._enhanceItems(n.children("ul").children("li")),this.element.append(n),_.init(n),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,n,i=[];for(t=0,n=e.length;t<n;t++)i[t]="[data-"+g.ns+"uid="+e[t].uid+"]";return this.element.find(i.join(","))},setDataItem:function(t,n){var i=this,o=function(o){var r=e(o[0]);g.destroy(t),i.angular("cleanup",function(){return{elements:[e(t)]}}),e(t).replaceWith(r),i.trigger(H,{item:r,data:n,ns:b})};return this._renderItems([n],o)[0]},updateSize:function(){this._size=this.getSize()},_renderItems:function(t,n){var i=e(g.render(this.template,t));return n(i),this.angular("compile",function(){return{elements:i,data:t.map(function(e){return{dataItem:e}})}}),_.init(i),this._enhanceItems(i),i},_dim:function(e){this._toggle(e,!1)},_highlight:function(e){this._toggle(e,!0)},_toggle:function(t,n){if(!(t.which>1)){var i=e(t.currentTarget),o=i.parent(),r=D(i,"role")||"",s=!r.match(j),a=t.isDefaultPrevented();s&&o.toggleClass(E,n&&!a)}},_templates:function(){var e=this.options.template,t=this.options.headerTemplate,n=' data-uid="#=arguments[0].uid || ""#"',i={},o={};typeof e===U&&(i.template=e,e="#=this.template(data)#"),this.template=T(g.template("<li"+n+">"+e+"</li>"),i),o.template=this.template,typeof t===U&&(o._headerTemplate=t,t="#=this._headerTemplate(data)#"),o.headerTemplate=g.template(t),this.groupTemplate=T(R,o)},_click:function(t){if(!(t.event.which>1||t.event.isDefaultPrevented())){var n,i=t.target,o=e(t.event.target),r=o.closest(g.roleSelector("button","detailbutton","backbutton")),s=g.widgetInstance(r,b),a=i.attr(g.attr("uid"));a&&(n=this.dataSource.getByUid(a)),this.trigger(N,{target:o,item:i,dataItem:n,button:s})&&t.preventDefault()}},_styleGroups:function(){var t=this.element.children();t.children("ul").addClass("km-list"),t.each(function(){var t=e(this),n=t.contents().first();t.addClass("km-group-container"),n.is("ul")||n.is("div."+A)||n.wrap(M)})},_style:function(){var e=this.options,t="group"===e.type,n=this.element,i="inset"===e.style;n.addClass("km-listview").toggleClass("km-list",!t).toggleClass("km-virtual-list",this.virtual).toggleClass("km-listinset",!t&&i).toggleClass("km-listgroup",t&&!i).toggleClass("km-listgroupinset",t&&i),n.parents(".km-listview")[0]||n.closest(".km-content").toggleClass("km-insetcontent",i),t&&this._styleGroups(),this.trigger(P)},_enhanceItems:function(t){t.each(function(){var t,n=e(this),i=!1;n.children().each(function(){t=e(this),t.is("a")?(r(t),i=!0):t.is("label")&&(s(t),i=!0)}),i||o(n)})}}),b.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.navbar.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t,n){var i=n.find("["+o.attr("align")+"="+t+"]");if(i[0])return e('<div class="km-'+t+'item" />').append(i).prependTo(n)}function i(t){var n=t.siblings(),i=!!t.children("ul")[0],r=!!n[0]&&""===e.trim(t.text()),s=!(!o.mobile.application||!o.mobile.application.element.is(".km-android"));t.prevAll().toggleClass("km-absolute",i),t.toggleClass("km-show-title",r),t.toggleClass("km-fill-title",r&&!e.trim(t.html())),t.toggleClass("km-no-title",i),t.toggleClass("km-hide-title",s&&!n.children().is(":visible"))}var o=window.kendo,r=o.mobile,s=r.ui,a=s.Widget,l=a.extend({init:function(t,i){var o=this;a.fn.init.call(o,t,i),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=n("left",t),o.rightElement=n("right",t),o.centerElement=t.find(".km-view-title")},options:{name:"NavBar"},title:function(e){this.element.find(o.roleSelector("view-title")).text(e),i(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,n){(n||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 n(e){return"k-"+e+" km-"+e}var i,o,r,s,a,l,c,d,u=window.kendo,h=u.mobile,f=h.ui,p=e.proxy,m=u.effects.Transition,g=u.ui.Pane,v=u.ui.PaneDimensions,_=f.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",M="changing",R="refresh",I="current-page",F="virtual-page",z="function",P="itemChange",B="cleanup",L=3,H=-1,N=0,O=1,V=-1,U=0,W=1,j=u.Class.extend({init:function(t){var i=this,o=e("<ol class='"+n("pages")+"'/>");t.element.append(o),this._changeProxy=p(i,"_change"),this._refreshProxy=p(i,"_refresh"),t.bind(E,this._changeProxy),t.bind(R,this._refreshProxy),e.extend(i,{element:o,scrollView:t})},items:function(){return this.element.children()},_refresh:function(e){var t,i="";for(t=0;t<e.pageCount;t++)i+="<li/>";this.element.html(i),this.items().eq(e.page).addClass(n(I))},_change:function(e){this.items().removeClass(n(I)).eq(e.page).addClass(n(I))},destroy:function(){this.scrollView.unbind(E,this._changeProxy),this.scrollView.unbind(R,this._refreshProxy),this.element.remove()}});u.mobile.ui.ScrollViewPager=j,i="transitionEnd",o="dragStart",r="dragEnd",s=u.Observable.extend({init:function(t,n){var s,a,l,c,d,h,f=this;u.Observable.fn.init.call(this),this.element=t,this.container=t.parent(),s=new u.ui.Movable(f.element),a=new m({axis:"x",movable:s,onEnd:function(){f.trigger(i)}}),l=new u.UserEvents(t,{fastTap:!0,start:function(e){2*x(e.x.velocity)>=x(e.y.velocity)?l.capture():l.cancel(),f.trigger(o,e),a.cancel()},allowSelection:!0,end:function(e){f.trigger(r,e)}}),c=new v({element:f.element,container:f.container}),d=c.x,d.bind(E,function(){f.trigger(E)}),h=new g({dimensions:c,userEvents:l,movable:s,elastic:!0}),e.extend(f,{duration:n&&n.duration||1,movable:s,transition:a,userEvents:l,dimensions:c,dimension:d,pane:h}),this.bind([i,o,r,E],n)},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,n){n?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,n){var i=this;u.Observable.fn.init.call(this),i.element=e,i.pane=t,i._getPages(),this.page=0,this.pageSize=n.pageSize||1,this.contentHeight=n.contentHeight,this.enablePager=n.enablePager,this.pagerOverlay=n.pagerOverlay},scrollTo:function(e,t){this.page=e,this.pane.transitionTo(-e*this.pane.size().width,m.easeOutExpo,t)},paneMoved:function(e,t,n,i){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===W&&(c=A),r=c(a.offset()/l),o=T(s.minSnap,D(-r*l,s.maxSnap)),r!=s.page&&n&&n({currentPage:s.page,nextPage:r})&&(o=-s.page*a.size().width),a.transitionTo(o,d,i)},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,n,i=this.pane,o=e.width;this.pageElements.width(o),"100%"===this.contentHeight&&(t=this.element.parent().height(),this.enablePager===!0&&(n=this.element.parent().find("ol.km-pages"),!this.pagerOverlay&&n.length&&(t-=u._outerHeight(n,!0))),this.element.css("height",t),this.pageElements.css("height",t)),i.updateDimension(),this._paged||(this.page=A(i.offset()/o)),this.scrollTo(this.page,!0),this.pageCount=C(i.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,n){var i=this;u.Observable.fn.init.call(this),i.element=e,i.pane=t,i.options=n,i._templates(),i.page=n.page||0,i.pages=[],i._initPages(),i.resizeTo(i.pane.size()),i.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=p(this,"_onResize"),this._resetProxy=p(this,"_onReset"),this._endReachedProxy=p(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,n={},i={};typeof e===z&&(n.template=e,e="#=this.template(data)#"),this.template=p(u.template(e),n),typeof t===z&&(i.emptyTemplate=t,t="#=this.emptyTemplate(data)#"),this.emptyTemplate=p(u.template(t),i)},_initPages:function(){var e,t,n=this.pages,i=this.element;for(t=0;t<L;t++)e=new c(i),n.push(e);this.pane.updateDimension()},resizeTo:function(e){var t,n,i,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&&(n=this.element.parent().height(),this.options.enablePager===!0&&(i=this.element.parent().find("ol.km-pages"),!this.options.pagerOverlay&&i.length&&(n-=u._outerHeight(i,!0))),this.element.css("height",n),o[0].element.css("height",n),o[1].element.css("height",n),o[2].element.css("height",n)),r.updateDimension(),this._repositionPages(),this.width=e.width},scrollTo:function(e){var t,n=this.buffer;n.syncDataSource(),t=n.at(e),t&&(this._updatePagesContent(e),this.page=e)},paneMoved:function(e,t,n,i){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(),f=0;e===W?0!==r.page&&(f=-1):e!==V||h?l>0&&c&&!h?f=1:l<0&&c&&0!==r.page&&(f=-1):f=1,o=r.page,f&&(o=f>0?o+1:o-1),n&&n({currentPage:r.page,nextPage:o})&&(f=0),0===f?r._cancelMove(d,i):f===-1?r._moveBackward(i):1===f&&r._moveForward(i)},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,n=e||0;this.setPageContent(t[0],n-1),this.setPageContent(t[1],n),this.setPageContent(t[2],n+1)},setPageContent:function(t,n){var i=this.buffer,o=this.template,r=this.emptyTemplate,s=null;n>=0&&(s=i.at(n),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(P,{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='"+n(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 i,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 "+n("scrollview")),this.options.enablePager&&(this.pager=new j(this),this.options.pagerOverlay&&e.addClass(n("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:p(this,"_transitionEnd"),dragStart:p(this,"_dragStart"),dragEnd:p(this,"_dragEnd"),change:p(this,R)}),c.bind("resize",function(){c.pane.refresh()}),c.page=t.page,i=0===this.inner.children().length,o=i?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(R,{pageCount:o.pageCount,page:o.page})}),o.bind("resize",function(){c.trigger(R,{pageCount:o.pageCount,page:o.page})}),o.bind(P,function(e){c.trigger(P,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",p(this,"viewShow")).bind("init",p(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:[M,E,R],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(R,{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 n=this.dataSource;return e?(this.scrollTo(n.indexOf(e),!0),t):n.at(this.page)},scrollTo:function(e,t){this._content.scrollTo(e,t),this._syncWithContent()},prev:function(){var e=this,n=e.page-1;e._content instanceof l?e._content.paneMoved(W,t,function(t){return e.trigger(M,t)}):n>-1&&e.scrollTo(n)},next:function(){var e=this,n=e.page+1;e._content instanceof l?e._content.paneMoved(V,t,function(t){return e.trigger(M,t)}):n<e._content.pageCount&&e.scrollTo(n)},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,n,i=this._content.pages,o=this._content.buffer;this.page=this._content.page,e=o?o.at(this.page):t,e instanceof Array||(e=[e]),n=i?i[1].element:t,this.trigger(E,{page:this.page,element:n,data:e})},_dragStart:function(){this._content.forcePageUpdate()&&this._syncWithContent()},_dragEnd:function(e){var t=this,n=e.x.velocity,i=this.options.velocityThreshold,o=U,r=x(n)>this.options.bounceVelocityThreshold;n>i?o=W:n<-i&&(o=V),this._content.paneMoved(o,r,function(e){return t.trigger(M,e)})},_transitionEnd:function(){this._content.updatePage()&&this._syncWithContent()}}),f.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.switch.min",["kendo.fx.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e){return"k-"+e+" km-"+e}function i(e,t,n){return Math.max(t,Math.min(n,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",f="state-active",p="state-disabled",m="disabled",g=l.transitions.css+"transform",v=e.proxy,_='<span class="'+n("switch")+" "+n("widget")+'">        <span class="'+n("switch-wrapper")+'">            <span class="'+n("switch-background")+'"></span>        </span>         <span class="'+n("switch-container")+'">            <span class="'+n("switch-handle")+'">                 <span class="'+n("switch-label-on")+'">{0}</span>                 <span class="'+n("switch-label-off")+'">{1}</span>             </span>         </span>    </span>',b=a.extend({init:function(t,n){var i,r=this;a.fn.init.call(r,t,n),n=r.options,r.wrapper=e(o.format(_,n.onLabel,n.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,i=r.options.checked,null===i&&(i=t.checked),r.check(i),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 i=this,o=i.element[0];return e===t?o.checked:(i._position(e?i.constrain:0),o.checked=e,i.wrapper.toggleClass(n(d),e).toggleClass(n(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 i=this.element,o=this.wrapper;t===e&&(e=!0),this.options.enable=e,e?i.removeAttr(m):i.attr(m,m),o.toggleClass(n(p),!e)},_resize:function(){this.refresh()},_move:function(e){var t=this;e.preventDefault(),t._position(i(t.position+e.x.delta,0,t.width-s(t.handle,!0)))},_position:function(e){var t=this;t.position=e,t.handle.css(g,"translatex("+e+"px)"),t._animateBackground&&t.background.css(h,t.origin+e)},_start:function(){this.options.enable?(this.userEvents.capture(),this.handle.addClass(n(f))):this.userEvents.cancel()},_stop:function(){var e=this;e.handle.removeClass(n(f)),e._toggle(e.position>e.snapPoint)},_toggle:function(e){var t,i=this,r=i.handle,s=i.element[0],a=s.checked,l=o.mobile.application&&o.mobile.application.os.wp?100:200;i.wrapper.toggleClass(n(d),e).toggleClass(n(u),!e),i.position=t=e*i.constrain,i._animateBackground&&i.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,i.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:v(e._start,e),move:v(e._move,e),end:v(e._stop,e)})}});r.plugin(b)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.tabstrip.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){return e('<span class="km-badge">'+t+"</span>")}var i=window.kendo,o=i.mobile.ui,r=o.Widget,s="km-state-active",a="select",l=r.extend({init:function(t,n){var i=this;r.fn.init.call(i,t,n),i.container().bind("show",e.proxy(this,"refresh")),i.element.addClass("km-tabstrip").find("a").each(i._buildButton).eq(i.options.selectedIndex).addClass(s),i.element.on("down","a","_release")},events:[a],switchTo:function(t){var n,i,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(n=o[r],i=n.href.replace(/(\#.+)(\?.+)$/,"$1"),
i.indexOf(t,i.length-t.length)!==-1)return this._setActiveItem(e(n)),!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,i){var o,r=this.element;return isNaN(t)||(t=r.children().get(t)),t=r.find(t),o=e(t.find(".km-badge")[0]||n(i).insertAfter(t.children(".km-icon"))),i||0===i?(o.html(i),this):i===!1?(o.empty().remove(),this):o.html()},_release:function(t){if(!(t.which>1)){var n=this,i=e(t.currentTarget);i[0]!==n.currentItem()[0]&&(n.trigger(a,{item:i})?t.preventDefault():n._setActiveItem(i))}},_setActiveItem:function(e){e[0]&&(this.clear(),e.addClass(s))},_buildButton:function(){var t=e(this),o=i.attrValue(t,"icon"),r=i.attrValue(t,"badge"),s=t.find("img"),a=e('<span class="km-icon"/>');t.addClass("km-button").attr(i.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)&&n(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,n){(n||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,n){(n||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,n){(n||t)()});
//# sourceMappingURL=kendo.all.min.js.map

/** 
 * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2017 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e){"function"==typeof define&&define.amd?define(["kendo.core.min"],e):e()}(function(){!function(e,y){kendo.cultures["en-US"]={name:"en-US",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 d",M:"MMMM d",s:"yyyy'-'MM'-'dd'T'HH':'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}}}}(this)});
//# sourceMappingURL=kendo.culture.en-US.min.js.map

/** 
 * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2017 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e){"function"==typeof define&&define.amd?define(["kendo.core.min"],e):e()}(function(){!function(e,d){kendo.cultures["fr-FR"]={name:"fr-FR",numberFormat:{pattern:["-n"],decimals:2,",":" ",".":",",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":" ",".":",",groupSize:[3],symbol:"%"},currency:{name:"Euro",abbr:"EUR",pattern:["-n $","n $"],decimals:2,",":" ",".":",",groupSize:[3],symbol:"€"}},calendars:{standard:{days:{names:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],namesAbbr:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],namesShort:["di","lu","ma","me","je","ve","sa"]},months:{names:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],namesAbbr:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]},AM:[""],PM:[""],patterns:{d:"dd/MM/yyyy",D:"dddd d MMMM yyyy",F:"dddd d MMMM yyyy HH:mm:ss",g:"dd/MM/yyyy HH:mm",G:"dd/MM/yyyy HH:mm:ss",m:"d MMMM",M:"d MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"HH:mm",T:"HH:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":"/",":":":",firstDay:1}}}}(this)});
//# sourceMappingURL=kendo.culture.fr-FR.min.js.map

$.extend(kendo.ui.ComboBox.fn.options, {
    noDataTemplate : "Aucune donnée."
});
$.extend(kendo.ui.DropDownList.fn.options, {
    noDataTemplate: "Aucune donnée."
});

/** 
 * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2017 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e){"function"==typeof define&&define.amd?define(["kendo.core.min"],e):e()}(function(){!function(e,t){kendo.ui.FlatColorPicker&&(kendo.ui.FlatColorPicker.prototype.options.messages=e.extend(!0,kendo.ui.FlatColorPicker.prototype.options.messages,{apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color"})),kendo.ui.ColorPicker&&(kendo.ui.ColorPicker.prototype.options.messages=e.extend(!0,kendo.ui.ColorPicker.prototype.options.messages,{apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color"})),kendo.ui.ColumnMenu&&(kendo.ui.ColumnMenu.prototype.options.messages=e.extend(!0,kendo.ui.ColumnMenu.prototype.options.messages,{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings",lock:"Lock",unlock:"Unlock"})),kendo.ui.Editor&&(kendo.ui.Editor.prototype.options.messages=e.extend(!0,kendo.ui.Editor.prototype.options.messages,{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",uploadFile:"Upload",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",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogButtonSeparator:"or",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create 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",dialogOk:"Ok",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",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"})),kendo.ui.FileBrowser&&(kendo.ui.FileBrowser.prototype.options.messages=e.extend(!0,kendo.ui.FileBrowser.prototype.options.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"})),kendo.ui.FilterCell&&(kendo.ui.FilterCell.prototype.options.messages=e.extend(!0,kendo.ui.FilterCell.prototype.options.messages,{isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",operator:"Operator"})),kendo.ui.FilterCell&&(kendo.ui.FilterCell.prototype.options.operators=e.extend(!0,kendo.ui.FilterCell.prototype.options.operators,{string:{eq:"Is equal to",neq:"Is not equal to",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"},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",isnull:"Is null",isnotnull:"Is not null"},date:{eq:"Is equal to",neq:"Is not equal to",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:"Is equal to",neq:"Is not equal to",isnull:"Is null",isnotnull:"Is not null"}})),kendo.ui.FilterMenu&&(kendo.ui.FilterMenu.prototype.options.messages=e.extend(!0,kendo.ui.FilterMenu.prototype.options.messages,{info:"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",cancel:"Cancel"})),kendo.ui.FilterMenu&&(kendo.ui.FilterMenu.prototype.options.operators=e.extend(!0,kendo.ui.FilterMenu.prototype.options.operators,{string:{eq:"Is equal to",neq:"Is not equal to",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"},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",isnull:"Is null",isnotnull:"Is not null"},date:{eq:"Is equal to",neq:"Is not equal to",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:"Is equal to",neq:"Is not equal to",isnull:"Is null",isnotnull:"Is not null"}})),kendo.ui.FilterMultiCheck&&(kendo.ui.FilterMultiCheck.prototype.options.messages=e.extend(!0,kendo.ui.FilterMultiCheck.prototype.options.messages,{checkAll:"Select All",clear:"Clear",filter:"Filter",search:"Search"})),kendo.ui.Gantt&&(kendo.ui.Gantt.prototype.options.messages=e.extend(!0,kendo.ui.Gantt.prototype.options.messages,{actions:{addChild:"Add Child",append:"Add Task",insertAfter:"Add Below",insertBefore:"Add Above",pdf:"Export to PDF"},cancel:"Cancel",deleteDependencyWindowTitle:"Delete dependency",deleteTaskWindowTitle:"Delete task",destroy:"Delete",editor:{assingButton:"Assign",editorTitle:"Task",end:"End",percentComplete:"Complete",resources:"Resources",resourcesEditorTitle:"Resources",resourcesHeader:"Resources",start:"Start",title:"Title",unitsHeader:"Units"},save:"Save",views:{day:"Day",end:"End",month:"Month",start:"Start",week:"Week",year:"Year"}})),kendo.ui.Grid&&(kendo.ui.Grid.prototype.options.messages=e.extend(!0,kendo.ui.Grid.prototype.options.messages,{commands:{cancel:"Cancel changes",canceledit:"Cancel",create:"Add new record",destroy:"Delete",edit:"Edit",excel:"Export to Excel",pdf:"Export to PDF",save:"Save changes",select:"Select",update:"Update"},editable:{cancelDelete:"Cancel",confirmation:"Are you sure you want to delete this record?",confirmDelete:"Delete"},noRecords:"No records available."})),kendo.ui.TreeList&&(kendo.ui.TreeList.prototype.options.messages=e.extend(!0,kendo.ui.TreeList.prototype.options.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"}})),kendo.ui.Groupable&&(kendo.ui.Groupable.prototype.options.messages=e.extend(!0,kendo.ui.Groupable.prototype.options.messages,{empty:"Drag a column header and drop it here to group by that column"})),kendo.ui.NumericTextBox&&(kendo.ui.NumericTextBox.prototype.options=e.extend(!0,kendo.ui.NumericTextBox.prototype.options,{upArrowText:"Increase value",downArrowText:"Decrease value"})),kendo.ui.MediaPlayer&&(kendo.ui.MediaPlayer.prototype.options.messages=e.extend(!0,kendo.ui.MediaPlayer.prototype.options.messages,{pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",quality:"Quality",fullscreen:"Full Screen"})),kendo.ui.Pager&&(kendo.ui.Pager.prototype.options.messages=e.extend(!0,kendo.ui.Pager.prototype.options.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"})),kendo.ui.PivotGrid&&(kendo.ui.PivotGrid.prototype.options.messages=e.extend(!0,kendo.ui.PivotGrid.prototype.options.messages,{measureFields:"Drop Data Fields Here",columnFields:"Drop Column Fields Here",rowFields:"Drop Rows Fields Here"})),kendo.ui.PivotFieldMenu&&(kendo.ui.PivotFieldMenu.prototype.options.messages=e.extend(!0,kendo.ui.PivotFieldMenu.prototype.options.messages,{info:"Show items with value that:",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"}})),kendo.ui.RecurrenceEditor&&(kendo.ui.RecurrenceEditor.prototype.options.messages=e.extend(!0,kendo.ui.RecurrenceEditor.prototype.options.messages,{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"}})),kendo.ui.Scheduler&&(kendo.ui.Scheduler.prototype.options.messages=e.extend(!0,kendo.ui.Scheduler.prototype.options.messages,{allDay:"all day",date:"Date",event:"Event",time:"Time",showFullDay:"Show full day",showWorkDay:"Show business hours",today:"Today",save:"Save",cancel:"Cancel",destroy:"Delete",deleteWindowTitle:"Delete event",ariaSlotLabel:"Selected from {0:t} to {1:t}",ariaEventLabel:"{0} on {1:D} at {2:t}",editable:{confirmation:"Are you sure you want to delete this event?"},views:{day:"Day",week:"Week",workWeek:"Work Week",agenda:"Agenda",month:"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",deleteRecurring:"Do you want to delete only this event occurrence or the whole series?",editRecurring:"Do you want to edit only this event occurrence or the whole series?"},editor:{title:"Title",start:"Start",end:"End",allDayEvent:"All day event",description:"Description",repeat:"Repeat",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"}})),kendo.spreadsheet&&kendo.spreadsheet.messages.borderPalette&&(kendo.spreadsheet.messages.borderPalette=e.extend(!0,kendo.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",reset:"Reset color",customColor:"Custom color...",apply:"Apply",cancel:"Cancel"})),kendo.spreadsheet&&kendo.spreadsheet.messages.dialogs&&(kendo.spreadsheet.messages.dialogs=e.extend(!0,kendo.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"},placeholders:{typeTitle:"Type title",typeMessage:"Type message"}},saveAsDialog:{title:"Save As...",labels:{fileName:"File name",saveAsType:"Save as type"}},exportAsDialog:{title:"Export...",labels:{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."},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."}})),kendo.spreadsheet&&kendo.spreadsheet.messages.filterMenu&&(kendo.spreadsheet.messages.filterMenu=e.extend(!0,kendo.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"},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"}}})),kendo.spreadsheet&&kendo.spreadsheet.messages.toolbar&&(kendo.spreadsheet.messages.toolbar=e.extend(!0,kendo.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",colorPicker:{reset:"Reset color",customColor:"Custom color..."},copy:"Copy",cut:"Cut",deleteColumn:"Delete column",deleteRow:"Delete row",excelImport:"Import from Excel...",filter:"Filter",fontFamily:"Font",fontSize:"Font size",format:"Custom format...",formatTypes:{automatic:"Automatic",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"},saveAs:"Save As...",sortAsc:"Sort ascending",sortDesc:"Sort descending",sortButtons:{sortSheetAsc:"Sort sheet A to Z",sortSheetDesc:"Sort sheet Z to A",sortRangeAsc:"Sort range A to Z",sortRangeDesc:"Sort range Z to A"},textColor:"Text Color",textWrap:"Wrap text",underline:"Underline",validation:"Data validation..."})),kendo.spreadsheet&&kendo.spreadsheet.messages.view&&(kendo.spreadsheet.messages.view=e.extend(!0,kendo.spreadsheet.messages.view,{errors:{shiftingNonblankCells:"Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",filterRangeContainingMerges:"Cannot create a filter within a range containing merges",validationError:"The value that you entered violates the validation rules set on the cell."},tabs:{home:"Home",insert:"Insert",data:"Data"}})),kendo.ui.Slider&&(kendo.ui.Slider.prototype.options=e.extend(!0,kendo.ui.Slider.prototype.options,{increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease"})),kendo.ui.TreeList&&(kendo.ui.TreeList.prototype.options.messages=e.extend(!0,kendo.ui.TreeList.prototype.options.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"}})),kendo.ui.TreeList&&(kendo.ui.TreeList.prototype.options.columnMenu=e.extend(!0,kendo.ui.TreeList.prototype.options.columnMenu,{messages:{columns:"Choose columns",filter:"Apply filter",sortAscending:"Sort (asc)",sortDescending:"Sort (desc)"}})),kendo.ui.TreeView&&(kendo.ui.TreeView.prototype.options.messages=e.extend(!0,kendo.ui.TreeView.prototype.options.messages,{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"})),kendo.ui.Upload&&(kendo.ui.Upload.prototype.options.localization=e.extend(!0,kendo.ui.Upload.prototype.options.localization,{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",uploadSelectedFiles:"Upload files",dropFilesHere:"drop files here to upload",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",headerStatusUploaded:"Done"})),kendo.ui.Validator&&(kendo.ui.Validator.prototype.options.messages=e.extend(!0,kendo.ui.Validator.prototype.options.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"})),kendo.ui.progress&&(kendo.ui.progress.messages=e.extend(!0,kendo.ui.progress.messages,{loading:"Loading..."})),kendo.ui.Dialog&&(kendo.ui.Dialog.prototype.options.messages=e.extend(!0,kendo.ui.Dialog.prototype.options.localization,{close:"Close"})),kendo.ui.Alert&&(kendo.ui.Alert.prototype.options.messages=e.extend(!0,kendo.ui.Alert.prototype.options.localization,{okText:"OK"})),kendo.ui.Confirm&&(kendo.ui.Confirm.prototype.options.messages=e.extend(!0,kendo.ui.Confirm.prototype.options.localization,{okText:"OK",cancel:"Cancel"})),kendo.ui.Prompt&&(kendo.ui.Prompt.prototype.options.messages=e.extend(!0,kendo.ui.Prompt.prototype.options.localization,{okText:"OK",cancel:"Cancel"}))}(window.kendo.jQuery)});
//# sourceMappingURL=kendo.messages.en-US.min.js.map

/** 
 * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2017 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e){"function"==typeof define&&define.amd?define(["kendo.core.min"],e):e()}(function(){!function(e,t){kendo.ui.FilterCell&&(kendo.ui.FilterCell.prototype.options.operators=e.extend(!0,kendo.ui.FilterCell.prototype.options.operators,{date:{eq:"Est égal à",gte:"Est postérieur ou égal à",gt:"Est postérieur",lte:"Est antérieur ou égal à",lt:"Est antérieur",neq:"N’est pas égal à",isnull:"Est nulle",isnotnull:"N’est pas nulle"},number:{eq:"Est égal à",gte:"Est supérieur ou égal à",gt:"Est supérieur à",lte:"Est inférieur ou égal à",lt:"Est inférieur à",neq:"N’est pas égal à",isnull:"Est nulle",isnotnull:"N’est pas nulle"},string:{endswith:"Se termine par",eq:"Est égal à",neq:"N’est pas égal à",startswith:"Commence par",contains:"Contient",doesnotcontain:"Ne contient pas",isnull:"Est nulle",isnotnull:"N’est pas nulle",isempty:"Est vide",isnotempty:"N’est pas vide"},enums:{eq:"Est égal à",neq:"N’est pas égal à",isnull:"Est nulle",isnotnull:"N’est pas nulle"}})),kendo.ui.FilterMenu&&(kendo.ui.FilterMenu.prototype.options.operators=e.extend(!0,kendo.ui.FilterMenu.prototype.options.operators,{date:{eq:"Est égal à",gte:"Est postérieur ou égal à",gt:"Est postérieur",lte:"Est antérieur ou égal à",lt:"Est antérieur",neq:"N’est pas égal à",isnull:"Est nulle",isnotnull:"N’est pas nulle"},number:{eq:"Est égal à",gte:"Est supérieur ou égal à",gt:"Est supérieur à",lte:"Est inférieur ou égal à",lt:"Est inférieur à",neq:"N’est pas égal à",isnull:"Est nulle",isnotnull:"N’est pas nulle"},string:{endswith:"Se termine par",eq:"Est égal à",neq:"N’est pas égal à",startswith:"Commence par",contains:"Contient",doesnotcontain:"Ne contient pas",isnull:"Est nulle",isnotnull:"N’est pas nulle",isempty:"Est vide",isnotempty:"N’est pas vide"},enums:{eq:"Est égal à",neq:"N’est pas égal à",isnull:"Est nulle",isnotnull:"N’est pas nulle"}})),kendo.ui.ColumnMenu&&(kendo.ui.ColumnMenu.prototype.options.messages=e.extend(!0,kendo.ui.ColumnMenu.prototype.options.messages,{columns:"Colonnes",sortAscending:"Tri croissant",sortDescending:"Tri décroissant",settings:"Paramètres de colonne",done:"Fini",lock:"Bloquer",unlock:"Ouvrir"})),kendo.ui.RecurrenceEditor&&(kendo.ui.RecurrenceEditor.prototype.options.messages=e.extend(!0,kendo.ui.RecurrenceEditor.prototype.options.messages,{daily:{interval:"jour(s)",repeatEvery:"Répéter chaque:"},end:{after:" Après",occurrence:"occurrence(s)",label:"Finir:",never:"Jamais",on:"Sur",mobileLabel:"Ends"},frequencies:{daily:"Une fois par jour",monthly:"Une fois par mois",never:"Jamais",weekly:"Une fois par semaine",yearly:"Une fois par an"},monthly:{day:"Jour",interval:"mois",repeatEvery:"Répéter chaque:",repeatOn:"Répéter l'opération sur:"},offsetPositions:{first:"premier",fourth:"quatrième",last:"dernier",second:"second",third:"troisième"},weekly:{repeatEvery:"Répéter chaque:",repeatOn:"Répéter l'opération sur:",interval:"semaine(s)"},yearly:{of:"de",repeatEvery:"Répéter chaque:",repeatOn:"Répéter l'opération sur:",interval:"année(ans)"},weekdays:{day:"jour",weekday:"jour de la semaine",weekend:"jour de week-end"}})),kendo.ui.Grid&&(kendo.ui.Grid.prototype.options.messages=e.extend(!0,kendo.ui.Grid.prototype.options.messages,{commands:{create:"Insérer",destroy:"Effacer",canceledit:"Annuler",update:"Mettre à jour",edit:"Éditer",excel:"Export to Excel",pdf:"Export to PDF",select:"Sélectionner",cancel:"Annuler les modifications",save:"Enregistrer les modifications"},editable:{confirmation:"Êtes-vous sûr de vouloir supprimer cet enregistrement?",cancelDelete:"Annuler",confirmDelete:"Effacer"},noRecords:"Aucun enregistrement disponible."})),kendo.ui.Pager&&(kendo.ui.Pager.prototype.options.messages=e.extend(!0,kendo.ui.Pager.prototype.options.messages,{allPages:"Tous",page:"Page",display:"Afficher les items {0} - {1} de {2}",of:"de {0}",empty:"Aucun enregistrement à afficher.",refresh:"Actualiser",first:"Aller à la première page",itemsPerPage:"articles par page",last:"Aller à la dernière page",next:"Aller à la page suivante",previous:"Aller à la page précédente",morePages:"Plusieurs pages"})),kendo.ui.FilterCell&&(kendo.ui.FilterCell.prototype.options.messages=e.extend(!0,kendo.ui.FilterCell.prototype.options.messages,{filter:"Filtrer",clear:"Effacer filtre",isFalse:"est fausse",isTrue:"est vrai",operator:"Opérateur"})),kendo.ui.FilterMenu&&(kendo.ui.FilterMenu.prototype.options.messages=e.extend(!0,kendo.ui.FilterMenu.prototype.options.messages,{filter:"Filtrer",and:"Et",clear:"Effacer filtre",info:"Afficher les lignes avec la valeur qui",selectValue:"-Sélectionner-",isFalse:"est fausse",isTrue:"est vrai",or:"Ou",cancel:"Annuler",operator:"Opérateur",value:"Valeur"})),kendo.ui.FilterMultiCheck&&(kendo.ui.FilterMultiCheck.prototype.options.messages=e.extend(!0,kendo.ui.FilterMultiCheck.prototype.options.messages,{checkAll:"Choisir toutes",clear:"Effacer filtre",filter:"Filtrer",search:"Recherche"})),kendo.ui.Groupable&&(kendo.ui.Groupable.prototype.options.messages=e.extend(!0,kendo.ui.Groupable.prototype.options.messages,{empty:"Faites glisser un en-tête de colonne et déposer ici pour grouper par cette colonne."})),kendo.ui.Editor&&(kendo.ui.Editor.prototype.options.messages=e.extend(!0,kendo.ui.Editor.prototype.options.messages,{bold:"Gras",createLink:"Insérer un lien hypertexte",fontName:"Police",fontNameInherit:"(police héritée)",fontSize:"Taille de police",fontSizeInherit:"(taille héritée)",formatBlock:"Style du paragraphe",indent:"Augmenter le retrait",insertHtml:"Insérer HTML",insertImage:"Insérer image",insertOrderedList:"Liste numérotée",insertUnorderedList:"Liste à puces",italic:"Italique",justifyCenter:"Centrer",justifyFull:"Justifier",justifyLeft:"Aligner le texte à gauche",justifyRight:"Aligner le texte à droite",outdent:"Diminuer le retrait",strikethrough:"Barré",styles:"Styles",subscript:"Subscript",superscript:"Superscript",underline:"Souligné",unlink:"Supprimer le lien hypertexte",deleteFile:'Êtes-vous sûr de vouloir supprimer "{0}"?',directoryNotFound:"Un répertoire avec ce nom n'a pas été trouvé.",emptyFolder:"Vider le dossier",invalidFileType:'Le fichier sélectionné "{0}" n\'est pas valide. Les types de fichiers supportés sont {1}.',orderBy:"Organiser par:",orderByName:"Nom",orderBySize:"Taille",overwriteFile:'Un fichier avec le nom "{0}" existe déjà dans le répertoire courant. Voulez-vous le remplacer?',uploadFile:"Télécharger",backColor:"Couleur de fond",foreColor:"Couleur",dialogButtonSeparator:"Ou",dialogCancel:"Fermer",dialogInsert:"Insérer",imageAltText:"Le texte de remplacement",imageWebAddress:"Adresse Web",imageWidth:"Largeur (px)",imageHeight:"Hauteur (px)",linkOpenInNewWindow:"Ouvrir dans une nouvelle fenêtre",linkText:"Text",linkToolTip:"Info-bulle",linkWebAddress:"Adresse Web",search:"Search",createTable:"Insérer un tableau",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteColumn:"Supprimer la colonne",deleteRow:"Supprimer ligne",dropFilesHere:"drop files here to upload",formatting:"Format",viewHtml:"View HTML",dialogUpdate:"Update",insertFile:"Insérer un Fichier",dialogOk:"OK",tableWizard:"Assistant de tableau",tableTab:"Table",cellTab:"Cellule",accessibilityTab:"Accessibilité",caption:"Sous-titre",summary:"Sommaire",width:"Largeur",height:"Hauteur",cellSpacing:"Espacement des cellules",cellPadding:"Rembourrage des cellules",cellMargin:"Marge des cellules",alignment:"Alignement",background:"Fond",cssClass:"CSS Classe",id:"Id",border:"Bordure",borderStyle:"Style de bordure",collapseBorders:"Rétracter bordures",wrapText:"Renvoi à la ligne",associateCellsWithHeaders:"Cellules associées aux entêtes",alignLeft:"Aligner à gauche",alignCenter:"Aligner le centre",alignRight:"Aligner à droite",alignLeftTop:"Aligner à gauche et haut",alignCenterTop:"Aligner le centre et haut",alignRightTop:"Aligner à droite et haut",alignLeftMiddle:"Aligner à gauche et milieu",alignCenterMiddle:"Aligner le centre et milieu",alignRightMiddle:"Aligner à droite et milieu",alignLeftBottom:"Aligner à gauche et bas",alignCenterBottom:"Aligner le centre et bas",alignRightBottom:"Aligner à droite et bas",alignRemove:"Retirer alignement",columns:"Colonnes",rows:"Lignes",selectAllCells:"Sélectionner toutes les cellules"}));var r={uploadFile:"Charger",orderBy:"Trier par",orderByName:"Nom",orderBySize:"Taille",directoryNotFound:"Aucun répértoire de ce nom.",emptyFolder:"Répertoire vide",deleteFile:'Etes-vous sûr de vouloir supprimer "{0}"?',invalidFileType:'Le fichier sélectionné "{0}" n\'est pas valide. Les type fichiers supportés sont {1}.',overwriteFile:'Un fichier du nom "{0}" existe déjà dans ce répertoire. Voulez-vous le remplacer?',dropFilesHere:"glissez les fichiers ici pour les charger",search:"Recherche"};kendo.ui.FileBrowser&&(kendo.ui.FileBrowser.prototype.options.messages=e.extend(!0,kendo.ui.FileBrowser.prototype.options.messages,r)),kendo.ui.ImageBrowser&&(kendo.ui.ImageBrowser.prototype.options.messages=e.extend(!0,kendo.ui.ImageBrowser.prototype.options.messages,r)),kendo.ui.Upload&&(kendo.ui.Upload.prototype.options.localization=e.extend(!0,kendo.ui.Upload.prototype.options.localization,{cancel:"Annuler",dropFilesHere:"déposer les fichiers à télécharger ici",remove:"Retirer",retry:"Réessayer",select:"Sélectionner...",statusFailed:"échoué",statusUploaded:"téléchargé",statusUploading:"téléchargement",uploadSelectedFiles:"Télécharger des fichiers",headerStatusUploaded:"Done",headerStatusUploading:"Uploading..."})),kendo.ui.Scheduler&&(kendo.ui.Scheduler.prototype.options.messages=e.extend(!0,kendo.ui.Scheduler.prototype.options.messages,{allDay:"toute la journée",cancel:"Annuler",editable:{confirmation:"Etes-vous sûr de vouloir supprimer cet élément?"},date:"Date",destroy:"Effacer",editor:{allDayEvent:"Toute la journée",description:"Description",editorTitle:"Evènement",end:"Fin",endTimezone:"End timezone",repeat:"Répéter",separateTimezones:"Use separate start and end time zones",start:"Début",startTimezone:"Start timezone",timezone:" ",timezoneEditorButton:"Fuseau horaire",timezoneEditorTitle:"Fuseaux horaires",title:"Titre",noTimezone:"Pas de fuseau horaire"},event:"Evènement",recurrenceMessages:{deleteRecurring:"Voulez-vous supprimer seulement cet évènement ou toute la série?",deleteWindowOccurrence:"Suppression de l'élément courant",deleteWindowSeries:"Suppression de toute la série",deleteWindowTitle:"Suppression d'un élément récurrent",editRecurring:"Voulez-vous modifier seulement cet évènement ou toute la série?",editWindowOccurrence:"Modifier l'occurrence courante",editWindowSeries:"Modifier la série",editWindowTitle:"Modification de l'élément courant"},save:"Sauvegarder",time:"Time",today:"Aujourd'hui",views:{agenda:"Agenda",day:"Jour",month:"Mois",week:"Semaine",workWeek:"Semaine de travail",timeline:"Chronologie"},deleteWindowTitle:"Suppression de l'élément",showFullDay:"Montrer toute la journée",showWorkDay:"Montrer les heures ouvrables"})),kendo.ui.Validator&&(kendo.ui.Validator.prototype.options.messages=e.extend(!0,kendo.ui.Validator.prototype.options.messages,{required:"{0} est requis",pattern:"{0} n'est pas valide",min:"{0} doit être plus grand ou égal à {1}",max:"{0} doit être plus petit ou égal à {1}",step:"{0} n'est pas valide",email:"{0} n'est pas un courriel valide",url:"{0} n'est pas une adresse web valide",date:"{0} n'est pas une date valide",dateCompare:"La date de fin doit être postérieure à la date de début"})),kendo.ui.Dialog&&(kendo.ui.Dialog.prototype.options.messages=e.extend(!0,kendo.ui.Dialog.prototype.options.localization,{close:"Fermer"})),kendo.ui.Alert&&(kendo.ui.Alert.prototype.options.messages=e.extend(!0,kendo.ui.Alert.prototype.options.localization,{okText:"OK"})),kendo.ui.Confirm&&(kendo.ui.Confirm.prototype.options.messages=e.extend(!0,kendo.ui.Confirm.prototype.options.localization,{okText:"OK",cancel:"Annuler"})),kendo.ui.Prompt&&(kendo.ui.Prompt.prototype.options.messages=e.extend(!0,kendo.ui.Prompt.prototype.options.localization,{okText:"OK",cancel:"Annuler"}))}(window.kendo.jQuery)});
//# sourceMappingURL=kendo.messages.fr-FR.min.js.map

/** 
 * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2017 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(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 i,o={};return t.sort?(o[this.options.prefix+"sort"]=e.map(t.sort,function(e){return e.field+"-"+e.dir}).join("~"),delete t.sort):o[this.options.prefix+"sort"]="",t.page&&(o[this.options.prefix+"page"]=t.page,delete t.page),t.pageSize&&(o[this.options.prefix+"pageSize"]=t.pageSize,delete t.pageSize),t.group?(o[this.options.prefix+"group"]=e.map(t.group,function(e){return e.field+"-"+e.dir}).join("~"),delete t.group):o[this.options.prefix+"group"]="",t.aggregate&&(o[this.options.prefix+"aggregate"]=e.map(t.aggregate,function(e){return e.field+"-"+e.aggregate}).join("~"),delete t.aggregate),t.filter?(o[this.options.prefix+"filter"]=a(t.filter,r.encode),delete t.filter):(o[this.options.prefix+"filter"]="",delete t.filter),delete t.take,delete t.skip,i=new g(r),i.serialize(o,t,""),o}function a(n,i){return n.filters?e.map(n.filters,function(e){var t=e.filters&&e.filters.length>1,n=a(e,i);return n&&t&&(n="("+n+")"),n}).join("~"+n.logic+"~"):n.field?n.field+"~"+n.operator+"~"+r(n.value,i):t}function r(e,t){if("string"==typeof e){if(!(e.indexOf("Date(")>-1))return e=e.replace(l,"''"),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 i(e,n){return t!==e?e:n}function o(t){var n=t.HasSubgroups||t.hasSubgroups||!1,a=t.Items||t.items;return{value:i(t.Key,i(t.key,t.value)),field:t.Member||t.member||t.field,hasSubgroups:n,aggregates:d(t.Aggregates||t.aggregates),items:n?e.map(a,o):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]=f(!0,r[a.Member],s(a));return r}var c=window.kendo,l=/'/gi,f=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,i){p(n)?this.serializeArray(e,n,i):m(n)?this.serialize(e,n,i):e[i]===t&&(e[i]=a[r]=this.serializeValue(n))},serializeArray:function(e,t,n){var a,r,i,o,s;for(o=0,s=0;o<t.length;o++)a=t[o],r="["+s+"]",i=n+r,this.serializeField(e,a,t,r,i),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}},f(!0,c.data,{schemas:{"aspnetmvc-ajax":{groups:function(t){return e.map(this._dataAccessFunction(t),o)},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)}}}}),f(!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,f(!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:""}})}}),f(!0,c.data,{schemas:{webapi:c.data.schemas["aspnetmvc-ajax"]}}),f(!0,c.data,{transports:{webapi:c.data.RemoteTransport.extend({init:function(e){var t,a,r=this,i=(e||{}).stringifyDates;e.update&&(t="string"==typeof e.update?e.update:e.update.url,e.update=f(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=f(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,f(!0,{},this.options,e,{parameterMap:function(e,t){return n.call(r,e,t,{encode:!1,stringifyDates:i,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:""}})}}),f(!0,c.data,{transports:{"aspnetmvc-server":c.data.RemoteTransport.extend({init:function(e){var t=this;c.data.RemoteTransport.fn.init.call(this,f(e,{parameterMap:function(e,a){return n.call(t,e,a,{encode:!0})}}))},read:function(t){var n,a,r=this.options.prefix,i=[r+"sort",r+"page",r+"pageSize",r+"group",r+"aggregate",r+"filter"],o=RegExp("("+i.join("|")+")=[^&]*&?","g");a=location.search.replace(o,"").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.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,i=e(t).data("kendoDropDownList");if(i)return n=i.dataSource.filter(),a=i.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,i={},o=e.data(),s=t.length;for(r in o)a=r.toLowerCase(),n=a.indexOf(t),n>-1&&(a=a.substring(n+s,r.length),a&&(i[a]=o[r]));return i}function i(t){var n,a,r=t.Fields||[],i={};for(n=0,a=r.length;n<a;n++)e.extend(!0,i,o(r[n]));return i}function o(e){var t,n,a,r,i={},o={},s=e.FieldName,d=e.ValidationRules;for(a=0,r=d.length;a<r;a++)t=d[a].ValidationType,n=d[a].ValidationParameters,i[s+t]=c(s,t,n),o[s+t]=u(d[a].ErrorMessage);return{rules:i,messages:o}}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 l(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)}var f=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,p={required:function(e){var t,n,a,r=e.val(),i=e.filter("[type=checkbox]");return i.length&&(t=i[0].name.replace(f,"\\$1"),n="input:hidden[name='"+t+"']",a=i.next(n),a.length||(a=i.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()||l(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(f,"\\$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(f,"\\$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 i(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.multiselect.min","kendo.validator.min","aspnetmvc/kendo.data.aspnetmvc.min","aspnetmvc/kendo.combobox.aspnetmvc.min","aspnetmvc/kendo.dropdownlist.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

